@sonisoft/now-sdk-ext-cli 5.0.1 → 5.1.0
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/LICENSE +21 -0
- package/README.md +479 -196
- package/dist/common/authenticated-command.d.ts +9 -0
- package/dist/common/authenticated-command.d.ts.map +1 -1
- package/dist/common/authenticated-command.js +50 -4
- package/dist/common/authenticated-command.js.map +1 -1
- package/dist/util/log-factory.d.ts +7 -1
- package/dist/util/log-factory.d.ts.map +1 -1
- package/dist/util/log-factory.js +8 -3
- package/dist/util/log-factory.js.map +1 -1
- package/oclif.manifest.json +1794 -655
- package/package.json +2 -2
|
@@ -6,6 +6,8 @@ export declare abstract class AuthenticatedCommand<T extends typeof Command> ext
|
|
|
6
6
|
static baseFlags: {
|
|
7
7
|
auth: Interfaces.OptionFlag<string | undefined, Interfaces.CustomOptions>;
|
|
8
8
|
'cred-store': Interfaces.BooleanFlag<boolean>;
|
|
9
|
+
'log-dir': Interfaces.OptionFlag<string | undefined, Interfaces.CustomOptions>;
|
|
10
|
+
'log-file': Interfaces.BooleanFlag<boolean>;
|
|
9
11
|
'log-level': Interfaces.OptionFlag<"info" | "debug" | "warn" | "error" | "trace", Interfaces.CustomOptions>;
|
|
10
12
|
};
|
|
11
13
|
static enableJsonFlag: boolean;
|
|
@@ -21,6 +23,13 @@ export declare abstract class AuthenticatedCommand<T extends typeof Command> ext
|
|
|
21
23
|
}): Promise<any>;
|
|
22
24
|
protected finally(_: Error | undefined): Promise<any>;
|
|
23
25
|
init(): Promise<void>;
|
|
26
|
+
/**
|
|
27
|
+
* Whether --log-level was given on the command line rather than defaulted.
|
|
28
|
+
*
|
|
29
|
+
* oclif reports its own default as a parsed value, so `flags['log-level']` cannot
|
|
30
|
+
* distinguish "the user asked for info" from "nobody said anything".
|
|
31
|
+
*/
|
|
32
|
+
private argvHasLogLevel;
|
|
24
33
|
/**
|
|
25
34
|
* Fail with remediation the user can act on.
|
|
26
35
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authenticated-command.d.ts","sourceRoot":"","sources":["../../src/common/authenticated-command.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAS,UAAU,EAAE,MAAM,aAAa,CAAA;AAExD,OAAO,
|
|
1
|
+
{"version":3,"file":"authenticated-command.d.ts","sourceRoot":"","sources":["../../src/common/authenticated-command.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAS,UAAU,EAAE,MAAM,aAAa,CAAA;AAExD,OAAO,EAA+B,MAAM,EAAE,kBAAkB,EAA8B,MAAM,4BAA4B,CAAC;AAMjI,MAAM,MAAM,KAAK,CAAC,CAAC,SAAS,OAAO,OAAO,IAAI,UAAU,CAAC,aAAa,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,OAAO,oBAAoB,CAAC,WAAW,CAAC,CAAC,CAAA;AAC7H,MAAM,MAAM,IAAI,CAAC,CAAC,SAAS,OAAO,OAAO,IAAI,UAAU,CAAC,YAAY,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAA;AAE/E,8BAAsB,oBAAoB,CAAC,CAAC,SAAS,OAAO,OAAO,CAAE,SAAQ,OAAO;IAElF,MAAM,CAAC,SAAS;;;;;;MAkCf;IAEC,MAAM,CAAC,cAAc,UAAO;IAChC,SAAS,CAAC,OAAO,EAAG,MAAM,CAAC;IACvB,SAAS,CAAC,IAAI,EAAG,IAAI,CAAC,CAAC,CAAC,CAAC;IACzB,SAAS,CAAC,UAAU,EAAE,MAAM,CAAC;IAC7B,SAAS,CAAC,KAAK,EAAG,KAAK,CAAC,CAAC,CAAC,CAAC;IAC/B,SAAS,CAAC,QAAQ,EAAE,kBAAkB,CAAC;IAEnC,IAAW,MAAM,IAAI,MAAM,CAE1B;IAED,IAAW,MAAM,CAAC,MAAM,EAAE,MAAM,EAE/B;cAEa,KAAK,CAAC,GAAG,EAAE,KAAK,GAAG;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAC,GAAG,OAAO,CAAC,GAAG,CAAC;cAgBrD,OAAO,CAAC,CAAC,EAAE,KAAK,GAAG,SAAS,GAAG,OAAO,CAAC,GAAG,CAAC;IAO9C,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAwElC;;;;;OAKG;IACH,OAAO,CAAC,eAAe;IAIvB;;;;;;;OAOG;IACH,OAAO,CAAC,QAAQ;CA0BjB"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Command, Flags } from '@oclif/core';
|
|
2
2
|
import { getCredentials } from "@servicenow/sdk-cli/dist/auth/index.js";
|
|
3
|
-
import { ServiceNowInstance } from '@sonisoft/now-sdk-ext-core';
|
|
3
|
+
import { configureLogging, flushLogs, ServiceNowInstance } from '@sonisoft/now-sdk-ext-core';
|
|
4
4
|
import { LogFactory } from '../util/log-factory.js';
|
|
5
5
|
export class AuthenticatedCommand extends Command {
|
|
6
6
|
// // define flags that can be inherited by any command that extends BaseCommand
|
|
@@ -16,6 +16,21 @@ export class AuthenticatedCommand extends Command {
|
|
|
16
16
|
helpGroup: 'GLOBAL',
|
|
17
17
|
required: false,
|
|
18
18
|
}),
|
|
19
|
+
'log-dir': Flags.string({
|
|
20
|
+
description: 'Directory to write log files to. Implies --log-file.',
|
|
21
|
+
helpGroup: 'GLOBAL',
|
|
22
|
+
required: false,
|
|
23
|
+
}),
|
|
24
|
+
// Logging to a file is opt-in. It used to be unconditional, writing
|
|
25
|
+
// ./logs/*.log into whatever directory nex happened to be run from — including
|
|
26
|
+
// CI checkouts — with no way to turn it off. See NEX-3.
|
|
27
|
+
'log-file': Flags.boolean({
|
|
28
|
+
description: 'Write logs to a file. Defaults to $XDG_STATE_HOME/now-sdk-ext/logs ' +
|
|
29
|
+
'(~/.local/state/now-sdk-ext/logs). Off by default; without this, nex logs ' +
|
|
30
|
+
'warnings and errors to stderr only.',
|
|
31
|
+
helpGroup: 'GLOBAL',
|
|
32
|
+
required: false,
|
|
33
|
+
}),
|
|
19
34
|
'log-level': Flags.option({
|
|
20
35
|
default: 'info',
|
|
21
36
|
helpGroup: 'GLOBAL',
|
|
@@ -42,10 +57,17 @@ export class AuthenticatedCommand extends Command {
|
|
|
42
57
|
// with it still undefined and produced "Cannot read properties of undefined
|
|
43
58
|
// (reading 'error')", hiding the actual usage error behind a TypeError.
|
|
44
59
|
this.authLogger?.error("Globally caught exception occurred.", err);
|
|
60
|
+
// Flush HERE, not only in finally(). super.catch() routes into oclif's error
|
|
61
|
+
// handler, which can terminate the process — so finally() is not guaranteed to
|
|
62
|
+
// run, and the record that just got logged is precisely the one worth keeping.
|
|
63
|
+
// Winston buffers, so without this the failure line is lost intermittently.
|
|
64
|
+
await flushLogs();
|
|
45
65
|
return super.catch(err);
|
|
46
66
|
}
|
|
47
67
|
async finally(_) {
|
|
48
|
-
// called after run and catch regardless of whether or not the command errored
|
|
68
|
+
// called after run and catch regardless of whether or not the command errored.
|
|
69
|
+
// Covers the success path; the failure path already flushed in catch().
|
|
70
|
+
await flushLogs();
|
|
49
71
|
return super.finally(_);
|
|
50
72
|
}
|
|
51
73
|
async init() {
|
|
@@ -63,8 +85,23 @@ export class AuthenticatedCommand extends Command {
|
|
|
63
85
|
// value under that exact name. Reading `flags.logLevel` always yielded
|
|
64
86
|
// undefined, silently pinning every command to 'info'.
|
|
65
87
|
const logLevel = this.flags['log-level'] || 'info';
|
|
66
|
-
|
|
67
|
-
|
|
88
|
+
const logDir = this.flags['log-dir'];
|
|
89
|
+
// Configure BEFORE creating any logger. Core's loggers are field initializers on
|
|
90
|
+
// ~43 manager classes and take no arguments, so this process-wide call is the only
|
|
91
|
+
// thing that reaches them — a per-logger level never did.
|
|
92
|
+
configureLogging({
|
|
93
|
+
// --log-dir implies --log-file; requiring both would make `--log-dir ./x` alone
|
|
94
|
+
// silently produce nothing, which reads as a broken flag.
|
|
95
|
+
dir: logDir,
|
|
96
|
+
file: Boolean(this.flags['log-file']) || Boolean(logDir),
|
|
97
|
+
level: logLevel,
|
|
98
|
+
// --json puts machine-readable output on stdout. Warnings on stderr do not
|
|
99
|
+
// corrupt it, but they do land in a terminal the caller is likely piping, so
|
|
100
|
+
// stay quiet unless the level was asked for explicitly.
|
|
101
|
+
...(this.jsonEnabled() && !this.argvHasLogLevel() ? { consoleLevel: 'error' } : {}),
|
|
102
|
+
});
|
|
103
|
+
this.logger = LogFactory.createLogger(this.ctor.name);
|
|
104
|
+
this.authLogger = LogFactory.createLogger("AuthenticatedCommand");
|
|
68
105
|
// const wrapper:CredentialWrapper = new CredentialWrapper();
|
|
69
106
|
// const credential:Creds = await (flags.auth ? wrapper.getStoredCredentialsByAlias(flags.auth) : wrapper.getStoredCredentialsByAlias( 'fluent-default'));
|
|
70
107
|
// const credentialArgs = {"_": "get-credentials", auth: flags.auth || "fluent-default"};
|
|
@@ -96,6 +133,15 @@ export class AuthenticatedCommand extends Command {
|
|
|
96
133
|
};
|
|
97
134
|
this.instance = new ServiceNowInstance(snSettings);
|
|
98
135
|
}
|
|
136
|
+
/**
|
|
137
|
+
* Whether --log-level was given on the command line rather than defaulted.
|
|
138
|
+
*
|
|
139
|
+
* oclif reports its own default as a parsed value, so `flags['log-level']` cannot
|
|
140
|
+
* distinguish "the user asked for info" from "nobody said anything".
|
|
141
|
+
*/
|
|
142
|
+
argvHasLogLevel() {
|
|
143
|
+
return this.argv.some((a) => a === '--log-level' || a.startsWith('--log-level='));
|
|
144
|
+
}
|
|
99
145
|
/**
|
|
100
146
|
* Fail with remediation the user can act on.
|
|
101
147
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authenticated-command.js","sourceRoot":"","sources":["../../src/common/authenticated-command.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,KAAK,EAAc,MAAM,aAAa,CAAA;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AACxE,OAAO,EAAU,kBAAkB,EAA8B,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3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AAI,WAAW;YAAE,WAAW,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;QAElD,MAAM,MAAM,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,mCAAmC,KAAK,IAAI,CAAC;QACrG,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,EAAC,WAAW,EAAC,CAAC,CAAC;IACpC,CAAC"}
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import { Logger } from "@sonisoft/now-sdk-ext-core";
|
|
2
2
|
export declare class LogFactory {
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
* The level is NOT a parameter any more. Core builds one logger for the process,
|
|
5
|
+
* so a per-logger level would only ever have applied to the two loggers created
|
|
6
|
+
* here and never to the ~43 inside core. Set it with `configureLogging({level})`,
|
|
7
|
+
* which AuthenticatedCommand.init does before calling this.
|
|
8
|
+
*/
|
|
9
|
+
static createLogger(name: string): Logger;
|
|
4
10
|
}
|
|
5
11
|
//# sourceMappingURL=log-factory.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"log-factory.d.ts","sourceRoot":"","sources":["../../src/util/log-factory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAGpD,qBAAa,UAAU;
|
|
1
|
+
{"version":3,"file":"log-factory.d.ts","sourceRoot":"","sources":["../../src/util/log-factory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAGpD,qBAAa,UAAU;IACnB;;;;;OAKG;WACW,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;CAGnD"}
|
package/dist/util/log-factory.js
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import { Logger } from "@sonisoft/now-sdk-ext-core";
|
|
2
2
|
export class LogFactory {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
/**
|
|
4
|
+
* The level is NOT a parameter any more. Core builds one logger for the process,
|
|
5
|
+
* so a per-logger level would only ever have applied to the two loggers created
|
|
6
|
+
* here and never to the ~43 inside core. Set it with `configureLogging({level})`,
|
|
7
|
+
* which AuthenticatedCommand.init does before calling this.
|
|
8
|
+
*/
|
|
9
|
+
static createLogger(name) {
|
|
10
|
+
return new Logger(name);
|
|
6
11
|
}
|
|
7
12
|
}
|
|
8
13
|
//# sourceMappingURL=log-factory.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"log-factory.js","sourceRoot":"","sources":["../../src/util/log-factory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAGpD,MAAM,OAAO,UAAU;
|
|
1
|
+
{"version":3,"file":"log-factory.js","sourceRoot":"","sources":["../../src/util/log-factory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAGpD,MAAM,OAAO,UAAU;IACnB;;;;;OAKG;IACI,MAAM,CAAC,YAAY,CAAC,IAAY;QACnC,OAAO,IAAI,MAAM,CAAC,IAAI,CAAC,CAAC;IAC5B,CAAC;CACJ"}
|