sealights-newman-wrapper 2.0.23

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 ADDED
@@ -0,0 +1,64 @@
1
+ # Sealights Newman wrapper
2
+
3
+ This is the **Sealights** [newman](https://www.npmjs.com/package/newman) agent.
4
+
5
+ ## Install
6
+
7
+ ```
8
+ npm install sealights-newman-wrapper
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ Execute this package using `npx` and pass sl and newman arguments
14
+ ```
15
+ npx sealights-newman-wrapper --sl-token ... -c ./collection.json
16
+ ```
17
+
18
+ or use it in script.
19
+
20
+ Example:
21
+ ```
22
+ const { slNewman, ConfigProvider } = require('sealights-newman-wrapper');
23
+
24
+ const config = new ConfigProvider({
25
+ tokenfile: "sltoken.txt",
26
+ buildSessionIdFile: "buildSessionId",
27
+ testStage: "newman",
28
+ });
29
+
30
+ slNewman.run(config, {
31
+ collection: './collection.json',
32
+ environment: require('./local.environment.json'),
33
+ });
34
+ ```
35
+
36
+ ### Passing parameters to reporter via CLI
37
+ From the command line add sealights parameters with '--sl-' prefix
38
+
39
+ ```
40
+ npx sealights-newman-wrapper ... --sl-tokenfile <path/to/token-file> --sl-buildsessionidfile <path/to/buildSessionId-file> --sl-testStage e2e
41
+ ```
42
+
43
+ ### Passing parameters to plugin via config file
44
+ Create a file `sl.conf` and fill it with config in JSON format
45
+
46
+ ```
47
+ {
48
+ tokenFile: <path/to/token-file>,
49
+ buildSessionIdFile: <path/to/buildSessionId-file>,
50
+ testStage: e2e,
51
+ }
52
+ ```
53
+
54
+ ### Supported parameters
55
+ * token - Sealights token
56
+ * tokenFile - Path to file contains the Sealights token
57
+ * buildSessionId - Sealights build session id
58
+ * buildSessionIdFile - Path to file contains the Sealights build session id
59
+ * testStage - Test stage current tests are relates to
60
+ * labId - Pre-defined Sealights lab-id (optional)
61
+ * proxy - Proxy server (optional)
62
+
63
+ ## Author
64
+ Sealights
package/bin/index.js ADDED
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ require('../dist/cli/index.js');
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export {};
@@ -0,0 +1,23 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ const sealights_plugins_common_1 = require("sealights-plugins-common");
5
+ const minimist = require("minimist");
6
+ const index_1 = require("../index");
7
+ const newman_util_1 = require("./newman-util");
8
+ const _ = require("lodash");
9
+ const argv = minimist(process.argv.slice(2));
10
+ const defaultConfig = new sealights_plugins_common_1.ConfigProvider({ disableOtel: false });
11
+ const cliConfig = new sealights_plugins_common_1.CliSlConfigProvider();
12
+ const config = new sealights_plugins_common_1.CombinedConfigProvider(defaultConfig, cliConfig);
13
+ index_1.slNewman.run(config, getNewmanOptions(argv));
14
+ function getNewmanOptions(argv) {
15
+ const options = Object.assign(Object.assign({}, argv), { collection: argv.collection || argv.c || argv._[0], environment: argv.environment || argv.e, help: argv.help || argv.h, version: argv.version || argv.v, globals: argv.globals || argv.g, iterationCount: argv['iteration-count'] || argv.n, workingDir: argv.workingDir, noInsecureFileRead: argv['no-insecure-file-read'], exportEnvironment: argv['export-environment'], exportGlobals: argv['export-globals'], exportCollection: argv['export-collection'], delayRequest: argv['delay-request'], timeoutRequest: argv['timeout-request'], timeoutScript: argv['timeout-script'], disableUnicode: argv['disable-unicode'], insecure: argv.insecure || argv.k, suppressExitCode: argv['suppress-exit-code'] || argv.x, iterationData: argv['iteration-data'] || argv.d, ignoreRedirects: argv['ignore-redirects'], cookieJar: argv['cookie-jar'], reporters: argv.reporters || argv.r || ['cli'], envVar: argv['env-var'] ? (0, newman_util_1.parseEnvVars)(argv['env-var']) : undefined, globalVar: argv['global-var'] ? (0, newman_util_1.parseEnvVars)(argv['global-var']) : undefined });
16
+ const reporterOptions = (0, newman_util_1.parseNestedOptions)(process.argv, '--reporter-', options.reporters);
17
+ options.reporterOptions = reporterOptions._generic;
18
+ options.reporter = _.transform(_.omit(reporterOptions, '_generic'), (acc, value, key) => {
19
+ acc[key] = _.assignIn(value, reporterOptions._generic);
20
+ }, {});
21
+ return options;
22
+ }
23
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":";;;AACA,uEAAuG;AACvG,qCAAqC;AACrC,oCAAoC;AAEpC,+CAAiE;AACjE,4BAA4B;AAE5B,MAAM,IAAI,GAAG,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;AAC7C,MAAM,aAAa,GAAG,IAAI,yCAAc,CAAiB,EAAE,WAAW,EAAE,KAAK,EAAoB,CAAC,CAAC;AACnG,MAAM,SAAS,GAAG,IAAI,8CAAmB,EAAkB,CAAC;AAC5D,MAAM,MAAM,GAAG,IAAI,iDAAsB,CAAiB,aAAa,EAAE,SAAS,CAAC,CAAC;AACpF,gBAAQ,CAAC,GAAG,CAAC,MAAM,EAAE,gBAAgB,CAAC,IAAI,CAAC,CAAC,CAAC;AAE7C,SAAS,gBAAgB,CAAC,IAAS;IAC/B,MAAM,OAAO,mCACN,IAAI,KACP,UAAU,EAAE,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,EAClD,WAAW,EAAG,IAAI,CAAC,WAAW,IAAI,IAAI,CAAC,CAAC,EACxC,IAAI,EAAG,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,CAAC,EAC1B,OAAO,EAAG,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,CAAC,EAChC,OAAO,EAAG,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,CAAC,EAChC,cAAc,EAAE,IAAI,CAAC,iBAAiB,CAAC,IAAI,IAAI,CAAC,CAAC,EACjD,UAAU,EAAE,IAAI,CAAC,UAAU,EAC3B,kBAAkB,EAAE,IAA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AAI,CAAC,eAAe,EAAE,UAAU,CAAC,EAAE,CAAC,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE;QACpF,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,KAAK,EAAE,eAAe,CAAC,QAAQ,CAAC,CAAC;IAC3D,CAAC,EAAE,EAAE,CAAC,CAAC;IAIP,OAAO,OAAO,CAAC;AACnB,CAAC"}
@@ -0,0 +1,4 @@
1
+ export declare function parseEnvVars(vars: any): any;
2
+ export declare function parseNestedOptions(argv: any, optionPrefix: any, options: any): {
3
+ _generic: {};
4
+ };
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.parseNestedOptions = exports.parseEnvVars = void 0;
4
+ const _ = require("lodash");
5
+ function parseEnvVars(vars) {
6
+ const parsedVars = {};
7
+ (Array.isArray(vars) ? vars : [vars]).forEach(varStr => {
8
+ const [key, value] = varStr.split('=');
9
+ parsedVars[key] = value;
10
+ });
11
+ return parsedVars;
12
+ }
13
+ exports.parseEnvVars = parseEnvVars;
14
+ function parseNestedOptions(argv, optionPrefix, options) {
15
+ let args = [], parsed = { _generic: {} }, name, path, len, eqIndex, i;
16
+ for (i = 0, len = argv.length; i < len; i++) {
17
+ const arg = argv[i];
18
+ if (!_.startsWith(arg, optionPrefix)) {
19
+ continue;
20
+ }
21
+ eqIndex = arg.indexOf('=');
22
+ if (eqIndex !== -1) {
23
+ args.push(arg.slice(0, eqIndex), arg.slice(eqIndex + 1));
24
+ }
25
+ else if (argv[i + 1] && !_.startsWith(argv[i + 1], '-')) {
26
+ args.push(arg, argv[++i]);
27
+ }
28
+ else {
29
+ args.push(arg);
30
+ }
31
+ }
32
+ _.forEach(options, (option) => { parsed[option] = {}; });
33
+ for (i = 0, len = args.length; i < len; i++) {
34
+ const arg = args[i].replace(optionPrefix, '');
35
+ name = _.split(arg, '-', 1)[0];
36
+ path = _.includes(options, name) ?
37
+ [name, _.camelCase(arg.replace(name + '-', ''))].join('.') :
38
+ ['_generic', _.camelCase(arg)].join('.');
39
+ _.set(parsed, path, (!args[i + 1] || _.startsWith(args[i + 1], '-')) ? true : args[++i]);
40
+ }
41
+ return parsed;
42
+ }
43
+ exports.parseNestedOptions = parseNestedOptions;
44
+ //# sourceMappingURL=newman-util.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"newman-util.js","sourceRoot":"","sources":["../../src/cli/newman-util.ts"],"names":[],"mappings":";;;AAAA,4BAA4B;AAE5B,SAAgB,YAAY,CAAC,IAAS;IAClC,MAAM,UAAU,GAAG,EAAS,CAAC;IAC7B,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE;QACnD,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACvC,UAAU,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;IAC5B,CAAC,CAAC,CAAC;IACH,OAAO,UAAU,CAAC;AACtB,CAAC;AAPD,oCAOC;AAuBD,SAAgB,kBAAkB,CAAC,IAAI,EAAE,YAAY,EAAE,OAAO;IAC1D,IAAI,IAAI,GAAG,EAAE,EACT,MAAM,GAAG,EAAE,QAAQ,EAAE,EAAE,EAAE,EACzB,IAAI,EACJ,IAAI,EACJ,GAAG,EACH,OAAO,EACP,CAAC,CAAC;IAGN,KAAK,CAAC,GAAG,CAAC,EAAE,GAAG,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,GAAG,GAAG,EAAE,CAAC,EAAE,EAAE;QACzC,MAAM,GAAG,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;QAEpB,IAAI,CAAC,CAAC,CAAC,UAAU,CAAC,GAAG,EAAE,YAAY,CAAC,EAAE;YAAE,SAAS;SAAE;QAEnD,OAAO,GAAG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AC;YAC5D,CAAC,UAAU,EAAE,CAAC,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAI7C,CAAC,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;KAC5F;IAED,OAAO,MAAM,CAAC;AAClB,CAAC;AAlDD,gDAkDC"}
@@ -0,0 +1,13 @@
1
+ import type { CollectionDefinition, ItemGroupDefinition } from "postman-collection";
2
+ export declare class CollectionModifier {
3
+ private logger;
4
+ excludedItems: string[];
5
+ private itemsToExclude;
6
+ originalCollection: CollectionDefinition;
7
+ constructor(logger: any);
8
+ setItemsToExclude(itemsToExclude?: Record<string, boolean>): void;
9
+ modify(pathToCollection: string): Promise<ItemGroupDefinition>;
10
+ getCollectionName(): string;
11
+ private parseCollection;
12
+ private filterItemsByName;
13
+ }
@@ -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
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.CollectionModifier = void 0;
13
+ const fs = require("fs");
14
+ const constants_1 = require("../constants");
15
+ class CollectionModifier {
16
+ constructor(logger) {
17
+ this.logger = logger;
18
+ this.excludedItems = [];
19
+ this.itemsToExclude = {};
20
+ this.originalCollection = {};
21
+ }
22
+ setItemsToExclude(itemsToExclude = {}) {
23
+ this.itemsToExclude = itemsToExclude;
24
+ }
25
+ modify(pathToCollection) {
26
+ return __awaiter(this, void 0, void 0, function* () {
27
+ this.parseCollection(pathToCollection);
28
+ const collectionCopy = deepCopy(this.originalCollection);
29
+ return this.filterItemsByName(collectionCopy, [this.getCollectionName()]);
30
+ });
31
+ }
32
+ getCollectionName() {
33
+ var _a;
34
+ return ((_a = this.originalCollection.info) === null || _a === void 0 ? void 0 : _a.name) || this.originalCollection.name;
35
+ }
36
+ parseCollection(pathToCollection) {
37
+ const rawCollection = fs.readFileSync(pathToCollection, 'utf-8');
38
+ this.originalCollection = JSON.parse(rawCollection);
39
+ }
40
+ filterItemsByName(itemsGroup, suiteNameParts) {
41
+ if (!itemsGroup.item) {
42
+ this.logger.log('Corrupted structure of collection. Field `item` is missed. Collection won`t be modified.');
43
+ return itemsGroup;
44
+ }
45
+ itemsGroup.item = itemsGroup.item.map(item => {
46
+ if (item.item) {
47
+ return this.filterItemsByName(item, [...suiteNameParts, item.name]);
48
+ }
49
+ const testName = [...suiteNameParts, item.name].join(constants_1.SPLITTER);
50
+ if (this.itemsToExclude[testName]) {
51
+ this.excludedItems.push(testName);
52
+ return null;
53
+ }
54
+ return item;
55
+ }).filter(x => x);
56
+ return itemsGroup;
57
+ }
58
+ }
59
+ exports.CollectionModifier = CollectionModifier;
60
+ function deepCopy(obj) {
61
+ return JSON.parse(JSON.stringify(obj));
62
+ }
63
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/collection-modification/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAOA,yBAAyB;AACzB,4CAAwC;AAExC,MAAa,kBAAkB;IAK3B,YACY,MAAW;QAAX,WAAM,GAAN,MAAM,CAAK;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MAAM,QAAQ,GAAG,CAAC,GAAG,cAAc,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,oBAAQ,CAAC,CAAC;YAC/D,IAAG,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE;gBAE9B,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;gBAClC,OAAO,IAAI,CAAC;aACf;YAED,OAAO,IAAI,CAAC;QAChB,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAgD,CAAC;QACjE,OAAO,UAAU,CAAC;IACtB,CAAC;CACJ;AAzDD,gDAyDC;AAED,SAAS,QAAQ,CAAmB,GAAM;IACtC,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;AAC3C,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { ITestRunnerArgs } from 'sealights-plugins-common';
2
+ export interface SlNewmanConfig extends ITestRunnerArgs {
3
+ disableOtel: boolean;
4
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=sl-newman-config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sl-newman-config.js","sourceRoot":"","sources":["../../src/config/sl-newman-config.ts"],"names":[],"mappings":""}
@@ -0,0 +1,10 @@
1
+ import { ITagInfo } from 'sealights-plugins-common';
2
+ export declare const SPLITTER = " - ";
3
+ export declare const tags: ITagInfo[];
4
+ export declare enum NewmanEvents {
5
+ BEFORE_ITEM = "beforeItem",
6
+ BEFORE_REQUEST = "beforeRequest",
7
+ ASSERTATION = "assertion",
8
+ ITEM = "item",
9
+ DONE = "done"
10
+ }
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.NewmanEvents = exports.tags = exports.SPLITTER = void 0;
4
+ const version_1 = require("./version");
5
+ exports.SPLITTER = ' - ';
6
+ exports.tags = [{
7
+ name: 'newman-agent',
8
+ version: version_1.version,
9
+ }];
10
+ var NewmanEvents;
11
+ (function (NewmanEvents) {
12
+ NewmanEvents["BEFORE_ITEM"] = "beforeItem";
13
+ NewmanEvents["BEFORE_REQUEST"] = "beforeRequest";
14
+ NewmanEvents["ASSERTATION"] = "assertion";
15
+ NewmanEvents["ITEM"] = "item";
16
+ NewmanEvents["DONE"] = "done";
17
+ })(NewmanEvents || (exports.NewmanEvents = NewmanEvents = {}));
18
+ ;
19
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":";;;AACA,uCAAoC;AAEvB,QAAA,QAAQ,GAAG,KAAK,CAAC;AAEjB,QAAA,IAAI,GAAe,CAAC;QAC7B,IAAI,EAAE,cAAc;QACpB,OAAO,EAAP,iBAAO;KACV,CAAC,CAAC;AAEH,IAAY,YAMX;AAND,WAAY,YAAY;IACpB,0CAA0B,CAAA;IAC1B,gDAAgC,CAAA;IAChC,yCAAyB,CAAA;IACzB,6BAAa,CAAA;IACb,6BAAa,CAAA;AACjB,CAAC,EANW,YAAY,4BAAZ,YAAY,QAMvB;AAAA,CAAC"}
@@ -0,0 +1,5 @@
1
+ export { SlNewmanIntegration } from "./integration";
2
+ export { CollectionModifier } from "./collection-modification";
3
+ export { ConfigProvider, CliSlConfigProvider, EnvSlConfigProvider, FileSlConfigProvider, CombinedConfigProvider } from "sealights-plugins-common";
4
+ import { SlNewmanIntegration } from "./integration";
5
+ export declare const slNewman: SlNewmanIntegration;
package/dist/index.js ADDED
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.slNewman = exports.CombinedConfigProvider = exports.FileSlConfigProvider = exports.EnvSlConfigProvider = exports.CliSlConfigProvider = exports.ConfigProvider = exports.CollectionModifier = exports.SlNewmanIntegration = void 0;
4
+ var integration_1 = require("./integration");
5
+ Object.defineProperty(exports, "SlNewmanIntegration", { enumerable: true, get: function () { return integration_1.SlNewmanIntegration; } });
6
+ var collection_modification_1 = require("./collection-modification");
7
+ Object.defineProperty(exports, "CollectionModifier", { enumerable: true, get: function () { return collection_modification_1.CollectionModifier; } });
8
+ var sealights_plugins_common_1 = require("sealights-plugins-common");
9
+ Object.defineProperty(exports, "ConfigProvider", { enumerable: true, get: function () { return sealights_plugins_common_1.ConfigProvider; } });
10
+ Object.defineProperty(exports, "CliSlConfigProvider", { enumerable: true, get: function () { return sealights_plugins_common_1.CliSlConfigProvider; } });
11
+ Object.defineProperty(exports, "EnvSlConfigProvider", { enumerable: true, get: function () { return sealights_plugins_common_1.EnvSlConfigProvider; } });
12
+ Object.defineProperty(exports, "FileSlConfigProvider", { enumerable: true, get: function () { return sealights_plugins_common_1.FileSlConfigProvider; } });
13
+ Object.defineProperty(exports, "CombinedConfigProvider", { enumerable: true, get: function () { return sealights_plugins_common_1.CombinedConfigProvider; } });
14
+ const integration_2 = require("./integration");
15
+ const collection_modification_2 = require("./collection-modification");
16
+ const sealights_plugins_common_2 = require("sealights-plugins-common");
17
+ const collectionModifier = new collection_modification_2.CollectionModifier(sealights_plugins_common_2.logger);
18
+ exports.slNewman = new integration_2.SlNewmanIntegration(collectionModifier);
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,6CAAoD;AAA3C,kHAAA,mBAAmB,OAAA;AAC5B,qEAA+D;AAAtD,6HAAA,kBAAkB,OAAA;AAC3B,qEAAkJ;AAAzI,0HAAA,cAAc,OAAA;AAAE,+HAAA,mBAAmB,OAAA;AAAE,+HAAA,mBAAmB,OAAA;AAAE,gIAAA,oBAAoB,OAAA;AAAE,kIAAA,sBAAsB,OAAA;AAE/G,+CAAoD;AACpD,uEAA+D;AAC/D,uEAAkD;AAElD,MAAM,kBAAkB,GAAG,IAAI,4CAAkB,CAAC,iCAAM,CAAC,CAAC;AAC7C,QAAA,QAAQ,GAAG,IAAI,iCAAmB,CAAC,kBAAkB,CAAC,CAAC"}
@@ -0,0 +1,23 @@
1
+ import { NewmanRunOptions } from 'newman';
2
+ import { ISlPluginConfigProvider } from 'sealights-plugins-common';
3
+ import { CollectionModifier } from './collection-modification';
4
+ import { SlNewmanConfig } from './config/sl-newman-config';
5
+ export declare class SlNewmanIntegration {
6
+ private collectionModifier;
7
+ private sealightsIntegration?;
8
+ private slConfig;
9
+ constructor(collectionModifier: CollectionModifier);
10
+ run(slOptions: ISlPluginConfigProvider<SlNewmanConfig>, newmanOptions: NewmanRunOptions): Promise<void>;
11
+ private getTestName;
12
+ private getTestsToExclude;
13
+ private getAndProcessExcludedTests;
14
+ private initSealightsIntegration;
15
+ private buildBaggageHeader;
16
+ private testNameToSuiteName;
17
+ private runNewman;
18
+ private registerTest;
19
+ private addOtelHeaders;
20
+ private processAssertation;
21
+ private registerTestEnd;
22
+ private stopAgent;
23
+ }
@@ -0,0 +1,159 @@
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.SlNewmanIntegration = void 0;
13
+ const newman_1 = require("newman");
14
+ const sealights_plugins_common_1 = require("sealights-plugins-common");
15
+ const constants_1 = require("./constants");
16
+ const testEventsMap = {};
17
+ class SlNewmanIntegration {
18
+ constructor(collectionModifier) {
19
+ this.collectionModifier = collectionModifier;
20
+ }
21
+ run(slOptions, newmanOptions) {
22
+ var _a;
23
+ return __awaiter(this, void 0, void 0, function* () {
24
+ yield slOptions.init();
25
+ this.slConfig = slOptions.getConfig();
26
+ yield this.initSealightsIntegration(slOptions);
27
+ yield ((_a = this.sealightsIntegration) === null || _a === void 0 ? void 0 : _a.startExecution());
28
+ yield this.getTestsToExclude();
29
+ const modifiedCollection = yield this.collectionModifier.modify(newmanOptions.collection);
30
+ this.getAndProcessExcludedTests();
31
+ this.runNewman(Object.assign(Object.assign({}, newmanOptions), { collection: modifiedCollection }));
32
+ });
33
+ }
34
+ getTestName(item) {
35
+ const nameParts = [];
36
+ while (item) {
37
+ if (item.name) {
38
+ nameParts.unshift(item.name);
39
+ }
40
+ item = item.__parent;
41
+ }
42
+ return nameParts.join(constants_1.SPLITTER);
43
+ }
44
+ getTestsToExclude() {
45
+ var _a;
46
+ return __awaiter(this, void 0, void 0, function* () {
47
+ const excludedTests = yield ((_a = this.sealightsIntegration) === null || _a === void 0 ? void 0 : _a.getExcludedTests());
48
+ this.collectionModifier.setItemsToExclude(excludedTests);
49
+ });
50
+ }
51
+ getAndProcessExcludedTests() {
52
+ var _a, _b;
53
+ const excludedTests = this.collectionModifier.excludedItems;
54
+ const timestamp = Date.now();
55
+ for (const testName of excludedTests) {
56
+ testEventsMap[testName] = {
57
+ name: testName,
58
+ start: timestamp,
59
+ end: timestamp,
60
+ status: sealights_plugins_common_1.TestResult.SKIPPED,
61
+ };
62
+ const suitename = this.testNameToSuiteName(testName);
63
+ (_a = this.sealightsIntegration) === null || _a === void 0 ? void 0 : _a.startTest({
64
+ name: testName,
65
+ suitename,
66
+ });
67
+ (_b = this.sealightsIntegration) === null || _b === void 0 ? void 0 : _b.endTest({
68
+ name: testName,
69
+ suitename,
70
+ result: sealights_plugins_common_1.TestResult.SKIPPED,
71
+ duration: 0,
72
+ });
73
+ }
74
+ }
75
+ initSealightsIntegration(slOptions) {
76
+ return __awaiter(this, void 0, void 0, function* () {
77
+ this.sealightsIntegration = yield sealights_plugins_common_1.SealightsIntegration.getInstance(slOptions, null, constants_1.tags);
78
+ });
79
+ }
80
+ buildBaggageHeader(testName) {
81
+ var _a;
82
+ return {
83
+ key: 'baggage',
84
+ value: `x-sl-test-session-id=${(_a = this.sealightsIntegration) === null || _a === void 0 ? void 0 : _a.getExecutionId()},x-sl-test-name=${testName}`
85
+ };
86
+ }
87
+ testNameToSuiteName(testName) {
88
+ const parts = testName.split(constants_1.SPLITTER);
89
+ if (parts.length < 2) {
90
+ return '';
91
+ }
92
+ parts.pop();
93
+ parts.join(constants_1.SPLITTER);
94
+ }
95
+ runNewman(newmanOptions) {
96
+ (0, newman_1.run)(newmanOptions)
97
+ .on(constants_1.NewmanEvents.BEFORE_ITEM, (_err, context) => this.registerTest(context.item))
98
+ .on(constants_1.NewmanEvents.BEFORE_REQUEST, (_context, item) => this.addOtelHeaders(item))
99
+ .on(constants_1.NewmanEvents.ASSERTATION, (err, { assertion, item, skipped }) => this.processAssertation(item, assertion, skipped, !err))
100
+ .on(constants_1.NewmanEvents.ITEM, (_err, { item }) => this.registerTestEnd(item))
101
+ .on(constants_1.NewmanEvents.DONE, error => this.stopAgent(error));
102
+ }
103
+ registerTest(item) {
104
+ var _a;
105
+ const testName = this.getTestName(item);
106
+ testEventsMap[testName] = {
107
+ name: testName,
108
+ start: Date.now(),
109
+ status: sealights_plugins_common_1.TestResult.PENDING,
110
+ };
111
+ (_a = this.sealightsIntegration) === null || _a === void 0 ? void 0 : _a.startTest({
112
+ name: testName,
113
+ suitename: this.testNameToSuiteName(testName),
114
+ });
115
+ }
116
+ addOtelHeaders(item) {
117
+ if (!this.slConfig.disableOtel) {
118
+ const headers = item.request.headers.members;
119
+ const testName = this.getTestName(item);
120
+ headers.push(this.buildBaggageHeader(testName));
121
+ }
122
+ }
123
+ processAssertation(item, assertion, isSkipped, isPassed) {
124
+ const testName = this.getTestName(item);
125
+ if (!isPassed && testEventsMap[testName].status !== sealights_plugins_common_1.TestResult.FAILED) {
126
+ sealights_plugins_common_1.logger.debug(`[newman-wrapper] Assertion "${assertion}" failed. "${testName}" marked as failed`);
127
+ testEventsMap[testName].status = sealights_plugins_common_1.TestResult.FAILED;
128
+ }
129
+ if (isPassed && !isSkipped && testEventsMap[testName].status === sealights_plugins_common_1.TestResult.PENDING) {
130
+ sealights_plugins_common_1.logger.debug(`[newman-wrapper] Assertion "${assertion}" passed. "${testName}" not marked as PENDING anymore`);
131
+ testEventsMap[testName].status = sealights_plugins_common_1.TestResult.PASSED;
132
+ }
133
+ testEventsMap[testName].end = Date.now();
134
+ }
135
+ registerTestEnd(item) {
136
+ var _a;
137
+ const testName = this.getTestName(item);
138
+ const testEvent = testEventsMap[testName];
139
+ (_a = this.sealightsIntegration) === null || _a === void 0 ? void 0 : _a.endTest({
140
+ name: testEvent.name,
141
+ suitename: this.testNameToSuiteName(testEvent.name),
142
+ result: testEvent.status,
143
+ duration: testEvent.end - testEvent.start,
144
+ });
145
+ }
146
+ stopAgent(error) {
147
+ var _a, _b;
148
+ return __awaiter(this, void 0, void 0, function* () {
149
+ if (error) {
150
+ sealights_plugins_common_1.logger.error('[newman-wrapper] There was an error running the collection:', error);
151
+ }
152
+ yield ((_a = this.sealightsIntegration) === null || _a === void 0 ? void 0 : _a.endExecution());
153
+ yield ((_b = this.sealightsIntegration) === null || _b === void 0 ? void 0 : _b.stopAgent());
154
+ sealights_plugins_common_1.logger.info('[newman-wrapper] Collection run completed.');
155
+ });
156
+ }
157
+ }
158
+ exports.SlNewmanIntegration = SlNewmanIntegration;
159
+ //# sourceMappingURL=integration.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"integration.js","sourceRoot":"","sources":["../src/integration.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,mCAA4D;AAK5D,uEAA6G;AAI7G,2CAA2D;AAE3D,MAAM,aAAa,GAA+B,EAAE,CAAC;AAQrD,MAAa,mBAAmB;IAI5B,YAAoB,kBAAsC;QAAtC,uBAAk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I;YACpB,SAAS,EAAE,IAAI,CAAC,mBAAmB,CAAC,SAAS,CAAC,IAAI,CAAC;YACnD,MAAM,EAAE,SAAS,CAAC,MAAM;YACxB,QAAQ,EAAE,SAAS,CAAC,GAAG,GAAG,SAAS,CAAC,KAAK;SAC5C,CAAC,CAAC;IACP,CAAC;IAEa,SAAS,CAAC,KAAU;;;YAC9B,IAAI,KAAK,EAAE;gBACP,iCAAM,CAAC,KAAK,CAAC,6DAA6D,EAAE,KAAK,CAAC,CAAC;aACtF;YAED,MAAM,CAAA,MAAA,IAAI,CAAC,oBAAoB,0CAAE,YAAY,EAAE,CAAA,CAAC;YAChD,MAAM,CAAA,MAAA,IAAI,CAAC,oBAAoB,0CAAE,SAAS,EAAE,CAAA,CAAC;YAC7C,iCAAM,CAAC,IAAI,CAAC,4CAA4C,CAAC,CAAC;;KAC7D;CACJ;AAhKD,kDAgKC"}
@@ -0,0 +1 @@
1
+ export declare const version = "2.0.23";
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.version = void 0;
4
+ exports.version = "2.0.23";
5
+ //# sourceMappingURL=version.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":";;;AAAa,QAAA,OAAO,GAAG,QAAQ,CAAC"}
package/package.json ADDED
@@ -0,0 +1,38 @@
1
+ {
2
+ "name": "sealights-newman-wrapper",
3
+ "version": "2.0.23",
4
+ "description": "Sealights agent for Newman",
5
+ "main": "dist/index.js",
6
+ "bin": "bin/index.js",
7
+ "files": [
8
+ "dist",
9
+ "bin"
10
+ ],
11
+ "repository": {
12
+ "type": "git",
13
+ "url": "git+https://github.com/Sealights/SL.OnPremis.Plugins.JavaScript.git"
14
+ },
15
+ "scripts": {
16
+ "prebuild": "node -p \"'export const version = ' + JSON.stringify(require('./package.json').version) + ';'\" > src/version.ts",
17
+ "build": "npx tsc",
18
+ "test": "npx cross-env TS_NODE_PROJECT=./tsconfig.mocha.json mocha"
19
+ },
20
+ "author": "",
21
+ "license": "ISC",
22
+ "dependencies": {
23
+ "lodash": "^4.17.21",
24
+ "minimist": "^1.2.8",
25
+ "sealights-plugins-common": "^2.0.23"
26
+ },
27
+ "devDependencies": {
28
+ "@types/lodash": "^4.14.200",
29
+ "@types/minimist": "^1.2.4",
30
+ "@types/newman": "^5.3.3",
31
+ "cross-env": "^7.0.3",
32
+ "typescript": "^5.2.2"
33
+ },
34
+ "peerDependencies": {
35
+ "newman": ">= 2 < 7"
36
+ },
37
+ "gitHead": "ed6240474b60e35c62dc98909c0f6031ccf3d8d7"
38
+ }