@fnet/cli 0.4.26 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (184) hide show
  1. package/dist/fbin/index.js +15 -0
  2. package/dist/fnet/index.0jcm9pn5.js +1 -0
  3. package/dist/fnet/index.2084z2ed.js +2 -0
  4. package/dist/fnet/index.33f1ggpr.js +1 -0
  5. package/dist/fnet/index.3exge2js.js +1 -0
  6. package/dist/fnet/index.3kfx538h.js +1 -0
  7. package/dist/fnet/index.490y87nc.js +1 -0
  8. package/dist/fnet/index.4g9yezkq.js +1 -0
  9. package/dist/fnet/index.4jkat7r4.js +1 -0
  10. package/dist/fnet/index.7crx8ky1.js +1 -0
  11. package/dist/fnet/index.7vw06nrn.js +1 -0
  12. package/dist/fnet/index.9567fa9x.js +1 -0
  13. package/dist/fnet/index.gh75wt1m.js +1 -0
  14. package/dist/fnet/index.hzsfswvp.js +1 -0
  15. package/dist/fnet/index.jgpc3grc.js +1 -0
  16. package/dist/fnet/index.js +20 -0
  17. package/dist/fnet/index.p0zb7e1b.js +1 -0
  18. package/dist/fnet/index.r19p3bpa.js +2 -0
  19. package/dist/fnet/index.r82rtnmz.js +1 -0
  20. package/dist/fnet/index.s662t98v.js +1 -0
  21. package/dist/fnet/index.w74dpnpn.js +1 -0
  22. package/dist/fnet/index.xeaw5xa9.js +1 -0
  23. package/dist/fnet/index.zm4kesg6.js +1 -0
  24. package/dist/fnode/index.05n3mvs9.js +2 -0
  25. package/dist/fnode/index.2hc9tbyx.js +1 -0
  26. package/dist/fnode/index.2pnjg6dc.js +1 -0
  27. package/dist/fnode/index.9qgtmxq3.js +2 -0
  28. package/dist/fnode/index.b1q7y05p.js +1 -0
  29. package/dist/fnode/index.bhapgrs7.js +1 -0
  30. package/dist/fnode/index.cvxrf34y.js +2 -0
  31. package/dist/fnode/index.dp9wyahp.js +1 -0
  32. package/dist/fnode/index.eqxmcpdc.js +1 -0
  33. package/dist/fnode/index.f2tb0x3t.js +1 -0
  34. package/dist/fnode/index.fbzv6wwf.js +1 -0
  35. package/dist/fnode/index.gazd9raq.js +1 -0
  36. package/dist/fnode/index.hv4s25f0.js +3 -0
  37. package/dist/fnode/index.j5z7dtsx.js +1 -0
  38. package/dist/fnode/index.js +10 -0
  39. package/dist/fnode/index.kb4e4bxf.js +1 -0
  40. package/dist/fnode/index.qn0schqp.js +1 -0
  41. package/dist/fnode/index.rht29phd.js +1 -0
  42. package/dist/fnode/index.rzsfmek6.js +3 -0
  43. package/dist/fnode/index.s0nk6cv8.js +4 -0
  44. package/dist/fnode/index.s66v6wt4.js +1 -0
  45. package/dist/fnode/index.sv7v0y60.js +1 -0
  46. package/dist/fnode/index.tgkhgnrp.js +1 -0
  47. package/dist/fnode/index.vq706f75.js +1 -0
  48. package/dist/fnode/index.y8pvdcny.js +1 -0
  49. package/dist/fnode/index.z4vz93ww.js +1 -0
  50. package/dist/frun/index.js +2 -0
  51. package/dist/fservice/index.js +19 -0
  52. package/dist/fservice/index.q01yvaz0.js +2 -0
  53. package/package.json +74 -57
  54. package/readme.md +298 -0
  55. package/template/fnet/core/assert.js +6 -0
  56. package/template/fnet/core/message.js +3 -0
  57. package/template/fnet/core/object.js +47 -0
  58. package/template/fnet/core/sleep.js +5 -0
  59. package/template/fnet/node/.gitignore.njk +9 -0
  60. package/template/fnet/node/build.js.njk +153 -0
  61. package/template/fnet/node/package.json.njk +121 -0
  62. package/template/fnet/node/readme.md.njk +21 -0
  63. package/template/fnet/node/rollup.config.mjs.njk +498 -0
  64. package/template/fnet/node/src/app/index.html.njk +67 -0
  65. package/template/fnet/node/src/app/index.js.njk +36 -0
  66. package/template/fnet/node/src/cli/index.js.njk +9 -0
  67. package/template/fnet/node/src/cli/index.js.v1.njk +318 -0
  68. package/template/fnet/node/src/cli/v2/core/args-parser.njk +10 -0
  69. package/template/fnet/node/src/cli/v2/core/imports.njk +31 -0
  70. package/template/fnet/node/src/cli/v2/core/run-wrapper.njk +25 -0
  71. package/template/fnet/node/src/cli/v2/index.js.njk +184 -0
  72. package/template/fnet/node/src/cli/v2/modes/default/extend.njk +11 -0
  73. package/template/fnet/node/src/cli/v2/modes/default/standard.njk +20 -0
  74. package/template/fnet/node/src/cli/v2/modes/http/builtin.njk +66 -0
  75. package/template/fnet/node/src/cli/v2/modes/http/imports.njk +9 -0
  76. package/template/fnet/node/src/cli/v2/modes/http/index.njk +12 -0
  77. package/template/fnet/node/src/cli/v2/modes/mcp/imports.njk +33 -0
  78. package/template/fnet/node/src/cli/v2/modes/mcp/index.njk +30 -0
  79. package/template/fnet/node/src/cli/v2/modes/mcp/server-setup.njk +15 -0
  80. package/template/fnet/node/src/cli/v2/modes/mcp/tool-handlers.njk +46 -0
  81. package/template/fnet/node/src/cli/v2/modes/mcp/transport-http.njk +222 -0
  82. package/template/fnet/node/src/cli/v2/modes/mcp/transport-stdio.njk +9 -0
  83. package/template/fnet/node/src/cli/v2/modes/pipeline/imports.njk +9 -0
  84. package/template/fnet/node/src/cli/v2/modes/pipeline/index.njk +113 -0
  85. package/template/fnet/node/src/cli/v2/modes/webhook/imports.njk +9 -0
  86. package/template/fnet/node/src/cli/v2/modes/webhook/index.njk +127 -0
  87. package/template/fnet/node/src/cli/v2/modes/websocket/imports.njk +15 -0
  88. package/template/fnet/node/src/cli/v2/modes/websocket/index.njk +104 -0
  89. package/template/fnet/node/src/default/blocks/assign.js.njk +15 -0
  90. package/template/fnet/node/src/default/blocks/call.js.njk +110 -0
  91. package/template/fnet/node/src/default/blocks/for.js.njk +71 -0
  92. package/template/fnet/node/src/default/blocks/form.js.njk +31 -0
  93. package/template/fnet/node/src/default/blocks/http.js.njk +135 -0
  94. package/template/fnet/node/src/default/blocks/modules.js.njk +15 -0
  95. package/template/fnet/node/src/default/blocks/new.js.njk +42 -0
  96. package/template/fnet/node/src/default/blocks/next.js.njk +15 -0
  97. package/template/fnet/node/src/default/blocks/output.js.njk +15 -0
  98. package/template/fnet/node/src/default/blocks/parallel.js.njk +64 -0
  99. package/template/fnet/node/src/default/blocks/pipeline.js.njk +109 -0
  100. package/template/fnet/node/src/default/blocks/raise.js.njk +15 -0
  101. package/template/fnet/node/src/default/blocks/retry.js.njk +70 -0
  102. package/template/fnet/node/src/default/blocks/return.js.njk +21 -0
  103. package/template/fnet/node/src/default/blocks/schedule.js.njk +66 -0
  104. package/template/fnet/node/src/default/blocks/signal.js.njk +15 -0
  105. package/template/fnet/node/src/default/blocks/steps.js.njk +47 -0
  106. package/template/fnet/node/src/default/blocks/switch.js.njk +49 -0
  107. package/template/fnet/node/src/default/blocks/tryexcept.js.njk +80 -0
  108. package/template/fnet/node/src/default/blocks/wait.js.njk +14 -0
  109. package/template/fnet/node/src/default/engine.js.njk +79 -0
  110. package/template/fnet/node/src/default/input.args.js.njk +125 -0
  111. package/template/fnet/node/src/default/macros/block-assign.js.njk +3 -0
  112. package/template/fnet/node/src/default/macros/block-body-header.js.njk +7 -0
  113. package/template/fnet/node/src/default/macros/block-entry-args.js.njk +2 -0
  114. package/template/fnet/node/src/default/macros/block-footer.js.njk +3 -0
  115. package/template/fnet/node/src/default/macros/block-header.js.njk +11 -0
  116. package/template/fnet/node/src/default/macros/block-library-header.js.njk +43 -0
  117. package/template/fnet/node/src/default/macros/block-modules-header.js.njk +8 -0
  118. package/template/fnet/node/src/default/macros/block-modules.js.njk +29 -0
  119. package/template/fnet/node/src/default/macros/block-next-header.js.njk +6 -0
  120. package/template/fnet/node/src/default/macros/block-next.js.njk +21 -0
  121. package/template/fnet/node/src/default/macros/block-run-footer.js.njk +7 -0
  122. package/template/fnet/node/src/default/macros/block-run-form.js.njk +32 -0
  123. package/template/fnet/node/src/default/macros/block-run-header.js.njk +43 -0
  124. package/template/fnet/node/src/default/macros/block-signal.js.njk +3 -0
  125. package/template/fnet/node/src/default/macros/page.js.njk +8 -0
  126. package/template/fnet/node/src/default/types/block.js.njk +133 -0
  127. package/template/fnet/node/src/default/workflow.js.njk +125 -0
  128. package/template/fnet/node/tsconfig.json.njk +16 -0
  129. package/template/fnet/project/.gitignore.njk +7 -0
  130. package/template/fnet/project/.vscode/launch.json.njk +41 -0
  131. package/template/fnet/project/.vscode/tasks.json.njk +46 -0
  132. package/template/fnet/project/fnet/flows.yaml.njk +4 -0
  133. package/template/fnet/project/fnet/targets.yaml.njk +7 -0
  134. package/template/fnet/project/fnet.yaml.njk +3 -0
  135. package/template/fnode/node/.gitignore.njk +9 -0
  136. package/template/fnode/node/build.js.njk +149 -0
  137. package/template/fnode/node/package.json.njk +121 -0
  138. package/template/fnode/node/readme.md.njk +21 -0
  139. package/template/fnode/node/rollup.config.mjs.njk +498 -0
  140. package/template/fnode/node/src/app/index-js-with-react-host.njk +50 -0
  141. package/template/fnode/node/src/app/index-js-without-react-host.njk +23 -0
  142. package/template/fnode/node/src/app/index.html.njk +67 -0
  143. package/template/fnode/node/src/app/index.js.njk +9 -0
  144. package/template/fnode/node/src/cli/index.js.njk +9 -0
  145. package/template/fnode/node/src/cli/index.js.v1.njk +464 -0
  146. package/template/fnode/node/src/cli/v2/core/args-parser.njk +10 -0
  147. package/template/fnode/node/src/cli/v2/core/imports.njk +29 -0
  148. package/template/fnode/node/src/cli/v2/core/run-wrapper.njk +25 -0
  149. package/template/fnode/node/src/cli/v2/index.js.njk +184 -0
  150. package/template/fnode/node/src/cli/v2/modes/default/extend.njk +11 -0
  151. package/template/fnode/node/src/cli/v2/modes/default/standard.njk +19 -0
  152. package/template/fnode/node/src/cli/v2/modes/http/builtin.njk +61 -0
  153. package/template/fnode/node/src/cli/v2/modes/http/imports.njk +9 -0
  154. package/template/fnode/node/src/cli/v2/modes/http/index.njk +12 -0
  155. package/template/fnode/node/src/cli/v2/modes/mcp/imports.njk +33 -0
  156. package/template/fnode/node/src/cli/v2/modes/mcp/index.njk +30 -0
  157. package/template/fnode/node/src/cli/v2/modes/mcp/server-setup.njk +15 -0
  158. package/template/fnode/node/src/cli/v2/modes/mcp/tool-handlers.njk +41 -0
  159. package/template/fnode/node/src/cli/v2/modes/mcp/transport-http.njk +212 -0
  160. package/template/fnode/node/src/cli/v2/modes/mcp/transport-stdio.njk +9 -0
  161. package/template/fnode/node/src/cli/v2/modes/pipeline/imports.njk +9 -0
  162. package/template/fnode/node/src/cli/v2/modes/pipeline/index.njk +103 -0
  163. package/template/fnode/node/src/cli/v2/modes/webhook/imports.njk +9 -0
  164. package/template/fnode/node/src/cli/v2/modes/webhook/index.njk +122 -0
  165. package/template/fnode/node/src/cli/v2/modes/websocket/imports.njk +15 -0
  166. package/template/fnode/node/src/cli/v2/modes/websocket/index.njk +99 -0
  167. package/template/fnode/node/src/default/engine.js.njk +17 -0
  168. package/template/fnode/node/src/default/input.args.js.njk +126 -0
  169. package/template/fnode/node/tsconfig.json.njk +16 -0
  170. package/template/fnode/project/.gitignore.njk +11 -0
  171. package/template/fnode/project/.vscode/launch.json.njk +78 -0
  172. package/template/fnode/project/.vscode/tasks.json.njk +46 -0
  173. package/template/fnode/project/fnet/targets.yaml.njk +25 -0
  174. package/template/fnode/project/fnode.yaml.njk +12 -0
  175. package/template/fnode/python/.gitignore.njk +7 -0
  176. package/template/fnode/python/package.json.njk +4 -0
  177. package/template/fnode/python/pyproject.toml.njk +3 -0
  178. package/template/fnode/python/readme.md.njk +12 -0
  179. package/template/fnode/python/setup.py.njk +19 -0
  180. package/template/fnode/python/src/cli/index.py.njk +25 -0
  181. package/template/schemas/to-npm.yaml +14 -0
  182. package/dist/builder/lib-cli.js +0 -2
  183. package/dist/builder/wf-cli.js +0 -2
  184. package/dist/index.js +0 -2
@@ -0,0 +1,153 @@
1
+ #!/usr/bin/env bun
2
+ /**
3
+ * Build script for Bun projects
4
+ * This script uses Bun's built-in bundler instead of Rollup
5
+ */
6
+
7
+ import { mkdir, writeFile } from 'node:fs/promises';
8
+ import { join, dirname } from 'node:path';
9
+ import { fileURLToPath } from 'node:url';
10
+ import fs from 'node:fs';
11
+
12
+ const __dirname = dirname(fileURLToPath(import.meta.url));
13
+
14
+ async function ensureDir(dir) {
15
+ try {
16
+ await mkdir(dir, { recursive: true });
17
+ } catch (err) {
18
+ if (err.code !== 'EEXIST') throw err;
19
+ }
20
+ }
21
+
22
+ async function buildOutput(name, config) {
23
+ console.log(`Building ${name}...`);
24
+
25
+ const outdir = config.outdir || join(__dirname, `dist/${name}`);
26
+ await ensureDir(outdir);
27
+
28
+ {% if atom.doc.features.app.enabled !== false %}
29
+ // Copy HTML file if it exists and this is an app build
30
+ if (name === 'app') {
31
+ try {
32
+ const htmlPath = './src/app/index.html';
33
+ if (fs.existsSync(htmlPath)) {
34
+ const htmlContent = await Bun.file(htmlPath).text();
35
+ await writeFile(join(outdir, 'index.html'), htmlContent);
36
+ }
37
+ } catch (err) {
38
+ if (err.code !== 'ENOENT') {
39
+ console.warn('Warning: Could not copy HTML file:', err.message);
40
+ }
41
+ }
42
+ }
43
+ {% endif %}
44
+
45
+ const buildConfig = {
46
+ entrypoints: config.entrypoints || [`./src/${name}/index.js`],
47
+ outdir: outdir,
48
+ format: config.format || 'esm',
49
+ {% if atom.doc.features.runtime.target === 'bun' %}
50
+ target: "bun",
51
+ {% else %}
52
+ target: config.target || "browser",
53
+ {% endif %}
54
+ minify: config.minify !== undefined ? config.minify : false,
55
+ sourcemap: config.sourcemap || 'external',
56
+ splitting: true,
57
+ // Add environment variables to help with module resolution
58
+ define: {
59
+ 'process.env.NODE_PATH': JSON.stringify('./node_modules')
60
+ },
61
+
62
+ plugins: [
63
+ ...(config.plugins || [])
64
+ ]
65
+ };
66
+
67
+ if(config.external) buildConfig.external = config.external;
68
+ if(config.packages) buildConfig.packages = config.packages;
69
+ if(config.banner) buildConfig.banner = config.banner;
70
+ if(config.footer) buildConfig.footer = config.footer;
71
+
72
+ // Build with Bun.build
73
+ const result = await Bun.build(buildConfig);
74
+
75
+ if (!result.success) {
76
+ console.error(`${name} build failed:`, result.logs);
77
+ process.exit(1);
78
+ }
79
+
80
+ return result;
81
+ }
82
+
83
+ async function main() {
84
+ try {
85
+ {% if atom.doc.features.project.format === 'esm' or atom.doc.features.project.format === undefined %}
86
+ // Build default ESM
87
+ await buildOutput('default', {
88
+ format: "esm",
89
+ target: "browser",
90
+ minify: false,
91
+ sourcemap: "external",
92
+ entrypoints: ["./src/default/index.js"],
93
+ outdir: "./dist/default/esm",
94
+ packages: "external"
95
+ });
96
+ {% endif %}
97
+
98
+ {% if atom.doc.features.project.format !== 'esm' %}
99
+ // Build default CJS
100
+ await buildOutput('defaultCjs', {
101
+ format: "cjs",
102
+ target: "browser",
103
+ minify: false,
104
+ sourcemap: "external",
105
+ entrypoints: ["./src/default/index.js"],
106
+ outdir: "./dist/default/cjs",
107
+ packages: "external"
108
+ });
109
+ {% endif %}
110
+
111
+ {% if atom.doc.features.cli.enabled !== false %}
112
+ // Build CLI if exists
113
+ if (fs.existsSync('./src/cli/index.js')) {
114
+ await buildOutput('cli', {
115
+ format: "esm",
116
+ target: "browser",
117
+ minify: false,
118
+ sourcemap: "external",
119
+ entrypoints: ["./src/cli/index.js"],
120
+ outdir: "{{ atom.doc.features.cli.dir | default('./dist/cli/esm') }}",
121
+ packages: "external",
122
+ banner: "#!/usr/bin/env bun"
123
+ });
124
+ } else {
125
+ console.log('CLI not found, skipping CLI build');
126
+ }
127
+ {% endif %}
128
+
129
+ {% if atom.doc.features.app.enabled !== false %}
130
+ // Build App if exists
131
+ if (fs.existsSync('./src/app/index.js')) {
132
+ await buildOutput('app', {
133
+ format: "esm",
134
+ target: "browser",
135
+ minify: false,
136
+ sourcemap: "external",
137
+ entrypoints: ["./src/app/index.js"],
138
+ outdir: "{{ atom.doc.features.app.dir | default('./dist/app/esm') }}",
139
+ packages: "bundle"
140
+ });
141
+ } else {
142
+ console.log('App not found, skipping App build');
143
+ }
144
+ {% endif %}
145
+
146
+ console.log('Build completed successfully!');
147
+ } catch (err) {
148
+ console.error('Build failed:', err);
149
+ process.exit(1);
150
+ }
151
+ }
152
+
153
+ main();
@@ -0,0 +1,121 @@
1
+ {
2
+ "name": "{{atom.doc['npm::name'] or atom.doc['name'] or atom['id']}}",
3
+ "version": "{{atom.doc['npm::version'] or '0.1.0'}}",
4
+ "files": [
5
+ "dist/*",
6
+ "fnet/input.yaml",
7
+ "fnet/output.yaml"
8
+ ],
9
+ {# "sideEffects": false, #}
10
+ {% if atom.doc['npm::author'] %}
11
+ "author": "{{atom.doc['npm::author'] | safe}}",
12
+ {% endif %}
13
+
14
+ {% if atom.doc['npm::description'] %}
15
+ "description": "{{atom.doc['npm::description'] | safe}}",
16
+ {% endif %}
17
+
18
+ {% if atom.doc.features.project.format ==='cjs' %}
19
+ {% if atom.doc.features.rollup_output.esm.enabled === true%}
20
+ "main": "dist/default/esm/index.js",
21
+ "type":"module",
22
+ {% else %}
23
+ "main": "dist/default/cjs/index.cjs",
24
+ {% endif %}
25
+
26
+ {% if atom.doc.features.dts_enabled ===true %}
27
+ "types": "dist/default/types/index.d.ts",
28
+ {% endif %}
29
+
30
+ "exports":{
31
+ ".":{
32
+ "import":"./dist/default/esm/index.js",
33
+ "require":"./dist/default/cjs/index.cjs"
34
+ }
35
+ },
36
+ {% else %}
37
+ "main": "dist/default/esm/index.js",
38
+ {% if atom.doc.features.dts_enabled ===true %}
39
+ "types": "dist/default/types/index.d.ts",
40
+ {% endif %}
41
+ "type":"module",
42
+ "exports":{
43
+ ".":{
44
+ "import":"./dist/default/esm/index.js",
45
+ "require":"./dist/default/cjs/index.cjs"
46
+ }
47
+ },
48
+ {% endif %}
49
+ "flownet": {
50
+ "type": "flow",
51
+ },
52
+ {% if atom.doc.repo.url %}
53
+ "repository": {
54
+ "type": "{{atom.doc.repo.type or 'git'}}",
55
+ "url": "{{atom.doc.repo.url}}"
56
+ },
57
+ {% endif %}
58
+ "license": "{{atom.doc.license or 'MIT'}}",
59
+ "scripts": {
60
+ {% if atom.doc.features.runtime.type === 'bun' %}
61
+ "build": "bun ./build.js",
62
+ "build:dev": "bun ./build.js --dev",
63
+ "watch": "bun --watch --watch-mode=poll --watch-ignore-dirs=node_modules,dist --watch-paths=./src ./build.js --dev",
64
+ "serve": "bunx serve ./"
65
+ {% else %}
66
+ "build": "rollup --config",
67
+ "build:dev": "rollup --config --sourcemap --environment DEVELOPMENT",
68
+ "watch": "rollup --config --watch --sourcemap --environment DEVELOPMENT --environment FLOWNET_WATCH",
69
+ "serve": "bunx serve ./"
70
+ {% endif %}
71
+
72
+ {% if atom.doc.features.cli.enabled %}
73
+ {% if atom.doc.features.project.format ==='cjs' %}
74
+ ,"cli": "bun {{atom.doc.features.cli.node_options}} {{atom.doc.features.cli.dir}}/index.cjs"
75
+ {% if atom.doc.features.cli.mcp.enabled === true %}
76
+ ,"mcp": "bun {{atom.doc.features.cli.node_options}} {{atom.doc.features.cli.dir}}/index.cjs --cli-mode=mcp"
77
+ ,"mcp-inspect": "bunx @modelcontextprotocol/inspector bun {{atom.doc.features.cli.node_options}} {{atom.doc.features.cli.dir}}/index.cjs --cli-mode=mcp"
78
+ {% endif %}
79
+ {% else %}
80
+ ,"cli": "bun {{atom.doc.features.cli.node_options}} {{atom.doc.features.cli.output.file}}"
81
+ ,"cli:dev": "NODE_PRESERVE_SYMLINKS=1 bun {{atom.doc.features.cli.node_options}} {{atom.doc.features.cli.input.file}}"
82
+ {% if atom.doc.features.cli.mcp.enabled === true %}
83
+ ,"cli:mcp": "bun {{atom.doc.features.cli.node_options}} {{atom.doc.features.cli.output.file}} --cli-mode=mcp"
84
+ ,"cli:mcp:inspect": "bunx @modelcontextprotocol/inspector bun {{atom.doc.features.cli.node_options}} {{atom.doc.features.cli.output.file}} --cli-mode=mcp"
85
+ ,"cli:mcp:dev": "bun {{atom.doc.features.cli.node_options}} {{atom.doc.features.cli.input.file}} --cli-mode=mcp"
86
+ ,"cli:mcp:inspect:dev": "bunx @modelcontextprotocol/inspector bun {{atom.doc.features.cli.node_options}} {{atom.doc.features.cli.input.file}} --cli-mode=mcp"
87
+ {% endif %}
88
+ {% endif %}
89
+ ,"cli:compile": "fbin compile {{atom.doc.features.cli.output.file}} -o .bin/{{atom.doc['npm::bin'] or atom.doc['name'] or atom['id']}} --yes"
90
+ ,"cli:compile:dev": "fbin compile {{atom.doc.features.cli.input.file}} -o .bin/{{atom.doc['npm::bin'] or atom.doc['name'] or atom['id']}} --yes"
91
+ ,"cli:install": "fbin install ./.bin/{{atom.doc['npm::bin'] or atom.doc['name'] or atom['id']}} --yes"
92
+ ,"cli:install:symlink": "fbin install ./.bin/{{atom.doc['npm::bin'] or atom.doc['name'] or atom['id']}} --yes --symlink"
93
+ ,"cli:uninstall": "fbin uninstall {{atom.doc['npm::bin'] or atom.doc['name'] or atom['id']}} --yes"
94
+
95
+ {% endif %}
96
+
97
+ {% if atom.doc.features.app.enabled %}
98
+ ,"app": "bunx serve {{atom.doc.features.app.dir}}/"
99
+ {% endif %}
100
+ },
101
+ "devDependencies": {
102
+ {% for dep in packageDevDependencies %}
103
+ "{{dep.package}}":"{{dep.version}}" {% if not loop.last%},{%endif%}
104
+ {% endfor%}
105
+ },
106
+ "dependencies": {
107
+ {% for dep in packageDependencies %}
108
+ "{{dep.package}}":"{{dep.version}}" {% if not loop.last%},{%endif%}
109
+ {% endfor%}
110
+ }
111
+
112
+ {% if atom.doc.features.cli.enabled and atom.doc['npm::bin'] %}
113
+ ,"bin":{
114
+ {% if atom.doc.features.project.format ==='cjs' %}
115
+ "{{atom.doc['npm::bin']}}":"{{atom.doc.features.cli.dir}}/index.cjs"
116
+ {% else %}
117
+ "{{atom.doc['npm::bin']}}":"{{atom.doc.features.cli.output.file}}"
118
+ {% endif %}
119
+ }
120
+ {% endif %}
121
+ }
@@ -0,0 +1,21 @@
1
+ {{content | safe}}
2
+
3
+ {% if howto %}
4
+ {{howto | safe}}
5
+ {% endif %}
6
+
7
+ {% if input %}
8
+ # Input Schema
9
+
10
+ ```yaml
11
+ {{ input | safe}}
12
+ ```
13
+ {% endif %}
14
+
15
+ {% if output %}
16
+ # Output Schema
17
+
18
+ ```yaml
19
+ {{ output | safe}}
20
+ ```
21
+ {% endif %}