@absolutejs/absolute 0.19.0-beta.137 → 0.19.0-beta.139

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
@@ -171770,7 +171770,8 @@ var isDev, extractBuildError = (logs, pass, label, frameworkNames, isIncremental
171770
171770
  for (const srcPath of urlReferencedFiles) {
171771
171771
  const rel = relative7(projectRoot, srcPath).replace(/\\/g, "/");
171772
171772
  const name = basename5(srcPath);
171773
- const url = `/@src/${rel}`;
171773
+ const mtime = Math.round(statSync(srcPath).mtimeMs);
171774
+ const url = `/@src/${rel}?v=${mtime}`;
171774
171775
  urlFileMap.set(name, url);
171775
171776
  urlFileMap.set(name.replace(/\.tsx?$/, ".js"), url);
171776
171777
  }
@@ -172347,6 +172348,13 @@ var detectFramework = (filePath, resolved) => {
172347
172348
  }
172348
172349
  return "unknown";
172349
172350
  }, getWatchPaths = (config, resolved) => {
172351
+ const paths = [];
172352
+ const push = (base, sub) => {
172353
+ if (!base)
172354
+ return;
172355
+ const normalizedBase = normalizePath(base);
172356
+ paths.push(sub ? `${normalizedBase}/${sub}` : normalizedBase);
172357
+ };
172350
172358
  const cfg = resolved ?? {
172351
172359
  angularDir: config.angularDirectory,
172352
172360
  assetsDir: config.assetsDirectory,
@@ -172357,7 +172365,19 @@ var detectFramework = (filePath, resolved) => {
172357
172365
  svelteDir: config.svelteDirectory,
172358
172366
  vueDir: config.vueDirectory
172359
172367
  };
172360
- const allDirs = [
172368
+ push(cfg.reactDir);
172369
+ push(cfg.svelteDir);
172370
+ push(cfg.vueDir);
172371
+ push(cfg.angularDir);
172372
+ push(cfg.htmlDir, "pages");
172373
+ push(cfg.htmlDir, "scripts");
172374
+ push(cfg.htmlDir, "styles");
172375
+ push(cfg.htmxDir, "pages");
172376
+ push(cfg.htmxDir, "scripts");
172377
+ push(cfg.htmxDir, "styles");
172378
+ push(cfg.assetsDir);
172379
+ push(cfg.stylesDir);
172380
+ const frameworkDirs = [
172361
172381
  cfg.reactDir,
172362
172382
  cfg.svelteDir,
172363
172383
  cfg.vueDir,
@@ -172367,10 +172387,23 @@ var detectFramework = (filePath, resolved) => {
172367
172387
  cfg.assetsDir,
172368
172388
  cfg.stylesDir
172369
172389
  ].filter((d) => Boolean(d)).map(normalizePath);
172370
- const root = commonAncestor(allDirs);
172371
- if (root)
172372
- return [root];
172373
- return allDirs;
172390
+ const root = commonAncestor(frameworkDirs);
172391
+ if (root) {
172392
+ try {
172393
+ const { readdirSync } = __require("fs");
172394
+ const entries = readdirSync(root, { withFileTypes: true });
172395
+ const knownDirs = new Set(frameworkDirs.map((d) => d.split("/").pop()));
172396
+ knownDirs.add("build");
172397
+ knownDirs.add("node_modules");
172398
+ knownDirs.add(".absolutejs");
172399
+ for (const entry of entries) {
172400
+ if (entry.isDirectory() && !knownDirs.has(entry.name)) {
172401
+ push(`${root}/${entry.name}`);
172402
+ }
172403
+ }
172404
+ } catch {}
172405
+ }
172406
+ return paths;
172374
172407
  }, shouldIgnorePath = (path, resolved) => {
172375
172408
  const normalizedPath = path.replace(/\\/g, "/");
172376
172409
  if (resolved?.stylesDir && normalizedPath.startsWith(resolved.stylesDir)) {
@@ -205696,5 +205729,5 @@ export {
205696
205729
  ANGULAR_INIT_TIMEOUT_MS
205697
205730
  };
205698
205731
 
205699
- //# debugId=5905CCFFB6F2EC1864756E2164756E21
205732
+ //# debugId=D34AAE4210EFC86A64756E2164756E21
205700
205733
  //# sourceMappingURL=index.js.map