@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.
@@ -19,3 +19,10 @@ Oiyo may rely on third-party components for runtime, build, framework integratio
19
19
  - Provider: Vue team
20
20
  - Upstream: `https://github.com/vuejs/core`
21
21
  - License: MIT
22
+
23
+ ## @uni-helper/uni-manifest-types
24
+
25
+ - Name: `@uni-helper/uni-manifest-types`
26
+ - Provider: uni-helper
27
+ - Upstream: `https://github.com/uni-helper/vite-plugin-uni-manifest/tree/main/packages/types`
28
+ - License: MIT
package/dist/index.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @oiyo/config v0.5.0
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
@@ -30,6 +30,11 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
30
30
  let defu = require("defu");
31
31
  let node_process = require("node:process");
32
32
  node_process = __toESM(node_process, 1);
33
+ //#region src/manifest/index.ts
34
+ function defineManifestConfig(config) {
35
+ return config;
36
+ }
37
+ //#endregion
33
38
  //#region src/oiyo/default.ts
34
39
  const DEFAULT_RUNTIME_LIFECYCLE_APIS = [
35
40
  "onBeforeMount",
@@ -119,13 +124,33 @@ const DEFAULT_RUNTIME_EFFECT_SCOPE_APIS = [
119
124
  "getCurrentScope",
120
125
  "onScopeDispose"
121
126
  ];
122
- const DEFAULT_RUNTIME_OIYO_APIS = [
127
+ const DEFAULT_RUNTIME_OIYO_HTTP_APIS = [
123
128
  "createHttpAborter",
124
129
  "createHttp",
125
130
  "http",
126
131
  "HttpError",
127
132
  "isHttpError"
128
133
  ];
134
+ const DEFAULT_RUNTIME_OIYO_MIDDLEWARE_APIS = [
135
+ "abortNavigation",
136
+ "defineRouteMiddleware",
137
+ "goTo"
138
+ ];
139
+ const DEFAULT_RUNTIME_OIYO_APIS = [...DEFAULT_RUNTIME_OIYO_HTTP_APIS, ...DEFAULT_RUNTIME_OIYO_MIDDLEWARE_APIS];
140
+ const DEFAULT_RUNTIME_OIYO_HTTP_TYPES = [
141
+ "ResponseBodyType",
142
+ "HttpConfig",
143
+ "HttpCommonOptions",
144
+ "HttpDownloadOptions",
145
+ "HttpOptions",
146
+ "HttpRequestOptions",
147
+ "HttpUploadOptions",
148
+ "HttpDownloadResponse",
149
+ "HttpRequestResponse",
150
+ "HttpResponse",
151
+ "HttpUploadResponse"
152
+ ];
153
+ const DEFAULT_RUNTIME_OIYO_MIDDLEWARE_TYPES = ["RouteMiddleware"];
129
154
  const DEFAULT_RUNTIME_TYPES = [
130
155
  "Component",
131
156
  "ComponentPublicInstance",
@@ -145,17 +170,8 @@ const DEFAULT_RUNTIME_TYPES = [
145
170
  "Slots",
146
171
  "VNode",
147
172
  "WritableComputedRef",
148
- "ResponseBodyType",
149
- "HttpConfig",
150
- "HttpCommonOptions",
151
- "HttpDownloadOptions",
152
- "HttpOptions",
153
- "HttpRequestOptions",
154
- "HttpUploadOptions",
155
- "HttpDownloadResponse",
156
- "HttpRequestResponse",
157
- "HttpResponse",
158
- "HttpUploadResponse"
173
+ ...DEFAULT_RUNTIME_OIYO_HTTP_TYPES,
174
+ ...DEFAULT_RUNTIME_OIYO_MIDDLEWARE_TYPES
159
175
  ].map((name) => ({
160
176
  name,
161
177
  isType: true
@@ -186,7 +202,8 @@ const defaultConfig = {
186
202
  dir: {
187
203
  mainPackage: "pages",
188
204
  subPackages: [],
189
- layouts: "layouts"
205
+ layouts: "layouts",
206
+ middlewares: "middlewares"
190
207
  },
191
208
  scan: {
192
209
  apis: [
@@ -239,6 +256,7 @@ function definePagesConfig(config) {
239
256
  }
240
257
  //#endregion
241
258
  exports.DEFAULT_EXCLUDE = DEFAULT_EXCLUDE;
259
+ exports.defineManifestConfig = defineManifestConfig;
242
260
  exports.defineOiyoConfig = defineOiyoConfig;
243
261
  exports.definePagesConfig = definePagesConfig;
244
262
  exports.resolveOiyoConfig = resolveOiyoConfig;