@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/build.js CHANGED
@@ -171691,7 +171691,8 @@ var isDev, extractBuildError = (logs, pass, label, frameworkNames, isIncremental
171691
171691
  for (const srcPath of urlReferencedFiles) {
171692
171692
  const rel = relative7(projectRoot, srcPath).replace(/\\/g, "/");
171693
171693
  const name = basename5(srcPath);
171694
- const url = `/@src/${rel}`;
171694
+ const mtime = Math.round(statSync(srcPath).mtimeMs);
171695
+ const url = `/@src/${rel}?v=${mtime}`;
171695
171696
  urlFileMap.set(name, url);
171696
171697
  urlFileMap.set(name.replace(/\.tsx?$/, ".js"), url);
171697
171698
  }
@@ -172268,6 +172269,13 @@ var detectFramework = (filePath, resolved) => {
172268
172269
  }
172269
172270
  return "unknown";
172270
172271
  }, getWatchPaths = (config, resolved) => {
172272
+ const paths = [];
172273
+ const push = (base, sub) => {
172274
+ if (!base)
172275
+ return;
172276
+ const normalizedBase = normalizePath(base);
172277
+ paths.push(sub ? `${normalizedBase}/${sub}` : normalizedBase);
172278
+ };
172271
172279
  const cfg = resolved ?? {
172272
172280
  angularDir: config.angularDirectory,
172273
172281
  assetsDir: config.assetsDirectory,
@@ -172278,7 +172286,19 @@ var detectFramework = (filePath, resolved) => {
172278
172286
  svelteDir: config.svelteDirectory,
172279
172287
  vueDir: config.vueDirectory
172280
172288
  };
172281
- const allDirs = [
172289
+ push(cfg.reactDir);
172290
+ push(cfg.svelteDir);
172291
+ push(cfg.vueDir);
172292
+ push(cfg.angularDir);
172293
+ push(cfg.htmlDir, "pages");
172294
+ push(cfg.htmlDir, "scripts");
172295
+ push(cfg.htmlDir, "styles");
172296
+ push(cfg.htmxDir, "pages");
172297
+ push(cfg.htmxDir, "scripts");
172298
+ push(cfg.htmxDir, "styles");
172299
+ push(cfg.assetsDir);
172300
+ push(cfg.stylesDir);
172301
+ const frameworkDirs = [
172282
172302
  cfg.reactDir,
172283
172303
  cfg.svelteDir,
172284
172304
  cfg.vueDir,
@@ -172288,10 +172308,23 @@ var detectFramework = (filePath, resolved) => {
172288
172308
  cfg.assetsDir,
172289
172309
  cfg.stylesDir
172290
172310
  ].filter((d) => Boolean(d)).map(normalizePath);
172291
- const root = commonAncestor(allDirs);
172292
- if (root)
172293
- return [root];
172294
- return allDirs;
172311
+ const root = commonAncestor(frameworkDirs);
172312
+ if (root) {
172313
+ try {
172314
+ const { readdirSync } = __require("fs");
172315
+ const entries = readdirSync(root, { withFileTypes: true });
172316
+ const knownDirs = new Set(frameworkDirs.map((d) => d.split("/").pop()));
172317
+ knownDirs.add("build");
172318
+ knownDirs.add("node_modules");
172319
+ knownDirs.add(".absolutejs");
172320
+ for (const entry of entries) {
172321
+ if (entry.isDirectory() && !knownDirs.has(entry.name)) {
172322
+ push(`${root}/${entry.name}`);
172323
+ }
172324
+ }
172325
+ } catch {}
172326
+ }
172327
+ return paths;
172295
172328
  }, shouldIgnorePath = (path, resolved) => {
172296
172329
  const normalizedPath = path.replace(/\\/g, "/");
172297
172330
  if (resolved?.stylesDir && normalizedPath.startsWith(resolved.stylesDir)) {
@@ -205034,5 +205067,5 @@ export {
205034
205067
  build
205035
205068
  };
205036
205069
 
205037
- //# debugId=DF6C903EF35751CA64756E2164756E21
205070
+ //# debugId=4912C25A26BF141964756E2164756E21
205038
205071
  //# sourceMappingURL=build.js.map