@vercube/core 0.0.10 → 0.0.12
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 +10 -0
- package/dist/index.mjs +5 -4
- package/package.json +4 -4
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Container } from "@vercube/di";
|
|
2
2
|
import { FastResponse } from "srvx";
|
|
3
3
|
import { LoggerTypes } from "@vercube/logger";
|
|
4
|
+
import { DotenvOptions } from "c12";
|
|
4
5
|
import { StandardSchemaV1 } from "@standard-schema/spec";
|
|
5
6
|
|
|
6
7
|
//#region src/Services/Plugins/BasePlugin.d.ts
|
|
@@ -158,6 +159,15 @@ declare namespace ConfigTypes {
|
|
|
158
159
|
* This property is only used when using vercube cli.
|
|
159
160
|
*/
|
|
160
161
|
build?: BuildOptions;
|
|
162
|
+
/**
|
|
163
|
+
* Additional configuration for c12.
|
|
164
|
+
*/
|
|
165
|
+
c12?: {
|
|
166
|
+
/**
|
|
167
|
+
* Configuration for dotenv.
|
|
168
|
+
*/
|
|
169
|
+
dotenv?: boolean | DotenvOptions;
|
|
170
|
+
};
|
|
161
171
|
}
|
|
162
172
|
}
|
|
163
173
|
//#endregion
|
package/dist/index.mjs
CHANGED
|
@@ -7,7 +7,7 @@ import { extname, join, normalize } from "node:path";
|
|
|
7
7
|
import { stat } from "node:fs/promises";
|
|
8
8
|
import { BaseLogger, Logger } from "@vercube/logger";
|
|
9
9
|
import { ConsoleProvider } from "@vercube/logger/providers/ConsoleProvider";
|
|
10
|
-
import { loadConfig } from "c12";
|
|
10
|
+
import { loadConfig, setupDotenv } from "c12";
|
|
11
11
|
import { defu } from "defu";
|
|
12
12
|
|
|
13
13
|
//#region rolldown:runtime
|
|
@@ -206,7 +206,7 @@ var RouterAfterInitHook = class {};
|
|
|
206
206
|
|
|
207
207
|
//#endregion
|
|
208
208
|
//#region src/Services/Router/Router.ts
|
|
209
|
-
var import_decorate$17 = __toESM(require_decorate()
|
|
209
|
+
var import_decorate$17 = __toESM(require_decorate());
|
|
210
210
|
/**
|
|
211
211
|
* Router service responsible for managing application routes
|
|
212
212
|
*
|
|
@@ -1147,11 +1147,12 @@ const defaultConfig = {
|
|
|
1147
1147
|
async function loadVercubeConfig(overrides) {
|
|
1148
1148
|
const config = await loadConfig({
|
|
1149
1149
|
name: "vercube",
|
|
1150
|
-
dotenv: true,
|
|
1150
|
+
dotenv: overrides?.c12?.dotenv ?? true,
|
|
1151
1151
|
rcFile: false,
|
|
1152
1152
|
globalRc: false,
|
|
1153
1153
|
defaults: defaultConfig
|
|
1154
1154
|
});
|
|
1155
|
+
if (config?.config?.c12?.dotenv && typeof config?.config?.c12?.dotenv === "object") await setupDotenv(config.config.c12.dotenv);
|
|
1155
1156
|
return defu(overrides ?? {}, config?.config ?? {});
|
|
1156
1157
|
}
|
|
1157
1158
|
|
|
@@ -1848,7 +1849,7 @@ function Post(path) {
|
|
|
1848
1849
|
|
|
1849
1850
|
//#endregion
|
|
1850
1851
|
//#region src/Decorators/Http/Put.ts
|
|
1851
|
-
var import_decorate$3 = __toESM(require_decorate()
|
|
1852
|
+
var import_decorate$3 = __toESM(require_decorate());
|
|
1852
1853
|
/**
|
|
1853
1854
|
* A decorator class for handling HTTP PUT requests.
|
|
1854
1855
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vercube/core",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.12",
|
|
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.6.3",
|
|
26
|
-
"srvx": "0.
|
|
27
|
-
"@vercube/di": "0.0.
|
|
28
|
-
"@vercube/logger": "0.0.
|
|
26
|
+
"srvx": "0.8.0",
|
|
27
|
+
"@vercube/di": "0.0.12",
|
|
28
|
+
"@vercube/logger": "0.0.12"
|
|
29
29
|
},
|
|
30
30
|
"publishConfig": {
|
|
31
31
|
"access": "public"
|