@startupjs/cli 0.61.11 → 0.62.0-alpha.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/README.md +8 -0
- package/commands/index.js +1 -0
- package/commands/start-worker-production.js +21 -0
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -28,6 +28,14 @@ Start production node server with production web build
|
|
|
28
28
|
|
|
29
29
|
(run this after `npx startupjs build`)
|
|
30
30
|
|
|
31
|
+
### `start-worker`
|
|
32
|
+
|
|
33
|
+
Start worker node server (uses current `NODE_ENV`)
|
|
34
|
+
|
|
35
|
+
### `start-worker-production`
|
|
36
|
+
|
|
37
|
+
Start worker node server with `NODE_ENV=production`
|
|
38
|
+
|
|
31
39
|
### `init-pm`, `pr`, `task <github_issue_number>`
|
|
32
40
|
|
|
33
41
|
Project management helper commands.
|
package/commands/index.js
CHANGED
|
@@ -5,5 +5,6 @@ export * as task from './pm/task.js'
|
|
|
5
5
|
export * as postinstall from './postinstall.js'
|
|
6
6
|
export * as startProduction from './start-production.js'
|
|
7
7
|
export * as startWorker from './start-worker.js'
|
|
8
|
+
export * as startWorkerProduction from './start-worker-production.js'
|
|
8
9
|
export * as build from './build.js'
|
|
9
10
|
export * as install from 'create-startupjs/install'
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { $ } from 'execa'
|
|
2
|
+
|
|
3
|
+
export const name = 'start-worker-production'
|
|
4
|
+
export const description = 'Start worker node server with NODE_ENV=production'
|
|
5
|
+
export const options = [{
|
|
6
|
+
name: '-i, --inspect',
|
|
7
|
+
description: 'Enable NodeJS inspector agent'
|
|
8
|
+
}]
|
|
9
|
+
|
|
10
|
+
export async function action ({ inspect } = {}) {
|
|
11
|
+
await $({
|
|
12
|
+
stdio: 'inherit',
|
|
13
|
+
env: { NODE_ENV: 'production' }
|
|
14
|
+
})`\
|
|
15
|
+
node \
|
|
16
|
+
--experimental-detect-module \
|
|
17
|
+
${inspect ? '--inspect' : []} \
|
|
18
|
+
--import=startupjs/nodeRegister \
|
|
19
|
+
-e import('startupjs/startWorker') \
|
|
20
|
+
`
|
|
21
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@startupjs/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.62.0-alpha.1",
|
|
4
4
|
"description": "The command-line tool for StartupJS apps.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|
|
@@ -9,13 +9,13 @@
|
|
|
9
9
|
"access": "public"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@react-pug/check-types": "^0.1.
|
|
13
|
-
"@startupjs/patches": "^0.
|
|
14
|
-
"@startupjs/pm": "^0.
|
|
12
|
+
"@react-pug/check-types": "^0.1.10",
|
|
13
|
+
"@startupjs/patches": "^0.62.0-alpha.0",
|
|
14
|
+
"@startupjs/pm": "^0.62.0-alpha.0",
|
|
15
15
|
"chalk": "^5.3.0",
|
|
16
16
|
"commander": "^12.0.0",
|
|
17
|
-
"create-startupjs": "^0.
|
|
17
|
+
"create-startupjs": "^0.62.0-alpha.1",
|
|
18
18
|
"execa": "^8.0.1"
|
|
19
19
|
},
|
|
20
|
-
"gitHead": "
|
|
20
|
+
"gitHead": "c5efb9ec92df5b676c2fb4a6c0249ac02a5dc9e7"
|
|
21
21
|
}
|