@kubb/cli 5.10.2 → 5.10.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/{Telemetry-DOahDJXF.cjs → Telemetry-BV4GonCV.cjs} +2 -2
- package/dist/{Telemetry-DOahDJXF.cjs.map → Telemetry-BV4GonCV.cjs.map} +1 -1
- package/dist/Telemetry-CH2kkxWK.cjs +322 -0
- package/dist/Telemetry-CH2kkxWK.cjs.map +1 -0
- package/dist/{Telemetry-4smY7ClN.js → Telemetry-Cz9QCzRo.js} +2 -2
- package/dist/{Telemetry-4smY7ClN.js.map → Telemetry-Cz9QCzRo.js.map} +1 -1
- package/dist/{background-BKWslHZJ.js → background-DFME5huR.js} +2 -2
- package/dist/{background-BKWslHZJ.js.map → background-DFME5huR.js.map} +1 -1
- package/dist/{background-CF80MwuR.cjs → background-DVZB1n4j.cjs} +2 -2
- package/dist/{background-CF80MwuR.cjs.map → background-DVZB1n4j.cjs.map} +1 -1
- package/dist/background-WaKtfQWr.cjs +192 -0
- package/dist/background-WaKtfQWr.cjs.map +1 -0
- package/dist/{background-BkDRe558.js → background-_A5NwvYH.js} +1 -1
- package/dist/{config-bF-Lo5C2.cjs → config-DKAqX5sW.cjs} +3 -3
- package/dist/{config-bF-Lo5C2.cjs.map → config-DKAqX5sW.cjs.map} +1 -1
- package/dist/{config-BC4Wm0OK.js → config-DV_7s1m-.js} +3 -3
- package/dist/{config-BC4Wm0OK.js.map → config-DV_7s1m-.js.map} +1 -1
- package/dist/config-OL_izsmp.cjs +113 -0
- package/dist/config-OL_izsmp.cjs.map +1 -0
- package/dist/credentials-xOkTTDWj.cjs +113 -0
- package/dist/credentials-xOkTTDWj.cjs.map +1 -0
- package/dist/index.cjs +15 -15
- package/dist/index.d.cts +8 -0
- package/dist/index.d.ts +0 -1
- package/dist/index.js +15 -15
- package/dist/output-C5g7AtWH.cjs +1008 -0
- package/dist/{output-C3zLt8M9.cjs.map → output-C5g7AtWH.cjs.map} +1 -1
- package/dist/{output-CxcaLxy9.js → output-D_gc1nrM.js} +2 -2
- package/dist/{output-CxcaLxy9.js.map → output-D_gc1nrM.js.map} +1 -1
- package/dist/{output-C3zLt8M9.cjs → output-nieBFDgM.cjs} +2 -2
- package/dist/output-nieBFDgM.cjs.map +1 -0
- package/dist/{registry-CzU92tJd.cjs → registry-C8E_G7Xc.cjs} +2 -2
- package/dist/{registry-CzU92tJd.cjs.map → registry-C8E_G7Xc.cjs.map} +1 -1
- package/dist/registry-CIpW2zQc.cjs +157 -0
- package/dist/registry-CIpW2zQc.cjs.map +1 -0
- package/dist/{registry-C83t41nj.js → registry-De1vVn1d.js} +2 -2
- package/dist/{registry-C83t41nj.js.map → registry-De1vVn1d.js.map} +1 -1
- package/dist/rolldown-runtime-C0BPl7ul.cjs +43 -0
- package/dist/run-BbhrOuK6.cjs +40 -0
- package/dist/{run-D6HyzEsH.cjs.map → run-BbhrOuK6.cjs.map} +1 -1
- package/dist/{run-xXgz6PA_.cjs → run-BnLba1gt.cjs} +5 -5
- package/dist/{run-xXgz6PA_.cjs.map → run-BnLba1gt.cjs.map} +1 -1
- package/dist/{run-wI0Rk7F-.js → run-Bp47k1W1.js} +2 -2
- package/dist/{run-wI0Rk7F-.js.map → run-Bp47k1W1.js.map} +1 -1
- package/dist/run-BpdJ6X75.cjs +32 -0
- package/dist/{run-eNvhTNiz.cjs.map → run-BpdJ6X75.cjs.map} +1 -1
- package/dist/{run-eMVMu3Y-.js → run-CCMlmk-z.js} +1 -1
- package/dist/{run-DsRPwmkb.js → run-CPYD1Lp0.js} +5 -5
- package/dist/{run-DsRPwmkb.js.map → run-CPYD1Lp0.js.map} +1 -1
- package/dist/run-CSOEGpWZ.cjs +326 -0
- package/dist/run-CSOEGpWZ.cjs.map +1 -0
- package/dist/{run-eNvhTNiz.cjs → run-CvE8ZdKG.cjs} +2 -2
- package/dist/run-CvE8ZdKG.cjs.map +1 -0
- package/dist/{run-Fdkc4Q6n.js → run-DaFK-Uy2.js} +2 -2
- package/dist/{run-Fdkc4Q6n.js.map → run-DaFK-Uy2.js.map} +1 -1
- package/dist/{run-CRvjGIa_.js → run-Ij84bqza.js} +5 -5
- package/dist/{run-CRvjGIa_.js.map → run-Ij84bqza.js.map} +1 -1
- package/dist/{run-D6HyzEsH.cjs → run-MFjzBB_M.cjs} +2 -2
- package/dist/run-MFjzBB_M.cjs.map +1 -0
- package/dist/run-hgSZImuK.cjs +345 -0
- package/dist/{run-BKAAkdxB.cjs.map → run-hgSZImuK.cjs.map} +1 -1
- package/dist/{run-BKAAkdxB.cjs → run-hyi91b22.cjs} +5 -5
- package/dist/run-hyi91b22.cjs.map +1 -0
- package/dist/{snapshot-Bw7Q6-aV.js → snapshot-B6w3BLum.js} +5 -5
- package/dist/{snapshot-Bw7Q6-aV.js.map → snapshot-B6w3BLum.js.map} +1 -1
- package/dist/snapshot-DP9Pcnsg.cjs +264 -0
- package/dist/{snapshot-Bk0S2Myh.cjs.map → snapshot-DP9Pcnsg.cjs.map} +1 -1
- package/dist/{snapshot-Bk0S2Myh.cjs → snapshot-D_F4XkYQ.cjs} +5 -5
- package/dist/snapshot-D_F4XkYQ.cjs.map +1 -0
- package/dist/studioWorker.js +2 -2
- package/package.json +15 -10
- package/dist/studioWorker.d.ts +0 -1
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
const require_rolldown_runtime = require("./rolldown-runtime-C0BPl7ul.cjs");
|
|
2
|
+
let node_crypto = require("node:crypto");
|
|
3
|
+
let node_process = require("node:process");
|
|
4
|
+
node_process = require_rolldown_runtime.__toESM(node_process, 1);
|
|
5
|
+
let node_path = require("node:path");
|
|
6
|
+
node_path = require_rolldown_runtime.__toESM(node_path, 1);
|
|
7
|
+
let _kubb_core = require("@kubb/core");
|
|
8
|
+
//#region src/runners/studio/credentials.ts
|
|
9
|
+
var credentials_exports = /* @__PURE__ */ require_rolldown_runtime.__exportAll({
|
|
10
|
+
clearCredentials: () => clearCredentials,
|
|
11
|
+
getCredentialsPath: () => getCredentialsPath,
|
|
12
|
+
getMachineId: () => getMachineId,
|
|
13
|
+
getProjectKubbHome: () => getProjectKubbHome,
|
|
14
|
+
readCredentials: () => readCredentials,
|
|
15
|
+
writeCredentials: () => writeCredentials
|
|
16
|
+
});
|
|
17
|
+
const projectBase = (project = node_process.default.cwd()) => node_path.default.join("projects", (0, node_crypto.hash)("sha256", project));
|
|
18
|
+
/**
|
|
19
|
+
* Root for the credential and machine identity of the current project, inside `KUBB_HOME`.
|
|
20
|
+
*
|
|
21
|
+
* Studio agents are project connections, so two projects on one machine must not share the same
|
|
22
|
+
* persisted token or machine secret.
|
|
23
|
+
*/
|
|
24
|
+
function getProjectKubbHome(project = node_process.default.cwd()) {
|
|
25
|
+
return (0, _kubb_core.resolveKubbDir)(projectBase(project));
|
|
26
|
+
}
|
|
27
|
+
const projectStorage = () => (0, _kubb_core.kubbStorage)({ base: projectBase() });
|
|
28
|
+
const CREDENTIALS_FILENAME = "credentials.json";
|
|
29
|
+
/**
|
|
30
|
+
* Absolute path of the stored credential, so callers can name it in output without rebuilding it.
|
|
31
|
+
*/
|
|
32
|
+
function getCredentialsPath() {
|
|
33
|
+
return node_path.default.join(getProjectKubbHome(), CREDENTIALS_FILENAME);
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Reads the stored credential, or null when this machine has not paired yet or the file is
|
|
37
|
+
* unreadable or corrupt. A bad file is treated as "not paired" so `kubb studio login` can
|
|
38
|
+
* overwrite it rather than the CLI dying on it.
|
|
39
|
+
*/
|
|
40
|
+
async function readCredentials() {
|
|
41
|
+
const stored = await projectStorage().getItem(CREDENTIALS_FILENAME).catch(() => null);
|
|
42
|
+
return typeof stored?.token === "string" && stored.token !== "" ? stored : null;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Writes the credential into the project folder, which only its owner can open.
|
|
46
|
+
*/
|
|
47
|
+
async function writeCredentials(credentials) {
|
|
48
|
+
await projectStorage().setItem(CREDENTIALS_FILENAME, credentials);
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Forgets the stored credential. Succeeds when there was nothing to forget.
|
|
52
|
+
*/
|
|
53
|
+
async function clearCredentials() {
|
|
54
|
+
await projectStorage().removeItem(CREDENTIALS_FILENAME);
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Reads this project's machine secret, creating it on first use. Pairing sends its hash, so pairing
|
|
58
|
+
* the same project again rotates one agent's token instead of creating a second agent. It lives
|
|
59
|
+
* apart from the credential, which {@link clearCredentials} deletes.
|
|
60
|
+
*/
|
|
61
|
+
async function getMachineId() {
|
|
62
|
+
const storage = projectStorage();
|
|
63
|
+
const stored = await storage.getItem("machine-secret").catch(() => null);
|
|
64
|
+
if (typeof stored === "string" && stored.trim()) return stored.trim();
|
|
65
|
+
const secret = (0, node_crypto.randomBytes)(32).toString("hex");
|
|
66
|
+
await storage.setItem("machine-secret", secret);
|
|
67
|
+
return secret;
|
|
68
|
+
}
|
|
69
|
+
//#endregion
|
|
70
|
+
Object.defineProperty(exports, "clearCredentials", {
|
|
71
|
+
enumerable: true,
|
|
72
|
+
get: function() {
|
|
73
|
+
return clearCredentials;
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
Object.defineProperty(exports, "credentials_exports", {
|
|
77
|
+
enumerable: true,
|
|
78
|
+
get: function() {
|
|
79
|
+
return credentials_exports;
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
Object.defineProperty(exports, "getCredentialsPath", {
|
|
83
|
+
enumerable: true,
|
|
84
|
+
get: function() {
|
|
85
|
+
return getCredentialsPath;
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
Object.defineProperty(exports, "getMachineId", {
|
|
89
|
+
enumerable: true,
|
|
90
|
+
get: function() {
|
|
91
|
+
return getMachineId;
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
Object.defineProperty(exports, "getProjectKubbHome", {
|
|
95
|
+
enumerable: true,
|
|
96
|
+
get: function() {
|
|
97
|
+
return getProjectKubbHome;
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
Object.defineProperty(exports, "readCredentials", {
|
|
101
|
+
enumerable: true,
|
|
102
|
+
get: function() {
|
|
103
|
+
return readCredentials;
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
Object.defineProperty(exports, "writeCredentials", {
|
|
107
|
+
enumerable: true,
|
|
108
|
+
get: function() {
|
|
109
|
+
return writeCredentials;
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
|
|
113
|
+
//# sourceMappingURL=credentials-xOkTTDWj.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"credentials-xOkTTDWj.cjs","names":["process","path","hash","resolveKubbDir","kubbStorage","randomBytes"],"sources":["../src/runners/studio/credentials.ts"],"sourcesContent":["import { hash, randomBytes } from 'node:crypto'\nimport path from 'node:path'\nimport process from 'node:process'\nimport { kubbStorage, resolveKubbDir } from '@kubb/core'\n\nconst projectBase = (project = process.cwd()) => path.join('projects', hash('sha256', project))\n\n/**\n * Root for the credential and machine identity of the current project, inside `KUBB_HOME`.\n *\n * Studio agents are project connections, so two projects on one machine must not share the same\n * persisted token or machine secret.\n */\nexport function getProjectKubbHome(project = process.cwd()): string {\n return resolveKubbDir(projectBase(project))\n}\n\nconst projectStorage = () => kubbStorage({ base: projectBase() })\n\nconst CREDENTIALS_FILENAME = 'credentials.json'\n\n/**\n * Absolute path of the stored credential, so callers can name it in output without rebuilding it.\n */\nexport function getCredentialsPath(): string {\n return path.join(getProjectKubbHome(), CREDENTIALS_FILENAME)\n}\n\nexport type Credentials = {\n /**\n * The Studio instance this machine paired with. A different `--url` means re-pairing.\n */\n studioUrl: string\n /**\n * Bearer token for this machine. Never logged, never printed.\n */\n token: string\n agentId: string\n agentSlug: string\n /**\n * Permissions the user has already granted, keyed by absolute project path, so the CLI asks\n * once per project instead of on every run.\n */\n projects?: Record<string, { allowRead?: boolean; allowReadAst?: boolean; allowWrite?: boolean; allowConfigEdit?: boolean; allowExec?: boolean }>\n}\n\n/**\n * Reads the stored credential, or null when this machine has not paired yet or the file is\n * unreadable or corrupt. A bad file is treated as \"not paired\" so `kubb studio login` can\n * overwrite it rather than the CLI dying on it.\n */\nexport async function readCredentials(): Promise<Credentials | null> {\n const stored = await projectStorage()\n .getItem<Credentials>(CREDENTIALS_FILENAME)\n .catch(() => null)\n\n return typeof stored?.token === 'string' && stored.token !== '' ? stored : null\n}\n\n/**\n * Writes the credential into the project folder, which only its owner can open.\n */\nexport async function writeCredentials(credentials: Credentials): Promise<void> {\n await projectStorage().setItem(CREDENTIALS_FILENAME, credentials)\n}\n\n/**\n * Forgets the stored credential. Succeeds when there was nothing to forget.\n */\nexport async function clearCredentials(): Promise<void> {\n await projectStorage().removeItem(CREDENTIALS_FILENAME)\n}\n\n/**\n * Reads this project's machine secret, creating it on first use. Pairing sends its hash, so pairing\n * the same project again rotates one agent's token instead of creating a second agent. It lives\n * apart from the credential, which {@link clearCredentials} deletes.\n */\nexport async function getMachineId(): Promise<string> {\n const storage = projectStorage()\n const stored = await storage.getItem('machine-secret').catch(() => null)\n if (typeof stored === 'string' && stored.trim()) return stored.trim()\n\n const secret = randomBytes(32).toString('hex')\n await storage.setItem('machine-secret', secret)\n\n return secret\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAKA,MAAM,eAAe,UAAUA,aAAAA,QAAQ,IAAI,MAAMC,UAAAA,QAAK,KAAK,aAAA,GAAYC,YAAAA,KAAAA,CAAK,UAAU,OAAO,CAAC;;;;;;;AAQ9F,SAAgB,mBAAmB,UAAUF,aAAAA,QAAQ,IAAI,GAAW;CAClE,QAAA,GAAOG,WAAAA,eAAAA,CAAe,YAAY,OAAO,CAAC;AAC5C;AAEA,MAAM,wBAAA,GAAuBC,WAAAA,YAAAA,CAAY,EAAE,MAAM,YAAY,EAAE,CAAC;AAEhE,MAAM,uBAAuB;;;;AAK7B,SAAgB,qBAA6B;CAC3C,OAAOH,UAAAA,QAAK,KAAK,mBAAmB,GAAG,oBAAoB;AAC7D;;;;;;AAyBA,eAAsB,kBAA+C;CACnE,MAAM,SAAS,MAAM,eAAe,CAAC,CAClC,QAAqB,oBAAoB,CAAC,CAC1C,YAAY,IAAI;CAEnB,OAAO,OAAO,QAAQ,UAAU,YAAY,OAAO,UAAU,KAAK,SAAS;AAC7E;;;;AAKA,eAAsB,iBAAiB,aAAyC;CAC9E,MAAM,eAAe,CAAC,CAAC,QAAQ,sBAAsB,WAAW;AAClE;;;;AAKA,eAAsB,mBAAkC;CACtD,MAAM,eAAe,CAAC,CAAC,WAAW,oBAAoB;AACxD;;;;;;AAOA,eAAsB,eAAgC;CACpD,MAAM,UAAU,eAAe;CAC/B,MAAM,SAAS,MAAM,QAAQ,QAAQ,gBAAgB,CAAC,CAAC,YAAY,IAAI;CACvE,IAAI,OAAO,WAAW,YAAY,OAAO,KAAK,GAAG,OAAO,OAAO,KAAK;CAEpE,MAAM,UAAA,GAASI,YAAAA,YAAAA,CAAY,EAAE,CAAC,CAAC,SAAS,KAAK;CAC7C,MAAM,QAAQ,QAAQ,kBAAkB,MAAM;CAE9C,OAAO;AACT"}
|
package/dist/index.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_rolldown_runtime = require("./rolldown-runtime-CPE0t6oh.cjs");
|
|
3
|
-
const require_Telemetry = require("./Telemetry-
|
|
4
|
-
const require_output = require("./output-
|
|
5
|
-
const require_registry = require("./registry-
|
|
3
|
+
const require_Telemetry = require("./Telemetry-BV4GonCV.cjs");
|
|
4
|
+
const require_output = require("./output-nieBFDgM.cjs");
|
|
5
|
+
const require_registry = require("./registry-C8E_G7Xc.cjs");
|
|
6
6
|
let node_util = require("node:util");
|
|
7
7
|
let _gunshi_plugin_dryrun = require("@gunshi/plugin-dryrun");
|
|
8
8
|
_gunshi_plugin_dryrun = require_rolldown_runtime.__toESM(_gunshi_plugin_dryrun, 1);
|
|
@@ -162,7 +162,7 @@ const command$13 = (0, gunshi.defineWithTypes)()({
|
|
|
162
162
|
async run(ctx) {
|
|
163
163
|
const { values } = ctx;
|
|
164
164
|
const logLevel = resolveLogLevel(values);
|
|
165
|
-
const { run } = await Promise.resolve().then(() => require("./run-
|
|
165
|
+
const { run } = await Promise.resolve().then(() => require("./run-hyi91b22.cjs"));
|
|
166
166
|
await run({
|
|
167
167
|
input: values.input,
|
|
168
168
|
configPath: values.config,
|
|
@@ -186,7 +186,7 @@ const command$12 = (0, gunshi.define)({
|
|
|
186
186
|
].join("\n"),
|
|
187
187
|
rendering: { header: null },
|
|
188
188
|
async run() {
|
|
189
|
-
const { run } = await Promise.resolve().then(() => require("./run-
|
|
189
|
+
const { run } = await Promise.resolve().then(() => require("./run-CvE8ZdKG.cjs"));
|
|
190
190
|
await run();
|
|
191
191
|
}
|
|
192
192
|
});
|
|
@@ -201,7 +201,7 @@ function studioCommand({ action, block, ...definition }) {
|
|
|
201
201
|
...definition,
|
|
202
202
|
toKebab: true,
|
|
203
203
|
async run({ values }) {
|
|
204
|
-
const { runStudio } = await Promise.resolve().then(() => require("./run-
|
|
204
|
+
const { runStudio } = await Promise.resolve().then(() => require("./run-BnLba1gt.cjs"));
|
|
205
205
|
await runStudio(values, action, { block });
|
|
206
206
|
}
|
|
207
207
|
});
|
|
@@ -231,7 +231,7 @@ const command$11 = studioCommand({
|
|
|
231
231
|
},
|
|
232
232
|
block: true,
|
|
233
233
|
async action(options) {
|
|
234
|
-
const { connect } = await Promise.resolve().then(() => require("./run-
|
|
234
|
+
const { connect } = await Promise.resolve().then(() => require("./run-BnLba1gt.cjs"));
|
|
235
235
|
await connect(options);
|
|
236
236
|
}
|
|
237
237
|
});
|
|
@@ -243,7 +243,7 @@ const command$10 = studioCommand({
|
|
|
243
243
|
examples: ["kubb studio login", "kubb studio login --url http://localhost:3000"].join("\n"),
|
|
244
244
|
args: command$11.args,
|
|
245
245
|
async action(options) {
|
|
246
|
-
const { login } = await Promise.resolve().then(() => require("./run-
|
|
246
|
+
const { login } = await Promise.resolve().then(() => require("./run-BnLba1gt.cjs"));
|
|
247
247
|
await login(options);
|
|
248
248
|
}
|
|
249
249
|
});
|
|
@@ -255,7 +255,7 @@ const command$9 = studioCommand({
|
|
|
255
255
|
examples: "kubb studio logout",
|
|
256
256
|
args: {},
|
|
257
257
|
async action() {
|
|
258
|
-
const { stopWorker } = await Promise.resolve().then(() => require("./background-
|
|
258
|
+
const { stopWorker } = await Promise.resolve().then(() => require("./background-DVZB1n4j.cjs"));
|
|
259
259
|
const { clearCredentials } = await Promise.resolve().then(() => require("./credentials-DDaKqtJn.cjs")).then((n) => n.credentials_exports);
|
|
260
260
|
await stopWorker();
|
|
261
261
|
await clearCredentials();
|
|
@@ -298,7 +298,7 @@ const command$8 = (0, gunshi.define)({
|
|
|
298
298
|
...logLevelArg
|
|
299
299
|
},
|
|
300
300
|
async run(ctx) {
|
|
301
|
-
const { runner } = await Promise.resolve().then(() => require("./snapshot-
|
|
301
|
+
const { runner } = await Promise.resolve().then(() => require("./snapshot-D_F4XkYQ.cjs"));
|
|
302
302
|
await runner(ctx);
|
|
303
303
|
}
|
|
304
304
|
});
|
|
@@ -309,7 +309,7 @@ const command$7 = studioCommand({
|
|
|
309
309
|
description: "Keep this project connected to Kubb Studio in the background.",
|
|
310
310
|
args: command$11.args,
|
|
311
311
|
async action(options) {
|
|
312
|
-
const { startWorker } = await Promise.resolve().then(() => require("./background-
|
|
312
|
+
const { startWorker } = await Promise.resolve().then(() => require("./background-DVZB1n4j.cjs"));
|
|
313
313
|
await startWorker(options);
|
|
314
314
|
}
|
|
315
315
|
});
|
|
@@ -317,7 +317,7 @@ const stopCommand = (0, gunshi.define)({
|
|
|
317
317
|
name: "stop",
|
|
318
318
|
description: "Stop this project's background connection and keep its pairing.",
|
|
319
319
|
async run() {
|
|
320
|
-
const { stopWorker } = await Promise.resolve().then(() => require("./background-
|
|
320
|
+
const { stopWorker } = await Promise.resolve().then(() => require("./background-DVZB1n4j.cjs"));
|
|
321
321
|
await stopWorker();
|
|
322
322
|
console.log("Background connection stopped.");
|
|
323
323
|
}
|
|
@@ -330,9 +330,9 @@ const command$6 = studioCommand({
|
|
|
330
330
|
examples: "kubb studio status",
|
|
331
331
|
args: { url: studioConnectionArgs.url },
|
|
332
332
|
async action(options) {
|
|
333
|
-
const { getWorkerLogPath, getWorkerStatus } = await Promise.resolve().then(() => require("./background-
|
|
333
|
+
const { getWorkerLogPath, getWorkerStatus } = await Promise.resolve().then(() => require("./background-DVZB1n4j.cjs"));
|
|
334
334
|
const { readCredentials } = await Promise.resolve().then(() => require("./credentials-DDaKqtJn.cjs")).then((n) => n.credentials_exports);
|
|
335
|
-
const { formatPermissionRows } = await Promise.resolve().then(() => require("./run-
|
|
335
|
+
const { formatPermissionRows } = await Promise.resolve().then(() => require("./run-BnLba1gt.cjs"));
|
|
336
336
|
const worker = await getWorkerStatus();
|
|
337
337
|
console.log(`Background connection: ${worker.state}${worker.running ? ` (PID ${worker.pid})` : ""}`);
|
|
338
338
|
console.log(`Logs: ${getWorkerLogPath()}`);
|
|
@@ -408,7 +408,7 @@ const command$4 = (0, gunshi.define)({
|
|
|
408
408
|
required: true
|
|
409
409
|
} },
|
|
410
410
|
async run({ values }) {
|
|
411
|
-
const { run } = await Promise.resolve().then(() => require("./run-
|
|
411
|
+
const { run } = await Promise.resolve().then(() => require("./run-MFjzBB_M.cjs"));
|
|
412
412
|
await run({ input: values.input });
|
|
413
413
|
}
|
|
414
414
|
});
|
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
//#region src/index.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Entry point for the `kubb` CLI. Prints the telemetry notice unless telemetry is disabled or a
|
|
4
|
+
* quiet flag is passed, then runs the given command, or `generate` when none is given.
|
|
5
|
+
*/
|
|
6
|
+
export declare function run(argv?: Array<string>): Promise<void>;
|
|
7
|
+
//#endregion
|
|
8
|
+
//# sourceMappingURL=index.d.cts.map
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as __name } from "./rolldown-runtime-CRm0XQPb.js";
|
|
2
|
-
import { c as getErrorMessage, r as version, t as isDisabled } from "./Telemetry-
|
|
3
|
-
import { C as initDefaults, S as KUBB_PACKAGE_NAME, a as logInfo, d as logWarn, i as logError, l as logStep, o as logIntro, r as logBlock, s as logOutro, t as createSpinner, v as findConfigFile, x as KUBB_CONFIG_FILENAME } from "./output-
|
|
4
|
-
import { a as isOutdated, i as installSpec, n as fetchRegistryIndex, o as registryUrl, r as incompatibility, s as toRegistryId, t as fetchRegistryDetail } from "./registry-
|
|
2
|
+
import { c as getErrorMessage, r as version, t as isDisabled } from "./Telemetry-Cz9QCzRo.js";
|
|
3
|
+
import { C as initDefaults, S as KUBB_PACKAGE_NAME, a as logInfo, d as logWarn, i as logError, l as logStep, o as logIntro, r as logBlock, s as logOutro, t as createSpinner, v as findConfigFile, x as KUBB_CONFIG_FILENAME } from "./output-D_gc1nrM.js";
|
|
4
|
+
import { a as isOutdated, i as installSpec, n as fetchRegistryIndex, o as registryUrl, r as incompatibility, s as toRegistryId, t as fetchRegistryDetail } from "./registry-De1vVn1d.js";
|
|
5
5
|
import { styleText } from "node:util";
|
|
6
6
|
import dryrun, { pluginId as dryRunId } from "@gunshi/plugin-dryrun";
|
|
7
7
|
import { cli, define, defineWithTypes } from "gunshi";
|
|
@@ -156,7 +156,7 @@ const command$13 = defineWithTypes()({
|
|
|
156
156
|
async run(ctx) {
|
|
157
157
|
const { values } = ctx;
|
|
158
158
|
const logLevel = resolveLogLevel(values);
|
|
159
|
-
const { run } = await import("./run-
|
|
159
|
+
const { run } = await import("./run-Ij84bqza.js");
|
|
160
160
|
await run({
|
|
161
161
|
input: values.input,
|
|
162
162
|
configPath: values.config,
|
|
@@ -180,7 +180,7 @@ const command$12 = define({
|
|
|
180
180
|
].join("\n"),
|
|
181
181
|
rendering: { header: null },
|
|
182
182
|
async run() {
|
|
183
|
-
const { run } = await import("./run-
|
|
183
|
+
const { run } = await import("./run-DaFK-Uy2.js");
|
|
184
184
|
await run();
|
|
185
185
|
}
|
|
186
186
|
});
|
|
@@ -195,7 +195,7 @@ function studioCommand({ action, block, ...definition }) {
|
|
|
195
195
|
...definition,
|
|
196
196
|
toKebab: true,
|
|
197
197
|
async run({ values }) {
|
|
198
|
-
const { runStudio } = await import("./run-
|
|
198
|
+
const { runStudio } = await import("./run-CCMlmk-z.js");
|
|
199
199
|
await runStudio(values, action, { block });
|
|
200
200
|
}
|
|
201
201
|
});
|
|
@@ -225,7 +225,7 @@ const command$11 = studioCommand({
|
|
|
225
225
|
},
|
|
226
226
|
block: true,
|
|
227
227
|
async action(options) {
|
|
228
|
-
const { connect } = await import("./run-
|
|
228
|
+
const { connect } = await import("./run-CCMlmk-z.js");
|
|
229
229
|
await connect(options);
|
|
230
230
|
}
|
|
231
231
|
});
|
|
@@ -237,7 +237,7 @@ const command$10 = studioCommand({
|
|
|
237
237
|
examples: ["kubb studio login", "kubb studio login --url http://localhost:3000"].join("\n"),
|
|
238
238
|
args: command$11.args,
|
|
239
239
|
async action(options) {
|
|
240
|
-
const { login } = await import("./run-
|
|
240
|
+
const { login } = await import("./run-CCMlmk-z.js");
|
|
241
241
|
await login(options);
|
|
242
242
|
}
|
|
243
243
|
});
|
|
@@ -249,7 +249,7 @@ const command$9 = studioCommand({
|
|
|
249
249
|
examples: "kubb studio logout",
|
|
250
250
|
args: {},
|
|
251
251
|
async action() {
|
|
252
|
-
const { stopWorker } = await import("./background-
|
|
252
|
+
const { stopWorker } = await import("./background-_A5NwvYH.js");
|
|
253
253
|
const { clearCredentials } = await import("./credentials-C8tjAhTo.js");
|
|
254
254
|
await stopWorker();
|
|
255
255
|
await clearCredentials();
|
|
@@ -292,7 +292,7 @@ const command$8 = define({
|
|
|
292
292
|
...logLevelArg
|
|
293
293
|
},
|
|
294
294
|
async run(ctx) {
|
|
295
|
-
const { runner } = await import("./snapshot-
|
|
295
|
+
const { runner } = await import("./snapshot-B6w3BLum.js");
|
|
296
296
|
await runner(ctx);
|
|
297
297
|
}
|
|
298
298
|
});
|
|
@@ -303,7 +303,7 @@ const command$7 = studioCommand({
|
|
|
303
303
|
description: "Keep this project connected to Kubb Studio in the background.",
|
|
304
304
|
args: command$11.args,
|
|
305
305
|
async action(options) {
|
|
306
|
-
const { startWorker } = await import("./background-
|
|
306
|
+
const { startWorker } = await import("./background-_A5NwvYH.js");
|
|
307
307
|
await startWorker(options);
|
|
308
308
|
}
|
|
309
309
|
});
|
|
@@ -311,7 +311,7 @@ const stopCommand = define({
|
|
|
311
311
|
name: "stop",
|
|
312
312
|
description: "Stop this project's background connection and keep its pairing.",
|
|
313
313
|
async run() {
|
|
314
|
-
const { stopWorker } = await import("./background-
|
|
314
|
+
const { stopWorker } = await import("./background-_A5NwvYH.js");
|
|
315
315
|
await stopWorker();
|
|
316
316
|
console.log("Background connection stopped.");
|
|
317
317
|
}
|
|
@@ -324,9 +324,9 @@ const command$6 = studioCommand({
|
|
|
324
324
|
examples: "kubb studio status",
|
|
325
325
|
args: { url: studioConnectionArgs.url },
|
|
326
326
|
async action(options) {
|
|
327
|
-
const { getWorkerLogPath, getWorkerStatus } = await import("./background-
|
|
327
|
+
const { getWorkerLogPath, getWorkerStatus } = await import("./background-_A5NwvYH.js");
|
|
328
328
|
const { readCredentials } = await import("./credentials-C8tjAhTo.js");
|
|
329
|
-
const { formatPermissionRows } = await import("./run-
|
|
329
|
+
const { formatPermissionRows } = await import("./run-CCMlmk-z.js");
|
|
330
330
|
const worker = await getWorkerStatus();
|
|
331
331
|
console.log(`Background connection: ${worker.state}${worker.running ? ` (PID ${worker.pid})` : ""}`);
|
|
332
332
|
console.log(`Logs: ${getWorkerLogPath()}`);
|
|
@@ -402,7 +402,7 @@ const command$4 = define({
|
|
|
402
402
|
required: true
|
|
403
403
|
} },
|
|
404
404
|
async run({ values }) {
|
|
405
|
-
const { run } = await import("./run-
|
|
405
|
+
const { run } = await import("./run-Bp47k1W1.js");
|
|
406
406
|
await run({ input: values.input });
|
|
407
407
|
}
|
|
408
408
|
});
|