@wirecat/zoom-cli 0.82.0 → 0.83.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/README.md +2 -2
- package/contracts/wirecat.json +54 -54
- package/dist/api.d.ts.map +1 -1
- package/dist/api.js +1 -1
- package/dist/api.js.map +1 -1
- package/dist/bin/main.js +2 -15
- package/dist/bin/main.js.map +1 -1
- package/dist/bin/zm.js +2 -2
- package/dist/bundle/agent-3HDWEZ5M.js +47 -0
- package/dist/bundle/{all-profiles-RULEKTDQ.js → all-profiles-RY2OMSDL.js} +8 -8
- package/dist/bundle/answer-policy-IFVXPPGW.js +131 -0
- package/dist/bundle/{anthropic-4NAQBZFL.js → anthropic-36VPSF7B.js} +3 -3
- package/dist/bundle/{app-server-VLR42U5L.js → app-server-ZVJVUGB7.js} +72 -71
- package/dist/bundle/{bun-OPDGMZZQ.js → bun-F4M4KCNA.js} +2 -2
- package/dist/bundle/{bun-sqlite-HC6X4AOX.js → bun-sqlite-IOPYIUA7.js} +4 -4
- package/dist/bundle/{chunk-MAJJ4PG3.js → chunk-26TW5RZ6.js} +31 -315
- package/dist/bundle/{chunk-XQQVMECZ.js → chunk-2DK5BBFF.js} +1 -1
- package/dist/bundle/{chunk-BP4FYANF.js → chunk-2IBKKVVZ.js} +4 -4
- package/dist/bundle/{chunk-52Y4ETKU.js → chunk-2S54TM4N.js} +3 -3
- package/dist/bundle/{chunk-DCYFT3FR.js → chunk-3AQHKXVR.js} +4 -4
- package/dist/bundle/{chunk-VS6WURLX.js → chunk-3CW2C7ZA.js} +2 -2
- package/dist/bundle/{chunk-6QYZP4E2.js → chunk-3KUEZK5Z.js} +2 -2
- package/dist/bundle/{chunk-YJXJJ2XP.js → chunk-3PXUQFHX.js} +7 -7
- package/dist/bundle/{chunk-PSKTMMCO.js → chunk-575JMTDR.js} +17 -16
- package/dist/bundle/{chunk-QPHBK63S.js → chunk-5B2LV4MS.js} +2 -1
- package/dist/bundle/{chunk-OGNO35A2.js → chunk-5WL5RHOO.js} +5 -100
- package/dist/bundle/{chunk-ASBDFXLS.js → chunk-6C7ESL5N.js} +2 -2
- package/dist/bundle/{chunk-676C2LE6.js → chunk-6E4KLYNP.js} +10 -10
- package/dist/bundle/chunk-7JDXR75Q.js +465 -0
- package/dist/bundle/{chunk-UR5DBODY.js → chunk-AK3H2C65.js} +30 -26
- package/dist/bundle/{chunk-VB7FZOYX.js → chunk-AQ5RIOUE.js} +1 -1
- package/dist/bundle/{chunk-UKAAAOPC.js → chunk-AQLUAQXJ.js} +23 -15
- package/dist/bundle/{chunk-V5EJSF2B.js → chunk-ASTLGFTR.js} +205 -170
- package/dist/bundle/{chunk-PWVJUIDQ.js → chunk-ATHBB7OU.js} +2 -2
- package/dist/bundle/{chunk-GTKPMYK7.js → chunk-B2NM65RD.js} +13 -5
- package/dist/bundle/{chunk-G6PETRMV.js → chunk-B4KHDXJE.js} +2 -2
- package/dist/bundle/{chunk-4HLQ2JGK.js → chunk-BAFC7WNI.js} +3 -3
- package/dist/bundle/{chunk-KVJ3I7UL.js → chunk-BTLZYRIW.js} +5 -5
- package/dist/bundle/{chunk-KKFY23AK.js → chunk-BZDS2X6Y.js} +61 -61
- package/dist/bundle/{chunk-VZ5PPYDG.js → chunk-C7JPYWYQ.js} +1 -1
- package/dist/bundle/{chunk-W5QHB53X.js → chunk-CDQUW25G.js} +10 -10
- package/dist/bundle/{chunk-AIKFOBDO.js → chunk-CJWGJBHW.js} +28 -8
- package/dist/bundle/{chunk-HP7A2ZOP.js → chunk-D7RCUODT.js} +7 -7
- package/dist/bundle/{chunk-LEKKTJKK.js → chunk-DQJECJUE.js} +23 -102
- package/dist/bundle/{chunk-B32KZRQM.js → chunk-E4JQ3MCW.js} +11 -11
- package/dist/bundle/{chunk-HZENBDW2.js → chunk-E4ODYLEK.js} +6 -6
- package/dist/bundle/{chunk-RQOZBTNI.js → chunk-EE45N67Q.js} +3 -3
- package/dist/bundle/{chunk-VB72LTSZ.js → chunk-EEEU4MKK.js} +11 -11
- package/dist/bundle/{chunk-EGTCQKHV.js → chunk-ETIZGA4P.js} +5 -5
- package/dist/bundle/{chunk-BDKVOU3I.js → chunk-F44QK6CK.js} +3 -3
- package/dist/bundle/{chunk-274SLQNW.js → chunk-FH2UFNH6.js} +2 -2
- package/dist/bundle/{chunk-3HC5F3P7.js → chunk-FTH6WGYO.js} +1 -1
- package/dist/bundle/chunk-FWACRG4X.js +160 -0
- package/dist/bundle/chunk-G5SZL7G2.js +150 -0
- package/dist/bundle/{chunk-EQG3PIH2.js → chunk-G6CHEFAG.js} +2 -2
- package/dist/bundle/{chunk-66ALX4ZI.js → chunk-GHJD7PE6.js} +18 -18
- package/dist/bundle/{chunk-Q7ICVP25.js → chunk-GZ7WBU5Y.js} +1 -1
- package/dist/bundle/{chunk-UL2PXLKT.js → chunk-H6A4NWYJ.js} +320 -43
- package/dist/bundle/{chunk-WMANRJR5.js → chunk-HKLRI2LB.js} +6 -6
- package/dist/bundle/{chunk-L75SMSJR.js → chunk-HMD4FZYY.js} +3 -3
- package/dist/bundle/{chunk-2JHVQMVC.js → chunk-HO4JGD4Q.js} +1 -1
- package/dist/bundle/{chunk-WOPVBRPV.js → chunk-HUAHLO6N.js} +1 -1
- package/dist/bundle/{chunk-6VK332XS.js → chunk-IQZXFWFI.js} +2 -2
- package/dist/bundle/{chunk-NB7EOAUZ.js → chunk-ISQ23VKV.js} +1 -1
- package/dist/bundle/{chunk-QVYAV7F2.js → chunk-JEH33ZCD.js} +3 -3
- package/dist/bundle/{chunk-ICPJT672.js → chunk-JUNQYWQ2.js} +6 -6
- package/dist/bundle/{chunk-K5JGJIV2.js → chunk-JUXMVQWJ.js} +311 -152
- package/dist/bundle/{chunk-OBXQLFT5.js → chunk-KHQDWYCG.js} +1 -1
- package/dist/bundle/{chunk-GGMAIIVE.js → chunk-KYRYD4CR.js} +1 -1
- package/dist/bundle/chunk-LBGT6W4R.js +377 -0
- package/dist/bundle/{chunk-JQ54DYAQ.js → chunk-LN7HRYTH.js} +1 -1
- package/dist/bundle/{chunk-G46WJ7YO.js → chunk-MEB7HBTM.js} +5 -5
- package/dist/bundle/{chunk-M7H4MCAX.js → chunk-MEEFWYX3.js} +3 -3
- package/dist/bundle/{chunk-73MOMNLL.js → chunk-MNOAMJ6H.js} +1 -1
- package/dist/bundle/{chunk-A6EZK5RG.js → chunk-MYHPXJDG.js} +1 -1
- package/dist/bundle/{chunk-HC6VN5CO.js → chunk-NGI37RFW.js} +7 -7
- package/dist/bundle/{chunk-2GP573Q4.js → chunk-NZMWD7Y3.js} +3656 -2697
- package/dist/bundle/chunk-O6IECJRM.js +54 -0
- package/dist/bundle/{chunk-Y6PVS55U.js → chunk-OBWL3BUV.js} +35 -35
- package/dist/bundle/{chunk-2XBDILVW.js → chunk-OEEWVKJX.js} +1 -1
- package/dist/bundle/chunk-OGTN2KVG.js +147 -0
- package/dist/bundle/{chunk-GWGHH56B.js → chunk-OQYZ3W4K.js} +10 -10
- package/dist/bundle/{chunk-2CI2OEZQ.js → chunk-P3ZCTYGW.js} +2 -2
- package/dist/bundle/{chunk-OIPYBF43.js → chunk-PVEBAHFU.js} +2 -2
- package/dist/bundle/{chunk-2SWKQ7C4.js → chunk-R6IA5UQB.js} +1 -1
- package/dist/bundle/{chunk-T7IAWEBU.js → chunk-RLOH7RDN.js} +7 -7
- package/dist/bundle/{chunk-KJ6USQDZ.js → chunk-RQ4AXSCJ.js} +5 -5
- package/dist/bundle/{chunk-XQ2WL3HB.js → chunk-RYGTCRFZ.js} +2 -2
- package/dist/bundle/{chunk-N46F72AF.js → chunk-S4PXWIE4.js} +84 -86
- package/dist/bundle/{chunk-MQLPZBMQ.js → chunk-SDZZYZLL.js} +1 -1
- package/dist/bundle/{chunk-E745WZKY.js → chunk-SHQAYUK6.js} +6 -6
- package/dist/bundle/{chunk-3YM4B2GT.js → chunk-T3W4V4A6.js} +1 -1
- package/dist/bundle/{chunk-4N7PP76S.js → chunk-TCT5D2X2.js} +1 -1
- package/dist/bundle/{chunk-7QPIUMUG.js → chunk-TDWPOSPR.js} +10 -10
- package/dist/bundle/{chunk-ZED2CJW5.js → chunk-TER3N27H.js} +6 -6
- package/dist/bundle/{chunk-UQCTXZEP.js → chunk-TMTNP7QN.js} +9 -9
- package/dist/bundle/{chunk-KWU46LNK.js → chunk-TO5UEWXR.js} +2 -2
- package/dist/bundle/{chunk-OQFQ77AY.js → chunk-UBH7YF3C.js} +61 -59
- package/dist/bundle/{chunk-QVSL5WJ7.js → chunk-UEAE3JUU.js} +488 -436
- package/dist/bundle/{chunk-5KYQ53EF.js → chunk-UHR363OD.js} +7 -7
- package/dist/bundle/{chunk-7UVDPRFK.js → chunk-UM52A76S.js} +5 -5
- package/dist/bundle/{chunk-ZOYOXWJB.js → chunk-URP6BTHN.js} +34 -156
- package/dist/bundle/{chunk-N3JLO63O.js → chunk-UWQEAA6S.js} +1 -1
- package/dist/bundle/{chunk-OO4TRVPB.js → chunk-VR7QZGRU.js} +5 -5
- package/dist/bundle/{chunk-GBHMT2IU.js → chunk-VRH5PBSL.js} +13 -13
- package/dist/bundle/chunk-VTLQTQKY.js +1756 -0
- package/dist/bundle/{chunk-ACI4YIEH.js → chunk-VTYNLTDW.js} +1 -1
- package/dist/bundle/{chunk-NEMX3UNN.js → chunk-WY7XG6TE.js} +2 -2
- package/dist/bundle/{chunk-AC6VJNMJ.js → chunk-XEOZTA3H.js} +1 -1
- package/dist/bundle/{chunk-QG6PILDO.js → chunk-XH23ML2V.js} +1 -1
- package/dist/bundle/{chunk-5HAUK3I4.js → chunk-XYF76A26.js} +1179 -783
- package/dist/bundle/{chunk-KQPUVXKX.js → chunk-ZDYJAEVB.js} +2 -2
- package/dist/bundle/{chunk-TKNM22OH.js → chunk-ZJ63HDBT.js} +1 -1
- package/dist/bundle/{chunk-5TU7Y5UW.js → chunk-ZT4ZPUIO.js} +11 -11
- package/dist/bundle/{cli-U4O5XB7J.js → cli-JK6PQSSN.js} +94 -79
- package/dist/bundle/command-contract-F3QNBKPX.js +46 -0
- package/dist/bundle/{command-server-entry-KKH6ZWJV.js → command-server-entry-DJLGN62J.js} +31 -30
- package/dist/bundle/config-TYYMV3HV.js +118 -0
- package/dist/bundle/{decode-TPCNXEK4.js → decode-ZZICNNFF.js} +3 -3
- package/dist/bundle/{dist-7CLBCYZN.js → dist-NQPF25XI.js} +47 -46
- package/dist/bundle/{echarts-O3TNDAXJ.js → echarts-QMAA7HH5.js} +2 -2
- package/dist/bundle/{embed-WCJSFVSK.js → embed-T64EUKUI.js} +4 -4
- package/dist/bundle/{embedder-TBBUPXBX.js → embedder-ZEKISZXI.js} +7 -7
- package/dist/bundle/{first-run-ELEMFW42.js → first-run-ZFNY4RRH.js} +8 -8
- package/dist/bundle/first-screen-LPGCHRHZ.js +47 -0
- package/dist/bundle/{folders-LXOL4N4S.js → folders-ROKVKSCT.js} +2 -2
- package/dist/bundle/{instructions-AMH5RWVJ.js → instructions-4H7UREH2.js} +1 -1
- package/dist/bundle/{main-YAA7WQ23.js → main-GCK3VYAA.js} +24 -34
- package/dist/bundle/meeting-combined-7HDPOUPB.js +28 -0
- package/dist/bundle/{meeting-model-3BZJ3EQP.js → meeting-model-MVUW7UPQ.js} +10 -10
- package/dist/bundle/{meeting-semantic-3HU7I2SJ.js → meeting-semantic-IF633WGX.js} +3 -3
- package/dist/bundle/{meetings-XWMB6FOH.js → meetings-RY2AAPHV.js} +2 -2
- package/dist/bundle/{node-EGMCBAO7.js → node-P3PUHKYH.js} +2 -2
- package/dist/bundle/{node-sqlite-IJBWENFX.js → node-sqlite-ASAZJNHE.js} +5 -5
- package/dist/bundle/{oauth-SZDDAP7A.js → oauth-4U3OCK3W.js} +5 -5
- package/dist/bundle/oauth-AJARLPSY.js +46 -0
- package/dist/bundle/{open-NS3TMKZX.js → open-SEJRY2ZI.js} +3 -3
- package/dist/bundle/{openai-4DN6WI3B.js → openai-FZDSC2AA.js} +12 -12
- package/dist/bundle/{output-file-2UB5JP3R.js → output-file-RYIOIXMD.js} +1 -1
- package/dist/bundle/{process-SGHEN6MQ.js → process-AFIXYXWL.js} +1 -1
- package/dist/bundle/{program-GVCGZP27.js → program-OYLVYA4Z.js} +174 -236
- package/dist/bundle/{prompt-HJFMPFVC.js → prompt-BCRD64F4.js} +3 -3
- package/dist/bundle/{public-C2ZB2AGQ.js → public-SVJILCNI.js} +43 -35
- package/dist/bundle/{recognize-2SEI5PPM.js → recognize-25ITJWGX.js} +2 -2
- package/dist/bundle/{remote-2DMS74XE.js → remote-5FBAJX7O.js} +8 -8
- package/dist/bundle/{rerank-H6GCYVIA.js → rerank-2HGWWORY.js} +5 -5
- package/dist/bundle/run-log-7HRF4Y47.js +145 -0
- package/dist/bundle/{serve-ODVRPFJO.js → serve-RL35MSJD.js} +7 -7
- package/dist/bundle/{server-PCLIO24L.js → server-QUSBWACP.js} +64 -63
- package/dist/bundle/server-SCK2SRDK.js +96 -0
- package/dist/bundle/{services-4QAPXBLO.js → services-BGRIQNDC.js} +55 -53
- package/dist/bundle/{speech-MA6ZT3WE.js → speech-4W3ZMTFK.js} +21 -21
- package/dist/bundle/{sqlite-runtime-PVMAUXRN.js → sqlite-runtime-K3KLRZCV.js} +4 -4
- package/dist/bundle/{state-QFMTYUME.js → state-GYL4C74G.js} +4 -4
- package/dist/bundle/{store-25OTAQC3.js → store-27UQMNEO.js} +23 -21
- package/dist/bundle/{store-F724QIKJ.js → store-NLYH5SQX.js} +54 -43
- package/dist/bundle/store-connection-CZILWRSR.js +112 -0
- package/dist/bundle/store-maintenance-command-Z3QLNSXJ.js +84 -0
- package/dist/bundle/{streaming-S22C4DG5.js → streaming-73EKEGPF.js} +2 -2
- package/dist/bundle/surface-CV3C4RV2.js +82 -0
- package/dist/bundle/tokens-PY3S22LY.js +27 -0
- package/dist/bundle/zm.js +2 -2
- package/dist/bundle/{zoom-app-YWFB367P.js → zoom-app-4F4YY4OI.js} +8 -6
- package/dist/commands.d.ts +1 -8
- package/dist/commands.d.ts.map +1 -1
- package/dist/commands.js +3 -33
- package/dist/commands.js.map +1 -1
- package/dist/index.d.ts +1 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -2
- package/dist/index.js.map +1 -1
- package/dist/program-bindings.d.ts.map +1 -1
- package/dist/program-bindings.js +2 -12
- package/dist/program-bindings.js.map +1 -1
- package/dist/program.d.ts +3 -5
- package/dist/program.d.ts.map +1 -1
- package/dist/run.d.ts.map +1 -1
- package/dist/run.js +6 -1
- package/dist/run.js.map +1 -1
- package/dist/setup-commands.d.ts +5 -14
- package/dist/setup-commands.d.ts.map +1 -1
- package/dist/setup-commands.js +7 -142
- package/dist/setup-commands.js.map +1 -1
- package/dist/tokens.d.ts +20 -44
- package/dist/tokens.d.ts.map +1 -1
- package/dist/tokens.js +95 -308
- package/dist/tokens.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/zoom-app.js +1 -1
- package/dist/zoom-app.js.map +1 -1
- package/dist/zoom-session.d.ts +6 -0
- package/dist/zoom-session.d.ts.map +1 -0
- package/dist/zoom-session.js +72 -0
- package/dist/zoom-session.js.map +1 -0
- package/package.json +2 -2
- package/skills/zoom-cli/references/setup.md +2 -2
- package/dist/bundle/agent-F4TRJWWS.js +0 -46
- package/dist/bundle/answer-policy-6XC57AEZ.js +0 -131
- package/dist/bundle/chunk-2DBF2IIC.js +0 -330
- package/dist/bundle/chunk-DSZYABYL.js +0 -808
- package/dist/bundle/chunk-KXJ3JEDH.js +0 -2
- package/dist/bundle/chunk-LAYYO4WD.js +0 -31
- package/dist/bundle/chunk-PMUPN6JW.js +0 -773
- package/dist/bundle/chunk-TKVBFJ5C.js +0 -37
- package/dist/bundle/chunk-YY7XKHDY.js +0 -79
- package/dist/bundle/command-contract-FBTK6GQX.js +0 -45
- package/dist/bundle/config-FRJSIZNN.js +0 -118
- package/dist/bundle/first-screen-DIOBWMKP.js +0 -46
- package/dist/bundle/meeting-combined-UXCF4SJ3.js +0 -26
- package/dist/bundle/run-log-QU26SUZP.js +0 -145
- package/dist/bundle/server-NBPF6IDZ.js +0 -95
- package/dist/bundle/store-connection-OGPXANGB.js +0 -111
- package/dist/bundle/store-maintenance-command-2CM7LLNQ.js +0 -83
- package/dist/bundle/surface-7PXHWCF6.js +0 -81
- package/dist/bundle/tokens-NLUHA2DW.js +0 -25
- package/dist/login.d.ts +0 -16
- package/dist/login.d.ts.map +0 -1
- package/dist/login.js +0 -98
- package/dist/login.js.map +0 -1
- package/dist/bundle/{chunk-6CWL5BKG.js → chunk-3QN5KDFZ.js} +147 -147
- /package/dist/bundle/{chunk-7O7XM37N.js → chunk-7ECP5ZQR.js} +0 -0
|
@@ -2255,153 +2255,6 @@ var homeIsMoved = /* @__PURE__ */ __name(({ env = process.env, platform = proces
|
|
|
2255
2255
|
var isMovedRun = /* @__PURE__ */ __name((options) => pathsAreOverridden(options) || homeIsMoved(options), "isMovedRun");
|
|
2256
2256
|
var configFilePath = /* @__PURE__ */ __name((configDir, fileName = "config.json") => join2(configDir, fileName), "configFilePath");
|
|
2257
2257
|
|
|
2258
|
-
// node_modules/.pnpm/@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/credentials.js
|
|
2259
|
-
import { readFileSync as readFileSync2 } from "node:fs";
|
|
2260
|
-
import { join as join3, resolve } from "node:path";
|
|
2261
|
-
var keyringService = /* @__PURE__ */ __name((service, _configDir, _isolated) => service, "keyringService");
|
|
2262
|
-
var movedRunService = /* @__PURE__ */ __name((service, configDir) => `${service}:${resolve(configDir)}`, "movedRunService");
|
|
2263
|
-
var warnedRuns = /* @__PURE__ */ new WeakSet();
|
|
2264
|
-
var Credentials = class {
|
|
2265
|
-
static {
|
|
2266
|
-
__name(this, "Credentials");
|
|
2267
|
-
}
|
|
2268
|
-
#configDir;
|
|
2269
|
-
#storage;
|
|
2270
|
-
#keyring;
|
|
2271
|
-
#env;
|
|
2272
|
-
#service;
|
|
2273
|
-
#envVar;
|
|
2274
|
-
#fileName;
|
|
2275
|
-
#warn;
|
|
2276
|
-
/** Set only for a moved run with the system keyring. */
|
|
2277
|
-
#temporaryService;
|
|
2278
|
-
constructor(options) {
|
|
2279
|
-
this.#configDir = options.configDir;
|
|
2280
|
-
this.#storage = options.storage ?? "auto";
|
|
2281
|
-
this.#keyring = options.keyring ?? systemKeyring;
|
|
2282
|
-
this.#env = options.env ?? process.env;
|
|
2283
|
-
this.#envVar = options.envVar;
|
|
2284
|
-
this.#fileName = options.fileName ?? "credentials.json";
|
|
2285
|
-
this.#warn = options.warn ?? ((message) => process.stderr.write(`${message}
|
|
2286
|
-
`));
|
|
2287
|
-
this.#service = options.service;
|
|
2288
|
-
const moved = this.#keyring === systemKeyring && (options.isolated === true || homeIsMoved({ env: this.#env }));
|
|
2289
|
-
this.#temporaryService = moved ? movedRunService(options.service, options.configDir) : void 0;
|
|
2290
|
-
}
|
|
2291
|
-
read(account) {
|
|
2292
|
-
const fromEnv = this.#envVar ? this.#env[this.#envVar]?.trim() : void 0;
|
|
2293
|
-
if (fromEnv)
|
|
2294
|
-
return { secret: fromEnv, source: "environment" };
|
|
2295
|
-
const fromFile = this.#storage === "keyring" ? void 0 : this.#readFile()?.[account]?.secret;
|
|
2296
|
-
if (fromFile)
|
|
2297
|
-
return { secret: fromFile, source: "file" };
|
|
2298
|
-
if (this.#storage !== "file") {
|
|
2299
|
-
const temporary = this.#temporaryService;
|
|
2300
|
-
let fromKeyring;
|
|
2301
|
-
try {
|
|
2302
|
-
fromKeyring = temporary && this.#keyring.get(temporary, account) || this.#keyring.get(this.#service, account);
|
|
2303
|
-
} catch (error) {
|
|
2304
|
-
throw this.#unreachable(account, error);
|
|
2305
|
-
}
|
|
2306
|
-
if (fromKeyring)
|
|
2307
|
-
return { secret: fromKeyring, source: "keyring" };
|
|
2308
|
-
}
|
|
2309
|
-
return void 0;
|
|
2310
|
-
}
|
|
2311
|
-
write(account, secret, options = {}) {
|
|
2312
|
-
const inFile = this.#storage === "auto" && this.#readFile()?.[account] !== void 0;
|
|
2313
|
-
if (this.#storage === "keyring" || this.#storage === "auto" && (options.signIn || !inFile)) {
|
|
2314
|
-
const stored = this.#tryKeyring(() => {
|
|
2315
|
-
this.#keyring.set(this.#temporaryService ?? this.#service, account, secret);
|
|
2316
|
-
return true;
|
|
2317
|
-
});
|
|
2318
|
-
if (stored) {
|
|
2319
|
-
if (inFile)
|
|
2320
|
-
this.#removeFromFile(account);
|
|
2321
|
-
return "keyring";
|
|
2322
|
-
}
|
|
2323
|
-
}
|
|
2324
|
-
const store = this.#readFile();
|
|
2325
|
-
if (!store) {
|
|
2326
|
-
throw new CliError("configuration_error", `${this.#path()} cannot be read as a credentials file; storing now would replace every secret in it. Fix the file or move it aside, then try again.`);
|
|
2327
|
-
}
|
|
2328
|
-
store[account] = { secret };
|
|
2329
|
-
this.#writeFile(store);
|
|
2330
|
-
return "file";
|
|
2331
|
-
}
|
|
2332
|
-
remove(account) {
|
|
2333
|
-
const removed = [];
|
|
2334
|
-
if (this.#storage !== "file") {
|
|
2335
|
-
if (this.#tryKeyring(() => this.#keyring.delete(this.#temporaryService ?? this.#service, account))) {
|
|
2336
|
-
removed.push("keyring");
|
|
2337
|
-
}
|
|
2338
|
-
if (this.#temporaryService && this.#ownersEntryExists(account)) {
|
|
2339
|
-
this.#warn(removed.includes("keyring") ? `removed this run's own sign-in of ${account} from the OS keyring and kept the owner's: a run with moved folders never removes it` : `kept ${account} in the OS keyring: it is the owner's sign-in, shared with every run, and a run with moved folders never removes it`);
|
|
2340
|
-
}
|
|
2341
|
-
}
|
|
2342
|
-
if (this.#storage !== "keyring" && this.#removeFromFile(account))
|
|
2343
|
-
removed.push("file");
|
|
2344
|
-
return removed;
|
|
2345
|
-
}
|
|
2346
|
-
#removeFromFile(account) {
|
|
2347
|
-
const store = this.#readFile();
|
|
2348
|
-
if (store?.[account] === void 0)
|
|
2349
|
-
return false;
|
|
2350
|
-
delete store[account];
|
|
2351
|
-
this.#writeFile(store);
|
|
2352
|
-
return true;
|
|
2353
|
-
}
|
|
2354
|
-
/** Only for the warning: a keyring that fails here must not fail a removal that already happened. */
|
|
2355
|
-
#ownersEntryExists(account) {
|
|
2356
|
-
try {
|
|
2357
|
-
return this.#keyring.get(this.#service, account) !== null;
|
|
2358
|
-
} catch {
|
|
2359
|
-
return false;
|
|
2360
|
-
}
|
|
2361
|
-
}
|
|
2362
|
-
#path() {
|
|
2363
|
-
return join3(this.#configDir, this.#fileName);
|
|
2364
|
-
}
|
|
2365
|
-
/** `undefined` when the file exists but is not a store: writing would replace what it holds. */
|
|
2366
|
-
#readFile() {
|
|
2367
|
-
let text2;
|
|
2368
|
-
try {
|
|
2369
|
-
text2 = readFileSync2(this.#path(), "utf8");
|
|
2370
|
-
} catch (error) {
|
|
2371
|
-
if (error.code === "ENOENT")
|
|
2372
|
-
return {};
|
|
2373
|
-
return void 0;
|
|
2374
|
-
}
|
|
2375
|
-
try {
|
|
2376
|
-
const parsed = JSON.parse(text2);
|
|
2377
|
-
return typeof parsed === "object" && parsed !== null && !Array.isArray(parsed) ? parsed : void 0;
|
|
2378
|
-
} catch {
|
|
2379
|
-
return void 0;
|
|
2380
|
-
}
|
|
2381
|
-
}
|
|
2382
|
-
#writeFile(store) {
|
|
2383
|
-
writeSecurely(this.#path(), `${JSON.stringify(store, null, 2)}
|
|
2384
|
-
`, 384);
|
|
2385
|
-
}
|
|
2386
|
-
#unreachable(account, error) {
|
|
2387
|
-
const where = this.#storage === "keyring" ? "" : `, and ${this.#path()} holds no sign-in for ${account}`;
|
|
2388
|
-
return new CliError("configuration_error", `the OS keyring did not answer (${error instanceof Error ? error.message : String(error)})${where}. On Linux a restarted session bus is a known cause: log out and back in, or set DBUS_SESSION_BUS_ADDRESS=unix:path=$XDG_RUNTIME_DIR/bus. On a machine with no keyring, sign in with file storage.`, { reason: "keyring.unreachable" });
|
|
2389
|
-
}
|
|
2390
|
-
#tryKeyring(operation) {
|
|
2391
|
-
if (this.#storage === "keyring")
|
|
2392
|
-
return operation();
|
|
2393
|
-
try {
|
|
2394
|
-
return operation();
|
|
2395
|
-
} catch (error) {
|
|
2396
|
-
if (!warnedRuns.has(this.#env)) {
|
|
2397
|
-
warnedRuns.add(this.#env);
|
|
2398
|
-
this.#warn(`could not reach the OS keyring \u2014 it may be locked, or no keyring service is running (${error instanceof Error ? error.message : String(error)}); using ${this.#path()} instead, readable only by you`);
|
|
2399
|
-
}
|
|
2400
|
-
return void 0;
|
|
2401
|
-
}
|
|
2402
|
-
}
|
|
2403
|
-
};
|
|
2404
|
-
|
|
2405
2258
|
// node_modules/.pnpm/@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/logging.js
|
|
2406
2259
|
import { appendFileSync } from "node:fs";
|
|
2407
2260
|
|
|
@@ -2762,6 +2615,153 @@ var loadConstants = /* @__PURE__ */ __name((layers, schema) => {
|
|
|
2762
2615
|
return deepFreeze(result.output);
|
|
2763
2616
|
}, "loadConstants");
|
|
2764
2617
|
|
|
2618
|
+
// node_modules/.pnpm/@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/credentials.js
|
|
2619
|
+
import { readFileSync as readFileSync2 } from "node:fs";
|
|
2620
|
+
import { join as join3, resolve } from "node:path";
|
|
2621
|
+
var keyringService = /* @__PURE__ */ __name((service, _configDir, _isolated) => service, "keyringService");
|
|
2622
|
+
var movedRunService = /* @__PURE__ */ __name((service, configDir) => `${service}:${resolve(configDir)}`, "movedRunService");
|
|
2623
|
+
var warnedRuns = /* @__PURE__ */ new WeakSet();
|
|
2624
|
+
var Credentials = class {
|
|
2625
|
+
static {
|
|
2626
|
+
__name(this, "Credentials");
|
|
2627
|
+
}
|
|
2628
|
+
#configDir;
|
|
2629
|
+
#storage;
|
|
2630
|
+
#keyring;
|
|
2631
|
+
#env;
|
|
2632
|
+
#service;
|
|
2633
|
+
#envVar;
|
|
2634
|
+
#fileName;
|
|
2635
|
+
#warn;
|
|
2636
|
+
/** Set only for a moved run with the system keyring. */
|
|
2637
|
+
#temporaryService;
|
|
2638
|
+
constructor(options) {
|
|
2639
|
+
this.#configDir = options.configDir;
|
|
2640
|
+
this.#storage = options.storage ?? "auto";
|
|
2641
|
+
this.#keyring = options.keyring ?? systemKeyring;
|
|
2642
|
+
this.#env = options.env ?? process.env;
|
|
2643
|
+
this.#envVar = options.envVar;
|
|
2644
|
+
this.#fileName = options.fileName ?? "credentials.json";
|
|
2645
|
+
this.#warn = options.warn ?? ((message) => process.stderr.write(`${message}
|
|
2646
|
+
`));
|
|
2647
|
+
this.#service = options.service;
|
|
2648
|
+
const moved = this.#keyring === systemKeyring && (options.isolated === true || homeIsMoved({ env: this.#env }));
|
|
2649
|
+
this.#temporaryService = moved ? movedRunService(options.service, options.configDir) : void 0;
|
|
2650
|
+
}
|
|
2651
|
+
read(account) {
|
|
2652
|
+
const fromEnv = this.#envVar ? this.#env[this.#envVar]?.trim() : void 0;
|
|
2653
|
+
if (fromEnv)
|
|
2654
|
+
return { secret: fromEnv, source: "environment" };
|
|
2655
|
+
const fromFile = this.#storage === "keyring" ? void 0 : this.#readFile()?.[account]?.secret;
|
|
2656
|
+
if (fromFile)
|
|
2657
|
+
return { secret: fromFile, source: "file" };
|
|
2658
|
+
if (this.#storage !== "file") {
|
|
2659
|
+
const temporary = this.#temporaryService;
|
|
2660
|
+
let fromKeyring;
|
|
2661
|
+
try {
|
|
2662
|
+
fromKeyring = temporary && this.#keyring.get(temporary, account) || this.#keyring.get(this.#service, account);
|
|
2663
|
+
} catch (error) {
|
|
2664
|
+
throw this.#unreachable(account, error);
|
|
2665
|
+
}
|
|
2666
|
+
if (fromKeyring)
|
|
2667
|
+
return { secret: fromKeyring, source: "keyring" };
|
|
2668
|
+
}
|
|
2669
|
+
return void 0;
|
|
2670
|
+
}
|
|
2671
|
+
write(account, secret, options = {}) {
|
|
2672
|
+
const inFile = this.#storage === "auto" && this.#readFile()?.[account] !== void 0;
|
|
2673
|
+
if (this.#storage === "keyring" || this.#storage === "auto" && (options.signIn || !inFile)) {
|
|
2674
|
+
const stored = this.#tryKeyring(() => {
|
|
2675
|
+
this.#keyring.set(this.#temporaryService ?? this.#service, account, secret);
|
|
2676
|
+
return true;
|
|
2677
|
+
});
|
|
2678
|
+
if (stored) {
|
|
2679
|
+
if (inFile)
|
|
2680
|
+
this.#removeFromFile(account);
|
|
2681
|
+
return "keyring";
|
|
2682
|
+
}
|
|
2683
|
+
}
|
|
2684
|
+
const store = this.#readFile();
|
|
2685
|
+
if (!store) {
|
|
2686
|
+
throw new CliError("configuration_error", `${this.#path()} cannot be read as a credentials file; storing now would replace every secret in it. Fix the file or move it aside, then try again.`);
|
|
2687
|
+
}
|
|
2688
|
+
store[account] = { secret };
|
|
2689
|
+
this.#writeFile(store);
|
|
2690
|
+
return "file";
|
|
2691
|
+
}
|
|
2692
|
+
remove(account) {
|
|
2693
|
+
const removed = [];
|
|
2694
|
+
if (this.#storage !== "file") {
|
|
2695
|
+
if (this.#tryKeyring(() => this.#keyring.delete(this.#temporaryService ?? this.#service, account))) {
|
|
2696
|
+
removed.push("keyring");
|
|
2697
|
+
}
|
|
2698
|
+
if (this.#temporaryService && this.#ownersEntryExists(account)) {
|
|
2699
|
+
this.#warn(removed.includes("keyring") ? `removed this run's own sign-in of ${account} from the OS keyring and kept the owner's: a run with moved folders never removes it` : `kept ${account} in the OS keyring: it is the owner's sign-in, shared with every run, and a run with moved folders never removes it`);
|
|
2700
|
+
}
|
|
2701
|
+
}
|
|
2702
|
+
if (this.#storage !== "keyring" && this.#removeFromFile(account))
|
|
2703
|
+
removed.push("file");
|
|
2704
|
+
return removed;
|
|
2705
|
+
}
|
|
2706
|
+
#removeFromFile(account) {
|
|
2707
|
+
const store = this.#readFile();
|
|
2708
|
+
if (store?.[account] === void 0)
|
|
2709
|
+
return false;
|
|
2710
|
+
delete store[account];
|
|
2711
|
+
this.#writeFile(store);
|
|
2712
|
+
return true;
|
|
2713
|
+
}
|
|
2714
|
+
/** Only for the warning: a keyring that fails here must not fail a removal that already happened. */
|
|
2715
|
+
#ownersEntryExists(account) {
|
|
2716
|
+
try {
|
|
2717
|
+
return this.#keyring.get(this.#service, account) !== null;
|
|
2718
|
+
} catch {
|
|
2719
|
+
return false;
|
|
2720
|
+
}
|
|
2721
|
+
}
|
|
2722
|
+
#path() {
|
|
2723
|
+
return join3(this.#configDir, this.#fileName);
|
|
2724
|
+
}
|
|
2725
|
+
/** `undefined` when the file exists but is not a store: writing would replace what it holds. */
|
|
2726
|
+
#readFile() {
|
|
2727
|
+
let text2;
|
|
2728
|
+
try {
|
|
2729
|
+
text2 = readFileSync2(this.#path(), "utf8");
|
|
2730
|
+
} catch (error) {
|
|
2731
|
+
if (error.code === "ENOENT")
|
|
2732
|
+
return {};
|
|
2733
|
+
return void 0;
|
|
2734
|
+
}
|
|
2735
|
+
try {
|
|
2736
|
+
const parsed = JSON.parse(text2);
|
|
2737
|
+
return typeof parsed === "object" && parsed !== null && !Array.isArray(parsed) ? parsed : void 0;
|
|
2738
|
+
} catch {
|
|
2739
|
+
return void 0;
|
|
2740
|
+
}
|
|
2741
|
+
}
|
|
2742
|
+
#writeFile(store) {
|
|
2743
|
+
writeSecurely(this.#path(), `${JSON.stringify(store, null, 2)}
|
|
2744
|
+
`, 384);
|
|
2745
|
+
}
|
|
2746
|
+
#unreachable(account, error) {
|
|
2747
|
+
const where = this.#storage === "keyring" ? "" : `, and ${this.#path()} holds no sign-in for ${account}`;
|
|
2748
|
+
return new CliError("configuration_error", `the OS keyring did not answer (${error instanceof Error ? error.message : String(error)})${where}. On Linux a restarted session bus is a known cause: log out and back in, or set DBUS_SESSION_BUS_ADDRESS=unix:path=$XDG_RUNTIME_DIR/bus. On a machine with no keyring, sign in with file storage.`, { reason: "keyring.unreachable" });
|
|
2749
|
+
}
|
|
2750
|
+
#tryKeyring(operation) {
|
|
2751
|
+
if (this.#storage === "keyring")
|
|
2752
|
+
return operation();
|
|
2753
|
+
try {
|
|
2754
|
+
return operation();
|
|
2755
|
+
} catch (error) {
|
|
2756
|
+
if (!warnedRuns.has(this.#env)) {
|
|
2757
|
+
warnedRuns.add(this.#env);
|
|
2758
|
+
this.#warn(`could not reach the OS keyring \u2014 it may be locked, or no keyring service is running (${error instanceof Error ? error.message : String(error)}); using ${this.#path()} instead, readable only by you`);
|
|
2759
|
+
}
|
|
2760
|
+
return void 0;
|
|
2761
|
+
}
|
|
2762
|
+
}
|
|
2763
|
+
};
|
|
2764
|
+
|
|
2765
2765
|
// node_modules/.pnpm/@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/time.js
|
|
2766
2766
|
var abortError = /* @__PURE__ */ __name(() => new DOMException("The operation was aborted.", "AbortError"), "abortError");
|
|
2767
2767
|
var realSleep = /* @__PURE__ */ __name((ms, signal) => new Promise((resolve2, reject) => {
|
|
File without changes
|