@smounters/imperium 1.0.1 → 1.0.2

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.
Files changed (2) hide show
  1. package/README.md +12 -8
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -93,14 +93,7 @@ await app.start({ port: 3000 });
93
93
  ```ts
94
94
  import { Application } from "@smounters/imperium/core";
95
95
  import { ConfigService, LoggerService } from "@smounters/imperium/services";
96
- import { z } from "zod";
97
-
98
- const appConfigSchema = z.object({
99
- APP_PORT: z.coerce.number().default(8000),
100
- APP_GLOBAL_PREFIX: z.string().default(""),
101
- });
102
-
103
- type AppConfig = z.infer<typeof appConfigSchema>;
96
+ import { appConfigSchema, type AppConfig } from "@smounters/imperium/validation";
104
97
 
105
98
  const app = new Application(AppModule, {
106
99
  host: "0.0.0.0",
@@ -124,6 +117,17 @@ await app.start({
124
117
  app.resolve(LoggerService).info({ event: "app.started", port: config.APP_PORT });
125
118
  ```
126
119
 
120
+ If your app needs extra config fields, extend the exported base schema:
121
+
122
+ ```ts
123
+ import { appConfigSchema } from "@smounters/imperium/validation";
124
+ import { z } from "zod";
125
+
126
+ const projectConfigSchema = appConfigSchema.extend({
127
+ REDIS_URL: z.url(),
128
+ });
129
+ ```
130
+
127
131
  ## Multi Providers
128
132
 
129
133
  ```ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smounters/imperium",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "NestJS-like modular DI container with unified HTTP + Connect RPC server for TypeScript",
5
5
  "keywords": [
6
6
  "di",