newman-reporter-allure 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.
package/dist/cjs/index.js CHANGED
@@ -81,18 +81,21 @@ class AllureReporter {
81
81
  var item = args.item;
82
82
  var fullName = _assertClassBrand(_AllureReporter_brand, this, _getFullName).call(this, item);
83
83
  var testPath = _assertClassBrand(_AllureReporter_brand, this, _pathToItem).call(this, item);
84
+ var projectName = (0, _reporter.getProjectName)();
85
+ var titlePath = projectName ? [projectName, ...testPath] : testPath;
84
86
  var hostLabel = (0, _reporter.getHostLabel)();
85
87
  var threadLabel = (0, _reporter.getThreadLabel)();
86
88
  var {
87
89
  labels,
88
90
  links
89
91
  } = (0, _utils.extractMeta)(args.item.events);
92
+ var legacyFullName = "".concat(testPath.join("/"), "#").concat(item.name);
90
93
  this.currentTest = this.allureRuntime.startTest({
91
94
  name: args.item.name,
92
95
  fullName,
93
- titlePath: testPath,
96
+ titlePath,
94
97
  stage: _allureJsCommons.Stage.RUNNING,
95
- labels: [(0, _reporter.getLanguageLabel)(), (0, _reporter.getFrameworkLabel)("newman"), hostLabel, threadLabel, ...labels, ...(0, _reporter.getEnvironmentLabels)()],
98
+ labels: [(0, _reporter.getLanguageLabel)(), (0, _reporter.getFrameworkLabel)("newman"), hostLabel, threadLabel, (0, _reporter.getFallbackTestCaseIdLabel)((0, _reporter.md5)(legacyFullName)), ...labels, ...(0, _reporter.getEnvironmentLabels)()],
96
99
  links
97
100
  });
98
101
  this.allureRuntime.updateTest(this.currentTest, test => {
@@ -330,7 +333,9 @@ function _pathToItem(item) {
330
333
  }
331
334
  function _getFullName(item) {
332
335
  var chain = _assertClassBrand(_AllureReporter_brand, this, _pathToItem).call(this, item);
333
- return "".concat(chain.join("/"), "#").concat(item.name);
336
+ var projectName = (0, _reporter.getProjectName)();
337
+ var fullNameBase = projectName ? "".concat(projectName, ":").concat(chain.join("/")) : chain.join("/");
338
+ return "".concat(fullNameBase, "#").concat(item.name);
334
339
  }
335
340
  function _attachString(name, value) {
336
341
  var stringToAttach = Array.isArray(value) ? value.join("\n") : value;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["_allureJsCommons","require","_reporter","_utils","_excluded","ownKeys","e","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","_objectWithoutProperties","i","_objectWithoutPropertiesLoose","n","indexOf","propertyIsEnumerable","call","hasOwnProperty","_classPrivateMethodInitSpec","a","_checkPrivateRedeclaration","add","has","TypeError","_toPropertyKey","value","configurable","writable","_toPrimitive","Symbol","toPrimitive","String","Number","_assertClassBrand","_AllureReporter_brand","WeakSet","AllureReporter","constructor","emitter","reporterConfig","options","Map","resultsDir","restConfig","currentCollection","collection","rootCollectionName","name","allureConfig","allureRuntime","ReporterRuntime","writer","createDefaultWriter","registerEvents","on","onStart","bind","onBeforeItem","onItem","onPrerequest","onRequest","onTest","onAssertion","onConsole","onDone","currentScope","startScope","err","args","_args$executions$","currentTest","currentPmItem","pmItemsByAllureUuid","get","prerequest","executions","script","exec","join","pmItem","item","passed","failedAssertions","consoleLogs","itemGroup","parent","fullName","_getFullName","testPath","_pathToItem","hostLabel","getHostLabel","threadLabel","getThreadLabel","labels","links","extractMeta","events","startTest","titlePath","stage","Stage","RUNNING","getLanguageLabel","getFrameworkLabel","getEnvironmentLabels","updateTest","test","getSuiteLabels","set","_requestData$headers","_requestData$body","_response$headers","requestData","requestDataURL","concat","method","url","rawDescription","request","description","testDescription","content","response","responseData","requestError","_attachString","testScript","headers","count","writeAttachment","undefined","_headerListToJsonBuffer","contentType","ContentType","JSON","body","mode","raw","Buffer","from","TEXT","parameters","code","toString","excluded","descriptionHtml","replace","details","_escape","status","Status","FAILED","FINISHED","statusDetails","message","trace","errorMsg","BROKEN","PASSED","stopTest","writeTest","_args$executions$2","execScript","testArgs","error","errName","errMsg","stepUuid","startStep","stopStep","level","messages","_args$response","req","respStream","stream","respBody","assertion","updateStep","step","stack","writeScope","forEachParent","chain","unshift","id","stringToAttach","Array","isArray","ret","all","h","key","stringify","val","_default","exports","default","module"],"sources":["../../src/index.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/unbound-method */\nimport type { EventEmitter } from \"events\";\n\nimport { ContentType, Stage, Status } from \"allure-js-commons\";\nimport type { ReporterConfig } from \"allure-js-commons/sdk/reporter\";\nimport {\n ReporterRuntime,\n createDefaultWriter,\n getEnvironmentLabels,\n getFrameworkLabel,\n getHostLabel,\n getLanguageLabel,\n getSuiteLabels,\n getThreadLabel,\n} from \"allure-js-commons/sdk/reporter\";\nimport type { ConsoleEvent, Cursor, NewmanRunExecutionAssertion } from \"newman\";\nimport type { CollectionDefinition, Event, HeaderList, Item, Request, Response } from \"postman-collection\";\n\nimport type { PmItem, RunningItem } from \"./model.js\";\nimport { extractMeta } from \"./utils.js\";\n\nclass AllureReporter {\n allureRuntime: ReporterRuntime;\n allureConfig: ReporterConfig;\n runningItems: RunningItem[] = [];\n currentCollection: CollectionDefinition;\n pmItemsByAllureUuid: Map<string, PmItem> = new Map();\n currentTest?: string;\n currentScope?: string;\n rootCollectionName?: string;\n\n constructor(\n emitter: EventEmitter,\n reporterConfig: ReporterConfig,\n options: {\n collection: CollectionDefinition;\n },\n ) {\n const { resultsDir, ...restConfig } = reporterConfig;\n\n this.currentCollection = options.collection;\n this.rootCollectionName = options.collection.name;\n this.allureConfig = reporterConfig;\n this.allureRuntime = new ReporterRuntime({\n ...restConfig,\n writer: createDefaultWriter({ resultsDir, emitter }),\n });\n this.registerEvents(emitter);\n }\n\n registerEvents(emitter: EventEmitter) {\n emitter.on(\"start\", this.onStart.bind(this));\n emitter.on(\"beforeItem\", this.onBeforeItem.bind(this));\n emitter.on(\"item\", this.onItem.bind(this));\n emitter.on(\"prerequest\", this.onPrerequest.bind(this));\n emitter.on(\"request\", this.onRequest.bind(this));\n emitter.on(\"test\", this.onTest.bind(this));\n emitter.on(\"assertion\", this.onAssertion.bind(this));\n emitter.on(\"console\", this.onConsole.bind(this));\n emitter.on(\"done\", this.onDone.bind(this));\n }\n\n onStart() {\n this.currentScope = this.allureRuntime.startScope();\n }\n\n onPrerequest(\n err: any,\n args: {\n executions: Event[];\n },\n ) {\n if (!this.currentTest) {\n return;\n }\n\n const currentPmItem = this.pmItemsByAllureUuid.get(this.currentTest);\n\n if (!currentPmItem) {\n return;\n }\n\n currentPmItem.prerequest = args.executions[0]?.script?.exec?.join(\"\\n\");\n }\n\n onBeforeItem(err: any, args: { item: Item; cursor: Cursor }) {\n const pmItem: PmItem = {\n name: args.item.name,\n passed: true,\n failedAssertions: [],\n consoleLogs: [],\n };\n const itemGroup = args.item.parent();\n const item = args.item;\n const fullName = this.#getFullName(item);\n const testPath = this.#pathToItem(item);\n const hostLabel = getHostLabel();\n const threadLabel = getThreadLabel();\n const { labels, links } = extractMeta(args.item.events);\n\n this.currentTest = this.allureRuntime.startTest({\n name: args.item.name,\n fullName,\n titlePath: testPath,\n stage: Stage.RUNNING,\n labels: [\n getLanguageLabel(),\n getFrameworkLabel(\"newman\"),\n hostLabel,\n threadLabel,\n ...labels,\n ...getEnvironmentLabels(),\n ],\n links,\n });\n\n this.allureRuntime.updateTest(this.currentTest, (test) => {\n test.labels.push(...getSuiteLabels(testPath));\n });\n\n this.pmItemsByAllureUuid.set(this.currentTest, pmItem);\n\n if (itemGroup && this.currentCollection !== itemGroup) {\n this.currentCollection = itemGroup;\n }\n }\n\n onItem(\n err: any,\n args: {\n item: Item;\n },\n ) {\n if (!this.currentTest) {\n return;\n }\n\n const currentPmItem = this.pmItemsByAllureUuid.get(this.currentTest);\n\n if (!currentPmItem) {\n return;\n }\n\n const requestData = currentPmItem.requestData;\n const requestDataURL = requestData && `${requestData.method} - ${requestData.url}`;\n const rawDescription = args.item.request.description;\n const testDescription = (typeof rawDescription === \"string\" ? rawDescription : rawDescription?.content) || \"\";\n const response = currentPmItem.responseData;\n const failedAssertions = currentPmItem.failedAssertions;\n const requestError = currentPmItem.requestError;\n\n if (currentPmItem.prerequest) {\n this.#attachString(\"PreRequest\", currentPmItem.prerequest);\n }\n\n if (currentPmItem.testScript) {\n this.#attachString(\"TestScript\", currentPmItem.testScript);\n }\n\n if (currentPmItem.consoleLogs.length) {\n this.#attachString(\"ConsoleLogs\", currentPmItem.consoleLogs);\n }\n\n if (requestData?.headers && requestData?.headers?.count() > 0) {\n this.allureRuntime.writeAttachment(\n this.currentTest,\n undefined,\n \"Request Headers\",\n this.#headerListToJsonBuffer(requestData.headers),\n {\n contentType: ContentType.JSON,\n },\n );\n }\n\n if (requestData?.body?.mode === \"raw\" && requestData.body.raw) {\n this.#attachString(\"Request Body\", requestData.body.raw);\n }\n\n if (response?.headers && response?.headers?.count() > 0) {\n this.allureRuntime.writeAttachment(\n this.currentTest,\n undefined,\n \"Response Headers\",\n this.#headerListToJsonBuffer(response.headers),\n {\n contentType: ContentType.JSON,\n },\n );\n }\n\n if (response?.body) {\n this.allureRuntime.writeAttachment(\n this.currentTest,\n undefined,\n \"Response Body\",\n Buffer.from(response.body, \"utf-8\"),\n {\n contentType: ContentType.TEXT,\n },\n );\n }\n\n this.allureRuntime.updateTest(this.currentTest, (test) => {\n if (requestDataURL) {\n test.parameters.push({\n name: \"Request\",\n value: requestDataURL,\n });\n }\n\n if (response?.code) {\n test.parameters.push({\n name: \"Response Code\",\n value: response?.code.toString(),\n excluded: true,\n });\n }\n\n if (testDescription) {\n const descriptionHtml = testDescription.replace(/[*]/g, \"\").replace(/\\n/g, \"<br>\");\n\n test.description = testDescription;\n test.descriptionHtml = descriptionHtml;\n }\n });\n\n if (response && failedAssertions?.length) {\n const details = this.#escape(`Response code: ${response.code}, status: ${response.status}`);\n\n this.allureRuntime.updateTest(this.currentTest, (test) => {\n test.status = Status.FAILED;\n test.stage = Stage.FINISHED;\n test.statusDetails = {\n message: this.#escape(failedAssertions.join(\", \")),\n trace: details,\n };\n });\n } else if (requestError) {\n const errorMsg = this.#escape(requestError);\n\n this.allureRuntime.updateTest(this.currentTest, (test) => {\n test.status = Status.BROKEN;\n test.stage = Stage.FINISHED;\n test.statusDetails = {\n message: errorMsg,\n };\n });\n } else {\n this.allureRuntime.updateTest(this.currentTest, (test) => {\n test.status = Status.PASSED;\n test.stage = Stage.FINISHED;\n });\n }\n\n this.allureRuntime.stopTest(this.currentTest);\n this.allureRuntime.writeTest(this.currentTest);\n }\n\n onTest(err: any, args: { executions: Event[] }) {\n if (!this.currentTest) {\n return;\n }\n\n const currentPmItem = this.pmItemsByAllureUuid.get(this.currentTest);\n\n if (!currentPmItem) {\n return;\n }\n\n const execScript = args.executions[0]?.script?.exec?.join(\"\\n\");\n\n if (!execScript) {\n return;\n }\n\n currentPmItem.testScript = execScript;\n\n // not typed postman-collection error property ?\n const testArgs: any = args.executions[0];\n\n if (!testArgs.error) {\n return;\n }\n\n const errName: string = testArgs.error.name;\n const errMsg: string = testArgs.error.message;\n\n const stepUuid = this.allureRuntime.startStep(this.currentTest, undefined, {\n name: errName,\n status: Status.FAILED,\n stage: Stage.FINISHED,\n statusDetails: {\n message: errMsg,\n },\n });\n\n if (!stepUuid) {\n // no such test running, ignore reporting\n return;\n }\n\n currentPmItem.failedAssertions.push(errName);\n\n this.allureRuntime.stopStep(stepUuid);\n }\n\n onConsole(err: any, args: ConsoleEvent) {\n if (!this.currentTest) {\n return;\n }\n\n const currentPmItem = this.pmItemsByAllureUuid.get(this.currentTest);\n\n if (!currentPmItem || err) {\n return;\n }\n\n if (args.level) {\n currentPmItem.consoleLogs.push(`level: ${args.level}, messages: ${args.messages.toString()}`);\n }\n }\n\n onRequest(\n err: any,\n args: {\n request: Request;\n response: Response;\n },\n ) {\n if (!this.currentTest) {\n return;\n }\n\n const currentPmItem = this.pmItemsByAllureUuid.get(this.currentTest);\n\n if (!currentPmItem) {\n return;\n }\n\n const req = args.request;\n const url = req.url.toString(true);\n\n currentPmItem.requestData = {\n url: url,\n method: req.method,\n body: req.body,\n headers: req.headers,\n };\n\n if (err) {\n currentPmItem.passed = false;\n currentPmItem.requestError = err.message;\n }\n\n if (!args.response) {\n return;\n }\n\n const respStream = args?.response?.stream;\n const respBody = respStream ? Buffer.from(respStream).toString() : \"\";\n\n currentPmItem.responseData = {\n status: args.response.status,\n code: args.response.code,\n body: respBody,\n headers: args.response.headers,\n };\n }\n\n onAssertion(err: any, args: NewmanRunExecutionAssertion) {\n if (!this.currentTest) {\n return;\n }\n\n const currentPmItem = this.pmItemsByAllureUuid.get(this.currentTest);\n\n if (!currentPmItem) {\n return;\n }\n\n const stepUuid = this.allureRuntime.startStep(this.currentTest, undefined, {\n name: args.assertion,\n });\n if (!stepUuid) {\n // no such test running, ignore reporting\n return;\n }\n\n this.allureRuntime.updateStep(stepUuid, (step) => {\n if (err && currentPmItem) {\n currentPmItem.passed = false;\n currentPmItem.failedAssertions.push(args.assertion);\n\n step.statusDetails = {\n message: err.message,\n trace: err.stack,\n };\n step.status = Status.FAILED;\n } else {\n step.status = Status.PASSED;\n }\n\n step.stage = Stage.FINISHED;\n });\n\n this.allureRuntime.stopStep(stepUuid);\n }\n\n onDone() {\n if (this.currentScope) {\n this.allureRuntime.writeScope(this.currentScope);\n this.currentScope = undefined;\n }\n }\n\n #pathToItem(item: Item): string[] {\n if (!item || !(typeof item.parent === \"function\") || !(typeof item.forEachParent === \"function\")) {\n return [];\n }\n\n const chain: string[] = [];\n\n item.forEachParent((parent) => {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n chain.unshift(parent.name || parent.id);\n });\n\n if (this.rootCollectionName) {\n chain.unshift(this.rootCollectionName);\n }\n return chain;\n }\n\n #getFullName(item: Item): string {\n const chain = this.#pathToItem(item);\n\n return `${chain.join(\"/\")}#${item.name}`;\n }\n\n #attachString(name: string, value: string | string[]) {\n const stringToAttach = Array.isArray(value) ? value.join(\"\\n\") : value;\n\n if (!stringToAttach) {\n return;\n }\n\n const content = Buffer.from(stringToAttach, \"utf-8\");\n\n this.allureRuntime.writeAttachment(this.currentTest!, undefined, name, content, {\n contentType: ContentType.TEXT,\n });\n }\n\n #headerListToJsonBuffer(headers: HeaderList) {\n const ret: { [k: string]: any } = {};\n\n headers.all().forEach((h) => {\n ret[h.key] = h.value;\n });\n\n return Buffer.from(JSON.stringify(ret, null, 4), \"utf-8\");\n }\n\n #escape(val: string) {\n return val.replace(\"\\n\", \"\").replace(\"\\r\", \"\").replace('\"', '\"');\n }\n}\n\nexport default AllureReporter;\n"],"mappings":";;;;;;AAGA,IAAAA,gBAAA,GAAAC,OAAA;AAEA,IAAAC,SAAA,GAAAD,OAAA;AAcA,IAAAE,MAAA,GAAAF,OAAA;AAAyC,IAAAG,SAAA;AAAA,SAAAC,QAAAC,CAAA,EAAAC,CAAA,QAAAC,CAAA,GAAAC,MAAA,CAAAC,IAAA,CAAAJ,CAAA,OAAAG,MAAA,CAAAE,qBAAA,QAAAC,CAAA,GAAAH,MAAA,CAAAE,qBAAA,CAAAL,CAAA,GAAAC,CAAA,KAAAK,CAAA,GAAAA,CAAA,CAAAC,MAAA,WAAAN,CAAA,WAAAE,MAAA,CAAAK,wBAAA,CAAAR,CAAA,EAAAC,CAAA,EAAAQ,UAAA,OAAAP,CAAA,CAAAQ,IAAA,CAAAC,KAAA,CAAAT,CAAA,EAAAI,CAAA,YAAAJ,CAAA;AAAA,SAAAU,cAAAZ,CAAA,aAAAC,CAAA,MAAAA,CAAA,GAAAY,SAAA,CAAAC,MAAA,EAAAb,CAAA,UAAAC,CAAA,WAAAW,SAAA,CAAAZ,CAAA,IAAAY,SAAA,CAAAZ,CAAA,QAAAA,CAAA,OAAAF,OAAA,CAAAI,MAAA,CAAAD,CAAA,OAAAa,OAAA,WAAAd,CAAA,IAAAe,eAAA,CAAAhB,CAAA,EAAAC,CAAA,EAAAC,CAAA,CAAAD,CAAA,SAAAE,MAAA,CAAAc,yBAAA,GAAAd,MAAA,CAAAe,gBAAA,CAAAlB,CAAA,EAAAG,MA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,EAAE,OAAO,CAAC;AAC3D;AAAC,SAAAzC,QAEO8C,GAAW,EAAE;EACnB,OAAOA,GAAG,CAAChD,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAACA,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAACA,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC;AAClE;AAAC,IAAAiD,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAGYlK,cAAc;AAAAmK,MAAA,CAAAF,OAAA,GAAAA,OAAA,CAAAC,OAAA","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["_allureJsCommons","require","_reporter","_utils","_excluded","ownKeys","e","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","_objectWithoutProperties","i","_objectWithoutPropertiesLoose","n","indexOf","propertyIsEnumerable","call","hasOwnProperty","_classPrivateMethodInitSpec","a","_checkPrivateRedeclaration","add","has","TypeError","_toPropertyKey","value","configurable","writable","_toPrimitive","Symbol","toPrimitive","String","Number","_assertClassBrand","_AllureReporter_brand","WeakSet","AllureReporter","constructor","emitter","reporterConfig","options","Map","resultsDir","restConfig","currentCollection","collection","rootCollectionName","name","allureConfig","allureRuntime","ReporterRuntime","writer","createDefaultWriter","registerEvents","on","onStart","bind","onBeforeItem","onItem","onPrerequest","onRequest","onTest","onAssertion","onConsole","onDone","currentScope","startScope","err","args","_args$executions$","currentTest","currentPmItem","pmItemsByAllureUuid","get","prerequest","executions","script","exec","join","pmItem","item","passed","failedAssertions","consoleLogs","itemGroup","parent","fullName","_getFullName","testPath","_pathToItem","projectName","getProjectName","titlePath","hostLabel","getHostLabel","threadLabel","getThreadLabel","labels","links","extractMeta","events","legacyFullName","concat","startTest","stage","Stage","RUNNING","getLanguageLabel","getFrameworkLabel","getFallbackTestCaseIdLabel","md5","getEnvironmentLabels","updateTest","test","getSuiteLabels","set","_requestData$headers","_requestData$body","_response$headers","requestData","requestDataURL","method","url","rawDescription","request","description","testDescription","content","response","responseData","requestError","_attachString","testScript","headers","count","writeAttachment","undefined","_headerListToJsonBuffer","contentType","ContentType","JSON","body","mode","raw","Buffer","from","TEXT","parameters","code","toString","excluded","descriptionHtml","replace","details","_escape","status","Status","FAILED","FINISHED","statusDetails","message","trace","errorMsg","BROKEN","PASSED","stopTest","writeTest","_args$executions$2","execScript","testArgs","error","errName","errMsg","stepUuid","startStep","stopStep","level","messages","_args$response","req","respStream","stream","respBody","assertion","updateStep","step","stack","writeScope","forEachParent","chain","unshift","id","fullNameBase","stringToAttach","Array","isArray","ret","all","h","key","stringify","val","_default","exports","default","module"],"sources":["../../src/index.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/unbound-method */\nimport type { EventEmitter } from \"events\";\n\nimport { ContentType, Stage, Status } from \"allure-js-commons\";\nimport type { ReporterConfig } from \"allure-js-commons/sdk/reporter\";\nimport {\n ReporterRuntime,\n createDefaultWriter,\n getEnvironmentLabels,\n getFallbackTestCaseIdLabel,\n getFrameworkLabel,\n getHostLabel,\n getLanguageLabel,\n getProjectName,\n getSuiteLabels,\n getThreadLabel,\n md5,\n} from \"allure-js-commons/sdk/reporter\";\nimport type { ConsoleEvent, Cursor, NewmanRunExecutionAssertion } from \"newman\";\nimport type { CollectionDefinition, Event, HeaderList, Item, Request, Response } from \"postman-collection\";\n\nimport type { PmItem, RunningItem } from \"./model.js\";\nimport { extractMeta } from \"./utils.js\";\n\nclass AllureReporter {\n allureRuntime: ReporterRuntime;\n allureConfig: ReporterConfig;\n runningItems: RunningItem[] = [];\n currentCollection: CollectionDefinition;\n pmItemsByAllureUuid: Map<string, PmItem> = new Map();\n currentTest?: string;\n currentScope?: string;\n rootCollectionName?: string;\n\n constructor(\n emitter: EventEmitter,\n reporterConfig: ReporterConfig,\n options: {\n collection: CollectionDefinition;\n },\n ) {\n const { resultsDir, ...restConfig } = reporterConfig;\n\n this.currentCollection = options.collection;\n this.rootCollectionName = options.collection.name;\n this.allureConfig = reporterConfig;\n this.allureRuntime = new ReporterRuntime({\n ...restConfig,\n writer: createDefaultWriter({ resultsDir, emitter }),\n });\n this.registerEvents(emitter);\n }\n\n registerEvents(emitter: EventEmitter) {\n emitter.on(\"start\", this.onStart.bind(this));\n emitter.on(\"beforeItem\", this.onBeforeItem.bind(this));\n emitter.on(\"item\", this.onItem.bind(this));\n emitter.on(\"prerequest\", this.onPrerequest.bind(this));\n emitter.on(\"request\", this.onRequest.bind(this));\n emitter.on(\"test\", this.onTest.bind(this));\n emitter.on(\"assertion\", this.onAssertion.bind(this));\n emitter.on(\"console\", this.onConsole.bind(this));\n emitter.on(\"done\", this.onDone.bind(this));\n }\n\n onStart() {\n this.currentScope = this.allureRuntime.startScope();\n }\n\n onPrerequest(\n err: any,\n args: {\n executions: Event[];\n },\n ) {\n if (!this.currentTest) {\n return;\n }\n\n const currentPmItem = this.pmItemsByAllureUuid.get(this.currentTest);\n\n if (!currentPmItem) {\n return;\n }\n\n currentPmItem.prerequest = args.executions[0]?.script?.exec?.join(\"\\n\");\n }\n\n onBeforeItem(err: any, args: { item: Item; cursor: Cursor }) {\n const pmItem: PmItem = {\n name: args.item.name,\n passed: true,\n failedAssertions: [],\n consoleLogs: [],\n };\n const itemGroup = args.item.parent();\n const item = args.item;\n const fullName = this.#getFullName(item);\n const testPath = this.#pathToItem(item);\n const projectName = getProjectName();\n const titlePath = projectName ? [projectName, ...testPath] : testPath;\n const hostLabel = getHostLabel();\n const threadLabel = getThreadLabel();\n const { labels, links } = extractMeta(args.item.events);\n const legacyFullName = `${testPath.join(\"/\")}#${item.name}`;\n\n this.currentTest = this.allureRuntime.startTest({\n name: args.item.name,\n fullName,\n titlePath,\n stage: Stage.RUNNING,\n labels: [\n getLanguageLabel(),\n getFrameworkLabel(\"newman\"),\n hostLabel,\n threadLabel,\n getFallbackTestCaseIdLabel(md5(legacyFullName)),\n ...labels,\n ...getEnvironmentLabels(),\n ],\n links,\n });\n\n this.allureRuntime.updateTest(this.currentTest, (test) => {\n test.labels.push(...getSuiteLabels(testPath));\n });\n\n this.pmItemsByAllureUuid.set(this.currentTest, pmItem);\n\n if (itemGroup && this.currentCollection !== itemGroup) {\n this.currentCollection = itemGroup;\n }\n }\n\n onItem(\n err: any,\n args: {\n item: Item;\n },\n ) {\n if (!this.currentTest) {\n return;\n }\n\n const currentPmItem = this.pmItemsByAllureUuid.get(this.currentTest);\n\n if (!currentPmItem) {\n return;\n }\n\n const requestData = currentPmItem.requestData;\n const requestDataURL = requestData && `${requestData.method} - ${requestData.url}`;\n const rawDescription = args.item.request.description;\n const testDescription = (typeof rawDescription === \"string\" ? rawDescription : rawDescription?.content) || \"\";\n const response = currentPmItem.responseData;\n const failedAssertions = currentPmItem.failedAssertions;\n const requestError = currentPmItem.requestError;\n\n if (currentPmItem.prerequest) {\n this.#attachString(\"PreRequest\", currentPmItem.prerequest);\n }\n\n if (currentPmItem.testScript) {\n this.#attachString(\"TestScript\", currentPmItem.testScript);\n }\n\n if (currentPmItem.consoleLogs.length) {\n this.#attachString(\"ConsoleLogs\", currentPmItem.consoleLogs);\n }\n\n if (requestData?.headers && requestData?.headers?.count() > 0) {\n this.allureRuntime.writeAttachment(\n this.currentTest,\n undefined,\n \"Request Headers\",\n this.#headerListToJsonBuffer(requestData.headers),\n {\n contentType: ContentType.JSON,\n },\n );\n }\n\n if (requestData?.body?.mode === \"raw\" && requestData.body.raw) {\n this.#attachString(\"Request Body\", requestData.body.raw);\n }\n\n if (response?.headers && response?.headers?.count() > 0) {\n this.allureRuntime.writeAttachment(\n this.currentTest,\n undefined,\n \"Response Headers\",\n this.#headerListToJsonBuffer(response.headers),\n {\n contentType: ContentType.JSON,\n },\n );\n }\n\n if (response?.body) {\n this.allureRuntime.writeAttachment(\n this.currentTest,\n undefined,\n \"Response Body\",\n Buffer.from(response.body, \"utf-8\"),\n {\n contentType: ContentType.TEXT,\n },\n );\n }\n\n this.allureRuntime.updateTest(this.currentTest, (test) => {\n if (requestDataURL) {\n test.parameters.push({\n name: \"Request\",\n value: requestDataURL,\n });\n }\n\n if (response?.code) {\n test.parameters.push({\n name: \"Response Code\",\n value: response?.code.toString(),\n excluded: true,\n });\n }\n\n if (testDescription) {\n const descriptionHtml = testDescription.replace(/[*]/g, \"\").replace(/\\n/g, \"<br>\");\n\n test.description = testDescription;\n test.descriptionHtml = descriptionHtml;\n }\n });\n\n if (response && failedAssertions?.length) {\n const details = this.#escape(`Response code: ${response.code}, status: ${response.status}`);\n\n this.allureRuntime.updateTest(this.currentTest, (test) => {\n test.status = Status.FAILED;\n test.stage = Stage.FINISHED;\n test.statusDetails = {\n message: this.#escape(failedAssertions.join(\", \")),\n trace: details,\n };\n });\n } else if (requestError) {\n const errorMsg = this.#escape(requestError);\n\n this.allureRuntime.updateTest(this.currentTest, (test) => {\n test.status = Status.BROKEN;\n test.stage = Stage.FINISHED;\n test.statusDetails = {\n message: errorMsg,\n };\n });\n } else {\n this.allureRuntime.updateTest(this.currentTest, (test) => {\n test.status = Status.PASSED;\n test.stage = Stage.FINISHED;\n });\n }\n\n this.allureRuntime.stopTest(this.currentTest);\n this.allureRuntime.writeTest(this.currentTest);\n }\n\n onTest(err: any, args: { executions: Event[] }) {\n if (!this.currentTest) {\n return;\n }\n\n const currentPmItem = this.pmItemsByAllureUuid.get(this.currentTest);\n\n if (!currentPmItem) {\n return;\n }\n\n const execScript = args.executions[0]?.script?.exec?.join(\"\\n\");\n\n if (!execScript) {\n return;\n }\n\n currentPmItem.testScript = execScript;\n\n // not typed postman-collection error property ?\n const testArgs: any = args.executions[0];\n\n if (!testArgs.error) {\n return;\n }\n\n const errName: string = testArgs.error.name;\n const errMsg: string = testArgs.error.message;\n\n const stepUuid = this.allureRuntime.startStep(this.currentTest, undefined, {\n name: errName,\n status: Status.FAILED,\n stage: Stage.FINISHED,\n statusDetails: {\n message: errMsg,\n },\n });\n\n if (!stepUuid) {\n // no such test running, ignore reporting\n return;\n }\n\n currentPmItem.failedAssertions.push(errName);\n\n this.allureRuntime.stopStep(stepUuid);\n }\n\n onConsole(err: any, args: ConsoleEvent) {\n if (!this.currentTest) {\n return;\n }\n\n const currentPmItem = this.pmItemsByAllureUuid.get(this.currentTest);\n\n if (!currentPmItem || err) {\n return;\n }\n\n if (args.level) {\n currentPmItem.consoleLogs.push(`level: ${args.level}, messages: ${args.messages.toString()}`);\n }\n }\n\n onRequest(\n err: any,\n args: {\n request: Request;\n response: Response;\n },\n ) {\n if (!this.currentTest) {\n return;\n }\n\n const currentPmItem = this.pmItemsByAllureUuid.get(this.currentTest);\n\n if (!currentPmItem) {\n return;\n }\n\n const req = args.request;\n const url = req.url.toString(true);\n\n currentPmItem.requestData = {\n url: url,\n method: req.method,\n body: req.body,\n headers: req.headers,\n };\n\n if (err) {\n currentPmItem.passed = false;\n currentPmItem.requestError = err.message;\n }\n\n if (!args.response) {\n return;\n }\n\n const respStream = args?.response?.stream;\n const respBody = respStream ? Buffer.from(respStream).toString() : \"\";\n\n currentPmItem.responseData = {\n status: args.response.status,\n code: args.response.code,\n body: respBody,\n headers: args.response.headers,\n };\n }\n\n onAssertion(err: any, args: NewmanRunExecutionAssertion) {\n if (!this.currentTest) {\n return;\n }\n\n const currentPmItem = this.pmItemsByAllureUuid.get(this.currentTest);\n\n if (!currentPmItem) {\n return;\n }\n\n const stepUuid = this.allureRuntime.startStep(this.currentTest, undefined, {\n name: args.assertion,\n });\n if (!stepUuid) {\n // no such test running, ignore reporting\n return;\n }\n\n this.allureRuntime.updateStep(stepUuid, (step) => {\n if (err && currentPmItem) {\n currentPmItem.passed = false;\n currentPmItem.failedAssertions.push(args.assertion);\n\n step.statusDetails = {\n message: err.message,\n trace: err.stack,\n };\n step.status = Status.FAILED;\n } else {\n step.status = Status.PASSED;\n }\n\n step.stage = Stage.FINISHED;\n });\n\n this.allureRuntime.stopStep(stepUuid);\n }\n\n onDone() {\n if (this.currentScope) {\n this.allureRuntime.writeScope(this.currentScope);\n this.currentScope = undefined;\n }\n }\n\n #pathToItem(item: Item): string[] {\n if (!item || !(typeof item.parent === \"function\") || !(typeof item.forEachParent === \"function\")) {\n return [];\n }\n\n const chain: string[] = [];\n\n item.forEachParent((parent) => {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n chain.unshift(parent.name || parent.id);\n });\n\n if (this.rootCollectionName) {\n chain.unshift(this.rootCollectionName);\n }\n return chain;\n }\n\n #getFullName(item: Item): string {\n const chain = this.#pathToItem(item);\n const projectName = getProjectName();\n const fullNameBase = projectName ? `${projectName}:${chain.join(\"/\")}` : chain.join(\"/\");\n\n return `${fullNameBase}#${item.name}`;\n }\n\n #attachString(name: string, value: string | string[]) {\n const stringToAttach = Array.isArray(value) ? value.join(\"\\n\") : value;\n\n if (!stringToAttach) {\n return;\n }\n\n const content = Buffer.from(stringToAttach, \"utf-8\");\n\n this.allureRuntime.writeAttachment(this.currentTest!, undefined, name, content, {\n contentType: ContentType.TEXT,\n });\n }\n\n #headerListToJsonBuffer(headers: HeaderList) {\n const ret: { [k: string]: any } = {};\n\n headers.all().forEach((h) => {\n ret[h.key] = h.value;\n });\n\n return Buffer.from(JSON.stringify(ret, null, 4), \"utf-8\");\n }\n\n #escape(val: string) {\n return val.replace(\"\\n\", \"\").replace(\"\\r\", \"\").replace('\"', '\"');\n }\n}\n\nexport default AllureReporter;\n"],"mappings":";;;;;;AAGA,IAAAA,gBAAA,GAAAC,OAAA;AAEA,IAAAC,SAAA,GAAAD,OAAA;AAiBA,IAAAE,MAAA,GAAAF,OAAA;AAAyC,IAAAG,SAAA;AAAA,SAAAC,QAAAC,CAAA,EAAAC,CAAA,QAAAC,CAAA,GAAAC,MAAA,CAAAC,IAAA,CAAAJ,CAAA,OAAAG,MAAA,CAAAE,qBAAA,QAAAC,CAAA,GAAAH,MAAA,CAAAE,qBAAA,CAAAL,CAAA,GAAAC,CAAA,KAAAK,CAAA,GAAAA,CAAA,CAAAC,MAAA,WAAAN,CAAA,WAAAE,MAAA,CAAAK,wBAAA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AACA,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC;AAClE;AAAC,IAAAkD,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAGYxK,cAAc;AAAAyK,MAAA,CAAAF,OAAA,GAAAA,OAAA,CAAAC,OAAA","ignoreList":[]}
package/dist/esm/index.js CHANGED
@@ -12,7 +12,7 @@ function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.h
12
12
  /* eslint-disable @typescript-eslint/unbound-method */
13
13
 
14
14
  import { ContentType, Stage, Status } from "allure-js-commons";
15
- import { ReporterRuntime, createDefaultWriter, getEnvironmentLabels, getFrameworkLabel, getHostLabel, getLanguageLabel, getSuiteLabels, getThreadLabel } from "allure-js-commons/sdk/reporter";
15
+ import { ReporterRuntime, createDefaultWriter, getEnvironmentLabels, getFallbackTestCaseIdLabel, getFrameworkLabel, getHostLabel, getLanguageLabel, getProjectName, getSuiteLabels, getThreadLabel, md5 } from "allure-js-commons/sdk/reporter";
16
16
  import { extractMeta } from "./utils.js";
17
17
  var _AllureReporter_brand = /*#__PURE__*/new WeakSet();
18
18
  class AllureReporter {
@@ -77,18 +77,21 @@ class AllureReporter {
77
77
  var item = args.item;
78
78
  var fullName = _assertClassBrand(_AllureReporter_brand, this, _getFullName).call(this, item);
79
79
  var testPath = _assertClassBrand(_AllureReporter_brand, this, _pathToItem).call(this, item);
80
+ var projectName = getProjectName();
81
+ var titlePath = projectName ? [projectName, ...testPath] : testPath;
80
82
  var hostLabel = getHostLabel();
81
83
  var threadLabel = getThreadLabel();
82
84
  var {
83
85
  labels,
84
86
  links
85
87
  } = extractMeta(args.item.events);
88
+ var legacyFullName = "".concat(testPath.join("/"), "#").concat(item.name);
86
89
  this.currentTest = this.allureRuntime.startTest({
87
90
  name: args.item.name,
88
91
  fullName,
89
- titlePath: testPath,
92
+ titlePath,
90
93
  stage: Stage.RUNNING,
91
- labels: [getLanguageLabel(), getFrameworkLabel("newman"), hostLabel, threadLabel, ...labels, ...getEnvironmentLabels()],
94
+ labels: [getLanguageLabel(), getFrameworkLabel("newman"), hostLabel, threadLabel, getFallbackTestCaseIdLabel(md5(legacyFullName)), ...labels, ...getEnvironmentLabels()],
92
95
  links
93
96
  });
94
97
  this.allureRuntime.updateTest(this.currentTest, test => {
@@ -326,7 +329,9 @@ function _pathToItem(item) {
326
329
  }
327
330
  function _getFullName(item) {
328
331
  var chain = _assertClassBrand(_AllureReporter_brand, this, _pathToItem).call(this, item);
329
- return "".concat(chain.join("/"), "#").concat(item.name);
332
+ var projectName = getProjectName();
333
+ var fullNameBase = projectName ? "".concat(projectName, ":").concat(chain.join("/")) : chain.join("/");
334
+ return "".concat(fullNameBase, "#").concat(item.name);
330
335
  }
331
336
  function _attachString(name, value) {
332
337
  var stringToAttach = Array.isArray(value) ? value.join("\n") : value;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["ContentType","Stage","Status","ReporterRuntime","createDefaultWriter","getEnvironmentLabels","getFrameworkLabel","getHostLabel","getLanguageLabel","getSuiteLabels","getThreadLabel","extractMeta","_AllureReporter_brand","WeakSet","AllureReporter","constructor","emitter","reporterConfig","options","_classPrivateMethodInitSpec","_defineProperty","Map","resultsDir","restConfig","_objectWithoutProperties","_excluded","currentCollection","collection","rootCollectionName","name","allureConfig","allureRuntime","_objectSpread","writer","registerEvents","on","onStart","bind","onBeforeItem","onItem","onPrerequest","onRequest","onTest","onAssertion","onConsole","onDone","currentScope","startScope","err","args","_args$executions$","currentTest","currentPmItem","pmItemsByAllureUuid","get","prerequest","executions","script","exec","join","pmItem","item","passed","failedAssertions","consoleLogs","itemGroup","parent","fullName","_assertClassBrand","_getFullName","call","testPath","_pathToItem","hostLabel","threadLabel","labels","links","events","startTest","titlePath","stage","RUNNING","updateTest","test","push","set","_requestData$headers","_requestData$body","_response$headers","requestData","requestDataURL","concat","method","url","rawDescription","request","description","testDescription","content","response","responseData","requestError","_attachString","testScript","length","headers","count","writeAttachment","undefined","_headerListToJsonBuffer","contentType","JSON","body","mode","raw","Buffer","from","TEXT","parameters","value","code","toString","excluded","descriptionHtml","replace","details","_escape","status","FAILED","FINISHED","statusDetails","message","trace","errorMsg","BROKEN","PASSED","stopTest","writeTest","_args$executions$2","execScript","testArgs","error","errName","errMsg","stepUuid","startStep","stopStep","level","messages","_args$response","req","respStream","stream","respBody","assertion","updateStep","step","stack","writeScope","forEachParent","chain","unshift","id","stringToAttach","Array","isArray","ret","all","forEach","h","key","stringify","val"],"sources":["../../src/index.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/unbound-method */\nimport type { EventEmitter } from \"events\";\n\nimport { ContentType, Stage, Status } from \"allure-js-commons\";\nimport type { ReporterConfig } from \"allure-js-commons/sdk/reporter\";\nimport {\n ReporterRuntime,\n createDefaultWriter,\n getEnvironmentLabels,\n getFrameworkLabel,\n getHostLabel,\n getLanguageLabel,\n getSuiteLabels,\n getThreadLabel,\n} from \"allure-js-commons/sdk/reporter\";\nimport type { ConsoleEvent, Cursor, NewmanRunExecutionAssertion } from \"newman\";\nimport type { CollectionDefinition, Event, HeaderList, Item, Request, Response } from \"postman-collection\";\n\nimport type { PmItem, RunningItem } from \"./model.js\";\nimport { extractMeta } from \"./utils.js\";\n\nclass AllureReporter {\n allureRuntime: ReporterRuntime;\n allureConfig: ReporterConfig;\n runningItems: RunningItem[] = [];\n currentCollection: CollectionDefinition;\n pmItemsByAllureUuid: Map<string, PmItem> = new Map();\n currentTest?: string;\n currentScope?: string;\n rootCollectionName?: string;\n\n constructor(\n emitter: EventEmitter,\n reporterConfig: ReporterConfig,\n options: {\n collection: CollectionDefinition;\n },\n ) {\n const { resultsDir, ...restConfig } = reporterConfig;\n\n this.currentCollection = options.collection;\n this.rootCollectionName = options.collection.name;\n this.allureConfig = reporterConfig;\n this.allureRuntime = new ReporterRuntime({\n ...restConfig,\n writer: createDefaultWriter({ resultsDir, emitter }),\n });\n this.registerEvents(emitter);\n }\n\n registerEvents(emitter: EventEmitter) {\n emitter.on(\"start\", this.onStart.bind(this));\n emitter.on(\"beforeItem\", this.onBeforeItem.bind(this));\n emitter.on(\"item\", this.onItem.bind(this));\n emitter.on(\"prerequest\", this.onPrerequest.bind(this));\n emitter.on(\"request\", this.onRequest.bind(this));\n emitter.on(\"test\", this.onTest.bind(this));\n emitter.on(\"assertion\", this.onAssertion.bind(this));\n emitter.on(\"console\", this.onConsole.bind(this));\n emitter.on(\"done\", this.onDone.bind(this));\n }\n\n onStart() {\n this.currentScope = this.allureRuntime.startScope();\n }\n\n onPrerequest(\n err: any,\n args: {\n executions: Event[];\n },\n ) {\n if (!this.currentTest) {\n return;\n }\n\n const currentPmItem = this.pmItemsByAllureUuid.get(this.currentTest);\n\n if (!currentPmItem) {\n return;\n }\n\n currentPmItem.prerequest = args.executions[0]?.script?.exec?.join(\"\\n\");\n }\n\n onBeforeItem(err: any, args: { item: Item; cursor: Cursor }) {\n const pmItem: PmItem = {\n name: args.item.name,\n passed: true,\n failedAssertions: [],\n consoleLogs: [],\n };\n const itemGroup = args.item.parent();\n const item = args.item;\n const fullName = this.#getFullName(item);\n const testPath = this.#pathToItem(item);\n const hostLabel = getHostLabel();\n const threadLabel = getThreadLabel();\n const { labels, links } = extractMeta(args.item.events);\n\n this.currentTest = this.allureRuntime.startTest({\n name: args.item.name,\n fullName,\n titlePath: testPath,\n stage: Stage.RUNNING,\n labels: [\n getLanguageLabel(),\n getFrameworkLabel(\"newman\"),\n hostLabel,\n threadLabel,\n ...labels,\n ...getEnvironmentLabels(),\n ],\n links,\n });\n\n this.allureRuntime.updateTest(this.currentTest, (test) => {\n test.labels.push(...getSuiteLabels(testPath));\n });\n\n this.pmItemsByAllureUuid.set(this.currentTest, pmItem);\n\n if (itemGroup && this.currentCollection !== itemGroup) {\n this.currentCollection = itemGroup;\n }\n }\n\n onItem(\n err: any,\n args: {\n item: Item;\n },\n ) {\n if (!this.currentTest) {\n return;\n }\n\n const currentPmItem = this.pmItemsByAllureUuid.get(this.currentTest);\n\n if (!currentPmItem) {\n return;\n }\n\n const requestData = currentPmItem.requestData;\n const requestDataURL = requestData && `${requestData.method} - ${requestData.url}`;\n const rawDescription = args.item.request.description;\n const testDescription = (typeof rawDescription === \"string\" ? rawDescription : rawDescription?.content) || \"\";\n const response = currentPmItem.responseData;\n const failedAssertions = currentPmItem.failedAssertions;\n const requestError = currentPmItem.requestError;\n\n if (currentPmItem.prerequest) {\n this.#attachString(\"PreRequest\", currentPmItem.prerequest);\n }\n\n if (currentPmItem.testScript) {\n this.#attachString(\"TestScript\", currentPmItem.testScript);\n }\n\n if (currentPmItem.consoleLogs.length) {\n this.#attachString(\"ConsoleLogs\", currentPmItem.consoleLogs);\n }\n\n if (requestData?.headers && requestData?.headers?.count() > 0) {\n this.allureRuntime.writeAttachment(\n this.currentTest,\n undefined,\n \"Request Headers\",\n this.#headerListToJsonBuffer(requestData.headers),\n {\n contentType: ContentType.JSON,\n },\n );\n }\n\n if (requestData?.body?.mode === \"raw\" && requestData.body.raw) {\n this.#attachString(\"Request Body\", requestData.body.raw);\n }\n\n if (response?.headers && response?.headers?.count() > 0) {\n this.allureRuntime.writeAttachment(\n this.currentTest,\n undefined,\n \"Response Headers\",\n this.#headerListToJsonBuffer(response.headers),\n {\n contentType: ContentType.JSON,\n },\n );\n }\n\n if (response?.body) {\n this.allureRuntime.writeAttachment(\n this.currentTest,\n undefined,\n \"Response Body\",\n Buffer.from(response.body, \"utf-8\"),\n {\n contentType: ContentType.TEXT,\n },\n );\n }\n\n this.allureRuntime.updateTest(this.currentTest, (test) => {\n if (requestDataURL) {\n test.parameters.push({\n name: \"Request\",\n value: requestDataURL,\n });\n }\n\n if (response?.code) {\n test.parameters.push({\n name: \"Response Code\",\n value: response?.code.toString(),\n excluded: true,\n });\n }\n\n if (testDescription) {\n const descriptionHtml = testDescription.replace(/[*]/g, \"\").replace(/\\n/g, \"<br>\");\n\n test.description = testDescription;\n test.descriptionHtml = descriptionHtml;\n }\n });\n\n if (response && failedAssertions?.length) {\n const details = this.#escape(`Response code: ${response.code}, status: ${response.status}`);\n\n this.allureRuntime.updateTest(this.currentTest, (test) => {\n test.status = Status.FAILED;\n test.stage = Stage.FINISHED;\n test.statusDetails = {\n message: this.#escape(failedAssertions.join(\", \")),\n trace: details,\n };\n });\n } else if (requestError) {\n const errorMsg = this.#escape(requestError);\n\n this.allureRuntime.updateTest(this.currentTest, (test) => {\n test.status = Status.BROKEN;\n test.stage = Stage.FINISHED;\n test.statusDetails = {\n message: errorMsg,\n };\n });\n } else {\n this.allureRuntime.updateTest(this.currentTest, (test) => {\n test.status = Status.PASSED;\n test.stage = Stage.FINISHED;\n });\n }\n\n this.allureRuntime.stopTest(this.currentTest);\n this.allureRuntime.writeTest(this.currentTest);\n }\n\n onTest(err: any, args: { executions: Event[] }) {\n if (!this.currentTest) {\n return;\n }\n\n const currentPmItem = this.pmItemsByAllureUuid.get(this.currentTest);\n\n if (!currentPmItem) {\n return;\n }\n\n const execScript = args.executions[0]?.script?.exec?.join(\"\\n\");\n\n if (!execScript) {\n return;\n }\n\n currentPmItem.testScript = execScript;\n\n // not typed postman-collection error property ?\n const testArgs: any = args.executions[0];\n\n if (!testArgs.error) {\n return;\n }\n\n const errName: string = testArgs.error.name;\n const errMsg: string = testArgs.error.message;\n\n const stepUuid = this.allureRuntime.startStep(this.currentTest, undefined, {\n name: errName,\n status: Status.FAILED,\n stage: Stage.FINISHED,\n statusDetails: {\n message: errMsg,\n },\n });\n\n if (!stepUuid) {\n // no such test running, ignore reporting\n return;\n }\n\n currentPmItem.failedAssertions.push(errName);\n\n this.allureRuntime.stopStep(stepUuid);\n }\n\n onConsole(err: any, args: ConsoleEvent) {\n if (!this.currentTest) {\n return;\n }\n\n const currentPmItem = this.pmItemsByAllureUuid.get(this.currentTest);\n\n if (!currentPmItem || err) {\n return;\n }\n\n if (args.level) {\n currentPmItem.consoleLogs.push(`level: ${args.level}, messages: ${args.messages.toString()}`);\n }\n }\n\n onRequest(\n err: any,\n args: {\n request: Request;\n response: Response;\n },\n ) {\n if (!this.currentTest) {\n return;\n }\n\n const currentPmItem = this.pmItemsByAllureUuid.get(this.currentTest);\n\n if (!currentPmItem) {\n return;\n }\n\n const req = args.request;\n const url = req.url.toString(true);\n\n currentPmItem.requestData = {\n url: url,\n method: req.method,\n body: req.body,\n headers: req.headers,\n };\n\n if (err) {\n currentPmItem.passed = false;\n currentPmItem.requestError = err.message;\n }\n\n if (!args.response) {\n return;\n }\n\n const respStream = args?.response?.stream;\n const respBody = respStream ? Buffer.from(respStream).toString() : \"\";\n\n currentPmItem.responseData = {\n status: args.response.status,\n code: args.response.code,\n body: respBody,\n headers: args.response.headers,\n };\n }\n\n onAssertion(err: any, args: NewmanRunExecutionAssertion) {\n if (!this.currentTest) {\n return;\n }\n\n const currentPmItem = this.pmItemsByAllureUuid.get(this.currentTest);\n\n if (!currentPmItem) {\n return;\n }\n\n const stepUuid = this.allureRuntime.startStep(this.currentTest, undefined, {\n name: args.assertion,\n });\n if (!stepUuid) {\n // no such test running, ignore reporting\n return;\n }\n\n this.allureRuntime.updateStep(stepUuid, (step) => {\n if (err && currentPmItem) {\n currentPmItem.passed = false;\n currentPmItem.failedAssertions.push(args.assertion);\n\n step.statusDetails = {\n message: err.message,\n trace: err.stack,\n };\n step.status = Status.FAILED;\n } else {\n step.status = Status.PASSED;\n }\n\n step.stage = Stage.FINISHED;\n });\n\n this.allureRuntime.stopStep(stepUuid);\n }\n\n onDone() {\n if (this.currentScope) {\n this.allureRuntime.writeScope(this.currentScope);\n this.currentScope = undefined;\n }\n }\n\n #pathToItem(item: Item): string[] {\n if (!item || !(typeof item.parent === \"function\") || !(typeof item.forEachParent === \"function\")) {\n return [];\n }\n\n const chain: string[] = [];\n\n item.forEachParent((parent) => {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n chain.unshift(parent.name || parent.id);\n });\n\n if (this.rootCollectionName) {\n chain.unshift(this.rootCollectionName);\n }\n return chain;\n }\n\n #getFullName(item: Item): string {\n const chain = this.#pathToItem(item);\n\n return `${chain.join(\"/\")}#${item.name}`;\n }\n\n #attachString(name: string, value: string | string[]) {\n const stringToAttach = Array.isArray(value) ? value.join(\"\\n\") : value;\n\n if (!stringToAttach) {\n return;\n }\n\n const content = Buffer.from(stringToAttach, \"utf-8\");\n\n this.allureRuntime.writeAttachment(this.currentTest!, undefined, name, content, {\n contentType: ContentType.TEXT,\n });\n }\n\n #headerListToJsonBuffer(headers: HeaderList) {\n const ret: { [k: string]: any } = {};\n\n headers.all().forEach((h) => {\n ret[h.key] = h.value;\n });\n\n return Buffer.from(JSON.stringify(ret, null, 4), \"utf-8\");\n }\n\n #escape(val: string) {\n return val.replace(\"\\n\", \"\").replace(\"\\r\", \"\").replace('\"', '\"');\n }\n}\n\nexport default AllureReporter;\n"],"mappings":";;;;;;;;;;;AAAA;;AAGA,SAASA,WAAW,EAAEC,KAAK,EAAEC,MAAM,QAAQ,mBAAmB;AAE9D,SACEC,eAAe,EACfC,mBAAmB,EACnBC,oBAAoB,EACpBC,iBAAiB,EACjBC,YAAY,EACZC,gBAAgB,EAChBC,cAAc,EACdC,cAAc,QACT,gCAAgC;AAKvC,SAASC,WAAW,QAAQ,YAAY;AAAC,IAAAC,qBAAA,oBAAAC,OAAA;AAEzC,MAAMC,cAAc,CAAC;EAUnBC,WAAWA,CACTC,OAAqB,EACrBC,cAA8B,EAC9BC,OAEC,EACD;IAAAC,2BAAA,OAAAP,qBAAA;IAAAQ,eAAA;IAAAA,eAAA;IAAAA,eAAA,uBAb4B,EAAE;IAAAA,eAAA;IAAAA,eAAA,8BAEW,IAAIC,GAAG,CAAC,CAAC;IAAAD,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAYlD,IAAM;QAAEE;MAA0B,CAAC,GAAGL,cAAc;MAA7BM,UAAU,GAAAC,wBAAA,CAAKP,cAAc,EAAAQ,SAAA;IAEpD,IAAI,CAACC,iBAAiB,GAAGR,OAAO,CAACS,UAAU;IAC3C,IAAI,CAACC,kBAAkB,GAAGV,OAAO,CAACS,UAAU,CAACE,IAAI;IACjD,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.js","names":["ContentType","Stage","Status","ReporterRuntime","createDefaultWriter","getEnvironmentLabels","getFallbackTestCaseIdLabel","getFrameworkLabel","getHostLabel","getLanguageLabel","getProjectName","getSuiteLabels","getThreadLabel","md5","extractMeta","_AllureReporter_brand","WeakSet","AllureReporter","constructor","emitter","reporterConfig","options","_classPrivateMethodInitSpec","_defineProperty","Map","resultsDir","restConfig","_objectWithoutProperties","_excluded","currentCollection","collection","rootCollectionName","name","allureConfig","allureRuntime","_objectSpread","writer","registerEvents","on","onStart","bind","onBeforeItem","onItem","onPrerequest","onRequest","onTest","onAssertion","onConsole","onDone","currentScope","startScope","err","args","_args$executions$","currentTest","currentPmItem","pmItemsByAllureUuid","get","prerequest","executions","script","exec","join","pmItem","item","passed","failedAssertions","consoleLogs","itemGroup","parent","fullName","_assertClassBrand","_getFullName","call","testPath","_pathToItem","projectName","titlePath","hostLabel","threadLabel","labels","links","events","legacyFullName","concat","startTest","stage","RUNNING","updateTest","test","push","set","_requestData$headers","_requestData$body","_response$headers","requestData","requestDataURL","method","url","rawDescription","request","description","testDescription","content","response","responseData","requestError","_attachString","testScript","length","headers","count","writeAttachment","undefined","_headerListToJsonBuffer","contentType","JSON","body","mode","raw","Buffer","from","TEXT","parameters","value","code","toString","excluded","descriptionHtml","replace","details","_escape","status","FAILED","FINISHED","statusDetails","message","trace","errorMsg","BROKEN","PASSED","stopTest","writeTest","_args$executions$2","execScript","testArgs","error","errName","errMsg","stepUuid","startStep","stopStep","level","messages","_args$response","req","respStream","stream","respBody","assertion","updateStep","step","stack","writeScope","forEachParent","chain","unshift","id","fullNameBase","stringToAttach","Array","isArray","ret","all","forEach","h","key","stringify","val"],"sources":["../../src/index.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/unbound-method */\nimport type { EventEmitter } from \"events\";\n\nimport { ContentType, Stage, Status } from \"allure-js-commons\";\nimport type { ReporterConfig } from \"allure-js-commons/sdk/reporter\";\nimport {\n ReporterRuntime,\n createDefaultWriter,\n getEnvironmentLabels,\n getFallbackTestCaseIdLabel,\n getFrameworkLabel,\n getHostLabel,\n getLanguageLabel,\n getProjectName,\n getSuiteLabels,\n getThreadLabel,\n md5,\n} from \"allure-js-commons/sdk/reporter\";\nimport type { ConsoleEvent, Cursor, NewmanRunExecutionAssertion } from \"newman\";\nimport type { CollectionDefinition, Event, HeaderList, Item, Request, Response } from \"postman-collection\";\n\nimport type { PmItem, RunningItem } from \"./model.js\";\nimport { extractMeta } from \"./utils.js\";\n\nclass AllureReporter {\n allureRuntime: ReporterRuntime;\n allureConfig: ReporterConfig;\n runningItems: RunningItem[] = [];\n currentCollection: CollectionDefinition;\n pmItemsByAllureUuid: Map<string, PmItem> = new Map();\n currentTest?: string;\n currentScope?: string;\n rootCollectionName?: string;\n\n constructor(\n emitter: EventEmitter,\n reporterConfig: ReporterConfig,\n options: {\n collection: CollectionDefinition;\n },\n ) {\n const { resultsDir, ...restConfig } = reporterConfig;\n\n this.currentCollection = options.collection;\n this.rootCollectionName = options.collection.name;\n this.allureConfig = reporterConfig;\n this.allureRuntime = new ReporterRuntime({\n ...restConfig,\n writer: createDefaultWriter({ resultsDir, emitter }),\n });\n this.registerEvents(emitter);\n }\n\n registerEvents(emitter: EventEmitter) {\n emitter.on(\"start\", this.onStart.bind(this));\n emitter.on(\"beforeItem\", this.onBeforeItem.bind(this));\n emitter.on(\"item\", this.onItem.bind(this));\n emitter.on(\"prerequest\", this.onPrerequest.bind(this));\n emitter.on(\"request\", this.onRequest.bind(this));\n emitter.on(\"test\", this.onTest.bind(this));\n emitter.on(\"assertion\", this.onAssertion.bind(this));\n emitter.on(\"console\", this.onConsole.bind(this));\n emitter.on(\"done\", this.onDone.bind(this));\n }\n\n onStart() {\n this.currentScope = this.allureRuntime.startScope();\n }\n\n onPrerequest(\n err: any,\n args: {\n executions: Event[];\n },\n ) {\n if (!this.currentTest) {\n return;\n }\n\n const currentPmItem = this.pmItemsByAllureUuid.get(this.currentTest);\n\n if (!currentPmItem) {\n return;\n }\n\n currentPmItem.prerequest = args.executions[0]?.script?.exec?.join(\"\\n\");\n }\n\n onBeforeItem(err: any, args: { item: Item; cursor: Cursor }) {\n const pmItem: PmItem = {\n name: args.item.name,\n passed: true,\n failedAssertions: [],\n consoleLogs: [],\n };\n const itemGroup = args.item.parent();\n const item = args.item;\n const fullName = this.#getFullName(item);\n const testPath = this.#pathToItem(item);\n const projectName = getProjectName();\n const titlePath = projectName ? [projectName, ...testPath] : testPath;\n const hostLabel = getHostLabel();\n const threadLabel = getThreadLabel();\n const { labels, links } = extractMeta(args.item.events);\n const legacyFullName = `${testPath.join(\"/\")}#${item.name}`;\n\n this.currentTest = this.allureRuntime.startTest({\n name: args.item.name,\n fullName,\n titlePath,\n stage: Stage.RUNNING,\n labels: [\n getLanguageLabel(),\n getFrameworkLabel(\"newman\"),\n hostLabel,\n threadLabel,\n getFallbackTestCaseIdLabel(md5(legacyFullName)),\n ...labels,\n ...getEnvironmentLabels(),\n ],\n links,\n });\n\n this.allureRuntime.updateTest(this.currentTest, (test) => {\n test.labels.push(...getSuiteLabels(testPath));\n });\n\n this.pmItemsByAllureUuid.set(this.currentTest, pmItem);\n\n if (itemGroup && this.currentCollection !== itemGroup) {\n this.currentCollection = itemGroup;\n }\n }\n\n onItem(\n err: any,\n args: {\n item: Item;\n },\n ) {\n if (!this.currentTest) {\n return;\n }\n\n const currentPmItem = this.pmItemsByAllureUuid.get(this.currentTest);\n\n if (!currentPmItem) {\n return;\n }\n\n const requestData = currentPmItem.requestData;\n const requestDataURL = requestData && `${requestData.method} - ${requestData.url}`;\n const rawDescription = args.item.request.description;\n const testDescription = (typeof rawDescription === \"string\" ? rawDescription : rawDescription?.content) || \"\";\n const response = currentPmItem.responseData;\n const failedAssertions = currentPmItem.failedAssertions;\n const requestError = currentPmItem.requestError;\n\n if (currentPmItem.prerequest) {\n this.#attachString(\"PreRequest\", currentPmItem.prerequest);\n }\n\n if (currentPmItem.testScript) {\n this.#attachString(\"TestScript\", currentPmItem.testScript);\n }\n\n if (currentPmItem.consoleLogs.length) {\n this.#attachString(\"ConsoleLogs\", currentPmItem.consoleLogs);\n }\n\n if (requestData?.headers && requestData?.headers?.count() > 0) {\n this.allureRuntime.writeAttachment(\n this.currentTest,\n undefined,\n \"Request Headers\",\n this.#headerListToJsonBuffer(requestData.headers),\n {\n contentType: ContentType.JSON,\n },\n );\n }\n\n if (requestData?.body?.mode === \"raw\" && requestData.body.raw) {\n this.#attachString(\"Request Body\", requestData.body.raw);\n }\n\n if (response?.headers && response?.headers?.count() > 0) {\n this.allureRuntime.writeAttachment(\n this.currentTest,\n undefined,\n \"Response Headers\",\n this.#headerListToJsonBuffer(response.headers),\n {\n contentType: ContentType.JSON,\n },\n );\n }\n\n if (response?.body) {\n this.allureRuntime.writeAttachment(\n this.currentTest,\n undefined,\n \"Response Body\",\n Buffer.from(response.body, \"utf-8\"),\n {\n contentType: ContentType.TEXT,\n },\n );\n }\n\n this.allureRuntime.updateTest(this.currentTest, (test) => {\n if (requestDataURL) {\n test.parameters.push({\n name: \"Request\",\n value: requestDataURL,\n });\n }\n\n if (response?.code) {\n test.parameters.push({\n name: \"Response Code\",\n value: response?.code.toString(),\n excluded: true,\n });\n }\n\n if (testDescription) {\n const descriptionHtml = testDescription.replace(/[*]/g, \"\").replace(/\\n/g, \"<br>\");\n\n test.description = testDescription;\n test.descriptionHtml = descriptionHtml;\n }\n });\n\n if (response && failedAssertions?.length) {\n const details = this.#escape(`Response code: ${response.code}, status: ${response.status}`);\n\n this.allureRuntime.updateTest(this.currentTest, (test) => {\n test.status = Status.FAILED;\n test.stage = Stage.FINISHED;\n test.statusDetails = {\n message: this.#escape(failedAssertions.join(\", \")),\n trace: details,\n };\n });\n } else if (requestError) {\n const errorMsg = this.#escape(requestError);\n\n this.allureRuntime.updateTest(this.currentTest, (test) => {\n test.status = Status.BROKEN;\n test.stage = Stage.FINISHED;\n test.statusDetails = {\n message: errorMsg,\n };\n });\n } else {\n this.allureRuntime.updateTest(this.currentTest, (test) => {\n test.status = Status.PASSED;\n test.stage = Stage.FINISHED;\n });\n }\n\n this.allureRuntime.stopTest(this.currentTest);\n this.allureRuntime.writeTest(this.currentTest);\n }\n\n onTest(err: any, args: { executions: Event[] }) {\n if (!this.currentTest) {\n return;\n }\n\n const currentPmItem = this.pmItemsByAllureUuid.get(this.currentTest);\n\n if (!currentPmItem) {\n return;\n }\n\n const execScript = args.executions[0]?.script?.exec?.join(\"\\n\");\n\n if (!execScript) {\n return;\n }\n\n currentPmItem.testScript = execScript;\n\n // not typed postman-collection error property ?\n const testArgs: any = args.executions[0];\n\n if (!testArgs.error) {\n return;\n }\n\n const errName: string = testArgs.error.name;\n const errMsg: string = testArgs.error.message;\n\n const stepUuid = this.allureRuntime.startStep(this.currentTest, undefined, {\n name: errName,\n status: Status.FAILED,\n stage: Stage.FINISHED,\n statusDetails: {\n message: errMsg,\n },\n });\n\n if (!stepUuid) {\n // no such test running, ignore reporting\n return;\n }\n\n currentPmItem.failedAssertions.push(errName);\n\n this.allureRuntime.stopStep(stepUuid);\n }\n\n onConsole(err: any, args: ConsoleEvent) {\n if (!this.currentTest) {\n return;\n }\n\n const currentPmItem = this.pmItemsByAllureUuid.get(this.currentTest);\n\n if (!currentPmItem || err) {\n return;\n }\n\n if (args.level) {\n currentPmItem.consoleLogs.push(`level: ${args.level}, messages: ${args.messages.toString()}`);\n }\n }\n\n onRequest(\n err: any,\n args: {\n request: Request;\n response: Response;\n },\n ) {\n if (!this.currentTest) {\n return;\n }\n\n const currentPmItem = this.pmItemsByAllureUuid.get(this.currentTest);\n\n if (!currentPmItem) {\n return;\n }\n\n const req = args.request;\n const url = req.url.toString(true);\n\n currentPmItem.requestData = {\n url: url,\n method: req.method,\n body: req.body,\n headers: req.headers,\n };\n\n if (err) {\n currentPmItem.passed = false;\n currentPmItem.requestError = err.message;\n }\n\n if (!args.response) {\n return;\n }\n\n const respStream = args?.response?.stream;\n const respBody = respStream ? Buffer.from(respStream).toString() : \"\";\n\n currentPmItem.responseData = {\n status: args.response.status,\n code: args.response.code,\n body: respBody,\n headers: args.response.headers,\n };\n }\n\n onAssertion(err: any, args: NewmanRunExecutionAssertion) {\n if (!this.currentTest) {\n return;\n }\n\n const currentPmItem = this.pmItemsByAllureUuid.get(this.currentTest);\n\n if (!currentPmItem) {\n return;\n }\n\n const stepUuid = this.allureRuntime.startStep(this.currentTest, undefined, {\n name: args.assertion,\n });\n if (!stepUuid) {\n // no such test running, ignore reporting\n return;\n }\n\n this.allureRuntime.updateStep(stepUuid, (step) => {\n if (err && currentPmItem) {\n currentPmItem.passed = false;\n currentPmItem.failedAssertions.push(args.assertion);\n\n step.statusDetails = {\n message: err.message,\n trace: err.stack,\n };\n step.status = Status.FAILED;\n } else {\n step.status = Status.PASSED;\n }\n\n step.stage = Stage.FINISHED;\n });\n\n this.allureRuntime.stopStep(stepUuid);\n }\n\n onDone() {\n if (this.currentScope) {\n this.allureRuntime.writeScope(this.currentScope);\n this.currentScope = undefined;\n }\n }\n\n #pathToItem(item: Item): string[] {\n if (!item || !(typeof item.parent === \"function\") || !(typeof item.forEachParent === \"function\")) {\n return [];\n }\n\n const chain: string[] = [];\n\n item.forEachParent((parent) => {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n chain.unshift(parent.name || parent.id);\n });\n\n if (this.rootCollectionName) {\n chain.unshift(this.rootCollectionName);\n }\n return chain;\n }\n\n #getFullName(item: Item): string {\n const chain = this.#pathToItem(item);\n const projectName = getProjectName();\n const fullNameBase = projectName ? `${projectName}:${chain.join(\"/\")}` : chain.join(\"/\");\n\n return `${fullNameBase}#${item.name}`;\n }\n\n #attachString(name: string, value: string | string[]) {\n const stringToAttach = Array.isArray(value) ? value.join(\"\\n\") : value;\n\n if (!stringToAttach) {\n return;\n }\n\n const content = Buffer.from(stringToAttach, \"utf-8\");\n\n this.allureRuntime.writeAttachment(this.currentTest!, undefined, name, content, {\n contentType: ContentType.TEXT,\n });\n }\n\n #headerListToJsonBuffer(headers: HeaderList) {\n const ret: { [k: string]: any } = {};\n\n headers.all().forEach((h) => {\n ret[h.key] = h.value;\n });\n\n return Buffer.from(JSON.stringify(ret, null, 4), \"utf-8\");\n }\n\n #escape(val: string) {\n return val.replace(\"\\n\", \"\").replace(\"\\r\", \"\").replace('\"', '\"');\n }\n}\n\nexport default AllureReporter;\n"],"mappings":";;;;;;;;;;;AAAA;;AAGA,SAASA,WAAW,EAAEC,KAAK,EAAEC,MAAM,QAAQ,mBAAmB;AAE9D,SACEC,eAAe,EACfC,mBAAmB,EACnBC,oBAAoB,EACpBC,0BAA0B,EAC1BC,iBAAiB,EACjBC,YAAY,EACZC,gBAAgB,EAChBC,cAAc,EACdC,cAAc,EACdC,cAAc,EACdC,GAAG,QACE,gCAAgC;AAKvC,SAASC,WAAW,QAAQ,YAAY;AAAC,IAAAC,qBAAA,oBAAAC,OAAA;AAEzC,MAAMC,cAAc,CAAC;EAUnBC,WAAWA,CACTC,OAAqB,EACrBC,cAA8B,EAC9BC,OAEC,EACD;IAAAC,2BAAA,OAAAP,qBAAA;IAAAQ,eAAA;IAAAA,eAAA;IAAAA,eAAA,uBAb4B,EAAE;IAAAA,eAAA;IAAAA,eAAA,8BAEW,IAAIC,GAAG,CAAC,CAAC;IAAAD,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAYlD,IAAM;QAAEE;MAA0B,CAAC,GAAGL,cAAc;MAA7BM,UAAU,GAAAC,wBAAA,CAAKP,cAAc,EAAAQ,SAAA;IAEpD,IAAI,CAACC,iBAAiB,GAAGR,OAAO,CAACS,UAAU;IAC3C,IAAI,CAACC,kBAAkB,GAAGV,OAAO,CAACS,UAAU,CAACE,IAAI;IACjD,IAAI,CAACC,YAAY,GAAGb,cAAc;IAClC,IAAI,CAACc,aAAa,GAAG,IAAI/B,eAAe,CAAAgC,aAAA,CAAAA,aAAA,KACnCT,UAAU;MACbU,MAAM,EAAEhC,mBAAmB,CAAC;QAAEqB,UAAU;QAAEN;MAAQ,CAAC;IAAC,EACrD,CAAC;IACF,I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AAO,CAAC;AAC3D;AAAC,SAAAzC,QAEO+C,GAAW,EAAE;EACnB,OAAOA,GAAG,CAACjD,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAACA,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAACA,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC;AAClE;AAGF,eAAehH,cAAc","ignoreList":[]}
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import type { EventEmitter } from "events";
3
2
  import type { ReporterConfig } from "allure-js-commons/sdk/reporter";
4
3
  import { ReporterRuntime } from "allure-js-commons/sdk/reporter";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "newman-reporter-allure",
3
- "version": "3.7.2",
3
+ "version": "3.9.0",
4
4
  "description": "Allure Newman integration",
5
5
  "keywords": [
6
6
  "allure",
@@ -53,7 +53,7 @@
53
53
  "test": "ALLURE_TEST_MODE=1 ALLURE_LABEL_A=a ALLURE_LABEL_B=b vitest run"
54
54
  },
55
55
  "dependencies": {
56
- "allure-js-commons": "3.7.2"
56
+ "allure-js-commons": "3.9.0"
57
57
  },
58
58
  "devDependencies": {
59
59
  "@babel/cli": "^7.28.0",
@@ -66,14 +66,14 @@
66
66
  "@types/node": "^20.19.0",
67
67
  "@types/postman-collection": "^3.5.10",
68
68
  "allure-commandline": "^2.29.0",
69
- "allure-vitest": "3.7.2",
69
+ "allure-vitest": "3.9.0",
70
70
  "babel-plugin-add-module-exports": "^1.0.4",
71
71
  "msw": "1",
72
72
  "newman": "^6.2.1",
73
73
  "npm-run-all2": "^8.0.0",
74
74
  "postman-collection": "^5.0.0",
75
75
  "rimraf": "^6.0.0",
76
- "typescript": "^5.2.2",
76
+ "typescript": "^6.0.3",
77
77
  "vitest": "^4.0.18"
78
78
  },
79
79
  "peerDependencies": {