@fnet/cli 1.0.16 → 1.0.17

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fnet/cli",
3
- "version": "1.0.16",
3
+ "version": "1.0.17",
4
4
  "files": [
5
5
  "dist",
6
6
  "template"
@@ -72,6 +72,7 @@
72
72
  {% if atom.doc.features.cli.enabled %}
73
73
  {% if atom.doc.features.project.format ==='cjs' %}
74
74
  ,"cli": "bun {{atom.doc.features.cli.node_options}} {{atom.doc.features.cli.dir}}/index.cjs"
75
+ ,"cli:dev": "NODE_PRESERVE_SYMLINKS=1 bun {{atom.doc.features.cli.node_options}} {{atom.doc.features.cli.input.file}}"
75
76
  {% if atom.doc.features.cli.mcp.enabled === true %}
76
77
  ,"mcp": "bun {{atom.doc.features.cli.node_options}} {{atom.doc.features.cli.dir}}/index.cjs --cli-mode=mcp"
77
78
  ,"mcp-inspect": "bunx @modelcontextprotocol/inspector bun {{atom.doc.features.cli.node_options}} {{atom.doc.features.cli.dir}}/index.cjs --cli-mode=mcp"
@@ -4,7 +4,7 @@
4
4
 
5
5
  {% elif atom.doc.features.project.format === 'cjs' %}
6
6
  const {default:fnetArgs,argsParser} = require('@fnet/args');
7
- const validate,{schema as inputSchema} = require("./validate_input.js");
7
+ const {default:validate, schema: inputSchema} = require("./validate_input.js");
8
8
  {% endif %}
9
9
 
10
10
  {% if atom.doc.features.cli.fargs and atom.doc.features.cli.fargs?.enabled !== false %}
@@ -78,12 +78,12 @@
78
78
  export { argsParser };
79
79
  {% elif atom.doc.features.project.format === 'cjs' %}
80
80
 
81
- module.exports = async () => {
81
+ const defaultExport = async () => {
82
82
 
83
83
  let schema = inputSchema;
84
84
  let initial;
85
85
 
86
- {% if atom.doc.features.cli.fargs and atom.doc.features.cli.fargs?.enabled !== false %}
86
+ {% if atom.doc.features.cli.fargs and atom.doc.features.cli.fargs?.enabled !== false %}
87
87
  const fargs = get_fargs(process.argv.slice(2));
88
88
  const ftags = get_ftags(process.argv.slice(2));
89
89
 
@@ -121,5 +121,7 @@
121
121
  return await fnetArgs({schema,initial,validate,packageCallback});
122
122
  };
123
123
 
124
+ module.exports = defaultExport;
125
+ module.exports.default = defaultExport;
124
126
  module.exports.argsParser = argsParser;
125
127
  {% endif %}
@@ -71,6 +71,7 @@
71
71
  {% if atom.doc.features.cli.enabled %}
72
72
  {% if atom.doc.features.project.format ==='cjs' %}
73
73
  ,"cli": "bun {{atom.doc.features.cli.node_options}} {{atom.doc.features.cli.dir}}/index.cjs"
74
+ ,"cli:dev": "NODE_PRESERVE_SYMLINKS=1 bun {{atom.doc.features.cli.node_options}} {{atom.doc.features.cli.input.file}}"
74
75
  {% if atom.doc.features.cli.mcp.enabled === true %}
75
76
  ,"mcp": "bun {{atom.doc.features.cli.node_options}} {{atom.doc.features.cli.dir}}/index.cjs --cli-mode=mcp"
76
77
  ,"mcp-inspect": "bunx @modelcontextprotocol/inspector bun {{atom.doc.features.cli.node_options}} {{atom.doc.features.cli.dir}}/index.cjs --cli-mode=mcp"
@@ -4,7 +4,7 @@
4
4
 
5
5
  {% elif atom.doc.features.project.format === 'cjs' %}
6
6
  const {default:fnetArgs,argsParser} = require('@fnet/args');
7
- const validate,{schema as inputSchema} = require("./validate_input");
7
+ const {default:validate, schema: inputSchema} = require("./validate_input");
8
8
  {% endif %}
9
9
 
10
10
  {% if atom.doc.features.cli.fargs and atom.doc.features.cli.fargs?.enabled !== false %}
@@ -79,12 +79,12 @@
79
79
 
80
80
  {% elif atom.doc.features.project.format === 'cjs' %}
81
81
 
82
- module.exports = async () => {
82
+ const defaultExport = async () => {
83
83
 
84
84
  let schema = inputSchema;
85
85
  let initial;
86
86
 
87
- {% if atom.doc.features.cli.fargs and atom.doc.features.cli.fargs?.enabled !== false %}
87
+ {% if atom.doc.features.cli.fargs and atom.doc.features.cli.fargs?.enabled !== false %}
88
88
  const fargs = get_fargs(process.argv.slice(2));
89
89
  const ftags = get_ftags(process.argv.slice(2));
90
90
 
@@ -122,5 +122,7 @@
122
122
  return await fnetArgs({schema,initial,validate,packageCallback});
123
123
  };
124
124
 
125
+ module.exports = defaultExport;
126
+ module.exports.default = defaultExport;
125
127
  module.exports.argsParser = argsParser;
126
128
  {% endif %}