@vercube/core 0.0.13 → 0.0.14

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 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?: RuntimeConfig & RuntimeUserConfig;
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.Config['runtime']} The current runtime configuration object.
1060
+ * @returns {ConfigTypes.CreateRuntimeConfig<T> | undefined} The current runtime configuration object.
1055
1061
  */
1056
- get runtimeConfig(): ConfigTypes.Config['runtime'];
1062
+ get runtimeConfig(): ConfigTypes.CreateRuntimeConfig<T> | undefined;
1057
1063
  /**
1058
1064
  * Sets the runtime configuration.
1059
- * @param {ConfigTypes.RuntimeConfig} value - The new runtime configuration object to set.
1065
+ * @param {ConfigTypes.CreateRuntimeConfig<T>} value - The new runtime configuration object to set.
1060
1066
  */
1061
- set runtimeConfig(value: ConfigTypes.Config['runtime']);
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
@@ -872,14 +872,14 @@ var RuntimeConfig = class {
872
872
  fRuntimeConfig;
873
873
  /**
874
874
  * Gets the current runtime configuration.
875
- * @returns {ConfigTypes.Config['runtime']} The current runtime configuration object.
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.RuntimeConfig} value - The new runtime configuration object to set.
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(), 1);
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.13",
3
+ "version": "0.0.14",
4
4
  "description": "Core module for Vercube framework",
5
5
  "repository": "@vercube/core",
6
6
  "license": "MIT",
@@ -24,8 +24,8 @@
24
24
  "pathe": "2.0.3",
25
25
  "rou3": "0.7.3",
26
26
  "srvx": "0.8.0",
27
- "@vercube/di": "0.0.13",
28
- "@vercube/logger": "0.0.13"
27
+ "@vercube/di": "0.0.14",
28
+ "@vercube/logger": "0.0.14"
29
29
  },
30
30
  "publishConfig": {
31
31
  "access": "public"