@absolutejs/absolute 0.19.0-beta.138 → 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
@@ -172348,6 +172348,13 @@ var detectFramework = (filePath, resolved) => {
172348
172348
  }
172349
172349
  return "unknown";
172350
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
+ };
172351
172358
  const cfg = resolved ?? {
172352
172359
  angularDir: config.angularDirectory,
172353
172360
  assetsDir: config.assetsDirectory,
@@ -172358,7 +172365,19 @@ var detectFramework = (filePath, resolved) => {
172358
172365
  svelteDir: config.svelteDirectory,
172359
172366
  vueDir: config.vueDirectory
172360
172367
  };
172361
- 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 = [
172362
172381
  cfg.reactDir,
172363
172382
  cfg.svelteDir,
172364
172383
  cfg.vueDir,
@@ -172368,10 +172387,23 @@ var detectFramework = (filePath, resolved) => {
172368
172387
  cfg.assetsDir,
172369
172388
  cfg.stylesDir
172370
172389
  ].filter((d) => Boolean(d)).map(normalizePath);
172371
- const root = commonAncestor(allDirs);
172372
- if (root)
172373
- return [root];
172374
- 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;
172375
172407
  }, shouldIgnorePath = (path, resolved) => {
172376
172408
  const normalizedPath = path.replace(/\\/g, "/");
172377
172409
  if (resolved?.stylesDir && normalizedPath.startsWith(resolved.stylesDir)) {
@@ -205697,5 +205729,5 @@ export {
205697
205729
  ANGULAR_INIT_TIMEOUT_MS
205698
205730
  };
205699
205731
 
205700
- //# debugId=6D3618035AB14BCF64756E2164756E21
205732
+ //# debugId=D34AAE4210EFC86A64756E2164756E21
205701
205733
  //# sourceMappingURL=index.js.map