@aixyz/cli 0.25.0 → 0.27.0
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/build/index.ts +31 -0
- package/package.json +3 -3
package/build/index.ts
CHANGED
|
@@ -124,6 +124,9 @@ async function buildBun(entrypoint: string, isCustom: boolean): Promise<void> {
|
|
|
124
124
|
await generateFavicon(iconFile, resolve(outputDir, "public/favicon.ico"));
|
|
125
125
|
}
|
|
126
126
|
|
|
127
|
+
// Copy .env files for runtime env loading
|
|
128
|
+
const copiedEnvFiles = copyEnvFiles(cwd, outputDir);
|
|
129
|
+
|
|
127
130
|
// Log summary
|
|
128
131
|
console.log("");
|
|
129
132
|
console.log("Build complete! Output:");
|
|
@@ -132,6 +135,9 @@ async function buildBun(entrypoint: string, isCustom: boolean): Promise<void> {
|
|
|
132
135
|
if (existsSync(publicDir) || iconFile) {
|
|
133
136
|
console.log(" .aixyz/output/public/ and assets");
|
|
134
137
|
}
|
|
138
|
+
for (const envFile of copiedEnvFiles) {
|
|
139
|
+
console.log(` .aixyz/output/${envFile}`);
|
|
140
|
+
}
|
|
135
141
|
console.log("");
|
|
136
142
|
console.log("To run: bun .aixyz/output/server.js");
|
|
137
143
|
}
|
|
@@ -181,6 +187,9 @@ async function buildExecutable(entrypoint: string, isCustom: boolean): Promise<v
|
|
|
181
187
|
await generateFavicon(iconFile, resolve(outputDir, "public/favicon.ico"));
|
|
182
188
|
}
|
|
183
189
|
|
|
190
|
+
// Copy .env files for runtime env loading
|
|
191
|
+
const copiedEnvFiles = copyEnvFiles(cwd, outputDir);
|
|
192
|
+
|
|
184
193
|
// Log summary
|
|
185
194
|
console.log("");
|
|
186
195
|
console.log("Build complete! Output:");
|
|
@@ -188,6 +197,9 @@ async function buildExecutable(entrypoint: string, isCustom: boolean): Promise<v
|
|
|
188
197
|
if (existsSync(publicDir) || iconFile) {
|
|
189
198
|
console.log(" .aixyz/output/public/ and assets");
|
|
190
199
|
}
|
|
200
|
+
for (const envFile of copiedEnvFiles) {
|
|
201
|
+
console.log(` .aixyz/output/${envFile}`);
|
|
202
|
+
}
|
|
191
203
|
console.log("");
|
|
192
204
|
console.log("To run: ./.aixyz/output/server");
|
|
193
205
|
}
|
|
@@ -285,3 +297,22 @@ async function buildVercel(
|
|
|
285
297
|
console.log(" .vercel/output/functions/index.func/server.js");
|
|
286
298
|
console.log(" .vercel/output/static/");
|
|
287
299
|
}
|
|
300
|
+
|
|
301
|
+
/**
|
|
302
|
+
* Copy .env and .env.production to the output directory for runtime env loading.
|
|
303
|
+
* .env.local and .env.production.local are excluded — those are for local development only.
|
|
304
|
+
*/
|
|
305
|
+
function copyEnvFiles(cwd: string, outputDir: string): string[] {
|
|
306
|
+
const envFiles = [".env", ".env.production"];
|
|
307
|
+
const copied: string[] = [];
|
|
308
|
+
|
|
309
|
+
for (const envFile of envFiles) {
|
|
310
|
+
const src = resolve(cwd, envFile);
|
|
311
|
+
if (existsSync(src)) {
|
|
312
|
+
cpSync(src, resolve(outputDir, envFile));
|
|
313
|
+
copied.push(envFile);
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
return copied;
|
|
318
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aixyz/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.27.0",
|
|
4
4
|
"description": "Payment-native SDK for AI Agent",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai",
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
"bin.ts"
|
|
29
29
|
],
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@aixyz/config": "0.
|
|
32
|
-
"@aixyz/erc-8004": "0.
|
|
31
|
+
"@aixyz/config": "0.27.0",
|
|
32
|
+
"@aixyz/erc-8004": "0.27.0",
|
|
33
33
|
"@inquirer/prompts": "^8.3.0",
|
|
34
34
|
"@next/env": "^16.1.6",
|
|
35
35
|
"boxen": "^8.0.1",
|