mobx-tanstack-query-api 0.24.0 → 0.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/builtin.cjs +27 -0
- package/builtin.cjs.map +1 -0
- package/builtin.d.ts +6 -0
- package/builtin.js +27 -0
- package/builtin.js.map +1 -0
- package/cli.cjs +1279 -0
- package/cli.cjs.map +1 -0
- package/{codegen/types/generate-query-api-params.d.cts → cli.d.ts} +55 -10
- package/cli.js +1278 -0
- package/cli.js.map +1 -0
- package/index.cjs +771 -16
- package/index.cjs.map +1 -0
- package/index.d.ts +322 -2
- package/index.js +768 -2
- package/index.js.map +1 -0
- package/package.json +21 -64
- package/builtin/index.cjs +0 -25
- package/builtin/index.d.cts +0 -4
- package/builtin/index.d.cts.map +0 -1
- package/builtin/index.d.ts +0 -4
- package/builtin/index.d.ts.map +0 -1
- package/builtin/index.js +0 -22
- package/cli/bin.cjs +0 -17
- package/cli/bin.d.cts +0 -2
- package/cli/bin.d.cts.map +0 -1
- package/cli/bin.d.ts +0 -2
- package/cli/bin.d.ts.map +0 -1
- package/cli/bin.js +0 -15
- package/cli/index.cjs +0 -18
- package/cli/index.d.cts +0 -3
- package/cli/index.d.cts.map +0 -1
- package/cli/index.d.ts +0 -3
- package/cli/index.d.ts.map +0 -1
- package/cli/index.js +0 -2
- package/cli/utils/define-config.cjs +0 -9
- package/cli/utils/define-config.d.cts +0 -4
- package/cli/utils/define-config.d.cts.map +0 -1
- package/cli/utils/define-config.d.ts +0 -4
- package/cli/utils/define-config.d.ts.map +0 -1
- package/cli/utils/define-config.js +0 -5
- package/cli/utils/exec-config-path.cjs +0 -16
- package/cli/utils/exec-config-path.d.cts +0 -2
- package/cli/utils/exec-config-path.d.cts.map +0 -1
- package/cli/utils/exec-config-path.d.ts +0 -2
- package/cli/utils/exec-config-path.d.ts.map +0 -1
- package/cli/utils/exec-config-path.js +0 -12
- package/cli/utils/resolve-config-path.cjs +0 -65
- package/cli/utils/resolve-config-path.d.cts +0 -3
- package/cli/utils/resolve-config-path.d.cts.map +0 -1
- package/cli/utils/resolve-config-path.d.ts +0 -3
- package/cli/utils/resolve-config-path.d.ts.map +0 -1
- package/cli/utils/resolve-config-path.js +0 -25
- package/codegen/index.cjs +0 -545
- package/codegen/index.d.cts +0 -4
- package/codegen/index.d.cts.map +0 -1
- package/codegen/index.d.ts +0 -4
- package/codegen/index.d.ts.map +0 -1
- package/codegen/index.js +0 -524
- package/codegen/templates/all-endpoints-per-file.tmpl.cjs +0 -94
- package/codegen/templates/all-endpoints-per-file.tmpl.d.cts +0 -14
- package/codegen/templates/all-endpoints-per-file.tmpl.d.cts.map +0 -1
- package/codegen/templates/all-endpoints-per-file.tmpl.d.ts +0 -14
- package/codegen/templates/all-endpoints-per-file.tmpl.d.ts.map +0 -1
- package/codegen/templates/all-endpoints-per-file.tmpl.js +0 -90
- package/codegen/templates/all-exports.tmpl.cjs +0 -14
- package/codegen/templates/all-exports.tmpl.d.cts +0 -9
- package/codegen/templates/all-exports.tmpl.d.cts.map +0 -1
- package/codegen/templates/all-exports.tmpl.d.ts +0 -9
- package/codegen/templates/all-exports.tmpl.d.ts.map +0 -1
- package/codegen/templates/all-exports.tmpl.js +0 -9
- package/codegen/templates/constants.cjs +0 -5
- package/codegen/templates/constants.d.cts +0 -2
- package/codegen/templates/constants.d.cts.map +0 -1
- package/codegen/templates/constants.d.ts +0 -2
- package/codegen/templates/constants.d.ts.map +0 -1
- package/codegen/templates/constants.js +0 -2
- package/codegen/templates/data-contract.tmpl.cjs +0 -49
- package/codegen/templates/data-contract.tmpl.d.cts +0 -8
- package/codegen/templates/data-contract.tmpl.d.cts.map +0 -1
- package/codegen/templates/data-contract.tmpl.d.ts +0 -8
- package/codegen/templates/data-contract.tmpl.d.ts.map +0 -1
- package/codegen/templates/data-contract.tmpl.js +0 -45
- package/codegen/templates/data-contracts-file.tmpl.cjs +0 -27
- package/codegen/templates/data-contracts-file.tmpl.d.cts +0 -6
- package/codegen/templates/data-contracts-file.tmpl.d.cts.map +0 -1
- package/codegen/templates/data-contracts-file.tmpl.d.ts +0 -6
- package/codegen/templates/data-contracts-file.tmpl.d.ts.map +0 -1
- package/codegen/templates/data-contracts-file.tmpl.js +0 -23
- package/codegen/templates/endpoint-jsdoc.tmpl.cjs +0 -111
- package/codegen/templates/endpoint-jsdoc.tmpl.d.cts +0 -8
- package/codegen/templates/endpoint-jsdoc.tmpl.d.cts.map +0 -1
- package/codegen/templates/endpoint-jsdoc.tmpl.d.ts +0 -8
- package/codegen/templates/endpoint-jsdoc.tmpl.d.ts.map +0 -1
- package/codegen/templates/endpoint-jsdoc.tmpl.js +0 -107
- package/codegen/templates/endpoint-per-file.tmpl.cjs +0 -87
- package/codegen/templates/endpoint-per-file.tmpl.d.cts +0 -14
- package/codegen/templates/endpoint-per-file.tmpl.d.cts.map +0 -1
- package/codegen/templates/endpoint-per-file.tmpl.d.ts +0 -14
- package/codegen/templates/endpoint-per-file.tmpl.d.ts.map +0 -1
- package/codegen/templates/endpoint-per-file.tmpl.js +0 -83
- package/codegen/templates/index-ts-for-endpoint-per-file.tmpl.cjs +0 -10
- package/codegen/templates/index-ts-for-endpoint-per-file.tmpl.d.cts +0 -6
- package/codegen/templates/index-ts-for-endpoint-per-file.tmpl.d.cts.map +0 -1
- package/codegen/templates/index-ts-for-endpoint-per-file.tmpl.d.ts +0 -6
- package/codegen/templates/index-ts-for-endpoint-per-file.tmpl.d.ts.map +0 -1
- package/codegen/templates/index-ts-for-endpoint-per-file.tmpl.js +0 -6
- package/codegen/templates/meta-info.tmpl.cjs +0 -48
- package/codegen/templates/meta-info.tmpl.d.cts +0 -9
- package/codegen/templates/meta-info.tmpl.d.cts.map +0 -1
- package/codegen/templates/meta-info.tmpl.d.ts +0 -9
- package/codegen/templates/meta-info.tmpl.d.ts.map +0 -1
- package/codegen/templates/meta-info.tmpl.js +0 -42
- package/codegen/templates/new-endpoint.tmpl.cjs +0 -188
- package/codegen/templates/new-endpoint.tmpl.d.cts +0 -15
- package/codegen/templates/new-endpoint.tmpl.d.cts.map +0 -1
- package/codegen/templates/new-endpoint.tmpl.d.ts +0 -15
- package/codegen/templates/new-endpoint.tmpl.d.ts.map +0 -1
- package/codegen/templates/new-endpoint.tmpl.js +0 -184
- package/codegen/types/all-import-file-params.cjs +0 -2
- package/codegen/types/all-import-file-params.d.cts +0 -5
- package/codegen/types/all-import-file-params.d.cts.map +0 -1
- package/codegen/types/all-import-file-params.d.ts +0 -5
- package/codegen/types/all-import-file-params.d.ts.map +0 -1
- package/codegen/types/all-import-file-params.js +0 -1
- package/codegen/types/base-tmpl-params.cjs +0 -2
- package/codegen/types/base-tmpl-params.d.cts +0 -16
- package/codegen/types/base-tmpl-params.d.cts.map +0 -1
- package/codegen/types/base-tmpl-params.d.ts +0 -16
- package/codegen/types/base-tmpl-params.d.ts.map +0 -1
- package/codegen/types/base-tmpl-params.js +0 -1
- package/codegen/types/codegen-data-utils.cjs +0 -2
- package/codegen/types/codegen-data-utils.d.cts +0 -8
- package/codegen/types/codegen-data-utils.d.cts.map +0 -1
- package/codegen/types/codegen-data-utils.d.ts +0 -8
- package/codegen/types/codegen-data-utils.d.ts.map +0 -1
- package/codegen/types/codegen-data-utils.js +0 -1
- package/codegen/types/endpoint-data.cjs +0 -2
- package/codegen/types/endpoint-data.d.cts +0 -3
- package/codegen/types/endpoint-data.d.cts.map +0 -1
- package/codegen/types/endpoint-data.d.ts +0 -3
- package/codegen/types/endpoint-data.d.ts.map +0 -1
- package/codegen/types/endpoint-data.js +0 -1
- package/codegen/types/generate-query-api-params.cjs +0 -2
- package/codegen/types/generate-query-api-params.d.cts.map +0 -1
- package/codegen/types/generate-query-api-params.d.ts +0 -162
- package/codegen/types/generate-query-api-params.d.ts.map +0 -1
- package/codegen/types/generate-query-api-params.js +0 -1
- package/codegen/types/import-file-params.cjs +0 -2
- package/codegen/types/import-file-params.d.cts +0 -5
- package/codegen/types/import-file-params.d.cts.map +0 -1
- package/codegen/types/import-file-params.d.ts +0 -5
- package/codegen/types/import-file-params.d.ts.map +0 -1
- package/codegen/types/import-file-params.js +0 -1
- package/codegen/types/index.cjs +0 -23
- package/codegen/types/index.d.cts +0 -8
- package/codegen/types/index.d.cts.map +0 -1
- package/codegen/types/index.d.ts +0 -8
- package/codegen/types/index.d.ts.map +0 -1
- package/codegen/types/index.js +0 -7
- package/codegen/types/meta-info.cjs +0 -2
- package/codegen/types/meta-info.d.cts +0 -6
- package/codegen/types/meta-info.d.cts.map +0 -1
- package/codegen/types/meta-info.d.ts +0 -6
- package/codegen/types/meta-info.d.ts.map +0 -1
- package/codegen/types/meta-info.js +0 -1
- package/codegen/types/type-info.cjs +0 -2
- package/codegen/types/type-info.d.cts +0 -4
- package/codegen/types/type-info.d.cts.map +0 -1
- package/codegen/types/type-info.d.ts +0 -4
- package/codegen/types/type-info.d.ts.map +0 -1
- package/codegen/types/type-info.js +0 -1
- package/codegen/utils/create-short-model-type.cjs +0 -12
- package/codegen/utils/create-short-model-type.d.cts +0 -5
- package/codegen/utils/create-short-model-type.d.cts.map +0 -1
- package/codegen/utils/create-short-model-type.d.ts +0 -5
- package/codegen/utils/create-short-model-type.d.ts.map +0 -1
- package/codegen/utils/create-short-model-type.js +0 -8
- package/codegen/utils/remove-unused-types.cjs +0 -117
- package/codegen/utils/remove-unused-types.d.cts +0 -7
- package/codegen/utils/remove-unused-types.d.cts.map +0 -1
- package/codegen/utils/remove-unused-types.d.ts +0 -7
- package/codegen/utils/remove-unused-types.d.ts.map +0 -1
- package/codegen/utils/remove-unused-types.js +0 -110
- package/codegen/utils/unpack-filter-option.cjs +0 -23
- package/codegen/utils/unpack-filter-option.d.cts +0 -7
- package/codegen/utils/unpack-filter-option.d.cts.map +0 -1
- package/codegen/utils/unpack-filter-option.d.ts +0 -7
- package/codegen/utils/unpack-filter-option.d.ts.map +0 -1
- package/codegen/utils/unpack-filter-option.js +0 -19
- package/index.d.cts +0 -3
- package/index.d.cts.map +0 -1
- package/index.d.ts.map +0 -1
- package/runtime/endpoint-infinite-query.cjs +0 -101
- package/runtime/endpoint-infinite-query.d.cts +0 -17
- package/runtime/endpoint-infinite-query.d.cts.map +0 -1
- package/runtime/endpoint-infinite-query.d.ts +0 -17
- package/runtime/endpoint-infinite-query.d.ts.map +0 -1
- package/runtime/endpoint-infinite-query.js +0 -97
- package/runtime/endpoint-infinite-query.types.cjs +0 -2
- package/runtime/endpoint-infinite-query.types.d.cts +0 -30
- package/runtime/endpoint-infinite-query.types.d.cts.map +0 -1
- package/runtime/endpoint-infinite-query.types.d.ts +0 -30
- package/runtime/endpoint-infinite-query.types.d.ts.map +0 -1
- package/runtime/endpoint-infinite-query.types.js +0 -1
- package/runtime/endpoint-mutation.cjs +0 -74
- package/runtime/endpoint-mutation.d.cts +0 -13
- package/runtime/endpoint-mutation.d.cts.map +0 -1
- package/runtime/endpoint-mutation.d.ts +0 -13
- package/runtime/endpoint-mutation.d.ts.map +0 -1
- package/runtime/endpoint-mutation.js +0 -70
- package/runtime/endpoint-mutation.types.cjs +0 -2
- package/runtime/endpoint-mutation.types.d.cts +0 -36
- package/runtime/endpoint-mutation.types.d.cts.map +0 -1
- package/runtime/endpoint-mutation.types.d.ts +0 -36
- package/runtime/endpoint-mutation.types.d.ts.map +0 -1
- package/runtime/endpoint-mutation.types.js +0 -1
- package/runtime/endpoint-query-client.cjs +0 -79
- package/runtime/endpoint-query-client.d.cts +0 -13
- package/runtime/endpoint-query-client.d.cts.map +0 -1
- package/runtime/endpoint-query-client.d.ts +0 -13
- package/runtime/endpoint-query-client.d.ts.map +0 -1
- package/runtime/endpoint-query-client.js +0 -75
- package/runtime/endpoint-query-client.types.cjs +0 -2
- package/runtime/endpoint-query-client.types.d.cts +0 -16
- package/runtime/endpoint-query-client.types.d.cts.map +0 -1
- package/runtime/endpoint-query-client.types.d.ts +0 -16
- package/runtime/endpoint-query-client.types.d.ts.map +0 -1
- package/runtime/endpoint-query-client.types.js +0 -1
- package/runtime/endpoint-query.cjs +0 -214
- package/runtime/endpoint-query.d.cts +0 -29
- package/runtime/endpoint-query.d.cts.map +0 -1
- package/runtime/endpoint-query.d.ts +0 -29
- package/runtime/endpoint-query.d.ts.map +0 -1
- package/runtime/endpoint-query.js +0 -208
- package/runtime/endpoint-query.types.cjs +0 -2
- package/runtime/endpoint-query.types.d.cts +0 -42
- package/runtime/endpoint-query.types.d.cts.map +0 -1
- package/runtime/endpoint-query.types.d.ts +0 -42
- package/runtime/endpoint-query.types.d.ts.map +0 -1
- package/runtime/endpoint-query.types.js +0 -1
- package/runtime/endpoint.cjs +0 -131
- package/runtime/endpoint.d.cts +0 -73
- package/runtime/endpoint.d.cts.map +0 -1
- package/runtime/endpoint.d.ts +0 -73
- package/runtime/endpoint.d.ts.map +0 -1
- package/runtime/endpoint.js +0 -127
- package/runtime/endpoint.types.cjs +0 -2
- package/runtime/endpoint.types.d.cts +0 -24
- package/runtime/endpoint.types.d.cts.map +0 -1
- package/runtime/endpoint.types.d.ts +0 -24
- package/runtime/endpoint.types.d.ts.map +0 -1
- package/runtime/endpoint.types.js +0 -1
- package/runtime/http-client.cjs +0 -190
- package/runtime/http-client.d.cts +0 -85
- package/runtime/http-client.d.cts.map +0 -1
- package/runtime/http-client.d.ts +0 -85
- package/runtime/http-client.d.ts.map +0 -1
- package/runtime/http-client.js +0 -184
- package/runtime/index.cjs +0 -25
- package/runtime/index.d.cts +0 -10
- package/runtime/index.d.cts.map +0 -1
- package/runtime/index.d.ts +0 -10
- package/runtime/index.d.ts.map +0 -1
- package/runtime/index.js +0 -9
package/cli.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.js","sources":["../src/codegen/templates/constants.ts","../src/codegen/templates/data-contract.tmpl.ts","../src/codegen/templates/endpoint-jsdoc.tmpl.ts","../src/codegen/utils/create-short-model-type.ts","../src/codegen/templates/meta-info.tmpl.ts","../src/codegen/templates/new-endpoint.tmpl.ts","../src/codegen/templates/all-endpoints-per-file.tmpl.ts","../src/codegen/templates/all-exports.tmpl.ts","../src/codegen/templates/data-contracts-file.tmpl.ts","../src/codegen/templates/endpoint-per-file.tmpl.ts","../src/codegen/templates/index-ts-for-endpoint-per-file.tmpl.ts","../src/codegen/utils/unpack-filter-option.ts","../src/codegen/utils/remove-unused-types.ts","../src/codegen/index.ts","../src/cli/utils/define-config.ts"],"sourcesContent":["export const LINTERS_IGNORE = `/* eslint-disable */\n/* tslint:disable */`;\n","import type { AnyObject } from 'yummies/types';\nimport type { BaseTmplParams } from '../types/index.js';\n\nexport interface DataContractTmplParams extends BaseTmplParams {\n contract: AnyObject;\n addExportKeyword?: boolean;\n}\n\nconst buildGenerics = (contract: any) => {\n if (!contract.genericArgs?.length) return '';\n\n return (\n '<' +\n contract.genericArgs\n .map((arg: any) => {\n const { name, default: defaultType, extends: extendsType } = arg;\n return [\n name,\n extendsType && `extends ${extendsType}`,\n defaultType && `= ${defaultType}`,\n ]\n .filter(Boolean)\n .join(' ');\n })\n .join(', ') +\n '>'\n );\n};\n\nexport const dataContractTmpl = async ({\n contract,\n configuration,\n addExportKeyword,\n}: DataContractTmplParams) => {\n const { utils } = configuration;\n const { formatDescription } = utils;\n\n const dataContractTemplates: Record<string, (contract: any) => string> = {\n enum: (contract: any) => {\n return `enum ${contract.name} {\\r\\n${contract.content}\\r\\n}`;\n },\n interface: (contract: any) => {\n return `interface ${contract.name}${buildGenerics(contract)} {\\r\\n${contract.content}}`;\n },\n type: (contract: any) => {\n return `type ${contract.name}${buildGenerics(contract)} = ${contract.content === contract.name ? 'any' : contract.content}`;\n },\n };\n\n let result: string = '';\n\n let jsdoc = '';\n\n if (contract.description) {\n jsdoc = `/**\\n * ${formatDescription(contract.description, true)}\\n */\\n`;\n }\n\n if (jsdoc) {\n result += jsdoc;\n }\n\n const templateFn =\n dataContractTemplates[contract.typeIdentifier] ||\n dataContractTemplates.type;\n\n const contractType = `${addExportKeyword ? 'export ' : ''}${templateFn(contract)}`;\n\n return result + contractType;\n};\n","import { splitTextByLines } from 'yummies/text';\nimport type { AnyObject } from 'yummies/types';\nimport type { BaseTmplParams } from '../types/base-tmpl-params.js';\n\nexport interface EndpointJSDocTmplParams extends BaseTmplParams {\n route: AnyObject;\n offset?: number;\n}\n\nexport const endpointJSDocTmpl = (params: EndpointJSDocTmplParams) => {\n const { route, configuration, offset = 0 } = params;\n const { routeName } = route;\n const rawRoute = route.raw as AnyObject;\n const routeRequest = route.request as AnyObject;\n\n const { utils } = configuration;\n\n const { _, formatDescription } = utils;\n\n const jsDocLines: { name?: string; content?: string }[] = [];\n\n if (rawRoute.summary) {\n const summaryLines = splitTextByLines(rawRoute.summary, 60)\n .filter(Boolean)\n .map((line) => ({\n content: `**${formatDescription(line, true)}**`,\n }));\n\n if (summaryLines.length > 0) {\n jsDocLines.push(...summaryLines, { content: '' });\n }\n }\n\n if (rawRoute.description) {\n const descriptionLines = splitTextByLines(rawRoute.description, 60)\n .filter(Boolean)\n .map((line) => ({\n content: formatDescription(line, true),\n }));\n\n if (descriptionLines.length > 0) {\n jsDocLines.push(...descriptionLines, { content: '' });\n } else {\n jsDocLines.push({\n content: 'No description',\n });\n }\n } else {\n jsDocLines.push({\n content: 'No description',\n });\n }\n\n if (rawRoute.operationId) {\n jsDocLines.push({\n name: 'operationId',\n content: rawRoute.operationId,\n });\n }\n\n if (_.size(rawRoute.tags)) {\n jsDocLines.push({\n name: 'tags',\n content: rawRoute.tags.join(', '),\n });\n }\n\n jsDocLines.push({\n name: 'request',\n content: `**${_.upperCase(routeRequest.method)}:${rawRoute.route}**`,\n });\n\n if (rawRoute.deprecated) {\n jsDocLines.push({\n name: 'deprecated',\n });\n }\n\n if (routeName.duplicate) {\n jsDocLines.push(\n {\n name: 'duplicate',\n },\n {\n name: 'originalName',\n content: routeName.original,\n },\n );\n }\n\n if (routeRequest.security) {\n jsDocLines.push({\n name: 'secure',\n });\n }\n\n if (rawRoute.responsesTypes.length > 0) {\n jsDocLines.push({\n name: 'responses',\n });\n\n rawRoute.responsesTypes.forEach((response: AnyObject) => {\n jsDocLines.push({\n name: `**${response.status}**`,\n content: `${_.replace(_.replace(response.type, /\\/\\*/g, String.raw`\\*`), /\\*\\//g, '*\\\\')} ${response.description}`,\n });\n });\n }\n\n const jsdocContent = jsDocLines.map((it) => {\n let line: string = ' * ';\n\n if (it.name) {\n line += `@${it.name} `;\n }\n\n const content = (it.content ?? '').trimEnd();\n\n if (content) {\n line += content;\n }\n\n return line;\n });\n\n const result = `\n/**\n${jsdocContent.join('\\n')}\n */`;\n\n if (offset > 0) {\n return result\n .split('\\n')\n .map((line) => line.padStart(offset))\n .join('\\n');\n }\n\n return result;\n};\n","import type { ModelType } from 'swagger-typescript-api';\nimport type { PartialKeys } from 'yummies/types';\nimport type { TypeInfo } from '../types/type-info.js';\n\nexport const createShortModelType = (\n shortModelType: PartialKeys<\n ModelType,\n 'rawContent' | 'description' | 'typeIdentifier'\n >,\n): TypeInfo & ModelType => {\n return {\n ...shortModelType,\n typeIdentifier: shortModelType.typeIdentifier || 'type',\n rawContent: shortModelType.rawContent || shortModelType.content,\n description: shortModelType.description || '',\n };\n};\n","import type { AnyObject, Maybe } from 'yummies/types';\nimport type {\n BaseTmplParams,\n CodegenDataUtils,\n MetaInfo,\n} from '../types/index.js';\n\nimport { LINTERS_IGNORE } from './constants.js';\n\nexport interface MetaInfoTmplParams extends BaseTmplParams {\n metaInfo: Maybe<MetaInfo>;\n}\n\nexport const formatGroupNameEnumKey = (\n groupName: string,\n { _ }: CodegenDataUtils,\n) => _.upperFirst(_.camelCase(groupName));\n\nexport const formatTagNameEnumKey = (\n tagName: string,\n utils: CodegenDataUtils,\n) => formatGroupNameEnumKey(tagName, utils);\n\nexport const metaInfoTmpl = async ({\n metaInfo,\n utils,\n formatTSContent,\n codegenParams,\n ...other\n}: MetaInfoTmplParams) => {\n const tagsMap = new Map<string, AnyObject>(\n (other as any).configuration?.apiConfig?.tags?.map((it: AnyObject) => [\n it.name,\n it,\n ]),\n );\n\n return await formatTSContent(`${LINTERS_IGNORE}\n ${[\n metaInfo?.namespace && `export const namespace = \"${metaInfo?.namespace}\";`,\n metaInfo?.groupNames?.length &&\n `\nexport const enum Group {\n ${metaInfo?.groupNames.map((groupName) => `${formatGroupNameEnumKey(groupName, utils)} = \"${codegenParams.transforms?.groupEnumValue?.(groupName) ?? groupName}\"`).join(',\\n')}\n}\n`,\n metaInfo?.tags?.length &&\n `\nexport const enum Tag {\n ${metaInfo?.tags\n .map((tagName) => {\n const tagData = tagsMap.get(tagName);\n\n let description = tagData?.description;\n\n if (!description) {\n description = utils._.words(tagName).join(' ');\n }\n\n return [\n description && `/** ${description} */`,\n `${formatTagNameEnumKey(tagName, utils)} = \"${codegenParams.transforms?.tagEnumValue?.(tagName) ?? tagName}\"`,\n ]\n .filter(Boolean)\n .join('\\n');\n })\n .join(',\\n')}\n}\n`,\n ]\n .filter(Boolean)\n .join('\\n')}\n `);\n};\n","import type { ParsedRoute } from 'swagger-typescript-api';\nimport type { AnyObject, Maybe } from 'yummies/types';\nimport type { BaseTmplParams } from '../types/base-tmpl-params.js';\nimport type { MetaInfo } from '../types/index.js';\nimport { createShortModelType } from '../utils/create-short-model-type.js';\nimport {\n formatGroupNameEnumKey,\n formatTagNameEnumKey,\n} from './meta-info.tmpl.js';\n\nexport interface NewEndpointTmplParams extends BaseTmplParams {\n route: ParsedRoute;\n groupName: Maybe<string>;\n metaInfo: Maybe<MetaInfo>;\n}\n\n// RequestParams[\"type\"]\nconst requestContentKind: AnyObject = {\n URL_ENCODED: '\"application/x-www-form-urlencoded\"',\n FORM_DATA: '\"multipart/form-data\"',\n TEXT: '\"text/plain\"',\n BINARY: '\"application/octet-stream\"',\n};\n// RequestParams[\"format\"]\nconst responseContentKind: AnyObject = {\n TEXT: '\"text\"',\n IMAGE: '\"blob\"',\n FORM_DATA: '\"formData\"',\n BYTES: '\"bytes\"',\n};\n\nexport const newEndpointTmpl = ({\n route,\n codegenParams,\n importFileParams,\n utils,\n groupName,\n metaInfo,\n filterTypes,\n configuration,\n}: NewEndpointTmplParams) => {\n const { _ } = utils;\n const positiveResponseTypes = route.raw.responsesTypes?.filter(\n (it) =>\n +it.status >= 200 &&\n +it.status < 300 &&\n (!(it as AnyObject).typeData || filterTypes((it as AnyObject).typeData)),\n );\n\n const { requestBodyInfo, responseBodyInfo } = route as AnyObject;\n const routeRequest = route.request as AnyObject;\n const routeResponse = route.response;\n\n const { parameters, path, method, payload, query, requestParams, security } =\n routeRequest;\n const { raw } = route;\n const queryName = query?.name || 'query';\n const pathParams = _.values(parameters);\n const pathParamsNames = _.map(pathParams, 'name');\n\n type RequestParam = {\n name: string;\n optional?: boolean;\n type: string;\n defaultValue?: string;\n };\n\n const requestConfigParam: RequestParam = {\n name: 'requestParams',\n optional: true,\n type: 'RequestParams',\n defaultValue: '{}',\n };\n\n const inputParams = [\n ...pathParams,\n payload,\n query,\n requestConfigParam,\n ].filter(Boolean);\n\n const getArgs = ({\n withPayload,\n withRequestConfigParam,\n }: {\n withPayload?: boolean;\n withRequestConfigParam?: boolean;\n }): RequestParam[] => {\n return _.sortBy(\n _.compact([\n ...(requestParams\n ? [\n {\n name:\n pathParams.length > 0\n ? `{ ${_.join(pathParamsNames, ', ')}, ...${queryName} }`\n : queryName,\n optional: false,\n type: utils.getInlineParseContent(requestParams),\n },\n ]\n : pathParams),\n withPayload && payload,\n withRequestConfigParam && requestConfigParam,\n ]),\n [(o: AnyObject) => o.optional],\n );\n };\n\n const tags = (raw.tags || []).filter(Boolean);\n const requestOutputDataTypes = positiveResponseTypes.map((it) => it.type);\n\n const foundErrorModelType =\n (routeResponse.errorType &&\n configuration.modelTypes.find(\n (it) => it.name === routeResponse.errorType,\n )) ||\n null;\n\n const requestOutputErrorType = foundErrorModelType\n ? routeResponse.errorType\n : 'any';\n\n const pathParamsToInline = path.split('/').slice(1) as string[];\n\n let lastDynamicStructPos = 0;\n\n const queryParamStruct =\n query == null\n ? null\n : {\n type: 'dynamic',\n key: 'params',\n i: pathParamsToInline.length,\n param: lastDynamicStructPos > 0 ? lastDynamicStructPos - 1 : 0,\n };\n\n if (queryParamStruct && !lastDynamicStructPos) {\n lastDynamicStructPos++;\n }\n\n const requestInfoMeta = codegenParams.getEndpointMeta?.(route, utils);\n const requestMeta = codegenParams.getRequestMeta?.(route, utils);\n const resultPath =\n (codegenParams.requestPathPrefix ?? '') +\n path +\n (codegenParams.requestPathSuffix ?? '');\n\n const bodyContentType =\n requestContentKind[requestBodyInfo.contentKind] || null;\n const responseFormat =\n responseContentKind[responseBodyInfo.success?.schema?.contentKind] || null;\n\n const reservedDataContractNames: string[] = _.uniq([\n ...requestOutputDataTypes,\n requestOutputErrorType || 'any',\n ...getArgs({\n withPayload: true,\n }).map((it) => it.type),\n ]);\n\n const pathDeclaration = resultPath.replaceAll('$', '');\n\n const getHttpRequestGenerics = () => {\n const defaultOkResponse = positiveResponseTypes?.[0]?.type || 'unknown';\n const defaultBadResponse = requestOutputErrorType;\n const responses =\n raw.responsesTypes?.filter(\n (it) =>\n it.status !== 'default' &&\n (!(it as AnyObject).typeData ||\n filterTypes((it as AnyObject).typeData)),\n ) || [];\n\n if (!responses?.length) {\n return `HttpResponse<unknown, ${requestOutputErrorType}>`;\n }\n\n if (responses.length === 1 && responses[0].isSuccess) {\n return `HttpResponse<${responses[0].type}, ${requestOutputErrorType}>`;\n }\n\n return `HttpMultistatusResponse<{\n ${responses\n .map((it: AnyObject) => {\n return [\n it.description && `/** ${it.description} */`,\n `${it.status}: ${it.type};`,\n ]\n .filter(Boolean)\n .join('\\n');\n })\n .join('\\n')}\n },\n ${defaultOkResponse},\n ${defaultBadResponse}\n >`;\n };\n\n const requestInputTypeDc = createShortModelType({\n typeIdentifier: 'type',\n name: _.upperFirst(_.camelCase(`${route.routeName.usage}Params`)),\n content: `{\n ${inputParams\n .map(({ name, optional, type }) => {\n return `${name}${optional ? '?' : ''}:${type}`;\n })\n .filter(Boolean)\n .join(', ')}\n }`,\n });\n\n const isAllowedInputType = filterTypes(requestInputTypeDc);\n\n return {\n reservedDataContractNames,\n localModelTypes: isAllowedInputType ? [requestInputTypeDc] : [],\n content: `\nnew ${importFileParams.endpoint.exportName}<\n ${getHttpRequestGenerics()},\n ${isAllowedInputType ? requestInputTypeDc.name : 'any'},\n ${requestInfoMeta?.typeName ?? 'any'}\n>(\n {\n params: ({\n ${inputParams.map((it) => it.name)}\n}) => ({\n path: \\`${resultPath}\\`,\n method: '${_.upperCase(method)}',\n ${requestMeta?.tmplData ? `meta: ${requestMeta.tmplData},` : ''}\n ${query == null ? '' : `query: ${query.name},`}\n ${payload?.name ? `body: ${payload.name},` : ''}\n ${security ? 'secure: true,' : ''}\n ${bodyContentType ? `contentType: ${bodyContentType},` : ''}\n ${responseFormat ? `format: ${responseFormat},` : ''}\n ...${requestConfigParam.name},\n }),\n requiredParams: [${inputParams.filter((it) => !it.optional).map((it) => `\"${it.name}\"`)}],\n operationId: \"${raw.operationId || _.camelCase(route.routeName.usage)}\",\n path: [${pathDeclaration\n .split('/')\n .filter(Boolean)\n .map((it) => `\"${it}\"`)}],\n tags: [${tags.map((tag: string) => {\n if (metaInfo) {\n return `Tag.${formatTagNameEnumKey(tag, utils)}`;\n }\n return `\"${tag}\"`;\n })}],\n ${groupName ? `group: ${metaInfo ? `Group.${formatGroupNameEnumKey(groupName, utils)}` : `\"${groupName}\"`},` : ''}\n ${metaInfo?.namespace ? `namespace,` : ''}\n meta: ${requestInfoMeta?.tmplData ?? '{} as any'},\n },\n ${importFileParams.queryClient.exportName},\n ${importFileParams.httpClient.exportName},\n) \n`\n .split('\\n')\n .map((it) => it.trim())\n .filter(Boolean)\n .join('\\n'),\n };\n};\n","import type { ParsedRoute } from 'swagger-typescript-api';\nimport type { AnyObject, Maybe } from 'yummies/types';\nimport type { BaseTmplParams, MetaInfo } from '../types/index.js';\nimport { LINTERS_IGNORE } from './constants.js';\nimport { dataContractTmpl } from './data-contract.tmpl.js';\nimport { endpointJSDocTmpl } from './endpoint-jsdoc.tmpl.js';\nimport { newEndpointTmpl } from './new-endpoint.tmpl.js';\n\nexport interface AllEndpointPerFileTmplParams extends BaseTmplParams {\n routes: ParsedRoute[];\n groupName: Maybe<string>;\n metaInfo: Maybe<MetaInfo>;\n relativePathDataContracts: string;\n}\n\nexport const allEndpointPerFileTmpl = async (\n params: AllEndpointPerFileTmplParams,\n) => {\n const {\n routes,\n configuration,\n codegenParams,\n formatTSContent,\n importFileParams,\n utils,\n relativePathDataContracts,\n groupName,\n metaInfo,\n } = params;\n\n const { _ } = utils;\n\n const dataContractNamesInThisFile: string[] = [];\n\n const newEndpointTemplates = routes.map((route) => {\n const newEndpointTemplateData = newEndpointTmpl({\n ...params,\n route,\n });\n const { reservedDataContractNames } = newEndpointTemplateData;\n\n const dataContactNames = new Set(\n Object.keys(\n (configuration.config.swaggerSchema as any)?.components?.schemas,\n ).map((schemaName) => utils.formatModelName(schemaName)),\n );\n\n reservedDataContractNames.forEach((reservedDataContractName) => {\n if (!dataContactNames.has(reservedDataContractName)) {\n dataContractNamesInThisFile.push(reservedDataContractName);\n }\n });\n\n return { ...newEndpointTemplateData, route };\n });\n\n const extraImportLines: string[] = [];\n\n const endpointTemplates = await Promise.all(\n newEndpointTemplates.map(\n async ({\n content: requestInfoInstanceContent,\n localModelTypes,\n route,\n }) => {\n const requestInfoMeta = codegenParams.getEndpointMeta?.(route, utils);\n\n if (requestInfoMeta?.typeNameImportPath && requestInfoMeta.typeName) {\n extraImportLines.push(\n `import { ${requestInfoMeta.typeName} } from \"${requestInfoMeta.typeNameImportPath}\";`,\n );\n }\n\n return `\n ${(\n await Promise.all(\n localModelTypes.map(async (modelType) => {\n const contractType = await dataContractTmpl({\n ...params,\n contract: modelType,\n addExportKeyword: true,\n });\n\n return contractType;\n }),\n )\n )\n .filter(Boolean)\n .join('\\n\\n')}\n \n ${endpointJSDocTmpl({\n ...params,\n route,\n })}\n export const ${_.camelCase(route.routeName.usage)} = ${requestInfoInstanceContent} \n`;\n },\n ),\n );\n\n if (metaInfo) {\n extraImportLines.push(\n `import { ${[groupName && 'Group', metaInfo?.namespace && 'namespace', 'Tag'].filter(Boolean).join(',')} } from \"${groupName ? '../' : './'}meta-info\";`,\n );\n }\n\n return {\n reservedDataContractNames: dataContractNamesInThisFile,\n content: await formatTSContent(`${LINTERS_IGNORE}\n import {\n RequestParams,\n HttpResponse,\n HttpMultistatusResponse,\n } from \"${codegenParams.libImports?.['mobx-tanstack-query-api'] ?? 'mobx-tanstack-query-api'}\";\n import { ${importFileParams.endpoint.exportName} } from \"${importFileParams.endpoint.path}\";\n import { ${importFileParams.httpClient.exportName} } from \"${importFileParams.httpClient.path}\";\n import { ${importFileParams.queryClient.exportName} } from \"${importFileParams.queryClient.path}\";\n ${extraImportLines.join('\\n')}\n\n ${\n configuration.modelTypes.length > 0\n ? `\n import { ${configuration.modelTypes\n .map((it: AnyObject) => it.name)\n .filter(\n (it: any) => !dataContractNamesInThisFile.includes(it),\n )} } from \"${relativePathDataContracts}\";\n `\n : ''\n }\n\n ${(\n await Promise.all(\n dataContractNamesInThisFile.map(async (dataContractName) => {\n const modelType = configuration.modelTypes.find(\n (modelType: AnyObject) => modelType.name === dataContractName,\n );\n\n if (!modelType) {\n return '';\n }\n\n const contractType = await dataContractTmpl({\n ...params,\n contract: modelType,\n addExportKeyword: true,\n });\n\n return contractType;\n }),\n )\n )\n .filter(Boolean)\n .join('\\n\\n')}\n\n ${endpointTemplates.filter(Boolean).join('\\n\\n')}\n `),\n };\n};\n","import type { Maybe } from 'yummies/types';\n\nimport type {\n BaseTmplParams,\n CodegenDataUtils,\n MetaInfo,\n} from '../types/index.js';\n\nimport { LINTERS_IGNORE } from './constants.js';\n\nexport interface AllExportsTmplParams extends BaseTmplParams {\n collectedExportFiles: string[];\n metaInfo: Maybe<MetaInfo>;\n}\n\nexport const formatGroupNameEnumKey = (\n groupName: string,\n { _ }: CodegenDataUtils,\n) => _.upperFirst(_.camelCase(groupName));\n\nexport const allExportsTmpl = async ({\n collectedExportFiles,\n metaInfo,\n formatTSContent,\n}: AllExportsTmplParams) => {\n return await formatTSContent(`${LINTERS_IGNORE}\n export * from './data-contracts';\n ${collectedExportFiles.map((fileName) => `export * from './${fileName}';`).join('\\n')}\n ${metaInfo ? 'export * from \"./meta-info\";' : ''}\n `);\n};\n","import type { BaseTmplParams } from '../types/index.js';\nimport { LINTERS_IGNORE } from './constants.js';\nimport { dataContractTmpl } from './data-contract.tmpl.js';\n\nexport interface DataContractsTmplParams extends BaseTmplParams {\n excludedDataContractNames?: string[];\n}\n\nexport const dataContractsFileTmpl = async (\n params: DataContractsTmplParams,\n) => {\n const { config, modelTypes } = params.configuration;\n\n const contractDefinitions: string[] = [];\n\n if (config.internalTemplateOptions?.addUtilRequiredKeysType) {\n contractDefinitions.push(\n `type UtilRequiredKeys<T, K extends keyof T> = Omit<T, K> & Required<Pick<T, K>>`,\n );\n }\n\n for await (const contract of modelTypes) {\n if (params.excludedDataContractNames?.includes(contract.name)) {\n continue;\n }\n\n contractDefinitions.push(\n await dataContractTmpl({\n ...params,\n contract,\n addExportKeyword: true,\n }),\n );\n }\n\n return await params.formatTSContent(`${LINTERS_IGNORE}\n\n${contractDefinitions.length > 0 ? contractDefinitions.join('\\n\\n') : `export {}`}\n `);\n};\n","import type { ParsedRoute } from 'swagger-typescript-api';\nimport type { AnyObject, Maybe } from 'yummies/types';\nimport type { BaseTmplParams, MetaInfo } from '../types/index.js';\nimport { LINTERS_IGNORE } from './constants.js';\nimport { dataContractTmpl } from './data-contract.tmpl.js';\nimport { endpointJSDocTmpl } from './endpoint-jsdoc.tmpl.js';\nimport { newEndpointTmpl } from './new-endpoint.tmpl.js';\n\nexport interface EndpointPerFileTmplParams extends BaseTmplParams {\n route: ParsedRoute;\n relativePathDataContracts: string;\n groupName: Maybe<string>;\n metaInfo: Maybe<MetaInfo>;\n}\n\nexport const endpointPerFileTmpl = async (\n params: EndpointPerFileTmplParams,\n) => {\n const {\n route,\n configuration,\n codegenParams,\n formatTSContent,\n importFileParams,\n utils,\n relativePathDataContracts,\n groupName,\n metaInfo,\n } = params;\n const { _ } = utils;\n\n const {\n content: requestInfoInstanceContent,\n reservedDataContractNames,\n localModelTypes,\n } = newEndpointTmpl({\n ...params,\n route,\n groupName,\n metaInfo,\n });\n\n const dataContactNames = new Set(\n Object.keys(\n (configuration.config.swaggerSchema as any)?.components?.schemas,\n ).map((schemaName) => utils.formatModelName(schemaName)),\n );\n\n const dataContractNamesInThisFile: string[] = [];\n\n reservedDataContractNames.forEach((reservedDataContractName) => {\n if (!dataContactNames.has(reservedDataContractName)) {\n dataContractNamesInThisFile.push(reservedDataContractName);\n }\n });\n\n const extraImportLines: string[] = [];\n\n if (metaInfo) {\n extraImportLines.push(\n `import { ${[groupName && 'Group', metaInfo?.namespace && 'namespace', 'Tag'].filter(Boolean).join(',')} } from \"../${groupName ? '../' : ''}meta-info\";`,\n );\n }\n\n const requestInfoMeta = codegenParams.getEndpointMeta?.(route, utils);\n\n if (requestInfoMeta?.typeNameImportPath && requestInfoMeta.typeName) {\n extraImportLines.push(\n `import { ${requestInfoMeta.typeName} } from \"${requestInfoMeta.typeNameImportPath}\";`,\n );\n }\n\n return {\n reservedDataContractNames: dataContractNamesInThisFile,\n content: await formatTSContent(`${LINTERS_IGNORE}\n import {\n RequestParams,\n HttpResponse,\n HttpMultistatusResponse,\n } from \"${codegenParams.libImports?.['mobx-tanstack-query-api'] ?? 'mobx-tanstack-query-api'}\";\n import { ${importFileParams.endpoint.exportName} } from \"${importFileParams.endpoint.path}\";\n import { ${importFileParams.httpClient.exportName} } from \"${importFileParams.httpClient.path}\";\n import { ${importFileParams.queryClient.exportName} } from \"${importFileParams.queryClient.path}\";\n ${extraImportLines.join('\\n')}\n\n ${\n configuration.modelTypes.length > 0\n ? `\n import { ${configuration.modelTypes\n .map((it: AnyObject) => it.name)\n .filter(\n (it: any) => !dataContractNamesInThisFile.includes(it),\n )} } from \"${relativePathDataContracts}\";\n `\n : ''\n }\n\n ${(\n await Promise.all(\n dataContractNamesInThisFile.map(async (dataContractName) => {\n const modelType = configuration.modelTypes.find(\n (modelType: AnyObject) => modelType.name === dataContractName,\n );\n\n if (!modelType) {\n return '';\n }\n\n const contractType = await dataContractTmpl({\n ...params,\n contract: modelType,\n addExportKeyword: true,\n });\n\n return contractType;\n }),\n )\n )\n .filter(Boolean)\n .join('\\n\\n')}\n\n ${(\n await Promise.all(\n localModelTypes.map(async (modelType) => {\n const contractType = await dataContractTmpl({\n ...params,\n contract: modelType,\n addExportKeyword: true,\n });\n\n return contractType;\n }),\n )\n )\n .filter(Boolean)\n .join('\\n\\n')}\n \n ${endpointJSDocTmpl({\n ...params,\n route,\n })}\n export const ${_.camelCase(route.routeName.usage)} = ${requestInfoInstanceContent}\n `),\n };\n};\n","import type { BaseTmplParams } from '../types/index.js';\nimport { LINTERS_IGNORE } from './constants.js';\n\nexport interface IndexTsForEndpointPerFileTmplParams extends BaseTmplParams {\n generatedRequestFileNames: string[];\n}\n\nexport const indexTsForEndpointPerFileTmpl = async ({\n generatedRequestFileNames,\n}: IndexTsForEndpointPerFileTmplParams) => {\n return `${LINTERS_IGNORE}\n${generatedRequestFileNames.map((fileName) => `export * from './${fileName.replace('.ts', '')}';`).join('\\n')}\n`;\n};\n","import type { Maybe } from 'yummies/types';\n\ntype AnyFilterOptionFn = (...args: any[]) => boolean;\n\nexport type FilterOption<T extends AnyFilterOptionFn> =\n | T\n | string\n | RegExp\n | (RegExp | string)[];\n\nexport type UnpackedFilterOption<T extends FilterOption<any>> = Extract<\n T,\n AnyFilterOptionFn\n>;\n\nexport const unpackFilterOption = <\n TOption extends FilterOption<AnyFilterOptionFn>,\n>(\n option: Maybe<TOption>,\n argsToString: (...args: Parameters<UnpackedFilterOption<TOption>>) => string,\n defaultReturnValue: boolean = true,\n): UnpackedFilterOption<TOption> => {\n if (typeof option === 'function') {\n // @ts-expect-error\n return option;\n }\n\n if (option == null) {\n // @ts-expect-error\n return () => defaultReturnValue;\n }\n\n const inputs = Array.isArray(option) ? option : [option];\n\n // @ts-expect-error\n return (...args: Parameters<UnpackedFilterOption<TOption>>) =>\n inputs.some((input) => {\n const str = argsToString(...args);\n\n if (typeof input === 'string') {\n return input === str;\n }\n\n return input.test(str);\n });\n};\n","import path from 'node:path';\nimport { type ExportedDeclarations, Node, Project, SyntaxKind } from 'ts-morph';\nimport {\n type FilterOption,\n unpackFilterOption,\n} from './unpack-filter-option.js';\n\nexport interface RemoveUnusedTypesParams {\n directory: string;\n keepTypes?: FilterOption<(typeName: string) => boolean>;\n}\n\nconst removeUnusedTypesItteration = async ({\n directory,\n keepTypes,\n // biome-ignore lint/complexity/noExcessiveCognitiveComplexity: <explanation>\n}: RemoveUnusedTypesParams) => {\n const project = new Project();\n\n project.addSourceFilesAtPaths([\n path.join(directory, '**/*.ts'),\n path.join(directory, '**/*.tsx'),\n ]);\n\n const dataContractsSourceFile = project.getSourceFile((sourceFile) =>\n sourceFile.getFilePath().includes(`${directory}/data-contracts.ts`),\n );\n\n if (!dataContractsSourceFile) return;\n\n const exportedDeclarations =\n dataContractsSourceFile.getExportedDeclarations();\n const candidateTypes = new Map<string, ExportedDeclarations[]>();\n\n for (const [name, declarations] of exportedDeclarations) {\n const validDeclarations = declarations.filter(\n (decl) =>\n decl.getKind() === SyntaxKind.InterfaceDeclaration ||\n decl.getKind() === SyntaxKind.TypeAliasDeclaration ||\n decl.getKind() === SyntaxKind.EnumDeclaration,\n );\n\n if (validDeclarations.length > 0) {\n candidateTypes.set(name, validDeclarations);\n }\n }\n\n if (candidateTypes.size === 0) return;\n\n const usedTypes = new Set<string>();\n const externalFiles = project\n .getSourceFiles()\n .filter((sf) => sf !== dataContractsSourceFile);\n\n for (const file of externalFiles) {\n const identifiers = file.getDescendantsOfKind(SyntaxKind.Identifier);\n for (const identifier of identifiers) {\n const name = identifier.getText();\n if (candidateTypes.has(name)) {\n usedTypes.add(name);\n }\n }\n\n const memberAccessExpressions = file.getDescendantsOfKind(\n SyntaxKind.PropertyAccessExpression,\n );\n for (const expr of memberAccessExpressions) {\n const expression = expr.getExpression();\n if (Node.isIdentifier(expression)) {\n const name = expression.getText();\n if (candidateTypes.has(name)) {\n usedTypes.add(name);\n }\n }\n }\n }\n\n const dependencyGraph = new Map<string, Set<string>>();\n\n for (const [name, declarations] of candidateTypes) {\n const dependencies = new Set<string>();\n\n for (const decl of declarations) {\n const typeReferences = decl.getDescendantsOfKind(\n SyntaxKind.TypeReference,\n );\n for (const ref of typeReferences) {\n const typeName = ref.getTypeName().getText();\n if (candidateTypes.has(typeName)) {\n dependencies.add(typeName);\n }\n }\n\n if (decl.getKind() === SyntaxKind.EnumDeclaration) {\n const initializers = decl.getDescendantsOfKind(SyntaxKind.Identifier);\n for (const init of initializers) {\n const text = init.getText();\n if (candidateTypes.has(text)) {\n dependencies.add(text);\n }\n }\n }\n }\n\n dependencyGraph.set(name, dependencies);\n }\n\n const queue = Array.from(usedTypes);\n const visited = new Set(usedTypes);\n\n while (queue.length > 0) {\n const current = queue.shift()!;\n\n if (dependencyGraph.has(current)) {\n for (const dep of dependencyGraph.get(current)!) {\n if (!visited.has(dep)) {\n visited.add(dep);\n usedTypes.add(dep);\n queue.push(dep);\n }\n }\n }\n }\n\n let removedCount = 0;\n\n const isNeedToRemoveType = unpackFilterOption(\n keepTypes,\n (name) => name,\n false,\n );\n\n for (const [name, declarations] of candidateTypes) {\n if (usedTypes.has(name)) continue;\n\n for (const decl of declarations) {\n if ('remove' in decl && isNeedToRemoveType(name)) {\n decl.remove();\n removedCount++;\n }\n }\n }\n\n if (removedCount > 0) {\n await dataContractsSourceFile.save();\n }\n\n return removedCount;\n};\n\nexport const removeUnusedTypes = async (params: RemoveUnusedTypesParams) => {\n while (true) {\n const removedCount = (await removeUnusedTypesItteration(params)) ?? 0;\n if (removedCount === 0) break;\n }\n};\n","import path from 'node:path';\nimport { fileURLToPath } from 'node:url';\nimport { cloneDeep } from 'lodash-es';\nimport {\n type GenerateApiConfiguration,\n generateApi as generateApiFromSwagger,\n type ParsedRoute,\n} from 'swagger-typescript-api';\nimport type { AnyObject, Maybe } from 'yummies/types';\nimport { allEndpointPerFileTmpl } from './templates/all-endpoints-per-file.tmpl.js';\nimport { allExportsTmpl } from './templates/all-exports.tmpl.js';\nimport { LINTERS_IGNORE } from './templates/constants.js';\nimport { dataContractsFileTmpl } from './templates/data-contracts-file.tmpl.js';\nimport { endpointPerFileTmpl } from './templates/endpoint-per-file.tmpl.js';\nimport { indexTsForEndpointPerFileTmpl } from './templates/index-ts-for-endpoint-per-file.tmpl.js';\nimport { metaInfoTmpl } from './templates/meta-info.tmpl.js';\nimport type {\n AllImportFileParams,\n BaseTmplParams,\n CodegenDataUtils,\n GenerateQueryApiParams,\n MetaInfo,\n} from './types/index.js';\nimport { removeUnusedTypes } from './utils/remove-unused-types.js';\nimport { unpackFilterOption } from './utils/unpack-filter-option.js';\n\nexport * from './types/index.js';\n\nconst __filename = fileURLToPath(import.meta.url);\n\nconst __dirname = path.dirname(__filename);\nconst __execdirname = process.cwd();\n\nexport const generateApi = async (\n params: GenerateQueryApiParams | GenerateQueryApiParams[],\n // biome-ignore lint/complexity/noExcessiveCognitiveComplexity: <explanation>\n): Promise<void> => {\n if (Array.isArray(params)) {\n for await (const param of params) {\n await generateApi(param);\n }\n return;\n }\n\n const tsconfigPath = params.tsconfigPath\n ? path.resolve(__execdirname, params.tsconfigPath)\n : path.resolve(__execdirname, './tsconfig.json');\n\n console.info('using tsconfig', tsconfigPath);\n\n const importFileParams: AllImportFileParams = {\n queryClient:\n !params.queryClient || typeof params.queryClient === 'string'\n ? {\n exportName: 'queryClient',\n path: 'mobx-tanstack-query-api/builtin',\n }\n : params.queryClient,\n endpoint:\n !params.endpoint || typeof params.endpoint === 'string'\n ? {\n exportName: 'Endpoint',\n path: 'mobx-tanstack-query-api',\n }\n : params.endpoint,\n httpClient:\n !params.httpClient || typeof params.httpClient === 'string'\n ? {\n exportName: 'http',\n path: 'mobx-tanstack-query-api/builtin',\n }\n : params.httpClient,\n };\n\n const paths = {\n templates: path.resolve(__dirname, 'templates'),\n requestInfoClass: path.resolve(\n __dirname,\n 'templates/request-info-class.ejs',\n ),\n httpClient: path.resolve(__dirname, 'templates/http-client.ejs'),\n createRequestInfoInstance: path.resolve(\n __dirname,\n 'templates/create-request-info-instance.ejs',\n ),\n outputDir: path.resolve(process.cwd(), params.output),\n };\n\n //#region swagger-typescript-api\n const swaggerTypescriptApiCodegenBaseParams: Partial<AnyObject> = {\n httpClientType: 'fetch',\n cleanOutput: params.cleanOutput ?? true,\n modular: true,\n patch: true,\n typeSuffix: 'DC',\n disableStrictSSL: false,\n singleHttpClient: true,\n extractRequestBody: true,\n extractRequestParams: false,\n extractResponseBody: true,\n extractResponseError: true,\n generateResponses: true,\n generateClient: false,\n addReadonly: true,\n moduleNameFirstTag: true,\n sortTypes: true,\n templates: paths.templates.toString(),\n primitiveTypeConstructs: (constructs: AnyObject) => {\n return {\n ...(constructs as any),\n object: () => `Record<string, any>`,\n float: () => `number`,\n ...params.otherCodegenParams?.primitiveTypeConstructs?.(constructs),\n };\n },\n requestOptions: params.fetchSchemaRequestOptions,\n ...params.otherCodegenParams,\n };\n\n let codegenProcess!: any;\n\n if (!params.input) {\n console.warn(\n '[mobx-tanstack-query-api/codegen]',\n 'input is not specified',\n '\\nprocess will be skipped',\n );\n return;\n }\n\n const inputToCodegenInput = (input: Maybe<string | AnyObject>): AnyObject => {\n const inputData: AnyObject = {};\n\n if (typeof input === 'string') {\n inputData.input = input;\n inputData.url = input;\n } else {\n inputData.spec = input;\n }\n\n return inputData;\n };\n let mixinSwaggerSchema: Maybe<AnyObject> = null;\n\n if (params.mixinInput) {\n await generateApiFromSwagger({\n ...(swaggerTypescriptApiCodegenBaseParams as any),\n ...inputToCodegenInput(params.mixinInput),\n hooks: {\n onInit: (configuration) => {\n mixinSwaggerSchema = cloneDeep(configuration.swaggerSchema);\n },\n onPrepareConfig: (config) => {\n config.routes.combined?.forEach((routeInfo) => {\n routeInfo.routes.sort((routeA, routeB) =>\n routeA.routeName.usage.localeCompare(routeB.routeName.usage),\n );\n });\n },\n onFormatRouteName: (routeInfo, usageRouteName) => {\n let formattedRouteName = usageRouteName;\n\n if (\n params.addPathSegmentToRouteName === true ||\n typeof params.addPathSegmentToRouteName === 'number'\n ) {\n const pathSegmentForSuffix =\n typeof params.addPathSegmentToRouteName === 'number'\n ? params.addPathSegmentToRouteName\n : 0;\n\n const pathSegments = routeInfo.route.split('/').filter(Boolean);\n const { _ } = codegenProcess.getRenderTemplateData()\n .utils as CodegenDataUtils;\n\n formattedRouteName = _.camelCase(\n `${pathSegments[pathSegmentForSuffix] || ''}_${formattedRouteName}`,\n );\n }\n\n const endpointName = formattedRouteName;\n\n return (\n params?.formatEndpointName?.(endpointName, routeInfo) ??\n swaggerTypescriptApiCodegenBaseParams?.hooks?.onFormatRouteName?.(\n routeInfo,\n endpointName,\n ) ??\n endpointName\n );\n },\n },\n });\n }\n\n const generated = await generateApiFromSwagger({\n ...(swaggerTypescriptApiCodegenBaseParams as any),\n ...inputToCodegenInput(params.input),\n hooks: {\n onInit: (configuration, codeGenProcessFromInit) => {\n codegenProcess = codeGenProcessFromInit;\n\n const resultSwaggerSchema = configuration.swaggerSchema as AnyObject;\n\n resultSwaggerSchema.components = resultSwaggerSchema.components || {};\n resultSwaggerSchema.components.schemas =\n resultSwaggerSchema.components.schemas || {};\n\n resultSwaggerSchema.paths = {\n ...resultSwaggerSchema.paths,\n ...mixinSwaggerSchema?.paths,\n };\n\n resultSwaggerSchema.components.schemas = {\n ...resultSwaggerSchema.components.schemas,\n ...mixinSwaggerSchema?.components?.schemas,\n };\n\n return swaggerTypescriptApiCodegenBaseParams?.hooks?.onInit?.(\n configuration,\n codeGenProcessFromInit,\n );\n },\n onPrepareConfig: (config) => {\n config.routes.combined?.forEach((routeInfo) => {\n routeInfo.routes.sort((routeA, routeB) =>\n routeA.routeName.usage.localeCompare(routeB.routeName.usage),\n );\n });\n return swaggerTypescriptApiCodegenBaseParams?.hooks?.onPrepareConfig?.(\n config,\n );\n },\n onFormatRouteName: (routeInfo, usageRouteName) => {\n let formattedRouteName = usageRouteName;\n\n if (\n params.addPathSegmentToRouteName === true ||\n typeof params.addPathSegmentToRouteName === 'number'\n ) {\n const pathSegmentForSuffix =\n typeof params.addPathSegmentToRouteName === 'number'\n ? params.addPathSegmentToRouteName\n : 0;\n\n const pathSegments = routeInfo.route.split('/').filter(Boolean);\n const { _ } = codegenProcess.getRenderTemplateData()\n .utils as CodegenDataUtils;\n\n formattedRouteName = _.camelCase(\n `${pathSegments[pathSegmentForSuffix] || ''}_${formattedRouteName}`,\n );\n }\n\n const endpointName = formattedRouteName;\n\n return (\n params?.formatEndpointName?.(endpointName, routeInfo) ??\n swaggerTypescriptApiCodegenBaseParams?.hooks?.onFormatRouteName?.(\n routeInfo,\n endpointName,\n ) ??\n endpointName\n );\n },\n },\n });\n\n //#endregion\n\n const utils = codegenProcess.getRenderTemplateData()\n .utils as CodegenDataUtils;\n\n const { _ } = utils;\n\n let namespace: Maybe<string> = null;\n\n if (params.namespace) {\n if (typeof params.namespace === 'function') {\n namespace = params.namespace(utils);\n } else {\n namespace = utils._.camelCase(params.namespace);\n }\n }\n\n const codegenFs = codegenProcess.fileSystem as any;\n\n codegenFs.cleanDir(params.output);\n codegenFs.createDir(params.output);\n\n const filterTypes = unpackFilterOption(\n params.filterTypes,\n (modelType) => modelType.name,\n );\n\n generated.configuration.modelTypes =\n generated.configuration.modelTypes.filter((modelType) =>\n filterTypes(modelType),\n );\n\n const allRoutes = Object.values(generated.configuration.routes)\n .flat()\n .flatMap((routeGroup) =>\n 'routes' in routeGroup ? routeGroup.routes : routeGroup,\n );\n\n const filterEndpoint = unpackFilterOption(\n params.filterEndpoints,\n (route) => route.raw?.operationId || '',\n );\n\n const baseTmplParams: BaseTmplParams = {\n ...generated,\n codegenParams: params,\n configuration: generated.configuration as GenerateApiConfiguration,\n formatTSContent: generated.formatTSContent,\n codegenProcess,\n importFileParams,\n utils,\n filterTypes,\n };\n\n const reservedDataContractNamesMap = new Map<string, number>();\n\n const collectedExportFilesFromIndexFile: string[] = [];\n\n const groupsMap = new Map<string, ParsedRoute[]>();\n const nonEmptyGroups = new Set<string>();\n const tagsSet = new Set<string>();\n\n if (params.groupBy == null) {\n collectedExportFilesFromIndexFile.push('endpoints');\n\n if (params.outputType === 'one-endpoint-per-file') {\n // #region кодогенерация 1 эндпоинт - 1 файл без группировки\n codegenFs.createDir(path.resolve(params.output, 'endpoints'));\n\n const fileNamesWithRequestInfo: string[] = [];\n\n for await (const route of allRoutes) {\n const {\n content: requestInfoPerFileContent,\n reservedDataContractNames,\n } = await endpointPerFileTmpl({\n ...baseTmplParams,\n route,\n relativePathDataContracts: '../data-contracts',\n groupName: null,\n metaInfo: params.noMetaInfo\n ? null\n : {\n groupNames: [],\n namespace,\n },\n });\n\n if (Array.isArray(route.raw.tags)) {\n route.raw.tags.forEach((tag) => {\n tagsSet.add(tag);\n });\n }\n\n reservedDataContractNames.forEach((name) => {\n reservedDataContractNamesMap.set(\n name,\n (reservedDataContractNamesMap.get(name) ?? 0) + 1,\n );\n });\n\n if (!filterEndpoint(route)) {\n continue;\n }\n\n const fileName = `${_.kebabCase(route.routeName.usage)}.ts`;\n\n fileNamesWithRequestInfo.push(fileName);\n\n codegenFs.createFile({\n path: path.resolve(params.output, 'endpoints'),\n fileName,\n withPrefix: false,\n content: requestInfoPerFileContent,\n });\n }\n\n codegenFs.createFile({\n path: path.resolve(params.output, 'endpoints'),\n fileName: 'index.ts',\n withPrefix: false,\n content: await indexTsForEndpointPerFileTmpl({\n ...baseTmplParams,\n generatedRequestFileNames: fileNamesWithRequestInfo,\n }),\n });\n // #endregion\n } else {\n // #region кодогенерация несколько эндпоинтов в 1 файле без группировки\n const { content: requestInfoPerFileContent, reservedDataContractNames } =\n await allEndpointPerFileTmpl({\n ...baseTmplParams,\n routes: allRoutes,\n relativePathDataContracts: './data-contracts',\n groupName: null,\n metaInfo: params.noMetaInfo\n ? null\n : {\n namespace,\n groupNames: [],\n },\n });\n\n reservedDataContractNames.forEach((name) => {\n reservedDataContractNamesMap.set(\n name,\n (reservedDataContractNamesMap.get(name) ?? 0) + 1,\n );\n });\n\n const filteredRoutes = allRoutes.filter(filterEndpoint);\n\n const hasFilteredRoutes = filteredRoutes.length > 0;\n\n if (hasFilteredRoutes) {\n filteredRoutes.forEach((route) => {\n if (Array.isArray(route.raw.tags)) {\n route.raw.tags.forEach((tag: string) => {\n tagsSet.add(tag);\n });\n }\n });\n\n const fileName = 'endpoints.ts';\n\n collectedExportFilesFromIndexFile.push('endpoints');\n\n codegenFs.createFile({\n path: params.output,\n fileName,\n withPrefix: false,\n content: requestInfoPerFileContent,\n });\n }\n\n // #endregion\n }\n } else {\n // #region кодогенерация с группировкой\n\n // #region разбиение роутов по группам\n\n allRoutes.forEach((route) => {\n let group: string | undefined;\n\n if (typeof params.groupBy === 'function') {\n group = params.groupBy(route);\n } else if (params.groupBy?.includes('path-segment')) {\n const segmentIndex =\n +params.groupBy.replaceAll(/path-segment-?/g, '') || 0;\n\n group =\n (route.request as AnyObject).path?.split('/')?.filter(Boolean)?.[\n segmentIndex\n ] || undefined;\n } else if (params.groupBy?.includes('tag')) {\n const tagIndex = +params.groupBy.replaceAll(/tag-?/g, '') || 0;\n\n group = route.raw?.tags?.[tagIndex] ?? undefined;\n }\n\n if (group == null) {\n group = 'other';\n }\n\n if (!groupsMap.has(group)) {\n groupsMap.set(group, []);\n }\n\n groupsMap.get(group)?.push(route);\n });\n // #endregion\n\n const filterGroups = unpackFilterOption(\n params.filterGroups,\n (groupName) => groupName,\n );\n for await (const [groupName, routes] of groupsMap) {\n if (!filterGroups(groupName)) {\n continue;\n }\n\n const fileNamesWithRequestInfo: string[] = [];\n\n const groupDirectory = path.resolve(\n params.output,\n _.kebabCase(groupName),\n );\n\n codegenFs.createDir(groupDirectory);\n\n let hasFilteredRoutes = false;\n\n if (params.outputType === 'one-endpoint-per-file') {\n // #region Генерация одного эндпоинта на 1 файл\n codegenFs.createDir(path.resolve(groupDirectory, 'endpoints'));\n\n for await (const route of routes) {\n const {\n content: requestInfoPerFileContent,\n reservedDataContractNames,\n } = await endpointPerFileTmpl({\n ...baseTmplParams,\n route,\n relativePathDataContracts: '../../data-contracts',\n groupName,\n metaInfo: params.noMetaInfo\n ? null\n : {\n namespace,\n groupNames: [],\n },\n });\n\n reservedDataContractNames.forEach((name) => {\n reservedDataContractNamesMap.set(\n name,\n (reservedDataContractNamesMap.get(name) ?? 0) + 1,\n );\n });\n\n if (!filterEndpoint(route)) {\n continue;\n }\n\n hasFilteredRoutes = true;\n\n if (Array.isArray(route.raw.tags)) {\n route.raw.tags.forEach((tag: string) => {\n tagsSet.add(tag);\n });\n }\n\n const fileName = `${_.kebabCase(route.routeName.usage)}.ts`;\n\n fileNamesWithRequestInfo.push(fileName);\n\n codegenFs.createFile({\n path: path.resolve(\n params.output,\n _.kebabCase(groupName),\n 'endpoints',\n ),\n fileName,\n withPrefix: false,\n content: requestInfoPerFileContent,\n });\n }\n // #endregion\n } else {\n // #region Генерация нескольких эндпоинтов на 1 файл\n const {\n content: requestInfoPerFileContent,\n reservedDataContractNames,\n } = await allEndpointPerFileTmpl({\n ...baseTmplParams,\n routes,\n relativePathDataContracts: '../data-contracts',\n groupName,\n metaInfo: params.noMetaInfo\n ? null\n : {\n namespace,\n groupNames: [],\n },\n });\n\n reservedDataContractNames.forEach((name) => {\n reservedDataContractNamesMap.set(\n name,\n (reservedDataContractNamesMap.get(name) ?? 0) + 1,\n );\n });\n\n const filteredRoutes = routes.filter(filterEndpoint);\n\n hasFilteredRoutes = filteredRoutes.length > 0;\n\n if (hasFilteredRoutes) {\n filteredRoutes.forEach((route) => {\n if (Array.isArray(route.raw.tags)) {\n route.raw.tags.forEach((tag: string) => {\n tagsSet.add(tag);\n });\n }\n });\n\n const fileName = 'endpoints.ts';\n\n fileNamesWithRequestInfo.push(fileName);\n\n codegenFs.createFile({\n path: groupDirectory,\n fileName,\n withPrefix: false,\n content: requestInfoPerFileContent,\n });\n }\n\n // #endregion\n }\n\n if (hasFilteredRoutes) {\n nonEmptyGroups.add(groupName);\n const exportGroupName = params.formatExportGroupName\n ? params.formatExportGroupName(_.camelCase(groupName), utils)\n : _.camelCase(groupName);\n\n codegenFs.createFile({\n path: groupDirectory,\n fileName: 'index.ts',\n withPrefix: false,\n content: `${LINTERS_IGNORE}\nexport * as ${exportGroupName} from './endpoints';\n`,\n });\n\n if (params.outputType === 'one-endpoint-per-file') {\n codegenFs.createFile({\n path: path.resolve(groupDirectory, 'endpoints'),\n fileName: 'index.ts',\n withPrefix: false,\n content: await indexTsForEndpointPerFileTmpl({\n ...baseTmplParams,\n generatedRequestFileNames: fileNamesWithRequestInfo,\n }),\n });\n }\n\n collectedExportFilesFromIndexFile.push(_.kebabCase(groupName));\n } else {\n codegenFs.removeDir(\n path.resolve(params.output, _.kebabCase(groupName)),\n );\n }\n }\n // #endregion\n }\n\n const metaInfo: Maybe<MetaInfo> =\n !params.noMetaInfo &&\n (namespace ?? (nonEmptyGroups.size > 0 || tagsSet.size > 0))\n ? {\n namespace,\n groupNames: [...nonEmptyGroups.values()],\n tags: [...tagsSet.values()],\n }\n : null;\n\n const excludedDataContractNames = Array.from(\n reservedDataContractNamesMap.entries(),\n )\n .filter(([_, count]) => count === 1)\n .map(([name]) => name);\n\n const dataContractsContent = await dataContractsFileTmpl({\n ...baseTmplParams,\n excludedDataContractNames,\n });\n\n codegenFs.createFile({\n path: paths.outputDir,\n fileName: 'data-contracts.ts',\n withPrefix: false,\n content: dataContractsContent,\n });\n\n if (metaInfo) {\n codegenFs.createFile({\n path: paths.outputDir,\n fileName: 'meta-info.ts',\n withPrefix: false,\n content: await metaInfoTmpl({\n ...baseTmplParams,\n metaInfo,\n }),\n });\n }\n\n if (namespace) {\n codegenFs.createFile({\n path: paths.outputDir,\n fileName: '__exports.ts',\n withPrefix: false,\n content: await allExportsTmpl({\n ...baseTmplParams,\n collectedExportFiles: collectedExportFilesFromIndexFile,\n metaInfo,\n }),\n });\n codegenFs.createFile({\n path: paths.outputDir,\n fileName: 'index.ts',\n withPrefix: false,\n content: `${LINTERS_IGNORE}\nexport * as ${namespace} from './__exports';\n`,\n });\n } else {\n codegenFs.createFile({\n path: paths.outputDir,\n fileName: 'index.ts',\n withPrefix: false,\n content: await allExportsTmpl({\n ...baseTmplParams,\n collectedExportFiles: collectedExportFilesFromIndexFile,\n metaInfo,\n }),\n });\n }\n\n if (params.removeUnusedTypes) {\n removeUnusedTypes({\n directory: params.output,\n keepTypes:\n params.removeUnusedTypes === true\n ? undefined\n : params.removeUnusedTypes.keepTypes,\n });\n }\n};\n","import type { Maybe } from 'yummies/types';\nimport type { GenerateQueryApiParams } from '../../codegen/types/index.js';\n\nexport const defineConfig = (\n ...configs: Maybe<GenerateQueryApiParams | GenerateQueryApiParams[]>[]\n): GenerateQueryApiParams[] => {\n return configs\n .flat()\n .filter((config): config is GenerateQueryApiParams => !!config);\n};\n"],"names":["contract","path","modelType","generateApiFromSwagger","_"],"mappings":";;;;;;;AAAO,MAAM,iBAAiB;AAAA;ACQ9B,MAAM,gBAAgB,CAAC,aAAkB;AACvC,MAAI,CAAC,SAAS,aAAa,OAAQ,QAAO;AAE1C,SACE,MACA,SAAS,YACN,IAAI,CAAC,QAAa;AACjB,UAAM,EAAE,MAAM,SAAS,aAAa,SAAS,gBAAgB;AAC7D,WAAO;AAAA,MACL;AAAA,MACA,eAAe,WAAW,WAAW;AAAA,MACrC,eAAe,KAAK,WAAW;AAAA,IAAA,EAE9B,OAAO,OAAO,EACd,KAAK,GAAG;AAAA,EACb,CAAC,EACA,KAAK,IAAI,IACZ;AAEJ;AAEO,MAAM,mBAAmB,OAAO;AAAA,EACrC;AAAA,EACA;AAAA,EACA;AACF,MAA8B;AAC5B,QAAM,EAAE,UAAU;AAClB,QAAM,EAAE,sBAAsB;AAE9B,QAAM,wBAAmE;AAAA,IACvE,MAAM,CAACA,cAAkB;AACvB,aAAO,QAAQA,UAAS,IAAI;AAAA,EAASA,UAAS,OAAO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