@absolutejs/absolute 0.19.0-beta.937 → 0.19.0-beta.939

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/cli/index.js CHANGED
@@ -1290,12 +1290,12 @@ import {
1290
1290
  mkdirSync as mkdirSync6,
1291
1291
  readdirSync as readdirSync2,
1292
1292
  readFileSync as readFileSync11,
1293
- rmSync as rmSync3,
1293
+ rmSync as rmSync4,
1294
1294
  statSync,
1295
1295
  unlinkSync as unlinkSync3,
1296
1296
  writeFileSync as writeFileSync4
1297
1297
  } from "fs";
1298
- import { basename as basename2, dirname as dirname3, join as join8, relative, resolve as resolve10 } from "path";
1298
+ import { basename as basename2, dirname as dirname3, join as join9, relative, resolve as resolve10 } from "path";
1299
1299
  var cliTag4 = (color, message) => `\x1B[2m${formatTimestamp()}\x1B[0m ${color}[cli]\x1B[0m ${color}${message}\x1B[0m`, compileBanner = (version2) => {
1300
1300
  const resolvedVersion = version2 || "unknown";
1301
1301
  console.log("");
@@ -1308,7 +1308,7 @@ var cliTag4 = (color, message) => `\x1B[2m${formatTimestamp()}\x1B[0m ${color}[c
1308
1308
  const entry = pending.pop();
1309
1309
  if (!entry)
1310
1310
  continue;
1311
- const fullPath = join8(entry.parentPath, entry.name);
1311
+ const fullPath = join9(entry.parentPath, entry.name);
1312
1312
  if (entry.isDirectory())
1313
1313
  pending = pending.concat(readdirSync2(fullPath, { withFileTypes: true }));
1314
1314
  else
@@ -1328,7 +1328,7 @@ var cliTag4 = (color, message) => `\x1B[2m${formatTimestamp()}\x1B[0m ${color}[c
1328
1328
  const entry = pending.pop();
1329
1329
  if (!entry)
1330
1330
  continue;
1331
- const fullPath = join8(entry.parentPath, entry.name);
1331
+ const fullPath = join9(entry.parentPath, entry.name);
1332
1332
  if (entry.isDirectory()) {
1333
1333
  if (SERVER_RUNTIME_SCAN_SKIP_DIRS.has(entry.name))
1334
1334
  continue;
@@ -1443,7 +1443,7 @@ var cliTag4 = (color, message) => `\x1B[2m${formatTimestamp()}\x1B[0m ${color}[c
1443
1443
  return true;
1444
1444
  }, tryReadNodePackageJson = (packageDir) => {
1445
1445
  try {
1446
- return JSON.parse(readFileSync11(join8(packageDir, "package.json"), "utf-8"));
1446
+ return JSON.parse(readFileSync11(join9(packageDir, "package.json"), "utf-8"));
1447
1447
  } catch {
1448
1448
  return null;
1449
1449
  }
@@ -1455,8 +1455,8 @@ var cliTag4 = (color, message) => `\x1B[2m${formatTimestamp()}\x1B[0m ${color}[c
1455
1455
  if (!pkg)
1456
1456
  return;
1457
1457
  seen.add(specifier);
1458
- const destDir = join8(outdir, "node_modules", ...specifier.split("/"));
1459
- rmSync3(destDir, { force: true, recursive: true });
1458
+ const destDir = join9(outdir, "node_modules", ...specifier.split("/"));
1459
+ rmSync4(destDir, { force: true, recursive: true });
1460
1460
  cpSync(srcDir, destDir, {
1461
1461
  filter(source) {
1462
1462
  const rel = relative(srcDir, source);
@@ -1501,7 +1501,7 @@ var cliTag4 = (color, message) => `\x1B[2m${formatTimestamp()}\x1B[0m ${color}[c
1501
1501
  }
1502
1502
  copyAngularRuntimePackages(buildConfig, outdir);
1503
1503
  }, collectRuntimePackageSpecifiers = (distDir) => {
1504
- const nodeModulesDir = join8(distDir, "node_modules");
1504
+ const nodeModulesDir = join9(distDir, "node_modules");
1505
1505
  if (!existsSync10(nodeModulesDir))
1506
1506
  return [];
1507
1507
  const specifiers = [];
@@ -1509,7 +1509,7 @@ var cliTag4 = (color, message) => `\x1B[2m${formatTimestamp()}\x1B[0m ${color}[c
1509
1509
  if (!entry.isDirectory())
1510
1510
  continue;
1511
1511
  if (entry.name.startsWith("@")) {
1512
- const scopeDir = join8(nodeModulesDir, entry.name);
1512
+ const scopeDir = join9(nodeModulesDir, entry.name);
1513
1513
  for (const scopedEntry of readdirSync2(scopeDir, {
1514
1514
  withFileTypes: true
1515
1515
  })) {
@@ -1541,18 +1541,18 @@ var cliTag4 = (color, message) => `\x1B[2m${formatTimestamp()}\x1B[0m ${color}[c
1541
1541
  const packageSpecifier = packageSpecifiers.find((root) => specifier === root || specifier.startsWith(`${root}/`));
1542
1542
  if (!packageSpecifier)
1543
1543
  return null;
1544
- const packageDir = join8(distDir, "node_modules", ...packageSpecifier.split("/"));
1544
+ const packageDir = join9(distDir, "node_modules", ...packageSpecifier.split("/"));
1545
1545
  const subpath = specifier.slice(packageSpecifier.length);
1546
- const subPackageDir = subpath ? join8(packageDir, ...subpath.slice(1).split("/")) : null;
1547
- const resolvedPackageDir = subPackageDir && existsSync10(join8(subPackageDir, "package.json")) ? subPackageDir : packageDir;
1548
- const packageJsonPath = join8(resolvedPackageDir, "package.json");
1546
+ const subPackageDir = subpath ? join9(packageDir, ...subpath.slice(1).split("/")) : null;
1547
+ const resolvedPackageDir = subPackageDir && existsSync10(join9(subPackageDir, "package.json")) ? subPackageDir : packageDir;
1548
+ const packageJsonPath = join9(resolvedPackageDir, "package.json");
1549
1549
  if (!existsSync10(packageJsonPath))
1550
1550
  return null;
1551
1551
  const pkg = JSON.parse(readFileSync11(packageJsonPath, "utf-8"));
1552
1552
  const exportKey = resolvedPackageDir === subPackageDir ? "." : subpath ? `.${subpath}` : ".";
1553
1553
  const rootExport = pkg.exports?.[exportKey];
1554
1554
  const entry = pickExportEntry(rootExport) ?? (resolvedPackageDir === subPackageDir || !subpath ? pkg.module ?? pkg.main ?? "index.js" : `.${subpath}`);
1555
- return join8(resolvedPackageDir, entry);
1555
+ return join9(resolvedPackageDir, entry);
1556
1556
  }, RUNTIME_JS_EXTENSIONS, MODULE_SPECIFIER_RE, isRuntimeJsFile = (filePath) => RUNTIME_JS_EXTENSIONS.some((extension) => filePath.endsWith(extension)), isNodeModulesPath = (filePath) => filePath.split(/[\\/]/).includes("node_modules"), isFile = (filePath) => {
1557
1557
  try {
1558
1558
  return statSync(filePath).isFile();
@@ -1565,13 +1565,13 @@ var cliTag4 = (color, message) => `\x1B[2m${formatTimestamp()}\x1B[0m ${color}[c
1565
1565
  const candidates = [
1566
1566
  candidate,
1567
1567
  ...RUNTIME_JS_EXTENSIONS.map((extension) => `${candidate}${extension}`),
1568
- ...RUNTIME_JS_EXTENSIONS.map((extension) => join8(candidate, `index${extension}`))
1568
+ ...RUNTIME_JS_EXTENSIONS.map((extension) => join9(candidate, `index${extension}`))
1569
1569
  ];
1570
1570
  return candidates.find((filePath) => isRuntimeJsFile(filePath) && isFile(filePath)) ?? null;
1571
1571
  }, findContainingRuntimePackageDir = (filePath) => {
1572
1572
  let dir = dirname3(filePath);
1573
1573
  while (dir !== dirname3(dir)) {
1574
- if (isNodeModulesPath(dir) && existsSync10(join8(dir, "package.json"))) {
1574
+ if (isNodeModulesPath(dir) && existsSync10(join9(dir, "package.json"))) {
1575
1575
  return dir;
1576
1576
  }
1577
1577
  dir = dirname3(dir);
@@ -1587,7 +1587,7 @@ var cliTag4 = (color, message) => `\x1B[2m${formatTimestamp()}\x1B[0m ${color}[c
1587
1587
  const entry = pickExportEntry(pkg?.imports?.[specifier]);
1588
1588
  if (!entry)
1589
1589
  return null;
1590
- return join8(packageDir, entry);
1590
+ return join9(packageDir, entry);
1591
1591
  }, collectRuntimeRewriteRoots = (distDir) => collectFiles2(distDir).filter((filePath) => isRuntimeJsFile(filePath) && !isNodeModulesPath(filePath)), rewriteRuntimeModuleSpecifiers = (distDir) => {
1592
1592
  const packageSpecifiers = collectRuntimePackageSpecifiers(distDir);
1593
1593
  if (packageSpecifiers.length === 0)
@@ -2072,7 +2072,7 @@ console.log(\`
2072
2072
  copyServerRuntimeAssetReferences(resolvedOutdir);
2073
2073
  const prerenderStart = performance.now();
2074
2074
  process.stdout.write(cliTag4("\x1B[36m", "Pre-rendering pages"));
2075
- rmSync3(join8(resolvedOutdir, "_prerendered"), {
2075
+ rmSync4(join9(resolvedOutdir, "_prerendered"), {
2076
2076
  force: true,
2077
2077
  recursive: true
2078
2078
  });
@@ -2091,7 +2091,7 @@ console.log(\`
2091
2091
  const compileStart = performance.now();
2092
2092
  process.stdout.write(cliTag4("\x1B[36m", "Compiling standalone executable"));
2093
2093
  const entrypointCode = generateEntrypoint(resolvedOutdir, serverEntry, prerenderMap, absoluteVersion, buildConfig);
2094
- const entrypointPath = join8(resolvedOutdir, "_compile_entrypoint.ts");
2094
+ const entrypointPath = join9(resolvedOutdir, "_compile_entrypoint.ts");
2095
2095
  await Bun.write(entrypointPath, entrypointCode);
2096
2096
  mkdirSync6(dirname3(resolvedOutfile), { recursive: true });
2097
2097
  const result = await Bun.build({
@@ -2184,7 +2184,7 @@ var exports_typecheck = {};
2184
2184
  __export(exports_typecheck, {
2185
2185
  typecheck: () => typecheck
2186
2186
  });
2187
- import { resolve as resolve11, join as join9 } from "path";
2187
+ import { resolve as resolve11, join as join10 } from "path";
2188
2188
  import { existsSync as existsSync11, readFileSync as readFileSync12 } from "fs";
2189
2189
  import { mkdir as mkdir2, writeFile } from "fs/promises";
2190
2190
  var isCommandService3 = (service) => service.kind === "command" || Array.isArray(service.command), getTypecheckTargets = async (configPath2) => {
@@ -2289,7 +2289,7 @@ Found ${errorCount} error${suffix}.`;
2289
2289
  console.error("\x1B[31m\u2717\x1B[0m vue-tsc is required for Vue type checking. Install it: bun add -d vue-tsc");
2290
2290
  process.exit(1);
2291
2291
  }
2292
- const vueTsconfigPath = join9(cacheDir, "tsconfig.vue-check.json");
2292
+ const vueTsconfigPath = join10(cacheDir, "tsconfig.vue-check.json");
2293
2293
  return writeFile(vueTsconfigPath, JSON.stringify({
2294
2294
  compilerOptions: {
2295
2295
  rootDir: ".."
@@ -2304,7 +2304,7 @@ Found ${errorCount} error${suffix}.`;
2304
2304
  resolve11(vueTsconfigPath),
2305
2305
  "--incremental",
2306
2306
  "--tsBuildInfoFile",
2307
- join9(cacheDir, "vue-tsc.tsbuildinfo"),
2307
+ join10(cacheDir, "vue-tsc.tsbuildinfo"),
2308
2308
  "--pretty"
2309
2309
  ]));
2310
2310
  }, buildAngularCheck = async (cacheDir, angularDir) => {
@@ -2313,7 +2313,7 @@ Found ${errorCount} error${suffix}.`;
2313
2313
  console.error("\x1B[31m\u2717\x1B[0m @angular/compiler-cli is required for Angular type checking. Install it: bun add -d @angular/compiler-cli");
2314
2314
  process.exit(1);
2315
2315
  }
2316
- const angularTsconfigPath = join9(cacheDir, "tsconfig.angular-check.json");
2316
+ const angularTsconfigPath = join10(cacheDir, "tsconfig.angular-check.json");
2317
2317
  await writeFile(angularTsconfigPath, JSON.stringify({
2318
2318
  angularCompilerOptions: {
2319
2319
  strictTemplates: true
@@ -2333,7 +2333,7 @@ Found ${errorCount} error${suffix}.`;
2333
2333
  console.error("\x1B[31m\u2717\x1B[0m typescript is required for type checking. Install it: bun add -d typescript");
2334
2334
  process.exit(1);
2335
2335
  }
2336
- const tscConfigPath = join9(cacheDir, "tsconfig.typecheck.json");
2336
+ const tscConfigPath = join10(cacheDir, "tsconfig.typecheck.json");
2337
2337
  return writeFile(tscConfigPath, JSON.stringify({
2338
2338
  compilerOptions: {
2339
2339
  rootDir: ".."
@@ -2348,7 +2348,7 @@ Found ${errorCount} error${suffix}.`;
2348
2348
  resolve11(tscConfigPath),
2349
2349
  "--incremental",
2350
2350
  "--tsBuildInfoFile",
2351
- join9(cacheDir, "tsc.tsbuildinfo"),
2351
+ join10(cacheDir, "tsc.tsbuildinfo"),
2352
2352
  "--pretty"
2353
2353
  ]));
2354
2354
  }, buildSvelteCheck = async (cacheDir, svelteDir) => {
@@ -2357,7 +2357,7 @@ Found ${errorCount} error${suffix}.`;
2357
2357
  console.error("\x1B[31m\u2717\x1B[0m svelte-check is required for Svelte type checking. Install it: bun add -d svelte-check");
2358
2358
  process.exit(1);
2359
2359
  }
2360
- const svelteTsconfigPath = join9(cacheDir, "tsconfig.svelte-check.json");
2360
+ const svelteTsconfigPath = join10(cacheDir, "tsconfig.svelte-check.json");
2361
2361
  await writeFile(svelteTsconfigPath, JSON.stringify({
2362
2362
  extends: resolve11("tsconfig.json"),
2363
2363
  files: ABSOLUTE_TYPECHECK_FILES,
@@ -3644,8 +3644,8 @@ init_startupBanner();
3644
3644
  init_telemetryEvent();
3645
3645
  init_utils();
3646
3646
  var {env: env2 } = globalThis.Bun;
3647
- import { existsSync as existsSync8, readFileSync as readFileSync9 } from "fs";
3648
- import { basename, resolve as resolve7 } from "path";
3647
+ import { existsSync as existsSync8, readFileSync as readFileSync9, rmSync as rmSync3 } from "fs";
3648
+ import { basename, join as join8, resolve as resolve7 } from "path";
3649
3649
  var cliTag2 = (color, message) => `\x1B[2m${formatTimestamp()}\x1B[0m ${color}[cli]\x1B[0m ${color}${message}\x1B[0m`;
3650
3650
  var resolvePackageVersion = (candidates) => {
3651
3651
  for (const candidate of candidates) {
@@ -3764,6 +3764,10 @@ var start = async (serverEntry, outdir, configPath2) => {
3764
3764
  if (!build)
3765
3765
  throw new Error("Could not locate build module");
3766
3766
  await build(buildConfig);
3767
+ rmSync3(join8(resolvedOutdir, "_prerendered"), {
3768
+ force: true,
3769
+ recursive: true
3770
+ });
3767
3771
  } catch (err) {
3768
3772
  console.error(cliTag2("\x1B[31m", "Build step failed."));
3769
3773
  console.error(err);
package/dist/index.js CHANGED
@@ -10016,7 +10016,7 @@ var CACHE_ROOT, ANGULAR_LINKER_CANDIDATE_RE, createAngularLinkerPlugin = (linker
10016
10016
  }), angularLinkerPlugin;
10017
10017
  var init_angularLinkerPlugin = __esm(() => {
10018
10018
  CACHE_ROOT = resolve16(".absolutejs", "cache", "angular-linker");
10019
- ANGULAR_LINKER_CANDIDATE_RE = /[\\/](?:@angular[\\/].*|@absolutejs[\\/]absolute[\\/]dist[\\/]angular[\\/]components[\\/].*)\.m?js$/;
10019
+ ANGULAR_LINKER_CANDIDATE_RE = /[\\/]node_modules[\\/].*\.m?js$/;
10020
10020
  angularLinkerPlugin = createAngularLinkerPlugin(false);
10021
10021
  });
10022
10022
 
@@ -32137,5 +32137,5 @@ export {
32137
32137
  ANGULAR_INIT_TIMEOUT_MS
32138
32138
  };
32139
32139
 
32140
- //# debugId=E5D55DB53383127464756E2164756E21
32140
+ //# debugId=8C6259234C5851DB64756E2164756E21
32141
32141
  //# sourceMappingURL=index.js.map