@wirecat/drive-cli 0.57.0 → 0.59.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.
- package/dist/bin/drive.js +6 -2
- package/dist/bin/drive.js.map +1 -1
- package/dist/bundle/{all-profiles-7LSZ3CC3.js → all-profiles-CVISDGMF.js} +14 -9
- package/dist/bundle/{anthropic-3QRM4QXB.js → anthropic-WLNQC23G.js} +11 -7
- package/dist/bundle/{app-server-WWNMUHID.js → app-server-P2VOONXF.js} +61 -53
- package/dist/bundle/{bun-NIIYUR5F.js → bun-CDFBNTKV.js} +2 -2
- package/dist/bundle/{bun-sqlite-GSLSN3OT.js → bun-sqlite-MNZICITP.js} +8 -4
- package/dist/bundle/chunk-2AXA5SKP.js +23 -0
- package/dist/bundle/{chunk-EFEI724Z.js → chunk-36B7AIGP.js} +1 -1
- package/dist/bundle/{chunk-Q3TMNETS.js → chunk-3KJTJDDT.js} +52 -39
- package/dist/bundle/{chunk-4F2VRJZE.js → chunk-3KNZADHJ.js} +5080 -626
- package/dist/bundle/{chunk-GIQFBXQN.js → chunk-3U22QTU6.js} +12 -125
- package/dist/bundle/chunk-3VSUT6BD.js +35 -0
- package/dist/bundle/{chunk-U2RSVKR5.js → chunk-5C7K6XIT.js} +1 -1
- package/dist/bundle/{chunk-6CFSDU56.js → chunk-6C6255U6.js} +16 -14
- package/dist/bundle/{chunk-EE7R457T.js → chunk-6CQO2FIN.js} +1569 -739
- package/dist/bundle/{chunk-KHNDZNQA.js → chunk-7QTVIZII.js} +5410 -3002
- package/dist/bundle/{chunk-HNUSPNUQ.js → chunk-A6EG7ZDS.js} +13 -13
- package/dist/bundle/{chunk-WBYCUBYM.js → chunk-A6SLYOP2.js} +49 -42
- package/dist/bundle/{chunk-TR5656OS.js → chunk-AD62XJKO.js} +162 -106
- package/dist/bundle/{chunk-TKVSJV5P.js → chunk-B5GBJ35N.js} +6 -4
- package/dist/bundle/{chunk-LSSIVBQI.js → chunk-BSGOM3BD.js} +1 -1
- package/dist/bundle/{chunk-XGNADVIA.js → chunk-CBM2XAEZ.js} +28 -229
- package/dist/bundle/{chunk-OYNSFQ7K.js → chunk-D72URWJE.js} +1 -39
- package/dist/bundle/{chunk-L4BBK7UX.js → chunk-DI5Z4SH5.js} +5 -3
- package/dist/bundle/chunk-EBLA7GXY.js +45 -0
- package/dist/bundle/{chunk-4UQLL6RJ.js → chunk-EHEZSV6I.js} +11 -88
- package/dist/bundle/{chunk-6ZA4NR5H.js → chunk-EORMZCVF.js} +3 -3
- package/dist/bundle/{chunk-W5FOPSJZ.js → chunk-EVETU3TF.js} +10 -8
- package/dist/bundle/{chunk-TZHCS5MG.js → chunk-F3FOL42A.js} +2 -2
- package/dist/bundle/{chunk-2QLLKDE5.js → chunk-FICVPYE4.js} +206 -73
- package/dist/bundle/{chunk-AKPFH3KC.js → chunk-FVQCM7IQ.js} +1 -1
- package/dist/bundle/{chunk-ADLS6FVG.js → chunk-FXBHOCJK.js} +1 -1
- package/dist/bundle/{chunk-WAVJWGUC.js → chunk-GI5JBGXH.js} +4611 -1530
- package/dist/bundle/{chunk-SRNXTXJN.js → chunk-GJ4ZCIOP.js} +3 -3
- package/dist/bundle/{chunk-GKHUHRSL.js → chunk-GT5KTGCN.js} +4 -4
- package/dist/bundle/{chunk-WJOKTIOJ.js → chunk-H2BKXPBL.js} +2 -2
- package/dist/bundle/chunk-HIOJRPCT.js +93 -0
- package/dist/bundle/chunk-HIP43OGZ.js +34 -0
- package/dist/bundle/{chunk-2ULJW5BA.js → chunk-HMZAMHKN.js} +2 -2
- package/dist/bundle/{chunk-64E6QXXQ.js → chunk-HWLLVLAB.js} +10 -10
- package/dist/bundle/{chunk-373WJIHE.js → chunk-IADOBOKB.js} +2 -2
- package/dist/bundle/{chunk-B3TPS7BW.js → chunk-IBZ3IBO4.js} +9 -7
- package/dist/bundle/{chunk-QAT6UXZZ.js → chunk-IGF6EXBR.js} +53 -48
- package/dist/bundle/{chunk-KYNTSA6K.js → chunk-II7LST64.js} +5 -5
- package/dist/bundle/{chunk-JLKNUFL2.js → chunk-IIP43FQJ.js} +2 -2
- package/dist/bundle/{chunk-ELIYJXIY.js → chunk-JSDVK3JA.js} +2 -2
- package/dist/bundle/{chunk-UKMFPBAO.js → chunk-JW2CVCUH.js} +4 -4
- package/dist/bundle/{chunk-O5KDIVGE.js → chunk-K4LXGZTE.js} +23 -21
- package/dist/bundle/{chunk-RB674T6L.js → chunk-KFZUODXB.js} +76 -20
- package/dist/bundle/chunk-KPRGTTJH.js +34 -0
- package/dist/bundle/{chunk-XJVK7ETL.js → chunk-L5SE2XZP.js} +23 -15
- package/dist/bundle/{chunk-OOR6PEHV.js → chunk-LJ7E4HLQ.js} +1 -1
- package/dist/bundle/{chunk-VTJF2L5E.js → chunk-LPHMAQJQ.js} +16 -16
- package/dist/bundle/{chunk-566W4Q6L.js → chunk-M6I2SQN7.js} +4 -4
- package/dist/bundle/{chunk-NLLWLCUZ.js → chunk-MEAPA4EZ.js} +2 -2
- package/dist/bundle/{chunk-J2HGHSLX.js → chunk-MKCNUI72.js} +4 -4
- package/dist/bundle/{chunk-CD736BG3.js → chunk-MUUHUHWC.js} +2 -1
- package/dist/bundle/{chunk-AHBUTDS7.js → chunk-OKXSTWKW.js} +8 -8
- package/dist/bundle/{chunk-W6FYYQ2J.js → chunk-OMMEQJOB.js} +3 -3
- package/dist/bundle/{chunk-EFX6FIDM.js → chunk-OZH4ALTI.js} +1 -1
- package/dist/bundle/{chunk-KM4Y55ZE.js → chunk-P3ZTW2ZM.js} +7 -7
- package/dist/bundle/{chunk-5KNIVHP6.js → chunk-P7WPYKSB.js} +7 -20
- package/dist/bundle/{chunk-RAEKC6TV.js → chunk-PAEVBAM3.js} +9 -42
- package/dist/bundle/{chunk-LBFFI6FE.js → chunk-PGKIOSN3.js} +9 -7
- package/dist/bundle/{chunk-WJPVGXKA.js → chunk-QTM7USFA.js} +8 -13
- package/dist/bundle/{chunk-EN7OZ5JH.js → chunk-TFH5X46A.js} +37 -22
- package/dist/bundle/{chunk-OZJMZSFB.js → chunk-TI55J3BA.js} +6 -4
- package/dist/bundle/{chunk-R5GJZPRF.js → chunk-TJXPJ3A5.js} +572 -366
- package/dist/bundle/chunk-UQPKAY6I.js +106 -0
- package/dist/bundle/{chunk-JUKVJ7M2.js → chunk-UWVNRPT7.js} +56 -40
- package/dist/bundle/chunk-V36RIXFA.js +201 -0
- package/dist/bundle/{chunk-JIGMCW4C.js → chunk-V42KAPU3.js} +6 -6
- package/dist/bundle/{chunk-7SNS443B.js → chunk-VT6GZAF4.js} +35 -35
- package/dist/bundle/{chunk-ISK4K7UE.js → chunk-VVCZS42A.js} +1 -1
- package/dist/bundle/chunk-W62CON5K.js +166 -0
- package/dist/bundle/{chunk-YZ6SYLDC.js → chunk-XCOCPXCM.js} +2 -2
- package/dist/bundle/{chunk-G34Y5RAC.js → chunk-YADXWQHV.js} +29 -29
- package/dist/bundle/{chunk-AL7MY7MW.js → chunk-YU3PTU3D.js} +1 -1
- package/dist/bundle/{chunk-IJ2S53WJ.js → chunk-YV4ABH6J.js} +7 -7
- package/dist/bundle/{chunk-B64EY2SC.js → chunk-ZSMCJKGP.js} +42 -41
- package/dist/bundle/chunk-ZYCLPJ7U.js +46 -0
- package/dist/bundle/command-contract-LQDNHZJU.js +39 -0
- package/dist/bundle/{decode-5MHMPYKE.js → decode-XTOMXMGN.js} +10 -6
- package/dist/bundle/dispatch-T6TW2JJB.js +412 -0
- package/dist/bundle/drive.js +40 -22
- package/dist/bundle/{echarts-CLB22SZS.js → echarts-RKKIOYVV.js} +2 -2
- package/dist/bundle/{embed-TF66ODAR.js → embed-STHKKA6G.js} +9 -5
- package/dist/bundle/{embedder-EDWOIAC2.js → embedder-3XZEWHRO.js} +14 -10
- package/dist/bundle/entry-CNOYSSSD.js +22 -0
- package/dist/bundle/failure-DNQYXP2T.js +26 -0
- package/dist/bundle/first-run-F2SI24PK.js +30 -0
- package/dist/bundle/first-screen-TYYF6VXY.js +37 -0
- package/dist/bundle/{google-A4F2WFO4.js → google-BYNSAIQI.js} +13 -9
- package/dist/bundle/{google-api-ZXGQOJUI.js → google-api-4VTZH7OP.js} +59 -52
- package/dist/bundle/grants-EUQXSICG.js +105 -0
- package/dist/bundle/{identity-4IO7WGG4.js → identity-ARDPFYV5.js} +6 -4
- package/dist/bundle/{instructions-BXZZNAMS.js → instructions-N3OH5X2Y.js} +1 -1
- package/dist/bundle/{login-A4QHJ5DA.js → login-4VQEC7VI.js} +65 -58
- package/dist/bundle/{mcp-VVMPUDSL.js → mcp-WBHKX5E3.js} +5 -3
- package/dist/bundle/{node-P4E63KXA.js → node-KM3CUABH.js} +9 -9
- package/dist/bundle/{node-R6ZNQ3NT.js → node-YU5JBNAA.js} +2 -2
- package/dist/bundle/{node-sqlite-AFQTE4XZ.js → node-sqlite-3C6PSBIW.js} +14 -4
- package/dist/bundle/oauth-D6NJFPYU.js +22 -0
- package/dist/bundle/{open-WJCRBIP7.js → open-M2V2VYXO.js} +8 -3
- package/dist/bundle/{openai-3TIBDWZA.js → openai-ST2IWNUX.js} +18 -14
- package/dist/bundle/{process-P36JP33R.js → process-PYNNBBTV.js} +1 -1
- package/dist/bundle/{program-AHZH65IT.js → program-Q4VWV2MR.js} +193 -147
- package/dist/bundle/prompt-MFIOJMAF.js +17 -0
- package/dist/bundle/{reasons-VHCVYH54.js → reasons-LOQ5J73F.js} +5 -3
- package/dist/bundle/{recognize-4EAKIMON.js → recognize-FBLMWXNE.js} +7 -3
- package/dist/bundle/{remote-HX3JP4EH.js → remote-XC3OXE4T.js} +10 -6
- package/dist/bundle/{rerank-BW3A4PUU.js → rerank-2XMKKF4S.js} +10 -6
- package/dist/bundle/{serve-YYOOLIBS.js → serve-Q2BQHNZB.js} +15 -10
- package/dist/bundle/{server-G6XTEEFI.js → server-42HPV3AH.js} +46 -39
- package/dist/bundle/server-EWZYN323.js +70 -0
- package/dist/bundle/{services-OAPILZOW.js → services-WU22S2MU.js} +100 -26
- package/dist/bundle/{sqlite-runtime-GTXDK4PE.js → sqlite-runtime-CSO6K6B2.js} +9 -4
- package/dist/bundle/start-TZWKM4AH.js +138 -0
- package/dist/bundle/{state-XG335LGZ.js → state-FLUT7U7R.js} +9 -5
- package/dist/bundle/{store-N53SJOPS.js → store-HDWMJ44E.js} +42 -17
- package/dist/bundle/{store-7KOXJNQP.js → store-TG6622NG.js} +20 -12
- package/dist/bundle/store-maintenance-command-RHWRUREJ.js +60 -0
- package/dist/bundle/tokens-TXYURU4S.js +103 -0
- package/dist/commands/documents.d.ts +1 -0
- package/dist/commands/documents.d.ts.map +1 -1
- package/dist/commands/documents.js +14 -1
- package/dist/commands/documents.js.map +1 -1
- package/dist/commands/knowledge.d.ts +4 -0
- package/dist/commands/knowledge.d.ts.map +1 -1
- package/dist/commands/knowledge.js +8 -7
- package/dist/commands/knowledge.js.map +1 -1
- package/dist/contract-overrides.js +5 -5
- package/dist/contract-overrides.js.map +1 -1
- package/dist/knowledge-query.d.ts +2 -0
- package/dist/knowledge-query.d.ts.map +1 -1
- package/dist/program.d.ts.map +1 -1
- package/dist/program.js +8 -3
- package/dist/program.js.map +1 -1
- package/dist/provider-json.d.ts +2 -0
- package/dist/provider-json.d.ts.map +1 -1
- package/dist/provider-json.js +13 -0
- package/dist/provider-json.js.map +1 -1
- package/dist/reasons.d.ts.map +1 -1
- package/dist/reasons.js +1 -0
- package/dist/reasons.js.map +1 -1
- package/dist/store.d.ts +2 -0
- package/dist/store.d.ts.map +1 -1
- package/dist/store.js +9 -0
- package/dist/store.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +5 -4
- package/skills/drive-cli/SKILL.md +2 -1
- package/dist/bundle/chunk-3BXSLNWW.js +0 -3607
- package/dist/bundle/chunk-CGCQNYB3.js +0 -18
- package/dist/bundle/command-contract-XIACCAZL.js +0 -35
- package/dist/bundle/entry-CWYCQ53A.js +0 -17
- package/dist/bundle/first-run-YIH7EHJI.js +0 -24
- package/dist/bundle/first-screen-THH3XD5Y.js +0 -33
- package/dist/bundle/grants-3Z7DG3W3.js +0 -98
- package/dist/bundle/oauth-46XBJBML.js +0 -18
- package/dist/bundle/prompt-FFGBIT4A.js +0 -13
- package/dist/bundle/server-YKYEUIJT.js +0 -63
- package/dist/bundle/store-maintenance-command-W3TI52X2.js +0 -52
- package/dist/bundle/tokens-P7TEHKDD.js +0 -96
- /package/dist/bundle/{chunk-HPXYN7F3.js → chunk-LK2E2ELG.js} +0 -0
|
@@ -0,0 +1,412 @@
|
|
|
1
|
+
import { createRequire as __bundleRequire } from "node:module";
|
|
2
|
+
const require = __bundleRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
require_cross_spawn
|
|
5
|
+
} from "./chunk-D72URWJE.js";
|
|
6
|
+
import {
|
|
7
|
+
BUILT_IN_COMMANDS,
|
|
8
|
+
DESCRIBE_FLAG,
|
|
9
|
+
FIRST_PARTY_TOOLS,
|
|
10
|
+
PROGRAM_PREFIX,
|
|
11
|
+
TOOL_NAME,
|
|
12
|
+
fileState,
|
|
13
|
+
parseDescribe,
|
|
14
|
+
shimFiles,
|
|
15
|
+
writeShim
|
|
16
|
+
} from "./chunk-W62CON5K.js";
|
|
17
|
+
import "./chunk-Y5E2WNWB.js";
|
|
18
|
+
import "./chunk-HIP43OGZ.js";
|
|
19
|
+
import {
|
|
20
|
+
CliError
|
|
21
|
+
} from "./chunk-EBLA7GXY.js";
|
|
22
|
+
import {
|
|
23
|
+
__name,
|
|
24
|
+
__toESM
|
|
25
|
+
} from "./chunk-ZVVMGPBJ.js";
|
|
26
|
+
|
|
27
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/wcat/dispatch.js
|
|
28
|
+
var import_cross_spawn2 = __toESM(require_cross_spawn(), 1);
|
|
29
|
+
import { randomUUID } from "node:crypto";
|
|
30
|
+
import { constants } from "node:os";
|
|
31
|
+
|
|
32
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/wcat/path.js
|
|
33
|
+
import { readdirSync, statSync } from "node:fs";
|
|
34
|
+
import { join } from "node:path";
|
|
35
|
+
var variable = /* @__PURE__ */ __name((env, name, platform) => platform === "win32" ? Object.entries(env).find(([key]) => key.toUpperCase() === name)?.[1] : env[name], "variable");
|
|
36
|
+
var pathEntries = /* @__PURE__ */ __name(({ env, platform }) => {
|
|
37
|
+
const raw = variable(env, "PATH", platform) ?? "";
|
|
38
|
+
const entries = raw.split(platform === "win32" ? ";" : ":").map((entry) => entry.replace(/^"(.*)"$/, "$1"));
|
|
39
|
+
const seen = /* @__PURE__ */ new Set();
|
|
40
|
+
return entries.filter((entry) => {
|
|
41
|
+
const key = platform === "win32" ? entry.toLowerCase().replace(/[\\/]+$/, "") : entry.replace(/\/+$/, "");
|
|
42
|
+
if (entry === "" || seen.has(key))
|
|
43
|
+
return false;
|
|
44
|
+
seen.add(key);
|
|
45
|
+
return true;
|
|
46
|
+
});
|
|
47
|
+
}, "pathEntries");
|
|
48
|
+
var programExtensions = /* @__PURE__ */ __name(({ env, platform }) => platform === "win32" ? (variable(env, "PATHEXT", platform) ?? ".COM;.EXE;.BAT;.CMD").split(";").filter((ext) => /^\.[a-z0-9]+$/i.test(ext)).map((ext) => ext.toLowerCase()) : [""], "programExtensions");
|
|
49
|
+
var isProgram = /* @__PURE__ */ __name((path, platform) => {
|
|
50
|
+
try {
|
|
51
|
+
const stat = statSync(path);
|
|
52
|
+
return stat.isFile() && (platform === "win32" || (stat.mode & 73) !== 0);
|
|
53
|
+
} catch {
|
|
54
|
+
return false;
|
|
55
|
+
}
|
|
56
|
+
}, "isProgram");
|
|
57
|
+
var findOnPath = /* @__PURE__ */ __name((command, search) => {
|
|
58
|
+
const extensions = programExtensions(search);
|
|
59
|
+
return pathEntries(search).flatMap((dir) => {
|
|
60
|
+
for (const extension of extensions) {
|
|
61
|
+
const path = join(dir, command + extension);
|
|
62
|
+
if (isProgram(path, search.platform))
|
|
63
|
+
return [path];
|
|
64
|
+
}
|
|
65
|
+
return [];
|
|
66
|
+
});
|
|
67
|
+
}, "findOnPath");
|
|
68
|
+
var findTools = /* @__PURE__ */ __name((search) => {
|
|
69
|
+
const extensions = programExtensions(search);
|
|
70
|
+
const tools = /* @__PURE__ */ new Map();
|
|
71
|
+
for (const dir of pathEntries(search)) {
|
|
72
|
+
let files;
|
|
73
|
+
try {
|
|
74
|
+
files = readdirSync(dir);
|
|
75
|
+
} catch {
|
|
76
|
+
continue;
|
|
77
|
+
}
|
|
78
|
+
const here = /* @__PURE__ */ new Map();
|
|
79
|
+
for (const file of files) {
|
|
80
|
+
if (!(search.platform === "win32" ? file.toLowerCase() : file).startsWith(PROGRAM_PREFIX))
|
|
81
|
+
continue;
|
|
82
|
+
const extension = extensions.find((ext) => ext !== "" && file.toLowerCase().endsWith(ext)) ?? "";
|
|
83
|
+
if (search.platform === "win32" && extension === "")
|
|
84
|
+
continue;
|
|
85
|
+
const base = search.platform === "win32" ? file.toLowerCase() : file;
|
|
86
|
+
const name = base.slice(PROGRAM_PREFIX.length, base.length - extension.length);
|
|
87
|
+
if (!TOOL_NAME.test(name))
|
|
88
|
+
continue;
|
|
89
|
+
const best = here.get(name);
|
|
90
|
+
const rank = /* @__PURE__ */ __name((path2) => extensions.findIndex((ext) => path2.toLowerCase().endsWith(ext)), "rank");
|
|
91
|
+
const path = join(dir, file);
|
|
92
|
+
if (best !== void 0 && rank(best) <= rank(path))
|
|
93
|
+
continue;
|
|
94
|
+
if (isProgram(path, search.platform))
|
|
95
|
+
here.set(name, path);
|
|
96
|
+
}
|
|
97
|
+
for (const [name, path] of here)
|
|
98
|
+
tools.set(name, [...tools.get(name) ?? [], path]);
|
|
99
|
+
}
|
|
100
|
+
return new Map([...tools].sort(([a], [b]) => a < b ? -1 : 1));
|
|
101
|
+
}, "findTools");
|
|
102
|
+
var isBuiltIn = /* @__PURE__ */ __name((name) => name === "wcat" || BUILT_IN_COMMANDS.includes(name), "isBuiltIn");
|
|
103
|
+
|
|
104
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/wcat/probe.js
|
|
105
|
+
var import_cross_spawn = __toESM(require_cross_spawn(), 1);
|
|
106
|
+
import { readFileSync } from "node:fs";
|
|
107
|
+
var MAX_ANSWER_BYTES = 64 * 1024;
|
|
108
|
+
var probeDescribe = /* @__PURE__ */ __name((path, { env, timeoutMs }) => new Promise((resolve) => {
|
|
109
|
+
let child;
|
|
110
|
+
try {
|
|
111
|
+
child = (0, import_cross_spawn.default)(path, [DESCRIBE_FLAG], { stdio: ["ignore", "pipe", "ignore"], env, windowsHide: true });
|
|
112
|
+
} catch {
|
|
113
|
+
resolve(void 0);
|
|
114
|
+
return;
|
|
115
|
+
}
|
|
116
|
+
const chunks = [];
|
|
117
|
+
let size = 0;
|
|
118
|
+
let settled = false;
|
|
119
|
+
const settle = /* @__PURE__ */ __name((answer) => {
|
|
120
|
+
if (settled)
|
|
121
|
+
return;
|
|
122
|
+
settled = true;
|
|
123
|
+
clearTimeout(timer);
|
|
124
|
+
resolve(answer);
|
|
125
|
+
}, "settle");
|
|
126
|
+
const giveUp = /* @__PURE__ */ __name(() => {
|
|
127
|
+
child.kill();
|
|
128
|
+
child.stdout?.destroy();
|
|
129
|
+
child.unref();
|
|
130
|
+
settle(void 0);
|
|
131
|
+
}, "giveUp");
|
|
132
|
+
const timer = setTimeout(giveUp, timeoutMs);
|
|
133
|
+
child.stdout?.on("data", (chunk) => {
|
|
134
|
+
size += chunk.length;
|
|
135
|
+
if (size > MAX_ANSWER_BYTES)
|
|
136
|
+
giveUp();
|
|
137
|
+
else
|
|
138
|
+
chunks.push(chunk);
|
|
139
|
+
});
|
|
140
|
+
child.once("error", () => settle(void 0));
|
|
141
|
+
child.once("close", (code) => settle(code === 0 ? parseDescribe(Buffer.concat(chunks).toString("utf8")) : void 0));
|
|
142
|
+
}), "probeDescribe");
|
|
143
|
+
var baseVersion = /* @__PURE__ */ __name(() => {
|
|
144
|
+
try {
|
|
145
|
+
const raw = readFileSync(new URL("../../package.json", new URL("wcat/probe.js", import.meta.resolve("@wirecat/cli-base")).href), "utf8");
|
|
146
|
+
const { name, version } = JSON.parse(raw);
|
|
147
|
+
return name === "@wirecat/cli-base" && typeof version === "string" ? version : "unknown";
|
|
148
|
+
} catch {
|
|
149
|
+
return "unknown";
|
|
150
|
+
}
|
|
151
|
+
}, "baseVersion");
|
|
152
|
+
|
|
153
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/wcat/shortcuts.js
|
|
154
|
+
import { closeSync, openSync, readSync, realpathSync, rmSync } from "node:fs";
|
|
155
|
+
import { basename, dirname } from "node:path";
|
|
156
|
+
var WIRECAT_PACKAGE = /node_modules[\\/]+@wirecat[\\/]/;
|
|
157
|
+
var isWirecatPackage = /* @__PURE__ */ __name((path) => {
|
|
158
|
+
try {
|
|
159
|
+
if (WIRECAT_PACKAGE.test(realpathSync(path)))
|
|
160
|
+
return true;
|
|
161
|
+
const buffer = Buffer.alloc(16 * 1024);
|
|
162
|
+
const fd = openSync(path, "r");
|
|
163
|
+
try {
|
|
164
|
+
const read = readSync(fd, buffer, 0, buffer.length, 0);
|
|
165
|
+
return WIRECAT_PACKAGE.test(buffer.subarray(0, read).toString("latin1"));
|
|
166
|
+
} finally {
|
|
167
|
+
closeSync(fd);
|
|
168
|
+
}
|
|
169
|
+
} catch {
|
|
170
|
+
return false;
|
|
171
|
+
}
|
|
172
|
+
}, "isWirecatPackage");
|
|
173
|
+
var ourShortcut = /* @__PURE__ */ __name((path) => {
|
|
174
|
+
const state = fileState(path);
|
|
175
|
+
return state.state === "ours" && state.mark.kind === "shortcut";
|
|
176
|
+
}, "ourShortcut");
|
|
177
|
+
var statusOf = /* @__PURE__ */ __name((name, program, search) => {
|
|
178
|
+
const files = shimFiles("shortcut", {
|
|
179
|
+
dir: dirname(program),
|
|
180
|
+
name,
|
|
181
|
+
target: basename(program),
|
|
182
|
+
platform: search.platform
|
|
183
|
+
});
|
|
184
|
+
const named = findOnPath(name, search);
|
|
185
|
+
const made = [...files.map((file) => file.path), ...named].find(ourShortcut);
|
|
186
|
+
if (made)
|
|
187
|
+
return { name, status: "made", path: made, program };
|
|
188
|
+
const first = named[0];
|
|
189
|
+
if (first === void 0)
|
|
190
|
+
return { name, status: "free", program };
|
|
191
|
+
return { name, status: isWirecatPackage(first) ? "package" : "taken", path: first, program };
|
|
192
|
+
}, "statusOf");
|
|
193
|
+
var changeFile = /* @__PURE__ */ __name((path, change) => {
|
|
194
|
+
try {
|
|
195
|
+
change();
|
|
196
|
+
} catch (error) {
|
|
197
|
+
throw new CliError("permission_error", `could not change ${path}: ${error.code ?? error}`, {
|
|
198
|
+
reason: "access.denied"
|
|
199
|
+
});
|
|
200
|
+
}
|
|
201
|
+
}, "changeFile");
|
|
202
|
+
var installedPrograms = /* @__PURE__ */ __name((search) => new Map([...findTools(search)].filter(([name]) => !isBuiltIn(name))), "installedPrograms");
|
|
203
|
+
var chosen = /* @__PURE__ */ __name((names, search) => {
|
|
204
|
+
const installed = installedPrograms(search);
|
|
205
|
+
if (names === void 0 || names.length === 0)
|
|
206
|
+
return [...installed].map(([name, paths]) => [name, paths[0]]);
|
|
207
|
+
const missing = names.filter((name) => !installed.has(name));
|
|
208
|
+
if (missing.length > 0)
|
|
209
|
+
throw new CliError("not_found", `not installed: ${missing.map((name) => `wcat-${name}`).join(", ")}`, {
|
|
210
|
+
reason: "tool.not-installed",
|
|
211
|
+
tool: missing[0],
|
|
212
|
+
installed: [...installed.keys()]
|
|
213
|
+
});
|
|
214
|
+
return [...new Set(names)].map((name) => [name, installed.get(name)[0]]);
|
|
215
|
+
}, "chosen");
|
|
216
|
+
var listShortcuts = /* @__PURE__ */ __name((search, names) => chosen(names, search).map(([name, program]) => statusOf(name, program, search)), "listShortcuts");
|
|
217
|
+
var addShortcuts = /* @__PURE__ */ __name((search, names) => listShortcuts(search, names).map((shortcut) => {
|
|
218
|
+
if (shortcut.status !== "free")
|
|
219
|
+
return { ...shortcut, changed: false };
|
|
220
|
+
const files = shimFiles("shortcut", {
|
|
221
|
+
dir: dirname(shortcut.program),
|
|
222
|
+
name: shortcut.name,
|
|
223
|
+
target: basename(shortcut.program),
|
|
224
|
+
platform: search.platform
|
|
225
|
+
});
|
|
226
|
+
for (const file of files)
|
|
227
|
+
changeFile(file.path, () => writeShim(file));
|
|
228
|
+
return { ...shortcut, status: "made", path: files[0]?.path, changed: true };
|
|
229
|
+
}), "addShortcuts");
|
|
230
|
+
var removeShortcuts = /* @__PURE__ */ __name((search, names) => listShortcuts(search, names).map((shortcut) => {
|
|
231
|
+
if (shortcut.status !== "made")
|
|
232
|
+
return { ...shortcut, changed: false };
|
|
233
|
+
const files = shimFiles("shortcut", {
|
|
234
|
+
dir: dirname(shortcut.path),
|
|
235
|
+
name: shortcut.name,
|
|
236
|
+
target: basename(shortcut.program),
|
|
237
|
+
platform: search.platform
|
|
238
|
+
});
|
|
239
|
+
for (const file of files)
|
|
240
|
+
if (ourShortcut(file.path))
|
|
241
|
+
changeFile(file.path, () => rmSync(file.path, { force: true }));
|
|
242
|
+
return { ...statusOf(shortcut.name, shortcut.program, search), changed: true };
|
|
243
|
+
}), "removeShortcuts");
|
|
244
|
+
|
|
245
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/wcat/dispatch.js
|
|
246
|
+
var DEFAULT_DESCRIBE_TIMEOUT_MS = 2e3;
|
|
247
|
+
var listTools = /* @__PURE__ */ __name(async (context) => {
|
|
248
|
+
const installed = installedPrograms(context);
|
|
249
|
+
const timeoutMs = context.describeTimeoutMs ?? DEFAULT_DESCRIBE_TIMEOUT_MS;
|
|
250
|
+
const found = await Promise.all([...installed].map(async ([name, paths]) => {
|
|
251
|
+
const [path, ...shadowed] = paths;
|
|
252
|
+
const own = context.self?.command === name ? context.self : void 0;
|
|
253
|
+
const described = own ?? await probeDescribe(path, { env: context.env, timeoutMs });
|
|
254
|
+
return {
|
|
255
|
+
name,
|
|
256
|
+
installed: true,
|
|
257
|
+
path,
|
|
258
|
+
...described?.version ? { version: described.version } : {},
|
|
259
|
+
...described?.description ? { description: described.description } : {},
|
|
260
|
+
...described?.docs ? { docs_url: described.docs } : {},
|
|
261
|
+
...shadowed.length > 0 ? { shadowed } : {}
|
|
262
|
+
};
|
|
263
|
+
}));
|
|
264
|
+
const missing = FIRST_PARTY_TOOLS.filter((tool) => tool.package && !installed.has(tool.name)).map((tool) => ({
|
|
265
|
+
name: tool.name,
|
|
266
|
+
installed: false,
|
|
267
|
+
package: tool.package,
|
|
268
|
+
install: `npm install -g ${tool.package}`
|
|
269
|
+
}));
|
|
270
|
+
return [...found, ...missing];
|
|
271
|
+
}, "listTools");
|
|
272
|
+
var envelope = /* @__PURE__ */ __name((items, started) => ({
|
|
273
|
+
items,
|
|
274
|
+
page: { mode: "page", limit: Math.max(items.length, 1), has_more: false },
|
|
275
|
+
meta: { run_id: randomUUID(), duration_ms: Math.max(0, Math.round(performance.now() - started)), complete: true }
|
|
276
|
+
}), "envelope");
|
|
277
|
+
var column = /* @__PURE__ */ __name((rows) => {
|
|
278
|
+
const widths = rows[0]?.map((_, at) => rows.reduce((wide, row) => Math.max(wide, (row[at] ?? "").length), 0)) ?? [];
|
|
279
|
+
return rows.map((row) => ` ${row.map((cell, at) => cell.padEnd(widths[at] ?? 0)).join(" ")}`.trimEnd());
|
|
280
|
+
}, "column");
|
|
281
|
+
var USAGE = [
|
|
282
|
+
"wcat <tool> [arguments] run a tool: wcat tg --help",
|
|
283
|
+
"wcat shortcuts [add|remove] [tool...] short names, such as tg, for installed tools",
|
|
284
|
+
"wcat --json the list below as JSON"
|
|
285
|
+
];
|
|
286
|
+
var listText = /* @__PURE__ */ __name((tools) => {
|
|
287
|
+
const installed = tools.filter((tool) => tool.installed);
|
|
288
|
+
const missing = tools.filter((tool) => !tool.installed);
|
|
289
|
+
return [
|
|
290
|
+
"wcat runs WireCat tools, and any other wcat-<name> program on PATH.",
|
|
291
|
+
"",
|
|
292
|
+
...USAGE,
|
|
293
|
+
"",
|
|
294
|
+
installed.length > 0 ? "Installed:" : "Installed: none",
|
|
295
|
+
...column(installed.map((tool) => [tool.name, tool.version ?? "", tool.description ?? "(no description)"])),
|
|
296
|
+
...missing.length > 0 ? ["", "Not installed:", ...column(missing.map((tool) => [tool.name, tool.install ?? ""]))] : [],
|
|
297
|
+
""
|
|
298
|
+
].join("\n");
|
|
299
|
+
}, "listText");
|
|
300
|
+
var shadowWarnings = /* @__PURE__ */ __name((tools) => tools.filter((tool) => tool.shadowed).map((tool) => `wcat: ${(tool.shadowed?.length ?? 0) + 1} programs are named ${PROGRAM_PREFIX}${tool.name}; wcat runs the first:
|
|
301
|
+
${[tool.path, ...tool.shadowed ?? []].map((path) => ` ${path}`).join("\n")}
|
|
302
|
+
`).join(""), "shadowWarnings");
|
|
303
|
+
var shortcutText = /* @__PURE__ */ __name((shortcuts2) => {
|
|
304
|
+
if (shortcuts2.length === 0)
|
|
305
|
+
return "No wcat-<name> programs are installed.\n";
|
|
306
|
+
const said = /* @__PURE__ */ __name((shortcut) => {
|
|
307
|
+
switch (shortcut.status) {
|
|
308
|
+
case "made":
|
|
309
|
+
return `made: ${shortcut.path}`;
|
|
310
|
+
case "free":
|
|
311
|
+
return shortcut.changed ? "removed" : "free: wcat shortcuts add makes it";
|
|
312
|
+
case "package":
|
|
313
|
+
return `installed by the package: ${shortcut.path}`;
|
|
314
|
+
case "taken":
|
|
315
|
+
return `taken by ${shortcut.path}`;
|
|
316
|
+
}
|
|
317
|
+
}, "said");
|
|
318
|
+
return `${column(shortcuts2.map((shortcut) => [shortcut.name, said(shortcut)])).join("\n")}
|
|
319
|
+
`;
|
|
320
|
+
}, "shortcutText");
|
|
321
|
+
var signalNumber = /* @__PURE__ */ __name((signal) => constants.signals[signal] ?? 1, "signalNumber");
|
|
322
|
+
var runTool = /* @__PURE__ */ __name((path, args, context) => new Promise((resolve, reject) => {
|
|
323
|
+
const signals = context.signals ?? process;
|
|
324
|
+
const child = (0, import_cross_spawn2.default)(path, [...args], { stdio: "inherit", env: context.env });
|
|
325
|
+
const pass = /* @__PURE__ */ __name((signal) => () => child.kill(signal), "pass");
|
|
326
|
+
const term = pass("SIGTERM");
|
|
327
|
+
const hup = pass("SIGHUP");
|
|
328
|
+
const ignore = /* @__PURE__ */ __name(() => {
|
|
329
|
+
}, "ignore");
|
|
330
|
+
signals.on("SIGTERM", term).on("SIGHUP", hup).on("SIGINT", ignore);
|
|
331
|
+
const done = /* @__PURE__ */ __name(() => signals.off("SIGTERM", term).off("SIGHUP", hup).off("SIGINT", ignore), "done");
|
|
332
|
+
child.once("error", (error) => {
|
|
333
|
+
done();
|
|
334
|
+
reject(new CliError("configuration_error", `could not start ${path}: ${error.message}`));
|
|
335
|
+
});
|
|
336
|
+
child.once("exit", (code, signal) => {
|
|
337
|
+
done();
|
|
338
|
+
resolve(code ?? (signal ? 128 + signalNumber(signal) : 1));
|
|
339
|
+
});
|
|
340
|
+
}), "runTool");
|
|
341
|
+
var fail = /* @__PURE__ */ __name(async (error, json, context) => {
|
|
342
|
+
const { errorObjectOf, exitCodeOfError, renderError } = await import("./failure-DNQYXP2T.js");
|
|
343
|
+
const object = errorObjectOf(error);
|
|
344
|
+
context.stderr.write(`${renderError(object, { cli: "wcat", interactive: !json })}
|
|
345
|
+
`);
|
|
346
|
+
return exitCodeOfError(object);
|
|
347
|
+
}, "fail");
|
|
348
|
+
var shortcuts = /* @__PURE__ */ __name(async (args, json, context) => {
|
|
349
|
+
const [action, ...names] = args;
|
|
350
|
+
const started = performance.now();
|
|
351
|
+
const result = action === "add" ? addShortcuts(context, names) : action === "remove" ? removeShortcuts(context, names) : action === void 0 || action === "list" ? listShortcuts(context, names) : void 0;
|
|
352
|
+
if (result === void 0)
|
|
353
|
+
throw new CliError("validation_error", `wcat shortcuts takes list, add or remove, not "${action}"`, {
|
|
354
|
+
reason: "input.invalid"
|
|
355
|
+
});
|
|
356
|
+
context.stdout.write(json ? `${JSON.stringify(envelope(result, started))}
|
|
357
|
+
` : shortcutText(result));
|
|
358
|
+
return 0;
|
|
359
|
+
}, "shortcuts");
|
|
360
|
+
var runWcat = /* @__PURE__ */ __name(async (args, context) => {
|
|
361
|
+
const [first, ...rest] = args;
|
|
362
|
+
const json = args.includes("--json");
|
|
363
|
+
const words = args.filter((word) => word !== "--json");
|
|
364
|
+
const started = performance.now();
|
|
365
|
+
try {
|
|
366
|
+
if (first === "--version" || first === "-V" || first === "version") {
|
|
367
|
+
const tools = await listTools(context);
|
|
368
|
+
const by = context.self ? `, run by ${PROGRAM_PREFIX}${context.self.command} ${context.self.version}` : "";
|
|
369
|
+
context.stdout.write(`wcat ${baseVersion()} (@wirecat/cli-base${by})
|
|
370
|
+
|
|
371
|
+
${listText(tools)}`);
|
|
372
|
+
return 0;
|
|
373
|
+
}
|
|
374
|
+
if (words.length === 0 || first === "--help" || first === "-h" || first === "help") {
|
|
375
|
+
const tools = await listTools(context);
|
|
376
|
+
if (json)
|
|
377
|
+
context.stdout.write(`${JSON.stringify(envelope(tools, started))}
|
|
378
|
+
`);
|
|
379
|
+
else {
|
|
380
|
+
context.stderr.write(shadowWarnings(tools));
|
|
381
|
+
context.stdout.write(listText(tools));
|
|
382
|
+
}
|
|
383
|
+
return 0;
|
|
384
|
+
}
|
|
385
|
+
if (first === "shortcuts")
|
|
386
|
+
return await shortcuts(words.slice(1), json, context);
|
|
387
|
+
if (BUILT_IN_COMMANDS.includes(first))
|
|
388
|
+
throw new CliError("validation_error", `wcat ${first} is reserved for a later version of wcat`, {
|
|
389
|
+
reason: "input.invalid"
|
|
390
|
+
});
|
|
391
|
+
if (first?.startsWith("-"))
|
|
392
|
+
throw new CliError("validation_error", `wcat does not take ${first} before a tool's name`, {
|
|
393
|
+
reason: "input.invalid"
|
|
394
|
+
});
|
|
395
|
+
const name = first;
|
|
396
|
+
const [path, ...shadowed] = TOOL_NAME.test(name) ? findOnPath(`${PROGRAM_PREFIX}${name}`, context) : [];
|
|
397
|
+
if (path === void 0) {
|
|
398
|
+
const installed = [...installedPrograms(context).keys()];
|
|
399
|
+
throw new CliError("not_found", `no ${PROGRAM_PREFIX}${name} on PATH; installed: ${installed.length > 0 ? installed.join(", ") : "none"}`, { reason: "tool.not-installed", tool: name, installed });
|
|
400
|
+
}
|
|
401
|
+
if (shadowed.length > 0 && context.stderr.isTTY)
|
|
402
|
+
context.stderr.write(shadowWarnings([{ name, installed: true, path, shadowed }]));
|
|
403
|
+
return await runTool(path, rest, context);
|
|
404
|
+
} catch (error) {
|
|
405
|
+
return fail(error, json, context);
|
|
406
|
+
}
|
|
407
|
+
}, "runWcat");
|
|
408
|
+
export {
|
|
409
|
+
listTools,
|
|
410
|
+
runTool,
|
|
411
|
+
runWcat
|
|
412
|
+
};
|
package/dist/bundle/drive.js
CHANGED
|
@@ -1,14 +1,19 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire as __bundleRequire } from "node:module";
|
|
3
3
|
const require = __bundleRequire(import.meta.url);
|
|
4
|
+
import {
|
|
5
|
+
processStreams
|
|
6
|
+
} from "./chunk-CBM2XAEZ.js";
|
|
4
7
|
import {
|
|
5
8
|
errorObjectOf,
|
|
6
9
|
exitCodeOfError,
|
|
7
|
-
processStreams,
|
|
8
10
|
renderError
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-GIQFBXQN.js";
|
|
11
|
+
} from "./chunk-V36RIXFA.js";
|
|
11
12
|
import "./chunk-Y5E2WNWB.js";
|
|
13
|
+
import "./chunk-HIP43OGZ.js";
|
|
14
|
+
import "./chunk-UQPKAY6I.js";
|
|
15
|
+
import "./chunk-3U22QTU6.js";
|
|
16
|
+
import "./chunk-EBLA7GXY.js";
|
|
12
17
|
import {
|
|
13
18
|
__name
|
|
14
19
|
} from "./chunk-ZVVMGPBJ.js";
|
|
@@ -16,24 +21,37 @@ import {
|
|
|
16
21
|
// dist/bin/drive.js
|
|
17
22
|
import { enableCompileCache } from "node:module";
|
|
18
23
|
enableCompileCache();
|
|
19
|
-
var [{
|
|
20
|
-
import("./
|
|
21
|
-
import("./identity-
|
|
22
|
-
import("./reasons-VHCVYH54.js"),
|
|
23
|
-
import("./terminal-DHJ4D3BC.js")
|
|
24
|
+
var [{ wcatStart }, { DRIVE_APP }] = await Promise.all([
|
|
25
|
+
import("./start-TZWKM4AH.js"),
|
|
26
|
+
import("./identity-ARDPFYV5.js")
|
|
24
27
|
]);
|
|
25
|
-
await
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
signal: entry.signal,
|
|
31
|
-
ask: /* @__PURE__ */ __name((key) => entry.ask(`Allow ${key}?`), "ask"),
|
|
32
|
-
openBrowser: /* @__PURE__ */ __name((url) => entry.openBrowser(url), "openBrowser")
|
|
33
|
-
}), "run"),
|
|
34
|
-
fail: /* @__PURE__ */ __name((error, entry) => {
|
|
35
|
-
const object = errorObjectOf(error);
|
|
36
|
-
processStreams.diagnostic(renderError(object, { cli: DRIVE_APP.command, interactive: interactiveOf(entry.args, entry.tty) }));
|
|
37
|
-
return exitCodeOfError(object);
|
|
38
|
-
}, "fail")
|
|
28
|
+
var wcat = await wcatStart({
|
|
29
|
+
command: DRIVE_APP.command,
|
|
30
|
+
version: DRIVE_APP.version,
|
|
31
|
+
description: DRIVE_APP.description,
|
|
32
|
+
docs: "https://github.com/WireCatLabs/drive-cli#readme"
|
|
39
33
|
});
|
|
34
|
+
if (wcat.code !== void 0) {
|
|
35
|
+
process.exitCode = wcat.code;
|
|
36
|
+
} else {
|
|
37
|
+
const [{ startCli }, { REASONS }, { interactiveOf }] = await Promise.all([
|
|
38
|
+
import("./entry-CNOYSSSD.js"),
|
|
39
|
+
import("./reasons-LOQ5J73F.js"),
|
|
40
|
+
import("./terminal-DHJ4D3BC.js")
|
|
41
|
+
]);
|
|
42
|
+
await startCli({
|
|
43
|
+
app: DRIVE_APP,
|
|
44
|
+
interactive: interactiveOf,
|
|
45
|
+
reasons: REASONS,
|
|
46
|
+
run: /* @__PURE__ */ __name(async (entry) => (await import("./program-Q4VWV2MR.js")).run(entry.args, {
|
|
47
|
+
signal: entry.signal,
|
|
48
|
+
ask: /* @__PURE__ */ __name((key) => entry.ask(`Allow ${key}?`), "ask"),
|
|
49
|
+
openBrowser: /* @__PURE__ */ __name((url) => entry.openBrowser(url), "openBrowser")
|
|
50
|
+
}), "run"),
|
|
51
|
+
fail: /* @__PURE__ */ __name((error, entry) => {
|
|
52
|
+
const object = errorObjectOf(error);
|
|
53
|
+
processStreams.diagnostic(renderError(object, { cli: DRIVE_APP.command, interactive: interactiveOf(entry.args, entry.tty) }));
|
|
54
|
+
return exitCodeOfError(object);
|
|
55
|
+
}, "fail")
|
|
56
|
+
});
|
|
57
|
+
}
|
|
@@ -42399,7 +42399,7 @@ function install11(registers) {
|
|
|
42399
42399
|
}
|
|
42400
42400
|
__name(install11, "install");
|
|
42401
42401
|
|
|
42402
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42402
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.561.0_@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_type_ef328e5cd047e3c19bb2231542618c08/node_modules/@wirecat/cli-core/dist/charts/echarts-option.js
|
|
42403
42403
|
var echartsOption = /* @__PURE__ */ __name((chart) => ({
|
|
42404
42404
|
animation: false,
|
|
42405
42405
|
backgroundColor: "#111827",
|
|
@@ -42447,7 +42447,7 @@ var echartsOption = /* @__PURE__ */ __name((chart) => ({
|
|
|
42447
42447
|
} : {}
|
|
42448
42448
|
}), "echartsOption");
|
|
42449
42449
|
|
|
42450
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42450
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.561.0_@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_type_ef328e5cd047e3c19bb2231542618c08/node_modules/@wirecat/cli-core/dist/charts/echarts.js
|
|
42451
42451
|
use([install2, install, install6, install5, install10, install7, install11]);
|
|
42452
42452
|
var echartsRenderer = {
|
|
42453
42453
|
render: /* @__PURE__ */ __name(async (chart, size) => {
|
|
@@ -13,13 +13,17 @@ import {
|
|
|
13
13
|
truncated,
|
|
14
14
|
unit,
|
|
15
15
|
warmEmbedders
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-P3ZTW2ZM.js";
|
|
17
17
|
import "./chunk-5DPV7X27.js";
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
21
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-TI55J3BA.js";
|
|
19
|
+
import "./chunk-3VSUT6BD.js";
|
|
20
|
+
import "./chunk-CBM2XAEZ.js";
|
|
21
|
+
import "./chunk-V36RIXFA.js";
|
|
22
22
|
import "./chunk-Y5E2WNWB.js";
|
|
23
|
+
import "./chunk-HIP43OGZ.js";
|
|
24
|
+
import "./chunk-UQPKAY6I.js";
|
|
25
|
+
import "./chunk-3U22QTU6.js";
|
|
26
|
+
import "./chunk-EBLA7GXY.js";
|
|
23
27
|
import "./chunk-ZVVMGPBJ.js";
|
|
24
28
|
export {
|
|
25
29
|
WARM_IDLE_MS,
|
|
@@ -4,26 +4,30 @@ import {
|
|
|
4
4
|
openSession,
|
|
5
5
|
truncated,
|
|
6
6
|
unit
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-P3ZTW2ZM.js";
|
|
8
8
|
import "./chunk-5DPV7X27.js";
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import
|
|
13
|
-
CliError
|
|
14
|
-
} from "./chunk-GIQFBXQN.js";
|
|
9
|
+
import "./chunk-TI55J3BA.js";
|
|
10
|
+
import "./chunk-3VSUT6BD.js";
|
|
11
|
+
import "./chunk-CBM2XAEZ.js";
|
|
12
|
+
import "./chunk-V36RIXFA.js";
|
|
15
13
|
import {
|
|
16
14
|
importFrom
|
|
17
15
|
} from "./chunk-Y5E2WNWB.js";
|
|
16
|
+
import "./chunk-HIP43OGZ.js";
|
|
17
|
+
import "./chunk-UQPKAY6I.js";
|
|
18
|
+
import "./chunk-3U22QTU6.js";
|
|
19
|
+
import {
|
|
20
|
+
CliError
|
|
21
|
+
} from "./chunk-EBLA7GXY.js";
|
|
18
22
|
import {
|
|
19
23
|
__name
|
|
20
24
|
} from "./chunk-ZVVMGPBJ.js";
|
|
21
25
|
|
|
22
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.561.0_@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_type_ef328e5cd047e3c19bb2231542618c08/node_modules/@wirecat/cli-core/dist/images/picture/embedder.js
|
|
23
27
|
import { readFileSync } from "node:fs";
|
|
24
28
|
import { join } from "node:path";
|
|
25
29
|
|
|
26
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.561.0_@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_type_ef328e5cd047e3c19bb2231542618c08/node_modules/@wirecat/cli-core/dist/images/picture/preprocess.js
|
|
27
31
|
var SIZE = 224;
|
|
28
32
|
var MEAN = [0.48145466, 0.4578275, 0.40821073];
|
|
29
33
|
var STD = [0.26862954, 0.26130258, 0.27577711];
|
|
@@ -62,7 +66,7 @@ var preprocess = /* @__PURE__ */ __name(async (bytes, load = importCanvas) => {
|
|
|
62
66
|
return pixels;
|
|
63
67
|
}, "preprocess");
|
|
64
68
|
|
|
65
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
69
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.561.0_@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_type_ef328e5cd047e3c19bb2231542618c08/node_modules/@wirecat/cli-core/dist/images/picture/embedder.js
|
|
66
70
|
var openPictureEmbedder = /* @__PURE__ */ __name(async (model, directory, { threads = 4, canvas } = {}) => {
|
|
67
71
|
const { Tokenizer } = await importFrom(new URL("images/picture/embedder.js", import.meta.resolve("@wirecat/cli-core")).href, "@huggingface/tokenizers");
|
|
68
72
|
const path = /* @__PURE__ */ __name((name) => join(directory, model.id, name), "path");
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { createRequire as __bundleRequire } from "node:module";
|
|
2
|
+
const require = __bundleRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
openBrowser,
|
|
5
|
+
startCli
|
|
6
|
+
} from "./chunk-HWLLVLAB.js";
|
|
7
|
+
import "./chunk-IIP43FQJ.js";
|
|
8
|
+
import "./chunk-H2BKXPBL.js";
|
|
9
|
+
import "./chunk-QTM7USFA.js";
|
|
10
|
+
import "./chunk-KPRGTTJH.js";
|
|
11
|
+
import "./chunk-CBM2XAEZ.js";
|
|
12
|
+
import "./chunk-V36RIXFA.js";
|
|
13
|
+
import "./chunk-Y5E2WNWB.js";
|
|
14
|
+
import "./chunk-HIP43OGZ.js";
|
|
15
|
+
import "./chunk-UQPKAY6I.js";
|
|
16
|
+
import "./chunk-3U22QTU6.js";
|
|
17
|
+
import "./chunk-EBLA7GXY.js";
|
|
18
|
+
import "./chunk-ZVVMGPBJ.js";
|
|
19
|
+
export {
|
|
20
|
+
openBrowser,
|
|
21
|
+
startCli
|
|
22
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { createRequire as __bundleRequire } from "node:module";
|
|
2
|
+
const require = __bundleRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
catchCrashes,
|
|
5
|
+
errorObjectOf,
|
|
6
|
+
errorRecordOf,
|
|
7
|
+
exitCodeOfAnswer,
|
|
8
|
+
exitCodeOfError,
|
|
9
|
+
mcpErrorResult,
|
|
10
|
+
renderError,
|
|
11
|
+
retryOf
|
|
12
|
+
} from "./chunk-V36RIXFA.js";
|
|
13
|
+
import "./chunk-HIP43OGZ.js";
|
|
14
|
+
import "./chunk-3U22QTU6.js";
|
|
15
|
+
import "./chunk-EBLA7GXY.js";
|
|
16
|
+
import "./chunk-ZVVMGPBJ.js";
|
|
17
|
+
export {
|
|
18
|
+
catchCrashes,
|
|
19
|
+
errorObjectOf,
|
|
20
|
+
errorRecordOf,
|
|
21
|
+
exitCodeOfAnswer,
|
|
22
|
+
exitCodeOfError,
|
|
23
|
+
mcpErrorResult,
|
|
24
|
+
renderError,
|
|
25
|
+
retryOf
|
|
26
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { createRequire as __bundleRequire } from "node:module";
|
|
2
|
+
const require = __bundleRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
askSetupQuestions,
|
|
5
|
+
asksAtStart,
|
|
6
|
+
setupAtStart,
|
|
7
|
+
systemLanguage
|
|
8
|
+
} from "./chunk-6C6255U6.js";
|
|
9
|
+
import "./chunk-JW2CVCUH.js";
|
|
10
|
+
import "./chunk-P7WPYKSB.js";
|
|
11
|
+
import "./chunk-ZYCLPJ7U.js";
|
|
12
|
+
import "./chunk-OKXSTWKW.js";
|
|
13
|
+
import "./chunk-IBZ3IBO4.js";
|
|
14
|
+
import "./chunk-3VSUT6BD.js";
|
|
15
|
+
import "./chunk-D72URWJE.js";
|
|
16
|
+
import "./chunk-2AXA5SKP.js";
|
|
17
|
+
import "./chunk-CBM2XAEZ.js";
|
|
18
|
+
import "./chunk-V36RIXFA.js";
|
|
19
|
+
import "./chunk-Y5E2WNWB.js";
|
|
20
|
+
import "./chunk-HIP43OGZ.js";
|
|
21
|
+
import "./chunk-UQPKAY6I.js";
|
|
22
|
+
import "./chunk-3U22QTU6.js";
|
|
23
|
+
import "./chunk-EBLA7GXY.js";
|
|
24
|
+
import "./chunk-ZVVMGPBJ.js";
|
|
25
|
+
export {
|
|
26
|
+
askSetupQuestions,
|
|
27
|
+
asksAtStart,
|
|
28
|
+
setupAtStart,
|
|
29
|
+
systemLanguage
|
|
30
|
+
};
|