tardis-machine 15.2.1 → 15.2.3
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/bin/tardis-machine.js +3 -7
- package/package.json +2 -2
package/bin/tardis-machine.js
CHANGED
|
@@ -10,14 +10,12 @@ const cluster = require('node:cluster')
|
|
|
10
10
|
const numCPUs = os.cpus().length
|
|
11
11
|
const isDocker = require('is-docker')
|
|
12
12
|
const pkg = require('../package.json')
|
|
13
|
-
const { TardisMachine } = await import('../dist/index.js')
|
|
14
13
|
|
|
15
14
|
const DEFAULT_PORT = 8000
|
|
16
15
|
const argv = yargs
|
|
17
16
|
.scriptName('tardis-machine')
|
|
18
17
|
.env('TM_')
|
|
19
18
|
.strict()
|
|
20
|
-
|
|
21
19
|
.option('api-key', {
|
|
22
20
|
type: 'string',
|
|
23
21
|
describe: 'API key for tardis.dev API access'
|
|
@@ -42,13 +40,11 @@ const argv = yargs
|
|
|
42
40
|
describe: 'Run tardis-machine as cluster of Node.js processes',
|
|
43
41
|
default: false
|
|
44
42
|
})
|
|
45
|
-
|
|
46
43
|
.option('debug', {
|
|
47
44
|
type: 'boolean',
|
|
48
45
|
describe: 'Enable debug logs.',
|
|
49
46
|
default: false
|
|
50
47
|
})
|
|
51
|
-
|
|
52
48
|
.help()
|
|
53
49
|
.version()
|
|
54
50
|
.usage('$0 [options]')
|
|
@@ -56,14 +52,14 @@ const argv = yargs
|
|
|
56
52
|
.epilogue('See https://docs.tardis.dev/api/tardis-machine for more information.')
|
|
57
53
|
.detectLocale(false).argv
|
|
58
54
|
|
|
59
|
-
// if port ENV is defined use it otherwise use provided options
|
|
60
55
|
const port = process.env.PORT ? +process.env.PORT : argv['port']
|
|
61
|
-
const enableDebug = argv['debug']
|
|
62
56
|
|
|
63
|
-
if (
|
|
57
|
+
if (argv['debug']) {
|
|
64
58
|
process.env.DEBUG = 'tardis-dev:machine*,tardis-dev:realtime*'
|
|
65
59
|
}
|
|
66
60
|
|
|
61
|
+
const { TardisMachine } = await import('../dist/index.js')
|
|
62
|
+
|
|
67
63
|
async function start() {
|
|
68
64
|
const machine = new TardisMachine({
|
|
69
65
|
apiKey: argv['api-key'],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tardis-machine",
|
|
3
|
-
"version": "15.2.
|
|
3
|
+
"version": "15.2.3",
|
|
4
4
|
"engines": {
|
|
5
5
|
"node": ">=25"
|
|
6
6
|
},
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
"devDependencies": {
|
|
86
86
|
"@types/debug": "^4.1.12",
|
|
87
87
|
"@types/jest": "^30.0.0",
|
|
88
|
-
"@types/node": "^
|
|
88
|
+
"@types/node": "^25.5.2",
|
|
89
89
|
"@types/node-fetch": "^2.6.13",
|
|
90
90
|
"@types/split2": "^4.2.3",
|
|
91
91
|
"@types/ws": "^8.18.1",
|