@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/build.js CHANGED
@@ -172269,6 +172269,13 @@ var detectFramework = (filePath, resolved) => {
172269
172269
  }
172270
172270
  return "unknown";
172271
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
+ };
172272
172279
  const cfg = resolved ?? {
172273
172280
  angularDir: config.angularDirectory,
172274
172281
  assetsDir: config.assetsDirectory,
@@ -172279,7 +172286,19 @@ var detectFramework = (filePath, resolved) => {
172279
172286
  svelteDir: config.svelteDirectory,
172280
172287
  vueDir: config.vueDirectory
172281
172288
  };
172282
- 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 = [
172283
172302
  cfg.reactDir,
172284
172303
  cfg.svelteDir,
172285
172304
  cfg.vueDir,
@@ -172289,10 +172308,23 @@ var detectFramework = (filePath, resolved) => {
172289
172308
  cfg.assetsDir,
172290
172309
  cfg.stylesDir
172291
172310
  ].filter((d) => Boolean(d)).map(normalizePath);
172292
- const root = commonAncestor(allDirs);
172293
- if (root)
172294
- return [root];
172295
- 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;
172296
172328
  }, shouldIgnorePath = (path, resolved) => {
172297
172329
  const normalizedPath = path.replace(/\\/g, "/");
172298
172330
  if (resolved?.stylesDir && normalizedPath.startsWith(resolved.stylesDir)) {
@@ -205035,5 +205067,5 @@ export {
205035
205067
  build
205036
205068
  };
205037
205069
 
205038
- //# debugId=DAD6FA92E2A0407064756E2164756E21
205070
+ //# debugId=4912C25A26BF141964756E2164756E21
205039
205071
  //# sourceMappingURL=build.js.map