@jayfong/x-server 2.103.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
  },
@@ -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) {
@@ -12,6 +12,7 @@ export interface BuildOptions {
12
12
  noEmptyDistDir?: boolean;
13
13
  pm2MaxMemoryRestart?: string;
14
14
  pm2CronRestart?: string;
15
+ pm2NodeArgs?: string | string[];
15
16
  }
16
17
  export declare class BuildUtil {
17
18
  static build(options: BuildOptions): Promise<void>;
@@ -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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jayfong/x-server",
3
- "version": "2.103.0",
3
+ "version": "2.104.0",
4
4
  "license": "ISC",
5
5
  "sideEffects": false,
6
6
  "main": "lib/_cjs/index.js",