@danceroutine/tango-cli 1.11.1 → 1.11.3

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.
@@ -0,0 +1,13 @@
1
+ //#region \0rolldown/runtime.js
2
+ var __defProp = Object.defineProperty;
3
+ var __exportAll = (all, no_symbols) => {
4
+ let target = {};
5
+ for (var name in all) __defProp(target, name, {
6
+ get: all[name],
7
+ enumerable: true
8
+ });
9
+ if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
10
+ return target;
11
+ };
12
+ //#endregion
13
+ export { __exportAll as t };
package/dist/cli.d.ts CHANGED
@@ -1,2 +1 @@
1
- #!/usr/bin/env node
2
- export {};
1
+ export { };
package/dist/cli.js CHANGED
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
- import { runCli } from "./runCli-Btn_GxD3.js";
3
-
2
+ import { t as runCli } from "./runCli-BtvxrEeN.js";
4
3
  //#region src/cli.ts
5
- void runCli();
6
-
4
+ runCli();
7
5
  //#endregion
6
+ export {};
7
+
8
8
  //# sourceMappingURL=cli.js.map
package/dist/cli.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.js","names":[],"sources":["../src/cli.ts"],"sourcesContent":["#!/usr/bin/env node\nimport { runCli } from './runCli';\n\nvoid runCli();\n"],"mappings":";;;;AAGA,KAAK,QAAQ"}
1
+ {"version":3,"file":"cli.js","names":[],"sources":["../src/cli.ts"],"sourcesContent":["#!/usr/bin/env node\nimport { runCli } from './runCli';\n\nvoid runCli();\n"],"mappings":";;;AAGK,OAAO"}
package/dist/index.d.ts CHANGED
@@ -1,9 +1,74 @@
1
+ import { Argv } from "yargs";
2
+
3
+ //#region src/domain/TangoCliCommandModule.d.ts
1
4
  /**
2
- * Bundled exports for Django-style domain drill-down imports, plus curated
3
- * top-level symbols for TS-native ergonomic imports.
5
+ * Contract for modules that attach one command subtree to the shared Tango CLI.
4
6
  */
5
- export * as commands from './commands/index';
6
- export * as domain from './domain/index';
7
- export { createDefaultCommandModules } from './commands/index';
8
- export type { TangoCliCommandModule } from './domain/index';
9
- export { runCli, type RunCliOptions } from './runCli';
7
+ interface TangoCliCommandModule {
8
+ /**
9
+ * Stable identifier used to describe the module within composed CLI setups.
10
+ */
11
+ readonly id: string;
12
+ /**
13
+ * Register the module's commands on the shared yargs parser.
14
+ */
15
+ register(parser: Argv): Argv;
16
+ }
17
+ //#endregion
18
+ //#region src/commands/CodegenCommandModule.d.ts
19
+ /**
20
+ * CLI module that mounts Tango's code-generation commands.
21
+ */
22
+ declare class CodegenCommandModule implements TangoCliCommandModule {
23
+ readonly id = "codegen";
24
+ /**
25
+ * Register the code-generation command tree on the shared parser.
26
+ */
27
+ register(parser: Argv): Argv;
28
+ }
29
+ //#endregion
30
+ //#region src/commands/MigrationsCommandModule.d.ts
31
+ /**
32
+ * CLI module that mounts Tango's migration commands.
33
+ */
34
+ declare class MigrationsCommandModule implements TangoCliCommandModule {
35
+ readonly id = "migrations";
36
+ /**
37
+ * Register the migration command tree on the shared parser.
38
+ */
39
+ register(parser: Argv): Argv;
40
+ }
41
+ //#endregion
42
+ //#region src/commands/createDefaultCommandModules.d.ts
43
+ /**
44
+ * Create the standard command modules shipped with Tango's CLI.
45
+ */
46
+ declare function createDefaultCommandModules(): readonly TangoCliCommandModule[];
47
+ declare namespace index_d_exports {
48
+ export { CodegenCommandModule, MigrationsCommandModule, createDefaultCommandModules };
49
+ }
50
+ declare namespace index_d_exports$1 {
51
+ export { TangoCliCommandModule };
52
+ }
53
+ //#endregion
54
+ //#region src/runCli.d.ts
55
+ type RunCliOptions = {
56
+ /**
57
+ * Argument vector to parse. When omitted, the current process argv is used.
58
+ */
59
+ argv?: readonly string[];
60
+ /**
61
+ * Command modules to register before parsing. The built-in set is used by default.
62
+ */
63
+ modules?: readonly TangoCliCommandModule[];
64
+ };
65
+ /**
66
+ * Run Tango's CLI with a supplied argv list and command module set.
67
+ *
68
+ * This is the entry point used by the binary, and it is also useful in tests
69
+ * or host applications that want to customize which commands are available.
70
+ */
71
+ declare function runCli(options?: RunCliOptions): Promise<void>;
72
+ //#endregion
73
+ export { type RunCliOptions, type TangoCliCommandModule, index_d_exports as commands, createDefaultCommandModules, index_d_exports$1 as domain, runCli };
74
+ //# sourceMappingURL=index.d.ts.map
package/dist/index.js CHANGED
@@ -1,27 +1,15 @@
1
- import { CodegenCommandModule, MigrationsCommandModule, createDefaultCommandModules, runCli } from "./runCli-Btn_GxD3.js";
2
-
3
- //#region rolldown:runtime
4
- var __defProp = Object.defineProperty;
5
- var __export = (target, all) => {
6
- for (var name in all) __defProp(target, name, {
7
- get: all[name],
8
- enumerable: true
9
- });
10
- };
11
-
12
- //#endregion
1
+ import { t as __exportAll } from "./chunk-D7D4PA-g.js";
2
+ import { i as CodegenCommandModule, n as createDefaultCommandModules, r as MigrationsCommandModule, t as runCli } from "./runCli-BtvxrEeN.js";
13
3
  //#region src/commands/index.ts
14
- var commands_exports = {};
15
- __export(commands_exports, {
4
+ var commands_exports = /* @__PURE__ */ __exportAll({
16
5
  CodegenCommandModule: () => CodegenCommandModule,
17
6
  MigrationsCommandModule: () => MigrationsCommandModule,
18
7
  createDefaultCommandModules: () => createDefaultCommandModules
19
8
  });
20
-
21
9
  //#endregion
22
10
  //#region src/domain/index.ts
23
- var domain_exports = {};
24
-
11
+ var domain_exports = /* @__PURE__ */ __exportAll({});
25
12
  //#endregion
26
13
  export { commands_exports as commands, createDefaultCommandModules, domain_exports as domain, runCli };
14
+
27
15
  //# sourceMappingURL=index.js.map
@@ -1,9 +1,11 @@
1
- import yargs from "yargs";
2
- import { hideBin } from "yargs/helpers";
3
1
  import { registerCodegenCommands } from "@danceroutine/tango-codegen";
4
2
  import { registerMigrationsCommands } from "@danceroutine/tango-migrations";
5
-
3
+ import yargs from "yargs";
4
+ import { hideBin } from "yargs/helpers";
6
5
  //#region src/commands/CodegenCommandModule.ts
6
+ /**
7
+ * CLI module that mounts Tango's code-generation commands.
8
+ */
7
9
  var CodegenCommandModule = class {
8
10
  id = "codegen";
9
11
  /**
@@ -13,9 +15,11 @@ var CodegenCommandModule = class {
13
15
  return registerCodegenCommands(parser);
14
16
  }
15
17
  };
16
-
17
18
  //#endregion
18
19
  //#region src/commands/MigrationsCommandModule.ts
20
+ /**
21
+ * CLI module that mounts Tango's migration commands.
22
+ */
19
23
  var MigrationsCommandModule = class {
20
24
  id = "migrations";
21
25
  /**
@@ -25,24 +29,30 @@ var MigrationsCommandModule = class {
25
29
  return registerMigrationsCommands(parser);
26
30
  }
27
31
  };
28
-
29
32
  //#endregion
30
33
  //#region src/commands/createDefaultCommandModules.ts
34
+ /**
35
+ * Create the standard command modules shipped with Tango's CLI.
36
+ */
31
37
  function createDefaultCommandModules() {
32
38
  return [new MigrationsCommandModule(), new CodegenCommandModule()];
33
39
  }
34
-
35
40
  //#endregion
36
41
  //#region src/runCli.ts
42
+ /**
43
+ * Run Tango's CLI with a supplied argv list and command module set.
44
+ *
45
+ * This is the entry point used by the binary, and it is also useful in tests
46
+ * or host applications that want to customize which commands are available.
47
+ */
37
48
  async function runCli(options = {}) {
38
49
  const modules = options.modules ?? createDefaultCommandModules();
39
- const argvInput = options.argv ?? hideBin(process.argv);
40
- let parser = yargs([...argvInput]);
50
+ let parser = yargs([...options.argv ?? hideBin(process.argv)]);
41
51
  parser = parser.scriptName("tango");
42
52
  for (const module of modules) parser = module.register(parser);
43
53
  await parser.demandCommand(1, "You must specify a command").strict().exitProcess(false).help().alias("help", "h").alias("version", "v").parseAsync();
44
54
  }
45
-
46
55
  //#endregion
47
- export { CodegenCommandModule, MigrationsCommandModule, createDefaultCommandModules, runCli };
48
- //# sourceMappingURL=runCli-Btn_GxD3.js.map
56
+ export { CodegenCommandModule as i, createDefaultCommandModules as n, MigrationsCommandModule as r, runCli as t };
57
+
58
+ //# sourceMappingURL=runCli-BtvxrEeN.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runCli-BtvxrEeN.js","names":[],"sources":["../src/commands/CodegenCommandModule.ts","../src/commands/MigrationsCommandModule.ts","../src/commands/createDefaultCommandModules.ts","../src/runCli.ts"],"sourcesContent":["import type { Argv } from 'yargs';\nimport { registerCodegenCommands } from '@danceroutine/tango-codegen';\nimport type { TangoCliCommandModule } from '../domain/TangoCliCommandModule';\n\n/**\n * CLI module that mounts Tango's code-generation commands.\n */\nexport class CodegenCommandModule implements TangoCliCommandModule {\n readonly id = 'codegen';\n\n /**\n * Register the code-generation command tree on the shared parser.\n */\n register(parser: Argv): Argv {\n return registerCodegenCommands(parser);\n }\n}\n","import type { Argv } from 'yargs';\nimport { registerMigrationsCommands } from '@danceroutine/tango-migrations';\nimport type { TangoCliCommandModule } from '../domain/TangoCliCommandModule';\n\n/**\n * CLI module that mounts Tango's migration commands.\n */\nexport class MigrationsCommandModule implements TangoCliCommandModule {\n readonly id = 'migrations';\n\n /**\n * Register the migration command tree on the shared parser.\n */\n register(parser: Argv): Argv {\n return registerMigrationsCommands(parser);\n }\n}\n","import type { TangoCliCommandModule } from '../domain/TangoCliCommandModule';\nimport { CodegenCommandModule } from './CodegenCommandModule';\nimport { MigrationsCommandModule } from './MigrationsCommandModule';\n\n/**\n * Create the standard command modules shipped with Tango's CLI.\n */\nexport function createDefaultCommandModules(): readonly TangoCliCommandModule[] {\n return [new MigrationsCommandModule(), new CodegenCommandModule()];\n}\n","import yargs from 'yargs';\nimport { hideBin } from 'yargs/helpers';\nimport type { TangoCliCommandModule } from './domain/TangoCliCommandModule';\nimport { createDefaultCommandModules } from './commands/createDefaultCommandModules';\n\nexport type RunCliOptions = {\n /**\n * Argument vector to parse. When omitted, the current process argv is used.\n */\n argv?: readonly string[];\n\n /**\n * Command modules to register before parsing. The built-in set is used by default.\n */\n modules?: readonly TangoCliCommandModule[];\n};\n\n/**\n * Run Tango's CLI with a supplied argv list and command module set.\n *\n * This is the entry point used by the binary, and it is also useful in tests\n * or host applications that want to customize which commands are available.\n */\nexport async function runCli(options: RunCliOptions = {}): Promise<void> {\n const modules = options.modules ?? createDefaultCommandModules();\n const argvInput = options.argv ?? hideBin(process.argv);\n\n let parser = yargs([...argvInput]);\n parser = parser.scriptName('tango');\n\n for (const module of modules) {\n parser = module.register(parser);\n }\n\n await parser\n .demandCommand(1, 'You must specify a command')\n .strict()\n .exitProcess(false)\n .help()\n .alias('help', 'h')\n .alias('version', 'v')\n .parseAsync();\n}\n"],"mappings":";;;;;;;;AAOA,IAAa,uBAAb,MAAmE;CAC/D,KAAc;;;;CAKd,SAAS,QAAoB;EACzB,OAAO,wBAAwB,MAAM;CACzC;AACJ;;;;;;ACTA,IAAa,0BAAb,MAAsE;CAClE,KAAc;;;;CAKd,SAAS,QAAoB;EACzB,OAAO,2BAA2B,MAAM;CAC5C;AACJ;;;;;;ACTA,SAAgB,8BAAgE;CAC5E,OAAO,CAAC,IAAI,wBAAwB,GAAG,IAAI,qBAAqB,CAAC;AACrE;;;;;;;;;ACcA,eAAsB,OAAO,UAAyB,CAAC,GAAkB;CACrE,MAAM,UAAU,QAAQ,WAAW,4BAA4B;CAG/D,IAAI,SAAS,MAAM,CAAC,GAFF,QAAQ,QAAQ,QAAQ,QAAQ,IAAI,CAEtB,CAAC;CACjC,SAAS,OAAO,WAAW,OAAO;CAElC,KAAK,MAAM,UAAU,SACjB,SAAS,OAAO,SAAS,MAAM;CAGnC,MAAM,OACD,cAAc,GAAG,4BAA4B,EAC7C,OAAO,EACP,YAAY,KAAK,EACjB,KAAK,EACL,MAAM,QAAQ,GAAG,EACjB,MAAM,WAAW,GAAG,EACpB,WAAW;AACpB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@danceroutine/tango-cli",
3
- "version": "1.11.1",
3
+ "version": "1.11.3",
4
4
  "description": "Unified Tango command line interface for migrations and code generation",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -33,13 +33,13 @@
33
33
  },
34
34
  "dependencies": {
35
35
  "yargs": "^18.0.0",
36
- "@danceroutine/tango-codegen": "1.11.1",
37
- "@danceroutine/tango-migrations": "1.11.1"
36
+ "@danceroutine/tango-codegen": "1.11.3",
37
+ "@danceroutine/tango-migrations": "1.11.3"
38
38
  },
39
39
  "devDependencies": {
40
40
  "@types/node": "^22.9.0",
41
41
  "@types/yargs": "^17.0.33",
42
- "tsdown": "^0.4.0",
42
+ "tsdown": "^0.22.1",
43
43
  "typescript": "^5.6.3",
44
44
  "vitest": "^4.1.7"
45
45
  },
@@ -1,12 +0,0 @@
1
- import type { Argv } from 'yargs';
2
- import type { TangoCliCommandModule } from '../domain/TangoCliCommandModule';
3
- /**
4
- * CLI module that mounts Tango's code-generation commands.
5
- */
6
- export declare class CodegenCommandModule implements TangoCliCommandModule {
7
- readonly id = "codegen";
8
- /**
9
- * Register the code-generation command tree on the shared parser.
10
- */
11
- register(parser: Argv): Argv;
12
- }
@@ -1,12 +0,0 @@
1
- import type { Argv } from 'yargs';
2
- import type { TangoCliCommandModule } from '../domain/TangoCliCommandModule';
3
- /**
4
- * CLI module that mounts Tango's migration commands.
5
- */
6
- export declare class MigrationsCommandModule implements TangoCliCommandModule {
7
- readonly id = "migrations";
8
- /**
9
- * Register the migration command tree on the shared parser.
10
- */
11
- register(parser: Argv): Argv;
12
- }
@@ -1,5 +0,0 @@
1
- import type { TangoCliCommandModule } from '../domain/TangoCliCommandModule';
2
- /**
3
- * Create the standard command modules shipped with Tango's CLI.
4
- */
5
- export declare function createDefaultCommandModules(): readonly TangoCliCommandModule[];
@@ -1,6 +0,0 @@
1
- /**
2
- * Domain boundary barrel: centralizes this subdomain's public contract.
3
- */
4
- export { CodegenCommandModule } from './CodegenCommandModule';
5
- export { MigrationsCommandModule } from './MigrationsCommandModule';
6
- export { createDefaultCommandModules } from './createDefaultCommandModules';
@@ -1,14 +0,0 @@
1
- import type { Argv } from 'yargs';
2
- /**
3
- * Contract for modules that attach one command subtree to the shared Tango CLI.
4
- */
5
- export interface TangoCliCommandModule {
6
- /**
7
- * Stable identifier used to describe the module within composed CLI setups.
8
- */
9
- readonly id: string;
10
- /**
11
- * Register the module's commands on the shared yargs parser.
12
- */
13
- register(parser: Argv): Argv;
14
- }
@@ -1,4 +0,0 @@
1
- /**
2
- * Domain boundary barrel: centralizes this subdomain's public contract.
3
- */
4
- export type { TangoCliCommandModule } from './TangoCliCommandModule';
@@ -1 +0,0 @@
1
- {"version":3,"file":"runCli-Btn_GxD3.js","names":["parser: Argv","parser: Argv","options: RunCliOptions"],"sources":["../src/commands/CodegenCommandModule.ts","../src/commands/MigrationsCommandModule.ts","../src/commands/createDefaultCommandModules.ts","../src/runCli.ts"],"sourcesContent":["import type { Argv } from 'yargs';\nimport { registerCodegenCommands } from '@danceroutine/tango-codegen';\nimport type { TangoCliCommandModule } from '../domain/TangoCliCommandModule';\n\n/**\n * CLI module that mounts Tango's code-generation commands.\n */\nexport class CodegenCommandModule implements TangoCliCommandModule {\n readonly id = 'codegen';\n\n /**\n * Register the code-generation command tree on the shared parser.\n */\n register(parser: Argv): Argv {\n return registerCodegenCommands(parser);\n }\n}\n","import type { Argv } from 'yargs';\nimport { registerMigrationsCommands } from '@danceroutine/tango-migrations';\nimport type { TangoCliCommandModule } from '../domain/TangoCliCommandModule';\n\n/**\n * CLI module that mounts Tango's migration commands.\n */\nexport class MigrationsCommandModule implements TangoCliCommandModule {\n readonly id = 'migrations';\n\n /**\n * Register the migration command tree on the shared parser.\n */\n register(parser: Argv): Argv {\n return registerMigrationsCommands(parser);\n }\n}\n","import type { TangoCliCommandModule } from '../domain/TangoCliCommandModule';\nimport { CodegenCommandModule } from './CodegenCommandModule';\nimport { MigrationsCommandModule } from './MigrationsCommandModule';\n\n/**\n * Create the standard command modules shipped with Tango's CLI.\n */\nexport function createDefaultCommandModules(): readonly TangoCliCommandModule[] {\n return [new MigrationsCommandModule(), new CodegenCommandModule()];\n}\n","import yargs from 'yargs';\nimport { hideBin } from 'yargs/helpers';\nimport type { TangoCliCommandModule } from './domain/TangoCliCommandModule';\nimport { createDefaultCommandModules } from './commands/createDefaultCommandModules';\n\nexport type RunCliOptions = {\n /**\n * Argument vector to parse. When omitted, the current process argv is used.\n */\n argv?: readonly string[];\n\n /**\n * Command modules to register before parsing. The built-in set is used by default.\n */\n modules?: readonly TangoCliCommandModule[];\n};\n\n/**\n * Run Tango's CLI with a supplied argv list and command module set.\n *\n * This is the entry point used by the binary, and it is also useful in tests\n * or host applications that want to customize which commands are available.\n */\nexport async function runCli(options: RunCliOptions = {}): Promise<void> {\n const modules = options.modules ?? createDefaultCommandModules();\n const argvInput = options.argv ?? hideBin(process.argv);\n\n let parser = yargs([...argvInput]);\n parser = parser.scriptName('tango');\n\n for (const module of modules) {\n parser = module.register(parser);\n }\n\n await parser\n .demandCommand(1, 'You must specify a command')\n .strict()\n .exitProcess(false)\n .help()\n .alias('help', 'h')\n .alias('version', 'v')\n .parseAsync();\n}\n"],"mappings":";;;;;;IAOa,uBAAN,MAA4D;CAC/D,KAAc;;;;CAKd,SAASA,QAAoB;AACzB,SAAO,wBAAwB,OAAO;CACzC;AACJ;;;;ICTY,0BAAN,MAA+D;CAClE,KAAc;;;;CAKd,SAASC,QAAoB;AACzB,SAAO,2BAA2B,OAAO;CAC5C;AACJ;;;;ACTM,SAAS,8BAAgE;AAC5E,QAAO,CAAC,IAAI,2BAA2B,IAAI,sBAAuB;AACrE;;;;ACcM,eAAe,OAAOC,UAAyB,CAAE,GAAiB;CACrE,MAAM,UAAU,QAAQ,WAAW,6BAA6B;CAChE,MAAM,YAAY,QAAQ,QAAQ,QAAQ,QAAQ,KAAK;CAEvD,IAAI,SAAS,MAAM,CAAC,GAAG,SAAU,EAAC;AAClC,UAAS,OAAO,WAAW,QAAQ;AAEnC,MAAK,MAAM,UAAU,QACjB,UAAS,OAAO,SAAS,OAAO;AAGpC,OAAM,OACD,cAAc,GAAG,6BAA6B,CAC9C,QAAQ,CACR,YAAY,MAAM,CAClB,MAAM,CACN,MAAM,QAAQ,IAAI,CAClB,MAAM,WAAW,IAAI,CACrB,YAAY;AACpB"}
package/dist/runCli.d.ts DELETED
@@ -1,18 +0,0 @@
1
- import type { TangoCliCommandModule } from './domain/TangoCliCommandModule';
2
- export type RunCliOptions = {
3
- /**
4
- * Argument vector to parse. When omitted, the current process argv is used.
5
- */
6
- argv?: readonly string[];
7
- /**
8
- * Command modules to register before parsing. The built-in set is used by default.
9
- */
10
- modules?: readonly TangoCliCommandModule[];
11
- };
12
- /**
13
- * Run Tango's CLI with a supplied argv list and command module set.
14
- *
15
- * This is the entry point used by the binary, and it is also useful in tests
16
- * or host applications that want to customize which commands are available.
17
- */
18
- export declare function runCli(options?: RunCliOptions): Promise<void>;