zova-cli-set-front 1.2.110 → 1.2.112
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,13 +1,22 @@
|
|
|
1
1
|
import type { ZovaOpenapiConfig } from 'zova-openapi';
|
|
2
2
|
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
export function resolveOpenapiSource(
|
|
4
|
+
apiBaseURL = process.env.API_BASE_URL,
|
|
5
|
+
sourceOverride = process.env.OPENAPI_SOURCE_URL,
|
|
6
|
+
) {
|
|
7
|
+
const override = sourceOverride?.trim();
|
|
8
|
+
if (override) return override;
|
|
9
|
+
const baseURL = apiBaseURL?.trim();
|
|
10
|
+
if (!baseURL) {
|
|
6
11
|
throw new Error('Missing API_BASE_URL');
|
|
7
12
|
}
|
|
13
|
+
return `${baseURL.replace(/\/$/, '')}/swagger/json?version=V31`;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export default function (): ZovaOpenapiConfig {
|
|
8
17
|
return {
|
|
9
18
|
default: {
|
|
10
|
-
source:
|
|
19
|
+
source: resolveOpenapiSource(),
|
|
11
20
|
},
|
|
12
21
|
modules: {},
|
|
13
22
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zova-cli-set-front",
|
|
3
|
-
"version": "1.2.
|
|
4
|
-
"gitHead": "
|
|
3
|
+
"version": "1.2.112",
|
|
4
|
+
"gitHead": "07074482abf76e38f9e3ccc3505f6d546e5c6f8d",
|
|
5
5
|
"description": "zova cli-set-front",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"framework",
|
|
@@ -65,6 +65,6 @@
|
|
|
65
65
|
"vite": "^8.0.14",
|
|
66
66
|
"yaml": "^2.8.3",
|
|
67
67
|
"zova-openapi": "^1.1.17",
|
|
68
|
-
"zova-vite": "^1.1.
|
|
68
|
+
"zova-vite": "^1.1.48"
|
|
69
69
|
}
|
|
70
70
|
}
|