hyperframes 0.8.143 → 0.8.144
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/{add-Q5EYDUAY.js → add-CWRTVGDB.js} +12 -12
- package/dist/{animatedGifPrep-H2DUQEZ3.js → animatedGifPrep-JTOHIWI4.js} +7 -7
- package/dist/{asset-C7JBYYX4.js → asset-KU2Z4UFM.js} +2 -2
- package/dist/{assetCataloger-FRO4G6OU.js → assetCataloger-3CS2P7PA.js} +3 -3
- package/dist/{auth-FRWLCO36.js → auth-IDSOIQWG.js} +1 -1
- package/dist/{autoUpdate-E4OZXQK6.js → autoUpdate-373B4BA2.js} +2 -2
- package/dist/{backgroundChecks-FSUVHN5L.js → backgroundChecks-53Q3NAMG.js} +3 -3
- package/dist/backgroundChecksWorker.js +3 -3
- package/dist/{batchRender-4U73BYTU.js → batchRender-UKZA6BME.js} +4 -4
- package/dist/{beats-U6KJWF35.js → beats-N5JGEOFR.js} +13 -13
- package/dist/{benchmark-5ONT7V7B.js → benchmark-CUN3LN4V.js} +9 -9
- package/dist/{browser-R4DU46IE.js → browser-NCZT5AP6.js} +39 -55
- package/dist/{bundleWithLocalizedFonts-VH55VOAL.js → bundleWithLocalizedFonts-FWC7PE2D.js} +2 -2
- package/dist/{capture-26G2DPSI.js → capture-QBLG3VJR.js} +18 -18
- package/dist/{capture-OGQAEYKO.js → capture-YLS32UHT.js} +2 -2
- package/dist/{catalog-RKORTIUE.js → catalog-HIWNAFHW.js} +12 -12
- package/dist/{catch-up-4OBERRQO.js → catch-up-HGS7KIAC.js} +4 -4
- package/dist/{check-P2XDN57S.js → check-FH6UYYLO.js} +66 -55
- package/dist/{checkBrowser-NTGJGAEA.js → checkBrowser-RNWNOMCZ.js} +81 -30
- package/dist/{chunk-LVX6NK36.js → chunk-2DA2BBNY.js} +1 -1
- package/dist/{chunk-4M4EC7JX.js → chunk-3VYNNWVA.js} +12 -1
- package/dist/{chunk-N3DQEVSI.js → chunk-3XTEXWNN.js} +8 -5
- package/dist/{chunk-KO5QBV73.js → chunk-4LAR447G.js} +1 -1
- package/dist/{chunk-W35EKBS6.js → chunk-4OC7MQNB.js} +2 -2
- package/dist/{chunk-CLOH4LIB.js → chunk-54QISXOC.js} +2 -2
- package/dist/{chunk-HC7EVDEL.js → chunk-5HJ343GH.js} +1 -1
- package/dist/{chunk-33RZPZ4K.js → chunk-5VMR4WBS.js} +271 -119
- package/dist/{chunk-PJU63L6W.js → chunk-5WADG7PR.js} +1 -1
- package/dist/{chunk-LW6HO6U3.js → chunk-7RAYSCYT.js} +1 -1
- package/dist/{chunk-QRKLPWEX.js → chunk-7SDCIWHQ.js} +11 -2
- package/dist/{chunk-LAOCA3MQ.js → chunk-A4Q7W4LV.js} +13 -8
- package/dist/{chunk-BT27OYYX.js → chunk-A53CBD24.js} +18 -12
- package/dist/{chunk-4PFZPP2N.js → chunk-A6S35NYA.js} +54 -16
- package/dist/{chunk-HW4AKJ5F.js → chunk-AUBOF2PN.js} +1 -1
- package/dist/{chunk-ZLW2V65P.js → chunk-BSQ7XANM.js} +3 -2
- package/dist/{chunk-LCSMOLGX.js → chunk-BYSBRF24.js} +69 -8
- package/dist/{chunk-BFDJ63J5.js → chunk-DDIVWXN7.js} +1 -1
- package/dist/{chunk-KOEWEFHK.js → chunk-DIRJ322I.js} +10 -5
- package/dist/{chunk-PAGIICKN.js → chunk-EX6C672Y.js} +1 -1
- package/dist/{chunk-6XMFEICO.js → chunk-F2SMS24Q.js} +34 -19
- package/dist/{chunk-QVYVUCWD.js → chunk-GEWKFRFI.js} +1 -1
- package/dist/{chunk-P7THMINS.js → chunk-GZM2EFOE.js} +1 -1
- package/dist/{chunk-KJJLA674.js → chunk-GZVP4TWN.js} +1 -46
- package/dist/{chunk-TAMQYQGJ.js → chunk-I5KY7EZP.js} +1 -1
- package/dist/{chunk-XONFUK3M.js → chunk-IEIJRMLZ.js} +47 -35
- package/dist/chunk-IR35BCLK.js +13 -0
- package/dist/{chunk-2LBBHMKT.js → chunk-JEHFZQYT.js} +1 -1
- package/dist/{chunk-KDPYVTEU.js → chunk-KBB4RG6F.js} +6 -1
- package/dist/{chunk-VIVBA6E6.js → chunk-KFKZ3ISO.js} +1 -1
- package/dist/{sherpa-LVIUEAGF.js → chunk-L5TUCXWR.js} +11 -45
- package/dist/{chunk-GNBGPUJ7.js → chunk-LC3RQURJ.js} +3 -3
- package/dist/{chunk-I7QGQAZM.js → chunk-LFX2HEYP.js} +7 -7
- package/dist/{chunk-U3X3TPBW.js → chunk-MAYCCGMQ.js} +11 -2
- package/dist/{chunk-UICWP23D.js → chunk-MXNDKDFT.js} +3 -3
- package/dist/{chunk-POLR33RB.js → chunk-NOPBBSLA.js} +15 -17
- package/dist/{chunk-DF2BHILQ.js → chunk-NV4RXIQ7.js} +3 -3
- package/dist/{chunk-KQLGTGE5.js → chunk-OIDN7G42.js} +2 -2
- package/dist/{chunk-F26LCYRY.js → chunk-OUSLVRO4.js} +68 -77
- package/dist/{chunk-Y6QL2LGO.js → chunk-P6WH6QTV.js} +1 -1
- package/dist/{chunk-OBXQRJWQ.js → chunk-QATWIE4K.js} +1 -1
- package/dist/{chunk-QFN7NVWM.js → chunk-RG3QWWIE.js} +1 -1
- package/dist/{chunk-HLYOEIWM.js → chunk-RI53TS2Y.js} +2 -2
- package/dist/{chunk-5FISWJ37.js → chunk-RVFEDAUV.js} +4 -4
- package/dist/{chunk-HMT2RPZU.js → chunk-SLCFKB3Y.js} +13 -9
- package/dist/chunk-UPFUC4DB.js +136 -0
- package/dist/{chunk-BYK73CR7.js → chunk-VYSUZEJG.js} +5 -5
- package/dist/chunk-WJB7WI4J.js +3753 -0
- package/dist/{chunk-7UYBQ6NF.js → chunk-XGFHYAYN.js} +14 -10
- package/dist/{chunk-OSSHSIMD.js → chunk-XU5GGV6R.js} +1 -1
- package/dist/{chunk-FVYXDXEV.js → chunk-Y6UPYWJS.js} +2 -2
- package/dist/{chunk-UM2GRYM3.js → chunk-YJXHMIZA.js} +3 -3
- package/dist/{chunk-3NE7ZYU2.js → chunk-YUAXFWSQ.js} +3 -3
- package/dist/{chunk-TVCRUG2S.js → chunk-ZEUONDQG.js} +1 -1
- package/dist/{chunk-ZQQ3SEIE.js → chunk-ZOA2SC4P.js} +99 -31
- package/dist/{clean-YHGPY33K.js → clean-KPX27IKJ.js} +18 -18
- package/dist/cli.js +68 -56
- package/dist/{cloud-DOFI5ISR.js → cloud-P7DAOISN.js} +4 -4
- package/dist/{cloudrun-KTZ4XDHL.js → cloudrun-XM56TBOH.js} +4 -4
- package/dist/{compare-SMMIZN2C.js → compare-F6YAFZZM.js} +25 -25
- package/dist/{compiler-TEXQWW6N.js → compiler-JZ4GNFMG.js} +6 -4
- package/dist/{component-B3GCNGSS.js → component-3CFOGIQA.js} +3 -3
- package/dist/{compositions-OQNZZTKF.js → compositions-CPCMWF24.js} +11 -11
- package/dist/{delete-EL5LVSEP.js → delete-GYVKOKB6.js} +2 -2
- package/dist/{dist-5UVIRMSM.js → dist-KDJTFJHA.js} +2 -2
- package/dist/{dist-XN234YFQ.js → dist-YPWQDWJ4.js} +4 -4
- package/dist/{doctor-UOL3OI2A.js → doctor-GWI3B6JT.js} +13 -13
- package/dist/{events-NIZBS6S7.js → events-BRRUDPPT.js} +3 -3
- package/dist/{events-K2DB2PBC.js → events-V2QFN4YM.js} +2 -2
- package/dist/{feedback-QMP4E6L7.js → feedback-CXMD7FWL.js} +9 -9
- package/dist/{ffmpeg-QIUFEFTY.js → ffmpeg-T5SH2EFJ.js} +3 -2
- package/dist/{figma-2AUJRNVC.js → figma-YABDWD66.js} +3 -3
- package/dist/fontLocalizeCli.js +9 -9
- package/dist/{get-P5NC7SRM.js → get-L2SOQKHX.js} +2 -2
- package/dist/{gpuPolicy-7N5MCE2G.js → gpuPolicy-NBJNWHYS.js} +11 -9
- package/dist/{grade-compare-HV5AFZ6P.js → grade-compare-STXQPKYQ.js} +27 -27
- package/dist/{help-3TSTXBLN.js → help-4H6BSFLB.js} +2 -2
- package/dist/{history-D65XFJ6D.js → history-4IQOLTHJ.js} +5 -5
- package/dist/hyperframe-runtime.js +56 -56
- package/dist/hyperframe.manifest.json +1 -1
- package/dist/hyperframe.runtime.iife.js +56 -56
- package/dist/hyperframes-player.global.js +3 -3
- package/dist/{info-TXV7MLFO.js → info-2CZOTNBC.js} +8 -8
- package/dist/{init-OSDMJZJV.js → init-6BXK42VS.js} +35 -36
- package/dist/{inspect-RQQSAYIJ.js → inspect-VKU47TBH.js} +26 -26
- package/dist/{installer-CDOB32HE.js → installer-T2BSSUDY.js} +5 -5
- package/dist/{keyframes-V75Q6GRM.js → keyframes-IEYVHRPI.js} +6 -6
- package/dist/{lambda-RODV4RCX.js → lambda-TIKG25CK.js} +5 -5
- package/dist/{layout-IZAI5SFC.js → layout-XOI4PT7A.js} +26 -26
- package/dist/{lint-PLXOXY5R.js → lint-DWCMVIX5.js} +8 -8
- package/dist/{lintProject-OQ6H6XBR.js → lintProject-UBZ3TDHU.js} +2 -2
- package/dist/{list-BQBPNKDZ.js → list-7GXKG5QM.js} +2 -2
- package/dist/{login-NP6F4FHC.js → login-BQ5L2UHX.js} +4 -4
- package/dist/{manager-CT3D67CG.js → manager-BPSR6D3V.js} +2 -2
- package/dist/{manager-GXYF4AVO.js → manager-YKMHR6LN.js} +8 -5
- package/dist/{media-treatment-PXGMZ4A4.js → media-treatment-IFB7OSZ3.js} +12 -12
- package/dist/{models-CEZM6XZ7.js → models-TY4PJ545.js} +59 -19
- package/dist/{motionShot-R4GHYWYM.js → motionShot-WXMFHICW.js} +21 -22
- package/dist/{normalize-H6KUHHEI.js → normalize-U3SL5VG3.js} +2 -2
- package/dist/{normalize-audio-MQ7NFCOV.js → normalize-audio-RFD776HQ.js} +6 -6
- package/dist/{open-AKQTGNXF.js → open-7IXXGO2E.js} +4 -4
- package/dist/parakeetRunner-IHLYYMTZ.js +67 -0
- package/dist/{pipeline-SYJYP2RM.js → pipeline-TXKPLL2U.js} +10 -9
- package/dist/{play-NBH4B7PL.js → play-J2KP64UK.js} +19 -19
- package/dist/{preflight-Y5DN5D37.js → preflight-B4AFK3RG.js} +4 -4
- package/dist/{present-XAX55CFS.js → present-MHHNRVRA.js} +15 -15
- package/dist/{preview-OLANKNFA.js → preview-CONUOFFQ.js} +19 -19
- package/dist/{producer-Q6YNZZUJ.js → producer-ZI46K7HH.js} +1 -1
- package/dist/{projectConfig-EM26P45P.js → projectConfig-FGGVG5MV.js} +7 -7
- package/dist/{publication-OXWJZKSX.js → publication-TXFBMW6B.js} +3 -3
- package/dist/{publish-4VBWP2UB.js → publish-YZSPBFRD.js} +11 -11
- package/dist/{remove-background-REB7427G.js → remove-background-4ATVLHLG.js} +11 -10
- package/dist/{render-K25YOG3M.js → render-6FBYLYGJ.js} +11 -11
- package/dist/{render-3CVZ2SZG.js → render-GFW5BPES.js} +4 -4
- package/dist/{render-TSE75QUL.js → render-MH4IUPWB.js} +26 -26
- package/dist/{render-batch-GGUOK3DS.js → render-batch-XUCZ2PUJ.js} +4 -4
- package/dist/{renderCancellation-PZRWB53I.js → renderCancellation-XF7M7IUP.js} +10 -9
- package/dist/renderSetupWorker.js +32 -44
- package/dist/{resolver-S5VK6UCB.js → resolver-W7AYCQGS.js} +5 -5
- package/dist/sherpa-LDUB5NLY.js +75 -0
- package/dist/sherpaWorker.js +2 -1
- package/dist/skills/hyperframes-cli/references/lint-validate-inspect.md +1 -1
- package/dist/{skills-I65FU5HD.js → skills-VENERS5X.js} +7 -7
- package/dist/{skillsUpdateCheck-J57RNNIV.js → skillsUpdateCheck-UXFYTACG.js} +3 -3
- package/dist/{snapshot-YROOGY22.js → snapshot-C6T74HTI.js} +28 -28
- package/dist/{src-X426BZAG.js → src-FS5RSVEI.js} +8 -8
- package/dist/{src-JO5JOV7Y.js → src-VUJ2FUFK.js} +8 -6
- package/dist/{staticProjectServer-5VMBS262.js → staticProjectServer-V2RZ4DWD.js} +15 -15
- package/dist/studio/assets/{hyperframes-player-BXSuksFh.js → hyperframes-player-Bw_jIaSX.js} +3 -3
- package/dist/studio/assets/{index-J7jpL4pj.js → index-BVM9NuWl.js} +141 -141
- package/dist/studio/assets/{index-BgOVCqjo.js → index-Cj7W_c7p.js} +1 -1
- package/dist/studio/assets/{index-FgyO_5Kv.js → index-DyH9dT7b.js} +1 -1
- package/dist/studio/{chunk-TFLU2MGI.js → chunk-3GHTHPZD.js} +8 -1
- package/dist/studio/chunk-3GHTHPZD.js.map +1 -0
- package/dist/studio/{chunk-H2DUOXTF.js → chunk-G3EDKRZH.js} +3 -3
- package/dist/studio/{chunk-UYWON5AX.js → chunk-PEAKCOUW.js} +7 -3
- package/dist/studio/chunk-PEAKCOUW.js.map +1 -0
- package/dist/studio/{chunk-LOVBLSMR.js → chunk-Y2OHHNM2.js} +35 -19
- package/dist/studio/chunk-Y2OHHNM2.js.map +1 -0
- package/dist/studio/{domEditingLayers-KBTPQKGA.js → domEditingLayers-PYST4G45.js} +3 -3
- package/dist/studio/index.html +1 -1
- package/dist/studio/index.js +139 -70
- package/dist/studio/index.js.map +1 -1
- package/dist/studio/player.js +3 -3
- package/dist/studio/ui.d.ts +4 -5
- package/dist/studio/ui.js +1 -1
- package/dist/{studio-api-VRBZUGAE.js → studio-api-TQE7KWKO.js} +9 -9
- package/dist/{studioServer-DBNKZ6I6.js → studioServer-CYKSQK7L.js} +68 -52
- package/dist/{telemetry-CXAX3TO3.js → telemetry-A23PPRD6.js} +3 -3
- package/dist/{timeline-VQ34WH7J.js → timeline-T3QSGT3A.js} +69 -47
- package/dist/{tokens-62R7VFAZ.js → tokens-RT5HWA6C.js} +2 -2
- package/dist/{transcribe-XOHPPL2O.js → transcribe-FOLNOC5G.js} +115 -51
- package/dist/{transcribe-7KR7IPJA.js → transcribe-HCF64LQK.js} +14 -12
- package/dist/{tts-MUV42JXT.js → tts-B6AHFQEO.js} +1 -1
- package/dist/{updateCheck-POYNH3B5.js → updateCheck-27PIP3AA.js} +2 -2
- package/dist/{upgrade-NBNOT7J2.js → upgrade-TVGXBUPJ.js} +2 -2
- package/dist/{urlDownloader-3NS63A7B.js → urlDownloader-KBLBJKRL.js} +6 -6
- package/dist/{validate-Y2QDHAEP.js → validate-ZMYGK4QI.js} +20 -20
- package/dist/{video-SJDMTSTL.js → video-AVE5GIGM.js} +7 -7
- package/package.json +1 -1
- package/dist/chunk-6TPZSTCL.js +0 -3681
- package/dist/studio/chunk-LOVBLSMR.js.map +0 -1
- package/dist/studio/chunk-TFLU2MGI.js.map +0 -1
- package/dist/studio/chunk-UYWON5AX.js.map +0 -1
- package/dist/{screenshotCapture-TEUIWXWN.js → screenshotCapture-3JXXUZND.js} +3 -3
- package/dist/studio/{chunk-H2DUOXTF.js.map → chunk-G3EDKRZH.js.map} +0 -0
- package/dist/studio/{domEditingLayers-KBTPQKGA.js.map → domEditingLayers-PYST4G45.js.map} +0 -0
- package/dist/{synthesize-C3IWDAXF.js → synthesize-UCI4X5O7.js} +4 -4
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import { createRequire as __hf_createRequire } from "node:module";
|
|
2
|
+
import { fileURLToPath as __hf_fileURLToPath } from "node:url";
|
|
3
|
+
import { dirname as __hf_dirname } from "node:path";
|
|
4
|
+
var require = __hf_createRequire(import.meta.url);
|
|
5
|
+
var __filename = __hf_fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = __hf_dirname(__filename);
|
|
7
|
+
import {
|
|
8
|
+
CliUsageError
|
|
9
|
+
} from "./chunk-PBN6GBJE.js";
|
|
10
|
+
import {
|
|
11
|
+
c
|
|
12
|
+
} from "./chunk-ZTZA4UWZ.js";
|
|
13
|
+
|
|
14
|
+
// src/utils/reject-unknown-flags.ts
|
|
15
|
+
var ALWAYS_KNOWN = /* @__PURE__ */ new Set(["help", "h", "version", "v", "json"]);
|
|
16
|
+
function nameVariants(name) {
|
|
17
|
+
const kebab = name.replace(/[A-Z]/g, (c2) => "-" + c2.toLowerCase());
|
|
18
|
+
const camel = name.replace(/-([a-z])/g, (_, c2) => c2.toUpperCase());
|
|
19
|
+
return [name, kebab, camel];
|
|
20
|
+
}
|
|
21
|
+
function* spellingsOf(name, def) {
|
|
22
|
+
yield* nameVariants(name);
|
|
23
|
+
const alias = def && "alias" in def ? def.alias : void 0;
|
|
24
|
+
if (typeof alias === "string") yield alias;
|
|
25
|
+
else if (Array.isArray(alias)) yield* alias;
|
|
26
|
+
}
|
|
27
|
+
function knownFlags(args) {
|
|
28
|
+
const known = new Set(ALWAYS_KNOWN);
|
|
29
|
+
for (const [name, def] of Object.entries(args ?? {})) {
|
|
30
|
+
for (const s of spellingsOf(name, def)) known.add(s);
|
|
31
|
+
}
|
|
32
|
+
return known;
|
|
33
|
+
}
|
|
34
|
+
function longFlagName(tok) {
|
|
35
|
+
const name = tok.slice(2).split("=")[0] ?? "";
|
|
36
|
+
return name.startsWith("no-") ? name.slice(3) : name;
|
|
37
|
+
}
|
|
38
|
+
function unknownFlagIn(tok, known) {
|
|
39
|
+
if (tok === "-" || !tok.startsWith("-")) return null;
|
|
40
|
+
if (tok.startsWith("--")) {
|
|
41
|
+
const name = longFlagName(tok);
|
|
42
|
+
return name && !known.has(name) ? `--${name}` : null;
|
|
43
|
+
}
|
|
44
|
+
for (const ch of tok.slice(1).split("=")[0] ?? "") {
|
|
45
|
+
if (!known.has(ch)) return `-${ch}`;
|
|
46
|
+
}
|
|
47
|
+
return null;
|
|
48
|
+
}
|
|
49
|
+
function assertKnownFlags(cmd, rawArgs) {
|
|
50
|
+
if (!Array.isArray(rawArgs)) return;
|
|
51
|
+
const rawDef = cmd.args;
|
|
52
|
+
const args = rawDef && typeof rawDef === "object" ? rawDef : void 0;
|
|
53
|
+
const known = knownFlags(args);
|
|
54
|
+
for (const tok of rawArgs) {
|
|
55
|
+
if (tok === "--") break;
|
|
56
|
+
const bad = unknownFlagIn(tok, known);
|
|
57
|
+
if (bad) throw new Error(`Unknown flag: ${bad}`);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
function stringValueFlagOwners(args, ignore) {
|
|
61
|
+
const owners = /* @__PURE__ */ new Map();
|
|
62
|
+
for (const [name, def] of Object.entries(args ?? {})) {
|
|
63
|
+
if (def?.type !== "string" && def?.type !== "enum") continue;
|
|
64
|
+
if (ignore?.has(name)) continue;
|
|
65
|
+
for (const s of spellingsOf(name, def)) owners.set(s, name);
|
|
66
|
+
}
|
|
67
|
+
return owners;
|
|
68
|
+
}
|
|
69
|
+
function ownableFlagSpelling(tok) {
|
|
70
|
+
if (tok.includes("=")) return null;
|
|
71
|
+
if (tok.startsWith("--")) return tok.slice(2);
|
|
72
|
+
if (tok.length === 2 && tok.startsWith("-")) return tok.slice(1);
|
|
73
|
+
return null;
|
|
74
|
+
}
|
|
75
|
+
var SWALLOW_REWRITE_FLAGS = {
|
|
76
|
+
check: /* @__PURE__ */ new Set(["frame-check"])
|
|
77
|
+
};
|
|
78
|
+
var SWALLOW_IGNORE_FLAGS = {
|
|
79
|
+
upgrade: /* @__PURE__ */ new Set(["project"])
|
|
80
|
+
};
|
|
81
|
+
function swallowedValueMessage(flagName, next, hint) {
|
|
82
|
+
if (next === "--")
|
|
83
|
+
return `Missing value for --${flagName}: "--" ends option parsing here; ${hint}`;
|
|
84
|
+
return `Missing value for --${flagName}: value "${next}" appears to have swallowed the next option; ${hint}`;
|
|
85
|
+
}
|
|
86
|
+
function swallowedFlagUsageError(flagName, next) {
|
|
87
|
+
const hint = `use --${flagName}= or move --${flagName} to the end`;
|
|
88
|
+
return new CliUsageError(swallowedValueMessage(flagName, next, hint));
|
|
89
|
+
}
|
|
90
|
+
function throwSwallowedFlagError(flagName, next) {
|
|
91
|
+
const hint = `pass one: --${flagName} <value> or --${flagName}=<value>`;
|
|
92
|
+
const message = swallowedValueMessage(flagName, next, hint);
|
|
93
|
+
console.error(c.error(message));
|
|
94
|
+
throw new CliUsageError(message, { presented: true });
|
|
95
|
+
}
|
|
96
|
+
function looksLikeSwallowedFlag(next, known) {
|
|
97
|
+
if (next === void 0 || next === "-") return false;
|
|
98
|
+
return next === "--" || next.startsWith("-") && unknownFlagIn(next, known) === null;
|
|
99
|
+
}
|
|
100
|
+
function swallowingArgName(tok, next, owners, known) {
|
|
101
|
+
const spelling = ownableFlagSpelling(tok);
|
|
102
|
+
const ownerArgName = spelling ? owners.get(spelling) : void 0;
|
|
103
|
+
return ownerArgName && looksLikeSwallowedFlag(next, known) ? ownerArgName : void 0;
|
|
104
|
+
}
|
|
105
|
+
function rewriteArgName(tok, after, owners, rewriteFlags) {
|
|
106
|
+
if (!after?.startsWith("--no-")) return void 0;
|
|
107
|
+
const spelling = ownableFlagSpelling(tok);
|
|
108
|
+
const name = spelling ? owners.get(spelling) : void 0;
|
|
109
|
+
return name && rewriteFlags?.has(name) ? name : void 0;
|
|
110
|
+
}
|
|
111
|
+
function guardSwallowedFlagValues(cmd, path, rawArgs) {
|
|
112
|
+
if (!Array.isArray(rawArgs)) return { rawArgs, rewritten: false };
|
|
113
|
+
const rawDef = cmd?.args;
|
|
114
|
+
const argsDef = rawDef && typeof rawDef === "object" ? rawDef : void 0;
|
|
115
|
+
const known = knownFlags(argsDef);
|
|
116
|
+
const owners = stringValueFlagOwners(argsDef, SWALLOW_IGNORE_FLAGS[path]);
|
|
117
|
+
const rewriteFlags = SWALLOW_REWRITE_FLAGS[path];
|
|
118
|
+
let out;
|
|
119
|
+
for (const [i, tok] of rawArgs.entries()) {
|
|
120
|
+
if (tok === "--") break;
|
|
121
|
+
const next = rawArgs.slice(i + 1).find((t) => !t.startsWith("--no-"));
|
|
122
|
+
const ownerArgName = swallowingArgName(tok, next, owners, known);
|
|
123
|
+
const rewrite = rewriteArgName(tok, rawArgs[i + 1], owners, rewriteFlags) ?? ownerArgName;
|
|
124
|
+
if (!rewrite) continue;
|
|
125
|
+
if (!rewriteFlags?.has(rewrite)) throwSwallowedFlagError(rewrite, next);
|
|
126
|
+
out ??= rawArgs.slice();
|
|
127
|
+
out[i] = `${tok}=`;
|
|
128
|
+
}
|
|
129
|
+
return { rawArgs: out ?? rawArgs, rewritten: out !== void 0 };
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
export {
|
|
133
|
+
assertKnownFlags,
|
|
134
|
+
swallowedFlagUsageError,
|
|
135
|
+
guardSwallowedFlagValues
|
|
136
|
+
};
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
} from "./chunk-3DKN5WKL.js";
|
|
21
21
|
import {
|
|
22
22
|
runEnvironmentChecks
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-DIRJ322I.js";
|
|
24
24
|
import {
|
|
25
25
|
getAvailableMemoryMb,
|
|
26
26
|
getFreeDiskMb,
|
|
@@ -32,18 +32,18 @@ import {
|
|
|
32
32
|
} from "./chunk-S3S4TGEH.js";
|
|
33
33
|
import {
|
|
34
34
|
resolveExtractCacheDir
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-5VMR4WBS.js";
|
|
36
36
|
import {
|
|
37
37
|
getUpdateMeta,
|
|
38
38
|
withMeta
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-P6WH6QTV.js";
|
|
40
40
|
import {
|
|
41
41
|
CONFIG_PATH,
|
|
42
42
|
withFileLock
|
|
43
43
|
} from "./chunk-XUXGIA7H.js";
|
|
44
44
|
import {
|
|
45
45
|
VERSION
|
|
46
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-4OC7MQNB.js";
|
|
47
47
|
import {
|
|
48
48
|
normalizeErrorMessage
|
|
49
49
|
} from "./chunk-KNU5COPB.js";
|
|
@@ -232,7 +232,7 @@ function checkEnvironment() {
|
|
|
232
232
|
return { ok: true, detail: parts.join(" \xB7 ") };
|
|
233
233
|
}
|
|
234
234
|
async function checkWhisper() {
|
|
235
|
-
const { findWhisper, getInstallInstructions } = await import("./manager-
|
|
235
|
+
const { findWhisper, getInstallInstructions } = await import("./manager-YKMHR6LN.js");
|
|
236
236
|
const result = findWhisper();
|
|
237
237
|
if (result) {
|
|
238
238
|
return { ok: true, detail: result.executablePath };
|