@vercube/core 0.0.13 → 0.0.15
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.d.mts +13 -7
- package/dist/index.mjs +5 -5
- package/package.json +4 -4
package/dist/index.d.mts
CHANGED
|
@@ -48,6 +48,12 @@ declare namespace ConfigTypes {
|
|
|
48
48
|
duration?: number;
|
|
49
49
|
};
|
|
50
50
|
}
|
|
51
|
+
/**
|
|
52
|
+
* Helper type to create a fully typed runtime configuration.
|
|
53
|
+
* This allows users to define their own runtime configuration structure
|
|
54
|
+
* while maintaining type safety.
|
|
55
|
+
*/
|
|
56
|
+
type CreateRuntimeConfig<T = Record<string, unknown>> = RuntimeConfig & T;
|
|
51
57
|
/**
|
|
52
58
|
* Configuration options for experimental features.
|
|
53
59
|
* These options may change or be removed in future versions.
|
|
@@ -149,7 +155,7 @@ declare namespace ConfigTypes {
|
|
|
149
155
|
/**
|
|
150
156
|
* Runtime configuration for the application.
|
|
151
157
|
*/
|
|
152
|
-
runtime?:
|
|
158
|
+
runtime?: CreateRuntimeConfig<RuntimeUserConfig>;
|
|
153
159
|
/**
|
|
154
160
|
* Experimental features configuration.
|
|
155
161
|
*/
|
|
@@ -255,7 +261,7 @@ declare function createApp(cfg?: ConfigTypes.Config): Promise<App>;
|
|
|
255
261
|
* @param {ConfigTypes.Config} config - The configuration object to validate
|
|
256
262
|
* @returns {ConfigTypes.Config} The validated configuration object
|
|
257
263
|
*/
|
|
258
|
-
declare function defineConfig(config: ConfigTypes.Config): ConfigTypes.Config
|
|
264
|
+
declare function defineConfig<T = Record<string, unknown>>(config: ConfigTypes.Config<T>): ConfigTypes.Config<T>;
|
|
259
265
|
//#endregion
|
|
260
266
|
//#region src/Config/Loader.d.ts
|
|
261
267
|
/**
|
|
@@ -1043,7 +1049,7 @@ declare class Router {
|
|
|
1043
1049
|
* RuntimeConfig class manages the runtime configuration for the Vercube application.
|
|
1044
1050
|
* This class provides a centralized way to access and modify runtime configuration settings.
|
|
1045
1051
|
*/
|
|
1046
|
-
declare class RuntimeConfig$1 {
|
|
1052
|
+
declare class RuntimeConfig$1<T = Record<string, unknown>> {
|
|
1047
1053
|
/**
|
|
1048
1054
|
* Private field to store the runtime configuration object.
|
|
1049
1055
|
* @private
|
|
@@ -1051,14 +1057,14 @@ declare class RuntimeConfig$1 {
|
|
|
1051
1057
|
private fRuntimeConfig;
|
|
1052
1058
|
/**
|
|
1053
1059
|
* Gets the current runtime configuration.
|
|
1054
|
-
* @returns {ConfigTypes.
|
|
1060
|
+
* @returns {ConfigTypes.CreateRuntimeConfig<T> | undefined} The current runtime configuration object.
|
|
1055
1061
|
*/
|
|
1056
|
-
get runtimeConfig(): ConfigTypes.
|
|
1062
|
+
get runtimeConfig(): ConfigTypes.CreateRuntimeConfig<T> | undefined;
|
|
1057
1063
|
/**
|
|
1058
1064
|
* Sets the runtime configuration.
|
|
1059
|
-
* @param {ConfigTypes.
|
|
1065
|
+
* @param {ConfigTypes.CreateRuntimeConfig<T>} value - The new runtime configuration object to set.
|
|
1060
1066
|
*/
|
|
1061
|
-
set runtimeConfig(value: ConfigTypes.
|
|
1067
|
+
set runtimeConfig(value: ConfigTypes.CreateRuntimeConfig<T> | undefined);
|
|
1062
1068
|
}
|
|
1063
1069
|
//#endregion
|
|
1064
1070
|
//#region src/Errors/HttpError.d.ts
|
package/dist/index.mjs
CHANGED
|
@@ -36,8 +36,8 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
36
36
|
}) : target, mod));
|
|
37
37
|
|
|
38
38
|
//#endregion
|
|
39
|
-
//#region ../../node_modules/.pnpm/@oxc-project+runtime@0.75.
|
|
40
|
-
var require_decorate = __commonJS({ "../../node_modules/.pnpm/@oxc-project+runtime@0.75.
|
|
39
|
+
//#region ../../node_modules/.pnpm/@oxc-project+runtime@0.75.1/node_modules/@oxc-project/runtime/src/helpers/decorate.js
|
|
40
|
+
var require_decorate = __commonJS({ "../../node_modules/.pnpm/@oxc-project+runtime@0.75.1/node_modules/@oxc-project/runtime/src/helpers/decorate.js"(exports, module) {
|
|
41
41
|
function __decorate(decorators, target, key, desc) {
|
|
42
42
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
43
43
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -872,14 +872,14 @@ var RuntimeConfig = class {
|
|
|
872
872
|
fRuntimeConfig;
|
|
873
873
|
/**
|
|
874
874
|
* Gets the current runtime configuration.
|
|
875
|
-
* @returns {ConfigTypes.
|
|
875
|
+
* @returns {ConfigTypes.CreateRuntimeConfig<T> | undefined} The current runtime configuration object.
|
|
876
876
|
*/
|
|
877
877
|
get runtimeConfig() {
|
|
878
878
|
return this.fRuntimeConfig;
|
|
879
879
|
}
|
|
880
880
|
/**
|
|
881
881
|
* Sets the runtime configuration.
|
|
882
|
-
* @param {ConfigTypes.
|
|
882
|
+
* @param {ConfigTypes.CreateRuntimeConfig<T>} value - The new runtime configuration object to set.
|
|
883
883
|
*/
|
|
884
884
|
set runtimeConfig(value) {
|
|
885
885
|
this.fRuntimeConfig = value;
|
|
@@ -1860,7 +1860,7 @@ function Post(path) {
|
|
|
1860
1860
|
|
|
1861
1861
|
//#endregion
|
|
1862
1862
|
//#region src/Decorators/Http/Put.ts
|
|
1863
|
-
var import_decorate$3 = __toESM(require_decorate()
|
|
1863
|
+
var import_decorate$3 = __toESM(require_decorate());
|
|
1864
1864
|
/**
|
|
1865
1865
|
* A decorator class for handling HTTP PUT requests.
|
|
1866
1866
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vercube/core",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.15",
|
|
4
4
|
"description": "Core module for Vercube framework",
|
|
5
5
|
"repository": "@vercube/core",
|
|
6
6
|
"license": "MIT",
|
|
@@ -23,9 +23,9 @@
|
|
|
23
23
|
"defu": "6.1.4",
|
|
24
24
|
"pathe": "2.0.3",
|
|
25
25
|
"rou3": "0.7.3",
|
|
26
|
-
"srvx": "0.8.
|
|
27
|
-
"@vercube/
|
|
28
|
-
"@vercube/
|
|
26
|
+
"srvx": "0.8.2",
|
|
27
|
+
"@vercube/logger": "0.0.15",
|
|
28
|
+
"@vercube/di": "0.0.15"
|
|
29
29
|
},
|
|
30
30
|
"publishConfig": {
|
|
31
31
|
"access": "public"
|