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