@absolutejs/absolute 0.19.0-beta.717 → 0.19.0-beta.719

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/index.js CHANGED
@@ -44356,7 +44356,16 @@ ${fields}
44356
44356
  ].join(", ")}`);
44357
44357
  }
44358
44358
  const original = await fs2.readFile(rawServerFile, "utf-8");
44359
- const componentClassName = `${toPascal(fileBase)}Component`;
44359
+ const detectExportedComponentClass = (source, fallback) => {
44360
+ const defaultMatch = source.match(/export\s+default\s+([A-Za-z_$][\w$]*)\s*;/);
44361
+ if (defaultMatch)
44362
+ return defaultMatch[1];
44363
+ const exportClassMatch = source.match(/export\s+(?:default\s+)?class\s+([A-Za-z_$][\w$]*)/);
44364
+ if (exportClassMatch)
44365
+ return exportClassMatch[1];
44366
+ return fallback;
44367
+ };
44368
+ const componentClassName = detectExportedComponentClass(original, `${toPascal(fileBase)}Component`);
44360
44369
  const serverContentHash = Bun.hash(original).toString(BASE_36_RADIX);
44361
44370
  const cachedWrapper = wrapperOutputCache.get(resolvedEntry);
44362
44371
  const clientFile = join15(indexesDir, jsName);
@@ -49511,7 +49520,7 @@ __export(exports_devBuild, {
49511
49520
  });
49512
49521
  import { readdir as readdir4 } from "fs/promises";
49513
49522
  import { statSync as statSync3 } from "fs";
49514
- import { dirname as dirname15, resolve as resolve34 } from "path";
49523
+ import { resolve as resolve34 } from "path";
49515
49524
  var FRAMEWORK_DIR_KEYS, collectDepVendorSourceDirs = (config) => {
49516
49525
  const configuredDirs = [
49517
49526
  config.reactDirectory,
@@ -49521,7 +49530,7 @@ var FRAMEWORK_DIR_KEYS, collectDepVendorSourceDirs = (config) => {
49521
49530
  config.htmlDirectory,
49522
49531
  config.htmxDirectory
49523
49532
  ].filter((dir) => Boolean(dir));
49524
- return Array.from(new Set(configuredDirs.flatMap((dir) => [dir, dirname15(dir)])));
49533
+ return Array.from(new Set(configuredDirs));
49525
49534
  }, parseDirectoryConfig = (source) => {
49526
49535
  const config = {};
49527
49536
  const dirPattern = /(\w+Directory)\s*:\s*['"]([^'"]+)['"]/g;
@@ -49956,7 +49965,7 @@ __export(exports_devtoolsJson, {
49956
49965
  devtoolsJson: () => devtoolsJson
49957
49966
  });
49958
49967
  import { existsSync as existsSync23, mkdirSync as mkdirSync12, readFileSync as readFileSync15, writeFileSync as writeFileSync8 } from "fs";
49959
- import { dirname as dirname16, join as join23, resolve as resolve35 } from "path";
49968
+ import { dirname as dirname15, join as join23, resolve as resolve35 } from "path";
49960
49969
  import { Elysia as Elysia3 } from "elysia";
49961
49970
  var ENDPOINT = "/.well-known/appspecific/com.chrome.devtools.json", UUID_CACHE_KEY = "__absoluteDevtoolsWorkspaceUuid", getGlobalUuid = () => Reflect.get(globalThis, UUID_CACHE_KEY), setGlobalUuid = (uuid) => {
49962
49971
  Reflect.set(globalThis, UUID_CACHE_KEY, uuid);
@@ -49983,7 +49992,7 @@ var ENDPOINT = "/.well-known/appspecific/com.chrome.devtools.json", UUID_CACHE_K
49983
49992
  if (cachedUuid)
49984
49993
  return setGlobalUuid(cachedUuid);
49985
49994
  const uuid = crypto.randomUUID();
49986
- mkdirSync12(dirname16(cachePath), { recursive: true });
49995
+ mkdirSync12(dirname15(cachePath), { recursive: true });
49987
49996
  writeFileSync8(cachePath, uuid, "utf-8");
49988
49997
  return setGlobalUuid(uuid);
49989
49998
  }, devtoolsJson = (buildDir, options = {}) => {
@@ -58223,5 +58232,5 @@ export {
58223
58232
  ANGULAR_INIT_TIMEOUT_MS
58224
58233
  };
58225
58234
 
58226
- //# debugId=FF8AF8196AA3C44A64756E2164756E21
58235
+ //# debugId=CA1DDD070BD3429564756E2164756E21
58227
58236
  //# sourceMappingURL=index.js.map