{"version":3,"file":"index.mjs","names":[],"sources":["../src/playwright-step-decorator.ts"],"sourcesContent":["import { AsyncLocalStorage } from \"node:async_hooks\";\nimport { inspect } from \"node:util\";\n\nimport { test, TestStepInfo } from \"@playwright/test\";\nimport type { Location } from \"@playwright/test\";\n\nconst stepContext = new AsyncLocalStorage<TestStepInfo>();\n\ntype StepMethod<This, Args extends unknown[], ReturnType> = (this: This, ...args: Args) => Promise<ReturnType>;\ntype NonFunctionValue<T> = T extends (...args: unknown[]) => unknown ? never : T;\ntype StepOptions = {\n\tbox?: boolean;\n\tlocation?: Location;\n\ttimeout?: number;\n};\ntype StepDescriptionOrOptions = string | StepOptions;\ntype ParsedDefaultValue = { kind: \"resolved\"; value: unknown } | { kind: \"unresolved\"; source: string };\ntype ParsedParameter =\n\t| { kind: \"named\"; defaultValue?: ParsedDefaultValue; index: number; isRest: boolean; name: string }\n\t| { kind: \"unsupported\"; index: number; source: string };\ntype NamedParameterLookup = ReadonlyMap<string, { defaultValue?: ParsedDefaultValue; index: number; isRest: boolean }>;\n\nlet decoratorModulePath: string | undefined;\n\n/**\n * Returns a resolved promise for non-async `@step` methods.\n */\nexport function stepResult(): Promise<void>;\nexport function stepResult<T>(factory: () => T): Promise<Awaited<T>>;\nexport function stepResult<T>(value: NonFunctionValue<T>): Promise<Awaited<T>>;\nexport function stepResult(valueOrFactory?: unknown) {\n\tif (typeof valueOrFactory === \"function\") {\n\t\treturn Promise.resolve().then(valueOrFactory as () => unknown);\n\t}\n\treturn Promise.resolve(valueOrFactory);\n}\n/**\n * Decorator to wrap a promise-returning method in a Playwright step with a dynamic description.\n *\n * If no description is provided, the step will use the format: `ClassName.methodName`.\n *\n * Placeholders in the description (e.g. `{{user.name}}` or `[[0]]`) will be replaced with actual argument values at runtime.\n *\n * @template This The type of the class instance.\n * @template Args The argument types of the decorated method.\n * @template ReturnType The return type of the decorated method.\n * @param descriptionOrOptions Optional step description, or Playwright step options when no description is needed.\n * @param options Optional Playwright step options when a description string is provided. If `location` is omitted, the decorator captures the current call site automatically.\n * @returns A decorator function that wraps the target method in a Playwright step.\n *\n * @example\n * ```typescript\n * class MyTest {\n *   @step(\"Login as {{user.name}}\")\n *   async login(user: { name: string }) { ... }\n *\n *   @step(\"Click button [[0]] times\")\n *   async clickButton(times: number) { ... }\n *\n *   @step(\"Reset the form\")\n *   resetForm(): Promise<void> { return stepResult(); } // No `async` keyword needed (avoids require-await)\n *\n *   @step(\"Build greeting for {{name}}\")\n *   buildGreeting(name: string): Promise<string> {\n *     return stepResult(`Hello ${name}`);\n *   }\n *\n *   @step(\"Prepare greeting for {{name}}\")\n *   prepareGreeting(name: string): Promise<string> {\n *     return stepResult(() => {\n *       const greeting = `Hello ${name}`;\n *       return greeting.toUpperCase();\n *     });\n *   }\n *\n *   @step()\n *   async defaultStep() { ... } // Step will be \"MyTest.defaultStep\"\n * }\n * ```\n *\n * @throws {Error} If placeholders reference missing or out-of-bounds parameters.\n * @throws {Error} If property access in a placeholder is invalid.\n */\nexport function step(): ReturnType<typeof createStepDecorator>;\nexport function step(options: StepOptions): ReturnType<typeof createStepDecorator>;\nexport function step(description: string, options?: StepOptions): ReturnType<typeof createStepDecorator>;\nexport function step(descriptionOrOptions?: StepDescriptionOrOptions, options?: StepOptions) {\n\tconst description = typeof descriptionOrOptions === \"string\" ? descriptionOrOptions : undefined;\n\tconst resolvedOptions = typeof descriptionOrOptions === \"string\" ? options : (descriptionOrOptions ?? options);\n\n\treturn createStepDecorator(description, resolvedOptions);\n}\n\nfunction createStepDecorator(description?: string, options?: StepOptions) {\n\treturn function <This extends { constructor: { name: string } }, Args extends unknown[], ReturnType>(\n\t\ttarget: StepMethod<This, Args, ReturnType>,\n\t\tcontext: ClassMethodDecoratorContext<This, StepMethod<This, Args, ReturnType>>\n\t) {\n\t\treturn function replacementMethod(this: This, ...args: Args) {\n\t\t\tconst methodName = `${this.constructor.name}.${context.name as string}`;\n\t\t\tlet formattedDescription = methodName;\n\t\t\tif (description) {\n\t\t\t\tconst placeholders = getPlaceholders(description);\n\t\t\t\tconst parameterLookup = createNamedParameterLookup(target, methodName, placeholders);\n\n\t\t\t\tformattedDescription = formatDescription(methodName, description, placeholders, parameterLookup, args);\n\t\t\t}\n\n\t\t\tconst location = options?.location ?? captureCallSiteLocation();\n\n\t\t\treturn test.step(\n\t\t\t\tformattedDescription,\n\t\t\t\tasync step => {\n\t\t\t\t\treturn await stepContext.run(step, async () => {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\treturn await target.call(this, ...args);\n\t\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\t\tif (error instanceof Error && error.stack) {\n\t\t\t\t\t\t\t\terror.stack = filterDecoratorFrames(error.stack);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tthrow error;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t},\n\t\t\t\t{ ...options, location }\n\t\t\t);\n\t\t};\n\t};\n}\n\n/**\n * Retrieves the `TestStepInfo` associated with the current Step Decorator call.\n *\n * This function reads the step context from async-local storage. The optional instance parameter\n * is retained for backwards compatibility with earlier versions that stored the step on `this`.\n * If the step context is not found, it throws an error indicating that the method should be decorated with `@step`.\n *\n * @returns The `TestStepInfo` associated with the instance.\n * @throws {Error} If no Playwright step context is found on the instance.\n */\nexport function getStepInfo(): TestStepInfo;\nexport function getStepInfo(instance: unknown): TestStepInfo;\nexport function getStepInfo(_instance?: unknown): TestStepInfo {\n\tconst step = stepContext.getStore();\n\tif (!step) {\n\t\tthrow new Error(\"No Playwright step context found. Make sure this method is decorated with @step.\");\n\t}\n\treturn step;\n}\n\n/**\n * Captures the call site location from the stack trace.\n *\n * This function parses the Error stack to find the location where the decorated method\n * was called (not where the decorator is defined). This location is used by Playwright\n * to display accurate source locations in test reports and trace viewer.\n *\n * @returns Location object with file, line, and column, or undefined if parsing fails\n */\nfunction captureCallSiteLocation(): { file: string; line: number; column: number } | undefined {\n\tconst stack = new Error().stack;\n\tif (!stack) return undefined;\n\tconst currentDecoratorModulePath = getDecoratorModulePath();\n\n\tconst lines = stack.split(\"\\n\");\n\t// Skip the first few stack frames:\n\t// 0: Error\n\t// 1: captureCallSiteLocation\n\t// 2: replacementMethod (the decorator wrapper)\n\t// 3: actual call site (what we want)\n\tfor (let i = 3; i < lines.length; i++) {\n\t\tconst location = extractStackFrameLocation(lines[i]);\n\t\tif (location && !isIgnoredCallSitePath(location.file, currentDecoratorModulePath)) {\n\t\t\treturn location;\n\t\t}\n\t}\n\treturn undefined;\n}\n\nfunction extractStackFrameLocation(stackLine: string): { file: string; line: number; column: number } | undefined {\n\tconst match = stackLine.match(/\\((.+):(\\d+):(\\d+)\\)$/) || stackLine.match(/at\\s+(.+):(\\d+):(\\d+)$/);\n\tif (!match) {\n\t\treturn undefined;\n\t}\n\n\tconst [, file, line, column] = match;\n\treturn {\n\t\tfile: normalizeStackPath(file),\n\t\tline: parseInt(line, 10),\n\t\tcolumn: parseInt(column, 10),\n\t};\n}\n\nfunction normalizeStackPath(value: string): string {\n\tlet result = value.trim();\n\tresult = result.replace(/^(webpack|vite|rollup):\\/\\//, \"\");\n\tif (result.startsWith(\"file:///\") && /^[A-Za-z]:/.test(result.slice(\"file:///\".length))) {\n\t\tresult = result.slice(\"file:///\".length);\n\t} else {\n\t\tresult = result.replace(/^file:\\/\\//, \"\");\n\t}\n\ttry {\n\t\tresult = decodeURIComponent(result);\n\t} catch {\n\t\t// Leave undecodable stack paths untouched.\n\t}\n\tresult = result.replace(/\\\\/g, \"/\");\n\treturn result;\n}\n\nfunction isIgnoredCallSitePath(normalizedPath: string, currentDecoratorModulePath?: string): boolean {\n\treturn (\n\t\tnormalizedPath.includes(\"node:internal\") ||\n\t\tnormalizedPath.includes(\"/node_modules/\") ||\n\t\tisDecoratorInternalPath(normalizedPath, currentDecoratorModulePath)\n\t);\n}\n\nfunction isDecoratorInternalPath(normalizedPath: string, currentDecoratorModulePath?: string): boolean {\n\treturn normalizedPath === currentDecoratorModulePath || matchesKnownDecoratorArtifactPath(normalizedPath);\n}\n\nfunction matchesKnownDecoratorArtifactPath(normalizedPath: string): boolean {\n\treturn [\n\t\t/\\/node_modules\\/@cerios\\/playwright-step-decorator\\/(?:src|dist)\\/playwright-step-decorator(?:\\.(?:ts|js|cjs|mjs))?$/u,\n\t\t/\\/node_modules\\/playwright-step-decorator\\/(?:src|dist)\\/playwright-step-decorator(?:\\.(?:ts|js|cjs|mjs))?$/u,\n\t\t/\\/packages\\/playwright-step-decorator\\/(?:src|dist)\\/playwright-step-decorator(?:\\.(?:ts|js|cjs|mjs))?$/u,\n\t\t/\\/playwright-step-decorator\\/src\\/playwright-step-decorator\\.ts$/u,\n\t\t/\\/playwright-step-decorator\\/dist\\/playwright-step-decorator\\.(?:js|cjs|mjs)$/u,\n\t].some(pattern => pattern.test(normalizedPath));\n}\n\nfunction getDecoratorModulePath(): string | undefined {\n\tif (decoratorModulePath) {\n\t\treturn decoratorModulePath;\n\t}\n\n\tconst stack = new Error().stack;\n\tif (!stack) {\n\t\treturn undefined;\n\t}\n\n\tfor (const line of stack.split(\"\\n\").slice(1)) {\n\t\tconst location = extractStackFrameLocation(line);\n\t\tif (location) {\n\t\t\tdecoratorModulePath = location.file;\n\t\t\treturn decoratorModulePath;\n\t\t}\n\t}\n\n\treturn undefined;\n}\n\nfunction getPlaceholders(description: string): string[] {\n\tconst curlyMatches = Array.from(description.matchAll(/\\{\\{(.*?)\\}\\}/g)).map(m => m[1]);\n\tconst squareMatches = Array.from(description.matchAll(/\\[\\[(\\d+)\\]\\]/g)).map(m => `[[${m[1]}]]`);\n\treturn [...curlyMatches, ...squareMatches];\n}\n\nfunction createNamedParameterLookup(\n\ttarget: Function,\n\tmethodName: string,\n\tplaceholders: string[]\n): Map<string, { defaultValue?: ParsedDefaultValue; index: number; isRest: boolean }> {\n\tconst namedPlaceholderRoots = Array.from(\n\t\tnew Set(\n\t\t\tplaceholders.filter(placeholder => !placeholder.startsWith(\"[[\")).map(placeholder => placeholder.split(\".\")[0])\n\t\t)\n\t);\n\tif (namedPlaceholderRoots.length === 0) {\n\t\treturn new Map();\n\t}\n\n\tconst parsedParameters = parseFunctionParameters(target);\n\tif (!parsedParameters) {\n\t\tthrow new Error(\n\t\t\t`Unable to parse the parameter list for method '${methodName}' while resolving named @step placeholders (${namedPlaceholderRoots.join(\", \")}). ` +\n\t\t\t\t`Named placeholders support identifier parameters, default values, and rest parameters. ` +\n\t\t\t\t`Use index placeholders like [[0]] when the signature uses destructuring or other unsupported syntax.`\n\t\t);\n\t}\n\n\tconst parameterLookup = new Map<string, { defaultValue?: ParsedDefaultValue; index: number; isRest: boolean }>();\n\tconst unsupportedParameters: string[] = [];\n\n\tfor (const parameter of parsedParameters) {\n\t\tif (parameter.kind === \"named\") {\n\t\t\tparameterLookup.set(parameter.name, {\n\t\t\t\tdefaultValue: parameter.defaultValue,\n\t\t\t\tindex: parameter.index,\n\t\t\t\tisRest: parameter.isRest,\n\t\t\t});\n\t\t} else {\n\t\t\tunsupportedParameters.push(parameter.source);\n\t\t}\n\t}\n\n\tconst missingParams = namedPlaceholderRoots.filter(param => !parameterLookup.has(param));\n\tif (missingParams.length > 0) {\n\t\tif (unsupportedParameters.length > 0) {\n\t\t\tthrow new Error(\n\t\t\t\t`Unable to resolve named @step placeholders (${missingParams.join(\", \")}) in method '${methodName}' because this signature contains parameters that cannot be matched by name (${unsupportedParameters.join(\", \")}). ` +\n\t\t\t\t\t`Named placeholders support identifier parameters, default values, and rest parameters. ` +\n\t\t\t\t\t`Use index placeholders like [[0]] for destructured or unsupported parameters.`\n\t\t\t);\n\t\t}\n\n\t\tthrow new Error(\n\t\t\t`Missing function parameters (${missingParams.join(\", \")}) in method '${methodName}'. Please check your @step decorator placeholders.`\n\t\t);\n\t}\n\n\treturn parameterLookup;\n}\n\nfunction parseFunctionParameters(target: Function): ParsedParameter[] | undefined {\n\tconst fnStr = target.toString();\n\tconst openParenIndex = fnStr.indexOf(\"(\");\n\tif (openParenIndex === -1) {\n\t\treturn undefined;\n\t}\n\n\tconst closeParenIndex = findMatchingClosingParen(fnStr, openParenIndex);\n\tif (closeParenIndex === -1) {\n\t\treturn undefined;\n\t}\n\n\tconst rawParameters = splitTopLevel(fnStr.slice(openParenIndex + 1, closeParenIndex), \",\");\n\tif (!rawParameters) {\n\t\treturn undefined;\n\t}\n\n\treturn rawParameters\n\t\t.map((parameter, index) => parseFunctionParameter(parameter, index))\n\t\t.filter((parameter): parameter is ParsedParameter => parameter !== undefined);\n}\n\nfunction parseFunctionParameter(parameterSource: string, index: number): ParsedParameter | undefined {\n\tconst normalizedSource = normalizeParameterSource(parameterSource);\n\tif (!normalizedSource) {\n\t\treturn undefined;\n\t}\n\n\tconst defaultValueIndex = findFirstTopLevelCharacter(normalizedSource, \"=\");\n\tconst defaultValueSource =\n\t\tdefaultValueIndex === undefined ? undefined : normalizedSource.slice(defaultValueIndex + 1).trim();\n\tconst bindingSource =\n\t\tdefaultValueIndex === undefined ? normalizedSource : normalizedSource.slice(0, defaultValueIndex).trim();\n\tlet candidate = bindingSource;\n\tlet isRest = false;\n\tconst summarizedSource = summarizeParameterSource(normalizedSource);\n\n\tif (candidate.startsWith(\"...\")) {\n\t\tisRest = true;\n\t\tcandidate = candidate.slice(3).trim();\n\t}\n\n\tif (candidate.startsWith(\"{\") || candidate.startsWith(\"[\")) {\n\t\treturn { kind: \"unsupported\", index, source: summarizedSource };\n\t}\n\n\tif (/^[A-Za-z_$][\\w$]*$/u.test(candidate)) {\n\t\treturn {\n\t\t\tkind: \"named\",\n\t\t\tdefaultValue: isRest ? undefined : parseDefaultValue(defaultValueSource),\n\t\t\tindex,\n\t\t\tisRest,\n\t\t\tname: candidate,\n\t\t};\n\t}\n\n\treturn { kind: \"unsupported\", index, source: summarizedSource };\n}\n\nfunction normalizeParameterSource(source: string): string {\n\treturn source.replace(/\\s+/g, \" \").trim();\n}\n\nfunction parseDefaultValue(defaultValueSource?: string): ParsedDefaultValue | undefined {\n\tif (!defaultValueSource) {\n\t\treturn undefined;\n\t}\n\n\tconst parsedDefaultValue = parseLiteralDefaultValue(defaultValueSource);\n\tif (parsedDefaultValue !== undefined || defaultValueSource === \"undefined\") {\n\t\treturn { kind: \"resolved\", value: parsedDefaultValue };\n\t}\n\n\treturn { kind: \"unresolved\", source: summarizeParameterSource(defaultValueSource) };\n}\n\nfunction parseLiteralDefaultValue(source: string): unknown {\n\tif (source === \"undefined\") {\n\t\treturn undefined;\n\t}\n\n\tif (source === \"null\") {\n\t\treturn null;\n\t}\n\n\tif (source === \"true\") {\n\t\treturn true;\n\t}\n\n\tif (source === \"false\") {\n\t\treturn false;\n\t}\n\n\tif (/^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$/u.test(source)) {\n\t\treturn Number(source);\n\t}\n\n\tif (/^-?(?:0|[1-9]\\d*)n$/u.test(source)) {\n\t\treturn BigInt(source.slice(0, -1));\n\t}\n\n\treturn parseQuotedStringLiteral(source);\n}\n\nfunction parseQuotedStringLiteral(source: string): string | undefined {\n\tif (source.length < 2) {\n\t\treturn undefined;\n\t}\n\n\tconst quote = source[0];\n\tif ((quote !== '\"' && quote !== \"'\") || source[source.length - 1] !== quote) {\n\t\treturn undefined;\n\t}\n\n\tlet result = \"\";\n\tfor (let i = 1; i < source.length - 1; i++) {\n\t\tconst char = source[i];\n\t\tif (char !== \"\\\\\") {\n\t\t\tresult += char;\n\t\t\tcontinue;\n\t\t}\n\n\t\ti += 1;\n\t\tif (i >= source.length - 1) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst escape = source[i];\n\t\tswitch (escape) {\n\t\t\tcase \"'\":\n\t\t\tcase '\"':\n\t\t\tcase \"\\\\\":\n\t\t\t\tresult += escape;\n\t\t\t\tbreak;\n\t\t\tcase \"b\":\n\t\t\t\tresult += \"\\b\";\n\t\t\t\tbreak;\n\t\t\tcase \"f\":\n\t\t\t\tresult += \"\\f\";\n\t\t\t\tbreak;\n\t\t\tcase \"n\":\n\t\t\t\tresult += \"\\n\";\n\t\t\t\tbreak;\n\t\t\tcase \"r\":\n\t\t\t\tresult += \"\\r\";\n\t\t\t\tbreak;\n\t\t\tcase \"t\":\n\t\t\t\tresult += \"\\t\";\n\t\t\t\tbreak;\n\t\t\tcase \"v\":\n\t\t\t\tresult += \"\\v\";\n\t\t\t\tbreak;\n\t\t\tcase \"0\":\n\t\t\t\tresult += \"\\0\";\n\t\t\t\tbreak;\n\t\t\tcase \"u\": {\n\t\t\t\tconst unicodeValue = source.slice(i + 1, i + 5);\n\t\t\t\tif (!/^[0-9A-Fa-f]{4}$/u.test(unicodeValue)) {\n\t\t\t\t\treturn undefined;\n\t\t\t\t}\n\t\t\t\tresult += String.fromCodePoint(parseInt(unicodeValue, 16));\n\t\t\t\ti += 4;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"x\": {\n\t\t\t\tconst hexValue = source.slice(i + 1, i + 3);\n\t\t\t\tif (!/^[0-9A-Fa-f]{2}$/u.test(hexValue)) {\n\t\t\t\t\treturn undefined;\n\t\t\t\t}\n\t\t\t\tresult += String.fromCodePoint(parseInt(hexValue, 16));\n\t\t\t\ti += 2;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tdefault:\n\t\t\t\treturn undefined;\n\t\t}\n\t}\n\n\treturn result;\n}\n\nfunction findMatchingClosingParen(source: string, openParenIndex: number): number {\n\tlet depth = 0;\n\tlet quote: \"'\" | '\"' | undefined;\n\tlet inLineComment = false;\n\tlet inBlockComment = false;\n\n\tfor (let i = openParenIndex; i < source.length; i++) {\n\t\tconst char = source[i];\n\t\tconst next = source[i + 1];\n\n\t\tif (inLineComment) {\n\t\t\tif (char === \"\\n\") {\n\t\t\t\tinLineComment = false;\n\t\t\t}\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (inBlockComment) {\n\t\t\tif (char === \"*\" && next === \"/\") {\n\t\t\t\tinBlockComment = false;\n\t\t\t\ti += 1;\n\t\t\t}\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (quote) {\n\t\t\tif (char === \"\\\\\") {\n\t\t\t\ti += 1;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (char === quote) {\n\t\t\t\tquote = undefined;\n\t\t\t}\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (char === \"`\") {\n\t\t\treturn -1;\n\t\t}\n\n\t\tif (char === \"/\" && next === \"/\") {\n\t\t\tinLineComment = true;\n\t\t\ti += 1;\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (char === \"/\" && next === \"*\") {\n\t\t\tinBlockComment = true;\n\t\t\ti += 1;\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (char === \"'\" || char === '\"') {\n\t\t\tquote = char;\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (char === \"(\") {\n\t\t\tdepth += 1;\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (char === \")\") {\n\t\t\tdepth -= 1;\n\t\t\tif (depth === 0) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t\tif (depth < 0) {\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn -1;\n}\n\nfunction splitTopLevel(source: string, delimiter: string): string[] | undefined {\n\tconst parts: string[] = [];\n\tlet start = 0;\n\tlet parenDepth = 0;\n\tlet braceDepth = 0;\n\tlet bracketDepth = 0;\n\tlet quote: \"'\" | '\"' | undefined;\n\tlet inLineComment = false;\n\tlet inBlockComment = false;\n\n\tfor (let i = 0; i < source.length; i++) {\n\t\tconst char = source[i];\n\t\tconst next = source[i + 1];\n\n\t\tif (inLineComment) {\n\t\t\tif (char === \"\\n\") {\n\t\t\t\tinLineComment = false;\n\t\t\t}\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (inBlockComment) {\n\t\t\tif (char === \"*\" && next === \"/\") {\n\t\t\t\tinBlockComment = false;\n\t\t\t\ti += 1;\n\t\t\t}\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (quote) {\n\t\t\tif (char === \"\\\\\") {\n\t\t\t\ti += 1;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (char === quote) {\n\t\t\t\tquote = undefined;\n\t\t\t}\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (char === \"`\") {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tif (char === \"/\" && next === \"/\") {\n\t\t\tinLineComment = true;\n\t\t\ti += 1;\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (char === \"/\" && next === \"*\") {\n\t\t\tinBlockComment = true;\n\t\t\ti += 1;\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (char === \"'\" || char === '\"') {\n\t\t\tquote = char;\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (char === delimiter && parenDepth === 0 && braceDepth === 0 && bracketDepth === 0) {\n\t\t\tparts.push(source.slice(start, i));\n\t\t\tstart = i + 1;\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (char === \"(\") {\n\t\t\tparenDepth += 1;\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (char === \")\") {\n\t\t\tparenDepth -= 1;\n\t\t\tif (parenDepth < 0) {\n\t\t\t\treturn undefined;\n\t\t\t}\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (char === \"{\") {\n\t\t\tbraceDepth += 1;\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (char === \"}\") {\n\t\t\tbraceDepth -= 1;\n\t\t\tif (braceDepth < 0) {\n\t\t\t\treturn undefined;\n\t\t\t}\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (char === \"[\") {\n\t\t\tbracketDepth += 1;\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (char === \"]\") {\n\t\t\tbracketDepth -= 1;\n\t\t\tif (bracketDepth < 0) {\n\t\t\t\treturn undefined;\n\t\t\t}\n\t\t}\n\t}\n\n\tif (quote || inBlockComment || parenDepth !== 0 || braceDepth !== 0 || bracketDepth !== 0) {\n\t\treturn undefined;\n\t}\n\n\tparts.push(source.slice(start));\n\treturn parts;\n}\n\nfunction findFirstTopLevelCharacter(source: string, character: string): number | undefined {\n\tlet parenDepth = 0;\n\tlet braceDepth = 0;\n\tlet bracketDepth = 0;\n\tlet quote: \"'\" | '\"' | undefined;\n\tlet inLineComment = false;\n\tlet inBlockComment = false;\n\n\tfor (let i = 0; i < source.length; i++) {\n\t\tconst char = source[i];\n\t\tconst next = source[i + 1];\n\n\t\tif (inLineComment) {\n\t\t\tif (char === \"\\n\") {\n\t\t\t\tinLineComment = false;\n\t\t\t}\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (inBlockComment) {\n\t\t\tif (char === \"*\" && next === \"/\") {\n\t\t\t\tinBlockComment = false;\n\t\t\t\ti += 1;\n\t\t\t}\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (quote) {\n\t\t\tif (char === \"\\\\\") {\n\t\t\t\ti += 1;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (char === quote) {\n\t\t\t\tquote = undefined;\n\t\t\t}\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (char === \"`\") {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tif (char === \"/\" && next === \"/\") {\n\t\t\tinLineComment = true;\n\t\t\ti += 1;\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (char === \"/\" && next === \"*\") {\n\t\t\tinBlockComment = true;\n\t\t\ti += 1;\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (char === \"'\" || char === '\"') {\n\t\t\tquote = char;\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (char === character && parenDepth === 0 && braceDepth === 0 && bracketDepth === 0) {\n\t\t\treturn i;\n\t\t}\n\n\t\tif (char === \"(\") {\n\t\t\tparenDepth += 1;\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (char === \")\") {\n\t\t\tparenDepth -= 1;\n\t\t\tif (parenDepth < 0) {\n\t\t\t\treturn undefined;\n\t\t\t}\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (char === \"{\") {\n\t\t\tbraceDepth += 1;\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (char === \"}\") {\n\t\t\tbraceDepth -= 1;\n\t\t\tif (braceDepth < 0) {\n\t\t\t\treturn undefined;\n\t\t\t}\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (char === \"[\") {\n\t\t\tbracketDepth += 1;\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (char === \"]\") {\n\t\t\tbracketDepth -= 1;\n\t\t\tif (bracketDepth < 0) {\n\t\t\t\treturn undefined;\n\t\t\t}\n\t\t}\n\t}\n\n\tif (quote || inBlockComment || parenDepth !== 0 || braceDepth !== 0 || bracketDepth !== 0) {\n\t\treturn undefined;\n\t}\n\n\treturn undefined;\n}\n\nfunction summarizeParameterSource(source: string): string {\n\tconst summary = source.replace(/\\s+/g, \" \").trim();\n\treturn summary.length > 60 ? `${summary.slice(0, 57)}...` : summary;\n}\n\nfunction formatDescription(\n\tmethodName: string,\n\tdescription: string,\n\tplaceholders: string[],\n\tparameterLookup: NamedParameterLookup,\n\targs: unknown[]\n): string {\n\tlet result = description;\n\tfor (const placeholder of placeholders) {\n\t\tif (placeholder.startsWith(\"[[\") && placeholder.endsWith(\"]]\")) {\n\t\t\tconst index = parseInt(placeholder.slice(2, -2), 10);\n\t\t\tif (isNaN(index) || index < 0 || index >= args.length) {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t`Parameter index '${index}' is out of bounds in method '${methodName}'. ` +\n\t\t\t\t\t\t`This method received ${args.length} argument(s), but the @step decorator references index ${index}. ` +\n\t\t\t\t\t\t`Please check your @step decorator placeholders.`\n\t\t\t\t);\n\t\t\t}\n\t\t\tresult = result.replace(`[[${index}]]`, () => formatPlaceholderValue(args[index]));\n\t\t} else {\n\t\t\tconst parts = placeholder.split(\".\");\n\t\t\tconst parameter = parameterLookup.get(parts[0]);\n\t\t\tif (!parameter) {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t`Missing function parameters (${parts[0]}) in method '${methodName}'. Please check your @step decorator placeholders.`\n\t\t\t\t);\n\t\t\t}\n\t\t\tlet value: unknown = resolveNamedParameterValue(methodName, parts[0], placeholder, parameter, args);\n\n\t\t\tfor (let i = 1; i < parts.length; i++) {\n\t\t\t\tif (value && typeof value === \"object\" && parts[i] in value) {\n\t\t\t\t\tvalue = (value as Record<string, unknown>)[parts[i]];\n\t\t\t\t} else {\n\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\t`Invalid @step placeholder '{{${placeholder}}}' in method '${methodName}': ` +\n\t\t\t\t\t\t\t`Property '${parts[i]}' does not exist on parameter '${parts[0]}'. ` +\n\t\t\t\t\t\t\t`Please check your @step decorator placeholders.`\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tresult = result.replace(`{{${placeholder}}}`, () => formatPlaceholderValue(value));\n\t\t}\n\t}\n\treturn result;\n}\n\nfunction resolveNamedParameterValue(\n\tmethodName: string,\n\tparameterName: string,\n\tplaceholder: string,\n\tparameter: { defaultValue?: ParsedDefaultValue; index: number; isRest: boolean },\n\targs: unknown[]\n): unknown {\n\tif (parameter.isRest) {\n\t\treturn args.slice(parameter.index);\n\t}\n\n\tif (args[parameter.index] !== undefined) {\n\t\treturn args[parameter.index];\n\t}\n\n\tif (parameter.defaultValue?.kind === \"resolved\") {\n\t\treturn parameter.defaultValue.value;\n\t}\n\n\tif (parameter.defaultValue?.kind === \"unresolved\") {\n\t\tthrow new Error(\n\t\t\t`Unable to resolve the default value for parameter '${parameterName}' in method '${methodName}' while formatting @step placeholder '{{${placeholder}}}'. ` +\n\t\t\t\t`Only literal default values can be printed when the argument is omitted. ` +\n\t\t\t\t`Pass the argument explicitly or use an index placeholder instead.`\n\t\t);\n\t}\n\n\treturn args[parameter.index];\n}\n\nfunction formatPlaceholderValue(value: unknown): string {\n\tif (typeof value === \"string\") {\n\t\treturn value;\n\t}\n\n\tif (\n\t\ttypeof value === \"number\" ||\n\t\ttypeof value === \"boolean\" ||\n\t\ttypeof value === \"bigint\" ||\n\t\ttypeof value === \"undefined\" ||\n\t\tvalue === null\n\t) {\n\t\treturn String(value);\n\t}\n\n\tif (typeof value === \"function\") {\n\t\treturn value.name ? `[Function ${value.name}]` : \"[Function anonymous]\";\n\t}\n\n\tif (value instanceof Error) {\n\t\treturn `${value.name}: ${value.message}`;\n\t}\n\n\ttry {\n\t\tconst seen = new WeakSet<object>();\n\t\tconst serialized = JSON.stringify(value, (_key, nestedValue) => {\n\t\t\tif (typeof nestedValue === \"bigint\") {\n\t\t\t\treturn nestedValue.toString();\n\t\t\t}\n\n\t\t\tif (typeof nestedValue === \"function\") {\n\t\t\t\treturn nestedValue.name ? `[Function ${nestedValue.name}]` : \"[Function anonymous]\";\n\t\t\t}\n\n\t\t\tif (typeof nestedValue === \"symbol\") {\n\t\t\t\treturn nestedValue.toString();\n\t\t\t}\n\n\t\t\tif (nestedValue && typeof nestedValue === \"object\") {\n\t\t\t\tif (seen.has(nestedValue)) {\n\t\t\t\t\treturn \"[Circular]\";\n\t\t\t\t}\n\n\t\t\t\tseen.add(nestedValue);\n\t\t\t}\n\n\t\t\treturn nestedValue;\n\t\t});\n\n\t\tif (serialized !== undefined) {\n\t\t\treturn serialized;\n\t\t}\n\t} catch {\n\t\t// Fall back to the built-in formatter when JSON serialization fails.\n\t}\n\n\treturn inspect(value, { breakLength: Infinity, depth: 2 });\n}\n\nfunction filterDecoratorFrames(stack: string): string {\n\tconst currentDecoratorModulePath = getDecoratorModulePath();\n\tconst lines = stack.split(\"\\n\");\n\tconst filtered = lines.filter((line, index) => {\n\t\tif (index === 0) {\n\t\t\treturn true;\n\t\t}\n\n\t\tconst location = extractStackFrameLocation(line);\n\t\treturn !location || !isDecoratorInternalPath(location.file, currentDecoratorModulePath);\n\t});\n\treturn filtered.join(\"\\n\");\n}\n"],"mappings":";;;;AAMA,MAAM,cAAc,IAAI,kBAAgC;AAgBxD,IAAI;AAQJ,SAAgB,WAAW,gBAA0B;CACpD,IAAI,OAAO,mBAAmB,YAC7B,OAAO,QAAQ,QAAQ,CAAC,CAAC,KAAK,cAA+B;CAE9D,OAAO,QAAQ,Q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