@stacksjs/buddy 0.75.329 → 0.75.330
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/native-project.js +1 -1
- package/dist/native-site.d.ts +2 -0
- package/dist/native-site.js +4 -0
- package/package.json +55 -55
package/dist/native-project.js
CHANGED
|
@@ -28,7 +28,7 @@ ${pattern}
|
|
|
28
28
|
`).includes("!.env.production"))writeFileSync(ignoreFile,`${ignore.trimEnd()}
|
|
29
29
|
!.env.production
|
|
30
30
|
`);writeFileSync(manifest,`${JSON.stringify(pkg,null,2)}
|
|
31
|
-
`)}export async function buildNativeProject(root,args=[]){const pkg=await Bun.file(join(root,"package.json")).json(),loaded=await import(pathToFileURL(join(root,"craft.config.ts")).href),config=loaded.default??loaded.config;if(!config||typeof config!=="object")throw Error("craft.config.ts must export a native build configuration.");const{buildNative}=await import(pathToFileURL(Bun.resolveSync("@stacksjs/stx/craft",root)).href),prepared=await prepareNativeAppBuild(root,config);try{const output=resolve(root,prepared.overrides.output??config.output??"dist");if(output===root||!output.startsWith(`${root}/`))throw Error("Native output must be a directory inside the app.");const buildNumber=process.env.PANTRY_BUILD_NUMBER||config.infoPlist?.CFBundleVersion||pkg.version,result=await buildNative({...config,...prepared.overrides,input:resolve(root,config.input??"src/app.stx"),output,version:pkg.version,description:pkg.description,author:pkg.author,infoPlist:{...config.infoPlist,CFBundleVersion:buildNumber},...config.icon?{icon:resolve(root,config.icon)}:{},...config.backend?{backend:{...config.backend,entry:resolve(root,config.backend.entry)}}:{},...args.includes("--dmg")?{format:"dmg"}:{},verbose:args.includes("--verbose")});if(!result.success||!result.outputPath)throw Error(result.error??"Native build produced no artifact.");if(readNativeAppConfig(root))recordNativeArtifact(root,{path:result.outputPath,...result.target==="macos"?{appPath:join(output,`${config.name}.app`)}:{},name:config.name,bundleId:config.bundleId,version:pkg.version,buildNumber:String(buildNumber),target:result.target,minimumSystemVersion:config.minimumSystemVersion});return result.outputPath}finally{prepared.cleanup()}}export async function runNativeProjectCommand(root,args){const[command="help",...flags]=args;if(!["build","build:desktop","build:native","package","dev","dev:desktop","dev:native","upgrade","update","release","desktop:apple:package","desktop:apple:publish","desktop:apple:submit"].includes(command))return!1;if(flags.includes("--help")||flags.includes("-h")){console.log(`buddy ${command} (native app)
|
|
31
|
+
`)}export async function buildNativeProject(root,args=[]){const pkg=await Bun.file(join(root,"package.json")).json(),loaded=await import(pathToFileURL(join(root,"craft.config.ts")).href),config=loaded.default??loaded.config;if(!config||typeof config!=="object")throw Error("craft.config.ts must export a native build configuration.");const{buildNative}=await import(pathToFileURL(Bun.resolveSync("@stacksjs/stx/craft",root)).href),prepared=await prepareNativeAppBuild(root,config);try{const output=resolve(root,prepared.overrides.output??config.output??"dist");if(output===root||!output.startsWith(`${root}/`))throw Error("Native output must be a directory inside the app.");const buildNumber=process.env.PANTRY_BUILD_NUMBER||config.infoPlist?.CFBundleVersion||pkg.version,result=await buildNative({...config,...prepared.overrides,input:resolve(root,config.input??"src/app.stx"),output,version:pkg.version,description:pkg.description,author:pkg.author,infoPlist:{...config.infoPlist,CFBundleVersion:buildNumber},...config.icon?{icon:resolve(root,config.icon)}:{},...config.backend?{backend:{...config.backend,entry:resolve(root,config.backend.entry)}}:{},...args.includes("--dmg")?{format:"dmg"}:{},verbose:args.includes("--verbose")});if(!result.success||!result.outputPath)throw Error(result.error??"Native build produced no artifact.");if(readNativeAppConfig(root))recordNativeArtifact(root,{path:result.outputPath,...result.target==="macos"?{appPath:join(output,`${config.name}.app`)}:{},name:config.name,bundleId:config.bundleId,version:pkg.version,buildNumber:String(buildNumber),target:result.target,minimumSystemVersion:config.minimumSystemVersion});return result.outputPath}finally{prepared.cleanup()}}export async function runNativeProjectCommand(root,args){const[command="help",...flags]=args;if(!["build","build:desktop","build:native","package","dev","dev:desktop","dev:native","upgrade","update","release","desktop:apple:package","desktop:apple:publish","desktop:apple:submit"].includes(command))return!1;if(flags.includes("--site")){const{runNativeSiteCommand}=await import("./native-site");await runNativeSiteCommand(root,command,flags);return!0}if(flags.includes("--help")||flags.includes("-h")){console.log(`buddy ${command} (native app)
|
|
32
32
|
|
|
33
33
|
Build: --dmg --verbose
|
|
34
34
|
Upgrade: --dry-run
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{join}from"node:path";import{pathToFileURL}from"node:url";export async function runNativeSiteCommand(root,command,flags){if(!["dev","build"].includes(command))throw Error("--site supports buddy dev and buddy build. Desktop packaging uses craft.config.ts.");if(flags.includes("--help")||flags.includes("-h")){console.log(`buddy dev --site [--port N]
|
|
2
|
+
buddy build --site
|
|
3
|
+
|
|
4
|
+
Website pages: stx.config.ts root/pagesDir. Static assets: publicDir. Output: dist/site. Desktop entry: craft.config.ts.`);return}let port=3000;for(let index=0;index<flags.length;index++){const flag=flags[index];if(flag==="--site")continue;if(command==="dev"&&flag==="--port"){const value=flags[++index];if(!value||!/^\d+$/.test(value)||Number(value)<1||Number(value)>65535)throw Error("--port requires an integer from 1 to 65535");port=Number(value);continue}throw Error(`Unsupported website option: ${flag}`)}const load=(entry)=>import(pathToFileURL(Bun.resolveSync(`@stacksjs/stx/${entry}`,root)).href);if(command==="build"){const{buildApp}=await load("build"),outputDir=join(root,"dist/site");if((await buildApp({root,ssg:{outputDir},ssr:{outputDir}})).ssg?.failedCount)throw Error("Website build failed. See the stx diagnostics above.");console.log(`Built website: ${outputDir}`);return}const{serveApp}=await load("dev-server");if(!await serveApp(root,{port,hostname:"127.0.0.1",native:!1}))throw Error("Website development server could not start. Configure website pages in stx.config.ts.");await new Promise(()=>{})}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@stacksjs/buddy",
|
|
3
3
|
"type": "module",
|
|
4
4
|
"sideEffects": false,
|
|
5
|
-
"version": "0.75.
|
|
5
|
+
"version": "0.75.330",
|
|
6
6
|
"description": "Meet Buddy. The Stacks runtime.",
|
|
7
7
|
"author": "Chris Breuer",
|
|
8
8
|
"contributors": [
|
|
@@ -95,69 +95,69 @@
|
|
|
95
95
|
"prepublishOnly": "bun run build"
|
|
96
96
|
},
|
|
97
97
|
"dependencies": {
|
|
98
|
-
"@stacksjs/actions": "0.75.
|
|
99
|
-
"@stacksjs/ai": "0.75.
|
|
100
|
-
"@stacksjs/alias": "0.75.
|
|
101
|
-
"@stacksjs/analytics": "0.75.
|
|
102
|
-
"@stacksjs/api": "0.75.
|
|
103
|
-
"@stacksjs/arrays": "0.75.
|
|
104
|
-
"@stacksjs/auth": "0.75.
|
|
105
|
-
"@stacksjs/browser-extension": "0.75.
|
|
106
|
-
"@stacksjs/build": "0.75.
|
|
98
|
+
"@stacksjs/actions": "0.75.330",
|
|
99
|
+
"@stacksjs/ai": "0.75.330",
|
|
100
|
+
"@stacksjs/alias": "0.75.330",
|
|
101
|
+
"@stacksjs/analytics": "0.75.330",
|
|
102
|
+
"@stacksjs/api": "0.75.330",
|
|
103
|
+
"@stacksjs/arrays": "0.75.330",
|
|
104
|
+
"@stacksjs/auth": "0.75.330",
|
|
105
|
+
"@stacksjs/browser-extension": "0.75.330",
|
|
106
|
+
"@stacksjs/build": "0.75.330",
|
|
107
107
|
"@stacksjs/bumpx": "^0.2.26",
|
|
108
|
-
"@stacksjs/cache": "0.75.
|
|
109
|
-
"@stacksjs/chat": "0.75.
|
|
108
|
+
"@stacksjs/cache": "0.75.330",
|
|
109
|
+
"@stacksjs/chat": "0.75.330",
|
|
110
110
|
"@stacksjs/clapp": "^0.2.16",
|
|
111
|
-
"@stacksjs/cli": "0.75.
|
|
112
|
-
"@stacksjs/cloud": "0.75.
|
|
113
|
-
"@stacksjs/cms": "0.75.
|
|
114
|
-
"@stacksjs/collections": "0.75.
|
|
115
|
-
"@stacksjs/commerce": "0.75.
|
|
116
|
-
"@stacksjs/config": "0.75.
|
|
117
|
-
"@stacksjs/database": "0.75.
|
|
118
|
-
"@stacksjs/desktop-build": "0.75.
|
|
119
|
-
"@stacksjs/dns": "0.75.
|
|
111
|
+
"@stacksjs/cli": "0.75.330",
|
|
112
|
+
"@stacksjs/cloud": "0.75.330",
|
|
113
|
+
"@stacksjs/cms": "0.75.330",
|
|
114
|
+
"@stacksjs/collections": "0.75.330",
|
|
115
|
+
"@stacksjs/commerce": "0.75.330",
|
|
116
|
+
"@stacksjs/config": "0.75.330",
|
|
117
|
+
"@stacksjs/database": "0.75.330",
|
|
118
|
+
"@stacksjs/desktop-build": "0.75.330",
|
|
119
|
+
"@stacksjs/dns": "0.75.330",
|
|
120
120
|
"@stacksjs/dnsx": "^0.2.3",
|
|
121
|
-
"@stacksjs/email": "0.75.
|
|
122
|
-
"@stacksjs/enums": "0.75.
|
|
123
|
-
"@stacksjs/env": "0.75.
|
|
124
|
-
"@stacksjs/error-handling": "0.75.
|
|
125
|
-
"@stacksjs/events": "0.75.
|
|
126
|
-
"@stacksjs/features": "0.75.
|
|
127
|
-
"@stacksjs/git": "0.75.
|
|
121
|
+
"@stacksjs/email": "0.75.330",
|
|
122
|
+
"@stacksjs/enums": "0.75.330",
|
|
123
|
+
"@stacksjs/env": "0.75.330",
|
|
124
|
+
"@stacksjs/error-handling": "0.75.330",
|
|
125
|
+
"@stacksjs/events": "0.75.330",
|
|
126
|
+
"@stacksjs/features": "0.75.330",
|
|
127
|
+
"@stacksjs/git": "0.75.330",
|
|
128
128
|
"@stacksjs/gitit": "^0.2.5",
|
|
129
|
-
"@stacksjs/health": "0.75.
|
|
129
|
+
"@stacksjs/health": "0.75.330",
|
|
130
130
|
"@stacksjs/httx": "^0.1.10",
|
|
131
|
-
"@stacksjs/image": "0.75.
|
|
132
|
-
"@stacksjs/lint": "0.75.
|
|
133
|
-
"@stacksjs/logging": "0.75.
|
|
134
|
-
"@stacksjs/notifications": "0.75.
|
|
135
|
-
"@stacksjs/objects": "0.75.
|
|
136
|
-
"@stacksjs/orm": "0.75.
|
|
137
|
-
"@stacksjs/path": "0.75.
|
|
138
|
-
"@stacksjs/payments": "0.75.
|
|
139
|
-
"@stacksjs/realtime": "0.75.
|
|
140
|
-
"@stacksjs/router": "0.75.
|
|
141
|
-
"@stacksjs/security": "0.75.
|
|
131
|
+
"@stacksjs/image": "0.75.330",
|
|
132
|
+
"@stacksjs/lint": "0.75.330",
|
|
133
|
+
"@stacksjs/logging": "0.75.330",
|
|
134
|
+
"@stacksjs/notifications": "0.75.330",
|
|
135
|
+
"@stacksjs/objects": "0.75.330",
|
|
136
|
+
"@stacksjs/orm": "0.75.330",
|
|
137
|
+
"@stacksjs/path": "0.75.330",
|
|
138
|
+
"@stacksjs/payments": "0.75.330",
|
|
139
|
+
"@stacksjs/realtime": "0.75.330",
|
|
140
|
+
"@stacksjs/router": "0.75.330",
|
|
141
|
+
"@stacksjs/security": "0.75.330",
|
|
142
142
|
"@stacksjs/rpx": "^0.11.54",
|
|
143
|
-
"@stacksjs/scheduler": "0.75.
|
|
144
|
-
"@stacksjs/search-engine": "0.75.
|
|
145
|
-
"@stacksjs/server": "0.75.
|
|
146
|
-
"@stacksjs/sites": "0.75.
|
|
147
|
-
"@stacksjs/skills": "0.75.
|
|
148
|
-
"@stacksjs/socials": "0.75.
|
|
149
|
-
"@stacksjs/storage": "0.75.
|
|
150
|
-
"@stacksjs/strings": "0.75.
|
|
143
|
+
"@stacksjs/scheduler": "0.75.330",
|
|
144
|
+
"@stacksjs/search-engine": "0.75.330",
|
|
145
|
+
"@stacksjs/server": "0.75.330",
|
|
146
|
+
"@stacksjs/sites": "0.75.330",
|
|
147
|
+
"@stacksjs/skills": "0.75.330",
|
|
148
|
+
"@stacksjs/socials": "0.75.330",
|
|
149
|
+
"@stacksjs/storage": "0.75.330",
|
|
150
|
+
"@stacksjs/strings": "0.75.330",
|
|
151
151
|
"@stacksjs/stx": "0.2.720",
|
|
152
|
-
"@stacksjs/testing": "0.75.
|
|
153
|
-
"@stacksjs/tinker": "0.75.
|
|
152
|
+
"@stacksjs/testing": "0.75.330",
|
|
153
|
+
"@stacksjs/tinker": "0.75.330",
|
|
154
154
|
"@stacksjs/tlsx": "^0.13.19",
|
|
155
155
|
"@stacksjs/ts-cloud": "^0.16.69",
|
|
156
|
-
"@stacksjs/tunnel": "0.75.
|
|
157
|
-
"@stacksjs/types": "0.75.
|
|
158
|
-
"@stacksjs/ui": "0.75.
|
|
159
|
-
"@stacksjs/utils": "0.75.
|
|
160
|
-
"@stacksjs/validation": "0.75.
|
|
156
|
+
"@stacksjs/tunnel": "0.75.330",
|
|
157
|
+
"@stacksjs/types": "0.75.330",
|
|
158
|
+
"@stacksjs/ui": "0.75.330",
|
|
159
|
+
"@stacksjs/utils": "0.75.330",
|
|
160
|
+
"@stacksjs/validation": "0.75.330",
|
|
161
161
|
"ajv": "^8.20.0",
|
|
162
162
|
"ajv-formats": "^3.0.1",
|
|
163
163
|
"bun-plugin-stx": "0.2.720",
|