allure-js-commons 3.3.3 → 3.4.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.
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.setGlobalTestRuntime = exports.getGlobalTestRuntimeWithAutoconfig = exports.getGlobalTestRuntime = void 0;
|
|
7
7
|
var _NoopTestRuntime = require("./NoopTestRuntime.js");
|
|
8
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
8
9
|
var ALLURE_TEST_RUNTIME_KEY = "allureTestRuntime";
|
|
9
10
|
var setGlobalTestRuntime = runtime => {
|
|
10
11
|
globalThis[ALLURE_TEST_RUNTIME_KEY] = () => runtime;
|
|
@@ -28,16 +29,13 @@ var getGlobalTestRuntimeWithAutoconfig = () => {
|
|
|
28
29
|
var _testRuntime2;
|
|
29
30
|
return (_testRuntime2 = testRuntime()) !== null && _testRuntime2 !== void 0 ? _testRuntime2 : _NoopTestRuntime.noopRuntime;
|
|
30
31
|
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
});
|
|
39
|
-
} catch (ignored) {}
|
|
40
|
-
return _NoopTestRuntime.noopRuntime;
|
|
32
|
+
|
|
33
|
+
// protection from bundlers tree-shaking visiting (webpack, rollup)
|
|
34
|
+
var pwAutoconfigModuleName = "allure-playwright/autoconfig";
|
|
35
|
+
return (specifier => new Promise(r => r("".concat(specifier))).then(s => _interopRequireWildcard(require(s))))(pwAutoconfigModuleName).then(() => {
|
|
36
|
+
var _getGlobalTestRuntime, _getGlobalTestRuntime2;
|
|
37
|
+
return (_getGlobalTestRuntime = (_getGlobalTestRuntime2 = getGlobalTestRuntimeFunction()) === null || _getGlobalTestRuntime2 === void 0 ? void 0 : _getGlobalTestRuntime2()) !== null && _getGlobalTestRuntime !== void 0 ? _getGlobalTestRuntime : _NoopTestRuntime.noopRuntime;
|
|
38
|
+
}).catch(() => _NoopTestRuntime.noopRuntime);
|
|
41
39
|
};
|
|
42
40
|
exports.getGlobalTestRuntimeWithAutoconfig = getGlobalTestRuntimeWithAutoconfig;
|
|
43
41
|
//# sourceMappingURL=runtime.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.js","names":["_NoopTestRuntime","require","ALLURE_TEST_RUNTIME_KEY","setGlobalTestRuntime","runtime","globalThis","exports","getGlobalTestRuntimeFunction","getGlobalTestRuntime","testRuntime","_testRuntime","noopRuntime","getGlobalTestRuntimeWithAutoconfig","_testRuntime2","
|
|
1
|
+
{"version":3,"file":"runtime.js","names":["_NoopTestRuntime","require","_interopRequireWildcard","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","_t","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ALLURE_TEST_RUNTIME_KEY","setGlobalTestRuntime","runtime","globalThis","exports","getGlobalTestRuntimeFunction","getGlobalTestRuntime","testRuntime","_testRuntime","noopRuntime","getGlobalTestRuntimeWithAutoconfig","_testRuntime2","pwAutoconfigModuleName","specifier","Promise","concat","then","s","_getGlobalTestRuntime","_getGlobalTestRuntime2","catch"],"sources":["../../../../src/sdk/runtime/runtime.ts"],"sourcesContent":["import { noopRuntime } from \"./NoopTestRuntime.js\";\nimport type { TestRuntime } from \"./types.js\";\n\nconst ALLURE_TEST_RUNTIME_KEY = \"allureTestRuntime\";\n\nexport const setGlobalTestRuntime = (runtime: TestRuntime) => {\n (globalThis as any)[ALLURE_TEST_RUNTIME_KEY] = () => runtime;\n};\n\nconst getGlobalTestRuntimeFunction = () => {\n return (globalThis as any)?.[ALLURE_TEST_RUNTIME_KEY] as (() => TestRuntime | undefined) | undefined;\n};\n\nexport const getGlobalTestRuntime = (): TestRuntime => {\n const testRuntime = getGlobalTestRuntimeFunction();\n\n if (testRuntime) {\n return testRuntime() ?? noopRuntime;\n }\n\n return noopRuntime;\n};\n\nexport const getGlobalTestRuntimeWithAutoconfig = (): TestRuntime | Promise<TestRuntime> => {\n const testRuntime = getGlobalTestRuntimeFunction();\n\n if (testRuntime) {\n return testRuntime() ?? noopRuntime;\n }\n\n // protection from bundlers tree-shaking visiting (webpack, rollup)\n const pwAutoconfigModuleName = \"allure-playwright/autoconfig\";\n\n return import(pwAutoconfigModuleName)\n .then(() => getGlobalTestRuntimeFunction()?.() ?? noopRuntime)\n .catch(() => noopRuntime);\n};\n"],"mappings":";;;;;;AAAA,IAAAA,gBAAA,GAAAC,OAAA;AAAmD,SAAAC,wBAAAC,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAH,uBAAA,YAAAA,wBAAAC,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,E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IF,4BAAW;EACrC;;EAEA;EACA,IAAMG,sBAAsB,GAAG,8BAA8B;EAE7D,OAAO,CAAAC,SAAA,QAAAC,OAAA,CAAA/B,CAAA,IAAAA,CAAA,IAAAgC,MAAA,CAAAF,SAAA,IAAAG,IAAA,CAAAC,CAAA,IAAAtC,uBAAA,CAAAD,OAAA,CAAAuC,CAAA,KAAOL,sBAAsB,EACjCI,IAAI,CAAC;IAAA,IAAAE,qBAAA,EAAAC,sBAAA;IAAA,QAAAD,qBAAA,IAAAC,sBAAA,GAAMd,4BAA4B,CAAC,CAAC,cAAAc,sBAAA,uBAA9BA,sBAAA,CAAiC,CAAC,cAAAD,qBAAA,cAAAA,qBAAA,GAAIT,4BAAW;EAAA,EAAC,CAC7DW,KAAK,CAAC,MAAMX,4BAAW,CAAC;AAC7B,CAAC;AAACL,OAAA,CAAAM,kCAAA,GAAAA,kCAAA","ignoreList":[]}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
function _tsRewriteRelativeImportExtensions(t, e) { return "string" == typeof t && /^\.\.?\//.test(t) ? t.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+)?)\.([cm]?)ts$/i, function (t, s, r, n, o) { return s ? e ? ".jsx" : ".js" : !r || n && o ? r + n + "." + o.toLowerCase() + "js" : t; }) : t; }
|
|
1
2
|
import { noopRuntime } from "./NoopTestRuntime.js";
|
|
2
3
|
var ALLURE_TEST_RUNTIME_KEY = "allureTestRuntime";
|
|
3
4
|
export var setGlobalTestRuntime = runtime => {
|
|
@@ -20,15 +21,12 @@ export var getGlobalTestRuntimeWithAutoconfig = () => {
|
|
|
20
21
|
var _testRuntime2;
|
|
21
22
|
return (_testRuntime2 = testRuntime()) !== null && _testRuntime2 !== void 0 ? _testRuntime2 : noopRuntime;
|
|
22
23
|
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
});
|
|
31
|
-
} catch (ignored) {}
|
|
32
|
-
return noopRuntime;
|
|
24
|
+
|
|
25
|
+
// protection from bundlers tree-shaking visiting (webpack, rollup)
|
|
26
|
+
var pwAutoconfigModuleName = "allure-playwright/autoconfig";
|
|
27
|
+
return import(_tsRewriteRelativeImportExtensions(pwAutoconfigModuleName)).then(() => {
|
|
28
|
+
var _getGlobalTestRuntime, _getGlobalTestRuntime2;
|
|
29
|
+
return (_getGlobalTestRuntime = (_getGlobalTestRuntime2 = getGlobalTestRuntimeFunction()) === null || _getGlobalTestRuntime2 === void 0 ? void 0 : _getGlobalTestRuntime2()) !== null && _getGlobalTestRuntime !== void 0 ? _getGlobalTestRuntime : noopRuntime;
|
|
30
|
+
}).catch(() => noopRuntime);
|
|
33
31
|
};
|
|
34
32
|
//# sourceMappingURL=runtime.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.js","names":["noopRuntime","ALLURE_TEST_RUNTIME_KEY","setGlobalTestRuntime","runtime","globalThis","getGlobalTestRuntimeFunction","getGlobalTestRuntime","testRuntime","_testRuntime","getGlobalTestRuntimeWithAutoconfig","_testRuntime2","
|
|
1
|
+
{"version":3,"file":"runtime.js","names":["noopRuntime","ALLURE_TEST_RUNTIME_KEY","setGlobalTestRuntime","runtime","globalThis","getGlobalTestRuntimeFunction","getGlobalTestRuntime","testRuntime","_testRuntime","getGlobalTestRuntimeWithAutoconfig","_testRuntime2","pwAutoconfigModuleName","_tsRewriteRelativeImportExtensions","then","_getGlobalTestRuntime","_getGlobalTestRuntime2","catch"],"sources":["../../../../src/sdk/runtime/runtime.ts"],"sourcesContent":["import { noopRuntime } from \"./NoopTestRuntime.js\";\nimport type { TestRuntime } from \"./types.js\";\n\nconst ALLURE_TEST_RUNTIME_KEY = \"allureTestRuntime\";\n\nexport const setGlobalTestRuntime = (runtime: TestRuntime) => {\n (globalThis as any)[ALLURE_TEST_RUNTIME_KEY] = () => runtime;\n};\n\nconst getGlobalTestRuntimeFunction = () => {\n return (globalThis as any)?.[ALLURE_TEST_RUNTIME_KEY] as (() => TestRuntime | undefined) | undefined;\n};\n\nexport const getGlobalTestRuntime = (): TestRuntime => {\n const testRuntime = getGlobalTestRuntimeFunction();\n\n if (testRuntime) {\n return testRuntime() ?? noopRuntime;\n }\n\n return noopRuntime;\n};\n\nexport const getGlobalTestRuntimeWithAutoconfig = (): TestRuntime | Promise<TestRuntime> => {\n const testRuntime = getGlobalTestRuntimeFunction();\n\n if (testRuntime) {\n return testRuntime() ?? noopRuntime;\n }\n\n // protection from bundlers tree-shaking visiting (webpack, rollup)\n const pwAutoconfigModuleName = \"allure-playwright/autoconfig\";\n\n return import(pwAutoconfigModuleName)\n .then(() => getGlobalTestRuntimeFunction()?.() ?? noopRuntime)\n .catch(() => noopRuntime);\n};\n"],"mappings":";AAAA,SAASA,WAAW,QAAQ,sBAAsB;AAGlD,IAAMC,uBAAuB,GAAG,mBAAmB;AAEnD,OAAO,IAAMC,oBAAoB,GAAIC,OAAoB,IAAK;EAC3DC,UAAU,CAASH,uBAAuB,CAAC,GAAG,MAAME,OAAO;AAC9D,CAAC;AAED,IAAME,4BAA4B,GAAGA,CAAA,KAAM;EACzC,OAAQD,UAAU,aAAVA,UAAU,uBAAVA,UAAU,CAAWH,uBAAuB,CAAC;AACvD,CAAC;AAED,OAAO,IAAMK,oBAAoB,GAAGA,CAAA,KAAmB;EACrD,IAAMC,WAAW,GAAGF,4BAA4B,CAAC,CAAC;EAElD,IAAIE,WAAW,EAAE;IAAA,IAAAC,YAAA;IACf,QAAAA,YAAA,GAAOD,WAAW,CAAC,CAAC,cAAAC,YAAA,cAAAA,YAAA,GAAIR,WAAW;EACrC;EAEA,OAAOA,WAAW;AACpB,CAAC;AAED,OAAO,IAAMS,kCAAkC,GAAGA,CAAA,KAA0C;EAC1F,IAAMF,WAAW,GAAGF,4BAA4B,CAAC,CAAC;EAElD,IAAIE,WAAW,EAAE;IAAA,IAAAG,aAAA;IACf,QAAAA,aAAA,GAAOH,WAAW,CAAC,CAAC,cAAAG,aAAA,cAAAA,aAAA,GAAIV,WAAW;EACrC;;EAEA;EACA,IAAMW,sBAAsB,GAAG,8BAA8B;EAE7D,OAAO,MAAM,CAAAC,kCAAA,CAACD,sBAAsB,EAAC,CAClCE,IAAI,CAAC;IAAA,IAAAC,qBAAA,EAAAC,sBAAA;IAAA,QAAAD,qBAAA,IAAAC,sBAAA,GAAMV,4BAA4B,CAAC,CAAC,cAAAU,sBAAA,uBAA9BA,sBAAA,CAAiC,CAAC,cAAAD,qBAAA,cAAAA,qBAAA,GAAId,WAAW;EAAA,EAAC,CAC7DgB,KAAK,CAAC,MAAMhB,WAAW,CAAC;AAC7B,CAAC","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "allure-js-commons",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.4.0",
|
|
4
4
|
"description": "Allure JS Commons",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"allure",
|
|
@@ -95,17 +95,17 @@
|
|
|
95
95
|
"eslint": "^8.57.0",
|
|
96
96
|
"eslint-config-prettier": "^10.0.0",
|
|
97
97
|
"eslint-plugin-import": "^2.29.1",
|
|
98
|
-
"eslint-plugin-jsdoc": "^
|
|
98
|
+
"eslint-plugin-jsdoc": "^54.0.0",
|
|
99
99
|
"eslint-plugin-n": "^17.10.1",
|
|
100
100
|
"eslint-plugin-no-null": "^1.0.2",
|
|
101
101
|
"eslint-plugin-prefer-arrow": "^1.2.3",
|
|
102
102
|
"npm-run-all2": "^8.0.0",
|
|
103
103
|
"rimraf": "^6.0.0",
|
|
104
104
|
"typescript": "^5.2.2",
|
|
105
|
-
"vitest": "^3.
|
|
105
|
+
"vitest": "^3.2.4"
|
|
106
106
|
},
|
|
107
107
|
"peerDependencies": {
|
|
108
|
-
"allure-playwright": "3.
|
|
108
|
+
"allure-playwright": "3.4.0"
|
|
109
109
|
},
|
|
110
110
|
"peerDependenciesMeta": {
|
|
111
111
|
"allure-playwright": {
|