@kubb/plugin-oas 2.18.3 → 2.18.5
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/dist/{OperationGenerator-X6CTMfhG.d.cts → OperationGenerator-B6_KXF47.d.cts} +12 -11
- package/dist/{OperationGenerator-DvnXUUp4.d.ts → OperationGenerator-BL3W1CH2.d.ts} +12 -11
- package/dist/{Schema-DFZBfjF2.d.ts → Schema-ByMOp8RL.d.ts} +6 -12
- package/dist/{Schema-BWPWyiQO.d.cts → Schema-C9Wxng-Q.d.cts} +6 -12
- package/dist/{SchemaGenerator-hK5SHxTI.d.ts → SchemaMapper-DRlWYDvv.d.cts} +2 -74
- package/dist/{SchemaGenerator-z_7YrAAB.d.cts → SchemaMapper-DRlWYDvv.d.ts} +2 -74
- package/dist/{chunk-LQ6IAWRX.js → chunk-37DRAF2Z.js} +51 -4
- package/dist/chunk-37DRAF2Z.js.map +1 -0
- package/dist/chunk-CTFUZW3D.cjs +682 -0
- package/dist/chunk-CTFUZW3D.cjs.map +1 -0
- package/dist/{chunk-EPTOYYAP.js → chunk-FL37EDQ2.js} +12 -30
- package/dist/{chunk-EPTOYYAP.js.map → chunk-FL37EDQ2.js.map} +1 -1
- package/dist/chunk-JWIFGIVZ.js +34 -0
- package/dist/chunk-JWIFGIVZ.js.map +1 -0
- package/dist/{chunk-H52M2RUX.cjs → chunk-OUN5NRHC.cjs} +30 -48
- package/dist/chunk-OUN5NRHC.cjs.map +1 -0
- package/dist/chunk-QLNCBDLM.js +682 -0
- package/dist/chunk-QLNCBDLM.js.map +1 -0
- package/dist/chunk-R4EI2NRQ.cjs +34 -0
- package/dist/chunk-R4EI2NRQ.cjs.map +1 -0
- package/dist/chunk-SSSTH6CP.cjs +115 -0
- package/dist/chunk-SSSTH6CP.cjs.map +1 -0
- package/dist/components.cjs +5 -5
- package/dist/components.d.cts +5 -4
- package/dist/components.d.ts +5 -4
- package/dist/components.js +3 -3
- package/dist/hooks.cjs +13 -13
- package/dist/hooks.cjs.map +1 -1
- package/dist/hooks.d.cts +7 -8
- package/dist/hooks.d.ts +7 -8
- package/dist/hooks.js +3 -3
- package/dist/hooks.js.map +1 -1
- package/dist/index.cjs +69 -642
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +72 -6
- package/dist/index.d.ts +72 -6
- package/dist/index.js +50 -623
- package/dist/index.js.map +1 -1
- package/dist/{types-n5zV4Q3s.d.cts → types-BMBTfHxe.d.cts} +3 -2
- package/dist/{types-n5zV4Q3s.d.ts → types-BMBTfHxe.d.ts} +3 -2
- package/dist/utils.cjs +9 -9
- package/dist/utils.cjs.map +1 -1
- package/dist/utils.d.cts +5 -4
- package/dist/utils.d.ts +5 -4
- package/dist/utils.js +5 -5
- package/dist/utils.js.map +1 -1
- package/package.json +10 -9
- package/src/OperationGenerator.ts +27 -11
- package/src/SchemaGenerator.ts +30 -35
- package/src/SchemaMapper.ts +1 -1
- package/src/components/Schema.tsx +12 -42
- package/src/hooks/useOperationManager.ts +3 -2
- package/src/hooks/useSchema.ts +1 -8
- package/src/index.ts +1 -0
- package/src/plugin.ts +3 -3
- package/src/types.ts +3 -1
- package/src/utils/getGroupedByTagFiles.ts +4 -3
- package/dist/chunk-2MJ2CQMI.js +0 -61
- package/dist/chunk-2MJ2CQMI.js.map +0 -1
- package/dist/chunk-3RCQ2LNT.js +0 -81
- package/dist/chunk-3RCQ2LNT.js.map +0 -1
- package/dist/chunk-55NUFNT6.cjs +0 -68
- package/dist/chunk-55NUFNT6.cjs.map +0 -1
- package/dist/chunk-ECXSQTMV.cjs +0 -81
- package/dist/chunk-ECXSQTMV.cjs.map +0 -1
- package/dist/chunk-H52M2RUX.cjs.map +0 -1
- package/dist/chunk-LQ6IAWRX.js.map +0 -1
- package/dist/chunk-VNFSHGSN.cjs +0 -61
- package/dist/chunk-VNFSHGSN.cjs.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/SchemaMapper.ts"],"names":[],"mappings":";;;;;AAAA;AA+EO,IAAM,iBAAiB;AAAA,EAC5B,KAAK;AAAA,EACL,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,WAAW;AAAA,EACX,UAAU;AAAA,EACV,MAAM;AAAA,EACN,SAAS;AAAA,EACT,OAAO;AAAA,EACP,OAAO;AAAA,EACP,MAAM;AAAA,EACN,OAAO;AAAA,EACP,UAAU;AAAA,EACV,MAAM;AAAA,EACN,OAAO;AAAA,EACP,MAAM;AAAA,EACN,KAAK;AAAA;AAAA,EAEL,SAAS;AAAA,EACT,OAAO;AAAA,EACP,KAAK;AAAA,EACL,UAAU;AAAA,EACV,KAAK;AAAA,EACL,KAAK;AAAA,EACL,UAAU;AAAA,EACV,UAAU;AAAA;AAAA,EAGV,QAAQ;AAAA,EACR,KAAK;AAAA,EACL,SAAS;AAAA,EACT,WAAW;AAAA,EACX,UAAU;AAAA,EACV,UAAU;AAAA,EACV,OAAO;AAAA,EACP,MAAM;AAAA,EACN,YAAY;AAAA,EACZ,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,MAAM;AAAA,EACN,MAAM;AACR;AAiBO,SAAS,UAAiE,MAAS,SAAwD;AAChJ,SAAO,KAAK,YAAY;AAC1B","sourcesContent":["import type { KubbFile } from '@kubb/core'\n\nexport type SchemaKeywordMapper = {\n object: {\n keyword: 'object'\n args: {\n properties: { [x: string]: Schema[] }\n additionalProperties: Schema[]\n strict?: boolean\n }\n }\n strict: { keyword: 'strict' }\n url: { keyword: 'url' }\n readOnly: { keyword: 'readOnly' }\n uuid: { keyword: 'uuid' }\n email: { keyword: 'email' }\n firstName: { keyword: 'firstName' }\n lastName: { keyword: 'lastName' }\n phone: { keyword: 'phone' }\n password: { keyword: 'password' }\n date: { keyword: 'date'; args: { type?: 'date' | 'string' } }\n time: { keyword: 'time'; args: { type?: 'date' | 'string' } }\n datetime: { keyword: 'datetime'; args: { offset?: boolean; local?: boolean } }\n tuple: { keyword: 'tuple'; args: Schema[] }\n array: {\n keyword: 'array'\n args: { items: Schema[]; min?: number; max?: number }\n }\n enum: {\n keyword: 'enum'\n args: {\n name: string\n typeName: string\n asConst: boolean\n items: Array<{\n name: string | number\n format: 'string' | 'number'\n value?: string | number\n }>\n }\n }\n and: { keyword: 'and'; args: Schema[] }\n const: {\n keyword: 'const'\n args: {\n name: string | number\n format: 'string' | 'number'\n value?: string | number\n }\n }\n union: { keyword: 'union'; args: Schema[] }\n ref: {\n keyword: 'ref'\n args: { name: string; path: KubbFile.OptionalPath; isTypeOnly?: boolean }\n }\n matches: { keyword: 'matches'; args?: string }\n boolean: { keyword: 'boolean' }\n default: { keyword: 'default'; args: string | number | boolean }\n string: { keyword: 'string' }\n integer: { keyword: 'integer' }\n number: { keyword: 'number' }\n max: { keyword: 'max'; args: number }\n min: { keyword: 'min'; args: number }\n describe: { keyword: 'describe'; args: string }\n example: { keyword: 'example'; args: string }\n deprecated: { keyword: 'deprecated' }\n optional: { keyword: 'optional' }\n undefined: { keyword: 'undefined' }\n nullish: { keyword: 'nullish' }\n nullable: { keyword: 'nullable' }\n null: { keyword: 'null' }\n any: { keyword: 'any' }\n unknown: { keyword: 'unknown' }\n blob: { keyword: 'blob' }\n schema: { keyword: 'schema'; args: { type: 'string' | 'number' | 'integer' | 'boolean' | 'array' | 'object'; format?: string } }\n name: { keyword: 'name'; args: string }\n catchall: { keyword: 'catchall' }\n}\n\nexport const schemaKeywords = {\n any: 'any',\n strict: 'strict',\n unknown: 'unknown',\n number: 'number',\n integer: 'integer',\n string: 'string',\n boolean: 'boolean',\n undefined: 'undefined',\n nullable: 'nullable',\n null: 'null',\n nullish: 'nullish',\n array: 'array',\n tuple: 'tuple',\n enum: 'enum',\n union: 'union',\n datetime: 'datetime',\n date: 'date',\n email: 'email',\n uuid: 'uuid',\n url: 'url',\n /* intersection */\n default: 'default',\n const: 'const',\n and: 'and',\n describe: 'describe',\n min: 'min',\n max: 'max',\n optional: 'optional',\n readOnly: 'readOnly',\n\n // custom ones\n object: 'object',\n ref: 'ref',\n matches: 'matches',\n firstName: 'firstName',\n lastName: 'lastName',\n password: 'password',\n phone: 'phone',\n blob: 'blob',\n deprecated: 'deprecated',\n example: 'example',\n schema: 'schema',\n catchall: 'catchall',\n time: 'time',\n name: 'name',\n} satisfies {\n [K in keyof SchemaKeywordMapper]: SchemaKeywordMapper[K]['keyword']\n}\n\nexport type SchemaKeyword = keyof SchemaKeywordMapper\n\nexport type SchemaMapper<T = string | null | undefined> = {\n [K in keyof SchemaKeywordMapper]: (() => T | undefined) | undefined\n}\n\nexport type SchemaKeywordBase<T> = {\n keyword: SchemaKeyword\n args: T\n}\n\nexport type Schema = { keyword: string } | SchemaKeywordMapper[keyof SchemaKeywordMapper]\n\nexport function isKeyword<T extends Schema, K extends keyof SchemaKeywordMapper>(meta: T, keyword: K): meta is Extract<T, SchemaKeywordMapper[K]> {\n return meta.keyword === keyword\n}\n"]}
|