@jayfong/x-server 2.35.0 → 2.35.1
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/lib/_cjs/cli/cli.js +5 -0
- package/lib/cli/cli.js +5 -0
- package/package.json +1 -1
package/lib/_cjs/cli/cli.js
CHANGED
|
@@ -122,6 +122,11 @@ _yargs.default.command('dev', '开始开发', _ => _.positional('index', {
|
|
|
122
122
|
});
|
|
123
123
|
console.log('构建成功');
|
|
124
124
|
}).command('api', '生成 API', async () => {
|
|
125
|
+
process.env.NODE_ENV = 'production';
|
|
126
|
+
await _env_util.EnvUtil.importFile({
|
|
127
|
+
cwd: process.cwd(),
|
|
128
|
+
file: ['.env', `.env.${process.env.NODE_ENV}`]
|
|
129
|
+
});
|
|
125
130
|
await new _api_generator.ApiGenerator().start();
|
|
126
131
|
}).command('prisma', 'prisma 代理,主要为了注入环境变量', _ => _.positional('production', {
|
|
127
132
|
alias: 'p',
|
package/lib/cli/cli.js
CHANGED
|
@@ -119,6 +119,11 @@ yargs.command('dev', '开始开发', _ => _.positional('index', {
|
|
|
119
119
|
});
|
|
120
120
|
console.log('构建成功');
|
|
121
121
|
}).command('api', '生成 API', async () => {
|
|
122
|
+
process.env.NODE_ENV = 'production';
|
|
123
|
+
await EnvUtil.importFile({
|
|
124
|
+
cwd: process.cwd(),
|
|
125
|
+
file: ['.env', `.env.${process.env.NODE_ENV}`]
|
|
126
|
+
});
|
|
122
127
|
await new ApiGenerator().start();
|
|
123
128
|
}).command('prisma', 'prisma 代理,主要为了注入环境变量', _ => _.positional('production', {
|
|
124
129
|
alias: 'p',
|