@jayfong/x-server 2.102.0 → 2.104.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.
|
@@ -232,9 +232,9 @@ class BuildUtil {
|
|
|
232
232
|
{
|
|
233
233
|
name: ${JSON.stringify(distPkgContent.name)},
|
|
234
234
|
script: './main.js',
|
|
235
|
+
interpreter: 'node',
|
|
236
|
+
interpreter_args: ${JSON.stringify(options.pm2NodeArgs || [])},
|
|
235
237
|
${hasNvmrc ? `
|
|
236
|
-
interpreter: 'node',
|
|
237
|
-
interpreter_args: [],
|
|
238
238
|
env: {
|
|
239
239
|
PATH: \`\${require('child_process').execSync('fnm exec which node').toString().trim().replace(/\\/node$/, '')}:\${process.env.PATH}\`,
|
|
240
240
|
},
|
package/lib/_cjs/cli/cli.js
CHANGED
|
@@ -229,7 +229,8 @@ _yargs.default.command('dev', '开始开发', _ => _.positional('index', {
|
|
|
229
229
|
noPrismaEngine: argv['prisma-engine'] === false,
|
|
230
230
|
noEmptyDistDir: argv['empty-dist-dir'] === false,
|
|
231
231
|
pm2MaxMemoryRestart: deployEnv.MEMORY,
|
|
232
|
-
pm2CronRestart: deployEnv.CRON
|
|
232
|
+
pm2CronRestart: deployEnv.CRON,
|
|
233
|
+
pm2NodeArgs: deployEnv.NODE_ARGS
|
|
233
234
|
});
|
|
234
235
|
console.log('构建成功');
|
|
235
236
|
if (argv.deploy) {
|
package/lib/_cjs/cli/env_util.js
CHANGED
|
@@ -64,7 +64,7 @@ class EnvUtil {
|
|
|
64
64
|
const failedChannels = [];
|
|
65
65
|
if (options.channel?.startsWith('_')) {
|
|
66
66
|
const excludeChannels = options.channel.split('!')[1]?.split(',').filter(Boolean);
|
|
67
|
-
const channel = await EnvUtil.chooseChannel(options.cwd, excludeChannels);
|
|
67
|
+
const channel = process.env.APP_CHANNEL || (await EnvUtil.chooseChannel(options.cwd, excludeChannels));
|
|
68
68
|
console.log(`========= ${channel} =========`);
|
|
69
69
|
try {
|
|
70
70
|
await options.cb(channel);
|
package/lib/cli/build_util.d.ts
CHANGED
package/lib/cli/build_util.js
CHANGED
|
@@ -226,9 +226,9 @@ export class BuildUtil {
|
|
|
226
226
|
{
|
|
227
227
|
name: ${JSON.stringify(distPkgContent.name)},
|
|
228
228
|
script: './main.js',
|
|
229
|
+
interpreter: 'node',
|
|
230
|
+
interpreter_args: ${JSON.stringify(options.pm2NodeArgs || [])},
|
|
229
231
|
${hasNvmrc ? `
|
|
230
|
-
interpreter: 'node',
|
|
231
|
-
interpreter_args: [],
|
|
232
232
|
env: {
|
|
233
233
|
PATH: \`\${require('child_process').execSync('fnm exec which node').toString().trim().replace(/\\/node$/, '')}:\${process.env.PATH}\`,
|
|
234
234
|
},
|
package/lib/cli/cli.js
CHANGED
|
@@ -226,7 +226,8 @@ yargs.command('dev', '开始开发', _ => _.positional('index', {
|
|
|
226
226
|
noPrismaEngine: argv['prisma-engine'] === false,
|
|
227
227
|
noEmptyDistDir: argv['empty-dist-dir'] === false,
|
|
228
228
|
pm2MaxMemoryRestart: deployEnv.MEMORY,
|
|
229
|
-
pm2CronRestart: deployEnv.CRON
|
|
229
|
+
pm2CronRestart: deployEnv.CRON,
|
|
230
|
+
pm2NodeArgs: deployEnv.NODE_ARGS
|
|
230
231
|
});
|
|
231
232
|
console.log('构建成功');
|
|
232
233
|
if (argv.deploy) {
|
package/lib/cli/env_util.js
CHANGED
|
@@ -59,7 +59,7 @@ export class EnvUtil {
|
|
|
59
59
|
const failedChannels = [];
|
|
60
60
|
if (options.channel?.startsWith('_')) {
|
|
61
61
|
const excludeChannels = options.channel.split('!')[1]?.split(',').filter(Boolean);
|
|
62
|
-
const channel = await EnvUtil.chooseChannel(options.cwd, excludeChannels);
|
|
62
|
+
const channel = process.env.APP_CHANNEL || (await EnvUtil.chooseChannel(options.cwd, excludeChannels));
|
|
63
63
|
console.log(`========= ${channel} =========`);
|
|
64
64
|
try {
|
|
65
65
|
await options.cb(channel);
|