@stacksjs/buddy 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.
@@ -242,6 +242,13 @@ async function unvendorFramework(force) {
242
242
  repointWorkspaceRanges(rootPkg);
243
243
  if (!rootPkg.dependencies?.[depName] && !rootPkg.devDependencies?.[depName])
244
244
  rootPkg.dependencies = { ...rootPkg.dependencies, [depName]: range };
245
+ let rewrittenScripts = 0;
246
+ for (const [name, script] of Object.entries(rootPkg.scripts ?? {})) {
247
+ if (!/storage\/framework\/core\/buddy\/src\/cli\.ts/.test(script))
248
+ continue;
249
+ rootPkg.scripts[name] = script.replace(/\bbunx?\s+(?:--bun\s+)?\.?\/?storage\/framework\/core\/buddy\/src\/cli\.ts/g, "./buddy");
250
+ rewrittenScripts++;
251
+ }
245
252
  if (Array.isArray(rootPkg.workspaces)) {
246
253
  rootPkg.workspaces = rootPkg.workspaces.filter((glob) => !isCoreWorkspaceGlob(glob));
247
254
  if (rootPkg.workspaces.length === 0)
@@ -271,6 +278,8 @@ async function unvendorFramework(force) {
271
278
  log.info(`package.json now depends on ${depName}@${range}`);
272
279
  if (repointed > 0)
273
280
  log.info(`Repointed ${repointed} workspace: range${repointed === 1 ? "" : "s"} to ${range}`);
281
+ if (rewrittenScripts > 0)
282
+ log.info(`Repointed ${rewrittenScripts} package.json script${rewrittenScripts === 1 ? "" : "s"} to ./buddy`);
274
283
  if (rewrittenPreloads > 0)
275
284
  log.info(`Rewrote ${rewrittenPreloads} bunfig.toml preload path${rewrittenPreloads === 1 ? "" : "s"} to package specifiers`);
276
285
  log.info("Installing the published packages...");
@@ -39,13 +39,23 @@ export function resolveUserPartialsPath(cwd = process.cwd(), configuredDir) {
39
39
  if (configured)
40
40
  return configured;
41
41
  }
42
- const relative = [
42
+ const existing = [
43
43
  "resources/partials",
44
44
  "resources/views/partials",
45
45
  "partials",
46
46
  "resources/components"
47
- ].find((candidate) => existsSync(join(cwd, candidate)));
48
- return relative ? join(cwd, relative) : void 0;
47
+ ].filter((candidate) => existsSync(join(cwd, candidate)));
48
+ if (existing.length === 0)
49
+ return;
50
+ const populated = existing.find((candidate) => containsTemplates(join(cwd, candidate)));
51
+ return join(cwd, populated ?? existing[0]);
52
+ }
53
+ function containsTemplates(dir) {
54
+ try {
55
+ return [...new Bun.Glob("**/*.stx").scanSync({ cwd: dir, onlyFiles: !0 })].length > 0;
56
+ } catch {
57
+ return !1;
58
+ }
49
59
  }
50
60
  export async function loadStxPartialsDir(cwd = process.cwd()) {
51
61
  const configPath = join(cwd, "config/stx.ts");
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@stacksjs/buddy",
3
3
  "type": "module",
4
4
  "sideEffects": false,
5
- "version": "0.70.176",
5
+ "version": "0.70.178",
6
6
  "description": "Meet Buddy. The Stacks runtime.",
7
7
  "author": "Chris Breuer",
8
8
  "contributors": [
@@ -91,52 +91,52 @@
91
91
  "prepublishOnly": "bun run build"
92
92
  },
93
93
  "dependencies": {
94
- "@stacksjs/actions": "^0.70.176",
95
- "@stacksjs/ai": "^0.70.176",
96
- "@stacksjs/alias": "^0.70.176",
97
- "@stacksjs/arrays": "^0.70.176",
98
- "@stacksjs/auth": "^0.70.176",
99
- "@stacksjs/build": "^0.70.176",
100
- "@stacksjs/cache": "^0.70.176",
101
- "@stacksjs/cli": "^0.70.176",
94
+ "@stacksjs/actions": "^0.70.178",
95
+ "@stacksjs/ai": "^0.70.178",
96
+ "@stacksjs/alias": "^0.70.178",
97
+ "@stacksjs/arrays": "^0.70.178",
98
+ "@stacksjs/auth": "^0.70.178",
99
+ "@stacksjs/build": "^0.70.178",
100
+ "@stacksjs/cache": "^0.70.178",
101
+ "@stacksjs/cli": "^0.70.178",
102
102
  "@stacksjs/clapp": "^0.2.12",
103
- "@stacksjs/cloud": "^0.70.176",
104
- "@stacksjs/collections": "^0.70.176",
105
- "@stacksjs/config": "^0.70.176",
106
- "@stacksjs/database": "^0.70.176",
107
- "@stacksjs/desktop": "^0.70.176",
108
- "@stacksjs/dns": "^0.70.176",
109
- "@stacksjs/email": "^0.70.176",
110
- "@stacksjs/enums": "^0.70.176",
111
- "@stacksjs/error-handling": "^0.70.176",
112
- "@stacksjs/events": "^0.70.176",
113
- "@stacksjs/git": "^0.70.176",
103
+ "@stacksjs/cloud": "^0.70.178",
104
+ "@stacksjs/collections": "^0.70.178",
105
+ "@stacksjs/config": "^0.70.178",
106
+ "@stacksjs/database": "^0.70.178",
107
+ "@stacksjs/desktop": "^0.70.178",
108
+ "@stacksjs/dns": "^0.70.178",
109
+ "@stacksjs/email": "^0.70.178",
110
+ "@stacksjs/enums": "^0.70.178",
111
+ "@stacksjs/error-handling": "^0.70.178",
112
+ "@stacksjs/events": "^0.70.178",
113
+ "@stacksjs/git": "^0.70.178",
114
114
  "@stacksjs/gitit": "^0.2.5",
115
- "@stacksjs/health": "^0.70.176",
115
+ "@stacksjs/health": "^0.70.178",
116
116
  "@stacksjs/dnsx": "^0.2.3",
117
117
  "@stacksjs/httx": "^0.1.10",
118
- "@stacksjs/lint": "^0.70.176",
119
- "@stacksjs/logging": "^0.70.176",
120
- "@stacksjs/notifications": "^0.70.176",
121
- "@stacksjs/objects": "^0.70.176",
122
- "@stacksjs/orm": "^0.70.176",
123
- "@stacksjs/path": "^0.70.176",
124
- "@stacksjs/skills": "^0.70.176",
125
- "@stacksjs/payments": "^0.70.176",
126
- "@stacksjs/realtime": "^0.70.176",
127
- "@stacksjs/router": "^0.70.176",
118
+ "@stacksjs/lint": "^0.70.178",
119
+ "@stacksjs/logging": "^0.70.178",
120
+ "@stacksjs/notifications": "^0.70.178",
121
+ "@stacksjs/objects": "^0.70.178",
122
+ "@stacksjs/orm": "^0.70.178",
123
+ "@stacksjs/path": "^0.70.178",
124
+ "@stacksjs/skills": "^0.70.178",
125
+ "@stacksjs/payments": "^0.70.178",
126
+ "@stacksjs/realtime": "^0.70.178",
127
+ "@stacksjs/router": "^0.70.178",
128
128
  "@stacksjs/rpx": "^0.11.31",
129
- "@stacksjs/search-engine": "^0.70.176",
130
- "@stacksjs/security": "^0.70.176",
131
- "@stacksjs/server": "^0.70.176",
132
- "@stacksjs/storage": "^0.70.176",
133
- "@stacksjs/strings": "^0.70.176",
134
- "@stacksjs/testing": "^0.70.176",
135
- "@stacksjs/tunnel": "^0.70.176",
136
- "@stacksjs/types": "^0.70.176",
137
- "@stacksjs/ui": "^0.70.176",
138
- "@stacksjs/utils": "^0.70.176",
139
- "@stacksjs/validation": "^0.70.176",
129
+ "@stacksjs/search-engine": "^0.70.178",
130
+ "@stacksjs/security": "^0.70.178",
131
+ "@stacksjs/server": "^0.70.178",
132
+ "@stacksjs/storage": "^0.70.178",
133
+ "@stacksjs/strings": "^0.70.178",
134
+ "@stacksjs/testing": "^0.70.178",
135
+ "@stacksjs/tunnel": "^0.70.178",
136
+ "@stacksjs/types": "^0.70.178",
137
+ "@stacksjs/ui": "^0.70.178",
138
+ "@stacksjs/utils": "^0.70.178",
139
+ "@stacksjs/validation": "^0.70.178",
140
140
  "@stacksjs/ts-cloud": "^0.7.60",
141
141
  "ajv": "^8.20.0",
142
142
  "ajv-formats": "^3.0.1"