hyperframes 0.8.111 → 0.8.113
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-M5WN2AM2.js → add-ILIGSLV4.js} +15 -15
- package/dist/{agentPromptGenerator-QL2KAWEP.js → agentPromptGenerator-VIIPZCJ3.js} +1 -1
- package/dist/{animatedGifPrep-NMGFOSIL.js → animatedGifPrep-U7FMC7DB.js} +6 -6
- package/dist/{asset-GUASPIKN.js → asset-OFDEIAGM.js} +2 -2
- package/dist/{assetCataloger-FXEHOUA3.js → assetCataloger-5LCGR5XU.js} +2 -2
- package/dist/{auth-3YMEVUKJ.js → auth-5JDDEX2M.js} +2 -2
- package/dist/{autoUpdate-FYCGHBPC.js → autoUpdate-JXVZVJCV.js} +2 -2
- package/dist/{backgroundChecks-ZLYIRMTS.js → backgroundChecks-BBWGY3V6.js} +3 -3
- package/dist/backgroundChecksWorker.js +3 -3
- package/dist/{batchRender-ZTHFMHZY.js → batchRender-QVJ7NEUH.js} +3 -3
- package/dist/{beats-GXY5ZBPB.js → beats-YEYVQMX6.js} +11 -11
- package/dist/{benchmark-MJFVBVNW.js → benchmark-J2V46VWI.js} +12 -12
- package/dist/{browser-ZDI7IX6H.js → browser-XBWASLD2.js} +11 -11
- package/dist/{bundleWithLocalizedFonts-4Q3ETTHW.js → bundleWithLocalizedFonts-4CVITCYK.js} +2 -2
- package/dist/{capture-4OPH4PMK.js → capture-F2Y7TIHU.js} +41 -43
- package/dist/{capture-OG6532RA.js → capture-GLHK4ST7.js} +3 -3
- package/dist/{captureFile-JOPOCRU7.js → captureFile-LYOJOUIE.js} +3 -1
- package/dist/{catalog-23DP7KCW.js → catalog-3QDMTDK2.js} +15 -15
- package/dist/{check-5X6BJA2P.js → check-O3RR4NWI.js} +52 -40
- package/dist/{checkBrowser-3QHBTMYM.js → checkBrowser-K36DAG4S.js} +32 -31
- package/dist/{chunk-NIGUNLOO.js → chunk-2DBYGR4N.js} +10 -9
- package/dist/{chunk-TIZQC44K.js → chunk-3IUSKIZW.js} +1 -1
- package/dist/{chunk-YLOSZHA2.js → chunk-3XPZJUKM.js} +2 -2
- package/dist/{chunk-32P7FTFC.js → chunk-4KGMIOMY.js} +9 -8
- package/dist/{chunk-N34BYX3E.js → chunk-4PFZPP2N.js} +54 -30
- package/dist/{chunk-JTTAS7N6.js → chunk-7543YIMQ.js} +1 -1
- package/dist/{chunk-AMSBTN6L.js → chunk-7CGIICLA.js} +3 -3
- package/dist/{chunk-LAQEZHOH.js → chunk-BOUDTDBQ.js} +1 -1
- package/dist/chunk-C6AIZOQN.js +3541 -0
- package/dist/{chunk-EE6SV6KW.js → chunk-DDK22K3I.js} +3 -3
- package/dist/{chunk-QXERSWXX.js → chunk-DQBY7FRR.js} +123 -3
- package/dist/{chunk-HQGJLZB6.js → chunk-DR7QW6C5.js} +2 -2
- package/dist/{chunk-E4AYSXMS.js → chunk-E52XEEAA.js} +3 -3
- package/dist/{chunk-J4RPT4QW.js → chunk-E6RPWJVC.js} +1 -1
- package/dist/{chunk-QMAXDSCH.js → chunk-EMZF2TPA.js} +2 -2
- package/dist/{chunk-XYVFPDNU.js → chunk-ENHAGQEP.js} +1 -1
- package/dist/{chunk-B25H4M4V.js → chunk-FCEFKWPM.js} +1 -1
- package/dist/{chunk-BQYGGX3B.js → chunk-FW7K32YT.js} +1 -1
- package/dist/{chunk-6CI65KCP.js → chunk-FXHVADV6.js} +1 -1
- package/dist/{chunk-OF3RKOPU.js → chunk-G2T2X6FZ.js} +189 -111
- package/dist/{chunk-5ON5GH3X.js → chunk-GDJ74GHW.js} +4 -3
- package/dist/{chunk-I5WWEBDG.js → chunk-HTQR7SUZ.js} +1 -1
- package/dist/{chunk-TQKKC4MB.js → chunk-HYXL3VJA.js} +5 -5
- package/dist/{chunk-AWUZ3AUD.js → chunk-IP3XINRB.js} +1 -1
- package/dist/{chunk-HPEHQUJX.js → chunk-IRJBTYJF.js} +1 -1
- package/dist/chunk-K4WKGXRC.js +18 -0
- package/dist/{chunk-CQRF7VU3.js → chunk-L5QASNBN.js} +1 -1
- package/dist/{chunk-ITBEN3QD.js → chunk-L5SYYW2P.js} +2 -2
- package/dist/{chunk-MGFVNTIB.js → chunk-LMC46FK5.js} +2 -2
- package/dist/chunk-MRF4AMKD.js +104 -0
- package/dist/{chunk-U4TDAJZE.js → chunk-OCNCK5FQ.js} +2 -2
- package/dist/{chunk-JWPSBANO.js → chunk-OEA2J2TF.js} +3 -3
- package/dist/{chunk-N32ITJ7L.js → chunk-P3FGUSFK.js} +15 -12
- package/dist/{chunk-2JXJ5SGK.js → chunk-QPR4N2D4.js} +6 -6
- package/dist/{chunk-LFUXJBYA.js → chunk-R4NWAW35.js} +7 -7
- package/dist/{chunk-C4TZBEHY.js → chunk-SIN32SJB.js} +2 -2
- package/dist/{chunk-M224DAMG.js → chunk-T3NMEYGM.js} +1 -1
- package/dist/{chunk-Q2QNAFQV.js → chunk-U4VSY56O.js} +1 -1
- package/dist/{chunk-NH75EKOP.js → chunk-VFCKXTBB.js} +6 -3
- package/dist/{chunk-V4HKT2LV.js → chunk-VIJ35BJ6.js} +10 -10
- package/dist/{chunk-5ER3PYYP.js → chunk-VLC7JS4K.js} +1 -1
- package/dist/{chunk-MR2LOG32.js → chunk-VTP4VSRP.js} +8 -8
- package/dist/{chunk-ZU54D6MI.js → chunk-XFJXFNJF.js} +3 -3
- package/dist/{chunk-YIXEH4TF.js → chunk-XXKBPGPJ.js} +2 -2
- package/dist/{chunk-JUP65S7D.js → chunk-XZM2I47O.js} +3 -3
- package/dist/{chunk-BAVM2XBR.js → chunk-YJEGT5L6.js} +209 -33
- package/dist/{chunk-CFC3EEDQ.js → chunk-ZMMSMDCA.js} +1 -1
- package/dist/{chunk-PFEKMIN5.js → chunk-ZYSS3JED.js} +1 -1
- package/dist/{chunk-ZXSNGIYS.js → chunk-ZZIXIOK2.js} +4 -4
- package/dist/{clean-ATMEGSGP.js → clean-RPB34TT6.js} +16 -16
- package/dist/cli.js +122 -54
- package/dist/{cloud-ZFGUHACY.js → cloud-QECFFPKC.js} +4 -4
- package/dist/{cloudrun-LVZ4OPPC.js → cloudrun-BML6ZG7K.js} +3 -3
- package/dist/commands/layout-audit.browser.js +178 -202
- package/dist/commands/motion-sample.browser.js +24 -71
- package/dist/commands/motion-signature.browser.js +374 -0
- package/dist/{compare-55LEUY7M.js → compare-PF6WHQ4T.js} +26 -26
- package/dist/{compiler-C32VXLE2.js → compiler-ZHVIEP26.js} +3 -3
- package/dist/{component-3EDFANIC.js → component-4ENCNLED.js} +3 -3
- package/dist/{compositions-OPU6U6GM.js → compositions-5UA33RSG.js} +11 -11
- package/dist/{contactSheet-54AJDSR5.js → contactSheet-27SRU7A4.js} +2 -2
- package/dist/{delete-PJE4P3HH.js → delete-SARS5LIK.js} +2 -2
- package/dist/{deploy-4T3RMA5G.js → deploy-MX76RZ36.js} +1 -1
- package/dist/{destroy-EYDBVHGF.js → destroy-H2TZBYHH.js} +1 -1
- package/dist/{dist-FMHQMEMX.js → dist-HRBNHR4M.js} +1 -1
- package/dist/{dist-YUIPB7OX.js → dist-OKRUIHYU.js} +2 -2
- package/dist/docker/Dockerfile.render +1 -1
- package/dist/{doctor-EIVBJJAF.js → doctor-TSAQGYP4.js} +11 -11
- package/dist/{events-NP666TF4.js → events-3HUO73ZE.js} +9 -9
- package/dist/{events-ISMT4RDW.js → events-SZ5NWYWD.js} +8 -8
- package/dist/{feedback-4OSLMKBW.js → feedback-42OTOFC6.js} +10 -10
- package/dist/{figma-Y7ZHFCOU.js → figma-RYNFCYXB.js} +3 -3
- package/dist/fontLocalizeCli.js +8 -8
- package/dist/{get-E4GBRHQK.js → get-IRHLG5OQ.js} +2 -2
- package/dist/{gpuPolicy-CA6KRFQQ.js → gpuPolicy-LRMOZXFU.js} +6 -6
- package/dist/{grade-compare-B2EHEOLR.js → grade-compare-KGJP5HV7.js} +24 -24
- package/dist/{help-ISGUWGOR.js → help-C5HS56RZ.js} +1 -1
- package/dist/{history-FNRU3TL4.js → history-DFJNDM2T.js} +16 -17
- package/dist/hyperframe-runtime.js +54 -54
- package/dist/hyperframe.manifest.json +1 -1
- package/dist/hyperframe.runtime.iife.js +54 -54
- package/dist/hyperframes-player.global.js +1 -1
- package/dist/{info-FO7VR5NC.js → info-26GTDTKN.js} +11 -11
- package/dist/{init-IGW4DTVC.js → init-RXA6NI73.js} +25 -24
- package/dist/{inspect-D4GUGDW7.js → inspect-2S5GAZYC.js} +25 -25
- package/dist/{installer-NBEN3ZIP.js → installer-DGYYDGWJ.js} +4 -4
- package/dist/{keyframes-CXZLEC3R.js → keyframes-WBMAX7XZ.js} +12 -12
- package/dist/{lambda-BFHJMMCG.js → lambda-OQBFCEFA.js} +6 -6
- package/dist/{layout-XEDEOLAH.js → layout-ZRU7PXBG.js} +25 -25
- package/dist/{lint-LLGMCVZ5.js → lint-ATVNZ6FG.js} +12 -12
- package/dist/{lintProject-X7L7EZWZ.js → lintProject-TOLC6HDS.js} +1 -1
- package/dist/{list-LUCWSLK6.js → list-E2GHYPCQ.js} +2 -2
- package/dist/{login-SMWYXJWJ.js → login-LOC4KA7H.js} +4 -4
- package/dist/{manager-NEVLEZK3.js → manager-CT3D67CG.js} +1 -1
- package/dist/{media-treatment-OYTNU6PX.js → media-treatment-L43MVH2V.js} +15 -14
- package/dist/{models-RILNQV3Z.js → models-JF5OOZ5A.js} +7 -7
- package/dist/{motionShot-5F4DCMWC.js → motionShot-BJ5CLYMN.js} +12 -12
- package/dist/{normalize-audio-4LHYKFON.js → normalize-audio-K33FKGAF.js} +11 -11
- package/dist/{pipeline-5UY45ELH.js → pipeline-IWPF5ZMK.js} +6 -6
- package/dist/{play-D4AHRZQD.js → play-PHHXYCQI.js} +20 -20
- package/dist/{preflight-3V5IHGWQ.js → preflight-2GH2Z4GZ.js} +8 -8
- package/dist/{present-VUH7PLOO.js → present-KBFK2YVB.js} +16 -16
- package/dist/{preview-NCFC65VR.js → preview-T3E5TFDC.js} +159 -87
- package/dist/{producer-7JGAPEAF.js → producer-SL66UNEP.js} +1 -1
- package/dist/{projectConfig-JHEWPAA5.js → projectConfig-7AKXZNNR.js} +6 -6
- package/dist/{publication-7XA2H7UB.js → publication-B2OERUY7.js} +2 -2
- package/dist/{publish-257VZMWI.js → publish-ZGKT7KED.js} +8 -8
- package/dist/{remove-background-EV6XVADN.js → remove-background-4LRTT6YL.js} +7 -7
- package/dist/{render-DHCMWKFV.js → render-H6RSJF2V.js} +12 -12
- package/dist/{render-DKXGFQVW.js → render-OKNPNMFS.js} +23 -23
- package/dist/{render-4C3YKVZI.js → render-TGCDBKMP.js} +3 -3
- package/dist/{render-batch-AFDBPDMM.js → render-batch-WRQFW4UC.js} +3 -3
- package/dist/{renderCancellation-VIZELWDD.js → renderCancellation-BFCQYGVV.js} +6 -6
- package/dist/renderSetupWorker.js +2 -2
- package/dist/{resolver-S72XBTEQ.js → resolver-37UOGAMT.js} +4 -4
- package/dist/{screenshotCapture-FA5HPN7Q.js → screenshotCapture-ECBTLCU6.js} +3 -3
- package/dist/{sherpa-BAADWCHB.js → sherpa-SDVKYXCX.js} +7 -7
- package/dist/skills/hyperframes/references/frame-worker-core.md +2 -2
- package/dist/skills/hyperframes-cli/references/lint-validate-inspect.md +2 -2
- package/dist/skills/media-use/audio/references/bgm.md +1 -1
- package/dist/skills/media-use/audio/references/tts.md +1 -1
- package/dist/skills/media-use/audio/scripts/lib/python.mjs +19 -5
- package/dist/skills/media-use/audio/scripts/lib/python.test.mjs +69 -1
- package/dist/{skills-2BGFBUR6.js → skills-O25ZTFTO.js} +40 -14
- package/dist/{skillsUpdateCheck-5LYFYHUF.js → skillsUpdateCheck-Y2V4OMMT.js} +3 -3
- package/dist/{snapshot-Z37DZL4T.js → snapshot-KGM2HZIC.js} +52 -31
- package/dist/{src-GD7RGV5U.js → src-PJJ6NISA.js} +5 -5
- package/dist/{src-GRC63B6L.js → src-PLWCT745.js} +7 -7
- package/dist/{staticProjectServer-SFINO3DE.js → staticProjectServer-OCE7GU5S.js} +14 -14
- package/dist/{status-LXQL3L3H.js → status-LENRPQS5.js} +6 -6
- package/dist/studio/assets/{hyperframes-player-DvJeHBHi.js → hyperframes-player-DzJbtQVO.js} +1 -1
- package/dist/studio/assets/{index-SFktf7O1.js → index-DRhF3v4Z.js} +194 -194
- package/dist/studio/assets/{index-C7apTvpr.css → index-DbfKVTId.css} +1 -1
- package/dist/studio/assets/{index--G6c4Q_x.js → index-DgwDQK5G.js} +1 -1
- package/dist/studio/assets/{index-Bt4vDkfw.js → index-n5FUn1xv.js} +1 -1
- package/dist/studio/{chunk-PQFEBX32.js → chunk-BIUXP3PG.js} +2 -2
- package/dist/studio/{chunk-6LUNLTHR.js → chunk-K47E2ZJA.js} +13 -8
- package/dist/studio/chunk-K47E2ZJA.js.map +1 -0
- package/dist/studio/{chunk-QUXZVHOJ.js → chunk-VWT7STY3.js} +2 -2
- package/dist/studio/{domEditingLayers-JQPQGGT7.js → domEditingLayers-V67MS4WP.js} +3 -3
- package/dist/studio/index.d.ts +80 -46
- package/dist/studio/index.html +2 -2
- package/dist/studio/index.js +7294 -6844
- package/dist/studio/index.js.map +1 -1
- package/dist/studio/player.js +2 -2
- package/dist/studio/styles.css +1 -1
- package/dist/{studio-api-WRSCXPWS.js → studio-api-IEQ5BIHT.js} +8 -8
- package/dist/{studioSelectionClient-A6JCWRRW.js → studioSelectionClient-IUUPKUHZ.js} +1 -2
- package/dist/{studioServer-HTLRGC5G.js → studioServer-LXJ34MGN.js} +43 -43
- package/dist/{system-EEWYEHYX.js → system-4KRSV2B7.js} +6 -6
- package/dist/{telemetry-NLEEMXO2.js → telemetry-R3BPD6VK.js} +9 -9
- package/dist/{timeline-7C4KM3KD.js → timeline-N5UKVS2S.js} +15 -15
- package/dist/{tokens-QQLJXW4G.js → tokens-774UBF2R.js} +2 -2
- package/dist/{transcribe-GCKJF5A6.js → transcribe-3UXXEDXX.js} +7 -7
- package/dist/{transcribe-TGR5CTA7.js → transcribe-IP74EZLM.js} +12 -12
- package/dist/{tts-DO2W6NLB.js → tts-P3LIPIL5.js} +13 -6
- package/dist/{updateCheck-73JM5QR3.js → updateCheck-EXHNAPKI.js} +2 -2
- package/dist/{upgrade-V6E5P53C.js → upgrade-A4M3O2F2.js} +2 -2
- package/dist/{urlDownloader-NYXPEBUN.js → urlDownloader-4KNER64L.js} +5 -5
- package/dist/{validate-INP7WJAK.js → validate-DV75GM6J.js} +15 -15
- package/dist/{video-KWQ5TSVD.js → video-GINAMW5I.js} +17 -9
- package/package.json +1 -1
- package/dist/chunk-5GQAJ43Q.js +0 -31
- package/dist/chunk-VWA4HODG.js +0 -129
- package/dist/chunk-YLVI7VL5.js +0 -3541
- package/dist/studio/chunk-6LUNLTHR.js.map +0 -1
- /package/dist/studio/{chunk-PQFEBX32.js.map → chunk-BIUXP3PG.js.map} +0 -0
- /package/dist/studio/{chunk-QUXZVHOJ.js.map → chunk-VWT7STY3.js.map} +0 -0
- /package/dist/studio/{domEditingLayers-JQPQGGT7.js.map → domEditingLayers-V67MS4WP.js.map} +0 -0
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
} from "./chunk-ZTZA4UWZ.js";
|
|
13
13
|
import {
|
|
14
14
|
getSystemMeta
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-L5QASNBN.js";
|
|
16
16
|
import {
|
|
17
17
|
getInvocationId
|
|
18
18
|
} from "./chunk-54HJ63Q2.js";
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
evaluateCanary,
|
|
24
24
|
findCanary,
|
|
25
25
|
parseCanaryOverride
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-FCEFKWPM.js";
|
|
27
27
|
import {
|
|
28
28
|
hostAnswers
|
|
29
29
|
} from "./chunk-K4WIOZFP.js";
|
|
@@ -37,7 +37,7 @@ import {
|
|
|
37
37
|
} from "./chunk-XUXGIA7H.js";
|
|
38
38
|
import {
|
|
39
39
|
VERSION
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-3XPZJUKM.js";
|
|
41
41
|
|
|
42
42
|
// src/telemetry/transport.ts
|
|
43
43
|
import { spawn } from "child_process";
|
|
@@ -5,6 +5,10 @@ var require = __hf_createRequire(import.meta.url);
|
|
|
5
5
|
var __filename = __hf_fileURLToPath(import.meta.url);
|
|
6
6
|
var __dirname = __hf_dirname(__filename);
|
|
7
7
|
|
|
8
|
+
// src/utils/studioSelectionClient.ts
|
|
9
|
+
import { existsSync, realpathSync } from "fs";
|
|
10
|
+
import { resolve as resolve2 } from "path";
|
|
11
|
+
|
|
8
12
|
// src/server/portUtils.ts
|
|
9
13
|
import net from "net";
|
|
10
14
|
import http from "http";
|
|
@@ -217,7 +221,7 @@ async function killActiveServers(startPort = 3002) {
|
|
|
217
221
|
}
|
|
218
222
|
return { killed, unverified };
|
|
219
223
|
}
|
|
220
|
-
async function findPortAndServe(
|
|
224
|
+
async function findPortAndServe(fetch2, startPort, projectDir, forceNew, expectedServerBuildSignature = null, bindHost, expectedBrowserGpuMode) {
|
|
221
225
|
const { createAdaptorServer } = await import("@hono/node-server");
|
|
222
226
|
const host = bindHost ?? (process.env.HYPERFRAMES_PREVIEW_HOST?.trim() || "127.0.0.1");
|
|
223
227
|
const normalizedDir = resolve(projectDir).replace(/\\/g, "/").toLowerCase();
|
|
@@ -226,7 +230,7 @@ async function findPortAndServe(fetch, startPort, projectDir, forceNew, expected
|
|
|
226
230
|
for (let port = startPort; port <= endPort; port++) {
|
|
227
231
|
const available = await testPortOnAllHosts(port);
|
|
228
232
|
if (available) {
|
|
229
|
-
if (!server) server = createAdaptorServer({ fetch });
|
|
233
|
+
if (!server) server = createAdaptorServer({ fetch: fetch2 });
|
|
230
234
|
try {
|
|
231
235
|
await new Promise((resolveListener, rejectListener) => {
|
|
232
236
|
const onError = (err) => {
|
|
@@ -269,9 +273,125 @@ async function findPortAndServe(fetch, startPort, projectDir, forceNew, expected
|
|
|
269
273
|
);
|
|
270
274
|
}
|
|
271
275
|
|
|
276
|
+
// src/utils/studioSelectionClient.ts
|
|
277
|
+
var VITE_STUDIO_DISCOVERY_PORTS = [5190];
|
|
278
|
+
var AmbiguousPreviewServerError = class extends Error {
|
|
279
|
+
ports;
|
|
280
|
+
constructor(servers) {
|
|
281
|
+
const ports = servers.map((server) => server.port).sort((a, b) => a - b);
|
|
282
|
+
super(
|
|
283
|
+
`Multiple Studio preview servers match this project (${ports.join(", ")}). Pass --port <port> to choose one.`
|
|
284
|
+
);
|
|
285
|
+
this.name = "AmbiguousPreviewServerError";
|
|
286
|
+
this.ports = ports;
|
|
287
|
+
}
|
|
288
|
+
};
|
|
289
|
+
var PreviewServerPortMismatchError = class extends Error {
|
|
290
|
+
requestedPort;
|
|
291
|
+
ports;
|
|
292
|
+
constructor(requestedPort, servers, hint = "") {
|
|
293
|
+
const ports = servers.map((server) => server.port).sort((a, b) => a - b);
|
|
294
|
+
super(
|
|
295
|
+
`No Studio preview server for this project is running on port ${requestedPort}. Matching server port${ports.length === 1 ? "" : "s"}: ${ports.join(", ")}. Rerun with --port ${ports[0]}${ports.length > 1 ? " or omit --port to see all candidates" : ""}.${hint}`
|
|
296
|
+
);
|
|
297
|
+
this.name = "PreviewServerPortMismatchError";
|
|
298
|
+
this.requestedPort = requestedPort;
|
|
299
|
+
this.ports = ports;
|
|
300
|
+
}
|
|
301
|
+
};
|
|
302
|
+
function normalizePath(path) {
|
|
303
|
+
const resolved = resolve2(path);
|
|
304
|
+
try {
|
|
305
|
+
if (existsSync(resolved)) {
|
|
306
|
+
return realpathSync(resolved).replace(/\\/g, "/").toLowerCase();
|
|
307
|
+
}
|
|
308
|
+
} catch {
|
|
309
|
+
}
|
|
310
|
+
return resolved.replace(/\\/g, "/").toLowerCase();
|
|
311
|
+
}
|
|
312
|
+
async function findPreviewServerForProject(projectDir, startPort = 3002, scan = scanActiveServers, fetchImpl = fetch, options = {}) {
|
|
313
|
+
const normalizedProjectDir = normalizePath(projectDir);
|
|
314
|
+
const servers = await scan(startPort);
|
|
315
|
+
const embeddedServers = servers.filter(
|
|
316
|
+
(server) => normalizePath(server.projectDir) === normalizedProjectDir
|
|
317
|
+
);
|
|
318
|
+
if (options.preferredPort !== void 0) {
|
|
319
|
+
const preferred = embeddedServers.find((server) => server.port === options.preferredPort);
|
|
320
|
+
if (preferred) return preferred;
|
|
321
|
+
const viteServer = await findViteStudioServerForProject(normalizedProjectDir, fetchImpl, [
|
|
322
|
+
options.preferredPort
|
|
323
|
+
]);
|
|
324
|
+
if (viteServer) return viteServer;
|
|
325
|
+
if (embeddedServers.length > 0) {
|
|
326
|
+
throw new PreviewServerPortMismatchError(options.preferredPort, embeddedServers);
|
|
327
|
+
}
|
|
328
|
+
return null;
|
|
329
|
+
}
|
|
330
|
+
if (embeddedServers.length === 1) return embeddedServers[0];
|
|
331
|
+
if (embeddedServers.length > 1) throw new AmbiguousPreviewServerError(embeddedServers);
|
|
332
|
+
return findViteStudioServerForProject(normalizedProjectDir, fetchImpl);
|
|
333
|
+
}
|
|
334
|
+
function studioSelectionUrl(server) {
|
|
335
|
+
return studioApiUrl(server, "selection");
|
|
336
|
+
}
|
|
337
|
+
function studioApiUrl(server, route) {
|
|
338
|
+
const host = server.host ?? "127.0.0.1";
|
|
339
|
+
return `http://${host}:${server.port}/api/projects/${encodeURIComponent(server.projectName)}/${route}`;
|
|
340
|
+
}
|
|
341
|
+
var LOOPBACK_HOSTS = ["127.0.0.1", "[::1]"];
|
|
342
|
+
async function findViteStudioServerForProject(normalizedProjectDir, fetchImpl, ports = VITE_STUDIO_DISCOVERY_PORTS) {
|
|
343
|
+
for (const port of ports) {
|
|
344
|
+
for (const host of LOOPBACK_HOSTS) {
|
|
345
|
+
try {
|
|
346
|
+
const response = await fetchImpl(`http://${host}:${port}/api/projects`);
|
|
347
|
+
if (!response.ok) continue;
|
|
348
|
+
const payload = await response.json();
|
|
349
|
+
const project = payload.projects?.find(
|
|
350
|
+
(candidate) => normalizePath(candidate.dir) === normalizedProjectDir
|
|
351
|
+
);
|
|
352
|
+
if (!project) continue;
|
|
353
|
+
return {
|
|
354
|
+
port,
|
|
355
|
+
host,
|
|
356
|
+
projectName: project.id,
|
|
357
|
+
projectDir: project.dir,
|
|
358
|
+
version: "studio-dev",
|
|
359
|
+
pid: null
|
|
360
|
+
};
|
|
361
|
+
} catch {
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
return null;
|
|
366
|
+
}
|
|
367
|
+
async function fetchStudioSelection(server, fetchImpl = fetch) {
|
|
368
|
+
const url = studioSelectionUrl(server);
|
|
369
|
+
const response = await fetchImpl(url);
|
|
370
|
+
if (!response.ok) {
|
|
371
|
+
throw new Error(`selection endpoint returned ${response.status}`);
|
|
372
|
+
}
|
|
373
|
+
return await response.json();
|
|
374
|
+
}
|
|
375
|
+
async function fetchStudioLint(server, fetchImpl = fetch) {
|
|
376
|
+
const url = studioApiUrl(server, "lint");
|
|
377
|
+
const response = await fetchImpl(url);
|
|
378
|
+
if (!response.ok) {
|
|
379
|
+
throw new Error(`lint endpoint returned ${response.status}`);
|
|
380
|
+
}
|
|
381
|
+
return await response.json();
|
|
382
|
+
}
|
|
383
|
+
|
|
272
384
|
export {
|
|
385
|
+
MAX_PORT_SCAN,
|
|
273
386
|
scanActiveServers,
|
|
274
387
|
activeServerOnPort,
|
|
275
388
|
killActiveServers,
|
|
276
|
-
findPortAndServe
|
|
389
|
+
findPortAndServe,
|
|
390
|
+
AmbiguousPreviewServerError,
|
|
391
|
+
PreviewServerPortMismatchError,
|
|
392
|
+
findPreviewServerForProject,
|
|
393
|
+
studioSelectionUrl,
|
|
394
|
+
studioApiUrl,
|
|
395
|
+
fetchStudioSelection,
|
|
396
|
+
fetchStudioLint
|
|
277
397
|
};
|
|
@@ -8,14 +8,14 @@ import {
|
|
|
8
8
|
DEFAULT_REGISTRY_URL,
|
|
9
9
|
fetchItemFile,
|
|
10
10
|
validRegistryItem
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-IP3XINRB.js";
|
|
12
12
|
import {
|
|
13
13
|
publishRegistryFile,
|
|
14
14
|
registryTargetPath
|
|
15
15
|
} from "./chunk-GMECXFAN.js";
|
|
16
16
|
import {
|
|
17
17
|
validateVariables
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-FCEFKWPM.js";
|
|
19
19
|
import {
|
|
20
20
|
realProjectRoot
|
|
21
21
|
} from "./chunk-OFQWTKPW.js";
|
|
@@ -13,11 +13,11 @@ import {
|
|
|
13
13
|
} from "./chunk-TVCRUG2S.js";
|
|
14
14
|
import {
|
|
15
15
|
getFreeDiskMb
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-L5QASNBN.js";
|
|
17
17
|
import {
|
|
18
18
|
ensureBrowser,
|
|
19
19
|
findBrowser
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-4PFZPP2N.js";
|
|
21
21
|
import {
|
|
22
22
|
runCancellableProcess
|
|
23
23
|
} from "./chunk-LCSMOLGX.js";
|
|
@@ -113,7 +113,7 @@ async function checkFFmpeg(signal) {
|
|
|
113
113
|
level: "error",
|
|
114
114
|
title: "FFmpeg cannot start",
|
|
115
115
|
detail: version.detail,
|
|
116
|
-
hint: "Install a working 64-bit FFmpeg build with all required runtime DLLs.",
|
|
116
|
+
hint: process.platform === "win32" ? "Install a working 64-bit FFmpeg build with all required runtime DLLs." : getFFmpegInstallHint(),
|
|
117
117
|
path
|
|
118
118
|
};
|
|
119
119
|
}
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
typeDirPath,
|
|
21
21
|
updateRecord,
|
|
22
22
|
withFigmaErrors
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-FW7K32YT.js";
|
|
24
24
|
import {
|
|
25
25
|
defineCommand
|
|
26
26
|
} from "./chunk-S3S4TGEH.js";
|
|
@@ -221,7 +221,7 @@ var asset_default = defineCommand({
|
|
|
221
221
|
rendered > 0 ? `(${results.length} nodes, ${rendered} rendered in 1 figma request)` : `(${results.length} nodes, all reused from cache \u2014 no figma request)`
|
|
222
222
|
);
|
|
223
223
|
}
|
|
224
|
-
const { trackFigmaImport } = await import("./telemetry-
|
|
224
|
+
const { trackFigmaImport } = await import("./telemetry-R3BPD6VK.js");
|
|
225
225
|
trackFigmaImport({
|
|
226
226
|
phase: "asset",
|
|
227
227
|
reused: results.every((r) => r.reused),
|
|
@@ -1278,7 +1278,7 @@ async function withFigmaErrors(command, fn) {
|
|
|
1278
1278
|
} catch (err) {
|
|
1279
1279
|
if (err instanceof Error) {
|
|
1280
1280
|
try {
|
|
1281
|
-
const { trackCommandFailure } = await import("./events-
|
|
1281
|
+
const { trackCommandFailure } = await import("./events-3HUO73ZE.js");
|
|
1282
1282
|
trackCommandFailure(
|
|
1283
1283
|
command,
|
|
1284
1284
|
err,
|