allure-cypress 3.0.0-beta.8 → 3.0.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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../src/index.ts", "../../../../.yarn/__virtual__/allure-js-commons-virtual-2327c51af9/1/packages/allure-js-commons/src/model.ts", "../../../../.yarn/__virtual__/allure-js-commons-virtual-2327c51af9/1/packages/allure-js-commons/src/sdk/runtime/NoopTestRuntime.ts", "../../../../.yarn/__virtual__/allure-js-commons-virtual-2327c51af9/1/packages/allure-js-commons/src/sdk/runtime/runtime.ts", "../../../../.yarn/__virtual__/allure-js-commons-virtual-2327c51af9/1/packages/allure-js-commons/src/sdk/utils.ts", "../../../../.yarn/__virtual__/allure-js-commons-virtual-2327c51af9/1/packages/allure-js-commons/src/facade.ts", "../../src/model.ts", "../../src/utils.ts"],
4
- "sourcesContent": ["import type { AttachmentOptions, Label, Link, ParameterMode, ParameterOptions, StatusDetails } from \"allure-js-commons\";\nimport { ContentType, Status } from \"allure-js-commons\";\nimport type { RuntimeMessage, TestPlanV1 } from \"allure-js-commons/sdk\";\nimport { getMessageAndTraceFromError, getUnfinishedStepsMessages, hasStepMessage } from \"allure-js-commons/sdk\";\nimport type { TestRuntime } from \"allure-js-commons/sdk/runtime\";\nimport { getGlobalTestRuntime, setGlobalTestRuntime } from \"allure-js-commons/sdk/runtime\";\nimport type {\n CypressCommand,\n CypressCommandStartMessage,\n CypressHook,\n CypressHookStartMessage,\n CypressMessage,\n CypressTest,\n CypressTestStartMessage,\n} from \"./model.js\";\nimport { ALLURE_REPORT_STEP_COMMAND, ALLURE_REPORT_SYSTEM_HOOK } from \"./model.js\";\nimport {\n getHookType,\n getSuitePath,\n isCommandShouldBeSkipped,\n isGlobalHook,\n isTestPresentInTestPlan,\n toReversed,\n uint8ArrayToBase64,\n} from \"./utils.js\";\n\nexport class AllureCypressTestRuntime implements TestRuntime {\n labels(...labels: Label[]) {\n return this.sendMessageAsync({\n type: \"metadata\",\n data: {\n labels,\n },\n });\n }\n\n links(...links: Link[]) {\n return this.sendMessageAsync({\n type: \"metadata\",\n data: {\n links,\n },\n });\n }\n\n parameter(name: string, value: string, options?: ParameterOptions) {\n return this.sendMessageAsync({\n type: \"metadata\",\n data: {\n parameters: [\n {\n name,\n value,\n ...options,\n },\n ],\n },\n });\n }\n\n description(markdown: string) {\n return this.sendMessageAsync({\n type: \"metadata\",\n data: {\n description: markdown,\n },\n });\n }\n\n descriptionHtml(html: string) {\n return this.sendMessageAsync({\n type: \"metadata\",\n data: {\n descriptionHtml: html,\n },\n });\n }\n\n displayName(name: string) {\n return this.sendMessageAsync({\n type: \"metadata\",\n data: {\n displayName: name,\n },\n });\n }\n\n historyId(value: string) {\n return this.sendMessageAsync({\n type: \"metadata\",\n data: {\n historyId: value,\n },\n });\n }\n\n testCaseId(value: string) {\n return this.sendMessageAsync({\n type: \"metadata\",\n data: {\n testCaseId: value,\n },\n });\n }\n\n // @ts-ignore\n attachment(name: string, content: string, options: AttachmentOptions) {\n // @ts-ignore\n const attachmentRawContent: string | Uint8Array = content?.type === \"Buffer\" ? content.data : content;\n const actualEncoding = typeof attachmentRawContent === \"string\" ? \"utf8\" : \"base64\";\n const attachmentContent = uint8ArrayToBase64(attachmentRawContent);\n\n return this.sendMessageAsync({\n type: \"attachment_content\",\n data: {\n name,\n content: attachmentContent,\n encoding: actualEncoding,\n contentType: options.contentType,\n fileExtension: options.fileExtension,\n },\n });\n }\n\n attachmentFromPath(name: string, path: string, options: Omit<AttachmentOptions, \"encoding\">) {\n return this.sendMessageAsync({\n type: \"attachment_path\",\n data: {\n name,\n path,\n contentType: options.contentType,\n fileExtension: options.fileExtension,\n },\n });\n }\n\n logStep(name: string, status: Status = Status.PASSED, error?: Error) {\n return cy\n .wrap(ALLURE_REPORT_STEP_COMMAND, { log: false })\n .then(() => {\n this.sendMessage({\n type: \"step_start\",\n data: {\n name,\n start: Date.now(),\n },\n });\n\n return Cypress.Promise.resolve();\n })\n .then(() => {\n return this.sendMessageAsync({\n type: \"step_stop\",\n data: {\n status: status,\n stop: Date.now(),\n statusDetails: error ? { ...getMessageAndTraceFromError(error) } : undefined,\n },\n });\n });\n }\n\n step<T = void>(name: string, body: () => T | PromiseLike<T>) {\n return cy\n .wrap(ALLURE_REPORT_STEP_COMMAND, { log: false })\n .then(() => {\n this.sendMessage({\n type: \"step_start\",\n data: {\n name,\n start: Date.now(),\n },\n });\n\n return Cypress.Promise.resolve(body());\n })\n .then((result) => {\n return this.sendMessageAsync({\n type: \"step_stop\",\n data: {\n status: Status.PASSED,\n stop: Date.now(),\n },\n }).then(() => result);\n });\n }\n\n stepDisplayName(name: string) {\n return this.sendMessageAsync({\n type: \"step_metadata\",\n data: {\n name,\n },\n });\n }\n\n stepParameter(name: string, value: string, mode?: ParameterMode) {\n return this.sendMessageAsync({\n type: \"step_metadata\",\n data: {\n parameters: [{ name, value, mode }],\n },\n });\n }\n\n sendMessage(message: CypressMessage) {\n const messages = Cypress.env(\"allureRuntimeMessages\") || [];\n\n Cypress.env(\"allureRuntimeMessages\", messages.concat(message));\n }\n\n sendMessageAsync({ type, data }: CypressMessage): PromiseLike<void> {\n this.sendMessage({\n type,\n data: {\n ...data,\n // a little hack to avoid additional types definition\n // @ts-ignore\n cypressTestId: Cypress.state(\"test\")?.id ?? \"\",\n },\n });\n\n return Cypress.Promise.resolve();\n }\n}\n\nconst {\n EVENT_RUN_BEGIN,\n EVENT_RUN_END,\n EVENT_TEST_BEGIN,\n EVENT_TEST_FAIL,\n EVENT_TEST_PASS,\n EVENT_TEST_PENDING,\n EVENT_SUITE_BEGIN,\n EVENT_SUITE_END,\n EVENT_HOOK_BEGIN,\n EVENT_HOOK_END,\n} = Mocha.Runner.constants;\n\nconst initializeAllure = () => {\n const initialized = Cypress.env(\"allureInitialized\") as boolean;\n\n if (initialized) {\n return;\n }\n\n Cypress.env(\"allureInitialized\", true);\n\n // @ts-ignore\n Cypress.mocha\n .getRunner()\n .on(EVENT_RUN_BEGIN, () => {\n const testRuntime = new AllureCypressTestRuntime();\n\n Cypress.env(\"allureRuntimeMessages\", []);\n\n // @ts-ignore\n setGlobalTestRuntime(testRuntime);\n })\n .on(EVENT_HOOK_BEGIN, (hook: CypressHook) => {\n if (hook.title.includes(ALLURE_REPORT_SYSTEM_HOOK)) {\n return;\n }\n\n const testRuntime = getGlobalTestRuntime() as AllureCypressTestRuntime;\n // @ts-ignore\n const testId: string | undefined = Cypress.state()?.test?.id;\n\n testRuntime.sendMessageAsync({\n type: \"cypress_hook_start\",\n data: {\n id: testId ? `${testId}:${hook.hookId}` : \"\",\n parentId: hook.parent.id,\n name: hook.title,\n type: getHookType(hook.title),\n start: Date.now(),\n global: isGlobalHook(hook.title),\n },\n });\n })\n .on(EVENT_HOOK_END, (hook: CypressHook) => {\n if (hook.title.includes(ALLURE_REPORT_SYSTEM_HOOK)) {\n return;\n }\n\n const testRuntime = getGlobalTestRuntime() as AllureCypressTestRuntime;\n const runtimeMessages = Cypress.env(\"allureRuntimeMessages\") as CypressMessage[];\n const hookStartMessage = toReversed(runtimeMessages).find(\n ({ type }) => type === \"cypress_hook_start\",\n ) as CypressHookStartMessage;\n\n if (!hookStartMessage.data.id) {\n hookStartMessage.data.id = `${hook.id}:${hook.hookId}`;\n }\n\n return testRuntime.sendMessageAsync({\n type: \"cypress_hook_end\",\n data: {\n id: hookStartMessage.data.id,\n parentId: hook.parent.id,\n status: Status.PASSED,\n stop: hookStartMessage.data.start + (hook.duration ?? 0),\n global: isGlobalHook(hook.title),\n },\n });\n })\n .on(EVENT_SUITE_BEGIN, (suite: Mocha.Suite) => {\n const testRuntime = getGlobalTestRuntime() as AllureCypressTestRuntime;\n\n return testRuntime.sendMessageAsync({\n type: \"cypress_suite_start\",\n data: {\n id: suite.titlePath().join(\" \"),\n name: suite.title,\n },\n });\n })\n .on(EVENT_SUITE_END, (suite: Mocha.Suite) => {\n const testRuntime = getGlobalTestRuntime() as AllureCypressTestRuntime;\n\n return testRuntime.sendMessageAsync({\n type: \"cypress_suite_end\",\n data: {\n id: suite.titlePath().join(\" \"),\n },\n });\n })\n .on(EVENT_TEST_BEGIN, (test: CypressTest) => {\n const testRuntime = getGlobalTestRuntime() as AllureCypressTestRuntime;\n\n testRuntime.sendMessage({\n type: \"cypress_test_start\",\n data: {\n id: test.id,\n specPath: getSuitePath(test).concat(test.title),\n filename: Cypress.spec.relative,\n start: test.wallClockStartedAt?.getTime() || Date.now(),\n },\n });\n })\n .on(EVENT_TEST_PASS, (test: CypressTest) => {\n const testRuntime = getGlobalTestRuntime() as AllureCypressTestRuntime;\n const runtimeMessages = Cypress.env(\"allureRuntimeMessages\") as RuntimeMessage[];\n const unfinishedStepsMessages = getUnfinishedStepsMessages(runtimeMessages);\n // @ts-ignore\n const retries = test._retries ?? 0;\n\n unfinishedStepsMessages.forEach(() => {\n testRuntime.sendMessage({\n type: \"step_stop\",\n data: {\n status: Status.PASSED,\n stop: Date.now(),\n },\n });\n });\n\n testRuntime.sendMessage({\n type: \"cypress_test_end\",\n data: {\n id: test.id,\n status: Status.PASSED,\n stop: Date.now(),\n retries,\n },\n });\n })\n .on(EVENT_TEST_FAIL, (test: CypressTest, err: Error) => {\n const testRuntime = getGlobalTestRuntime() as AllureCypressTestRuntime;\n const runtimeMessages = Cypress.env(\"allureRuntimeMessages\") as CypressMessage[];\n const startCommandMessageIdx = runtimeMessages\n .toReversed()\n .findIndex(({ type }) => type === \"cypress_command_start\");\n const stopCommandMessageIdx = runtimeMessages\n .toReversed()\n .findIndex(({ type }) => type === \"cypress_command_end\");\n const hasUnfinishedCommand = startCommandMessageIdx > stopCommandMessageIdx;\n const status = err.constructor.name === \"AssertionError\" ? Status.FAILED : Status.BROKEN;\n const statusDetails: StatusDetails = {\n message: err.message,\n trace: err.stack,\n };\n // @ts-ignore\n const retries = test._retries ?? 0;\n\n if (hasUnfinishedCommand) {\n testRuntime.sendMessage({\n type: \"cypress_command_end\",\n data: {\n id: (runtimeMessages[startCommandMessageIdx] as CypressCommandStartMessage).data.id,\n status,\n statusDetails,\n },\n });\n }\n\n if (test.hookName) {\n const hookStartMessage = runtimeMessages\n .toReversed()\n .find(({ type }) => type === \"cypress_hook_start\") as CypressHookStartMessage;\n\n return testRuntime.sendMessageAsync({\n type: \"cypress_hook_end\",\n data: {\n id: hookStartMessage.data.id,\n status,\n statusDetails,\n stop: hookStartMessage.data.start + (test.duration ?? 0),\n parentId: hookStartMessage.data.parentId,\n global: isGlobalHook(test.hookName),\n },\n });\n }\n\n // the test hasn't been even started (rather due to hook error), so we need to start it manually\n if (!test.hookName && test.wallClockStartedAt === undefined) {\n testRuntime.sendMessage({\n type: \"cypress_test_start\",\n data: {\n id: test.id,\n specPath: getSuitePath(test).concat(test.title),\n filename: Cypress.spec.relative,\n start: Date.now(),\n },\n });\n }\n\n const testStartMessage = toReversed(runtimeMessages).find(\n ({ type }) => type === \"cypress_test_start\",\n ) as CypressTestStartMessage;\n\n testRuntime.sendMessage({\n type: \"cypress_test_end\",\n data: {\n id: test.id,\n status,\n statusDetails,\n stop: testStartMessage.data.start + (test.duration ?? 0),\n retries,\n },\n });\n })\n .on(EVENT_TEST_PENDING, (test: CypressTest) => {\n const testRuntime = new AllureCypressTestRuntime();\n const testPlan = Cypress.env(\"allureTestPlan\") as TestPlanV1;\n\n if (testPlan && !isTestPresentInTestPlan(Cypress.currentTest, Cypress.spec, testPlan)) {\n return;\n }\n\n // @ts-ignore\n const retries = test._retries ?? 0;\n\n testRuntime.sendMessageAsync({\n type: \"cypress_test_start\",\n data: {\n id: test.id,\n specPath: getSuitePath(test).concat(test.title),\n filename: Cypress.spec.relative,\n start: Date.now(),\n },\n });\n\n return testRuntime.sendMessageAsync({\n type: \"cypress_test_end\",\n data: {\n id: test.id,\n status: Status.SKIPPED,\n stop: Date.now(),\n retries,\n },\n });\n })\n .on(EVENT_RUN_END, () => {\n // this is the only way to say reporter process messages in interactive mode without data duplication\n if (Cypress.config(\"isInteractive\")) {\n cy.task(\"allureReportSpec\", { absolute: Cypress.spec.absolute });\n }\n });\n\n Cypress.Screenshot.defaults({\n onAfterScreenshot: (_, details) => {\n const testRuntime = getGlobalTestRuntime() as AllureCypressTestRuntime;\n\n return testRuntime.sendMessageAsync({\n type: \"attachment_path\",\n data: {\n path: details.path,\n name: details.name || \"Screenshot\",\n contentType: ContentType.PNG,\n },\n });\n },\n });\n\n Cypress.on(\"fail\", (err) => {\n const testRuntime = getGlobalTestRuntime() as AllureCypressTestRuntime;\n const runtimeMessages = Cypress.env(\"allureRuntimeMessages\") as RuntimeMessage[];\n const hasSteps = hasStepMessage(runtimeMessages);\n\n // if there is no steps, don't handle the error\n if (!hasSteps) {\n throw err;\n }\n\n const unfinishedStepsMessages = getUnfinishedStepsMessages(runtimeMessages);\n\n if (unfinishedStepsMessages.length === 0) {\n throw err;\n }\n\n const failedStepsStatus = err.constructor.name === \"AssertionError\" ? Status.FAILED : Status.BROKEN;\n\n unfinishedStepsMessages.forEach(() => {\n testRuntime.sendMessage({\n type: \"step_stop\",\n data: {\n status: failedStepsStatus,\n stop: Date.now(),\n statusDetails: {\n message: err.message,\n trace: err.stack,\n },\n },\n });\n });\n\n throw err;\n });\n Cypress.on(\"command:start\", (command: CypressCommand) => {\n if (isCommandShouldBeSkipped(command)) {\n return;\n }\n\n const testRuntime = getGlobalTestRuntime() as AllureCypressTestRuntime;\n\n return testRuntime.sendMessageAsync({\n type: \"cypress_command_start\",\n data: {\n id: command.attributes.id,\n name: `Command \"${command.attributes.name}\"`,\n args: command.attributes.args.map((arg) => (typeof arg === \"string\" ? arg : JSON.stringify(arg, null, 2))),\n },\n });\n });\n Cypress.on(\"command:end\", (command: CypressCommand) => {\n if (isCommandShouldBeSkipped(command)) {\n return;\n }\n\n const testRuntime = getGlobalTestRuntime() as AllureCypressTestRuntime;\n\n return testRuntime.sendMessageAsync({\n type: \"cypress_command_end\",\n data: {\n id: command.attributes.id,\n status: Status.PASSED,\n },\n });\n });\n\n before(ALLURE_REPORT_SYSTEM_HOOK, () => {\n cy.task(\"readAllureTestPlan\", {}, { log: false }).then((testPlan) => {\n if (!testPlan) {\n return;\n }\n\n Cypress.env(\"allureTestPlan\", testPlan);\n });\n });\n\n beforeEach(ALLURE_REPORT_SYSTEM_HOOK, function () {\n const testPlan = Cypress.env(\"allureTestPlan\") as TestPlanV1;\n\n if (!testPlan) {\n return;\n }\n\n if (!isTestPresentInTestPlan(Cypress.currentTest, Cypress.spec, testPlan)) {\n this.skip();\n }\n });\n\n after(ALLURE_REPORT_SYSTEM_HOOK, () => {\n const runtimeMessages = Cypress.env(\"allureRuntimeMessages\") as CypressMessage[];\n\n cy.task(\n \"allureReportTest\",\n { absolutePath: Cypress.spec.absolute, messages: runtimeMessages ?? [] },\n { log: false },\n );\n });\n};\n\ninitializeAllure();\n\nexport * from \"allure-js-commons\";\n", "export interface Attachment {\n name: string;\n type?: string;\n source: string;\n}\n\nexport interface AttachmentOptions {\n contentType: ContentType | string;\n encoding?: BufferEncoding;\n fileExtension?: string;\n}\n\nexport interface Label {\n name: LabelName | string;\n value: string;\n}\n\nexport interface Link {\n name?: string;\n url: string;\n type?: LinkType | string;\n}\n\nexport type ParameterMode = \"hidden\" | \"masked\" | \"default\";\n\nexport interface Parameter {\n name: string;\n value: string;\n excluded?: boolean;\n mode?: ParameterMode;\n}\n\nexport type ParameterOptions = Pick<Parameter, \"mode\" | \"excluded\">;\n\nexport interface StatusDetails {\n message?: string;\n trace?: string;\n}\n\n// don't use the interface as is, use Results types instead\ninterface Executable {\n name?: string;\n status?: Status;\n statusDetails: StatusDetails;\n stage: Stage;\n description?: string;\n descriptionHtml?: string;\n steps: StepResult[];\n attachments: Attachment[];\n parameters: Parameter[];\n start?: number;\n stop?: number;\n}\n\nexport interface FixtureResult extends Executable {}\n\nexport interface StepResult extends Executable {}\n\nexport interface TestResult extends Executable {\n uuid: string;\n historyId?: string;\n fullName?: string;\n testCaseId?: string;\n labels: Label[];\n links: Link[];\n}\n\nexport interface TestResultContainer {\n uuid: string;\n name?: string;\n children: string[];\n befores: FixtureResult[];\n afters: FixtureResult[];\n}\n\nexport type TestOrStepResult = StepResult | TestResult;\n\n/* eslint-disable no-shadow */\nexport enum Status {\n FAILED = \"failed\",\n BROKEN = \"broken\",\n PASSED = \"passed\",\n SKIPPED = \"skipped\",\n}\n\nexport const StatusByPriority = [Status.FAILED, Status.BROKEN, Status.PASSED, Status.SKIPPED];\n\n/* eslint-disable no-shadow */\nexport enum Stage {\n SCHEDULED = \"scheduled\",\n RUNNING = \"running\",\n FINISHED = \"finished\",\n PENDING = \"pending\",\n INTERRUPTED = \"interrupted\",\n}\n\n/* eslint-disable no-shadow */\nexport enum LabelName {\n ALLURE_ID = \"ALLURE_ID\",\n /**\n * @deprecated please use ALLURE_ID instead\n */\n AS_ID = ALLURE_ID,\n SUITE = \"suite\",\n PARENT_SUITE = \"parentSuite\",\n SUB_SUITE = \"subSuite\",\n EPIC = \"epic\",\n FEATURE = \"feature\",\n STORY = \"story\",\n SEVERITY = \"severity\",\n TAG = \"tag\",\n OWNER = \"owner\",\n LEAD = \"lead\",\n HOST = \"host\",\n THREAD = \"thread\",\n TEST_METHOD = \"testMethod\",\n TEST_CLASS = \"testClass\",\n PACKAGE = \"package\",\n FRAMEWORK = \"framework\",\n LANGUAGE = \"language\",\n LAYER = \"layer\",\n}\n\n/* eslint-disable no-shadow */\nexport enum Severity {\n BLOCKER = \"blocker\",\n CRITICAL = \"critical\",\n NORMAL = \"normal\",\n MINOR = \"minor\",\n TRIVIAL = \"trivial\",\n}\n\n/* eslint-disable no-shadow */\nexport enum ContentType {\n TEXT = \"text/plain\",\n XML = \"application/xml\",\n HTML = \"text/html\",\n CSV = \"text/csv\",\n TSV = \"text/tab-separated-values\",\n CSS = \"text/css\",\n URI = \"text/uri-list\",\n SVG = \"image/svg+xml\",\n PNG = \"image/png\",\n JSON = \"application/json\",\n ZIP = \"application/zip\",\n WEBM = \"video/webm\",\n JPEG = \"image/jpeg\",\n MP4 = \"video/mp4\",\n IMAGEDIFF = \"application/vnd.allure.image.diff\",\n}\n\n/* eslint-disable no-shadow */\nexport enum LinkType {\n DEFAULT = \"link\",\n ISSUE = \"issue\",\n TMS = \"tms\",\n}\n\nexport interface ImageDiffAttachment {\n expected: string | undefined; // data:image;base64,\n actual: string | undefined; // data:image;base64,\n diff: string | undefined; // data:image;base64,\n name: string;\n}\n", "import type { TestRuntime } from \"./types.js\";\n\nexport class NoopTestRuntime implements TestRuntime {\n async attachment() {\n await this.warning();\n }\n\n async attachmentFromPath() {\n await this.warning();\n }\n\n async description() {\n await this.warning();\n }\n\n async descriptionHtml() {\n await this.warning();\n }\n\n async displayName() {\n await this.warning();\n }\n\n async historyId() {\n await this.warning();\n }\n\n async labels() {\n await this.warning();\n }\n\n async links() {\n await this.warning();\n }\n\n async parameter() {\n await this.warning();\n }\n\n async logStep() {\n await this.warning();\n }\n\n async step<T>(name: string, body: () => T | PromiseLike<T>): Promise<T> {\n await this.warning();\n return body();\n }\n\n async stepDisplayName() {\n await this.warning();\n }\n\n async stepParameter() {\n await this.warning();\n }\n\n async testCaseId() {\n await this.warning();\n }\n\n // eslint-disable-next-line @typescript-eslint/require-await\n async warning() {\n // eslint-disable-next-line no-console\n console.log(\"no test runtime is found. Please check test framework configuration\");\n }\n}\n\nexport const noopRuntime: TestRuntime = new NoopTestRuntime();\n", "import { noopRuntime } from \"./NoopTestRuntime.js\";\nimport type { TestRuntime } from \"./types.js\";\n\nconst ALLURE_TEST_RUNTIME_KEY = \"allureTestRuntime\";\n\nexport const setGlobalTestRuntime = (runtime: TestRuntime) => {\n (globalThis as any)[ALLURE_TEST_RUNTIME_KEY] = () => runtime;\n};\n\nconst getGlobalTestRuntimeFunction = () => {\n return (globalThis as any)?.[ALLURE_TEST_RUNTIME_KEY] as (() => TestRuntime | undefined) | undefined;\n};\n\nexport const getGlobalTestRuntime = (): TestRuntime => {\n const testRuntime = getGlobalTestRuntimeFunction();\n\n if (testRuntime) {\n return testRuntime() ?? noopRuntime;\n }\n\n return noopRuntime;\n};\n\nexport const getGlobalTestRuntimeWithAutoconfig = (): TestRuntime | Promise<TestRuntime> => {\n const testRuntime = getGlobalTestRuntimeFunction();\n\n if (testRuntime) {\n return testRuntime() ?? noopRuntime;\n }\n\n if (\"_playwrightInstance\" in globalThis) {\n try {\n // protection from bundlers tree-shaking visiting (webpack, rollup)\n // @ts-ignore\n // eslint-disable-next-line no-eval\n return (0, eval)(\"(() => import('allure-playwright/autoconfig'))()\").then(() => {\n return getGlobalTestRuntimeFunction()?.() ?? noopRuntime;\n });\n } catch (err) {\n // eslint-disable-next-line no-console\n console.log(\"can't execute allure-playwright/autoconfig\", err);\n return noopRuntime;\n }\n }\n\n return noopRuntime;\n};\n", "import type { FixtureResult, Label, StatusDetails, StepResult, TestResult } from \"../model.js\";\nimport { LabelName, Status } from \"../model.js\";\nimport type { RuntimeMessage } from \"./types.js\";\n\nexport const getStatusFromError = (error: Error): Status => {\n switch (true) {\n /**\n * Native `node:assert` and `chai` (`vitest` uses it under the hood) throw `AssertionError`\n * `jest` throws `JestAssertionError` instance\n * `jasmine` throws `ExpectationFailed` instance\n */\n case /assert/gi.test(error.constructor.name):\n case /expectation/gi.test(error.constructor.name):\n case /assert/gi.test(error.name):\n case /assert/gi.test(error.message):\n return Status.FAILED;\n default:\n return Status.BROKEN;\n }\n};\n\n/**\n * Source: https://github.com/chalk/ansi-regex\n */\nconst ansiRegex = ({ onlyFirst = false } = {}) => {\n const pattern = [\n \"[\\\\u001B\\\\u009B][[\\\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\\\d\\\\/#&.:=?%@~_]+)*|[a-zA-Z\\\\d]+(?:;[-a-zA-Z\\\\d\\\\/#&.:=?%@~_]*)*)?\\\\u0007)\",\n \"(?:(?:\\\\d{1,4}(?:;\\\\d{0,4})*)?[\\\\dA-PR-TZcf-nq-uy=><~]))\",\n ].join(\"|\");\n\n return new RegExp(pattern, onlyFirst ? undefined : \"g\");\n};\n\n/**\n * https://github.com/chalk/strip-ansi\n */\nexport const stripAnsi = (str: string): string => {\n const regex = ansiRegex();\n return str.replace(regex, \"\");\n};\n\nexport const getMessageAndTraceFromError = (\n error: Error | { message?: string; stack?: string },\n): Pick<StatusDetails, \"message\" | \"trace\"> => {\n const { message, stack } = error;\n return {\n message: message ? stripAnsi(message) : undefined,\n trace: stack ? stripAnsi(stack) : undefined,\n };\n};\n\nexport const allureIdRegexp = /(?:^|\\s)@?allure\\.id[:=](?<id>[^\\s]+)/;\nexport const allureIdRegexpGlobal = new RegExp(allureIdRegexp, \"g\");\nexport const allureLabelRegexp = /(?:^|\\s)@?allure\\.label\\.(?<name>[^:=\\s]+)[:=](?<value>[^\\s]+)/;\nexport const allureLabelRegexpGlobal = new RegExp(allureLabelRegexp, \"g\");\n\nexport const extractMetadataFromString = (\n title: string,\n): {\n labels: Label[];\n cleanTitle: string;\n} => {\n const labels = [] as Label[];\n\n title.split(\" \").forEach((val) => {\n const idValue = val.match(allureIdRegexp)?.groups?.id;\n\n if (idValue) {\n labels.push({ name: LabelName.ALLURE_ID, value: idValue });\n }\n\n const labelMatch = val.match(allureLabelRegexp);\n const { name, value } = labelMatch?.groups || {};\n\n if (name && value) {\n labels?.push({ name, value });\n }\n });\n\n const cleanTitle = title.replace(allureLabelRegexpGlobal, \"\").replace(allureIdRegexpGlobal, \"\").trim();\n\n return { labels, cleanTitle };\n};\n\nexport const isAnyStepFailed = (item: StepResult | TestResult | FixtureResult): boolean => {\n const isFailed = item.status === Status.FAILED;\n\n if (isFailed || item.steps.length === 0) {\n return isFailed;\n }\n\n return !!item.steps.find((step) => isAnyStepFailed(step));\n};\n\nexport const isAllStepsEnded = (item: StepResult | TestResult | FixtureResult): boolean => {\n return item.steps.every((val) => val.stop && isAllStepsEnded(val));\n};\n\nexport const hasLabel = (testResult: TestResult, labelName: LabelName | string): boolean => {\n return !!testResult.labels.find((l) => l.name === labelName);\n};\n\nexport const hasStepMessage = (messages: RuntimeMessage[]) => {\n return messages.some((message) => message.type === \"step_start\" || message.type === \"step_stop\");\n};\n\nexport const getStepsMessagesPair = (messages: RuntimeMessage[]) =>\n messages.reduce((acc, message) => {\n if (message.type !== \"step_start\" && message.type !== \"step_stop\") {\n return acc;\n }\n\n if (message.type === \"step_start\") {\n acc.push([message]);\n\n return acc;\n }\n\n const unfinishedStepIdx = acc.findLastIndex((step) => step.length === 1);\n\n if (unfinishedStepIdx === -1) {\n return acc;\n }\n\n acc[unfinishedStepIdx].push(message);\n\n return acc;\n }, [] as RuntimeMessage[][]);\n\nexport const getUnfinishedStepsMessages = (messages: RuntimeMessage[]) => {\n const grouppedStepsMessage = getStepsMessagesPair(messages);\n\n return grouppedStepsMessage.filter((step) => step.length === 1);\n};\n\nexport const isPromise = <T = any>(obj: any): obj is PromiseLike<T> =>\n !!obj && (typeof obj === \"object\" || typeof obj === \"function\") && typeof obj.then === \"function\";\n", "import type { Status } from \"./model.js\";\nimport { type ContentType } from \"./model.js\";\nimport { type AttachmentOptions, type Label, type Link, type ParameterMode, type ParameterOptions } from \"./model.js\";\nimport { LabelName, LinkType } from \"./model.js\";\nimport { getGlobalTestRuntimeWithAutoconfig } from \"./sdk/runtime/runtime.js\";\nimport type { TestRuntime } from \"./sdk/runtime/types.js\";\nimport { isPromise } from \"./sdk/utils.js\";\n\nconst callRuntimeMethod = <\n T extends keyof TestRuntime,\n S extends Parameters<TestRuntime[T]>,\n R extends ReturnType<TestRuntime[T]>,\n>(\n method: T,\n ...args: S\n): R => {\n const runtime = getGlobalTestRuntimeWithAutoconfig();\n\n if (!isPromise(runtime)) {\n // @ts-ignore\n return runtime[method](...args);\n }\n\n return runtime.then((testRuntime) => {\n // @ts-ignore\n return testRuntime[method](...args);\n }) as R;\n};\n\nexport const label = (name: LabelName | string, value: string) => {\n return callRuntimeMethod(\"labels\", { name, value });\n};\n\nexport const labels = (...labelsList: Label[]) => {\n return callRuntimeMethod(\"labels\", ...labelsList);\n};\n\nexport const link = (url: string, name?: string, type?: LinkType | string) => {\n return callRuntimeMethod(\"links\", { url, type, name });\n};\n\nexport const links = (...linksList: Link[]) => {\n return callRuntimeMethod(\"links\", ...linksList);\n};\n\nexport const parameter = (name: string, value: string, options?: ParameterOptions) => {\n return callRuntimeMethod(\"parameter\", name, value, options);\n};\n\nexport const description = (markdown: string) => {\n return callRuntimeMethod(\"description\", markdown);\n};\n\nexport const descriptionHtml = (html: string) => {\n return callRuntimeMethod(\"descriptionHtml\", html);\n};\n\nexport const displayName = (name: string) => {\n return callRuntimeMethod(\"displayName\", name);\n};\n\nexport const historyId = (value: string) => {\n return callRuntimeMethod(\"historyId\", value);\n};\n\nexport const testCaseId = (value: string) => {\n return callRuntimeMethod(\"testCaseId\", value);\n};\n\nexport const attachment = (\n name: string,\n content: Buffer | string,\n options: ContentType | string | AttachmentOptions,\n) => {\n const opts = typeof options === \"string\" ? { contentType: options } : options;\n return callRuntimeMethod(\"attachment\", name, content, opts);\n};\n\nexport const attachmentPath = (\n name: string,\n path: string,\n options: ContentType | string | Omit<AttachmentOptions, \"encoding\">,\n) => {\n const opts = typeof options === \"string\" ? { contentType: options } : options;\n return callRuntimeMethod(\"attachmentFromPath\", name, path, opts);\n};\n\nexport type StepContext = {\n displayName: (name: string) => void | PromiseLike<void>;\n parameter: (name: string, value: string, mode?: ParameterMode) => void | PromiseLike<void>;\n};\n\nconst stepContext: () => StepContext = () => ({\n displayName: (name: string) => {\n return callRuntimeMethod(\"stepDisplayName\", name);\n },\n parameter: (name, value, mode?) => {\n return callRuntimeMethod(\"stepParameter\", name, value, mode);\n },\n});\n\nexport const logStep = (name: string, status?: Status, error?: Error): PromiseLike<void> => {\n return callRuntimeMethod(\"logStep\", name, status, error);\n};\n\nexport const step = <T = void>(name: string, body: (context: StepContext) => T | PromiseLike<T>): PromiseLike<T> => {\n return callRuntimeMethod(\"step\", name, () => body(stepContext()));\n};\n\nexport const issue = (url: string, name?: string) => link(url, name, LinkType.ISSUE);\n\nexport const tms = (url: string, name?: string) => link(url, name, LinkType.TMS);\n\nexport const allureId = (value: string) => label(LabelName.ALLURE_ID, value);\n\nexport const epic = (name: string) => label(LabelName.EPIC, name);\n\nexport const feature = (name: string) => label(LabelName.FEATURE, name);\n\nexport const story = (name: string) => label(LabelName.STORY, name);\n\nexport const suite = (name: string) => label(LabelName.SUITE, name);\n\nexport const parentSuite = (name: string) => label(LabelName.PARENT_SUITE, name);\n\nexport const subSuite = (name: string) => label(LabelName.SUB_SUITE, name);\n\nexport const owner = (name: string) => label(LabelName.OWNER, name);\n\nexport const severity = (name: string) => label(LabelName.SEVERITY, name);\n\nexport const layer = (name: string) => label(LabelName.LAYER, name);\n\nexport const tag = (name: string) => label(LabelName.TAG, name);\n\nexport const tags = (...tagsList: string[]) => {\n return callRuntimeMethod(\"labels\", ...tagsList.map((value) => ({ name: LabelName.TAG, value })));\n};\n", "import type { Status, StatusDetails } from \"allure-js-commons\";\nimport type { RuntimeMessage } from \"allure-js-commons/sdk\";\nimport type { Config } from \"allure-js-commons/sdk/reporter\";\n\nexport const ALLURE_REPORT_SYSTEM_HOOK = \"__allure_report_system_hook__\";\n\nexport const ALLURE_REPORT_STEP_COMMAND = \"__allure_report_step_command__\";\n\nexport type AllureCypressConfig = Config & {\n videoOnFailOnly?: boolean;\n};\n\nexport type CypressTest = Mocha.Test & {\n wallClockStartedAt?: Date;\n hookName?: string;\n id: string;\n};\n\nexport type CypressHook = Mocha.Hook & {\n id: string;\n hookId: string;\n parent: Mocha.Suite & {\n id: string;\n };\n};\n\nexport type CypressCommand = {\n attributes: {\n name: string;\n id: string;\n args: any[];\n };\n state: \"passed\" | \"failed\" | \"queued\";\n};\n\nexport type CypressHookStartMessage = {\n type: \"cypress_hook_start\";\n data: {\n id: string;\n parentId: string;\n name: string;\n type: \"before\" | \"after\";\n start: number;\n global: boolean;\n };\n};\n\nexport type CypressHookEndMessage = {\n type: \"cypress_hook_end\";\n data: {\n id: string;\n parentId: string;\n status: Status;\n statusDetails?: StatusDetails;\n stop: number;\n global: boolean;\n };\n};\n\nexport type CypressSuiteStartMessage = {\n type: \"cypress_suite_start\";\n data: {\n id: string;\n name: string;\n root?: boolean;\n };\n};\n\nexport type CypressSuiteEndMessage = {\n type: \"cypress_suite_end\";\n data: {\n id: string;\n root?: boolean;\n };\n};\n\nexport type CypressTestStartMessage = {\n type: \"cypress_test_start\";\n data: {\n id: string;\n specPath: string[];\n filename: string;\n start: number;\n };\n};\n\nexport type CypressTestEndMessage = {\n type: \"cypress_test_end\";\n data: {\n id: string;\n status: Status;\n statusDetails?: StatusDetails;\n stop: number;\n retries: number;\n };\n};\n\nexport type CypressCommandStartMessage = {\n type: \"cypress_command_start\";\n data: {\n id: string;\n name: string;\n args: string[];\n };\n};\n\nexport type CypressCommandEndMessage = {\n type: \"cypress_command_end\";\n data: {\n id: string;\n status: Status;\n statusDetails?: StatusDetails;\n };\n};\n\nexport type CypressMessage =\n | RuntimeMessage\n | CypressTestStartMessage\n | CypressTestEndMessage\n | CypressHookStartMessage\n | CypressHookEndMessage\n | CypressSuiteStartMessage\n | CypressSuiteEndMessage\n | CypressCommandStartMessage\n | CypressCommandEndMessage;\n\nexport type RunContextByAbsolutePath = {\n executables: string[];\n steps: string[];\n scopes: string[];\n globalHooksMessages: (CypressHookStartMessage | CypressHookEndMessage)[];\n};\n", "import { LabelName } from \"allure-js-commons\";\nimport type { TestPlanV1 } from \"allure-js-commons/sdk\";\nimport { extractMetadataFromString } from \"allure-js-commons/sdk\";\nimport type { CypressCommand } from \"./model.js\";\nimport { ALLURE_REPORT_STEP_COMMAND } from \"./model.js\";\n\nexport const uint8ArrayToBase64 = (data: unknown) => {\n // @ts-ignore\n const u8arrayLike = Array.isArray(data) || data.buffer;\n\n if (!u8arrayLike) {\n return data as string;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n return btoa(String.fromCharCode.apply(null, data as number[]));\n};\n\nexport const getSuitePath = (test: Mocha.Test): string[] => {\n const path: string[] = [];\n let currentSuite: Mocha.Suite | undefined = test.parent;\n\n while (currentSuite) {\n if (currentSuite.title) {\n path.unshift(currentSuite.title);\n }\n\n currentSuite = currentSuite.parent;\n }\n\n return path;\n};\n\nexport const isCommandShouldBeSkipped = (command: CypressCommand) => {\n if (last(command.attributes.args)?.log === false) {\n return true;\n }\n\n if (command.attributes.name === \"task\" && command.attributes.args[0] === \"allureReportTest\") {\n return true;\n }\n\n // we don't need to report then commands because it's just a promise handle\n if (command.attributes.name === \"then\") {\n return true;\n }\n\n // we should skip artificial wrap from allure steps\n if (command.attributes.name === \"wrap\" && command.attributes.args[0] === ALLURE_REPORT_STEP_COMMAND) {\n return true;\n }\n\n return false;\n};\n\nexport const toReversed = <T = unknown>(arr: T[]): T[] => {\n const result: T[] = [];\n\n for (let i = arr.length - 1; i >= 0; i--) {\n result.push(arr[i]);\n }\n\n return result;\n};\n\nexport const isGlobalHook = (hookName: string) => {\n return /(before|after) all/.test(hookName);\n};\n\nexport const getHookType = (hookName: string) => {\n return hookName.includes(\"before\") ? \"before\" : \"after\";\n};\n\nexport const last = <T = unknown>(arr: T[]): T | undefined => {\n return arr[arr.length - 1];\n};\n\nexport const isTestPresentInTestPlan = (\n test: {\n title: string;\n titlePath: string[];\n },\n spec: Cypress.Spec,\n testPlan: TestPlanV1,\n) => {\n const testFullName = `${spec.relative}#${test.titlePath.join(\" \")}`;\n const { labels } = extractMetadataFromString(test.title);\n const allureIdLabel = labels.find(({ name }) => name === LabelName.ALLURE_ID);\n\n return testPlan.tests.some(({ id, selector = \"\" }) => {\n const idMatched = id ? String(id) === allureIdLabel?.value : false;\n const selectorMatched = selector === testFullName;\n\n return idMatched || selectorMatched;\n });\n};\n"],
5
- "mappings": "mbAAA,IAAAA,GAAA,GAAAC,GAAAD,GAAA,8BAAAE,EAAA,gBAAAC,EAAA,cAAAC,EAAA,aAAAC,EAAA,aAAAC,EAAA,UAAAC,EAAA,WAAAC,EAAA,qBAAAC,EAAA,aAAAC,GAAA,eAAAC,GAAA,mBAAA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ACvE,CAAE,IAAK,EAAM,CACf,CACF,CAAC,EACH,EAEAT,GAAiB",
6
- "names": ["src_exports", "__export", "AllureCypressTestRuntime", "ContentType", "LabelName", "LinkType", "Severity", "Stage", "Status", "StatusByPriority", "allureId", "attachment", "attachmentPath", "description", "descriptionHtml", "displayName", "epic", "feature", "historyId", "issue", "label", "labels", "layer", "link", "links", "logStep", "owner", "parameter", "parentSuite", "severity", "step", "story", "subSuite", "suite", "tag", "tags", "testCaseId", "tms", "__toCommonJS", "Status", "StatusByPriority", "FAILED", "BROKEN", "PASSED", "SKIPPED", "Stage", "LabelName", "Severity", "ContentType", "LinkType", "NoopTestRuntime", "attachment", "_this", "_asyncToGenerator", "warning", "attachmentFromPath", "_this2", "description", "_this3", "descriptionHtml", "_this4", "displayName", "_this5", "historyId", "_this6", "labels", "_this7", "links", "_this8", "parameter", "_this9", "logStep", "_this10", "step", "name", "body", "_this11", "stepDisplayName", "_this12", "stepParameter", "_this13", "testCaseId", "_this14", "console", "log", "noopRuntime", "ALLURE_TEST_RUNTIME_KEY", "setGlobalTestRuntime", "runtime", "globalThis", "getGlobalTestRuntimeFunction", "getGlobalTestRuntime", "testRuntime", "_testRuntime", "noopRuntime", "getGlobalTestRuntimeWithAutoconfig", "_testRuntime2", "eval", "then", "_getGlobalTestRuntime", "_getGlobalTestRuntime2", "err", "console", "log", "ansiRegex", "onlyFirst", "arguments", "length", "undefined", "pattern", "join", "RegExp", "stripAnsi", "str", "regex", "replace", "getMessageAndTraceFromError", "error", "message", "stack", "trace", "allureIdRegexp", "_wrapRegExp", "id", "allureIdRegexpGlobal", "allureLabelRegexp", "name", "value", "allureLabelRegexpGlobal", "extractMetadataFromString", "title", "labels", "split", "forEach", "val", "_val$match", "idValue", "match", "groups", "push", "LabelName", "ALLURE_ID", "labelMatch", "cleanTitle", "trim", "hasStepMessage", "messages", "some", "message", "type", "getStepsMessagesPair", "reduce", "acc", "push", "unfinishedStepIdx", "findLastIndex", "step", "length", "getUnfinishedStepsMessages", "grouppedStepsMessage", "filter", "isPromise", "obj", "then", "callRuntimeMethod", "method", "_len", "arguments", "length", "args", "Array", "_key", "runtime", "getGlobalTestRuntimeWithAutoconfig", "isPromise", "then", "testRuntime", "label", "name", "value", "labels", "_len2", "labelsList", "_key2", "link", "url", "type", "links", "_len3", "linksList", "_key3", "parameter", "options", "description", "markdown", "descriptionHtml", "html", "displayName", "historyId", "testCaseId", "attachment", "content", "opts", "contentType", "attachmentPath", "path", "stepContext", "mode", "logStep", "status", "error", "step", "body", "issue", "LinkType", "ISSUE", "tms", "TMS", "allureId", "LabelName", "ALLURE_ID", "epic", "EPIC", "feature", "FEATURE", "story", "STORY", "suite", "SUITE", "parentSuite", "PARENT_SUITE", "subSuite", "SUB_SUITE", "owner", "OWNER", "severity", "SEVERITY", "layer", "LAYER", "tag", "TAG", "tags", "_len4", "tagsList", "_key4", "map", "ALLURE_REPORT_SYSTEM_HOOK", "ALLURE_REPORT_STEP_COMMAND", "uint8ArrayToBase64", "data", "getSuitePath", "test", "path", "currentSuite", "isCommandShouldBeSkipped", "command", "last", "ALLURE_REPORT_STEP_COMMAND", "toReversed", "arr", "result", "i", "isGlobalHook", "hookName", "getHookType", "isTestPresentInTestPlan", "spec", "testPlan", "testFullName", "labels", "extractMetadataFromString", "allureIdLabel", "name", "LabelName", "id", "selector", "AllureCypressTestRuntime", "labels", "links", "name", "value", "options", "markdown", "html", "content", "attachmentRawContent", "actualEncoding", "attachmentContent", "uint8ArrayToBase64", "path", "status", "Status", "error", "ALLURE_REPORT_STEP_COMMAND", "getMessageAndTraceFromError", "body", "result", "mode", "message", "messages", "type", "data", "EVENT_RUN_BEGIN", "EVENT_RUN_END", "EVENT_TEST_BEGIN", "EVENT_TEST_FAIL", "EVENT_TEST_PASS", "EVENT_TEST_PENDING", "EVENT_SUITE_BEGIN", "EVENT_SUITE_END", "EVENT_HOOK_BEGIN", "EVENT_HOOK_END", "initializeAllure", "testRuntime", "setGlobalTestRuntime", "hook", "ALLURE_REPORT_SYSTEM_HOOK", "getGlobalTestRuntime", "testId", "getHookType", "isGlobalHook", "runtimeMessages", "hookStartMessage", "toReversed", "suite", "test", "getSuitePath", "unfinishedStepsMessages", "getUnfinishedStepsMessages", "retries", "err", "startCommandMessageIdx", "stopCommandMessageIdx", "hasUnfinishedCommand", "statusDetails", "testStartMessage", "testPlan", "isTestPresentInTestPlan", "_", "details", "ContentType", "hasStepMessage", "failedStepsStatus", "command", "isCommandShouldBeSkipped", "arg"]
3
+ "sources": ["../../src/index.ts", "../../../../.yarn/__virtual__/allure-js-commons-virtual-2327c51af9/1/packages/allure-js-commons/src/model.ts", "../../../../.yarn/__virtual__/allure-js-commons-virtual-2327c51af9/1/packages/allure-js-commons/src/sdk/utils.ts", "../../src/model.ts", "../../../../.yarn/__virtual__/allure-js-commons-virtual-2327c51af9/1/packages/allure-js-commons/src/sdk/runtime/NoopTestRuntime.ts", "../../../../.yarn/__virtual__/allure-js-commons-virtual-2327c51af9/1/packages/allure-js-commons/src/sdk/runtime/runtime.ts", "../../../../.yarn/__virtual__/allure-js-commons-virtual-2327c51af9/1/packages/allure-js-commons/src/facade.ts", "../../src/utils.ts", "../../src/state.ts", "../../src/runtime.ts"],
4
+ "sourcesContent": ["import { getMessageAndTraceFromError, getStatusFromError } from \"allure-js-commons/sdk\";\nimport { ALLURE_REPORT_SYSTEM_HOOK } from \"./model.js\";\nimport type { CypressCommand, CypressHook, CypressSuite, CypressTest } from \"./model.js\";\nimport {\n completeHookErrorReporting,\n completeSpecIfNoAfterHookLeft,\n enableScopeLevelAfterHookReporting,\n flushRuntimeMessages,\n initTestRuntime,\n reportCommandEnd,\n reportCommandStart,\n reportHookEnd,\n reportHookStart,\n reportRunStart,\n reportScreenshot,\n reportSuiteEnd,\n reportSuiteStart,\n reportTestEnd,\n reportTestOrHookFail,\n reportTestPass,\n reportTestSkip,\n reportTestStart,\n reportUnfinishedSteps,\n} from \"./runtime.js\";\nimport { isAllureInitialized, setAllureInitialized } from \"./state.js\";\nimport { applyTestPlan, isAllureHook, isRootAfterAllHook, isTestReported, shouldCommandBeSkipped } from \"./utils.js\";\n\nconst {\n EVENT_RUN_BEGIN,\n EVENT_SUITE_BEGIN,\n EVENT_SUITE_END,\n EVENT_HOOK_BEGIN,\n EVENT_HOOK_END,\n EVENT_TEST_BEGIN,\n EVENT_TEST_PASS,\n EVENT_TEST_FAIL,\n EVENT_TEST_PENDING,\n EVENT_TEST_END,\n} = Mocha.Runner.constants;\n\nconst initializeAllure = () => {\n if (isAllureInitialized()) {\n return;\n }\n\n setAllureInitialized();\n\n // @ts-ignore\n Cypress.mocha\n .getRunner()\n .on(EVENT_RUN_BEGIN, () => {\n initTestRuntime();\n reportRunStart();\n })\n .on(EVENT_SUITE_BEGIN, (suite: CypressSuite) => {\n if (suite.root) {\n applyTestPlan(Cypress.spec, suite);\n }\n reportSuiteStart(suite);\n })\n .on(EVENT_SUITE_END, (suite: CypressSuite) => {\n reportSuiteEnd(suite);\n })\n .on(EVENT_HOOK_BEGIN, (hook: CypressHook) => {\n if (isAllureHook(hook)) {\n return;\n }\n\n reportHookStart(hook);\n })\n .on(EVENT_HOOK_END, (hook: CypressHook) => {\n if (isAllureHook(hook)) {\n return;\n }\n\n reportHookEnd(hook);\n })\n .on(EVENT_TEST_BEGIN, (test: CypressTest) => {\n // Cypress emits an extra EVENT_TEST_BEGIN if the test is skipped.\n // reportTestSkip does that already, so we need to filter the extra event out.\n if (!isTestReported(test)) {\n reportTestStart(test);\n }\n })\n .on(EVENT_TEST_PASS, () => {\n reportTestPass();\n })\n .on(EVENT_TEST_FAIL, (testOrHook: CypressTest | CypressHook, err: Error) => {\n const isHook = \"hookName\" in testOrHook;\n if (isHook && isRootAfterAllHook(testOrHook)) {\n // Errors in spec-level 'after all' hooks are handled by Allure wrappers.\n return;\n }\n\n const isAllureHookFailure = isHook && isAllureHook(testOrHook);\n\n if (isAllureHookFailure) {\n // Normally, Allure hooks are skipped from the report.\n // In case of errors, it will be helpful to see them.\n reportHookStart(testOrHook, Date.now() - (testOrHook.duration ?? 0));\n }\n\n // This will mark the fixture and the test (if any) as failed/broken.\n reportTestOrHookFail(err);\n\n if (isHook) {\n // This will end the fixture and test (if any) and will report the remaining\n // tests in the hook's suite (the ones that will be skipped by Cypress/Mocha).\n completeHookErrorReporting(testOrHook, err);\n }\n })\n .on(EVENT_TEST_PENDING, (test: CypressTest) => {\n reportTestSkip(test);\n })\n .on(EVENT_TEST_END, (test: CypressTest) => {\n reportTestEnd(test);\n });\n\n Cypress.Screenshot.defaults({\n onAfterScreenshot: (_, { path, name }) => {\n reportScreenshot(path, name);\n },\n });\n\n Cypress.on(\"fail\", (err) => {\n const status = getStatusFromError(err);\n const statusDetails = getMessageAndTraceFromError(err);\n\n reportUnfinishedSteps(status, statusDetails);\n\n throw err;\n });\n Cypress.on(\"command:start\", (command: CypressCommand) => {\n if (shouldCommandBeSkipped(command)) {\n return;\n }\n\n reportCommandStart(command);\n });\n Cypress.on(\"command:end\", (command: CypressCommand) => {\n if (shouldCommandBeSkipped(command)) {\n return;\n }\n\n reportCommandEnd();\n });\n\n afterEach(ALLURE_REPORT_SYSTEM_HOOK, flushRuntimeMessages);\n\n after(ALLURE_REPORT_SYSTEM_HOOK, function (this: Mocha.Context) {\n flushRuntimeMessages();\n completeSpecIfNoAfterHookLeft(this);\n });\n\n enableScopeLevelAfterHookReporting();\n};\n\ninitializeAllure();\n\nexport * from \"allure-js-commons\";\n", "export interface Attachment {\n name: string;\n type?: string;\n source: string;\n}\n\nexport interface AttachmentOptions {\n contentType: ContentType | string;\n encoding?: BufferEncoding;\n fileExtension?: string;\n}\n\nexport interface Label {\n name: LabelName | string;\n value: string;\n}\n\nexport interface Link {\n name?: string;\n url: string;\n type?: LinkType | string;\n}\n\nexport type ParameterMode = \"hidden\" | \"masked\" | \"default\";\n\nexport interface Parameter {\n name: string;\n value: string;\n excluded?: boolean;\n mode?: ParameterMode;\n}\n\nexport type ParameterOptions = Pick<Parameter, \"mode\" | \"excluded\">;\n\nexport interface StatusDetails {\n message?: string;\n trace?: string;\n}\n\n// don't use the interface as is, use Results types instead\ninterface Executable {\n name?: string;\n status?: Status;\n statusDetails: StatusDetails;\n stage: Stage;\n description?: string;\n descriptionHtml?: string;\n steps: StepResult[];\n attachments: Attachment[];\n parameters: Parameter[];\n start?: number;\n stop?: number;\n}\n\nexport interface FixtureResult extends Executable {}\n\nexport interface StepResult extends Executable {}\n\nexport interface TestResult extends Executable {\n uuid: string;\n historyId?: string;\n fullName?: string;\n testCaseId?: string;\n labels: Label[];\n links: Link[];\n}\n\nexport interface TestResultContainer {\n uuid: string;\n name?: string;\n children: string[];\n befores: FixtureResult[];\n afters: FixtureResult[];\n}\n\nexport type TestOrStepResult = StepResult | TestResult;\n\n/* eslint-disable no-shadow */\nexport enum Status {\n FAILED = \"failed\",\n BROKEN = \"broken\",\n PASSED = \"passed\",\n SKIPPED = \"skipped\",\n}\n\nexport const StatusByPriority = [Status.FAILED, Status.BROKEN, Status.PASSED, Status.SKIPPED];\n\n/* eslint-disable no-shadow */\nexport enum Stage {\n SCHEDULED = \"scheduled\",\n RUNNING = \"running\",\n FINISHED = \"finished\",\n PENDING = \"pending\",\n INTERRUPTED = \"interrupted\",\n}\n\n/* eslint-disable no-shadow */\nexport enum LabelName {\n ALLURE_ID = \"ALLURE_ID\",\n /**\n * @deprecated please use ALLURE_ID instead\n */\n AS_ID = ALLURE_ID,\n SUITE = \"suite\",\n PARENT_SUITE = \"parentSuite\",\n SUB_SUITE = \"subSuite\",\n EPIC = \"epic\",\n FEATURE = \"feature\",\n STORY = \"story\",\n SEVERITY = \"severity\",\n TAG = \"tag\",\n OWNER = \"owner\",\n LEAD = \"lead\",\n HOST = \"host\",\n THREAD = \"thread\",\n TEST_METHOD = \"testMethod\",\n TEST_CLASS = \"testClass\",\n PACKAGE = \"package\",\n FRAMEWORK = \"framework\",\n LANGUAGE = \"language\",\n LAYER = \"layer\",\n}\n\n/* eslint-disable no-shadow */\nexport enum Severity {\n BLOCKER = \"blocker\",\n CRITICAL = \"critical\",\n NORMAL = \"normal\",\n MINOR = \"minor\",\n TRIVIAL = \"trivial\",\n}\n\n/* eslint-disable no-shadow */\nexport enum ContentType {\n TEXT = \"text/plain\",\n XML = \"application/xml\",\n HTML = \"text/html\",\n CSV = \"text/csv\",\n TSV = \"text/tab-separated-values\",\n CSS = \"text/css\",\n URI = \"text/uri-list\",\n SVG = \"image/svg+xml\",\n PNG = \"image/png\",\n JSON = \"application/json\",\n ZIP = \"application/zip\",\n WEBM = \"video/webm\",\n JPEG = \"image/jpeg\",\n MP4 = \"video/mp4\",\n IMAGEDIFF = \"application/vnd.allure.image.diff\",\n}\n\n/* eslint-disable no-shadow */\nexport enum LinkType {\n DEFAULT = \"link\",\n ISSUE = \"issue\",\n TMS = \"tms\",\n}\n\nexport interface ImageDiffAttachment {\n expected: string | undefined; // data:image;base64,\n actual: string | undefined; // data:image;base64,\n diff: string | undefined; // data:image;base64,\n name: string;\n}\n", "import type { FixtureResult, Label, StatusDetails, StepResult, TestResult } from \"../model.js\";\nimport { LabelName, Status } from \"../model.js\";\nimport type { RuntimeMessage, SerializeOptions } from \"./types.js\";\n\nexport const getStatusFromError = (error: Error): Status => {\n switch (true) {\n /**\n * Native `node:assert` and `chai` (`vitest` uses it under the hood) throw `AssertionError`\n * `jest` throws `JestAssertionError` instance\n * `jasmine` throws `ExpectationFailed` instance\n * `vitest` throws `Error` for extended assertions, so we look into stack\n */\n case /assert/gi.test(error.constructor.name):\n case /expectation/gi.test(error.constructor.name):\n case /assert/gi.test(error.name):\n case /assert/gi.test(error.message):\n case error.stack && /@vitest\\/expect/gi.test(error.stack):\n return Status.FAILED;\n default:\n return Status.BROKEN;\n }\n};\n\n/**\n * Source: https://github.com/chalk/ansi-regex\n */\nconst ansiRegex = ({ onlyFirst = false } = {}) => {\n const pattern = [\n \"[\\\\u001B\\\\u009B][[\\\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\\\d\\\\/#&.:=?%@~_]+)*|[a-zA-Z\\\\d]+(?:;[-a-zA-Z\\\\d\\\\/#&.:=?%@~_]*)*)?\\\\u0007)\",\n \"(?:(?:\\\\d{1,4}(?:;\\\\d{0,4})*)?[\\\\dA-PR-TZcf-nq-uy=><~]))\",\n ].join(\"|\");\n\n return new RegExp(pattern, onlyFirst ? undefined : \"g\");\n};\n\n/**\n * https://github.com/chalk/strip-ansi\n */\nexport const stripAnsi = (str: string): string => {\n const regex = ansiRegex();\n return str.replace(regex, \"\");\n};\n\nexport const getMessageAndTraceFromError = (\n error: Error | { message?: string; stack?: string },\n): Pick<StatusDetails, \"message\" | \"trace\"> => {\n const { message, stack } = error;\n return {\n message: message ? stripAnsi(message) : undefined,\n trace: stack ? stripAnsi(stack) : undefined,\n };\n};\n\nexport const allureIdRegexp = /(?:^|\\s)@?allure\\.id[:=](?<id>[^\\s]+)/;\nexport const allureIdRegexpGlobal = new RegExp(allureIdRegexp, \"g\");\nexport const allureLabelRegexp = /(?:^|\\s)@?allure\\.label\\.(?<name>[^:=\\s]+)[:=](?<value>[^\\s]+)/;\nexport const allureLabelRegexpGlobal = new RegExp(allureLabelRegexp, \"g\");\n\nexport const isMetadataTag = (tag: string) => {\n return allureIdRegexp.test(tag) || allureLabelRegexp.test(tag);\n};\n\nexport const extractMetadataFromString = (\n title: string,\n): {\n labels: Label[];\n cleanTitle: string;\n} => {\n const labels = [] as Label[];\n\n title.split(\" \").forEach((val) => {\n const idValue = val.match(allureIdRegexp)?.groups?.id;\n\n if (idValue) {\n labels.push({ name: LabelName.ALLURE_ID, value: idValue });\n }\n\n const labelMatch = val.match(allureLabelRegexp);\n const { name, value } = labelMatch?.groups || {};\n\n if (name && value) {\n labels?.push({ name, value });\n }\n });\n\n const cleanTitle = title.replace(allureLabelRegexpGlobal, \"\").replace(allureIdRegexpGlobal, \"\").trim();\n\n return { labels, cleanTitle };\n};\n\nexport const isAnyStepFailed = (item: StepResult | TestResult | FixtureResult): boolean => {\n const isFailed = item.status === Status.FAILED;\n\n if (isFailed || item.steps.length === 0) {\n return isFailed;\n }\n\n return !!item.steps.find((step) => isAnyStepFailed(step));\n};\n\nexport const isAllStepsEnded = (item: StepResult | TestResult | FixtureResult): boolean => {\n return item.steps.every((val) => val.stop && isAllStepsEnded(val));\n};\n\nexport const hasLabel = (testResult: TestResult, labelName: LabelName | string): boolean => {\n return !!testResult.labels.find((l) => l.name === labelName);\n};\n\nexport const hasStepMessage = (messages: RuntimeMessage[]) => {\n return messages.some((message) => message.type === \"step_start\" || message.type === \"step_stop\");\n};\n\nexport const getStepsMessagesPair = (messages: RuntimeMessage[]) =>\n messages.reduce((acc, message) => {\n if (message.type !== \"step_start\" && message.type !== \"step_stop\") {\n return acc;\n }\n\n if (message.type === \"step_start\") {\n acc.push([message]);\n\n return acc;\n }\n\n const unfinishedStepIdx = acc.findLastIndex((step) => step.length === 1);\n\n if (unfinishedStepIdx === -1) {\n return acc;\n }\n\n acc[unfinishedStepIdx].push(message);\n\n return acc;\n }, [] as RuntimeMessage[][]);\n\nexport const getUnfinishedStepsMessages = (messages: RuntimeMessage[]) => {\n const grouppedStepsMessage = getStepsMessagesPair(messages);\n\n return grouppedStepsMessage.filter((step) => step.length === 1);\n};\n\nexport const isPromise = <T = any>(obj: any): obj is PromiseLike<T> =>\n !!obj && (typeof obj === \"object\" || typeof obj === \"function\") && typeof obj.then === \"function\";\n\nexport const serialize = (value: any, { maxDepth = 0, maxLength = 0 }: SerializeOptions = {}): string =>\n limitString(\n typeof value === \"object\" ? JSON.stringify(value, createSerializeReplacer(maxDepth)) : String(value),\n maxLength,\n );\n\nconst createSerializeReplacer = (maxDepth: number) => {\n const parents: any[] = [];\n return function (this: any, _: string, value: unknown) {\n if (typeof value !== \"object\" || value === null) {\n return value;\n }\n\n while (parents.length > 0 && !Object.is(parents.at(-1), this)) {\n parents.pop();\n }\n\n if ((maxDepth && parents.length >= maxDepth) || parents.includes(value)) {\n return undefined;\n }\n\n parents.push(value);\n\n return value instanceof Map\n ? excludeCircularRefsFromMap(parents, value)\n : value instanceof Set\n ? excludeCircularRefsFromSet(parents, value)\n : value;\n };\n};\n\nconst excludeCircularRefsFromMap = (parents: any[], map: Map<any, any>) => {\n return Array.from(map)\n .filter(([k]) => !parents.includes(k))\n .map(([k, v]) => [k, parents.includes(v) ? undefined : v]);\n};\n\nconst excludeCircularRefsFromSet = (parents: any[], set: Set<any>) => {\n return Array.from(set).map((v) => (parents.includes(v) ? undefined : v));\n};\n\nconst limitString = (value: string, maxLength: number) =>\n maxLength && value.length > maxLength ? `${value.substring(0, maxLength)}...` : value;\n", "import type { Label, Status, StatusDetails } from \"allure-js-commons\";\nimport type { RuntimeMessage, TestPlanV1 } from \"allure-js-commons/sdk\";\nimport type { ReporterConfig } from \"allure-js-commons/sdk/reporter\";\n\nexport const ALLURE_REPORT_SYSTEM_HOOK = \"__allure_report_system_hook__\";\n\nexport const ALLURE_REPORT_STEP_COMMAND = \"__allure_report_step_command__\";\n\nexport type AllureCypressConfig = ReporterConfig & {\n videoOnFailOnly?: boolean;\n stepsFromCommands?: Partial<AllureSpecState[\"config\"][\"stepsFromCommands\"]>;\n};\n\nexport type CypressSuite = Mocha.Suite & {\n id: string;\n parent: CypressSuite | undefined;\n tests: CypressTest[];\n suites: CypressSuite[];\n};\n\nexport type CypressTest = Mocha.Test & {\n wallClockStartedAt?: Date;\n parent: CypressSuite | undefined;\n};\n\nexport type CypressHook = Mocha.Hook & {\n hookId: string;\n hookName: string;\n parent: CypressSuite | undefined;\n};\n\nexport type CypressCommand = {\n attributes: {\n name: string;\n id: string;\n args: any[];\n };\n state: \"passed\" | \"failed\" | \"queued\";\n};\n\nexport type CupressRunStart = {\n type: \"cypress_run_start\";\n data: object;\n};\n\nexport type CypressSuiteStartMessage = {\n type: \"cypress_suite_start\";\n data: {\n id: string;\n name: string;\n root: boolean;\n start: number;\n };\n};\n\nexport type CypressSuiteEndMessage = {\n type: \"cypress_suite_end\";\n data: {\n root: boolean;\n stop: number;\n };\n};\n\nexport type CypressHookStartMessage = {\n type: \"cypress_hook_start\";\n data: {\n name: string;\n scopeType: \"each\" | \"all\";\n position: \"before\" | \"after\";\n start: number;\n };\n};\n\nexport type CypressHookEndMessage = {\n type: \"cypress_hook_end\";\n data: {\n duration: number;\n };\n};\n\nexport type CypressTestStartMessage = {\n type: \"cypress_test_start\";\n data: {\n name: string;\n fullNameSuffix: string;\n start: number;\n labels: Label[];\n };\n};\n\nexport type CypressFailMessage = {\n type: \"cypress_fail\";\n data: {\n status: Status;\n statusDetails: StatusDetails;\n };\n};\n\nexport type CypressTestSkipMessage = {\n type: \"cypress_test_skip\";\n data: {\n statusDetails?: StatusDetails;\n };\n};\n\nexport type CypressTestPassMessage = {\n type: \"cypress_test_pass\";\n data: object;\n};\n\nexport type CypressSkippedTestMessage = {\n type: \"cypress_skipped_test\";\n data: CypressTestStartMessage[\"data\"] &\n CypressFailMessage[\"data\"] &\n CypressTestEndMessage[\"data\"] & {\n suites: string[];\n };\n};\n\nexport type CypressTestEndMessage = {\n type: \"cypress_test_end\";\n data: {\n duration: number;\n retries: number;\n };\n};\n\nexport type CypressCommandStartMessage = {\n type: \"cypress_command_start\";\n data: {\n name: string;\n args: string[];\n start: number;\n };\n};\n\nexport type CypressCommandEndMessage = {\n type: \"cypress_command_end\";\n data: {\n status: Status;\n statusDetails?: StatusDetails;\n stop: number;\n };\n};\n\nexport type CypressMessage =\n | RuntimeMessage\n | CupressRunStart\n | CypressSuiteStartMessage\n | CypressSuiteEndMessage\n | CypressHookStartMessage\n | CypressHookEndMessage\n | CypressTestStartMessage\n | CypressCommandStartMessage\n | CypressCommandEndMessage\n | CypressTestPassMessage\n | CypressFailMessage\n | CypressTestSkipMessage\n | CypressSkippedTestMessage\n | CypressTestEndMessage;\n\nexport type SpecContext = {\n specPath: string;\n test: string | undefined;\n fixture: string | undefined;\n commandSteps: string[];\n videoScope: string;\n suiteIdToScope: Map<string, string>;\n suiteScopeToId: Map<string, string>;\n suiteScopes: string[];\n testScope: string | undefined;\n suiteNames: string[];\n failed: boolean;\n};\n\nexport type AllureSpecState = {\n config: {\n stepsFromCommands: {\n maxArgumentLength: number;\n maxArgumentDepth: number;\n };\n };\n initialized: boolean;\n testPlan: TestPlanV1 | null | undefined;\n projectDir?: string;\n messages: CypressMessage[];\n currentTest?: CypressTest;\n};\n\nexport type AllureCypressTaskArgs = {\n absolutePath: string;\n messages: readonly CypressMessage[];\n isInteractive: boolean;\n};\n\nexport type CypressSuiteFunction = (\n title: string,\n configOrFn?: Cypress.SuiteConfigOverrides | ((this: Mocha.Suite) => void),\n fn?: (this: Mocha.Suite) => void,\n) => Mocha.Suite;\n\nexport type DirectHookImplementation = Mocha.AsyncFunc | ((this: Mocha.Context) => void);\nexport type HookImplementation = Mocha.Func | DirectHookImplementation;\n", "import type { TestRuntime } from \"./types.js\";\n\nexport class NoopTestRuntime implements TestRuntime {\n async attachment() {\n await this.warning();\n }\n\n async attachmentFromPath() {\n await this.warning();\n }\n\n async description() {\n await this.warning();\n }\n\n async descriptionHtml() {\n await this.warning();\n }\n\n async displayName() {\n await this.warning();\n }\n\n async historyId() {\n await this.warning();\n }\n\n async labels() {\n await this.warning();\n }\n\n async links() {\n await this.warning();\n }\n\n async parameter() {\n await this.warning();\n }\n\n async logStep() {\n await this.warning();\n }\n\n async step<T>(name: string, body: () => T | PromiseLike<T>): Promise<T> {\n await this.warning();\n return body();\n }\n\n async stepDisplayName() {\n await this.warning();\n }\n\n async stepParameter() {\n await this.warning();\n }\n\n async testCaseId() {\n await this.warning();\n }\n\n // eslint-disable-next-line @typescript-eslint/require-await\n async warning() {\n // eslint-disable-next-line no-console\n console.log(\"no test runtime is found. Please check test framework configuration\");\n }\n}\n\nexport const noopRuntime: TestRuntime = new NoopTestRuntime();\n", "import { noopRuntime } from \"./NoopTestRuntime.js\";\nimport type { TestRuntime } from \"./types.js\";\n\nconst ALLURE_TEST_RUNTIME_KEY = \"allureTestRuntime\";\n\nexport const setGlobalTestRuntime = (runtime: TestRuntime) => {\n (globalThis as any)[ALLURE_TEST_RUNTIME_KEY] = () => runtime;\n};\n\nconst getGlobalTestRuntimeFunction = () => {\n return (globalThis as any)?.[ALLURE_TEST_RUNTIME_KEY] as (() => TestRuntime | undefined) | undefined;\n};\n\nexport const getGlobalTestRuntime = (): TestRuntime => {\n const testRuntime = getGlobalTestRuntimeFunction();\n\n if (testRuntime) {\n return testRuntime() ?? noopRuntime;\n }\n\n return noopRuntime;\n};\n\nexport const getGlobalTestRuntimeWithAutoconfig = (): TestRuntime | Promise<TestRuntime> => {\n const testRuntime = getGlobalTestRuntimeFunction();\n\n if (testRuntime) {\n return testRuntime() ?? noopRuntime;\n }\n\n if (\"_playwrightInstance\" in globalThis) {\n try {\n // protection from bundlers tree-shaking visiting (webpack, rollup)\n // @ts-ignore\n // eslint-disable-next-line no-eval\n return (0, eval)(\"(() => import('allure-playwright/autoconfig'))()\").then(() => {\n return getGlobalTestRuntimeFunction()?.() ?? noopRuntime;\n });\n } catch (err) {\n // eslint-disable-next-line no-console\n console.log(\"can't execute allure-playwright/autoconfig\", err);\n return noopRuntime;\n }\n }\n\n return noopRuntime;\n};\n", "import type { Status } from \"./model.js\";\nimport { type ContentType } from \"./model.js\";\nimport { type AttachmentOptions, type Label, type Link, type ParameterMode, type ParameterOptions } from \"./model.js\";\nimport { LabelName, LinkType } from \"./model.js\";\nimport { getGlobalTestRuntimeWithAutoconfig } from \"./sdk/runtime/runtime.js\";\nimport type { TestRuntime } from \"./sdk/runtime/types.js\";\nimport { isPromise } from \"./sdk/utils.js\";\n\nconst callRuntimeMethod = <\n T extends keyof TestRuntime,\n S extends Parameters<TestRuntime[T]>,\n R extends ReturnType<TestRuntime[T]>,\n>(\n method: T,\n ...args: S\n): R => {\n const runtime = getGlobalTestRuntimeWithAutoconfig();\n\n if (!isPromise(runtime)) {\n // @ts-ignore\n return runtime[method](...args);\n }\n\n return runtime.then((testRuntime) => {\n // @ts-ignore\n return testRuntime[method](...args);\n }) as R;\n};\n\nexport const label = (name: LabelName | string, value: string) => {\n return callRuntimeMethod(\"labels\", { name, value });\n};\n\nexport const labels = (...labelsList: Label[]) => {\n return callRuntimeMethod(\"labels\", ...labelsList);\n};\n\nexport const link = (url: string, name?: string, type?: LinkType | string) => {\n return callRuntimeMethod(\"links\", { url, type, name });\n};\n\nexport const links = (...linksList: Link[]) => {\n return callRuntimeMethod(\"links\", ...linksList);\n};\n\nexport const parameter = (name: string, value: string, options?: ParameterOptions) => {\n return callRuntimeMethod(\"parameter\", name, value, options);\n};\n\nexport const description = (markdown: string) => {\n return callRuntimeMethod(\"description\", markdown);\n};\n\nexport const descriptionHtml = (html: string) => {\n return callRuntimeMethod(\"descriptionHtml\", html);\n};\n\nexport const displayName = (name: string) => {\n return callRuntimeMethod(\"displayName\", name);\n};\n\nexport const historyId = (value: string) => {\n return callRuntimeMethod(\"historyId\", value);\n};\n\nexport const testCaseId = (value: string) => {\n return callRuntimeMethod(\"testCaseId\", value);\n};\n\nexport const attachment = (\n name: string,\n content: Buffer | string,\n options: ContentType | string | AttachmentOptions,\n) => {\n const opts = typeof options === \"string\" ? { contentType: options } : options;\n return callRuntimeMethod(\"attachment\", name, content, opts);\n};\n\nexport const attachmentPath = (\n name: string,\n path: string,\n options: ContentType | string | Omit<AttachmentOptions, \"encoding\">,\n) => {\n const opts = typeof options === \"string\" ? { contentType: options } : options;\n return callRuntimeMethod(\"attachmentFromPath\", name, path, opts);\n};\n\nexport type StepContext = {\n displayName: (name: string) => void | PromiseLike<void>;\n parameter: (name: string, value: string, mode?: ParameterMode) => void | PromiseLike<void>;\n};\n\nconst stepContext: () => StepContext = () => ({\n displayName: (name: string) => {\n return callRuntimeMethod(\"stepDisplayName\", name);\n },\n parameter: (name, value, mode?) => {\n return callRuntimeMethod(\"stepParameter\", name, value, mode);\n },\n});\n\nexport const logStep = (name: string, status?: Status, error?: Error): PromiseLike<void> => {\n return callRuntimeMethod(\"logStep\", name, status, error);\n};\n\nexport const step = <T = void>(name: string, body: (context: StepContext) => T | PromiseLike<T>): PromiseLike<T> => {\n return callRuntimeMethod(\"step\", name, () => body(stepContext()));\n};\n\nexport const issue = (url: string, name?: string) => link(url, name, LinkType.ISSUE);\n\nexport const tms = (url: string, name?: string) => link(url, name, LinkType.TMS);\n\nexport const allureId = (value: string) => label(LabelName.ALLURE_ID, value);\n\nexport const epic = (name: string) => label(LabelName.EPIC, name);\n\nexport const feature = (name: string) => label(LabelName.FEATURE, name);\n\nexport const story = (name: string) => label(LabelName.STORY, name);\n\nexport const suite = (name: string) => label(LabelName.SUITE, name);\n\nexport const parentSuite = (name: string) => label(LabelName.PARENT_SUITE, name);\n\nexport const subSuite = (name: string) => label(LabelName.SUB_SUITE, name);\n\nexport const owner = (name: string) => label(LabelName.OWNER, name);\n\nexport const severity = (name: string) => label(LabelName.SEVERITY, name);\n\nexport const layer = (name: string) => label(LabelName.LAYER, name);\n\nexport const tag = (name: string) => label(LabelName.TAG, name);\n\nexport const tags = (...tagsList: string[]) => {\n return callRuntimeMethod(\"labels\", ...tagsList.map((value) => ({ name: LabelName.TAG, value })));\n};\n", "import { LabelName, Status } from \"allure-js-commons\";\nimport { extractMetadataFromString, getMessageAndTraceFromError, getStatusFromError } from \"allure-js-commons/sdk\";\nimport type { TestPlanV1 } from \"allure-js-commons/sdk\";\nimport { ALLURE_REPORT_STEP_COMMAND, ALLURE_REPORT_SYSTEM_HOOK } from \"./model.js\";\nimport type { CypressCommand, CypressHook, CypressSuite, CypressTest } from \"./model.js\";\nimport { getAllureTestPlan, getProjectDir } from \"./state.js\";\n\nexport const DEFAULT_RUNTIME_CONFIG = {\n stepsFromCommands: {\n maxArgumentLength: 128,\n maxArgumentDepth: 3,\n },\n};\n\nexport const uint8ArrayToBase64 = (data: unknown) => {\n // @ts-ignore\n const u8arrayLike = Array.isArray(data) || data.buffer;\n\n if (!u8arrayLike) {\n return data as string;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n return btoa(String.fromCharCode.apply(null, data as number[]));\n};\n\nexport const getSuites = (test: CypressTest) => {\n const suites: CypressSuite[] = [];\n for (let s: CypressSuite | undefined = test.parent; s; s = s.parent) {\n suites.push(s);\n }\n suites.reverse();\n return suites;\n};\n\nexport const getSuitePath = (test: CypressTest): string[] =>\n getSuites(test)\n .filter((s) => s.title)\n .map((s) => s.title);\n\nexport const shouldCommandBeSkipped = (command: CypressCommand) => {\n if (last(command.attributes.args)?.log === false) {\n return true;\n }\n\n if (command.attributes.name === \"task\" && command.attributes.args[0] === \"reportAllureRuntimeMessages\") {\n return true;\n }\n\n // we don't need to report then commands because it's just a promise handle\n if (command.attributes.name === \"then\") {\n return true;\n }\n\n // we should skip artificial wrap from allure steps\n if (command.attributes.name === \"wrap\" && command.attributes.args[0] === ALLURE_REPORT_STEP_COMMAND) {\n return true;\n }\n\n return false;\n};\n\nexport const toReversed = <T = unknown>(arr: T[]): T[] => {\n const result: T[] = [];\n\n for (let i = arr.length - 1; i >= 0; i--) {\n result.push(arr[i]);\n }\n\n return result;\n};\n\nexport const last = <T = unknown>(arr: T[]): T | undefined => {\n return arr[arr.length - 1];\n};\n\nconst resolveSpecRelativePath = (spec: Cypress.Spec) => {\n const projectDir = getProjectDir();\n const specPath = projectDir ? spec.absolute.substring(projectDir.length + 1) : spec.relative;\n const win = Cypress.platform === \"win32\";\n return win ? specPath.replaceAll(\"\\\\\", \"/\") : specPath;\n};\n\nexport const getNamesAndLabels = (spec: Cypress.Spec, test: CypressTest) => {\n const rawName = test.title;\n const { cleanTitle: name, labels } = extractMetadataFromString(rawName);\n const suites = test.titlePath().slice(0, -1);\n const fullNameSuffix = `${[...suites, name].join(\" \")}`;\n return { name, labels, fullNameSuffix };\n};\n\nexport const getTestStartData = (test: CypressTest) => ({\n ...getNamesAndLabels(Cypress.spec, test),\n start: test.wallClockStartedAt?.getTime() || Date.now(),\n});\n\nexport const getTestStopData = (test: CypressTest) => ({\n duration: test.duration ?? 0,\n retries: (test as any)._retries ?? 0,\n});\n\nexport const getTestSkipData = () => ({\n statusDetails: { message: \"This is a pending test\" },\n});\n\nexport const applyTestPlan = (spec: Cypress.Spec, root: CypressSuite) => {\n const testPlan = getAllureTestPlan();\n if (testPlan) {\n const specPath = resolveSpecRelativePath(spec);\n for (const suite of iterateSuites(root)) {\n const indicesToRemove = getIndicesOfDeselectedTests(testPlan, spec, specPath, suite.tests);\n removeSortedIndices(suite.tests, indicesToRemove);\n }\n }\n};\n\nexport const resolveStatusWithDetails = (error: Error | undefined) =>\n error\n ? {\n status: getStatusFromError(error),\n statusDetails: getMessageAndTraceFromError(error),\n }\n : { status: Status.PASSED };\n\nconst testReportedKey = Symbol(\"The test was reported to Allure\");\n\nexport const markTestAsReported = (test: CypressTest) => {\n (test as any)[testReportedKey] = true;\n};\n\nexport const isTestReported = (test: CypressTest) => (test as any)[testReportedKey] === true;\n\nexport const iterateSuites = function* (parent: CypressSuite) {\n const suiteStack: CypressSuite[] = [];\n for (let s: CypressSuite | undefined = parent; s; s = suiteStack.pop()) {\n yield s;\n\n // Pushing in reverse allows us to maintain depth-first pre-order traversal -\n // the same order as used by Mocha & Cypress.\n for (let i = s.suites.length - 1; i >= 0; i--) {\n suiteStack.push(s.suites[i]);\n }\n }\n};\n\nexport const iterateTests = function* (parent: CypressSuite) {\n for (const suite of iterateSuites(parent)) {\n yield* suite.tests;\n }\n};\n\nexport const isAllureHook = (hook: CypressHook) => hook.title.includes(ALLURE_REPORT_SYSTEM_HOOK);\n\nexport const isRootAfterAllHook = (hook: CypressHook) => hook.parent!.root && hook.hookName === \"after all\";\n\nconst includedInTestPlan = (testPlan: TestPlanV1, fullName: string, allureId: string | undefined): boolean =>\n testPlan.tests.some((test) => (allureId && test.id?.toString() === allureId) || test.selector === fullName);\n\nconst getIndicesOfDeselectedTests = (\n testPlan: TestPlanV1,\n spec: Cypress.Spec,\n specPath: string,\n tests: readonly CypressTest[],\n) => {\n const indicesToRemove: number[] = [];\n tests.forEach((test, index) => {\n const { fullNameSuffix, labels } = getNamesAndLabels(spec, test);\n const fullName = `${specPath}#${fullNameSuffix}`;\n const allureId = labels.find(({ name }) => name === LabelName.ALLURE_ID)?.value;\n\n if (!includedInTestPlan(testPlan, fullName, allureId)) {\n indicesToRemove.push(index);\n }\n });\n return indicesToRemove;\n};\n\nconst removeSortedIndices = <T>(arr: T[], indices: readonly number[]) => {\n for (let i = indices.length - 1; i >= 0; i--) {\n arr.splice(indices[i], 1);\n }\n};\n", "import type { AllureSpecState, CypressMessage, CypressTest } from \"./model.js\";\nimport { DEFAULT_RUNTIME_CONFIG } from \"./utils.js\";\n\nexport const getAllureState = () => {\n let state = Cypress.env(\"allure\") as AllureSpecState;\n if (!state) {\n state = {\n config: DEFAULT_RUNTIME_CONFIG,\n initialized: false,\n messages: [],\n testPlan: undefined,\n currentTest: undefined,\n projectDir: undefined,\n };\n Cypress.env(\"allure\", state);\n }\n return state;\n};\n\nexport const isAllureInitialized = () => getAllureState().initialized;\n\nexport const setAllureInitialized = () => {\n getAllureState().initialized = true;\n};\n\nexport const getRuntimeMessages = () => getAllureState().messages;\n\nexport const setRuntimeMessages = (value: CypressMessage[]) => {\n getAllureState().messages = value;\n};\n\nexport const enqueueRuntimeMessage = (message: CypressMessage) => {\n getRuntimeMessages().push(message);\n};\n\nexport const getAllureTestPlan = () => getAllureState().testPlan;\n\nexport const getProjectDir = () => getAllureState().projectDir;\n\nexport const getCurrentTest = () => getAllureState().currentTest;\n\nexport const setCurrentTest = (test: CypressTest) => {\n getAllureState().currentTest = test;\n};\n\nexport const dropCurrentTest = () => {\n getAllureState().currentTest = undefined;\n};\n\nexport const getConfig = () => getAllureState().config;\n", "import { ContentType, Status } from \"allure-js-commons\";\nimport type { AttachmentOptions, Label, Link, ParameterMode, ParameterOptions, StatusDetails } from \"allure-js-commons\";\nimport {\n getMessageAndTraceFromError,\n getStatusFromError,\n getUnfinishedStepsMessages,\n isPromise,\n serialize,\n} from \"allure-js-commons/sdk\";\nimport type { RuntimeMessage } from \"allure-js-commons/sdk\";\nimport { getGlobalTestRuntime, setGlobalTestRuntime } from \"allure-js-commons/sdk/runtime\";\nimport type { TestRuntime } from \"allure-js-commons/sdk/runtime\";\nimport type {\n AllureCypressTaskArgs,\n CypressCommand,\n CypressCommandEndMessage,\n CypressFailMessage,\n CypressHook,\n CypressMessage,\n CypressSuite,\n CypressSuiteFunction,\n CypressTest,\n DirectHookImplementation,\n HookImplementation,\n} from \"./model.js\";\nimport { ALLURE_REPORT_STEP_COMMAND } from \"./model.js\";\nimport {\n dropCurrentTest,\n enqueueRuntimeMessage,\n getConfig,\n getCurrentTest,\n getRuntimeMessages,\n setCurrentTest,\n setRuntimeMessages,\n} from \"./state.js\";\nimport {\n getSuites,\n getTestSkipData,\n getTestStartData,\n getTestStopData,\n isAllureHook,\n isTestReported,\n iterateTests,\n markTestAsReported,\n uint8ArrayToBase64,\n} from \"./utils.js\";\n\nexport class AllureCypressTestRuntime implements TestRuntime {\n constructor() {\n this.#resetMessages();\n }\n\n labels(...labels: Label[]) {\n return this.#enqueueMessageAsync({\n type: \"metadata\",\n data: {\n labels,\n },\n });\n }\n\n links(...links: Link[]) {\n return this.#enqueueMessageAsync({\n type: \"metadata\",\n data: {\n links,\n },\n });\n }\n\n parameter(name: string, value: string, options?: ParameterOptions) {\n return this.#enqueueMessageAsync({\n type: \"metadata\",\n data: {\n parameters: [\n {\n name,\n value,\n ...options,\n },\n ],\n },\n });\n }\n\n description(markdown: string) {\n return this.#enqueueMessageAsync({\n type: \"metadata\",\n data: {\n description: markdown,\n },\n });\n }\n\n descriptionHtml(html: string) {\n return this.#enqueueMessageAsync({\n type: \"metadata\",\n data: {\n descriptionHtml: html,\n },\n });\n }\n\n displayName(name: string) {\n return this.#enqueueMessageAsync({\n type: \"metadata\",\n data: {\n displayName: name,\n },\n });\n }\n\n historyId(value: string) {\n return this.#enqueueMessageAsync({\n type: \"metadata\",\n data: {\n historyId: value,\n },\n });\n }\n\n testCaseId(value: string) {\n return this.#enqueueMessageAsync({\n type: \"metadata\",\n data: {\n testCaseId: value,\n },\n });\n }\n\n // @ts-ignore\n attachment(name: string, content: string, options: AttachmentOptions) {\n // @ts-ignore\n const attachmentRawContent: string | Uint8Array = content?.type === \"Buffer\" ? content.data : content;\n const actualEncoding = typeof attachmentRawContent === \"string\" ? \"utf8\" : \"base64\";\n const attachmentContent = uint8ArrayToBase64(attachmentRawContent);\n\n return this.#enqueueMessageAsync({\n type: \"attachment_content\",\n data: {\n name,\n content: attachmentContent,\n encoding: actualEncoding,\n contentType: options.contentType,\n fileExtension: options.fileExtension,\n },\n });\n }\n\n attachmentFromPath(name: string, path: string, options: Omit<AttachmentOptions, \"encoding\">) {\n return this.#enqueueMessageAsync({\n type: \"attachment_path\",\n data: {\n name,\n path,\n contentType: options.contentType,\n fileExtension: options.fileExtension,\n },\n });\n }\n\n logStep(name: string, status: Status = Status.PASSED, error?: Error) {\n return cy\n .wrap(ALLURE_REPORT_STEP_COMMAND, { log: false })\n .then(() => {\n this.#enqueueMessageAsync({\n type: \"step_start\",\n data: {\n name,\n start: Date.now(),\n },\n });\n\n return Cypress.Promise.resolve();\n })\n .then(() => {\n return this.#enqueueMessageAsync({\n type: \"step_stop\",\n data: {\n status: status,\n stop: Date.now(),\n statusDetails: error ? { ...getMessageAndTraceFromError(error) } : undefined,\n },\n });\n });\n }\n\n step<T = void>(name: string, body: () => T | PromiseLike<T>) {\n return cy\n .wrap(ALLURE_REPORT_STEP_COMMAND, { log: false })\n .then(() => {\n this.#enqueueMessageAsync({\n type: \"step_start\",\n data: {\n name,\n start: Date.now(),\n },\n });\n\n return Cypress.Promise.resolve(body());\n })\n .then((result) => {\n return this.#enqueueMessageAsync({\n type: \"step_stop\",\n data: {\n status: Status.PASSED,\n stop: Date.now(),\n },\n }).then(() => result);\n });\n }\n\n stepDisplayName(name: string) {\n return this.#enqueueMessageAsync({\n type: \"step_metadata\",\n data: {\n name,\n },\n });\n }\n\n stepParameter(name: string, value: string, mode?: ParameterMode) {\n return this.#enqueueMessageAsync({\n type: \"step_metadata\",\n data: {\n parameters: [{ name, value, mode }],\n },\n });\n }\n\n flushAllureMessagesToTask = (taskName: string) => {\n const messages = this.#dequeueAllMessages();\n if (messages.length) {\n cy.task(taskName, { absolutePath: Cypress.spec.absolute, messages }, { log: false });\n }\n };\n\n flushAllureMessagesToTaskAsync = (taskName: string): Cypress.Chainable<unknown> | undefined => {\n const messages = this.#dequeueAllMessages();\n if (messages.length) {\n const args: AllureCypressTaskArgs = {\n absolutePath: Cypress.spec.absolute,\n messages,\n isInteractive: Cypress.config(\"isInteractive\"),\n };\n return cy.task(taskName, args, { log: false });\n }\n };\n\n #resetMessages = () => setRuntimeMessages([]);\n\n #enqueueMessageAsync = (message: CypressMessage): PromiseLike<void> => {\n enqueueRuntimeMessage(message);\n return Cypress.Promise.resolve();\n };\n\n #dequeueAllMessages = () => {\n const messages = getRuntimeMessages();\n this.#resetMessages();\n return messages;\n };\n}\n\nexport const initTestRuntime = () => setGlobalTestRuntime(new AllureCypressTestRuntime() as TestRuntime);\n\nexport const getTestRuntime = () => getGlobalTestRuntime() as AllureCypressTestRuntime;\n\nexport const reportRunStart = () => {\n enqueueRuntimeMessage({\n type: \"cypress_run_start\",\n data: {},\n });\n};\n\nexport const reportSuiteStart = (suite: CypressSuite) => {\n enqueueRuntimeMessage({\n type: \"cypress_suite_start\",\n data: {\n id: suite.id,\n name: suite.title,\n root: suite.root,\n start: Date.now(),\n },\n });\n};\n\nexport const reportSuiteEnd = (suite: CypressSuite) => {\n enqueueRuntimeMessage({\n type: \"cypress_suite_end\",\n data: {\n root: suite.root,\n stop: Date.now(),\n },\n });\n};\n\nexport const reportHookStart = (hook: CypressHook, start?: number) => {\n enqueueRuntimeMessage({\n type: \"cypress_hook_start\",\n data: {\n name: hook.title,\n scopeType: hook.hookName.includes(\"each\") ? \"each\" : \"all\",\n position: hook.hookName.includes(\"before\") ? \"before\" : \"after\",\n start: start ?? Date.now(),\n },\n });\n};\n\nexport const reportHookEnd = (hook: CypressHook) => {\n enqueueRuntimeMessage({\n type: \"cypress_hook_end\",\n data: {\n duration: hook.duration ?? 0,\n },\n });\n};\n\nexport const reportTestStart = (test: CypressTest) => {\n setCurrentTest(test);\n enqueueRuntimeMessage({\n type: \"cypress_test_start\",\n data: getTestStartData(test),\n });\n markTestAsReported(test);\n};\n\nexport const reportUnfinishedSteps = (status: Status, statusDetails?: StatusDetails) => {\n const runtimeMessages = getRuntimeMessages() as RuntimeMessage[];\n const unfinishedStepsMessages = getUnfinishedStepsMessages(runtimeMessages);\n unfinishedStepsMessages.forEach(() => {\n enqueueRuntimeMessage({\n type: \"step_stop\",\n data: {\n stop: Date.now(),\n status,\n statusDetails,\n },\n });\n });\n};\n\nexport const reportTestPass = () => {\n reportUnfinishedSteps(Status.PASSED);\n enqueueRuntimeMessage({\n type: \"cypress_test_pass\",\n data: {},\n });\n};\n\nexport const reportTestSkip = (test: CypressTest) => {\n if (isTestReported(test)) {\n reportUnfinishedCommand(Status.SKIPPED, {\n message: \"The test was skipped before the command was completed\",\n });\n } else {\n reportTestStart(test);\n }\n\n enqueueRuntimeMessage({\n type: \"cypress_test_skip\",\n data: getTestSkipData(),\n });\n};\n\nexport const reportCommandStart = (command: CypressCommand) => {\n const {\n stepsFromCommands: { maxArgumentDepth, maxArgumentLength },\n } = getConfig();\n enqueueRuntimeMessage({\n type: \"cypress_command_start\",\n data: {\n name: `Command \"${command.attributes.name}\"`,\n args: command.attributes.args.map((arg) =>\n serialize(arg, { maxDepth: maxArgumentDepth, maxLength: maxArgumentLength }),\n ),\n start: Date.now(),\n },\n });\n};\n\nexport const reportCommandEnd = () => {\n enqueueRuntimeMessage({\n type: \"cypress_command_end\",\n data: {\n status: Status.PASSED,\n stop: Date.now(),\n },\n });\n};\n\nexport const reportScreenshot = (path: string, name: string) => {\n enqueueRuntimeMessage({\n type: \"attachment_path\",\n data: {\n path: path,\n name: name || \"Screenshot\",\n contentType: ContentType.PNG,\n },\n });\n};\n\nexport const reportUnfinishedCommand = (status: Status, statusDetails?: StatusDetails) => {\n const runtimeMessages = getRuntimeMessages();\n const startCommandMessageIdx = runtimeMessages.toReversed().findIndex(({ type }) => type === \"cypress_command_start\");\n const stopCommandMessageIdx = runtimeMessages.toReversed().findIndex(({ type }) => type === \"cypress_command_end\");\n const hasUnfinishedCommand = startCommandMessageIdx > stopCommandMessageIdx;\n\n const data: CypressCommandEndMessage[\"data\"] = { status, stop: Date.now() };\n if (statusDetails) {\n data.statusDetails = statusDetails;\n }\n\n if (hasUnfinishedCommand) {\n enqueueRuntimeMessage({ type: \"cypress_command_end\", data });\n }\n};\n\nexport const reportTestOrHookFail = (err: Error) => {\n const status = getStatusFromError(err);\n const statusDetails = getMessageAndTraceFromError(err);\n\n reportUnfinishedCommand(status, statusDetails);\n\n enqueueRuntimeMessage({\n type: \"cypress_fail\",\n data: {\n status,\n statusDetails,\n },\n });\n};\n\nexport const reportTestEnd = (test: CypressTest) => {\n enqueueRuntimeMessage({\n type: \"cypress_test_end\",\n data: {\n duration: test.duration ?? 0,\n retries: (test as any)._retries ?? 0,\n },\n });\n dropCurrentTest();\n};\n\nexport const completeHookErrorReporting = (hook: CypressHook, err: Error) => {\n const isEachHook = hook.hookName.includes(\"each\");\n const suite = hook.parent!;\n const testFailData = getStatusDataOfTestSkippedByHookError(hook.title, isEachHook, err, suite);\n\n // Cypress doens't emit 'hook end' if the hook has failed.\n reportHookEnd(hook);\n\n // Cypress doens't emit 'test end' if the hook has failed.\n // We must report the test's end manualy in case of a 'before each' hook.\n reportCurrentTestIfAny();\n\n // Cypress skips the remaining tests in the suite of a failed hook.\n // We should include them to the report manually.\n reportRemainingTests(suite, testFailData);\n};\n\n/**\n * Patches the `after` function, to inject an extra `after` hook after each spec-level\n * `after` hook defined by the user.\n */\nexport const enableScopeLevelAfterHookReporting = () => {\n const [getSuiteDepth, incSuiteDepth, decSuiteDepth] = createSuiteDepthCounterState();\n patchDescribe(incSuiteDepth, decSuiteDepth);\n patchAfter(getSuiteDepth);\n};\n\nexport const flushRuntimeMessages = () => getTestRuntime().flushAllureMessagesToTask(\"reportAllureCypressSpecMessages\");\n\nexport const completeSpec = () =>\n getTestRuntime().flushAllureMessagesToTaskAsync(\"reportFinalAllureCypressSpecMessages\");\n\nexport const completeSpecIfNoAfterHookLeft = (context: Mocha.Context) => {\n if (isLastRootAfterHook(context)) {\n const hook = context.test as CypressHook;\n if (!isAllureHook(hook)) {\n reportHookEnd(hook);\n }\n return completeSpec();\n }\n};\n\nconst completeSpecOnAfterHookFailure = (\n context: Mocha.Context,\n hookError: Error,\n): Cypress.Chainable<unknown> | undefined => {\n try {\n reportTestOrHookFail(hookError);\n completeHookErrorReporting(context.test as CypressHook, hookError);\n\n // cy.task's then doesn't have onrejected, that's why we don't log async Allure errors here.\n return completeSpec();\n } catch (allureError) {\n logAllureRootAfterError(context, allureError);\n }\n};\n\nconst reportCurrentTestIfAny = () => {\n const currentTest = getCurrentTest();\n if (currentTest) {\n reportTestEnd(currentTest);\n }\n};\n\nconst reportRemainingTests = (suite: CypressSuite, testFailData: CypressFailMessage[\"data\"]) => {\n for (const test of iterateTests(suite)) {\n // Some tests in the suite might've been already reported.\n if (!isTestReported(test)) {\n reportTestsSkippedByHookError(\n test,\n test.pending ? { ...getTestSkipData(), status: Status.SKIPPED } : testFailData,\n );\n }\n }\n};\n\nconst reportTestsSkippedByHookError = (test: CypressTest, testFailData: CypressFailMessage[\"data\"]) => {\n enqueueRuntimeMessage({\n type: \"cypress_skipped_test\",\n data: {\n ...getTestStartData(test),\n ...testFailData,\n ...getTestStopData(test),\n suites: getSuites(test).map((s) => s.id),\n },\n });\n markTestAsReported(test);\n};\n\nconst getStatusDataOfTestSkippedByHookError = (\n hookTitle: string,\n isEachHook: boolean,\n err: Error,\n suite: CypressSuite,\n) => {\n const status = isEachHook ? Status.SKIPPED : getStatusFromError(err);\n const { message, trace } = getMessageAndTraceFromError(err);\n return {\n status,\n statusDetails: {\n message: isEachHook ? getSkipReason(hookTitle, suite) : message,\n trace,\n },\n };\n};\n\nconst getSkipReason = (hookTitle: string, suite: CypressSuite) => {\n const suiteName = suite.title ? `'${suite.title}'` : \"root\";\n return `'${hookTitle}' defined in the ${suiteName} suite has failed`;\n};\n\nconst forwardDescribeCall = (target: CypressSuiteFunction, ...args: Parameters<CypressSuiteFunction>) => {\n const [title, configOrFn, fn] = args;\n if (typeof fn === \"undefined\" && typeof configOrFn === \"undefined\") {\n return target(title);\n } else if (typeof configOrFn === \"function\") {\n return target(title, configOrFn);\n } else {\n return target(title, configOrFn, fn);\n }\n};\n\nconst patchDescribe = (incSuiteDepth: () => void, decSuiteDepth: () => void) => {\n const patchDescribeFn =\n (target: CypressSuiteFunction): CypressSuiteFunction =>\n (title, configOrFn, fn) => {\n incSuiteDepth();\n try {\n return forwardDescribeCall(target, title, configOrFn, fn);\n } finally {\n decSuiteDepth();\n }\n };\n const originalDescribeFn: Mocha.SuiteFunction = globalThis.describe;\n const patchedDescribe = patchDescribeFn(originalDescribeFn) as Mocha.SuiteFunction;\n patchedDescribe.only = patchDescribeFn(\n originalDescribeFn.only as CypressSuiteFunction,\n ) as Mocha.ExclusiveSuiteFunction;\n patchedDescribe.skip = patchDescribeFn(originalDescribeFn.skip as CypressSuiteFunction) as Mocha.PendingSuiteFunction;\n globalThis.describe = patchedDescribe;\n};\n\nconst createSuiteDepthCounterState = (): [get: () => number, inc: () => void, dec: () => void] => {\n let suiteDepth = 0;\n return [\n () => suiteDepth,\n () => {\n suiteDepth++;\n },\n () => {\n suiteDepth--;\n },\n ];\n};\n\nconst patchAfter = (getSuiteDepth: () => number) => {\n const originalAfter = globalThis.after;\n const patchedAfter = (nameOrFn: string | HookImplementation, fn?: HookImplementation): void => {\n return typeof nameOrFn === \"string\"\n ? originalAfter(nameOrFn, wrapRootAfterFn(getSuiteDepth, fn))\n : originalAfter(wrapRootAfterFn(getSuiteDepth, nameOrFn)!);\n };\n globalThis.after = patchedAfter;\n};\n\nconst wrapRootAfterFn = (getSuiteDepth: () => number, fn?: HookImplementation): HookImplementation | undefined => {\n if (getSuiteDepth() === 0 && fn) {\n const wrappedFn = fn.length ? wrapAfterFnWithCallback(fn) : wrapAfterFnWithoutArgs(fn as DirectHookImplementation);\n Object.defineProperty(wrappedFn, \"name\", { value: fn.name });\n return wrappedFn;\n }\n return fn;\n};\n\nconst wrapAfterFnWithCallback = (fn: Mocha.Func): Mocha.Func => {\n return function (this: Mocha.Context, done: Mocha.Done) {\n const wrappedDone = (hookError?: Error) => {\n if (hookError) {\n if (!completeSpecOnAfterHookFailure(this, hookError)?.then(() => done(hookError))) {\n done(hookError);\n }\n return;\n }\n\n try {\n if (completeSpecIfNoAfterHookLeft(this)?.then(() => done())) {\n return;\n }\n } catch (allureError) {\n done(allureError);\n return;\n }\n\n done();\n };\n return fn.bind(this)(wrappedDone);\n };\n};\n\nconst wrapAfterFnWithoutArgs = (fn: DirectHookImplementation) => {\n return function (this: Mocha.Context) {\n let result;\n let syncError: any;\n\n try {\n result = fn.bind(this)();\n } catch (e) {\n syncError = e;\n }\n\n if (syncError) {\n throwAfterSpecCompletion(this, syncError);\n } else if (isPromise(result)) {\n return result.then(\n () => completeSpecIfNoAfterHookLeft(this),\n (asyncError) => throwAfterSpecCompletion(this, asyncError),\n );\n } else {\n completeSpecIfNoAfterHookLeft(this);\n return result;\n }\n };\n};\n\nconst throwAfterSpecCompletion = (context: Mocha.Context, err: any) => {\n const chain = completeSpecOnAfterHookFailure(context, err as Error)?.then(() => {\n throw err;\n });\n if (!chain) {\n throw err;\n }\n};\n\nconst logAllureRootAfterError = (context: Mocha.Context, err: unknown) => {\n // We play safe and swallow errors here to keep the original 'after all' error.\n try {\n // eslint-disable-next-line no-console\n console.error(`Unexpected error when reporting the failure of ${context.test?.title ?? \"'after all'\"}`);\n // eslint-disable-next-line no-console\n console.error(err);\n } catch {}\n};\n\nconst isLastRootAfterHook = (context: Mocha.Context) => {\n const currentAfterAll = context.test as CypressHook;\n const rootSuite = (context.test as CypressHook).parent!;\n const hooks = (rootSuite as any).hooks as CypressHook[];\n const lastAfterAll = hooks.findLast((h) => h.hookName === \"after all\");\n return lastAfterAll?.hookId === currentAfterAll.hookId;\n};\n"],
5
+ "mappings": "mbAAA,IAAAA,GAAA,GAAAC,GAAAD,GAAA,iBAAAE,EAAA,cAAAC,EAAA,aAAAC,EAAA,aAAAC,GAAA,UAAAC,GAAA,WAAAC,EAAA,qBAAAC,GAAA,aAAAC,GAAA,eAAAC,GAAA,mBAAAC,GAAA,gBAAAC,GAAA,oBAAAC,GAAA,gBAAAC,GAAA,SAAAC,GAAA,YAAAC,GAAA,cAAAC,GAAA,UAAAC,GAAA,UAAAC,EAAA,WAAAC,GAAA,UAAAC,GAAA,SAAAC,EAAA,UAAAC,GAAA,YAAAC,GAAA,UAAAC,GAAA,cAAAC,GAAA,gBAAAC,GAAA,aAAAC,GAAA,SAAAC,GAAA,UAAAC,GAAA,aAAAC,GAAA,UAAAC,GAAA,QAAAC,GAAA,SAAAC,GAAA,eAAAC,GAAA,QAAAC,KAAA,eAAAC,GAAArC,IC8EA,IAAYsC,EAAM,SAANA,EAAM,CAANA,OAAAA,EAAM,OAAA,SAANA,EAAM,OAAA,SAANA,EAAM,OAAA,SAANA,EAAM,QAAA,UAANA,CAAM,EAAA,CAAA,CAAA,EAOLC,GAAmB,CAACD,EAAOE,OAAQF,EAAOG,OAAQH,EAAOI,OAAQJ,EAAOK,OAAO,EAGhFC,GAAK,SAALA,EAAK,CAALA,OAAAA,EAAK,UAAA,YAALA,EAAK,QAAA,UAALA,EAAK,SAAA,WAALA,EAAK,QAAA,UAALA,EAAK,YAAA,cAALA,CAAK,EAAA,CAAA,CAAA,EASLC,EAAS,SAATA,EAAS,CAATA,OAAAA,EAAS,UAAA,YAATA,EAAS,MAAA,YAATA,EAAS,MAAA,QAATA,EAAS,aAAA,cAATA,EAAS,UAAA,WAATA,EAAS,KAAA,OAATA,EAAS,QAAA,UAATA,EAAS,MAAA,QAATA,EAAS,SAAA,WAATA,EAAS,IAAA,MAATA,EAAS,MAA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C,EACA,GAAGd,GAAmBkB,GAAsB,CAGtCC,EAAeD,CAAI,GACtBE,EAAgBF,CAAI,CAExB,CAAC,EACA,GAAGjB,GAAiB,IAAM,CACzBoB,GAAe,CACjB,CAAC,EACA,GAAGnB,GAAiB,CAACoB,EAAuCC,IAAe,CAC1E,IAAMC,EAAS,aAAcF,EAC7B,GAAIE,GAAUC,GAAmBH,CAAU,EAEzC,OAG0BE,GAAUT,EAAaO,CAAU,GAK3DN,EAAgBM,EAAY,KAAK,IAAI,GAAKA,EAAW,UAAY,EAAE,EAIrEI,EAAqBH,CAAG,EAEpBC,GAGFG,GAA2BL,EAAYC,CAAG,CAE9C,CAAC,EACA,GAAGpB,GAAqBe,GAAsB,CAC7CU,GAAeV,CAAI,CACrB,CAAC,EACA,GAAGd,GAAiBc,GAAsB,CACzCW,EAAcX,CAAI,CACpB,CAAC,EAEH,QAAQ,WAAW,SAAS,CAC1B,kBAAmB,CAACY,EAAG,CAAE,KAAAC,EAAM,KAAAC,CAAK,IAAM,CACxCC,GAAiBF,EAAMC,CAAI,CAC7B,CACF,CAAC,EAED,QAAQ,GAAG,OAAST,GAAQ,CAC1B,IAAMW,EAASC,EAAmBZ,CAAG,EAC/Ba,EAAgBC,EAA4Bd,CAAG,EAErD,MAAAe,EAAsBJ,EAAQE,CAAa,EAErCb,CACR,CAAC,EACD,QAAQ,GAAG,gBAAkBgB,GAA4B,CACnDC,EAAuBD,CAAO,GAIlCE,GAAmBF,CAAO,CAC5B,CAAC,EACD,QAAQ,GAAG,cAAgBA,GAA4B,CACjDC,EAAuBD,CAAO,GAIlCG,GAAiB,CACnB,CAAC,EAED,UAAUC,EAA2BC,EAAoB,EAEzD,MAAMD,EAA2B,UAA+B,CAC9DC,GAAqB,EACrBC,EAA8B,IAAI,CACpC,CAAC,EAEDC,GAAmC,EACrC,EAEAzC,GAAiB",
6
+ "names": ["src_exports", "__export", "ContentType", "LabelName", "LinkType", "Severity", "Stage", "Status", "StatusByPriority", "allureId", "attachment", "attachmentPath", "description", "descriptionHtml", "displayName", "epic", "feature", "historyId", "issue", "label", "labels", "layer", "link", "links", "logStep", "owner", "parameter", "parentSuite", "severity", "step", "story", "subSuite", "suite", "tag", "tags", "testCaseId", "tms", "__toCommonJS", "Status", "StatusByPriority", "FAILED", "BROKEN", "PASSED", "SKIPPED", "Stage", "LabelName", "Severity", "ContentType", "LinkType", "getStatusFromError", "error", "test", "constructor", "name", "message", "stack", "Status", "FAILED", "BROKEN", "ansiRegex", "onlyFirst", "arguments", "length", "undefined", "pattern", "join", "RegExp", "stripAnsi", "str", "regex", "replace", "getMessageAndTraceFromError", "trace", "allureIdRegexp", "_wrapRegExp", "id", "allureIdRegexpGlobal", "allureLabelRegexp", "value", "allureLabelRegexpGlobal", "extractMetadataFromString", "title", "labels", "split", "forEach", "val", "_val$match", "idValue", "match", "allureIdRegexp", "groups", "id", "push", "name", "LabelName", "ALLURE_ID", "value", "labelMatch", "allureLabelRegexp", "cleanTitle", "replace", "allureLabelRegexpGlobal", "allureIdRegexpGlobal", "trim", "getStepsMessagesPair", "messages", "reduce", "acc", "message", "type", "push", "unfinishedStepIdx", "findLastIndex", "step", "length", "getUnfinishedStepsMessages", "grouppedStepsMessage", "filter", "isPromise", "obj", "then", "serialize", "value", "maxDepth", "maxLength", "arguments", "undefined", "limitString", "JSON", "stringify", "createSerializeReplacer", "String", "parents", "_", "Object", "is", "at", "pop", "includes", "Map", "excludeCircularRefsFromMap", "Set", "excludeCircularRefsFromSet", "map", "Array", "from", "_ref", "k", "_ref2", "v", "set", "concat", "substring", "ALLURE_REPORT_SYSTEM_HOOK", "ALLURE_REPORT_STEP_COMMAND", "NoopTestRuntime", "attachment", "_this", "_asyncToGenerator", "warning", "attachmentFromPath", "_this2", "description", "_this3", "descriptionHtml", "_this4", "displayName", "_this5", "historyId", "_this6", "labels", "_this7", "links", "_this8", "parameter", "_this9", "logStep", "_this10", "step", "name", "body", "_this11", "stepDisplayName", "_this12", "stepParameter", "_this13", "testCaseId", "_this14", "console", "log", "noopRuntime", "ALLURE_TEST_RUNTIME_KEY", "setGlobalTestRuntime", "runtime", "globalThis", "getGlobalTestRuntimeFunction", "getGlobalTestRuntime", "testRuntime", "_testRuntime", "noopRuntime", "getGlobalTestRuntimeWithAutoconfig", "_testRuntime2", "eval", "then", "_getGlobalTestRuntime", "_getGlobalTestRuntime2", "err", "console", "log", "callRuntimeMethod", "method", "_len", "arguments", "length", "args", "Array", "_key", "runtime", "getGlobalTestRuntimeWithAutoconfig", "isPromise", "then", "testRuntime", "label", "name", "value", "labels", "_len2", "labelsList", "_key2", "link", "url", "type", "links", "_len3", "linksList", "_key3", "parameter", "options", "description", "markdown", "descriptionHtml", "html", "displayName", "historyId", "testCaseId", "attachment", "content", "opts", "contentType", "attachmentPath", "path", "stepContext", "mode", "logStep", "status", "error", "step", "body", "issue", "LinkType", "ISSUE", "tms", "TMS", "allureId", "LabelName", "ALLURE_ID", "epic", "EPIC", "feature", "FEATURE", "story", "STORY", "suite", "SUITE", "parentSuite", "PARENT_SUITE", "subSuite", "SUB_SUITE", "owner", "OWNER", "severity", "SEVERITY", "layer", "LAYER", "tag", "TAG", "tags", "_len4", "tagsList", "_key4", "map", "DEFAULT_RUNTIME_CONFIG", "uint8ArrayToBase64", "data", "getSuites", "test", "suites", "s", "shouldCommandBeSkipped", "command", "last", "ALLURE_REPORT_STEP_COMMAND", "last", "arr", "resolveSpecRelativePath", "spec", "projectDir", "getProjectDir", "specPath", "getNamesAndLabels", "test", "rawName", "name", "labels", "extractMetadataFromString", "fullNameSuffix", "getTestStartData", "getTestStopData", "getTestSkipData", "applyTestPlan", "root", "testPlan", "getAllureTestPlan", "suite", "iterateSuites", "indicesToRemove", "getIndicesOfDeselectedTests", "removeSortedIndices", "testReportedKey", "markTestAsReported", "test", "isTestReported", "iterateSuites", "parent", "suiteStack", "s", "i", "iterateTests", "suite", "isAllureHook", "hook", "ALLURE_REPORT_SYSTEM_HOOK", "isRootAfterAllHook", "includedInTestPlan", "testPlan", "fullName", "allureId", "getIndicesOfDeselectedTests", "spec", "specPath", "tests", "indicesToRemove", "index", "fullNameSuffix", "labels", "getNamesAndLabels", "name", "LabelName", "removeSortedIndices", "arr", "indices", "getAllureState", "state", "DEFAULT_RUNTIME_CONFIG", "isAllureInitialized", "setAllureInitialized", "getRuntimeMessages", "setRuntimeMessages", "value", "enqueueRuntimeMessage", "message", "getAllureTestPlan", "getProjectDir", "getCurrentTest", "setCurrentTest", "test", "dropCurrentTest", "getConfig", "AllureCypressTestRuntime", "#resetMessages", "labels", "#enqueueMessageAsync", "links", "name", "value", "options", "markdown", "html", "content", "attachmentRawContent", "actualEncoding", "attachmentContent", "uint8ArrayToBase64", "path", "status", "Status", "error", "ALLURE_REPORT_STEP_COMMAND", "getMessageAndTraceFromError", "body", "result", "mode", "taskName", "messages", "#dequeueAllMessages", "args", "setRuntimeMessages", "message", "enqueueRuntimeMessage", "getRuntimeMessages", "initTestRuntime", "setGlobalTestRuntime", "getTestRuntime", "getGlobalTestRuntime", "reportRunStart", "reportSuiteStart", "suite", "reportSuiteEnd", "reportHookStart", "hook", "start", "reportHookEnd", "reportTestStart", "test", "setCurrentTest", "getTestStartData", "markTestAsReported", "reportUnfinishedSteps", "statusDetails", "runtimeMessages", "getUnfinishedStepsMessages", "reportTestPass", "reportTestSkip", "isTestReported", "reportUnfinishedCommand", "getTestSkipData", "reportCommandStart", "command", "maxArgumentDepth", "maxArgumentLength", "getConfig", "arg", "serialize", "reportCommandEnd", "reportScreenshot", "ContentType", "startCommandMessageIdx", "type", "stopCommandMessageIdx", "hasUnfinishedCommand", "data", "reportTestOrHookFail", "err", "getStatusFromError", "reportTestEnd", "dropCurrentTest", "completeHookErrorReporting", "isEachHook", "testFailData", "getStatusDataOfTestSkippedByHookError", "reportCurrentTestIfAny", "reportRemainingTests", "enableScopeLevelAfterHookReporting", "getSuiteDepth", "incSuiteDepth", "decSuiteDepth", "createSuiteDepthCounterState", "patchDescribe", "patchAfter", "flushRuntimeMessages", "completeSpec", "completeSpecIfNoAfterHookLeft", "context", "isLastRootAfterHook", "isAllureHook", "completeSpecOnAfterHookFailure", "hookError", "allureError", "logAllureRootAfterError", "currentTest", "getCurrentTest", "iterateTests", "reportTestsSkippedByHookError", "getTestStopData", "getSuites", "s", "hookTitle", "trace", "getSkipReason", "suiteName", "forwardDescribeCall", "target", "title", "configOrFn", "fn", "patchDescribeFn", "originalDescribeFn", "patchedDescribe", "suiteDepth", "originalAfter", "patchedAfter", "nameOrFn", "wrapRootAfterFn", "wrappedFn", "wrapAfterFnWithCallback", "wrapAfterFnWithoutArgs", "done", "wrappedDone", "syncError", "e", "throwAfterSpecCompletion", "isPromise", "asyncError", "currentAfterAll", "h", "EVENT_RUN_BEGIN", "EVENT_SUITE_BEGIN", "EVENT_SUITE_END", "EVENT_HOOK_BEGIN", "EVENT_HOOK_END", "EVENT_TEST_BEGIN", "EVENT_TEST_PASS", "EVENT_TEST_FAIL", "EVENT_TEST_PENDING", "EVENT_TEST_END", "initializeAllure", "isAllureInitialized", "setAllureInitialized", "initTestRuntime", "reportRunStart", "suite", "applyTestPlan", "reportSuiteStart", "reportSuiteEnd", "hook", "isAllureHook", "reportHookStart", "reportHookEnd", "test", "isTestReported", "reportTestStart", "reportTestPass", "testOrHook", "err", "isHook", "isRootAfterAllHook", "reportTestOrHookFail", "completeHookErrorReporting", "reportTestSkip", "reportTestEnd", "_", "path", "name", "reportScreenshot", "status", "getStatusFromError", "statusDetails", "getMessageAndTraceFromError", "reportUnfinishedSteps", "command", "shouldCommandBeSkipped", "reportCommandStart", "reportCommandEnd", "ALLURE_REPORT_SYSTEM_HOOK", "flushRuntimeMessages", "completeSpecIfNoAfterHookLeft", "enableScopeLevelAfterHookReporting"]
7
7
  }
@@ -1 +1 @@
1
- {"version":3,"file":"model.js","names":["ALLURE_REPORT_SYSTEM_HOOK","exports","ALLURE_REPORT_STEP_COMMAND"],"sources":["../../src/model.ts"],"sourcesContent":["import type { Status, StatusDetails } from \"allure-js-commons\";\nimport type { RuntimeMessage } from \"allure-js-commons/sdk\";\nimport type { Config } from \"allure-js-commons/sdk/reporter\";\n\nexport const ALLURE_REPORT_SYSTEM_HOOK = \"__allure_report_system_hook__\";\n\nexport const ALLURE_REPORT_STEP_COMMAND = \"__allure_report_step_command__\";\n\nexport type AllureCypressConfig = Config & {\n videoOnFailOnly?: boolean;\n};\n\nexport type CypressTest = Mocha.Test & {\n wallClockStartedAt?: Date;\n hookName?: string;\n id: string;\n};\n\nexport type CypressHook = Mocha.Hook & {\n id: string;\n hookId: string;\n parent: Mocha.Suite & {\n id: string;\n };\n};\n\nexport type CypressCommand = {\n attributes: {\n name: string;\n id: string;\n args: any[];\n };\n state: \"passed\" | \"failed\" | \"queued\";\n};\n\nexport type CypressHookStartMessage = {\n type: \"cypress_hook_start\";\n data: {\n id: string;\n parentId: string;\n name: string;\n type: \"before\" | \"after\";\n start: number;\n global: boolean;\n };\n};\n\nexport type CypressHookEndMessage = {\n type: \"cypress_hook_end\";\n data: {\n id: string;\n parentId: string;\n status: Status;\n statusDetails?: StatusDetails;\n stop: number;\n global: boolean;\n };\n};\n\nexport type CypressSuiteStartMessage = {\n type: \"cypress_suite_start\";\n data: {\n id: string;\n name: string;\n root?: boolean;\n };\n};\n\nexport type CypressSuiteEndMessage = {\n type: \"cypress_suite_end\";\n data: {\n id: string;\n root?: boolean;\n };\n};\n\nexport type CypressTestStartMessage = {\n type: \"cypress_test_start\";\n data: {\n id: string;\n specPath: string[];\n filename: string;\n start: number;\n };\n};\n\nexport type CypressTestEndMessage = {\n type: \"cypress_test_end\";\n data: {\n id: string;\n status: Status;\n statusDetails?: StatusDetails;\n stop: number;\n retries: number;\n };\n};\n\nexport type CypressCommandStartMessage = {\n type: \"cypress_command_start\";\n data: {\n id: string;\n name: string;\n args: string[];\n };\n};\n\nexport type CypressCommandEndMessage = {\n type: \"cypress_command_end\";\n data: {\n id: string;\n status: Status;\n statusDetails?: StatusDetails;\n };\n};\n\nexport type CypressMessage =\n | RuntimeMessage\n | CypressTestStartMessage\n | CypressTestEndMessage\n | CypressHookStartMessage\n | CypressHookEndMessage\n | CypressSuiteStartMessage\n | CypressSuiteEndMessage\n | CypressCommandStartMessage\n | CypressCommandEndMessage;\n\nexport type RunContextByAbsolutePath = {\n executables: string[];\n steps: string[];\n scopes: string[];\n globalHooksMessages: (CypressHookStartMessage | CypressHookEndMessage)[];\n};\n"],"mappings":";;;;;;AAIO,IAAMA,yBAAyB,GAAAC,OAAA,CAAAD,yBAAA,GAAG,+BAA+B;AAEjE,IAAME,0BAA0B,GAAAD,OAAA,CAAAC,0BAAA,GAAG,gCAAgC","ignoreList":[]}
1
+ {"version":3,"file":"model.js","names":["ALLURE_REPORT_SYSTEM_HOOK","exports","ALLURE_REPORT_STEP_COMMAND"],"sources":["../../src/model.ts"],"sourcesContent":["import type { Label, Status, StatusDetails } from \"allure-js-commons\";\nimport type { RuntimeMessage, TestPlanV1 } from \"allure-js-commons/sdk\";\nimport type { ReporterConfig } from \"allure-js-commons/sdk/reporter\";\n\nexport const ALLURE_REPORT_SYSTEM_HOOK = \"__allure_report_system_hook__\";\n\nexport const ALLURE_REPORT_STEP_COMMAND = \"__allure_report_step_command__\";\n\nexport type AllureCypressConfig = ReporterConfig & {\n videoOnFailOnly?: boolean;\n stepsFromCommands?: Partial<AllureSpecState[\"config\"][\"stepsFromCommands\"]>;\n};\n\nexport type CypressSuite = Mocha.Suite & {\n id: string;\n parent: CypressSuite | undefined;\n tests: CypressTest[];\n suites: CypressSuite[];\n};\n\nexport type CypressTest = Mocha.Test & {\n wallClockStartedAt?: Date;\n parent: CypressSuite | undefined;\n};\n\nexport type CypressHook = Mocha.Hook & {\n hookId: string;\n hookName: string;\n parent: CypressSuite | undefined;\n};\n\nexport type CypressCommand = {\n attributes: {\n name: string;\n id: string;\n args: any[];\n };\n state: \"passed\" | \"failed\" | \"queued\";\n};\n\nexport type CupressRunStart = {\n type: \"cypress_run_start\";\n data: object;\n};\n\nexport type CypressSuiteStartMessage = {\n type: \"cypress_suite_start\";\n data: {\n id: string;\n name: string;\n root: boolean;\n start: number;\n };\n};\n\nexport type CypressSuiteEndMessage = {\n type: \"cypress_suite_end\";\n data: {\n root: boolean;\n stop: number;\n };\n};\n\nexport type CypressHookStartMessage = {\n type: \"cypress_hook_start\";\n data: {\n name: string;\n scopeType: \"each\" | \"all\";\n position: \"before\" | \"after\";\n start: number;\n };\n};\n\nexport type CypressHookEndMessage = {\n type: \"cypress_hook_end\";\n data: {\n duration: number;\n };\n};\n\nexport type CypressTestStartMessage = {\n type: \"cypress_test_start\";\n data: {\n name: string;\n fullNameSuffix: string;\n start: number;\n labels: Label[];\n };\n};\n\nexport type CypressFailMessage = {\n type: \"cypress_fail\";\n data: {\n status: Status;\n statusDetails: StatusDetails;\n };\n};\n\nexport type CypressTestSkipMessage = {\n type: \"cypress_test_skip\";\n data: {\n statusDetails?: StatusDetails;\n };\n};\n\nexport type CypressTestPassMessage = {\n type: \"cypress_test_pass\";\n data: object;\n};\n\nexport type CypressSkippedTestMessage = {\n type: \"cypress_skipped_test\";\n data: CypressTestStartMessage[\"data\"] &\n CypressFailMessage[\"data\"] &\n CypressTestEndMessage[\"data\"] & {\n suites: string[];\n };\n};\n\nexport type CypressTestEndMessage = {\n type: \"cypress_test_end\";\n data: {\n duration: number;\n retries: number;\n };\n};\n\nexport type CypressCommandStartMessage = {\n type: \"cypress_command_start\";\n data: {\n name: string;\n args: string[];\n start: number;\n };\n};\n\nexport type CypressCommandEndMessage = {\n type: \"cypress_command_end\";\n data: {\n status: Status;\n statusDetails?: StatusDetails;\n stop: number;\n };\n};\n\nexport type CypressMessage =\n | RuntimeMessage\n | CupressRunStart\n | CypressSuiteStartMessage\n | CypressSuiteEndMessage\n | CypressHookStartMessage\n | CypressHookEndMessage\n | CypressTestStartMessage\n | CypressCommandStartMessage\n | CypressCommandEndMessage\n | CypressTestPassMessage\n | CypressFailMessage\n | CypressTestSkipMessage\n | CypressSkippedTestMessage\n | CypressTestEndMessage;\n\nexport type SpecContext = {\n specPath: string;\n test: string | undefined;\n fixture: string | undefined;\n commandSteps: string[];\n videoScope: string;\n suiteIdToScope: Map<string, string>;\n suiteScopeToId: Map<string, string>;\n suiteScopes: string[];\n testScope: string | undefined;\n suiteNames: string[];\n failed: boolean;\n};\n\nexport type AllureSpecState = {\n config: {\n stepsFromCommands: {\n maxArgumentLength: number;\n maxArgumentDepth: number;\n };\n };\n initialized: boolean;\n testPlan: TestPlanV1 | null | undefined;\n projectDir?: string;\n messages: CypressMessage[];\n currentTest?: CypressTest;\n};\n\nexport type AllureCypressTaskArgs = {\n absolutePath: string;\n messages: readonly CypressMessage[];\n isInteractive: boolean;\n};\n\nexport type CypressSuiteFunction = (\n title: string,\n configOrFn?: Cypress.SuiteConfigOverrides | ((this: Mocha.Suite) => void),\n fn?: (this: Mocha.Suite) => void,\n) => Mocha.Suite;\n\nexport type DirectHookImplementation = Mocha.AsyncFunc | ((this: Mocha.Context) => void);\nexport type HookImplementation = Mocha.Func | DirectHookImplementation;\n"],"mappings":";;;;;;AAIO,IAAMA,yBAAyB,GAAAC,OAAA,CAAAD,yBAAA,GAAG,+BAA+B;AAEjE,IAAME,0BAA0B,GAAAD,OAAA,CAAAC,0BAAA,GAAG,gCAAgC","ignoreList":[]}