@sonisoft/now-sdk-ext-cli 2.3.1 → 3.0.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/README.md +80 -80
- package/dist/commands/log/index.js +1 -1
- package/dist/commands/log/index.js.map +1 -1
- package/dist/common/authenticated-command.d.ts.map +1 -1
- package/dist/common/authenticated-command.js +13 -6
- package/dist/common/authenticated-command.js.map +1 -1
- package/oclif.manifest.json +813 -813
- package/package.json +11 -11
- package/dist/common/base-command.d.ts +0 -19
- package/dist/common/base-command.d.ts.map +0 -1
- package/dist/common/base-command.js +0 -42
- package/dist/common/base-command.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sonisoft/now-sdk-ext-cli",
|
|
3
3
|
"description": "A CLI extending the functionality of the ServiceNow SDK.",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "3.0.0",
|
|
5
5
|
"author": "Chris Nanda",
|
|
6
6
|
"bin": {
|
|
7
7
|
"nex": "./bin/run.js"
|
|
@@ -11,18 +11,18 @@
|
|
|
11
11
|
"@oclif/plugin-autocomplete": "^3.2.35",
|
|
12
12
|
"@oclif/plugin-help": "^6.2.10",
|
|
13
13
|
"@oclif/plugin-plugins": "^5.4.6",
|
|
14
|
-
"@servicenow/glide": "^27.0.
|
|
15
|
-
"@servicenow/sdk": "4.
|
|
16
|
-
"@servicenow/sdk-build-core": "4.
|
|
17
|
-
"@servicenow/sdk-cli": "4.
|
|
14
|
+
"@servicenow/glide": "^27.0.5",
|
|
15
|
+
"@servicenow/sdk": "4.9.2",
|
|
16
|
+
"@servicenow/sdk-build-core": "4.9.2",
|
|
17
|
+
"@servicenow/sdk-cli": "4.9.2",
|
|
18
18
|
"@servicenow/sdk-cli-core": "3.0.3",
|
|
19
|
-
"@servicenow/sdk-core": "4.
|
|
19
|
+
"@servicenow/sdk-core": "4.9.2",
|
|
20
20
|
"@sonisoft/now-sdk-ext-core": "^3.9.0",
|
|
21
21
|
"@ts-morph/common": "^0.24.0",
|
|
22
22
|
"chalk": "^4.1.2",
|
|
23
|
-
"cometd": "^
|
|
23
|
+
"cometd": "^9.0.1",
|
|
24
24
|
"cometd-nodejs-client": "^2.0.0",
|
|
25
|
-
"fast-xml-parser": "^
|
|
25
|
+
"fast-xml-parser": "^5.10.1",
|
|
26
26
|
"fs-extra": "^11.2.0",
|
|
27
27
|
"is-null-or-empty": "^0.0.1",
|
|
28
28
|
"winston": "3.14.2",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"jest-junit": "^16.0.0",
|
|
53
53
|
"oclif": "^4",
|
|
54
54
|
"rimraf": "^6.0.1",
|
|
55
|
-
"semantic-release": "^
|
|
55
|
+
"semantic-release": "^25.0.8",
|
|
56
56
|
"shx": "^0.4.0",
|
|
57
57
|
"ts-jest": "^29.2.5",
|
|
58
58
|
"ts-jest-mocker": "^1.0.0",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"typescript": "^5.5.4"
|
|
62
62
|
},
|
|
63
63
|
"engines": {
|
|
64
|
-
"node": ">=
|
|
64
|
+
"node": ">=26.0.0"
|
|
65
65
|
},
|
|
66
66
|
"files": [
|
|
67
67
|
"/bin",
|
|
@@ -175,7 +175,7 @@
|
|
|
175
175
|
},
|
|
176
176
|
"scripts": {
|
|
177
177
|
"clean": "rimraf dist && rimraf tsconfig.tsbuildinfo",
|
|
178
|
-
"prepare": "git config core.hooksPath .githooks",
|
|
178
|
+
"prepare": "git config core.hooksPath .githooks && sh scripts/setup-gitleaks.sh",
|
|
179
179
|
"buildts": "tsc -p ./ && tsc-alias -p ./tsconfig.json --resolve-full-paths",
|
|
180
180
|
"buildp": "npm run buildts && npm run lint",
|
|
181
181
|
"build": "npm run clean && npm run buildts",
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Command, Interfaces } from '@oclif/core';
|
|
2
|
-
import { Logger } from '@sonisoft/now-sdk-ext-core';
|
|
3
|
-
export type Flags<T extends typeof Command> = Interfaces.InferredFlags<T['flags'] & typeof BaseCommand['baseFlags']>;
|
|
4
|
-
export type Args<T extends typeof Command> = Interfaces.InferredArgs<T['args']>;
|
|
5
|
-
export declare abstract class BaseCommand<T extends typeof Command> extends Command {
|
|
6
|
-
static baseFlags: {
|
|
7
|
-
'log-level': Interfaces.OptionFlag<"info" | "debug" | "warn" | "error" | "trace", Interfaces.CustomOptions>;
|
|
8
|
-
};
|
|
9
|
-
static enableJsonFlag: boolean;
|
|
10
|
-
protected args: Args<T>;
|
|
11
|
-
protected flags: Flags<T>;
|
|
12
|
-
protected logger: Logger;
|
|
13
|
-
protected catch(err: Error & {
|
|
14
|
-
exitCode?: number;
|
|
15
|
-
}): Promise<any>;
|
|
16
|
-
protected finally(_: Error | undefined): Promise<any>;
|
|
17
|
-
init(): Promise<void>;
|
|
18
|
-
}
|
|
19
|
-
//# sourceMappingURL=base-command.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"base-command.d.ts","sourceRoot":"","sources":["../../src/common/base-command.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,OAAO,EAAS,UAAU,EAAC,MAAM,aAAa,CAAA;AACtD,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AAEnD,MAAM,MAAM,KAAK,CAAC,CAAC,SAAS,OAAO,OAAO,IAAI,UAAU,CAAC,aAAa,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,OAAO,WAAW,CAAC,WAAW,CAAC,CAAC,CAAA;AACpH,MAAM,MAAM,IAAI,CAAC,CAAC,SAAS,OAAO,OAAO,IAAI,UAAU,CAAC,YAAY,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAA;AAE/E,8BAAsB,WAAW,CAAC,CAAC,SAAS,OAAO,OAAO,CAAE,SAAQ,OAAO;IAEzE,MAAM,CAAC,SAAS;;MAOf;IAED,MAAM,CAAC,cAAc,UAAO;IAC9B,SAAS,CAAC,IAAI,EAAG,IAAI,CAAC,CAAC,CAAC,CAAC;IACvB,SAAS,CAAC,KAAK,EAAG,KAAK,CAAC,CAAC,CAAC,CAAC;IAC3B,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC;cAET,KAAK,CAAC,GAAG,EAAE,KAAK,GAAG;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAC,GAAG,OAAO,CAAC,GAAG,CAAC;cAQrD,OAAO,CAAC,CAAC,EAAE,KAAK,GAAG,SAAS,GAAG,OAAO,CAAC,GAAG,CAAC;IAO9C,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAenC"}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { Command, Flags } from '@oclif/core';
|
|
2
|
-
import { Logger } from '@sonisoft/now-sdk-ext-core';
|
|
3
|
-
export class BaseCommand extends Command {
|
|
4
|
-
// define flags that can be inherited by any command that extends BaseCommand
|
|
5
|
-
static baseFlags = {
|
|
6
|
-
'log-level': Flags.option({
|
|
7
|
-
default: 'info',
|
|
8
|
-
helpGroup: 'GLOBAL',
|
|
9
|
-
options: ['debug', 'warn', 'error', 'info', 'trace'],
|
|
10
|
-
summary: 'Specify level for logging.',
|
|
11
|
-
})(),
|
|
12
|
-
};
|
|
13
|
-
// add the --json flag
|
|
14
|
-
static enableJsonFlag = true;
|
|
15
|
-
args;
|
|
16
|
-
flags;
|
|
17
|
-
logger;
|
|
18
|
-
async catch(err) {
|
|
19
|
-
// add any custom logic to handle errors from the command
|
|
20
|
-
// or simply return the parent class error handling
|
|
21
|
-
this.logger.error("Globally caught exception occurred.", err);
|
|
22
|
-
return super.catch(err);
|
|
23
|
-
}
|
|
24
|
-
async finally(_) {
|
|
25
|
-
// called after run and catch regardless of whether or not the command errored
|
|
26
|
-
return super.finally(_);
|
|
27
|
-
}
|
|
28
|
-
async init() {
|
|
29
|
-
await super.init();
|
|
30
|
-
const { args, flags } = await this.parse({
|
|
31
|
-
args: this.ctor.args,
|
|
32
|
-
baseFlags: super.ctor.baseFlags,
|
|
33
|
-
enableJsonFlag: this.ctor.enableJsonFlag,
|
|
34
|
-
flags: this.ctor.flags,
|
|
35
|
-
strict: this.ctor.strict,
|
|
36
|
-
});
|
|
37
|
-
this.flags = flags;
|
|
38
|
-
this.args = args;
|
|
39
|
-
this.logger = new Logger("");
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
//# sourceMappingURL=base-command.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"base-command.js","sourceRoot":"","sources":["../../src/common/base-command.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,OAAO,EAAE,KAAK,EAAa,MAAM,aAAa,CAAA;AACtD,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AAKnD,MAAM,OAAgB,WAAsC,SAAQ,OAAO;IACzE,6EAA6E;IAC7E,MAAM,CAAC,SAAS,GAAG;QACjB,WAAW,EAAE,KAAK,CAAC,MAAM,CAAC;YACxB,OAAO,EAAE,MAAM;YACf,SAAS,EAAE,QAAQ;YACnB,OAAO,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,CAAU;YAC7D,OAAO,EAAE,4BAA4B;SACtC,CAAC,EAAE;KACL,CAAA;IACH,sBAAsB;IACpB,MAAM,CAAC,cAAc,GAAG,IAAI,CAAA;IACpB,IAAI,CAAW;IACb,KAAK,CAAY;IACjB,MAAM,CAAS;IAEf,KAAK,CAAC,KAAK,CAAC,GAAgC;QACpD,yDAAyD;QACzD,mDAAmD;QACnD,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,qCAAqC,EAAE,GAAG,CAAC,CAAC;QAE9D,OAAO,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;IACzB,CAAC;IAES,KAAK,CAAC,OAAO,CAAC,CAAoB;QAC1C,8EAA8E;QAG9E,OAAO,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAA;IACzB,CAAC;IAEM,KAAK,CAAC,IAAI;QACf,MAAM,KAAK,CAAC,IAAI,EAAE,CAAA;QAClB,MAAM,EAAC,IAAI,EAAE,KAAK,EAAC,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC;YACrC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI;YACpB,SAAS,EAAG,KAAK,CAAC,IAA2B,CAAC,SAAS;YACvD,cAAc,EAAE,IAAI,CAAC,IAAI,CAAC,cAAc;YACxC,KAAK,EAAE,IAAI,CAAC,IAAI,CAAC,KAAK;YACtB,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,MAAM;SACzB,CAAC,CAAA;QACF,IAAI,CAAC,KAAK,GAAG,KAAiB,CAAA;QAC9B,IAAI,CAAC,IAAI,GAAG,IAAe,CAAA;QAG3B,IAAI,CAAC,MAAM,GAAG,IAAI,MAAM,CAAC,EAAE,CAAC,CAAC;IAC/B,CAAC"}
|