@sonisoft/now-sdk-ext-cli 1.1.0-alpha.0 → 1.1.0-alpha.2

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 CHANGED
@@ -29,7 +29,7 @@ $ npm install -g @sonisoft/now-sdk-ext-cli
29
29
  $ nex COMMAND
30
30
  running command...
31
31
  $ nex (--version)
32
- @sonisoft/now-sdk-ext-cli/1.1.0-alpha.0 darwin-arm64 node-v22.6.0
32
+ @sonisoft/now-sdk-ext-cli/1.1.0-alpha.2 darwin-arm64 node-v22.6.0
33
33
  $ nex --help [COMMAND]
34
34
  USAGE
35
35
  $ nex COMMAND
@@ -38,6 +38,8 @@ USAGE
38
38
  <!-- usagestop -->
39
39
  # Commands
40
40
  <!-- commands -->
41
+ * [`nex app`](#nex-app)
42
+ * [`nex app install`](#nex-app-install)
41
43
  * [`nex exec SCOPE FILE`](#nex-exec-scope-file)
42
44
  * [`nex help [COMMAND]`](#nex-help-command)
43
45
  * [`nex plugins`](#nex-plugins)
@@ -51,6 +53,54 @@ USAGE
51
53
  * [`nex plugins unlink [PLUGIN]`](#nex-plugins-unlink-plugin)
52
54
  * [`nex plugins update`](#nex-plugins-update)
53
55
 
56
+ ## `nex app`
57
+
58
+ ```
59
+ USAGE
60
+ $ nex app [--json] [-a <value>] [--log-level debug|warn|error|info|trace] [-u] [-i <value>] [-s <value>]
61
+
62
+ FLAGS
63
+ -a, --auth=<value> Auth alias to use.
64
+ -i, --applicationId=<value> Application sys_id
65
+ -s, --scope=<value> Scope of application.
66
+ -u, --uninstall Uninstall the app
67
+
68
+ GLOBAL FLAGS
69
+ --json Format output as json.
70
+ --log-level=<option> [default: info] Specify level for logging.
71
+ <options: debug|warn|error|info|trace>
72
+
73
+ EXAMPLES
74
+ $ nex app exec global test.js --auth sn_alias
75
+ test
76
+ ```
77
+
78
+ ## `nex app install`
79
+
80
+ Install or Upgrade application(s) from batch definition file
81
+
82
+ ```
83
+ USAGE
84
+ $ nex app install [--json] [-a <value>] [--log-level debug|warn|error|info|trace] [-b] [-d <value>]
85
+
86
+ FLAGS
87
+ -a, --auth=<value> Auth alias to use.
88
+ -b, --batch Install from batch definition file
89
+ -d, --definitionPath=<value> Batch definition file
90
+
91
+ GLOBAL FLAGS
92
+ --json Format output as json.
93
+ --log-level=<option> [default: info] Specify level for logging.
94
+ <options: debug|warn|error|info|trace>
95
+
96
+ DESCRIPTION
97
+ Install or Upgrade application(s) from batch definition file
98
+
99
+ EXAMPLES
100
+ $ nex app install exec global test.js --auth sn_alias
101
+ test
102
+ ```
103
+
54
104
  ## `nex exec SCOPE FILE`
55
105
 
56
106
  Execute a local javascript file on a ServiceNow instance using Scripts - Background remotely. Returns the output/raw console output that Scripts - Background outputs to the browser in order to support the execution and result being piped to another command.
@@ -99,7 +149,7 @@ DESCRIPTION
99
149
  Display help for nex.
100
150
  ```
101
151
 
102
- _See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v6.2.13/src/commands/help.ts)_
152
+ _See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v6.2.32/src/commands/help.ts)_
103
153
 
104
154
  ## `nex plugins`
105
155
 
@@ -122,7 +172,7 @@ EXAMPLES
122
172
  $ nex plugins
123
173
  ```
124
174
 
125
- _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.10/src/commands/plugins/index.ts)_
175
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.46/src/commands/plugins/index.ts)_
126
176
 
127
177
  ## `nex plugins add PLUGIN`
128
178
 
@@ -196,7 +246,7 @@ EXAMPLES
196
246
  $ nex plugins inspect myplugin
197
247
  ```
198
248
 
199
- _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.10/src/commands/plugins/inspect.ts)_
249
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.46/src/commands/plugins/inspect.ts)_
200
250
 
201
251
  ## `nex plugins install PLUGIN`
202
252
 
@@ -245,7 +295,7 @@ EXAMPLES
245
295
  $ nex plugins install someuser/someplugin
246
296
  ```
247
297
 
248
- _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.10/src/commands/plugins/install.ts)_
298
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.46/src/commands/plugins/install.ts)_
249
299
 
250
300
  ## `nex plugins link PATH`
251
301
 
@@ -265,6 +315,7 @@ FLAGS
265
315
 
266
316
  DESCRIPTION
267
317
  Links a plugin into the CLI for development.
318
+
268
319
  Installation of a linked plugin will override a user-installed or core plugin.
269
320
 
270
321
  e.g. If you have a user-installed or core plugin that has a 'hello' command, installing a linked plugin with a 'hello'
@@ -275,7 +326,7 @@ EXAMPLES
275
326
  $ nex plugins link myplugin
276
327
  ```
277
328
 
278
- _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.10/src/commands/plugins/link.ts)_
329
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.46/src/commands/plugins/link.ts)_
279
330
 
280
331
  ## `nex plugins remove [PLUGIN]`
281
332
 
@@ -316,7 +367,7 @@ FLAGS
316
367
  --reinstall Reinstall all plugins after uninstalling.
317
368
  ```
318
369
 
319
- _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.10/src/commands/plugins/reset.ts)_
370
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.46/src/commands/plugins/reset.ts)_
320
371
 
321
372
  ## `nex plugins uninstall [PLUGIN]`
322
373
 
@@ -344,7 +395,7 @@ EXAMPLES
344
395
  $ nex plugins uninstall myplugin
345
396
  ```
346
397
 
347
- _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.10/src/commands/plugins/uninstall.ts)_
398
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.46/src/commands/plugins/uninstall.ts)_
348
399
 
349
400
  ## `nex plugins unlink [PLUGIN]`
350
401
 
@@ -388,5 +439,5 @@ DESCRIPTION
388
439
  Update installed plugins.
389
440
  ```
390
441
 
391
- _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.10/src/commands/plugins/update.ts)_
442
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.46/src/commands/plugins/update.ts)_
392
443
  <!-- commandsstop -->
@@ -0,0 +1,14 @@
1
+ import { AuthenticatedCommand } from '../../common/authenticated-command.js';
2
+ export declare class App extends AuthenticatedCommand<typeof App> {
3
+ static args: {};
4
+ static description: string;
5
+ static examples: string[];
6
+ static flags: {
7
+ uninstall: import("@oclif/core/lib/interfaces/parser.js").BooleanFlag<boolean>;
8
+ applicationId: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
9
+ scope: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
10
+ };
11
+ private _logger;
12
+ run(): Promise<void>;
13
+ }
14
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/app/index.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAA;AAE5E,qBAAa,GAAI,SAAQ,oBAAoB,CAAC,OAAO,GAAG,CAAC;IAEvD,MAAM,CAAC,IAAI,KACV;IAED,MAAM,CAAC,WAAW,SAAM;IACxB,MAAM,CAAC,QAAQ,WAId;IAED,MAAM,CAAC,KAAK;;;;MAMX;IAED,OAAO,CAAC,OAAO,CAAmC;IAE5C,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CA0C3B"}
@@ -0,0 +1,52 @@
1
+ /* eslint-disable @typescript-eslint/no-unused-vars */
2
+ /* eslint-disable perfectionist/sort-objects */
3
+ import { Flags } from '@oclif/core';
4
+ import { Application, Logger, NowStringUtil } from '@sonisoft/now-sdk-ext-core';
5
+ import { AuthenticatedCommand } from '../../common/authenticated-command.js';
6
+ export class App extends AuthenticatedCommand {
7
+ static args = {};
8
+ static description = '';
9
+ static examples = [
10
+ `<%= config.bin %> <%= command.id %> exec global test.js --auth sn_alias
11
+ test
12
+ `,
13
+ ];
14
+ static flags = {
15
+ // from: Flags.string({char: 'f', description: 'Who is saying hello', required: true}),
16
+ uninstall: Flags.boolean({ char: 'u', description: 'Uninstall the app', required: false }),
17
+ applicationId: Flags.string({ char: 'i', description: 'Application sys_id', required: false }),
18
+ scope: Flags.string({ char: 's', description: 'Scope of application.', required: false }),
19
+ };
20
+ _logger = new Logger("AppCommand");
21
+ async run() {
22
+ const { args, flags } = await this.parse(App);
23
+ this.log("App command");
24
+ if (flags.uninstall) {
25
+ if (!NowStringUtil.isStringEmpty(args.file) && !NowStringUtil.isStringEmpty(args.scope)) {
26
+ try {
27
+ this.log("Uninstalling app");
28
+ if (NowStringUtil.isStringEmpty(flags.applicationId)) {
29
+ this.error("Application ID is required when uninstalling an app");
30
+ return;
31
+ }
32
+ if (NowStringUtil.isStringEmpty(flags.scope)) {
33
+ this.error("Scope is required when uninstalling an app");
34
+ return;
35
+ }
36
+ this.log("Passed checks. Uninstalling app.");
37
+ const app = new Application(this.instance, flags.scope, flags.applicationId);
38
+ await app.changeApplication();
39
+ await app.uninstall();
40
+ }
41
+ catch (error) {
42
+ this._logger.error("Error occurred when executing background script.", error);
43
+ this.error(error);
44
+ }
45
+ }
46
+ else {
47
+ this.error("No action specified");
48
+ }
49
+ }
50
+ }
51
+ }
52
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/commands/app/index.ts"],"names":[],"mappings":"AAAA,sDAAsD;AACtD,+CAA+C;AAC/C,OAAO,EAAgB,KAAK,EAAC,MAAM,aAAa,CAAA;AAChD,OAAO,EAAG,WAAW,EAAiD,MAAM,EAAE,aAAa,EAAuB,MAAM,4BAA4B,CAAC;AAIrJ,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAA;AAE5E,MAAM,OAAO,GAAI,SAAQ,oBAAgC;IAEvD,MAAM,CAAC,IAAI,GAAG,EACb,CAAA;IAED,MAAM,CAAC,WAAW,GAAG,EAAE,CAAC;IACxB,MAAM,CAAC,QAAQ,GAAG;QAChB;;CAEH;KACE,CAAA;IAED,MAAM,CAAC,KAAK,GAAG;QACb,uFAAuF;QACvF,SAAS,EAAE,KAAK,CAAC,OAAO,CAAC,EAAC,IAAI,EAAE,GAAG,EAAE,WAAW,EAAE,mBAAmB,EAAE,QAAQ,EAAE,KAAK,EAAC,CAAC;QAExF,aAAa,EAAE,KAAK,CAAC,MAAM,CAAC,EAAC,IAAI,EAAE,GAAG,EAAE,WAAW,EAAE,oBAAoB,EAAE,QAAQ,EAAE,KAAK,EAAC,CAAC;QAC5F,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,EAAC,IAAI,EAAE,GAAG,EAAE,WAAW,EAAE,uBAAuB,EAAE,QAAQ,EAAE,KAAK,EAAC,CAAC;KACxF,CAAA;IAEO,OAAO,GAAU,IAAI,MAAM,CAAC,YAAY,CAAC,CAAC;IAElD,KAAK,CAAC,GAAG;QACP,MAAM,EAAC,IAAI,EAAE,KAAK,EAAC,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAE5C,IAAI,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;QAIxB,IAAG,KAAK,CAAC,SAAS,EAAC,CAAC;YACpB,IAAG,CAAC,aAAa,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,EAAC,CAAC;gBACtF,IAAG,CAAC;oBAEA,IAAI,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC;oBAE7B,IAAG,aAAa,CAAC,aAAa,CAAC,KAAK,CAAC,aAAa,CAAC,EAAC,CAAC;wBACnD,IAAI,CAAC,KAAK,CAAC,qDAAqD,CAAC,CAAC;wBAClE,OAAO;oBACT,CAAC;oBAED,IAAG,aAAa,CAAC,aAAa,CAAC,KAAK,CAAC,KAAK,CAAC,EAAC,CAAC;wBAC3C,IAAI,CAAC,KAAK,CAAC,4CAA4C,CAAC,CAAC;wBACzD,OAAO;oBACT,CAAC;oBAED,IAAI,CAAC,GAAG,CAAC,kCAAkC,CAAC,CAAC;oBAC7C,MAAM,GAAG,GAAG,IAAI,WAAW,CAAC,IAAI,CAAC,QAAQ,EAAE,KAAK,CAAC,KAAe,EAAG,KAAK,CAAC,aAAuB,CAAC,CAAC;oBAClG,MAAM,GAAG,CAAC,iBAAiB,EAAE,CAAC;oBAC9B,MAAM,GAAG,CAAC,SAAS,EAAE,CAAC;gBAG1B,CAAC;gBAAA,OAAM,KAAK,EAAC,CAAC;oBACZ,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,kDAAkD,EAAE,KAAc,CAAC,CAAC;oBACvF,IAAI,CAAC,KAAK,CAAC,KAAc,CAAC,CAAC;gBAC7B,CAAC;YAEH,CAAC;iBAAI,CAAC;gBACJ,IAAI,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC;YACpC,CAAC;QAGD,CAAC;IAEH,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { AuthenticatedCommand } from '../../common/authenticated-command.js';
2
+ export declare class Install extends AuthenticatedCommand<typeof Install> {
3
+ static args: {};
4
+ static description: string;
5
+ static examples: string[];
6
+ static flags: {
7
+ batch: import("@oclif/core/lib/interfaces/parser.js").BooleanFlag<boolean>;
8
+ definitionPath: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
9
+ };
10
+ private _logger;
11
+ run(): Promise<void>;
12
+ }
13
+ //# sourceMappingURL=install.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"install.d.ts","sourceRoot":"","sources":["../../../src/commands/app/install.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAA;AAE5E,qBAAa,OAAQ,SAAQ,oBAAoB,CAAC,OAAO,OAAO,CAAC;IAE/D,MAAM,CAAC,IAAI,KACV;IAED,MAAM,CAAC,WAAW,SAAkE;IAEpF,MAAM,CAAC,QAAQ,WAId;IAED,MAAM,CAAC,KAAK;;;MAKX;IAED,OAAO,CAAC,OAAO,CAA0C;IAEnD,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CA2B3B"}
@@ -0,0 +1,40 @@
1
+ /* eslint-disable @typescript-eslint/no-unused-vars */
2
+ import { Flags } from '@oclif/core';
3
+ import { ApplicationManager, Logger, NowStringUtil } from '@sonisoft/now-sdk-ext-core';
4
+ import path from 'node:path';
5
+ import { AuthenticatedCommand } from '../../common/authenticated-command.js';
6
+ export class Install extends AuthenticatedCommand {
7
+ static args = {};
8
+ static description = 'Install or Upgrade application(s) from batch definition file';
9
+ static examples = [
10
+ `<%= config.bin %> <%= command.id %> exec global test.js --auth sn_alias
11
+ test
12
+ `,
13
+ ];
14
+ static flags = {
15
+ batch: Flags.boolean({ char: 'b', description: 'Install from batch definition file', required: false }),
16
+ definitionPath: Flags.string({ char: 'd', description: 'Batch definition file', required: false }),
17
+ };
18
+ _logger = new Logger("AppInstallCommand");
19
+ async run() {
20
+ const { args, flags } = await this.parse(Install);
21
+ this.log("App Install Command Executed.");
22
+ if (!NowStringUtil.isStringEmpty(flags.batch) && !NowStringUtil.isStringEmpty(flags.definitionPath)) {
23
+ try {
24
+ this.log("Installing app");
25
+ if (NowStringUtil.isStringEmpty(flags.definitionPath)) {
26
+ this.error("Batch definition patch is required to execute install.");
27
+ return;
28
+ }
29
+ const appManager = new ApplicationManager(this.instance);
30
+ const result = await appManager.installBatch(path.resolve(flags.definitionPath));
31
+ this.log(result.toString());
32
+ }
33
+ catch (error) {
34
+ this._logger.error("Error occurred.", error);
35
+ this.error(error);
36
+ }
37
+ }
38
+ }
39
+ }
40
+ //# sourceMappingURL=install.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"install.js","sourceRoot":"","sources":["../../../src/commands/app/install.ts"],"names":[],"mappings":"AAAA,sDAAsD;AAEtD,OAAO,EAAgB,KAAK,EAAC,MAAM,aAAa,CAAA;AAChD,OAAO,EAAgB,kBAAkB,EAA6B,MAAM,EAAE,aAAa,EAAuB,MAAM,4BAA4B,CAAC;AAErJ,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAA;AAE5E,MAAM,OAAO,OAAQ,SAAQ,oBAAoC;IAE/D,MAAM,CAAC,IAAI,GAAG,EACb,CAAA;IAED,MAAM,CAAC,WAAW,GAAG,8DAA8D,CAAC;IAEpF,MAAM,CAAC,QAAQ,GAAG;QAChB;;CAEH;KACE,CAAA;IAED,MAAM,CAAC,KAAK,GAAG;QAEb,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,EAAC,IAAI,EAAE,GAAG,EAAE,WAAW,EAAE,oCAAoC,EAAE,QAAQ,EAAE,KAAK,EAAC,CAAC;QACrG,cAAc,EAAE,KAAK,CAAC,MAAM,CAAC,EAAC,IAAI,EAAE,GAAG,EAAE,WAAW,EAAE,uBAAuB,EAAE,QAAQ,EAAE,KAAK,EAAC,CAAC;KAEjG,CAAA;IAEO,OAAO,GAAU,IAAI,MAAM,CAAC,mBAAmB,CAAC,CAAC;IAEzD,KAAK,CAAC,GAAG;QACP,MAAM,EAAC,IAAI,EAAE,KAAK,EAAC,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QAEhD,IAAI,CAAC,GAAG,CAAC,+BAA+B,CAAC,CAAC;QAE1C,IAAG,CAAC,aAAa,CAAC,aAAa,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC,aAAa,CAAC,KAAK,CAAC,cAAc,CAAC,EAAC,CAAC;YAClG,IAAG,CAAC;gBACF,IAAI,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;gBAE3B,IAAG,aAAa,CAAC,aAAa,CAAC,KAAK,CAAC,cAAc,CAAC,EAAC,CAAC;oBACpD,IAAI,CAAC,KAAK,CAAC,wDAAwD,CAAC,CAAC;oBACrE,OAAO;gBACT,CAAC;gBAED,MAAM,UAAU,GAAG,IAAI,kBAAkB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;gBACzD,MAAM,MAAM,GAAG,MAAM,UAAU,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,cAAwB,CAAC,CAAC,CAAC;gBAC3F,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC;YAE9B,CAAC;YAAA,OAAM,KAAK,EAAC,CAAC;gBACZ,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,iBAAiB,EAAE,KAAc,CAAC,CAAC;gBACtD,IAAI,CAAC,KAAK,CAAC,KAAc,CAAC,CAAC;YAC7B,CAAC;QAGH,CAAC;IAEH,CAAC"}
@@ -1,5 +1,162 @@
1
1
  {
2
2
  "commands": {
3
+ "app": {
4
+ "aliases": [],
5
+ "args": {},
6
+ "description": "",
7
+ "examples": [
8
+ "<%= config.bin %> <%= command.id %> exec global test.js --auth sn_alias\ntest\n"
9
+ ],
10
+ "flags": {
11
+ "json": {
12
+ "description": "Format output as json.",
13
+ "helpGroup": "GLOBAL",
14
+ "name": "json",
15
+ "allowNo": false,
16
+ "type": "boolean"
17
+ },
18
+ "auth": {
19
+ "char": "a",
20
+ "description": "Auth alias to use.",
21
+ "name": "auth",
22
+ "required": false,
23
+ "hasDynamicHelp": false,
24
+ "multiple": false,
25
+ "type": "option"
26
+ },
27
+ "log-level": {
28
+ "helpGroup": "GLOBAL",
29
+ "name": "log-level",
30
+ "summary": "Specify level for logging.",
31
+ "default": "info",
32
+ "hasDynamicHelp": false,
33
+ "multiple": false,
34
+ "options": [
35
+ "debug",
36
+ "warn",
37
+ "error",
38
+ "info",
39
+ "trace"
40
+ ],
41
+ "type": "option"
42
+ },
43
+ "uninstall": {
44
+ "char": "u",
45
+ "description": "Uninstall the app",
46
+ "name": "uninstall",
47
+ "required": false,
48
+ "allowNo": false,
49
+ "type": "boolean"
50
+ },
51
+ "applicationId": {
52
+ "char": "i",
53
+ "description": "Application sys_id",
54
+ "name": "applicationId",
55
+ "required": false,
56
+ "hasDynamicHelp": false,
57
+ "multiple": false,
58
+ "type": "option"
59
+ },
60
+ "scope": {
61
+ "char": "s",
62
+ "description": "Scope of application.",
63
+ "name": "scope",
64
+ "required": false,
65
+ "hasDynamicHelp": false,
66
+ "multiple": false,
67
+ "type": "option"
68
+ }
69
+ },
70
+ "hasDynamicHelp": false,
71
+ "hiddenAliases": [],
72
+ "id": "app",
73
+ "pluginAlias": "@sonisoft/now-sdk-ext-cli",
74
+ "pluginName": "@sonisoft/now-sdk-ext-cli",
75
+ "pluginType": "core",
76
+ "strict": true,
77
+ "enableJsonFlag": true,
78
+ "isESM": true,
79
+ "relativePath": [
80
+ "dist",
81
+ "commands",
82
+ "app",
83
+ "index.js"
84
+ ]
85
+ },
86
+ "app:install": {
87
+ "aliases": [],
88
+ "args": {},
89
+ "description": "Install or Upgrade application(s) from batch definition file",
90
+ "examples": [
91
+ "<%= config.bin %> <%= command.id %> exec global test.js --auth sn_alias\ntest\n"
92
+ ],
93
+ "flags": {
94
+ "json": {
95
+ "description": "Format output as json.",
96
+ "helpGroup": "GLOBAL",
97
+ "name": "json",
98
+ "allowNo": false,
99
+ "type": "boolean"
100
+ },
101
+ "auth": {
102
+ "char": "a",
103
+ "description": "Auth alias to use.",
104
+ "name": "auth",
105
+ "required": false,
106
+ "hasDynamicHelp": false,
107
+ "multiple": false,
108
+ "type": "option"
109
+ },
110
+ "log-level": {
111
+ "helpGroup": "GLOBAL",
112
+ "name": "log-level",
113
+ "summary": "Specify level for logging.",
114
+ "default": "info",
115
+ "hasDynamicHelp": false,
116
+ "multiple": false,
117
+ "options": [
118
+ "debug",
119
+ "warn",
120
+ "error",
121
+ "info",
122
+ "trace"
123
+ ],
124
+ "type": "option"
125
+ },
126
+ "batch": {
127
+ "char": "b",
128
+ "description": "Install from batch definition file",
129
+ "name": "batch",
130
+ "required": false,
131
+ "allowNo": false,
132
+ "type": "boolean"
133
+ },
134
+ "definitionPath": {
135
+ "char": "d",
136
+ "description": "Batch definition file",
137
+ "name": "definitionPath",
138
+ "required": false,
139
+ "hasDynamicHelp": false,
140
+ "multiple": false,
141
+ "type": "option"
142
+ }
143
+ },
144
+ "hasDynamicHelp": false,
145
+ "hiddenAliases": [],
146
+ "id": "app:install",
147
+ "pluginAlias": "@sonisoft/now-sdk-ext-cli",
148
+ "pluginName": "@sonisoft/now-sdk-ext-cli",
149
+ "pluginType": "core",
150
+ "strict": true,
151
+ "enableJsonFlag": true,
152
+ "isESM": true,
153
+ "relativePath": [
154
+ "dist",
155
+ "commands",
156
+ "app",
157
+ "install.js"
158
+ ]
159
+ },
3
160
  "exec": {
4
161
  "aliases": [],
5
162
  "args": {
@@ -69,5 +226,5 @@
69
226
  ]
70
227
  }
71
228
  },
72
- "version": "1.1.0-alpha.0"
229
+ "version": "1.1.0-alpha.2"
73
230
  }
package/package.json CHANGED
@@ -1,25 +1,24 @@
1
1
  {
2
2
  "name": "@sonisoft/now-sdk-ext-cli",
3
3
  "description": "A CLI extending the functionality of the ServiceNow SDK.",
4
- "version": "1.1.0-alpha.0",
4
+ "version": "1.1.0-alpha.2",
5
5
  "author": "Chris Nanda",
6
6
  "bin": {
7
7
  "nex": "./bin/run.js"
8
8
  },
9
9
  "bugs": "",
10
10
  "dependencies": {
11
- "@oclif/core": "^4.0.2",
12
11
  "@oclif/plugin-help": "^6.2.10",
13
12
  "@oclif/plugin-plugins": "^5.4.6",
14
13
  "@servicenow/glide": "^26.0.1",
15
14
  "@servicenow/sdk": "3.0.2",
16
15
  "@servicenow/sdk-build": "3.0.2",
16
+ "@servicenow/sdk-build-core": "3.0.2",
17
17
  "@servicenow/sdk-cli": "3.0.2",
18
18
  "@servicenow/sdk-cli-core": "3.0.2",
19
19
  "@servicenow/sdk-core": "3.0.2",
20
20
  "@servicenow/sdk-project": "3.0.2",
21
- "@servicenow/sdk-build-core": "3.0.2",
22
- "@sonisoft/now-sdk-ext-core": "^1.0.0-alpha.31",
21
+ "@sonisoft/now-sdk-ext-core": "^1.0.0-alpha.33",
23
22
  "@ts-morph/common": "^0.24.0",
24
23
  "cometd": "^8.0.4",
25
24
  "cometd-nodejs-client": "^2.0.0",
@@ -31,6 +30,7 @@
31
30
  },
32
31
  "devDependencies": {
33
32
  "@jest/globals": "^29.7.0",
33
+ "@oclif/core": "^4.5.1",
34
34
  "@oclif/prettier-config": "^0.2.1",
35
35
  "@oclif/test": "^4",
36
36
  "@supercharge/fs": "^3.4.2",
@@ -88,6 +88,9 @@
88
88
  "topics": {
89
89
  "exec": {
90
90
  "description": "Execute scripts remotely on a ServiceNow instance. Immitates using Scripts - Background from within ServiceNow."
91
+ },
92
+ "app": {
93
+ "description": "Operations on ServiceNow Applications."
91
94
  }
92
95
  }
93
96
  },