@absolutejs/absolute 0.20.0-beta.141 → 0.20.0-beta.144

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.
Files changed (54) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/changelog.json +40 -0
  3. package/dist/angular/components/core/streamingSlotRegistrar.js +1 -1
  4. package/dist/angular/components/core/streamingSlotRegistry.js +2 -2
  5. package/dist/angular/index.js +2 -2
  6. package/dist/angular/index.js.map +3 -3
  7. package/dist/angular/server.js +2 -2
  8. package/dist/angular/server.js.map +3 -3
  9. package/dist/build.js +277 -196
  10. package/dist/build.js.map +23 -20
  11. package/dist/cli/{buildDepVendor-bpac1bhq.js → buildDepVendor-e2zz9x78.js} +5 -4
  12. package/dist/cli/{compile-grhs9tj4.js → compile-351tb63a.js} +2 -2
  13. package/dist/cli/config/server.js +1 -1
  14. package/dist/cli/{dev-4ps2yg1z.js → dev-d7nyd387.js} +22 -9
  15. package/dist/cli/{expoProject-kabqa80q.js → expoProject-f3eb0040.js} +1 -1
  16. package/dist/cli/index-6vpdsqa1.js +50 -0
  17. package/dist/cli/{index-h078vn9f.js → index-8s6w45zc.js} +1 -1
  18. package/dist/cli/{index-fezxjrgd.js → index-ezz88cdw.js} +1 -1
  19. package/dist/cli/{index-nrtt3x67.js → index-snz4z0tq.js} +21 -21
  20. package/dist/cli/index.js +5 -5
  21. package/dist/cli/{mobile-p657bkqa.js → mobile-dvahvjeh.js} +3 -3
  22. package/dist/cli/{start-3m7bd02e.js → start-09prwq60.js} +3 -3
  23. package/dist/client/chunks/{islands-eexr591d.js → islands-rc28k5sx.js} +7 -7
  24. package/dist/client/chunks/{islands-eexr591d.js.map → islands-rc28k5sx.js.map} +3 -3
  25. package/dist/client/index.js +2 -2
  26. package/dist/dev/serverBootstrap.js +64 -31
  27. package/dist/index.js +274 -193
  28. package/dist/index.js.map +24 -21
  29. package/dist/mobile/browser.js +1 -1
  30. package/dist/mobile/browser.js.map +3 -3
  31. package/dist/mobile/index.js +25 -25
  32. package/dist/mobile/index.js.map +6 -6
  33. package/dist/mobile/remoteMacAgentEntry.js +2 -2
  34. package/dist/react/index.js +2 -2
  35. package/dist/react/index.js.map +3 -3
  36. package/dist/react/server.js +2 -2
  37. package/dist/react/server.js.map +3 -3
  38. package/dist/src/build/importFromProject.d.ts +1 -0
  39. package/dist/src/build/workspacePackages.d.ts +2 -0
  40. package/dist/src/core/prepare.d.ts +256 -1063
  41. package/dist/src/dev/hot/plugin.d.ts +5 -0
  42. package/dist/src/dev/srcPath.d.ts +4 -0
  43. package/dist/src/mobile/nativePackages.d.ts +1 -1
  44. package/dist/src/plugins/hmr.d.ts +4 -1
  45. package/dist/svelte/index.js +2 -2
  46. package/dist/svelte/index.js.map +3 -3
  47. package/dist/svelte/server.js +2 -2
  48. package/dist/svelte/server.js.map +3 -3
  49. package/dist/vue/index.js +2 -2
  50. package/dist/vue/index.js.map +3 -3
  51. package/dist/vue/server.js +2 -2
  52. package/dist/vue/server.js.map +3 -3
  53. package/package.json +13 -13
  54. package/dist/cli/index-65kqn88a.js +0 -8
@@ -701,6 +701,35 @@ var init_hotResources = __esm(() => {
701
701
  };
702
702
  });
703
703
 
704
+ // src/build/workspacePackages.ts
705
+ import { readFileSync as readFileSync2, realpathSync } from "fs";
706
+ import { join as join2, sep } from "path";
707
+ var NODE_MODULES_SEGMENT, verdicts, workspacePackageDirs = (projectRoot = process.cwd()) => {
708
+ let manifest;
709
+ try {
710
+ manifest = JSON.parse(readFileSync2(join2(projectRoot, "package.json"), "utf-8"));
711
+ } catch {
712
+ return [];
713
+ }
714
+ const names = ["dependencies", "devDependencies", "optionalDependencies"].flatMap((field) => {
715
+ const deps = manifest[field];
716
+ return deps && typeof deps === "object" ? Object.keys(deps) : [];
717
+ });
718
+ const dirs = new Set;
719
+ for (const name of names) {
720
+ try {
721
+ const linked = realpathSync(join2(projectRoot, "node_modules", name));
722
+ if (!`${linked}${sep}`.includes(NODE_MODULES_SEGMENT))
723
+ dirs.add(linked);
724
+ } catch {}
725
+ }
726
+ return [...dirs];
727
+ };
728
+ var init_workspacePackages = __esm(() => {
729
+ NODE_MODULES_SEGMENT = `${sep}node_modules${sep}`;
730
+ verdicts = new Map;
731
+ });
732
+
704
733
  // src/dev/hot/analyze.ts
705
734
  import { dirname, extname } from "path";
706
735
  var ANALYZER_VERSION = 1, hashText = (text) => Bun.hash(text).toString(36), scriptKindFor = (tsc, path) => {
@@ -3810,7 +3839,7 @@ var require_source_map_support = __commonJS(function(exports, module) {
3810
3839
 
3811
3840
  // node_modules/typescript/lib/typescript.js
3812
3841
  var require_typescript = __commonJS(function(exports, module) {
3813
- var __dirname = "/home/alexkahn/abs/absolutejs-head/node_modules/typescript/lib", __filename = "/home/alexkahn/abs/absolutejs-head/node_modules/typescript/lib/typescript.js";
3842
+ var __dirname = "/home/runner/work/absolutejs/absolutejs/node_modules/typescript/lib", __filename = "/home/runner/work/absolutejs/absolutejs/node_modules/typescript/lib/typescript.js";
3814
3843
  /*! *****************************************************************************
3815
3844
  Copyright (c) Microsoft Corporation. All rights reserved.
3816
3845
  Licensed under the Apache License, Version 2.0 (the "License"); you may not use
@@ -172530,11 +172559,11 @@ Additional information: BADCLIENT: Bad error code, ${badCode} not found in range
172530
172559
  });
172531
172560
 
172532
172561
  // src/dev/hot/plugin.ts
172533
- import { mkdirSync as mkdirSync2, readFileSync as readFileSync2, realpathSync, writeFileSync } from "fs";
172534
- import { extname as extname2, join as join2, relative as relative2, resolve as resolve2, sep } from "path";
172562
+ import { mkdirSync as mkdirSync2, readFileSync as readFileSync3, realpathSync as realpathSync2, writeFileSync } from "fs";
172563
+ import { extname as extname2, join as join3, relative as relative2, resolve as resolve2, sep as sep2 } from "path";
172535
172564
  var HOT_QUERY, SOURCE, TEST_FILE, GENERATED, ABSOLUTE_ROOT, TS_LOADER = "ts", LOADERS, loaderFor = (path) => LOADERS[extname2(path)] ?? TS_LOADER, realPath = (path) => {
172536
172565
  try {
172537
- return realpathSync(path);
172566
+ return realpathSync2(path);
172538
172567
  } catch {
172539
172568
  return path;
172540
172569
  }
@@ -172548,13 +172577,14 @@ var HOT_QUERY, SOURCE, TEST_FILE, GENERATED, ABSOLUTE_ROOT, TS_LOADER = "ts", LO
172548
172577
  const file = realPath(path);
172549
172578
  if (!SOURCE.test(file))
172550
172579
  return false;
172551
- if (!file.startsWith(`${state.root}${sep}`))
172580
+ const root = [state.root, ...state.extraRoots ?? []].find((candidate) => file.startsWith(`${candidate}${sep2}`));
172581
+ if (root === undefined)
172552
172582
  return false;
172553
- if (file.startsWith(`${ABSOLUTE_ROOT}${sep}src${sep}`))
172583
+ if (file.startsWith(`${ABSOLUTE_ROOT}${sep2}src${sep2}`))
172554
172584
  return false;
172555
- if (file.startsWith(`${ABSOLUTE_ROOT}${sep}dist${sep}`))
172585
+ if (file.startsWith(`${ABSOLUTE_ROOT}${sep2}dist${sep2}`))
172556
172586
  return false;
172557
- if (GENERATED.test(file.slice(state.root.length)))
172587
+ if (GENERATED.test(file.slice(root.length)))
172558
172588
  return false;
172559
172589
  if (TEST_FILE.test(file))
172560
172590
  return false;
@@ -172562,7 +172592,7 @@ var HOT_QUERY, SOURCE, TEST_FILE, GENERATED, ABSOLUTE_ROOT, TS_LOADER = "ts", LO
172562
172592
  return false;
172563
172593
  if (isAbsoluteServerEntryCopyPath(file))
172564
172594
  return false;
172565
- return !state.excludedDirs.some((dir) => file === dir || file.startsWith(`${dir}${sep}`));
172595
+ return !state.excludedDirs.some((dir) => file === dir || file.startsWith(`${dir}${sep2}`));
172566
172596
  }, isAnalysis = (value) => {
172567
172597
  if (typeof value !== "object" || value === null)
172568
172598
  return false;
@@ -172570,12 +172600,12 @@ var HOT_QUERY, SOURCE, TEST_FILE, GENERATED, ABSOLUTE_ROOT, TS_LOADER = "ts", LO
172570
172600
  if (status === false)
172571
172601
  return typeof Reflect.get(value, "reason") === "string";
172572
172602
  return status === true && typeof Reflect.get(value, "code") === "string" && typeof Reflect.get(value, "exports") === "object" && Array.isArray(Reflect.get(value, "reexports")) && Array.isArray(Reflect.get(value, "plan"));
172573
- }, cachePath = (cacheDir, key) => join2(cacheDir, `${key}.json`), readCached = (key) => {
172603
+ }, cachePath = (cacheDir, key) => join3(cacheDir, `${key}.json`), readCached = (key) => {
172574
172604
  const state = shared.installed;
172575
172605
  if (!state)
172576
172606
  return;
172577
172607
  try {
172578
- const cached = JSON.parse(readFileSync2(cachePath(state.cacheDir, key), "utf-8"));
172608
+ const cached = JSON.parse(readFileSync3(cachePath(state.cacheDir, key), "utf-8"));
172579
172609
  return isAnalysis(cached) ? cached : undefined;
172580
172610
  } catch {
172581
172611
  return;
@@ -172602,14 +172632,14 @@ var HOT_QUERY, SOURCE, TEST_FILE, GENERATED, ABSOLUTE_ROOT, TS_LOADER = "ts", LO
172602
172632
  analyses.set(canonicalPath, { analysis, source });
172603
172633
  return analysis;
172604
172634
  }, loadImplementation = async (canonicalPath, filePath) => {
172605
- const source = readFileSync2(filePath, "utf-8");
172635
+ const source = readFileSync3(filePath, "utf-8");
172606
172636
  const analysis = await analyzeSource(canonicalPath, source);
172607
172637
  if (!analysis.ok)
172608
172638
  return { contents: source, loader: loaderFor(filePath) };
172609
172639
  setAnalysis(canonicalPath, analysis, source);
172610
172640
  return { contents: analysis.code, loader: loaderFor(filePath) };
172611
172641
  }, loadFacade = async (path) => {
172612
- const source = readFileSync2(path, "utf-8");
172642
+ const source = readFileSync3(path, "utf-8");
172613
172643
  const analysis = await analyzeSource(path, source);
172614
172644
  if (!analysis.ok)
172615
172645
  return { contents: source, loader: loaderFor(path) };
@@ -172624,7 +172654,7 @@ var HOT_QUERY, SOURCE, TEST_FILE, GENERATED, ABSOLUTE_ROOT, TS_LOADER = "ts", LO
172624
172654
  return false;
172625
172655
  }
172626
172656
  const root = realPath(resolve2(options.root));
172627
- const cacheDir = join2(root, ".absolutejs", "hot");
172657
+ const cacheDir = join3(root, ".absolutejs", "hot");
172628
172658
  mkdirSync2(cacheDir, { recursive: true });
172629
172659
  const installed = {
172630
172660
  ...options,
@@ -172632,6 +172662,7 @@ var HOT_QUERY, SOURCE, TEST_FILE, GENERATED, ABSOLUTE_ROOT, TS_LOADER = "ts", LO
172632
172662
  configPath: realPath(resolve2(options.configPath)),
172633
172663
  entryPath: realPath(resolve2(options.entryPath)),
172634
172664
  excludedDirs: options.excludedDirs.map((dir) => realPath(resolve2(dir))),
172665
+ extraRoots: (options.extraRoots ?? []).map((dir) => realPath(resolve2(dir))).filter((dir) => dir !== root),
172635
172666
  root
172636
172667
  };
172637
172668
  shared.installed = installed;
@@ -172648,7 +172679,7 @@ var HOT_QUERY, SOURCE, TEST_FILE, GENERATED, ABSOLUTE_ROOT, TS_LOADER = "ts", LO
172648
172679
  return loadImplementation(entryPath, filePath);
172649
172680
  if (!isHotManaged(filePath) || query && !HOT_QUERY.test(query))
172650
172681
  return {
172651
- contents: readFileSync2(filePath, "utf-8"),
172682
+ contents: readFileSync3(filePath, "utf-8"),
172652
172683
  loader: loaderFor(filePath)
172653
172684
  };
172654
172685
  const canonical = realPath(filePath);
@@ -172659,29 +172690,29 @@ var HOT_QUERY, SOURCE, TEST_FILE, GENERATED, ABSOLUTE_ROOT, TS_LOADER = "ts", LO
172659
172690
  }
172660
172691
  });
172661
172692
  return true;
172662
- }, managedFilter = (options) => {
172693
+ }, managedPattern = (root, options) => {
172663
172694
  const under = (dir) => {
172664
- const rel = relative2(options.root, dir);
172695
+ const rel = relative2(root, dir);
172665
172696
  if (rel === "" || rel.startsWith(".."))
172666
172697
  return;
172667
- return `(?!${escapeRegex(rel).split(sep).join(SEPARATOR)}(?:${SEPARATOR}|\\?|$))`;
172698
+ return `(?!${escapeRegex(rel).split(sep2).join(SEPARATOR)}(?:${SEPARATOR}|\\?|$))`;
172668
172699
  };
172669
172700
  const excluded = [
172670
172701
  ...options.excludedDirs,
172671
- join2(ABSOLUTE_ROOT, "src"),
172672
- join2(ABSOLUTE_ROOT, "dist")
172702
+ join3(ABSOLUTE_ROOT, "src"),
172703
+ join3(ABSOLUTE_ROOT, "dist")
172673
172704
  ].map(under).filter((pattern) => pattern !== undefined);
172674
- const config = relative2(options.root, options.configPath);
172675
- const configPattern = config && !config.startsWith("..") ? `(?!${escapeRegex(config).split(sep).join(SEPARATOR)}(?:\\?|$))` : "";
172676
- return new RegExp([
172677
- `^${escapeRegex(options.root)}${SEPARATOR}`,
172705
+ const config = relative2(root, options.configPath);
172706
+ const configPattern = config && !config.startsWith("..") ? `(?!${escapeRegex(config).split(sep2).join(SEPARATOR)}(?:\\?|$))` : "";
172707
+ return [
172708
+ `^${escapeRegex(root)}${SEPARATOR}`,
172678
172709
  `(?!(?:[^?]*${SEPARATOR})?(?:node_modules|build|dist|generated|compiled|indexes|\\.absolutejs)${SEPARATOR})`,
172679
172710
  `(?![^?]*(?:\\.(?:spec|test)\\.[cm]?[jt]sx?|${SEPARATOR}__tests__${SEPARATOR}))`,
172680
172711
  ...excluded,
172681
172712
  configPattern,
172682
172713
  `[^?]*\\.(?:m?[jt]sx?|mts|cts)(?:\\?.*)?$`
172683
- ].join(""));
172684
- };
172714
+ ].join("");
172715
+ }, managedFilter = (options) => new RegExp([options.root, ...options.extraRoots ?? []].map((root) => `(?:${managedPattern(root, options)})`).join("|"));
172685
172716
  var init_plugin = __esm(() => {
172686
172717
  init_serverEntryCopies();
172687
172718
  init_analyze();
@@ -172737,6 +172768,7 @@ var configuredDirectories = async (configPath) => {
172737
172768
  configPath,
172738
172769
  entryPath,
172739
172770
  excludedDirs: await configuredDirectories(configPath),
172771
+ extraRoots: workspacePackageDirs(process.cwd()),
172740
172772
  root: process.cwd()
172741
172773
  });
172742
172774
  globalThis.__absoluteBackendHmr = installed;
@@ -172745,13 +172777,14 @@ var configuredDirectories = async (configPath) => {
172745
172777
  var init_install = __esm(() => {
172746
172778
  init_loadConfig();
172747
172779
  init_hotResources();
172780
+ init_workspacePackages();
172748
172781
  init_plugin();
172749
172782
  });
172750
172783
 
172751
172784
  // src/dev/serverBootstrap.ts
172752
172785
  init_constants();
172753
172786
  import { copyFileSync as copyFileSync2, existsSync as existsSync2, readdirSync, unlinkSync } from "fs";
172754
- import { dirname as dirname2, extname as extname3, join as join3, resolve as resolve4 } from "path";
172787
+ import { dirname as dirname2, extname as extname3, join as join4, resolve as resolve4 } from "path";
172755
172788
 
172756
172789
  // src/utils/bootTimeline.ts
172757
172790
  init_constants();
@@ -172934,7 +172967,7 @@ if (!isHotReevaluation) {
172934
172967
  }
172935
172968
  if (!isStaleAbsoluteServerEntryCopy(name))
172936
172969
  continue;
172937
- removeEntryCopy(join3(entryDir, name));
172970
+ removeEntryCopy(join4(entryDir, name));
172938
172971
  }
172939
172972
  }
172940
172973
  var entryCopies = globalThis.__absoluteEntryCopies ?? new Set;
@@ -172942,7 +172975,7 @@ globalThis.__absoluteEntryCopies = entryCopies;
172942
172975
  var createBootstrapCopy = () => {
172943
172976
  const sequence = (globalThis.__absoluteEntryBootstrapSequence ?? 0) + 1;
172944
172977
  globalThis.__absoluteEntryBootstrapSequence = sequence;
172945
- const path = join3(entryDir, `${copyPrefix}${process.pid}-bootstrap-${sequence}${entryExtension}`);
172978
+ const path = join4(entryDir, `${copyPrefix}${process.pid}-bootstrap-${sequence}${entryExtension}`);
172946
172979
  copyFileSync2(entryPath, path);
172947
172980
  entryCopies.add(path);
172948
172981
  return path;
@@ -172988,8 +173021,8 @@ if (!isHotReevaluation && !globalThis.__absoluteBunServer && process.env.ABSOLUT
172988
173021
  }
172989
173022
  }
172990
173023
  if (!isHotReevaluation && true && process.env.ABSOLUTE_DEV_PREBUILD !== "0" && process.env.ABSOLUTE_DEV_IMPORT_COST !== "1") {
172991
- const compiledRuntime = join3(import.meta.dir, "..", "index.js");
172992
- const runtimeEntry = existsSync2(compiledRuntime) ? compiledRuntime : join3(import.meta.dir, "..", "index.ts");
173024
+ const compiledRuntime = join4(import.meta.dir, "..", "index.js");
173025
+ const runtimeEntry = existsSync2(compiledRuntime) ? compiledRuntime : join4(import.meta.dir, "..", "index.ts");
172993
173026
  markBoot("prebuild import issued");
172994
173027
  import(runtimeEntry).then((runtime) => {
172995
173028
  markBoot("prebuild started");