@wisemen/app-container 4.0.3 → 4.1.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wisemen/app-container",
3
- "version": "4.0.3",
3
+ "version": "4.1.1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -20,7 +20,8 @@
20
20
  }
21
21
  },
22
22
  "files": [
23
- "dist/"
23
+ "dist/",
24
+ "skills"
24
25
  ],
25
26
  "devDependencies": {
26
27
  "@nestjs/common": "11.1.19",
@@ -28,16 +29,18 @@
28
29
  "@nestjs/platform-fastify": "11.1.19",
29
30
  "@types/express": "5.0.6",
30
31
  "@types/node": "25.3.0",
31
- "eslint": "9.39.4",
32
- "fastify": ">=5.8.5",
33
- "typescript": ">=4.8.4 <=5.9.3",
34
- "@wisemen/eslint-config-nestjs": "1.1.0"
32
+ "eslint": "10.2.1",
33
+ "fastify": "^5.8.5",
34
+ "oxlint": "1.59.0",
35
+ "oxlint-tsgolint": "0.20.0",
36
+ "typescript": "^5.9.3",
37
+ "@wisemen/eslint-config-nestjs": "1.1.1"
35
38
  },
36
39
  "peerDependencies": {
37
- "@nestjs/common": ">=11.1.17",
38
- "@nestjs/platform-express": ">=11.1.17",
40
+ "@nestjs/common": "^11.1.19",
41
+ "@nestjs/platform-express": "^11.1.18",
39
42
  "@nestjs/platform-fastify": ">=11.1.17",
40
- "express": ">=5.2.1",
43
+ "express": "^5.2.1",
41
44
  "fastify": ">=5.8.5"
42
45
  },
43
46
  "peerDependenciesMeta": {
@@ -0,0 +1,37 @@
1
+ ---
2
+ name: getting-started
3
+ description: Use when bootstrapping NestJS api, worker, or job containers with Express or Fastify.
4
+ ---
5
+
6
+ # @wisemen/app-container - Getting Started
7
+
8
+ Extend `ExpressContainer` or `FastifyContainer` to bootstrap a Nest app with
9
+ built-in startup, shutdown, and probe endpoints. Use `JobContainer` for
10
+ run-once processes and `WorkerContainer` for long-running consumers.
11
+
12
+ ```ts
13
+ import { NestFactory } from '@nestjs/core'
14
+ import { Module, type INestApplicationContext } from '@nestjs/common'
15
+ import { FastifyAdapter } from '@nestjs/platform-fastify'
16
+ import { FastifyContainer } from '@wisemen/app-container/fastify'
17
+
18
+ @Module({})
19
+ class AppModule {}
20
+
21
+ class Api extends FastifyContainer {
22
+ async bootstrap (adapter: FastifyAdapter): Promise<INestApplicationContext> {
23
+ const app = await NestFactory.create(AppModule, adapter)
24
+
25
+ app.setGlobalPrefix('api')
26
+ app.enableCors()
27
+
28
+ return app
29
+ }
30
+ }
31
+
32
+ const _api = new Api()
33
+ ```
34
+
35
+ Use `@wisemen/app-container/express` for Express-based apps. Switch to
36
+ `JobContainer` when the process should execute work once and shut down after
37
+ `execute()`.