@forinda/kickjs-cli 5.3.0 → 5.4.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.
Files changed (28) hide show
  1. package/dist/{builtins-B1iai4Mu.mjs → builtins-DBzZkJey.mjs} +151 -90
  2. package/dist/builtins-DBzZkJey.mjs.map +1 -0
  3. package/dist/{builtins-DC1UyGqc.mjs → builtins-K-nRJcJG.mjs} +409 -214
  4. package/dist/cli.mjs +2 -2
  5. package/dist/config-CCNnXhar.mjs +11 -0
  6. package/dist/config-CQZ6Hppr.mjs +12 -0
  7. package/dist/config-CQZ6Hppr.mjs.map +1 -0
  8. package/dist/{generator-extension-Ba3TqDk4.mjs → generator-extension-Bn2aH7kY.mjs} +228 -94
  9. package/dist/generator-extension-Bn2aH7kY.mjs.map +1 -0
  10. package/dist/index.d.mts +45 -0
  11. package/dist/index.d.mts.map +1 -1
  12. package/dist/index.mjs +2 -2
  13. package/dist/{plugin-Qx3Ev5pq.mjs → plugin-D0C4ISZA.mjs} +2 -2
  14. package/dist/{plugin-DgxIJkPU.mjs → plugin-DasN_2Zr.mjs} +3 -3
  15. package/dist/{plugin-DgxIJkPU.mjs.map → plugin-DasN_2Zr.mjs.map} +1 -1
  16. package/dist/{rolldown-runtime-oa5maqtn.mjs → rolldown-runtime-BTpMa50s.mjs} +1 -1
  17. package/dist/{run-plugins-BqZ57Zcb.mjs → run-plugins-Dk7KBKON.mjs} +2 -2
  18. package/dist/{typegen-VziXMsqI.mjs → typegen-Bl9kUVNL.mjs} +4 -4
  19. package/dist/{typegen-VziXMsqI.mjs.map → typegen-Bl9kUVNL.mjs.map} +1 -1
  20. package/dist/{typegen-Dnc6bshx.mjs → typegen-DDQJNnUl.mjs} +3 -3
  21. package/dist/{types-Bcro6dIS.mjs → types-kAfWJgh0.mjs} +2 -2
  22. package/dist/{types-Bcro6dIS.mjs.map → types-kAfWJgh0.mjs.map} +1 -1
  23. package/package.json +4 -4
  24. package/dist/builtins-B1iai4Mu.mjs.map +0 -1
  25. package/dist/config-B-1yY_qH.mjs +0 -11
  26. package/dist/config-DdlM0SJN.mjs +0 -12
  27. package/dist/config-DdlM0SJN.mjs.map +0 -1
  28. package/dist/generator-extension-Ba3TqDk4.mjs.map +0 -1
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @forinda/kickjs-cli v5.3.0
2
+ * @forinda/kickjs-cli v5.4.0
3
3
  *
4
4
  * Copyright (c) Felix Orinda
5
5
  *
@@ -9,4 +9,4 @@
9
9
  * @license MIT
10
10
  */
11
11
  function e(e){return e}var t=class extends Error{constructor(e,t,n){super(`Two plugins registered the same ${e} '${t}': ${n.join(`, `)}. Plugins must use unique ${e} names.`),this.name=`KickPluginConflictError`}};export{e as n,t};
12
- //# sourceMappingURL=types-Bcro6dIS.mjs.map
12
+ //# sourceMappingURL=types-kAfWJgh0.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"types-Bcro6dIS.mjs","names":[],"sources":["../src/plugin/types.ts"],"sourcesContent":["// CLI Plugin shape.\n//\n// The kick CLI is itself a composition of plugins — every built-in\n// command (init, generate, run, typegen, db, …) ships as a KickCliPlugin\n// internally. Adopters extend the same surface from kick.config.ts to\n// add commands, generators, and typegens; the merging + conflict\n// detection runs the same way for built-ins and user plugins.\n//\n// Four contribution kinds:\n//\n// • commands[] — declarative shell-handler commands (same shape as\n// the existing kick.config.ts `commands` field).\n// • register() — programmatic commander registration. Called with\n// `(program, ctx)` so the callback has cwd + config\n// without re-loading.\n// • typegens[] — TypegenPlugin instances that `kick typegen` runs\n// after the legacy pass.\n// • generators[] — `kick g <name>` scaffolders (defineGenerator).\n// Replaces the `package.json > kickjs.generators`\n// discovery; that path stays as a deprecated\n// fallback for one minor version.\n//\n// Mirrors `definePlugin` / `defineAdapter` factory parity so adopters\n// don't have to learn a new helper-naming convention.\n\nimport type { Command } from 'commander'\n\nimport type { TypegenPlugin } from '../typegen/plugin'\nimport type { KickCommandDefinition, KickConfig } from '../config'\nimport type { GeneratorSpec } from '../generator-extension/define'\n\n/**\n * Runtime context handed to `register()` — saves callbacks from\n * re-loading config or guessing cwd. Forward-compatible: future fields\n * land here without changing the callback signature.\n */\nexport interface KickCliPluginContext {\n cwd: string\n /** Resolved kick.config.ts (null if the project has none). */\n config: KickConfig | null\n log: (msg: string) => void\n}\n\nexport interface KickCliPlugin {\n /** Stable identifier — used in error messages on conflict + de-dup. */\n name: string\n commands?: KickCommandDefinition[]\n /** Programmatic command registration. Called once at CLI startup. */\n register?: (program: Command, ctx: KickCliPluginContext) => void | Promise<void>\n typegens?: TypegenPlugin[]\n generators?: GeneratorSpec[]\n}\n\n/** Identity helper — exists for type inference + parity with definePlugin. */\nexport function defineCliPlugin(p: KickCliPlugin): KickCliPlugin {\n return p\n}\n\nexport class KickPluginConflictError extends Error {\n constructor(kind: 'plugin' | 'command' | 'typegen' | 'generator', id: string, owners: string[]) {\n super(\n `Two plugins registered the same ${kind} '${id}': ${owners.join(', ')}. ` +\n `Plugins must use unique ${kind} names.`,\n )\n this.name = 'KickPluginConflictError'\n }\n}\n"],"mappings":";;;;;;;;;;AAsDA,SAAgB,EAAgB,EAAiC,CAC/D,OAAO,EAGT,IAAa,EAAb,cAA6C,KAAM,CACjD,YAAY,EAAsD,EAAY,EAAkB,CAC9F,MACE,mCAAmC,EAAK,IAAI,EAAG,KAAK,EAAO,KAAK,KAAK,CAAC,4BACzC,EAAK,SACnC,CACD,KAAK,KAAO"}
1
+ {"version":3,"file":"types-kAfWJgh0.mjs","names":[],"sources":["../src/plugin/types.ts"],"sourcesContent":["// CLI Plugin shape.\n//\n// The kick CLI is itself a composition of plugins — every built-in\n// command (init, generate, run, typegen, db, …) ships as a KickCliPlugin\n// internally. Adopters extend the same surface from kick.config.ts to\n// add commands, generators, and typegens; the merging + conflict\n// detection runs the same way for built-ins and user plugins.\n//\n// Four contribution kinds:\n//\n// • commands[] — declarative shell-handler commands (same shape as\n// the existing kick.config.ts `commands` field).\n// • register() — programmatic commander registration. Called with\n// `(program, ctx)` so the callback has cwd + config\n// without re-loading.\n// • typegens[] — TypegenPlugin instances that `kick typegen` runs\n// after the legacy pass.\n// • generators[] — `kick g <name>` scaffolders (defineGenerator).\n// Replaces the `package.json > kickjs.generators`\n// discovery; that path stays as a deprecated\n// fallback for one minor version.\n//\n// Mirrors `definePlugin` / `defineAdapter` factory parity so adopters\n// don't have to learn a new helper-naming convention.\n\nimport type { Command } from 'commander'\n\nimport type { TypegenPlugin } from '../typegen/plugin'\nimport type { KickCommandDefinition, KickConfig } from '../config'\nimport type { GeneratorSpec } from '../generator-extension/define'\n\n/**\n * Runtime context handed to `register()` — saves callbacks from\n * re-loading config or guessing cwd. Forward-compatible: future fields\n * land here without changing the callback signature.\n */\nexport interface KickCliPluginContext {\n cwd: string\n /** Resolved kick.config.ts (null if the project has none). */\n config: KickConfig | null\n log: (msg: string) => void\n}\n\nexport interface KickCliPlugin {\n /** Stable identifier — used in error messages on conflict + de-dup. */\n name: string\n commands?: KickCommandDefinition[]\n /** Programmatic command registration. Called once at CLI startup. */\n register?: (program: Command, ctx: KickCliPluginContext) => void | Promise<void>\n typegens?: TypegenPlugin[]\n generators?: GeneratorSpec[]\n}\n\n/** Identity helper — exists for type inference + parity with definePlugin. */\nexport function defineCliPlugin(p: KickCliPlugin): KickCliPlugin {\n return p\n}\n\nexport class KickPluginConflictError extends Error {\n constructor(kind: 'plugin' | 'command' | 'typegen' | 'generator', id: string, owners: string[]) {\n super(\n `Two plugins registered the same ${kind} '${id}': ${owners.join(', ')}. ` +\n `Plugins must use unique ${kind} names.`,\n )\n this.name = 'KickPluginConflictError'\n }\n}\n"],"mappings":";;;;;;;;;;AAsDA,SAAgB,EAAgB,EAAiC,CAC/D,OAAO,EAGT,IAAa,EAAb,cAA6C,KAAM,CACjD,YAAY,EAAsD,EAAY,EAAkB,CAC9F,MACE,mCAAmC,EAAK,IAAI,EAAG,KAAK,EAAO,KAAK,KAAK,CAAC,4BACzC,EAAK,SACnC,CACD,KAAK,KAAO"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forinda/kickjs-cli",
3
- "version": "5.3.0",
3
+ "version": "5.4.0",
4
4
  "description": "CLI for KickJS — project scaffolding, DDD module generation, dev/build/start",
5
5
  "keywords": [
6
6
  "kickjs",
@@ -69,8 +69,8 @@
69
69
  "oxfmt": "^0.47.0",
70
70
  "picocolors": "^1.1.1",
71
71
  "pluralize": "^8.0.0",
72
- "@forinda/kickjs": "5.4.0",
73
- "@forinda/kickjs-db": "5.3.0"
72
+ "@forinda/kickjs": "5.5.0",
73
+ "@forinda/kickjs-db": "5.4.1"
74
74
  },
75
75
  "devDependencies": {
76
76
  "@swc/core": "^1.15.33",
@@ -82,7 +82,7 @@
82
82
  "vite": "^8.0.9",
83
83
  "vitest": "^4.1.5",
84
84
  "@forinda/kickjs-ai": "5.2.1",
85
- "@forinda/kickjs-db-pg": "6.0.0"
85
+ "@forinda/kickjs-db-pg": "7.0.1"
86
86
  },
87
87
  "publishConfig": {
88
88
  "access": "public"