@forinda/kickjs-cli 5.2.0 → 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.
- package/dist/builtins-BdvmVAJ1.mjs +3740 -0
- package/dist/builtins-Du70nybS.mjs +1066 -0
- package/dist/builtins-Du70nybS.mjs.map +1 -0
- package/dist/cli.mjs +2 -120
- package/dist/config-Dzw8Ws4d.mjs +11 -0
- package/dist/config-lCKbrRnt.mjs +12 -0
- package/dist/{config-DDrgs-I3.mjs.map → config-lCKbrRnt.mjs.map} +1 -1
- package/dist/generator-extension-Cp5FUUAw.mjs +2687 -0
- package/dist/generator-extension-Cp5FUUAw.mjs.map +1 -0
- package/dist/index.mjs +2 -5
- package/dist/plugin-Dv2gKsuC.mjs +11 -0
- package/dist/plugin-VPl_QQGb.mjs +12 -0
- package/dist/{plugin-6_YlK-JG.mjs.map → plugin-VPl_QQGb.mjs.map} +1 -1
- package/dist/rolldown-runtime-B6QC8dMY.mjs +11 -0
- package/dist/{run-plugins-B1R0HG0g.mjs → run-plugins-CM1Af-4B.mjs} +2 -3
- package/dist/typegen-C6ZfoYTC.mjs +114 -0
- package/dist/typegen-CBI7dNXr.mjs +115 -0
- package/dist/{typegen-DugZmi-0.mjs.map → typegen-CBI7dNXr.mjs.map} +1 -1
- package/dist/types-n4LRUF_c.mjs +12 -0
- package/dist/{types-CGB8BiQh.mjs.map → types-n4LRUF_c.mjs.map} +1 -1
- package/package.json +5 -5
- package/dist/builtins-BW3g09hP.mjs +0 -8538
- package/dist/builtins-C_VfEGdg.mjs +0 -4182
- package/dist/builtins-C_VfEGdg.mjs.map +0 -1
- package/dist/config-DDrgs-I3.mjs +0 -171
- package/dist/config-DsQe2yzy.mjs +0 -169
- package/dist/generator-extension-DRNQpoZP.mjs +0 -4380
- package/dist/generator-extension-DRNQpoZP.mjs.map +0 -1
- package/dist/plugin-6_YlK-JG.mjs +0 -71
- package/dist/plugin-CQ0yYXyr.mjs +0 -80
- package/dist/rolldown-runtime-CYBbkZNy.mjs +0 -24
- package/dist/typegen-CYCsmCRF.mjs +0 -1351
- package/dist/typegen-DugZmi-0.mjs +0 -1353
- package/dist/types-CGB8BiQh.mjs +0 -25
package/dist/plugin-6_YlK-JG.mjs
DELETED
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @forinda/kickjs-cli v5.2.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 __exportAll } from "./rolldown-runtime-CYBbkZNy.mjs";
|
|
12
|
-
import { t as KickPluginConflictError } from "./types-CGB8BiQh.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-6_YlK-JG.mjs.map
|
package/dist/plugin-CQ0yYXyr.mjs
DELETED
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @forinda/kickjs-cli v5.2.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 __exportAll } from "./rolldown-runtime-CYBbkZNy.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.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 "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 };
|