@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.
@@ -3885,7 +3885,16 @@ ${fields}
3885
3885
  ].join(", ")}`);
3886
3886
  }
3887
3887
  const original = await fs.readFile(rawServerFile, "utf-8");
3888
- const componentClassName = `${toPascal(fileBase)}Component`;
3888
+ const detectExportedComponentClass = (source, fallback) => {
3889
+ const defaultMatch = source.match(/export\s+default\s+([A-Za-z_$][\w$]*)\s*;/);
3890
+ if (defaultMatch)
3891
+ return defaultMatch[1];
3892
+ const exportClassMatch = source.match(/export\s+(?:default\s+)?class\s+([A-Za-z_$][\w$]*)/);
3893
+ if (exportClassMatch)
3894
+ return exportClassMatch[1];
3895
+ return fallback;
3896
+ };
3897
+ const componentClassName = detectExportedComponentClass(original, `${toPascal(fileBase)}Component`);
3889
3898
  const serverContentHash = Bun.hash(original).toString(BASE_36_RADIX);
3890
3899
  const cachedWrapper = wrapperOutputCache.get(resolvedEntry);
3891
3900
  const clientFile = join5(indexesDir, jsName);
@@ -5059,5 +5068,5 @@ export {
5059
5068
  handleAngularPageRequest
5060
5069
  };
5061
5070
 
5062
- //# debugId=3CFD68838FF9376C64756E2164756E21
5071
+ //# debugId=576B32CF1EBCA47264756E2164756E21
5063
5072
  //# sourceMappingURL=server.js.map