pm2-ecosystem 6.0.13 → 6.0.14
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/dist/index.cjs +5 -29
- package/dist/index.d.cts +205 -204
- package/dist/index.d.ts +205 -204
- package/dist/index.js +5 -5
- package/package.json +9 -12
package/dist/index.cjs
CHANGED
|
@@ -1,30 +1,6 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
1
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
module.exports = __toCommonJS(index_exports);
|
|
26
|
-
var defineApp = (options) => options;
|
|
27
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
28
|
-
0 && (module.exports = {
|
|
29
|
-
defineApp
|
|
30
|
-
});
|
|
2
|
+
//#region src/index.ts
|
|
3
|
+
const defineApp = (options) => options;
|
|
4
|
+
|
|
5
|
+
//#endregion
|
|
6
|
+
exports.defineApp = defineApp;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,207 +1,208 @@
|
|
|
1
|
+
//#region src/index.d.ts
|
|
1
2
|
interface StartOptions {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
3
|
+
/**
|
|
4
|
+
* Enable or disable auto start after process added (default: true).
|
|
5
|
+
*/
|
|
6
|
+
autostart?: boolean;
|
|
7
|
+
/**
|
|
8
|
+
* Enable or disable auto restart after process failure (default: true).
|
|
9
|
+
*/
|
|
10
|
+
autorestart?: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* List of exit codes that should allow the process to stop (skip autorestart).
|
|
13
|
+
*/
|
|
14
|
+
stop_exit_codes?: number[];
|
|
15
|
+
/**
|
|
16
|
+
* An arbitrary name that can be used to interact with (e.g. restart) the process
|
|
17
|
+
* later in other commands. Defaults to the script name without its extension
|
|
18
|
+
* (eg “testScript” for “testScript.js”)
|
|
19
|
+
*/
|
|
20
|
+
name?: string;
|
|
21
|
+
/**
|
|
22
|
+
* The path of the script to run
|
|
23
|
+
*/
|
|
24
|
+
script?: string;
|
|
25
|
+
/**
|
|
26
|
+
* A string or array of strings composed of arguments to pass to the script.
|
|
27
|
+
*/
|
|
28
|
+
args?: string | string[];
|
|
29
|
+
/**
|
|
30
|
+
* A string or array of strings composed of arguments to call the interpreter process with.
|
|
31
|
+
* Eg “–harmony” or [”–harmony”,”–debug”]. Only applies if interpreter is something other
|
|
32
|
+
* than “none” (its “node” by default).
|
|
33
|
+
*/
|
|
34
|
+
interpreter_args?: string | string[];
|
|
35
|
+
/**
|
|
36
|
+
* The working directory to start the process with.
|
|
37
|
+
*/
|
|
38
|
+
cwd?: string;
|
|
39
|
+
/**
|
|
40
|
+
* (Default: “~/.pm2/logs/app_name-out.log”) The path to a file to append stdout output to.
|
|
41
|
+
* Can be the same file as error.
|
|
42
|
+
*/
|
|
43
|
+
output?: string;
|
|
44
|
+
/**
|
|
45
|
+
* (Default: “~/.pm2/logs/app_name-error.err”) The path to a file to append stderr output to. Can be the same file as output.
|
|
46
|
+
*/
|
|
47
|
+
error?: string;
|
|
48
|
+
/**
|
|
49
|
+
* The display format for log timestamps (eg “YYYY-MM-DD HH:mm Z”). The format is a moment display format.
|
|
50
|
+
*/
|
|
51
|
+
log_date_format?: string;
|
|
52
|
+
/**
|
|
53
|
+
* Default: “~/.pm2/logs/~/.pm2/pids/app_name-id.pid”)
|
|
54
|
+
* The path to a file to write the pid of the started process. The file will be overwritten.
|
|
55
|
+
* Note that the file is not used in any way by pm2 and so the user is free to manipulate or
|
|
56
|
+
* remove that file at any time. The file will be deleted when the process is stopped or the daemon killed.
|
|
57
|
+
*/
|
|
58
|
+
pid?: string;
|
|
59
|
+
/**
|
|
60
|
+
* The minimum uptime of the script before it’s considered successfully started.
|
|
61
|
+
*/
|
|
62
|
+
min_uptime?: number;
|
|
63
|
+
/**
|
|
64
|
+
* The maximum number of times in a row a script will be restarted if it exits in less than min_uptime.
|
|
65
|
+
*/
|
|
66
|
+
max_restarts?: number;
|
|
67
|
+
/**
|
|
68
|
+
* If sets and script’s memory usage goes about the configured number, pm2 restarts the script.
|
|
69
|
+
* Uses human-friendly suffixes: ‘K’ for kilobytes, ‘M’ for megabytes, ‘G’ for gigabytes’, etc. Eg “150M”.
|
|
70
|
+
*/
|
|
71
|
+
max_memory_restart?: number | string;
|
|
72
|
+
/**
|
|
73
|
+
* Arguments to pass to the interpreter
|
|
74
|
+
*/
|
|
75
|
+
node_args?: string | string[];
|
|
76
|
+
/**
|
|
77
|
+
* Prefix logs with time
|
|
78
|
+
*/
|
|
79
|
+
time?: boolean;
|
|
80
|
+
/**
|
|
81
|
+
* This will make PM2 listen for that event. In your application you will need to add process.send('ready');
|
|
82
|
+
* when you want your application to be considered as ready.
|
|
83
|
+
*/
|
|
84
|
+
wait_ready?: boolean;
|
|
85
|
+
/**
|
|
86
|
+
* (Default: 1600)
|
|
87
|
+
* The number of milliseconds to wait after a stop or restart command issues a SIGINT signal to kill the
|
|
88
|
+
* script forceably with a SIGKILL signal.
|
|
89
|
+
*/
|
|
90
|
+
kill_timeout?: number;
|
|
91
|
+
/**
|
|
92
|
+
* (Default: 0) Number of millseconds to wait before restarting a script that has exited.
|
|
93
|
+
*/
|
|
94
|
+
restart_delay?: number;
|
|
95
|
+
/**
|
|
96
|
+
* (Default: “node”) The interpreter for your script (eg “python”, “ruby”, “bash”, etc).
|
|
97
|
+
* The value “none” will execute the ‘script’ as a binary executable.
|
|
98
|
+
*/
|
|
99
|
+
interpreter?: string;
|
|
100
|
+
/**
|
|
101
|
+
* (Default: ‘fork’) If sets to ‘cluster’, will enable clustering
|
|
102
|
+
* (running multiple instances of the script).
|
|
103
|
+
*/
|
|
104
|
+
exec_mode?: string;
|
|
105
|
+
/**
|
|
106
|
+
* (Default: 1) How many instances of script to create. Only relevant in exec_mode ‘cluster’.
|
|
107
|
+
*/
|
|
108
|
+
instances?: number;
|
|
109
|
+
/**
|
|
110
|
+
* (Default: false) If true, merges the log files for all instances of script into one stderr log
|
|
111
|
+
* and one stdout log. Only applies in ‘cluster’ mode. For example, if you have 4 instances of
|
|
112
|
+
* ‘test.js’ started via pm2, normally you would have 4 stdout log files and 4 stderr log files,
|
|
113
|
+
* but with this option set to true you would only have one stdout file and one stderr file.
|
|
114
|
+
*/
|
|
115
|
+
merge_logs?: boolean;
|
|
116
|
+
/**
|
|
117
|
+
* If set to true, the application will be restarted on change of the script file.
|
|
118
|
+
*/
|
|
119
|
+
watch?: boolean | string[];
|
|
120
|
+
/**
|
|
121
|
+
* (Default: false) By default, pm2 will only start a script if that script isn’t
|
|
122
|
+
* already running (a script is a path to an application, not the name of an application
|
|
123
|
+
* already running). If force is set to true, pm2 will start a new instance of that script.
|
|
124
|
+
*/
|
|
125
|
+
force?: boolean;
|
|
126
|
+
ignore_watch?: string[];
|
|
127
|
+
cron?: any;
|
|
128
|
+
execute_command?: any;
|
|
129
|
+
write?: any;
|
|
130
|
+
source_map_support?: any;
|
|
131
|
+
disable_source_map_support?: any;
|
|
132
|
+
/**
|
|
133
|
+
* The environment variables to pass on to the process.
|
|
134
|
+
*/
|
|
135
|
+
env?: {
|
|
136
|
+
[key: string]: string;
|
|
137
|
+
};
|
|
138
|
+
/**
|
|
139
|
+
* NameSpace for the process
|
|
140
|
+
* @default 'default'
|
|
141
|
+
* @example 'production'
|
|
142
|
+
* @example 'development'
|
|
143
|
+
* @example 'staging'
|
|
144
|
+
*/
|
|
145
|
+
namespace?: string;
|
|
146
|
+
/**
|
|
147
|
+
* (Default: false) Exponential backoff restart delay in milliseconds.
|
|
148
|
+
* When enabled, PM2 will progressively increase restart delays after failures.
|
|
149
|
+
*/
|
|
150
|
+
exp_backoff_restart_delay?: number;
|
|
151
|
+
/**
|
|
152
|
+
* Timeout for application to be ready after reload (in milliseconds).
|
|
153
|
+
*/
|
|
154
|
+
listen_timeout?: number;
|
|
155
|
+
/**
|
|
156
|
+
* (Default: false) If true, shutdown the process using process.send('shutdown') instead of process.kill().
|
|
157
|
+
*/
|
|
158
|
+
shutdown_with_message?: boolean;
|
|
159
|
+
/**
|
|
160
|
+
* Environment variable name that gets incremented for each cluster instance.
|
|
161
|
+
*/
|
|
162
|
+
increment_var?: string;
|
|
163
|
+
/**
|
|
164
|
+
* Name of the environment variable holding the instance ID.
|
|
165
|
+
* @default 'NODE_APP_INSTANCE'
|
|
166
|
+
*/
|
|
167
|
+
instance_var?: string;
|
|
168
|
+
/**
|
|
169
|
+
* Filter out specific environment variables from the process.
|
|
170
|
+
* Can be true to filter all, or array/string of specific variables.
|
|
171
|
+
*/
|
|
172
|
+
filter_env?: boolean | string | string[];
|
|
173
|
+
/**
|
|
174
|
+
* (Default: false) Disable logs output.
|
|
175
|
+
*/
|
|
176
|
+
disable_logs?: boolean;
|
|
177
|
+
/**
|
|
178
|
+
* Log output type.
|
|
179
|
+
*/
|
|
180
|
+
log_type?: string;
|
|
181
|
+
/**
|
|
182
|
+
* (Default: false) Enable container mode.
|
|
183
|
+
*/
|
|
184
|
+
container?: boolean;
|
|
185
|
+
/**
|
|
186
|
+
* (Default: false) Distribution mode for Docker.
|
|
187
|
+
*/
|
|
188
|
+
dist?: boolean;
|
|
189
|
+
/**
|
|
190
|
+
* Docker image name.
|
|
191
|
+
*/
|
|
192
|
+
image_name?: string;
|
|
193
|
+
/**
|
|
194
|
+
* Node.js version for Docker container.
|
|
195
|
+
*/
|
|
196
|
+
node_version?: string;
|
|
197
|
+
/**
|
|
198
|
+
* (Default: false) Fresh install for Docker.
|
|
199
|
+
*/
|
|
200
|
+
fresh?: boolean;
|
|
201
|
+
/**
|
|
202
|
+
* (Default: false) Docker daemon mode.
|
|
203
|
+
*/
|
|
204
|
+
dockerdaemon?: boolean;
|
|
204
205
|
}
|
|
205
206
|
declare const defineApp: (options: StartOptions) => StartOptions;
|
|
206
|
-
|
|
207
|
-
export {
|
|
207
|
+
//#endregion
|
|
208
|
+
export { StartOptions, defineApp };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,207 +1,208 @@
|
|
|
1
|
+
//#region src/index.d.ts
|
|
1
2
|
interface StartOptions {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
3
|
+
/**
|
|
4
|
+
* Enable or disable auto start after process added (default: true).
|
|
5
|
+
*/
|
|
6
|
+
autostart?: boolean;
|
|
7
|
+
/**
|
|
8
|
+
* Enable or disable auto restart after process failure (default: true).
|
|
9
|
+
*/
|
|
10
|
+
autorestart?: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* List of exit codes that should allow the process to stop (skip autorestart).
|
|
13
|
+
*/
|
|
14
|
+
stop_exit_codes?: number[];
|
|
15
|
+
/**
|
|
16
|
+
* An arbitrary name that can be used to interact with (e.g. restart) the process
|
|
17
|
+
* later in other commands. Defaults to the script name without its extension
|
|
18
|
+
* (eg “testScript” for “testScript.js”)
|
|
19
|
+
*/
|
|
20
|
+
name?: string;
|
|
21
|
+
/**
|
|
22
|
+
* The path of the script to run
|
|
23
|
+
*/
|
|
24
|
+
script?: string;
|
|
25
|
+
/**
|
|
26
|
+
* A string or array of strings composed of arguments to pass to the script.
|
|
27
|
+
*/
|
|
28
|
+
args?: string | string[];
|
|
29
|
+
/**
|
|
30
|
+
* A string or array of strings composed of arguments to call the interpreter process with.
|
|
31
|
+
* Eg “–harmony” or [”–harmony”,”–debug”]. Only applies if interpreter is something other
|
|
32
|
+
* than “none” (its “node” by default).
|
|
33
|
+
*/
|
|
34
|
+
interpreter_args?: string | string[];
|
|
35
|
+
/**
|
|
36
|
+
* The working directory to start the process with.
|
|
37
|
+
*/
|
|
38
|
+
cwd?: string;
|
|
39
|
+
/**
|
|
40
|
+
* (Default: “~/.pm2/logs/app_name-out.log”) The path to a file to append stdout output to.
|
|
41
|
+
* Can be the same file as error.
|
|
42
|
+
*/
|
|
43
|
+
output?: string;
|
|
44
|
+
/**
|
|
45
|
+
* (Default: “~/.pm2/logs/app_name-error.err”) The path to a file to append stderr output to. Can be the same file as output.
|
|
46
|
+
*/
|
|
47
|
+
error?: string;
|
|
48
|
+
/**
|
|
49
|
+
* The display format for log timestamps (eg “YYYY-MM-DD HH:mm Z”). The format is a moment display format.
|
|
50
|
+
*/
|
|
51
|
+
log_date_format?: string;
|
|
52
|
+
/**
|
|
53
|
+
* Default: “~/.pm2/logs/~/.pm2/pids/app_name-id.pid”)
|
|
54
|
+
* The path to a file to write the pid of the started process. The file will be overwritten.
|
|
55
|
+
* Note that the file is not used in any way by pm2 and so the user is free to manipulate or
|
|
56
|
+
* remove that file at any time. The file will be deleted when the process is stopped or the daemon killed.
|
|
57
|
+
*/
|
|
58
|
+
pid?: string;
|
|
59
|
+
/**
|
|
60
|
+
* The minimum uptime of the script before it’s considered successfully started.
|
|
61
|
+
*/
|
|
62
|
+
min_uptime?: number;
|
|
63
|
+
/**
|
|
64
|
+
* The maximum number of times in a row a script will be restarted if it exits in less than min_uptime.
|
|
65
|
+
*/
|
|
66
|
+
max_restarts?: number;
|
|
67
|
+
/**
|
|
68
|
+
* If sets and script’s memory usage goes about the configured number, pm2 restarts the script.
|
|
69
|
+
* Uses human-friendly suffixes: ‘K’ for kilobytes, ‘M’ for megabytes, ‘G’ for gigabytes’, etc. Eg “150M”.
|
|
70
|
+
*/
|
|
71
|
+
max_memory_restart?: number | string;
|
|
72
|
+
/**
|
|
73
|
+
* Arguments to pass to the interpreter
|
|
74
|
+
*/
|
|
75
|
+
node_args?: string | string[];
|
|
76
|
+
/**
|
|
77
|
+
* Prefix logs with time
|
|
78
|
+
*/
|
|
79
|
+
time?: boolean;
|
|
80
|
+
/**
|
|
81
|
+
* This will make PM2 listen for that event. In your application you will need to add process.send('ready');
|
|
82
|
+
* when you want your application to be considered as ready.
|
|
83
|
+
*/
|
|
84
|
+
wait_ready?: boolean;
|
|
85
|
+
/**
|
|
86
|
+
* (Default: 1600)
|
|
87
|
+
* The number of milliseconds to wait after a stop or restart command issues a SIGINT signal to kill the
|
|
88
|
+
* script forceably with a SIGKILL signal.
|
|
89
|
+
*/
|
|
90
|
+
kill_timeout?: number;
|
|
91
|
+
/**
|
|
92
|
+
* (Default: 0) Number of millseconds to wait before restarting a script that has exited.
|
|
93
|
+
*/
|
|
94
|
+
restart_delay?: number;
|
|
95
|
+
/**
|
|
96
|
+
* (Default: “node”) The interpreter for your script (eg “python”, “ruby”, “bash”, etc).
|
|
97
|
+
* The value “none” will execute the ‘script’ as a binary executable.
|
|
98
|
+
*/
|
|
99
|
+
interpreter?: string;
|
|
100
|
+
/**
|
|
101
|
+
* (Default: ‘fork’) If sets to ‘cluster’, will enable clustering
|
|
102
|
+
* (running multiple instances of the script).
|
|
103
|
+
*/
|
|
104
|
+
exec_mode?: string;
|
|
105
|
+
/**
|
|
106
|
+
* (Default: 1) How many instances of script to create. Only relevant in exec_mode ‘cluster’.
|
|
107
|
+
*/
|
|
108
|
+
instances?: number;
|
|
109
|
+
/**
|
|
110
|
+
* (Default: false) If true, merges the log files for all instances of script into one stderr log
|
|
111
|
+
* and one stdout log. Only applies in ‘cluster’ mode. For example, if you have 4 instances of
|
|
112
|
+
* ‘test.js’ started via pm2, normally you would have 4 stdout log files and 4 stderr log files,
|
|
113
|
+
* but with this option set to true you would only have one stdout file and one stderr file.
|
|
114
|
+
*/
|
|
115
|
+
merge_logs?: boolean;
|
|
116
|
+
/**
|
|
117
|
+
* If set to true, the application will be restarted on change of the script file.
|
|
118
|
+
*/
|
|
119
|
+
watch?: boolean | string[];
|
|
120
|
+
/**
|
|
121
|
+
* (Default: false) By default, pm2 will only start a script if that script isn’t
|
|
122
|
+
* already running (a script is a path to an application, not the name of an application
|
|
123
|
+
* already running). If force is set to true, pm2 will start a new instance of that script.
|
|
124
|
+
*/
|
|
125
|
+
force?: boolean;
|
|
126
|
+
ignore_watch?: string[];
|
|
127
|
+
cron?: any;
|
|
128
|
+
execute_command?: any;
|
|
129
|
+
write?: any;
|
|
130
|
+
source_map_support?: any;
|
|
131
|
+
disable_source_map_support?: any;
|
|
132
|
+
/**
|
|
133
|
+
* The environment variables to pass on to the process.
|
|
134
|
+
*/
|
|
135
|
+
env?: {
|
|
136
|
+
[key: string]: string;
|
|
137
|
+
};
|
|
138
|
+
/**
|
|
139
|
+
* NameSpace for the process
|
|
140
|
+
* @default 'default'
|
|
141
|
+
* @example 'production'
|
|
142
|
+
* @example 'development'
|
|
143
|
+
* @example 'staging'
|
|
144
|
+
*/
|
|
145
|
+
namespace?: string;
|
|
146
|
+
/**
|
|
147
|
+
* (Default: false) Exponential backoff restart delay in milliseconds.
|
|
148
|
+
* When enabled, PM2 will progressively increase restart delays after failures.
|
|
149
|
+
*/
|
|
150
|
+
exp_backoff_restart_delay?: number;
|
|
151
|
+
/**
|
|
152
|
+
* Timeout for application to be ready after reload (in milliseconds).
|
|
153
|
+
*/
|
|
154
|
+
listen_timeout?: number;
|
|
155
|
+
/**
|
|
156
|
+
* (Default: false) If true, shutdown the process using process.send('shutdown') instead of process.kill().
|
|
157
|
+
*/
|
|
158
|
+
shutdown_with_message?: boolean;
|
|
159
|
+
/**
|
|
160
|
+
* Environment variable name that gets incremented for each cluster instance.
|
|
161
|
+
*/
|
|
162
|
+
increment_var?: string;
|
|
163
|
+
/**
|
|
164
|
+
* Name of the environment variable holding the instance ID.
|
|
165
|
+
* @default 'NODE_APP_INSTANCE'
|
|
166
|
+
*/
|
|
167
|
+
instance_var?: string;
|
|
168
|
+
/**
|
|
169
|
+
* Filter out specific environment variables from the process.
|
|
170
|
+
* Can be true to filter all, or array/string of specific variables.
|
|
171
|
+
*/
|
|
172
|
+
filter_env?: boolean | string | string[];
|
|
173
|
+
/**
|
|
174
|
+
* (Default: false) Disable logs output.
|
|
175
|
+
*/
|
|
176
|
+
disable_logs?: boolean;
|
|
177
|
+
/**
|
|
178
|
+
* Log output type.
|
|
179
|
+
*/
|
|
180
|
+
log_type?: string;
|
|
181
|
+
/**
|
|
182
|
+
* (Default: false) Enable container mode.
|
|
183
|
+
*/
|
|
184
|
+
container?: boolean;
|
|
185
|
+
/**
|
|
186
|
+
* (Default: false) Distribution mode for Docker.
|
|
187
|
+
*/
|
|
188
|
+
dist?: boolean;
|
|
189
|
+
/**
|
|
190
|
+
* Docker image name.
|
|
191
|
+
*/
|
|
192
|
+
image_name?: string;
|
|
193
|
+
/**
|
|
194
|
+
* Node.js version for Docker container.
|
|
195
|
+
*/
|
|
196
|
+
node_version?: string;
|
|
197
|
+
/**
|
|
198
|
+
* (Default: false) Fresh install for Docker.
|
|
199
|
+
*/
|
|
200
|
+
fresh?: boolean;
|
|
201
|
+
/**
|
|
202
|
+
* (Default: false) Docker daemon mode.
|
|
203
|
+
*/
|
|
204
|
+
dockerdaemon?: boolean;
|
|
204
205
|
}
|
|
205
206
|
declare const defineApp: (options: StartOptions) => StartOptions;
|
|
206
|
-
|
|
207
|
-
export {
|
|
207
|
+
//#endregion
|
|
208
|
+
export { StartOptions, defineApp };
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
};
|
|
1
|
+
//#region src/index.ts
|
|
2
|
+
const defineApp = (options) => options;
|
|
3
|
+
|
|
4
|
+
//#endregion
|
|
5
|
+
export { defineApp };
|
package/package.json
CHANGED
|
@@ -1,25 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pm2-ecosystem",
|
|
3
3
|
"description": "Type PM2 configuration files. Use JSDoc or the define-app function.",
|
|
4
|
-
"version": "6.0.
|
|
4
|
+
"version": "6.0.14",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"devDependencies": {
|
|
7
|
-
"@types/node": "^24.
|
|
8
|
-
"prettier": "^3.
|
|
9
|
-
"publint": "^0.3.
|
|
10
|
-
"simple-git": "^3.
|
|
11
|
-
"
|
|
12
|
-
"typescript": "^5.9.
|
|
7
|
+
"@types/node": "^24.10.4",
|
|
8
|
+
"prettier": "^3.7.4",
|
|
9
|
+
"publint": "^0.3.16",
|
|
10
|
+
"simple-git": "^3.30.0",
|
|
11
|
+
"tsdown": "0.19.0-beta.2",
|
|
12
|
+
"typescript": "^5.9.3"
|
|
13
13
|
},
|
|
14
14
|
"exports": {
|
|
15
15
|
".": {
|
|
16
|
-
"
|
|
17
|
-
"
|
|
16
|
+
"import": "./dist/index.js",
|
|
17
|
+
"require": "./dist/index.cjs"
|
|
18
18
|
}
|
|
19
19
|
},
|
|
20
|
-
"main": "./dist/index.cjs",
|
|
21
|
-
"module": "./dist/index.js",
|
|
22
|
-
"types": "./dist/index.d.ts",
|
|
23
20
|
"files": [
|
|
24
21
|
"dist"
|
|
25
22
|
],
|