@formlm/cli 0.2.3 → 0.2.5
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/commands/app.d.ts.map +1 -1
- package/dist/commands/app.js +4 -3
- package/dist/commands/app.js.map +1 -1
- package/dist/commands/auth.d.ts.map +1 -1
- package/dist/commands/auth.js +64 -2
- package/dist/commands/auth.js.map +1 -1
- package/dist/commands/connect.d.ts.map +1 -1
- package/dist/commands/connect.js +34 -41
- package/dist/commands/connect.js.map +1 -1
- package/dist/commands/expert.d.ts.map +1 -1
- package/dist/commands/expert.js +15 -14
- package/dist/commands/expert.js.map +1 -1
- package/dist/commands/field.d.ts.map +1 -1
- package/dist/commands/field.js +17 -27
- package/dist/commands/field.js.map +1 -1
- package/dist/commands/report.d.ts.map +1 -1
- package/dist/commands/report.js +21 -27
- package/dist/commands/report.js.map +1 -1
- package/dist/commands/scale.d.ts.map +1 -1
- package/dist/commands/scale.js +13 -19
- package/dist/commands/scale.js.map +1 -1
- package/dist/commands/smart.d.ts.map +1 -1
- package/dist/commands/smart.js +31 -4
- package/dist/commands/smart.js.map +1 -1
- package/dist/commands/snapshot.d.ts.map +1 -1
- package/dist/commands/snapshot.js +7 -1
- package/dist/commands/snapshot.js.map +1 -1
- package/dist/exec.d.ts.map +1 -1
- package/dist/exec.js +54 -12
- package/dist/exec.js.map +1 -1
- package/dist/index.js +42 -26
- package/dist/index.js.map +1 -1
- package/dist/mcp.d.ts.map +1 -1
- package/dist/mcp.js +31 -20
- package/dist/mcp.js.map +1 -1
- package/dist/utils.d.ts +18 -0
- package/dist/utils.d.ts.map +1 -0
- package/dist/utils.js +34 -0
- package/dist/utils.js.map +1 -0
- package/dist/version.d.ts +2 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +11 -0
- package/dist/version.js.map +1 -0
- package/package.json +1 -1
package/dist/utils.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared CLI utilities.
|
|
3
|
+
*
|
|
4
|
+
* escapeArg is the single source of truth for escaping user-supplied input
|
|
5
|
+
* before it is embedded into a command string. Both the direct CLI
|
|
6
|
+
* (commands/smart.ts) and the MCP Server (mcp.ts) must use it to prevent
|
|
7
|
+
* argument-boundary breakage when input contains double quotes etc.
|
|
8
|
+
*/
|
|
9
|
+
export declare function escapeArg(s: string): string;
|
|
10
|
+
/**
|
|
11
|
+
* Normalize commander optional boolean flags to true/false/undefined.
|
|
12
|
+
* --flag → true
|
|
13
|
+
* --flag=false → false (string)
|
|
14
|
+
* --flag=true → true (string)
|
|
15
|
+
* not passed → undefined
|
|
16
|
+
*/
|
|
17
|
+
export declare function normBool(v: unknown): boolean | undefined;
|
|
18
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAKH,wBAAgB,SAAS,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAO3C;AAED;;;;;;GAMG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EAAE,OAAO,GAAG,OAAO,GAAG,SAAS,CAIxD"}
|
package/dist/utils.js
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared CLI utilities.
|
|
3
|
+
*
|
|
4
|
+
* escapeArg is the single source of truth for escaping user-supplied input
|
|
5
|
+
* before it is embedded into a command string. Both the direct CLI
|
|
6
|
+
* (commands/smart.ts) and the MCP Server (mcp.ts) must use it to prevent
|
|
7
|
+
* argument-boundary breakage when input contains double quotes etc.
|
|
8
|
+
*/
|
|
9
|
+
// tokenizeCommand (server-side PipelineFilterCommand) supports \" as an escaped
|
|
10
|
+
// double-quote inside a quoted arg. Backslashes must be escaped first.
|
|
11
|
+
// Newlines / tabs are normalized to spaces since CLI commands are single-line.
|
|
12
|
+
export function escapeArg(s) {
|
|
13
|
+
return s
|
|
14
|
+
.replace(/\\/g, '\\\\') // \ → \\ (must be first)
|
|
15
|
+
.replace(/"/g, '\\"') // " → \"
|
|
16
|
+
.replace(/\r?\n|\r/g, ' ') // newlines → space
|
|
17
|
+
.replace(/\t/g, ' ') // tabs → space
|
|
18
|
+
.trim();
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Normalize commander optional boolean flags to true/false/undefined.
|
|
22
|
+
* --flag → true
|
|
23
|
+
* --flag=false → false (string)
|
|
24
|
+
* --flag=true → true (string)
|
|
25
|
+
* not passed → undefined
|
|
26
|
+
*/
|
|
27
|
+
export function normBool(v) {
|
|
28
|
+
if (v === undefined)
|
|
29
|
+
return undefined;
|
|
30
|
+
if (typeof v === 'boolean')
|
|
31
|
+
return v;
|
|
32
|
+
return v === 'true' || v === '1';
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,gFAAgF;AAChF,uEAAuE;AACvE,+EAA+E;AAC/E,MAAM,UAAU,SAAS,CAAC,CAAS;IACjC,OAAO,CAAC;SACL,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC,CAAG,0BAA0B;SACnD,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,CAAM,SAAS;SACnC,OAAO,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC,mBAAmB;SAC7C,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAO,eAAe;SACzC,IAAI,EAAE,CAAC;AACZ,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,QAAQ,CAAC,CAAU;IACjC,IAAI,CAAC,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IACtC,IAAI,OAAO,CAAC,KAAK,SAAS;QAAE,OAAO,CAAC,CAAC;IACrC,OAAO,CAAC,KAAK,MAAM,IAAI,CAAC,KAAK,GAAG,CAAC;AACnC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,OAAO,EAAE,MAAoB,CAAC"}
|
package/dist/version.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { createRequire } from 'node:module';
|
|
2
|
+
// package.json is the Single Source of Truth for the version number.
|
|
3
|
+
// Use createRequire (runtime) instead of a static JSON import so that
|
|
4
|
+
// `rootDir: ./src` does not complain about a file outside the src tree.
|
|
5
|
+
// After compilation dist/version.js → ../package.json resolves to the
|
|
6
|
+
// package root both in development and in the published npm tarball
|
|
7
|
+
// (npm always includes package.json regardless of the `files` field).
|
|
8
|
+
const require = createRequire(import.meta.url);
|
|
9
|
+
const pkg = require('../package.json');
|
|
10
|
+
export const VERSION = pkg.version;
|
|
11
|
+
//# sourceMappingURL=version.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,qEAAqE;AACrE,sEAAsE;AACtE,wEAAwE;AACxE,sEAAsE;AACtE,oEAAoE;AACpE,sEAAsE;AACtE,MAAM,OAAO,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC/C,MAAM,GAAG,GAAG,OAAO,CAAC,iBAAiB,CAAwB,CAAC;AAE9D,MAAM,CAAC,MAAM,OAAO,GAAW,GAAG,CAAC,OAAO,CAAC"}
|