@kubb/agent 5.0.0-alpha.33 → 5.0.0-alpha.35
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/.output/nitro.json +1 -1
- package/.output/server/chunks/nitro/nitro.mjs +2173 -1924
- package/.output/server/chunks/nitro/nitro.mjs.map +1 -1
- package/.output/server/chunks/routes/api/health.get.mjs +1 -1
- package/.output/server/index.mjs +1 -1
- package/.output/server/node_modules/@redocly/config/lib/root-config-schema.js +11 -1
- package/.output/server/node_modules/@redocly/config/package.json +1 -1
- package/.output/server/node_modules/@redocly/openapi-core/lib/bundle/bundle-document.js +25 -10
- package/.output/server/node_modules/@redocly/openapi-core/lib/bundle/bundle-visitor.js +32 -29
- package/.output/server/node_modules/@redocly/openapi-core/lib/config/config.js +5 -0
- package/.output/server/node_modules/@redocly/openapi-core/lib/decorators/oas2/index.js +1 -1
- package/.output/server/node_modules/@redocly/openapi-core/lib/decorators/oas2/remove-unused-components.js +47 -38
- package/.output/server/node_modules/@redocly/openapi-core/lib/decorators/oas3/index.js +1 -1
- package/.output/server/node_modules/@redocly/openapi-core/lib/decorators/oas3/remove-unused-components.js +45 -41
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/no-http-verbs-in-paths.js +3 -1
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/no-required-schema-properties-undefined.js +41 -55
- package/.output/server/node_modules/@redocly/openapi-core/lib/walk.js +28 -16
- package/.output/server/node_modules/@redocly/openapi-core/package.json +2 -2
- package/.output/server/package.json +3 -4
- package/package.json +20 -20
- package/.output/server/node_modules/empathic/access.js +0 -39
- package/.output/server/node_modules/empathic/access.mjs +0 -34
- package/.output/server/node_modules/empathic/find.js +0 -81
- package/.output/server/node_modules/empathic/find.mjs +0 -76
- package/.output/server/node_modules/empathic/package.json +0 -49
- package/.output/server/node_modules/empathic/package.mjs +0 -52
- package/.output/server/node_modules/empathic/resolve.js +0 -31
- package/.output/server/node_modules/empathic/resolve.mjs +0 -27
- package/.output/server/node_modules/empathic/walk.js +0 -22
- package/.output/server/node_modules/empathic/walk.mjs +0 -20
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nitro.mjs","sources":["../../../../../../node_modules/.pnpm/destr@2.0.5/node_modules/destr/dist/index.mjs","../../../../../../node_modules/.pnpm/ufo@1.6.3/node_modules/ufo/dist/index.mjs","../../../../../../node_modules/.pnpm/radix3@1.1.2/node_modules/radix3/dist/index.mjs","../../../../../../node_modules/.pnpm/defu@6.1.7/node_modules/defu/dist/defu.mjs","../../../../../../node_modules/.pnpm/node-mock-http@1.0.4/node_modules/node-mock-http/dist/index.mjs","../../../../../../node_modules/.pnpm/h3@1.15.11/node_modules/h3/dist/index.mjs","../../../../../../node_modules/.pnpm/hookable@5.5.3/node_modules/hookable/dist/index.mjs","../../../../../../node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/native.mjs","../../../../../../node_modules/.pnpm/ofetch@1.5.1/node_modules/ofetch/dist/shared/ofetch.CWycOUEr.mjs","../../../../../../node_modules/.pnpm/ofetch@1.5.1/node_modules/ofetch/dist/node.mjs","../../../../../../node_modules/.pnpm/unstorage@1.17.5_db0@0.3.4_ioredis@5.10.1/node_modules/unstorage/dist/shared/unstorage.zVDD2mZo.mjs","../../../../../../node_modules/.pnpm/unstorage@1.17.5_db0@0.3.4_ioredis@5.10.1/node_modules/unstorage/dist/index.mjs","../../../../../../node_modules/.pnpm/unstorage@1.17.5_db0@0.3.4_ioredis@5.10.1/node_modules/unstorage/drivers/utils/index.mjs","../../../../../../node_modules/.pnpm/unstorage@1.17.5_db0@0.3.4_ioredis@5.10.1/node_modules/unstorage/drivers/utils/node-fs.mjs","../../../../../../node_modules/.pnpm/unstorage@1.17.5_db0@0.3.4_ioredis@5.10.1/node_modules/unstorage/drivers/fs.mjs","../../../../../../node_modules/.pnpm/unstorage@1.17.5_db0@0.3.4_ioredis@5.10.1/node_modules/unstorage/drivers/fs-lite.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.3_rolldown@1.0.0-rc.13/node_modules/nitropack/dist/runtime/internal/storage.mjs","../../../../../../node_modules/.pnpm/ohash@2.0.11/node_modules/ohash/dist/crypto/node/index.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.3_rolldown@1.0.0-rc.13/node_modules/nitropack/dist/runtime/internal/hash.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.3_rolldown@1.0.0-rc.13/node_modules/nitropack/dist/runtime/internal/cache.mjs","../../../../../../node_modules/.pnpm/klona@2.0.6/node_modules/klona/dist/index.mjs","../../../../../../node_modules/.pnpm/scule@1.3.0/node_modules/scule/dist/index.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.3_rolldown@1.0.0-rc.13/node_modules/nitropack/dist/runtime/internal/utils.env.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.3_rolldown@1.0.0-rc.13/node_modules/nitropack/dist/runtime/internal/config.mjs","../../../../../../node_modules/.pnpm/unctx@2.5.0/node_modules/unctx/dist/index.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.3_rolldown@1.0.0-rc.13/node_modules/nitropack/dist/runtime/internal/context.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.3_rolldown@1.0.0-rc.13/node_modules/nitropack/dist/runtime/internal/route-rules.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.3_rolldown@1.0.0-rc.13/node_modules/nitropack/dist/runtime/internal/utils.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.3_rolldown@1.0.0-rc.13/node_modules/nitropack/dist/runtime/internal/error/utils.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.3_rolldown@1.0.0-rc.13/node_modules/nitropack/dist/runtime/internal/error/prod.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.3_rolldown@1.0.0-rc.13/node_modules/nitropack/dist/runtime/internal/plugin.mjs","../../../../server/utils/logger.ts","../../../../server/plugins/fetch-logger.ts","../../../../../../internals/utils/dist/index.js","../../../../server/plugins/heartbeat.ts","../../../../server/utils/token.ts","../../../../server/utils/api.ts","../../../../../core/dist/chunk--u3MIqq1.js","../../../../../ast/dist/index.js","../../../../../renderer-jsx/dist/chunk-CErwXX-a.js","../../../../../renderer-jsx/dist/jsx-runtime-Dmf9wTKR.js","../../../../../renderer-jsx/dist/jsx-runtime.js","../../../../../core/dist/index.js","../../../../server/types/agent.ts","../../../../server/utils/agentCache.ts","../../../../server/utils/executeHooks.ts","../../../../server/utils/generate.ts","../../../../server/utils/getCosmiConfig.ts","../../../../server/utils/loadConfig.ts","../../../../../plugin-client/dist/chunk--u3MIqq1.js","../../../../../plugin-client/dist/templates/clients/axios.source.js","../../../../../plugin-client/dist/templates/clients/fetch.source.js","../../../../../plugin-client/dist/templates/config.source.js","../../../../../parser-ts/dist/index.js","../../../../../plugin-ts/dist/index.js","../../../../../plugin-zod/dist/index.js","../../../../../plugin-client/dist/index.js","../../../../../plugin-cypress/dist/index.js","../../../../../plugin-oas/dist/getFooter-Dz4u5Mg4.js","../../../../../plugin-oas/dist/generators-rtdUsxQh.js","../../../../../plugin-oas/dist/SchemaMapper-CqMkO2T1.js","../../../../../oas/dist/index.js","../../../../../plugin-oas/dist/requestBody-DMoaqEak.js","../../../../../plugin-oas/dist/index.js","../../../../../plugin-faker/dist/components-DzZNbRMe.js","../../../../../core/dist/hooks.js","../../../../../plugin-oas/dist/hooks.js","../../../../../plugin-oas/dist/utils.js","../../../../../plugin-faker/dist/fakerGenerator-D1ChcsJA.js","../../../../../plugin-faker/dist/index.js","../../../../../plugin-mcp/dist/index.js","../../../../../plugin-msw/dist/components-Byt2Wxj7.js","../../../../../plugin-msw/dist/generators-DKlvvESf.js","../../../../../plugin-msw/dist/index.js","../../../../../plugin-react-query/dist/chunk--u3MIqq1.js","../../../../../plugin-react-query/dist/components-DTiE-FKc.js","../../../../../plugin-react-query/dist/generators-DnnpkRmx.js","../../../../../plugin-react-query/dist/index.js","../../../../../adapter-oas/dist/index.js","../../../../../plugin-redoc/dist/index.js","../../../../../plugin-solid-query/dist/chunk--u3MIqq1.js","../../../../../plugin-solid-query/dist/components-TVdJQIeH.js","../../../../../plugin-solid-query/dist/generators-2qki_Vv_.js","../../../../../plugin-solid-query/dist/index.js","../../../../../plugin-svelte-query/dist/chunk--u3MIqq1.js","../../../../../plugin-svelte-query/dist/components-C6gr397C.js","../../../../../plugin-svelte-query/dist/generators-D1JxKDfk.js","../../../../../plugin-svelte-query/dist/index.js","../../../../../plugin-swr/dist/chunk--u3MIqq1.js","../../../../../plugin-swr/dist/components-DaCTPplv.js","../../../../../plugin-swr/dist/generators-0YayIrse.js","../../../../../plugin-swr/dist/index.js","../../../../../plugin-vue-query/dist/chunk--u3MIqq1.js","../../../../../plugin-vue-query/dist/components-Dtcq349-.js","../../../../../plugin-vue-query/dist/generators-X60LXmf_.js","../../../../../plugin-vue-query/dist/index.js","../../../../server/utils/resolvePlugins.ts","../../../../server/utils/mergePlugins.ts","../../../../server/utils/publish.ts","../../../../server/utils/setupHookListener.ts","../../../../server/utils/ws.ts","../../../../server/utils/connectStudio.ts","../../../../server/plugins/studio.ts","../../../../../../node_modules/.pnpm/nitropack@2.13.3_rolldown@1.0.0-rc.13/node_modules/nitropack/dist/runtime/internal/app.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.3_rolldown@1.0.0-rc.13/node_modules/nitropack/dist/runtime/internal/lib/http-graceful-shutdown.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.3_rolldown@1.0.0-rc.13/node_modules/nitropack/dist/runtime/internal/shutdown.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.3_rolldown@1.0.0-rc.13/node_modules/nitropack/dist/presets/node/runtime/node-server.mjs"],"names":["createRouter","f","h","i","l","createError","mergeHeaders","s","nodeFetch","Headers","Headers$1","AbortController$1","stringify","normalizeKey","defineDriver","DRIVER_NAME","createStorage","fsPromises","PATH_TRAVERSE_RE","fsp","snakeCase","_inlineAppConfig","createRadixRouter","formatMs","_a","process","__defProp","__name","toCamelOrPascal","applyToFileParts","camelCase","trimExtName","isValidVarName","path","exports","__privateAdd","__privateGet","pascalCase","readFile","writeFile","URLPath","_b","_URLPath_instances","__publicField","_options","__privateSet","__privateMethod","transformParam_fn","eachParam_fn","match","resolve","_c","extname","build","walk","readdir","version$1","version","item","_d","_e","_f","_g","_h","key","name","parsedItem","composeTransformers$1","error","source","factory","trimQuotes","jsStringEscape","modifiers","questionToken","node","transform","options","buildGroupedParamsSchema","buildLegacyResponsesSchemaNode","buildLegacyResponseUnionSchemaNode","presets","toRegExpString","Operations","Type","getComments","getParams$2","getParams$1","getParams","declarationPrinter$1","declarationPrinter","source$2","isPlainObject","parse","loadConfig","schema","params","_context","schemas","normalizedSchema","min","max","validate","oas","Function","Response","getNestedAccessor","getTransformer$1","MutationKey","getParams$9","getTransformer","QueryKey","getParams$8","QueryOptions","getParams$7","InfiniteQuery","getParams$6","InfiniteQueryOptions","getParams$5","getParams$4","Mutation","getParams$3","Query","operations","infiniteQueryGenerator","mutationGenerator","queryGenerator","__filename","__dirname","generics","nitroApp","callNodeRequestHandler","fetchNodeRequestHandler","gracefulShutdown","HttpsServer","HttpServer"],"mappings":"","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,103,104,105,106]}
|
|
1
|
+
{"version":3,"file":"nitro.mjs","sources":["../../../../../../node_modules/.pnpm/destr@2.0.5/node_modules/destr/dist/index.mjs","../../../../../../node_modules/.pnpm/ufo@1.6.3/node_modules/ufo/dist/index.mjs","../../../../../../node_modules/.pnpm/radix3@1.1.2/node_modules/radix3/dist/index.mjs","../../../../../../node_modules/.pnpm/defu@6.1.7/node_modules/defu/dist/defu.mjs","../../../../../../node_modules/.pnpm/node-mock-http@1.0.4/node_modules/node-mock-http/dist/index.mjs","../../../../../../node_modules/.pnpm/h3@1.15.11/node_modules/h3/dist/index.mjs","../../../../../../node_modules/.pnpm/hookable@5.5.3/node_modules/hookable/dist/index.mjs","../../../../../../node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/native.mjs","../../../../../../node_modules/.pnpm/ofetch@1.5.1/node_modules/ofetch/dist/shared/ofetch.CWycOUEr.mjs","../../../../../../node_modules/.pnpm/ofetch@1.5.1/node_modules/ofetch/dist/node.mjs","../../../../../../node_modules/.pnpm/unstorage@1.17.5_db0@0.3.4_ioredis@5.10.1/node_modules/unstorage/dist/shared/unstorage.zVDD2mZo.mjs","../../../../../../node_modules/.pnpm/unstorage@1.17.5_db0@0.3.4_ioredis@5.10.1/node_modules/unstorage/dist/index.mjs","../../../../../../node_modules/.pnpm/unstorage@1.17.5_db0@0.3.4_ioredis@5.10.1/node_modules/unstorage/drivers/utils/index.mjs","../../../../../../node_modules/.pnpm/unstorage@1.17.5_db0@0.3.4_ioredis@5.10.1/node_modules/unstorage/drivers/utils/node-fs.mjs","../../../../../../node_modules/.pnpm/unstorage@1.17.5_db0@0.3.4_ioredis@5.10.1/node_modules/unstorage/drivers/fs.mjs","../../../../../../node_modules/.pnpm/unstorage@1.17.5_db0@0.3.4_ioredis@5.10.1/node_modules/unstorage/drivers/fs-lite.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.3_rolldown@1.0.0-rc.16/node_modules/nitropack/dist/runtime/internal/storage.mjs","../../../../../../node_modules/.pnpm/ohash@2.0.11/node_modules/ohash/dist/crypto/node/index.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.3_rolldown@1.0.0-rc.16/node_modules/nitropack/dist/runtime/internal/hash.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.3_rolldown@1.0.0-rc.16/node_modules/nitropack/dist/runtime/internal/cache.mjs","../../../../../../node_modules/.pnpm/klona@2.0.6/node_modules/klona/dist/index.mjs","../../../../../../node_modules/.pnpm/scule@1.3.0/node_modules/scule/dist/index.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.3_rolldown@1.0.0-rc.16/node_modules/nitropack/dist/runtime/internal/utils.env.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.3_rolldown@1.0.0-rc.16/node_modules/nitropack/dist/runtime/internal/config.mjs","../../../../../../node_modules/.pnpm/unctx@2.5.0/node_modules/unctx/dist/index.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.3_rolldown@1.0.0-rc.16/node_modules/nitropack/dist/runtime/internal/context.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.3_rolldown@1.0.0-rc.16/node_modules/nitropack/dist/runtime/internal/route-rules.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.3_rolldown@1.0.0-rc.16/node_modules/nitropack/dist/runtime/internal/utils.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.3_rolldown@1.0.0-rc.16/node_modules/nitropack/dist/runtime/internal/error/utils.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.3_rolldown@1.0.0-rc.16/node_modules/nitropack/dist/runtime/internal/error/prod.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.3_rolldown@1.0.0-rc.16/node_modules/nitropack/dist/runtime/internal/plugin.mjs","../../../../server/utils/logger.ts","../../../../server/plugins/fetch-logger.ts","../../../../../../internals/utils/dist/index.js","../../../../server/plugins/heartbeat.ts","../../../../server/utils/token.ts","../../../../server/utils/api.ts","../../../../../core/dist/chunk--u3MIqq1.js","../../../../../ast/dist/index.js","../../../../../core/dist/index.js","../../../../server/types/agent.ts","../../../../server/utils/agentCache.ts","../../../../server/utils/executeHooks.ts","../../../../server/utils/generate.ts","../../../../server/utils/getCosmiConfig.ts","../../../../server/utils/loadConfig.ts","../../../../../plugin-client/dist/chunk--u3MIqq1.js","../../../../../plugin-client/dist/templates/clients/axios.source.js","../../../../../plugin-client/dist/templates/clients/fetch.source.js","../../../../../plugin-client/dist/templates/config.source.js","../../../../../parser-ts/dist/index.js","../../../../../renderer-jsx/dist/chunk-Bb7HlUDG.js","../../../../../renderer-jsx/dist/jsx-runtime-7z5lYBqC.js","../../../../../renderer-jsx/dist/jsx-runtime.js","../../../../../plugin-ts/dist/index.js","../../../../../plugin-zod/dist/index.js","../../../../../plugin-client/dist/index.js","../../../../../plugin-cypress/dist/index.js","../../../../../plugin-oas/dist/getFooter-Dz4u5Mg4.js","../../../../../plugin-oas/dist/generators-B463zQ70.js","../../../../../plugin-oas/dist/SchemaMapper-CqMkO2T1.js","../../../../../oas/dist/index.js","../../../../../plugin-oas/dist/requestBody-Bpo1Fgv0.js","../../../../../plugin-oas/dist/index.js","../../../../../plugin-faker/dist/components-DzZNbRMe.js","../../../../../core/dist/hooks.js","../../../../../plugin-oas/dist/hooks.js","../../../../../plugin-oas/dist/utils.js","../../../../../plugin-faker/dist/fakerGenerator-D0Fv0vzw.js","../../../../../plugin-faker/dist/index.js","../../../../../plugin-mcp/dist/index.js","../../../../../plugin-msw/dist/components-Byt2Wxj7.js","../../../../../plugin-msw/dist/generators-DKlvvESf.js","../../../../../plugin-msw/dist/index.js","../../../../../plugin-react-query/dist/chunk--u3MIqq1.js","../../../../../plugin-react-query/dist/components-DTiE-FKc.js","../../../../../plugin-react-query/dist/generators-DnnpkRmx.js","../../../../../plugin-react-query/dist/index.js","../../../../../adapter-oas/dist/index.js","../../../../../plugin-redoc/dist/index.js","../../../../../plugin-solid-query/dist/chunk--u3MIqq1.js","../../../../../plugin-solid-query/dist/components-TVdJQIeH.js","../../../../../plugin-solid-query/dist/generators-2qki_Vv_.js","../../../../../plugin-solid-query/dist/index.js","../../../../../plugin-svelte-query/dist/chunk--u3MIqq1.js","../../../../../plugin-svelte-query/dist/components-C6gr397C.js","../../../../../plugin-svelte-query/dist/generators-D1JxKDfk.js","../../../../../plugin-svelte-query/dist/index.js","../../../../../plugin-swr/dist/chunk--u3MIqq1.js","../../../../../plugin-swr/dist/components-JQ2KRFCa.js","../../../../../plugin-swr/dist/generators-Cl7nr-FB.js","../../../../../plugin-swr/dist/index.js","../../../../../plugin-vue-query/dist/chunk--u3MIqq1.js","../../../../../plugin-vue-query/dist/components-Dtcq349-.js","../../../../../plugin-vue-query/dist/generators-X60LXmf_.js","../../../../../plugin-vue-query/dist/index.js","../../../../server/utils/resolvePlugins.ts","../../../../server/utils/mergePlugins.ts","../../../../server/utils/publish.ts","../../../../server/utils/setupHookListener.ts","../../../../server/utils/ws.ts","../../../../server/utils/connectStudio.ts","../../../../server/plugins/studio.ts","../../../../../../node_modules/.pnpm/nitropack@2.13.3_rolldown@1.0.0-rc.16/node_modules/nitropack/dist/runtime/internal/app.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.3_rolldown@1.0.0-rc.16/node_modules/nitropack/dist/runtime/internal/lib/http-graceful-shutdown.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.3_rolldown@1.0.0-rc.16/node_modules/nitropack/dist/runtime/internal/shutdown.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.3_rolldown@1.0.0-rc.16/node_modules/nitropack/dist/presets/node/runtime/node-server.mjs"],"names":["createRouter","f","h","i","l","createError","mergeHeaders","s","nodeFetch","Headers","Headers$1","AbortController$1","stringify","normalizeKey","defineDriver","DRIVER_NAME","createStorage","fsPromises","PATH_TRAVERSE_RE","fsp","snakeCase","_inlineAppConfig","createRadixRouter","formatMs","_a","process","__defProp","__name","toCamelOrPascal","applyToFileParts","camelCase","trimExtName","isValidVarName","buildGroupParam","path","exports","__publicField","__privateAdd","__privateGet","pascalCase","readFile","writeFile","URLPath","_b","_URLPath_instances","_options","__privateSet","__privateMethod","transformParam_fn","eachParam_fn","match","resolve","extname","version","build","_c","walk","readdir","version$1","item","_d","_e","_f","_g","_h","_i","error","key","name","parsedItem","source","factory","trimQuotes","jsStringEscape","modifiers","questionToken","ast.syncSchemaRef","ast.collect","ast.narrowSchema","ast.schemaTypes","node","ast.createSchema","ast.createProperty","ast.extractRefName","ast.isStringType","options","ast.caseParams","buildGroupedParamsSchema","buildLegacyResponsesSchemaNode","buildLegacyResponseUnionSchemaNode","ast.transform","ast.createPrinterFactory","toRegExpString","Operations","Type","getComments","declarationPrinter$3","getParams$2","ast.createOperationParams","declarationPrinter$2","getParams$1","ast.createFunctionParameter","ast.createParamsType","getParams","declarationPrinter$1","declarationPrinter","ast.createSource","ast.createText","source$2","isPlainObject","parse","loadConfig","schema","params","_context","schemas","normalizedSchema","min","max","validate","oas","Function","ast.createImport","keysPrinter","ast.createFunctionParameters","ast.createParameterGroup","Response","getNestedAccessor","getTransformer$1","MutationKey","getParams$9","getTransformer","QueryKey","getParams$8","QueryOptions","getParams$7","InfiniteQuery","getParams$6","InfiniteQueryOptions","getParams$5","getParams$4","Mutation","getParams$3","Query","operations","infiniteQueryGenerator","mutationGenerator","queryGenerator","ast.createFile","__filename","__dirname","paramsNode","paramsSignature","generics","nitroApp","callNodeRequestHandler","fetchNodeRequestHandler","gracefulShutdown","HttpsServer","HttpServer"],"mappings":"","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,103,104,105,106]}
|
|
@@ -18,11 +18,11 @@ import 'node:fs/promises';
|
|
|
18
18
|
import 'node:perf_hooks';
|
|
19
19
|
import 'fflate';
|
|
20
20
|
import 'tinyexec';
|
|
21
|
-
import '@kubb/renderer-jsx';
|
|
22
21
|
import 'remeda';
|
|
23
22
|
import 'node:util';
|
|
24
23
|
import 'jiti';
|
|
25
24
|
import 'typescript';
|
|
25
|
+
import '@kubb/renderer-jsx';
|
|
26
26
|
import 'jsonpointer';
|
|
27
27
|
import 'oas';
|
|
28
28
|
import 'oas/utils';
|
package/.output/server/index.mjs
CHANGED
|
@@ -18,11 +18,11 @@ import 'node:fs/promises';
|
|
|
18
18
|
import 'node:perf_hooks';
|
|
19
19
|
import 'fflate';
|
|
20
20
|
import 'tinyexec';
|
|
21
|
-
import '@kubb/renderer-jsx';
|
|
22
21
|
import 'remeda';
|
|
23
22
|
import 'node:util';
|
|
24
23
|
import 'jiti';
|
|
25
24
|
import 'typescript';
|
|
25
|
+
import '@kubb/renderer-jsx';
|
|
26
26
|
import 'jsonpointer';
|
|
27
27
|
import 'oas';
|
|
28
28
|
import 'oas/utils';
|
|
@@ -121,6 +121,7 @@ exports.rbacScopeItemsSchema = {
|
|
|
121
121
|
exports.bannerConfigSchema = {
|
|
122
122
|
type: 'object',
|
|
123
123
|
properties: {
|
|
124
|
+
trackingId: { type: 'string' },
|
|
124
125
|
content: { type: 'string' },
|
|
125
126
|
dismissible: { type: 'boolean', default: false },
|
|
126
127
|
target: { type: 'string' },
|
|
@@ -563,7 +564,16 @@ exports.redoclyConfigSchema = {
|
|
|
563
564
|
/**
|
|
564
565
|
* @deprecated Should use `scorecardClassic` instead
|
|
565
566
|
*/
|
|
566
|
-
scorecard: ex_theme_config_schemas_1.scorecardConfigSchema, scorecardClassic: ex_theme_config_schemas_1.scorecardConfigSchema, scorecards: scorecards_config_schema_1.scorecardsConfigSchema, mcp: mcpConfigSchema,
|
|
567
|
+
scorecard: ex_theme_config_schemas_1.scorecardConfigSchema, scorecardClassic: ex_theme_config_schemas_1.scorecardConfigSchema, scorecards: scorecards_config_schema_1.scorecardsConfigSchema, mcp: mcpConfigSchema, corsProxy: {
|
|
568
|
+
type: 'object',
|
|
569
|
+
properties: {
|
|
570
|
+
allowedTargets: {
|
|
571
|
+
type: 'array',
|
|
572
|
+
items: { type: 'string' },
|
|
573
|
+
},
|
|
574
|
+
},
|
|
575
|
+
additionalProperties: false,
|
|
576
|
+
}, banner: exports.bannersConfigSchema }),
|
|
567
577
|
default: { redirects: {}, seo: exports.seoConfigSchema.default },
|
|
568
578
|
additionalProperties: true,
|
|
569
579
|
};
|
|
@@ -22,15 +22,6 @@ export async function bundleDocument(opts) {
|
|
|
22
22
|
refTypes: new Map(),
|
|
23
23
|
visitorsData: {},
|
|
24
24
|
};
|
|
25
|
-
if (removeUnusedComponents && !decorators.some((d) => d.ruleId === 'remove-unused-components')) {
|
|
26
|
-
decorators.push({
|
|
27
|
-
severity: 'error',
|
|
28
|
-
ruleId: 'remove-unused-components',
|
|
29
|
-
visitor: specMajorVersion === 'oas2'
|
|
30
|
-
? RemoveUnusedComponentsOas2({})
|
|
31
|
-
: RemoveUnusedComponentsOas3({}),
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
25
|
let resolvedRefMap = await resolveDocument({
|
|
35
26
|
rootDocument: document,
|
|
36
27
|
rootType: normalizedTypes.Root,
|
|
@@ -64,7 +55,7 @@ export async function bundleDocument(opts) {
|
|
|
64
55
|
componentRenamingConflicts,
|
|
65
56
|
}),
|
|
66
57
|
},
|
|
67
|
-
...decorators,
|
|
58
|
+
...decorators.filter((decorator) => decorator.ruleId !== 'remove-unused-components'),
|
|
68
59
|
], normalizedTypes);
|
|
69
60
|
walkDocument({
|
|
70
61
|
document,
|
|
@@ -73,6 +64,30 @@ export async function bundleDocument(opts) {
|
|
|
73
64
|
resolvedRefMap,
|
|
74
65
|
ctx,
|
|
75
66
|
});
|
|
67
|
+
if (removeUnusedComponents ||
|
|
68
|
+
config.getDecoratorSettings('remove-unused-components', specVersion).severity !== 'off') {
|
|
69
|
+
const postBundleRefMap = await resolveDocument({
|
|
70
|
+
rootDocument: document,
|
|
71
|
+
rootType: normalizedTypes.Root,
|
|
72
|
+
externalRefResolver,
|
|
73
|
+
});
|
|
74
|
+
const postBundleVisitors = normalizeVisitors([
|
|
75
|
+
{
|
|
76
|
+
severity: 'error',
|
|
77
|
+
ruleId: 'remove-unused-components',
|
|
78
|
+
visitor: specMajorVersion === 'oas2'
|
|
79
|
+
? RemoveUnusedComponentsOas2({})
|
|
80
|
+
: RemoveUnusedComponentsOas3({}),
|
|
81
|
+
},
|
|
82
|
+
], normalizedTypes);
|
|
83
|
+
walkDocument({
|
|
84
|
+
document,
|
|
85
|
+
rootType: normalizedTypes.Root,
|
|
86
|
+
normalizedVisitors: postBundleVisitors,
|
|
87
|
+
resolvedRefMap: postBundleRefMap,
|
|
88
|
+
ctx,
|
|
89
|
+
});
|
|
90
|
+
}
|
|
76
91
|
return {
|
|
77
92
|
bundle: document,
|
|
78
93
|
problems: ctx.problems.map((problem) => config.addProblemToIgnore(problem)),
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { isAbsoluteUrl, replaceRef, isExternalValue, isRef, refBaseName, } from '../ref-utils.js';
|
|
1
|
+
import { isAbsoluteUrl, replaceRef, isExternalValue, isRef, pointerBaseName, refBaseName, isMappingRef, } from '../ref-utils.js';
|
|
2
2
|
import { reportUnresolvedRef } from '../rules/common/no-unresolved-refs.js';
|
|
3
3
|
import { dequal } from '../utils/dequal.js';
|
|
4
|
-
import { isTruthy } from '../utils/is-truthy.js';
|
|
5
4
|
import { makeRefId } from '../utils/make-ref-id.js';
|
|
6
5
|
export function mapTypeToComponent(typeName, version) {
|
|
7
6
|
switch (version) {
|
|
@@ -173,18 +172,35 @@ export function makeBundleVisitor({ version, dereference, rootDocument, resolved
|
|
|
173
172
|
},
|
|
174
173
|
};
|
|
175
174
|
if (version === 'oas3') {
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
175
|
+
const componentType = mapTypeToComponent('Schema', version);
|
|
176
|
+
visitor.Discriminator = {
|
|
177
|
+
leave(discriminator, ctx) {
|
|
178
|
+
if (typeof discriminator.defaultMapping !== 'string' ||
|
|
179
|
+
!isMappingRef(discriminator.defaultMapping)) {
|
|
180
|
+
return;
|
|
181
|
+
}
|
|
182
|
+
const resolved = ctx.resolve({ $ref: discriminator.defaultMapping });
|
|
183
|
+
if (!resolved.location || resolved.node === undefined) {
|
|
184
|
+
reportUnresolvedRef(resolved, ctx.report, ctx.location.child('defaultMapping'));
|
|
185
|
+
return;
|
|
187
186
|
}
|
|
187
|
+
discriminator.defaultMapping = saveComponent(componentType, resolved, ctx);
|
|
188
|
+
},
|
|
189
|
+
DiscriminatorMapping: {
|
|
190
|
+
leave(mapping, ctx) {
|
|
191
|
+
for (const name of Object.keys(mapping)) {
|
|
192
|
+
const $ref = mapping[name];
|
|
193
|
+
if (!isMappingRef($ref)) {
|
|
194
|
+
continue;
|
|
195
|
+
}
|
|
196
|
+
const resolved = ctx.resolve({ $ref });
|
|
197
|
+
if (!resolved.location || resolved.node === undefined) {
|
|
198
|
+
reportUnresolvedRef(resolved, ctx.report, ctx.location.child(name));
|
|
199
|
+
return;
|
|
200
|
+
}
|
|
201
|
+
mapping[name] = saveComponent(componentType, resolved, ctx);
|
|
202
|
+
}
|
|
203
|
+
},
|
|
188
204
|
},
|
|
189
205
|
};
|
|
190
206
|
}
|
|
@@ -221,29 +237,16 @@ export function makeBundleVisitor({ version, dereference, rootDocument, resolved
|
|
|
221
237
|
return dequal(node, target.node);
|
|
222
238
|
}
|
|
223
239
|
function getComponentName(target, componentType, ctx) {
|
|
224
|
-
const [fileRef, pointer] = [target.location.source.absoluteRef, target.location.pointer];
|
|
225
240
|
const componentsGroup = components[componentType];
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
while (refParts.length > 0) {
|
|
229
|
-
name = refParts.pop() + (name ? `-${name}` : '');
|
|
230
|
-
if (!componentsGroup ||
|
|
231
|
-
!componentsGroup[name] ||
|
|
232
|
-
isEqualOrEqualRef(componentsGroup[name], target, ctx)) {
|
|
233
|
-
return name;
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
|
-
name = refBaseName(fileRef) + (name ? `_${name}` : '');
|
|
237
|
-
if (!componentsGroup[name] || isEqualOrEqualRef(componentsGroup[name], target, ctx)) {
|
|
238
|
-
return name;
|
|
239
|
-
}
|
|
241
|
+
const [fileRef, pointer] = [target.location.source.absoluteRef, target.location.pointer];
|
|
242
|
+
let name = pointerBaseName(pointer) || refBaseName(fileRef);
|
|
240
243
|
const prevName = name;
|
|
241
244
|
let serialId = 2;
|
|
242
245
|
while (componentsGroup[name] && !isEqualOrEqualRef(componentsGroup[name], target, ctx)) {
|
|
243
246
|
name = `${prevName}-${serialId}`;
|
|
244
247
|
serialId++;
|
|
245
248
|
}
|
|
246
|
-
if (!componentsGroup[name]) {
|
|
249
|
+
if (!componentsGroup[name] && prevName !== name) {
|
|
247
250
|
ctx.report({
|
|
248
251
|
message: `Two schemas are referenced with the same name but different content. Renamed ${prevName} to ${name}.`,
|
|
249
252
|
location: ctx.location,
|
|
@@ -104,6 +104,11 @@ export class Config {
|
|
|
104
104
|
ignore: this.ignore,
|
|
105
105
|
});
|
|
106
106
|
}
|
|
107
|
+
clearIgnoreForRef(ref) {
|
|
108
|
+
const dir = this.configPath ? path.dirname(this.configPath) : process.cwd();
|
|
109
|
+
const absRef = isAbsoluteUrl(ref) ? ref : path.resolve(dir, ref);
|
|
110
|
+
delete this.ignore[absRef];
|
|
111
|
+
}
|
|
107
112
|
saveIgnore() {
|
|
108
113
|
const dir = this.configPath ? path.dirname(this.configPath) : process.cwd();
|
|
109
114
|
const ignoreFile = path.join(dir, IGNORE_FILE);
|
|
@@ -14,6 +14,6 @@ export const decorators = {
|
|
|
14
14
|
'remove-x-internal': RemoveXInternal,
|
|
15
15
|
'filter-in': FilterIn,
|
|
16
16
|
'filter-out': FilterOut,
|
|
17
|
-
'remove-unused-components': RemoveUnusedComponents,
|
|
17
|
+
'remove-unused-components': RemoveUnusedComponents,
|
|
18
18
|
};
|
|
19
19
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,54 +1,63 @@
|
|
|
1
|
+
import { parseRef } from '../../ref-utils.js';
|
|
1
2
|
import { isEmptyObject } from '../../utils/is-empty-object.js';
|
|
3
|
+
const OAS2_COMPONENT_TYPES = [
|
|
4
|
+
'definitions',
|
|
5
|
+
'parameters',
|
|
6
|
+
'responses',
|
|
7
|
+
'securityDefinitions',
|
|
8
|
+
];
|
|
2
9
|
export const RemoveUnusedComponents = () => {
|
|
3
10
|
const components = new Map();
|
|
4
|
-
function registerComponent(
|
|
5
|
-
|
|
6
|
-
|
|
11
|
+
function registerComponent(componentType, name) {
|
|
12
|
+
const key = `${componentType}/${name}`;
|
|
13
|
+
components.set(key, {
|
|
14
|
+
usedIn: components.get(key)?.usedIn ?? [],
|
|
7
15
|
componentType,
|
|
8
16
|
name,
|
|
9
17
|
});
|
|
10
18
|
}
|
|
11
|
-
function
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
19
|
+
function getComponentKey(pointer) {
|
|
20
|
+
if (!pointer.startsWith('#/'))
|
|
21
|
+
return;
|
|
22
|
+
const [type, name] = parseRef(pointer).pointer;
|
|
23
|
+
if (!type || !name)
|
|
24
|
+
return undefined;
|
|
25
|
+
if (!OAS2_COMPONENT_TYPES.includes(type))
|
|
26
|
+
return undefined;
|
|
27
|
+
return `${type}/${name}`;
|
|
28
|
+
}
|
|
29
|
+
function removeUnusedComponents(root, removedKeys = new Set()) {
|
|
30
|
+
const removedCountBefore = removedKeys.size;
|
|
31
|
+
for (const [key, { usedIn, name, componentType }] of components) {
|
|
32
|
+
const used = usedIn.some((sourceKey) => sourceKey !== key && !removedKeys.has(sourceKey));
|
|
20
33
|
if (!used && componentType) {
|
|
21
|
-
|
|
34
|
+
removedKeys.add(key);
|
|
22
35
|
delete root[componentType][name];
|
|
23
|
-
components.delete(
|
|
36
|
+
components.delete(key);
|
|
24
37
|
if (isEmptyObject(root[componentType])) {
|
|
25
38
|
delete root[componentType];
|
|
26
39
|
}
|
|
27
40
|
}
|
|
28
41
|
}
|
|
29
|
-
return
|
|
30
|
-
? removeUnusedComponents(root,
|
|
31
|
-
:
|
|
42
|
+
return removedKeys.size > removedCountBefore
|
|
43
|
+
? removeUnusedComponents(root, removedKeys)
|
|
44
|
+
: removedKeys.size;
|
|
32
45
|
}
|
|
33
46
|
return {
|
|
34
47
|
ref: {
|
|
35
|
-
leave(ref, { location, type,
|
|
48
|
+
leave(ref, { location, type, key }) {
|
|
36
49
|
if (['Schema', 'Parameter', 'Response', 'SecurityScheme'].includes(type.name)) {
|
|
37
|
-
const
|
|
38
|
-
if (!
|
|
39
|
-
return;
|
|
40
|
-
const [fileLocation, localPointer] = resolvedRef.location.absolutePointer.split('#', 2);
|
|
41
|
-
if (!localPointer)
|
|
50
|
+
const targetPointer = getComponentKey(ref.$ref);
|
|
51
|
+
if (!targetPointer)
|
|
42
52
|
return;
|
|
43
|
-
const
|
|
44
|
-
const
|
|
45
|
-
const registered = components.get(pointer);
|
|
53
|
+
const sourcePointer = getComponentKey(location.pointer) ?? location.pointer;
|
|
54
|
+
const registered = components.get(targetPointer);
|
|
46
55
|
if (registered) {
|
|
47
|
-
registered.usedIn.push(
|
|
56
|
+
registered.usedIn.push(sourcePointer);
|
|
48
57
|
}
|
|
49
58
|
else {
|
|
50
|
-
components.set(
|
|
51
|
-
usedIn: [
|
|
59
|
+
components.set(targetPointer, {
|
|
60
|
+
usedIn: [sourcePointer],
|
|
52
61
|
name: key.toString(),
|
|
53
62
|
});
|
|
54
63
|
}
|
|
@@ -58,29 +67,29 @@ export const RemoveUnusedComponents = () => {
|
|
|
58
67
|
Root: {
|
|
59
68
|
leave(root, ctx) {
|
|
60
69
|
const data = ctx.getVisitorData();
|
|
61
|
-
data.removedCount = removeUnusedComponents(root
|
|
70
|
+
data.removedCount = removeUnusedComponents(root);
|
|
62
71
|
},
|
|
63
72
|
},
|
|
64
73
|
NamedSchemas: {
|
|
65
|
-
Schema(schema, {
|
|
74
|
+
Schema(schema, { key }) {
|
|
66
75
|
if (!schema.allOf) {
|
|
67
|
-
registerComponent(
|
|
76
|
+
registerComponent('definitions', key.toString());
|
|
68
77
|
}
|
|
69
78
|
},
|
|
70
79
|
},
|
|
71
80
|
NamedParameters: {
|
|
72
|
-
Parameter(_parameter, {
|
|
73
|
-
registerComponent(
|
|
81
|
+
Parameter(_parameter, { key }) {
|
|
82
|
+
registerComponent('parameters', key.toString());
|
|
74
83
|
},
|
|
75
84
|
},
|
|
76
85
|
NamedResponses: {
|
|
77
|
-
Response(_response, {
|
|
78
|
-
registerComponent(
|
|
86
|
+
Response(_response, { key }) {
|
|
87
|
+
registerComponent('responses', key.toString());
|
|
79
88
|
},
|
|
80
89
|
},
|
|
81
90
|
NamedSecuritySchemes: {
|
|
82
|
-
SecurityScheme(_securityScheme, {
|
|
83
|
-
registerComponent(
|
|
91
|
+
SecurityScheme(_securityScheme, { key }) {
|
|
92
|
+
registerComponent('securityDefinitions', key.toString());
|
|
84
93
|
},
|
|
85
94
|
},
|
|
86
95
|
};
|
|
@@ -16,6 +16,6 @@ export const decorators = {
|
|
|
16
16
|
'filter-in': FilterIn,
|
|
17
17
|
'filter-out': FilterOut,
|
|
18
18
|
'media-type-examples-override': MediaTypeExamplesOverride,
|
|
19
|
-
'remove-unused-components': RemoveUnusedComponents,
|
|
19
|
+
'remove-unused-components': RemoveUnusedComponents,
|
|
20
20
|
};
|
|
21
21
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,40 +1,48 @@
|
|
|
1
|
+
import { parseRef } from '../../ref-utils.js';
|
|
1
2
|
import { isEmptyObject } from '../../utils/is-empty-object.js';
|
|
2
3
|
import { hasComponent } from '../../utils/oas-has-component.js';
|
|
4
|
+
function getComponentKey(pointer) {
|
|
5
|
+
if (!pointer.startsWith('#/components/'))
|
|
6
|
+
return;
|
|
7
|
+
const [_component, type, name] = parseRef(pointer).pointer;
|
|
8
|
+
if (!type || !name)
|
|
9
|
+
return;
|
|
10
|
+
return `${type}/${name}`;
|
|
11
|
+
}
|
|
3
12
|
export const RemoveUnusedComponents = () => {
|
|
4
13
|
const components = new Map();
|
|
5
|
-
function registerComponent(
|
|
6
|
-
|
|
7
|
-
|
|
14
|
+
function registerComponent(componentType, name) {
|
|
15
|
+
const key = `${componentType}/${name}`;
|
|
16
|
+
components.set(key, {
|
|
17
|
+
usedIn: components.get(key)?.usedIn ?? [],
|
|
8
18
|
componentType,
|
|
9
19
|
name,
|
|
10
20
|
});
|
|
11
21
|
}
|
|
12
|
-
function removeUnusedComponents(root,
|
|
13
|
-
const
|
|
14
|
-
for (const [
|
|
15
|
-
const used = usedIn.some((
|
|
16
|
-
(location.absolutePointer.length === removed.length ||
|
|
17
|
-
location.absolutePointer[removed.length] === '/')));
|
|
22
|
+
function removeUnusedComponents(root, removedKeys = new Set()) {
|
|
23
|
+
const removedCountBefore = removedKeys.size;
|
|
24
|
+
for (const [key, { usedIn, name, componentType }] of components) {
|
|
25
|
+
const used = usedIn.some((sourceKey) => sourceKey !== key && !removedKeys.has(sourceKey));
|
|
18
26
|
if (!used &&
|
|
19
27
|
componentType &&
|
|
20
28
|
root.components &&
|
|
21
29
|
hasComponent(root.components, componentType)) {
|
|
22
|
-
|
|
30
|
+
removedKeys.add(key);
|
|
23
31
|
const componentChild = root.components[componentType];
|
|
24
32
|
delete componentChild[name];
|
|
25
|
-
components.delete(
|
|
33
|
+
components.delete(key);
|
|
26
34
|
if (isEmptyObject(componentChild)) {
|
|
27
35
|
delete root.components[componentType];
|
|
28
36
|
}
|
|
29
37
|
}
|
|
30
38
|
}
|
|
31
|
-
return
|
|
32
|
-
? removeUnusedComponents(root,
|
|
33
|
-
:
|
|
39
|
+
return removedKeys.size > removedCountBefore
|
|
40
|
+
? removeUnusedComponents(root, removedKeys)
|
|
41
|
+
: removedKeys.size;
|
|
34
42
|
}
|
|
35
43
|
return {
|
|
36
44
|
ref: {
|
|
37
|
-
leave(ref, { location, type,
|
|
45
|
+
leave(ref, { location, type, key }) {
|
|
38
46
|
if ([
|
|
39
47
|
'Schema',
|
|
40
48
|
'Header',
|
|
@@ -44,21 +52,17 @@ export const RemoveUnusedComponents = () => {
|
|
|
44
52
|
'RequestBody',
|
|
45
53
|
'MediaTypesMap',
|
|
46
54
|
].includes(type.name)) {
|
|
47
|
-
const
|
|
48
|
-
if (!
|
|
55
|
+
const targetPointer = getComponentKey(ref.$ref);
|
|
56
|
+
if (!targetPointer)
|
|
49
57
|
return;
|
|
50
|
-
const
|
|
51
|
-
|
|
52
|
-
return;
|
|
53
|
-
const componentLevelLocalPointer = localPointer.split('/').slice(0, 4).join('/');
|
|
54
|
-
const pointer = `${fileLocation}#${componentLevelLocalPointer}`;
|
|
55
|
-
const registered = components.get(pointer);
|
|
58
|
+
const sourcePointer = getComponentKey(location.pointer) ?? location.pointer;
|
|
59
|
+
const registered = components.get(targetPointer);
|
|
56
60
|
if (registered) {
|
|
57
|
-
registered.usedIn.push(
|
|
61
|
+
registered.usedIn.push(sourcePointer);
|
|
58
62
|
}
|
|
59
63
|
else {
|
|
60
|
-
components.set(
|
|
61
|
-
usedIn: [
|
|
64
|
+
components.set(targetPointer, {
|
|
65
|
+
usedIn: [sourcePointer],
|
|
62
66
|
name: key.toString(),
|
|
63
67
|
});
|
|
64
68
|
}
|
|
@@ -68,47 +72,47 @@ export const RemoveUnusedComponents = () => {
|
|
|
68
72
|
Root: {
|
|
69
73
|
leave(root, ctx) {
|
|
70
74
|
const data = ctx.getVisitorData();
|
|
71
|
-
data.removedCount = removeUnusedComponents(root
|
|
75
|
+
data.removedCount = removeUnusedComponents(root);
|
|
72
76
|
if (isEmptyObject(root.components)) {
|
|
73
77
|
delete root.components;
|
|
74
78
|
}
|
|
75
79
|
},
|
|
76
80
|
},
|
|
77
81
|
NamedSchemas: {
|
|
78
|
-
Schema(schema, {
|
|
82
|
+
Schema(schema, { key }) {
|
|
79
83
|
if (!schema.allOf) {
|
|
80
|
-
registerComponent(
|
|
84
|
+
registerComponent('schemas', key.toString());
|
|
81
85
|
}
|
|
82
86
|
},
|
|
83
87
|
},
|
|
84
88
|
NamedParameters: {
|
|
85
|
-
Parameter(_parameter, {
|
|
86
|
-
registerComponent(
|
|
89
|
+
Parameter(_parameter, { key }) {
|
|
90
|
+
registerComponent('parameters', key.toString());
|
|
87
91
|
},
|
|
88
92
|
},
|
|
89
93
|
NamedResponses: {
|
|
90
|
-
Response(_response, {
|
|
91
|
-
registerComponent(
|
|
94
|
+
Response(_response, { key }) {
|
|
95
|
+
registerComponent('responses', key.toString());
|
|
92
96
|
},
|
|
93
97
|
},
|
|
94
98
|
NamedExamples: {
|
|
95
|
-
Example(_example, {
|
|
96
|
-
registerComponent(
|
|
99
|
+
Example(_example, { key }) {
|
|
100
|
+
registerComponent('examples', key.toString());
|
|
97
101
|
},
|
|
98
102
|
},
|
|
99
103
|
NamedRequestBodies: {
|
|
100
|
-
RequestBody(_requestBody, {
|
|
101
|
-
registerComponent(
|
|
104
|
+
RequestBody(_requestBody, { key }) {
|
|
105
|
+
registerComponent('requestBodies', key.toString());
|
|
102
106
|
},
|
|
103
107
|
},
|
|
104
108
|
NamedHeaders: {
|
|
105
|
-
Header(_header, {
|
|
106
|
-
registerComponent(
|
|
109
|
+
Header(_header, { key }) {
|
|
110
|
+
registerComponent('headers', key.toString());
|
|
107
111
|
},
|
|
108
112
|
},
|
|
109
113
|
NamedMediaTypes: {
|
|
110
|
-
MediaTypesMap(_mediaTypesMap, {
|
|
111
|
-
registerComponent(
|
|
114
|
+
MediaTypesMap(_mediaTypesMap, { key }) {
|
|
115
|
+
registerComponent('mediaTypes', key.toString());
|
|
112
116
|
},
|
|
113
117
|
},
|
|
114
118
|
};
|
package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/no-http-verbs-in-paths.js
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { isPathParameter } from '../../utils/is-path-parameter.js';
|
|
2
2
|
import { splitCamelCaseIntoWords } from '../../utils/split-camel-case-into-words.js';
|
|
3
3
|
const httpMethods = ['get', 'head', 'post', 'put', 'patch', 'delete', 'options', 'trace'];
|
|
4
|
-
export const NoHttpVerbsInPaths = ({ splitIntoWords }) => {
|
|
4
|
+
export const NoHttpVerbsInPaths = ({ splitIntoWords, excludedPaths }) => {
|
|
5
5
|
return {
|
|
6
6
|
PathItem(_path, { key, report, location }) {
|
|
7
7
|
const pathKey = key.toString();
|
|
8
8
|
if (!pathKey.startsWith('/'))
|
|
9
9
|
return;
|
|
10
|
+
if (excludedPaths?.some((excludedPath) => pathKey === excludedPath))
|
|
11
|
+
return;
|
|
10
12
|
const pathSegments = pathKey.split('/');
|
|
11
13
|
for (const pathSegment of pathSegments) {
|
|
12
14
|
if (!pathSegment || isPathParameter(pathSegment))
|