@forinda/kickjs-cli 5.2.0 → 5.2.1
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/{builtins-C_VfEGdg.mjs → builtins-B0dptoXq.mjs} +9 -9
- package/dist/{builtins-C_VfEGdg.mjs.map → builtins-B0dptoXq.mjs.map} +1 -1
- package/dist/{builtins-BW3g09hP.mjs → builtins-N3mDa6bM.mjs} +7 -7
- package/dist/cli.mjs +4 -4
- package/dist/{config-DsQe2yzy.mjs → config-Bc6ERRTE.mjs} +2 -2
- package/dist/{config-DDrgs-I3.mjs → config-CRi3zCxk.mjs} +3 -3
- package/dist/{config-DDrgs-I3.mjs.map → config-CRi3zCxk.mjs.map} +1 -1
- package/dist/{generator-extension-DRNQpoZP.mjs → generator-extension-C-HwKvFf.mjs} +3 -3
- package/dist/{generator-extension-DRNQpoZP.mjs.map → generator-extension-C-HwKvFf.mjs.map} +1 -1
- package/dist/index.mjs +4 -4
- package/dist/{plugin-6_YlK-JG.mjs → plugin-DfomEcef.mjs} +4 -4
- package/dist/{plugin-6_YlK-JG.mjs.map → plugin-DfomEcef.mjs.map} +1 -1
- package/dist/{plugin-CQ0yYXyr.mjs → plugin-b7ig7Uxv.mjs} +2 -2
- package/dist/{rolldown-runtime-CYBbkZNy.mjs → rolldown-runtime-CV_zlh2d.mjs} +1 -1
- package/dist/{run-plugins-B1R0HG0g.mjs → run-plugins-D9abb5Nx.mjs} +2 -2
- package/dist/{typegen-DugZmi-0.mjs → typegen-B9S81bOx.mjs} +6 -6
- package/dist/{typegen-DugZmi-0.mjs.map → typegen-B9S81bOx.mjs.map} +1 -1
- package/dist/{typegen-CYCsmCRF.mjs → typegen-BKUAdp_3.mjs} +5 -5
- package/dist/{types-CGB8BiQh.mjs → types-CU89yUxU.mjs} +2 -2
- package/dist/{types-CGB8BiQh.mjs.map → types-CU89yUxU.mjs.map} +1 -1
- package/package.json +4 -4
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @forinda/kickjs-cli v5.2.
|
|
2
|
+
* @forinda/kickjs-cli v5.2.1
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Felix Orinda
|
|
5
5
|
*
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
*
|
|
9
9
|
* @license MIT
|
|
10
10
|
*/
|
|
11
|
-
import { _ as pluralize, a as initProject, b as toKebabCase, d as generateService, f as generateGuard, h as generateModule, i as defineGenerator, l as generateDto, m as generateAdapter, p as generateMiddleware, r as buildGeneratorContext, u as generateController, x as toPascalCase, y as toCamelCase } from "./generator-extension-
|
|
12
|
-
import { i as loadKickConfig, r as defineConfig } from "./config-
|
|
13
|
-
import { n as defineCliPlugin, t as KickPluginConflictError } from "./types-
|
|
11
|
+
import { _ as pluralize, a as initProject, b as toKebabCase, d as generateService, f as generateGuard, h as generateModule, i as defineGenerator, l as generateDto, m as generateAdapter, p as generateMiddleware, r as buildGeneratorContext, u as generateController, x as toPascalCase, y as toCamelCase } from "./generator-extension-C-HwKvFf.mjs";
|
|
12
|
+
import { i as loadKickConfig, r as defineConfig } from "./config-CRi3zCxk.mjs";
|
|
13
|
+
import { n as defineCliPlugin, t as KickPluginConflictError } from "./types-CU89yUxU.mjs";
|
|
14
14
|
export { KickPluginConflictError, buildGeneratorContext, defineCliPlugin, defineConfig, defineGenerator, generateAdapter, generateController, generateDto, generateGuard, generateMiddleware, generateModule, generateService, initProject, loadKickConfig, pluralize, toCamelCase, toKebabCase, toPascalCase };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @forinda/kickjs-cli v5.2.
|
|
2
|
+
* @forinda/kickjs-cli v5.2.1
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Felix Orinda
|
|
5
5
|
*
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
*
|
|
9
9
|
* @license MIT
|
|
10
10
|
*/
|
|
11
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
12
|
-
import { t as KickPluginConflictError } from "./types-
|
|
11
|
+
import { t as __exportAll } from "./rolldown-runtime-CV_zlh2d.mjs";
|
|
12
|
+
import { t as KickPluginConflictError } from "./types-CU89yUxU.mjs";
|
|
13
13
|
//#region src/plugin/merge.ts
|
|
14
14
|
function mergeCliPlugins(plugins, adopterCommands = []) {
|
|
15
15
|
const seenPluginNames = /* @__PURE__ */ new Map();
|
|
@@ -68,4 +68,4 @@ var plugin_exports = /* @__PURE__ */ __exportAll({ mergeCliPlugins: () => mergeC
|
|
|
68
68
|
//#endregion
|
|
69
69
|
export { mergeCliPlugins as n, plugin_exports as t };
|
|
70
70
|
|
|
71
|
-
//# sourceMappingURL=plugin-
|
|
71
|
+
//# sourceMappingURL=plugin-DfomEcef.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-
|
|
1
|
+
{"version":3,"file":"plugin-DfomEcef.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 const register = async (program: Command, ctx?: KickCliPluginContext): Promise<void> => {\n const resolved: KickCliPluginContext = ctx ?? {\n cwd: process.cwd(),\n config: null,\n log: () => {},\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":";;;;;;;;;;;;;AA4CA,SAAgB,gBACd,SACA,kBAAoD,EAAE,EACvC;CAEf,MAAM,kCAAkB,IAAI,KAAqB;AACjD,MAAK,MAAM,KAAK,SAAS;EACvB,MAAM,SAAS,gBAAgB,IAAI,EAAE,KAAK,IAAI,KAAK;AACnD,kBAAgB,IAAI,EAAE,MAAM,MAAM;AAClC,MAAI,UAAU,EACZ,OAAM,IAAI,wBAAwB,UAAU,EAAE,MAAM,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC;;CAIzE,MAAM,gCAAgB,IAAI,KAAqB;CAC/C,MAAM,iBAA0C,EAAE;AAClD,MAAK,MAAM,KAAK,QACd,MAAK,MAAM,OAAO,EAAE,YAAY,EAAE,EAAE;EAClC,MAAM,QAAQ,cAAc,IAAI,IAAI,KAAK;AACzC,MAAI,MACF,OAAM,IAAI,wBAAwB,WAAW,IAAI,MAAM,CAAC,OAAO,EAAE,KAAK,CAAC;AAEzE,gBAAc,IAAI,IAAI,MAAM,EAAE,KAAK;AACnC,iBAAe,KAAK,IAAI;;CA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|
3
3
|
*
|
|
4
4
|
* Copyright (c) Felix Orinda
|
|
5
5
|
*
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
*
|
|
9
9
|
* @license MIT
|
|
10
10
|
*/
|
|
11
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
11
|
+
import { t as __exportAll } from "./rolldown-runtime-CV_zlh2d.mjs";
|
|
12
12
|
//#region src/plugin/types.ts
|
|
13
13
|
/** Identity helper — exists for type inference + parity with definePlugin. */
|
|
14
14
|
function defineCliPlugin(p) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @forinda/kickjs-cli v5.2.
|
|
2
|
+
* @forinda/kickjs-cli v5.2.1
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Felix Orinda
|
|
5
5
|
*
|
|
@@ -8,5 +8,5 @@
|
|
|
8
8
|
*
|
|
9
9
|
* @license MIT
|
|
10
10
|
*/
|
|
11
|
-
import { n as applyDisableFilter, t as runAllPluginTypegens } from "./builtins-
|
|
11
|
+
import { n as applyDisableFilter, t as runAllPluginTypegens } from "./builtins-B0dptoXq.mjs";
|
|
12
12
|
export { applyDisableFilter, runAllPluginTypegens };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @forinda/kickjs-cli v5.2.
|
|
2
|
+
* @forinda/kickjs-cli v5.2.1
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Felix Orinda
|
|
5
5
|
*
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
*
|
|
9
9
|
* @license MIT
|
|
10
10
|
*/
|
|
11
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
11
|
+
import { t as __exportAll } from "./rolldown-runtime-CV_zlh2d.mjs";
|
|
12
12
|
import { dirname, join, relative, resolve, sep } from "node:path";
|
|
13
13
|
import { statSync } from "node:fs";
|
|
14
14
|
import { mkdir, readFile, readdir, writeFile } from "node:fs/promises";
|
|
@@ -1220,8 +1220,8 @@ async function runTypegen(opts = {}) {
|
|
|
1220
1220
|
schemaValidator
|
|
1221
1221
|
});
|
|
1222
1222
|
if (opts.runPlugins !== false) try {
|
|
1223
|
-
const { runAllPluginTypegens } = await import("./run-plugins-
|
|
1224
|
-
const { loadKickConfig } = await import("./config-
|
|
1223
|
+
const { runAllPluginTypegens } = await import("./run-plugins-D9abb5Nx.mjs");
|
|
1224
|
+
const { loadKickConfig } = await import("./config-CRi3zCxk.mjs").then((n) => n.n);
|
|
1225
1225
|
await runAllPluginTypegens({
|
|
1226
1226
|
cwd,
|
|
1227
1227
|
config: await loadKickConfig(cwd),
|
|
@@ -1282,7 +1282,7 @@ async function watchTypegen(opts = {}) {
|
|
|
1282
1282
|
runPlugins: false
|
|
1283
1283
|
};
|
|
1284
1284
|
const forcePolling = process.env.KICKJS_WATCH_POLLING === "1" || process.env.KICKJS_WATCH_POLLING === "true";
|
|
1285
|
-
const [{ runAllPluginTypegens }, { loadKickConfig }] = await Promise.all([import("./run-plugins-
|
|
1285
|
+
const [{ runAllPluginTypegens }, { loadKickConfig }] = await Promise.all([import("./run-plugins-D9abb5Nx.mjs"), import("./config-CRi3zCxk.mjs").then((n) => n.n)]);
|
|
1286
1286
|
const pluginConfig = await loadKickConfig(cwd);
|
|
1287
1287
|
const runPlugins = () => runAllPluginTypegens({
|
|
1288
1288
|
cwd,
|
|
@@ -1350,4 +1350,4 @@ async function safeRun(opts, silent) {
|
|
|
1350
1350
|
//#endregion
|
|
1351
1351
|
export { discoverAssets as a, TokenCollisionError as i, typegen_exports as n, renderAssetTypes as o, watchTypegen as r, scanProject as s, runTypegen as t };
|
|
1352
1352
|
|
|
1353
|
-
//# sourceMappingURL=typegen-
|
|
1353
|
+
//# sourceMappingURL=typegen-B9S81bOx.mjs.map
|