@oiyo/config 0.5.0 → 0.6.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/dist/index.cjs +26 -14
- package/dist/index.d.cts +7 -2
- package/dist/index.d.mts +7 -2
- package/dist/index.mjs +26 -14
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @oiyo/config v0.
|
|
2
|
+
* @oiyo/config v0.6.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
|
|
@@ -119,13 +119,33 @@ const DEFAULT_RUNTIME_EFFECT_SCOPE_APIS = [
|
|
|
119
119
|
"getCurrentScope",
|
|
120
120
|
"onScopeDispose"
|
|
121
121
|
];
|
|
122
|
-
const
|
|
122
|
+
const DEFAULT_RUNTIME_OIYO_HTTP_APIS = [
|
|
123
123
|
"createHttpAborter",
|
|
124
124
|
"createHttp",
|
|
125
125
|
"http",
|
|
126
126
|
"HttpError",
|
|
127
127
|
"isHttpError"
|
|
128
128
|
];
|
|
129
|
+
const DEFAULT_RUNTIME_OIYO_MIDDLEWARE_APIS = [
|
|
130
|
+
"abortNavigation",
|
|
131
|
+
"defineRouteMiddleware",
|
|
132
|
+
"goTo"
|
|
133
|
+
];
|
|
134
|
+
const DEFAULT_RUNTIME_OIYO_APIS = [...DEFAULT_RUNTIME_OIYO_HTTP_APIS, ...DEFAULT_RUNTIME_OIYO_MIDDLEWARE_APIS];
|
|
135
|
+
const DEFAULT_RUNTIME_OIYO_HTTP_TYPES = [
|
|
136
|
+
"ResponseBodyType",
|
|
137
|
+
"HttpConfig",
|
|
138
|
+
"HttpCommonOptions",
|
|
139
|
+
"HttpDownloadOptions",
|
|
140
|
+
"HttpOptions",
|
|
141
|
+
"HttpRequestOptions",
|
|
142
|
+
"HttpUploadOptions",
|
|
143
|
+
"HttpDownloadResponse",
|
|
144
|
+
"HttpRequestResponse",
|
|
145
|
+
"HttpResponse",
|
|
146
|
+
"HttpUploadResponse"
|
|
147
|
+
];
|
|
148
|
+
const DEFAULT_RUNTIME_OIYO_MIDDLEWARE_TYPES = ["RouteMiddleware"];
|
|
129
149
|
const DEFAULT_RUNTIME_TYPES = [
|
|
130
150
|
"Component",
|
|
131
151
|
"ComponentPublicInstance",
|
|
@@ -145,17 +165,8 @@ const DEFAULT_RUNTIME_TYPES = [
|
|
|
145
165
|
"Slots",
|
|
146
166
|
"VNode",
|
|
147
167
|
"WritableComputedRef",
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
"HttpCommonOptions",
|
|
151
|
-
"HttpDownloadOptions",
|
|
152
|
-
"HttpOptions",
|
|
153
|
-
"HttpRequestOptions",
|
|
154
|
-
"HttpUploadOptions",
|
|
155
|
-
"HttpDownloadResponse",
|
|
156
|
-
"HttpRequestResponse",
|
|
157
|
-
"HttpResponse",
|
|
158
|
-
"HttpUploadResponse"
|
|
168
|
+
...DEFAULT_RUNTIME_OIYO_HTTP_TYPES,
|
|
169
|
+
...DEFAULT_RUNTIME_OIYO_MIDDLEWARE_TYPES
|
|
159
170
|
].map((name) => ({
|
|
160
171
|
name,
|
|
161
172
|
isType: true
|
|
@@ -186,7 +197,8 @@ const defaultConfig = {
|
|
|
186
197
|
dir: {
|
|
187
198
|
mainPackage: "pages",
|
|
188
199
|
subPackages: [],
|
|
189
|
-
layouts: "layouts"
|
|
200
|
+
layouts: "layouts",
|
|
201
|
+
middlewares: "middlewares"
|
|
190
202
|
},
|
|
191
203
|
scan: {
|
|
192
204
|
apis: [
|
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @oiyo/config v0.
|
|
2
|
+
* @oiyo/config v0.6.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
|
|
@@ -61,7 +61,7 @@ interface OiyoConfigDir {
|
|
|
61
61
|
mainPackage?: string;
|
|
62
62
|
/**
|
|
63
63
|
* 子包目录列表
|
|
64
|
-
* @default '<srcDir>/{root}/pages'
|
|
64
|
+
* @default '<srcDir>/packages/{root}/pages'
|
|
65
65
|
*/
|
|
66
66
|
subPackages?: string[];
|
|
67
67
|
/**
|
|
@@ -69,6 +69,11 @@ interface OiyoConfigDir {
|
|
|
69
69
|
* @default '<srcDir>/layouts'
|
|
70
70
|
*/
|
|
71
71
|
layouts?: string;
|
|
72
|
+
/**
|
|
73
|
+
* 中间件目录
|
|
74
|
+
* @default '<srcDir>/middlewares'
|
|
75
|
+
*/
|
|
76
|
+
middlewares?: string;
|
|
72
77
|
}
|
|
73
78
|
/**
|
|
74
79
|
* IDE 配置路径平台
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @oiyo/config v0.
|
|
2
|
+
* @oiyo/config v0.6.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
|
|
@@ -61,7 +61,7 @@ interface OiyoConfigDir {
|
|
|
61
61
|
mainPackage?: string;
|
|
62
62
|
/**
|
|
63
63
|
* 子包目录列表
|
|
64
|
-
* @default '<srcDir>/{root}/pages'
|
|
64
|
+
* @default '<srcDir>/packages/{root}/pages'
|
|
65
65
|
*/
|
|
66
66
|
subPackages?: string[];
|
|
67
67
|
/**
|
|
@@ -69,6 +69,11 @@ interface OiyoConfigDir {
|
|
|
69
69
|
* @default '<srcDir>/layouts'
|
|
70
70
|
*/
|
|
71
71
|
layouts?: string;
|
|
72
|
+
/**
|
|
73
|
+
* 中间件目录
|
|
74
|
+
* @default '<srcDir>/middlewares'
|
|
75
|
+
*/
|
|
76
|
+
middlewares?: string;
|
|
72
77
|
}
|
|
73
78
|
/**
|
|
74
79
|
* IDE 配置路径平台
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @oiyo/config v0.
|
|
2
|
+
* @oiyo/config v0.6.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
|
|
@@ -95,13 +95,33 @@ const DEFAULT_RUNTIME_EFFECT_SCOPE_APIS = [
|
|
|
95
95
|
"getCurrentScope",
|
|
96
96
|
"onScopeDispose"
|
|
97
97
|
];
|
|
98
|
-
const
|
|
98
|
+
const DEFAULT_RUNTIME_OIYO_HTTP_APIS = [
|
|
99
99
|
"createHttpAborter",
|
|
100
100
|
"createHttp",
|
|
101
101
|
"http",
|
|
102
102
|
"HttpError",
|
|
103
103
|
"isHttpError"
|
|
104
104
|
];
|
|
105
|
+
const DEFAULT_RUNTIME_OIYO_MIDDLEWARE_APIS = [
|
|
106
|
+
"abortNavigation",
|
|
107
|
+
"defineRouteMiddleware",
|
|
108
|
+
"goTo"
|
|
109
|
+
];
|
|
110
|
+
const DEFAULT_RUNTIME_OIYO_APIS = [...DEFAULT_RUNTIME_OIYO_HTTP_APIS, ...DEFAULT_RUNTIME_OIYO_MIDDLEWARE_APIS];
|
|
111
|
+
const DEFAULT_RUNTIME_OIYO_HTTP_TYPES = [
|
|
112
|
+
"ResponseBodyType",
|
|
113
|
+
"HttpConfig",
|
|
114
|
+
"HttpCommonOptions",
|
|
115
|
+
"HttpDownloadOptions",
|
|
116
|
+
"HttpOptions",
|
|
117
|
+
"HttpRequestOptions",
|
|
118
|
+
"HttpUploadOptions",
|
|
119
|
+
"HttpDownloadResponse",
|
|
120
|
+
"HttpRequestResponse",
|
|
121
|
+
"HttpResponse",
|
|
122
|
+
"HttpUploadResponse"
|
|
123
|
+
];
|
|
124
|
+
const DEFAULT_RUNTIME_OIYO_MIDDLEWARE_TYPES = ["RouteMiddleware"];
|
|
105
125
|
const DEFAULT_RUNTIME_TYPES = [
|
|
106
126
|
"Component",
|
|
107
127
|
"ComponentPublicInstance",
|
|
@@ -121,17 +141,8 @@ const DEFAULT_RUNTIME_TYPES = [
|
|
|
121
141
|
"Slots",
|
|
122
142
|
"VNode",
|
|
123
143
|
"WritableComputedRef",
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
"HttpCommonOptions",
|
|
127
|
-
"HttpDownloadOptions",
|
|
128
|
-
"HttpOptions",
|
|
129
|
-
"HttpRequestOptions",
|
|
130
|
-
"HttpUploadOptions",
|
|
131
|
-
"HttpDownloadResponse",
|
|
132
|
-
"HttpRequestResponse",
|
|
133
|
-
"HttpResponse",
|
|
134
|
-
"HttpUploadResponse"
|
|
144
|
+
...DEFAULT_RUNTIME_OIYO_HTTP_TYPES,
|
|
145
|
+
...DEFAULT_RUNTIME_OIYO_MIDDLEWARE_TYPES
|
|
135
146
|
].map((name) => ({
|
|
136
147
|
name,
|
|
137
148
|
isType: true
|
|
@@ -162,7 +173,8 @@ const defaultConfig = {
|
|
|
162
173
|
dir: {
|
|
163
174
|
mainPackage: "pages",
|
|
164
175
|
subPackages: [],
|
|
165
|
-
layouts: "layouts"
|
|
176
|
+
layouts: "layouts",
|
|
177
|
+
middlewares: "middlewares"
|
|
166
178
|
},
|
|
167
179
|
scan: {
|
|
168
180
|
apis: [
|