veryfront 0.1.795 → 0.1.796

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/esm/deno.js CHANGED
@@ -1,6 +1,6 @@
1
1
  export default {
2
2
  "name": "veryfront",
3
- "version": "0.1.795",
3
+ "version": "0.1.796",
4
4
  "license": "Apache-2.0",
5
5
  "nodeModulesDir": "auto",
6
6
  "minimumDependencyAge": {
@@ -1 +1 @@
1
- {"version":3,"file":"build-executor.d.ts","sourceRoot":"","sources":["../../../src/src/release-assets/build-executor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAuBH,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAe/C,MAAM,WAAW,sBAAsB;IACrC,yDAAyD;IACzD,gBAAgB,EAAE,MAAM,CAAC;IACzB,oBAAoB;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,oBAAoB;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,iCAAiC;IACjC,cAAc,EAAE,MAAM,CAAC;IACvB,yDAAyD;IACzD,iBAAiB,EAAE,MAAM,CAAC;IAC1B,oCAAoC;IACpC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,gDAAgD;IAChD,MAAM,EAAE,uBAAuB,CAAC;IAChC,sDAAsD;IAEtD,OAAO,EAAE,GAAG,CAAC;IACb;;;;OAIG;IACH,SAAS,CAAC,EAAE,qBAAqB,CAAC;IAClC;;;OAGG;IACH,iBAAiB,CAAC,EAAE,gCAAgC,CAAC;CACtD;AAED,MAAM,MAAM,qBAAqB,GAAG,CAClC,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,EAElB,OAAO,EAAE,GAAG,EACZ,OAAO,EAAE;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,OAAO,CAAC;IAAC,GAAG,EA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AChB,OAAO,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,gBAAgB,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACzD,+BAA+B,CAC7B,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,SAAS,GAAG,QAAQ,EAC3B,KAAK,CAAC,EAAE,MAAM,GACb,OAAO,CAAC,OAAO,CAAC,CAAC;IACpB;;;;;;;OAOG;IACH,iBAAiB,CAAC,CAChB,UAAU,EAAE,GAAG,CAAC,MAAM,CAAC,EACvB,UAAU,EAAE,MAAM,GAAG,SAAS,GAC7B,OAAO,CAAC;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,GAAG,IAAI,CAAC,CAAC;CACrE;AAED,MAAM,WAAW,uBAAuB;IACtC,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,OAAO,GAAG,QAAQ,CAAC;IAC1B,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAwsBD;;;GAGG;AACH,wBAAsB,oBAAoB,CACxC,KAAK,EAAE,sBAAsB,EAC7B,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,uBAAuB,CAAC,CA2ClC"}
1
+ {"version":3,"file":"build-executor.d.ts","sourceRoot":"","sources":["../../../src/src/release-assets/build-executor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAuBH,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAe/C,MAAM,WAAW,sBAAsB;IACrC,yDAAyD;IACzD,gBAAgB,EAAE,MAAM,CAAC;IACzB,oBAAoB;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,oBAAoB;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,iCAAi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,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AA+wBD;;;GAGG;AACH,wBAAsB,oBAAoB,CACxC,KAAK,EAAE,sBAAsB,EAC7B,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,uBAAuB,CAAC,CA2ClC"}
@@ -222,6 +222,26 @@ function buildDependencyUrlMap(dependencies, dependencyModules) {
222
222
  }
223
223
  return urls;
224
224
  }
225
+ function dependencyFallbackUrl(dependency) {
226
+ if (dependency.manifestKey.startsWith("http://") ||
227
+ dependency.manifestKey.startsWith("https://")) {
228
+ return dependency.manifestKey;
229
+ }
230
+ for (const specifier of dependency.specifiers) {
231
+ if (specifier.startsWith("http://") || specifier.startsWith("https://")) {
232
+ return specifier;
233
+ }
234
+ }
235
+ return null;
236
+ }
237
+ function addDependencyUrlAliases(urls, dependency, url) {
238
+ urls.set(dependency.manifestKey, url);
239
+ if (dependency.sourcePath)
240
+ urls.set(`file://${dependency.sourcePath}`, url);
241
+ for (const specifier of dependency.specifiers) {
242
+ urls.set(normalizeDependencySpecifier(specifier), url);
243
+ }
244
+ }
225
245
  function addDependencyModule(dependencies, dependency) {
226
246
  const sourcePath = dependency.sourcePath ?? resolveLocalDependencyPath(dependency.specifier) ??
227
247
  undefined;
@@ -329,7 +349,7 @@ async function vendorHttpImportsWithCache(code, options) {
329
349
  }))),
330
350
  };
331
351
  }
332
- async function finalizeDependencyModules(dependencyModules, uploadQueue, pendingBytes) {
352
+ async function finalizeDependencyModules(dependencyModules, uploadQueue, pendingBytes, gaps) {
333
353
  const bySpecifier = new Map();
334
354
  const byFilePath = new Map();
335
355
  for (const dependency of dependencyModules.values()) {
@@ -343,6 +363,9 @@ async function finalizeDependencyModules(dependencyModules, uploadQueue, pending
343
363
  byFilePath.set(dependency.sourcePath, dependency);
344
364
  }
345
365
  const finalized = new Map();
366
+ const fallbackUrls = new Map();
367
+ const skippedCycles = new Set();
368
+ const recordedCycleGaps = new Set();
346
369
  const visiting = [];
347
370
  function resolveDependencyImport(specifier, parent) {
348
371
  const filePath = resolveLocalDependencyPath(specifier, parent.sourcePath);
@@ -353,14 +376,32 @@ async function finalizeDependencyModules(dependencyModules, uploadQueue, pending
353
376
  }
354
377
  return bySpecifier.get(normalizeDependencySpecifier(specifier)) ?? null;
355
378
  }
379
+ function recordDependencyCycle(cycleKeys) {
380
+ // Separate content-hashed ESM files cannot represent cyclic imports without
381
+ // release-scoped aliases or bundling, so keep only that component on source URL fallback.
382
+ for (const key of cycleKeys)
383
+ skippedCycles.add(key);
384
+ const gap = `dependency-cycle:${cycleKeys.join("->")}`;
385
+ if (!recordedCycleGaps.has(gap)) {
386
+ recordedCycleGaps.add(gap);
387
+ gaps.push(gap);
388
+ }
389
+ }
390
+ function cycleFallbackFor(dependency) {
391
+ if (!skippedCycles.has(dependency.manifestKey))
392
+ return null;
393
+ return dependencyFallbackUrl(dependency);
394
+ }
356
395
  async function finalize(manifestKey) {
357
396
  const existing = finalized.get(manifestKey);
358
397
  if (existing)
359
398
  return existing;
360
399
  if (visiting.includes(manifestKey)) {
361
- const cycle = [...visiting.slice(visiting.indexOf(manifestKey)), manifestKey].join(" -> ");
362
- throw new Error(`Circular release asset dependency graph: ${cycle}`);
400
+ recordDependencyCycle([...visiting.slice(visiting.indexOf(manifestKey)), manifestKey]);
401
+ return null;
363
402
  }
403
+ if (skippedCycles.has(manifestKey))
404
+ return null;
364
405
  const dependency = dependencyModules.get(manifestKey);
365
406
  if (!dependency)
366
407
  return null;
@@ -378,16 +419,21 @@ async function finalizeDependencyModules(dependencyModules, uploadQueue, pending
378
419
  if (!child)
379
420
  continue;
380
421
  if (child.manifestKey === manifestKey) {
381
- throw new Error(`Circular release asset dependency graph: ${manifestKey} -> ${manifestKey}`);
422
+ recordDependencyCycle([manifestKey, manifestKey]);
423
+ continue;
382
424
  }
383
425
  await finalize(child.manifestKey);
384
426
  }
427
+ if (skippedCycles.has(manifestKey))
428
+ return null;
385
429
  const rewritten = await replaceSpecifiers(dependency.code, (specifier) => {
386
430
  const child = resolveDependencyImport(specifier, dependency);
387
431
  if (!child)
388
432
  return null;
389
433
  const asset = finalized.get(child.manifestKey);
390
- return asset ? releaseAssetUrl(asset.contentHash, "js") : null;
434
+ if (asset)
435
+ return releaseAssetUrl(asset.contentHash, "js");
436
+ return cycleFallbackFor(child);
391
437
  });
392
438
  const entry = await addPreparedJavaScriptAsset(`__dependencies__/${manifestKey}`, rewritten, uploadQueue, pendingBytes);
393
439
  if (!entry) {
@@ -410,7 +456,17 @@ async function finalizeDependencyModules(dependencyModules, uploadQueue, pending
410
456
  finally {
411
457
  visiting.length = 0;
412
458
  }
413
- return Object.fromEntries(finalized);
459
+ for (const manifestKey of skippedCycles) {
460
+ const dependency = dependencyModules.get(manifestKey);
461
+ if (!dependency)
462
+ continue;
463
+ const fallbackUrl = dependencyFallbackUrl(dependency);
464
+ if (!fallbackUrl) {
465
+ throw new Error(`Unrepresentable vendored dependency cycle: ${manifestKey}`);
466
+ }
467
+ addDependencyUrlAliases(fallbackUrls, dependency, fallbackUrl);
468
+ }
469
+ return { assets: Object.fromEntries(finalized), fallbackUrls };
414
470
  }
415
471
  async function finalizeProjectModules(transformedModules, knownPaths, dependencyUrls, uploadQueue, pendingBytes, gaps) {
416
472
  const finalized = new Map();
@@ -721,8 +777,11 @@ async function runBuildInner(input, tempDir, client, transform) {
721
777
  }
722
778
  const frameworkDependencies = await buildFrameworkDependencies(input, tempDir, transform, uploadQueue, pendingBytes, gaps);
723
779
  let httpDependencies;
780
+ let httpDependencyFallbackUrls = new Map();
724
781
  try {
725
- httpDependencies = await finalizeDependencyModules(dependencyModules, uploadQueue, pendingBytes);
782
+ const finalizedHttpDependencies = await finalizeDependencyModules(dependencyModules, uploadQueue, pendingBytes, gaps);
783
+ httpDependencies = finalizedHttpDependencies.assets;
784
+ httpDependencyFallbackUrls = finalizedHttpDependencies.fallbackUrls;
726
785
  }
727
786
  catch (error) {
728
787
  const sanitized = sanitizeError(error);
@@ -742,6 +801,9 @@ async function runBuildInner(input, tempDir, client, transform) {
742
801
  }
743
802
  const dependencies = { ...frameworkDependencies, ...httpDependencies };
744
803
  const dependencyUrls = buildDependencyUrlMap(dependencies, dependencyModules);
804
+ for (const [specifier, url] of httpDependencyFallbackUrls) {
805
+ dependencyUrls.set(specifier, url);
806
+ }
745
807
  const { modules, skippedModules } = await finalizeProjectModules(transformedModules, knownPaths, dependencyUrls, uploadQueue, pendingBytes, gaps);
746
808
  for (const logicalPath of transformedModules.keys()) {
747
809
  if (modules[logicalPath])
@@ -1,3 +1,3 @@
1
1
  /** Shared version value. */
2
- export declare const VERSION = "0.1.795";
2
+ export declare const VERSION = "0.1.796";
3
3
  //# sourceMappingURL=version-constant.d.ts.map
@@ -1,4 +1,4 @@
1
1
  // Keep in sync with deno.json version.
2
2
  // scripts/release.ts updates this constant during releases.
3
3
  /** Shared version value. */
4
- export const VERSION = "0.1.795";
4
+ export const VERSION = "0.1.796";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "veryfront",
3
- "version": "0.1.795",
3
+ "version": "0.1.796",
4
4
  "description": "The simplest way to build AI-powered apps",
5
5
  "keywords": [
6
6
  "react",