@wirecat/drive-cli 0.44.0 → 0.45.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 +35 -40
- package/dist/bundle/all-profiles-LTHNCWQW.js +26 -0
- package/dist/bundle/anthropic-NOJEF3V2.js +71 -0
- package/dist/bundle/bun-ADJVI4HY.js +169 -0
- package/dist/bundle/bun-sqlite-GNXLBF2A.js +70 -0
- package/dist/bundle/chunk-2FTZBZOB.js +2315 -0
- package/dist/bundle/chunk-2YU3CXFD.js +3391 -0
- package/dist/bundle/chunk-35GRI4DI.js +375 -0
- package/dist/bundle/chunk-37MAA6F2.js +5624 -0
- package/dist/bundle/chunk-3V6NPZY7.js +2352 -0
- package/dist/bundle/chunk-4TIC23D2.js +9 -0
- package/dist/bundle/chunk-4TQSNQVV.js +1071 -0
- package/dist/bundle/chunk-4UE7AVHZ.js +150 -0
- package/dist/bundle/chunk-5DPV7X27.js +663 -0
- package/dist/bundle/chunk-5FONRUG6.js +24805 -0
- package/dist/bundle/chunk-5ZVLM6YR.js +19 -0
- package/dist/bundle/chunk-64WJYT2F.js +3954 -0
- package/dist/bundle/chunk-65GGKAQ7.js +82 -0
- package/dist/bundle/chunk-66N2DGGC.js +515 -0
- package/dist/bundle/chunk-6KFA6HOM.js +2941 -0
- package/dist/bundle/chunk-6Y2BYFXQ.js +65 -0
- package/dist/bundle/chunk-7NCG2SHR.js +74 -0
- package/dist/bundle/chunk-7PVNJAQ2.js +73 -0
- package/dist/bundle/chunk-7XWUOCGW.js +190 -0
- package/dist/bundle/chunk-A6ZKTNTZ.js +168 -0
- package/dist/bundle/chunk-ADLS6FVG.js +24600 -0
- package/dist/bundle/chunk-AH3SNVCV.js +498 -0
- package/dist/bundle/chunk-AN3GVZTU.js +76 -0
- package/dist/bundle/chunk-BPBIBVFH.js +166 -0
- package/dist/bundle/chunk-C4XP5T73.js +264 -0
- package/dist/bundle/chunk-C6SMAEED.js +18102 -0
- package/dist/bundle/chunk-CDI67JSB.js +1092 -0
- package/dist/bundle/chunk-CEO5HPRL.js +25 -0
- package/dist/bundle/chunk-CFT7UHF6.js +15572 -0
- package/dist/bundle/chunk-DC4T3FNP.js +1913 -0
- package/dist/bundle/chunk-DCTXOMOR.js +35 -0
- package/dist/bundle/chunk-DFDN6AUB.js +21 -0
- package/dist/bundle/chunk-EVWXODYV.js +754 -0
- package/dist/bundle/chunk-GKHM6I64.js +2356 -0
- package/dist/bundle/chunk-GNI7INK6.js +18 -0
- package/dist/bundle/chunk-GTYY6BIE.js +58 -0
- package/dist/bundle/chunk-GX4WEMAG.js +164 -0
- package/dist/bundle/chunk-HA3WCVGY.js +8179 -0
- package/dist/bundle/chunk-HLONHTSG.js +281 -0
- package/dist/bundle/chunk-HOIUIKWS.js +236 -0
- package/dist/bundle/chunk-HTQTIKWP.js +928 -0
- package/dist/bundle/chunk-I5EJHKNC.js +111 -0
- package/dist/bundle/chunk-ICKNJIGE.js +31 -0
- package/dist/bundle/chunk-IGB5CJCA.js +62 -0
- package/dist/bundle/chunk-IP4OK7RQ.js +24 -0
- package/dist/bundle/chunk-IVQ6342B.js +2 -0
- package/dist/bundle/chunk-K4N2DKE5.js +17 -0
- package/dist/bundle/chunk-LNB7BIZL.js +844 -0
- package/dist/bundle/chunk-LVDHWNJF.js +193 -0
- package/dist/bundle/chunk-LW2G4U6W.js +570 -0
- package/dist/bundle/chunk-LWT55XC5.js +60 -0
- package/dist/bundle/chunk-LY26NW3I.js +6848 -0
- package/dist/bundle/chunk-MJR2OTO4.js +1714 -0
- package/dist/bundle/chunk-MWUITL6N.js +42 -0
- package/dist/bundle/chunk-N47CYWEM.js +454 -0
- package/dist/bundle/chunk-NKZ6V4JW.js +263 -0
- package/dist/bundle/chunk-NQ6LLDDC.js +161 -0
- package/dist/bundle/chunk-NZIHPYY5.js +215 -0
- package/dist/bundle/chunk-OECPFZLP.js +3541 -0
- package/dist/bundle/chunk-P5KGFT7U.js +18 -0
- package/dist/bundle/chunk-PDH2QQQV.js +484 -0
- package/dist/bundle/chunk-PIN5RZ3D.js +63 -0
- package/dist/bundle/chunk-PJDO7AFZ.js +421 -0
- package/dist/bundle/chunk-PWKXHDBQ.js +18078 -0
- package/dist/bundle/chunk-QLZGLPJL.js +100 -0
- package/dist/bundle/chunk-SBZB7HMU.js +1055 -0
- package/dist/bundle/chunk-SGOPYPVW.js +835 -0
- package/dist/bundle/chunk-TDC6JGDA.js +630 -0
- package/dist/bundle/chunk-TOYPN2XX.js +288 -0
- package/dist/bundle/chunk-UC44ZMQV.js +78 -0
- package/dist/bundle/chunk-V7GN5BI7.js +99 -0
- package/dist/bundle/chunk-VO4KOLQZ.js +119 -0
- package/dist/bundle/chunk-WPGCDWPU.js +1855 -0
- package/dist/bundle/chunk-WQMVSQPP.js +886 -0
- package/dist/bundle/chunk-WZUJKUBK.js +384 -0
- package/dist/bundle/chunk-X5DFDGWS.js +2 -0
- package/dist/bundle/chunk-XFLCVHSQ.js +50 -0
- package/dist/bundle/chunk-XPEWOPJR.js +431 -0
- package/dist/bundle/chunk-Y5E2WNWB.js +35 -0
- package/dist/bundle/chunk-Y5EJSZXV.js +220 -0
- package/dist/bundle/chunk-YE3J6DLY.js +106 -0
- package/dist/bundle/chunk-YFLKH3NZ.js +48 -0
- package/dist/bundle/chunk-YJX4X564.js +138 -0
- package/dist/bundle/chunk-YJZBJ2TM.js +71 -0
- package/dist/bundle/chunk-Z4O6C7WR.js +1973 -0
- package/dist/bundle/chunk-ZIHLE7LG.js +15992 -0
- package/dist/bundle/chunk-ZPMLLONT.js +1054 -0
- package/dist/bundle/chunk-ZQNXKWUY.js +35584 -0
- package/dist/bundle/chunk-ZS635F4O.js +45 -0
- package/dist/bundle/chunk-ZU732VCC.js +122 -0
- package/dist/bundle/chunk-ZVVMGPBJ.js +50 -0
- package/dist/bundle/command-contract-HX35D7KV.js +38 -0
- package/dist/bundle/dist-MWTMOYWT.js +7577 -0
- package/dist/bundle/dist-PY3MVR3G.js +21 -0
- package/dist/bundle/drive.js +50 -0
- package/dist/bundle/echarts-RFTK737T.js +42501 -0
- package/dist/bundle/embed-5NAGJUMD.js +37 -0
- package/dist/bundle/embedder-EWXLIGBY.js +110 -0
- package/dist/bundle/entry-YCPJ6H6U.js +15 -0
- package/dist/bundle/failure-XBWHHBEW.js +37 -0
- package/dist/bundle/first-run-LNAZDBB4.js +24 -0
- package/dist/bundle/first-screen-P5NNFJD7.js +36 -0
- package/dist/bundle/google-5FFKRHHC.js +32 -0
- package/dist/bundle/google-api-TJCFOOAP.js +82 -0
- package/dist/bundle/identity-53ZMPL2O.js +10 -0
- package/dist/bundle/instructions-FHNL7CMW.js +9 -0
- package/dist/bundle/login-VXXZZR6G.js +158 -0
- package/dist/bundle/mcp-2CJCJXSW.js +95 -0
- package/dist/bundle/mcp-F4XZO76F.js +507 -0
- package/dist/bundle/mcp-IXFC2VVR.js +165 -0
- package/dist/bundle/mdast-util-from-markdown-FXEPSNER.js +1958 -0
- package/dist/bundle/mdast-util-gfm-SZM5GBDF.js +2103 -0
- package/dist/bundle/micromark-extension-gfm-GRL24TU6.js +1838 -0
- package/dist/bundle/node-P4E63KXA.js +2340 -0
- package/dist/bundle/node-TLZSIHIJ.js +21 -0
- package/dist/bundle/node-ZMCACJVS.js +176 -0
- package/dist/bundle/node-sqlite-QJQ5S7KS.js +46 -0
- package/dist/bundle/oauth-TZFDPAFE.js +18 -0
- package/dist/bundle/open-IYM25QTL.js +20 -0
- package/dist/bundle/process-ZPTLNVQS.js +91 -0
- package/dist/bundle/program-YX7DZMPR.js +24100 -0
- package/dist/bundle/prompt-TGWTVIEK.js +13 -0
- package/dist/bundle/reasons-Q5LOQESQ.js +11 -0
- package/dist/bundle/recognize-AGPMWKIY.js +191 -0
- package/dist/bundle/remote-QV7QSLAK.js +28 -0
- package/dist/bundle/rerank-HZKJJCS4.js +51 -0
- package/dist/bundle/serve-NRJQOVT4.js +20 -0
- package/dist/bundle/server-2UQDEWTS.js +818 -0
- package/dist/bundle/server-R4JUHFSW.js +56 -0
- package/dist/bundle/services-NZQWVMOE.js +333 -0
- package/dist/bundle/sqlite-runtime-6MXHTYYU.js +17 -0
- package/dist/bundle/state-IF2FLTSY.js +34 -0
- package/dist/bundle/store-HBD54IRL.js +142 -0
- package/dist/bundle/store-HVIBXOXS.js +125 -0
- package/dist/bundle/store-maintenance-command-U3F4RGJB.js +57 -0
- package/dist/bundle/terminal-TFCTWLOS.js +11 -0
- package/dist/bundle/tokens-5D5YUA2Q.js +103 -0
- package/dist/commands/mcp.d.ts.map +1 -1
- package/dist/commands/mcp.js +87 -37
- package/dist/commands/mcp.js.map +1 -1
- package/dist/contract-overrides.d.ts.map +1 -1
- package/dist/contract-overrides.js +78 -53
- package/dist/contract-overrides.js.map +1 -1
- package/dist/mcp.d.ts +13 -5
- package/dist/mcp.d.ts.map +1 -1
- package/dist/mcp.js +20 -10
- package/dist/mcp.js.map +1 -1
- package/dist/program.js +4 -4
- package/dist/program.js.map +1 -1
- package/dist/registry.d.ts +2 -2
- package/dist/registry.d.ts.map +1 -1
- package/dist/registry.js +3 -3
- package/dist/registry.js.map +1 -1
- package/dist/state.d.ts +5 -2
- package/dist/state.d.ts.map +1 -1
- package/dist/state.js +5 -2
- package/dist/state.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +7 -5
- package/skills/drive-cli/SKILL.md +1 -0
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import { createRequire as __bundleRequire } from "node:module";
|
|
2
|
+
const require = __bundleRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
executableEnvironment,
|
|
5
|
+
executableOnPath,
|
|
6
|
+
require_cross_spawn
|
|
7
|
+
} from "./chunk-LW2G4U6W.js";
|
|
8
|
+
import {
|
|
9
|
+
loadConfigFile,
|
|
10
|
+
saveConfigFile
|
|
11
|
+
} from "./chunk-6KFA6HOM.js";
|
|
12
|
+
import {
|
|
13
|
+
number,
|
|
14
|
+
object,
|
|
15
|
+
optional,
|
|
16
|
+
string
|
|
17
|
+
} from "./chunk-GKHM6I64.js";
|
|
18
|
+
import {
|
|
19
|
+
__name,
|
|
20
|
+
__toESM
|
|
21
|
+
} from "./chunk-ZVVMGPBJ.js";
|
|
22
|
+
|
|
23
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.65.0_commander@15.0.0_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/update/index.js
|
|
24
|
+
var import_cross_spawn = __toESM(require_cross_spawn(), 1);
|
|
25
|
+
import { existsSync } from "node:fs";
|
|
26
|
+
var installerOf = /* @__PURE__ */ __name((scriptPath) => {
|
|
27
|
+
const path = scriptPath.replaceAll("\\", "/");
|
|
28
|
+
if (path.includes("/_npx/"))
|
|
29
|
+
return "npx";
|
|
30
|
+
if (path.includes("/install/global/node_modules/"))
|
|
31
|
+
return "bun";
|
|
32
|
+
if (/\/\.?pnpm\//.test(path))
|
|
33
|
+
return "pnpm";
|
|
34
|
+
if (path.includes("/node_modules/"))
|
|
35
|
+
return "npm";
|
|
36
|
+
return path.includes("/dist/") ? "checkout" : "unknown";
|
|
37
|
+
}, "installerOf");
|
|
38
|
+
var updateCommand = /* @__PURE__ */ __name((installer, packageName) => {
|
|
39
|
+
const target = `${packageName}@latest`;
|
|
40
|
+
switch (installer) {
|
|
41
|
+
// pnpm 11 installs only versions a day old (minimumReleaseAge 1440); a fix must reach users the day it ships.
|
|
42
|
+
// Only the package's own scope is exempt — every other dependency keeps the wait.
|
|
43
|
+
case "pnpm":
|
|
44
|
+
return ["pnpm", "add", "-g", target, `--config.minimumReleaseAgeExclude=${ownScope(packageName)}`];
|
|
45
|
+
case "npm":
|
|
46
|
+
return ["npm", "install", "-g", target];
|
|
47
|
+
case "bun":
|
|
48
|
+
return ["bun", "add", "-g", target];
|
|
49
|
+
default:
|
|
50
|
+
return void 0;
|
|
51
|
+
}
|
|
52
|
+
}, "updateCommand");
|
|
53
|
+
var ownScope = /* @__PURE__ */ __name((packageName) => packageName.startsWith("@") ? `${packageName.split("/", 1)[0]}/*` : packageName, "ownScope");
|
|
54
|
+
var isNewer = /* @__PURE__ */ __name((candidate, current) => {
|
|
55
|
+
const parse = /* @__PURE__ */ __name((version) => /^\d+\.\d+\.\d+$/.test(version) ? version.split(".").map(Number) : void 0, "parse");
|
|
56
|
+
const a = parse(candidate);
|
|
57
|
+
const b = parse(current);
|
|
58
|
+
if (!a || !b)
|
|
59
|
+
return false;
|
|
60
|
+
for (let i = 0; i < 3; i++) {
|
|
61
|
+
if (a[i] !== b[i])
|
|
62
|
+
return a[i] > b[i];
|
|
63
|
+
}
|
|
64
|
+
return false;
|
|
65
|
+
}, "isNewer");
|
|
66
|
+
var latestVersion = /* @__PURE__ */ __name(async (packageName, fetch, { timeoutMs = 1e3 } = {}) => {
|
|
67
|
+
try {
|
|
68
|
+
const response = await fetch(`https://registry.npmjs.org/${packageName}/latest`, {
|
|
69
|
+
signal: AbortSignal.timeout(timeoutMs),
|
|
70
|
+
headers: { accept: "application/json" }
|
|
71
|
+
});
|
|
72
|
+
if (!response.ok)
|
|
73
|
+
return void 0;
|
|
74
|
+
const { version } = await response.json();
|
|
75
|
+
return typeof version === "string" ? version : void 0;
|
|
76
|
+
} catch {
|
|
77
|
+
return void 0;
|
|
78
|
+
}
|
|
79
|
+
}, "latestVersion");
|
|
80
|
+
var CHECK_EVERY_MS = 24 * 60 * 60 * 1e3;
|
|
81
|
+
var mayNotify = /* @__PURE__ */ __name(({ format, stderrIsTTY, quiet, enabled, installer, env, offVariables = [] }) => enabled && format === "pretty" && stderrIsTTY && !quiet && updateCommand(installer, "any") !== void 0 && !env.CI && !env.NO_UPDATE_NOTIFIER && offVariables.every((name) => !env[name]), "mayNotify");
|
|
82
|
+
var updateState = object({
|
|
83
|
+
checkedAt: number(),
|
|
84
|
+
latest: optional(string()),
|
|
85
|
+
/** When the skill hint (`cli-base/skill`) was last shown — the other daily notice kept in this file. */
|
|
86
|
+
skillHintAt: optional(number())
|
|
87
|
+
});
|
|
88
|
+
var readNoticeState = /* @__PURE__ */ __name((path) => {
|
|
89
|
+
try {
|
|
90
|
+
return loadConfigFile(path, updateState, () => ({ checkedAt: 0 }));
|
|
91
|
+
} catch {
|
|
92
|
+
return { checkedAt: 0 };
|
|
93
|
+
}
|
|
94
|
+
}, "readNoticeState");
|
|
95
|
+
var readUpdateState = /* @__PURE__ */ __name((path) => {
|
|
96
|
+
const state = readNoticeState(path);
|
|
97
|
+
return state.checkedAt > 0 ? state : void 0;
|
|
98
|
+
}, "readUpdateState");
|
|
99
|
+
var writeUpdateState = /* @__PURE__ */ __name((path, state) => {
|
|
100
|
+
try {
|
|
101
|
+
saveConfigFile(path, { ...readNoticeState(path), ...state });
|
|
102
|
+
} catch {
|
|
103
|
+
}
|
|
104
|
+
}, "writeUpdateState");
|
|
105
|
+
var checkIsDue = /* @__PURE__ */ __name((state, now) => state === void 0 || now - state.checkedAt >= CHECK_EVERY_MS, "checkIsDue");
|
|
106
|
+
var spawnPlan = /* @__PURE__ */ __name(([command, ...args], platform = process.platform, env = process.env, exists = existsSync) => ({ file: executableOnPath(command, env, platform, exists), args, shell: false }), "spawnPlan");
|
|
107
|
+
var runUpdate = /* @__PURE__ */ __name((argv) => {
|
|
108
|
+
const { file, args, shell } = spawnPlan(argv);
|
|
109
|
+
const { status, error } = import_cross_spawn.default.sync(file, args, {
|
|
110
|
+
stdio: ["inherit", 2, 2],
|
|
111
|
+
shell,
|
|
112
|
+
env: executableEnvironment(process.env)
|
|
113
|
+
});
|
|
114
|
+
if (error)
|
|
115
|
+
throw new Error(`could not start ${argv[0]}: ${error.message}`);
|
|
116
|
+
return status ?? 1;
|
|
117
|
+
}, "runUpdate");
|
|
118
|
+
var updateNotice = /* @__PURE__ */ __name(async ({ argv, packageName, command, upgradeCommand = "upgrade", version, statePath, fetch, now = Date.now, ...context }) => {
|
|
119
|
+
try {
|
|
120
|
+
const path = commandWords(argv).slice(0, 2);
|
|
121
|
+
if (path.includes("complete") || path.includes(upgradeCommand))
|
|
122
|
+
return void 0;
|
|
123
|
+
if (!mayNotify(context))
|
|
124
|
+
return void 0;
|
|
125
|
+
const at = now();
|
|
126
|
+
let state = readUpdateState(statePath);
|
|
127
|
+
if (checkIsDue(state, at)) {
|
|
128
|
+
const found = await latestVersion(packageName, fetch, { timeoutMs: 1e3 });
|
|
129
|
+
const seen = found ?? state?.latest;
|
|
130
|
+
state = seen ? { checkedAt: at, latest: seen } : { checkedAt: at };
|
|
131
|
+
writeUpdateState(statePath, state);
|
|
132
|
+
}
|
|
133
|
+
return state?.latest && isNewer(state.latest, version) ? `${command} ${state.latest} is out \u2014 you have ${version}. \`${command} ${upgradeCommand}\` installs it.` : void 0;
|
|
134
|
+
} catch {
|
|
135
|
+
return void 0;
|
|
136
|
+
}
|
|
137
|
+
}, "updateNotice");
|
|
138
|
+
var commandWords = /* @__PURE__ */ __name((argv) => {
|
|
139
|
+
const end = argv.indexOf("--");
|
|
140
|
+
return argv.slice(0, end < 0 ? void 0 : end).filter((word) => !word.startsWith("-"));
|
|
141
|
+
}, "commandWords");
|
|
142
|
+
|
|
143
|
+
export {
|
|
144
|
+
installerOf,
|
|
145
|
+
updateCommand,
|
|
146
|
+
isNewer,
|
|
147
|
+
latestVersion,
|
|
148
|
+
runUpdate,
|
|
149
|
+
updateNotice
|
|
150
|
+
};
|