@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.
- package/dist/fbin/index.js +15 -0
- package/dist/fnet/index.0jcm9pn5.js +1 -0
- package/dist/fnet/index.2084z2ed.js +2 -0
- package/dist/fnet/index.33f1ggpr.js +1 -0
- package/dist/fnet/index.3exge2js.js +1 -0
- package/dist/fnet/index.3kfx538h.js +1 -0
- package/dist/fnet/index.490y87nc.js +1 -0
- package/dist/fnet/index.4g9yezkq.js +1 -0
- package/dist/fnet/index.4jkat7r4.js +1 -0
- package/dist/fnet/index.7crx8ky1.js +1 -0
- package/dist/fnet/index.7vw06nrn.js +1 -0
- package/dist/fnet/index.9567fa9x.js +1 -0
- package/dist/fnet/index.gh75wt1m.js +1 -0
- package/dist/fnet/index.hzsfswvp.js +1 -0
- package/dist/fnet/index.jgpc3grc.js +1 -0
- package/dist/fnet/index.js +20 -0
- package/dist/fnet/index.p0zb7e1b.js +1 -0
- package/dist/fnet/index.r19p3bpa.js +2 -0
- package/dist/fnet/index.r82rtnmz.js +1 -0
- package/dist/fnet/index.s662t98v.js +1 -0
- package/dist/fnet/index.w74dpnpn.js +1 -0
- package/dist/fnet/index.xeaw5xa9.js +1 -0
- package/dist/fnet/index.zm4kesg6.js +1 -0
- package/dist/fnode/index.05n3mvs9.js +2 -0
- package/dist/fnode/index.2hc9tbyx.js +1 -0
- package/dist/fnode/index.2pnjg6dc.js +1 -0
- package/dist/fnode/index.9qgtmxq3.js +2 -0
- package/dist/fnode/index.b1q7y05p.js +1 -0
- package/dist/fnode/index.bhapgrs7.js +1 -0
- package/dist/fnode/index.cvxrf34y.js +2 -0
- package/dist/fnode/index.dp9wyahp.js +1 -0
- package/dist/fnode/index.eqxmcpdc.js +1 -0
- package/dist/fnode/index.f2tb0x3t.js +1 -0
- package/dist/fnode/index.fbzv6wwf.js +1 -0
- package/dist/fnode/index.gazd9raq.js +1 -0
- package/dist/fnode/index.hv4s25f0.js +3 -0
- package/dist/fnode/index.j5z7dtsx.js +1 -0
- package/dist/fnode/index.js +10 -0
- package/dist/fnode/index.kb4e4bxf.js +1 -0
- package/dist/fnode/index.qn0schqp.js +1 -0
- package/dist/fnode/index.rht29phd.js +1 -0
- package/dist/fnode/index.rzsfmek6.js +3 -0
- package/dist/fnode/index.s0nk6cv8.js +4 -0
- package/dist/fnode/index.s66v6wt4.js +1 -0
- package/dist/fnode/index.sv7v0y60.js +1 -0
- package/dist/fnode/index.tgkhgnrp.js +1 -0
- package/dist/fnode/index.vq706f75.js +1 -0
- package/dist/fnode/index.y8pvdcny.js +1 -0
- package/dist/fnode/index.z4vz93ww.js +1 -0
- package/dist/frun/index.js +2 -0
- package/dist/fservice/index.js +19 -0
- package/dist/fservice/index.q01yvaz0.js +2 -0
- package/package.json +74 -57
- package/readme.md +298 -0
- package/template/fnet/core/assert.js +6 -0
- package/template/fnet/core/message.js +3 -0
- package/template/fnet/core/object.js +47 -0
- package/template/fnet/core/sleep.js +5 -0
- package/template/fnet/node/.gitignore.njk +9 -0
- package/template/fnet/node/build.js.njk +153 -0
- package/template/fnet/node/package.json.njk +121 -0
- package/template/fnet/node/readme.md.njk +21 -0
- package/template/fnet/node/rollup.config.mjs.njk +498 -0
- package/template/fnet/node/src/app/index.html.njk +67 -0
- package/template/fnet/node/src/app/index.js.njk +36 -0
- package/template/fnet/node/src/cli/index.js.njk +9 -0
- package/template/fnet/node/src/cli/index.js.v1.njk +318 -0
- package/template/fnet/node/src/cli/v2/core/args-parser.njk +10 -0
- package/template/fnet/node/src/cli/v2/core/imports.njk +31 -0
- package/template/fnet/node/src/cli/v2/core/run-wrapper.njk +25 -0
- package/template/fnet/node/src/cli/v2/index.js.njk +184 -0
- package/template/fnet/node/src/cli/v2/modes/default/extend.njk +11 -0
- package/template/fnet/node/src/cli/v2/modes/default/standard.njk +20 -0
- package/template/fnet/node/src/cli/v2/modes/http/builtin.njk +66 -0
- package/template/fnet/node/src/cli/v2/modes/http/imports.njk +9 -0
- package/template/fnet/node/src/cli/v2/modes/http/index.njk +12 -0
- package/template/fnet/node/src/cli/v2/modes/mcp/imports.njk +33 -0
- package/template/fnet/node/src/cli/v2/modes/mcp/index.njk +30 -0
- package/template/fnet/node/src/cli/v2/modes/mcp/server-setup.njk +15 -0
- package/template/fnet/node/src/cli/v2/modes/mcp/tool-handlers.njk +46 -0
- package/template/fnet/node/src/cli/v2/modes/mcp/transport-http.njk +222 -0
- package/template/fnet/node/src/cli/v2/modes/mcp/transport-stdio.njk +9 -0
- package/template/fnet/node/src/cli/v2/modes/pipeline/imports.njk +9 -0
- package/template/fnet/node/src/cli/v2/modes/pipeline/index.njk +113 -0
- package/template/fnet/node/src/cli/v2/modes/webhook/imports.njk +9 -0
- package/template/fnet/node/src/cli/v2/modes/webhook/index.njk +127 -0
- package/template/fnet/node/src/cli/v2/modes/websocket/imports.njk +15 -0
- package/template/fnet/node/src/cli/v2/modes/websocket/index.njk +104 -0
- package/template/fnet/node/src/default/blocks/assign.js.njk +15 -0
- package/template/fnet/node/src/default/blocks/call.js.njk +110 -0
- package/template/fnet/node/src/default/blocks/for.js.njk +71 -0
- package/template/fnet/node/src/default/blocks/form.js.njk +31 -0
- package/template/fnet/node/src/default/blocks/http.js.njk +135 -0
- package/template/fnet/node/src/default/blocks/modules.js.njk +15 -0
- package/template/fnet/node/src/default/blocks/new.js.njk +42 -0
- package/template/fnet/node/src/default/blocks/next.js.njk +15 -0
- package/template/fnet/node/src/default/blocks/output.js.njk +15 -0
- package/template/fnet/node/src/default/blocks/parallel.js.njk +64 -0
- package/template/fnet/node/src/default/blocks/pipeline.js.njk +109 -0
- package/template/fnet/node/src/default/blocks/raise.js.njk +15 -0
- package/template/fnet/node/src/default/blocks/retry.js.njk +70 -0
- package/template/fnet/node/src/default/blocks/return.js.njk +21 -0
- package/template/fnet/node/src/default/blocks/schedule.js.njk +66 -0
- package/template/fnet/node/src/default/blocks/signal.js.njk +15 -0
- package/template/fnet/node/src/default/blocks/steps.js.njk +47 -0
- package/template/fnet/node/src/default/blocks/switch.js.njk +49 -0
- package/template/fnet/node/src/default/blocks/tryexcept.js.njk +80 -0
- package/template/fnet/node/src/default/blocks/wait.js.njk +14 -0
- package/template/fnet/node/src/default/engine.js.njk +79 -0
- package/template/fnet/node/src/default/input.args.js.njk +125 -0
- package/template/fnet/node/src/default/macros/block-assign.js.njk +3 -0
- package/template/fnet/node/src/default/macros/block-body-header.js.njk +7 -0
- package/template/fnet/node/src/default/macros/block-entry-args.js.njk +2 -0
- package/template/fnet/node/src/default/macros/block-footer.js.njk +3 -0
- package/template/fnet/node/src/default/macros/block-header.js.njk +11 -0
- package/template/fnet/node/src/default/macros/block-library-header.js.njk +43 -0
- package/template/fnet/node/src/default/macros/block-modules-header.js.njk +8 -0
- package/template/fnet/node/src/default/macros/block-modules.js.njk +29 -0
- package/template/fnet/node/src/default/macros/block-next-header.js.njk +6 -0
- package/template/fnet/node/src/default/macros/block-next.js.njk +21 -0
- package/template/fnet/node/src/default/macros/block-run-footer.js.njk +7 -0
- package/template/fnet/node/src/default/macros/block-run-form.js.njk +32 -0
- package/template/fnet/node/src/default/macros/block-run-header.js.njk +43 -0
- package/template/fnet/node/src/default/macros/block-signal.js.njk +3 -0
- package/template/fnet/node/src/default/macros/page.js.njk +8 -0
- package/template/fnet/node/src/default/types/block.js.njk +133 -0
- package/template/fnet/node/src/default/workflow.js.njk +125 -0
- package/template/fnet/node/tsconfig.json.njk +16 -0
- package/template/fnet/project/.gitignore.njk +7 -0
- package/template/fnet/project/.vscode/launch.json.njk +41 -0
- package/template/fnet/project/.vscode/tasks.json.njk +46 -0
- package/template/fnet/project/fnet/flows.yaml.njk +4 -0
- package/template/fnet/project/fnet/targets.yaml.njk +7 -0
- package/template/fnet/project/fnet.yaml.njk +3 -0
- package/template/fnode/node/.gitignore.njk +9 -0
- package/template/fnode/node/build.js.njk +149 -0
- package/template/fnode/node/package.json.njk +121 -0
- package/template/fnode/node/readme.md.njk +21 -0
- package/template/fnode/node/rollup.config.mjs.njk +498 -0
- package/template/fnode/node/src/app/index-js-with-react-host.njk +50 -0
- package/template/fnode/node/src/app/index-js-without-react-host.njk +23 -0
- package/template/fnode/node/src/app/index.html.njk +67 -0
- package/template/fnode/node/src/app/index.js.njk +9 -0
- package/template/fnode/node/src/cli/index.js.njk +9 -0
- package/template/fnode/node/src/cli/index.js.v1.njk +464 -0
- package/template/fnode/node/src/cli/v2/core/args-parser.njk +10 -0
- package/template/fnode/node/src/cli/v2/core/imports.njk +29 -0
- package/template/fnode/node/src/cli/v2/core/run-wrapper.njk +25 -0
- package/template/fnode/node/src/cli/v2/index.js.njk +184 -0
- package/template/fnode/node/src/cli/v2/modes/default/extend.njk +11 -0
- package/template/fnode/node/src/cli/v2/modes/default/standard.njk +19 -0
- package/template/fnode/node/src/cli/v2/modes/http/builtin.njk +61 -0
- package/template/fnode/node/src/cli/v2/modes/http/imports.njk +9 -0
- package/template/fnode/node/src/cli/v2/modes/http/index.njk +12 -0
- package/template/fnode/node/src/cli/v2/modes/mcp/imports.njk +33 -0
- package/template/fnode/node/src/cli/v2/modes/mcp/index.njk +30 -0
- package/template/fnode/node/src/cli/v2/modes/mcp/server-setup.njk +15 -0
- package/template/fnode/node/src/cli/v2/modes/mcp/tool-handlers.njk +41 -0
- package/template/fnode/node/src/cli/v2/modes/mcp/transport-http.njk +212 -0
- package/template/fnode/node/src/cli/v2/modes/mcp/transport-stdio.njk +9 -0
- package/template/fnode/node/src/cli/v2/modes/pipeline/imports.njk +9 -0
- package/template/fnode/node/src/cli/v2/modes/pipeline/index.njk +103 -0
- package/template/fnode/node/src/cli/v2/modes/webhook/imports.njk +9 -0
- package/template/fnode/node/src/cli/v2/modes/webhook/index.njk +122 -0
- package/template/fnode/node/src/cli/v2/modes/websocket/imports.njk +15 -0
- package/template/fnode/node/src/cli/v2/modes/websocket/index.njk +99 -0
- package/template/fnode/node/src/default/engine.js.njk +17 -0
- package/template/fnode/node/src/default/input.args.js.njk +126 -0
- package/template/fnode/node/tsconfig.json.njk +16 -0
- package/template/fnode/project/.gitignore.njk +11 -0
- package/template/fnode/project/.vscode/launch.json.njk +78 -0
- package/template/fnode/project/.vscode/tasks.json.njk +46 -0
- package/template/fnode/project/fnet/targets.yaml.njk +25 -0
- package/template/fnode/project/fnode.yaml.njk +12 -0
- package/template/fnode/python/.gitignore.njk +7 -0
- package/template/fnode/python/package.json.njk +4 -0
- package/template/fnode/python/pyproject.toml.njk +3 -0
- package/template/fnode/python/readme.md.njk +12 -0
- package/template/fnode/python/setup.py.njk +19 -0
- package/template/fnode/python/src/cli/index.py.njk +25 -0
- package/template/schemas/to-npm.yaml +14 -0
- package/dist/builder/lib-cli.js +0 -2
- package/dist/builder/wf-cli.js +0 -2
- package/dist/index.js +0 -2
|
@@ -0,0 +1,149 @@
|
|
|
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
|
+
target: config.target || "browser",
|
|
50
|
+
minify: config.minify !== undefined ? config.minify : false,
|
|
51
|
+
sourcemap: config.sourcemap || 'external',
|
|
52
|
+
splitting: true,
|
|
53
|
+
// Add environment variables to help with module resolution
|
|
54
|
+
define: {
|
|
55
|
+
'process.env.NODE_PATH': JSON.stringify('./node_modules')
|
|
56
|
+
},
|
|
57
|
+
|
|
58
|
+
plugins: [
|
|
59
|
+
...(config.plugins || [])
|
|
60
|
+
]
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
if(config.external) buildConfig.external = config.external;
|
|
64
|
+
if(config.packages) buildConfig.packages = config.packages;
|
|
65
|
+
if(config.banner) buildConfig.banner = config.banner;
|
|
66
|
+
if(config.footer) buildConfig.footer = config.footer;
|
|
67
|
+
|
|
68
|
+
// Build with Bun.build
|
|
69
|
+
const result = await Bun.build(buildConfig);
|
|
70
|
+
|
|
71
|
+
if (!result.success) {
|
|
72
|
+
console.error(`${name} build failed:`, result.logs);
|
|
73
|
+
process.exit(1);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
return result;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
async function main() {
|
|
80
|
+
try {
|
|
81
|
+
{% if atom.doc.features.project.format === 'esm' or atom.doc.features.project.format === undefined %}
|
|
82
|
+
// Build default ESM
|
|
83
|
+
await buildOutput('default', {
|
|
84
|
+
format: "esm",
|
|
85
|
+
target: "browser",
|
|
86
|
+
minify: false,
|
|
87
|
+
sourcemap: "external",
|
|
88
|
+
entrypoints: ["./src/default/index.js"],
|
|
89
|
+
outdir: "./dist/default/esm",
|
|
90
|
+
packages: "external"
|
|
91
|
+
});
|
|
92
|
+
{% endif %}
|
|
93
|
+
|
|
94
|
+
{% if atom.doc.features.project.format !== 'esm' %}
|
|
95
|
+
// Build default CJS
|
|
96
|
+
await buildOutput('defaultCjs', {
|
|
97
|
+
format: "cjs",
|
|
98
|
+
target: "browser",
|
|
99
|
+
minify: false,
|
|
100
|
+
sourcemap: "external",
|
|
101
|
+
entrypoints: ["./src/default/index.js"],
|
|
102
|
+
outdir: "./dist/default/cjs",
|
|
103
|
+
packages: "external"
|
|
104
|
+
});
|
|
105
|
+
{% endif %}
|
|
106
|
+
|
|
107
|
+
{% if atom.doc.features.cli.enabled !== false %}
|
|
108
|
+
// Build CLI if exists
|
|
109
|
+
if (fs.existsSync('./src/cli/index.js')) {
|
|
110
|
+
await buildOutput('cli', {
|
|
111
|
+
format: "esm",
|
|
112
|
+
target: "browser",
|
|
113
|
+
minify: false,
|
|
114
|
+
sourcemap: "external",
|
|
115
|
+
entrypoints: ["./src/cli/index.js"],
|
|
116
|
+
outdir: "{{ atom.doc.features.cli.dir | default('./dist/cli/esm') }}",
|
|
117
|
+
packages: "external",
|
|
118
|
+
banner: "#!/usr/bin/env bun"
|
|
119
|
+
});
|
|
120
|
+
} else {
|
|
121
|
+
console.log('CLI not found, skipping CLI build');
|
|
122
|
+
}
|
|
123
|
+
{% endif %}
|
|
124
|
+
|
|
125
|
+
{% if atom.doc.features.app.enabled !== false %}
|
|
126
|
+
// Build App if exists
|
|
127
|
+
if (fs.existsSync('./src/app/index.js')) {
|
|
128
|
+
await buildOutput('app', {
|
|
129
|
+
format: "esm",
|
|
130
|
+
target: "browser",
|
|
131
|
+
minify: false,
|
|
132
|
+
sourcemap: "external",
|
|
133
|
+
entrypoints: ["./src/app/index.js"],
|
|
134
|
+
outdir: "{{ atom.doc.features.app.dir | default('./dist/app/esm') }}",
|
|
135
|
+
packages: "bundle"
|
|
136
|
+
});
|
|
137
|
+
} else {
|
|
138
|
+
console.log('App not found, skipping App build');
|
|
139
|
+
}
|
|
140
|
+
{% endif %}
|
|
141
|
+
|
|
142
|
+
console.log('Build completed successfully!');
|
|
143
|
+
} catch (err) {
|
|
144
|
+
console.error('Build failed:', err);
|
|
145
|
+
process.exit(1);
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
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
|
+
{% if atom.doc['npm::author'] %}
|
|
10
|
+
"author": "{{atom.doc['npm::author'] | safe}}",
|
|
11
|
+
{% endif %}
|
|
12
|
+
|
|
13
|
+
{% if atom.doc['npm::description'] %}
|
|
14
|
+
"description": "{{atom.doc['npm::description'] | safe}}",
|
|
15
|
+
{% endif %}
|
|
16
|
+
{% if atom.doc.features.project.format ==='cjs' %}
|
|
17
|
+
{% if atom.doc.features.rollup_output.esm.enabled === true%}
|
|
18
|
+
"main": "dist/default/esm/index.js",
|
|
19
|
+
"type":"module",
|
|
20
|
+
{% else %}
|
|
21
|
+
"main": "dist/default/cjs/index.cjs",
|
|
22
|
+
{% endif %}
|
|
23
|
+
|
|
24
|
+
{% if atom.doc.features.dts_enabled ===true %}
|
|
25
|
+
"types": "dist/default/types/index.d.ts",
|
|
26
|
+
{% endif %}
|
|
27
|
+
|
|
28
|
+
"exports":{
|
|
29
|
+
".":{
|
|
30
|
+
"import":"./dist/default/esm/index.js",
|
|
31
|
+
"require":"./dist/default/cjs/index.cjs"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
{% else %}
|
|
35
|
+
"main": "dist/default/esm/index.js",
|
|
36
|
+
{% if atom.doc.features.dts_enabled ===true %}
|
|
37
|
+
"types": "dist/default/types/index.d.ts",
|
|
38
|
+
{% endif %}
|
|
39
|
+
"type":"module",
|
|
40
|
+
"exports":{
|
|
41
|
+
".":{
|
|
42
|
+
"import":"./dist/default/esm/index.js",
|
|
43
|
+
"require":"./dist/default/cjs/index.cjs"
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
{% endif %}
|
|
47
|
+
"flownet": {
|
|
48
|
+
"type": "node",
|
|
49
|
+
},
|
|
50
|
+
{% if atom.doc.repo.url %}
|
|
51
|
+
"repository": {
|
|
52
|
+
"type": "{{atom.doc.repo.type or 'git'}}",
|
|
53
|
+
"url": "{{atom.doc.repo.url}}"
|
|
54
|
+
},
|
|
55
|
+
{% endif %}
|
|
56
|
+
"license": "{{atom.doc.license or 'MIT'}}",
|
|
57
|
+
"scripts": {
|
|
58
|
+
|
|
59
|
+
{% if atom.doc.features.runtime.type === 'bun' %}
|
|
60
|
+
"build": "bun ./build.js",
|
|
61
|
+
"build:dev": "bun ./build.js --dev",
|
|
62
|
+
"watch": "bun --watch --watch-mode=poll --watch-ignore-dirs=node_modules,dist --watch-paths=./src ./build.js --dev",
|
|
63
|
+
"serve": "bunx serve ./"
|
|
64
|
+
{% else %}
|
|
65
|
+
"build": "rollup --config",
|
|
66
|
+
"build:dev": "rollup --config --sourcemap --environment DEVELOPMENT",
|
|
67
|
+
"watch": "rollup --config --watch --sourcemap --environment DEVELOPMENT --environment FLOWNET_WATCH",
|
|
68
|
+
"serve": "bunx serve ./"
|
|
69
|
+
{% endif %}
|
|
70
|
+
|
|
71
|
+
{% if atom.doc.features.cli.enabled %}
|
|
72
|
+
{% if atom.doc.features.project.format ==='cjs' %}
|
|
73
|
+
,"cli": "bun {{atom.doc.features.cli.node_options}} {{atom.doc.features.cli.dir}}/index.cjs"
|
|
74
|
+
{% if atom.doc.features.cli.mcp.enabled === true %}
|
|
75
|
+
,"mcp": "bun {{atom.doc.features.cli.node_options}} {{atom.doc.features.cli.dir}}/index.cjs --cli-mode=mcp"
|
|
76
|
+
,"mcp-inspect": "bunx @modelcontextprotocol/inspector bun {{atom.doc.features.cli.node_options}} {{atom.doc.features.cli.dir}}/index.cjs --cli-mode=mcp"
|
|
77
|
+
{% endif %}
|
|
78
|
+
{% else %}
|
|
79
|
+
,"cli": "bun {{atom.doc.features.cli.node_options}} {{atom.doc.features.cli.output.file}}"
|
|
80
|
+
,"cli:dev": "NODE_PRESERVE_SYMLINKS=1 bun {{atom.doc.features.cli.node_options}} {{atom.doc.features.cli.input.file}}"
|
|
81
|
+
{% if atom.doc.features.cli.mcp.enabled === true %}
|
|
82
|
+
,"cli:mcp": "bun {{atom.doc.features.cli.node_options}} {{atom.doc.features.cli.output.file}} --cli-mode=mcp"
|
|
83
|
+
,"cli:mcp:inspect": "bunx @modelcontextprotocol/inspector bun {{atom.doc.features.cli.node_options}} {{atom.doc.features.cli.output.file}} --cli-mode=mcp"
|
|
84
|
+
,"cli:mcp:dev": "bun {{atom.doc.features.cli.node_options}} {{atom.doc.features.cli.input.file}} --cli-mode=mcp"
|
|
85
|
+
,"cli:mcp:inspect:dev": "bunx @modelcontextprotocol/inspector bun {{atom.doc.features.cli.node_options}} {{atom.doc.features.cli.input.file}} --cli-mode=mcp"
|
|
86
|
+
{% endif %}
|
|
87
|
+
{% endif %}
|
|
88
|
+
,"cli:compile": "fbin compile {{atom.doc.features.cli.output.file}} -o .bin/{{atom.doc['npm::bin'] or atom.doc['name'] or atom['id']}} --yes"
|
|
89
|
+
,"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"
|
|
90
|
+
,"cli:install": "fbin install ./.bin/{{atom.doc['npm::bin'] or atom.doc['name'] or atom['id']}} --yes"
|
|
91
|
+
,"cli:install:symlink": "fbin install ./.bin/{{atom.doc['npm::bin'] or atom.doc['name'] or atom['id']}} --yes --symlink"
|
|
92
|
+
,"cli:uninstall": "fbin uninstall {{atom.doc['npm::bin'] or atom.doc['name'] or atom['id']}} --yes"
|
|
93
|
+
{% endif %}
|
|
94
|
+
|
|
95
|
+
{% if atom.doc.features.app.enabled %}
|
|
96
|
+
,"app": "bunx serve {{atom.doc.features.app.dir}}/"
|
|
97
|
+
{% endif %}
|
|
98
|
+
},
|
|
99
|
+
|
|
100
|
+
"devDependencies": {
|
|
101
|
+
{% for dep in packageDevDependencies %}
|
|
102
|
+
"{{dep.package}}":"{{dep.version}}" {% if not loop.last%},{%endif%}
|
|
103
|
+
{% endfor%}
|
|
104
|
+
},
|
|
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 %}
|