patchbench / pilot /results /ts.jsonl
rootxhacker's picture
pilot ts: results
c36175d verified
Raw History Blame Contribute Delete
76.6 kB
{"id": "patchbench-ts-real-0081", "repo": "katspaugh/wavesurfer.js", "base_commit": "44fd55e88762351fd8913f02a37060cbea88c0e3", "status": "no_tests_parsed", "verify_status": null, "error": null, "timing": {"setup": 1.4, "pre_test_0": 27.0, "pre_test_1": 3.8, "post_test_0": 12.3, "post_test_1": 3.8, "total": 48.8}, "test_cmds": ["yarn test:unit --json --outputFile=jest-results.json"], "rebuild_cmds": [], "print_cmds": [], "f2p_pre_ok": true, "pre_detail": {"missing": 0, "wrong": [], "missing_ids": [], "parsed_count": 0}, "p2p_env_dropped_count": 50, "f2p_post_ok": false, "p2p_post_ok": true, "post_detail": {"missing": 1, "wrong": [], "missing_ids": ["Player pause before play promise resolves does not reject"], "parsed_count": 0}, "raw_tail": "nder `globals` is deprecated. Please do\ntransform: {\n <transform_regex>: ['ts-jest', { /* ts-jest config goes here in Jest */ }],\n},\nSee more at https://kulshekhar.github.io/ts-jest/docs/getting-started/presets#advanced\nPASS src/__tests__/wavesurfer.test.ts\nPASS src/__tests__/renderer.test.ts\nFAIL src/__tests__/player.test.ts\n \u25cf Player \u203a pause before play promise resolves does not reject\n\n expect(received).resolves.toBeUndefined()\n\n Received promise rejected instead of resolved\n Rejected to value: [AbortError: interrupted]\n\n 41 | player.pause()\n 42 | rejectPlay(abort)\n > 43 | await expect(promise).resolves.toBeUndefined()\n | ^\n 44 | })\n 45 |\n 46 | test('volume and muted', () => {\n\n at expect (node_modules/expect/build/index.js:113:15)\n at src/__tests__/player.test.ts:43:11\n at src/__tests__/player.test.ts:8:71\n at Object.<anonymous>.__awaiter (src/__tests__/player.test.ts:4:12)\n at Object.<anonymous> (src/__tests__/player.test.ts:29:73)\n\nPASS src/__tests__/draggable.test.ts\nPASS src/__tests__/fetcher.test.ts\nPASS src/__tests__/event-emitter.test.ts\nPASS src/__tests__/base-plugin.test.ts\nPASS src/__tests__/dom.test.ts\nPASS src/__tests__/timer.test.ts\n\nTest Suites: 1 failed, 8 passed, 9 total\nTests: 1 failed, 50 passed, 51 total\nSnapshots: 0 total\nTime: 7.981 s\nRan all test suites.\nTest results written to: jest-results.json\nerror Command failed with exit code 1.\n\n\n"}
{"id": "patchbench-ts-real-0014", "repo": "openapi-ts/openapi-typescript", "base_commit": "99c346e06bb41511338d2a8c3752748e5d52a742", "status": "verified", "verify_status": "verified", "error": null, "timing": {"setup": 2.3, "pre_test_0": 57.5, "pre_test_1": 34.2, "post_test_0": 39.7, "post_test_1": 33.6, "total": 169.3}, "test_cmds": ["mkdir -p reports && pnpm exec vitest run --reporter=json 2>&1 | tee reports/vitest-results.json"], "rebuild_cmds": [], "print_cmds": [], "f2p_pre_ok": true, "pre_detail": {"missing": 0, "wrong": [], "missing_ids": [], "parsed_count": 594}, "p2p_env_dropped_count": 66, "f2p_post_ok": true, "p2p_post_ok": true, "post_detail": {"missing": 0, "wrong": [], "missing_ids": [], "parsed_count": 594}, "raw_tail": "960000000649,\"failureMessages\":[],\"meta\":{}},{\"ancestorTitles\":[\"transformSchemaObject > string\"],\"fullName\":\"transformSchemaObject > string enum + nullable + null value\",\"status\":\"passed\",\"title\":\"enum + nullable + null value\",\"duration\":0.3382129999999961,\"failureMessages\":[],\"meta\":{}},{\"ancestorTitles\":[\"transformSchemaObject > string\"],\"fullName\":\"transformSchemaObject > string enum + nullable (deprecated syntax)\",\"status\":\"passed\",\"title\":\"enum + nullable (deprecated syntax)\",\"duration\":0.2379000000000815,\"failureMessages\":[],\"meta\":{}},{\"ancestorTitles\":[\"transformSchemaObject > string\"],\"fullName\":\"transformSchemaObject > string default + nullable\",\"status\":\"passed\",\"title\":\"default + nullable\",\"duration\":0.17506400000002031,\"failureMessages\":[],\"meta\":{}},{\"ancestorTitles\":[\"transformSchemaObject > string\"],\"fullName\":\"transformSchemaObject > string default + nullable + enum\",\"status\":\"passed\",\"title\":\"default + nullable + enum\",\"duration\":0.1686499999999569,\"failureMessages\":[],\"meta\":{}},{\"ancestorTitles\":[\"transformSchemaObject > string\"],\"fullName\":\"transformSchemaObject > string default + nullable (deprecated syntax)\",\"status\":\"passed\",\"title\":\"default + nullable (deprecated syntax)\",\"duration\":0.15269899999998415,\"failureMessages\":[],\"meta\":{}}],\"startTime\":1789039895689,\"endTime\":1789039895702.1687,\"status\":\"passed\",\"message\":\"\",\"name\":\"/tmp/cache/repos/openapi-ts__openapi-typescript/packages/openapi-typescript/test/transform/schema-object/string.test.ts\"}]}\n\n", "context_files": [{"path": "packages/openapi-metadata/src/decorators/api-operation.ts", "content": "import {\n type OperationMetadata,\n OperationMetadataStorage,\n OperationParameterMetadataStorage,\n} from \"../metadata/index.js\";\n\nexport type ApiOperationOptions = OperationMetadata;\n\n/**\n * Configures a new operation.\n * When multiple methods are defined, multiple operations will be added to the document.\n *\n * @see https://swagger.io/specification/#operation-object\n */\nexport function ApiOperation(options: ApiOperationOptions): MethodDecorator {\n return (target, propertyKey) => {\n OperationMetadataStorage.defineMetadata(target, options, propertyKey);\n if (Array.isArray(options.parameters)) {\n OperationParameterMetadataStorage.mergeMetadata(target, options.parameters, propertyKey);\n }\n };\n}\n"}, {"path": "packages/openapi-metadata/src/metadata/operation.ts", "content": "import type { OpenAPIV3 } from \"openapi-types\";\nimport type { HttpMethods } from \"../types.js\";\nimport { createMetadataStorage } from \"./factory.js\";\nimport type { OperationParameterMetadata } from \"./operation-parameter.js\";\n\nexport type OperationMetadata = Omit<OpenAPIV3.OperationObject, \"responses\" | \"parameters\"> & {\n /**\n * Operation path.\n * Can include parameters.\n */\n path?: string;\n\n /**\n * Available methods for this operation.\n */\n methods?: HttpMethods[];\n\n /**\n * Represents metadata about an operation parameter.\n */\n parameters?: OperationParameterMetadata[];\n};\n\nexport const OperationMetadataKey = Symbol(\"Operation\");\n\nexport const OperationMetadataStorage = createMetadataStorage<OperationMetadata>(OperationMetadataKey, {});\n"}, {"path": "packages/openapi-metadata/src/decorators/api-body.ts", "content": "import type { SetOptional } from \"type-fest\";\nimport { type OperationBodyMetadata, OperationBodyMetadataStorage } from \"../metadata/operation-body.js\";\n\nexport type ApiBodyOptions = SetOptional<OperationBodyMetadata, \"mediaType\">;\n\n/**\n * Configures the request body.\n * Can be applied to Controllers and Operations.\n *\n * @see https://swagger.io/specification/#request-body-object\n */\nexport function ApiBody(options: ApiBodyOptions): MethodDecorator {\n return (target, propertyKey) => {\n OperationBodyMetadataStorage.defineMetadata(\n target,\n {\n mediaType: \"application/json\",\n ...options,\n },\n propertyKey,\n );\n };\n}\n"}, {"path": "packages/openapi-metadata/src/decorators/api-cookie.ts", "content": "import { type OperationParameterMetadata, OperationParameterMetadataStorage } from \"../metadata/operation-parameter.js\";\n\nexport type ApiCookieOptions = Omit<OperationParameterMetadata, \"in\">;\n\n/**\n * Configures a cookie parameter.\n * Can be applied to Operations and Controllers.\n *\n * @see https://swagger.io/specification/#parameter-object\n */\nexport function ApiCookie(options: ApiCookieOptions) {\n return (target: Object, propertyKey?: string | symbol) => {\n OperationParameterMetadataStorage.mergeMetadata(target, [{ in: \"cookie\", ...options }], propertyKey);\n };\n}\n"}, {"path": "packages/openapi-metadata/src/decorators/api-exclude.ts", "content": "import { ExcludeMetadataStorage } from \"../metadata/exclude.js\";\n\n/**\n * Exclude this Controller from the generated schema.\n * Useful when working with framework integrations that autoload controllers.\n */\nexport function ApiExcludeController(): ClassDecorator {\n return (target) => {\n ExcludeMetadataStorage.defineMetadata(target, true);\n };\n}\n\n/**\n * Exclude this Operation from the generated schema.\n * Useful when working with framework integrations that autoload controllers.\n */\nexport function ApiExcludeOperation(): MethodDecorator {\n return (target, propertyKey) => {\n ExcludeMetadataStorage.defineMetadata(target, true, propertyKey);\n };\n}\n"}, {"path": "packages/openapi-metadata/src/decorators/api-extra-models.ts", "content": "import { ExtraModelsMetadataStorage } from \"../metadata/extra-models.js\";\nimport type { Thunk, TypeValue } from \"../types.js\";\n\n/**\n * Adds extra models to the generated schema that are not used anywhere else.\n * Useful when you want to share models that are not used by your operations.\n */\nexport function ApiExtraModels(...models: (TypeValue | Thunk<TypeValue>)[]) {\n return (target: Object) => {\n ExtraModelsMetadataStorage.mergeMetadata(target, models);\n };\n}\n"}, {"path": "packages/openapi-metadata/src/decorators/api-header.ts", "content": "import { type OperationParameterMetadata, OperationParameterMetadataStorage } from \"../metadata/operation-parameter.js\";\n\nexport type ApiHeaderOptions = Omit<OperationParameterMetadata, \"in\">;\n\n/**\n * Configures a header parameter.\n * Can be applied to Operations and Controllers.\n *\n * @see https://swagger.io/specification/#parameter-object\n */\nexport function ApiHeader(options: ApiHeaderOptions) {\n return (target: Object, propertyKey?: string | symbol) => {\n OperationParameterMetadataStorage.mergeMetadata(target, [{ in: \"header\", ...options }], propertyKey);\n };\n}\n"}, {"path": "packages/openapi-metadata/src/decorators/api-param.ts", "content": "import { type OperationParameterMetadata, OperationParameterMetadataStorage } from \"../metadata/operation-parameter.js\";\n\nexport type ApiParamOptions = Omit<OperationParameterMetadata, \"in\">;\n\n/**\n * Configures a path parameter.\n * Can be applied to Operations and Controllers.\n *\n * @see https://swagger.io/specification/#parameter-object\n */\nexport function ApiParam(options: ApiParamOptions) {\n return function (target: Object, propertyKey?: string | symbol) {\n OperationParameterMetadataStorage.mergeMetadata(target, [{ in: \"path\", ...options }], propertyKey);\n };\n}\n"}, {"path": "packages/openapi-metadata/src/decorators/api-property.ts", "content": "import type { Context } from \"../context.js\";\nimport { SymbolKeysNotSupportedError } from \"../errors/symbol-keys-not-supported.js\";\nimport { type PropertyMetadata, PropertyMetadataStorage } from \"../metadata/property.js\";\nimport { findType } from \"../utils/metadata.js\";\n\nexport type ApiPropertyOptions = Partial<PropertyMetadata>;\n\n/**\n * Configures this class member as a property of the schema.\n * Can be applied to properties, getters and methods.\n *\n * @see https://swagger.io/specification/#schema-object\n */\nexport function ApiProperty(options?: ApiPropertyOptions): PropertyDecorator;\nexport function ApiProperty(options?: ApiPropertyOptions): MethodDecorator;\nexport function ApiProperty(options?: ApiPropertyOptions): PropertyDecorator | MethodDecorator {\n return (prototype, propertyKey, descriptor) => {\n const isMethod = Boolean(descriptor?.value);\n\n if (typeof propertyKey === \"symbol\") {\n throw new SymbolKeysNotSupportedError();\n }\n\n const metadata = {\n name: options?.name ?? propertyKey,\n required: true,\n ...options,\n } as PropertyMetadata;\n\n if (!metadata.type && !metadata.schema && !metadata.enum) {\n (metadata as any).type = (context: Context) =>\n findType({\n context,\n metadataKey: isMethod ? \"design:returntype\" : \"design:type\",\n prototype,\n propertyKey,\n });\n }\n\n PropertyMetadataStorage.mergeMetadata(prototype, {\n [metadata.name]: metadata as PropertyMetadata,\n });\n };\n}\n\n/**\n * Configures this class member as an optional property of the schema.\n * Can be applied to properties, getters and methods.\n *\n * @see https://swagger.io/specification/#schema-object\n */\nexport function ApiPropertyOptional(options?: Omit<ApiPropertyOptions, \"required\">): PropertyDecorator;\nexport function ApiPropertyOptional(options?: Omit<ApiPropertyOptions, \"required\">): MethodDecorator;\nexport function ApiPropertyOptional(\n options?: Omit<ApiPropertyOptions, \"required\">,\n): PropertyDecorator | MethodDecorator {\n return ApiProperty({\n ...options,\n required: false,\n });\n}\n"}, {"path": "packages/openapi-metadata/src/decorators/api-query.ts", "content": "import { type OperationParameterMetadata, OperationParameterMetadataStorage } from \"../metadata/operation-parameter.js\";\n\nexport type ApiQueryOptions = Omit<OperationParameterMetadata, \"in\">;\n\n/**\n * Configures a query parameter.\n * Can be applied to Operations and Controllers.\n *\n * @see https://swagger.io/specification/#parameter-object\n */\nexport function ApiQuery(options: ApiQueryOptions) {\n return function (target: Object, propertyKey?: string | symbol) {\n OperationParameterMetadataStorage.mergeMetadata(target, [{ in: \"query\", ...options }], propertyKey);\n };\n}\n"}, {"path": "packages/openapi-metadata/src/decorators/api-response.ts", "content": "import type { SetOptional } from \"type-fest\";\nimport { type OperationResponseMetadata, OperationResponseMetadataStorage } from \"../metadata/operation-response.js\";\n\nexport type ApiResponseOptions = SetOptional<OperationResponseMetadata, \"status\" | \"mediaType\">;\n\n/**\n * Configures a response.\n * Can be applied to Controllers and Operations.\n *\n * @see https://swagger.io/specification/#response-object\n */\nexport function ApiResponse(options: ApiResponseOptions) {\n return function (target: Object, propertyKey?: string | symbol) {\n const metadata = {\n status: \"default\" as const,\n mediaType: \"application/json\",\n ...options,\n };\n OperationResponseMetadataStorage.mergeMetadata(\n target,\n {\n [metadata.status.toString()]: metadata,\n },\n propertyKey,\n );\n };\n}\n"}, {"path": "packages/openapi-metadata/src/decorators/api-security.ts", "content": "import { OperationSecurityMetadataStorage } from \"../metadata/operation-security.js\";\n\n/**\n * Configures security requirements.\n * Can be applied to Controllers and Operations.\n *\n * @see https://swagger.io/specification/#security-requirement-object\n */\nexport function ApiSecurity(name: string, ...scopes: string[]) {\n return (target: Object, propertyKey?: string | symbol) => {\n OperationSecurityMetadataStorage.mergeMetadata(\n target,\n {\n [name]: scopes,\n },\n propertyKey,\n );\n };\n}\n\n/**\n * Configures Basic auth security requirement.\n * Can be applied to Controllers and Operations.\n *\n * @see https://swagger.io/specification/#security-requirement-object\n */\nexport function ApiBasicAuth() {\n return ApiSecurity(\"basic\");\n}\n\n/**\n * Configures Bearer auth security requirement.\n * Can be applied to Controllers and Operations.\n *\n * @see https://swagger.io/specification/#security-requirement-object\n */\nexport function ApiBearerAuth() {\n return ApiSecurity(\"bearer\");\n}\n\n/**\n * Configures Cookie auth security requirement.\n * Can be applied to Controllers and Operations.\n *\n * @see https://swagger.io/specification/#security-requirement-object\n */\nexport function ApiCookieAuth() {\n return ApiSecurity(\"cookie\");\n}\n\n/**\n * Configures OAuth2 auth security requirement.\n * Can be applied to Controllers and Operations.\n *\n * @see https://swagger.io/specification/#security-requirement-object\n */\nexport function ApiOauth2(...scopes: string[]) {\n return ApiSecurity(\"oauth2\", ...scopes);\n}\n"}, {"path": "packages/openapi-metadata/src/decorators/api-tags.ts", "content": "import { OperationMetadataStorage } from \"../metadata/operation.js\";\n\n/**\n * Configures tags used to grouping operations.\n * Can be applied to Controllers and Operations.\n */\nexport function ApiTags(...tags: string[]) {\n return (target: Object, propertyKey?: string | symbol) => {\n OperationMetadataStorage.mergeMetadata(target, { tags }, propertyKey);\n };\n}\n"}, {"path": "packages/openapi-metadata/src/decorators/index.ts", "content": "export { ApiBody } from \"./api-body.js\";\nexport { ApiCookie } from \"./api-cookie.js\";\nexport { ApiExcludeController, ApiExcludeOperation } from \"./api-exclude.js\";\nexport { ApiExtraModels } from \"./api-extra-models.js\";\nexport { ApiHeader } from \"./api-header.js\";\nexport { ApiOperation } from \"./api-operation.js\";\nexport { ApiParam } from \"./api-param.js\";\nexport { ApiProperty, ApiPropertyOptional } from \"./api-property.js\";\nexport { ApiQuery } from \"./api-query.js\";\nexport { ApiResponse } from \"./api-response.js\";\nexport {\n ApiSecurity,\n ApiBasicAuth,\n ApiOauth2,\n ApiBearerAuth,\n ApiCookieAuth,\n} from \"./api-security.js\";\nexport { ApiTags } from \"./api-tags.js\";\n"}, {"path": "packages/openapi-metadata/src/metadata/exclude.ts", "content": "import { createMetadataStorage } from \"./factory.js\";\n\nexport const ExcludeMetadataKey = Symbol(\"Exclude\");\n\nexport const ExcludeMetadataStorage = createMetadataStorage<boolean>(ExcludeMetadataKey, false);\n"}, {"path": "packages/openapi-metadata/src/metadata/extra-models.ts", "content": "import type { Thunk, TypeValue } from \"../types.js\";\nimport { createMetadataStorage } from \"./factory.js\";\n\nexport const ExtraModelsMetadataKey = Symbol(\"ExtraModels\");\n\nexport const ExtraModelsMetadataStorage = createMetadataStorage<(TypeValue | Thunk<TypeValue>)[]>(\n ExtraModelsMetadataKey,\n [],\n);\n"}, {"path": "packages/openapi-metadata/src/metadata/factory.ts", "content": "import deepmerge from \"deepmerge\";\n\nexport function createMetadataStorage<T extends Object>(key: Symbol | string, defaultMetadata?: T) {\n function defineMetadata(object: Object, metadata: T, propertyKey?: string | symbol) {\n if (propertyKey) {\n Reflect.defineMetadata(key, metadata, object, propertyKey);\n } else {\n Reflect.defineMetadata(key, metadata, object);\n }\n }\n\n function getMetadata(object: Object, propertyKey?: string | symbol, withParent = false): T {\n if (propertyKey) {\n let metadata = Reflect.getMetadata(key, object, propertyKey) ?? defaultMetadata;\n\n if (withParent) {\n metadata = deepmerge(getMetadata(object.constructor), metadata);\n }\n\n return metadata;\n } else {\n return Reflect.getMetadata(key, object) ?? defaultMetadata;\n }\n }\n\n function mergeMetadata(object: Object, metadata: T, propertyKey?: string | symbol): T {\n const existing = getMetadata(object, propertyKey);\n const merged = deepmerge(existing, metadata) as T;\n defineMetadata(object, merged, propertyKey);\n return merged;\n }\n\n return {\n defineMetadata,\n getMetadata,\n mergeMetadata,\n };\n}\n"}, {"path": "packages/openapi-metadata/src/metadata/index.ts", "content": "export * from \"./operation-body.js\";\nexport * from \"./operation-header.js\";\nexport * from \"./operation-parameter.js\";\nexport * from \"./operation-response.js\";\nexport * from \"./operation-security.js\";\nexport * from \"./operation.js\";\nexport * from \"./property.js\";\nexport * from \"./exclude.js\";\nexport * from \"./extra-models.js\";\n"}, {"path": "packages/openapi-metadata/src/metadata/operation-body.ts", "content": "import type { OpenAPIV3 } from \"openapi-types\";\nimport type { TypeOptions } from \"../types.js\";\nimport { createMetadataStorage } from \"./factory.js\";\n\nexport type OperationBodyMetadata = Omit<OpenAPIV3.RequestBodyObject, \"content\"> & { mediaType: string } & TypeOptions;\n\nexport const OperationBodyMetadataKey = Symbol(\"OperationBody\");\n\nexport const OperationBodyMetadataStorage = createMetadataStorage<OperationBodyMetadata>(OperationBodyMetadataKey);\n"}, {"path": "packages/openapi-metadata/src/metadata/operation-header.ts", "content": "import type { OpenAPIV3 } from \"openapi-types\";\nimport type { TypeOptions } from \"../types.js\";\nimport { createMetadataStorage } from \"./factory.js\";\n\nexport type OperationHeaderMetadata = Omit<OpenAPIV3.HeaderObject, \"schema\"> & {\n name: string;\n} & Partial<TypeOptions>;\n\nexport const OperationHeaderSymbol = Symbol(\"OperationHeader\");\n\nexport const OperationHeaderMetadataStorage =\n createMetadataStorage<Record<string, OperationHeaderMetadata>>(OperationHeaderSymbol);\n"}, {"path": "packages/openapi-metadata/src/metadata/operation-parameter.ts", "content": "import type { OpenAPIV3 } from \"openapi-types\";\nimport type { TypeOptions } from \"../types.js\";\nimport { createMetadataStorage } from \"./factory.js\";\n\nexport type OperationParameterMetadata = Omit<OpenAPIV3.ParameterObject, \"in\" | \"schema\"> & {\n name: string;\n in: \"path\" | \"query\" | \"header\" | \"cookie\";\n} & Partial<TypeOptions>;\n\nexport const OperationParameterMetadataKey = Symbol(\"OperationParameter\");\n\nexport const OperationParameterMetadataStorage = createMetadataStorage<OperationParameterMetadata[]>(\n OperationParameterMetadataKey,\n [],\n);\n"}, {"path": "packages/openapi-metadata/src/metadata/operation-response.ts", "content": "import type { OpenAPIV3 } from \"openapi-types\";\nimport type { TypeOptions } from \"../types.js\";\nimport type { SetOptional } from \"type-fest\";\nimport { createMetadataStorage } from \"./factory.js\";\n\nexport type OperationResponseMetadata = Omit<SetOptional<OpenAPIV3.ResponseObject, \"description\">, \"content\"> & {\n status: number | \"default\";\n mediaType: string;\n} & TypeOptions;\n\nexport const OperationResponseMetadataKey = Symbol(\"OperationResponse\");\n\nexport const OperationResponseMetadataStorage = createMetadataStorage<Record<string, OperationResponseMetadata>>(\n OperationResponseMetadataKey,\n {},\n);\n"}, {"path": "packages/openapi-metadata/src/metadata/operation-security.ts", "content": "import type { OpenAPIV3 } from \"openapi-types\";\nimport { createMetadataStorage } from \"./factory.js\";\n\nexport type OperationSecurityMetadata = OpenAPIV3.SecurityRequirementObject;\n\nexport const OperationSecurityMetadataKey = Symbol(\"OperationSecurity\");\n\nexport const OperationSecurityMetadataStorage = createMetadataStorage<OperationSecurityMetadata>(\n OperationSecurityMetadataKey,\n {},\n);\n"}, {"path": "packages/openapi-metadata/src/metadata/property.ts", "content": "import type { OpenAPIV3 } from \"openapi-types\";\nimport type { TypeOptions } from \"../types.js\";\nimport { createMetadataStorage } from \"./factory.js\";\n\nexport type PropertyMetadata = Omit<OpenAPIV3.NonArraySchemaObject, \"type\" | \"enum\" | \"properties\" | \"required\"> & {\n name: string;\n required: boolean;\n} & TypeOptions;\n\nexport const PropertyMetadataKey = Symbol(\"Property\");\n\nexport const PropertyMetadataStorage = createMetadataStorage<Record<string, PropertyMetadata>>(PropertyMetadataKey);\n"}, {"path": "packages/openapi-metadata/test/decorators.test.ts", "content": "import \"reflect-metadata\";\nimport {\n ApiBasicAuth,\n ApiBearerAuth,\n ApiBody,\n ApiCookie,\n ApiCookieAuth,\n ApiExcludeController,\n ApiExcludeOperation,\n ApiExtraModels,\n ApiHeader,\n ApiOauth2,\n ApiOperation,\n ApiParam,\n ApiProperty,\n ApiQuery,\n ApiResponse,\n ApiSecurity,\n ApiTags,\n} from \"../src/decorators/index.js\";\nimport {\n ExcludeMetadataStorage,\n ExtraModelsMetadataStorage,\n OperationBodyMetadataStorage,\n OperationMetadataStorage,\n type OperationParameterMetadata,\n OperationParameterMetadataStorage,\n OperationResponseMetadataStorage,\n OperationSecurityMetadataStorage,\n PropertyMetadataStorage,\n} from \"../src/metadata/index.js\";\n\ntest(\"@ApiOperation\", () => {\n const parameters: OperationParameterMetadata[] = [\n {\n in: \"path\",\n name: \"id\",\n },\n ] as const;\n\n class MyController {\n @ApiOperation({\n summary: \"Hello\",\n path: \"/test\",\n methods: [\"get\"],\n parameters,\n })\n operation() {}\n }\n\n const operationMetadata = OperationMetadataStorage.getMetadata(MyController.prototype, \"operation\");\n const parameterMetadata = OperationParameterMetadataStorage.getMetadata(MyController.prototype, \"operation\");\n expect(operationMetadata).toEqual({\n summary: \"Hello\",\n path: \"/test\",\n methods: [\"get\"],\n parameters,\n });\n expect(parameterMetadata).toEqual(parameters);\n});\n\ntest(\"@ApiBody\", () => {\n class MyController {\n @ApiBody({ type: \"string\" })\n operation() {}\n }\n\n const metadata = OperationBodyMetadataStorage.getMetadata(MyController.prototype, \"operation\");\n\n expect(metadata).toEqual({\n type: \"string\",\n mediaType: \"application/json\",\n });\n});\n\ntest(\"@ApiParam\", () => {\n @ApiParam({ name: \"test\" })\n class MyController {\n @ApiParam({ name: \"hello\" })\n operation() {}\n }\n\n const metadata = OperationParameterMetadataStorage.getMetadata(MyController.prototype, \"operation\", true);\n\n expect(metadata).toEqual([\n { in: \"path\", name: \"test\" },\n { in: \"path\", name: \"hello\" },\n ]);\n});\n\ntest(\"@ApiHeader\", () => {\n @ApiHeader({ name: \"test\" })\n class MyController {\n @ApiHeader({ name: \"hello\" })\n operation() {}\n }\n\n const metadata = OperationParameterMetadataStorage.getMetadata(MyController.prototype, \"operation\", true);\n\n expect(metadata).toEqual([\n { in: \"header\", name: \"test\" },\n { in: \"header\", name: \"hello\" },\n ]);\n});\n\ntest(\"@ApiCookie\", () => {\n @ApiCookie({ name: \"test\" })\n class MyController {\n @ApiCookie({ name: \"hello\" })\n operation() {}\n }\n\n const metadata = OperationParameterMetadataStorage.getMetadata(MyController.prototype, \"operation\", true);\n\n expect(metadata).toEqual([\n { in: \"cookie\", name: \"test\" },\n { in: \"cookie\", name: \"hello\" },\n ]);\n});\n\ntest(\"@ApiQuery\", () => {\n @ApiQuery({ name: \"test\" })\n class MyController {\n @ApiQuery({ name: \"hello\" })\n operation() {}\n }\n\n const metadata = OperationParameterMetadataStorage.getMetadata(MyController.prototype, \"operation\", true);\n\n expect(metadata).toEqual([\n { in: \"query\", name: \"test\" },\n { in: \"query\", name: \"hello\" },\n ]);\n});\n\ntest(\"@ApiResponse\", () => {\n @ApiResponse({ type: \"string\", mediaType: \"text/html\" })\n class MyController {\n @ApiResponse({ status: 404, type: \"number\" })\n operation() {}\n }\n\n const metadata = OperationResponseMetadataStorage.getMetadata(MyController.prototype, \"operation\", true);\n\n expect(metadata).toEqual({\n default: { status: \"default\", mediaType: \"text/html\", type: \"string\" },\n \"404\": { status: 404, mediaType: \"application/json\", type: \"number\" },\n });\n});\n\ntest(\"@ApiTags\", () => {\n @ApiTags(\"Root\")\n class MyController {\n @ApiTags(\"Hello\", \"World\")\n @ApiTags(\"Foo\", \"Bar\")\n operation() {}\n }\n\n const metadata = OperationMetadataStorage.getMetadata(MyController.prototype, \"operation\", true);\n\n expect(metadata.tags).toEqual([\"Root\", \"Foo\", \"Bar\", \"Hello\", \"World\"]);\n});\n\ntest(\"@ApiSecurity\", () => {\n @ApiBasicAuth()\n @ApiCookieAuth()\n class MyController {\n @ApiSecurity(\"custom\")\n @ApiBearerAuth()\n @ApiOauth2(\"pets:write\")\n operation() {}\n }\n\n const metadata = OperationSecurityMetadataStorage.getMetadata(MyController.prototype, \"operation\", true);\n\n expect(metadata).toEqual({\n custom: [],\n cookie: [],\n basic: [],\n bearer: [],\n oauth2: [\"pets:write\"],\n });\n});\n\ntest(\"@ApiExcludeController\", () => {\n @ApiExcludeController()\n class MyController {}\n\n const metadata = ExcludeMetadataStorage.getMetadata(MyController);\n expect(metadata).toBe(true);\n});\n\ntest(\"@ApiExcludeOperation\", () => {\n class MyController {\n @ApiExcludeOperation()\n operation() {}\n }\n\n const metadata = ExcludeMetadataStorage.getMetadata(MyController.prototype, \"operation\");\n expect(metadata).toBe(true);\n});\n\ntest(\"@ApiExtraModels\", () => {\n @ApiExtraModels(\"string\")\n class MyController {\n operation() {}\n }\n\n const metadata = ExtraModelsMetadataStorage.getMetadata(MyController);\n\n expect(metadata).toEqual([\"string\"]);\n});\n\ntest(\"@ApiProperty\", () => {\n class User {\n @ApiProperty()\n declare declared: string;\n\n @ApiProperty()\n // biome-ignore lint/style/noInferrableTypes: required for metadata\n defined: number = 4;\n\n @ApiProperty({ type: \"string\" })\n explicitType = \"test\";\n\n @ApiProperty({ example: \"hey\" })\n get getter(): string {\n return \"hello\";\n }\n\n @ApiProperty()\n func(): boolean {\n return false;\n }\n }\n\n const metadata = PropertyMetadataStorage.getMetadata(User.prototype);\n\n expect(metadata.declared).toMatchObject({\n name: \"declared\",\n required: true,\n });\n // @ts-expect-error\n expect(metadata.declared?.type()).toEqual(String);\n\n expect(metadata.defined).toMatchObject({\n name: \"defined\",\n required: true,\n });\n // @ts-expect-error\n expect(metadata.defined?.type()).toEqual(Number);\n\n expect(metadata.explicitType).toMatchObject({\n name: \"explicitType\",\n required: true,\n type: \"string\",\n });\n\n expect(metadata.getter).toMatchObject({\n name: \"getter\",\n required: true,\n example: \"hey\",\n });\n // @ts-expect-error\n expect(metadata.getter?.type()).toEqual(String);\n\n expect(metadata.func).toMatchObject({\n name: \"func\",\n required: true,\n });\n // @ts-expect-error\n expect(metadata.func?.type()).toEqual(Boolean);\n});\n"}, {"path": "docs/.vitepress/config.ts", "content": "import { defineConfig } from \"vitepress\";\nimport en from \"./en\";\nimport zh from \"./zh\";\nimport ja from \"./ja\";\nimport shared from \"./shared\";\nimport { transformerTwoslash } from \"@shikijs/vitepress-twoslash\";\nimport { ModuleResolutionKind } from \"typescript\";\n\n// https://vitepress.dev/reference/site-config\nexport default defineConfig({\n ...shared,\n locales: {\n root: { label: \"English\", ...en },\n zh: { label: \"\u7b80\u4f53\u4e2d\u6587\", ...zh },\n ja: { label: \"\u65e5\u672c\u8a9e\", ...ja },\n },\n markdown: {\n codeTransformers: [\n transformerTwoslash({\n twoslashOptions: {\n compilerOptions: {\n experimentalDecorators: true,\n moduleResolution: ModuleResolutionKind.Bundler,\n },\n },\n }),\n ],\n },\n});\n"}, {"path": "docs/.vitepress/en.ts", "content": "import { defineConfig } from \"vitepress\";\nimport sharedConfig from \"./shared\";\n\nexport default defineConfig({\n description: \"Consume OpenAPI 3.0 & 3.1\u00a0schemas in TypeScript\",\n themeConfig: {\n nav: [\n {\n text: \"Version\",\n items: [\n { text: \"7.x\", link: \"/introduction\" },\n { text: \"6.x\", link: \"/6.x/introduction\" },\n ],\n },\n ],\n sidebar: {\n // 6.x docs\n \"/6.x/\": [\n {\n text: \"openapi-typescript (6.x)\",\n items: [\n { text: \"Introduction\", link: \"/6.x/introduction\" },\n { text: \"CLI\", link: \"/6.x/cli\" },\n { text: \"Node.js API\", link: \"/6.x/node\" },\n { text: \"Advanced\", link: \"/6.x/advanced\" },\n { text: \"About\", link: \"/6.x/about\" },\n ],\n },\n {\n text: \"openapi-fetch\",\n items: [\n { text: \"Getting Started\", link: \"/openapi-fetch/\" },\n {\n text: \"Middleware & Auth\",\n link: \"/openapi-fetch/middleware-auth\",\n },\n { text: \"Testing\", link: \"/openapi-fetch/testing\" },\n { text: \"Examples\", link: \"/openapi-fetch/examples\" },\n { text: \"API\", link: \"/openapi-fetch/api\" },\n ],\n },\n ],\n // default (7.x) docs\n \"/\": [\n {\n text: \"openapi-typescript (7.x)\",\n items: [\n { text: \"Introduction\", link: \"/introduction\" },\n { text: \"CLI\", link: \"/cli\" },\n { text: \"Node.js API\", link: \"/node\" },\n { text: \"Examples\", link: \"/examples\" },\n { text: \"Migrating from 6.x\", link: \"/migration-guide\" },\n { text: \"Advanced\", link: \"/advanced\" },\n ],\n },\n {\n text: \"openapi-fetch\",\n items: [\n { text: \"Getting Started\", link: \"/openapi-fetch/\" },\n {\n text: \"Middleware & Auth\",\n link: \"/openapi-fetch/middleware-auth\",\n },\n { text: \"Testing\", link: \"/openapi-fetch/testing\" },\n { text: \"Examples\", link: \"/openapi-fetch/examples\" },\n { text: \"API\", link: \"/openapi-fetch/api\" },\n ],\n },\n {\n text: \"openapi-react-query\",\n base: \"/openapi-react-query\",\n items: [\n { text: \"Getting Started\", link: \"/\" },\n { text: \"useQuery\", link: \"/use-query\" },\n { text: \"useMutation\", link: \"/use-mutation\" },\n { text: \"useSuspenseQuery\", link: \"/use-suspense-query\" },\n { text: \"useInfiniteQuery\", link: \"/use-infinite-query\" },\n { text: \"queryOptions\", link: \"/query-options\" },\n ],\n },\n {\n text: \"swr-openapi\",\n base: \"/swr-openapi\",\n items: [\n { text: \"Getting Started\", link: \"/\" },\n { text: \"Hook Builders\", link: \"/hook-builders\" },\n { text: \"useQuery\", link: \"/use-query\" },\n { text: \"useImmutable\", link: \"/use-immutable\" },\n { text: \"useInfinite\", link: \"/use-infinite\" },\n { text: \"useMutate\", link: \"/use-mutate\" },\n ],\n },\n {\n text: \"openapi-metadata\",\n items: [\n { text: \"Getting Started\", link: \"/openapi-metadata\" },\n { text: \"Decorators\", link: \"/openapi-metadata/decorators\" },\n { text: \"Metadata\", link: \"/openapi-metadata/metadata\" },\n { text: \"Type loader\", link: \"/openapi-metadata/type-loader\" },\n { text: \"UI Integrations\", link: \"/openapi-metadata/ui\" },\n {\n text: \"Integrations\",\n items: [\n {\n text: \"AdonisJS\",\n link: \"https://friendsofadonis.com/docs/openapi\",\n },\n ],\n },\n { text: \"Examples\", link: \"/openapi-metadata/examples\" },\n ],\n },\n { text: \"About\", link: \"/about\" },\n ],\n },\n search: {\n provider: \"algolia\",\n options: {\n appId: \"NA92XVKBVS\",\n apiKey: \"4f3ce9ca7edc3b83c209e6656ab29eb8\",\n indexName: \"openapi-ts\",\n },\n },\n socialLinks: [\n {\n icon: \"github\",\n link: \"https://github.com/openapi-ts/openapi-typescript\",\n },\n ],\n footer: {\n message:\n 'Released under the <a href=\"https://github.com/openapi-ts/openapi-typescript/blob/main/packages/openapi-typescript/LICENSE\">MIT License</a>. Powered by <a href=\"https://netlify.com\">Netlify</a>.',\n },\n },\n});\n"}, {"path": "docs/.vitepress/ja.ts", "content": "import { defineConfig, type DefaultTheme } from \"vitepress\";\n\nexport default defineConfig({\n lang: \"ja\",\n description: \"OpenAPI 3.0\u304a\u3088\u30733.1\u306e\u30b9\u30ad\u30fc\u30de\u3092TypeScript\u3067\u4f7f\u7528\u3059\u308b\u65b9\u6cd5\u3002\",\n themeConfig: {\n nav: [\n {\n text: \"\u30d0\u30fc\u30b8\u30e7\u30f3\",\n items: [\n { text: \"7.x\", link: \"/ja/introduction\" },\n { text: \"6.x\", link: \"/6.x/introduction\" },\n ],\n },\n ],\n sidebar: {\n \"/ja/\": [\n {\n text: \"openapi-typescript (7.x)\",\n items: [\n { text: \"\u30a4\u30f3\u30c8\u30ed\u30c0\u30af\u30b7\u30e7\u30f3\", link: \"/ja/introduction\" },\n { text: \"CLI\", link: \"/ja/cli\" },\n { text: \"Node.js API\", link: \"/ja/node\" },\n { text: \"\u4f7f\u7528\u4f8b\", link: \"/ja/examples\" },\n { text: \"6.x\u304b\u3089\u306e\u30de\u30a4\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3\", link: \"/ja/migration-guide\" },\n { text: \"\u9ad8\u5ea6\u306a\u6a5f\u80fd\", link: \"/ja/advanced\" },\n ],\n },\n {\n text: \"openapi-fetch\",\n items: [\n { text: \"\u59cb\u3081\u308b\", link: \"/ja/openapi-fetch/\" },\n {\n text: \"\u30df\u30c9\u30eb\u30a6\u30a7\u30a2 & \u8a8d\u8a3c\",\n link: \"/ja/openapi-fetch/middleware-auth\",\n },\n { text: \"\u30c6\u30b9\u30c8\", link: \"/ja/openapi-fetch/testing\" },\n { text: \"\u4f7f\u7528\u4f8b\", link: \"/ja/openapi-fetch/examples\" },\n { text: \"API\", link: \"/ja/openapi-fetch/api\" },\n ],\n },\n {\n text: \"openapi-react-query\",\n items: [\n { text: \"\u59cb\u3081\u308b\", link: \"/ja/openapi-react-query/\" },\n { text: \"useQuery\", link: \"/ja/openapi-react-query/use-query\" },\n { text: \"useMutation\", link: \"/ja/openapi-react-query/use-mutation\" },\n { text: \"useSuspenseQuery\", link: \"/ja/openapi-react-query/use-suspense-query\" },\n ],\n },\n ],\n },\n\n docFooter: {\n prev: \"\u524d\u306e\u30da\u30fc\u30b8\",\n next: \"\u6b21\u306e\u30da\u30fc\u30b8\",\n },\n outline: {\n label: \"\u76ee\u6b21\",\n },\n sidebarMenuLabel: \"\u30e1\u30cb\u30e5\u30fc\",\n returnToTopLabel: \"\u6700\u4e0a\u90e8\u306b\u623b\u308b\",\n footer: {\n message:\n '<a href=\"https://github.com/openapi-ts/openapi-typescript/blob/main/packages/openapi-typescript/LICENSE\">MIT\u30e9\u30a4\u30bb\u30f3\u30b9</a> \u306b\u57fa\u3065\u3044\u3066\u914d\u5e03\u3055\u308c\u3066\u3044\u307e\u3059\u3002',\n },\n },\n});\n\nexport const jaSearch: DefaultTheme.AlgoliaSearchOptions[\"locales\"] = {\n ja: {\n placeholder: \"\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3092\u691c\u7d22\",\n translations: {\n button: {\n buttonText: \"\u691c\u7d22\",\n buttonAriaLabel: \"\u691c\u7d22\",\n },\n modal: {\n searchBox: {\n resetButtonTitle: \"\u30af\u30a8\u30ea\u3092\u30af\u30ea\u30a2\",\n resetButtonAriaLabel: \"\u30af\u30a8\u30ea\u3092\u30af\u30ea\u30a2\",\n cancelButtonText: \"\u30ad\u30e3\u30f3\u30bb\u30eb\",\n cancelButtonAriaLabel: \"\u30ad\u30e3\u30f3\u30bb\u30eb\",\n },\n startScreen: {\n recentSearchesTitle: \"\u6700\u8fd1\u306e\u691c\u7d22\",\n noRecentSearchesText: \"\u6700\u8fd1\u306e\u691c\u7d22\u5c65\u6b74\u306f\u3042\u308a\u307e\u305b\u3093\",\n saveRecentSearchButtonTitle: \"\u6700\u8fd1\u306e\u691c\u7d22\u306b\u4fdd\u5b58\",\n removeRecentSearchButtonTitle: \"\u6700\u8fd1\u306e\u691c\u7d22\u304b\u3089\u524a\u9664\",\n favoriteSearchesTitle: \"\u304a\u6c17\u306b\u5165\u308a\",\n removeFavoriteSearchButtonTitle: \"\u304a\u6c17\u306b\u5165\u308a\u304b\u3089\u524a\u9664\",\n },\n errorScreen: {\n titleText: \"\u7d50\u679c\u3092\u53d6\u5f97\u3067\u304d\u307e\u305b\u3093\",\n helpText: \"\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u63a5\u7d9a\u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\",\n },\n footer: {\n selectText: \"\u9078\u629e\",\n navigateText: \"\u79fb\u52d5\",\n closeText: \"\u9589\u3058\u308b\",\n },\n noResultsScreen: {\n noResultsText: \"\u95a2\u9023\u3059\u308b\u7d50\u679c\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093\",\n suggestedQueryText: \"\u5225\u306e\u30af\u30a8\u30ea\u3092\u8a66\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\",\n reportMissingResultsText: \"\u3053\u306e\u30af\u30a8\u30ea\u306b\u7d50\u679c\u304c\u3042\u308b\u3079\u304d\u3060\u3068\u601d\u3044\u307e\u3059\u304b\uff1f\",\n reportMissingResultsLinkText: \"\u30d5\u30a3\u30fc\u30c9\u30d0\u30c3\u30af\u3092\u9001\u4fe1\",\n },\n },\n },\n },\n};\n"}, {"path": "docs/.vitepress/shared.ts", "content": "import type { UserConfig, DefaultTheme } from \"vitepress\";\nimport { zhSearch } from \"./zh\";\nimport { jaSearch } from \"./ja\";\n\nconst HOSTNAME = \"https://openapi-ts.dev\";\n\nconst shared: UserConfig = {\n title: \"OpenAPI TypeScript\",\n cleanUrls: true,\n srcExclude: [\"**/*/CONTRIBUTRING.md\", \"**/*/README.md\"],\n ignoreDeadLinks: [/CODE_OF_CONDUCT/],\n head: [\n [\"link\", { rel: \"shortcut icon\", href: \"/favicon.svg\", type: \"image/svg\" }],\n [\n \"script\",\n {\n defer: \"\",\n src: \"https://static.cloudflareinsights.com/beacon.min.js\",\n \"data-cf-beacon\": '{\"token\": \"a2adac3f69344a25a38525e84400dd6c\"}',\n },\n ],\n ],\n sitemap: {\n hostname: HOSTNAME,\n },\n themeConfig: {\n siteTitle: false,\n logo: \"/assets/openapi-ts.svg\",\n outline: \"deep\",\n search: {\n provider: \"algolia\",\n options: {\n appId: \"NA92XVKBVS\",\n apiKey: \"4f3ce9ca7edc3b83c209e6656ab29eb8\",\n indexName: \"openapi-ts\",\n locales: { ...zhSearch, ...jaSearch },\n },\n },\n socialLinks: [\n {\n icon: {\n svg: '<svg fill=\"#202020\" viewBox=\"0 0 16 16\" height=\"16\" width=\"16\" xmlns=\"http://www.w3.org/2000/svg\"><path fill-opacity=\".4\" d=\"M12.995 8.195c0 .937-.312 1.912-.78 2.693l1.99 1.99c.976-1.327 1.6-2.966 1.6-4.683 0-1.795-.624-3.434-1.561-4.76l-2.068 2.028c.468.781.78 1.679.78 2.732z\"></path><path d=\"M8 13.151a4.995 4.995 0 1 1 0-9.99c1.015 0 1.951.273 2.732.82l1.95-2.03a7.805 7.805 0 1 0 .04 12.449l-1.951-2.03a5.07 5.07 0 0 1-2.732.781z\"></path></svg>',\n },\n link: \"https://opencollective.com/openapi-ts\",\n },\n { icon: \"github\", link: \"https://github.com/openapi-ts/openapi-typescript\" },\n ],\n } satisfies DefaultTheme.Config,\n transformPageData({ relativePath, frontmatter }) {\n frontmatter.head ??= [];\n frontmatter.head.push([\n \"link\",\n { rel: \"canonical\", href: `${HOSTNAME}/${relativePath.replace(/(index\\.md|\\.md)$/, \"\")}` },\n ]);\n },\n};\n\nexport default shared;\n"}, {"path": "docs/.vitepress/theme/index.ts", "content": "// https://vitepress.dev/guide/custom-theme\nimport type { Theme } from \"vitepress\";\nimport DefaultTheme from \"vitepress/theme\";\nimport CustomLayout from \"./CustomLayout.vue\";\nimport SponsorList from \"./SponsorList.vue\";\nimport TwoslashFloatingVue from \"@shikijs/vitepress-twoslash/client\";\nimport \"./style.css\";\nimport \"@shikijs/vitepress-twoslash/style.css\";\n\nexport default {\n extends: DefaultTheme,\n Layout: CustomLayout,\n enhanceApp({ app, router, siteData }) {\n app.component(\"SponsorList\", SponsorList);\n app.use(TwoslashFloatingVue);\n },\n} satisfies Theme;\n"}, {"path": "docs/.vitepress/zh.ts", "content": "import { defineConfig, type DefaultTheme } from \"vitepress\";\n\nexport default defineConfig({\n lang: \"zh-Hans\",\n description: \"\u5728 TypeScript \u4e2d\u4f7f\u7528 OpenAPI 3.0 \u548c 3.1 \u7684\u6a21\u5f0f\u3002\",\n themeConfig: {\n nav: [\n {\n text: \"\u7248\u672c\",\n items: [\n { text: \"7.x\", link: \"/zh/introduction\" },\n { text: \"6.x\", link: \"/6.x/introduction\" },\n ],\n },\n ],\n sidebar: {\n \"/zh/\": [\n {\n text: \"openapi-typescript\",\n items: [\n { text: \"\u4ecb\u7ecd\", link: \"/zh/introduction\" },\n { text: \"\u547d\u4ee4\u884c\uff08CLI\uff09\", link: \"/zh/cli\" },\n { text: \"Node.js API\", link: \"/zh/node\" },\n { text: \"\u793a\u4f8b\", link: \"/zh/examples\" },\n { text: \"\u9ad8\u7ea7\u529f\u80fd\", link: \"/zh/advanced\" },\n ],\n },\n {\n text: \"openapi-fetch\",\n items: [\n { text: \"\u5feb\u901f\u4e0a\u624b\", link: \"/zh/openapi-fetch/\" },\n {\n text: \"\u4e2d\u95f4\u4ef6 & \u8eab\u4efd\u8ba4\u8bc1\",\n link: \"/zh/openapi-fetch/middleware-auth\",\n },\n { text: \"\u6d4b\u8bd5\", link: \"/zh/openapi-fetch/testing\" },\n { text: \"\u793a\u4f8b\", link: \"/zh/openapi-fetch/examples\" },\n { text: \"API\", link: \"/zh/openapi-fetch/api\" },\n ],\n },\n ],\n },\n\n docFooter: {\n prev: \"\u4e0a\u4e00\u9875\",\n next: \"\u4e0b\u4e00\u9875\",\n },\n\n outline: {\n label: \"\u9875\u9762\u5bfc\u822a\",\n },\n\n footer: {\n message:\n '\u57fa\u4e8e <a href=\"https://github.com/openapi-ts/openapi-typescript/blob/main/packages/openapi-typescript/LICENSE\">MIT</a> \u8bb8\u53ef\u53d1\u5e03',\n },\n },\n});\n\nexport const zhSearch: DefaultTheme.AlgoliaSearchOptions[\"locales\"] = {\n zh: {\n placeholder: \"\u641c\u7d22\u6587\u6863\",\n translations: {\n button: {\n buttonText: \"\u641c\u7d22\u6587\u6863\",\n buttonAriaLabel: \"\u641c\u7d22\u6587\u6863\",\n },\n modal: {\n searchBox: {\n resetButtonTitle: \"\u6e05\u9664\u67e5\u8be2\u6761\u4ef6\",\n resetButtonAriaLabel: \"\u6e05\u9664\u67e5\u8be2\u6761\u4ef6\",\n cancelButtonText: \"\u53d6\u6d88\",\n cancelButtonAriaLabel: \"\u53d6\u6d88\",\n },\n startScreen: {\n recentSearchesTitle: \"\u641c\u7d22\u5386\u53f2\",\n noRecentSearchesText: \"\u6ca1\u6709\u641c\u7d22\u5386\u53f2\",\n saveRecentSearchButtonTitle: \"\u4fdd\u5b58\u81f3\u641c\u7d22\u5386\u53f2\",\n removeRecentSearchButtonTitle: \"\u4ece\u641c\u7d22\u5386\u53f2\u4e2d\u79fb\u9664\",\n favoriteSearchesTitle: \"\u6536\u85cf\",\n removeFavoriteSearchButtonTitle: \"\u4ece\u6536\u85cf\u4e2d\u79fb\u9664\",\n },\n errorScreen: {\n titleText: \"\u65e0\u6cd5\u83b7\u53d6\u7ed3\u679c\",\n helpText: \"\u4f60\u53ef\u80fd\u9700\u8981\u68c0\u67e5\u4f60\u7684\u7f51\u7edc\u8fde\u63a5\",\n },\n footer: {\n selectText: \"\u9009\u62e9\",\n navigateText: \"\u5207\u6362\",\n closeText: \"\u5173\u95ed\",\n searchByText: \"\u641c\u7d22\u63d0\u4f9b\u8005\",\n },\n noResultsScreen: {\n noResultsText: \"\u65e0\u6cd5\u627e\u5230\u76f8\u5173\u7ed3\u679c\",\n suggestedQueryText: \"\u4f60\u53ef\u4ee5\u5c1d\u8bd5\u67e5\u8be2\",\n reportMissingResultsText: \"\u4f60\u8ba4\u4e3a\u8be5\u67e5\u8be2\u5e94\u8be5\u6709\u7ed3\u679c\uff1f\",\n reportMissingResultsLinkText: \"\u70b9\u51fb\u53cd\u9988\",\n },\n },\n },\n },\n};\n"}, {"path": "packages/openapi-fetch/build.config.ts", "content": "import { defineBuildConfig } from \"unbuild\";\n\nexport default defineBuildConfig({\n entries: [\"./src/index.js\"],\n declaration: \"compatible\",\n clean: true,\n sourcemap: true,\n rollup: {\n // Ship CommonJS-compatible bundle\n emitCJS: true,\n },\n});\n"}, {"path": "packages/openapi-fetch/examples/nextjs/app/layout.tsx", "content": "import React from \"react\";\nimport type { Metadata } from \"next\";\n\nexport const metadata: Metadata = {\n title: \"openapi-fetch + Next.js\",\n};\n\nexport default function RootLayout({\n children,\n}: {\n children: React.ReactNode;\n}) {\n return (\n <html lang=\"en\">\n <body>{children}</body>\n </html>\n );\n}\n"}, {"path": "packages/openapi-fetch/examples/nextjs/app/page.tsx", "content": "import React from \"react\";\nimport client from \"../lib/api\";\n\nasync function getFact() {\n return await client.GET(\"/fact\", {\n params: {\n query: { max_length: 500 },\n },\n });\n}\n\nexport default async function Home() {\n const fact = await getFact();\n\n return (\n <div>\n {fact.error ? (\n <div>There was an error: {fact.error.message}</div>\n ) : (\n <pre>\n <code>{JSON.stringify(fact.data, undefined, 2)}</code>\n </pre>\n )}\n </div>\n );\n}\n"}, {"path": "packages/openapi-fetch/examples/nextjs/lib/api/index.ts", "content": "import createClient from \"openapi-fetch\";\nimport type { paths } from \"./v1\";\n\nconst client = createClient<paths>({ baseUrl: \"https://catfact.ninja/\" });\nexport default client;\n"}, {"path": "packages/openapi-fetch/examples/sveltekit/src/app.d.ts", "content": "// See https://kit.svelte.dev/docs/types#app\n// for information about these interfaces\ndeclare global {\n\tnamespace App {\n\t\t// interface Error {}\n\t\t// interface Locals {}\n\t\t// interface PageData {}\n\t\t// interface Platform {}\n\t}\n}\n\nexport {};\n"}, {"path": "packages/openapi-fetch/examples/sveltekit/src/hooks.server.ts", "content": "import type { Handle } from \"@sveltejs/kit\";\n\nexport const handle: Handle = async ({ event, resolve }) => {\n return resolve(event, {\n filterSerializedResponseHeaders(name) {\n // SvelteKit doesn't serialize any headers on server-side fetches by default but openapi-fetch uses this header for empty responses.\n return name === \"content-length\";\n },\n });\n};\n"}, {"path": "packages/openapi-fetch/examples/sveltekit/src/lib/api/index.ts", "content": "import createClient from \"openapi-fetch\";\nimport type { paths } from \"./v1\";\n\nconst client = createClient<paths>({ baseUrl: \"https://catfact.ninja/\" });\nexport default client;\n"}, {"path": "packages/openapi-fetch/examples/sveltekit/src/routes/page-data/+page.ts", "content": "import client from \"$lib/api/index.js\";\n\n// Note: this uses Svelte\u2019s custom fetcher as an example, but Node\u2019s\n// native fetch works, too. See Svelte\u2019s docs to learn the difference:\n// @see https://kit.svelte.dev/docs/load#making-fetch-requests\nexport async function load({ fetch }) {\n const fact = await client.GET(\"/fact\", {\n params: { query: { max_length: 500 } },\n fetch,\n });\n\n return {\n fact: {\n data: fact.data,\n error: fact.error,\n },\n };\n}\n"}, {"path": "packages/openapi-fetch/examples/sveltekit/vite.config.ts", "content": "import { sveltekit } from \"@sveltejs/kit/vite\";\nimport { defineConfig } from \"vite\";\n\nexport default defineConfig({\n plugins: [sveltekit()],\n});\n"}, {"path": "packages/openapi-fetch/examples/vue-3/env.d.ts", "content": "/// <reference types=\"vite/client\" />\n"}, {"path": "packages/openapi-fetch/examples/vue-3/src/composables/catfact-query.ts", "content": "import client from \"#/lib\";\nimport { ref } from \"vue\";\nimport type { ParamsOption, RequestBodyOption } from \"openapi-fetch\";\nimport type { paths } from \"#/generated/catfact\";\n\ninterface AppError {\n code: number;\n message: string;\n}\n\ntype FactCatQueryOptions<T> = ParamsOption<T> & RequestBodyOption<T>;\n\ntype CatFactResponse =\n paths[\"/fact\"][\"get\"][\"responses\"][\"200\"][\"content\"][\"application/json\"];\n\nexport const useCatFactQuery = (\n fetchOptions: FactCatQueryOptions<paths[\"/fact\"][\"get\"]>\n) => {\n const state = ref<CatFactResponse>();\n const isReady = ref(false);\n const isFetching = ref(false);\n const error = ref<AppError | undefined>(undefined);\n\n async function execute() {\n error.value = undefined;\n isReady.value = false;\n isFetching.value = true;\n\n const { data, error: fetchError } = await client.GET(\"/fact\", fetchOptions);\n\n if (fetchError) {\n error.value = fetchError;\n } else {\n state.value = data;\n isReady.value = true;\n }\n\n isFetching.value = false;\n }\n\n execute();\n\n return {\n state,\n isReady,\n isFetching,\n error,\n execute,\n };\n};\n"}, {"path": "packages/openapi-fetch/examples/vue-3/src/lib/index.ts", "content": "import type { paths } from \"#/generated/catfact\";\nimport createClient from \"openapi-fetch\";\n\nconst client = createClient<paths>({ baseUrl: \"https://catfact.ninja/\" });\n\nexport default client;\n"}, {"path": "packages/openapi-fetch/examples/vue-3/src/main.ts", "content": "import './assets/main.css'\n\nimport { createApp } from 'vue'\nimport App from './App.vue'\n\ncreateApp(App).mount('#app')\n"}, {"path": "packages/openapi-fetch/examples/vue-3/vite.config.ts", "content": "import { fileURLToPath, URL } from 'node:url'\n\nimport { defineConfig } from 'vite'\nimport vue from '@vitejs/plugin-vue'\n\n// https://vitejs.dev/config/\nexport default defineConfig({\n plugins: [\n vue(),\n ],\n resolve: {\n alias: {\n '#': fileURLToPath(new URL('./src', import.meta.url))\n }\n }\n})\n"}, {"path": "packages/openapi-fetch/playwright.config.ts", "content": "import { defineConfig, devices } from \"@playwright/test\";\n\nconst PORT = Number.parseInt(process.env.PORT || 4173 || \"\", 10);\n\nexport default defineConfig({\n testMatch: \"test/**/*.e2e.ts\",\n webServer: {\n command: \"pnpm run e2e-vite-build && pnpm run e2e-vite-start\",\n port: PORT,\n },\n use: {\n baseURL: `http://localhost:${PORT}`,\n },\n projects: [\n {\n name: \"chrome\",\n use: { ...devices[\"Desktop Chrome\"] },\n },\n {\n name: \"firefox\",\n use: { ...devices[\"Desktop Firefox\"] },\n },\n {\n name: \"webkit\",\n use: { ...devices[\"Desktop Safari\"] },\n },\n ],\n});\n"}, {"path": "packages/openapi-fetch/test/e2e/app/vite.config.ts", "content": "import { defineConfig } from \"vite\";\n\nexport default defineConfig({\n build: {\n outDir: \"./dist/\",\n },\n preview: {\n port: Number.parseInt(process.env.PORT || \"4173\", 10),\n },\n});\n"}, {"path": "packages/openapi-fetch/test/http-methods/options.test.ts", "content": "import { describe, expect, test } from \"vitest\";\nimport { createObservedClient } from \"../helpers.js\";\nimport type { paths } from \"./schemas/options.js\";\n\ndescribe(\"OPTIONS\", () => {\n test(\"sends the correct method\", async () => {\n let method = \"\";\n const client = createObservedClient<paths>({}, async (req) => {\n method = req.method;\n return new Response(\"\", { headers: { Allow: \"OPTIONS, GET, HEAD, POST\" }, status: 200 });\n });\n await client.OPTIONS(\"/resources\", { parseAs: \"text\" });\n expect(method).toBe(\"OPTIONS\");\n });\n});\n"}, {"path": "packages/openapi-metadata/src/errors/index.ts", "content": "export { InvalidConfigurationError } from \"./invalid-configuration.js\";\nexport { NoExplicitTypeError } from \"./no-explicit-type.js\";\nexport { ReflectMetadataMissingError } from \"./reflect-metadata-missing.js\";\nexport { SymbolKeysNotSupportedError } from \"./symbol-keys-not-supported.js\";\n"}], "context_lines": 1498, "buggy_files": [".changeset/itchy-jobs-create.md", "packages/openapi-metadata/src/decorators/api-operation.ts", "packages/openapi-metadata/src/metadata/operation.ts"], "test_files": [{"path": "packages/openapi-metadata/test/decorators.test.ts", "content": "import \"reflect-metadata\";\nimport {\n ApiBasicAuth,\n ApiBearerAuth,\n ApiBody,\n ApiCookie,\n ApiCookieAuth,\n ApiExcludeController,\n ApiExcludeOperation,\n ApiExtraModels,\n ApiHeader,\n ApiOauth2,\n ApiOperation,\n ApiParam,\n ApiProperty,\n ApiQuery,\n ApiResponse,\n ApiSecurity,\n ApiTags,\n} from \"../src/decorators/index.js\";\nimport {\n ExcludeMetadataStorage,\n ExtraModelsMetadataStorage,\n OperationBodyMetadataStorage,\n OperationMetadataStorage,\n type OperationParameterMetadata,\n OperationParameterMetadataStorage,\n OperationResponseMetadataStorage,\n OperationSecurityMetadataStorage,\n PropertyMetadataStorage,\n} from \"../src/metadata/index.js\";\n\ntest(\"@ApiOperation\", () => {\n const parameters: OperationParameterMetadata[] = [\n {\n in: \"path\",\n name: \"id\",\n },\n ] as const;\n\n class MyController {\n @ApiOperation({\n summary: \"Hello\",\n path: \"/test\",\n methods: [\"get\"],\n parameters,\n })\n operation() {}\n }\n\n const operationMetadata = OperationMetadataStorage.getMetadata(MyController.prototype, \"operation\");\n const parameterMetadata = OperationParameterMetadataStorage.getMetadata(MyController.prototype, \"operation\");\n expect(operationMetadata).toEqual({\n summary: \"Hello\",\n path: \"/test\",\n methods: [\"get\"],\n parameters,\n });\n expect(parameterMetadata).toEqual(parameters);\n});\n\ntest(\"@ApiBody\", () => {\n class MyController {\n @ApiBody({ type: \"string\" })\n operation() {}\n }\n\n const metadata = OperationBodyMetadataStorage.getMetadata(MyController.prototype, \"operation\");\n\n expect(metadata).toEqual({\n type: \"string\",\n mediaType: \"application/json\",\n });\n});\n\ntest(\"@ApiParam\", () => {\n @ApiParam({ name: \"test\" })\n class MyController {\n @ApiParam({ name: \"hello\" })\n operation() {}\n }\n\n const metadata = OperationParameterMetadataStorage.getMetadata(MyController.prototype, \"operation\", true);\n\n expect(metadata).toEqual([\n { in: \"path\", name: \"test\" },\n { in: \"path\", name: \"hello\" },\n ]);\n});\n\ntest(\"@ApiHeader\", () => {\n @ApiHeader({ name: \"test\" })\n class MyController {\n @ApiHeader({ name: \"hello\" })\n operation() {}\n }\n\n const metadata = OperationParameterMetadataStorage.getMetadata(MyController.prototype, \"operation\", true);\n\n expect(metadata).toEqual([\n { in: \"header\", name: \"test\" },\n { in: \"header\", name: \"hello\" },\n ]);\n});\n\ntest(\"@ApiCookie\", () => {\n @ApiCookie({ name: \"test\" })\n class MyController {\n @ApiCookie({ name: \"hello\" })\n operation() {}\n }\n\n const metadata = OperationParameterMetadataStorage.getMetadata(MyController.prototype, \"operation\", true);\n\n expect(metadata).toEqual([\n { in: \"cookie\", name: \"test\" },\n { in: \"cookie\", name: \"hello\" },\n ]);\n});\n\ntest(\"@ApiQuery\", () => {\n @ApiQuery({ name: \"test\" })\n class MyController {\n @ApiQuery({ name: \"hello\" })\n operation() {}\n }\n\n const metadata = OperationParameterMetadataStorage.getMetadata(MyController.prototype, \"operation\", true);\n\n expect(metadata).toEqual([\n { in: \"query\", name: \"test\" },\n { in: \"query\", name: \"hello\" },\n ]);\n});\n\ntest(\"@ApiResponse\", () => {\n @ApiResponse({ type: \"string\", mediaType: \"text/html\" })\n class MyController {\n @ApiResponse({ status: 404, type: \"number\" })\n operation() {}\n }\n\n const metadata = OperationResponseMetadataStorage.getMetadata(MyController.prototype, \"operation\", true);\n\n expect(metadata).toEqual({\n default: { status: \"default\", mediaType: \"text/html\", type: \"string\" },\n \"404\": { status: 404, mediaType: \"application/json\", type: \"number\" },\n });\n});\n\ntest(\"@ApiTags\", () => {\n @ApiTags(\"Root\")\n class MyController {\n @ApiTags(\"Hello\", \"World\")\n @ApiTags(\"Foo\", \"Bar\")\n operation() {}\n }\n\n const metadata = OperationMetadataStorage.getMetadata(MyController.prototype, \"operation\", true);\n\n expect(metadata.tags).toEqual([\"Root\", \"Foo\", \"Bar\", \"Hello\", \"World\"]);\n});\n\ntest(\"@ApiSecurity\", () => {\n @ApiBasicAuth()\n @ApiCookieAuth()\n class MyController {\n @ApiSecurity(\"custom\")\n @ApiBearerAuth()\n @ApiOauth2(\"pets:write\")\n operation() {}\n }\n\n const metadata = OperationSecurityMetadataStorage.getMetadata(MyController.prototype, \"operation\", true);\n\n expect(metadata).toEqual({\n custom: [],\n cookie: [],\n basic: [],\n bearer: [],\n oauth2: [\"pets:write\"],\n });\n});\n\ntest(\"@ApiExcludeController\", () => {\n @ApiExcludeController()\n class MyController {}\n\n const metadata = ExcludeMetadataStorage.getMetadata(MyController);\n expect(metadata).toBe(true);\n});\n\ntest(\"@ApiExcludeOperation\", () => {\n class MyController {\n @ApiExcludeOperation()\n operation() {}\n }\n\n const metadata = ExcludeMetadataStorage.getMetadata(MyController.prototype, \"operation\");\n expect(metadata).toBe(true);\n});\n\ntest(\"@ApiExtraModels\", () => {\n @ApiExtraModels(\"string\")\n class MyController {\n operation() {}\n }\n\n const metadata = ExtraModelsMetadataStorage.getMetadata(MyController);\n\n expect(metadata).toEqual([\"string\"]);\n});\n\ntest(\"@ApiProperty\", () => {\n class User {\n @ApiProperty()\n declare declared: string;\n\n @ApiProperty()\n // biome-ignore lint/style/noInferrableTypes: required for metadata\n defined: number = 4;\n\n @ApiProperty({ type: \"string\" })\n explicitType = \"test\";\n\n @ApiProperty({ example: \"hey\" })\n get getter(): string {\n return \"hello\";\n }\n\n @ApiProperty()\n func(): boolean {\n return false;\n }\n }\n\n const metadata = PropertyMetadataStorage.getMetadata(User.prototype);\n\n expect(metadata.declared).toMatchObject({\n name: \"declared\",\n required: true,\n });\n // @ts-expect-error\n expect(metadata.declared?.type()).toEqual(String);\n\n expect(metadata.defined).toMatchObject({\n name: \"defined\",\n required: true,\n });\n // @ts-expect-error\n expect(metadata.defined?.type()).toEqual(Number);\n\n expect(metadata.explicitType).toMatchObject({\n name: \"explicitType\",\n required: true,\n type: \"string\",\n });\n\n expect(metadata.getter).toMatchObject({\n name: \"getter\",\n required: true,\n example: \"hey\",\n });\n // @ts-expect-error\n expect(metadata.getter?.type()).toEqual(String);\n\n expect(metadata.func).toMatchObject({\n name: \"func\",\n required: true,\n });\n // @ts-expect-error\n expect(metadata.func?.type()).toEqual(Boolean);\n});\n"}], "eval": {"test_cmds": ["mkdir -p reports && pnpm exec vitest run --reporter=json 2>&1 | tee reports/vitest-results.json"], "print_cmds": [], "log_parser": "def parser(log: str) -> dict[str, str]:\n import re\n import json\n\n results: dict[str, str] = {}\n\n def norm(status: str) -> str:\n s = status.lower()\n if s in (\"passed\", \"pass\", \"success\"):\n return \"pass\"\n if s in (\"failed\", \"fail\", \"error\", \"xfailed\", \"xpass\"):\n return \"fail\"\n if s in (\"skipped\", \"pending\", \"todo\", \"skip\"):\n return \"skip\"\n return \"fail\" if \"fail\" in s else \"pass\" if \"pass\" in s else \"skip\"\n\n # Extract per-test results from JSON-like lines\n pattern1 = re.compile(\n r'\"fullName\"\\s*:\\s*\"([^\"]+)\"\\s*,\\s*\"status\"\\s*:\\s*\"(passed|failed|skipped|pending|todo)\"',\n re.IGNORECASE,\n )\n pattern2 = re.compile(\n r'\"status\"\\s*:\\s*\"(passed|failed|skipped|pending|todo)\"\\s*,\\s*\"fullName\"\\s*:\\s*\"([^\"]+)\"',\n re.IGNORECASE,\n )\n\n found = False\n for m in pattern1.finditer(log):\n full, status = m.groups()\n results[full] = norm(status)\n found = True\n for m in pattern2.finditer(log):\n status, full = m.groups()\n results[full] = norm(status)\n found = True\n\n if found:\n return results\n\n # Fallback: try to parse the enclosing JSON block if available\n try:\n idx = log.rfind('\"testResults\"')\n if idx != -1:\n start = log.rfind(\"{\", 0, idx)\n if start != -1:\n brace = 0\n end = None\n for i in range(start, len(log)):\n ch = log[i]\n if ch == \"{\":\n brace += 1\n elif ch == \"}\":\n brace -= 1\n if brace == 0:\n end = i + 1\n break\n if end:\n block = log[start:end]\n data = json.loads(block)\n for suite in data.get(\"testResults\", []):\n for ar in suite.get(\"assertionResults\", []):\n name = ar.get(\"fullName\") or ar.get(\"title\")\n status = ar.get(\"status\", \"\")\n if name:\n results[name] = norm(status)\n if results:\n return results\n except Exception:\n pass\n\n # Final fallback: title + status pairs\n pattern_title = re.compile(\n r'\"title\"\\s*:\\s*\"([^\"]+)\"\\s*,\\s*\"status\"\\s*:\\s*\"(passed|failed|skipped|pending|todo)\"',\n re.IGNORECASE,\n )\n for m in pattern_title.finditer(log):\n title, status = m.groups()\n results[title] = norm(status)\n\n return results", "rebuild_cmds": []}}
{"id": "patchbench-ts-real-0003", "repo": "firefox-devtools/profiler", "base_commit": "1e003443d4d96b017c4c798c54d7551e7122f50d", "status": "no_tests_parsed", "verify_status": null, "error": null, "timing": {"setup": 3.6, "pre_test_0": 89.3, "pre_test_1": 50.8, "post_test_0": 62.0, "post_test_1": 50.1, "total": 257.4}, "test_cmds": ["yarn test --json --outputFile=jest-results.json"], "rebuild_cmds": [], "print_cmds": [], "f2p_pre_ok": true, "pre_detail": {"missing": 0, "wrong": [], "missing_ids": [], "parsed_count": 0}, "p2p_env_dropped_count": 1833, "f2p_post_ok": false, "p2p_post_ok": true, "post_detail": {"missing": 1, "wrong": [], "missing_ids": ["getBacktraceItemsForStack returns backtrace items in the right order and with frame line numbers"], "parsed_count": 0}, "raw_tail": "/react.development.js:2667:24)\n at act (node_modules/react/cjs/react.development.js:2582:11)\n at node_modules/@testing-library/react/dist/act-compat.js:47:25\n at renderRoot (node_modules/@testing-library/react/dist/pure.js:190:26)\n at render (node_modules/@testing-library/react/dist/pure.js:292:10)\n at customRender (src/test/fixtures/testing-library.js:18:30)\n at Object.<anonymous> (src/test/components/ContextMenu.test.js:13:33)\n\n\nSummary of all failing tests\nFAIL src/test/unit/profile-data.test.js\n \u25cf getBacktraceItemsForStack \u203a returns backtrace items in the right order and with frame line numbers\n\n TypeError: (0 , _transforms.getBacktraceItemsForStack) is not a function\n\n 1552 | describe('getBacktraceItemsForStack', function () {\n 1553 | function getBacktraceString(thread, sampleIndex): string {\n > 1554 | return getBacktraceItemsForStack(\n | ^\n 1555 | ensureExists(thread.samples.stack[sampleIndex]),\n 1556 | 'combined',\n 1557 | thread\n\n at getBacktraceString (src/test/unit/profile-data.test.js:1554:37)\n at Object.getBacktraceString (src/test/unit/profile-data.test.js:1573:12)\n\n\nTest Suites: 1 failed, 120 passed, 121 total\nTests: 1 failed, 4 todo, 1835 passed, 1840 total\nSnapshots: 344 passed, 344 total\nTime: 63.345 s\nRan all test suites.\nTest results written to: jest-results.json\nerror Command failed with exit code 1.\n\n\n"}
{"id": "patchbench-ts-real-0094", "repo": "chimurai/http-proxy-middleware", "base_commit": "a6ebb0379b89a00710001af3aa16e8fb827d00c3", "status": "no_tests_parsed", "verify_status": null, "error": null, "timing": {"setup": 1.0, "pre_test_0": 20.7, "pre_test_1": 5.0, "post_test_0": 11.1, "post_test_1": 5.0, "total": 43.4}, "test_cmds": ["NODE_OPTIONS=--dns-result-order=ipv4first yarn test -- --json --outputFile=jest-results.json"], "rebuild_cmds": [], "print_cmds": [], "f2p_pre_ok": true, "pre_detail": {"missing": 0, "wrong": [], "missing_ids": [], "parsed_count": 0}, "p2p_env_dropped_count": 3, "f2p_post_ok": false, "p2p_post_ok": true, "post_detail": {"missing": 180, "wrong": [], "missing_ids": ["sanitize() should replace special characters with their HTML entity equivalents", "E2E http-proxy-middleware http-proxy-middleware in actual server basic setup with configured body-parser should proxy request body from json", "Logger should return global \"console\" logger when configured in Options", "http integration should work with raw node http RequestHandler", "Path rewriting Invalid configuration should not throw when async function config is provided"], "parsed_count": 0}, "raw_tail": "ed).resolves.not.toThrow()\n\n Received promise rejected instead of resolved\n Rejected to value: [TypeError: Cannot read properties of undefined (reading 'on')]\n\n 253 |\n 254 | // Should not throw\n > 255 | await expect(async () => {\n | ^\n 256 | await middleware(mockReq, mockRes, mockNext);\n 257 | }).resolves.not.toThrow();\n 258 |\n\n at expect (node_modules/expect/build/index.js:2116:15)\n at Object.<anonymous> (test/e2e/websocket.spec.ts:255:13)\n\n \u25cf E2E WebSocket proxy \u203a ws enabled without server object (issue #143) \u203a should handle multiple requests with missing server\n\n expect(received).resolves.not.toThrow()\n\n Received promise rejected instead of resolved\n Rejected to value: [TypeError: Cannot read properties of undefined (reading 'on')]\n\n 282 | } as unknown as http.ServerResponse;\n 283 |\n > 284 | await expect(async () => {\n | ^\n 285 | await middleware(mockReq, mockRes, mockNext);\n 286 | }).resolves.not.toThrow();\n 287 | }\n\n at expect (node_modules/expect/build/index.js:2116:15)\n at Object.<anonymous> (test/e2e/websocket.spec.ts:284:15)\n\n\nTest Suites: 1 failed, 21 passed, 22 total\nTests: 4 failed, 182 passed, 186 total\nSnapshots: 10 passed, 10 total\nTime: 8.42 s\nRan all test suites.\nTest results written to: jest-results.json\nerror Command failed with exit code 1.\n\n\n"}
{"id": "patchbench-ts-real-0035", "repo": "MetaMask/metamask-mobile", "base_commit": "42688116add2305feb031a8b9f478bb32bf03454", "status": "no_tests_parsed", "verify_status": null, "error": null, "timing": {"setup": 24.5, "pre_test_0": 0.8, "pre_test_1": 0.9, "post_test_0": 0.8, "post_test_1": 0.8, "total": 28.5}, "test_cmds": ["yarn test:unit --verbose 2>&1 | tee test-output.log"], "rebuild_cmds": [], "print_cmds": [], "f2p_pre_ok": true, "pre_detail": {"missing": 0, "wrong": [], "missing_ids": [], "parsed_count": 0}, "p2p_env_dropped_count": 2322, "f2p_post_ok": false, "p2p_post_ok": true, "post_detail": {"missing": 213, "wrong": [], "missing_ids": ["app/components/UI/Perps/components/PerpsPostitionHeader/PerpsPositionHeader.test.tsx :: PerpsPositionHeader :: Component Rendering :: Price Data Display :: displays skeleton when priceData price is missing", "app/core/OAuthService/OAuthLoginHandlers/baseHandler.test.ts :: BaseLoginHandler :: constructor :: decodeIdToken :: decodes a valid JWT token", "app/core/RPCMethods/wallet_addEthereumChain.test.js :: RPC Method - wallet_addEthereumChain :: should allow 1 letter native currency symbols", "app/core/SDKConnect/handlers/handleConnectionMessage.test.ts :: handleConnectionMessage :: Analytics tracking for wallet_action_received :: Handling specific message types :: should log and return on invalid messages", "app/components/UI/Card/hooks/useGetPriorityCardToken.test.ts :: useGetPriorityCardToken :: should handle concurrent fetch calls correctly"], "parsed_count": 0}, "raw_tail": "js deps install failed: yarn install v1.22.22\n[1/5] Validating package.json...\ninfo Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.\nyarn install v1.22.22\n[1/5] Validating package.json...\ninfo Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.\nerror metamask@7.50.1: The engine \"node\" is incompatible with this module. Expected version \"^20.18.0\". Got \"22.23.2\"\nerror Found incompatible module.\nerror metamask@7.50.1: The engine \"node\" is incompatible with this module. Expected version \"^20.18.0\". Got \"22.23.2\"\nerror Found incompatible module.\n\nyarn run v1.22.22\nerror metamask@7.50.1: The engine \"node\" is incompatible with this module. Expected version \"^20.18.0\". Got \"22.23.2\"\nerror Commands cannot run with an incompatible environment.\ninfo Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.\n\n\n"}
{"id": "patchbench-ts-real-0031", "repo": "gpbl/react-day-picker", "base_commit": "9c7b2c6c5190f3cc2ba7bd02207a1cd427a93856", "status": "no_tests_parsed", "verify_status": null, "error": null, "timing": {"setup": 1.5, "pre_test_0": 112.6, "pre_test_1": 45.4, "post_test_0": 56.4, "post_test_1": 45.1, "total": 262.9}, "test_cmds": ["cd /tmp/cache/repos/gpbl__react-day-picker && pnpm test -- --json --outputFile=jest-results.json"], "rebuild_cmds": [], "print_cmds": [], "f2p_pre_ok": true, "pre_detail": {"missing": 0, "wrong": [], "missing_ids": [], "parsed_count": 0}, "p2p_env_dropped_count": 0, "f2p_post_ok": false, "p2p_post_ok": true, "post_detail": {"missing": 600, "wrong": [], "missing_ids": ["/testbed/src/utils/addToRange.test.ts::addToRange add a date to a complete range with same start and end date", "/testbed/src/helpers/getNavMonth.test.ts::when \"captionLayout\" is \"dropdown-months\" when \"fromYear\" is set \"startMonth\" should be equal to the start of that year", "/testbed/examples/FocusRecursive.test.tsx::the first selected day should have focus", "/testbed/src/helpers/getNavMonth.test.ts::when \"captionLayout\" is \"dropdown-months\" when \"startMonth\" is set \"endMonth\" should be undefined", "/testbed/src/helpers/useControlledValue.test.ts::when the value is controlled should return the controlled value"], "parsed_count": 0}, "raw_tail": "amples examples/StylingInline.test.tsx\nPASS examples examples/Testcase1567.test.tsx\nPASS examples examples/Spanish.test.tsx\nPASS src src/formatters/formatWeekdayName.test.ts\nPASS src src/labels/labelWeekday.test.ts\nPASS examples examples/PersianFormatted.test.tsx\nPASS examples examples/StylingCssModules.test.tsx\nPASS examples examples/Formatters.test.tsx\nPASS examples examples/DefaultMonth.test.tsx\nPASS examples examples/FixedWeeks.test.tsx\nPASS examples examples/Numerals.test.tsx\nPASS examples examples/Persian.test.tsx\nPASS examples examples/TestCase2511.test.tsx\nPASS examples examples/WeeknumberCustom.test.tsx\nPASS examples examples/InvalidMonthDefaultLimit.test.tsx\nPASS examples examples/SpanishWeekStartsOn.test.tsx\nPASS examples examples/InvalidMonth.test.tsx\nPASS examples examples/TestCase2585.test.tsx\nPASS src src/formatters/formatYearDropdown.test.ts\nPASS src src/labels/labelGridcell.test.ts\nPASS src src/formatters/formatDay.test.ts\nPASS src src/labels/labelWeekNumberHeader.test.ts\nPASS src src/labels/labelPrevious.test.ts\nPASS src src/labels/labelGrid.test.ts\nPASS src src/labels/labelMonthDropdown.test.ts\nPASS src src/labels/labelYearDropdown.test.ts\nPASS src src/labels/labelNext.test.ts\nPASS src src/labels/labelWeekNumber.test.ts\nPASS src src/labels/labelNav.test.ts\n\nTest Suites: 121 passed, 121 total\nTests: 601 passed, 601 total\nSnapshots: 3 passed, 3 total\nTime: 46.549 s\nRan all test suites in 2 projects.\nTest results written to: jest-results.json\n\n\n"}