@absolutejs/absolute 0.19.0-beta.1093 → 0.19.0-beta.1095

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-63uxGy/src/core/streamingSlotRegistrar.ts
4
+ // .angular-partial-tmp-4JpE4m/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-63uxGy/src/core/streamingSlotRegistrar.ts
4
+ // .angular-partial-tmp-4JpE4m/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-63uxGy/src/core/streamingSlotRegistry.ts
51
+ // .angular-partial-tmp-4JpE4m/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
@@ -14319,6 +14319,20 @@ export const setupApp = async (app, ctx) => {
14319
14319
  if (__absoluteUserSetupApp__) {
14320
14320
  await __absoluteUserSetupApp__(app, { ...ctx, router });
14321
14321
  }
14322
+ const currentRouteMatched = router.currentRoute.value.matched.length > 0;
14323
+ if (!currentRouteMatched) {
14324
+ if (ctx.isServer) {
14325
+ ctx.setNotFound();
14326
+ } else {
14327
+ window.location.assign(ctx.url);
14328
+ }
14329
+ return;
14330
+ }
14331
+ if (!ctx.isServer) {
14332
+ router.afterEach((to) => {
14333
+ if (to.matched.length === 0) window.location.assign(to.fullPath);
14334
+ });
14335
+ }
14322
14336
  };
14323
14337
  `;
14324
14338
  return sourceContent.replace(SCRIPT_REGEX, `${openTag}${rewrittenScript}${autoWrapper}${closeTag}`);
@@ -14742,6 +14756,7 @@ if (typeof __VUE_HMR_RUNTIME__ !== 'undefined') {
14742
14756
  " await setupAppHook(app, {",
14743
14757
  " isServer: false,",
14744
14758
  " router: null,",
14759
+ " setNotFound: () => {},",
14745
14760
  " setRedirect: () => {},",
14746
14761
  " url: clientUrl",
14747
14762
  " });",
@@ -27928,6 +27943,7 @@ __export(exports_buildDepVendor, {
27928
27943
  buildDepVendor: () => buildDepVendor
27929
27944
  });
27930
27945
  import { mkdirSync as mkdirSync14 } from "fs";
27946
+ import { isBuiltin } from "module";
27931
27947
  import { join as join42 } from "path";
27932
27948
  import { rm as rm10 } from "fs/promises";
27933
27949
  var {build: bunBuild9, Glob: Glob10 } = globalThis.Bun;
@@ -27946,7 +27962,7 @@ var toSafeFileName6 = (specifier) => {
27946
27962
  } catch {
27947
27963
  return false;
27948
27964
  }
27949
- }, isBareSpecifier2 = (spec) => !spec.startsWith(".") && !spec.startsWith("/") && !spec.startsWith("@src/"), isAbsolutePackageSpecifier = (spec) => spec === "@absolutejs/absolute" || spec.startsWith("@absolutejs/absolute/"), FRAMEWORK_SPECIFIERS, FRAMEWORK_NAMESPACE_PREFIXES, isFrameworkSpecifier = (spec) => FRAMEWORK_SPECIFIERS.has(spec) || FRAMEWORK_NAMESPACE_PREFIXES.some((prefix) => spec.startsWith(prefix)), FRAMEWORK_EXTERNALS, isSkippedFile = (file4) => file4.includes("node_modules") || file4.includes("/build/") || file4.includes("/dist/") || file4.includes("/indexes/"), isDepSpecifier = (path) => isBareSpecifier2(path) && !isFrameworkSpecifier(path) && !isAbsolutePackageSpecifier(path), isFrameworkRootCandidate = (path) => isBareSpecifier2(path) && isFrameworkSpecifier(path) && !isAbsolutePackageSpecifier(path), readFileSpecifiers = async (file4, transpiler6) => {
27965
+ }, isBareSpecifier2 = (spec) => !spec.startsWith(".") && !spec.startsWith("/") && !spec.startsWith("@src/"), isAbsolutePackageSpecifier = (spec) => spec === "@absolutejs/absolute" || spec.startsWith("@absolutejs/absolute/"), FRAMEWORK_SPECIFIERS, FRAMEWORK_NAMESPACE_PREFIXES, isFrameworkSpecifier = (spec) => FRAMEWORK_SPECIFIERS.has(spec) || FRAMEWORK_NAMESPACE_PREFIXES.some((prefix) => spec.startsWith(prefix)), FRAMEWORK_EXTERNALS, isSkippedFile = (file4) => file4.includes("node_modules") || file4.includes("/build/") || file4.includes("/dist/") || file4.includes("/indexes/"), isDepSpecifier = (path) => isBareSpecifier2(path) && !isBuiltin(path) && !isFrameworkSpecifier(path) && !isAbsolutePackageSpecifier(path), isFrameworkRootCandidate = (path) => isBareSpecifier2(path) && isFrameworkSpecifier(path) && !isAbsolutePackageSpecifier(path), readFileSpecifiers = async (file4, transpiler6) => {
27950
27966
  const dep = [];
27951
27967
  const framework = [];
27952
27968
  try {
@@ -28049,6 +28065,8 @@ var toSafeFileName6 = (specifier) => {
28049
28065
  for (const child of bareImports) {
28050
28066
  if (!isBareSpecifier2(child))
28051
28067
  continue;
28068
+ if (isBuiltin(child))
28069
+ continue;
28052
28070
  if (isFrameworkSpecifier(child))
28053
28071
  continue;
28054
28072
  if (isAbsolutePackageSpecifier(child))
@@ -28681,5 +28699,5 @@ export {
28681
28699
  build
28682
28700
  };
28683
28701
 
28684
- //# debugId=2419EDD21F53931564756E2164756E21
28702
+ //# debugId=801F8C678931957464756E2164756E21
28685
28703
  //# sourceMappingURL=build.js.map