@stacksjs/actions 0.70.176 → 0.70.178

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.
Files changed (2) hide show
  1. package/dist/dev/views.js +13 -3
  2. package/package.json +17 -17
package/dist/dev/views.js CHANGED
@@ -106,10 +106,20 @@ async function startDefaultServer() {
106
106
  });
107
107
  }
108
108
  async function firstExistingPath(candidates) {
109
- for (const candidate of candidates)
110
- if (existsSync(projectPath(candidate)))
109
+ const existing = candidates.filter((candidate) => existsSync(projectPath(candidate)));
110
+ if (existing.length === 0)
111
+ return null;
112
+ for (const candidate of existing)
113
+ if (containsTemplates(projectPath(candidate)))
111
114
  return candidate;
112
- return null;
115
+ return existing[0];
116
+ }
117
+ function containsTemplates(dir) {
118
+ try {
119
+ return [...new Bun.Glob("**/*.stx").scanSync({ cwd: dir, onlyFiles: !0 })].length > 0;
120
+ } catch {
121
+ return !1;
122
+ }
113
123
  }
114
124
  function fallbackI18nFromSite(site) {
115
125
  const locales = site.i18n.locales, defaultLocale = site.i18n.defaultLocale ?? locales[0];
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@stacksjs/actions",
3
3
  "type": "module",
4
4
  "sideEffects": false,
5
- "version": "0.70.176",
5
+ "version": "0.70.178",
6
6
  "description": "The Stacks actions.",
7
7
  "author": "Chris Breuer",
8
8
  "contributors": [
@@ -62,31 +62,31 @@
62
62
  "prepublishOnly": "bun run build"
63
63
  },
64
64
  "dependencies": {
65
- "@stacksjs/config": "0.70.176",
65
+ "@stacksjs/config": "0.70.178",
66
66
  "@stacksjs/bumpx": "^0.2.6",
67
67
  "@stacksjs/bunpress": "^0.1.18",
68
68
  "@stacksjs/logsmith": "^0.2.3",
69
- "@stacksjs/registry": "0.70.176",
69
+ "@stacksjs/registry": "0.70.178",
70
70
  "@stacksjs/ts-cloud": "^0.7.60",
71
71
  "@stacksjs/ts-md": "^0.1.1"
72
72
  },
73
73
  "devDependencies": {
74
- "@stacksjs/api": "0.70.176",
75
- "@stacksjs/cli": "0.70.176",
76
- "@stacksjs/database": "0.70.176",
74
+ "@stacksjs/api": "0.70.178",
75
+ "@stacksjs/cli": "0.70.178",
76
+ "@stacksjs/database": "0.70.178",
77
77
  "@stacksjs/tlsx": "^0.13.2",
78
78
  "better-dx": "^0.2.17",
79
- "@stacksjs/dns": "0.70.176",
80
- "@stacksjs/enums": "0.70.176",
81
- "@stacksjs/env": "0.70.176",
82
- "@stacksjs/error-handling": "0.70.176",
83
- "@stacksjs/logging": "0.70.176",
84
- "@stacksjs/path": "0.70.176",
85
- "@stacksjs/security": "0.70.176",
86
- "@stacksjs/storage": "0.70.176",
87
- "@stacksjs/strings": "0.70.176",
88
- "@stacksjs/utils": "0.70.176",
89
- "@stacksjs/validation": "0.70.176"
79
+ "@stacksjs/dns": "0.70.178",
80
+ "@stacksjs/enums": "0.70.178",
81
+ "@stacksjs/env": "0.70.178",
82
+ "@stacksjs/error-handling": "0.70.178",
83
+ "@stacksjs/logging": "0.70.178",
84
+ "@stacksjs/path": "0.70.178",
85
+ "@stacksjs/security": "0.70.178",
86
+ "@stacksjs/storage": "0.70.178",
87
+ "@stacksjs/strings": "0.70.178",
88
+ "@stacksjs/utils": "0.70.178",
89
+ "@stacksjs/validation": "0.70.178"
90
90
  },
91
91
  "peerDependencies": {
92
92
  "pickier": "^0.1.35"