@servicenow/sdk 1.0.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.
Files changed (101) hide show
  1. package/README.md +24 -0
  2. package/bin/debug.js +3 -0
  3. package/bin/index.js +2 -0
  4. package/dist/auth/index.d.ts +11 -0
  5. package/dist/auth/index.js +206 -0
  6. package/dist/auth/index.js.map +1 -0
  7. package/dist/auth/keychain/index.d.ts +12 -0
  8. package/dist/auth/keychain/index.js +44 -0
  9. package/dist/auth/keychain/index.js.map +1 -0
  10. package/dist/command/auth/commands/clear.d.ts +6 -0
  11. package/dist/command/auth/commands/clear.js +30 -0
  12. package/dist/command/auth/commands/clear.js.map +1 -0
  13. package/dist/command/auth/commands/list.d.ts +6 -0
  14. package/dist/command/auth/commands/list.js +30 -0
  15. package/dist/command/auth/commands/list.js.map +1 -0
  16. package/dist/command/auth/commands/save.d.ts +10 -0
  17. package/dist/command/auth/commands/save.js +96 -0
  18. package/dist/command/auth/commands/save.js.map +1 -0
  19. package/dist/command/auth/commands/setDefault.d.ts +6 -0
  20. package/dist/command/auth/commands/setDefault.js +30 -0
  21. package/dist/command/auth/commands/setDefault.js.map +1 -0
  22. package/dist/command/auth/commands/validate.d.ts +6 -0
  23. package/dist/command/auth/commands/validate.js +43 -0
  24. package/dist/command/auth/commands/validate.js.map +1 -0
  25. package/dist/command/auth/index.d.ts +2 -0
  26. package/dist/command/auth/index.js +35 -0
  27. package/dist/command/auth/index.js.map +1 -0
  28. package/dist/command/build/index.d.ts +11 -0
  29. package/dist/command/build/index.js +98 -0
  30. package/dist/command/build/index.js.map +1 -0
  31. package/dist/command/clean/index.d.ts +6 -0
  32. package/dist/command/clean/index.js +34 -0
  33. package/dist/command/clean/index.js.map +1 -0
  34. package/dist/command/compile/index.d.ts +7 -0
  35. package/dist/command/compile/index.js +42 -0
  36. package/dist/command/compile/index.js.map +1 -0
  37. package/dist/command/convert/index.d.ts +12 -0
  38. package/dist/command/convert/index.js +77 -0
  39. package/dist/command/convert/index.js.map +1 -0
  40. package/dist/command/create/index.d.ts +15 -0
  41. package/dist/command/create/index.js +92 -0
  42. package/dist/command/create/index.js.map +1 -0
  43. package/dist/command/deploy/index.d.ts +12 -0
  44. package/dist/command/deploy/index.js +80 -0
  45. package/dist/command/deploy/index.js.map +1 -0
  46. package/dist/command/fetch/index.d.ts +12 -0
  47. package/dist/command/fetch/index.js +78 -0
  48. package/dist/command/fetch/index.js.map +1 -0
  49. package/dist/command/generate-modules/index.d.ts +7 -0
  50. package/dist/command/generate-modules/index.js +46 -0
  51. package/dist/command/generate-modules/index.js.map +1 -0
  52. package/dist/command/pack/index.d.ts +6 -0
  53. package/dist/command/pack/index.js +40 -0
  54. package/dist/command/pack/index.js.map +1 -0
  55. package/dist/command/package-dependencies/index.d.ts +8 -0
  56. package/dist/command/package-dependencies/index.js +52 -0
  57. package/dist/command/package-dependencies/index.js.map +1 -0
  58. package/dist/command/test/index.d.ts +3 -0
  59. package/dist/command/test/index.js +52 -0
  60. package/dist/command/test/index.js.map +1 -0
  61. package/dist/command/transform/index.d.ts +3 -0
  62. package/dist/command/transform/index.js +63 -0
  63. package/dist/command/transform/index.js.map +1 -0
  64. package/dist/epilogue/index.d.ts +1 -0
  65. package/dist/epilogue/index.js +9 -0
  66. package/dist/epilogue/index.js.map +1 -0
  67. package/dist/index.d.ts +1 -0
  68. package/dist/index.js +55 -0
  69. package/dist/index.js.map +1 -0
  70. package/dist/usage/index.d.ts +1 -0
  71. package/dist/usage/index.js +16 -0
  72. package/dist/usage/index.js.map +1 -0
  73. package/dist/util.d.ts +1 -0
  74. package/dist/util.js +25 -0
  75. package/dist/util.js.map +1 -0
  76. package/license +9 -0
  77. package/package.json +42 -0
  78. package/src/auth/index.ts +238 -0
  79. package/src/auth/keychain/index.ts +23 -0
  80. package/src/command/auth/commands/clear.ts +21 -0
  81. package/src/command/auth/commands/list.ts +21 -0
  82. package/src/command/auth/commands/save.ts +100 -0
  83. package/src/command/auth/commands/setDefault.ts +21 -0
  84. package/src/command/auth/commands/validate.ts +35 -0
  85. package/src/command/auth/index.ts +24 -0
  86. package/src/command/build/index.ts +96 -0
  87. package/src/command/clean/index.ts +22 -0
  88. package/src/command/compile/index.ts +31 -0
  89. package/src/command/convert/index.ts +76 -0
  90. package/src/command/create/index.ts +97 -0
  91. package/src/command/deploy/index.ts +84 -0
  92. package/src/command/fetch/index.ts +78 -0
  93. package/src/command/generate-modules/index.ts +36 -0
  94. package/src/command/pack/index.ts +27 -0
  95. package/src/command/package-dependencies/index.ts +43 -0
  96. package/src/command/test/index.ts +40 -0
  97. package/src/command/transform/index.ts +45 -0
  98. package/src/epilogue/index.ts +5 -0
  99. package/src/index.ts +50 -0
  100. package/src/usage/index.ts +13 -0
  101. package/src/util.ts +21 -0
@@ -0,0 +1,78 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.fetch = void 0;
13
+ const Enums_1 = require("@servicenow/sdk-cli-core/dist/cli-util/Enums");
14
+ const auth_1 = require("../../auth");
15
+ const util_1 = require("../../util");
16
+ exports.fetch = {
17
+ command: 'fetch',
18
+ describe: 'Download application metadata from instance and update local metadata folder.',
19
+ builder: (yargs) => {
20
+ return yargs
21
+ .option('directory', {
22
+ describe: `Path to expand application`,
23
+ default: (0, util_1.cwd)(),
24
+ type: 'string',
25
+ })
26
+ .option('mode', {
27
+ describe: 'Application fetch mode,\n\n' +
28
+ 'complete:\n Download and extract the complete application\n\n' +
29
+ 'incremental:\n Download changes since last fetch.',
30
+ choices: [Enums_1.FetchMode.COMPLETE, Enums_1.FetchMode.INCREMENTAL],
31
+ type: 'string',
32
+ default: Enums_1.FetchMode.INCREMENTAL,
33
+ coerce: (arg) => arg.toLowerCase(),
34
+ alias: 'm',
35
+ })
36
+ .option('auth', {
37
+ describe: 'Credential alias to use for authentication with instance',
38
+ type: 'string',
39
+ alias: 'a',
40
+ })
41
+ .option('debug', {
42
+ describe: 'Enable debug output',
43
+ type: 'boolean',
44
+ alias: 'd',
45
+ default: false,
46
+ })
47
+ .option('experimental', {
48
+ describe: 'Enables unstable experimental feature that may or may not be supported long term',
49
+ default: false,
50
+ type: 'boolean',
51
+ alias: 'e',
52
+ hidden: true,
53
+ });
54
+ },
55
+ handler: function (args) {
56
+ return __awaiter(this, void 0, void 0, function* () {
57
+ const { logger } = yield import('@servicenow/sdk-cli-core/dist/cli-util/logger/index.js');
58
+ logger.info('Fetching application metadata from instance...');
59
+ const { fetch: fetchService } = yield import('@servicenow/sdk-cli-core/dist/command/fetch/index.js');
60
+ try {
61
+ const credentials = yield (0, auth_1.getCredentials)(args);
62
+ logger.warn('WARN: Updates to JavaScript modules are not included when fetching application metadata from your instance.');
63
+ yield fetchService({
64
+ directory: args.directory,
65
+ credentials,
66
+ mode: args.mode,
67
+ debug: args.debug,
68
+ experimental: args.experimental,
69
+ });
70
+ }
71
+ catch (error) {
72
+ logger.error('Failed to fetch application: ');
73
+ logger.error(error instanceof Error ? error.message : error, error);
74
+ }
75
+ });
76
+ },
77
+ };
78
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/command/fetch/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,wEAAwE;AACxE,qCAA2C;AAC3C,qCAAgC;AAUnB,QAAA,KAAK,GAAsC;IACpD,OAAO,EAAE,OAAO;IAChB,QAAQ,EAAE,+EAA+E;IACzF,OAAO,EAAE,CAAC,KAAW,EAAE,EAAE;QACrB,OAAO,KAAK;aACP,MAAM,CAAC,WAAW,EAAE;YACjB,QAAQ,EAAE,4BAA4B;YACtC,OAAO,EAAE,IAAA,UAAG,GAAE;YACd,IAAI,EAAE,QAAQ;SACjB,CAAC;aACD,MAAM,CAAC,MAAM,EAAE;YACZ,QAAQ,EACJ,6BAA6B;gBAC7B,+DAA+D;gBAC/D,mDAAmD;YACvD,OAAO,EAAE,CAAC,iBAAS,CAAC,QAAQ,EAAE,iBAAS,CAAC,WAAW,CAAC;YACpD,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,iBAAS,CAAC,WAAW;YAC9B,MAAM,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,WAAW,EAAE;YAClC,KAAK,EAAE,GAAG;SACb,CAAC;aACD,MAAM,CAAC,MAAM,EAAE;YACZ,QAAQ,EAAE,0DAA0D;YACpE,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,GAAG;SACb,CAAC;aACD,MAAM,CAAC,OAAO,EAAE;YACb,QAAQ,EAAE,qBAAqB;YAC/B,IAAI,EAAE,SAAS;YACf,KAAK,EAAE,GAAG;YACV,OAAO,EAAE,KAAK;SACjB,CAAC;aACD,MAAM,CAAC,cAAc,EAAE;YACpB,QAAQ,EAAE,kFAAkF;YAC5F,OAAO,EAAE,KAAK;YACd,IAAI,EAAE,SAAS;YACf,KAAK,EAAE,GAAG;YACV,MAAM,EAAE,IAAI;SACf,CAAC,CAAA;IACV,CAAC;IACD,OAAO,EAAE,UAAgB,IAAmC;;YACxD,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,MAAM,CAAC,wDAAwD,CAAC,CAAA;YACzF,MAAM,CAAC,IAAI,CAAC,gDAAgD,CAAC,CAAA;YAE7D,MAAM,EAAE,KAAK,EAAE,YAAY,EAAE,GAAG,MAAM,MAAM,CAAC,sDAAsD,CAAC,CAAA;YACpG,IAAI,CAAC;gBACD,MAAM,WAAW,GAAU,MAAM,IAAA,qBAAc,EAAC,IAAI,CAAC,CAAA;gBAErD,MAAM,CAAC,IAAI,CACP,6GAA6G,CAChH,CAAA;gBACD,MAAM,YAAY,CAAC;oBACf,SAAS,EAAE,IAAI,CAAC,SAAS;oBACzB,WAAW;oBACX,IAAI,EAAE,IAAI,CAAC,IAAI;oBACf,KAAK,EAAE,IAAI,CAAC,KAAK;oBACjB,YAAY,EAAE,IAAI,CAAC,YAAY;iBAClC,CAAC,CAAA;YACN,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACb,MAAM,CAAC,KAAK,CAAC,+BAA+B,CAAC,CAAA;gBAC7C,MAAM,CAAC,KAAK,CAAC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAE,KAAgB,EAAE,KAAK,CAAC,CAAA;YACnF,CAAC;QACL,CAAC;KAAA;CACJ,CAAA"}
@@ -0,0 +1,7 @@
1
+ import { CommandModule } from 'yargs';
2
+ interface Arguments {
3
+ source: string;
4
+ 'generate-deletes': boolean;
5
+ }
6
+ export declare const generateModules: CommandModule<unknown, Arguments>;
7
+ export {};
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.generateModules = void 0;
16
+ const node_path_1 = __importDefault(require("node:path"));
17
+ const util_1 = require("../../util");
18
+ exports.generateModules = {
19
+ describe: 'Wrap modular JS source files into sys_module XMLs',
20
+ builder: (yargs) => {
21
+ return yargs
22
+ .positional('source', {
23
+ describe: `Path to "package.json"`,
24
+ default: (0, util_1.cwd)(),
25
+ type: 'string',
26
+ })
27
+ .option('generate-deletes', {
28
+ describe: 'Generate DELETE record updates for modules removed between builds',
29
+ default: true,
30
+ type: 'boolean',
31
+ });
32
+ },
33
+ handler: function (args) {
34
+ return __awaiter(this, void 0, void 0, function* () {
35
+ const { logger } = yield import('@servicenow/sdk-cli-core/dist/cli-util/logger/index.js');
36
+ const { generateModules: generateModulesService } = yield import('@servicenow/sdk-cli-core/dist/command/generate-modules/index.js');
37
+ try {
38
+ yield generateModulesService(node_path_1.default.resolve(args.source), args['generate-deletes']);
39
+ }
40
+ catch (error) {
41
+ logger.error(error instanceof Error ? error.message : error, error);
42
+ }
43
+ });
44
+ },
45
+ };
46
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/command/generate-modules/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,0DAA4B;AAC5B,qCAAgC;AAOnB,QAAA,eAAe,GAAsC;IAC9D,QAAQ,EAAE,mDAAmD;IAC7D,OAAO,EAAE,CAAC,KAAW,EAAE,EAAE;QACrB,OAAO,KAAK;aACP,UAAU,CAAC,QAAQ,EAAE;YAClB,QAAQ,EAAE,wBAAwB;YAClC,OAAO,EAAE,IAAA,UAAG,GAAE;YACd,IAAI,EAAE,QAAQ;SACjB,CAAC;aACD,MAAM,CAAC,kBAAkB,EAAE;YACxB,QAAQ,EAAE,mEAAmE;YAC7E,OAAO,EAAE,IAAI;YACb,IAAI,EAAE,SAAS;SAClB,CAAC,CAAA;IACV,CAAC;IACD,OAAO,EAAE,UAAgB,IAAmC;;YACxD,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,MAAM,CAAC,wDAAwD,CAAC,CAAA;YACzF,MAAM,EAAE,eAAe,EAAE,sBAAsB,EAAE,GAAG,MAAM,MAAM,CAC5D,iEAAiE,CACpE,CAAA;YACD,IAAI,CAAC;gBACD,MAAM,sBAAsB,CAAC,mBAAI,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAA;YACrF,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACb,MAAM,CAAC,KAAK,CAAC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAE,KAAgB,EAAE,KAAK,CAAC,CAAA;YACnF,CAAC;QACL,CAAC;KAAA;CACJ,CAAA"}
@@ -0,0 +1,6 @@
1
+ import { CommandModule } from 'yargs';
2
+ interface Arguments {
3
+ source: string;
4
+ }
5
+ export declare const pack: CommandModule<unknown, Arguments>;
6
+ export {};
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.pack = void 0;
16
+ const node_path_1 = __importDefault(require("node:path"));
17
+ const util_1 = require("../../util");
18
+ exports.pack = {
19
+ describe: 'Zip built app into deployable artifact',
20
+ builder: (yargs) => {
21
+ return yargs.positional('source', {
22
+ describe: `Path to "package.json"`,
23
+ default: (0, util_1.cwd)(),
24
+ type: 'string',
25
+ });
26
+ },
27
+ handler: function (args) {
28
+ return __awaiter(this, void 0, void 0, function* () {
29
+ const { pack: packService } = yield import('@servicenow/sdk-cli-core/dist/command/pack/index.js');
30
+ const { logger } = yield import('@servicenow/sdk-cli-core/dist/cli-util/logger/index.js');
31
+ try {
32
+ yield packService(node_path_1.default.resolve(args.source));
33
+ }
34
+ catch (error) {
35
+ logger.error(error instanceof Error ? error.message : error, error);
36
+ }
37
+ });
38
+ },
39
+ };
40
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/command/pack/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,0DAA4B;AAC5B,qCAAgC;AAMnB,QAAA,IAAI,GAAsC;IACnD,QAAQ,EAAE,wCAAwC;IAClD,OAAO,EAAE,CAAC,KAAW,EAAE,EAAE;QACrB,OAAO,KAAK,CAAC,UAAU,CAAC,QAAQ,EAAE;YAC9B,QAAQ,EAAE,wBAAwB;YAClC,OAAO,EAAE,IAAA,UAAG,GAAE;YACd,IAAI,EAAE,QAAQ;SACjB,CAAC,CAAA;IACN,CAAC;IACD,OAAO,EAAE,UAAgB,IAAmC;;YACxD,MAAM,EAAE,IAAI,EAAE,WAAW,EAAE,GAAG,MAAM,MAAM,CAAC,qDAAqD,CAAC,CAAA;YACjG,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,MAAM,CAAC,wDAAwD,CAAC,CAAA;YACzF,IAAI,CAAC;gBACD,MAAM,WAAW,CAAC,mBAAI,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAA;YAChD,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACb,MAAM,CAAC,KAAK,CAAC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAE,KAAgB,EAAE,KAAK,CAAC,CAAA;YACnF,CAAC;QACL,CAAC;KAAA;CACJ,CAAA"}
@@ -0,0 +1,8 @@
1
+ import { CommandModule } from 'yargs';
2
+ interface Arguments {
3
+ source: string;
4
+ 'generate-deletes': boolean;
5
+ optimize: boolean;
6
+ }
7
+ export declare const packageDependencies: CommandModule<unknown, Arguments>;
8
+ export {};
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.packageDependencies = void 0;
16
+ const node_path_1 = __importDefault(require("node:path"));
17
+ const util_1 = require("../../util");
18
+ exports.packageDependencies = {
19
+ describe: 'Wrap 3rd Party dependencies into sys_module XMLs',
20
+ builder: (yargs) => {
21
+ return yargs
22
+ .positional('source', {
23
+ describe: `Path to "package.json"`,
24
+ default: (0, util_1.cwd)(),
25
+ type: 'string',
26
+ })
27
+ .option('generate-deletes', {
28
+ describe: 'Generate DELETE record updates for dependencies removed between builds',
29
+ default: true,
30
+ type: 'boolean',
31
+ })
32
+ .option('optimize', {
33
+ describe: 'Optimize dependency packaging by reusing unchanged dependency xmls',
34
+ default: true,
35
+ type: 'boolean',
36
+ alias: 'o',
37
+ });
38
+ },
39
+ handler: function (args) {
40
+ return __awaiter(this, void 0, void 0, function* () {
41
+ const { logger } = yield import('@servicenow/sdk-cli-core/dist/cli-util/logger/index.js');
42
+ const { packageDependencies: packageDependenciesService } = yield import('@servicenow/sdk-cli-core/dist/command/package-dependencies/index.js');
43
+ try {
44
+ yield packageDependenciesService(node_path_1.default.resolve(args.source), args['generate-deletes'], args.optimize);
45
+ }
46
+ catch (error) {
47
+ logger.error(error instanceof Error ? error.message : error, error);
48
+ }
49
+ });
50
+ },
51
+ };
52
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/command/package-dependencies/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,0DAA4B;AAC5B,qCAAgC;AAQnB,QAAA,mBAAmB,GAAsC;IAClE,QAAQ,EAAE,kDAAkD;IAC5D,OAAO,EAAE,CAAC,KAAW,EAAE,EAAE;QACrB,OAAO,KAAK;aACP,UAAU,CAAC,QAAQ,EAAE;YAClB,QAAQ,EAAE,wBAAwB;YAClC,OAAO,EAAE,IAAA,UAAG,GAAE;YACd,IAAI,EAAE,QAAQ;SACjB,CAAC;aACD,MAAM,CAAC,kBAAkB,EAAE;YACxB,QAAQ,EAAE,wEAAwE;YAClF,OAAO,EAAE,IAAI;YACb,IAAI,EAAE,SAAS;SAClB,CAAC;aACD,MAAM,CAAC,UAAU,EAAE;YAChB,QAAQ,EAAE,oEAAoE;YAC9E,OAAO,EAAE,IAAI;YACb,IAAI,EAAE,SAAS;YACf,KAAK,EAAE,GAAG;SACb,CAAC,CAAA;IACV,CAAC;IACD,OAAO,EAAE,UAAgB,IAAmC;;YACxD,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,MAAM,CAAC,wDAAwD,CAAC,CAAA;YACzF,MAAM,EAAE,mBAAmB,EAAE,0BAA0B,EAAE,GAAG,MAAM,MAAM,CACpE,qEAAqE,CACxE,CAAA;YACD,IAAI,CAAC;gBACD,MAAM,0BAA0B,CAAC,mBAAI,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,IAAI,CAAC,kBAAkB,CAAC,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAA;YACxG,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACb,MAAM,CAAC,KAAK,CAAC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAE,KAAgB,EAAE,KAAK,CAAC,CAAA;YACnF,CAAC;QACL,CAAC;KAAA;CACJ,CAAA"}
@@ -0,0 +1,3 @@
1
+ import { CommandModule } from 'yargs';
2
+ export declare const TEST_COMMAND = "test";
3
+ export declare const test: CommandModule<unknown, any>;
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.test = exports.TEST_COMMAND = void 0;
13
+ const deploy_1 = require("../deploy");
14
+ const fetch_1 = require("../fetch");
15
+ const convert_1 = require("../convert");
16
+ const create_1 = require("../create");
17
+ const Error_1 = require("@servicenow/sdk-cli-core/dist/cli-util/Error");
18
+ exports.TEST_COMMAND = 'test';
19
+ exports.test = {
20
+ describe: 'Test command for development and testing purposes',
21
+ builder: (yargs) => {
22
+ return yargs
23
+ .option('host', {
24
+ describe: 'Target host for application deployment',
25
+ type: 'string',
26
+ })
27
+ .option('username', {
28
+ describe: 'The username to authenticate with host',
29
+ type: 'string',
30
+ })
31
+ .option('password', {
32
+ describe: 'The password to authenticate with host',
33
+ type: 'string',
34
+ })
35
+ .command(deploy_1.deploy)
36
+ .command(fetch_1.fetch)
37
+ .command(convert_1.convert)
38
+ .command(create_1.create)
39
+ .demandCommand(1)
40
+ .check((args) => {
41
+ const { username, password, host } = args;
42
+ if (!username || !password || !host) {
43
+ throw new Error_1.NowSDKError('Missing required arguments, please provide username, password and host');
44
+ }
45
+ return true;
46
+ });
47
+ },
48
+ handler: function () {
49
+ return __awaiter(this, void 0, void 0, function* () { });
50
+ },
51
+ };
52
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/command/test/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,sCAAkC;AAClC,oCAAgC;AAChC,wCAAoC;AACpC,sCAAkC;AAClC,wEAA0E;AAE7D,QAAA,YAAY,GAAG,MAAM,CAAA;AAErB,QAAA,IAAI,GAAgC;IAC7C,QAAQ,EAAE,mDAAmD;IAC7D,OAAO,EAAE,CAAC,KAAW,EAAE,EAAE;QACrB,OAAO,KAAK;aACP,MAAM,CAAC,MAAM,EAAE;YACZ,QAAQ,EAAE,wCAAwC;YAClD,IAAI,EAAE,QAAQ;SACjB,CAAC;aACD,MAAM,CAAC,UAAU,EAAE;YAChB,QAAQ,EAAE,wCAAwC;YAClD,IAAI,EAAE,QAAQ;SACjB,CAAC;aACD,MAAM,CAAC,UAAU,EAAE;YAChB,QAAQ,EAAE,wCAAwC;YAClD,IAAI,EAAE,QAAQ;SACjB,CAAC;aACD,OAAO,CAAC,eAAM,CAAC;aACf,OAAO,CAAC,aAAK,CAAC;aACd,OAAO,CAAC,iBAAO,CAAC;aAChB,OAAO,CAAC,eAAM,CAAC;aACf,aAAa,CAAC,CAAC,CAAC;aAChB,KAAK,CAAC,CAAC,IAAI,EAAE,EAAE;YACZ,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,IAAI,CAAA;YACzC,IAAI,CAAC,QAAQ,IAAI,CAAC,QAAQ,IAAI,CAAC,IAAI,EAAE,CAAC;gBAClC,MAAM,IAAI,mBAAW,CAAC,wEAAwE,CAAC,CAAA;YACnG,CAAC;YACD,OAAO,IAAI,CAAA;QACf,CAAC,CAAC,CAAA;IACV,CAAC;IACD,OAAO,EAAE;8DAAkC,CAAC;KAAA;CAC/C,CAAA"}
@@ -0,0 +1,3 @@
1
+ import { CommandModule } from 'yargs';
2
+ import { TransformArguments } from '@servicenow/sdk-cli-core/dist/command/transform';
3
+ export declare const transform: CommandModule<unknown, TransformArguments>;
@@ -0,0 +1,63 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.transform = void 0;
16
+ const transform_1 = require("@servicenow/sdk-cli-core/dist/command/transform");
17
+ const path_1 = __importDefault(require("path"));
18
+ exports.transform = {
19
+ describe: 'Parse XML data from a directory and use it to transform source code for bi-directional sync',
20
+ builder: (yargs) => {
21
+ return yargs
22
+ .option('directory', {
23
+ describe: 'Directory from which to parse XML files',
24
+ type: 'string',
25
+ requiresArg: true,
26
+ alias: ['D', 'dir'],
27
+ default: path_1.default.resolve(process.cwd(), 'incoming'),
28
+ })
29
+ .option('clean', {
30
+ describe: 'Delete parsed XML files when finished',
31
+ type: 'boolean',
32
+ alias: 'c',
33
+ default: false,
34
+ })
35
+ .option('debug', {
36
+ describe: 'Enable debug output',
37
+ type: 'boolean',
38
+ alias: 'd',
39
+ default: false,
40
+ })
41
+ .option('experimental', {
42
+ describe: 'Enables unstable experimental feature that may or may not be supported long term',
43
+ default: false,
44
+ type: 'boolean',
45
+ alias: 'e',
46
+ hidden: true,
47
+ });
48
+ },
49
+ handler: function (args) {
50
+ var _a;
51
+ return __awaiter(this, void 0, void 0, function* () {
52
+ const { logger } = yield import('@servicenow/sdk-cli-core/dist/cli-util/logger/index.js');
53
+ try {
54
+ yield (0, transform_1.transform)(args);
55
+ }
56
+ catch (error) {
57
+ logger.error('Transform failed:');
58
+ logger.error((_a = error.stack) !== null && _a !== void 0 ? _a : error);
59
+ }
60
+ });
61
+ },
62
+ };
63
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/command/transform/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,+EAAmH;AACnH,gDAAuB;AAEV,QAAA,SAAS,GAA+C;IACjE,QAAQ,EAAE,6FAA6F;IACvG,OAAO,EAAE,CAAC,KAAW,EAAE,EAAE;QACrB,OAAO,KAAK;aACP,MAAM,CAAC,WAAW,EAAE;YACjB,QAAQ,EAAE,yCAAyC;YACnD,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,IAAI;YACjB,KAAK,EAAE,CAAC,GAAG,EAAE,KAAK,CAAC;YACnB,OAAO,EAAE,cAAI,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,UAAU,CAAC;SACnD,CAAC;aACD,MAAM,CAAC,OAAO,EAAE;YACb,QAAQ,EAAE,uCAAuC;YACjD,IAAI,EAAE,SAAS;YACf,KAAK,EAAE,GAAG;YACV,OAAO,EAAE,KAAK;SACjB,CAAC;aACD,MAAM,CAAC,OAAO,EAAE;YACb,QAAQ,EAAE,qBAAqB;YAC/B,IAAI,EAAE,SAAS;YACf,KAAK,EAAE,GAAG;YACV,OAAO,EAAE,KAAK;SACjB,CAAC;aACD,MAAM,CAAC,cAAc,EAAE;YACpB,QAAQ,EAAE,kFAAkF;YAC5F,OAAO,EAAE,KAAK;YACd,IAAI,EAAE,SAAS;YACf,KAAK,EAAE,GAAG;YACV,MAAM,EAAE,IAAI;SACf,CAAC,CAAA;IACV,CAAC;IACD,OAAO,EAAE,UAAgB,IAAwB;;;YAC7C,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,MAAM,CAAC,wDAAwD,CAAC,CAAA;YACzF,IAAI,CAAC;gBACD,MAAM,IAAA,qBAAgB,EAAC,IAAI,CAAC,CAAA;YAChC,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACb,MAAM,CAAC,KAAK,CAAC,mBAAmB,CAAC,CAAA;gBACjC,MAAM,CAAC,KAAK,CAAC,MAAC,KAAe,CAAC,KAAK,mCAAI,KAAK,CAAC,CAAA;YACjD,CAAC;;KACJ;CACJ,CAAA"}
@@ -0,0 +1 @@
1
+ export declare const epilogue = "\nUse $now-sdk <command> --help for usage information.\n\nFor more information, please visit https://docs.servicenow.com/bundle/washingtondc-api-reference/page/script/sdk/reference/servicenow-sdk-cli-commands.html.\n";
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.epilogue = void 0;
4
+ exports.epilogue = `
5
+ Use $now-sdk <command> --help for usage information.
6
+
7
+ For more information, please visit https://docs.servicenow.com/bundle/washingtondc-api-reference/page/script/sdk/reference/servicenow-sdk-cli-commands.html.
8
+ `;
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/epilogue/index.ts"],"names":[],"mappings":";;;AAAa,QAAA,QAAQ,GAAG;;;;CAIvB,CAAA"}
@@ -0,0 +1 @@
1
+ export {};
package/dist/index.js ADDED
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const yargs_1 = __importDefault(require("yargs"));
7
+ const usage_1 = require("./usage");
8
+ const epilogue_1 = require("./epilogue");
9
+ const clean_1 = require("./command/clean");
10
+ const create_1 = require("./command/create");
11
+ const convert_1 = require("./command/convert");
12
+ const build_1 = require("./command/build");
13
+ const compile_1 = require("./command/compile");
14
+ const generate_modules_1 = require("./command/generate-modules");
15
+ const package_dependencies_1 = require("./command/package-dependencies");
16
+ const pack_1 = require("./command/pack");
17
+ const deploy_1 = require("./command/deploy");
18
+ const fetch_1 = require("./command/fetch");
19
+ const transform_1 = require("./command/transform");
20
+ const auth_1 = require("./command/auth");
21
+ const test_1 = require("./command/test");
22
+ const semver_1 = require("semver");
23
+ const logger_1 = require("@servicenow/sdk-cli-core/dist/cli-util/logger");
24
+ yargs_1.default
25
+ .check(() => {
26
+ if ((0, semver_1.lt)(process.version, '16.16.0')) {
27
+ logger_1.logger.error('now-sdk requires node version to be >= 16.16.0');
28
+ process.exit(1);
29
+ }
30
+ return true;
31
+ })
32
+ .usage(usage_1.usage)
33
+ .command(auth_1.auth)
34
+ .command(create_1.create)
35
+ .command(convert_1.convert)
36
+ .command(fetch_1.fetch)
37
+ .command(build_1.build)
38
+ .command(deploy_1.deploy)
39
+ .command('transform', false, transform_1.transform)
40
+ .command('clean [source]', false, clean_1.clean)
41
+ .command('compile [source]', false, compile_1.compile)
42
+ .command('generate-modules [source]', false, generate_modules_1.generateModules)
43
+ .command('package-dependencies [source]', false, package_dependencies_1.packageDependencies)
44
+ .command('pack [source]', false, pack_1.pack)
45
+ .command(`${test_1.TEST_COMMAND} <command>`, false, test_1.test)
46
+ .demandCommand()
47
+ .epilogue(epilogue_1.epilogue)
48
+ .strictCommands()
49
+ .help()
50
+ .updateStrings({
51
+ 'Positionals:': 'Parameters:',
52
+ })
53
+ .alias('h', 'help')
54
+ .scriptName('now-sdk').argv;
55
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;AAAA,kDAAyB;AACzB,mCAA+B;AAC/B,yCAAqC;AACrC,2CAAuC;AACvC,6CAAyC;AACzC,+CAA2C;AAC3C,2CAAuC;AACvC,+CAA2C;AAC3C,iEAA4D;AAC5D,yEAAoE;AACpE,yCAAqC;AACrC,6CAAyC;AACzC,2CAAuC;AACvC,mDAA+C;AAC/C,yCAAqC;AACrC,yCAAmD;AACnD,mCAA2B;AAC3B,0EAAsE;AAEtE,eAAK;KACA,KAAK,CAAC,GAAG,EAAE;IACR,IAAI,IAAA,WAAE,EAAC,OAAO,CAAC,OAAO,EAAE,SAAS,CAAC,EAAE,CAAC;QACjC,eAAM,CAAC,KAAK,CAAC,gDAAgD,CAAC,CAAA;QAC9D,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;IACnB,CAAC;IACD,OAAO,IAAI,CAAA;AACf,CAAC,CAAC;KACD,KAAK,CAAC,aAAK,CAAC;KACZ,OAAO,CAAC,WAAI,CAAC;KACb,OAAO,CAAC,eAAM,CAAC;KACf,OAAO,CAAC,iBAAO,CAAC;KAChB,OAAO,CAAC,aAAK,CAAC;KACd,OAAO,CAAC,aAAK,CAAC;KACd,OAAO,CAAC,eAAM,CAAC;KACf,OAAO,CAAC,WAAW,EAAE,KAAK,EAAE,qBAAS,CAAC;KACtC,OAAO,CAAC,gBAAgB,EAAE,KAAK,EAAE,aAAK,CAAC;KACvC,OAAO,CAAC,kBAAkB,EAAE,KAAK,EAAE,iBAAO,CAAC;KAC3C,OAAO,CAAC,2BAA2B,EAAE,KAAK,EAAE,kCAAe,CAAC;KAC5D,OAAO,CAAC,+BAA+B,EAAE,KAAK,EAAE,0CAAmB,CAAC;KACpE,OAAO,CAAC,eAAe,EAAE,KAAK,EAAE,WAAI,CAAC;KACrC,OAAO,CAAC,GAAG,mBAAY,YAAY,EAAE,KAAK,EAAE,WAAI,CAAC;KACjD,aAAa,EAAE;KACf,QAAQ,CAAC,mBAAQ,CAAC;KAClB,cAAc,EAAE;KAChB,IAAI,EAAE;KACN,aAAa,CAAC;IACX,cAAc,EAAE,aAAa;CAChC,CAAC;KACD,KAAK,CAAC,GAAG,EAAE,MAAM,CAAC;KAClB,UAAU,CAAC,SAAS,CAAC,CAAC,IAAI,CAAA"}
@@ -0,0 +1 @@
1
+ export declare const usage = "\n_____ ______ _ __ _____ ____ __ \u2009__\n___/ | / / __ /| / / / ___// __ / /\u2009/_/\n__/ |/ / / / / | /| / / \\__ // / / / < \n_/ /| / /_/ /| |/ |/ / ___/ / /_/ / /| | \n/_/ |_/_____/ |__/|__/ /____/_____/_/ |_| \n\nSource-driven applications by writing actual code, and using modern, industry-standard development paradigms.\n";
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ /* eslint-disable no-useless-escape */
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.usage = void 0;
5
+ // TODO: Prepending underscores for now, because yargs removes
6
+ // leading whitespace from the usage() argument
7
+ exports.usage = `
8
+ _____ ______ _ __ _____ ____ __ \u2009__
9
+ ___/ | / / __ /| / / / ___// __ / /\u2009/_/
10
+ __/ |/ / / / / | /| / / \\__ \// / / / <
11
+ _/ /| / /_/ /| |/ |/ / ___/ / /_/ / /| |
12
+ /_/ |_/\_____/ |__/|__/ /____/_____/_/ |_|
13
+
14
+ Source-driven applications by writing actual code, and using modern, industry-standard development paradigms.
15
+ `;
16
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/usage/index.ts"],"names":[],"mappings":";AAAA,sCAAsC;;;AAEtC,8DAA8D;AAC9D,qDAAqD;AACxC,QAAA,KAAK,GAAG;;;;;;;;CAQpB,CAAA"}
package/dist/util.d.ts ADDED
@@ -0,0 +1 @@
1
+ export declare function cwd(): string;
package/dist/util.js ADDED
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.cwd = void 0;
7
+ const Error_1 = require("@servicenow/sdk-cli-core/dist/cli-util/Error");
8
+ const path_1 = __importDefault(require("path"));
9
+ const fs_1 = __importDefault(require("fs"));
10
+ function cwd() {
11
+ try {
12
+ const dir = process.cwd();
13
+ if (fs_1.default.existsSync(path_1.default.join(dir, 'package.json'))) {
14
+ return dir;
15
+ }
16
+ throw new Error_1.NowSDKError('Could not find package.json. Please ensure you are running command in the intended directory or specify source as an argument.', { type: 'missing_package_json' });
17
+ }
18
+ catch (error) {
19
+ const { logger } = require('@servicenow/sdk-cli-core/dist/cli-util/logger');
20
+ logger.error(error instanceof Error ? error.message : error, error);
21
+ process.exit();
22
+ }
23
+ }
24
+ exports.cwd = cwd;
25
+ //# sourceMappingURL=util.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"util.js","sourceRoot":"","sources":["../src/util.ts"],"names":[],"mappings":";;;;;;AAAA,wEAA0E;AAC1E,gDAAuB;AACvB,4CAAmB;AAEnB,SAAgB,GAAG;IACf,IAAI,CAAC;QACD,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,EAAE,CAAA;QACzB,IAAI,YAAE,CAAC,UAAU,CAAC,cAAI,CAAC,IAAI,CAAC,GAAG,EAAE,cAAc,CAAC,CAAC,EAAE,CAAC;YAChD,OAAO,GAAG,CAAA;QACd,CAAC;QAED,MAAM,IAAI,mBAAW,CACjB,gIAAgI,EAChI,EAAE,IAAI,EAAE,sBAAsB,EAAE,CACnC,CAAA;IACL,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACb,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,+CAA+C,CAAC,CAAA;QAC3E,MAAM,CAAC,KAAK,CAAC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAE,KAAgB,EAAE,KAAK,CAAC,CAAA;QAC/E,OAAO,CAAC,IAAI,EAAE,CAAA;IAClB,CAAC;AACL,CAAC;AAhBD,kBAgBC"}
package/license ADDED
@@ -0,0 +1,9 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 ServiceNow Inc.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
+
7
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
+
9
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/package.json ADDED
@@ -0,0 +1,42 @@
1
+ {
2
+ "name": "@servicenow/sdk",
3
+ "version": "1.0.2",
4
+ "description": "ServiceNow SDK CLI",
5
+ "license": "MIT",
6
+ "bin": {
7
+ "fluent": "bin/index.js",
8
+ "fluent-debug": "bin/debug.js",
9
+ "now-sdk": "bin/index.js",
10
+ "now-sdk-debug": "bin/debug.js"
11
+ },
12
+ "files": [
13
+ "dist",
14
+ "src"
15
+ ],
16
+ "scripts": {
17
+ "build": "tsc --build --clean && tsc --build",
18
+ "clean": "rimraf dist",
19
+ "lint": "eslint . --ext .ts",
20
+ "prettier:check": "prettier --check --ignore-path=../../.prettierignore .",
21
+ "prettier:write": "prettier --write --ignore-path=../../.prettierignore .",
22
+ "watch": "tsc --build --clean && tsc --build --watch",
23
+ "test": "export NODE_OPTIONS=\"--max-old-space-size=8192\" && jest --runInBand --colors --reporters=default --no-cache"
24
+ },
25
+ "dependencies": {
26
+ "@inquirer/prompts": "3.1.1",
27
+ "@servicenow/sdk-cli-core": "*",
28
+ "chalk": "4.1.2",
29
+ "yargs": "17.6.2",
30
+ "semver": "7.5.4"
31
+ },
32
+ "devDependencies": {
33
+ "@types/yargs": "17.0.24"
34
+ },
35
+ "optionalDependencies": {
36
+ "keytar": "7.9.0"
37
+ },
38
+ "engines": {
39
+ "node": "16.16.0",
40
+ "npm": "8.11.0"
41
+ }
42
+ }