@absolutejs/absolute 0.19.0-beta.1084 → 0.19.0-beta.1086

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.
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  var __require = import.meta.require;
3
3
 
4
- // .angular-partial-tmp-43dkQ5/src/core/streamingSlotRegistrar.ts
4
+ // .angular-partial-tmp-VRR9kp/src/core/streamingSlotRegistrar.ts
5
5
  var STREAMING_SLOT_REGISTRAR_KEY = Symbol.for("absolutejs.streamingSlotRegistrar");
6
6
  var STREAMING_SLOT_WARNING_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotWarningController");
7
7
  var STREAMING_SLOT_COLLECTION_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotCollectionController");
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  var __require = import.meta.require;
3
3
 
4
- // .angular-partial-tmp-43dkQ5/src/core/streamingSlotRegistrar.ts
4
+ // .angular-partial-tmp-VRR9kp/src/core/streamingSlotRegistrar.ts
5
5
  var STREAMING_SLOT_REGISTRAR_KEY = Symbol.for("absolutejs.streamingSlotRegistrar");
6
6
  var STREAMING_SLOT_WARNING_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotWarningController");
7
7
  var STREAMING_SLOT_COLLECTION_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotCollectionController");
@@ -48,7 +48,7 @@ var warnMissingStreamingSlotCollector = (primitiveName) => {
48
48
  getWarningController()?.maybeWarn(primitiveName);
49
49
  };
50
50
 
51
- // .angular-partial-tmp-43dkQ5/src/core/streamingSlotRegistry.ts
51
+ // .angular-partial-tmp-VRR9kp/src/core/streamingSlotRegistry.ts
52
52
  var STREAMING_SLOT_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotAsyncLocalStorage");
53
53
  var isObjectRecord2 = (value) => Boolean(value) && typeof value === "object";
54
54
  var isAsyncLocalStorage = (value) => isObjectRecord2(value) && ("getStore" in value) && typeof value.getStore === "function" && ("run" in value) && typeof value.run === "function";
package/dist/build.js CHANGED
@@ -13320,6 +13320,7 @@ __export(exports_chainInlineSourcemaps, {
13320
13320
  remapGeneratedLines: () => remapGeneratedLines,
13321
13321
  inlineLineMapComment: () => inlineLineMapComment,
13322
13322
  chainSourcemap: () => chainSourcemap,
13323
+ chainExternalSourcemap: () => chainExternalSourcemap,
13323
13324
  chainBundleInlineSourcemap: () => chainBundleInlineSourcemap,
13324
13325
  buildLineRemap: () => buildLineRemap
13325
13326
  });
@@ -13631,6 +13632,25 @@ var BASE64_CHARS = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz01234567
13631
13632
  const inline = `
13632
13633
  //# sourceMappingURL=data:application/json;base64,` + Buffer.from(JSON.stringify(chained)).toString("base64");
13633
13634
  writeFileSync7(bundleFilePath, stripped + inline);
13635
+ }, chainExternalSourcemap = (mapFilePath) => {
13636
+ let outerMap;
13637
+ try {
13638
+ outerMap = JSON.parse(readFileSync17(mapFilePath, "utf-8"));
13639
+ } catch {
13640
+ return;
13641
+ }
13642
+ if (!Array.isArray(outerMap.sources))
13643
+ return;
13644
+ const chained = chainSourcemap(outerMap, (src) => {
13645
+ const idx = outerMap.sources.indexOf(src);
13646
+ if (idx < 0)
13647
+ return null;
13648
+ const content = outerMap.sourcesContent?.[idx];
13649
+ if (!content)
13650
+ return null;
13651
+ return extractInlineMap(content);
13652
+ });
13653
+ writeFileSync7(mapFilePath, JSON.stringify(chained));
13634
13654
  };
13635
13655
  var init_chainInlineSourcemaps = __esm(() => {
13636
13656
  BASE64_TO_INT = new Int8Array(128).fill(-1);
@@ -14216,13 +14236,14 @@ if (typeof __VUE_HMR_RUNTIME__ !== 'undefined') {
14216
14236
  await Promise.all(Array.from(allTsHelperPaths).map(async (tsPath) => {
14217
14237
  const sourceCode = await file2(tsPath).text();
14218
14238
  const transpiledCode = transpiler4.transformSync(sourceCode);
14239
+ const withMap = transpiledCode + inlineLineMapComment(tsPath, sourceCode, transpiledCode);
14219
14240
  const relativeJsPath = relative11(vueRootDir, tsPath).replace(/\.ts$/, ".js");
14220
14241
  const outClientPath = join29(clientOutputDir, relativeJsPath);
14221
14242
  const outServerPath = join29(serverOutputDir, relativeJsPath);
14222
14243
  await mkdir6(dirname14(outClientPath), { recursive: true });
14223
14244
  await mkdir6(dirname14(outServerPath), { recursive: true });
14224
- await write3(outClientPath, transpiledCode);
14225
- await write3(outServerPath, transpiledCode);
14245
+ await write3(outClientPath, withMap);
14246
+ await write3(outServerPath, withMap);
14226
14247
  }));
14227
14248
  const isString = (value) => value !== null;
14228
14249
  const vueSpaRoutesBySource = new Map;
@@ -19959,7 +19980,9 @@ import {
19959
19980
  cpSync,
19960
19981
  existsSync as existsSync27,
19961
19982
  mkdirSync as mkdirSync12,
19983
+ readdirSync as readdirSync5,
19962
19984
  readFileSync as readFileSync21,
19985
+ renameSync,
19963
19986
  rmSync as rmSync2,
19964
19987
  statSync as statSync3,
19965
19988
  writeFileSync as writeFileSync8
@@ -20297,6 +20320,14 @@ ${content.slice(firstUseIdx)}`;
20297
20320
  ...config.default ?? {},
20298
20321
  ...config[pass] ?? {}
20299
20322
  }, locked);
20323
+ }, resolveClientSourcemap = (sourcemaps, isDev2) => {
20324
+ if (isDev2)
20325
+ return sourcemaps === false ? "none" : "inline";
20326
+ if (sourcemaps === "external" || sourcemaps === true)
20327
+ return "external";
20328
+ if (sourcemaps === "inline")
20329
+ return "inline";
20330
+ return "none";
20300
20331
  }, dedupe = (values) => [...new Set(values)], mergeBunBuildConfig = (base, override) => {
20301
20332
  const sanitized = sanitizeBunBuildOverride(override);
20302
20333
  const merged = {
@@ -20335,7 +20366,8 @@ ${content.slice(firstUseIdx)}`;
20335
20366
  options,
20336
20367
  incrementalFiles,
20337
20368
  mode,
20338
- sitemap
20369
+ sitemap,
20370
+ sourcemaps
20339
20371
  }) => {
20340
20372
  const buildStart = performance.now();
20341
20373
  const projectRoot = cwd();
@@ -21138,6 +21170,7 @@ ${content.slice(firstUseIdx)}`;
21138
21170
  ...islandRegistryPlugins
21139
21171
  ],
21140
21172
  root: clientRoot,
21173
+ sourcemap: resolveClientSourcemap(sourcemaps, isDev),
21141
21174
  splitting: true,
21142
21175
  target: "browser",
21143
21176
  throw: false
@@ -21212,6 +21245,7 @@ ${content.slice(firstUseIdx)}`;
21212
21245
  ...htmlScriptPlugin ? [htmlScriptPlugin] : []
21213
21246
  ],
21214
21247
  root: clientRoot,
21248
+ sourcemap: resolveClientSourcemap(sourcemaps, isDev),
21215
21249
  splitting: !isDev,
21216
21250
  target: "browser",
21217
21251
  throw: false,
@@ -21239,6 +21273,7 @@ ${content.slice(firstUseIdx)}`;
21239
21273
  ...angularDir ? [createAngularLinkerPlugin(hmr)] : []
21240
21274
  ],
21241
21275
  root: islandEntryResult.generatedRoot,
21276
+ sourcemap: resolveClientSourcemap(sourcemaps, isDev),
21242
21277
  splitting: !isDev,
21243
21278
  target: "browser",
21244
21279
  throw: false,
@@ -21270,6 +21305,23 @@ ${content.slice(firstUseIdx)}`;
21270
21305
  chainBundleInlineSourcemap2(out.path);
21271
21306
  }
21272
21307
  }
21308
+ if (!isDev && resolveClientSourcemap(sourcemaps, isDev) === "external") {
21309
+ const { chainExternalSourcemap: chainExternalSourcemap2 } = await Promise.resolve().then(() => (init_chainInlineSourcemaps(), exports_chainInlineSourcemaps));
21310
+ const sourcemapDir = join36(projectRoot, "sourcemaps");
21311
+ mkdirSync12(sourcemapDir, { recursive: true });
21312
+ const mapFiles = readdirSync5(buildPath, { recursive: true }).filter((entry) => entry.endsWith(".js.map") && !entry.includes("node_modules")).map((entry) => join36(buildPath, entry));
21313
+ for (const mapPath of mapFiles) {
21314
+ chainExternalSourcemap2(mapPath);
21315
+ renameSync(mapPath, join36(sourcemapDir, basename11(mapPath)));
21316
+ const jsPath = mapPath.slice(0, -4);
21317
+ try {
21318
+ const js = readFileSync21(jsPath, "utf-8").replace(/\n?\/\/# sourceMappingURL=[^\n]*\s*$/, `
21319
+ `);
21320
+ writeFileSync8(jsPath, js);
21321
+ } catch {}
21322
+ }
21323
+ console.info(`[absolute] sourcemaps: chained + privatized ${mapFiles.length} client maps \u2192 ${relative14(projectRoot, sourcemapDir)}/`);
21324
+ }
21273
21325
  if (serverResult && !serverResult.success && serverLogs.length > 0) {
21274
21326
  extractBuildError(serverLogs, "server", "Server", frameworkNames, isIncremental, throwOnError);
21275
21327
  }
@@ -22292,7 +22344,7 @@ var init_clientManager = __esm(() => {
22292
22344
  });
22293
22345
 
22294
22346
  // src/dev/pathUtils.ts
22295
- import { existsSync as existsSync30, readdirSync as readdirSync5, readFileSync as readFileSync23 } from "fs";
22347
+ import { existsSync as existsSync30, readdirSync as readdirSync6, readFileSync as readFileSync23 } from "fs";
22296
22348
  import { dirname as dirname19, resolve as resolve28 } from "path";
22297
22349
  var STYLE_EXTENSION_PATTERN2, detectFramework = (filePath, resolved) => {
22298
22350
  if (shouldIgnorePath(filePath, resolved)) {
@@ -22374,7 +22426,7 @@ var STYLE_EXTENSION_PATTERN2, detectFramework = (filePath, resolved) => {
22374
22426
  const walk = (dir) => {
22375
22427
  let entries;
22376
22428
  try {
22377
- entries = readdirSync5(dir, { withFileTypes: true });
22429
+ entries = readdirSync6(dir, { withFileTypes: true });
22378
22430
  } catch {
22379
22431
  return;
22380
22432
  }
@@ -22470,8 +22522,8 @@ var STYLE_EXTENSION_PATTERN2, detectFramework = (filePath, resolved) => {
22470
22522
  roots.push(abs);
22471
22523
  }
22472
22524
  try {
22473
- const { readdirSync: readdirSync6 } = __require("fs");
22474
- const entries = readdirSync6(cwd2, { withFileTypes: true });
22525
+ const { readdirSync: readdirSync7 } = __require("fs");
22526
+ const entries = readdirSync7(cwd2, { withFileTypes: true });
22475
22527
  for (const entry of entries) {
22476
22528
  if (!entry.isDirectory())
22477
22529
  continue;
@@ -22551,7 +22603,7 @@ var init_pathUtils = __esm(() => {
22551
22603
 
22552
22604
  // src/dev/fileWatcher.ts
22553
22605
  import { watch } from "fs";
22554
- import { existsSync as existsSync31, readdirSync as readdirSync6, statSync as statSync4 } from "fs";
22606
+ import { existsSync as existsSync31, readdirSync as readdirSync7, statSync as statSync4 } from "fs";
22555
22607
  import { dirname as dirname20, join as join38, resolve as resolve29 } from "path";
22556
22608
  var safeRemoveFromGraph = (graph, fullPath) => {
22557
22609
  try {
@@ -22577,7 +22629,7 @@ var safeRemoveFromGraph = (graph, fullPath) => {
22577
22629
  const atomicRecoveryScan = (eventDir) => {
22578
22630
  let entries;
22579
22631
  try {
22580
- entries = readdirSync6(eventDir);
22632
+ entries = readdirSync7(eventDir);
22581
22633
  } catch {
22582
22634
  return;
22583
22635
  }
@@ -23058,7 +23110,7 @@ __export(exports_resolveOwningComponents, {
23058
23110
  resolveDescendantsOfParent: () => resolveDescendantsOfParent,
23059
23111
  invalidateResourceIndex: () => invalidateResourceIndex
23060
23112
  });
23061
- import { readdirSync as readdirSync7, readFileSync as readFileSync26, statSync as statSync5 } from "fs";
23113
+ import { readdirSync as readdirSync8, readFileSync as readFileSync26, statSync as statSync5 } from "fs";
23062
23114
  import { dirname as dirname22, extname as extname9, join as join39, resolve as resolve34 } from "path";
23063
23115
  import ts16 from "typescript";
23064
23116
  var ENTITY_DECORATORS, isAngularSourceFile = (file4) => file4.endsWith(".ts") || file4.endsWith(".tsx"), walkAngularSourceFiles = (root) => {
@@ -23066,7 +23118,7 @@ var ENTITY_DECORATORS, isAngularSourceFile = (file4) => file4.endsWith(".ts") ||
23066
23118
  const visit = (dir) => {
23067
23119
  let entries;
23068
23120
  try {
23069
- entries = readdirSync7(dir, { withFileTypes: true });
23121
+ entries = readdirSync8(dir, { withFileTypes: true });
23070
23122
  } catch {
23071
23123
  return;
23072
23124
  }
@@ -25807,9 +25859,9 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
25807
25859
  const editedProvidersChain = providersImport && angularFiles.some((file4) => resolve40(file4) === resolve40(providersImport.absolutePath) || resolve40(file4).startsWith(`${resolve40(angularDir)}/`));
25808
25860
  const pageEntries = editedProvidersChain && initialPageEntries.length === 0 ? (() => {
25809
25861
  const allPages = [];
25810
- const { readdirSync: readdirSync8 } = __require("fs");
25862
+ const { readdirSync: readdirSync9 } = __require("fs");
25811
25863
  const walk = (dir) => {
25812
- for (const entry of readdirSync8(dir, {
25864
+ for (const entry of readdirSync9(dir, {
25813
25865
  withFileTypes: true
25814
25866
  })) {
25815
25867
  const full = resolve40(dir, entry.name);
@@ -27995,5 +28047,5 @@ export {
27995
28047
  build
27996
28048
  };
27997
28049
 
27998
- //# debugId=8D74425395F2792364756E2164756E21
28050
+ //# debugId=DEE26AA869F54FE864756E2164756E21
27999
28051
  //# sourceMappingURL=build.js.map