orval 8.14.0 → 8.16.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":"index.mjs","names":[],"sources":["../src/generate.ts"],"sourcesContent":["import {\n getWarningCount,\n type GlobalOptions,\n isString,\n logError,\n type OptionsExport,\n resetWarnings,\n setVerbose,\n} from '@orval/core';\n\nimport { generateSpec } from './generate-spec';\nimport { findConfigFile, loadConfigFile } from './utils/config';\nimport { normalizeOptions } from './utils/options';\nimport { startWatcher } from './utils/watcher';\n\nexport async function generate(\n optionsExport?: string | OptionsExport,\n workspace = process.cwd(),\n options?: GlobalOptions,\n) {\n setVerbose(!!options?.verbose);\n resetWarnings();\n\n if (!optionsExport || isString(optionsExport)) {\n const configFilePath = findConfigFile(optionsExport);\n const configFile = await loadConfigFile(configFilePath);\n\n const configs = Object.entries(configFile);\n\n let hasErrors = false;\n for (const [projectName, config] of configs) {\n const normalizedOptions = await normalizeOptions(\n config,\n workspace,\n options,\n );\n\n try {\n await generateSpec(workspace, normalizedOptions, projectName);\n } catch (error) {\n hasErrors = true;\n logError(error, projectName);\n }\n\n if (options?.watch !== undefined) {\n const fileToWatch = isString(normalizedOptions.input.target)\n ? normalizedOptions.input.target\n : undefined;\n\n await startWatcher(\n options.watch,\n async () => {\n resetWarnings();\n try {\n await generateSpec(workspace, normalizedOptions, projectName);\n } catch (error) {\n logError(error, projectName);\n }\n if (options.failOnWarnings && getWarningCount() > 0) {\n throw new Error(\n `Process failed with ${getWarningCount()} warning(s) due to failOnWarnings option`,\n );\n }\n },\n fileToWatch,\n );\n }\n }\n\n if (hasErrors)\n logError('One or more project failed, see above for details');\n\n if (options?.failOnWarnings && getWarningCount() > 0) {\n throw new Error(\n `Process failed with ${getWarningCount()} warning(s) due to failOnWarnings option`,\n );\n }\n\n return;\n }\n\n const normalizedOptions = await normalizeOptions(\n optionsExport,\n workspace,\n options,\n );\n\n try {\n await generateSpec(workspace, normalizedOptions);\n } catch (error) {\n logError(error);\n }\n\n if (options?.watch) {\n await startWatcher(\n options.watch,\n async () => {\n resetWarnings();\n try {\n await generateSpec(workspace, normalizedOptions);\n } catch (error) {\n logError(error);\n }\n if (options.failOnWarnings && getWarningCount() > 0) {\n throw new Error(\n `Process failed with ${getWarningCount()} warning(s) due to failOnWarnings option`,\n );\n }\n },\n normalizedOptions.input.target as string,\n );\n }\n\n if (options?.failOnWarnings && getWarningCount() > 0) {\n throw new Error(\n `Process failed with ${getWarningCount()} warning(s) due to failOnWarnings option`,\n );\n }\n}\n"],"mappings":";;;;AAeA,eAAsB,SACpB,eACA,YAAY,QAAQ,KAAK,EACzB,SACA;AACA,YAAW,CAAC,CAAC,SAAS,QAAQ;AAC9B,gBAAe;AAEf,KAAI,CAAC,iBAAiB,SAAS,cAAc,EAAE;EAE7C,MAAM,aAAa,MAAM,eADF,eAAe,cAAc,CACG;EAEvD,MAAM,UAAU,OAAO,QAAQ,WAAW;EAE1C,IAAI,YAAY;AAChB,OAAK,MAAM,CAAC,aAAa,WAAW,SAAS;GAC3C,MAAM,oBAAoB,MAAM,iBAC9B,QACA,WACA,QACD;AAED,OAAI;AACF,UAAM,aAAa,WAAW,mBAAmB,YAAY;YACtD,OAAO;AACd,gBAAY;AACZ,aAAS,OAAO,YAAY;;AAG9B,OAAI,SAAS,UAAU,KAAA,GAAW;IAChC,MAAM,cAAc,SAAS,kBAAkB,MAAM,OAAO,GACxD,kBAAkB,MAAM,SACxB,KAAA;AAEJ,UAAM,aACJ,QAAQ,OACR,YAAY;AACV,oBAAe;AACf,SAAI;AACF,YAAM,aAAa,WAAW,mBAAmB,YAAY;cACtD,OAAO;AACd,eAAS,OAAO,YAAY;;AAE9B,SAAI,QAAQ,kBAAkB,iBAAiB,GAAG,EAChD,OAAM,IAAI,MACR,uBAAuB,iBAAiB,CAAC,0CAC1C;OAGL,YACD;;;AAIL,MAAI,UACF,UAAS,oDAAoD;AAE/D,MAAI,SAAS,kBAAkB,iBAAiB,GAAG,EACjD,OAAM,IAAI,MACR,uBAAuB,iBAAiB,CAAC,0CAC1C;AAGH;;CAGF,MAAM,oBAAoB,MAAM,iBAC9B,eACA,WACA,QACD;AAED,KAAI;AACF,QAAM,aAAa,WAAW,kBAAkB;UACzC,OAAO;AACd,WAAS,MAAM;;AAGjB,KAAI,SAAS,MACX,OAAM,aACJ,QAAQ,OACR,YAAY;AACV,iBAAe;AACf,MAAI;AACF,SAAM,aAAa,WAAW,kBAAkB;WACzC,OAAO;AACd,YAAS,MAAM;;AAEjB,MAAI,QAAQ,kBAAkB,iBAAiB,GAAG,EAChD,OAAM,IAAI,MACR,uBAAuB,iBAAiB,CAAC,0CAC1C;IAGL,kBAAkB,MAAM,OACzB;AAGH,KAAI,SAAS,kBAAkB,iBAAiB,GAAG,EACjD,OAAM,IAAI,MACR,uBAAuB,iBAAiB,CAAC,0CAC1C"}
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../src/generate.ts"],"sourcesContent":["import {\n getWarningCount,\n type GlobalOptions,\n isString,\n logError,\n type OptionsExport,\n resetWarnings,\n setVerbose,\n} from '@orval/core';\n\nimport { generateSpec } from './generate-spec';\nimport { findConfigFile, loadConfigFile } from './utils/config';\nimport { normalizeOptions } from './utils/options';\nimport { startWatcher } from './utils/watcher';\n\nexport async function generate(\n optionsExport?: string | OptionsExport,\n workspace = process.cwd(),\n options?: GlobalOptions,\n) {\n setVerbose(!!options?.verbose);\n resetWarnings();\n\n if (!optionsExport || isString(optionsExport)) {\n const configFilePath = findConfigFile(optionsExport);\n const configFile = await loadConfigFile(configFilePath);\n\n const configs = Object.entries(configFile);\n\n let hasErrors = false;\n for (const [projectName, config] of configs) {\n const normalizedOptions = await normalizeOptions(\n config,\n workspace,\n options,\n );\n\n try {\n await generateSpec(workspace, normalizedOptions, projectName);\n } catch (error) {\n hasErrors = true;\n logError(error, projectName);\n }\n\n if (options?.watch !== undefined) {\n const fileToWatch = isString(normalizedOptions.input.target)\n ? normalizedOptions.input.target\n : undefined;\n\n await startWatcher(\n options.watch,\n async () => {\n resetWarnings();\n try {\n await generateSpec(workspace, normalizedOptions, projectName);\n } catch (error) {\n logError(error, projectName);\n }\n if (options.failOnWarnings && getWarningCount() > 0) {\n throw new Error(\n `Process failed with ${getWarningCount()} warning(s) due to failOnWarnings option`,\n );\n }\n },\n fileToWatch,\n );\n }\n }\n\n if (hasErrors)\n logError('One or more project failed, see above for details');\n\n if (options?.failOnWarnings && getWarningCount() > 0) {\n throw new Error(\n `Process failed with ${getWarningCount()} warning(s) due to failOnWarnings option`,\n );\n }\n\n return;\n }\n\n const normalizedOptions = await normalizeOptions(\n optionsExport,\n workspace,\n options,\n );\n\n try {\n await generateSpec(workspace, normalizedOptions);\n } catch (error) {\n logError(error);\n }\n\n if (options?.watch) {\n await startWatcher(\n options.watch,\n async () => {\n resetWarnings();\n try {\n await generateSpec(workspace, normalizedOptions);\n } catch (error) {\n logError(error);\n }\n if (options.failOnWarnings && getWarningCount() > 0) {\n throw new Error(\n `Process failed with ${getWarningCount()} warning(s) due to failOnWarnings option`,\n );\n }\n },\n normalizedOptions.input.target as string,\n );\n }\n\n if (options?.failOnWarnings && getWarningCount() > 0) {\n throw new Error(\n `Process failed with ${getWarningCount()} warning(s) due to failOnWarnings option`,\n );\n }\n}\n"],"mappings":";;;;AAeA,eAAsB,SACpB,eACA,YAAY,QAAQ,IAAI,GACxB,SACA;CACA,WAAW,CAAC,CAAC,SAAS,OAAO;CAC7B,cAAc;CAEd,IAAI,CAAC,iBAAiB,SAAS,aAAa,GAAG;EAE7C,MAAM,aAAa,MAAM,eADF,eAAe,aACe,CAAC;EAEtD,MAAM,UAAU,OAAO,QAAQ,UAAU;EAEzC,IAAI,YAAY;EAChB,KAAK,MAAM,CAAC,aAAa,WAAW,SAAS;GAC3C,MAAM,oBAAoB,MAAM,iBAC9B,QACA,WACA,OACF;GAEA,IAAI;IACF,MAAM,aAAa,WAAW,mBAAmB,WAAW;GAC9D,SAAS,OAAO;IACd,YAAY;IACZ,SAAS,OAAO,WAAW;GAC7B;GAEA,IAAI,SAAS,UAAU,KAAA,GAAW;IAChC,MAAM,cAAc,SAAS,kBAAkB,MAAM,MAAM,IACvD,kBAAkB,MAAM,SACxB,KAAA;IAEJ,MAAM,aACJ,QAAQ,OACR,YAAY;KACV,cAAc;KACd,IAAI;MACF,MAAM,aAAa,WAAW,mBAAmB,WAAW;KAC9D,SAAS,OAAO;MACd,SAAS,OAAO,WAAW;KAC7B;KACA,IAAI,QAAQ,kBAAkB,gBAAgB,IAAI,GAChD,MAAM,IAAI,MACR,uBAAuB,gBAAgB,EAAE,yCAC3C;IAEJ,GACA,WACF;GACF;EACF;EAEA,IAAI,WACF,SAAS,mDAAmD;EAE9D,IAAI,SAAS,kBAAkB,gBAAgB,IAAI,GACjD,MAAM,IAAI,MACR,uBAAuB,gBAAgB,EAAE,yCAC3C;EAGF;CACF;CAEA,MAAM,oBAAoB,MAAM,iBAC9B,eACA,WACA,OACF;CAEA,IAAI;EACF,MAAM,aAAa,WAAW,iBAAiB;CACjD,SAAS,OAAO;EACd,SAAS,KAAK;CAChB;CAEA,IAAI,SAAS,OACX,MAAM,aACJ,QAAQ,OACR,YAAY;EACV,cAAc;EACd,IAAI;GACF,MAAM,aAAa,WAAW,iBAAiB;EACjD,SAAS,OAAO;GACd,SAAS,KAAK;EAChB;EACA,IAAI,QAAQ,kBAAkB,gBAAgB,IAAI,GAChD,MAAM,IAAI,MACR,uBAAuB,gBAAgB,EAAE,yCAC3C;CAEJ,GACA,kBAAkB,MAAM,MAC1B;CAGF,IAAI,SAAS,kBAAkB,gBAAgB,IAAI,GACjD,MAAM,IAAI,MACR,uBAAuB,gBAAgB,EAAE,yCAC3C;AAEJ"}
package/package.json CHANGED
@@ -1,55 +1,35 @@
1
1
  {
2
2
  "name": "orval",
3
+ "version": "8.16.0",
3
4
  "description": "A swagger client generator for typescript",
4
- "version": "8.14.0",
5
- "license": "MIT",
6
- "type": "module",
7
- "files": [
8
- "dist",
9
- "!dist/**/*.d.ts.map",
10
- "!dist/**/*.d.mts.map"
11
- ],
12
- "bin": "./dist/bin/orval.mjs",
13
- "types": "./dist/index.d.mts",
14
- "exports": {
15
- ".": {
16
- "development": "./src/index.ts",
17
- "default": "./dist/index.mjs"
18
- },
19
- "./bin/orval": {
20
- "development": "./src/bin/orval.ts",
21
- "default": "./dist/bin/orval.mjs"
22
- },
23
- "./package.json": "./package.json"
24
- },
25
- "engines": {
26
- "node": ">=22.18.0"
27
- },
28
5
  "keywords": [
29
- "rest",
6
+ "angular",
7
+ "axios",
30
8
  "client",
31
- "swagger",
32
- "open-api",
33
- "fetch",
34
- "data fetching",
35
9
  "code-generation",
36
- "angular",
10
+ "data fetching",
11
+ "effect",
12
+ "fetch",
13
+ "hono",
14
+ "mock",
15
+ "msw",
16
+ "open-api",
37
17
  "react",
38
18
  "react-query",
19
+ "rest",
39
20
  "svelte",
40
21
  "svelte-query",
22
+ "swagger",
23
+ "swr",
41
24
  "vue",
42
25
  "vue-query",
43
- "msw",
44
- "mock",
45
- "axios",
46
- "vue-query",
47
- "vue",
48
- "swr",
49
- "zod",
50
- "effect",
51
- "hono"
26
+ "zod"
52
27
  ],
28
+ "homepage": "https://orval.dev",
29
+ "bugs": {
30
+ "url": "https://github.com/orval-labs/orval/issues"
31
+ },
32
+ "license": "MIT",
53
33
  "author": {
54
34
  "name": "Victor Bury",
55
35
  "email": "victor@anymaniax.com"
@@ -58,33 +38,35 @@
58
38
  "type": "git",
59
39
  "url": "git+https://github.com/orval-labs/orval.git"
60
40
  },
61
- "homepage": "https://orval.dev",
62
- "bugs": {
63
- "url": "https://github.com/orval-labs/orval/issues"
41
+ "bin": {
42
+ "orval": "./dist/bin/orval.mjs"
64
43
  },
65
- "scripts": {
66
- "build": "tsdown --config-loader unrun",
67
- "dev": "tsdown --config-loader unrun --watch src",
68
- "lint": "eslint .",
69
- "test": "vitest",
70
- "typecheck": "tsc --noEmit",
71
- "clean": "rimraf .turbo dist",
72
- "nuke": "rimraf .turbo dist node_modules"
44
+ "files": [
45
+ "dist",
46
+ "!dist/**/*.d.ts.map",
47
+ "!dist/**/*.d.mts.map"
48
+ ],
49
+ "type": "module",
50
+ "types": "./dist/index.d.mts",
51
+ "exports": {
52
+ ".": "./dist/index.mjs",
53
+ "./bin/orval": "./dist/bin/orval.mjs",
54
+ "./package.json": "./package.json"
73
55
  },
74
56
  "dependencies": {
75
57
  "@commander-js/extra-typings": "^14.0.0",
76
- "@orval/angular": "8.14.0",
77
- "@orval/axios": "8.14.0",
78
- "@orval/core": "8.14.0",
79
- "@orval/effect": "8.14.0",
80
- "@orval/fetch": "8.14.0",
81
- "@orval/hono": "8.14.0",
82
- "@orval/mcp": "8.14.0",
83
- "@orval/mock": "8.14.0",
84
- "@orval/query": "8.14.0",
85
- "@orval/solid-start": "8.14.0",
86
- "@orval/swr": "8.14.0",
87
- "@orval/zod": "8.14.0",
58
+ "@orval/angular": "8.16.0",
59
+ "@orval/axios": "8.16.0",
60
+ "@orval/core": "8.16.0",
61
+ "@orval/effect": "8.16.0",
62
+ "@orval/fetch": "8.16.0",
63
+ "@orval/hono": "8.16.0",
64
+ "@orval/mcp": "8.16.0",
65
+ "@orval/mock": "8.16.0",
66
+ "@orval/query": "8.16.0",
67
+ "@orval/solid-start": "8.16.0",
68
+ "@orval/swr": "8.16.0",
69
+ "@orval/zod": "8.16.0",
88
70
  "@scalar/json-magic": "^0.12.8",
89
71
  "@scalar/openapi-parser": "^0.28.5",
90
72
  "@scalar/openapi-types": "0.8.0",
@@ -106,9 +88,7 @@
106
88
  "devDependencies": {
107
89
  "@types/fs-extra": "^11.0.4",
108
90
  "@types/js-yaml": "^4.0.9",
109
- "eslint": "10.1.0",
110
91
  "rimraf": "6.1.2",
111
- "tsdown": "0.21.9",
112
92
  "typescript": "5.9.3",
113
93
  "vitest": "4.0.18"
114
94
  },
@@ -120,11 +100,7 @@
120
100
  "optional": true
121
101
  }
122
102
  },
123
- "publishConfig": {
124
- "exports": {
125
- ".": "./dist/index.mjs",
126
- "./bin/orval": "./dist/bin/orval.mjs",
127
- "./package.json": "./package.json"
128
- }
103
+ "engines": {
104
+ "node": ">=22.18.0"
129
105
  }
130
106
  }