@kubb/plugin-oas 3.10.11 → 3.10.12
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,4 +1,4 @@
|
|
|
1
|
-
import { resolve } from '
|
|
1
|
+
import { resolve } from 'path';
|
|
2
2
|
import { URLPath } from '@kubb/core/utils';
|
|
3
3
|
import { Oas, parse } from '@kubb/oas';
|
|
4
4
|
import yaml from '@stoplight/yaml';
|
|
@@ -25,5 +25,5 @@ function parseFromConfig(config, oasClass = Oas) {
|
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
export { parseFromConfig };
|
|
28
|
-
//# sourceMappingURL=chunk-
|
|
29
|
-
//# sourceMappingURL=chunk-
|
|
28
|
+
//# sourceMappingURL=chunk-QF3E6S2N.js.map
|
|
29
|
+
//# sourceMappingURL=chunk-QF3E6S2N.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/utils/parseFromConfig.ts"],"names":["api"],"mappings":";;;;;;AAUO,SAAS,eAAA,CAAgB,MAAgB,EAAA,QAAA,GAAuB,GAAmB,EAAA;AACxF,EAAI,IAAA,MAAA,IAAU,OAAO,KAAO,EAAA;AAC1B,IAAA,IAAI,OAAO,MAAA,CAAO,KAAM,CAAA,IAAA,KAAS,QAAU,EAAA;AACzC,MAAMA,MAAAA,IAAAA,GAA4B,KAAK,KAAM,CAAA,IAAA,CAAK,UAAU,MAAO,CAAA,KAAA,CAAM,IAAI,CAAC,CAAA;AAC9E,MAAO,OAAA,KAAA,CAAMA,MAAK,QAAQ,CAAA;AAAA;AAG5B,IAAI,IAAA;AACF,MAAA,MAAMA,IAAc,GAAA,IAAA,CAAK,KAAM,CAAA,MAAA,CAAO,MAAM,IAAc,CAAA;AAE1D,MAAO,OAAA,KAAA,CAAMA,MAAK,QAAQ,CAAA;AAAA,aACnB,EAAI,EAAA;AAAA;AAIb,IAAM,MAAA,GAAA,GAA4B,KAAK,KAAM,CAAA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,CAAO,KAAM,CAAA,IAAI,EAAE,KAAO,EAAA;AACxC,IAAA,OAAO,KAAM,CAAA,MAAA,CAAO,KAAM,CAAA,IAAA,EAAM,QAAQ,CAAA;AAAA;AAG1C,EAAO,OAAA,KAAA,CAAM,QAAQ,MAAO,CAAA,IAAA,EAAM,OAAO,KAAM,CAAA,IAAI,GAAG,QAAQ,CAAA;AAChE","file":"chunk-QF3E6S2N.js","sourcesContent":["import { resolve } from 'node:path'\n\nimport { URLPath } from '@kubb/core/utils'\n\nimport { parse } from '@kubb/oas'\n\nimport type { Config } from '@kubb/core'\nimport { Oas, type OasTypes } from '@kubb/oas'\nimport yaml from '@stoplight/yaml'\n\nexport function parseFromConfig(config: Config, oasClass: typeof Oas = Oas): Promise<Oas> {\n if ('data' in config.input) {\n if (typeof config.input.data === 'object') {\n const api: OasTypes.OASDocument = JSON.parse(JSON.stringify(config.input.data)) as OasTypes.OASDocument\n return parse(api, oasClass)\n }\n\n try {\n const api: string = yaml.parse(config.input.data as string) as string\n\n return parse(api, oasClass)\n } catch (_e) {\n /* empty */\n }\n\n const api: OasTypes.OASDocument = JSON.parse(JSON.stringify(config.input.data)) as OasTypes.OASDocument\n\n return parse(api, oasClass)\n }\n\n if (new URLPath(config.input.path).isURL) {\n return parse(config.input.path, oasClass)\n }\n\n return parse(resolve(config.root, config.input.path), oasClass)\n}\n"]}
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { parseFromConfig } from './chunk-
|
|
1
|
+
import { parseFromConfig } from './chunk-QF3E6S2N.js';
|
|
2
2
|
import { jsonGenerator } from './chunk-S7ZYTJXL.js';
|
|
3
3
|
export { createGenerator, createReactGenerator } from './chunk-S7ZYTJXL.js';
|
|
4
4
|
import './chunk-6S7YFY6F.js';
|
|
@@ -9,7 +9,7 @@ import './chunk-PORSNYI5.js';
|
|
|
9
9
|
import './chunk-JNN4JPWK.js';
|
|
10
10
|
import { createPlugin, FileManager, BaseGenerator } from '@kubb/core';
|
|
11
11
|
import transformers, { camelCase } from '@kubb/core/transformers';
|
|
12
|
-
import path from '
|
|
12
|
+
import path from 'path';
|
|
13
13
|
|
|
14
14
|
var OperationGenerator = class extends BaseGenerator {
|
|
15
15
|
#operationsByMethod = {};
|
package/dist/utils.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { parseFromConfig } from './chunk-
|
|
1
|
+
export { parseFromConfig } from './chunk-QF3E6S2N.js';
|
|
2
2
|
export { getBanner, getFooter } from './chunk-6S7YFY6F.js';
|
|
3
3
|
export { getSchemaFactory, getSchemas } from './chunk-PORSNYI5.js';
|
|
4
4
|
import transformers, { isValidVarName, camelCase } from '@kubb/core/transformers';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kubb/plugin-oas",
|
|
3
|
-
"version": "3.10.
|
|
3
|
+
"version": "3.10.12",
|
|
4
4
|
"description": "Generator swagger",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"typescript",
|
|
@@ -83,18 +83,18 @@
|
|
|
83
83
|
],
|
|
84
84
|
"dependencies": {
|
|
85
85
|
"@stoplight/yaml": "^4.3.0",
|
|
86
|
-
"remeda": "^2.21.
|
|
87
|
-
"@kubb/core": "3.10.
|
|
88
|
-
"@kubb/oas": "3.10.
|
|
89
|
-
"@kubb/react": "3.10.
|
|
86
|
+
"remeda": "^2.21.6",
|
|
87
|
+
"@kubb/core": "3.10.12",
|
|
88
|
+
"@kubb/oas": "3.10.12",
|
|
89
|
+
"@kubb/react": "3.10.12"
|
|
90
90
|
},
|
|
91
91
|
"devDependencies": {
|
|
92
92
|
"@types/react": "^18.3.21",
|
|
93
93
|
"react": "^18.3.1",
|
|
94
|
-
"tsup": "^8.
|
|
94
|
+
"tsup": "^8.5.0",
|
|
95
95
|
"typescript": "^5.8.3",
|
|
96
|
-
"@kubb/config-ts": "3.10.
|
|
97
|
-
"@kubb/config-tsup": "3.10.
|
|
96
|
+
"@kubb/config-ts": "3.10.12",
|
|
97
|
+
"@kubb/config-tsup": "3.10.12"
|
|
98
98
|
},
|
|
99
99
|
"peerDependencies": {
|
|
100
100
|
"@kubb/react": "^3.0.0"
|