puppyperpetual 1.2.6 → 1.2.7

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 CHANGED
@@ -1,59 +1,57 @@
1
- # puppyperpetual
2
-
3
- node script to run things... perpetually. adapted from [legacyshell](https://github.com/onlypuppy7/LegacyShell)
4
-
5
- [On npm @ https://www.npmjs.com/package/puppyperpetual](https://www.npmjs.com/package/puppyperpetual)
6
-
7
- [And GitHub @ https://github.com/onlypuppy7/perpetual](https://github.com/onlypuppy7/perpetual)
8
-
9
- ## usage (as an npm package)
10
-
11
- you can use it to run your node stuff perpetually:
12
-
13
- ```js
14
- import Perpetual from '../index.js';
15
-
16
- const perpetual = new Perpetual('test_process', {
17
- process_cmd: 'node ./src/test/test_process.js',
18
- });
19
- await perpetual.run();
20
- ```
21
-
22
- or anything really:
23
-
24
- ```js
25
- import Perpetual from '../index.js';
26
-
27
- const perpetual = new Perpetual('test_process', {
28
- process_cmd: 'cd . && git pull && date',
29
- });
30
- await perpetual.run();
31
- ```
32
-
33
- ## usage (as a node app thing)
34
-
35
- note: on windows unless you spawn as worker, perpetual expects `C:\Program Files\Git\bin\bash.exe` to exist.
36
-
37
- as per tradition for my projects, simple installation!
38
-
39
- 1. `npm i`
40
-
41
- then run once to create config
42
-
43
- - `npm run start`
44
-
45
- then customise it in `store/config.yaml`, making a new entry for every thing
46
-
47
- then run like this:
48
-
49
- - `node .\perpetual.js --default`
50
-
51
- alternatively, just pass in your command:
52
-
53
- - `node .\perpetual.js "cd . && echo date"`
54
-
55
- then you dont need to mess around with the horrible yaml. dont worry, i hate doing it too.
56
-
57
- ## it doesnt work?
58
-
1
+ # puppyperpetual
2
+
3
+ node script to run things... perpetually. adapted from [legacyshell](https://github.com/onlypuppy7/LegacyShell)
4
+
5
+ [On npm @ https://www.npmjs.com/package/puppyperpetual](https://www.npmjs.com/package/puppyperpetual)
6
+
7
+ [And GitHub @ https://github.com/onlypuppy7/perpetual](https://github.com/onlypuppy7/perpetual)
8
+
9
+ ## usage (as an npm package)
10
+
11
+ you can use it to run your node stuff perpetually:
12
+
13
+ ```js
14
+ import Perpetual from '../index.js';
15
+
16
+ const perpetual = new Perpetual('test_process', {
17
+ process_cmd: 'node ./src/test/test_process.js',
18
+ });
19
+ await perpetual.run();
20
+ ```
21
+
22
+ or anything really:
23
+
24
+ ```js
25
+ import Perpetual from '../index.js';
26
+
27
+ const perpetual = new Perpetual('test_process', {
28
+ process_cmd: 'cd . && git pull && date',
29
+ });
30
+ await perpetual.run();
31
+ ```
32
+
33
+ ## usage (as a node app thing)
34
+
35
+ as per tradition for my projects, simple installation!
36
+
37
+ 1. `npm i`
38
+
39
+ then run once to create config
40
+
41
+ - `npm run start`
42
+
43
+ then customise it in `store/config.yaml`, making a new entry for every thing
44
+
45
+ then run like this:
46
+
47
+ - `node .\perpetual.js --default`
48
+
49
+ alternatively, just pass in your command:
50
+
51
+ - `node .\perpetual.js "cd . && echo date"`
52
+
53
+ then you dont need to mess around with the horrible yaml. dont worry, i hate doing it too.
54
+
55
+ ## it doesnt work?
56
+
59
57
  i dont care. i use this for my own stuff. i know that it works on linux and thats all i need.
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "puppyperpetual",
3
3
  "type": "module",
4
4
  "types": "./src/index.d.ts",
5
- "version": "1.2.6",
5
+ "version": "1.2.7",
6
6
  "description": "Run stuff FOREVER! PERPETUALLY!",
7
7
  "main": "./src/index.js",
8
8
  "exports": {
@@ -54,7 +54,7 @@ export class ProcessManager {
54
54
  this.logger.logSend(`Starting process: ${this.options.process_cmd}`);
55
55
 
56
56
  const useWorkerThreads = this.options.useWorkerThreads ?? false;
57
- const isNodeScript = this.options.process_cmd.startsWith('node ') || this.options.isNode;
57
+ const isNodeScript = this.options.process_cmd.startsWith('node ') || this.options.isNodeScript;
58
58
  let scriptPath = this.options.process_cmd;
59
59
 
60
60
  if (isNodeScript && useWorkerThreads) {