mirror of
https://github.com/unraid/api.git
synced 2026-02-12 02:58:46 -06:00
fix: switch to dedent-tabs
This commit is contained in:
17
app/cli.ts
17
app/cli.ts
@@ -6,7 +6,7 @@ import dotEnv from 'dotenv';
|
||||
import findProcess from 'find-process';
|
||||
import pidusage from 'pidusage';
|
||||
import prettyMs from 'pretty-ms';
|
||||
import dedent from 'dedent';
|
||||
import dedent from 'dedent-tabs';
|
||||
import { version } from '../package.json';
|
||||
import { paths } from './core/paths';
|
||||
|
||||
@@ -169,12 +169,15 @@ const commands = {
|
||||
// Find all processes called "unraid-api" which aren't this process
|
||||
const unraidApiPid = await getUnraidApiPid();
|
||||
const unraidVersion = fs.existsSync(paths.get('unraid-version')!) ? fs.readFileSync(paths.get('unraid-version')!, 'utf8').split('"')[1] : 'unknown';
|
||||
console.log(`
|
||||
<-----UNRAID-API-REPORT----->
|
||||
Environment: ${environment}
|
||||
Node API version: ${version} (${unraidApiPid ? 'running' : 'stopped'})
|
||||
Unraid version: ${unraidVersion}
|
||||
</----UNRAID-API-REPORT----->`);
|
||||
console.log(
|
||||
dedent`
|
||||
<-----UNRAID-API-REPORT----->
|
||||
Environment: ${environment}
|
||||
Node API version: ${version} (${unraidApiPid ? 'running' : 'stopped'})
|
||||
Unraid version: ${unraidVersion}
|
||||
</----UNRAID-API-REPORT----->
|
||||
`
|
||||
);
|
||||
},
|
||||
async 'switch-env'() {
|
||||
const basePath = paths.get('unraid-api-base')!;
|
||||
|
||||
5
package-lock.json
generated
5
package-lock.json
generated
@@ -5235,6 +5235,11 @@
|
||||
"integrity": "sha1-JJXduvbrh0q7Dhvp3yLS5aVEMmw=",
|
||||
"dev": true
|
||||
},
|
||||
"dedent-tabs": {
|
||||
"version": "0.9.0",
|
||||
"resolved": "https://registry.npmjs.org/dedent-tabs/-/dedent-tabs-0.9.0.tgz",
|
||||
"integrity": "sha512-XpJr3b3pX6XHK0MDE9/hF2AxAIqzeBhBWqQ22PlzEZFqR31N8x44+e/iML76cwVvhjVqk1BqZeTBS9BrccMJlA=="
|
||||
},
|
||||
"deep-extend": {
|
||||
"version": "0.6.0",
|
||||
"resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz",
|
||||
|
||||
@@ -61,6 +61,7 @@
|
||||
"cli-table": "^0.3.4",
|
||||
"command-exists": "^1.2.9",
|
||||
"cross-fetch": "^3.1.4",
|
||||
"dedent-tabs": "^0.9.0",
|
||||
"deepmerge": "^4.2.2",
|
||||
"dl-tgz": "^0.7.1",
|
||||
"dockerode": "^3.3.0",
|
||||
|
||||
Reference in New Issue
Block a user