@forinda/kickjs-cli 6.7.0 → 6.9.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 (48) hide show
  1. package/dist/agent-docs-BEaN-yVq.mjs +11 -0
  2. package/dist/{agent-docs-tlau7tZv.mjs → agent-docs-NyyqHAxw.mjs} +3 -3
  3. package/dist/{agent-docs-tlau7tZv.mjs.map → agent-docs-NyyqHAxw.mjs.map} +1 -1
  4. package/dist/{build-CDi72mKz.mjs → build-CNy9rla8.mjs} +3 -3
  5. package/dist/{build-CDi72mKz.mjs.map → build-CNy9rla8.mjs.map} +1 -1
  6. package/dist/build-DBdGEMiZ.mjs +12 -0
  7. package/dist/builtins-DR3wYkm4.mjs +1498 -0
  8. package/dist/{builtins-BiTg6p4D.mjs → builtins-epL6Z9Me.mjs} +2 -2
  9. package/dist/cli.mjs +2 -2838
  10. package/dist/config-BQy8iVib.mjs +12 -0
  11. package/dist/{config-D6C74vFp.mjs → config-BnGHE669.mjs} +3 -3
  12. package/dist/{config-D6C74vFp.mjs.map → config-BnGHE669.mjs.map} +1 -1
  13. package/dist/{doctor-BHnei8KS.mjs → doctor-26f-Bu4P.mjs} +29 -28
  14. package/dist/doctor-26f-Bu4P.mjs.map +1 -0
  15. package/dist/{fullstack-Cmedpn8G.mjs → fullstack-CeSmhGE2.mjs} +4 -4
  16. package/dist/{fullstack-Cmedpn8G.mjs.map → fullstack-CeSmhGE2.mjs.map} +1 -1
  17. package/dist/{fullstack-e-wuEMD0.mjs → fullstack-DUPLtANA.mjs} +3 -3
  18. package/dist/index.d.mts +48 -3
  19. package/dist/index.d.mts.map +1 -1
  20. package/dist/index.mjs +2 -3
  21. package/dist/plugin-C3PeTJQb.mjs +11 -0
  22. package/dist/{plugin-BlWy4Nbd.mjs → plugin-RBStrEDQ.mjs} +3 -3
  23. package/dist/{plugin-BlWy4Nbd.mjs.map → plugin-RBStrEDQ.mjs.map} +1 -1
  24. package/dist/{project-CnU7KcYI.mjs → project-DxcX4ryE.mjs} +6 -6
  25. package/dist/{project-CnU7KcYI.mjs.map → project-DxcX4ryE.mjs.map} +1 -1
  26. package/dist/project-Op2Qt1bv.mjs +389 -0
  27. package/dist/{project-docs-BV-h5EmP.mjs → project-docs-BQ022LVW.mjs} +47 -11
  28. package/dist/project-docs-BQ022LVW.mjs.map +1 -0
  29. package/dist/project-docs-uEIleRls.mjs +928 -0
  30. package/dist/{project-root-CdqXle6R.mjs → project-root-BifjB5PL.mjs} +3 -3
  31. package/dist/{project-root-CdqXle6R.mjs.map → project-root-BifjB5PL.mjs.map} +1 -1
  32. package/dist/project-root-CtnL9FBb.mjs +11 -0
  33. package/dist/{prompts-D7bKHNce.mjs → prompts-j1nmMgAf.mjs} +2 -2
  34. package/dist/{prompts-D7bKHNce.mjs.map → prompts-j1nmMgAf.mjs.map} +1 -1
  35. package/dist/{rolldown-runtime-DiP_G7eI.mjs → rolldown-runtime-DOk7ha8c.mjs} +1 -1
  36. package/dist/{run-plugins-C5kGYAsD.mjs → run-plugins-BouWvZvo.mjs} +79 -66
  37. package/dist/run-plugins-BouWvZvo.mjs.map +1 -0
  38. package/dist/typegen-DRSOapGb.mjs +114 -0
  39. package/dist/typegen-DRSOapGb.mjs.map +1 -0
  40. package/dist/typegen-b-Siu3FR.mjs +113 -0
  41. package/dist/{types-BNOSmSFj.mjs → types-DSOcCoe_.mjs} +1 -1
  42. package/package.json +5 -5
  43. package/dist/doctor-BHnei8KS.mjs.map +0 -1
  44. package/dist/index.mjs.map +0 -1
  45. package/dist/project-docs-BV-h5EmP.mjs.map +0 -1
  46. package/dist/run-plugins-C5kGYAsD.mjs.map +0 -1
  47. package/dist/typegen-qeQ5co2C.mjs +0 -114
  48. package/dist/typegen-qeQ5co2C.mjs.map +0 -1
package/dist/index.d.mts CHANGED
@@ -1,5 +1,6 @@
1
1
 
2
2
  import { GeneratorArg, GeneratorContext, GeneratorFile, GeneratorFlag, GeneratorSpec, KickCliPlugin as KickCliPlugin$1, KickCliPluginContext as KickCliPluginContext$1, KickPluginConflictError, defineCliPlugin, defineGenerator } from "@forinda/kickjs-cli-kit";
3
+ import "commander";
3
4
  //#region src/commands/add.d.ts
4
5
  type AppRuntime = 'express' | 'fastify' | 'h3';
5
6
  //#endregion
@@ -23,7 +24,13 @@ type AppRuntime = 'express' | 'fastify' | 'h3';
23
24
  interface DoctorContext {
24
25
  cwd: string;
25
26
  pkg: any | null;
26
- tsconfig: any | null;
27
+ /**
28
+ * The project's tsconfig with its full `extends` chain already merged
29
+ * into `compilerOptions`. `undefined` = no tsconfig.json; `null` = one
30
+ * exists but couldn't be parsed. Checks should distinguish the two —
31
+ * they call for different advice.
32
+ */
33
+ tsconfig: any | null | undefined;
27
34
  /**
28
35
  * The project's HTTP runtime — from kick.config `runtime`, else sniffed from
29
36
  * deps, else `express`. Lets engine-aware checks (engine peers, the upload
@@ -892,6 +899,31 @@ interface DiscoveredRoute {
892
899
  * against real URLs. Optional for old fixtures; falls back to `path`.
893
900
  */
894
901
  mountedPath?: string;
902
+ /**
903
+ * Every decorator applied to this route's method or its controller
904
+ * class, minus the HTTP verb decorators. Unclassified on purpose — the
905
+ * join phase decides which are context contributors, which are known
906
+ * framework decorators, and which are unrecognised (and therefore make
907
+ * the route's key set unprovable).
908
+ */
909
+ appliedDecorators?: DecoratorRef[];
910
+ /**
911
+ * Union of context keys proven populated for this route, or `null` when
912
+ * completeness could not be established. `null` is emitted as `string`
913
+ * (no narrowing) — never as an empty union, which would wrongly reject
914
+ * every `ctx.require()` call on the route.
915
+ */
916
+ contextKeys?: string[] | null;
917
+ }
918
+ /** A decorator as written at a call site, with its import resolved. */
919
+ interface DecoratorRef {
920
+ /** The decorator's local binding name, e.g. `LoadTenant`. */
921
+ identifier: string;
922
+ /**
923
+ * Module specifier it was imported from; `''` when declared in the same
924
+ * file, `null` when the binding could not be resolved at all.
925
+ */
926
+ source: string | null;
895
927
  }
896
928
  /** A statically-resolved schema identifier reference */
897
929
  interface SchemaRef {
@@ -973,6 +1005,18 @@ interface DiscoveredPluginOrAdapter {
973
1005
  interface DiscoveredContextKey {
974
1006
  /** The literal `key:` value the contributor writes. */
975
1007
  key: string;
1008
+ /**
1009
+ * The binding the decorator was assigned to — `LoadTenant` for
1010
+ * `export const LoadTenant = defineHttpContextDecorator({ key: 'tenant' })`.
1011
+ *
1012
+ * `null` when the call isn't a simple `const X = …` initialiser (inline
1013
+ * in an array, returned from a factory, …). Needed to map an applied
1014
+ * `@LoadTenant` decorator back to the key it populates, which is what
1015
+ * lets per-route context-key narrowing work at all; a `null` binding
1016
+ * simply can't be resolved from a decorator site, so routes using it
1017
+ * degrade to unnarrowed rather than guessing.
1018
+ */
1019
+ exportName: string | null;
976
1020
  /** Absolute file path. */
977
1021
  filePath: string;
978
1022
  /** Path relative to scan root, with forward slashes. */
@@ -1132,7 +1176,7 @@ interface TypegenPlugin {
1132
1176
  }
1133
1177
  interface TypegenPluginResult {
1134
1178
  id: string;
1135
- status: 'written' | 'unchanged' | 'skipped' | 'error';
1179
+ status: 'written' | 'unchanged' | 'skipped' | 'error' | 'drifted';
1136
1180
  outFile?: string;
1137
1181
  }
1138
1182
  /**
@@ -1278,7 +1322,8 @@ interface RunTypegenOptions {
1278
1322
  */
1279
1323
  declare function runTypegen(opts?: RunTypegenOptions): Promise<{
1280
1324
  scan: ScanResult;
1281
- result: GenerateResult; /** Token convention warnings — empty when every literal matches §22.2. */
1325
+ result: GenerateResult;
1326
+ /** Token convention warnings — empty when every literal matches §22.2. */
1282
1327
  tokenWarnings: TokenConventionWarning[];
1283
1328
  }>;
1284
1329
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../src/commands/add.ts","../src/commands/doctor.ts","../src/plugin/types.ts","../src/config.ts","../src/generators/templates/types.ts","../src/generators/module.ts","../src/generators/adapter.ts","../src/generators/middleware.ts","../src/generators/guard.ts","../src/generators/service.ts","../src/generators/controller.ts","../src/generators/dto.ts","../src/generators/project.ts","../src/utils/project-root.ts","../src/typegen/scanner.ts","../src/typegen/plugin.ts","../src/typegen/token-conventions.ts","../src/typegen/index.ts","../src/typegen/run-plugins.ts","../src/asset-manager/build.ts","../src/typegen/dev-watcher.ts","../src/generator-extension/discover.ts","../src/generator-extension/context.ts","../src/utils/naming.ts"],"mappings":";;;KA4OY,UAAA;;;;;AAAZ;;;;AAAsB;;;;ACjNtB;;;;;;UAAiB,aAAA;EACf,GAAA;EACA,GAAA;EACA,QAAA;EAMmB;AAGrB;;;;EAHE,OAAA,EAAS,UAAU;AAAA;AAAA,UAGJ,YAAA;EAOf;EALA,IAAA;EACA,MAAA;EAOU;EALV,OAAA;;EAEA,GAAA;AAAA;AAAA,KAGU,WAAA,IACV,GAAA,EAAK,aAAA,KACF,YAAA,GAAe,YAAA,YAAwB,OAAA,CAAQ,YAAA,GAAe,YAAA;;;;;;UAOlD,eAAA;EARf;EAUA,MAAA,GAAS,WAAW;AAAA;;;;;AATyD;AAO/E;;;;AAEsB;AAqCtB;;;;;;;;AAA4E;AA0B5E;;;;;;;;AAAkE;;;;AC1FlE;;;iBDgEgB,qBAAA,CAAsB,GAAA,EAAK,eAAA,GAAkB,eAAe;AChEX;AAGjE;;;;AAAmD;;;;AC7BnD;;;;;;;;;AAeS;AAIT;;;ADOiE,iBD0FjD,iBAAA,CAAkB,KAAA,EAAO,WAAA,GAAc,WAAW;;;;KC1FtD,oBAAA,GAAuB,sBAAmB,CAAC,UAAA;;KAG3C,aAAA,GAAgB,eAAY,CAAC,UAAA;;;;UC7BxB,qBAAA;;EAEf,IAAA;EHmOoB;EGjOpB,WAAA;EHiOoB;AAAA;;;;ACjNtB;;;EEPE,KAAA;EFQA;EENA,OAAA;AAAA;;KAIU,cAAA;;KAGA,cAAA;;;;;;;;;AFiBP;KEJO,iBAAA;;UA2BK,cAAA;EACf,IAAI;AAAA;;KAIM,cAAA,GAAiB,iBAAA,GAAkB,cAAc;AFhB7D;;;;AAEsB;AAqCtB;;;;;AAvCA,KE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rB;;;EmBiBE,WAAA,GAAc,OAAA;EnBfd;;;;;EmBqBA,cAAA;EnBbU;EmBeV,UAAA;;EAEA,QAAA,GAAW,kBAAkB;AAAA;AAAA,UAGd,iBAAA;EnBlBmC;EmBoBlD,gBAAA,CAAiB,KAAA,EAAO,iBAAiB,EAAE,IAAA;EnBpBD;;;;EmByB1C,OAAA;EnBzBG;;;;;EmB+BH,aAAA;EnB/B6E;EmBiC7E,OAAA;AAAA;AAAA,iBAGc,uBAAA,CAAwB,IAAA,EAAM,wBAAA,GAA2B,iBAAiB;;;;;;ApBqJ1F;;UqBhOiB,mBAAA;EACf,MAAA;EACA,IAAA,EAAM,aAAa;AAAA;;;ApBarB;;;UoBLiB,eAAA;EACf,UAAA,EAAY,mBAAA;EpBMZ;EoBJA,MAAA;EpBWA;;;AAAmB;EoBNnB,MAAA,EAAQ,KAAK;IAAG,MAAA;IAAgB,MAAA;EAAA;AAAA;;;;;;ArB8MlC;;;iBsB3NgB,qBAAA,CAAsB,KAAA;EACpC,IAAA;EACA,IAAA;EACA,KAAA,GAAQ,MAAA;EACR,UAAA;EACA,GAAA;ErBK4B;;;;;;EqBE5B,WAAA;EACA,SAAA;AAAA,IACE,gBAAgB;;;;iBC5BJ,YAAA,CAAa,IAAY;;iBAOzB,WAAA,CAAY,IAAY;AvBkOxC;AAAA,iBuB5NgB,WAAA,CAAY,IAAY;;;AvB4NlB;;;iBuBhNN,SAAA,CAAU,IAAY"}
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../src/commands/add.ts","../src/commands/doctor.ts","../src/plugin/types.ts","../src/config.ts","../src/generators/templates/types.ts","../src/generators/module.ts","../src/generators/adapter.ts","../src/generators/middleware.ts","../src/generators/guard.ts","../src/generators/service.ts","../src/generators/controller.ts","../src/generators/dto.ts","../src/generators/project.ts","../src/utils/project-root.ts","../src/typegen/scanner.ts","../src/typegen/plugin.ts","../src/typegen/token-conventions.ts","../src/typegen/index.ts","../src/typegen/run-plugins.ts","../src/asset-manager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 +1,5 @@
1
1
  /**
2
- * @forinda/kickjs-cli v6.7.0
2
+ * @forinda/kickjs-cli v6.9.0
3
3
  *
4
4
  * Copyright (c) Felix Orinda
5
5
  *
@@ -8,5 +8,4 @@
8
8
  *
9
9
  * @license MIT
10
10
  */
11
- import{M as e,N as t,c as n,d as r,f as i,g as a,j as o,k as s,l as c,m as l,n as u,o as d,p as f,s as p,t as m,u as h,y as g}from"./doctor-BHnei8KS.mjs";import{t as _}from"./project-CnU7KcYI.mjs";import{i as v,r as y}from"./config-D6C74vFp.mjs";import{t as b}from"./project-root-CdqXle6R.mjs";import{n as x,t as S}from"./types-BNOSmSFj.mjs";function C(e){return e}export{S as KickPluginConflictError,n as TYPEGEN_OWNER_KEY,d as buildGeneratorContext,c as createTypegenDevWatcher,x as defineCliPlugin,y as defineConfig,m as defineDoctorCheck,u as defineDoctorExtension,p as defineGenerator,C as defineTypegen,b as findProjectRoot,a as generateAdapter,r as generateController,h as generateDto,f as generateGuard,l as generateMiddleware,g as generateModule,i as generateService,_ as initProject,v as loadKickConfig,s as pluralize,o as toCamelCase,e as toKebabCase,t as toPascalCase};
12
- //# sourceMappingURL=index.mjs.map
11
+ import{F as e,N as t,P as n,c as r,d as i,f as a,g as o,h as s,j as c,l,m as u,n as d,o as f,p,s as m,t as h,v as g,x as _}from"./doctor-26f-Bu4P.mjs";import{t as v}from"./project-DxcX4ryE.mjs";import{i as y,r as b}from"./config-BnGHE669.mjs";import{t as x}from"./project-root-BifjB5PL.mjs";import{n as S,t as C}from"./types-DSOcCoe_.mjs";export{C as KickPluginConflictError,r as TYPEGEN_OWNER_KEY,f as buildGeneratorContext,l as createTypegenDevWatcher,S as defineCliPlugin,b as defineConfig,h as defineDoctorCheck,d as defineDoctorExtension,m as defineGenerator,i as defineTypegen,x as findProjectRoot,g as generateAdapter,p as generateController,a as generateDto,s as generateGuard,o as generateMiddleware,_ as generateModule,u as generateService,v as initProject,y as loadKickConfig,c as pluralize,t as toCamelCase,n as toKebabCase,e as toPascalCase};
@@ -0,0 +1,11 @@
1
+ /**
2
+ * @forinda/kickjs-cli v6.9.0
3
+ *
4
+ * Copyright (c) Felix Orinda
5
+ *
6
+ * This source code is licensed under the MIT license found in the
7
+ * LICENSE file in the root directory of this source tree.
8
+ *
9
+ * @license MIT
10
+ */
11
+ import{t as e}from"./rolldown-runtime-DOk7ha8c.mjs";import{KickPluginConflictError as t,defineCliPlugin as n}from"@forinda/kickjs-cli-kit";function r(e,n=[]){let r=new Map;for(let n of e){let e=(r.get(n.name)??0)+1;if(r.set(n.name,e),e===2)throw new t(`plugin`,n.name,[n.name,n.name])}let i=new Map,a=[];for(let n of e)for(let e of n.commands??[]){let r=i.get(e.name);if(r)throw new t(`command`,e.name,[r,n.name]);i.set(e.name,n.name),a.push(e)}let o=new Set(n.map(e=>e.name)),s=[...a.filter(e=>!o.has(e.name)),...n],c=new Map,l=[];for(let n of e)for(let e of n.typegens??[]){let r=c.get(e.id);if(r)throw new t(`typegen`,e.id,[r,n.name]);c.set(e.id,n.name),l.push(e)}let u=new Map,d=[];for(let n of e)for(let e of n.generators??[]){let r=u.get(e.name);if(r)throw new t(`generator`,e.name,[r,n.name]);u.set(e.name,n.name),d.push({source:n.name,spec:e})}return{commands:s,typegens:l,generators:d,register:async(t,n)=>{let r;if(n)r={generators:d,...n};else{let{findProjectRoot:e}=await import(`./project-root-CtnL9FBb.mjs`).then(e=>e.n),t=process.cwd();r={cwd:t,projectRoot:e(t),config:null,log:()=>{},generators:d}}for(let n of e)n.register&&await n.register(t,r)}}}var i=e({mergeCliPlugins:()=>r});export{r as n,n as r,i as t};
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @forinda/kickjs-cli v6.7.0
2
+ * @forinda/kickjs-cli v6.9.0
3
3
  *
4
4
  * Copyright (c) Felix Orinda
5
5
  *
@@ -8,5 +8,5 @@
8
8
  *
9
9
  * @license MIT
10
10
  */
11
- import{t as e}from"./rolldown-runtime-DiP_G7eI.mjs";import{t}from"./types-BNOSmSFj.mjs";function n(e,n=[]){let r=new Map;for(let n of e){let e=(r.get(n.name)??0)+1;if(r.set(n.name,e),e===2)throw new t(`plugin`,n.name,[n.name,n.name])}let i=new Map,a=[];for(let n of e)for(let e of n.commands??[]){let r=i.get(e.name);if(r)throw new t(`command`,e.name,[r,n.name]);i.set(e.name,n.name),a.push(e)}let o=new Set(n.map(e=>e.name)),s=[...a.filter(e=>!o.has(e.name)),...n],c=new Map,l=[];for(let n of e)for(let e of n.typegens??[]){let r=c.get(e.id);if(r)throw new t(`typegen`,e.id,[r,n.name]);c.set(e.id,n.name),l.push(e)}let u=new Map,d=[];for(let n of e)for(let e of n.generators??[]){let r=u.get(e.name);if(r)throw new t(`generator`,e.name,[r,n.name]);u.set(e.name,n.name),d.push({source:n.name,spec:e})}return{commands:s,typegens:l,generators:d,register:async(t,n)=>{let r;if(n)r={generators:d,...n};else{let{findProjectRoot:e}=await import(`./project-root-CdqXle6R.mjs`).then(e=>e.n),t=process.cwd();r={cwd:t,projectRoot:e(t),config:null,log:()=>{},generators:d}}for(let n of e)n.register&&await n.register(t,r)}}}var r=e({mergeCliPlugins:()=>n});export{n,r as t};
12
- //# sourceMappingURL=plugin-BlWy4Nbd.mjs.map
11
+ import{t as e}from"./rolldown-runtime-DOk7ha8c.mjs";import{t}from"./types-DSOcCoe_.mjs";function n(e,n=[]){let r=new Map;for(let n of e){let e=(r.get(n.name)??0)+1;if(r.set(n.name,e),e===2)throw new t(`plugin`,n.name,[n.name,n.name])}let i=new Map,a=[];for(let n of e)for(let e of n.commands??[]){let r=i.get(e.name);if(r)throw new t(`command`,e.name,[r,n.name]);i.set(e.name,n.name),a.push(e)}let o=new Set(n.map(e=>e.name)),s=[...a.filter(e=>!o.has(e.name)),...n],c=new Map,l=[];for(let n of e)for(let e of n.typegens??[]){let r=c.get(e.id);if(r)throw new t(`typegen`,e.id,[r,n.name]);c.set(e.id,n.name),l.push(e)}let u=new Map,d=[];for(let n of e)for(let e of n.generators??[]){let r=u.get(e.name);if(r)throw new t(`generator`,e.name,[r,n.name]);u.set(e.name,n.name),d.push({source:n.name,spec:e})}return{commands:s,typegens:l,generators:d,register:async(t,n)=>{let r;if(n)r={generators:d,...n};else{let{findProjectRoot:e}=await import(`./project-root-BifjB5PL.mjs`).then(e=>e.n),t=process.cwd();r={cwd:t,projectRoot:e(t),config:null,log:()=>{},generators:d}}for(let n of e)n.register&&await n.register(t,r)}}}var r=e({mergeCliPlugins:()=>n});export{n,r as t};
12
+ //# sourceMappingURL=plugin-RBStrEDQ.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"plugin-BlWy4Nbd.mjs","names":[],"sources":["../src/plugin/merge.ts","../src/plugin/index.ts"],"sourcesContent":["// Plugin → unified registry merge.\n//\n// Resolution rules (per the v1 spec + dogfood pivot):\n// - duplicate plugin `name` across the input array → conflict error.\n// Catches the double-install case (built-in shipped twice, or\n// adopter requiring the same plugin twice).\n// - plugin commands appear first in the merged list, then adopter\n// commands; adopter `commands` of the same name override the\n// plugin entry (filter pass).\n// - duplicate command name across two plugins → conflict error\n// listing both plugin names. Adopter overriding a plugin is\n// allowed and not an error.\n// - duplicate typegen id across two plugins → same error. Typegens\n// have no adopter override path; only plugins contribute them.\n// - register() functions are collected in input order; the caller\n// invokes each one against the same Command program. They have no\n// id-level conflict surface — owners are responsible for picking\n// non-colliding command names inside their own register().\n// - plugin order = array order. No implicit precedence rules.\n\nimport type { Command } from 'commander'\n\nimport type { KickCommandDefinition } from '../config'\nimport type { TypegenPlugin } from '../typegen/plugin'\nimport type { GeneratorSpec } from '../generator-extension/define'\nimport type { DiscoveredGenerator } from '../generator-extension/discover'\nimport { KickPluginConflictError, type KickCliPlugin, type KickCliPluginContext } from './types'\n\nexport interface MergedPlugins {\n commands: KickCommandDefinition[]\n typegens: TypegenPlugin[]\n /** DiscoveredGenerator shape so this list slots into the existing\n * dispatch path next to package.json-discovered entries. `source`\n * carries the plugin name for error attribution. */\n generators: DiscoveredGenerator[]\n /**\n * Apply every plugin's register() in input order. ctx is optional so\n * tests + lightweight callers can invoke `register(program)` without\n * constructing a full context; it falls back to cwd=process.cwd(),\n * config=null, log=no-op.\n */\n register: (program: Command, ctx?: KickCliPluginContext) => Promise<void>\n}\n\nexport function mergeCliPlugins(\n plugins: readonly KickCliPlugin[],\n adopterCommands: readonly KickCommandDefinition[] = [],\n): MergedPlugins {\n // Plugin-name dedup — catches double-install.\n const seenPluginNames = new Map<string, number>()\n for (const p of plugins) {\n const count = (seenPluginNames.get(p.name) ?? 0) + 1\n seenPluginNames.set(p.name, count)\n if (count === 2) {\n throw new KickPluginConflictError('plugin', p.name, [p.name, p.name])\n }\n }\n\n const commandOwners = new Map<string, string>()\n const pluginCommands: KickCommandDefinition[] = []\n for (const p of plugins) {\n for (const cmd of p.commands ?? []) {\n const prior = commandOwners.get(cmd.name)\n if (prior) {\n throw new KickPluginConflictError('command', cmd.name, [prior, p.name])\n }\n commandOwners.set(cmd.name, p.name)\n pluginCommands.push(cmd)\n }\n }\n\n const adopterNames = new Set(adopterCommands.map((c) => c.name))\n const filteredPlugin = pluginCommands.filter((c) => !adopterNames.has(c.name))\n const commands = [...filteredPlugin, ...adopterCommands]\n\n const typegenOwners = new Map<string, string>()\n const typegens: TypegenPlugin[] = []\n for (const p of plugins) {\n for (const tg of p.typegens ?? []) {\n const prior = typegenOwners.get(tg.id)\n if (prior) {\n throw new KickPluginConflictError('typegen', tg.id, [prior, p.name])\n }\n typegenOwners.set(tg.id, p.name)\n typegens.push(tg)\n }\n }\n\n const generatorOwners = new Map<string, string>()\n const generators: DiscoveredGenerator[] = []\n for (const p of plugins) {\n for (const spec of p.generators ?? []) {\n const prior = generatorOwners.get(spec.name)\n if (prior) {\n throw new KickPluginConflictError('generator', spec.name, [prior, p.name])\n }\n generatorOwners.set(spec.name, p.name)\n generators.push({ source: p.name, spec: spec satisfies GeneratorSpec })\n }\n }\n\n /**\n * Apply every plugin's `register()` callback in input order against the\n * given Commander program. Each callback receives a {@link KickCliPluginContext}:\n * caller-supplied ctx wins (test fixtures can inject a different\n * workspace boundary); otherwise a default ctx is built with\n * `findProjectRoot(process.cwd())` as the project root, `cwd` matching\n * `process.cwd()`, null config, no-op log, and the merged generator set\n * threaded through so the `kick/generate` built-in can surface each as\n * a Commander subcommand. The dynamic import of `findProjectRoot` keeps\n * the caller-supplied fast path zero-cost.\n */\n const register = async (program: Command, ctx?: KickCliPluginContext): Promise<void> => {\n let resolved: KickCliPluginContext\n if (ctx) {\n resolved = { generators, ...ctx }\n } else {\n const { findProjectRoot } = await import('../utils/project-root')\n const cwd = process.cwd()\n resolved = {\n cwd,\n projectRoot: findProjectRoot(cwd),\n config: null,\n log: () => {},\n generators,\n }\n }\n for (const p of plugins) {\n if (p.register) await p.register(program, resolved)\n }\n }\n\n return { commands, typegens, generators, register }\n}\n","// Barrel intentionally omits `./builtins` — that module top-level-imports\n// every register*Command, which pulls heavy modules (project scaffolders,\n// fs reads at import time) into the graph. Importers that need the\n// builtin list go through `./plugin/builtins` directly; tests + adopter\n// plugins consuming only the contract types import from here.\n\nexport type { KickCliPlugin } from './types'\nexport { defineCliPlugin, KickPluginConflictError } from './types'\nexport { mergeCliPlugins, type MergedPlugins } from './merge'\n"],"mappings":";;;;;;;;;;wFA4CA,SAAgB,EACd,EACA,EAAoD,CAAC,EACtC,CAEf,IAAM,EAAkB,IAAI,IAC5B,IAAK,IAAM,KAAK,EAAS,CACvB,IAAM,GAAS,EAAgB,IAAI,EAAE,IAAI,GAAK,GAAK,EAEnD,GADA,EAAgB,IAAI,EAAE,KAAM,CAAK,EAC7B,IAAU,EACZ,MAAM,IAAI,EAAwB,SAAU,EAAE,KAAM,CAAC,EAAE,KAAM,EAAE,IAAI,CAAC,CAExE,CAEA,IAAM,EAAgB,IAAI,IACpB,EAA0C,CAAC,EACjD,IAAK,IAAM,KAAK,EACd,IAAK,IAAM,KAAO,EAAE,UAAY,CAAC,EAAG,CAClC,IAAM,EAAQ,EAAc,IAAI,EAAI,IAAI,EACxC,GAAI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,EAAgB,CAAG,EAChC,OAAQ,KACR,QAAW,CAAC,EACZ,YACF,CACF,CACA,IAAK,IAAM,KAAK,EACV,EAAE,UAAU,MAAM,EAAE,SAAS,EAAS,CAAQ,CAEtD,CAEkD,CACpD"}
1
+ {"version":3,"file":"plugin-RBStrEDQ.mjs","names":[],"sources":["../src/plugin/merge.ts","../src/plugin/index.ts"],"sourcesContent":["// Plugin → unified registry merge.\n//\n// Resolution rules (per the v1 spec + dogfood pivot):\n// - duplicate plugin `name` across the input array → conflict error.\n// Catches the double-install case (built-in shipped twice, or\n// adopter requiring the same plugin twice).\n// - plugin commands appear first in the merged list, then adopter\n// commands; adopter `commands` of the same name override the\n// plugin entry (filter pass).\n// - duplicate command name across two plugins → conflict error\n// listing both plugin names. Adopter overriding a plugin is\n// allowed and not an error.\n// - duplicate typegen id across two plugins → same error. Typegens\n// have no adopter override path; only plugins contribute them.\n// - register() functions are collected in input order; the caller\n// invokes each one against the same Command program. They have no\n// id-level conflict surface — owners are responsible for picking\n// non-colliding command names inside their own register().\n// - plugin order = array order. No implicit precedence rules.\n\nimport type { Command } from 'commander'\n\nimport type { KickCommandDefinition } from '../config'\nimport type { TypegenPlugin } from '../typegen/plugin'\nimport type { GeneratorSpec } from '../generator-extension/define'\nimport type { DiscoveredGenerator } from '../generator-extension/discover'\nimport { KickPluginConflictError, type KickCliPlugin, type KickCliPluginContext } from './types'\n\nexport interface MergedPlugins {\n commands: KickCommandDefinition[]\n typegens: TypegenPlugin[]\n /** DiscoveredGenerator shape so this list slots into the existing\n * dispatch path next to package.json-discovered entries. `source`\n * carries the plugin name for error attribution. */\n generators: DiscoveredGenerator[]\n /**\n * Apply every plugin's register() in input order. ctx is optional so\n * tests + lightweight callers can invoke `register(program)` without\n * constructing a full context; it falls back to cwd=process.cwd(),\n * config=null, log=no-op.\n */\n register: (program: Command, ctx?: KickCliPluginContext) => Promise<void>\n}\n\nexport function mergeCliPlugins(\n plugins: readonly KickCliPlugin[],\n adopterCommands: readonly KickCommandDefinition[] = [],\n): MergedPlugins {\n // Plugin-name dedup — catches double-install.\n const seenPluginNames = new Map<string, number>()\n for (const p of plugins) {\n const count = (seenPluginNames.get(p.name) ?? 0) + 1\n seenPluginNames.set(p.name, count)\n if (count === 2) {\n throw new KickPluginConflictError('plugin', p.name, [p.name, p.name])\n }\n }\n\n const commandOwners = new Map<string, string>()\n const pluginCommands: KickCommandDefinition[] = []\n for (const p of plugins) {\n for (const cmd of p.commands ?? []) {\n const prior = commandOwners.get(cmd.name)\n if (prior) {\n throw new KickPluginConflictError('command', cmd.name, [prior, p.name])\n }\n commandOwners.set(cmd.name, p.name)\n pluginCommands.push(cmd)\n }\n }\n\n const adopterNames = new Set(adopterCommands.map((c) => c.name))\n const filteredPlugin = pluginCommands.filter((c) => !adopterNames.has(c.name))\n const commands = [...filteredPlugin, ...adopterCommands]\n\n const typegenOwners = new Map<string, string>()\n const typegens: TypegenPlugin[] = []\n for (const p of plugins) {\n for (const tg of p.typegens ?? []) {\n const prior = typegenOwners.get(tg.id)\n if (prior) {\n throw new KickPluginConflictError('typegen', tg.id, [prior, p.name])\n }\n typegenOwners.set(tg.id, p.name)\n typegens.push(tg)\n }\n }\n\n const generatorOwners = new Map<string, string>()\n const generators: DiscoveredGenerator[] = []\n for (const p of plugins) {\n for (const spec of p.generators ?? []) {\n const prior = generatorOwners.get(spec.name)\n if (prior) {\n throw new KickPluginConflictError('generator', spec.name, [prior, p.name])\n }\n generatorOwners.set(spec.name, p.name)\n generators.push({ source: p.name, spec: spec satisfies GeneratorSpec })\n }\n }\n\n /**\n * Apply every plugin's `register()` callback in input order against the\n * given Commander program. Each callback receives a {@link KickCliPluginContext}:\n * caller-supplied ctx wins (test fixtures can inject a different\n * workspace boundary); otherwise a default ctx is built with\n * `findProjectRoot(process.cwd())` as the project root, `cwd` matching\n * `process.cwd()`, null config, no-op log, and the merged generator set\n * threaded through so the `kick/generate` built-in can surface each as\n * a Commander subcommand. The dynamic import of `findProjectRoot` keeps\n * the caller-supplied fast path zero-cost.\n */\n const register = async (program: Command, ctx?: KickCliPluginContext): Promise<void> => {\n let resolved: KickCliPluginContext\n if (ctx) {\n resolved = { generators, ...ctx }\n } else {\n const { findProjectRoot } = await import('../utils/project-root')\n const cwd = process.cwd()\n resolved = {\n cwd,\n projectRoot: findProjectRoot(cwd),\n config: null,\n log: () => {},\n generators,\n }\n }\n for (const p of plugins) {\n if (p.register) await p.register(program, resolved)\n }\n }\n\n return { commands, typegens, generators, register }\n}\n","// Barrel intentionally omits `./builtins` — that module top-level-imports\n// every register*Command, which pulls heavy modules (project scaffolders,\n// fs reads at import time) into the graph. Importers that need the\n// builtin list go through `./plugin/builtins` directly; tests + adopter\n// plugins consuming only the contract types import from here.\n\nexport type { KickCliPlugin } from './types'\nexport { defineCliPlugin, KickPluginConflictError } from './types'\nexport { mergeCliPlugins, type MergedPlugins } from './merge'\n"],"mappings":";;;;;;;;;;wFA4CA,SAAgB,EACd,EACA,EAAoD,CAAC,EACtC,CAEf,IAAM,EAAkB,IAAI,IAC5B,IAAK,IAAM,KAAK,EAAS,CACvB,IAAM,GAAS,EAAgB,IAAI,EAAE,IAAI,GAAK,GAAK,EAEnD,GADA,EAAgB,IAAI,EAAE,KAAM,CAAK,EAC7B,IAAU,EACZ,MAAM,IAAI,EAAwB,SAAU,EAAE,KAAM,CAAC,EAAE,KAAM,EAAE,IAAI,CAAC,CAExE,CAEA,IAAM,EAAgB,IAAI,IACpB,EAA0C,CAAC,EACjD,IAAK,IAAM,KAAK,EACd,IAAK,IAAM,KAAO,EAAE,UAAY,CAAC,EAAG,CAClC,IAAM,EAAQ,EAAc,IAAI,EAAI,IAAI,EACxC,GAAI,EACF,MAAM,IAAI,EAAwB,UAAW,EAAI,KAAM,CAAC,EAAO,EAAE,IAAI,CAAC,EAExE,EAAc,IAAI,EAAI,KAAM,EAAE,IAAI,EAClC,EAAe,KAAK,CAAG,CACzB,CAGF,IAAM,EAAe,IAAI,IAAI,EAAgB,IAAK,GAAM,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ickjs-cli v6.7.0
2
+ * @forinda/kickjs-cli v6.9.0
3
3
  *
4
4
  * Copyright (c) Felix Orinda
5
5
  *
@@ -8,7 +8,7 @@
8
8
  *
9
9
  * @license MIT
10
10
  */
11
- import{l as e,o as t}from"./project-docs-BV-h5EmP.mjs";import{i as n,t as r}from"./config-D6C74vFp.mjs";import{dirname as i,join as a,resolve as o}from"node:path";import{existsSync as s,readFileSync as c}from"node:fs";import{execFileSync as l,execSync as u}from"node:child_process";import{fileURLToPath as d}from"node:url";const f={express:{from:`@forinda/kickjs`,name:`expressRuntime`},fastify:{from:`@forinda/kickjs/fastify`,name:`fastifyRuntime`},h3:{from:`@forinda/kickjs/h3`,name:`h3Runtime`}};function p(e,t,n,r=[],i=`express`){let a=f[i],o=i===`express`;switch(t){case`minimal`:{let t=[],i=[],s=o?`import { bootstrap, ${a.name} } from '@forinda/kickjs'`:`import { bootstrap } from '@forinda/kickjs'\nimport { ${a.name} } from '${a.from}'`;r.includes(`swagger`)&&(t.push(`import { SwaggerAdapter } from '@forinda/kickjs-swagger'`),i.push(` SwaggerAdapter({ info: { title: '${e}', version: '${n}' } }),`)),r.includes(`devtools`)&&(t.push(`import { DevToolsAdapter } from '@forinda/kickjs-devtools'`),i.push(` DevToolsAdapter(),`));let c=t.length?t.join(`
11
+ import{l as e,o as t}from"./project-docs-BQ022LVW.mjs";import{i as n,t as r}from"./config-BnGHE669.mjs";import{dirname as i,join as a,resolve as o}from"node:path";import{existsSync as s,readFileSync as c}from"node:fs";import{execFileSync as l,execSync as u}from"node:child_process";import{fileURLToPath as d}from"node:url";const f={express:{from:`@forinda/kickjs`,name:`expressRuntime`},fastify:{from:`@forinda/kickjs/fastify`,name:`fastifyRuntime`},h3:{from:`@forinda/kickjs/h3`,name:`h3Runtime`}};function p(e,t,n,r=[],i=`express`){let a=f[i],o=i===`express`;switch(t){case`minimal`:{let t=[],i=[],s=o?`import { bootstrap, ${a.name} } from '@forinda/kickjs'`:`import { bootstrap } from '@forinda/kickjs'\nimport { ${a.name} } from '${a.from}'`;r.includes(`swagger`)&&(t.push(`import { SwaggerAdapter } from '@forinda/kickjs-swagger'`),i.push(` SwaggerAdapter({ info: { title: '${e}', version: '${n}' } }),`)),r.includes(`devtools`)&&(t.push(`import { DevToolsAdapter } from '@forinda/kickjs-devtools'`),i.push(` DevToolsAdapter(),`));let c=t.length?t.join(`
12
12
  `)+`
13
13
  `:``,l=i.length?`,\n adapters: [\n${i.join(`
14
14
  `)}\n ]`:``;return`import 'reflect-metadata'
@@ -294,7 +294,7 @@ export default defineConfig({
294
294
  },
295
295
  ],
296
296
  })
297
- `}const b={swagger:`@forinda/kickjs-swagger`,ws:`@forinda/kickjs-ws`,queue:`@forinda/kickjs-queue`,devtools:`@forinda/kickjs-devtools`},x={zod:{name:`zod`,range:`^4.3.6`},valibot:{name:`valibot`,range:`^1.4.1`},yup:{name:`yup`,range:`^1.7.1`}};function S(e,t){let n=e[t];if(!n)throw Error(`generatePackageJson: missing resolved version for ${t}. Add it to SIBLING_PACKAGES in generators/project.ts.`);return n}function C(e,t,n,r=[],i=`zod`,a=`express`){let o=x[i],s={"@forinda/kickjs":S(n,`@forinda/kickjs`),"@forinda/kickjs-schema":S(n,`@forinda/kickjs-schema`),dotenv:`^17.3.1`,"reflect-metadata":`^0.2.2`,[o.name]:o.range};a===`express`?s.express=`^5.1.0`:a===`fastify`?(s.fastify=`^5.0.0`,s[`@fastify/middie`]=`^9.0.0`,s[`serve-static`]=`^2.2.0`):a===`h3`&&(s.h3=`^1.0.0`,s[`serve-static`]=`^2.2.0`);for(let e of r){let t=b[e];t&&!s[t]&&(s[t]=S(n,t))}return JSON.stringify({name:e,version:`0.0.0`,type:`module`,scripts:{dev:`kick dev`,"dev:debug":`kick dev:debug`,build:`kick build`,start:`kick start`,test:`vitest run`,"test:watch":`vitest`,typecheck:`tsc --noEmit`,typegen:`kick typegen`,lint:`eslint src/`,format:`prettier --write src/`},dependencies:s,devDependencies:{"@forinda/kickjs-cli":S(n,`@forinda/kickjs-cli`),"@forinda/kickjs-vite":S(n,`@forinda/kickjs-vite`),"@swc/core":`^1.15.21`,...a===`express`?{"@types/express":`^5.0.6`}:{},"@types/node":`^25.0.0`,"unplugin-swc":`^1.5.9`,vite:`^8.0.3`,vitest:`^4.1.2`,typescript:`^6.0.3`,prettier:`^3.8.1`}},null,2)}function w(){return`import { defineConfig } from 'vite'
297
+ `}const b={swagger:`@forinda/kickjs-swagger`,ws:`@forinda/kickjs-ws`,queue:`@forinda/kickjs-queue`,devtools:`@forinda/kickjs-devtools`},x={zod:{name:`zod`,range:`^4.3.6`},valibot:{name:`valibot`,range:`^1.4.1`},yup:{name:`yup`,range:`^1.7.1`}};function S(e,t){let n=e[t];if(!n)throw Error(`generatePackageJson: missing resolved version for ${t}. Add it to SIBLING_PACKAGES in generators/project.ts.`);return n}function C(e,t,n,r=[],i=`zod`,a=`express`){let o=x[i],s={"@forinda/kickjs":S(n,`@forinda/kickjs`),"@forinda/kickjs-schema":S(n,`@forinda/kickjs-schema`),dotenv:`^17.3.1`,"reflect-metadata":`^0.2.2`,[o.name]:o.range};a===`express`?s.express=`^5.1.0`:a===`fastify`?(s.fastify=`^5.0.0`,s[`@fastify/middie`]=`^9.0.0`,s[`serve-static`]=`^2.2.0`):a===`h3`&&(s.h3=`^1.0.0`,s[`serve-static`]=`^2.2.0`);for(let e of r){let t=b[e];t&&!s[t]&&(s[t]=S(n,t))}return JSON.stringify({name:e,version:`0.0.0`,type:`module`,scripts:{dev:`kick dev`,"dev:debug":`kick dev:debug`,build:`kick build`,start:`kick start`,test:`vitest run`,"test:watch":`vitest`,typecheck:`tsc --noEmit`,typegen:`kick typegen`,lint:`eslint src/`,format:`prettier --write src/`},dependencies:s,devDependencies:{"@forinda/kickjs-cli":S(n,`@forinda/kickjs-cli`),"@forinda/kickjs-vite":S(n,`@forinda/kickjs-vite`),"@swc/core":`^1.15.21`,...a===`express`?{"@types/express":`^5.0.6`}:{},"@types/node":`^25.0.0`,"unplugin-swc":`^1.5.9`,vite:`^8.0.3`,vitest:`^4.1.2`,typescript:`^7.0.2`,prettier:`^3.8.1`}},null,2)}function w(){return`import { defineConfig } from 'vite'
298
298
  import { resolve } from 'node:path'
299
299
  import swc from 'unplugin-swc'
300
300
  import { kickjsVitePlugin, envWatchPlugin } from '@forinda/kickjs-vite'
@@ -384,7 +384,7 @@ export default defineConfig({
384
384
  `);for(let e of i)console.log(a(e))}else console.log(`\n Plus ${i.length} optional packages (auth, swagger, db, queue, …).`),console.log(" Run `kick add --list --all` for the full catalog.");console.log(`
385
385
  Usage: kick add ai db swagger`),console.log(` kick add queue:bullmq`),console.log(` kick add upload # installs the multipart driver for your runtime`),console.log()}function W(e,t,n=`express`){let r=new Set,i=new Set,a=[],o=[],s=[];for(let c of e){if(c===`upload`){let e=F[n];s.push(`upload (${n}): ${e.note}`),e.prod&&(t?i:r).add(e.prod),e.dev&&i.add(e.dev);continue}let e=N[c];if(!e){a.push(c);continue}e.deprecated&&o.push(`'${c}' (${e.pkg}) is deprecated — ${e.deprecated}`);let l=t||e.dev?i:r;l.add(e.pkg);for(let t of e.peers)l.add(t)}return{prodDeps:[...r],devDeps:[...i],unknown:a,warnings:o,notices:s}}function G(e){e.command(`list`).alias(`ls`).description(`List KickJS packages (core only; pair with --all for the full catalog)`).option(`--all`,`Include the full optional catalog`).action(e=>{U(!!e.all)})}function K(e){e.command(`add [packages...]`).description(`Add KickJS packages with their required dependencies`).option(`--pm <manager>`,`Package manager override`).option(`-D, --dev`,`Install as dev dependency`).option(`--list`,`List packages (core only by default; pair with --all)`).option(`--all`,`When listing, include the full optional catalog`).action(async(e,t)=>{if(t.list||e.length===0){U(!!t.all);return}let{pm:n,source:r}=await V(t.pm);console.log(`\n Using ${n} (resolved from ${r})`);let i=await I(process.cwd()),{prodDeps:a,devDeps:o,unknown:s,warnings:c,notices:l}=W(e,!!t.dev,i);for(let e of c)console.warn(`\n WARNING: ${e}`);for(let e of l)console.log(`\n ${e}`);if(!(s.length>0&&(console.log(`\n Unknown packages: ${s.join(`, `)}`),console.log(` Run "kick add --list" to see available packages.
386
386
  `),a.length===0&&o.length===0))){if(a.length>0){let e=a,t=`${n} add ${e.join(` `)}`;console.log(`\n Installing ${e.length} dependency(ies):`);for(let t of e)console.log(` + ${t}`);console.log();try{u(t,{stdio:`inherit`})}catch{console.log(`\n Installation failed. Run manually:\n ${t}\n`)}}if(o.length>0){let e=o,t=`${n} add -D ${e.join(` `)}`;console.log(`\n Installing ${e.length} dev dependency(ies):`);for(let t of e)console.log(` + ${t} (dev)`);console.log();try{u(t,{stdio:`inherit`})}catch{console.log(`\n Installation failed. Run manually:\n ${t}\n`)}}console.log(` Done!
387
- `)}})}const q=i(d(import.meta.url)),J=JSON.parse(c(a(q,`..`,`package.json`),`utf-8`)),Y=`^${J.version}`,X=[`@forinda/kickjs`,`@forinda/kickjs-cli`,`@forinda/kickjs-schema`,`@forinda/kickjs-vite`,`@forinda/kickjs-swagger`,`@forinda/kickjs-ws`,`@forinda/kickjs-queue`,`@forinda/kickjs-devtools`,`@forinda/kickjs-testing`,`@forinda/kickjs-client`];async function Z(){let e=await Promise.all(X.map(async e=>{try{let t=l(`npm`,[`view`,e,`version`],{encoding:`utf-8`,timeout:5e3,stdio:[`ignore`,`pipe`,`ignore`]}).toString().trim();if(t&&/^\d+\.\d+\.\d+/.test(t))return[e,`^${t}`]}catch{}return[e,Y]}));return Object.fromEntries(e)}function Q(e,t){try{let n=l(`npm`,[`view`,`${e}@${t}`,`version`],{encoding:`utf-8`,timeout:5e3,stdio:[`ignore`,`pipe`,`ignore`]}).toString().trim();return n&&/^\d+\.\d+\.\d+/.test(n)?n:null}catch{return null}}function $(e){return(e??``).replace(/^[\^~>=<\s]+/,``)}function ee(e,t){let n=e=>$(e).split(`-`)[0].split(`.`).map(e=>Number.parseInt(e,10)||0),[r=0,i=0,a=0]=n(e),[o=0,s=0,c=0]=n(t);return r===o?i===s?a>=c:i>s:r>o}function te(e,t,n){try{let r=l(`npm`,[`view`,`${e}@${t}`,`exports`,`--json`],{encoding:`utf-8`,timeout:5e3,stdio:[`ignore`,`pipe`,`ignore`]}).toString().trim();if(!r)return!1;let i=JSON.parse(r);return Object.prototype.hasOwnProperty.call(i,n)}catch{return!1}}async function ne(n){let{name:r,directory:i,packageManager:o=`pnpm`,template:s=`rest`,defaultRepo:c=`inmemory`,packages:l=[],schemaLib:d=`zod`,runtime:f=`express`}=n,b=i,x=e=>console.log(` ${e}`);console.log(`\n Creating KickJS project: ${r}\n`),x(`Resolving package versions...`);let S=await Z();if(f!==`express`)if(te(`@forinda/kickjs`,`latest`,`./${f}`))x(`Using @forinda/kickjs@latest (stable ships the ${f} runtime)`);else{let e=[`@forinda/kickjs`,`@forinda/kickjs-cli`,`@forinda/kickjs-vite`],t=[],n=!1;for(let r of e){let e=Q(r,`alpha`);e&&ee(e,$(S[r]))&&(S[r]=`^${e}`,t.push(`${r}@^${e}`),r===`@forinda/kickjs`&&(n=!0))}x(n?`Using the alpha channel for the ${f} runtime: ${t.join(`, `)}`:`WARNING: could not resolve @forinda/kickjs@alpha — the ${f} runtime subpath may be missing. After install, run: ${o} add @forinda/kickjs@alpha`)}await e(a(b,`package.json`),C(r,s,S,l,d,f)),await e(a(b,`vite.config.ts`),w()),await e(a(b,`tsconfig.json`),T()),await e(a(b,`.prettierrc`),E()),await e(a(b,`.editorconfig`),D()),await e(a(b,`.gitignore`),O()),await e(a(b,`.gitattributes`),k()),await e(a(b,`.env`),A()),await e(a(b,`.env.example`),j()),await e(a(b,`src/config/index.ts`),h(d)),await e(a(b,`src/index.ts`),p(r,s,J.version,l,f)),await e(a(b,`src/modules/index.ts`),m()),await e(a(b,`src/modules/hello/hello.service.ts`),g()),await e(a(b,`src/modules/hello/hello.controller.ts`),_()),await e(a(b,`src/modules/hello/hello.module.ts`),v()),await e(a(b,`kick.config.ts`),y(s,c,o,f)),await e(a(b,`vitest.config.ts`),M()),await e(a(b,`README.md`),t(r,s,o));let{generateAgentDocs:N}=await import(`./agent-docs-tlau7tZv.mjs`).then(e=>e.t);if(await N({outDir:b,name:r,pm:o,template:s,only:`all`,force:!0}),n.installDeps){console.log(`\n Installing dependencies with ${o}...\n`);try{u(`${o} install`,{cwd:b,stdio:`inherit`}),console.log(`
388
- Dependencies installed successfully!`)}catch{console.log(`\n Warning: ${o} install failed. Run it manually.`)}}try{let{runTypegen:e}=await import(`./typegen-qeQ5co2C.mjs`).then(e=>e.n);await e({cwd:b,allowDuplicates:!0,silent:!0})}catch{}if(n.initGit)try{u(`git init`,{cwd:b,stdio:`pipe`}),u(`git branch -M main`,{cwd:b,stdio:`pipe`}),u(`git add -A`,{cwd:b,stdio:`pipe`}),u(`git commit -m "chore: initial commit from kick new"`,{cwd:b,stdio:`pipe`}),x(`Git repository initialized`)}catch{x(`Warning: git init failed (git may not be installed)`)}console.log(`
387
+ `)}})}const q=i(d(import.meta.url)),J=JSON.parse(c(a(q,`..`,`package.json`),`utf-8`)),Y=`^${J.version}`,X=[`@forinda/kickjs`,`@forinda/kickjs-cli`,`@forinda/kickjs-schema`,`@forinda/kickjs-vite`,`@forinda/kickjs-swagger`,`@forinda/kickjs-ws`,`@forinda/kickjs-queue`,`@forinda/kickjs-devtools`,`@forinda/kickjs-testing`,`@forinda/kickjs-client`];async function Z(){let e=await Promise.all(X.map(async e=>{try{let t=l(`npm`,[`view`,e,`version`],{encoding:`utf-8`,timeout:5e3,stdio:[`ignore`,`pipe`,`ignore`]}).toString().trim();if(t&&/^\d+\.\d+\.\d+/.test(t))return[e,`^${t}`]}catch{}return[e,Y]}));return Object.fromEntries(e)}function Q(e,t){try{let n=l(`npm`,[`view`,`${e}@${t}`,`version`],{encoding:`utf-8`,timeout:5e3,stdio:[`ignore`,`pipe`,`ignore`]}).toString().trim();return n&&/^\d+\.\d+\.\d+/.test(n)?n:null}catch{return null}}function $(e){return(e??``).replace(/^[\^~>=<\s]+/,``)}function ee(e,t){let n=e=>$(e).split(`-`)[0].split(`.`).map(e=>Number.parseInt(e,10)||0),[r=0,i=0,a=0]=n(e),[o=0,s=0,c=0]=n(t);return r===o?i===s?a>=c:i>s:r>o}function te(e,t,n){try{let r=l(`npm`,[`view`,`${e}@${t}`,`exports`,`--json`],{encoding:`utf-8`,timeout:5e3,stdio:[`ignore`,`pipe`,`ignore`]}).toString().trim();if(!r)return!1;let i=JSON.parse(r);return Object.prototype.hasOwnProperty.call(i,n)}catch{return!1}}async function ne(n){let{name:r,directory:i,packageManager:o=`pnpm`,template:s=`rest`,defaultRepo:c=`inmemory`,packages:l=[],schemaLib:d=`zod`,runtime:f=`express`}=n,b=i,x=e=>console.log(` ${e}`);console.log(`\n Creating KickJS project: ${r}\n`),x(`Resolving package versions...`);let S=await Z();if(f!==`express`)if(te(`@forinda/kickjs`,`latest`,`./${f}`))x(`Using @forinda/kickjs@latest (stable ships the ${f} runtime)`);else{let e=[`@forinda/kickjs`,`@forinda/kickjs-cli`,`@forinda/kickjs-vite`],t=[],n=!1;for(let r of e){let e=Q(r,`alpha`);e&&ee(e,$(S[r]))&&(S[r]=`^${e}`,t.push(`${r}@^${e}`),r===`@forinda/kickjs`&&(n=!0))}x(n?`Using the alpha channel for the ${f} runtime: ${t.join(`, `)}`:`WARNING: could not resolve @forinda/kickjs@alpha — the ${f} runtime subpath may be missing. After install, run: ${o} add @forinda/kickjs@alpha`)}await e(a(b,`package.json`),C(r,s,S,l,d,f)),await e(a(b,`vite.config.ts`),w()),await e(a(b,`tsconfig.json`),T()),await e(a(b,`.prettierrc`),E()),await e(a(b,`.editorconfig`),D()),await e(a(b,`.gitignore`),O()),await e(a(b,`.gitattributes`),k()),await e(a(b,`.env`),A()),await e(a(b,`.env.example`),j()),await e(a(b,`src/config/index.ts`),h(d)),await e(a(b,`src/index.ts`),p(r,s,J.version,l,f)),await e(a(b,`src/modules/index.ts`),m()),await e(a(b,`src/modules/hello/hello.service.ts`),g()),await e(a(b,`src/modules/hello/hello.controller.ts`),_()),await e(a(b,`src/modules/hello/hello.module.ts`),v()),await e(a(b,`kick.config.ts`),y(s,c,o,f)),await e(a(b,`vitest.config.ts`),M()),await e(a(b,`README.md`),t(r,s,o));let{generateAgentDocs:N}=await import(`./agent-docs-NyyqHAxw.mjs`).then(e=>e.t);if(await N({outDir:b,name:r,pm:o,template:s,only:`all`,force:!0}),n.installDeps){console.log(`\n Installing dependencies with ${o}...\n`);try{u(`${o} install`,{cwd:b,stdio:`inherit`}),console.log(`
388
+ Dependencies installed successfully!`)}catch{console.log(`\n Warning: ${o} install failed. Run it manually.`)}}try{let{runTypegen:e}=await import(`./typegen-DRSOapGb.mjs`).then(e=>e.n);await e({cwd:b,allowDuplicates:!0,silent:!0})}catch{}if(n.initGit)try{u(`git init`,{cwd:b,stdio:`pipe`}),u(`git branch -M main`,{cwd:b,stdio:`pipe`}),u(`git add -A`,{cwd:b,stdio:`pipe`}),u(`git commit -m "chore: initial commit from kick new"`,{cwd:b,stdio:`pipe`}),x(`Git repository initialized`)}catch{x(`Warning: git init failed (git may not be installed)`)}console.log(`
389
389
  Project scaffolded successfully!`),console.log();let F=b!==process.cwd();x(`Next steps:`),F&&x(` cd ${r}`),n.installDeps||x(` ${o} install`);let I={rest:`kick g module user`,ddd:`kick g module user --repo drizzle`,cqrs:`kick g module user --pattern cqrs`,minimal:`# add your routes to src/index.ts`};x(` ${I[s]??I.rest}`),x(` kick dev`),x(``),x(`Commands:`),x(` kick dev Start dev server with Vite HMR`),x(` kick build Production build via Vite`),x(` kick start Run production build`),x(``),x(`Generators:`),x(` kick g module <name> Full DDD module (controller, DTOs, use-cases, repo)`),x(` kick g scaffold <n> <f..> CRUD module from field definitions`),x(` kick g controller <name> Standalone controller`),x(` kick g service <name> @Service() class`),x(` kick g middleware <name> Express middleware`),x(` kick g guard <name> Route guard (auth, roles, etc.)`),x(` kick g adapter <name> AppAdapter with lifecycle hooks`),x(` kick g dto <name> Zod DTO schema`),x(` kick g config Generate kick.config.ts`),x(``),x(`Add packages:`),x(` kick add <pkg> Install a KickJS package + peers`),x(` kick add --list Show all available packages`),x(``),x(`Available: ${P}`),x(``)}export{K as a,H as c,F as i,Z as n,G as o,N as r,I as s,ne as t};
390
- //# sourceMappingURL=project-CnU7KcYI.mjs.map
390
+ //# sourceMappingURL=project-DxcX4ryE.mjs.map