newman-reporter-allure 3.5.0 → 3.7.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/README.md CHANGED
@@ -18,6 +18,12 @@ The docs for Allure Newman are available at [https://allurereport.org/docs/newma
18
18
 
19
19
  Also, check out the examples at [github.com/allure-examples](https://github.com/orgs/allure-examples/repositories?q=visibility%3Apublic+archived%3Afalse+topic%3Aexample+topic%3Anewman).
20
20
 
21
+ ## Features
22
+
23
+ - writes standard Allure results from Newman collections
24
+ - supports Allure metadata through request and test annotations
25
+ - works with Allure Report 2 and Allure Report 3
26
+
21
27
  ## Installation
22
28
 
23
29
  Install `newman-reporter-allure` using a package manager of your choice. For example:
@@ -26,6 +32,17 @@ Install `newman-reporter-allure` using a package manager of your choice. For exa
26
32
  npm install -D newman-reporter-allure
27
33
  ```
28
34
 
35
+ Install Allure Report separately when you want to render the generated `allure-results`:
36
+
37
+ - follow the [Allure Report 2 installation guide](https://allurereport.org/docs/install/) to use the `allure` CLI
38
+ - or install Allure Report 3 with `npm install -D allure` to use `npx allure`
39
+
40
+ ## Supported versions and platforms
41
+
42
+ - `newman >= 3.5.0`
43
+ - Linux, macOS, and Windows wherever Newman supports Node.js
44
+ - this repository is validated in CI on Node.js 20 and 22
45
+
29
46
  ## Usage
30
47
 
31
48
  Enable the `allure` reporter via the CLI:
@@ -46,18 +63,18 @@ You may select another location, or further customize the reporter's behavior wi
46
63
 
47
64
  ### View the report
48
65
 
49
- > You need Allure Report to be installed on your machine to generate and open the report from the result files. See the [installation instructions](https://allurereport.org/docs/install/) on how to get it.
50
-
51
- Generate Allure Report after the tests are executed:
66
+ Use Allure Report 2:
52
67
 
53
68
  ```bash
54
69
  allure generate ./allure-results -o ./allure-report
70
+ allure open ./allure-report
55
71
  ```
56
72
 
57
- Open the generated report:
73
+ Or use Allure Report 3:
58
74
 
59
75
  ```bash
60
- allure open ./allure-report
76
+ npx allure generate ./allure-results
77
+ npx allure open ./allure-report
61
78
  ```
62
79
 
63
80
  ## Allure API
@@ -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\";\nimport type { ConsoleEvent, Cursor, NewmanRunExecutionAssertion } from \"newman\";\nimport type { CollectionDefinition, Event, HeaderList, Item, Request, Response } from \"postman-collection\";\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 { 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":";;;;;;AAIA,IAAAA,gBAAA,GAAAC,OAAA;AAEA,IAAAC,SAAA,GAAAD,OAAA;AAWA,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,MAAA,CAAAc,yBAAA,CAAAf,CAAA,KAAAH,OAAA,CAAAI,MAAA,C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E;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","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,C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G,CAACE,CAAC,CAACC,GAAG,CAAC,GAAGD,CAAC,CAACvK,KAAK;EACtB,CAAC,CAAC;EAEF,OAAOkH,MAAM,CAACC,IAAI,CAACL,IAAI,CAAC2D,SAAS,CAACJ,GAAG,EAAE,IAAI,EAAE,CAAC,CAAC,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 +1 @@
1
- {"version":3,"file":"utils.js","names":["_sdk","require","extractMeta","eventList","labels","links","each","event","listen","script","exec","forEach","line","isCommentLine","trim","startsWith","trimmedCommentValue","replace","metadata","extractMetadataFromString","push","exports"],"sources":["../../src/utils.ts"],"sourcesContent":["import type { EventList } from \"postman-collection\";\nimport type { Label, Link } from \"allure-js-commons\";\nimport { extractMetadataFromString } from \"allure-js-commons/sdk\";\n\nexport const extractMeta = (eventList: EventList) => {\n const labels: Label[] = [];\n const links: Link[] = [];\n\n eventList.each((event) => {\n if (event.listen === \"test\" && event.script.exec) {\n event.script.exec.forEach((line) => {\n const isCommentLine = line.trim().startsWith(\"//\");\n if (!isCommentLine) {\n return;\n }\n const trimmedCommentValue = line.trim().replace(\"//\", \"\").trim();\n const metadata = extractMetadataFromString(trimmedCommentValue);\n\n labels.push(...metadata.labels);\n links.push(...metadata.links);\n });\n }\n });\n\n return { labels, links };\n};\n"],"mappings":";;;;;;AAEA,IAAAA,IAAA,GAAAC,OAAA;AAEO,IAAMC,WAAW,GAAIC,SAAoB,IAAK;EACnD,IAAMC,MAAe,GAAG,EAAE;EAC1B,IAAMC,KAAa,GAAG,EAAE;EAExBF,SAAS,CAACG,IAAI,CAAEC,KAAK,IAAK;IACxB,IAAIA,KAAK,CAACC,MAAM,KAAK,MAAM,IAAID,KAAK,CAACE,MAAM,CAACC,IAAI,EAAE;MAChDH,KAAK,CAACE,MAAM,CAACC,IAAI,CAACC,OAAO,CAAEC,IAAI,IAAK;QAClC,IAAMC,aAAa,GAAGD,IAAI,CAACE,IAAI,CAAC,CAAC,CAACC,UAAU,CAAC,IAAI,CAAC;QAClD,IAAI,CAACF,aAAa,EAAE;UAClB;QACF;QACA,IAAMG,mBAAmB,GAAGJ,IAAI,CAACE,IAAI,CAAC,CAAC,CAACG,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAACH,IAAI,CAAC,CAAC;QAChE,IAAMI,QAAQ,GAAG,IAAAC,8BAAyB,EAACH,mBAAmB,CAAC;QAE/DZ,MAAM,CAACgB,IAAI,CAAC,GAAGF,QAAQ,CAACd,MAAM,CAAC;QAC/BC,KAAK,CAACe,IAAI,CAAC,GAAGF,QAAQ,CAACb,KAAK,CAAC;MAC/B,CAAC,CAAC;IACJ;EACF,CAAC,CAAC;EAEF,OAAO;IAAED,MAAM;IAAEC;EAAM,CAAC;AAC1B,CAAC;AAACgB,OAAA,CAAAnB,WAAA,GAAAA,WAAA","ignoreList":[]}
1
+ {"version":3,"file":"utils.js","names":["_sdk","require","extractMeta","eventList","labels","links","each","event","listen","script","exec","forEach","line","isCommentLine","trim","startsWith","trimmedCommentValue","replace","metadata","extractMetadataFromString","push","exports"],"sources":["../../src/utils.ts"],"sourcesContent":["import type { Label, Link } from \"allure-js-commons\";\nimport { extractMetadataFromString } from \"allure-js-commons/sdk\";\nimport type { EventList } from \"postman-collection\";\n\nexport const extractMeta = (eventList: EventList) => {\n const labels: Label[] = [];\n const links: Link[] = [];\n\n eventList.each((event) => {\n if (event.listen === \"test\" && event.script.exec) {\n event.script.exec.forEach((line) => {\n const isCommentLine = line.trim().startsWith(\"//\");\n if (!isCommentLine) {\n return;\n }\n const trimmedCommentValue = line.trim().replace(\"//\", \"\").trim();\n const metadata = extractMetadataFromString(trimmedCommentValue);\n\n labels.push(...metadata.labels);\n links.push(...metadata.links);\n });\n }\n });\n\n return { labels, links };\n};\n"],"mappings":";;;;;;AACA,IAAAA,IAAA,GAAAC,OAAA;AAGO,IAAMC,WAAW,GAAIC,SAAoB,IAAK;EACnD,IAAMC,MAAe,GAAG,EAAE;EAC1B,IAAMC,KAAa,GAAG,EAAE;EAExBF,SAAS,CAACG,IAAI,CAAEC,KAAK,IAAK;IACxB,IAAIA,KAAK,CAACC,MAAM,KAAK,MAAM,IAAID,KAAK,CAACE,MAAM,CAACC,IAAI,EAAE;MAChDH,KAAK,CAACE,MAAM,CAACC,IAAI,CAACC,OAAO,CAAEC,IAAI,IAAK;QAClC,IAAMC,aAAa,GAAGD,IAAI,CAACE,IAAI,CAAC,CAAC,CAACC,UAAU,CAAC,IAAI,CAAC;QAClD,IAAI,CAACF,aAAa,EAAE;UAClB;QACF;QACA,IAAMG,mBAAmB,GAAGJ,IAAI,CAACE,IAAI,CAAC,CAAC,CAACG,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAACH,IAAI,CAAC,CAAC;QAChE,IAAMI,QAAQ,GAAG,IAAAC,8BAAyB,EAACH,mBAAmB,CAAC;QAE/DZ,MAAM,CAACgB,IAAI,CAAC,GAAGF,QAAQ,CAACd,MAAM,CAAC;QAC/BC,KAAK,CAACe,IAAI,CAAC,GAAGF,QAAQ,CAACb,KAAK,CAAC;MAC/B,CAAC,CAAC;IACJ;EACF,CAAC,CAAC;EAEF,OAAO;IAAED,MAAM;IAAEC;EAAM,CAAC;AAC1B,CAAC;AAACgB,OAAA,CAAAnB,WAAA,GAAAA,WAAA","ignoreList":[]}
@@ -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\";\nimport type { ConsoleEvent, Cursor, NewmanRunExecutionAssertion } from \"newman\";\nimport type { CollectionDefinition, Event, HeaderList, Item, Request, Response } from \"postman-collection\";\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 { 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;;AAIA,SAASA,WAAW,EAAEC,KAAK,EAAEC,MAAM,QAAQ,mBAAmB;AAE9D,SACEC,eAAe,EACfC,mBAAmB,EACnBC,oBAAoB,EACpBC,iBAAiB,EACjBC,YAAY,EACZC,gBAAgB,EAChBC,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AAAR,wBAEuBJ,OAAmB,EAAE;EAC3C,IAAM6D,GAAyB,GAAG,CAAC,CAAC;EAEpC7D,OAAO,CAAC8D,GAAG,CAAC,CAAC,CAACC,OAAO,CAAEC,CAAC,IAAK;IAC3BH,GAAG,CAACG,CAAC,CAACC,GAAG,CAAC,GAAGD,CAAC,CAAClD,KAAK;EACtB,CAAC,CAAC;EAEF,OAAOJ,MAAM,CAACC,IAAI,CAACL,IAAI,CAAC4D,SAAS,CAACL,GAAG,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,OAAO,CAAC;AAC3D;AAAC,SAAAxC,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;AAGF,eAAe9G,cAAc","ignoreList":[]}
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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AE,GAAG,CAAC;AAClE;AAGF,eAAe9G,cAAc","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","names":["extractMetadataFromString","extractMeta","eventList","labels","links","each","event","listen","script","exec","forEach","line","isCommentLine","trim","startsWith","trimmedCommentValue","replace","metadata","push"],"sources":["../../src/utils.ts"],"sourcesContent":["import type { EventList } from \"postman-collection\";\nimport type { Label, Link } from \"allure-js-commons\";\nimport { extractMetadataFromString } from \"allure-js-commons/sdk\";\n\nexport const extractMeta = (eventList: EventList) => {\n const labels: Label[] = [];\n const links: Link[] = [];\n\n eventList.each((event) => {\n if (event.listen === \"test\" && event.script.exec) {\n event.script.exec.forEach((line) => {\n const isCommentLine = line.trim().startsWith(\"//\");\n if (!isCommentLine) {\n return;\n }\n const trimmedCommentValue = line.trim().replace(\"//\", \"\").trim();\n const metadata = extractMetadataFromString(trimmedCommentValue);\n\n labels.push(...metadata.labels);\n links.push(...metadata.links);\n });\n }\n });\n\n return { labels, links };\n};\n"],"mappings":"AAEA,SAASA,yBAAyB,QAAQ,uBAAuB;AAEjE,OAAO,IAAMC,WAAW,GAAIC,SAAoB,IAAK;EACnD,IAAMC,MAAe,GAAG,EAAE;EAC1B,IAAMC,KAAa,GAAG,EAAE;EAExBF,SAAS,CAACG,IAAI,CAAEC,KAAK,IAAK;IACxB,IAAIA,KAAK,CAACC,MAAM,KAAK,MAAM,IAAID,KAAK,CAACE,MAAM,CAACC,IAAI,EAAE;MAChDH,KAAK,CAACE,MAAM,CAACC,IAAI,CAACC,OAAO,CAAEC,IAAI,IAAK;QAClC,IAAMC,aAAa,GAAGD,IAAI,CAACE,IAAI,CAAC,CAAC,CAACC,UAAU,CAAC,IAAI,CAAC;QAClD,IAAI,CAACF,aAAa,EAAE;UAClB;QACF;QACA,IAAMG,mBAAmB,GAAGJ,IAAI,CAACE,IAAI,CAAC,CAAC,CAACG,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAACH,IAAI,CAAC,CAAC;QAChE,IAAMI,QAAQ,GAAGjB,yBAAyB,CAACe,mBAAmB,CAAC;QAE/DZ,MAAM,CAACe,IAAI,CAAC,GAAGD,QAAQ,CAACd,MAAM,CAAC;QAC/BC,KAAK,CAACc,IAAI,CAAC,GAAGD,QAAQ,CAACb,KAAK,CAAC;MAC/B,CAAC,CAAC;IACJ;EACF,CAAC,CAAC;EAEF,OAAO;IAAED,MAAM;IAAEC;EAAM,CAAC;AAC1B,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"utils.js","names":["extractMetadataFromString","extractMeta","eventList","labels","links","each","event","listen","script","exec","forEach","line","isCommentLine","trim","startsWith","trimmedCommentValue","replace","metadata","push"],"sources":["../../src/utils.ts"],"sourcesContent":["import type { Label, Link } from \"allure-js-commons\";\nimport { extractMetadataFromString } from \"allure-js-commons/sdk\";\nimport type { EventList } from \"postman-collection\";\n\nexport const extractMeta = (eventList: EventList) => {\n const labels: Label[] = [];\n const links: Link[] = [];\n\n eventList.each((event) => {\n if (event.listen === \"test\" && event.script.exec) {\n event.script.exec.forEach((line) => {\n const isCommentLine = line.trim().startsWith(\"//\");\n if (!isCommentLine) {\n return;\n }\n const trimmedCommentValue = line.trim().replace(\"//\", \"\").trim();\n const metadata = extractMetadataFromString(trimmedCommentValue);\n\n labels.push(...metadata.labels);\n links.push(...metadata.links);\n });\n }\n });\n\n return { labels, links };\n};\n"],"mappings":"AACA,SAASA,yBAAyB,QAAQ,uBAAuB;AAGjE,OAAO,IAAMC,WAAW,GAAIC,SAAoB,IAAK;EACnD,IAAMC,MAAe,GAAG,EAAE;EAC1B,IAAMC,KAAa,GAAG,EAAE;EAExBF,SAAS,CAACG,IAAI,CAAEC,KAAK,IAAK;IACxB,IAAIA,KAAK,CAACC,MAAM,KAAK,MAAM,IAAID,KAAK,CAACE,MAAM,CAACC,IAAI,EAAE;MAChDH,KAAK,CAACE,MAAM,CAACC,IAAI,CAACC,OAAO,CAAEC,IAAI,IAAK;QAClC,IAAMC,aAAa,GAAGD,IAAI,CAACE,IAAI,CAAC,CAAC,CAACC,UAAU,CAAC,IAAI,CAAC;QAClD,IAAI,CAACF,aAAa,EAAE;UAClB;QACF;QACA,IAAMG,mBAAmB,GAAGJ,IAAI,CAACE,IAAI,CAAC,CAAC,CAACG,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAACH,IAAI,CAAC,CAAC;QAChE,IAAMI,QAAQ,GAAGjB,yBAAyB,CAACe,mBAAmB,CAAC;QAE/DZ,MAAM,CAACe,IAAI,CAAC,GAAGD,QAAQ,CAACd,MAAM,CAAC;QAC/BC,KAAK,CAACc,IAAI,CAAC,GAAGD,QAAQ,CAACb,KAAK,CAAC;MAC/B,CAAC,CAAC;IACJ;EACF,CAAC,CAAC;EAEF,OAAO;IAAED,MAAM;IAAEC;EAAM,CAAC;AAC1B,CAAC","ignoreList":[]}
@@ -1,9 +1,9 @@
1
1
  /// <reference types="node" />
2
2
  import type { EventEmitter } from "events";
3
- import type { ConsoleEvent, Cursor, NewmanRunExecutionAssertion } from "newman";
4
- import type { CollectionDefinition, Event, Item, Request, Response } from "postman-collection";
5
3
  import type { ReporterConfig } from "allure-js-commons/sdk/reporter";
6
4
  import { ReporterRuntime } from "allure-js-commons/sdk/reporter";
5
+ import type { ConsoleEvent, Cursor, NewmanRunExecutionAssertion } from "newman";
6
+ import type { CollectionDefinition, Event, Item, Request, Response } from "postman-collection";
7
7
  import type { PmItem, RunningItem } from "./model.js";
8
8
  declare class AllureReporter {
9
9
  #private;
@@ -1,5 +1,5 @@
1
- import type { EventList } from "postman-collection";
2
1
  import type { Label, Link } from "allure-js-commons";
2
+ import type { EventList } from "postman-collection";
3
3
  export declare const extractMeta: (eventList: EventList) => {
4
4
  labels: Label[];
5
5
  links: Link[];
package/package.json CHANGED
@@ -1,44 +1,44 @@
1
1
  {
2
2
  "name": "newman-reporter-allure",
3
- "version": "3.5.0",
3
+ "version": "3.7.0",
4
4
  "description": "Allure Newman integration",
5
5
  "keywords": [
6
6
  "allure",
7
- "newman",
8
- "postman",
9
7
  "api",
10
8
  "html",
11
- "test",
9
+ "newman",
10
+ "postman",
12
11
  "report",
13
12
  "reporter",
13
+ "test",
14
14
  "testing",
15
15
  "testops"
16
16
  ],
17
17
  "homepage": "https://allurereport.org/",
18
- "repository": {
19
- "type": "git",
20
- "url": "https://github.com/allure-framework/allure-js.git",
21
- "directory": "packages/newman-reporter-allure"
22
- },
23
18
  "license": "Apache-2.0",
24
19
  "author": {
25
20
  "name": "Qameta Software",
26
21
  "email": "allure@qameta.io",
27
22
  "url": "https://qameta.io/"
28
23
  },
24
+ "repository": {
25
+ "type": "git",
26
+ "url": "https://github.com/allure-framework/allure-js.git",
27
+ "directory": "packages/newman-reporter-allure"
28
+ },
29
+ "files": [
30
+ "dist"
31
+ ],
32
+ "main": "./dist/cjs/index.js",
33
+ "module": "./dist/esm/index.js",
34
+ "types": "./dist/types/index.d.ts",
29
35
  "exports": {
30
36
  ".": {
37
+ "types": "./dist/types/index.d.ts",
31
38
  "import": "./dist/esm/index.js",
32
- "require": "./dist/cjs/index.js",
33
- "types": "./dist/types/index.d.ts"
39
+ "require": "./dist/cjs/index.js"
34
40
  }
35
41
  },
36
- "main": "./dist/cjs/index.js",
37
- "module": "./dist/esm/index.js",
38
- "types": "./dist/types/index.d.ts",
39
- "files": [
40
- "dist"
41
- ],
42
42
  "scripts": {
43
43
  "allure-report": "allure serve ./out/allure-results",
44
44
  "clean": "rimraf ./dist ./out",
@@ -48,44 +48,33 @@
48
48
  "compile:types": "tsc",
49
49
  "compile:fixup": "node ./scripts/fixup.mjs",
50
50
  "generate-report": "allure generate ./out/allure-results -o ./out/allure-report --clean",
51
- "lint": "eslint ./src ./test --ext .ts",
52
- "lint:fix": "eslint ./src ./test --ext .ts --fix",
51
+ "lint": "oxlint --import-plugin src test",
52
+ "lint:fix": "oxlint --import-plugin --fix src test",
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.5.0"
56
+ "allure-js-commons": "3.7.0"
57
57
  },
58
58
  "devDependencies": {
59
59
  "@babel/cli": "^7.28.0",
60
60
  "@babel/core": "^7.28.0",
61
61
  "@babel/preset-env": "^7.28.0",
62
62
  "@babel/preset-typescript": "^7.27.1",
63
- "@stylistic/eslint-plugin": "^2.6.1",
64
63
  "@types/babel__core": "^7.20.5",
65
64
  "@types/babel__preset-env": "^7.10.0",
66
- "@types/eslint": "^8.56.11",
67
65
  "@types/newman": "^5.3.6",
68
- "@types/node": "^20.14.2",
66
+ "@types/node": "^20.19.0",
69
67
  "@types/postman-collection": "^3.5.10",
70
- "@typescript-eslint/eslint-plugin": "^8.0.0",
71
- "@typescript-eslint/parser": "^8.0.0",
72
68
  "allure-commandline": "^2.29.0",
73
- "allure-vitest": "3.5.0",
69
+ "allure-vitest": "3.7.0",
74
70
  "babel-plugin-add-module-exports": "^1.0.4",
75
- "eslint": "^8.57.0",
76
- "eslint-config-prettier": "^10.0.0",
77
- "eslint-plugin-import": "^2.29.1",
78
- "eslint-plugin-jsdoc": "^54.0.0",
79
- "eslint-plugin-n": "^17.10.1",
80
- "eslint-plugin-no-null": "^1.0.2",
81
- "eslint-plugin-prefer-arrow": "^1.2.3",
82
71
  "msw": "1",
83
72
  "newman": "^6.2.1",
84
73
  "npm-run-all2": "^8.0.0",
85
74
  "postman-collection": "^5.0.0",
86
75
  "rimraf": "^6.0.0",
87
76
  "typescript": "^5.2.2",
88
- "vitest": "^4.0.6"
77
+ "vitest": "^4.0.18"
89
78
  },
90
79
  "peerDependencies": {
91
80
  "newman": ">=3.5.0"