@wirecat/drive-cli 0.52.1 → 0.54.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 +2 -2
- package/dist/bin/drive.js.map +1 -1
- package/dist/bundle/{chunk-ZWSG7OCA.js → all-profiles-LFIPUPZI.js} +13 -8
- package/dist/bundle/{anthropic-KW6KU36Y.js → anthropic-G5ZRRWG4.js} +5 -5
- package/dist/bundle/{app-server-TCJZ333E.js → app-server-UVWATOQC.js} +48 -56
- package/dist/bundle/{bun-7SYKSCLA.js → bun-DNEFTPTR.js} +2 -2
- package/dist/bundle/{bun-sqlite-RI7DR6RZ.js → bun-sqlite-FWBYHIXB.js} +4 -4
- package/dist/bundle/{chunk-CM7GAXGD.js → chunk-2CQT2WWN.js} +5 -5
- package/dist/bundle/{chunk-HQVJK5E7.js → chunk-2D6AAGBP.js} +246 -383
- package/dist/bundle/{chunk-FG4XXZZE.js → chunk-2FFXRWI2.js} +2 -2
- package/dist/bundle/{chunk-2UIMEMWU.js → chunk-2HQPJ366.js} +3 -3
- package/dist/bundle/{chunk-CB7SBYLO.js → chunk-2HWOGSTA.js} +57 -37
- package/dist/bundle/{chunk-7XKAVMCF.js → chunk-2MSJVFAS.js} +8 -8
- package/dist/bundle/{chunk-NSIFQ5OP.js → chunk-2NWFZ43Q.js} +1 -1
- package/dist/bundle/{chunk-H47W2J6S.js → chunk-2Q3S47BC.js} +1312 -626
- package/dist/bundle/{chunk-O6IOL6RX.js → chunk-47MEPBWG.js} +21 -21
- package/dist/bundle/{chunk-725OHXKR.js → chunk-4RDXCE45.js} +2226 -37
- package/dist/bundle/{chunk-UR32UWTQ.js → chunk-5BPOAHVD.js} +13 -2
- package/dist/bundle/{chunk-5FONRUG6.js → chunk-5D4AEUVA.js} +1 -23
- package/dist/bundle/{chunk-VZ2I62HN.js → chunk-5LNOVPOR.js} +2 -2
- package/dist/bundle/{chunk-EKFEY3KP.js → chunk-5WQN2TUM.js} +1 -1
- package/dist/bundle/{chunk-ALJWBGD5.js → chunk-6MGSFYGL.js} +1 -1
- package/dist/bundle/{chunk-WUX7AUOQ.js → chunk-6RAEXK7Y.js} +26 -26
- package/dist/bundle/{chunk-BSSCTWWK.js → chunk-6SOQJRGI.js} +4 -4
- package/dist/bundle/{chunk-CKBHR7QO.js → chunk-75DSLCPC.js} +1 -1
- package/dist/bundle/{chunk-VSOLLTYT.js → chunk-76JIVDKC.js} +7 -2
- package/dist/bundle/{chunk-33NVQGUY.js → chunk-7WCZ2OZ5.js} +6 -6
- package/dist/bundle/{chunk-IDUNJCFO.js → chunk-7XU3TR7K.js} +2 -2
- package/dist/bundle/{chunk-7SH4JHYW.js → chunk-A4FTLORC.js} +12 -12
- package/dist/bundle/{chunk-CITFEQ6S.js → chunk-AACQA2CO.js} +1 -1
- package/dist/bundle/{chunk-PSNHPFSK.js → chunk-AAHIBA36.js} +1 -1
- package/dist/bundle/{chunk-PEOCBV2Z.js → chunk-BWBVBW5T.js} +8 -8
- package/dist/bundle/{chunk-A4UNTWAX.js → chunk-CVALO727.js} +99 -30
- package/dist/bundle/{chunk-G6QF5KWF.js → chunk-FHW4ENRF.js} +37 -43
- package/dist/bundle/{chunk-LONV6HIK.js → chunk-HAHARAJD.js} +455 -40
- package/dist/bundle/{chunk-2623YE5I.js → chunk-IBRXVPBI.js} +97 -99
- package/dist/bundle/{chunk-IWFBAWZK.js → chunk-IKODUUQG.js} +292 -19
- package/dist/bundle/{chunk-PQJYM5ES.js → chunk-IOMSC4ZG.js} +3 -3
- package/dist/bundle/{chunk-YKZ4IPLB.js → chunk-JKEAZBEZ.js} +7 -7
- package/dist/bundle/{chunk-FCJAHD4R.js → chunk-KIQIF5M7.js} +3 -3
- package/dist/bundle/{chunk-KYVXMEBC.js → chunk-KT5G3KVS.js} +3 -3
- package/dist/bundle/{chunk-W7IK7E4B.js → chunk-L3RV42O3.js} +20 -22
- package/dist/bundle/{chunk-NHBUTCNR.js → chunk-LQXLWHKM.js} +9 -9
- package/dist/bundle/{chunk-WBTVGFXI.js → chunk-MATUQFYL.js} +11 -11
- package/dist/bundle/{chunk-54O62JWP.js → chunk-MULPNGM2.js} +29 -10
- package/dist/bundle/{chunk-FJW3DDCF.js → chunk-N4OO3SPQ.js} +5 -5
- package/dist/bundle/{chunk-6DHQTUB2.js → chunk-NDWWGBSM.js} +1 -1
- package/dist/bundle/{chunk-DLAFGSTN.js → chunk-NHDSJMAR.js} +1 -1
- package/dist/bundle/{chunk-PQYVPCJ2.js → chunk-O6YYFVDD.js} +38 -37
- package/dist/bundle/{chunk-I7UH5CTA.js → chunk-OYGEBFFO.js} +12 -14
- package/dist/bundle/chunk-P7E7K467.js +110 -0
- package/dist/bundle/{chunk-ZNZUZGSV.js → chunk-PKNTBZXN.js} +176 -49
- package/dist/bundle/{chunk-YNFELLNQ.js → chunk-PU4GANCD.js} +3 -3
- package/dist/bundle/{chunk-5PLJKSG4.js → chunk-Q46JLJ5O.js} +7 -9
- package/dist/bundle/{chunk-R276546S.js → chunk-QKHFQHE7.js} +1 -1
- package/dist/bundle/{chunk-RNSP57TC.js → chunk-QUJCD5U7.js} +4 -4
- package/dist/bundle/{chunk-43QVYW3K.js → chunk-RIYXQFKU.js} +262 -88
- package/dist/bundle/{chunk-2AUXBJRX.js → chunk-RWEFKLXJ.js} +104 -29
- package/dist/bundle/{chunk-WQJBAWQP.js → chunk-SBOTSSYV.js} +879 -508
- package/dist/bundle/{chunk-PAXKALHV.js → chunk-U3BOQ63L.js} +118 -7
- package/dist/bundle/{chunk-VJZST5RD.js → chunk-UBJX5D2O.js} +2 -2
- package/dist/bundle/{chunk-HX7Y2ASG.js → chunk-VCGQMTHW.js} +26318 -15143
- package/dist/bundle/{chunk-7YMDL4JQ.js → chunk-VKYCMXEQ.js} +8 -5
- package/dist/bundle/{chunk-ZSXRDF6I.js → chunk-VX4RAT3A.js} +1 -1
- package/dist/bundle/{chunk-NYOPEHEU.js → chunk-W5SYBHRX.js} +8 -3
- package/dist/bundle/{chunk-XOLQSCMF.js → chunk-WGSTTWM5.js} +6 -6
- package/dist/bundle/{chunk-WLFUBNFX.js → chunk-WJRE45Z6.js} +4 -4
- package/dist/bundle/{chunk-IEXPOEEO.js → chunk-WQPTZHHR.js} +17 -26
- package/dist/bundle/{chunk-JEOYFKUK.js → chunk-WSX5UQNT.js} +2 -2
- package/dist/bundle/{chunk-LJAX6YCF.js → chunk-WYDYSQ7T.js} +2 -2
- package/dist/bundle/{chunk-C6Z25IBJ.js → chunk-XCUUYQN7.js} +4 -4
- package/dist/bundle/{chunk-GVCN3GLZ.js → chunk-YOHOQ6ZR.js} +4 -4
- package/dist/bundle/chunk-YZ5VMR2S.js +5305 -0
- package/dist/bundle/{chunk-ZDLIO76S.js → chunk-ZMMOVTUB.js} +2 -2
- package/dist/bundle/command-contract-VZ3ZJLEF.js +35 -0
- package/dist/bundle/{decode-EDN2ARXZ.js → decode-DN2DDFET.js} +4 -4
- package/dist/bundle/drive.js +11 -22
- package/dist/bundle/{echarts-GXY34GHA.js → echarts-VMHZ2UYP.js} +2 -2
- package/dist/bundle/{embed-3GSQIQXE.js → embed-MDN7R7BA.js} +5 -5
- package/dist/bundle/{embedder-6ULWRG3R.js → embedder-KEVEDNDJ.js} +8 -8
- package/dist/bundle/{entry-IPRJLFHO.js → entry-HTNK5TJQ.js} +6 -6
- package/dist/bundle/{first-run-FGHGWHC2.js → first-run-QNMCMP67.js} +9 -9
- package/dist/bundle/first-screen-RQBEHUQC.js +33 -0
- package/dist/bundle/{google-BD3ZNFVJ.js → google-QAKMV57Q.js} +9 -9
- package/dist/bundle/{chunk-GR5GGZKH.js → google-api-UJJS7ECO.js} +62 -6
- package/dist/bundle/grants-VMPKFEC2.js +98 -0
- package/dist/bundle/{identity-U7IHZEMR.js → identity-UODE3QAL.js} +4 -2
- package/dist/bundle/{instructions-K5BEQM4C.js → instructions-IWLHCDC7.js} +1 -1
- package/dist/bundle/{login-7HRYPZMM.js → login-GIZXEN7I.js} +60 -68
- package/dist/bundle/{mcp-WSGVVZWI.js → mcp-RUYPQVYS.js} +2 -2
- package/dist/bundle/{node-ZYWB7IET.js → node-25IJLDBZ.js} +2 -2
- package/dist/bundle/{node-sqlite-J3OODPYK.js → node-sqlite-DYR4FEI4.js} +4 -4
- package/dist/bundle/{oauth-L4VTCBLF.js → oauth-FLHXEDDY.js} +7 -7
- package/dist/bundle/{open-SGUN7ZVF.js → open-FWDZB7KX.js} +3 -3
- package/dist/bundle/{openai-RLVISEDH.js → openai-HB7UGKPW.js} +13 -13
- package/dist/bundle/{process-ZXO2MWRJ.js → process-P6TW37HQ.js} +1 -1
- package/dist/bundle/{program-YVLXSKZV.js → program-DVUNLXXS.js} +730 -919
- package/dist/bundle/{prompt-AUWTBLO7.js → prompt-MKWMYO3B.js} +4 -4
- package/dist/bundle/{reasons-J57GSRWN.js → reasons-25BEO2NE.js} +3 -3
- package/dist/bundle/{recognize-ORX2UBQW.js → recognize-VXGNPROM.js} +3 -3
- package/dist/bundle/{remote-AGIJY73X.js → remote-H5ZWLJHR.js} +6 -6
- package/dist/bundle/{rerank-R6PE44M5.js → rerank-5A3JDK7O.js} +6 -6
- package/dist/bundle/{chunk-G7DCVJ4F.js → serve-QNPNEZVR.js} +10 -7
- package/dist/bundle/{chunk-F7UUZATI.js → server-GWBVIRLY.js} +42 -15
- package/dist/bundle/server-QJU3HEGM.js +63 -0
- package/dist/bundle/{services-HZFTTZSF.js → services-PFXEWHJG.js} +30 -31
- package/dist/bundle/{sqlite-runtime-DTGPR2T2.js → sqlite-runtime-RGFISYXM.js} +4 -4
- package/dist/bundle/{state-WG3JKJM3.js → state-BUSX5BXF.js} +5 -5
- package/dist/bundle/{store-EV72MT5U.js → store-FIEE5HHG.js} +14 -16
- package/dist/bundle/{store-33VHIMEO.js → store-HFF5KQ44.js} +12 -14
- package/dist/bundle/store-maintenance-command-Z4SPEQUM.js +52 -0
- package/dist/bundle/{chunk-GNI7INK6.js → terminal-DHJ4D3BC.js} +2 -3
- package/dist/bundle/tokens-B6MUZRFM.js +96 -0
- package/dist/commands/context.d.ts +14 -13
- package/dist/commands/context.d.ts.map +1 -1
- package/dist/commands/context.js.map +1 -1
- package/dist/commands/documents.d.ts.map +1 -1
- package/dist/commands/documents.js +1 -4
- package/dist/commands/documents.js.map +1 -1
- package/dist/commands/mirrors.d.ts.map +1 -1
- package/dist/commands/mirrors.js +1 -2
- package/dist/commands/mirrors.js.map +1 -1
- package/dist/commands/upgrade.d.ts +1 -1
- package/dist/commands/upgrade.d.ts.map +1 -1
- package/dist/commands/upgrade.js +4 -9
- package/dist/commands/upgrade.js.map +1 -1
- package/dist/config.d.ts +182 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +38 -3
- package/dist/config.js.map +1 -1
- package/dist/contract-overrides.d.ts +0 -3
- package/dist/contract-overrides.d.ts.map +1 -1
- package/dist/contract-overrides.js +0 -234
- package/dist/contract-overrides.js.map +1 -1
- package/dist/first-screen.d.ts +3 -2
- package/dist/first-screen.d.ts.map +1 -1
- package/dist/first-screen.js +17 -22
- package/dist/first-screen.js.map +1 -1
- package/dist/grants.d.ts +9 -0
- package/dist/grants.d.ts.map +1 -0
- package/dist/grants.js +30 -0
- package/dist/grants.js.map +1 -0
- package/dist/identity.d.ts.map +1 -1
- package/dist/identity.js +2 -0
- package/dist/identity.js.map +1 -1
- package/dist/login.d.ts.map +1 -1
- package/dist/login.js +2 -4
- package/dist/login.js.map +1 -1
- package/dist/policy-keys.d.ts +12 -0
- package/dist/policy-keys.d.ts.map +1 -0
- package/dist/policy-keys.js +107 -0
- package/dist/policy-keys.js.map +1 -0
- package/dist/policy.d.ts +1 -8
- package/dist/policy.d.ts.map +1 -1
- package/dist/policy.js +2 -105
- package/dist/policy.js.map +1 -1
- package/dist/program.d.ts +8 -4
- package/dist/program.d.ts.map +1 -1
- package/dist/program.js +251 -222
- package/dist/program.js.map +1 -1
- package/dist/testing/mcp.d.ts +28 -0
- package/dist/testing/mcp.d.ts.map +1 -0
- package/dist/testing/mcp.js +56 -0
- package/dist/testing/mcp.js.map +1 -0
- package/dist/tokens.d.ts.map +1 -1
- package/dist/tokens.js +0 -9
- package/dist/tokens.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +6 -5
- package/scenarios/agent-access.md +4 -2
- package/dist/bundle/all-profiles-CYW6XBBS.js +0 -26
- package/dist/bundle/chunk-234MHU76.js +0 -384
- package/dist/bundle/chunk-BBYD2FA3.js +0 -9
- package/dist/bundle/chunk-DO4PDQY5.js +0 -48
- package/dist/bundle/chunk-FDWYPONW.js +0 -1988
- package/dist/bundle/chunk-FQRJWVEB.js +0 -2
- package/dist/bundle/chunk-GJN5B5JK.js +0 -522
- package/dist/bundle/chunk-NPSZPUK6.js +0 -193
- package/dist/bundle/chunk-PDGECM5D.js +0 -138
- package/dist/bundle/chunk-Q765VPZY.js +0 -421
- package/dist/bundle/chunk-QYUHS6DE.js +0 -1714
- package/dist/bundle/chunk-WQRGA75U.js +0 -256
- package/dist/bundle/chunk-YVPHJHIL.js +0 -15572
- package/dist/bundle/chunk-Z47LOJUS.js +0 -484
- package/dist/bundle/command-contract-I2YB5IXI.js +0 -38
- package/dist/bundle/failure-IXS2ZHA5.js +0 -37
- package/dist/bundle/first-screen-M62KTPZG.js +0 -36
- package/dist/bundle/google-api-BDUWZMRV.js +0 -83
- package/dist/bundle/mcp-F67RATLF.js +0 -502
- package/dist/bundle/mcp-JZSYPQA4.js +0 -96
- package/dist/bundle/serve-VOBAQHAQ.js +0 -20
- package/dist/bundle/server-24PS4M7U.js +0 -70
- package/dist/bundle/server-G6HFZ2CK.js +0 -57
- package/dist/bundle/store-maintenance-command-ZTUEI4EC.js +0 -58
- package/dist/bundle/terminal-TFCTWLOS.js +0 -11
- package/dist/bundle/tokens-XMOGQFI6.js +0 -102
- package/dist/commands/doctor.d.ts +0 -56
- package/dist/commands/doctor.d.ts.map +0 -1
- package/dist/commands/doctor.js +0 -75
- package/dist/commands/doctor.js.map +0 -1
- package/dist/commands/mcp.d.ts +0 -6
- package/dist/commands/mcp.d.ts.map +0 -1
- package/dist/commands/mcp.js +0 -156
- package/dist/commands/mcp.js.map +0 -1
- package/dist/commands/skill.d.ts +0 -6
- package/dist/commands/skill.d.ts.map +0 -1
- package/dist/commands/skill.js +0 -34
- package/dist/commands/skill.js.map +0 -1
- package/dist/failure.d.ts +0 -88
- package/dist/failure.d.ts.map +0 -1
- package/dist/failure.js +0 -60
- package/dist/failure.js.map +0 -1
- package/dist/mcp.d.ts +0 -175
- package/dist/mcp.d.ts.map +0 -1
- package/dist/mcp.js +0 -412
- package/dist/mcp.js.map +0 -1
- /package/dist/bundle/{chunk-62EDJKGP.js → chunk-HEA3XVAJ.js} +0 -0
|
@@ -1,21 +1,32 @@
|
|
|
1
1
|
import { createRequire as __bundleRequire } from "node:module";
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
operations
|
|
5
|
+
} from "./chunk-VCGQMTHW.js";
|
|
6
|
+
import {
|
|
7
|
+
DRIVE_APP
|
|
8
|
+
} from "./chunk-W5SYBHRX.js";
|
|
9
|
+
import {
|
|
10
|
+
commandPathKey,
|
|
11
|
+
commandPermissions
|
|
12
|
+
} from "./chunk-2HWOGSTA.js";
|
|
3
13
|
import {
|
|
4
14
|
AI_ENTRIES,
|
|
5
15
|
checkConfigText,
|
|
6
16
|
issueMessage,
|
|
17
|
+
settingsFor,
|
|
7
18
|
usableProfileName
|
|
8
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-4RDXCE45.js";
|
|
9
20
|
import {
|
|
10
21
|
LEVELS
|
|
11
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-HAHARAJD.js";
|
|
12
23
|
import {
|
|
13
24
|
MAX_TEXT_CHARS
|
|
14
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-WSX5UQNT.js";
|
|
15
26
|
import {
|
|
16
27
|
resolvePaths,
|
|
17
28
|
saveConfigFile
|
|
18
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-2D6AAGBP.js";
|
|
19
30
|
import {
|
|
20
31
|
CliError,
|
|
21
32
|
array,
|
|
@@ -36,11 +47,80 @@ import {
|
|
|
36
47
|
strictObject,
|
|
37
48
|
string,
|
|
38
49
|
union
|
|
39
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-JKEAZBEZ.js";
|
|
40
51
|
import {
|
|
41
52
|
__name
|
|
42
53
|
} from "./chunk-ZVVMGPBJ.js";
|
|
43
54
|
|
|
55
|
+
// dist/policy-keys.js
|
|
56
|
+
var permissionKeys = /* @__PURE__ */ __name((paths2) => {
|
|
57
|
+
const keys = /* @__PURE__ */ new Set([
|
|
58
|
+
"mcp.authority",
|
|
59
|
+
"mcp",
|
|
60
|
+
"sheets.create",
|
|
61
|
+
"sheets.rename",
|
|
62
|
+
"sheets.insert",
|
|
63
|
+
"sheets.format",
|
|
64
|
+
"sheets.update"
|
|
65
|
+
]);
|
|
66
|
+
for (const path of paths2)
|
|
67
|
+
keys.add(path.join("."));
|
|
68
|
+
for (const operation of operations)
|
|
69
|
+
for (const key of methodPolicyKeys(operation.id))
|
|
70
|
+
keys.add(key);
|
|
71
|
+
return keys;
|
|
72
|
+
}, "permissionKeys");
|
|
73
|
+
var permissionNames = /* @__PURE__ */ __name((keys) => {
|
|
74
|
+
const names = /* @__PURE__ */ new Set();
|
|
75
|
+
for (const key of keys) {
|
|
76
|
+
const parts = key.split(".");
|
|
77
|
+
for (let end = 1; end <= parts.length; end++)
|
|
78
|
+
names.add(parts.slice(0, end).join("."));
|
|
79
|
+
}
|
|
80
|
+
return names;
|
|
81
|
+
}, "permissionNames");
|
|
82
|
+
var DEFAULT_LEVELS = {
|
|
83
|
+
"mcp.authority": "deny",
|
|
84
|
+
...Object.fromEntries(operations.filter((op) => op.effect === "destructive").map((op) => [`api.${op.id}`, "ask"]))
|
|
85
|
+
};
|
|
86
|
+
var methodPolicyKeys = /* @__PURE__ */ __name((method, body) => {
|
|
87
|
+
const parts = method.split(".");
|
|
88
|
+
const verb = parts.at(-1);
|
|
89
|
+
const alias = method.startsWith("drive.files.") ? `files.${verb}` : method.startsWith("docs.documents.") ? `documents.${verb === "batchUpdate" ? "update" : verb}` : method.startsWith("sheets.spreadsheets.") ? `sheets.${method === "sheets.spreadsheets.get" ? "info" : method === "sheets.spreadsheets.values.get" ? "show" : verb === "append" ? "add" : verb}` : method === "driveactivity.activity.query" ? "documents.history" : method.startsWith("drive.") ? `${parts[1]}.${verb}` : void 0;
|
|
90
|
+
const keys = [`api.${method}`, ...alias ? [alias] : []];
|
|
91
|
+
if (method === "drive.replies.create" && body)
|
|
92
|
+
keys.push(body.action === "resolve" ? "comments.resolve" : body.action === "reopen" ? "comments.reopen" : "comments.reply");
|
|
93
|
+
if (method === "drive.replies.create" && body?.content !== void 0)
|
|
94
|
+
keys.push("comments.reply");
|
|
95
|
+
if (method === "sheets.spreadsheets.batchUpdate" && Array.isArray(body?.requests)) {
|
|
96
|
+
const object2 = /* @__PURE__ */ __name((value) => !!value && typeof value === "object" && !Array.isArray(value), "object");
|
|
97
|
+
for (const request of body.requests) {
|
|
98
|
+
if (!object2(request))
|
|
99
|
+
continue;
|
|
100
|
+
if (request.addSheet || request.duplicateSheet)
|
|
101
|
+
keys.push("sheets.create");
|
|
102
|
+
if (object2(request.updateSheetProperties)) {
|
|
103
|
+
const update = request.updateSheetProperties;
|
|
104
|
+
if (object2(update.properties) && update.properties.title !== void 0 || String(update.fields).split(",").some((field) => field.trim() === "title" || field.trim() === "*"))
|
|
105
|
+
keys.push("sheets.rename");
|
|
106
|
+
if (object2(update.properties) && update.properties.gridProperties)
|
|
107
|
+
keys.push("sheets.insert");
|
|
108
|
+
}
|
|
109
|
+
if (request.insertDimension || request.appendDimension || request.insertRange)
|
|
110
|
+
keys.push("sheets.insert");
|
|
111
|
+
if (request.repeatCell || request.updateCells || request.appendCells || request.updateBorders || request.addConditionalFormatRule || request.updateConditionalFormatRule || request.deleteConditionalFormatRule || request.addBanding || request.updateBanding || request.deleteBanding)
|
|
112
|
+
keys.push("sheets.format");
|
|
113
|
+
if (request.updateCells || request.appendCells || request.findReplace || request.pasteData || request.copyPaste || request.cutPaste || request.autoFill)
|
|
114
|
+
keys.push("sheets.update");
|
|
115
|
+
if (request.pasteData || request.copyPaste || request.cutPaste || request.autoFill)
|
|
116
|
+
keys.push("sheets.format");
|
|
117
|
+
if (object2(request.repeatCell) && (String(request.repeatCell.fields).split(",").some((field) => field.trim() === "*" || field.includes("userEnteredValue")) || object2(request.repeatCell.cell) && request.repeatCell.cell.userEnteredValue !== void 0))
|
|
118
|
+
keys.push("sheets.update");
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
return [...new Set(keys)];
|
|
122
|
+
}, "methodPolicyKeys");
|
|
123
|
+
|
|
44
124
|
// dist/config.js
|
|
45
125
|
import { readFileSync } from "node:fs";
|
|
46
126
|
import { join } from "node:path";
|
|
@@ -66,7 +146,13 @@ var RunSettings = {
|
|
|
66
146
|
runs_size_limit_mb: optional(pipe(number(), integer(), minValue(1))),
|
|
67
147
|
record_input: optional(union([boolean(), literal("failed")]))
|
|
68
148
|
};
|
|
69
|
-
var
|
|
149
|
+
var SharedDefaults = {
|
|
150
|
+
limit: optional(pipe(number(), integer(), minValue(1))),
|
|
151
|
+
sends_per_hour: optional(pipe(number(), integer(), minValue(0))),
|
|
152
|
+
update_check: optional(boolean()),
|
|
153
|
+
skill_hint: optional(boolean())
|
|
154
|
+
};
|
|
155
|
+
var DEFAULTS_ONLY = /* @__PURE__ */ new Set([...Object.keys(RunSettings), "update_check", "skill_hint"]);
|
|
70
156
|
var SETTING_NAMES = /* @__PURE__ */ new Set([...Object.keys(Common), "picture_search", ...DEFAULTS_ONLY]);
|
|
71
157
|
var Mirror = strictObject({
|
|
72
158
|
id: pipe(string(), regex(/^[a-z0-9-]{1,40}$/)),
|
|
@@ -83,7 +169,27 @@ var Profile = strictObject({
|
|
|
83
169
|
});
|
|
84
170
|
var ConfigSchema = strictObject({
|
|
85
171
|
profiles: optional(record(string(), Profile), {}),
|
|
86
|
-
defaults: optional(strictObject({ ...Common, ...RunSettings }))
|
|
172
|
+
defaults: optional(strictObject({ ...Common, ...RunSettings, ...SharedDefaults }))
|
|
173
|
+
});
|
|
174
|
+
var keyOf = /* @__PURE__ */ __name((path) => {
|
|
175
|
+
if (path[0] !== "api" || path[1] === void 0)
|
|
176
|
+
return commandPathKey(path);
|
|
177
|
+
if (["call", "list", "show"].includes(path[1]))
|
|
178
|
+
return null;
|
|
179
|
+
const operation = operations.find((one) => one.command === path[1]);
|
|
180
|
+
return operation ? `api.${operation.id}` : commandPathKey(path);
|
|
181
|
+
}, "keyOf");
|
|
182
|
+
var configuration = settingsFor(DRIVE_APP, {
|
|
183
|
+
// drive's own schema decides what the file may hold, so `doctor` names a profile that lacks its principal.
|
|
184
|
+
schema: ConfigSchema,
|
|
185
|
+
profile: {
|
|
186
|
+
principal: optional(string()),
|
|
187
|
+
roots: optional(array(pipe(string(), regex(/^[A-Za-z0-9_-]{1,200}$/)))),
|
|
188
|
+
mirrors: optional(array(Mirror)),
|
|
189
|
+
storage: optional(picklist(["keyring", "file"])),
|
|
190
|
+
max_text_chars: Common.max_text_chars
|
|
191
|
+
},
|
|
192
|
+
permissions: commandPermissions({ keyOf, extra: [...permissionKeys([])], defaults: DEFAULT_LEVELS })
|
|
87
193
|
});
|
|
88
194
|
var paths = /* @__PURE__ */ __name((env) => resolvePaths({ appName: "drive-cli", prefix: "DRIVE", env }), "paths");
|
|
89
195
|
var configPath = /* @__PURE__ */ __name((env) => join(paths(env).config, "config.json"), "configPath");
|
|
@@ -198,8 +304,13 @@ var configuredMirrors = /* @__PURE__ */ __name((env, profile, filter = {}) => (a
|
|
|
198
304
|
var configuredSessions = /* @__PURE__ */ __name((env, filter, knownPermissions) => Object.entries(readConfig(env, knownPermissions).profiles).flatMap(([name, row]) => (filter.profile === void 0 || filter.profile === name) && (filter.storage === void 0 || filter.storage === row.storage) ? [{ profile: name, selected_folders: row.roots.length, storage: row.storage }] : []), "configuredSessions");
|
|
199
305
|
|
|
200
306
|
export {
|
|
307
|
+
permissionKeys,
|
|
308
|
+
permissionNames,
|
|
309
|
+
DEFAULT_LEVELS,
|
|
310
|
+
methodPolicyKeys,
|
|
201
311
|
DEFAULTS_ONLY,
|
|
202
312
|
SETTING_NAMES,
|
|
313
|
+
configuration,
|
|
203
314
|
paths,
|
|
204
315
|
inspectConfig,
|
|
205
316
|
configIssues,
|
|
@@ -2,12 +2,12 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
resolvePaths
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-2D6AAGBP.js";
|
|
6
6
|
import {
|
|
7
7
|
__name
|
|
8
8
|
} from "./chunk-ZVVMGPBJ.js";
|
|
9
9
|
|
|
10
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/path.js
|
|
11
11
|
import { join } from "node:path";
|
|
12
12
|
var wirecatDirectory = /* @__PURE__ */ __name((env = process.env, platform) => resolvePaths({ appName: "WireCat", prefix: "WIRECAT", env, ...platform ? { platform } : {} }).state, "wirecatDirectory");
|
|
13
13
|
var storePath = /* @__PURE__ */ __name((env = process.env) => env.MESSAGING_STORE ?? join(wirecatDirectory(env), "wirecat.db"), "storePath");
|