@kubb/adapter-oas 5.25.1 → 5.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.
@@ -1 +1 @@
1
- {"version":3,"file":"validateSpec-BTbUBxQB.js","names":[],"sources":["../src/load/validateSpec.ts"],"sourcesContent":["import { validate } from '@readme/openapi-parser'\nimport type { Document } from '../types.ts'\n\nexport type ValidationErrors = { errors: Array<{ message: string }>; additionalErrors: number }\n\nexport type WorkerResult = { valid: true } | ({ valid: false } & ValidationErrors) | { thrown: string }\n\n/** Checks `document` with `@readme/openapi-parser`. It dereferences `document` in place, so pass a copy. */\nexport async function validateSpec(document: Document): Promise<WorkerResult> {\n try {\n const result = await validate(document, { validate: { errors: { colorize: false } } })\n return result.valid\n ? { valid: true }\n : { valid: false, errors: result.errors.map(({ message }) => ({ message })), additionalErrors: result.additionalErrors }\n } catch (error) {\n // No `@internals/utils` here: the worker runs this file without the workspace build.\n return { thrown: error instanceof Error ? error.message : String(error) }\n }\n}\n"],"mappings":";;;;AAQA,eAAsB,aAAa,UAA2C;CAC5E,IAAI;EACF,MAAM,SAAS,MAAM,SAAS,UAAU,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,MAAM,EAAE,EAAE,CAAC;EACrF,OAAO,OAAO,QACV,EAAE,OAAO,KAAK,IACd;GAAE,OAAO;GAAO,QAAQ,OAAO,OAAO,KAAK,EAAE,eAAe,EAAE,QAAQ,EAAE;GAAG,kBAAkB,OAAO;EAAiB;CAC3H,SAAS,OAAO;EAEd,OAAO,EAAE,QAAQ,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK,EAAE;CAC1E;AACF"}
1
+ {"version":3,"file":"validateSpec-BTbUBxQB.js","names":[],"sources":["../src/load/validateSpec.ts"],"sourcesContent":["import { validate } from '@readme/openapi-parser'\nimport type { APIDocument } from '@readme/openapi-parser'\nimport type { Document } from '../types.ts'\n\nexport type ValidationErrors = { errors: Array<{ message: string }>; additionalErrors: number }\n\nexport type WorkerResult = { valid: true } | ({ valid: false } & ValidationErrors) | { thrown: string }\n\n/** Checks `document` with `@readme/openapi-parser`. It dereferences `document` in place, so pass a copy. */\nexport async function validateSpec(document: Document): Promise<WorkerResult> {\n try {\n const result = await validate(document as APIDocument, { validate: { errors: { colorize: false } } })\n return result.valid\n ? { valid: true }\n : { valid: false, errors: result.errors.map(({ message }) => ({ message })), additionalErrors: result.additionalErrors }\n } catch (error) {\n // No `@internals/utils` here: the worker runs this file without the workspace build.\n return { thrown: error instanceof Error ? error.message : String(error) }\n }\n}\n"],"mappings":";;;;AASA,eAAsB,aAAa,UAA2C;CAC5E,IAAI;EACF,MAAM,SAAS,MAAM,SAAS,UAAyB,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,MAAM,EAAE,EAAE,CAAC;EACpG,OAAO,OAAO,QACV,EAAE,OAAO,KAAK,IACd;GAAE,OAAO;GAAO,QAAQ,OAAO,OAAO,KAAK,EAAE,eAAe,EAAE,QAAQ,EAAE;GAAG,kBAAkB,OAAO;EAAiB;CAC3H,SAAS,OAAO;EAEd,OAAO,EAAE,QAAQ,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK,EAAE;CAC1E;AACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"validateSpec-Bxf2WZ1Y.cjs","names":["validate"],"sources":["../src/load/validateSpec.ts"],"sourcesContent":["import { validate } from '@readme/openapi-parser'\nimport type { Document } from '../types.ts'\n\nexport type ValidationErrors = { errors: Array<{ message: string }>; additionalErrors: number }\n\nexport type WorkerResult = { valid: true } | ({ valid: false } & ValidationErrors) | { thrown: string }\n\n/** Checks `document` with `@readme/openapi-parser`. It dereferences `document` in place, so pass a copy. */\nexport async function validateSpec(document: Document): Promise<WorkerResult> {\n try {\n const result = await validate(document, { validate: { errors: { colorize: false } } })\n return result.valid\n ? { valid: true }\n : { valid: false, errors: result.errors.map(({ message }) => ({ message })), additionalErrors: result.additionalErrors }\n } catch (error) {\n // No `@internals/utils` here: the worker runs this file without the workspace build.\n return { thrown: error instanceof Error ? error.message : String(error) }\n }\n}\n"],"mappings":";;;;AAQA,eAAsB,aAAa,UAA2C;CAC5E,IAAI;EACF,MAAM,SAAS,OAAA,GAAMA,uBAAAA,SAAAA,CAAS,UAAU,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,MAAM,EAAE,EAAE,CAAC;EACrF,OAAO,OAAO,QACV,EAAE,OAAO,KAAK,IACd;GAAE,OAAO;GAAO,QAAQ,OAAO,OAAO,KAAK,EAAE,eAAe,EAAE,QAAQ,EAAE;GAAG,kBAAkB,OAAO;EAAiB;CAC3H,SAAS,OAAO;EAEd,OAAO,EAAE,QAAQ,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK,EAAE;CAC1E;AACF"}
1
+ {"version":3,"file":"validateSpec-Bxf2WZ1Y.cjs","names":["validate"],"sources":["../src/load/validateSpec.ts"],"sourcesContent":["import { validate } from '@readme/openapi-parser'\nimport type { APIDocument } from '@readme/openapi-parser'\nimport type { Document } from '../types.ts'\n\nexport type ValidationErrors = { errors: Array<{ message: string }>; additionalErrors: number }\n\nexport type WorkerResult = { valid: true } | ({ valid: false } & ValidationErrors) | { thrown: string }\n\n/** Checks `document` with `@readme/openapi-parser`. It dereferences `document` in place, so pass a copy. */\nexport async function validateSpec(document: Document): Promise<WorkerResult> {\n try {\n const result = await validate(document as APIDocument, { validate: { errors: { colorize: false } } })\n return result.valid\n ? { valid: true }\n : { valid: false, errors: result.errors.map(({ message }) => ({ message })), additionalErrors: result.additionalErrors }\n } catch (error) {\n // No `@internals/utils` here: the worker runs this file without the workspace build.\n return { thrown: error instanceof Error ? error.message : String(error) }\n }\n}\n"],"mappings":";;;;AASA,eAAsB,aAAa,UAA2C;CAC5E,IAAI;EACF,MAAM,SAAS,OAAA,GAAMA,uBAAAA,SAAAA,CAAS,UAAyB,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,MAAM,EAAE,EAAE,CAAC;EACpG,OAAO,OAAO,QACV,EAAE,OAAO,KAAK,IACd;GAAE,OAAO;GAAO,QAAQ,OAAO,OAAO,KAAK,EAAE,eAAe,EAAE,QAAQ,EAAE;GAAG,kBAAkB,OAAO;EAAiB;CAC3H,SAAS,OAAO;EAEd,OAAO,EAAE,QAAQ,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK,EAAE;CAC1E;AACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kubb/adapter-oas",
3
- "version": "5.25.1",
3
+ "version": "5.26.0",
4
4
  "description": "OpenAPI and Swagger adapter for Kubb. Parses and validates OAS 2.0/3.x specifications into a @kubb/ast RootNode for downstream code generation plugins.",
5
5
  "keywords": [
6
6
  "adapter",
@@ -66,10 +66,10 @@
66
66
  "registry": "https://registry.npmjs.org/"
67
67
  },
68
68
  "dependencies": {
69
- "@kubb/ast": "5.25.1",
70
- "@kubb/core": "5.25.1",
71
- "@kubb/kit": "5.25.1",
72
- "@readme/openapi-parser": "^10.0.0",
69
+ "@kubb/ast": "5.26.0",
70
+ "@kubb/core": "5.26.0",
71
+ "@kubb/kit": "5.26.0",
72
+ "@readme/openapi-parser": "^11.0.0",
73
73
  "@scalar/openapi-upgrader": "^0.5.1",
74
74
  "api-ref-bundler": "0.5.1",
75
75
  "js-yaml": "^5.5.0",