allure-js-commons 3.7.2 → 3.9.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.
Files changed (78) hide show
  1. package/README.md +21 -0
  2. package/dist/cjs/facade.js.map +1 -1
  3. package/dist/cjs/http.js +11 -0
  4. package/dist/cjs/http.js.map +1 -0
  5. package/dist/cjs/index.js +25 -0
  6. package/dist/cjs/index.js.map +1 -1
  7. package/dist/cjs/model.js +1 -0
  8. package/dist/cjs/model.js.map +1 -1
  9. package/dist/cjs/sdk/reporter/utils/extensions.js +1 -0
  10. package/dist/cjs/sdk/reporter/utils/extensions.js.map +1 -1
  11. package/dist/cjs/sdk/reporter/utils/labels.js +9 -4
  12. package/dist/cjs/sdk/reporter/utils/labels.js.map +1 -1
  13. package/dist/cjs/sdk/reporter/utils.js +59 -21
  14. package/dist/cjs/sdk/reporter/utils.js.map +1 -1
  15. package/dist/cjs/sdk/runtime/MessageHolderTestRuntime.js +3 -0
  16. package/dist/cjs/sdk/runtime/MessageHolderTestRuntime.js.map +1 -1
  17. package/dist/cjs/sdk/runtime/MessageTestRuntime.js +220 -5
  18. package/dist/cjs/sdk/runtime/MessageTestRuntime.js.map +1 -1
  19. package/dist/cjs/sdk/runtime/NoopTestRuntime.js +83 -3
  20. package/dist/cjs/sdk/runtime/NoopTestRuntime.js.map +1 -1
  21. package/dist/cjs/sdk/runtime/index.js +6 -0
  22. package/dist/cjs/sdk/runtime/index.js.map +1 -1
  23. package/dist/cjs/sdk/runtime/runtime.js +42 -8
  24. package/dist/cjs/sdk/runtime/runtime.js.map +1 -1
  25. package/dist/cjs/sdk/runtime/types.js.map +1 -1
  26. package/dist/cjs/sync.js +267 -0
  27. package/dist/cjs/sync.js.map +1 -0
  28. package/dist/cjs/syncFacade.js +158 -0
  29. package/dist/cjs/syncFacade.js.map +1 -0
  30. package/dist/esm/facade.js.map +1 -1
  31. package/dist/esm/http.js +5 -0
  32. package/dist/esm/http.js.map +1 -0
  33. package/dist/esm/index.js +1 -0
  34. package/dist/esm/index.js.map +1 -1
  35. package/dist/esm/model.js +1 -0
  36. package/dist/esm/model.js.map +1 -1
  37. package/dist/esm/sdk/reporter/utils/extensions.js +1 -0
  38. package/dist/esm/sdk/reporter/utils/extensions.js.map +1 -1
  39. package/dist/esm/sdk/reporter/utils/labels.js +10 -5
  40. package/dist/esm/sdk/reporter/utils/labels.js.map +1 -1
  41. package/dist/esm/sdk/reporter/utils.js +57 -20
  42. package/dist/esm/sdk/reporter/utils.js.map +1 -1
  43. package/dist/esm/sdk/runtime/MessageHolderTestRuntime.js +3 -0
  44. package/dist/esm/sdk/runtime/MessageHolderTestRuntime.js.map +1 -1
  45. package/dist/esm/sdk/runtime/MessageTestRuntime.js +220 -5
  46. package/dist/esm/sdk/runtime/MessageTestRuntime.js.map +1 -1
  47. package/dist/esm/sdk/runtime/NoopTestRuntime.js +81 -2
  48. package/dist/esm/sdk/runtime/NoopTestRuntime.js.map +1 -1
  49. package/dist/esm/sdk/runtime/index.js +1 -1
  50. package/dist/esm/sdk/runtime/index.js.map +1 -1
  51. package/dist/esm/sdk/runtime/runtime.js +40 -8
  52. package/dist/esm/sdk/runtime/runtime.js.map +1 -1
  53. package/dist/esm/sdk/runtime/types.js.map +1 -1
  54. package/dist/esm/sync.js +4 -0
  55. package/dist/esm/sync.js.map +1 -0
  56. package/dist/esm/syncFacade.js +123 -0
  57. package/dist/esm/syncFacade.js.map +1 -0
  58. package/dist/types/facade.d.ts +3 -7
  59. package/dist/types/http.d.ts +79 -0
  60. package/dist/types/index.d.ts +3 -1
  61. package/dist/types/model.d.ts +2 -3
  62. package/dist/types/sdk/reporter/ReporterRuntime.d.ts +0 -2
  63. package/dist/types/sdk/reporter/types.d.ts +0 -2
  64. package/dist/types/sdk/reporter/utils/labels.d.ts +1 -1
  65. package/dist/types/sdk/reporter/utils.d.ts +5 -3
  66. package/dist/types/sdk/reporter/writer/FileSystemWriter.d.ts +0 -2
  67. package/dist/types/sdk/reporter/writer/InMemoryWriter.d.ts +0 -2
  68. package/dist/types/sdk/reporter/writer/MessageWriter.d.ts +1 -4
  69. package/dist/types/sdk/runtime/MessageHolderTestRuntime.d.ts +1 -0
  70. package/dist/types/sdk/runtime/MessageTestRuntime.d.ts +10 -3
  71. package/dist/types/sdk/runtime/NoopTestRuntime.d.ts +49 -2
  72. package/dist/types/sdk/runtime/index.d.ts +2 -2
  73. package/dist/types/sdk/runtime/runtime.d.ts +3 -1
  74. package/dist/types/sdk/runtime/types.d.ts +28 -2
  75. package/dist/types/sdk/types.d.ts +0 -2
  76. package/dist/types/sync.d.ts +6 -0
  77. package/dist/types/syncFacade.d.ts +35 -0
  78. package/package.json +15 -3
@@ -1,6 +1,85 @@
1
1
  function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
2
2
  function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
3
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
4
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
5
+ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
6
+ import { isPromise } from "../utils.js";
7
+ export var NOOP_RUNTIME_WARNING = "no test runtime is found. Please check test framework configuration";
8
+ export var NOOP_SYNC_RUNTIME_WARNING = "no sync test runtime is found. Please check test framework configuration and adapter sync support";
9
+ export var SYNC_STEP_PURE_FUNCTION_ERROR = "allure-js-commons/sync step body must be synchronous and must not return a Promise";
10
+ export class NoopSyncTestRuntime {
11
+ attachment(_, __, ___) {
12
+ this.warning();
13
+ }
14
+ attachmentFromPath(_, __, ___) {
15
+ this.warning();
16
+ }
17
+ globalAttachment(_, __, ___) {
18
+ this.warning();
19
+ }
20
+ globalAttachmentFromPath(_, __, ___) {
21
+ this.warning();
22
+ }
23
+ globalError(_) {
24
+ this.warning();
25
+ }
26
+ description(_) {
27
+ this.warning();
28
+ }
29
+ descriptionHtml(_) {
30
+ this.warning();
31
+ }
32
+ displayName(_) {
33
+ this.warning();
34
+ }
35
+ historyId(_) {
36
+ this.warning();
37
+ }
38
+ labels() {
39
+ this.warning();
40
+ }
41
+ links() {
42
+ this.warning();
43
+ }
44
+ parameter(_, __, ___) {
45
+ this.warning();
46
+ }
47
+ logStep(_, __, ___) {
48
+ this.warning();
49
+ }
50
+ step(_, body) {
51
+ this.warning();
52
+ var result = body();
53
+ if (isPromise(result)) {
54
+ var error = new Error(SYNC_STEP_PURE_FUNCTION_ERROR);
55
+ this.warnAboutPromiseStep();
56
+ throw error;
57
+ }
58
+ return result;
59
+ }
60
+ stepDisplayName(_) {
61
+ this.warning();
62
+ }
63
+ stepParameter(_, __, ___) {
64
+ this.warning();
65
+ }
66
+ testCaseId(_) {
67
+ this.warning();
68
+ }
69
+ warning() {
70
+ // eslint-disable-next-line no-console
71
+ console.warn(NOOP_SYNC_RUNTIME_WARNING);
72
+ }
73
+ warnAboutPromiseStep() {
74
+ // eslint-disable-next-line no-console
75
+ console.warn(SYNC_STEP_PURE_FUNCTION_ERROR);
76
+ }
77
+ }
78
+ export var noopSyncRuntime = new NoopSyncTestRuntime();
3
79
  export class NoopTestRuntime {
80
+ constructor() {
81
+ _defineProperty(this, "sync", noopSyncRuntime);
82
+ }
4
83
  attachment() {
5
84
  var _this = this;
6
85
  return _asyncToGenerator(function* () {
@@ -79,7 +158,7 @@ export class NoopTestRuntime {
79
158
  yield _this11.warning();
80
159
  })();
81
160
  }
82
- step(name, body) {
161
+ step(_, body) {
83
162
  var _this12 = this;
84
163
  return _asyncToGenerator(function* () {
85
164
  yield _this12.warning();
@@ -109,7 +188,7 @@ export class NoopTestRuntime {
109
188
  warning() {
110
189
  return _asyncToGenerator(function* () {
111
190
  // eslint-disable-next-line no-console
112
- console.log("no test runtime is found. Please check test framework configuration");
191
+ console.log(NOOP_RUNTIME_WARNING);
113
192
  })();
114
193
  }
115
194
  }
@@ -1 +1 @@
1
- {"version":3,"file":"NoopTestRuntime.js","names":["NoopTestRuntime","attachment","_this","_asyncToGenerator","warning","attachmentFromPath","_this2","globalAttachment","_this3","globalAttachmentFromPath","_this4","globalError","_this5","description","_this6","descriptionHtml","_this7","displayName","_this8","historyId","_this9","labels","_this0","links","_this1","parameter","_this10","logStep","_this11","step","name","body","_this12","stepDisplayName","_this13","stepParameter","_this14","testCaseId","_this15","console","log","noopRuntime"],"sources":["../../../../src/sdk/runtime/NoopTestRuntime.ts"],"sourcesContent":["import type { TestRuntime } from \"./types.js\";\n\nexport class NoopTestRuntime implements TestRuntime {\n async attachment() {\n await this.warning();\n }\n\n async attachmentFromPath() {\n await this.warning();\n }\n\n async globalAttachment() {\n await this.warning();\n }\n\n async globalAttachmentFromPath() {\n await this.warning();\n }\n\n async globalError() {\n await this.warning();\n }\n\n async description() {\n await this.warning();\n }\n\n async descriptionHtml() {\n await this.warning();\n }\n\n async displayName() {\n await this.warning();\n }\n\n async historyId() {\n await this.warning();\n }\n\n async labels() {\n await this.warning();\n }\n\n async links() {\n await this.warning();\n }\n\n async parameter() {\n await this.warning();\n }\n\n async logStep() {\n await this.warning();\n }\n\n async step<T>(name: string, body: () => T | PromiseLike<T>): Promise<T> {\n await this.warning();\n return body();\n }\n\n async stepDisplayName() {\n await this.warning();\n }\n\n async stepParameter() {\n await this.warning();\n }\n\n async testCaseId() {\n await this.warning();\n }\n\n // eslint-disable-next-line @typescript-eslint/require-await\n async warning() {\n // eslint-disable-next-line no-console\n console.log(\"no test runtime is found. Please check test framework configuration\");\n }\n}\n\nexport const noopRuntime: TestRuntime = new NoopTestRuntime();\n"],"mappings":";;AAEA,OAAO,MAAMA,eAAe,CAAwB;EAC5CC,UAAUA,CAAA,EAAG;IAAA,IAAAC,KAAA;IAAA,OAAAC,iBAAA;MACjB,MAAMD,KAAI,CAACE,OAAO,CAAC,CAAC;IAAC;EACvB;EAEMC,kBAAkBA,CAAA,EAAG;IAAA,IAAAC,MAAA;IAAA,OAAAH,iBAAA;MACzB,MAAMG,MAAI,CAACF,OAAO,CAAC,CAAC;IAAC;EACvB;EAEMG,gBAAgBA,CAAA,EAAG;IAAA,IAAAC,MAAA;IAAA,OAAAL,iBAAA;MACvB,MAAMK,MAAI,CAACJ,OAAO,CAAC,CAAC;IAAC;EACvB;EAEMK,wBAAwBA,CAAA,EAAG;IAAA,IAAAC,MAAA;IAAA,OAAAP,iBAAA;MAC/B,MAAMO,MAAI,CAACN,OAAO,CAAC,CAAC;IAAC;EACvB;EAEMO,WAAWA,CAAA,EAAG;IAAA,IAAAC,MAAA;IAAA,OAAAT,iBAAA;MAClB,MAAMS,MAAI,CAACR,OAAO,CAAC,CAAC;IAAC;EACvB;EAEMS,WAAWA,CAAA,EAAG;IAAA,IAAAC,MAAA;IAAA,OAAAX,iBAAA;MAClB,MAAMW,MAAI,CAACV,OAAO,CAAC,CAAC;IAAC;EACvB;EAEMW,eAAeA,CAAA,EAAG;IAAA,IAAAC,MAAA;IAAA,OAAAb,iBAAA;MACtB,MAAMa,MAAI,CAACZ,OAAO,CAAC,CAAC;IAAC;EACvB;EAEMa,WAAWA,CAAA,EAAG;IAAA,IAAAC,MAAA;IAAA,OAAAf,iBAAA;MAClB,MAAMe,MAAI,CAACd,OAAO,CAAC,CAAC;IAAC;EACvB;EAEMe,SAASA,CAAA,EAAG;IAAA,IAAAC,MAAA;IAAA,OAAAjB,iBAAA;MAChB,MAAMiB,MAAI,CAAChB,OAAO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GAAG,IAAIzC,eAAe,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"NoopTestRuntime.js","names":["isPromise","NOOP_RUNTIME_WARNING","NOOP_SYNC_RUNTIME_WARNING","SYNC_STEP_PURE_FUNCTION_ERROR","NoopSyncTestRuntime","attachment","_","__","___","warning","attachmentFromPath","globalAttachment","globalAttachmentFromPath","globalError","description","descriptionHtml","displayName","historyId","labels","links","parameter","logStep","step","body","result","error","Error","warnAboutPromiseStep","stepDisplayName","stepParameter","testCaseId","console","warn","noopSyncRuntime","NoopTestRuntime","constructor","_defineProperty","_this","_asyncToGenerator","_this2","_this3","_this4","_this5","_this6","_this7","_this8","_this9","_this0","_this1","_this10","_this11","_this12","_this13","_this14","_this15","log","noopRuntime"],"sources":["../../../../src/sdk/runtime/NoopTestRuntime.ts"],"sourcesContent":["import { isPromise } from \"../utils.js\";\nimport type { SyncTestRuntime, TestRuntime } from \"./types.js\";\n\nexport const NOOP_RUNTIME_WARNING = \"no test runtime is found. Please check test framework configuration\";\nexport const NOOP_SYNC_RUNTIME_WARNING =\n \"no sync test runtime is found. Please check test framework configuration and adapter sync support\";\nexport const SYNC_STEP_PURE_FUNCTION_ERROR =\n \"allure-js-commons/sync step body must be synchronous and must not return a Promise\";\n\nexport class NoopSyncTestRuntime implements SyncTestRuntime {\n attachment(_: string, __: Buffer | Uint8Array | string, ___: { contentType: string }) {\n this.warning();\n }\n\n attachmentFromPath(_: string, __: string, ___: { contentType: string }) {\n this.warning();\n }\n\n globalAttachment(_: string, __: Buffer | Uint8Array | string, ___: { contentType: string }) {\n this.warning();\n }\n\n globalAttachmentFromPath(_: string, __: string, ___: { contentType: string }) {\n this.warning();\n }\n\n globalError(_: { message?: string; trace?: string }) {\n this.warning();\n }\n\n description(_: string) {\n this.warning();\n }\n\n descriptionHtml(_: string) {\n this.warning();\n }\n\n displayName(_: string) {\n this.warning();\n }\n\n historyId(_: string) {\n this.warning();\n }\n\n labels(..._: { name: string; value: string }[]) {\n this.warning();\n }\n\n links(..._: { url: string; type?: string; name?: string }[]) {\n this.warning();\n }\n\n parameter(_: string, __: string, ___?: { excluded?: boolean; mode?: string }) {\n this.warning();\n }\n\n logStep(_: string, __?: string, ___?: Error) {\n this.warning();\n }\n\n step<T>(_: string, body: () => T): T {\n this.warning();\n\n const result = body();\n if (isPromise(result)) {\n const error = new Error(SYNC_STEP_PURE_FUNCTION_ERROR);\n this.warnAboutPromiseStep();\n throw error;\n }\n\n return result;\n }\n\n stepDisplayName(_: string) {\n this.warning();\n }\n\n stepParameter(_: string, __: string, ___?: string) {\n this.warning();\n }\n\n testCaseId(_: string) {\n this.warning();\n }\n\n warning() {\n // eslint-disable-next-line no-console\n console.warn(NOOP_SYNC_RUNTIME_WARNING);\n }\n\n warnAboutPromiseStep() {\n // eslint-disable-next-line no-console\n console.warn(SYNC_STEP_PURE_FUNCTION_ERROR);\n }\n}\n\nexport const noopSyncRuntime = new NoopSyncTestRuntime();\n\nexport class NoopTestRuntime implements TestRuntime {\n sync = noopSyncRuntime;\n\n async attachment() {\n await this.warning();\n }\n\n async attachmentFromPath() {\n await this.warning();\n }\n\n async globalAttachment() {\n await this.warning();\n }\n\n async globalAttachmentFromPath() {\n await this.warning();\n }\n\n async globalError() {\n await this.warning();\n }\n\n async description() {\n await this.warning();\n }\n\n async descriptionHtml() {\n await this.warning();\n }\n\n async displayName() {\n await this.warning();\n }\n\n async historyId() {\n await this.warning();\n }\n\n async labels() {\n await this.warning();\n }\n\n async links() {\n await this.warning();\n }\n\n async parameter() {\n await this.warning();\n }\n\n async logStep() {\n await this.warning();\n }\n\n async step<T>(_: string, body: () => T | PromiseLike<T>): Promise<T> {\n await this.warning();\n return body();\n }\n\n async stepDisplayName() {\n await this.warning();\n }\n\n async stepParameter() {\n await this.warning();\n }\n\n async testCaseId() {\n await this.warning();\n }\n\n // eslint-disable-next-line @typescript-eslint/require-await\n async warning() {\n // eslint-disable-next-line no-console\n console.log(NOOP_RUNTIME_WARNING);\n }\n}\n\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IAAA,IAAA6B,OAAA;IAAA,OAAAX,iBAAA;MAChB,MAAMW,OAAI,CAACxC,OAAO,CAAC,CAAC;IAAC;EACvB;EAEMY,OAAOA,CAAA,EAAG;IAAA,IAAA6B,OAAA;IAAA,OAAAZ,iBAAA;MACd,MAAMY,OAAI,CAACzC,OAAO,CAAC,CAAC;IAAC;EACvB;EAEMa,IAAIA,CAAIhB,CAAS,EAAEiB,IAA8B,EAAc;IAAA,IAAA4B,OAAA;IAAA,OAAAb,iBAAA;MACnE,MAAMa,OAAI,CAAC1C,OAAO,CAAC,CAAC;MACpB,OAAOc,IAAI,CAAC,CAAC;IAAC;EAChB;EAEMK,eAAeA,CAAA,EAAG;IAAA,IAAAwB,OAAA;IAAA,OAAAd,iBAAA;MACtB,MAAMc,OAAI,CAAC3C,OAAO,CAAC,CAAC;IAAC;EACvB;EAEMoB,aAAaA,CAAA,EAAG;IAAA,IAAAwB,OAAA;IAAA,OAAAf,iBAAA;MACpB,MAAMe,OAAI,CAAC5C,OAAO,CAAC,CAAC;IAAC;EACvB;EAEMqB,UAAUA,CAAA,EAAG;IAAA,IAAAwB,OAAA;IAAA,OAAAhB,iBAAA;MACjB,MAAMgB,OAAI,CAAC7C,OAAO,CAAC,CAAC;IAAC;EACvB;;EAEA;EACMA,OAAOA,CAAA,EAAG;IAAA,OAAA6B,iBAAA;MACd;MACAP,OAAO,CAACwB,GAAG,CAACtD,oBAAoB,CAAC;IAAC;EACpC;AACF;AAEA,OAAO,IAAMuD,WAAwB,GAAG,IAAItB,eAAe,CAAC,CAAC","ignoreList":[]}
@@ -1,4 +1,4 @@
1
- export { setGlobalTestRuntime, getGlobalTestRuntime, getGlobalTestRuntimeWithAutoconfig } from "./runtime.js";
1
+ export { setGlobalTestRuntime, getGlobalTestRuntime, getGlobalSyncTestRuntime, getGlobalTestRuntimeWithAutoconfig } from "./runtime.js";
2
2
  export { BaseMessageTestRuntime, MessageTestRuntime } from "./MessageTestRuntime.js";
3
3
  export { MessageHolderTestRuntime } from "./MessageHolderTestRuntime.js";
4
4
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["setGlobalTestRuntime","getGlobalTestRuntime","getGlobalTestRuntimeWithAutoconfig","BaseMessageTestRuntime","MessageTestRuntime","MessageHolderTestRuntime"],"sources":["../../../../src/sdk/runtime/index.ts"],"sourcesContent":["export { setGlobalTestRuntime, getGlobalTestRuntime, getGlobalTestRuntimeWithAutoconfig } from \"./runtime.js\";\nexport type { TestRuntime } from \"./types.js\";\nexport { BaseMessageTestRuntime, MessageTestRuntime } from \"./MessageTestRuntime.js\";\nexport { MessageHolderTestRuntime } from \"./MessageHolderTestRuntime.js\";\n"],"mappings":"AAAA,SAASA,oBAAoB,EAAEC,oBAAoB,EAAEC,kCAAkC,QAAQ,cAAc;AAE7G,SAASC,sBAAsB,EAAEC,kBAAkB,QAAQ,yBAAyB;AACpF,SAASC,wBAAwB,QAAQ,+BAA+B","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["setGlobalTestRuntime","getGlobalTestRuntime","getGlobalSyncTestRuntime","getGlobalTestRuntimeWithAutoconfig","BaseMessageTestRuntime","MessageTestRuntime","MessageHolderTestRuntime"],"sources":["../../../../src/sdk/runtime/index.ts"],"sourcesContent":["export {\n setGlobalTestRuntime,\n getGlobalTestRuntime,\n getGlobalSyncTestRuntime,\n getGlobalTestRuntimeWithAutoconfig,\n} from \"./runtime.js\";\nexport type { StepContext, SyncStepContext, SyncTestRuntime, TestRuntime } from \"./types.js\";\nexport { BaseMessageTestRuntime, MessageTestRuntime } from \"./MessageTestRuntime.js\";\nexport { MessageHolderTestRuntime } from \"./MessageHolderTestRuntime.js\";\n"],"mappings":"AAAA,SACEA,oBAAoB,EACpBC,oBAAoB,EACpBC,wBAAwB,EACxBC,kCAAkC,QAC7B,cAAc;AAErB,SAASC,sBAAsB,EAAEC,kBAAkB,QAAQ,yBAAyB;AACpF,SAASC,wBAAwB,QAAQ,+BAA+B","ignoreList":[]}
@@ -1,6 +1,20 @@
1
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; }
2
- import { noopRuntime } from "./NoopTestRuntime.js";
2
+ import { noopRuntime, noopSyncRuntime } from "./NoopTestRuntime.js";
3
3
  var ALLURE_TEST_RUNTIME_KEY = "allureTestRuntime";
4
+ var pwAutoconfigModuleName = "allure-playwright/autoconfig";
5
+ var getNodeCreateRequire = () => {
6
+ var _process$getBuiltinMo, _process$getBuiltinMo2, _process$getBuiltinMo3;
7
+ var process = globalThis.process;
8
+ return (_process$getBuiltinMo = process === null || process === void 0 || (_process$getBuiltinMo2 = process.getBuiltinModule) === null || _process$getBuiltinMo2 === void 0 || (_process$getBuiltinMo2 = _process$getBuiltinMo2.call(process, "node:module")) === null || _process$getBuiltinMo2 === void 0 ? void 0 : _process$getBuiltinMo2.createRequire) !== null && _process$getBuiltinMo !== void 0 ? _process$getBuiltinMo : process === null || process === void 0 || (_process$getBuiltinMo3 = process.getBuiltinModule) === null || _process$getBuiltinMo3 === void 0 || (_process$getBuiltinMo3 = _process$getBuiltinMo3.call(process, "module")) === null || _process$getBuiltinMo3 === void 0 ? void 0 : _process$getBuiltinMo3.createRequire;
9
+ };
10
+ var getNodeRequire = () => {
11
+ var _process$cwd;
12
+ var process = globalThis.process;
13
+ var cwd = process === null || process === void 0 || (_process$cwd = process.cwd) === null || _process$cwd === void 0 ? void 0 : _process$cwd.call(process);
14
+ var createRequire = getNodeCreateRequire();
15
+ return cwd && createRequire ? createRequire("".concat(cwd, "/package.json")) : undefined;
16
+ };
17
+ var localRequire = typeof require === "function" ? require : getNodeRequire();
4
18
  export var setGlobalTestRuntime = runtime => {
5
19
  globalThis[ALLURE_TEST_RUNTIME_KEY] = () => runtime;
6
20
  };
@@ -15,18 +29,36 @@ export var getGlobalTestRuntime = () => {
15
29
  }
16
30
  return noopRuntime;
17
31
  };
32
+ export var getGlobalSyncTestRuntime = () => {
33
+ var _getGlobalTestRuntime;
34
+ return (_getGlobalTestRuntime = getGlobalTestRuntime().sync) !== null && _getGlobalTestRuntime !== void 0 ? _getGlobalTestRuntime : noopSyncRuntime;
35
+ };
36
+ export var getGlobalSyncTestRuntimeWithAutoconfig = () => {
37
+ var _getGlobalTestRuntime2, _getGlobalTestRuntime3;
38
+ var testRuntime = getGlobalTestRuntimeFunction();
39
+ if (testRuntime) {
40
+ var _testRuntime$sync, _testRuntime2;
41
+ return (_testRuntime$sync = (_testRuntime2 = testRuntime()) === null || _testRuntime2 === void 0 ? void 0 : _testRuntime2.sync) !== null && _testRuntime$sync !== void 0 ? _testRuntime$sync : noopSyncRuntime;
42
+ }
43
+ if (!localRequire) {
44
+ return noopSyncRuntime;
45
+ }
46
+ try {
47
+ localRequire(pwAutoconfigModuleName);
48
+ } catch (_unused) {
49
+ return noopSyncRuntime;
50
+ }
51
+ return (_getGlobalTestRuntime2 = (_getGlobalTestRuntime3 = getGlobalTestRuntimeFunction()) === null || _getGlobalTestRuntime3 === void 0 || (_getGlobalTestRuntime3 = _getGlobalTestRuntime3()) === null || _getGlobalTestRuntime3 === void 0 ? void 0 : _getGlobalTestRuntime3.sync) !== null && _getGlobalTestRuntime2 !== void 0 ? _getGlobalTestRuntime2 : noopSyncRuntime;
52
+ };
18
53
  export var getGlobalTestRuntimeWithAutoconfig = () => {
19
54
  var testRuntime = getGlobalTestRuntimeFunction();
20
55
  if (testRuntime) {
21
- var _testRuntime2;
22
- return (_testRuntime2 = testRuntime()) !== null && _testRuntime2 !== void 0 ? _testRuntime2 : noopRuntime;
56
+ var _testRuntime3;
57
+ return (_testRuntime3 = testRuntime()) !== null && _testRuntime3 !== void 0 ? _testRuntime3 : noopRuntime;
23
58
  }
24
-
25
- // protection from bundlers tree-shaking visiting (webpack, rollup)
26
- var pwAutoconfigModuleName = "allure-playwright/autoconfig";
27
59
  return import(/* @vite-ignore */_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;
60
+ var _getGlobalTestRuntime4, _getGlobalTestRuntime5;
61
+ return (_getGlobalTestRuntime4 = (_getGlobalTestRuntime5 = getGlobalTestRuntimeFunction()) === null || _getGlobalTestRuntime5 === void 0 ? void 0 : _getGlobalTestRuntime5()) !== null && _getGlobalTestRuntime4 !== void 0 ? _getGlobalTestRuntime4 : noopRuntime;
30
62
  }).catch(() => noopRuntime);
31
63
  };
32
64
  //# 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","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(\n /* @vite-ignore */\n pwAutoconfigModuleName\n )\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,CACX,kBAAAC,kCAAA,CACAD,sBAAsB,CACxB,CAAC,CACEE,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":[]}
1
+ {"version":3,"file":"runtime.js","names":["noopRuntime","noopSyncRuntime","ALLURE_TEST_RUNTIME_KEY","pwAutoconfigModuleName","getNodeCreateRequire","_process$getBuiltinMo","_process$getBuiltinMo2","_process$getBuiltinMo3","process","globalThis","getBuiltinModule","call","createRequire","getNodeRequire","_process$cwd","cwd","concat","undefined","localRequire","require","setGlobalTestRuntime","runtime","getGlobalTestRuntimeFunction","getGlobalTestRuntime","testRuntime","_testRuntime","getGlobalSyncTestRuntime","_getGlobalTestRuntime","sync","getGlobalSyncTestRuntimeWithAutoconfig","_getGlobalTestRuntime2","_getGlobalTestRuntime3","_testRuntime$sync","_testRuntime2","_unused","getGlobalTestRuntimeWithAutoconfig","_testRuntime3","_tsRewriteRelativeImportExtensions","then","_getGlobalTestRuntime4","_getGlobalTestRuntime5","catch"],"sources":["../../../../src/sdk/runtime/runtime.ts"],"sourcesContent":["import { noopRuntime, noopSyncRuntime } from \"./NoopTestRuntime.js\";\nimport type { SyncTestRuntime, TestRuntime } from \"./types.js\";\n\nconst ALLURE_TEST_RUNTIME_KEY = \"allureTestRuntime\";\nconst pwAutoconfigModuleName = \"allure-playwright/autoconfig\";\n\ntype NodeCreateRequire = (filename: string | URL) => NodeRequire;\n\ntype NodeProcessWithBuiltins = {\n cwd?: () => string;\n getBuiltinModule?: (id: string) => { createRequire?: NodeCreateRequire } | undefined;\n};\n\nconst getNodeCreateRequire = (): NodeCreateRequire | undefined => {\n const process = (globalThis as { process?: NodeProcessWithBuiltins }).process;\n\n return (\n process?.getBuiltinModule?.(\"node:module\")?.createRequire ?? process?.getBuiltinModule?.(\"module\")?.createRequire\n );\n};\n\nconst getNodeRequire = (): NodeRequire | undefined => {\n const process = (globalThis as { process?: NodeProcessWithBuiltins }).process;\n const cwd = process?.cwd?.();\n const createRequire = getNodeCreateRequire();\n\n return cwd && createRequire ? createRequire(`${cwd}/package.json`) : undefined;\n};\n\nconst localRequire = typeof require === \"function\" ? require : getNodeRequire();\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 getGlobalSyncTestRuntime = (): SyncTestRuntime => {\n return getGlobalTestRuntime().sync ?? noopSyncRuntime;\n};\n\nexport const getGlobalSyncTestRuntimeWithAutoconfig = (): SyncTestRuntime => {\n const testRuntime = getGlobalTestRuntimeFunction();\n\n if (testRuntime) {\n return testRuntime()?.sync ?? noopSyncRuntime;\n }\n\n if (!localRequire) {\n return noopSyncRuntime;\n }\n\n try {\n localRequire(pwAutoconfigModuleName);\n } catch {\n return noopSyncRuntime;\n }\n\n return getGlobalTestRuntimeFunction()?.()?.sync ?? noopSyncRuntime;\n};\n\nexport const getGlobalTestRuntimeWithAutoconfig = (): TestRuntime | Promise<TestRuntime> => {\n const testRuntime = getGlobalTestRuntimeFunction();\n\n if (testRuntime) {\n return testRuntime() ?? noopRuntime;\n }\n return import(\n /* @vite-ignore */\n pwAutoconfigModuleName\n )\n .then(() => getGlobalTestRuntimeFunction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AAOjC,eAAe;EACxB;EAEA,QAAA6B,sBAAA,IAAAC,sBAAA,GAAOT,4BAA4B,CAAC,CAAC,cAAAS,sBAAA,gBAAAA,sBAAA,GAA9BA,sBAAA,CAAiC,CAAC,cAAAA,sBAAA,uBAAlCA,sBAAA,CAAoCH,IAAI,cAAAE,sBAAA,cAAAA,sBAAA,GAAI7B,eAAe;AACpE,CAAC;AAED,OAAO,IAAMkC,kCAAkC,GAAGA,CAAA,KAA0C;EAC1F,IAAMX,WAAW,GAAGF,4BAA4B,CAAC,CAAC;EAElD,IAAIE,WAAW,EAAE;IAAA,IAAAY,aAAA;IACf,QAAAA,aAAA,GAAOZ,WAAW,CAAC,CAAC,cAAAY,aAAA,cAAAA,aAAA,GAAIpC,WAAW;EACrC;EACA,OAAO,MAAM,CACX,kBAAAqC,kCAAA,CACAlC,sBAAsB,CACxB,CAAC,CACEmC,IAAI,CAAC;IAAA,IAAAC,sBAAA,EAAAC,sBAAA;IAAA,QAAAD,sBAAA,IAAAC,sBAAA,GAAMlB,4BAA4B,CAAC,CAAC,cAAAkB,sBAAA,uBAA9BA,sBAAA,CAAiC,CAAC,cAAAD,sBAAA,cAAAA,sBAAA,GAAIvC,WAAW;EAAA,EAAC,CAC7DyC,KAAK,CAAC,MAAMzC,WAAW,CAAC;AAC7B,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","names":[],"sources":["../../../../src/sdk/runtime/types.ts"],"sourcesContent":["import type {\n AttachmentOptions,\n Label,\n Link,\n ParameterMode,\n ParameterOptions,\n Status,\n StatusDetails,\n} from \"../../model.js\";\n\nexport interface TestRuntime {\n labels: (...labels: Label[]) => PromiseLike<void>;\n\n links: (...links: Link[]) => PromiseLike<void>;\n\n parameter: (name: string, value: string, options?: ParameterOptions) => PromiseLike<void>;\n\n description: (markdown: string) => PromiseLike<void>;\n\n descriptionHtml: (html: string) => PromiseLike<void>;\n\n displayName: (name: string) => PromiseLike<void>;\n\n historyId: (value: string) => PromiseLike<void>;\n\n testCaseId: (value: string) => PromiseLike<void>;\n\n attachment: (name: string, content: Buffer | Uint8Array | string, options: AttachmentOptions) => PromiseLike<void>;\n\n globalAttachment: (\n name: string,\n content: Buffer | Uint8Array | string,\n options: AttachmentOptions,\n ) => PromiseLike<void>;\n\n globalAttachmentFromPath: (\n name: string,\n path: string,\n options: Omit<AttachmentOptions, \"encoding\">,\n ) => PromiseLike<void>;\n\n globalError: (details: StatusDetails) => PromiseLike<void>;\n\n attachmentFromPath: (name: string, path: string, options: Omit<AttachmentOptions, \"encoding\">) => PromiseLike<void>;\n\n logStep: (name: string, status?: Status, error?: Error) => PromiseLike<void>;\n\n step: <T = void>(name: string, body: () => T | PromiseLike<T>) => PromiseLike<T>;\n\n stepDisplayName: (name: string) => PromiseLike<void>;\n\n stepParameter: (name: string, value: string, mode?: ParameterMode) => PromiseLike<void>;\n}\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"types.js","names":[],"sources":["../../../../src/sdk/runtime/types.ts"],"sourcesContent":["import type {\n AttachmentOptions,\n Label,\n Link,\n ParameterMode,\n ParameterOptions,\n Status,\n StatusDetails,\n} from \"../../model.js\";\n\nexport interface StepContext {\n displayName: (name: string) => void | PromiseLike<void>;\n\n parameter: (name: string, value: string, mode?: ParameterMode) => void | PromiseLike<void>;\n}\n\nexport interface SyncStepContext {\n displayName: (name: string) => void;\n\n parameter: (name: string, value: string, mode?: ParameterMode) => void;\n}\n\nexport interface SyncTestRuntime {\n labels: (...labels: Label[]) => void;\n\n links: (...links: Link[]) => void;\n\n parameter: (name: string, value: string, options?: ParameterOptions) => void;\n\n description: (markdown: string) => void;\n\n descriptionHtml: (html: string) => void;\n\n displayName: (name: string) => void;\n\n historyId: (value: string) => void;\n\n testCaseId: (value: string) => void;\n\n attachment: (name: string, content: Buffer | Uint8Array | string, options: AttachmentOptions) => void;\n\n globalAttachment: (name: string, content: Buffer | Uint8Array | string, options: AttachmentOptions) => void;\n\n globalAttachmentFromPath: (name: string, path: string, options: Omit<AttachmentOptions, \"encoding\">) => void;\n\n globalError: (details: StatusDetails) => void;\n\n attachmentFromPath: (name: string, path: string, options: Omit<AttachmentOptions, \"encoding\">) => void;\n\n logStep: (name: string, status?: Status, error?: Error) => void;\n\n step: <T = void>(name: string, body: () => T) => T;\n\n stepDisplayName: (name: string) => void;\n\n stepParameter: (name: string, value: string, mode?: ParameterMode) => void;\n}\n\nexport interface TestRuntime {\n labels: (...labels: Label[]) => PromiseLike<void>;\n\n links: (...links: Link[]) => PromiseLike<void>;\n\n parameter: (name: string, value: string, options?: ParameterOptions) => PromiseLike<void>;\n\n description: (markdown: string) => PromiseLike<void>;\n\n descriptionHtml: (html: string) => PromiseLike<void>;\n\n displayName: (name: string) => PromiseLike<void>;\n\n historyId: (value: string) => PromiseLike<void>;\n\n testCaseId: (value: string) => PromiseLike<void>;\n\n attachment: (name: string, content: Buffer | Uint8Array | string, options: AttachmentOptions) => PromiseLike<void>;\n\n globalAttachment: (\n name: string,\n content: Buffer | Uint8Array | string,\n options: AttachmentOptions,\n ) => PromiseLike<void>;\n\n globalAttachmentFromPath: (\n name: string,\n path: string,\n options: Omit<AttachmentOptions, \"encoding\">,\n ) => PromiseLike<void>;\n\n globalError: (details: StatusDetails) => PromiseLike<void>;\n\n attachmentFromPath: (name: string, path: string, options: Omit<AttachmentOptions, \"encoding\">) => PromiseLike<void>;\n\n logStep: (name: string, status?: Status, error?: Error) => PromiseLike<void>;\n\n step: <T = void>(name: string, body: () => T | PromiseLike<T>) => PromiseLike<T>;\n\n stepDisplayName: (name: string) => PromiseLike<void>;\n\n stepParameter: (name: string, value: string, mode?: ParameterMode) => PromiseLike<void>;\n\n sync?: SyncTestRuntime;\n}\n"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,4 @@
1
+ export { allureId, attachment, attachmentPath, attachTrace, description, descriptionHtml, displayName, epic, feature, globalAttachment, globalAttachmentPath, globalError, historyId, issue, label, labels, layer, link, links, logStep, owner, parameter, parentSuite, severity, step, story, subSuite, suite, tag, tags, testCaseId, tms } from "./syncFacade.js";
2
+ export { ContentType, LabelName, LinkType, Severity, Stage, Status, StatusByPriority } from "./model.js";
3
+ export { ALLURE_HTTP_EXCHANGE_CONTENT_TYPE, ALLURE_HTTP_EXCHANGE_FILE_EXTENSION, ALLURE_HTTP_EXCHANGE_SCHEMA_VERSION, ALLURE_HTTP_REDACTED_VALUE } from "./http.js";
4
+ //# sourceMappingURL=sync.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sync.js","names":["allureId","attachment","attachmentPath","attachTrace","description","descriptionHtml","displayName","epic","feature","globalAttachment","globalAttachmentPath","globalError","historyId","issue","label","labels","layer","link","links","logStep","owner","parameter","parentSuite","severity","step","story","subSuite","suite","tag","tags","testCaseId","tms","ContentType","LabelName","LinkType","Severity","Stage","Status","StatusByPriority","ALLURE_HTTP_EXCHANGE_CONTENT_TYPE","ALLURE_HTTP_EXCHANGE_FILE_EXTENSION","ALLURE_HTTP_EXCHANGE_SCHEMA_VERSION","ALLURE_HTTP_REDACTED_VALUE"],"sources":["../../src/sync.ts"],"sourcesContent":["export {\n allureId,\n attachment,\n attachmentPath,\n attachTrace,\n description,\n descriptionHtml,\n displayName,\n epic,\n feature,\n globalAttachment,\n globalAttachmentPath,\n globalError,\n historyId,\n issue,\n label,\n labels,\n layer,\n link,\n links,\n logStep,\n owner,\n parameter,\n parentSuite,\n severity,\n step,\n story,\n subSuite,\n suite,\n tag,\n tags,\n testCaseId,\n tms,\n} from \"./syncFacade.js\";\nexport type { SyncStepContext } from \"./sdk/runtime/types.js\";\nexport type {\n Attachment,\n AttachmentOptions,\n FixtureResult,\n Globals,\n ImageDiffAttachment,\n Label,\n Link,\n Parameter,\n ParameterMode,\n ParameterOptions,\n StatusDetails,\n StepResult,\n TestOrStepResult,\n TestResult,\n TestResultContainer,\n} from \"./model.js\";\nexport { ContentType, LabelName, LinkType, Severity, Stage, Status, StatusByPriority } from \"./model.js\";\nexport type {\n HttpExchange,\n HttpExchangeBody,\n HttpExchangeBodyPart,\n HttpExchangeCookie,\n HttpExchangeError,\n HttpExchangeInformationalResponse,\n HttpExchangeNameValue,\n HttpExchangeRequest,\n HttpExchangeResponse,\n HttpExchangeStream,\n} from \"./http.js\";\nexport {\n ALLURE_HTTP_EXCHANGE_CONTENT_TYPE,\n ALLURE_HTTP_EXCHANGE_FILE_EXTENSION,\n ALLURE_HTTP_EXCHANGE_SCHEMA_VERSION,\n ALLURE_HTTP_REDACTED_VALUE,\n} from \"./http.js\";\n"],"mappings":"AAAA,SACEA,QAAQ,EACRC,UAAU,EACVC,cAAc,EACdC,WAAW,EACXC,WAAW,EACXC,eAAe,EACfC,WAAW,EACXC,IAAI,EACJC,OAAO,EACPC,gBAAgB,EAChBC,oBAAoB,EACpBC,WAAW,EACXC,SAAS,EACTC,KAAK,EACLC,KAAK,EACLC,MAAM,EACNC,KAAK,EACLC,IAAI,EACJC,KAAK,EACLC,OAAO,EACPC,KAAK,EACLC,SAAS,EACTC,WAAW,EACXC,QAAQ,EACRC,IAAI,EACJC,KAAK,EACLC,QAAQ,EACRC,KAAK,EACLC,GAAG,EACHC,IAAI,EACJC,UAAU,EACVC,GAAG,QACE,iBAAiB;AAmBxB,SAASC,WAAW,EAAEC,SAAS,EAAEC,QAAQ,EAAEC,QAAQ,EAAEC,KAAK,EAAEC,MAAM,EAAEC,gBAAgB,QAAQ,YAAY;AAaxG,SACEC,iCAAiC,EACjCC,mCAAmC,EACnCC,mCAAmC,EACnCC,0BAA0B,QACrB,WAAW","ignoreList":[]}
@@ -0,0 +1,123 @@
1
+ import { LabelName, LinkType } from "./model.js";
2
+ import { getGlobalSyncTestRuntimeWithAutoconfig } from "./sdk/runtime/runtime.js";
3
+ var callRuntimeMethod = function callRuntimeMethod(method) {
4
+ var runtime = getGlobalSyncTestRuntimeWithAutoconfig();
5
+
6
+ // @ts-ignore
7
+ for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
8
+ args[_key - 1] = arguments[_key];
9
+ }
10
+ return runtime[method](...args);
11
+ };
12
+ export var label = (name, value) => {
13
+ return callRuntimeMethod("labels", {
14
+ name,
15
+ value
16
+ });
17
+ };
18
+ export var labels = function labels() {
19
+ for (var _len2 = arguments.length, labelsList = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
20
+ labelsList[_key2] = arguments[_key2];
21
+ }
22
+ return callRuntimeMethod("labels", ...labelsList);
23
+ };
24
+ export var link = (url, name, type) => {
25
+ return callRuntimeMethod("links", {
26
+ url,
27
+ type,
28
+ name
29
+ });
30
+ };
31
+ export var links = function links() {
32
+ for (var _len3 = arguments.length, linksList = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
33
+ linksList[_key3] = arguments[_key3];
34
+ }
35
+ return callRuntimeMethod("links", ...linksList);
36
+ };
37
+ export var parameter = (name, value, options) => {
38
+ return callRuntimeMethod("parameter", name, value, options);
39
+ };
40
+ export var description = markdown => {
41
+ return callRuntimeMethod("description", markdown);
42
+ };
43
+ export var descriptionHtml = html => {
44
+ return callRuntimeMethod("descriptionHtml", html);
45
+ };
46
+ export var displayName = name => {
47
+ return callRuntimeMethod("displayName", name);
48
+ };
49
+ export var historyId = value => {
50
+ return callRuntimeMethod("historyId", value);
51
+ };
52
+ export var testCaseId = value => {
53
+ return callRuntimeMethod("testCaseId", value);
54
+ };
55
+ export var attachment = (name, content, options) => {
56
+ var opts = typeof options === "string" ? {
57
+ contentType: options
58
+ } : options;
59
+ return callRuntimeMethod("attachment", name, content, opts);
60
+ };
61
+ export var globalAttachment = (name, content, options) => {
62
+ var opts = typeof options === "string" ? {
63
+ contentType: options
64
+ } : options;
65
+ return callRuntimeMethod("globalAttachment", name, content, opts);
66
+ };
67
+ export var globalAttachmentPath = (name, path, options) => {
68
+ var opts = typeof options === "string" ? {
69
+ contentType: options
70
+ } : options;
71
+ return callRuntimeMethod("globalAttachmentFromPath", name, path, opts);
72
+ };
73
+ export var globalError = details => {
74
+ return callRuntimeMethod("globalError", details);
75
+ };
76
+ export var attachTrace = (name, path) => {
77
+ return callRuntimeMethod("attachmentFromPath", name, path, {
78
+ contentType: "application/vnd.allure.playwright-trace"
79
+ });
80
+ };
81
+ export var attachmentPath = (name, path, options) => {
82
+ var opts = typeof options === "string" ? {
83
+ contentType: options
84
+ } : options;
85
+ return callRuntimeMethod("attachmentFromPath", name, path, opts);
86
+ };
87
+ var stepContext = () => ({
88
+ displayName: name => {
89
+ return callRuntimeMethod("stepDisplayName", name);
90
+ },
91
+ parameter: (name, value, mode) => {
92
+ return callRuntimeMethod("stepParameter", name, value, mode);
93
+ }
94
+ });
95
+ export var logStep = (name, status, error) => {
96
+ return callRuntimeMethod("logStep", name, status, error);
97
+ };
98
+ export var step = (name, body) => {
99
+ return callRuntimeMethod("step", name, () => body(stepContext()));
100
+ };
101
+ export var issue = (url, name) => link(url, name, LinkType.ISSUE);
102
+ export var tms = (url, name) => link(url, name, LinkType.TMS);
103
+ export var allureId = value => label(LabelName.ALLURE_ID, value);
104
+ export var epic = name => label(LabelName.EPIC, name);
105
+ export var feature = name => label(LabelName.FEATURE, name);
106
+ export var story = name => label(LabelName.STORY, name);
107
+ export var suite = name => label(LabelName.SUITE, name);
108
+ export var parentSuite = name => label(LabelName.PARENT_SUITE, name);
109
+ export var subSuite = name => label(LabelName.SUB_SUITE, name);
110
+ export var owner = name => label(LabelName.OWNER, name);
111
+ export var severity = name => label(LabelName.SEVERITY, name);
112
+ export var layer = name => label(LabelName.LAYER, name);
113
+ export var tag = name => label(LabelName.TAG, name);
114
+ export var tags = function tags() {
115
+ for (var _len4 = arguments.length, tagsList = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
116
+ tagsList[_key4] = arguments[_key4];
117
+ }
118
+ return callRuntimeMethod("labels", ...tagsList.map(value => ({
119
+ name: LabelName.TAG,
120
+ value
121
+ })));
122
+ };
123
+ //# sourceMappingURL=syncFacade.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"syncFacade.js","names":["LabelName","LinkType","getGlobalSyncTestRuntimeWithAutoconfig","callRuntimeMethod","method","runtime","_len","arguments","length","args","Array","_key","label","name","value","labels","_len2","labelsList","_key2","link","url","type","links","_len3","linksList","_key3","parameter","options","description","markdown","descriptionHtml","html","displayName","historyId","testCaseId","attachment","content","opts","contentType","globalAttachment","globalAttachmentPath","path","globalError","details","attachTrace","attachmentPath","stepContext","mode","logStep","status","error","step","body","issue","ISSUE","tms","TMS","allureId","ALLURE_ID","epic","EPIC","feature","FEATURE","story","STORY","suite","SUITE","parentSuite","PARENT_SUITE","subSuite","SUB_SUITE","owner","OWNER","severity","SEVERITY","layer","LAYER","tag","TAG","tags","_len4","tagsList","_key4","map"],"sources":["../../src/syncFacade.ts"],"sourcesContent":["import type {\n AttachmentOptions,\n Label,\n Link,\n ParameterMode,\n ParameterOptions,\n Status,\n StatusDetails,\n} from \"./model.js\";\nimport { type ContentType, LabelName, LinkType } from \"./model.js\";\nimport { getGlobalSyncTestRuntimeWithAutoconfig } from \"./sdk/runtime/runtime.js\";\nimport type { SyncStepContext, SyncTestRuntime } from \"./sdk/runtime/types.js\";\n\nconst callRuntimeMethod = <\n T extends keyof SyncTestRuntime,\n S extends Parameters<SyncTestRuntime[T]>,\n R extends ReturnType<SyncTestRuntime[T]>,\n>(\n method: T,\n ...args: S\n): R => {\n const runtime = getGlobalSyncTestRuntimeWithAutoconfig();\n\n // @ts-ignore\n return runtime[method](...args);\n};\n\nexport const label = (name: LabelName | string, value: string) => {\n return callRuntimeMethod(\"labels\", { name, value });\n};\n\nexport const labels = (...labelsList: Label[]) => {\n return callRuntimeMethod(\"labels\", ...labelsList);\n};\n\nexport const link = (url: string, name?: string, type?: LinkType | string) => {\n return callRuntimeMethod(\"links\", { url, type, name });\n};\n\nexport const links = (...linksList: Link[]) => {\n return callRuntimeMethod(\"links\", ...linksList);\n};\n\nexport const parameter = (name: string, value: string, options?: ParameterOptions) => {\n return callRuntimeMethod(\"parameter\", name, value, options);\n};\n\nexport const description = (markdown: string) => {\n return callRuntimeMethod(\"description\", markdown);\n};\n\nexport const descriptionHtml = (html: string) => {\n return callRuntimeMethod(\"descriptionHtml\", html);\n};\n\nexport const displayName = (name: string) => {\n return callRuntimeMethod(\"displayName\", name);\n};\n\nexport const historyId = (value: string) => {\n return callRuntimeMethod(\"historyId\", value);\n};\n\nexport const testCaseId = (value: string) => {\n return callRuntimeMethod(\"testCaseId\", value);\n};\n\nexport const attachment = (\n name: string,\n content: Buffer | Uint8Array | string,\n options: ContentType | string | AttachmentOptions,\n) => {\n const opts = typeof options === \"string\" ? { contentType: options } : options;\n return callRuntimeMethod(\"attachment\", name, content, opts);\n};\n\nexport const globalAttachment = (\n name: string,\n content: Buffer | Uint8Array | string,\n options: ContentType | string | AttachmentOptions,\n) => {\n const opts = typeof options === \"string\" ? { contentType: options } : options;\n return callRuntimeMethod(\"globalAttachment\", name, content, opts);\n};\n\nexport const globalAttachmentPath = (\n name: string,\n path: string,\n options: ContentType | string | Omit<AttachmentOptions, \"encoding\">,\n) => {\n const opts = typeof options === \"string\" ? { contentType: options } : options;\n return callRuntimeMethod(\"globalAttachmentFromPath\", name, path, opts);\n};\n\nexport const globalError = (details: StatusDetails) => {\n return callRuntimeMethod(\"globalError\", details);\n};\n\nexport const attachTrace = (name: string, path: string) => {\n return callRuntimeMethod(\"attachmentFromPath\", name, path, {\n contentType: \"application/vnd.allure.playwright-trace\",\n });\n};\n\nexport const attachmentPath = (\n name: string,\n path: string,\n options: ContentType | string | Omit<AttachmentOptions, \"encoding\">,\n) => {\n const opts = typeof options === \"string\" ? { contentType: options } : options;\n return callRuntimeMethod(\"attachmentFromPath\", name, path, opts);\n};\n\nconst stepContext = (): SyncStepContext => ({\n displayName: (name: string) => {\n return callRuntimeMethod(\"stepDisplayName\", name);\n },\n parameter: (name, value, mode?: ParameterMode) => {\n return callRuntimeMethod(\"stepParameter\", name, value, mode);\n },\n});\n\nexport const logStep = (name: string, status?: Status, error?: Error): void => {\n return callRuntimeMethod(\"logStep\", name, status, error);\n};\n\nexport const step = <T = void>(name: string, body: (context: SyncStepContext) => T): T => {\n return callRuntimeMethod(\"step\", name, () => body(stepContext()));\n};\n\nexport const issue = (url: string, name?: string) => link(url, name, LinkType.ISSUE);\n\nexport const tms = (url: string, name?: string) => link(url, name, LinkType.TMS);\n\nexport const allureId = (value: string) => label(LabelName.ALLURE_ID, value);\n\nexport const epic = (name: string) => label(LabelName.EPIC, name);\n\nexport const feature = (name: string) => label(LabelName.FEATURE, name);\n\nexport const story = (name: string) => label(LabelName.STORY, name);\n\nexport const suite = (name: string) => label(LabelName.SUITE, name);\n\nexport const parentSuite = (name: string) => label(LabelName.PARENT_SUITE, name);\n\nexport const subSuite = (name: string) => label(LabelName.SUB_SUITE, name);\n\nexport const owner = (name: string) => label(LabelName.OWNER, name);\n\nexport const severity = (name: string) => label(LabelName.SEVERITY, name);\n\nexport const layer = (name: string) => label(LabelName.LAYER, name);\n\nexport const tag = (name: string) => label(LabelName.TAG, name);\n\nexport const tags = (...tagsList: string[]) => {\n return callRuntimeMethod(\n \"labels\",\n ...tagsList.map((value) => ({\n name: LabelName.TAG,\n value,\n })),\n );\n};\n"],"mappings":"AASA,SAA2BA,SAAS,EAAEC,QAAQ,QAAQ,YAAY;AAClE,SAASC,sCAAsC,QAAQ,0BAA0B;AAGjF,IAAMC,iBAAiB,GAAG,SAApBA,iBAAiBA,CAKrBC,MAAS,EAEH;EACN,IAAMC,OAAO,GAAGH,sCAAsC,CAAC,CAAC;;EAExD;EAAA,SAAAI,IAAA,GAAAC,SAAA,CAAAC,MAAA,EAJGC,IAAI,OAAAC,KAAA,CAAAJ,IAAA,OAAAA,IAAA,WAAAK,IAAA,MAAAA,IAAA,GAAAL,IAAA,EAAAK,IAAA;IAAJF,IAAI,CAAAE,IAAA,QAAAJ,SAAA,CAAAI,IAAA;EAAA;EAKP,OAAON,OAAO,CAACD,MAAM,CAAC,CAAC,GAAGK,IAAI,CAAC;AACjC,CAAC;AAED,O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AO,IAAM4D,QAAQ,GAAI5D,IAAY,IAAKD,KAAK,CAACZ,SAAS,CAAC0E,QAAQ,EAAE7D,IAAI,CAAC;AAEzE,OAAO,IAAM8D,KAAK,GAAI9D,IAAY,IAAKD,KAAK,CAACZ,SAAS,CAAC4E,KAAK,EAAE/D,IAAI,CAAC;AAEnE,OAAO,IAAMgE,GAAG,GAAIhE,IAAY,IAAKD,KAAK,CAACZ,SAAS,CAAC8E,GAAG,EAAEjE,IAAI,CAAC;AAE/D,OAAO,IAAMkE,IAAI,GAAG,SAAPA,IAAIA,CAAA,EAA8B;EAAA,SAAAC,KAAA,GAAAzE,SAAA,CAAAC,MAAA,EAAvByE,QAAQ,OAAAvE,KAAA,CAAAsE,KAAA,GAAAE,KAAA,MAAAA,KAAA,GAAAF,KAAA,EAAAE,KAAA;IAARD,QAAQ,CAAAC,KAAA,IAAA3E,SAAA,CAAA2E,KAAA;EAAA;EAC9B,OAAO/E,iBAAiB,CACtB,QAAQ,EACR,GAAG8E,QAAQ,CAACE,GAAG,CAAErE,KAAK,KAAM;IAC1BD,IAAI,EAAEb,SAAS,CAAC8E,GAAG;IACnBhE;EACF,CAAC,CAAC,CACJ,CAAC;AACH,CAAC","ignoreList":[]}
@@ -1,9 +1,9 @@
1
- /// <reference types="node" />
2
- /// <reference types="node" />
3
1
  import type { Status, StatusDetails } from "./model.js";
4
2
  import { ContentType } from "./model.js";
5
- import { type AttachmentOptions, type Label, type Link, type ParameterMode, type ParameterOptions } from "./model.js";
3
+ import { type AttachmentOptions, type Label, type Link, type ParameterOptions } from "./model.js";
6
4
  import { LabelName, LinkType } from "./model.js";
5
+ import type { StepContext } from "./sdk/runtime/types.js";
6
+ export type { StepContext } from "./sdk/runtime/types.js";
7
7
  export declare const label: (name: LabelName | string, value: string) => PromiseLike<void>;
8
8
  export declare const labels: (...labelsList: Label[]) => PromiseLike<void>;
9
9
  export declare const link: (url: string, name?: string, type?: LinkType | string) => PromiseLike<void>;
@@ -20,10 +20,6 @@ export declare const globalAttachmentPath: (name: string, path: string, options:
20
20
  export declare const globalError: (details: StatusDetails) => PromiseLike<void>;
21
21
  export declare const attachTrace: (name: string, path: string) => PromiseLike<void>;
22
22
  export declare const attachmentPath: (name: string, path: string, options: ContentType | string | Omit<AttachmentOptions, "encoding">) => PromiseLike<void>;
23
- export type StepContext = {
24
- displayName: (name: string) => void | PromiseLike<void>;
25
- parameter: (name: string, value: string, mode?: ParameterMode) => void | PromiseLike<void>;
26
- };
27
23
  export declare const logStep: (name: string, status?: Status, error?: Error) => PromiseLike<void>;
28
24
  export declare const step: <T = void>(name: string, body: (context: StepContext) => T | PromiseLike<T>) => PromiseLike<T>;
29
25
  export declare const issue: (url: string, name?: string) => PromiseLike<void>;
@@ -0,0 +1,79 @@
1
+ export declare const ALLURE_HTTP_EXCHANGE_SCHEMA_VERSION = 1;
2
+ export declare const ALLURE_HTTP_EXCHANGE_CONTENT_TYPE = "application/vnd.allure.http+json";
3
+ export declare const ALLURE_HTTP_EXCHANGE_FILE_EXTENSION = ".httpexchange";
4
+ export declare const ALLURE_HTTP_REDACTED_VALUE = "__ALLURE_REDACTED__";
5
+ export type HttpExchangeNameValue = {
6
+ name: string;
7
+ value: string;
8
+ };
9
+ export type HttpExchangeCookie = HttpExchangeNameValue & {
10
+ path?: string;
11
+ domain?: string;
12
+ expires?: string;
13
+ httpOnly?: boolean;
14
+ secure?: boolean;
15
+ sameSite?: string;
16
+ };
17
+ export type HttpExchangeBodyPart = {
18
+ name?: string;
19
+ fileName?: string;
20
+ headers?: HttpExchangeNameValue[];
21
+ contentType?: string;
22
+ encoding?: "utf8" | "base64";
23
+ value?: string;
24
+ size?: number;
25
+ truncated?: boolean;
26
+ };
27
+ export type HttpExchangeStream = {
28
+ type?: string;
29
+ complete?: boolean;
30
+ chunkCount?: number;
31
+ };
32
+ export type HttpExchangeBody = {
33
+ contentType?: string;
34
+ encoding?: "utf8" | "base64";
35
+ value?: string;
36
+ size?: number;
37
+ truncated?: boolean;
38
+ form?: HttpExchangeNameValue[];
39
+ parts?: HttpExchangeBodyPart[];
40
+ stream?: HttpExchangeStream;
41
+ };
42
+ export type HttpExchangeRequest = {
43
+ method: string;
44
+ url: string;
45
+ httpVersion?: string;
46
+ cookies?: HttpExchangeCookie[];
47
+ headers?: HttpExchangeNameValue[];
48
+ query?: HttpExchangeNameValue[];
49
+ body?: HttpExchangeBody;
50
+ trailers?: HttpExchangeNameValue[];
51
+ };
52
+ export type HttpExchangeInformationalResponse = {
53
+ status?: number;
54
+ statusText?: string;
55
+ headers?: HttpExchangeNameValue[];
56
+ };
57
+ export type HttpExchangeResponse = {
58
+ status?: number;
59
+ statusText?: string;
60
+ httpVersion?: string;
61
+ cookies?: HttpExchangeCookie[];
62
+ headers?: HttpExchangeNameValue[];
63
+ body?: HttpExchangeBody;
64
+ trailers?: HttpExchangeNameValue[];
65
+ informationalResponses?: HttpExchangeInformationalResponse[];
66
+ };
67
+ export type HttpExchangeError = {
68
+ name?: string;
69
+ message?: string;
70
+ stack?: string;
71
+ };
72
+ export type HttpExchange = {
73
+ schemaVersion: typeof ALLURE_HTTP_EXCHANGE_SCHEMA_VERSION;
74
+ request: HttpExchangeRequest;
75
+ response?: HttpExchangeResponse;
76
+ error?: HttpExchangeError;
77
+ start?: number;
78
+ stop?: number;
79
+ };
@@ -1,4 +1,6 @@
1
1
  export { allureId, attachment, attachmentPath, attachTrace, description, descriptionHtml, displayName, epic, feature, globalAttachment, globalAttachmentPath, globalError, historyId, issue, label, labels, layer, link, links, logStep, owner, parameter, parentSuite, severity, step, story, subSuite, suite, tag, tags, testCaseId, tms, } from "./facade.js";
2
- export type { StepContext } from "./facade.js";
2
+ export type { StepContext } from "./sdk/runtime/types.js";
3
+ export type { HttpExchange, HttpExchangeBody, HttpExchangeBodyPart, HttpExchangeCookie, HttpExchangeError, HttpExchangeInformationalResponse, HttpExchangeNameValue, HttpExchangeRequest, HttpExchangeResponse, HttpExchangeStream, } from "./http.js";
4
+ export { ALLURE_HTTP_EXCHANGE_CONTENT_TYPE, ALLURE_HTTP_EXCHANGE_FILE_EXTENSION, ALLURE_HTTP_EXCHANGE_SCHEMA_VERSION, ALLURE_HTTP_REDACTED_VALUE, } from "./http.js";
3
5
  export type { Attachment, AttachmentOptions, FixtureResult, ImageDiffAttachment, Label, Link, Globals, Parameter, ParameterMode, ParameterOptions, StatusDetails, StepResult, TestOrStepResult, TestResult, TestResultContainer, } from "./model.js";
4
6
  export { ContentType, LinkType, LabelName, Severity, Stage, Status, StatusByPriority } from "./model.js";
@@ -1,5 +1,3 @@
1
- /// <reference types="node" />
2
- /// <reference types="node" />
3
1
  export interface Attachment {
4
2
  name: string;
5
3
  type?: string;
@@ -143,7 +141,8 @@ export declare enum ContentType {
143
141
  JPEG = "image/jpeg",
144
142
  MP4 = "video/mp4",
145
143
  IMAGEDIFF = "application/vnd.allure.image.diff",
146
- PLAYWRIGHT_TRACE = "application/vnd.allure.playwright-trace"
144
+ PLAYWRIGHT_TRACE = "application/vnd.allure.playwright-trace",
145
+ HTTP_EXCHANGE = "application/vnd.allure.http+json"
147
146
  }
148
147
  export declare enum LinkType {
149
148
  DEFAULT = "link",
@@ -1,5 +1,3 @@
1
- /// <reference types="node" />
2
- /// <reference types="node" />
3
1
  import { type AttachmentOptions, type FixtureResult, type Label, type StepResult, type TestResult } from "../../model.js";
4
2
  import type { Category, EnvironmentInfo, RuntimeMessage } from "../types.js";
5
3
  import type { FixtureType, LinkConfig, ReporterRuntimeConfig, TestScope, Writer } from "./types.js";
@@ -1,5 +1,3 @@
1
- /// <reference types="node" />
2
- /// <reference types="node" />
3
1
  import type { FixtureResult, Globals, Label, LabelName, Link, LinkType, Parameter, StepResult, TestResult, TestResultContainer } from "../../model.js";
4
2
  import type { Category, EnvironmentInfo } from "../types.js";
5
3
  export declare const ALLURE_METADATA_CONTENT_TYPE = "application/vnd.allure.metadata+json";
@@ -2,6 +2,6 @@ import type { Label } from "../../../model.js";
2
2
  export declare const getEnvironmentLabels: () => Label[];
3
3
  export declare const getHostLabel: () => Label;
4
4
  export declare const getThreadLabel: (userProvidedThreadId?: string) => Label;
5
- export declare const getPackageLabel: (filepath: string) => Label;
5
+ export declare const getPackageLabel: (filepath: string, searchFrom?: string) => Label;
6
6
  export declare const getLanguageLabel: () => Label;
7
7
  export declare const getFrameworkLabel: (framework: string) => Label;
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import type { EventEmitter } from "node:events";
3
2
  import type { Label, Link, StepResult, TestResult } from "../../model.js";
4
3
  import type { LinkConfig, LinkTemplate } from "./types.js";
@@ -6,12 +5,15 @@ import { FileSystemWriter } from "./writer/FileSystemWriter.js";
6
5
  import { MessageWriter } from "./writer/MessageWriter.js";
7
6
  export declare const randomUuid: () => `${string}-${string}-${string}-${string}-${string}`;
8
7
  export declare const md5: (str: string) => string;
8
+ export declare const FALLBACK_TEST_CASE_ID_LABEL_NAME = "_fallbackTestCaseId";
9
+ export declare const getFallbackTestCaseIdLabel: (value: string) => Label;
9
10
  export declare const getTestResultHistoryId: (result: TestResult) => string;
10
11
  export declare const getTestResultTestCaseId: (result: TestResult) => string | undefined;
11
12
  export declare const getWorstTestStepResult: (steps: StepResult[]) => StepResult | undefined;
12
13
  export declare const readImageAsBase64: (filePath: string) => Promise<string | undefined>;
13
- export declare const getProjectRoot: () => string;
14
- export declare const getRelativePath: (filepath: string) => string;
14
+ export declare const getProjectRoot: (searchFrom?: string) => string;
15
+ export declare const getProjectName: (searchFrom?: string) => string | undefined;
16
+ export declare const getRelativePath: (filepath: string, searchFrom?: string) => string;
15
17
  export declare const getPosixPath: (filepath: string) => string;
16
18
  export declare const deepClone: <T>(obj: T) => T;
17
19
  export declare const getSuiteLabels: (suites: readonly string[]) => Label[];
@@ -1,5 +1,3 @@
1
- /// <reference types="node" />
2
- /// <reference types="node" />
3
1
  import type { Globals, TestResult, TestResultContainer } from "../../../model.js";
4
2
  import type { Category, EnvironmentInfo } from "../../types.js";
5
3
  import type { Writer } from "../types.js";
@@ -1,5 +1,3 @@
1
- /// <reference types="node" />
2
- /// <reference types="node" />
3
1
  import type { Globals, TestResult, TestResultContainer } from "../../../model.js";
4
2
  import type { AllureResults, Category, EnvironmentInfo } from "../../types.js";
5
3
  import type { Writer } from "../types.js";