@vercube/core 0.0.12 → 0.0.13

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
@@ -199,6 +199,12 @@ declare class App {
199
199
  * @param {Container} container - The dependency injection container.
200
200
  */
201
201
  set container(container: Container);
202
+ /**
203
+ * Gets the application config.
204
+ * This method is used to get the application config without runtime config.
205
+ * @returns {ConfigTypes.Config} The application config.
206
+ */
207
+ get config(): ConfigTypes.Config;
202
208
  /**
203
209
  * Initializes the application.
204
210
  *
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.72.2/node_modules/@oxc-project/runtime/src/helpers/decorate.js
40
- var require_decorate = __commonJS({ "../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/decorate.js"(exports, module) {
39
+ //#region ../../node_modules/.pnpm/@oxc-project+runtime@0.75.0/node_modules/@oxc-project/runtime/src/helpers/decorate.js
40
+ var require_decorate = __commonJS({ "../../node_modules/.pnpm/@oxc-project+runtime@0.75.0/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);
@@ -141,7 +141,7 @@ var HooksService = class {
141
141
  });
142
142
  if (timeout !== null) waitTimeout = setTimeout(() => {
143
143
  this.off(eventId);
144
- reject(new Error(`Waiting for event timeout - ${type.name}`));
144
+ reject(/* @__PURE__ */ new Error(`Waiting for event timeout - ${type.name}`));
145
145
  }, timeout);
146
146
  });
147
147
  }
@@ -300,7 +300,7 @@ var HttpError = class HttpError extends Error {
300
300
  Object.setPrototypeOf(this, HttpError.prototype);
301
301
  if (status) this.status = status;
302
302
  if (message) this.message = message;
303
- this.stack = new Error().stack;
303
+ this.stack = (/* @__PURE__ */ new Error()).stack;
304
304
  }
305
305
  };
306
306
 
@@ -921,6 +921,17 @@ var App = class {
921
921
  this.fInternalContainer = container;
922
922
  }
923
923
  /**
924
+ * Gets the application config.
925
+ * This method is used to get the application config without runtime config.
926
+ * @returns {ConfigTypes.Config} The application config.
927
+ */
928
+ get config() {
929
+ return {
930
+ ...this.fConfig,
931
+ runtime: void 0
932
+ };
933
+ }
934
+ /**
924
935
  * Initializes the application.
925
936
  *
926
937
  * @returns {Promise<void>} A promise that resolves when the application is initialized.
@@ -1111,8 +1122,8 @@ function generateRandomHash() {
1111
1122
  */
1112
1123
  const defaultConfig = {
1113
1124
  logLevel: "debug",
1114
- production: false,
1115
- dev: false,
1125
+ production: process.env.NODE_ENV === "production",
1126
+ dev: process.env.NODE_ENV !== "production",
1116
1127
  build: {
1117
1128
  root: process.cwd(),
1118
1129
  entry: "src/index.ts",
@@ -1849,7 +1860,7 @@ function Post(path) {
1849
1860
 
1850
1861
  //#endregion
1851
1862
  //#region src/Decorators/Http/Put.ts
1852
- var import_decorate$3 = __toESM(require_decorate());
1863
+ var import_decorate$3 = __toESM(require_decorate(), 1);
1853
1864
  /**
1854
1865
  * A decorator class for handling HTTP PUT requests.
1855
1866
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercube/core",
3
- "version": "0.0.12",
3
+ "version": "0.0.13",
4
4
  "description": "Core module for Vercube framework",
5
5
  "repository": "@vercube/core",
6
6
  "license": "MIT",
@@ -22,10 +22,10 @@
22
22
  "c12": "3.0.4",
23
23
  "defu": "6.1.4",
24
24
  "pathe": "2.0.3",
25
- "rou3": "0.6.3",
25
+ "rou3": "0.7.3",
26
26
  "srvx": "0.8.0",
27
- "@vercube/di": "0.0.12",
28
- "@vercube/logger": "0.0.12"
27
+ "@vercube/di": "0.0.13",
28
+ "@vercube/logger": "0.0.13"
29
29
  },
30
30
  "publishConfig": {
31
31
  "access": "public"