@fluojs/prisma 1.0.0-beta.1 → 1.0.0-beta.3

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/README.ko.md CHANGED
@@ -11,8 +11,10 @@ fluo 애플리케이션을 위한 Prisma 라이프사이클 및 ALS 기반 트
11
11
  - [빠른 시작](#빠른-시작)
12
12
  - [공통 패턴](#공통-패턴)
13
13
  - [PrismaService와 current()](#prismaservice와-current)
14
+ - [여러 클라이언트를 위한 이름 있는 등록](#여러-클라이언트를-위한-이름-있는-등록)
14
15
  - [수동 트랜잭션](#수동-트랜잭션)
15
16
  - [자동 요청 트랜잭션](#자동-요청-트랜잭션)
17
+ - [비동기 설정과 격리](#비동기-설정과-격리)
16
18
  - [수동 모듈 조합](#수동-모듈-조합)
17
19
  - [공개 API 개요](#공개-api-개요)
18
20
  - [관련 패키지](#관련-패키지)
@@ -73,6 +75,34 @@ export class UserRepository {
73
75
  }
74
76
  ```
75
77
 
78
+ ### 여러 클라이언트를 위한 이름 있는 등록
79
+
80
+ 하나의 애플리케이션 컨테이너 안에서 여러 Prisma Client가 필요하다면 각 등록에 명시적인 `name`을 부여하고 `getPrismaServiceToken(name)`으로 대응되는 토큰을 주입하세요.
81
+
82
+ ```typescript
83
+ import { Inject } from '@fluojs/core';
84
+ import { PrismaModule, PrismaService, getPrismaServiceToken } from '@fluojs/prisma';
85
+
86
+ const usersPrismaModule = PrismaModule.forName('users', { client: usersPrisma });
87
+ const analyticsPrismaModule = PrismaModule.forRoot({ name: 'analytics', client: analyticsPrisma });
88
+
89
+ @Inject(getPrismaServiceToken('users'), getPrismaServiceToken('analytics'))
90
+ export class MultiDatabaseService {
91
+ constructor(
92
+ private readonly users: PrismaService<typeof usersPrisma>,
93
+ private readonly analytics: PrismaService<typeof analyticsPrisma>,
94
+ ) {}
95
+
96
+ async loadDashboard(userId: string) {
97
+ const user = await this.users.current().user.findUnique({ where: { id: userId } });
98
+ const summary = await this.analytics.current().report.findMany();
99
+ return { summary, user };
100
+ }
101
+ }
102
+ ```
103
+
104
+ 이름 없는 등록은 `PrismaService`, `PRISMA_CLIENT`, `PRISMA_OPTIONS`, `PrismaTransactionInterceptor`를 위한 기본 단일 클라이언트 경로로 유지됩니다. 같은 컨테이너에 여러 Prisma Client를 등록할 때는 토큰 해석이 명시적으로 유지되도록 추가 클라이언트마다 이름을 사용하세요.
105
+
76
106
  ### 수동 트랜잭션
77
107
 
78
108
  `prisma.transaction()`을 사용하여 대화형 트랜잭션 블록을 생성합니다. 블록 내부의 모든 `current()` 호출은 트랜잭션 범위의 클라이언트를 사용합니다.
@@ -101,6 +131,27 @@ class UserController {
101
131
  }
102
132
  ```
103
133
 
134
+ `PrismaTransactionInterceptor`는 기본 이름 없는 `PrismaService`를 대상으로 합니다. 이름 있는 다중 클라이언트 등록에서는 해당 이름의 `PrismaService`를 주입한 뒤 필요한 위치에서 명시적으로 `transaction()` / `requestTransaction()` 경계를 여세요.
135
+
136
+ ### 비동기 설정과 격리
137
+
138
+ 주입된 설정이나 다른 비동기 소스에서 Prisma 클라이언트를 만들어야 할 때는 `PrismaModule.forRootAsync(...)`를 사용하세요. 비동기 factory는 애플리케이션 컨테이너마다 한 번 resolve되며, 테스트나 여러 앱을 띄우는 프로세스에서 같은 모듈 정의를 재사용하더라도 별도 bootstrap 사이에서 공유되지 않습니다.
139
+
140
+ ```typescript
141
+ import { PrismaClient } from '@prisma/client';
142
+ import { PrismaModule } from '@fluojs/prisma';
143
+
144
+ PrismaModule.forRootAsync({
145
+ inject: [DatabaseConfig],
146
+ useFactory: (config: DatabaseConfig) => ({
147
+ client: new PrismaClient({ datasources: { db: { url: config.url } } }),
148
+ strictTransactions: true,
149
+ }),
150
+ });
151
+ ```
152
+
153
+ 하나의 컴파일된 애플리케이션 안에서는 하위 provider가 동일하게 resolve된 `PrismaService`, ALS 트랜잭션 컨텍스트, 라이프사이클 관리 대상 클라이언트를 공유합니다. 서로 다른 애플리케이션 컨테이너는 독립된 factory 결과를 받으므로 `$connect` / `$disconnect` 소유권과 요청 트랜잭션 상태가 격리됩니다.
154
+
104
155
  ### 수동 모듈 조합
105
156
 
106
157
  `PrismaModule.forRoot(...)` / `forRootAsync(...)`를 사용해 Prisma를 등록합니다. 커스텀 `defineModule(...)` 등록 안에서 Prisma 지원을 조합해야 할 때도 동일한 모듈 entrypoint를 import해서 사용하세요.
@@ -125,8 +176,13 @@ defineModule(ManualPrismaModule, {
125
176
  ### `PrismaModule`
126
177
 
127
178
  - `PrismaModule.forRoot(options)` / `PrismaModule.forRootAsync(options)`
128
- - `forRootAsync(...)`는 `AsyncModuleOptions<PrismaModuleOptions<...>>`를 받습니다.
179
+ - `PrismaModule.forName(name, options)` / `PrismaModule.forNameAsync(name, options)`
180
+ - `forRoot(...)`와 `forRootAsync(...)`도 이름 있는/scoped 등록을 위해 `name`을 받을 수 있습니다.
181
+ - `forRootAsync(...)`는 client와 transaction 설정을 factory에서 반환하는 DI-aware Prisma 옵션을 받습니다. 모듈 identity와 visibility가 factory 실행 전에 결정되도록 `name` 또는 `global`은 최상위 async 등록 옵션에 전달하세요.
182
+ - `forRootAsync(...)`는 애플리케이션 컨테이너마다 옵션을 한 번 resolve하여, 별도 bootstrap 사이에서 클라이언트 라이프사이클과 요청 트랜잭션 격리를 보존합니다.
129
183
  - `strictTransactions: true` 설정 시 트랜잭션 미지원 환경에서 즉시 예외를 발생시킵니다.
184
+ - `strictTransactions`가 `false`이면 클라이언트가 interactive `$transaction`을 제공하지 않을 때 직접 실행으로 fallback합니다.
185
+ - 이름 있는 등록의 `name`은 trim되며, 빈 이름은 거부됩니다.
130
186
 
131
187
  ### `PrismaService<TClient>`
132
188
 
@@ -135,15 +191,29 @@ defineModule(ManualPrismaModule, {
135
191
  - `transaction(fn, options?): Promise<T>`
136
192
  - 대화형 트랜잭션 내에서 함수를 실행합니다.
137
193
  - `requestTransaction(fn, signal?, options?): Promise<T>`
138
- - HTTP 요청 라이프사이클에 특화된 트랜잭션 경계를 실행합니다.
194
+ - HTTP 요청 라이프사이클에 특화된 트랜잭션 경계를 실행합니다. Abort를 인식하고, shutdown 중에는 disconnect 전에 열린 요청 트랜잭션을 drain하며, Prisma client가 `signal` 옵션을 거부하면 해당 옵션 없이 재시도합니다.
139
195
 
140
196
  ### `PRISMA_CLIENT` (Token)
141
197
 
142
198
  원시 `PrismaClient` 인스턴스를 위한 주입 토큰입니다.
143
199
 
200
+ ### 플랫폼 status
201
+
202
+ - `createPrismaPlatformStatusSnapshot(input)`: Prisma readiness, health, ownership, ALS 기반 transaction context를 보고하는 persistence platform status snapshot을 생성합니다.
203
+
204
+ ### 이름 있는 Prisma 토큰 헬퍼
205
+
206
+ - `getPrismaClientToken(name?)`
207
+ - `getPrismaOptionsToken(name?)`
208
+ - `getPrismaServiceToken(name?)`
209
+
210
+ 이 헬퍼들은 `name`이 없으면 기본 이름 없는 토큰을 반환하고, `name`이 있으면 해당 등록 전용 토큰을 반환합니다.
211
+
144
212
  ### 관련 export 타입
145
213
 
146
214
  - `PrismaModuleOptions`
215
+ - `PrismaClientLike`
216
+ - `PrismaHandleProvider`
147
217
  - `PrismaTransactionClient<TClient>`
148
218
  - `InferPrismaTransactionClient<TClient>`
149
219
  - `InferPrismaTransactionOptions<TClient>`
@@ -157,3 +227,4 @@ defineModule(ManualPrismaModule, {
157
227
  ## 예제 소스
158
228
 
159
229
  - `packages/prisma/src/vertical-slice.test.ts`: 표준 DTO → 서비스 → 리포지토리 → Prisma 흐름 예제.
230
+ - `packages/prisma/src/module.test.ts`: 모듈 라이프사이클, 이름 있는 클라이언트, async factory, strict transaction 동작, status snapshot 테스트.
package/README.md CHANGED
@@ -11,8 +11,10 @@ Prisma lifecycle and ALS-backed transaction context for fluo applications. Conne
11
11
  - [Quick Start](#quick-start)
12
12
  - [Common Patterns](#common-patterns)
13
13
  - [PrismaService and current()](#prismaservice-and-current)
14
+ - [Named Registrations for Multiple Clients](#named-registrations-for-multiple-clients)
14
15
  - [Manual Transactions](#manual-transactions)
15
16
  - [Automatic Request Transactions](#automatic-request-transactions)
17
+ - [Async Configuration and Isolation](#async-configuration-and-isolation)
16
18
  - [Manual Module Composition](#manual-module-composition)
17
19
  - [Public API Overview](#public-api-overview)
18
20
  - [Related Packages](#related-packages)
@@ -73,6 +75,34 @@ export class UserRepository {
73
75
  }
74
76
  ```
75
77
 
78
+ ### Named Registrations for Multiple Clients
79
+
80
+ When one application container needs more than one Prisma client, register each client with an explicit `name` and inject the matching token with `getPrismaServiceToken(name)`.
81
+
82
+ ```typescript
83
+ import { Inject } from '@fluojs/core';
84
+ import { PrismaModule, PrismaService, getPrismaServiceToken } from '@fluojs/prisma';
85
+
86
+ const usersPrismaModule = PrismaModule.forName('users', { client: usersPrisma });
87
+ const analyticsPrismaModule = PrismaModule.forRoot({ name: 'analytics', client: analyticsPrisma });
88
+
89
+ @Inject(getPrismaServiceToken('users'), getPrismaServiceToken('analytics'))
90
+ export class MultiDatabaseService {
91
+ constructor(
92
+ private readonly users: PrismaService<typeof usersPrisma>,
93
+ private readonly analytics: PrismaService<typeof analyticsPrisma>,
94
+ ) {}
95
+
96
+ async loadDashboard(userId: string) {
97
+ const user = await this.users.current().user.findUnique({ where: { id: userId } });
98
+ const summary = await this.analytics.current().report.findMany();
99
+ return { summary, user };
100
+ }
101
+ }
102
+ ```
103
+
104
+ Unnamed registration remains the default single-client path for `PrismaService`, `PRISMA_CLIENT`, `PRISMA_OPTIONS`, and `PrismaTransactionInterceptor`. When you register multiple Prisma clients in the same container, use names for every additional client so token resolution stays explicit.
105
+
76
106
  ### Manual Transactions
77
107
 
78
108
  Use `prisma.transaction()` to create an interactive transaction block. Any calls to `current()` inside the block will use the transaction-scoped client.
@@ -101,6 +131,27 @@ class UserController {
101
131
  }
102
132
  ```
103
133
 
134
+ `PrismaTransactionInterceptor` targets the default unnamed `PrismaService`. For named multi-client registrations, inject the corresponding named `PrismaService` and open explicit `transaction()` / `requestTransaction()` boundaries where needed.
135
+
136
+ ### Async Configuration and Isolation
137
+
138
+ Use `PrismaModule.forRootAsync(...)` when the Prisma client must be created from injected configuration or another async source. The async factory is resolved once per application container and is not shared across separate bootstraps, even when the same module definition is reused in tests or multi-app processes.
139
+
140
+ ```typescript
141
+ import { PrismaClient } from '@prisma/client';
142
+ import { PrismaModule } from '@fluojs/prisma';
143
+
144
+ PrismaModule.forRootAsync({
145
+ inject: [DatabaseConfig],
146
+ useFactory: (config: DatabaseConfig) => ({
147
+ client: new PrismaClient({ datasources: { db: { url: config.url } } }),
148
+ strictTransactions: true,
149
+ }),
150
+ });
151
+ ```
152
+
153
+ Within one compiled application, downstream providers share the same resolved `PrismaService`, ALS transaction context, and lifecycle-managed client. Separate application containers receive independent factory results, so `$connect` / `$disconnect` ownership and request transaction state remain isolated.
154
+
104
155
  ### Manual Module Composition
105
156
 
106
157
  Use `PrismaModule.forRoot(...)` / `forRootAsync(...)` to register Prisma. When you need to compose Prisma support inside a custom `defineModule(...)` registration, import the module entrypoint there as well.
@@ -125,8 +176,13 @@ defineModule(ManualPrismaModule, {
125
176
  ### `PrismaModule`
126
177
 
127
178
  - `PrismaModule.forRoot(options)` / `PrismaModule.forRootAsync(options)`
128
- - `forRootAsync(...)` accepts `AsyncModuleOptions<PrismaModuleOptions<...>>`.
179
+ - `PrismaModule.forName(name, options)` / `PrismaModule.forNameAsync(name, options)`
180
+ - `forRoot(...)` and `forRootAsync(...)` also accept `name` for named/scoped registrations.
181
+ - `forRootAsync(...)` accepts DI-aware Prisma options whose factory returns the client and transaction settings; pass `name` or `global` on the top-level async registration so module identity and visibility are decided before the factory runs.
182
+ - `forRootAsync(...)` resolves options once per application container, preserving client lifecycle and request transaction isolation across separate bootstraps.
129
183
  - Supports `strictTransactions: true` to throw if transaction support is missing.
184
+ - When `strictTransactions` is `false`, PrismaService falls back to direct execution if the client does not expose interactive `$transaction`.
185
+ - Names are trimmed for named registrations, and blank names are rejected.
130
186
 
131
187
  ### `PrismaService<TClient>`
132
188
 
@@ -135,15 +191,29 @@ defineModule(ManualPrismaModule, {
135
191
  - `transaction(fn, options?): Promise<T>`
136
192
  - Runs a function within an interactive transaction.
137
193
  - `requestTransaction(fn, signal?, options?): Promise<T>`
138
- - Specialized transaction boundary for HTTP request lifecycles.
194
+ - Specialized transaction boundary for HTTP request lifecycles. It is abort-aware, drains during shutdown before disconnect, and retries without `signal` when a Prisma client rejects that option.
139
195
 
140
196
  ### `PRISMA_CLIENT` (Token)
141
197
 
142
198
  Injectable token for the raw `PrismaClient` instance.
143
199
 
200
+ ### Platform status
201
+
202
+ - `createPrismaPlatformStatusSnapshot(input)`: Creates a persistence platform status snapshot that reports Prisma readiness, health, ownership, and ALS-backed transaction context.
203
+
204
+ ### Named Prisma token helpers
205
+
206
+ - `getPrismaClientToken(name?)`
207
+ - `getPrismaOptionsToken(name?)`
208
+ - `getPrismaServiceToken(name?)`
209
+
210
+ These helpers return the default unnamed token when `name` is omitted and a registration-specific token when `name` is provided.
211
+
144
212
  ### Related exported types
145
213
 
146
214
  - `PrismaModuleOptions`
215
+ - `PrismaClientLike`
216
+ - `PrismaHandleProvider`
147
217
  - `PrismaTransactionClient<TClient>`
148
218
  - `InferPrismaTransactionClient<TClient>`
149
219
  - `InferPrismaTransactionOptions<TClient>`
@@ -157,3 +227,4 @@ Injectable token for the raw `PrismaClient` instance.
157
227
  ## Example Sources
158
228
 
159
229
  - `packages/prisma/src/vertical-slice.test.ts`: DTO → Service → Repository → Prisma flow.
230
+ - `packages/prisma/src/module.test.ts`: Module lifecycle, named clients, async factories, strict transaction behavior, and status snapshots.
package/dist/module.d.ts CHANGED
@@ -1,10 +1,22 @@
1
- import type { AsyncModuleOptions } from '@fluojs/core';
1
+ import { type AsyncModuleOptions } from '@fluojs/core';
2
2
  import { type ModuleType } from '@fluojs/runtime';
3
3
  import type { InferPrismaTransactionClient, InferPrismaTransactionOptions, PrismaClientLike, PrismaModuleOptions } from './types.js';
4
+ type PrismaAsyncModuleOptions<TClient extends PrismaClientLike<TTransactionClient, TTransactionOptions>, TTransactionClient, TTransactionOptions> = AsyncModuleOptions<Omit<PrismaModuleOptions<TClient, TTransactionClient, TTransactionOptions>, 'global' | 'name'>> & {
5
+ global?: boolean;
6
+ name?: string;
7
+ };
4
8
  /**
5
9
  * Runtime module entrypoint for Prisma lifecycle and transaction wiring.
6
10
  */
7
11
  export declare class PrismaModule {
12
+ /**
13
+ * Registers Prisma providers from static options under an explicit name.
14
+ *
15
+ * @param name Registration name used to generate isolated Prisma DI tokens.
16
+ * @param options Prisma module options with client handle and strict transaction mode.
17
+ * @returns A module definition that exports the named Prisma tokens.
18
+ */
19
+ static forName<TClient extends PrismaClientLike<TTransactionClient, TTransactionOptions>, TTransactionClient = InferPrismaTransactionClient<TClient>, TTransactionOptions = InferPrismaTransactionOptions<TClient>>(name: string, options: Omit<PrismaModuleOptions<TClient, TTransactionClient, TTransactionOptions>, 'name'>): ModuleType;
8
20
  /**
9
21
  * Registers Prisma providers from static options.
10
22
  *
@@ -12,12 +24,21 @@ export declare class PrismaModule {
12
24
  * @returns A module definition that exports `PrismaService` and `PrismaTransactionInterceptor`.
13
25
  */
14
26
  static forRoot<TClient extends PrismaClientLike<TTransactionClient, TTransactionOptions>, TTransactionClient = InferPrismaTransactionClient<TClient>, TTransactionOptions = InferPrismaTransactionOptions<TClient>>(options: PrismaModuleOptions<TClient, TTransactionClient, TTransactionOptions>): ModuleType;
27
+ /**
28
+ * Registers Prisma providers from an async DI factory under an explicit name.
29
+ *
30
+ * @param name Registration name used to generate isolated Prisma DI tokens.
31
+ * @param options Async module options that resolve Prisma client/module configuration.
32
+ * @returns A module definition that resolves async options once per application container.
33
+ */
34
+ static forNameAsync<TClient extends PrismaClientLike<TTransactionClient, TTransactionOptions>, TTransactionClient = InferPrismaTransactionClient<TClient>, TTransactionOptions = InferPrismaTransactionOptions<TClient>>(name: string, options: AsyncModuleOptions<Omit<PrismaModuleOptions<TClient, TTransactionClient, TTransactionOptions>, 'global' | 'name'>>): ModuleType;
15
35
  /**
16
36
  * Registers Prisma providers from an async DI factory.
17
37
  *
18
38
  * @param options Async module options that resolve Prisma client/module configuration.
19
- * @returns A module definition that memoizes async options resolution per module instance.
39
+ * @returns A module definition that resolves async options once per application container.
20
40
  */
21
- static forRootAsync<TClient extends PrismaClientLike<TTransactionClient, TTransactionOptions>, TTransactionClient = InferPrismaTransactionClient<TClient>, TTransactionOptions = InferPrismaTransactionOptions<TClient>>(options: AsyncModuleOptions<PrismaModuleOptions<TClient, TTransactionClient, TTransactionOptions>>): ModuleType;
41
+ static forRootAsync<TClient extends PrismaClientLike<TTransactionClient, TTransactionOptions>, TTransactionClient = InferPrismaTransactionClient<TClient>, TTransactionOptions = InferPrismaTransactionOptions<TClient>>(options: PrismaAsyncModuleOptions<TClient, TTransactionClient, TTransactionOptions>): ModuleType;
22
42
  }
43
+ export {};
23
44
  //# sourceMappingURL=module.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../src/module.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAgB,MAAM,cAAc,CAAC;AAErE,OAAO,EAAgB,KAAK,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAKhE,OAAO,KAAK,EACV,4BAA4B,EAC5B,6BAA6B,EAC7B,gBAAgB,EAChB,mBAAmB,EACpB,MAAM,YAAY,CAAC;AA6GpB;;GAEG;AACH,qBAAa,YAAY;IACvB;;;;;OAKG;IACH,MAAM,CAAC,OAAO,CACZ,OAAO,SAAS,gBAAgB,CAAC,kBAAkB,EAAE,mBAAmB,CAAC,EACzE,kBAAkB,GAAG,4BAA4B,CAAC,OAAO,CAAC,EAC1D,mBAAmB,GAAG,6BAA6B,CAAC,OAAO,CAAC,EAE5D,OAAO,EAAE,mBAAmB,CAAC,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,CAAC,GAC7E,UAAU;IAIb;;;;;OAKG;IACH,MAAM,CAAC,YAAY,CACjB,OAAO,SAAS,gBAAgB,CAAC,k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G;IACH,MAAM,CAAC,OAAO,CACZ,OAAO,SAAS,gBAAgB,CAAC,kBAAkB,EAAE,mBAAmB,CAAC,EACzE,kBAAkB,GAAG,4BAA4B,CAAC,OAAO,CAAC,EAC1D,mBAAmB,GAAG,6BAA6B,CAAC,OAAO,CAAC,EAE5D,OAAO,EAAE,mBAAmB,CAAC,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,CAAC,GAC7E,UAAU;IAIb;;;;;;OAMG;IACH,MAAM,CAAC,YAAY,CACjB,OAAO,SAAS,gBAAgB,CAAC,kBAAkB,EAAE,mBAAmB,CAAC,EACzE,kBAAkB,GAAG,4BAA4B,CAAC,OAAO,CAAC,EAC1D,mBAAmB,GAAG,6BAA6B,CAAC,OAAO,CAAC,EAE5D,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,kBAAkB,CAAC,IAAI,CAAC,mBAAmB,CAAC,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,CAAC,EAAE,QAAQ,GAAG,MAAM,CAAC,CAAC,GAC1H,UAAU;IAOb;;;;;OAKG;IACH,MAAM,CAAC,YAAY,CACjB,OAAO,SAAS,gBAAgB,CAAC,kBAAkB,EAAE,mBAAmB,CAAC,EACzE,kBAAkB,GAAG,4BAA4B,CAAC,OAAO,CAAC,EAC1D,mBAAmB,GAAG,6BAA6B,CAAC,OAAO,CAAC,EAE5D,OAAO,EAAE,wBAAwB,CAAC,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,CAAC,GAClF,UAAU;CAGd"}
package/dist/module.js CHANGED
@@ -1,57 +1,100 @@
1
+ import { Inject } from '@fluojs/core';
1
2
  import { defineModule } from '@fluojs/runtime';
2
3
  import { PrismaService } from './service.js';
3
- import { PRISMA_CLIENT, PRISMA_OPTIONS } from './tokens.js';
4
+ import { getPrismaClientToken, getPrismaOptionsToken, getPrismaServiceToken } from './tokens.js';
4
5
  import { PrismaTransactionInterceptor } from './transaction.js';
5
6
  const PRISMA_NORMALIZED_OPTIONS = Symbol('fluo.prisma.normalized-options');
6
- const PRISMA_MODULE_EXPORTS = [PrismaService, PrismaTransactionInterceptor];
7
+ function normalizePrismaRegistrationName(name) {
8
+ if (name === undefined) {
9
+ return undefined;
10
+ }
11
+ const normalizedName = name.trim();
12
+ if (normalizedName.length === 0) {
13
+ throw new Error('PrismaModule name must be a non-empty string when provided.');
14
+ }
15
+ return normalizedName;
16
+ }
17
+ function getPrismaNormalizedOptionsToken(name) {
18
+ const normalizedName = normalizePrismaRegistrationName(name);
19
+ return normalizedName === undefined ? PRISMA_NORMALIZED_OPTIONS : Symbol.for(`fluo.prisma.normalized-options:${normalizedName}`);
20
+ }
7
21
  function normalizePrismaModuleOptions(options) {
8
22
  return {
23
+ name: normalizePrismaRegistrationName(options.name),
9
24
  client: options.client,
25
+ global: options.global ?? false,
10
26
  strictTransactions: options.strictTransactions ?? false
11
27
  };
12
28
  }
13
- function createPrismaRuntimeProviders(normalizedOptionsProvider) {
29
+ function createNamedPrismaServiceProvider(name) {
30
+ const clientToken = getPrismaClientToken(name);
31
+ const optionsToken = getPrismaOptionsToken(name);
32
+ const serviceToken = getPrismaServiceToken(name);
33
+ class NamedPrismaService extends PrismaService {}
34
+ Inject(clientToken, optionsToken)(NamedPrismaService, {});
35
+ return [NamedPrismaService, {
36
+ provide: serviceToken,
37
+ useExisting: NamedPrismaService
38
+ }];
39
+ }
40
+ function createPrismaRuntimeProviders(normalizedOptionsProvider, name) {
41
+ const normalizedOptionsToken = getPrismaNormalizedOptionsToken(name);
42
+ const clientToken = getPrismaClientToken(name);
43
+ const optionsToken = getPrismaOptionsToken(name);
14
44
  return [normalizedOptionsProvider, {
15
- inject: [PRISMA_NORMALIZED_OPTIONS],
16
- provide: PRISMA_CLIENT,
45
+ inject: [normalizedOptionsToken],
46
+ provide: clientToken,
17
47
  useFactory: options => options.client
18
48
  }, {
19
- inject: [PRISMA_NORMALIZED_OPTIONS],
20
- provide: PRISMA_OPTIONS,
49
+ inject: [normalizedOptionsToken],
50
+ provide: optionsToken,
21
51
  useFactory: options => ({
22
52
  strictTransactions: options.strictTransactions
23
53
  })
24
- }, PrismaService, PrismaTransactionInterceptor];
54
+ }, ...(name === undefined ? [PrismaService, {
55
+ provide: getPrismaServiceToken(),
56
+ useExisting: PrismaService
57
+ }, PrismaTransactionInterceptor] : createNamedPrismaServiceProvider(name))];
25
58
  }
26
59
  function buildPrismaModule(options) {
27
60
  class PrismaRootModuleDefinition {}
61
+ const normalizedOptions = normalizePrismaModuleOptions(options);
62
+ if (normalizedOptions.name !== undefined && normalizedOptions.global) {
63
+ throw new Error('Named Prisma registrations are scoped and cannot be registered globally.');
64
+ }
28
65
  return defineModule(PrismaRootModuleDefinition, {
29
- exports: PRISMA_MODULE_EXPORTS,
66
+ exports: normalizedOptions.name === undefined ? [PrismaService, PrismaTransactionInterceptor, getPrismaServiceToken(), getPrismaClientToken(), getPrismaOptionsToken()] : [getPrismaServiceToken(normalizedOptions.name), getPrismaClientToken(normalizedOptions.name), getPrismaOptionsToken(normalizedOptions.name)],
67
+ global: normalizedOptions.name === undefined ? normalizedOptions.global : false,
30
68
  providers: createPrismaRuntimeProviders({
31
- provide: PRISMA_NORMALIZED_OPTIONS,
32
- useValue: normalizePrismaModuleOptions(options)
33
- })
69
+ provide: getPrismaNormalizedOptionsToken(normalizedOptions.name),
70
+ useValue: normalizedOptions
71
+ }, normalizedOptions.name)
34
72
  });
35
73
  }
36
74
  function buildPrismaModuleAsync(options) {
37
75
  class PrismaAsyncModuleDefinition {}
38
76
  const factory = options.useFactory;
39
- let cachedResult;
40
- const memoizedFactory = (...deps) => {
41
- if (!cachedResult) {
42
- cachedResult = Promise.resolve(factory(...deps)).then(resolved => normalizePrismaModuleOptions(resolved));
43
- }
44
- return cachedResult;
45
- };
77
+ const normalizedName = normalizePrismaRegistrationName(options.name);
78
+ if (normalizedName !== undefined && options.global) {
79
+ throw new Error('Named Prisma registrations are scoped and cannot be registered globally.');
80
+ }
46
81
  const normalizedOptionsProvider = {
47
82
  inject: options.inject,
48
- provide: PRISMA_NORMALIZED_OPTIONS,
83
+ provide: getPrismaNormalizedOptionsToken(normalizedName),
49
84
  scope: 'singleton',
50
- useFactory: (...deps) => memoizedFactory(...deps)
85
+ useFactory: async (...deps) => {
86
+ const resolvedOptions = await factory(...deps);
87
+ return normalizePrismaModuleOptions({
88
+ ...resolvedOptions,
89
+ global: options.global,
90
+ name: normalizedName
91
+ });
92
+ }
51
93
  };
52
94
  return defineModule(PrismaAsyncModuleDefinition, {
53
- exports: PRISMA_MODULE_EXPORTS,
54
- providers: createPrismaRuntimeProviders(normalizedOptionsProvider)
95
+ exports: normalizedName === undefined ? [PrismaService, PrismaTransactionInterceptor, getPrismaServiceToken(), getPrismaClientToken(), getPrismaOptionsToken()] : [getPrismaServiceToken(normalizedName), getPrismaClientToken(normalizedName), getPrismaOptionsToken(normalizedName)],
96
+ global: normalizedName === undefined ? options.global ?? false : false,
97
+ providers: createPrismaRuntimeProviders(normalizedOptionsProvider, normalizedName)
55
98
  });
56
99
  }
57
100
 
@@ -59,6 +102,20 @@ function buildPrismaModuleAsync(options) {
59
102
  * Runtime module entrypoint for Prisma lifecycle and transaction wiring.
60
103
  */
61
104
  export class PrismaModule {
105
+ /**
106
+ * Registers Prisma providers from static options under an explicit name.
107
+ *
108
+ * @param name Registration name used to generate isolated Prisma DI tokens.
109
+ * @param options Prisma module options with client handle and strict transaction mode.
110
+ * @returns A module definition that exports the named Prisma tokens.
111
+ */
112
+ static forName(name, options) {
113
+ return buildPrismaModule({
114
+ ...options,
115
+ name
116
+ });
117
+ }
118
+
62
119
  /**
63
120
  * Registers Prisma providers from static options.
64
121
  *
@@ -69,11 +126,25 @@ export class PrismaModule {
69
126
  return buildPrismaModule(options);
70
127
  }
71
128
 
129
+ /**
130
+ * Registers Prisma providers from an async DI factory under an explicit name.
131
+ *
132
+ * @param name Registration name used to generate isolated Prisma DI tokens.
133
+ * @param options Async module options that resolve Prisma client/module configuration.
134
+ * @returns A module definition that resolves async options once per application container.
135
+ */
136
+ static forNameAsync(name, options) {
137
+ return buildPrismaModuleAsync({
138
+ ...options,
139
+ name
140
+ });
141
+ }
142
+
72
143
  /**
73
144
  * Registers Prisma providers from an async DI factory.
74
145
  *
75
146
  * @param options Async module options that resolve Prisma client/module configuration.
76
- * @returns A module definition that memoizes async options resolution per module instance.
147
+ * @returns A module definition that resolves async options once per application container.
77
148
  */
78
149
  static forRootAsync(options) {
79
150
  return buildPrismaModuleAsync(options);
package/dist/status.d.ts CHANGED
@@ -9,6 +9,12 @@ type PrismaPlatformStatusSnapshotInput = {
9
9
  supportsTransaction: boolean;
10
10
  transactionAbortSignalSupport: 'unknown' | 'supported' | 'unsupported';
11
11
  };
12
+ /**
13
+ * Create prisma platform status snapshot.
14
+ *
15
+ * @param input The input.
16
+ * @returns The create prisma platform status snapshot result.
17
+ */
12
18
  export declare function createPrismaPlatformStatusSnapshot(input: PrismaPlatformStatusSnapshotInput): PersistencePlatformStatusSnapshot;
13
19
  export {};
14
20
  //# sourceMappingURL=status.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../src/status.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iCAAiC,EAGlC,MAAM,iBAAiB,CAAC;AAEzB,KAAK,4BAA4B,GAAG,SAAS,GAAG,OAAO,GAAG,eAAe,GAAG,SAAS,CAAC;AAEtF,KAAK,iCAAiC,GAAG;IACvC,yBAAyB,EAAE,MAAM,CAAC;IAClC,cAAc,EAAE,4BAA4B,CAAC;IAC7C,kBAAkB,EAAE,OAAO,CAAC;IAC5B,eAAe,EAAE,OAAO,CAAC;IACzB,kBAAkB,EAAE,OAAO,CAAC;IAC5B,mBAAmB,EAAE,OAAO,CAAC;IAC7B,6BAA6B,EAAE,SAAS,GAAG,WAAW,GAAG,aAAa,CAAC;CACxE,CAAC;AAqDF,wBAAgB,kCAAkC,CAChD,KAAK,EAAE,iCAAiC,GACvC,iCAAiC,CAmBnC"}
1
+ {"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../src/status.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iCAAiC,EAGlC,MAAM,iBAAiB,CAAC;AAEzB,KAAK,4BAA4B,GAAG,SAAS,GAAG,OAAO,GAAG,eAAe,GAAG,SAAS,CAAC;AAEtF,KAAK,iCAAiC,GAAG;IACvC,yBAAyB,EAAE,MAAM,CAAC;IAClC,cAAc,EAAE,4BAA4B,CAAC;IAC7C,kBAAkB,EAAE,OAAO,CAAC;IAC5B,eAAe,EAAE,OAAO,CAAC;IACzB,kBAAkB,EAAE,OAAO,CAAC;IAC5B,mBAAmB,EAAE,OAAO,CAAC;IAC7B,6BAA6B,EAAE,SAAS,GAAG,WAAW,GAAG,aAAa,CAAC;CACxE,CAAC;AAqDF;;;;;GAKG;AACH,wBAAgB,kCAAkC,CAChD,KAAK,EAAE,iCAAiC,GACvC,iCAAiC,CAmBnC"}
package/dist/status.js CHANGED
@@ -42,6 +42,13 @@ function createHealth(input) {
42
42
  status: 'healthy'
43
43
  };
44
44
  }
45
+
46
+ /**
47
+ * Create prisma platform status snapshot.
48
+ *
49
+ * @param input The input.
50
+ * @returns The create prisma platform status snapshot result.
51
+ */
45
52
  export function createPrismaPlatformStatusSnapshot(input) {
46
53
  return {
47
54
  details: {
package/dist/tokens.d.ts CHANGED
@@ -1,5 +1,27 @@
1
+ import type { Token } from '@fluojs/core';
1
2
  /** Dependency-injection token for the raw Prisma client handle. */
2
3
  export declare const PRISMA_CLIENT: unique symbol;
3
4
  /** Dependency-injection token for normalized Prisma runtime options. */
4
5
  export declare const PRISMA_OPTIONS: unique symbol;
6
+ /**
7
+ * Returns the DI token for the raw Prisma client bound to a registration name.
8
+ *
9
+ * @param name Optional registration name. Omit it to target the default unnamed Prisma registration.
10
+ * @returns The token that resolves the matching Prisma client instance.
11
+ */
12
+ export declare function getPrismaClientToken(name?: string): Token;
13
+ /**
14
+ * Returns the DI token for normalized Prisma module options bound to a registration name.
15
+ *
16
+ * @param name Optional registration name. Omit it to target the default unnamed Prisma registration.
17
+ * @returns The token that resolves the matching Prisma runtime options.
18
+ */
19
+ export declare function getPrismaOptionsToken(name?: string): Token;
20
+ /**
21
+ * Returns the DI token for the transaction-aware Prisma service bound to a registration name.
22
+ *
23
+ * @param name Optional registration name. Omit it to target the default unnamed Prisma registration.
24
+ * @returns The token that resolves the matching `PrismaService` instance.
25
+ */
26
+ export declare function getPrismaServiceToken(name?: string): Token;
5
27
  //# sourceMappingURL=tokens.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["../src/tokens.ts"],"names":[],"mappings":"AAAA,mEAAmE;AACnE,eAAO,MAAM,aAAa,eAAmC,CAAC;AAC9D,wEAAwE;AACxE,eAAO,MAAM,cAAc,eAAoC,CAAC"}
1
+ {"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["../src/tokens.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAE1C,mEAAmE;AACnE,eAAO,MAAM,aAAa,eAAmC,CAAC;AAC9D,wEAAwE;AACxE,eAAO,MAAM,cAAc,eAAoC,CAAC;AAgBhE;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,KAAK,CAMzD;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,KAAK,CAM1D;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,KAAK,CAM1D"}
package/dist/tokens.js CHANGED
@@ -1,4 +1,47 @@
1
1
  /** Dependency-injection token for the raw Prisma client handle. */
2
2
  export const PRISMA_CLIENT = Symbol.for('fluo.prisma.client');
3
3
  /** Dependency-injection token for normalized Prisma runtime options. */
4
- export const PRISMA_OPTIONS = Symbol.for('fluo.prisma.options');
4
+ export const PRISMA_OPTIONS = Symbol.for('fluo.prisma.options');
5
+ function normalizePrismaRegistrationName(name) {
6
+ if (name === undefined) {
7
+ return undefined;
8
+ }
9
+ const normalizedName = name.trim();
10
+ if (normalizedName.length === 0) {
11
+ throw new Error('PrismaModule name must be a non-empty string when provided.');
12
+ }
13
+ return normalizedName;
14
+ }
15
+
16
+ /**
17
+ * Returns the DI token for the raw Prisma client bound to a registration name.
18
+ *
19
+ * @param name Optional registration name. Omit it to target the default unnamed Prisma registration.
20
+ * @returns The token that resolves the matching Prisma client instance.
21
+ */
22
+ export function getPrismaClientToken(name) {
23
+ const normalizedName = normalizePrismaRegistrationName(name);
24
+ return normalizedName === undefined ? PRISMA_CLIENT : Symbol.for(`fluo.prisma.client:${normalizedName}`);
25
+ }
26
+
27
+ /**
28
+ * Returns the DI token for normalized Prisma module options bound to a registration name.
29
+ *
30
+ * @param name Optional registration name. Omit it to target the default unnamed Prisma registration.
31
+ * @returns The token that resolves the matching Prisma runtime options.
32
+ */
33
+ export function getPrismaOptionsToken(name) {
34
+ const normalizedName = normalizePrismaRegistrationName(name);
35
+ return normalizedName === undefined ? PRISMA_OPTIONS : Symbol.for(`fluo.prisma.options:${normalizedName}`);
36
+ }
37
+
38
+ /**
39
+ * Returns the DI token for the transaction-aware Prisma service bound to a registration name.
40
+ *
41
+ * @param name Optional registration name. Omit it to target the default unnamed Prisma registration.
42
+ * @returns The token that resolves the matching `PrismaService` instance.
43
+ */
44
+ export function getPrismaServiceToken(name) {
45
+ const normalizedName = normalizePrismaRegistrationName(name);
46
+ return normalizedName === undefined ? Symbol.for('fluo.prisma.service') : Symbol.for(`fluo.prisma.service:${normalizedName}`);
47
+ }
package/dist/types.d.ts CHANGED
@@ -41,6 +41,10 @@ export interface PrismaClientLike<TTransactionClient = unknown, TTransactionOpti
41
41
  * @typeParam TTransactionOptions Options forwarded to Prisma interactive transactions.
42
42
  */
43
43
  export interface PrismaModuleOptions<TClient extends PrismaClientLike<TTransactionClient, TTransactionOptions>, TTransactionClient = InferPrismaTransactionClient<TClient>, TTransactionOptions = InferPrismaTransactionOptions<TClient>> {
44
+ /** Whether the default unnamed Prisma registration should be visible globally. Defaults to `false`. */
45
+ global?: boolean;
46
+ /** Optional registration name used to isolate Prisma tokens inside one application container. */
47
+ name?: string;
44
48
  /** Root Prisma client shared outside ambient transaction scopes. */
45
49
  client: TClient;
46
50
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAEjD,KAAK,yBAAyB,CAAC,kBAAkB,EAAE,OAAO,IAAI,CAAC,MAAM,EAAE,kBAAkB,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;AAE/G;;;;GAIG;AACH,MAAM,MAAM,4BAA4B,CAAC,OAAO,IAAI,OAAO,SAAS;IAClE,YAAY,CAAC,EAAE,CAAC,CAAC,EACf,QAAQ,EAAE,yBAAyB,CAAC,MAAM,kBAAkB,EAAE,CAAC,CAAC,EAChE,OAAO,CAAC,EAAE,MAAM,oBAAoB,KACjC,OAAO,CAAC,CAAC,CAAC,CAAC;CACjB,GACG,kBAAkB,GAClB,OAAO,CAAC;AAEZ;;;;GAIG;AACH,MAAM,MAAM,6BAA6B,CAAC,OAAO,IAAI,OAAO,SAAS;IACnE,YAAY,CAAC,EAAE,CAAC,CAAC,EACf,QAAQ,EAAE,yBAAyB,CAAC,MAAM,mBAAmB,EAAE,CAAC,CAAC,EACjE,OAAO,CAAC,EAAE,MAAM,mBAAmB,KAChC,OAAO,CAAC,CAAC,CAAC,CAAC;CACjB,GACG,mBAAmB,GACnB,OAAO,CAAC;AAEZ;;;;GAIG;AACH,MAAM,MAAM,uBAAuB,CAAC,OAAO,IAAI,4BAA4B,CAAC,OAAO,CAAC,CAAC;AAErF;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB,CAAC,kBAAkB,GAAG,OAAO,EAAE,mBAAmB,GAAG,OAAO;IAC3F,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;;;;;;GAMG;AACH,MAAM,WAAW,mBAAmB,CAClC,OAAO,SAAS,gBAAgB,CAAC,kBAAkB,EAAE,mBAAmB,CAAC,EACzE,kBAAkB,GAAG,4BAA4B,CAAC,OAAO,CAAC,EAC1D,mBAAmB,GAAG,6BAA6B,CAAC,OAAO,CAAC;IAE5D,uGAAuG;IACvG,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,iGAAiG;IACjG,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,oEAAoE;IACpE,MAAM,EAAE,OAAO,CAAC;IAChB;;;;;OAKG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAED;;;;;;GAMG;AACH,MAAM,WAAW,oBAAoB,CACnC,OAAO,SAAS,gBAAgB,CAAC,kBAAkB,EAAE,mBAAmB,CAAC,EACzE,kBAAkB,GAAG,4BAA4B,CAAC,OAAO,CAAC,EAC1D,mBAAmB,GAAG,6BAA6B,CAAC,OAAO,CAAC;IAE5D,gGAAgG;IAChG,OAAO,IAAI,OAAO,GAAG,kBAAkB,CAAC;IACxC;;;;;;;OAOG;IACH,kBAAkB,CAAC,CAAC,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,EAAE,WAAW,EAAE,OAAO,CAAC,EAAE,mBAAmB,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;IAC7G;;;;;;OAMG;IACH,WAAW,CAAC,CAAC,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,EAAE,mBAAmB,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;CACjF"}
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  "transaction",
10
10
  "als"
11
11
  ],
12
- "version": "1.0.0-beta.1",
12
+ "version": "1.0.0-beta.3",
13
13
  "private": false,
14
14
  "license": "MIT",
15
15
  "repository": {
@@ -36,11 +36,11 @@
36
36
  "dist"
37
37
  ],
38
38
  "dependencies": {
39
- "@fluojs/core": "^1.0.0-beta.1",
40
- "@fluojs/http": "^1.0.0-beta.1",
41
- "@fluojs/runtime": "^1.0.0-beta.1",
42
- "@fluojs/validation": "^1.0.0-beta.1",
43
- "@fluojs/di": "^1.0.0-beta.1"
39
+ "@fluojs/core": "^1.0.0-beta.4",
40
+ "@fluojs/validation": "^1.0.0-beta.3",
41
+ "@fluojs/http": "^1.0.0-beta.10",
42
+ "@fluojs/di": "^1.0.0-beta.6",
43
+ "@fluojs/runtime": "^1.0.0-beta.11"
44
44
  },
45
45
  "peerDependencies": {
46
46
  "@prisma/client": ">=5.0.0"