@stacksjs/buddy 0.70.258 → 0.70.259

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 (112) hide show
  1. package/dist/cli.d.ts +11 -1
  2. package/dist/cli.js +5 -164
  3. package/dist/commands/about.js +1 -35
  4. package/dist/commands/add.js +1 -25
  5. package/dist/commands/ai-context.js +4 -27
  6. package/dist/commands/auth.js +1 -68
  7. package/dist/commands/build.js +1 -221
  8. package/dist/commands/cd.js +8 -39
  9. package/dist/commands/changelog.js +1 -32
  10. package/dist/commands/clean.js +1 -44
  11. package/dist/commands/cloud.js +2 -519
  12. package/dist/commands/commit.js +1 -16
  13. package/dist/commands/completion.js +6 -42
  14. package/dist/commands/config-migrate.js +6 -94
  15. package/dist/commands/configure.js +2 -45
  16. package/dist/commands/create.js +1 -162
  17. package/dist/commands/deploy.js +13 -1676
  18. package/dist/commands/desktop-apple.js +12 -399
  19. package/dist/commands/dev.js +6 -1083
  20. package/dist/commands/dns.js +3 -103
  21. package/dist/commands/docs/buddy-commands.js +10 -132
  22. package/dist/commands/docs/buddy-commands.test.js +1 -38
  23. package/dist/commands/docs/framework-repo.js +1 -14
  24. package/dist/commands/docs/framework-repo.test.js +1 -68
  25. package/dist/commands/docs/generated-artifacts.js +3 -70
  26. package/dist/commands/docs/generated-artifacts.test.js +1 -19
  27. package/dist/commands/docs/links.js +2 -85
  28. package/dist/commands/docs/links.test.js +4 -66
  29. package/dist/commands/docs.js +1 -24
  30. package/dist/commands/doctor.js +2 -478
  31. package/dist/commands/domains.js +2 -152
  32. package/dist/commands/email.js +31 -503
  33. package/dist/commands/env.js +1 -312
  34. package/dist/commands/extension.js +1 -239
  35. package/dist/commands/features.js +9 -345
  36. package/dist/commands/fresh.js +1 -46
  37. package/dist/commands/generate.js +2 -152
  38. package/dist/commands/http.js +1 -33
  39. package/dist/commands/index.js +1 -57
  40. package/dist/commands/install.js +1 -22
  41. package/dist/commands/key.js +1 -23
  42. package/dist/commands/link.js +2 -147
  43. package/dist/commands/lint.js +2 -84
  44. package/dist/commands/list.js +1 -140
  45. package/dist/commands/mail.js +15 -1477
  46. package/dist/commands/maintenance.js +1 -141
  47. package/dist/commands/make.js +1 -392
  48. package/dist/commands/migrate-project.js +1 -49
  49. package/dist/commands/migrate.js +27 -625
  50. package/dist/commands/outdated.js +1 -19
  51. package/dist/commands/package.js +1 -17
  52. package/dist/commands/phone.js +17 -181
  53. package/dist/commands/ports.js +2 -118
  54. package/dist/commands/prepublish.js +1 -17
  55. package/dist/commands/projects.js +1 -29
  56. package/dist/commands/protocol/craft-evidence.js +4 -98
  57. package/dist/commands/protocol/craft-evidence.test.js +1 -20
  58. package/dist/commands/protocol/desktop-lifecycle-report.js +3 -57
  59. package/dist/commands/protocol/desktop-lifecycle-report.test.js +1 -32
  60. package/dist/commands/protocol/desktop-support.js +2 -32
  61. package/dist/commands/protocol/desktop-workflow.test.js +3 -35
  62. package/dist/commands/protocol/driver-registry.js +2 -71
  63. package/dist/commands/protocol/pantry-evidence.js +4 -144
  64. package/dist/commands/protocol/pantry-evidence.test.js +1 -29
  65. package/dist/commands/protocol/release-manifest.js +3 -102
  66. package/dist/commands/protocol/release-manifest.test.js +2 -34
  67. package/dist/commands/protocol/run-conformance.js +4 -346
  68. package/dist/commands/protocol/run-conformance.test.js +1 -52
  69. package/dist/commands/protocol/run-driver-contracts.js +4 -83
  70. package/dist/commands/protocol/run-driver-contracts.test.js +1 -18
  71. package/dist/commands/protocol/source-manifest.js +3 -113
  72. package/dist/commands/protocol/sync-suite.js +3 -136
  73. package/dist/commands/protocol/sync-suite.test.js +1 -44
  74. package/dist/commands/protocol.js +1 -60
  75. package/dist/commands/publish.js +8 -500
  76. package/dist/commands/queue.js +1 -248
  77. package/dist/commands/release.js +1 -42
  78. package/dist/commands/route.js +1 -21
  79. package/dist/commands/run-tool.js +1 -9
  80. package/dist/commands/saas.js +1 -25
  81. package/dist/commands/schedule.js +1 -61
  82. package/dist/commands/search.js +1 -84
  83. package/dist/commands/seed.js +1 -47
  84. package/dist/commands/serve.js +1 -55
  85. package/dist/commands/setup-ai.js +2 -121
  86. package/dist/commands/setup.js +2 -305
  87. package/dist/commands/share.js +1 -214
  88. package/dist/commands/sms.js +32 -319
  89. package/dist/commands/stacks.js +1 -72
  90. package/dist/commands/telemetry.js +1 -74
  91. package/dist/commands/test.js +1 -130
  92. package/dist/commands/tinker.js +1 -37
  93. package/dist/commands/types.js +1 -18
  94. package/dist/commands/upgrade.js +1 -98
  95. package/dist/commands/user.js +3 -84
  96. package/dist/commands/version.js +1 -14
  97. package/dist/config.js +1 -231
  98. package/dist/custom-cli.js +1 -23
  99. package/dist/database-preflight.js +1 -88
  100. package/dist/global-options.js +1 -4
  101. package/dist/index.js +1 -1
  102. package/dist/lazy-commands.js +1 -241
  103. package/dist/migrators/index.js +2 -62
  104. package/dist/migrators/laravel/index.js +1 -148
  105. package/dist/migrators/laravel/migrations.js +4 -231
  106. package/dist/migrators/laravel/models.js +8 -111
  107. package/dist/migrators/rails/index.js +1 -11
  108. package/dist/production-server.js +1 -257
  109. package/dist/project-setup.js +1 -36
  110. package/dist/serve-entry.js +1 -5
  111. package/dist/version-info.js +1 -5
  112. package/package.json +53 -46
@@ -1,257 +1 @@
1
- import { existsSync } from "node:fs";
2
- import { homedir } from "node:os";
3
- import { dirname, join } from "node:path";
4
- import process from "node:process";
5
- import { log } from "@stacksjs/logging";
6
- globalThis.requestContext = {
7
- cookie(name) {
8
- const snapshot = globalThis.__stxServeContext;
9
- if (snapshot?.cookies && name in snapshot.cookies)
10
- return snapshot.cookies[name] ?? null;
11
- return globalThis.__stxServeCookies?.[name] ?? null;
12
- },
13
- url() {
14
- const snapshot = globalThis.__stxServeContext;
15
- return snapshot?.url || snapshot?.search || globalThis.__stxServeSearch || "";
16
- },
17
- search() {
18
- return globalThis.__stxServeContext?.search ?? globalThis.__stxServeSearch ?? "";
19
- },
20
- locale() {
21
- return globalThis.__stxServeContext?.locale ?? "en";
22
- }
23
- };
24
- function parseCookies(req) {
25
- const out = {}, header = req.headers.get("cookie") || "";
26
- if (!header)
27
- return out;
28
- for (const part of header.split(";")) {
29
- const trimmed = part.trim(), eq = trimmed.indexOf("=");
30
- if (eq === -1)
31
- continue;
32
- const k = trimmed.slice(0, eq).trim(), v = trimmed.slice(eq + 1).trim();
33
- if (!k)
34
- continue;
35
- try {
36
- out[k] = decodeURIComponent(v);
37
- } catch {
38
- out[k] = v;
39
- }
40
- }
41
- return out;
42
- }
43
- export function resolveUserPartialsPath(cwd = process.cwd(), configuredDir) {
44
- if (configuredDir) {
45
- const configured = [
46
- join(cwd, "resources", configuredDir),
47
- join(cwd, configuredDir)
48
- ].find((candidate) => existsSync(candidate));
49
- if (configured)
50
- return configured;
51
- }
52
- const existing = [
53
- "resources/partials",
54
- "resources/views/partials",
55
- "partials",
56
- "resources/components"
57
- ].filter((candidate) => existsSync(join(cwd, candidate)));
58
- if (existing.length === 0)
59
- return;
60
- const populated = existing.find((candidate) => containsTemplates(join(cwd, candidate)));
61
- return join(cwd, populated ?? existing[0]);
62
- }
63
- function containsTemplates(dir) {
64
- try {
65
- return [...new Bun.Glob("**/*.stx").scanSync({ cwd: dir, onlyFiles: !0 })].length > 0;
66
- } catch {
67
- return !1;
68
- }
69
- }
70
- export async function loadStxPartialsDir(cwd = process.cwd()) {
71
- const configPath = join(cwd, "config/stx.ts");
72
- if (!existsSync(configPath))
73
- return;
74
- try {
75
- const dir = (await import(configPath)).default?.partialsDir;
76
- return typeof dir === "string" && dir.length > 0 ? dir : void 0;
77
- } catch {
78
- return;
79
- }
80
- }
81
- function resolveCsrfMiddlewarePath() {
82
- const rel = "app/Middleware/Csrf.ts", vendored = join(process.cwd(), "storage/framework/defaults", rel);
83
- if (existsSync(vendored))
84
- return vendored;
85
- try {
86
- const pkgJson = Bun.resolveSync("@stacksjs/defaults/package.json", process.cwd());
87
- return `${pkgJson.slice(0, pkgJson.lastIndexOf("/"))}/${rel}`;
88
- } catch {
89
- return vendored;
90
- }
91
- }
92
- export function resolveApiBase(configuredPort, env = process.env) {
93
- if (env.API_URL)
94
- return env.API_URL;
95
- const explicitPort = Number(env.PORT_API);
96
- if (explicitPort)
97
- return `http://127.0.0.1:${explicitPort}`;
98
- if (["production", "staging", "development"].includes((env.APP_ENV || "").toLowerCase()))
99
- return null;
100
- return `http://127.0.0.1:${configuredPort || 3008}`;
101
- }
102
- export async function startProductionServer(options) {
103
- if (options?.port)
104
- process.env.PORT = String(options.port);
105
- process.env.APP_ENV = process.env.APP_ENV || "production";
106
- const port = Number(process.env.PORT) || 3000, { config, overridesReady } = await import("@stacksjs/config");
107
- await overridesReady;
108
- const { injectGlobalAutoImports } = await import("@stacksjs/server");
109
- await injectGlobalAutoImports();
110
- let stxServe;
111
- const serveCandidates = [
112
- join(homedir(), "Code/Tools/stx/packages/bun-plugin/dist/serve.js"),
113
- join(process.cwd(), "pantry/bun-plugin-stx/dist/serve.js")
114
- ];
115
- for (const entry of serveCandidates)
116
- try {
117
- if (existsSync(entry)) {
118
- ({ serve: stxServe } = await import(entry));
119
- break;
120
- }
121
- } catch {}
122
- if (!stxServe)
123
- ({ serve: stxServe } = await import("bun-plugin-stx/serve"));
124
- const stxModule = await resolveVendoredStxModule(), { site: siteConfig, i18n: i18nConfig } = await loadStxSiteConfig(), userViewsPath = "resources/views", defaultsResources = resolveDefaultsResources(), defaultViewsPath = join(defaultsResources, "views"), userLayoutsPath = existsSync("resources/views/layouts") ? "resources/views/layouts" : "resources/layouts", userPartialsPath = resolveUserPartialsPath(process.cwd(), await loadStxPartialsDir()), apiBase = resolveApiBase(config.ports?.api);
125
- log.info(`Starting production server on port ${port}...`);
126
- await stxServe({
127
- patterns: [userViewsPath, defaultViewsPath],
128
- port,
129
- autoIncrementPort: !1,
130
- reusePort: ["production", "staging", "development"].includes((process.env.APP_ENV || "").toLowerCase()),
131
- componentsDir: join(defaultsResources, "components"),
132
- layoutsDir: userLayoutsPath,
133
- ...userPartialsPath && { partialsDir: userPartialsPath },
134
- fallbackLayoutsDir: join(defaultsResources, "layouts"),
135
- fallbackPartialsDir: defaultViewsPath,
136
- quiet: options?.verbose !== !0,
137
- ...stxModule && { stxModule },
138
- ...i18nConfig && { i18n: i18nConfig },
139
- ...siteConfig?.url && { site: siteConfig },
140
- onRequest: async (req) => {
141
- const { maintenanceGate, isApiBoundRequest, proxyToBackend } = await import("@stacksjs/server"), gated = await maintenanceGate(req);
142
- if (gated)
143
- return gated;
144
- const url = new URL(req.url);
145
- if (isApiBoundRequest(req, url.pathname)) {
146
- if (!apiBase) {
147
- log.error(`No API target configured for ${url.pathname}. This app shares its host with other ` + "deployments, so there is no safe default port to guess \u2014 refusing to proxy. Set " + "PORT_API (or API_URL) for this site, and deploy an `api` site on its own port.");
148
- return new Response("Bad Gateway", { status: 502 });
149
- }
150
- try {
151
- return await proxyToBackend(req, apiBase);
152
- } catch (error) {
153
- log.error(`API proxy to ${apiBase} failed: ${error.message}`);
154
- return new Response("Bad Gateway", { status: 502 });
155
- }
156
- }
157
- if (existsSync(join(process.cwd(), "resources/views/blog.stx"))) {
158
- const { renderBlogFeed } = await import("@stacksjs/actions/blog"), feed = await renderBlogFeed(req);
159
- if (feed)
160
- return feed;
161
- }
162
- globalThis.__stxServeSearch = url.search;
163
- globalThis.__stxServeCookies = parseCookies(req);
164
- return;
165
- },
166
- onResponse: async (req, response) => {
167
- const method = req.method.toUpperCase();
168
- if (method !== "GET" && method !== "HEAD")
169
- return;
170
- try {
171
- const { seedCsrfCookieIfMissing } = await import(resolveCsrfMiddlewarePath());
172
- return seedCsrfCookieIfMissing(req, response);
173
- } catch (error) {
174
- log.debug(`CSRF cookie seeding skipped: ${error.message}`);
175
- }
176
- }
177
- });
178
- log.success(`Production server listening on http://0.0.0.0:${port}`);
179
- }
180
- function resolveDefaultsResources() {
181
- const vendored = "storage/framework/defaults/resources";
182
- if (existsSync(vendored))
183
- return vendored;
184
- try {
185
- const pkgJson = Bun.resolveSync("@stacksjs/defaults/package.json", process.cwd());
186
- return join(dirname(pkgJson), "resources");
187
- } catch {
188
- return vendored;
189
- }
190
- }
191
- async function resolveVendoredStxModule() {
192
- const candidates = [
193
- join(homedir(), "Code/Tools/stx/packages/stx/dist/index.js"),
194
- join(process.cwd(), "pantry/@stacksjs/stx/dist/index.js")
195
- ];
196
- for (const entry of candidates)
197
- try {
198
- if (existsSync(entry))
199
- return await import(entry);
200
- } catch {}
201
- try {
202
- return await import("@stacksjs/stx");
203
- } catch {}
204
- return;
205
- }
206
- function fallbackI18nFromSite(site) {
207
- const locales = site.i18n.locales, defaultLocale = site.i18n.defaultLocale ?? locales[0];
208
- return {
209
- locales,
210
- defaultLocale,
211
- labels: site.i18n.labels ?? Object.fromEntries(locales.map((c) => [c, c.toUpperCase()])),
212
- translations: {},
213
- pickerSelector: site.i18n.pickerSelector ?? "#lang-picker"
214
- };
215
- }
216
- async function resolveSiteI18n(site) {
217
- const resolverPaths = [
218
- join(homedir(), "Code/Tools/stx/packages/stx/src/site-builder/i18n.ts"),
219
- join(homedir(), "Code/Tools/stx/packages/stx/dist/index.js"),
220
- join(process.cwd(), "pantry/@stacksjs/stx/dist/index.js")
221
- ];
222
- for (const resolverPath of resolverPaths)
223
- try {
224
- if (!existsSync(resolverPath))
225
- continue;
226
- const resolved = await import(resolverPath);
227
- if (typeof resolved.resolveI18n !== "function")
228
- continue;
229
- const i18n = resolved.resolveI18n(site, process.cwd());
230
- if (i18n)
231
- return i18n;
232
- } catch {}
233
- try {
234
- const resolved = await import("@stacksjs/stx");
235
- if (typeof resolved.resolveI18n === "function") {
236
- const i18n = resolved.resolveI18n(site, process.cwd());
237
- if (i18n)
238
- return i18n;
239
- }
240
- } catch {}
241
- return fallbackI18nFromSite(site);
242
- }
243
- async function loadStxSiteConfig() {
244
- const sitePath = join(process.cwd(), "site.config.ts");
245
- if (!existsSync(sitePath))
246
- return {};
247
- try {
248
- const site = (await import(sitePath)).default;
249
- if (!site)
250
- return {};
251
- if (!site.i18n)
252
- return { site };
253
- const i18n = await resolveSiteI18n(site);
254
- return { site, i18n };
255
- } catch {}
256
- return {};
257
- }
1
+ import{existsSync}from"node:fs";import{homedir}from"node:os";import{dirname,join}from"node:path";import process from"node:process";import{log}from"@stacksjs/logging";globalThis.requestContext={cookie(name){const snapshot=globalThis.__stxServeContext;if(snapshot?.cookies&&name in snapshot.cookies)return snapshot.cookies[name]??null;return globalThis.__stxServeCookies?.[name]??null},url(){const snapshot=globalThis.__stxServeContext;return snapshot?.url||snapshot?.search||globalThis.__stxServeSearch||""},search(){return globalThis.__stxServeContext?.search??globalThis.__stxServeSearch??""},locale(){return globalThis.__stxServeContext?.locale??"en"}};function parseCookies(req){const out={},header=req.headers.get("cookie")||"";if(!header)return out;for(const part of header.split(";")){const trimmed=part.trim(),eq=trimmed.indexOf("=");if(eq===-1)continue;const k=trimmed.slice(0,eq).trim(),v=trimmed.slice(eq+1).trim();if(!k)continue;try{out[k]=decodeURIComponent(v)}catch{out[k]=v}}return out}export function resolveUserPartialsPath(cwd=process.cwd(),configuredDir){if(configuredDir){const configured=[join(cwd,"resources",configuredDir),join(cwd,configuredDir)].find((candidate)=>existsSync(candidate));if(configured)return configured}const existing=["resources/partials","resources/views/partials","partials","resources/components"].filter((candidate)=>existsSync(join(cwd,candidate)));if(existing.length===0)return;const populated=existing.find((candidate)=>containsTemplates(join(cwd,candidate)));return join(cwd,populated??existing[0])}function containsTemplates(dir){try{return[...new Bun.Glob("**/*.stx").scanSync({cwd:dir,onlyFiles:!0})].length>0}catch{return!1}}export async function loadStxPartialsDir(cwd=process.cwd()){const configPath=join(cwd,"config/stx.ts");if(!existsSync(configPath))return;try{const dir=(await import(configPath)).default?.partialsDir;return typeof dir==="string"&&dir.length>0?dir:void 0}catch{return}}function resolveCsrfMiddlewarePath(){const rel="app/Middleware/Csrf.ts",vendored=join(process.cwd(),"storage/framework/defaults",rel);if(existsSync(vendored))return vendored;try{const pkgJson=Bun.resolveSync("@stacksjs/defaults/package.json",process.cwd());return`${pkgJson.slice(0,pkgJson.lastIndexOf("/"))}/${rel}`}catch{return vendored}}export function resolveApiBase(configuredPort,env=process.env){if(env.API_URL)return env.API_URL;const explicitPort=Number(env.PORT_API);if(explicitPort)return`http://127.0.0.1:${explicitPort}`;if(["production","staging","development"].includes((env.APP_ENV||"").toLowerCase()))return null;return`http://127.0.0.1:${configuredPort||3008}`}export async function startProductionServer(options){if(options?.port)process.env.PORT=String(options.port);process.env.APP_ENV=process.env.APP_ENV||"production";const port=Number(process.env.PORT)||3000,{config,overridesReady}=await import("@stacksjs/config");await overridesReady;const{injectGlobalAutoImports}=await import("@stacksjs/server");await injectGlobalAutoImports();let stxServe;const serveCandidates=[join(homedir(),"Code/Tools/stx/packages/bun-plugin/dist/serve.js"),join(process.cwd(),"pantry/bun-plugin-stx/dist/serve.js")];for(const entry of serveCandidates)try{if(existsSync(entry)){({serve:stxServe}=await import(entry));break}}catch{}if(!stxServe)({serve:stxServe}=await import("bun-plugin-stx/serve"));const stxModule=await resolveVendoredStxModule(),{site:siteConfig,i18n:i18nConfig}=await loadStxSiteConfig(),userViewsPath="resources/views",defaultsResources=resolveDefaultsResources(),defaultViewsPath=join(defaultsResources,"views"),userLayoutsPath=existsSync("resources/views/layouts")?"resources/views/layouts":"resources/layouts",userPartialsPath=resolveUserPartialsPath(process.cwd(),await loadStxPartialsDir()),apiBase=resolveApiBase(config.ports?.api);log.info(`Starting production server on port ${port}...`);await stxServe({patterns:[userViewsPath,defaultViewsPath],port,autoIncrementPort:!1,reusePort:["production","staging","development"].includes((process.env.APP_ENV||"").toLowerCase()),componentsDir:join(defaultsResources,"components"),layoutsDir:userLayoutsPath,...userPartialsPath&&{partialsDir:userPartialsPath},fallbackLayoutsDir:join(defaultsResources,"layouts"),fallbackPartialsDir:defaultViewsPath,quiet:options?.verbose!==!0,...stxModule&&{stxModule},...i18nConfig&&{i18n:i18nConfig},...siteConfig?.url&&{site:siteConfig},onRequest:async(req)=>{const{maintenanceGate,isApiBoundRequest,proxyToBackend}=await import("@stacksjs/server"),gated=await maintenanceGate(req);if(gated)return gated;const url=new URL(req.url);if(isApiBoundRequest(req,url.pathname)){if(!apiBase){log.error(`No API target configured for ${url.pathname}. This app shares its host with other `+"deployments, so there is no safe default port to guess \u2014 refusing to proxy. Set "+"PORT_API (or API_URL) for this site, and deploy an `api` site on its own port.");return new Response("Bad Gateway",{status:502})}try{return await proxyToBackend(req,apiBase)}catch(error){log.error(`API proxy to ${apiBase} failed: ${error.message}`);return new Response("Bad Gateway",{status:502})}}if(existsSync(join(process.cwd(),"resources/views/blog.stx"))){const{renderBlogFeed}=await import("@stacksjs/actions/blog"),feed=await renderBlogFeed(req);if(feed)return feed}globalThis.__stxServeSearch=url.search;globalThis.__stxServeCookies=parseCookies(req);return},onResponse:async(req,response)=>{const method=req.method.toUpperCase();if(method!=="GET"&&method!=="HEAD")return;try{const{seedCsrfCookieIfMissing}=await import(resolveCsrfMiddlewarePath());return seedCsrfCookieIfMissing(req,response)}catch(error){log.debug(`CSRF cookie seeding skipped: ${error.message}`)}}});log.success(`Production server listening on http://0.0.0.0:${port}`)}function resolveDefaultsResources(){const vendored="storage/framework/defaults/resources";if(existsSync(vendored))return vendored;try{const pkgJson=Bun.resolveSync("@stacksjs/defaults/package.json",process.cwd());return join(dirname(pkgJson),"resources")}catch{return vendored}}async function resolveVendoredStxModule(){const candidates=[join(homedir(),"Code/Tools/stx/packages/stx/dist/index.js"),join(process.cwd(),"pantry/@stacksjs/stx/dist/index.js")];for(const entry of candidates)try{if(existsSync(entry))return await import(entry)}catch{}try{return await import("@stacksjs/stx")}catch{}return}function fallbackI18nFromSite(site){const locales=site.i18n.locales,defaultLocale=site.i18n.defaultLocale??locales[0];return{locales,defaultLocale,labels:site.i18n.labels??Object.fromEntries(locales.map((c)=>[c,c.toUpperCase()])),translations:{},pickerSelector:site.i18n.pickerSelector??"#lang-picker"}}async function resolveSiteI18n(site){const resolverPaths=[join(homedir(),"Code/Tools/stx/packages/stx/src/site-builder/i18n.ts"),join(homedir(),"Code/Tools/stx/packages/stx/dist/index.js"),join(process.cwd(),"pantry/@stacksjs/stx/dist/index.js")];for(const resolverPath of resolverPaths)try{if(!existsSync(resolverPath))continue;const resolved=await import(resolverPath);if(typeof resolved.resolveI18n!=="function")continue;const i18n=resolved.resolveI18n(site,process.cwd());if(i18n)return i18n}catch{}try{const resolved=await import("@stacksjs/stx");if(typeof resolved.resolveI18n==="function"){const i18n=resolved.resolveI18n(site,process.cwd());if(i18n)return i18n}}catch{}return fallbackI18nFromSite(site)}async function loadStxSiteConfig(){const sitePath=join(process.cwd(),"site.config.ts");if(!existsSync(sitePath))return{};try{const site=(await import(sitePath)).default;if(!site)return{};if(!site.i18n)return{site};const i18n=await resolveSiteI18n(site);return{site,i18n}}catch{}return{}}
@@ -1,36 +1 @@
1
- const APP_KEY_OPTIONAL_COMMANDS = [
2
- "build",
3
- "lint",
4
- "lint:fix",
5
- "test",
6
- "test:types",
7
- "test:unit",
8
- "test:feature",
9
- "typecheck",
10
- "types:fix",
11
- "types:generate",
12
- "clean",
13
- "fresh",
14
- "about",
15
- "ai:context",
16
- "doctor",
17
- "list",
18
- "setup",
19
- "setup:ssl",
20
- "setup:oh-my-zsh",
21
- "deploy",
22
- "serve",
23
- "new",
24
- "create",
25
- "upgrade",
26
- "update",
27
- "migrate",
28
- "seed",
29
- "generate",
30
- "make",
31
- "key:generate",
32
- "scaffold:crud"
33
- ];
34
- export function shouldSkipAppKeyCheck(requestedCommand, mode = {}) {
35
- return Boolean(mode.isHelpFlag || mode.isHelpMode || APP_KEY_OPTIONAL_COMMANDS.some((command) => requestedCommand === command || requestedCommand.startsWith(`${command}:`)));
36
- }
1
+ const APP_KEY_OPTIONAL_COMMANDS=["build","lint","lint:fix","test","test:types","test:unit","test:feature","typecheck","types:fix","types:generate","clean","fresh","about","ai:context","doctor","list","setup","setup:ssl","setup:oh-my-zsh","deploy","serve","new","create","upgrade","update","migrate","seed","generate","make","key:generate","scaffold:crud"];export function shouldSkipAppKeyCheck(requestedCommand,mode={}){return Boolean(mode.isHelpFlag||mode.isHelpMode||APP_KEY_OPTIONAL_COMMANDS.some((command)=>requestedCommand===command||requestedCommand.startsWith(`${command}:`)))}
@@ -1,5 +1 @@
1
- import process from "node:process";
2
- import { startProductionServer } from "./production-server";
3
- process.env.APP_ENV ||= "production";
4
- process.env.NODE_ENV ||= "production";
5
- await startProductionServer();
1
+ import process from"node:process";import{startProductionServer}from"./production-server";process.env.APP_ENV||="production";process.env.NODE_ENV||="production";await startProductionServer();
@@ -1,5 +1 @@
1
- import { version as buddyVersion } from "../package.json";
2
- const stacksVersion = buddyVersion;
3
-
4
- export { buddyVersion, stacksVersion };
5
- export const versionDescriptor = `${buddyVersion} stacks/${stacksVersion}`, versionLine = `buddy/${versionDescriptor}`;
1
+ import{version as buddyVersion}from"../package.json";const stacksVersion=buddyVersion;export{buddyVersion,stacksVersion};export const versionDescriptor=`${buddyVersion} stacks/${stacksVersion}`,versionLine=`buddy/${versionDescriptor}`;
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.258",
5
+ "version": "0.70.259",
6
6
  "description": "Meet Buddy. The Stacks runtime.",
7
7
  "author": "Chris Breuer",
8
8
  "contributors": [
@@ -52,9 +52,16 @@
52
52
  "default": "./dist/cli.js"
53
53
  },
54
54
  "./*": {
55
- "bun": "./dist/*",
56
- "import": "./dist/*",
57
- "default": "./dist/*"
55
+ "types": "./dist/*.d.ts",
56
+ "bun": "./dist/*.js",
57
+ "import": "./dist/*.js",
58
+ "default": "./dist/*.js"
59
+ },
60
+ "./*.js": {
61
+ "types": "./dist/*.d.ts",
62
+ "bun": "./dist/*.js",
63
+ "import": "./dist/*.js",
64
+ "default": "./dist/*.js"
58
65
  }
59
66
  },
60
67
  "module": "dist/index.js",
@@ -88,53 +95,53 @@
88
95
  "prepublishOnly": "bun run build"
89
96
  },
90
97
  "dependencies": {
91
- "@stacksjs/actions": "^0.70.258",
92
- "@stacksjs/ai": "^0.70.258",
93
- "@stacksjs/alias": "^0.70.258",
94
- "@stacksjs/arrays": "^0.70.258",
95
- "@stacksjs/auth": "^0.70.258",
96
- "@stacksjs/build": "^0.70.258",
97
- "@stacksjs/cache": "^0.70.258",
98
- "@stacksjs/cli": "^0.70.258",
98
+ "@stacksjs/actions": "^0.70.259",
99
+ "@stacksjs/ai": "^0.70.259",
100
+ "@stacksjs/alias": "^0.70.259",
101
+ "@stacksjs/arrays": "^0.70.259",
102
+ "@stacksjs/auth": "^0.70.259",
103
+ "@stacksjs/build": "^0.70.259",
104
+ "@stacksjs/cache": "^0.70.259",
105
+ "@stacksjs/cli": "^0.70.259",
99
106
  "@stacksjs/clapp": "^0.2.12",
100
- "@stacksjs/cloud": "^0.70.258",
101
- "@stacksjs/collections": "^0.70.258",
102
- "@stacksjs/config": "^0.70.258",
103
- "@stacksjs/database": "^0.70.258",
104
- "@stacksjs/desktop-build": "^0.70.258",
105
- "@stacksjs/dns": "^0.70.258",
106
- "@stacksjs/email": "^0.70.258",
107
- "@stacksjs/enums": "^0.70.258",
108
- "@stacksjs/error-handling": "^0.70.258",
109
- "@stacksjs/events": "^0.70.258",
110
- "@stacksjs/git": "^0.70.258",
107
+ "@stacksjs/cloud": "^0.70.259",
108
+ "@stacksjs/collections": "^0.70.259",
109
+ "@stacksjs/config": "^0.70.259",
110
+ "@stacksjs/database": "^0.70.259",
111
+ "@stacksjs/desktop-build": "^0.70.259",
112
+ "@stacksjs/dns": "^0.70.259",
113
+ "@stacksjs/email": "^0.70.259",
114
+ "@stacksjs/enums": "^0.70.259",
115
+ "@stacksjs/error-handling": "^0.70.259",
116
+ "@stacksjs/events": "^0.70.259",
117
+ "@stacksjs/git": "^0.70.259",
111
118
  "@stacksjs/gitit": "^0.2.5",
112
- "@stacksjs/health": "^0.70.258",
119
+ "@stacksjs/health": "^0.70.259",
113
120
  "@stacksjs/dnsx": "^0.2.3",
114
121
  "@stacksjs/httx": "^0.1.10",
115
- "@stacksjs/image": "^0.70.258",
116
- "@stacksjs/lint": "^0.70.258",
117
- "@stacksjs/logging": "^0.70.258",
118
- "@stacksjs/notifications": "^0.70.258",
119
- "@stacksjs/objects": "^0.70.258",
120
- "@stacksjs/orm": "^0.70.258",
121
- "@stacksjs/path": "^0.70.258",
122
- "@stacksjs/skills": "^0.70.258",
123
- "@stacksjs/payments": "^0.70.258",
124
- "@stacksjs/realtime": "^0.70.258",
125
- "@stacksjs/router": "^0.70.258",
122
+ "@stacksjs/image": "^0.70.259",
123
+ "@stacksjs/lint": "^0.70.259",
124
+ "@stacksjs/logging": "^0.70.259",
125
+ "@stacksjs/notifications": "^0.70.259",
126
+ "@stacksjs/objects": "^0.70.259",
127
+ "@stacksjs/orm": "^0.70.259",
128
+ "@stacksjs/path": "^0.70.259",
129
+ "@stacksjs/skills": "^0.70.259",
130
+ "@stacksjs/payments": "^0.70.259",
131
+ "@stacksjs/realtime": "^0.70.259",
132
+ "@stacksjs/router": "^0.70.259",
126
133
  "@stacksjs/rpx": "^0.11.42",
127
- "@stacksjs/search-engine": "^0.70.258",
128
- "@stacksjs/security": "^0.70.258",
129
- "@stacksjs/server": "^0.70.258",
130
- "@stacksjs/storage": "^0.70.258",
131
- "@stacksjs/strings": "^0.70.258",
132
- "@stacksjs/testing": "^0.70.258",
133
- "@stacksjs/tunnel": "^0.70.258",
134
- "@stacksjs/types": "^0.70.258",
135
- "@stacksjs/ui": "^0.70.258",
136
- "@stacksjs/utils": "^0.70.258",
137
- "@stacksjs/validation": "^0.70.258",
134
+ "@stacksjs/search-engine": "^0.70.259",
135
+ "@stacksjs/security": "^0.70.259",
136
+ "@stacksjs/server": "^0.70.259",
137
+ "@stacksjs/storage": "^0.70.259",
138
+ "@stacksjs/strings": "^0.70.259",
139
+ "@stacksjs/testing": "^0.70.259",
140
+ "@stacksjs/tunnel": "^0.70.259",
141
+ "@stacksjs/types": "^0.70.259",
142
+ "@stacksjs/ui": "^0.70.259",
143
+ "@stacksjs/utils": "^0.70.259",
144
+ "@stacksjs/validation": "^0.70.259",
138
145
  "@stacksjs/ts-cloud": "^0.7.94",
139
146
  "ajv": "^8.20.0",
140
147
  "ajv-formats": "^3.0.1",