tardis-machine
Advanced tools
Comparing version 2.0.0 to 2.0.1
@@ -7,4 +7,2 @@ #!/usr/bin/env node | ||
const { TardisMachine } = require('../dist') | ||
const DEFAULT_PORT = 8000 | ||
@@ -36,2 +34,14 @@ const argv = yargs | ||
.option('port', { | ||
type: 'number', | ||
describe: 'Port to bind server on', | ||
default: DEFAULT_PORT | ||
}) | ||
.option('debug', { | ||
type: 'boolean', | ||
describe: 'Enable debug logs.', | ||
default: false | ||
}) | ||
.help() | ||
@@ -46,3 +56,10 @@ .version() | ||
const portToListenTo = process.env.PORT ? +process.env.PORT : argv['port'] | ||
const enableDebug = argv['debug'] | ||
if (enableDebug) { | ||
process.env.DEBUG = 'tardis-dev:machine*' | ||
} | ||
const { TardisMachine } = require('../dist') | ||
new TardisMachine({ | ||
@@ -49,0 +66,0 @@ apiKey: argv['api-key'], |
@@ -14,2 +14,3 @@ "use strict"; | ||
const ws_2 = require("./ws"); | ||
const pkg = require('../package.json'); | ||
class TardisMachine { | ||
@@ -69,6 +70,6 @@ constructor(options) { | ||
if (is_docker_1.default() && !process.env.RUNKIT_HOST) { | ||
console.log(`tardis-machine is running inside Docker container...`); | ||
console.log(`tardis-machine v${pkg.version} is running inside Docker container...`); | ||
} | ||
else { | ||
console.log(`tardis-machine is running on ${port} port...`); | ||
console.log(`tardis-machine v${pkg.version} is running on ${port} port...`); | ||
} | ||
@@ -75,0 +76,0 @@ console.log(`See https://docs.tardis.dev/api/tardis-machine for more information.`); |
{ | ||
"name": "tardis-machine", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"engines": { | ||
@@ -5,0 +5,0 @@ "node": ">=12" |
@@ -10,2 +10,4 @@ import findMyWay from 'find-my-way' | ||
const pkg = require('../package.json') | ||
export class TardisMachine { | ||
@@ -77,5 +79,5 @@ private readonly _httpServer: http.Server | ||
if (isDocker() && !process.env.RUNKIT_HOST) { | ||
console.log(`tardis-machine is running inside Docker container...`) | ||
console.log(`tardis-machine v${pkg.version} is running inside Docker container...`) | ||
} else { | ||
console.log(`tardis-machine is running on ${port} port...`) | ||
console.log(`tardis-machine v${pkg.version} is running on ${port} port...`) | ||
} | ||
@@ -82,0 +84,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
151922
2209
5