@forinda/kickjs-cli 5.2.1 → 5.2.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.
Files changed (34) hide show
  1. package/dist/builtins-BdvmVAJ1.mjs +3740 -0
  2. package/dist/builtins-Du70nybS.mjs +1066 -0
  3. package/dist/builtins-Du70nybS.mjs.map +1 -0
  4. package/dist/cli.mjs +2 -120
  5. package/dist/config-Dzw8Ws4d.mjs +11 -0
  6. package/dist/config-lCKbrRnt.mjs +12 -0
  7. package/dist/{config-CRi3zCxk.mjs.map → config-lCKbrRnt.mjs.map} +1 -1
  8. package/dist/generator-extension-Cp5FUUAw.mjs +2687 -0
  9. package/dist/generator-extension-Cp5FUUAw.mjs.map +1 -0
  10. package/dist/index.mjs +2 -5
  11. package/dist/plugin-Dv2gKsuC.mjs +11 -0
  12. package/dist/plugin-VPl_QQGb.mjs +12 -0
  13. package/dist/{plugin-DfomEcef.mjs.map → plugin-VPl_QQGb.mjs.map} +1 -1
  14. package/dist/rolldown-runtime-B6QC8dMY.mjs +11 -0
  15. package/dist/{run-plugins-D9abb5Nx.mjs → run-plugins-CM1Af-4B.mjs} +2 -3
  16. package/dist/typegen-C6ZfoYTC.mjs +114 -0
  17. package/dist/typegen-CBI7dNXr.mjs +115 -0
  18. package/dist/{typegen-B9S81bOx.mjs.map → typegen-CBI7dNXr.mjs.map} +1 -1
  19. package/dist/types-n4LRUF_c.mjs +12 -0
  20. package/dist/{types-CU89yUxU.mjs.map → types-n4LRUF_c.mjs.map} +1 -1
  21. package/package.json +5 -5
  22. package/dist/builtins-B0dptoXq.mjs +0 -4182
  23. package/dist/builtins-B0dptoXq.mjs.map +0 -1
  24. package/dist/builtins-N3mDa6bM.mjs +0 -8538
  25. package/dist/config-Bc6ERRTE.mjs +0 -169
  26. package/dist/config-CRi3zCxk.mjs +0 -171
  27. package/dist/generator-extension-C-HwKvFf.mjs +0 -4380
  28. package/dist/generator-extension-C-HwKvFf.mjs.map +0 -1
  29. package/dist/plugin-DfomEcef.mjs +0 -71
  30. package/dist/plugin-b7ig7Uxv.mjs +0 -80
  31. package/dist/rolldown-runtime-CV_zlh2d.mjs +0 -24
  32. package/dist/typegen-B9S81bOx.mjs +0 -1353
  33. package/dist/typegen-BKUAdp_3.mjs +0 -1351
  34. package/dist/types-CU89yUxU.mjs +0 -25
@@ -1,71 +0,0 @@
1
- /**
2
- * @forinda/kickjs-cli v5.2.1
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 __exportAll } from "./rolldown-runtime-CV_zlh2d.mjs";
12
- import { t as KickPluginConflictError } from "./types-CU89yUxU.mjs";
13
- //#region src/plugin/merge.ts
14
- function mergeCliPlugins(plugins, adopterCommands = []) {
15
- const seenPluginNames = /* @__PURE__ */ new Map();
16
- for (const p of plugins) {
17
- const count = (seenPluginNames.get(p.name) ?? 0) + 1;
18
- seenPluginNames.set(p.name, count);
19
- if (count === 2) throw new KickPluginConflictError("plugin", p.name, [p.name, p.name]);
20
- }
21
- const commandOwners = /* @__PURE__ */ new Map();
22
- const pluginCommands = [];
23
- for (const p of plugins) for (const cmd of p.commands ?? []) {
24
- const prior = commandOwners.get(cmd.name);
25
- if (prior) throw new KickPluginConflictError("command", cmd.name, [prior, p.name]);
26
- commandOwners.set(cmd.name, p.name);
27
- pluginCommands.push(cmd);
28
- }
29
- const adopterNames = new Set(adopterCommands.map((c) => c.name));
30
- const commands = [...pluginCommands.filter((c) => !adopterNames.has(c.name)), ...adopterCommands];
31
- const typegenOwners = /* @__PURE__ */ new Map();
32
- const typegens = [];
33
- for (const p of plugins) for (const tg of p.typegens ?? []) {
34
- const prior = typegenOwners.get(tg.id);
35
- if (prior) throw new KickPluginConflictError("typegen", tg.id, [prior, p.name]);
36
- typegenOwners.set(tg.id, p.name);
37
- typegens.push(tg);
38
- }
39
- const generatorOwners = /* @__PURE__ */ new Map();
40
- const generators = [];
41
- for (const p of plugins) for (const spec of p.generators ?? []) {
42
- const prior = generatorOwners.get(spec.name);
43
- if (prior) throw new KickPluginConflictError("generator", spec.name, [prior, p.name]);
44
- generatorOwners.set(spec.name, p.name);
45
- generators.push({
46
- source: p.name,
47
- spec
48
- });
49
- }
50
- const register = async (program, ctx) => {
51
- const resolved = ctx ?? {
52
- cwd: process.cwd(),
53
- config: null,
54
- log: () => {}
55
- };
56
- for (const p of plugins) if (p.register) await p.register(program, resolved);
57
- };
58
- return {
59
- commands,
60
- typegens,
61
- generators,
62
- register
63
- };
64
- }
65
- //#endregion
66
- //#region src/plugin/index.ts
67
- var plugin_exports = /* @__PURE__ */ __exportAll({ mergeCliPlugins: () => mergeCliPlugins });
68
- //#endregion
69
- export { mergeCliPlugins as n, plugin_exports as t };
70
-
71
- //# sourceMappingURL=plugin-DfomEcef.mjs.map
@@ -1,80 +0,0 @@
1
- /**
2
- * @forinda/kickjs-cli v5.2.1
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 __exportAll } from "./rolldown-runtime-CV_zlh2d.mjs";
12
- //#region src/plugin/types.ts
13
- /** Identity helper — exists for type inference + parity with definePlugin. */
14
- function defineCliPlugin(p) {
15
- return p;
16
- }
17
- var KickPluginConflictError = class extends Error {
18
- constructor(kind, id, owners) {
19
- super(`Two plugins registered the same ${kind} '${id}': ${owners.join(", ")}. Plugins must use unique ${kind} names.`);
20
- this.name = "KickPluginConflictError";
21
- }
22
- };
23
- //#endregion
24
- //#region src/plugin/merge.ts
25
- function mergeCliPlugins(plugins, adopterCommands = []) {
26
- const seenPluginNames = /* @__PURE__ */ new Map();
27
- for (const p of plugins) {
28
- const count = (seenPluginNames.get(p.name) ?? 0) + 1;
29
- seenPluginNames.set(p.name, count);
30
- if (count === 2) throw new KickPluginConflictError("plugin", p.name, [p.name, p.name]);
31
- }
32
- const commandOwners = /* @__PURE__ */ new Map();
33
- const pluginCommands = [];
34
- for (const p of plugins) for (const cmd of p.commands ?? []) {
35
- const prior = commandOwners.get(cmd.name);
36
- if (prior) throw new KickPluginConflictError("command", cmd.name, [prior, p.name]);
37
- commandOwners.set(cmd.name, p.name);
38
- pluginCommands.push(cmd);
39
- }
40
- const adopterNames = new Set(adopterCommands.map((c) => c.name));
41
- const commands = [...pluginCommands.filter((c) => !adopterNames.has(c.name)), ...adopterCommands];
42
- const typegenOwners = /* @__PURE__ */ new Map();
43
- const typegens = [];
44
- for (const p of plugins) for (const tg of p.typegens ?? []) {
45
- const prior = typegenOwners.get(tg.id);
46
- if (prior) throw new KickPluginConflictError("typegen", tg.id, [prior, p.name]);
47
- typegenOwners.set(tg.id, p.name);
48
- typegens.push(tg);
49
- }
50
- const generatorOwners = /* @__PURE__ */ new Map();
51
- const generators = [];
52
- for (const p of plugins) for (const spec of p.generators ?? []) {
53
- const prior = generatorOwners.get(spec.name);
54
- if (prior) throw new KickPluginConflictError("generator", spec.name, [prior, p.name]);
55
- generatorOwners.set(spec.name, p.name);
56
- generators.push({
57
- source: p.name,
58
- spec
59
- });
60
- }
61
- const register = async (program, ctx) => {
62
- const resolved = ctx ?? {
63
- cwd: process.cwd(),
64
- config: null,
65
- log: () => {}
66
- };
67
- for (const p of plugins) if (p.register) await p.register(program, resolved);
68
- };
69
- return {
70
- commands,
71
- typegens,
72
- generators,
73
- register
74
- };
75
- }
76
- //#endregion
77
- //#region src/plugin/index.ts
78
- var plugin_exports = /* @__PURE__ */ __exportAll({ mergeCliPlugins: () => mergeCliPlugins });
79
- //#endregion
80
- export { mergeCliPlugins as n, defineCliPlugin as r, plugin_exports as t };
@@ -1,24 +0,0 @@
1
- /**
2
- * @forinda/kickjs-cli v5.2.1
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 "node:module";
12
- //#region \0rolldown/runtime.js
13
- var __defProp = Object.defineProperty;
14
- var __exportAll = (all, no_symbols) => {
15
- let target = {};
16
- for (var name in all) __defProp(target, name, {
17
- get: all[name],
18
- enumerable: true
19
- });
20
- if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
21
- return target;
22
- };
23
- //#endregion
24
- export { __exportAll as t };