{"name":"@ts-graphviz/adapter","version":"0.0.0-pr956-20240225073457","description":"This package contains runtime-dependent processing for the ts-graphviz library, such as I/O processing.","type":"module","main":"./lib/node.cjs","module":"./lib/node.js","types":"./lib/node.d.ts","exports":{".":{"browser":{"types":"./lib/browser.d.ts","require":"./lib/browser.cjs","default":"./lib/browser.js"},"deno":{"types":"./lib/deno.d.ts","default":"./lib/deno.js"},"default":{"types":"./lib/node.d.ts","require":"./lib/node.cjs","default":"./lib/node.js"}},"./package.json":"./package.json"},"repository":{"type":"git","url":"git+https://github.com/ts-graphviz/ts-graphviz.git","directory":"packages/adapter"},"publishConfig":{"access":"public","provenance":true},"author":{"name":"Yuki Yamazaki","email":"yuki@kamiazya.tech"},"license":"MIT","bugs":{"url":"https://github.com/ts-graphviz/ts-graphviz/issues"},"homepage":"https://github.com/ts-graphviz/ts-graphviz#readme","dependencies":{"@ts-graphviz/common":"^0.0.0-pr956-20240225073457"},"devDependencies":{"@deno/shim-deno":"^0.19.1","@types/node":"^20.2.1","typescript":"^5.3.3","vite":"^5.1.3","vite-plugin-dts":"^3.7.2"},"scripts":{"build":"vite build && rm ./lib/deno.cjs "},"_id":"@ts-graphviz/adapter@0.0.0-pr956-20240225073457","_integrity":"sha512-JlDiPRAgCA08mr9AIuvUfogqL6z2O5ar1IrgtdyXf6lir+307G3UxW0JhXBEStl6mQUWtjEp47VTweK89Jw+2w==","_resolved":"/tmp/acaa6fcad6311d9dda7f05f8c7afbf4d/ts-graphviz-adapter-0.0.0-pr956-20240225073457.tgz","_from":"file:ts-graphviz-adapter-0.0.0-pr956-20240225073457.tgz","_nodeVersion":"20.11.1","_npmVersion":"10.2.4","dist":{"integrity":"sha512-JlDiPRAgCA08mr9AIuvUfogqL6z2O5ar1IrgtdyXf6lir+307G3UxW0JhXBEStl6mQUWtjEp47VTweK89Jw+2w==","shasum":"bf19dd4f3bbca8791dec90c2ab361c1079563cf5","tarball":"http://registry-npm.ywwl.com/@ts-graphviz/adapter/download/@ts-graphviz/adapter-0.0.0-pr956-20240225073457.tgz","fileCount":35,"unpackedSize":35625,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@ts-graphviz%2fadapter@0.0.0-pr956-20240225073457","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHiA6YzFY2g9NC1Vndlg25mBFNxESKpkrXiXRjME/YdnAiEAlymeuieZtQaZqWEw82VfHibHBrtb2KOguJy+uCzTVYE="}],"size":8524,"noattachment":false,"key":"/@ts-graphviz/adapter/-/@ts-graphviz/adapter-0.0.0-pr956-20240225073457.tgz"},"_npmUser":{"name":"kamiazya","email":"yuki@kamiazya.tech"},"directories":{},"maintainers":[{"name":"kamiazya","email":"yuki@kamiazya.tech"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/adapter_0.0.0-pr956-20240225073457_1708846506331_0.5794587996447458"},"_hasShrinkwrap":false,"readme":"# @ts-graphviz/adapter\n\n> It is part of the ts-graphviz library, which is split into modular packages to improve maintainability, flexibility, and ease of use.\n\nProvides an interface to run Graphviz dot commands.\n\n[Graphviz](https://graphviz.gitlab.io/) must be installed so that the dot command can be executed.\n\nExecute the dot command to output a DOT language string to a stream or file.\n\n![Adapter State Machine](./media/adapter-state-machine.svg)\n\n## Usage\n\nThis module provides the following functions.\n\n- The `toStream` function converts **DOT** to **Stream**.\n    ```ts\n    import { toStream } from '@ts-graphviz/adapter';\n\n    const dot = `\n      digraph example {\n        node1 [\n          label = \"My Node\",\n        ]\n      }\n    `;\n\n    const stream = await toStream(dot, { format: 'svg' });\n    // Node.js\n    stream.pipe(process.stdout);\n    // Deno\n    await stream.pipeTo(Deno.stdout.writable);\n    ```\n- Writes **DOT** to a file at the specified path `toFile` function\n    ```ts\n    import { toFile } from '@ts-graphviz/adapter';\n\n    const dot = `\n      digraph example {\n        node1 [\n          label = \"My Node\",\n        ]\n      }\n    `;\n\n    await toFile(dot, './result.svg', { format: 'svg' });\n    ```\n\n> **Note** Designed to work with Node.js and Deno, Stream is runtime native.\n\nFor more examples and usage details, please refer to the ts-graphviz documentation.\n\n## Contributing\n\nContributions to the ts-graphviz project are welcome.\n\nPlease refer to the main ts-graphviz repository for guidelines on how to contribute.\n\n## License\n\nThis package is released under the MIT License.\n","publish_time":1708846506514,"_cnpm_publish_time":1708846506514,"dist-tags":{"develop":"0.0.0-pr956-20240225163634","latest":"3.0.12","next":"3.0.13-next-2f003a558829804c90b3ba0727ed647d754e9348"}}