@vlian/framework 1.2.38 → 1.2.39
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/analytics.umd.js +1 -1
- package/dist/core/router/errors/RouterError.cjs +4 -4
- package/dist/core/router/errors/RouterError.cjs.map +1 -1
- package/dist/core/router/errors/RouterError.d.ts +4 -3
- package/dist/core/router/errors/RouterError.js +1 -1
- package/dist/core/router/errors/RouterError.js.map +1 -1
- package/dist/index.cjs +0 -112
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +0 -4
- package/dist/index.js +0 -8
- package/dist/index.js.map +1 -1
- package/dist/index.umd.js +25 -115
- package/dist/index.umd.js.map +1 -1
- package/dist/state.umd.js +1 -1
- package/package.json +1 -1
package/dist/analytics.umd.js
CHANGED
|
@@ -21,7 +21,7 @@ _export(exports, {
|
|
|
21
21
|
return createRouterError;
|
|
22
22
|
}
|
|
23
23
|
});
|
|
24
|
-
const
|
|
24
|
+
const _errors = require("../../../utils/errors");
|
|
25
25
|
var RouterErrorCode = /*#__PURE__*/ function(RouterErrorCode) {
|
|
26
26
|
/**
|
|
27
27
|
* 路由未初始化
|
|
@@ -46,9 +46,9 @@ var RouterErrorCode = /*#__PURE__*/ function(RouterErrorCode) {
|
|
|
46
46
|
*/ RouterErrorCode["ROUTE_TRANSFORM_FAILED"] = "ROUTE_TRANSFORM_FAILED";
|
|
47
47
|
return RouterErrorCode;
|
|
48
48
|
}({});
|
|
49
|
-
let RouterError = class RouterError extends
|
|
50
|
-
constructor(message, code, severity =
|
|
51
|
-
super(message,
|
|
49
|
+
let RouterError = class RouterError extends _errors.FrameworkError {
|
|
50
|
+
constructor(message, code, severity = _errors.ErrorSeverity.MEDIUM, cause, context){
|
|
51
|
+
super(message, _errors.ErrorType.RUNTIME, severity, {
|
|
52
52
|
code,
|
|
53
53
|
originalError: cause,
|
|
54
54
|
context: context || {}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/core/router/errors/RouterError.ts"],"sourcesContent":["/**\n * 路由错误类型定义\n */\n\nimport { FrameworkError, ErrorSeverity, ErrorType } from '@vlian/utils';\n\n/**\n * 路由错误代码\n */\nexport enum RouterErrorCode {\n /**\n * 路由未初始化\n */\n ROUTER_NOT_INITIALIZED = 'ROUTER_NOT_INITIALIZED',\n\n /**\n * 路由配置错误\n */\n ROUTER_CONFIG_ERROR = 'ROUTER_CONFIG_ERROR',\n\n /**\n * 路由未找到\n */\n ROUTE_NOT_FOUND = 'ROUTE_NOT_FOUND',\n\n /**\n * 路由导航失败\n */\n ROUTE_NAVIGATION_FAILED = 'ROUTE_NAVIGATION_FAILED',\n\n /**\n * 路由权限不足\n */\n ROUTE_PERMISSION_DENIED = 'ROUTE_PERMISSION_DENIED',\n\n /**\n * 路由组件加载失败\n */\n ROUTE_COMPONENT_LOAD_FAILED = 'ROUTE_COMPONENT_LOAD_FAILED',\n\n /**\n * 路由转换失败\n */\n ROUTE_TRANSFORM_FAILED = 'ROUTE_TRANSFORM_FAILED',\n}\n\n/**\n * 路由错误\n */\nexport class RouterError extends FrameworkError {\n constructor(\n message: string,\n code: RouterErrorCode,\n severity:
|
|
1
|
+
{"version":3,"sources":["../../../../src/core/router/errors/RouterError.ts"],"sourcesContent":["/**\n * 路由错误类型定义\n */\n\nimport { FrameworkError, ErrorSeverity, ErrorType } from '../../../utils/errors';\nimport type { ErrorSeverity as ErrorSeverityType } from '@vlian/utils';\n\n/**\n * 路由错误代码\n */\nexport enum RouterErrorCode {\n /**\n * 路由未初始化\n */\n ROUTER_NOT_INITIALIZED = 'ROUTER_NOT_INITIALIZED',\n\n /**\n * 路由配置错误\n */\n ROUTER_CONFIG_ERROR = 'ROUTER_CONFIG_ERROR',\n\n /**\n * 路由未找到\n */\n ROUTE_NOT_FOUND = 'ROUTE_NOT_FOUND',\n\n /**\n * 路由导航失败\n */\n ROUTE_NAVIGATION_FAILED = 'ROUTE_NAVIGATION_FAILED',\n\n /**\n * 路由权限不足\n */\n ROUTE_PERMISSION_DENIED = 'ROUTE_PERMISSION_DENIED',\n\n /**\n * 路由组件加载失败\n */\n ROUTE_COMPONENT_LOAD_FAILED = 'ROUTE_COMPONENT_LOAD_FAILED',\n\n /**\n * 路由转换失败\n */\n ROUTE_TRANSFORM_FAILED = 'ROUTE_TRANSFORM_FAILED',\n}\n\n/**\n * 路由错误\n */\nexport class RouterError extends FrameworkError {\n constructor(\n message: string,\n code: RouterErrorCode,\n severity: ErrorSeverityType = ErrorSeverity.MEDIUM,\n cause?: Error,\n context?: Record<string, unknown>\n ) {\n super(message, ErrorType.RUNTIME, severity, {\n code,\n originalError: cause,\n context: context || {},\n });\n this.name = 'RouterError';\n }\n}\n\n/**\n * 创建路由错误\n */\nexport function createRouterError(\n message: string,\n code: RouterErrorCode,\n severity?: ErrorSeverityType,\n cause?: Error,\n context?: Record<string, unknown>\n): RouterError {\n return new RouterError(message, code, severity, cause, context);\n}\n"],"names":["RouterError","RouterErrorCode","createRouterError","FrameworkError","message","code","severity","ErrorSeverity","MEDIUM","cause","context","ErrorType","RUNTIME","originalError","name"],"mappings":"AAAA;;CAEC;;;;;;;;;;;QAgDYA;eAAAA;;QAxCDC;eAAAA;;QA4DIC;eAAAA;;;wBAlEyC;AAMlD,IAAA,AAAKD,yCAAAA;IACV;;GAEC;IAGD;;GAEC;IAGD;;GAEC;IAGD;;GAEC;IAGD;;GAEC;IAGD;;GAEC;IAGD;;GAEC;WAjCSA;;AAwCL,IAAA,AAAMD,cAAN,MAAMA,oBAAoBG,sBAAc;IAC7C,YACEC,OAAe,EACfC,IAAqB,EACrBC,WAA8BC,qBAAa,CAACC,MAAM,EAClDC,KAAa,EACbC,OAAiC,CACjC;QACA,KAAK,CAACN,SAASO,iBAAS,CAACC,OAAO,EAAEN,UAAU;YAC1CD;YACAQ,eAAeJ;YACfC,SAASA,WAAW,CAAC;QACvB;QACA,IAAI,CAACI,IAAI,GAAG;IACd;AACF;AAKO,SAASZ,kBACdE,OAAe,EACfC,IAAqB,EACrBC,QAA4B,EAC5BG,KAAa,EACbC,OAAiC;IAEjC,OAAO,IAAIV,YAAYI,SAASC,MAAMC,UAAUG,OAAOC;AACzD"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* 路由错误类型定义
|
|
3
3
|
*/
|
|
4
|
-
import { FrameworkError
|
|
4
|
+
import { FrameworkError } from '../../../utils/errors';
|
|
5
|
+
import type { ErrorSeverity as ErrorSeverityType } from '@vlian/utils';
|
|
5
6
|
/**
|
|
6
7
|
* 路由错误代码
|
|
7
8
|
*/
|
|
@@ -39,9 +40,9 @@ export declare enum RouterErrorCode {
|
|
|
39
40
|
* 路由错误
|
|
40
41
|
*/
|
|
41
42
|
export declare class RouterError extends FrameworkError {
|
|
42
|
-
constructor(message: string, code: RouterErrorCode, severity?:
|
|
43
|
+
constructor(message: string, code: RouterErrorCode, severity?: ErrorSeverityType, cause?: Error, context?: Record<string, unknown>);
|
|
43
44
|
}
|
|
44
45
|
/**
|
|
45
46
|
* 创建路由错误
|
|
46
47
|
*/
|
|
47
|
-
export declare function createRouterError(message: string, code: RouterErrorCode, severity?:
|
|
48
|
+
export declare function createRouterError(message: string, code: RouterErrorCode, severity?: ErrorSeverityType, cause?: Error, context?: Record<string, unknown>): RouterError;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* 路由错误类型定义
|
|
3
|
-
*/ import { FrameworkError, ErrorSeverity, ErrorType } from "
|
|
3
|
+
*/ import { FrameworkError, ErrorSeverity, ErrorType } from "../../../utils/errors";
|
|
4
4
|
/**
|
|
5
5
|
* 路由错误代码
|
|
6
6
|
*/ export var RouterErrorCode = /*#__PURE__*/ function(RouterErrorCode) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/core/router/errors/RouterError.ts"],"sourcesContent":["/**\n * 路由错误类型定义\n */\n\nimport { FrameworkError, ErrorSeverity, ErrorType } from '@vlian/utils';\n\n/**\n * 路由错误代码\n */\nexport enum RouterErrorCode {\n /**\n * 路由未初始化\n */\n ROUTER_NOT_INITIALIZED = 'ROUTER_NOT_INITIALIZED',\n\n /**\n * 路由配置错误\n */\n ROUTER_CONFIG_ERROR = 'ROUTER_CONFIG_ERROR',\n\n /**\n * 路由未找到\n */\n ROUTE_NOT_FOUND = 'ROUTE_NOT_FOUND',\n\n /**\n * 路由导航失败\n */\n ROUTE_NAVIGATION_FAILED = 'ROUTE_NAVIGATION_FAILED',\n\n /**\n * 路由权限不足\n */\n ROUTE_PERMISSION_DENIED = 'ROUTE_PERMISSION_DENIED',\n\n /**\n * 路由组件加载失败\n */\n ROUTE_COMPONENT_LOAD_FAILED = 'ROUTE_COMPONENT_LOAD_FAILED',\n\n /**\n * 路由转换失败\n */\n ROUTE_TRANSFORM_FAILED = 'ROUTE_TRANSFORM_FAILED',\n}\n\n/**\n * 路由错误\n */\nexport class RouterError extends FrameworkError {\n constructor(\n message: string,\n code: RouterErrorCode,\n severity:
|
|
1
|
+
{"version":3,"sources":["../../../../src/core/router/errors/RouterError.ts"],"sourcesContent":["/**\n * 路由错误类型定义\n */\n\nimport { FrameworkError, ErrorSeverity, ErrorType } from '../../../utils/errors';\nimport type { ErrorSeverity as ErrorSeverityType } from '@vlian/utils';\n\n/**\n * 路由错误代码\n */\nexport enum RouterErrorCode {\n /**\n * 路由未初始化\n */\n ROUTER_NOT_INITIALIZED = 'ROUTER_NOT_INITIALIZED',\n\n /**\n * 路由配置错误\n */\n ROUTER_CONFIG_ERROR = 'ROUTER_CONFIG_ERROR',\n\n /**\n * 路由未找到\n */\n ROUTE_NOT_FOUND = 'ROUTE_NOT_FOUND',\n\n /**\n * 路由导航失败\n */\n ROUTE_NAVIGATION_FAILED = 'ROUTE_NAVIGATION_FAILED',\n\n /**\n * 路由权限不足\n */\n ROUTE_PERMISSION_DENIED = 'ROUTE_PERMISSION_DENIED',\n\n /**\n * 路由组件加载失败\n */\n ROUTE_COMPONENT_LOAD_FAILED = 'ROUTE_COMPONENT_LOAD_FAILED',\n\n /**\n * 路由转换失败\n */\n ROUTE_TRANSFORM_FAILED = 'ROUTE_TRANSFORM_FAILED',\n}\n\n/**\n * 路由错误\n */\nexport class RouterError extends FrameworkError {\n constructor(\n message: string,\n code: RouterErrorCode,\n severity: ErrorSeverityType = ErrorSeverity.MEDIUM,\n cause?: Error,\n context?: Record<string, unknown>\n ) {\n super(message, ErrorType.RUNTIME, severity, {\n code,\n originalError: cause,\n context: context || {},\n });\n this.name = 'RouterError';\n }\n}\n\n/**\n * 创建路由错误\n */\nexport function createRouterError(\n message: string,\n code: RouterErrorCode,\n severity?: ErrorSeverityType,\n cause?: Error,\n context?: Record<string, unknown>\n): RouterError {\n return new RouterError(message, code, severity, cause, context);\n}\n"],"names":["FrameworkError","ErrorSeverity","ErrorType","RouterErrorCode","RouterError","message","code","severity","MEDIUM","cause","context","RUNTIME","originalError","name","createRouterError"],"mappings":"AAAA;;CAEC,GAED,SAASA,cAAc,EAAEC,aAAa,EAAEC,SAAS,QAAQ,wBAAwB;AAGjF;;CAEC,GACD,OAAO,IAAA,AAAKC,yCAAAA;IACV;;GAEC;IAGD;;GAEC;IAGD;;GAEC;IAGD;;GAEC;IAGD;;GAEC;IAGD;;GAEC;IAGD;;GAEC;WAjCSA;MAmCX;AAED;;CAEC,GACD,OAAO,MAAMC,oBAAoBJ;IAC/B,YACEK,OAAe,EACfC,IAAqB,EACrBC,WAA8BN,cAAcO,MAAM,EAClDC,KAAa,EACbC,OAAiC,CACjC;QACA,KAAK,CAACL,SAASH,UAAUS,OAAO,EAAEJ,UAAU;YAC1CD;YACAM,eAAeH;YACfC,SAASA,WAAW,CAAC;QACvB;QACA,IAAI,CAACG,IAAI,GAAG;IACd;AACF;AAEA;;CAEC,GACD,OAAO,SAASC,kBACdT,OAAe,EACfC,IAAqB,EACrBC,QAA4B,EAC5BE,KAAa,EACbC,OAAiC;IAEjC,OAAO,IAAIN,YAAYC,SAASC,MAAMC,UAAUE,OAAOC;AACzD"}
|
package/dist/index.cjs
CHANGED
|
@@ -15,72 +15,12 @@ _export(exports, {
|
|
|
15
15
|
get Kernel () {
|
|
16
16
|
return _kernel.Kernel;
|
|
17
17
|
},
|
|
18
|
-
get MonitoringEventType () {
|
|
19
|
-
return _request.MonitoringEventType;
|
|
20
|
-
},
|
|
21
|
-
get PluginLifecycleStage () {
|
|
22
|
-
return _request.PluginLifecycleStage;
|
|
23
|
-
},
|
|
24
|
-
get PluginPriority () {
|
|
25
|
-
return _request.PluginPriority;
|
|
26
|
-
},
|
|
27
|
-
get RequestClient () {
|
|
28
|
-
return _request.RequestClient;
|
|
29
|
-
},
|
|
30
|
-
get RequestErrorCode () {
|
|
31
|
-
return _request.RequestErrorCode;
|
|
32
|
-
},
|
|
33
|
-
get RequestErrorType () {
|
|
34
|
-
return _request.RequestErrorType;
|
|
35
|
-
},
|
|
36
|
-
get RequestPluginManager () {
|
|
37
|
-
return _request.PluginManager;
|
|
38
|
-
},
|
|
39
|
-
get adapterRegistry () {
|
|
40
|
-
return _request.adapterRegistry;
|
|
41
|
-
},
|
|
42
|
-
get axiosAdapter () {
|
|
43
|
-
return _request.axiosAdapter;
|
|
44
|
-
},
|
|
45
|
-
get cancelRequestContext () {
|
|
46
|
-
return _request.cancelRequestContext;
|
|
47
|
-
},
|
|
48
|
-
get completeRequestContext () {
|
|
49
|
-
return _request.completeRequestContext;
|
|
50
|
-
},
|
|
51
|
-
get createCachePlugin () {
|
|
52
|
-
return _request.createCachePlugin;
|
|
53
|
-
},
|
|
54
|
-
get createMonitoringPlugin () {
|
|
55
|
-
return _request.createMonitoringPlugin;
|
|
56
|
-
},
|
|
57
|
-
get createRequestClient () {
|
|
58
|
-
return _request.createRequestClient;
|
|
59
|
-
},
|
|
60
|
-
get createRequestContext () {
|
|
61
|
-
return _request.createRequestContext;
|
|
62
|
-
},
|
|
63
|
-
get createRetryPlugin () {
|
|
64
|
-
return _request.createRetryPlugin;
|
|
65
|
-
},
|
|
66
|
-
get createValidationPlugin () {
|
|
67
|
-
return _request.createValidationPlugin;
|
|
68
|
-
},
|
|
69
|
-
get failRequestContext () {
|
|
70
|
-
return _request.failRequestContext;
|
|
71
|
-
},
|
|
72
|
-
get fetchAdapter () {
|
|
73
|
-
return _request.fetchAdapter;
|
|
74
|
-
},
|
|
75
18
|
get getKernel () {
|
|
76
19
|
return _kernel.getKernel;
|
|
77
20
|
},
|
|
78
21
|
get kernelStartApp () {
|
|
79
22
|
return _kernel.kernelStartApp;
|
|
80
23
|
},
|
|
81
|
-
get kyAdapter () {
|
|
82
|
-
return _request.kyAdapter;
|
|
83
|
-
},
|
|
84
24
|
get setLang () {
|
|
85
25
|
return _library.setLang;
|
|
86
26
|
},
|
|
@@ -89,12 +29,6 @@ _export(exports, {
|
|
|
89
29
|
},
|
|
90
30
|
get startup () {
|
|
91
31
|
return _kernel.startup;
|
|
92
|
-
},
|
|
93
|
-
get undiciAdapter () {
|
|
94
|
-
return undiciAdapter;
|
|
95
|
-
},
|
|
96
|
-
get updateRequestContext () {
|
|
97
|
-
return _request.updateRequestContext;
|
|
98
32
|
}
|
|
99
33
|
});
|
|
100
34
|
const _library = require("./library");
|
|
@@ -102,7 +36,6 @@ _export_star(require("./core"), exports);
|
|
|
102
36
|
_export_star(require("./utils"), exports);
|
|
103
37
|
_export_star(require("./state"), exports);
|
|
104
38
|
_export_star(require("./components"), exports);
|
|
105
|
-
const _request = require("@vlian/request");
|
|
106
39
|
const _kernel = require("./kernel");
|
|
107
40
|
function _export_star(from, to) {
|
|
108
41
|
Object.keys(from).forEach(function(k) {
|
|
@@ -117,50 +50,5 @@ function _export_star(from, to) {
|
|
|
117
50
|
});
|
|
118
51
|
return from;
|
|
119
52
|
}
|
|
120
|
-
function _getRequireWildcardCache(nodeInterop) {
|
|
121
|
-
if (typeof WeakMap !== "function") return null;
|
|
122
|
-
var cacheBabelInterop = new WeakMap();
|
|
123
|
-
var cacheNodeInterop = new WeakMap();
|
|
124
|
-
return (_getRequireWildcardCache = function(nodeInterop) {
|
|
125
|
-
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
|
|
126
|
-
})(nodeInterop);
|
|
127
|
-
}
|
|
128
|
-
function _interop_require_wildcard(obj, nodeInterop) {
|
|
129
|
-
if (!nodeInterop && obj && obj.__esModule) {
|
|
130
|
-
return obj;
|
|
131
|
-
}
|
|
132
|
-
if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
|
|
133
|
-
return {
|
|
134
|
-
default: obj
|
|
135
|
-
};
|
|
136
|
-
}
|
|
137
|
-
var cache = _getRequireWildcardCache(nodeInterop);
|
|
138
|
-
if (cache && cache.has(obj)) {
|
|
139
|
-
return cache.get(obj);
|
|
140
|
-
}
|
|
141
|
-
var newObj = {
|
|
142
|
-
__proto__: null
|
|
143
|
-
};
|
|
144
|
-
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
145
|
-
for(var key in obj){
|
|
146
|
-
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
147
|
-
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
|
148
|
-
if (desc && (desc.get || desc.set)) {
|
|
149
|
-
Object.defineProperty(newObj, key, desc);
|
|
150
|
-
} else {
|
|
151
|
-
newObj[key] = obj[key];
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
newObj.default = obj;
|
|
156
|
-
if (cache) {
|
|
157
|
-
cache.set(obj, newObj);
|
|
158
|
-
}
|
|
159
|
-
return newObj;
|
|
160
|
-
}
|
|
161
|
-
async function undiciAdapter() {
|
|
162
|
-
const { undiciAdapter: adapter } = await Promise.resolve().then(()=>/*#__PURE__*/ _interop_require_wildcard(require("@vlian/request")));
|
|
163
|
-
return adapter();
|
|
164
|
-
}
|
|
165
53
|
|
|
166
54
|
//# sourceMappingURL=index.js.map
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["import { setupI18n, setLang, $t } from './library';\n\nexport * from './core';\nexport * from './utils';\nexport * from './state';\nexport * from './components';\n\n
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["import { setupI18n, setLang, $t } from './library';\n\nexport * from './core';\nexport * from './utils';\nexport * from './state';\nexport * from './components';\n\n/**\n * 国际化\n **/\nexport { setupI18n, setLang, $t };\n\n\nexport { Kernel, startup, getKernel, kernelStartApp } from './kernel';\nexport type {\n KernelStartOptions as KernelStartupOptions,\n KernelConfig as KernelRuntimeConfig,\n KernelTimingMetric as KernelRuntimeTimingMetric,\n KernelManager as RuntimeKernelManager,\n} from './kernel';\n"],"names":["$t","Kernel","getKernel","kernelStartApp","setLang","setupI18n","startup"],"mappings":";;;;;;;;;;;QAU6BA;eAAAA,WAAE;;QAGtBC;eAAAA,cAAM;;QAAWC;eAAAA,iBAAS;;QAAEC;eAAAA,sBAAc;;QAH/BC;eAAAA,gBAAO;;QAAlBC;eAAAA,kBAAS;;QAGDC;eAAAA,eAAO;;;yBAbe;qBAEzB;qBACA;qBACA;qBACA;wBAQ6C"}
|
package/dist/index.d.ts
CHANGED
|
@@ -3,10 +3,6 @@ export * from './core';
|
|
|
3
3
|
export * from './utils';
|
|
4
4
|
export * from './state';
|
|
5
5
|
export * from './components';
|
|
6
|
-
export { RequestClient, createRequestClient, adapterRegistry, fetchAdapter, kyAdapter, axiosAdapter, PluginManager as RequestPluginManager, PluginLifecycleStage, PluginPriority, createCachePlugin, createRetryPlugin, createValidationPlugin, createMonitoringPlugin, createRequestContext, updateRequestContext, completeRequestContext, failRequestContext, cancelRequestContext, RequestErrorType, RequestErrorCode, } from '@vlian/request';
|
|
7
|
-
export declare function undiciAdapter(): Promise<import("@vlian/request").RequestAdapter>;
|
|
8
|
-
export type { RequestOptions, Response, RequestContext, RequestError, RequestClientConfig, RequestHeaders, RequestQuery, RequestBody, HttpMethod, RetryConfig, CacheConfig, ValidationConfig, AdapterCapabilities, RequestAdapter, AdapterFactory as RequestAdapterFactory, RequestPlugin, CachePluginConfig, RetryPluginConfig, ValidationPluginConfig, MonitoringPluginConfig, MonitoringEvent, MonitoringReporter, } from '@vlian/request';
|
|
9
|
-
export { MonitoringEventType } from '@vlian/request';
|
|
10
6
|
/**
|
|
11
7
|
* 国际化
|
|
12
8
|
**/
|
package/dist/index.js
CHANGED
|
@@ -3,14 +3,6 @@ export * from "./core";
|
|
|
3
3
|
export * from "./utils";
|
|
4
4
|
export * from "./state";
|
|
5
5
|
export * from "./components";
|
|
6
|
-
// 导出请求库(使用命名空间避免冲突)
|
|
7
|
-
export { RequestClient, createRequestClient, adapterRegistry, fetchAdapter, kyAdapter, axiosAdapter, PluginManager as RequestPluginManager, PluginLifecycleStage, PluginPriority, createCachePlugin, createRetryPlugin, createValidationPlugin, createMonitoringPlugin, createRequestContext, updateRequestContext, completeRequestContext, failRequestContext, cancelRequestContext, RequestErrorType, RequestErrorCode } from "@vlian/request";
|
|
8
|
-
// undiciAdapter 使用懒加载,避免在未使用时触发依赖检查
|
|
9
|
-
export async function undiciAdapter() {
|
|
10
|
-
const { undiciAdapter: adapter } = await import("@vlian/request");
|
|
11
|
-
return adapter();
|
|
12
|
-
}
|
|
13
|
-
export { MonitoringEventType } from "@vlian/request";
|
|
14
6
|
/**
|
|
15
7
|
* 国际化
|
|
16
8
|
**/ export { setupI18n, setLang, $t };
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["import { setupI18n, setLang, $t } from './library';\n\nexport * from './core';\nexport * from './utils';\nexport * from './state';\nexport * from './components';\n\n
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["import { setupI18n, setLang, $t } from './library';\n\nexport * from './core';\nexport * from './utils';\nexport * from './state';\nexport * from './components';\n\n/**\n * 国际化\n **/\nexport { setupI18n, setLang, $t };\n\n\nexport { Kernel, startup, getKernel, kernelStartApp } from './kernel';\nexport type {\n KernelStartOptions as KernelStartupOptions,\n KernelConfig as KernelRuntimeConfig,\n KernelTimingMetric as KernelRuntimeTimingMetric,\n KernelManager as RuntimeKernelManager,\n} from './kernel';\n"],"names":["setupI18n","setLang","$t","Kernel","startup","getKernel","kernelStartApp"],"mappings":"AAAA,SAASA,SAAS,EAAEC,OAAO,EAAEC,EAAE,QAAQ,YAAY;AAEnD,cAAc,SAAS;AACvB,cAAc,UAAU;AACxB,cAAc,UAAU;AACxB,cAAc,eAAe;AAE7B;;EAEE,GACF,SAASF,SAAS,EAAEC,OAAO,EAAEC,EAAE,GAAG;AAGlC,SAASC,MAAM,EAAEC,OAAO,EAAEC,SAAS,EAAEC,cAAc,QAAQ,WAAW"}
|
package/dist/index.umd.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @vlian/framework v1.2.
|
|
2
|
+
* @vlian/framework v1.2.38
|
|
3
3
|
* Secra Framework - 一个现代化的低代码框架
|
|
4
4
|
* (c) 2026 Secra Framework Contributors
|
|
5
5
|
* Licensed under Apache-2.0
|
|
6
6
|
*/
|
|
7
7
|
(function (global, factory) {
|
|
8
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@vlian/utils'), require('@vlian/logger'), require('@vlian/monitoring'), require('react/jsx-runtime'), require('react-dom/client'), require('react'), require('react-router-dom'), require('zod'), require('i18next'), require('react-i18next'), require('@vlian/
|
|
9
|
-
typeof define === 'function' && define.amd ? define(['exports', '@vlian/utils', '@vlian/logger', '@vlian/monitoring', 'react/jsx-runtime', 'react-dom/client', 'react', 'react-router-dom', 'zod', 'i18next', 'react-i18next', '@vlian/
|
|
10
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.vlianFramework = {}, global.vlianUtils, global.logger, global.monitoring, global.jsxRuntime, global.ReactDOMClient, global.React, global.ReactRouterDOM, global.z, global.i18next, global.ReactI18next, global.
|
|
11
|
-
})(this, (function (exports, vlianUtils, logger, monitoring, jsxRuntime, client, React, reactRouterDom, zod, i18n, reactI18next,
|
|
8
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@vlian/utils'), require('@vlian/logger'), require('@vlian/monitoring'), require('react/jsx-runtime'), require('react-dom/client'), require('react'), require('react-router-dom'), require('zod'), require('i18next'), require('react-i18next'), require('@vlian/csrf')) :
|
|
9
|
+
typeof define === 'function' && define.amd ? define(['exports', '@vlian/utils', '@vlian/logger', '@vlian/monitoring', 'react/jsx-runtime', 'react-dom/client', 'react', 'react-router-dom', 'zod', 'i18next', 'react-i18next', '@vlian/csrf'], factory) :
|
|
10
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.vlianFramework = {}, global.vlianUtils, global.logger, global.monitoring, global.jsxRuntime, global.ReactDOMClient, global.React, global.ReactRouterDOM, global.z, global.i18next, global.ReactI18next, global.csrf));
|
|
11
|
+
})(this, (function (exports, vlianUtils, logger, monitoring, jsxRuntime, client, React, reactRouterDom, zod, i18n, reactI18next, csrf) { 'use strict';
|
|
12
12
|
|
|
13
13
|
function _interopNamespaceDefault(e) {
|
|
14
14
|
var n = Object.create(null);
|
|
@@ -6971,6 +6971,22 @@
|
|
|
6971
6971
|
};
|
|
6972
6972
|
}
|
|
6973
6973
|
|
|
6974
|
+
const utils = vlianUtils__namespace;
|
|
6975
|
+
const ErrorCode = utils.ErrorCode;
|
|
6976
|
+
const ErrorMessages = utils.ErrorMessages;
|
|
6977
|
+
const getErrorMessage = utils.getErrorMessage;
|
|
6978
|
+
const getUserFriendlyMessage = utils.getUserFriendlyMessage;
|
|
6979
|
+
const ErrorType = utils.ErrorType;
|
|
6980
|
+
const ErrorSeverity = utils.ErrorSeverity;
|
|
6981
|
+
const FrameworkError = utils.FrameworkError;
|
|
6982
|
+
const InitializationError = utils.InitializationError;
|
|
6983
|
+
const ConfigError = utils.ConfigError;
|
|
6984
|
+
const StorageError = utils.StorageError;
|
|
6985
|
+
const NetworkError = utils.NetworkError;
|
|
6986
|
+
const ValidationError = utils.ValidationError;
|
|
6987
|
+
const SecurityError = utils.SecurityError;
|
|
6988
|
+
const errorUtils = utils.errorUtils;
|
|
6989
|
+
|
|
6974
6990
|
/**
|
|
6975
6991
|
* 路由错误代码
|
|
6976
6992
|
*/ var RouterErrorCode = /*#__PURE__*/ function(RouterErrorCode) {
|
|
@@ -6999,9 +7015,9 @@
|
|
|
6999
7015
|
}({});
|
|
7000
7016
|
/**
|
|
7001
7017
|
* 路由错误
|
|
7002
|
-
*/ class RouterError extends
|
|
7003
|
-
constructor(message, code, severity =
|
|
7004
|
-
super(message,
|
|
7018
|
+
*/ class RouterError extends FrameworkError {
|
|
7019
|
+
constructor(message, code, severity = ErrorSeverity.MEDIUM, cause, context){
|
|
7020
|
+
super(message, ErrorType.RUNTIME, severity, {
|
|
7005
7021
|
code,
|
|
7006
7022
|
originalError: cause,
|
|
7007
7023
|
context: context || {}
|
|
@@ -11536,22 +11552,6 @@
|
|
|
11536
11552
|
return null;
|
|
11537
11553
|
};
|
|
11538
11554
|
|
|
11539
|
-
const utils = vlianUtils__namespace;
|
|
11540
|
-
const ErrorCode = utils.ErrorCode;
|
|
11541
|
-
const ErrorMessages = utils.ErrorMessages;
|
|
11542
|
-
const getErrorMessage = utils.getErrorMessage;
|
|
11543
|
-
const getUserFriendlyMessage = utils.getUserFriendlyMessage;
|
|
11544
|
-
const ErrorType = utils.ErrorType;
|
|
11545
|
-
const ErrorSeverity = utils.ErrorSeverity;
|
|
11546
|
-
const FrameworkError = utils.FrameworkError;
|
|
11547
|
-
const InitializationError = utils.InitializationError;
|
|
11548
|
-
const ConfigError = utils.ConfigError;
|
|
11549
|
-
const StorageError = utils.StorageError;
|
|
11550
|
-
const NetworkError = utils.NetworkError;
|
|
11551
|
-
const ValidationError = utils.ValidationError;
|
|
11552
|
-
const SecurityError = utils.SecurityError;
|
|
11553
|
-
const errorUtils = utils.errorUtils;
|
|
11554
|
-
|
|
11555
11555
|
/**
|
|
11556
11556
|
* 配置安全工具类
|
|
11557
11557
|
*/ class ConfigSecurity {
|
|
@@ -12788,12 +12788,6 @@
|
|
|
12788
12788
|
return startup(options, instanceId);
|
|
12789
12789
|
}
|
|
12790
12790
|
|
|
12791
|
-
// undiciAdapter 使用懒加载,避免在未使用时触发依赖检查
|
|
12792
|
-
async function undiciAdapter() {
|
|
12793
|
-
const { undiciAdapter: adapter } = await import('@vlian/request');
|
|
12794
|
-
return adapter();
|
|
12795
|
-
}
|
|
12796
|
-
|
|
12797
12791
|
Object.defineProperty(exports, "PERFORMANCE_METRIC_UNITS", {
|
|
12798
12792
|
enumerable: true,
|
|
12799
12793
|
get: function () { return vlianUtils.PERFORMANCE_METRIC_UNITS; }
|
|
@@ -12898,90 +12892,6 @@
|
|
|
12898
12892
|
enumerable: true,
|
|
12899
12893
|
get: function () { return monitoring.initMonitoring; }
|
|
12900
12894
|
});
|
|
12901
|
-
Object.defineProperty(exports, "MonitoringEventType", {
|
|
12902
|
-
enumerable: true,
|
|
12903
|
-
get: function () { return request.MonitoringEventType; }
|
|
12904
|
-
});
|
|
12905
|
-
Object.defineProperty(exports, "PluginLifecycleStage", {
|
|
12906
|
-
enumerable: true,
|
|
12907
|
-
get: function () { return request.PluginLifecycleStage; }
|
|
12908
|
-
});
|
|
12909
|
-
Object.defineProperty(exports, "PluginPriority", {
|
|
12910
|
-
enumerable: true,
|
|
12911
|
-
get: function () { return request.PluginPriority; }
|
|
12912
|
-
});
|
|
12913
|
-
Object.defineProperty(exports, "RequestClient", {
|
|
12914
|
-
enumerable: true,
|
|
12915
|
-
get: function () { return request.RequestClient; }
|
|
12916
|
-
});
|
|
12917
|
-
Object.defineProperty(exports, "RequestErrorCode", {
|
|
12918
|
-
enumerable: true,
|
|
12919
|
-
get: function () { return request.RequestErrorCode; }
|
|
12920
|
-
});
|
|
12921
|
-
Object.defineProperty(exports, "RequestErrorType", {
|
|
12922
|
-
enumerable: true,
|
|
12923
|
-
get: function () { return request.RequestErrorType; }
|
|
12924
|
-
});
|
|
12925
|
-
Object.defineProperty(exports, "RequestPluginManager", {
|
|
12926
|
-
enumerable: true,
|
|
12927
|
-
get: function () { return request.PluginManager; }
|
|
12928
|
-
});
|
|
12929
|
-
Object.defineProperty(exports, "adapterRegistry", {
|
|
12930
|
-
enumerable: true,
|
|
12931
|
-
get: function () { return request.adapterRegistry; }
|
|
12932
|
-
});
|
|
12933
|
-
Object.defineProperty(exports, "axiosAdapter", {
|
|
12934
|
-
enumerable: true,
|
|
12935
|
-
get: function () { return request.axiosAdapter; }
|
|
12936
|
-
});
|
|
12937
|
-
Object.defineProperty(exports, "cancelRequestContext", {
|
|
12938
|
-
enumerable: true,
|
|
12939
|
-
get: function () { return request.cancelRequestContext; }
|
|
12940
|
-
});
|
|
12941
|
-
Object.defineProperty(exports, "completeRequestContext", {
|
|
12942
|
-
enumerable: true,
|
|
12943
|
-
get: function () { return request.completeRequestContext; }
|
|
12944
|
-
});
|
|
12945
|
-
Object.defineProperty(exports, "createCachePlugin", {
|
|
12946
|
-
enumerable: true,
|
|
12947
|
-
get: function () { return request.createCachePlugin; }
|
|
12948
|
-
});
|
|
12949
|
-
Object.defineProperty(exports, "createMonitoringPlugin", {
|
|
12950
|
-
enumerable: true,
|
|
12951
|
-
get: function () { return request.createMonitoringPlugin; }
|
|
12952
|
-
});
|
|
12953
|
-
Object.defineProperty(exports, "createRequestClient", {
|
|
12954
|
-
enumerable: true,
|
|
12955
|
-
get: function () { return request.createRequestClient; }
|
|
12956
|
-
});
|
|
12957
|
-
Object.defineProperty(exports, "createRequestContext", {
|
|
12958
|
-
enumerable: true,
|
|
12959
|
-
get: function () { return request.createRequestContext; }
|
|
12960
|
-
});
|
|
12961
|
-
Object.defineProperty(exports, "createRetryPlugin", {
|
|
12962
|
-
enumerable: true,
|
|
12963
|
-
get: function () { return request.createRetryPlugin; }
|
|
12964
|
-
});
|
|
12965
|
-
Object.defineProperty(exports, "createValidationPlugin", {
|
|
12966
|
-
enumerable: true,
|
|
12967
|
-
get: function () { return request.createValidationPlugin; }
|
|
12968
|
-
});
|
|
12969
|
-
Object.defineProperty(exports, "failRequestContext", {
|
|
12970
|
-
enumerable: true,
|
|
12971
|
-
get: function () { return request.failRequestContext; }
|
|
12972
|
-
});
|
|
12973
|
-
Object.defineProperty(exports, "fetchAdapter", {
|
|
12974
|
-
enumerable: true,
|
|
12975
|
-
get: function () { return request.fetchAdapter; }
|
|
12976
|
-
});
|
|
12977
|
-
Object.defineProperty(exports, "kyAdapter", {
|
|
12978
|
-
enumerable: true,
|
|
12979
|
-
get: function () { return request.kyAdapter; }
|
|
12980
|
-
});
|
|
12981
|
-
Object.defineProperty(exports, "updateRequestContext", {
|
|
12982
|
-
enumerable: true,
|
|
12983
|
-
get: function () { return request.updateRequestContext; }
|
|
12984
|
-
});
|
|
12985
12895
|
Object.defineProperty(exports, "CSRFTokenManager", {
|
|
12986
12896
|
enumerable: true,
|
|
12987
12897
|
get: function () { return csrf.CSRFTokenManager; }
|
|
@@ -13028,6 +12938,7 @@
|
|
|
13028
12938
|
exports.MiddlewareManager = MiddlewareManager;
|
|
13029
12939
|
exports.NetworkError = NetworkError;
|
|
13030
12940
|
exports.PerformanceTracker = PerformanceTracker;
|
|
12941
|
+
exports.PluginLifecycleStage = PluginLifecycleStage;
|
|
13031
12942
|
exports.PluginManager = PluginManager;
|
|
13032
12943
|
exports.PreloadStrategy = PreloadStrategy;
|
|
13033
12944
|
exports.ReactRouterAdapter = ReactRouterAdapter;
|
|
@@ -13094,7 +13005,6 @@
|
|
|
13094
13005
|
exports.startKernel = startKernel;
|
|
13095
13006
|
exports.startup = startup;
|
|
13096
13007
|
exports.storage = storage;
|
|
13097
|
-
exports.undiciAdapter = undiciAdapter;
|
|
13098
13008
|
exports.useAppContext = useAppContext;
|
|
13099
13009
|
exports.useAppEvent = useAppEvent;
|
|
13100
13010
|
exports.useAppEventEmitter = useAppEventEmitter;
|