@oiyo/config 0.5.0 → 0.7.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.
- package/THIRD_PARTY_NOTICES.md +7 -0
- package/dist/index.cjs +32 -14
- package/dist/index.d.cts +3992 -29
- package/dist/index.d.mts +3992 -29
- package/dist/index.mjs +32 -15
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @oiyo/config v0.
|
|
2
|
+
* @oiyo/config v0.7.0
|
|
3
3
|
* Copyright (c) 2026 skiyee. All rights reserved.
|
|
4
4
|
* Commercial software. See LICENSE for terms.
|
|
5
5
|
* Official site: https://oiyo.js.org
|
|
6
6
|
*/
|
|
7
7
|
import { defu } from "defu";
|
|
8
8
|
import process from "node:process";
|
|
9
|
+
//#region src/manifest/index.ts
|
|
10
|
+
function defineManifestConfig(config) {
|
|
11
|
+
return config;
|
|
12
|
+
}
|
|
13
|
+
//#endregion
|
|
9
14
|
//#region src/oiyo/default.ts
|
|
10
15
|
const DEFAULT_RUNTIME_LIFECYCLE_APIS = [
|
|
11
16
|
"onBeforeMount",
|
|
@@ -95,13 +100,33 @@ const DEFAULT_RUNTIME_EFFECT_SCOPE_APIS = [
|
|
|
95
100
|
"getCurrentScope",
|
|
96
101
|
"onScopeDispose"
|
|
97
102
|
];
|
|
98
|
-
const
|
|
103
|
+
const DEFAULT_RUNTIME_OIYO_HTTP_APIS = [
|
|
99
104
|
"createHttpAborter",
|
|
100
105
|
"createHttp",
|
|
101
106
|
"http",
|
|
102
107
|
"HttpError",
|
|
103
108
|
"isHttpError"
|
|
104
109
|
];
|
|
110
|
+
const DEFAULT_RUNTIME_OIYO_MIDDLEWARE_APIS = [
|
|
111
|
+
"abortNavigation",
|
|
112
|
+
"defineRouteMiddleware",
|
|
113
|
+
"goTo"
|
|
114
|
+
];
|
|
115
|
+
const DEFAULT_RUNTIME_OIYO_APIS = [...DEFAULT_RUNTIME_OIYO_HTTP_APIS, ...DEFAULT_RUNTIME_OIYO_MIDDLEWARE_APIS];
|
|
116
|
+
const DEFAULT_RUNTIME_OIYO_HTTP_TYPES = [
|
|
117
|
+
"ResponseBodyType",
|
|
118
|
+
"HttpConfig",
|
|
119
|
+
"HttpCommonOptions",
|
|
120
|
+
"HttpDownloadOptions",
|
|
121
|
+
"HttpOptions",
|
|
122
|
+
"HttpRequestOptions",
|
|
123
|
+
"HttpUploadOptions",
|
|
124
|
+
"HttpDownloadResponse",
|
|
125
|
+
"HttpRequestResponse",
|
|
126
|
+
"HttpResponse",
|
|
127
|
+
"HttpUploadResponse"
|
|
128
|
+
];
|
|
129
|
+
const DEFAULT_RUNTIME_OIYO_MIDDLEWARE_TYPES = ["RouteMiddleware"];
|
|
105
130
|
const DEFAULT_RUNTIME_TYPES = [
|
|
106
131
|
"Component",
|
|
107
132
|
"ComponentPublicInstance",
|
|
@@ -121,17 +146,8 @@ const DEFAULT_RUNTIME_TYPES = [
|
|
|
121
146
|
"Slots",
|
|
122
147
|
"VNode",
|
|
123
148
|
"WritableComputedRef",
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
"HttpCommonOptions",
|
|
127
|
-
"HttpDownloadOptions",
|
|
128
|
-
"HttpOptions",
|
|
129
|
-
"HttpRequestOptions",
|
|
130
|
-
"HttpUploadOptions",
|
|
131
|
-
"HttpDownloadResponse",
|
|
132
|
-
"HttpRequestResponse",
|
|
133
|
-
"HttpResponse",
|
|
134
|
-
"HttpUploadResponse"
|
|
149
|
+
...DEFAULT_RUNTIME_OIYO_HTTP_TYPES,
|
|
150
|
+
...DEFAULT_RUNTIME_OIYO_MIDDLEWARE_TYPES
|
|
135
151
|
].map((name) => ({
|
|
136
152
|
name,
|
|
137
153
|
isType: true
|
|
@@ -162,7 +178,8 @@ const defaultConfig = {
|
|
|
162
178
|
dir: {
|
|
163
179
|
mainPackage: "pages",
|
|
164
180
|
subPackages: [],
|
|
165
|
-
layouts: "layouts"
|
|
181
|
+
layouts: "layouts",
|
|
182
|
+
middlewares: "middlewares"
|
|
166
183
|
},
|
|
167
184
|
scan: {
|
|
168
185
|
apis: [
|
|
@@ -214,4 +231,4 @@ function definePagesConfig(config) {
|
|
|
214
231
|
return config;
|
|
215
232
|
}
|
|
216
233
|
//#endregion
|
|
217
|
-
export { DEFAULT_EXCLUDE, defineOiyoConfig, definePagesConfig, resolveOiyoConfig };
|
|
234
|
+
export { DEFAULT_EXCLUDE, defineManifestConfig, defineOiyoConfig, definePagesConfig, resolveOiyoConfig };
|