@vercube/core 0.0.6 → 0.0.8
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 +3 -3
- package/dist/index.mjs +31 -30
- package/package.json +3 -3
package/dist/index.d.mts
CHANGED
|
@@ -128,7 +128,7 @@ declare namespace ConfigTypes {
|
|
|
128
128
|
/**
|
|
129
129
|
* Main configuration interface for the Vercube application.
|
|
130
130
|
*/
|
|
131
|
-
interface Config {
|
|
131
|
+
interface Config<RuntimeUserConfig = Record<string, unknown>> {
|
|
132
132
|
/**
|
|
133
133
|
* Flag indicating if the application is running in production mode.
|
|
134
134
|
*/
|
|
@@ -148,7 +148,7 @@ declare namespace ConfigTypes {
|
|
|
148
148
|
/**
|
|
149
149
|
* Runtime configuration for the application.
|
|
150
150
|
*/
|
|
151
|
-
runtime?: RuntimeConfig;
|
|
151
|
+
runtime?: RuntimeConfig & RuntimeUserConfig;
|
|
152
152
|
/**
|
|
153
153
|
* Experimental features configuration.
|
|
154
154
|
*/
|
|
@@ -170,7 +170,7 @@ declare class App {
|
|
|
170
170
|
private gPluginsRegistry;
|
|
171
171
|
private gHttpServer;
|
|
172
172
|
private gStaticRequestHandler;
|
|
173
|
-
private
|
|
173
|
+
private gRuntimeConfig;
|
|
174
174
|
/** Holds the initialization status of the application */
|
|
175
175
|
private fIsInitialized;
|
|
176
176
|
/** Holds the dependency injection container */
|
package/dist/index.mjs
CHANGED
|
@@ -858,6 +858,34 @@ var HttpServer = class {
|
|
|
858
858
|
(0, import_decorate$15.default)([Inject(RequestHandler)], HttpServer.prototype, "gRequestHandler", void 0);
|
|
859
859
|
(0, import_decorate$15.default)([Inject(StaticRequestHandler)], HttpServer.prototype, "gStaticRequestHandler", void 0);
|
|
860
860
|
|
|
861
|
+
//#endregion
|
|
862
|
+
//#region src/Services/Config/RuntimeConfig.ts
|
|
863
|
+
/**
|
|
864
|
+
* RuntimeConfig class manages the runtime configuration for the Vercube application.
|
|
865
|
+
* This class provides a centralized way to access and modify runtime configuration settings.
|
|
866
|
+
*/
|
|
867
|
+
var RuntimeConfig = class {
|
|
868
|
+
/**
|
|
869
|
+
* Private field to store the runtime configuration object.
|
|
870
|
+
* @private
|
|
871
|
+
*/
|
|
872
|
+
fRuntimeConfig;
|
|
873
|
+
/**
|
|
874
|
+
* Gets the current runtime configuration.
|
|
875
|
+
* @returns {ConfigTypes.RuntimeConfig} The current runtime configuration object.
|
|
876
|
+
*/
|
|
877
|
+
get runtimeConfig() {
|
|
878
|
+
return this.fRuntimeConfig;
|
|
879
|
+
}
|
|
880
|
+
/**
|
|
881
|
+
* Sets the runtime configuration.
|
|
882
|
+
* @param {ConfigTypes.RuntimeConfig} value - The new runtime configuration object to set.
|
|
883
|
+
*/
|
|
884
|
+
set runtimeConfig(value) {
|
|
885
|
+
this.fRuntimeConfig = value;
|
|
886
|
+
}
|
|
887
|
+
};
|
|
888
|
+
|
|
861
889
|
//#endregion
|
|
862
890
|
//#region src/Common/App.ts
|
|
863
891
|
var import_decorate$14 = __toESM(require_decorate());
|
|
@@ -869,7 +897,7 @@ var App = class {
|
|
|
869
897
|
gPluginsRegistry;
|
|
870
898
|
gHttpServer;
|
|
871
899
|
gStaticRequestHandler;
|
|
872
|
-
|
|
900
|
+
gRuntimeConfig;
|
|
873
901
|
/** Holds the initialization status of the application */
|
|
874
902
|
fIsInitialized = false;
|
|
875
903
|
/** Holds the dependency injection container */
|
|
@@ -901,6 +929,7 @@ var App = class {
|
|
|
901
929
|
this.fConfig = cfg;
|
|
902
930
|
await this.gHttpServer.initialize(this.fConfig);
|
|
903
931
|
if (this.fConfig.server?.static) this.gStaticRequestHandler.initialize(this.fConfig.server?.static);
|
|
932
|
+
if (this.fConfig.runtime) this.gRuntimeConfig.runtimeConfig = this.fConfig.runtime;
|
|
904
933
|
this.gRouter.initialize();
|
|
905
934
|
}
|
|
906
935
|
/**
|
|
@@ -948,7 +977,7 @@ var App = class {
|
|
|
948
977
|
(0, import_decorate$14.default)([Inject(PluginsRegistry)], App.prototype, "gPluginsRegistry", void 0);
|
|
949
978
|
(0, import_decorate$14.default)([Inject(HttpServer)], App.prototype, "gHttpServer", void 0);
|
|
950
979
|
(0, import_decorate$14.default)([Inject(StaticRequestHandler)], App.prototype, "gStaticRequestHandler", void 0);
|
|
951
|
-
(0, import_decorate$14.default)([
|
|
980
|
+
(0, import_decorate$14.default)([Inject(RuntimeConfig)], App.prototype, "gRuntimeConfig", void 0);
|
|
952
981
|
|
|
953
982
|
//#endregion
|
|
954
983
|
//#region src/Services/Validation/ValidationProvider.ts
|
|
@@ -981,34 +1010,6 @@ var StandardSchemaValidationProvider = class {
|
|
|
981
1010
|
}
|
|
982
1011
|
};
|
|
983
1012
|
|
|
984
|
-
//#endregion
|
|
985
|
-
//#region src/Services/Config/RuntimeConfig.ts
|
|
986
|
-
/**
|
|
987
|
-
* RuntimeConfig class manages the runtime configuration for the Vercube application.
|
|
988
|
-
* This class provides a centralized way to access and modify runtime configuration settings.
|
|
989
|
-
*/
|
|
990
|
-
var RuntimeConfig = class {
|
|
991
|
-
/**
|
|
992
|
-
* Private field to store the runtime configuration object.
|
|
993
|
-
* @private
|
|
994
|
-
*/
|
|
995
|
-
fRuntimeConfig;
|
|
996
|
-
/**
|
|
997
|
-
* Gets the current runtime configuration.
|
|
998
|
-
* @returns {ConfigTypes.RuntimeConfig} The current runtime configuration object.
|
|
999
|
-
*/
|
|
1000
|
-
get runtimeConfig() {
|
|
1001
|
-
return this.fRuntimeConfig;
|
|
1002
|
-
}
|
|
1003
|
-
/**
|
|
1004
|
-
* Sets the runtime configuration.
|
|
1005
|
-
* @param {ConfigTypes.RuntimeConfig} value - The new runtime configuration object to set.
|
|
1006
|
-
*/
|
|
1007
|
-
set runtimeConfig(value) {
|
|
1008
|
-
this.fRuntimeConfig = value;
|
|
1009
|
-
}
|
|
1010
|
-
};
|
|
1011
|
-
|
|
1012
1013
|
//#endregion
|
|
1013
1014
|
//#region src/Errors/Http/InternalServerError.ts
|
|
1014
1015
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vercube/core",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.8",
|
|
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.6.3",
|
|
26
26
|
"srvx": "0.7.5",
|
|
27
|
-
"@vercube/di": "0.0.
|
|
28
|
-
"@vercube/logger": "0.0.
|
|
27
|
+
"@vercube/di": "0.0.8",
|
|
28
|
+
"@vercube/logger": "0.0.8"
|
|
29
29
|
},
|
|
30
30
|
"publishConfig": {
|
|
31
31
|
"access": "public"
|