@apicircle/cli 1.0.9 → 1.1.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/README.md +38 -6
- package/dist/bin/cli.cjs +1666 -101
- package/dist/bin/cli.cjs.map +1 -1
- package/dist/bin/cli.js +3 -1
- package/dist/bin/cli.js.map +1 -1
- package/dist/{chunk-H4VHFKVH.js → chunk-P4CXF2MS.js} +3 -2
- package/dist/{chunk-H4VHFKVH.js.map → chunk-P4CXF2MS.js.map} +1 -1
- package/dist/index.cjs +1601 -94
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1610 -97
- package/dist/index.js.map +1 -1
- package/package.json +7 -6
package/dist/bin/cli.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
CLI_PACKAGE_VERSION
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-P4CXF2MS.js";
|
|
5
5
|
|
|
6
6
|
// src/bin/args.ts
|
|
7
7
|
function hasRootVersionFlag(args) {
|
|
@@ -25,6 +25,8 @@ Commands:
|
|
|
25
25
|
import <source> <workspace> Import OpenAPI, Postman, Insomnia, or curl.
|
|
26
26
|
run [options] <plan-id> Run an execution plan.
|
|
27
27
|
workspaces Manage local workspace registries.
|
|
28
|
+
linked <subcommand> Manage linked workspaces (list/link/refresh/unlink).
|
|
29
|
+
release <subcommand> Tag releases / set topics on the workspace's GitHub repo.
|
|
28
30
|
|
|
29
31
|
Run "apicircle <command> --help" for command-specific help.
|
|
30
32
|
`;
|
package/dist/bin/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/bin/args.ts","../../src/bin/cli.ts"],"sourcesContent":["export function hasRootVersionFlag(args: readonly string[]): boolean {\n return args.length === 1 && ['--version', '-v', '-V'].includes(args[0] ?? '');\n}\n\nexport function hasRootHelpFlag(args: readonly string[]): boolean {\n return args.length === 1 && ['--help', '-h', 'help'].includes(args[0] ?? '');\n}\n\nexport function formatRootHelp(): string {\n return `Usage: apicircle [options] [command]\n\nCommand-line companion to API Circle Studio.\n\nOptions:\n -v, -V, --version Print the version number.\n -h, --help Show help.\n\nCommands:\n mock [options] <workspace> Start a local mock server.\n mcp [options] [workspace] Start the MCP stdio server.\n import <source> <workspace> Import OpenAPI, Postman, Insomnia, or curl.\n run [options] <plan-id> Run an execution plan.\n workspaces Manage local workspace registries.\n\nRun \"apicircle <command> --help\" for command-specific help.\n`;\n}\n","import { CLI_PACKAGE_VERSION } from '../packageVersion';\nimport { formatRootHelp, hasRootHelpFlag, hasRootVersionFlag } from './args';\n\nexport async function runBin(argv: readonly string[] = process.argv): Promise<void> {\n const args = argv.slice(2);\n if (hasRootVersionFlag(args)) {\n process.stdout.write(`${CLI_PACKAGE_VERSION}\\n`);\n return;\n }\n if (hasRootHelpFlag(args)) {\n process.stdout.write(formatRootHelp());\n return;\n }\n\n const { runCli } = await import('../index');\n await runCli(argv);\n}\n\nconst entry = process.argv[1] ?? '';\nif (entry.endsWith('apicircle') || entry.endsWith('cli.cjs') || entry.endsWith('cli.ts')) {\n void runBin();\n}\n"],"mappings":";;;;;;AAAO,SAAS,mBAAmB,MAAkC;AACnE,SAAO,KAAK,WAAW,KAAK,CAAC,aAAa,MAAM,IAAI,EAAE,SAAS,KAAK,CAAC,KAAK,EAAE;AAC9E;AAEO,SAAS,gBAAgB,MAAkC;AAChE,SAAO,KAAK,WAAW,KAAK,CAAC,UAAU,MAAM,MAAM,EAAE,SAAS,KAAK,CAAC,KAAK,EAAE;AAC7E;AAEO,SAAS,iBAAyB;AACvC,SAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;
|
|
1
|
+
{"version":3,"sources":["../../src/bin/args.ts","../../src/bin/cli.ts"],"sourcesContent":["export function hasRootVersionFlag(args: readonly string[]): boolean {\n return args.length === 1 && ['--version', '-v', '-V'].includes(args[0] ?? '');\n}\n\nexport function hasRootHelpFlag(args: readonly string[]): boolean {\n return args.length === 1 && ['--help', '-h', 'help'].includes(args[0] ?? '');\n}\n\nexport function formatRootHelp(): string {\n return `Usage: apicircle [options] [command]\n\nCommand-line companion to API Circle Studio.\n\nOptions:\n -v, -V, --version Print the version number.\n -h, --help Show help.\n\nCommands:\n mock [options] <workspace> Start a local mock server.\n mcp [options] [workspace] Start the MCP stdio server.\n import <source> <workspace> Import OpenAPI, Postman, Insomnia, or curl.\n run [options] <plan-id> Run an execution plan.\n workspaces Manage local workspace registries.\n linked <subcommand> Manage linked workspaces (list/link/refresh/unlink).\n release <subcommand> Tag releases / set topics on the workspace's GitHub repo.\n\nRun \"apicircle <command> --help\" for command-specific help.\n`;\n}\n","import { CLI_PACKAGE_VERSION } from '../packageVersion';\nimport { formatRootHelp, hasRootHelpFlag, hasRootVersionFlag } from './args';\n\nexport async function runBin(argv: readonly string[] = process.argv): Promise<void> {\n const args = argv.slice(2);\n if (hasRootVersionFlag(args)) {\n process.stdout.write(`${CLI_PACKAGE_VERSION}\\n`);\n return;\n }\n if (hasRootHelpFlag(args)) {\n process.stdout.write(formatRootHelp());\n return;\n }\n\n const { runCli } = await import('../index');\n await runCli(argv);\n}\n\nconst entry = process.argv[1] ?? '';\nif (entry.endsWith('apicircle') || entry.endsWith('cli.cjs') || entry.endsWith('cli.ts')) {\n void runBin();\n}\n"],"mappings":";;;;;;AAAO,SAAS,mBAAmB,MAAkC;AACnE,SAAO,KAAK,WAAW,KAAK,CAAC,aAAa,MAAM,IAAI,EAAE,SAAS,KAAK,CAAC,KAAK,EAAE;AAC9E;AAEO,SAAS,gBAAgB,MAAkC;AAChE,SAAO,KAAK,WAAW,KAAK,CAAC,UAAU,MAAM,MAAM,EAAE,SAAS,KAAK,CAAC,KAAK,EAAE;AAC7E;AAEO,SAAS,iBAAyB;AACvC,SAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAmBT;;;ACzBA,eAAsB,OAAO,OAA0B,QAAQ,MAAqB;AAClF,QAAM,OAAO,KAAK,MAAM,CAAC;AACzB,MAAI,mBAAmB,IAAI,GAAG;AAC5B,YAAQ,OAAO,MAAM,GAAG,mBAAmB;AAAA,CAAI;AAC/C;AAAA,EACF;AACA,MAAI,gBAAgB,IAAI,GAAG;AACzB,YAAQ,OAAO,MAAM,eAAe,CAAC;AACrC;AAAA,EACF;AAEA,QAAM,EAAE,OAAO,IAAI,MAAM,OAAO,aAAU;AAC1C,QAAM,OAAO,IAAI;AACnB;AAEA,IAAM,QAAQ,QAAQ,KAAK,CAAC,KAAK;AACjC,IAAI,MAAM,SAAS,WAAW,KAAK,MAAM,SAAS,SAAS,KAAK,MAAM,SAAS,QAAQ,GAAG;AACxF,OAAK,OAAO;AACd;","names":[]}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// package.json
|
|
4
4
|
var package_default = {
|
|
5
5
|
name: "@apicircle/cli",
|
|
6
|
-
version: "1.0
|
|
6
|
+
version: "1.1.0",
|
|
7
7
|
private: false,
|
|
8
8
|
type: "module",
|
|
9
9
|
description: "Command-line interface for API Circle Studio. Run mock servers, drive the MCP server, and import OpenAPI / Postman / Insomnia collections from any terminal.",
|
|
@@ -81,6 +81,7 @@ var package_default = {
|
|
|
81
81
|
kleur: "^4.1.5"
|
|
82
82
|
},
|
|
83
83
|
devDependencies: {
|
|
84
|
+
"@apicircle/git": "workspace:*",
|
|
84
85
|
"@types/node": "^20.0.0",
|
|
85
86
|
tsup: "^8.3.0",
|
|
86
87
|
typescript: "^5.4.0",
|
|
@@ -101,4 +102,4 @@ var CLI_PACKAGE_VERSION = readPackageVersion();
|
|
|
101
102
|
export {
|
|
102
103
|
CLI_PACKAGE_VERSION
|
|
103
104
|
};
|
|
104
|
-
//# sourceMappingURL=chunk-
|
|
105
|
+
//# sourceMappingURL=chunk-P4CXF2MS.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../package.json","../src/packageVersion.ts"],"sourcesContent":["{\n \"name\": \"@apicircle/cli\",\n \"version\": \"1.0
|
|
1
|
+
{"version":3,"sources":["../package.json","../src/packageVersion.ts"],"sourcesContent":["{\n \"name\": \"@apicircle/cli\",\n \"version\": \"1.1.0\",\n \"private\": false,\n \"type\": \"module\",\n \"description\": \"Command-line interface for API Circle Studio. Run mock servers, drive the MCP server, and import OpenAPI / Postman / Insomnia collections from any terminal.\",\n \"keywords\": [\n \"apicircle\",\n \"api-circle\",\n \"cli\",\n \"command-line\",\n \"api\",\n \"api-client\",\n \"http\",\n \"http-client\",\n \"mock-server\",\n \"mcp\",\n \"mcp-server\",\n \"openapi\",\n \"swagger\",\n \"postman\",\n \"insomnia\",\n \"import\",\n \"workspace\",\n \"headless\"\n ],\n \"license\": \"SEE LICENSE IN LICENSE\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"git+https://github.com/apicircle/studio.git\",\n \"directory\": \"packages/cli\"\n },\n \"homepage\": \"https://github.com/apicircle/studio#readme\",\n \"bugs\": \"https://github.com/apicircle/studio/issues\",\n \"engines\": {\n \"node\": \">=20\"\n },\n \"main\": \"./src/index.ts\",\n \"types\": \"./src/index.ts\",\n \"bin\": {\n \"apicircle\": \"./dist/bin/cli.cjs\"\n },\n \"exports\": {\n \".\": \"./src/index.ts\"\n },\n \"files\": [\n \"dist\"\n ],\n \"publishConfig\": {\n \"main\": \"./dist/index.cjs\",\n \"module\": \"./dist/index.js\",\n \"types\": \"./dist/index.d.cts\",\n \"exports\": {\n \".\": {\n \"import\": {\n \"types\": \"./dist/index.d.ts\",\n \"default\": \"./dist/index.js\"\n },\n \"require\": {\n \"types\": \"./dist/index.d.cts\",\n \"default\": \"./dist/index.cjs\"\n }\n }\n }\n },\n \"scripts\": {\n \"build\": \"tsup\",\n \"check\": \"tsc --noEmit\",\n \"test\": \"vitest run\",\n \"clean\": \"rm -rf dist node_modules\"\n },\n \"dependencies\": {\n \"@apicircle/core\": \"workspace:*\",\n \"@apicircle/mcp-server\": \"workspace:*\",\n \"@apicircle/mock-server-core\": \"workspace:*\",\n \"@apicircle/shared\": \"workspace:*\",\n \"commander\": \"^12.0.0\",\n \"kleur\": \"^4.1.5\"\n },\n \"devDependencies\": {\n \"@apicircle/git\": \"workspace:*\",\n \"@types/node\": \"^20.0.0\",\n \"tsup\": \"^8.3.0\",\n \"typescript\": \"^5.4.0\",\n \"vitest\": \"^2.0.0\"\n }\n}\n","import packageJson from '../package.json';\n\nexport function readPackageVersion(): string {\n const version = (packageJson as { version?: unknown }).version;\n if (typeof version !== 'string' || version.length === 0) {\n throw new Error('Unable to read @apicircle/cli package version');\n }\n return version;\n}\n\nexport const CLI_PACKAGE_VERSION = readPackageVersion();\n"],"mappings":";;;AAAA;AAAA,EACE,MAAQ;AAAA,EACR,SAAW;AAAA,EACX,SAAW;AAAA,EACX,MAAQ;AAAA,EACR,aAAe;AAAA,EACf,UAAY;AAAA,IACV;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EACA,SAAW;AAAA,EACX,YAAc;AAAA,IACZ,MAAQ;AAAA,IACR,KAAO;AAAA,IACP,WAAa;AAAA,EACf;AAAA,EACA,UAAY;AAAA,EACZ,MAAQ;AAAA,EACR,SAAW;AAAA,IACT,MAAQ;AAAA,EACV;AAAA,EACA,MAAQ;AAAA,EACR,OAAS;AAAA,EACT,KAAO;AAAA,IACL,WAAa;AAAA,EACf;AAAA,EACA,SAAW;AAAA,IACT,KAAK;AAAA,EACP;AAAA,EACA,OAAS;AAAA,IACP;AAAA,EACF;AAAA,EACA,eAAiB;AAAA,IACf,MAAQ;AAAA,IACR,QAAU;AAAA,IACV,OAAS;AAAA,IACT,SAAW;AAAA,MACT,KAAK;AAAA,QACH,QAAU;AAAA,UACR,OAAS;AAAA,UACT,SAAW;AAAA,QACb;AAAA,QACA,SAAW;AAAA,UACT,OAAS;AAAA,UACT,SAAW;AAAA,QACb;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAAA,EACA,SAAW;AAAA,IACT,OAAS;AAAA,IACT,OAAS;AAAA,IACT,MAAQ;AAAA,IACR,OAAS;AAAA,EACX;AAAA,EACA,cAAgB;AAAA,IACd,mBAAmB;AAAA,IACnB,yBAAyB;AAAA,IACzB,+BAA+B;AAAA,IAC/B,qBAAqB;AAAA,IACrB,WAAa;AAAA,IACb,OAAS;AAAA,EACX;AAAA,EACA,iBAAmB;AAAA,IACjB,kBAAkB;AAAA,IAClB,eAAe;AAAA,IACf,MAAQ;AAAA,IACR,YAAc;AAAA,IACd,QAAU;AAAA,EACZ;AACF;;;ACpFO,SAAS,qBAA6B;AAC3C,QAAM,UAAW,gBAAsC;AACvD,MAAI,OAAO,YAAY,YAAY,QAAQ,WAAW,GAAG;AACvD,UAAM,IAAI,MAAM,+CAA+C;AAAA,EACjE;AACA,SAAO;AACT;AAEO,IAAM,sBAAsB,mBAAmB;","names":[]}
|