hyperframes 0.8.219 → 0.8.221
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-2MXC4QCY.js → add-7CVO7K6M.js} +14 -11
- package/dist/{agentPromptGenerator-FIT75HWJ.js → agentPromptGenerator-YFC2SJLF.js} +6 -6
- package/dist/{animatedGifPrep-MFUNECD3.js → animatedGifPrep-YSMY5GU2.js} +6 -6
- package/dist/api.js +16 -16
- package/dist/{asset-T6BI53SJ.js → asset-ZVKHSO3M.js} +2 -2
- package/dist/{assetCataloger-DP4SHXWI.js → assetCataloger-6IBSEOK7.js} +7 -7
- package/dist/{audio-SRQLO7BP.js → audio-JUV3TVSW.js} +14 -13
- package/dist/{auth-JONDB26P.js → auth-2J6FP462.js} +2 -2
- package/dist/{autoUpdate-YKJOOXCI.js → autoUpdate-ML6EZK6D.js} +2 -2
- package/dist/{backgroundChecks-GSTIIVNR.js → backgroundChecks-MAWP2REX.js} +3 -3
- package/dist/backgroundChecksWorker.js +3 -3
- package/dist/{batchRender-ESAPNTE3.js → batchRender-Z7MGNJZH.js} +3 -3
- package/dist/{beats-OOVMTM4B.js → beats-LRZOZUUQ.js} +8 -8
- package/dist/{benchmark-WBFYHOSI.js → benchmark-XJWLDTIL.js} +8 -8
- package/dist/{browser-AZZAO24H.js → browser-STEVEWWA.js} +4 -4
- package/dist/{bundleWithLocalizedFonts-GP4MD6DJ.js → bundleWithLocalizedFonts-WH63ZWUT.js} +2 -2
- package/dist/{capture-MGRV5VWE.js → capture-U3ZT3GNI.js} +12 -12
- package/dist/{capture-PN7GEEAB.js → capture-VB5ID7HT.js} +3 -3
- package/dist/{captureCompositionFrame-JYGGPKFZ.js → captureCompositionFrame-MXJ3WO2R.js} +11 -11
- package/dist/{catalog-D42NLFZT.js → catalog-ICGHSRPZ.js} +12 -11
- package/dist/{catch-up-TUL26VOB.js → catch-up-DJPQKXQB.js} +4 -4
- package/dist/{check-DBBH7DI3.js → check-TL7AGWPO.js} +39 -38
- package/dist/{checkAudio-UJ7XTDRD.js → checkAudio-GPTU6EGB.js} +9 -9
- package/dist/{checkBrowser-3YIZYXIR.js → checkBrowser-FG5DAW2R.js} +31 -30
- package/dist/{chunk-NP2QEAEW.js → chunk-2ZNURTH5.js} +9 -9
- package/dist/{chunk-ILCIWNPQ.js → chunk-322M35EB.js} +3 -3
- package/dist/{chunk-DWMI7CKI.js → chunk-3PJ3HVLG.js} +1 -1
- package/dist/{chunk-IGZHC55Z.js → chunk-3STL4WJ6.js} +72 -32
- package/dist/{chunk-3KDODK5M.js → chunk-4ZM727AO.js} +2 -2
- package/dist/{chunk-DMUDI5IH.js → chunk-5YT2KHPO.js} +2 -2
- package/dist/{chunk-473HMKSC.js → chunk-625I5VBE.js} +2 -2
- package/dist/{chunk-WUABYDXU.js → chunk-67CALYTU.js} +1 -1
- package/dist/{chunk-DOZGTBDV.js → chunk-6HKUUBAV.js} +2 -2
- package/dist/{chunk-LIWBGRPD.js → chunk-6YW3FEHC.js} +3 -3
- package/dist/{chunk-XXLG7GCA.js → chunk-74E7EHVH.js} +1 -1
- package/dist/{chunk-LJUFR7G5.js → chunk-7DVR3DL3.js} +7 -7
- package/dist/{chunk-2UT32TJS.js → chunk-AW7A27JM.js} +1 -1
- package/dist/{chunk-TCV7N2UY.js → chunk-AZI2T2KO.js} +1 -1
- package/dist/{chunk-5UIODBMI.js → chunk-AZXDEC2G.js} +1 -1
- package/dist/{chunk-FWWJRJB5.js → chunk-BQNTY7J5.js} +1 -1
- package/dist/{chunk-BT5UT4XT.js → chunk-D2RQVJLZ.js} +2 -2
- package/dist/{chunk-G2E2DHH2.js → chunk-DMCU2ELU.js} +3 -3
- package/dist/{chunk-OWV36OJP.js → chunk-DS372VSV.js} +2 -5
- package/dist/{chunk-GP5X7V6U.js → chunk-F6WHVEUS.js} +1 -1
- package/dist/{chunk-G7ZTD2KJ.js → chunk-FKPJP7KG.js} +5 -5
- package/dist/{chunk-BKHRAHV6.js → chunk-GSCFMG4C.js} +2 -2
- package/dist/{chunk-QE5JXNSW.js → chunk-H3HC6U4I.js} +10 -10
- package/dist/{chunk-U2EUCTYQ.js → chunk-HSHKLYDI.js} +3 -3
- package/dist/{chunk-XUOLKUE7.js → chunk-I45R2REQ.js} +1 -1
- package/dist/{chunk-FAIFPYRO.js → chunk-IDWJJ7PP.js} +1 -1
- package/dist/{chunk-5ETJX6WM.js → chunk-J3OVTOVC.js} +18 -14
- package/dist/{chunk-KENUKJRG.js → chunk-JGZUG5V4.js} +2 -2
- package/dist/{chunk-BRU66Q24.js → chunk-KQPP4NIZ.js} +2 -2
- package/dist/{chunk-33XQUQKN.js → chunk-L63FJVSC.js} +1 -1
- package/dist/{chunk-MHZB6QSC.js → chunk-LYZB5CJN.js} +13 -3
- package/dist/{chunk-3VIICMJF.js → chunk-M2BCU4Y5.js} +1 -1
- package/dist/{chunk-YXZ56JUN.js → chunk-M2F6VGCP.js} +48 -15
- package/dist/{chunk-UGDLT4LZ.js → chunk-MEB6HWBM.js} +2 -2
- package/dist/{chunk-AU7VGKCP.js → chunk-MXVH6UW6.js} +1 -1
- package/dist/{chunk-UWV753SJ.js → chunk-MYNBV7WG.js} +9 -2
- package/dist/{chunk-C2G23WQQ.js → chunk-MYXFBIJO.js} +1 -1
- package/dist/{chunk-CBZN5JIK.js → chunk-NQOCM4KQ.js} +3 -3
- package/dist/{chunk-RYBFHEMZ.js → chunk-NYOQP6DO.js} +1 -1
- package/dist/{chunk-CPKBAMI3.js → chunk-O7WR4AHX.js} +14 -14
- package/dist/{chunk-K5GGTJJV.js → chunk-OMLDAF44.js} +1 -1
- package/dist/{chunk-64MFJSGZ.js → chunk-OOEOJPFY.js} +2 -2
- package/dist/{chunk-576ATOOU.js → chunk-OPKSVV4G.js} +2 -2
- package/dist/{chunk-KUQOUWJ4.js → chunk-P6FGS4U6.js} +2 -2
- package/dist/chunk-Q3PPGPEA.js +5061 -0
- package/dist/{chunk-KK5MZQXG.js → chunk-QLQVQQP6.js} +3 -3
- package/dist/{chunk-LGMRZWJS.js → chunk-QYUXDFJY.js} +1 -1
- package/dist/{chunk-O7YOS36L.js → chunk-ROVRC3CG.js} +2 -2
- package/dist/{chunk-XUTPVELE.js → chunk-RVCWVOXM.js} +3 -3
- package/dist/{chunk-UR6L2DXM.js → chunk-RVIMLJXC.js} +13 -13
- package/dist/{chunk-YATFRFNH.js → chunk-S5GOFDX5.js} +1 -1
- package/dist/{chunk-VTLIN7XN.js → chunk-SAKL7SZH.js} +2 -2
- package/dist/{chunk-Z27A7NUB.js → chunk-SHOE3UR6.js} +1 -1
- package/dist/{chunk-GGDVZ7O4.js → chunk-TMK3MW7B.js} +10 -10
- package/dist/{chunk-UDBW6TK4.js → chunk-TNQCXU37.js} +1 -1
- package/dist/{chunk-4OWVRHSV.js → chunk-TVT465RJ.js} +5 -5
- package/dist/{chunk-VO7IEWOH.js → chunk-U6WH572X.js} +7 -7
- package/dist/{chunk-FC7QIE5X.js → chunk-UNQ3CVKW.js} +19 -19
- package/dist/{chunk-543U46OR.js → chunk-US4BCRYB.js} +5 -0
- package/dist/chunk-WYKRGEDD.js +62 -0
- package/dist/{chunk-GLC5XHN5.js → chunk-XC3BGWCJ.js} +3 -44
- package/dist/{chunk-JH2AO4ZW.js → chunk-XDTCPMR3.js} +1 -1
- package/dist/{chunk-LJB2PF6K.js → chunk-XETZLYGW.js} +1 -1
- package/dist/{chunk-542VETC5.js → chunk-Y4GLFHO5.js} +1 -1
- package/dist/{chunk-Z537IJJH.js → chunk-YISDQ7YP.js} +4 -4
- package/dist/{chunk-BRYOYBO5.js → chunk-YKMFCE5B.js} +1 -1
- package/dist/{chunk-7ZRXSZF6.js → chunk-YSZ4VMXI.js} +1 -1
- package/dist/{chunk-VP5KECBU.js → chunk-YV2QQUTL.js} +2 -2
- package/dist/{chunk-GHWV6PIS.js → chunk-Z7YQEDA5.js} +1 -1
- package/dist/{chunk-QEKP7XCN.js → chunk-ZBLSSWSE.js} +1 -1
- package/dist/{chunk-TNQ4SSTR.js → chunk-ZKPRJPWN.js} +8 -8
- package/dist/{chunk-3MTNYVWM.js → chunk-ZOLKM3VZ.js} +5 -5
- package/dist/{clean-YERX334S.js → clean-3NMJWZXK.js} +19 -19
- package/dist/cli.js +62 -60
- package/dist/{cloud-5XFWROJK.js → cloud-CB3NYNUR.js} +4 -4
- package/dist/{cloudrun-5XEDIP77.js → cloudrun-2CTKCIXV.js} +4 -4
- package/dist/commands/layout-audit.browser.js +29 -5
- package/dist/commands/motion-signature.browser.js +11 -6
- package/dist/{compare-THYM62NL.js → compare-FVY3AMTT.js} +28 -27
- package/dist/{compiler-SLKHXYCO.js → compiler-SEQRWEEN.js} +3 -3
- package/dist/{component-N4FFNYA5.js → component-AEMJRROX.js} +3 -3
- package/dist/{compositions-XCM3Z65K.js → compositions-NRBSIBGZ.js} +10 -10
- package/dist/{delete-6PIKDOKV.js → delete-T4E53ELR.js} +2 -2
- package/dist/{deploy-PT77AP6G.js → deploy-PUF2DW3H.js} +1 -1
- package/dist/{dist-VNOJCTQR.js → dist-B6C3DU6I.js} +2 -2
- package/dist/{dist-XXBCSQYF.js → dist-VARV35QH.js} +1 -1
- package/dist/docs/motion-blur.md +28 -0
- package/dist/{docs-6EM6FDNI.js → docs-VAF5NM5B.js} +4 -0
- package/dist/{doctor-KLDSXKUM.js → doctor-FVBU575B.js} +13 -13
- package/dist/{events-OHISH3KL.js → events-DZ5PRR6F.js} +2 -2
- package/dist/{events-KEJFQQDQ.js → events-RSPDI7FX.js} +3 -3
- package/dist/{feedback-VTLWYGLQ.js → feedback-AALA3OA7.js} +7 -7
- package/dist/{ffmpeg-SG3AYA6M.js → ffmpeg-YXKE5CUE.js} +6 -6
- package/dist/{figma-5AHFOYPG.js → figma-37R727XZ.js} +3 -3
- package/dist/fontLocalizeCli.js +9 -9
- package/dist/{get-5VTBUZIR.js → get-L3VKJ6JF.js} +2 -2
- package/dist/{gpuPolicy-ODODH5JV.js → gpuPolicy-6QIFFWAI.js} +6 -6
- package/dist/{grade-compare-25HQJORH.js → grade-compare-7IN5QDJD.js} +29 -28
- package/dist/{heifImagePrep-SPBGWX2L.js → heifImagePrep-AWII25PM.js} +7 -7
- package/dist/{help-3AZ4ZSWZ.js → help-B4MB7MWW.js} +1 -1
- package/dist/{history-KZFZ2MJI.js → history-TQO6AWEQ.js} +7 -7
- package/dist/hyperframe.manifest.json +1 -1
- package/dist/hyperframe.runtime.iife.js +67 -67
- package/dist/hyperframes-player.global.js +1 -1
- package/dist/{info-XNYSD2SN.js → info-7CBHVXSG.js} +7 -7
- package/dist/{init-C76MX2UE.js → init-D7HKPQ5A.js} +27 -26
- package/dist/{inspect-OWDJTC64.js → inspect-VHDQL55M.js} +29 -28
- package/dist/{installer-OFIDWMYR.js → installer-EJNLL6SV.js} +4 -4
- package/dist/{keyframes-ZBIWACNT.js → keyframes-IFLBMAJP.js} +6 -6
- package/dist/{lambda-XS3E4XSL.js → lambda-I7EQULHC.js} +10 -10
- package/dist/{layout-HLU3IVDX.js → layout-MOCEANRO.js} +29 -28
- package/dist/{lint-DUJ5PM56.js → lint-HFXGSQKN.js} +7 -7
- package/dist/{lintProject-I4XPWIQZ.js → lintProject-VCDI6A2W.js} +1 -1
- package/dist/{list-KRDQLHDH.js → list-OFYIXVON.js} +2 -2
- package/dist/{localPage-KXNSCQIQ.js → localPage-QOOQ5YA2.js} +6 -6
- package/dist/{login-4P7LCOB5.js → login-WAG7B4PM.js} +4 -4
- package/dist/{manager-USFB6SE2.js → manager-34U5CEFB.js} +7 -7
- package/dist/{manager-I4ROBMYK.js → manager-ENFYM32B.js} +1 -1
- package/dist/{media-treatment-JOZB3MTT.js → media-treatment-2TLX6NKS.js} +12 -12
- package/dist/{models-RZRXHIER.js → models-M2F4WTAR.js} +10 -10
- package/dist/{motionShot-3SHLRT3L.js → motionShot-6WCTCV4W.js} +15 -15
- package/dist/{normalize-audio-SL2ATLJM.js → normalize-audio-T6PIPWOT.js} +8 -8
- package/dist/{open-TCGY4NB2.js → open-BC5METIY.js} +12 -11
- package/dist/{parakeetRunner-ZBO4LR7M.js → parakeetRunner-UXVY7PV2.js} +11 -11
- package/dist/{pipeline-7D36B3FW.js → pipeline-GJAJPWPB.js} +9 -9
- package/dist/{play-CTBPJFBX.js → play-UCIRUHCU.js} +20 -19
- package/dist/{preflight-GFWIOUO3.js → preflight-GVRYYIH5.js} +8 -8
- package/dist/{present-GXOHUNFP.js → present-46QLZOK4.js} +15 -15
- package/dist/{preview-BWCEXEII.js → preview-HWXMP7WL.js} +23 -21
- package/dist/{producer-UME4Q4HH.js → producer-2PBHUE5O.js} +1 -1
- package/dist/{projectConfig-I6QNMRVV.js → projectConfig-C4S3LBBX.js} +7 -6
- package/dist/{publication-JET7ZBWG.js → publication-GESNVVMS.js} +2 -2
- package/dist/{publish-ZGW46SKV.js → publish-IBY26S3T.js} +11 -10
- package/dist/{remove-background-YSJ7XFPQ.js → remove-background-3OBWOHVZ.js} +10 -10
- package/dist/{render-QFIWTDK3.js → render-3F6GQ5WW.js} +14 -14
- package/dist/{render-33TSTTN7.js → render-LSI5WXS7.js} +5 -5
- package/dist/{render-Q2VLJGFV.js → render-SR5RISLU.js} +36 -35
- package/dist/{render-batch-SDDZ3LM7.js → render-batch-HV4W3PZM.js} +5 -5
- package/dist/renderSetupWorker.js +2 -2
- package/dist/{resolver-VLOUQ7I6.js → resolver-R5X3HAPE.js} +5 -4
- package/dist/{sherpa-YKK3LRSI.js → sherpa-2Q6U4ZFY.js} +10 -10
- package/dist/skills/media-use/scripts/lib/adopt.mjs +11 -10
- package/dist/skills/media-use/scripts/lib/adopt.test.mjs +22 -0
- package/dist/{skills-5ENIWSB2.js → skills-FSGXQSHA.js} +5 -5
- package/dist/{skillsUpdateCheck-7GDJNW5A.js → skillsUpdateCheck-UW6643XX.js} +3 -3
- package/dist/{snapshot-O3JXB3VM.js → snapshot-HFPB34Y7.js} +62 -39
- package/dist/{src-6T5KES5G.js → src-ROWFWCEN.js} +5 -5
- package/dist/{src-MT7UQJT5.js → src-VMTQQUUP.js} +8 -8
- package/dist/{staticProjectServer-UP22EGMU.js → staticProjectServer-4TGZJIWN.js} +18 -17
- package/dist/{status-63BKLDVW.js → status-4AAPTTRW.js} +2 -2
- package/dist/studio/assets/{hyperframes-player-B83GGznX.js → hyperframes-player-B_wvwarc.js} +1 -1
- package/dist/studio/assets/{index-B9gVTopE.js → index-BDE7dwov.js} +6 -6
- package/dist/studio/assets/{index-Ca_tSAqR.js → index-D0jGq2dS.js} +1 -1
- package/dist/studio/index.html +1 -1
- package/dist/{studio-api-Q6KSNU77.js → studio-api-TSHXVZ6R.js} +9 -9
- package/dist/{studioSelectionClient-D6VMGTKQ.js → studioSelectionClient-FA6XPVIL.js} +1 -1
- package/dist/{studioServer-44OR56TK.js → studioServer-74ZBLNP2.js} +52 -57
- package/dist/{synthesize-IKSZPKFJ.js → synthesize-4JC74JW5.js} +13 -9
- package/dist/{telemetry-2N7DLYCQ.js → telemetry-3NDLZOPR.js} +3 -3
- package/dist/{timeline-MT56A3HB.js → timeline-5IFZJU7M.js} +20 -19
- package/dist/{tokens-V6O4I5IX.js → tokens-UFNPQVLS.js} +2 -2
- package/dist/{transcribe-GGV4YEF3.js → transcribe-7KQAUHEN.js} +9 -9
- package/dist/{transcribe-ZCJ6WB6R.js → transcribe-NAXKBIPW.js} +15 -15
- package/dist/{tts-MQNOBHLH.js → tts-BVTJEP72.js} +1 -1
- package/dist/{updateCheck-ZBBUGX3A.js → updateCheck-KDSFL3XX.js} +2 -2
- package/dist/{upgrade-L7SM3TPB.js → upgrade-EXX4C35N.js} +2 -2
- package/dist/{urlDownloader-HTBT6K5N.js → urlDownloader-4UFCIAPH.js} +5 -5
- package/dist/{validate-WXKYRV2E.js → validate-QYOHY3N6.js} +22 -22
- package/dist/{video-JH5WQC2I.js → video-HRL3V2R5.js} +7 -7
- package/dist/warmCheck.js +39 -38
- package/package.json +1 -1
- package/dist/chunk-4I7KQWZS.js +0 -5061
|
@@ -10,29 +10,29 @@ import {
|
|
|
10
10
|
import {
|
|
11
11
|
RegistryCompatibilityError,
|
|
12
12
|
gateRegistryItemsCompatibility
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-AW7A27JM.js";
|
|
14
14
|
import {
|
|
15
15
|
DEFAULT_PROJECT_CONFIG,
|
|
16
16
|
createProjectConfig,
|
|
17
17
|
loadProjectConfig,
|
|
18
18
|
projectConfigPath,
|
|
19
19
|
recordProjectRegistryItems
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-YKMFCE5B.js";
|
|
21
21
|
import {
|
|
22
22
|
resolveItemWithDependencies,
|
|
23
23
|
resolveItemsByTag
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-MYNBV7WG.js";
|
|
25
25
|
import {
|
|
26
26
|
InvalidVariableValuesError,
|
|
27
27
|
prepareItem,
|
|
28
28
|
publishItem
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-SAKL7SZH.js";
|
|
30
30
|
import {
|
|
31
31
|
DEFAULT_REGISTRY_URL
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-S5GOFDX5.js";
|
|
33
33
|
import {
|
|
34
34
|
trackRegistryItemAdded
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-F6WHVEUS.js";
|
|
36
36
|
import {
|
|
37
37
|
defineCommand
|
|
38
38
|
} from "./chunk-DL4OD7IA.js";
|
|
@@ -41,7 +41,7 @@ import {
|
|
|
41
41
|
} from "./chunk-2GICKZ3I.js";
|
|
42
42
|
import {
|
|
43
43
|
ITEM_TYPE_DIRS
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-MXVH6UW6.js";
|
|
45
45
|
import {
|
|
46
46
|
isProjectRootMissing,
|
|
47
47
|
realpath
|
|
@@ -153,15 +153,50 @@ function buildSnippet(item, relativeTarget, values = null, compositionId) {
|
|
|
153
153
|
}
|
|
154
154
|
return "";
|
|
155
155
|
}
|
|
156
|
-
function
|
|
156
|
+
function installJson(results, errors) {
|
|
157
157
|
return {
|
|
158
158
|
ok: errors.length === 0,
|
|
159
|
-
tag,
|
|
160
159
|
installed: results.map((r) => r.name),
|
|
161
160
|
warnings: results.flatMap((r) => r.warnings.map((w) => `${r.name}: ${w}`)),
|
|
162
161
|
errors
|
|
163
162
|
};
|
|
164
163
|
}
|
|
164
|
+
function tagAddJson(tag, results, errors = []) {
|
|
165
|
+
return { ...installJson(results, errors), tag };
|
|
166
|
+
}
|
|
167
|
+
function severalAddJson(results, errors = []) {
|
|
168
|
+
return installJson(results, errors);
|
|
169
|
+
}
|
|
170
|
+
async function installOne(name, context) {
|
|
171
|
+
try {
|
|
172
|
+
const result = await runAdd({
|
|
173
|
+
name,
|
|
174
|
+
projectDir: context.projectDir,
|
|
175
|
+
skipClipboard: true,
|
|
176
|
+
force: context.force,
|
|
177
|
+
vars: context.vars
|
|
178
|
+
});
|
|
179
|
+
if (!context.json) {
|
|
180
|
+
for (const warning of result.warnings) console.log(` ${c.warn("Warning:")} ${warning}`);
|
|
181
|
+
console.log(` ${c.success("\u2713")} ${result.name}`);
|
|
182
|
+
}
|
|
183
|
+
return { result };
|
|
184
|
+
} catch (err) {
|
|
185
|
+
const reason = err instanceof Error ? err.message : String(err);
|
|
186
|
+
if (!context.json) console.log(` ${c.error("\u2717")} ${name} (skipped: ${reason})`);
|
|
187
|
+
return { name, error: reason };
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
async function installEach(names, context) {
|
|
191
|
+
const results = [];
|
|
192
|
+
const errors = [];
|
|
193
|
+
for (const name of names) {
|
|
194
|
+
const outcome = await installOne(name, context);
|
|
195
|
+
if ("result" in outcome) results.push(outcome.result);
|
|
196
|
+
else errors.push(outcome);
|
|
197
|
+
}
|
|
198
|
+
return { results, errors };
|
|
199
|
+
}
|
|
165
200
|
function parseVariableValues(raw) {
|
|
166
201
|
if (raw === void 0) return null;
|
|
167
202
|
let parsed;
|
|
@@ -335,7 +370,7 @@ var add_default = defineCommand({
|
|
|
335
370
|
args: {
|
|
336
371
|
name: {
|
|
337
372
|
type: "positional",
|
|
338
|
-
description: "Registry item name or tag. Single items install directly (e.g. shader-wipe). If the name matches a tag instead, all blocks with that tag are installed (e.g. html-in-canvas, captions).",
|
|
373
|
+
description: "Registry item name or tag. Single items install directly (e.g. shader-wipe). If the name matches a tag instead, all blocks with that tag are installed (e.g. html-in-canvas, captions). Give several names to install each of them in one call.",
|
|
339
374
|
required: true
|
|
340
375
|
},
|
|
341
376
|
dir: {
|
|
@@ -375,6 +410,28 @@ var add_default = defineCommand({
|
|
|
375
410
|
const json = args.json === true;
|
|
376
411
|
const skipClipboard = args.clipboard === false;
|
|
377
412
|
const hasConfigBefore = existsSync(projectConfigPath(projectDir));
|
|
413
|
+
const names = Array.isArray(args._) && args._.length > 1 ? args._.map(String) : [args.name];
|
|
414
|
+
if (names.length > 1) {
|
|
415
|
+
if (!json) {
|
|
416
|
+
console.log("");
|
|
417
|
+
console.log(`${c.accent("\u25C6")} Installing ${c.accent(String(names.length))} items`);
|
|
418
|
+
}
|
|
419
|
+
const { results, errors } = await installEach(names, {
|
|
420
|
+
projectDir,
|
|
421
|
+
force: args.force,
|
|
422
|
+
vars: args.vars,
|
|
423
|
+
json
|
|
424
|
+
});
|
|
425
|
+
if (json) {
|
|
426
|
+
console.log(JSON.stringify(severalAddJson(results, errors)));
|
|
427
|
+
} else {
|
|
428
|
+
console.log("");
|
|
429
|
+
const summary = `Installed ${results.length}/${names.length} items`;
|
|
430
|
+
console.log(`${errors.length > 0 ? c.error("\u2717") : c.success("\u2713")} ${summary}`);
|
|
431
|
+
}
|
|
432
|
+
if (errors.length > 0) failCommand();
|
|
433
|
+
return;
|
|
434
|
+
}
|
|
378
435
|
try {
|
|
379
436
|
const result = await runAdd({
|
|
380
437
|
name: args.name,
|
|
@@ -441,28 +498,10 @@ var add_default = defineCommand({
|
|
|
441
498
|
`${c.accent("\u25C6")} Installing ${c.accent(String(items.length))} blocks tagged ${c.accent(args.name)}`
|
|
442
499
|
);
|
|
443
500
|
}
|
|
444
|
-
const results =
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
const result = await runAdd({
|
|
449
|
-
name: item.name,
|
|
450
|
-
projectDir,
|
|
451
|
-
skipClipboard: true,
|
|
452
|
-
force: args.force,
|
|
453
|
-
vars: args.vars
|
|
454
|
-
});
|
|
455
|
-
results.push(result);
|
|
456
|
-
for (const warning of result.warnings) {
|
|
457
|
-
if (!json) console.log(` ${c.warn("Warning:")} ${warning}`);
|
|
458
|
-
}
|
|
459
|
-
if (!json) console.log(` ${c.success("\u2713")} ${result.name}`);
|
|
460
|
-
} catch (err) {
|
|
461
|
-
const reason = err instanceof Error ? err.message : String(err);
|
|
462
|
-
errors.push({ name: item.name, error: reason });
|
|
463
|
-
if (!json) console.log(` ${c.error("\u2717")} ${item.name} (skipped: ${reason})`);
|
|
464
|
-
}
|
|
465
|
-
}
|
|
501
|
+
const { results, errors } = await installEach(
|
|
502
|
+
items.map((item) => item.name),
|
|
503
|
+
{ projectDir, force: args.force, vars: args.vars, json }
|
|
504
|
+
);
|
|
466
505
|
if (json) {
|
|
467
506
|
console.log(JSON.stringify(tagAddJson(args.name, results, errors)));
|
|
468
507
|
} else {
|
|
@@ -482,6 +521,7 @@ export {
|
|
|
482
521
|
compositionRootId,
|
|
483
522
|
buildSnippet,
|
|
484
523
|
tagAddJson,
|
|
524
|
+
severalAddJson,
|
|
485
525
|
parseVariableValues,
|
|
486
526
|
AddError,
|
|
487
527
|
describeInstallFailure,
|
|
@@ -59,7 +59,7 @@ import {
|
|
|
59
59
|
warnUnknownEnumValues,
|
|
60
60
|
wrapInlineScriptWithErrorBoundary,
|
|
61
61
|
wrapScopedCompositionScript
|
|
62
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-Q3PPGPEA.js";
|
|
63
63
|
import {
|
|
64
64
|
cssVariableName
|
|
65
65
|
} from "./chunk-VC76R6W2.js";
|
|
@@ -70,7 +70,7 @@ import {
|
|
|
70
70
|
import {
|
|
71
71
|
collectExternalStyles,
|
|
72
72
|
lintHyperframeHtml
|
|
73
|
-
} from "./chunk-
|
|
73
|
+
} from "./chunk-LYZB5CJN.js";
|
|
74
74
|
import {
|
|
75
75
|
CSS_URL_RE,
|
|
76
76
|
checkSubCompositionUsability,
|
|
@@ -6,8 +6,8 @@ var __filename = __hf_fileURLToPath(import.meta.url);
|
|
|
6
6
|
var __dirname = __hf_dirname(__filename);
|
|
7
7
|
|
|
8
8
|
// src/version.ts
|
|
9
|
-
var VERSION = true ? "0.8.
|
|
10
|
-
var PRODUCER_VERSION = true ? "0.8.
|
|
9
|
+
var VERSION = true ? "0.8.221" : "0.0.0-dev";
|
|
10
|
+
var PRODUCER_VERSION = true ? "0.8.221" : "0.0.0-dev";
|
|
11
11
|
|
|
12
12
|
export {
|
|
13
13
|
VERSION,
|
|
@@ -7,7 +7,7 @@ var __dirname = __hf_dirname(__filename);
|
|
|
7
7
|
import {
|
|
8
8
|
resolveConfig,
|
|
9
9
|
usesSoftwareWebGpu
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-M2F6VGCP.js";
|
|
11
11
|
|
|
12
12
|
// src/browser/gpuPolicy.ts
|
|
13
13
|
function resolveLocalBrowserGpuMode(browserGpuArg, envMode = process.env.PRODUCER_BROWSER_GPU_MODE) {
|
|
@@ -17,7 +17,7 @@ function resolveLocalBrowserGpuMode(browserGpuArg, envMode = process.env.PRODUCE
|
|
|
17
17
|
return "auto";
|
|
18
18
|
}
|
|
19
19
|
async function resolveCaptureBrowserGpuMode(requestedMode, chromePath, probeLifecycle) {
|
|
20
|
-
const { resolveBrowserGpuMode } = await import("./src-
|
|
20
|
+
const { resolveBrowserGpuMode } = await import("./src-ROWFWCEN.js");
|
|
21
21
|
return resolveBrowserGpuMode(requestedMode, { chromePath, probeLifecycle });
|
|
22
22
|
}
|
|
23
23
|
function resolveLocalWebGpu(browserGpuMode, requiresWebGpu) {
|
|
@@ -13,10 +13,10 @@ import {
|
|
|
13
13
|
} from "./chunk-XQ26I3PL.js";
|
|
14
14
|
import {
|
|
15
15
|
createProjectConfig
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-YKMFCE5B.js";
|
|
17
17
|
import {
|
|
18
18
|
isHyperframesProject
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-MXVH6UW6.js";
|
|
20
20
|
|
|
21
21
|
// src/utils/desktopApp.ts
|
|
22
22
|
import { spawn, spawnSync } from "child_process";
|
|
@@ -12,15 +12,15 @@ import {
|
|
|
12
12
|
ensureHfIds,
|
|
13
13
|
mintHfId,
|
|
14
14
|
walkCompositionDescendants
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-4ZM727AO.js";
|
|
16
16
|
import {
|
|
17
17
|
isAllowedHtmlAttribute,
|
|
18
18
|
isSafeAttributeValue,
|
|
19
19
|
sanitizeRichTextChildren
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-MXVH6UW6.js";
|
|
21
21
|
import {
|
|
22
22
|
require_dist
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-LYZB5CJN.js";
|
|
24
24
|
import {
|
|
25
25
|
readClipTiming,
|
|
26
26
|
readMediaOffsetSeconds,
|
|
@@ -6,7 +6,7 @@ var __filename = __hf_fileURLToPath(import.meta.url);
|
|
|
6
6
|
var __dirname = __hf_dirname(__filename);
|
|
7
7
|
import {
|
|
8
8
|
shouldTrack
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-ZBLSSWSE.js";
|
|
10
10
|
|
|
11
11
|
// src/telemetry/renderObservability.ts
|
|
12
12
|
function renderObservabilityTelemetryPayload(observability) {
|
|
@@ -7,7 +7,7 @@ var __dirname = __hf_dirname(__filename);
|
|
|
7
7
|
import {
|
|
8
8
|
getMimeType,
|
|
9
9
|
injectMediaCodecMapIntoHtml
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-ZKPRJPWN.js";
|
|
11
11
|
import {
|
|
12
12
|
PROXY_VARIANT_CONFIG,
|
|
13
13
|
ProxyCapacityError,
|
|
@@ -18,23 +18,23 @@ import {
|
|
|
18
18
|
recordProxyRequest,
|
|
19
19
|
resolveProxy,
|
|
20
20
|
resolveProxyVariantRequest
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-P6FGS4U6.js";
|
|
22
22
|
import {
|
|
23
23
|
findStageProxyBox
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-NYOQP6DO.js";
|
|
25
25
|
import {
|
|
26
26
|
resolveAutoProxy
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-YKMFCE5B.js";
|
|
28
28
|
import {
|
|
29
29
|
listenOnBrowserSafePort
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-M2F6VGCP.js";
|
|
31
31
|
import {
|
|
32
32
|
stripSdrPngColourTags
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-4ZM727AO.js";
|
|
34
34
|
import {
|
|
35
35
|
PREVIEW_PROXY_BOX_PARAM,
|
|
36
36
|
parsePreviewProxyBox
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-MXVH6UW6.js";
|
|
38
38
|
import {
|
|
39
39
|
decodeWellFormedEscapes
|
|
40
40
|
} from "./chunk-KSC4O2RY.js";
|
|
@@ -6,7 +6,7 @@ var __filename = __hf_fileURLToPath(import.meta.url);
|
|
|
6
6
|
var __dirname = __hf_dirname(__filename);
|
|
7
7
|
import {
|
|
8
8
|
VERSION
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-5YT2KHPO.js";
|
|
10
10
|
|
|
11
11
|
// src/registry/compatibility.ts
|
|
12
12
|
import { compareVersions } from "compare-versions";
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
} from "./chunk-TSYRN646.js";
|
|
12
12
|
import {
|
|
13
13
|
fetchLocalPageUrl
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-MYXFBIJO.js";
|
|
15
15
|
import {
|
|
16
16
|
ensureCaptureDirSync,
|
|
17
17
|
writeCaptureFileSync
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
} from "./chunk-AWDFDFI3.js";
|
|
26
26
|
import {
|
|
27
27
|
isBlockedNetworkHost
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-M2F6VGCP.js";
|
|
29
29
|
import {
|
|
30
30
|
DOMParser,
|
|
31
31
|
parseHTML
|
|
@@ -21,13 +21,13 @@ import {
|
|
|
21
21
|
emitWords,
|
|
22
22
|
getPreparedWavDurationSeconds,
|
|
23
23
|
prepareWav
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-HSHKLYDI.js";
|
|
25
25
|
import {
|
|
26
26
|
stoppedByCancelSignal
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-3PJ3HVLG.js";
|
|
28
28
|
import {
|
|
29
29
|
verifies
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-M2BCU4Y5.js";
|
|
31
31
|
import {
|
|
32
32
|
PARAKEET_MODEL_LABEL,
|
|
33
33
|
SHERPA_ERROR_PREFIX,
|
|
@@ -16,6 +16,7 @@ import {
|
|
|
16
16
|
|
|
17
17
|
// src/utils/reject-extra-positionals.ts
|
|
18
18
|
var ACCEPTS_EXTRA_POSITIONALS = /* @__PURE__ */ new Set([
|
|
19
|
+
"add",
|
|
19
20
|
"audio",
|
|
20
21
|
"compare",
|
|
21
22
|
"figma asset",
|
|
@@ -23,9 +24,6 @@ var ACCEPTS_EXTRA_POSITIONALS = /* @__PURE__ */ new Set([
|
|
|
23
24
|
"timeline set"
|
|
24
25
|
]);
|
|
25
26
|
var JOINS_EXTRA_POSITIONALS = /* @__PURE__ */ new Set(["catalog", "tts"]);
|
|
26
|
-
var EXTRA_POSITIONAL_HINTS = {
|
|
27
|
-
add: "Run add once per item, or pass a single tag to install every item tagged with it."
|
|
28
|
-
};
|
|
29
27
|
function wantsJson(value) {
|
|
30
28
|
return value === true || typeof value === "string" && value !== "false" && value !== "0";
|
|
31
29
|
}
|
|
@@ -63,8 +61,7 @@ function resolveExtraPositionals(cmd, path, parsed) {
|
|
|
63
61
|
}
|
|
64
62
|
const plural = extra.length === 1 ? "" : "s";
|
|
65
63
|
const message = `Unexpected extra argument${plural} for hyperframes ${path}: ${extra.join(", ")}
|
|
66
|
-
Usage: ${usageLine(path, args)}
|
|
67
|
-
${EXTRA_POSITIONAL_HINTS[path]}` : "");
|
|
64
|
+
Usage: ${usageLine(path, args)}`;
|
|
68
65
|
if (wantsJson(parsed?.json)) console.log(JSON.stringify(jsonFailure("usage_error", message)));
|
|
69
66
|
else console.error(message);
|
|
70
67
|
throw new CliUsageError(
|
|
@@ -723,7 +723,7 @@ function moveStagedInstallIntoCache(stagingDir, staged) {
|
|
|
723
723
|
var STAGING_PREFIX = ".chrome-staging-";
|
|
724
724
|
var REPLACED_PREFIX = ".chrome-replaced-";
|
|
725
725
|
var isInstallLeftover = (name) => name.startsWith(STAGING_PREFIX) || name.startsWith(REPLACED_PREFIX);
|
|
726
|
-
function removeInstallLeftovers() {
|
|
726
|
+
function removeInstallLeftovers(tolerateLocked = true) {
|
|
727
727
|
let names;
|
|
728
728
|
try {
|
|
729
729
|
names = readdirSync(CACHE_ROOT_DIR);
|
|
@@ -732,14 +732,14 @@ function removeInstallLeftovers() {
|
|
|
732
732
|
throw err;
|
|
733
733
|
}
|
|
734
734
|
const leftovers = names.filter(isInstallLeftover);
|
|
735
|
-
for (const name of leftovers) removeLeftover(join(CACHE_ROOT_DIR, name));
|
|
735
|
+
for (const name of leftovers) removeLeftover(join(CACHE_ROOT_DIR, name), tolerateLocked);
|
|
736
736
|
return leftovers.length > 0;
|
|
737
737
|
}
|
|
738
|
-
function removeLeftover(path) {
|
|
738
|
+
function removeLeftover(path, tolerateLocked = true) {
|
|
739
739
|
try {
|
|
740
740
|
rmSync(path, { recursive: true, force: true, maxRetries: 3, retryDelay: 100 });
|
|
741
741
|
} catch (err) {
|
|
742
|
-
if (!isErrno(err, "EBUSY") && !isErrno(err, "EPERM")) throw err;
|
|
742
|
+
if (!tolerateLocked || !isErrno(err, "EBUSY") && !isErrno(err, "EPERM")) throw err;
|
|
743
743
|
}
|
|
744
744
|
}
|
|
745
745
|
async function sweepKilledInstalls() {
|
|
@@ -748,7 +748,7 @@ async function sweepKilledInstalls() {
|
|
|
748
748
|
await withInstallLock(async () => removeInstallLeftovers());
|
|
749
749
|
}
|
|
750
750
|
function clearBrowser() {
|
|
751
|
-
const removedLeftovers = removeInstallLeftovers();
|
|
751
|
+
const removedLeftovers = removeInstallLeftovers(false);
|
|
752
752
|
if (!existsSync(CACHE_DIR)) return removedLeftovers;
|
|
753
753
|
rmSync(CACHE_DIR, { recursive: true, force: true });
|
|
754
754
|
return true;
|
|
@@ -6,14 +6,14 @@ var __filename = __hf_fileURLToPath(import.meta.url);
|
|
|
6
6
|
var __dirname = __hf_dirname(__filename);
|
|
7
7
|
import {
|
|
8
8
|
loadProducer
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-Y4GLFHO5.js";
|
|
10
10
|
import {
|
|
11
11
|
resolveProjectRelativeSrc
|
|
12
12
|
} from "./chunk-PBNWRWKA.js";
|
|
13
13
|
|
|
14
14
|
// src/utils/projectMedia.ts
|
|
15
15
|
async function collectProjectMedia(projectDir) {
|
|
16
|
-
const { bundleToSingleHtml } = await import("./compiler-
|
|
16
|
+
const { bundleToSingleHtml } = await import("./compiler-SEQRWEEN.js");
|
|
17
17
|
const html = await bundleToSingleHtml(projectDir);
|
|
18
18
|
const producer = await loadProducer();
|
|
19
19
|
if (!producer.collectRenderMedia) throw new Error("Render media collector unavailable");
|
|
@@ -9,27 +9,27 @@ import {
|
|
|
9
9
|
} from "./chunk-TQBQYO4L.js";
|
|
10
10
|
import {
|
|
11
11
|
resolveProject
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-BQNTY7J5.js";
|
|
13
13
|
import {
|
|
14
14
|
serveStaticProjectHtml
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-7DVR3DL3.js";
|
|
16
16
|
import {
|
|
17
17
|
AUDIT_SEEK_OPTIONS,
|
|
18
18
|
installPageFunctionGuard,
|
|
19
19
|
seekCompositionTimeline,
|
|
20
20
|
waitForCompositionFonts,
|
|
21
21
|
waitForRuntimeReady
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-TMK3MW7B.js";
|
|
23
23
|
import {
|
|
24
24
|
gotoWhenSent
|
|
25
25
|
} from "./chunk-SGTEKMJW.js";
|
|
26
26
|
import {
|
|
27
27
|
pageNavigationTimeoutMs
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-322M35EB.js";
|
|
29
29
|
import {
|
|
30
30
|
launchManagedBrowser,
|
|
31
31
|
resolveManagedGpuMode
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-JGZUG5V4.js";
|
|
33
33
|
import {
|
|
34
34
|
defineCommand
|
|
35
35
|
} from "./chunk-DL4OD7IA.js";
|
|
@@ -39,7 +39,7 @@ import {
|
|
|
39
39
|
import {
|
|
40
40
|
printDeprecationNotice,
|
|
41
41
|
withMeta
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-YSZ4VMXI.js";
|
|
43
43
|
import {
|
|
44
44
|
failureMessage,
|
|
45
45
|
jsonFailure
|
|
@@ -706,7 +706,7 @@ async function collectTweenBoundaries(page) {
|
|
|
706
706
|
});
|
|
707
707
|
}
|
|
708
708
|
async function bundleProjectHtml(projectDir) {
|
|
709
|
-
const { bundleToSingleHtml } = await import("./compiler-
|
|
709
|
+
const { bundleToSingleHtml } = await import("./compiler-SEQRWEEN.js");
|
|
710
710
|
return bundleToSingleHtml(projectDir);
|
|
711
711
|
}
|
|
712
712
|
async function alignViewportToComposition(page, url) {
|
|
@@ -723,15 +723,15 @@ async function alignViewportToComposition(page, url) {
|
|
|
723
723
|
await gotoWhenSent(page, url, pageNavigationTimeoutMs());
|
|
724
724
|
}
|
|
725
725
|
async function runLayoutAudit(projectDir, opts) {
|
|
726
|
-
const { ensureBrowser } = await import("./manager-
|
|
726
|
+
const { ensureBrowser } = await import("./manager-ENFYM32B.js");
|
|
727
727
|
const puppeteer = await import("puppeteer-core");
|
|
728
|
-
const { buildChromeArgs } = await import("./src-
|
|
728
|
+
const { buildChromeArgs } = await import("./src-ROWFWCEN.js");
|
|
729
729
|
const {
|
|
730
730
|
assertWebGpuAdapterAvailable,
|
|
731
731
|
compositionRequiresWebGpu,
|
|
732
732
|
resolveLocalBrowserGpuMode,
|
|
733
733
|
resolveLocalWebGpu
|
|
734
|
-
} = await import("./gpuPolicy-
|
|
734
|
+
} = await import("./gpuPolicy-6QIFFWAI.js");
|
|
735
735
|
const html = await bundleProjectHtml(projectDir);
|
|
736
736
|
const server = await serveStaticProjectHtml(
|
|
737
737
|
projectDir,
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
} from "./chunk-J74ZUXVU.js";
|
|
10
10
|
import {
|
|
11
11
|
stoppedByCancelSignal
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-3PJ3HVLG.js";
|
|
13
13
|
import {
|
|
14
14
|
DEFAULT_MODEL,
|
|
15
15
|
ensureModel,
|
|
@@ -17,12 +17,12 @@ import {
|
|
|
17
17
|
hasFFmpeg,
|
|
18
18
|
pinnedWhisperModel,
|
|
19
19
|
sha256File
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-M2BCU4Y5.js";
|
|
21
21
|
import {
|
|
22
22
|
findFFmpeg,
|
|
23
23
|
findFFprobe,
|
|
24
24
|
getFFmpegInstallHint
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-QYUXDFJY.js";
|
|
26
26
|
import {
|
|
27
27
|
findWavChunk
|
|
28
28
|
} from "./chunk-UOFAE5RF.js";
|
|
@@ -54,36 +54,40 @@ function describeRejectedPythonOverride() {
|
|
|
54
54
|
if (validation.ok) return null;
|
|
55
55
|
return `HYPERFRAMES_PYTHON="${override}" was rejected: ${validation.reason}`;
|
|
56
56
|
}
|
|
57
|
-
function
|
|
57
|
+
function withoutPythonPath() {
|
|
58
|
+
const { PYTHONPATH: _foreign, ...env } = process.env;
|
|
59
|
+
return env;
|
|
60
|
+
}
|
|
61
|
+
function runs(python, code, env) {
|
|
58
62
|
try {
|
|
59
|
-
execFileSync(python, ["-c",
|
|
60
|
-
stdio: ["pipe", "pipe", "pipe"],
|
|
61
|
-
timeout: 1e4
|
|
62
|
-
});
|
|
63
|
+
execFileSync(python, ["-c", code], { stdio: ["pipe", "pipe", "pipe"], timeout: 1e4, env });
|
|
63
64
|
return true;
|
|
64
65
|
} catch {
|
|
65
66
|
return false;
|
|
66
67
|
}
|
|
67
68
|
}
|
|
69
|
+
function environmentThatRuns(python, code) {
|
|
70
|
+
return [process.env, withoutPythonPath()].find((env) => runs(python, code, env)) ?? null;
|
|
71
|
+
}
|
|
72
|
+
function workingPythonEnv(python, modules, extra = {}) {
|
|
73
|
+
const env = environmentThatRuns(python, `import ${modules.join(", ")}`);
|
|
74
|
+
return env && { ...env, ...extra };
|
|
75
|
+
}
|
|
76
|
+
function hasPythonPackage(python, pkg) {
|
|
77
|
+
return environmentThatRuns(python, `import ${pkg}`) !== null;
|
|
78
|
+
}
|
|
68
79
|
function hasPythonModules(modules) {
|
|
69
80
|
const python = findPython();
|
|
70
81
|
if (!python) return false;
|
|
71
82
|
const list = JSON.stringify(modules);
|
|
72
83
|
const probe = `import importlib.util,sys; sys.exit(0 if all(importlib.util.find_spec(m) for m in ${list}) else 1)`;
|
|
73
|
-
|
|
74
|
-
execFileSync(python, ["-c", probe], {
|
|
75
|
-
stdio: ["pipe", "pipe", "pipe"],
|
|
76
|
-
timeout: 1e4
|
|
77
|
-
});
|
|
78
|
-
return true;
|
|
79
|
-
} catch {
|
|
80
|
-
return false;
|
|
81
|
-
}
|
|
84
|
+
return environmentThatRuns(python, probe) !== null;
|
|
82
85
|
}
|
|
83
86
|
|
|
84
87
|
export {
|
|
85
88
|
findPython,
|
|
86
89
|
describeRejectedPythonOverride,
|
|
90
|
+
workingPythonEnv,
|
|
87
91
|
hasPythonPackage,
|
|
88
92
|
hasPythonModules
|
|
89
93
|
};
|