@fluojs/prisma 1.0.0-beta.1 → 1.0.0-beta.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.
- package/README.ko.md +62 -0
- package/README.md +62 -0
- package/dist/module.d.ts +21 -3
- package/dist/module.d.ts.map +1 -1
- package/dist/module.js +85 -24
- package/dist/status.d.ts +6 -0
- package/dist/status.d.ts.map +1 -1
- package/dist/status.js +7 -0
- package/dist/tokens.d.ts +22 -0
- package/dist/tokens.d.ts.map +1 -1
- package/dist/tokens.js +44 -1
- package/dist/types.d.ts +2 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +5 -5
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,7 +176,10 @@ defineModule(ManualPrismaModule, {
|
|
|
125
176
|
### `PrismaModule`
|
|
126
177
|
|
|
127
178
|
- `PrismaModule.forRoot(options)` / `PrismaModule.forRootAsync(options)`
|
|
179
|
+
- `PrismaModule.forName(name, options)` / `PrismaModule.forNameAsync(name, options)`
|
|
180
|
+
- `forRoot(...)`와 `forRootAsync(...)`도 이름 있는/scoped 등록을 위해 `name`을 받을 수 있습니다.
|
|
128
181
|
- `forRootAsync(...)`는 `AsyncModuleOptions<PrismaModuleOptions<...>>`를 받습니다.
|
|
182
|
+
- `forRootAsync(...)`는 애플리케이션 컨테이너마다 옵션을 한 번 resolve하여, 별도 bootstrap 사이에서 클라이언트 라이프사이클과 요청 트랜잭션 격리를 보존합니다.
|
|
129
183
|
- `strictTransactions: true` 설정 시 트랜잭션 미지원 환경에서 즉시 예외를 발생시킵니다.
|
|
130
184
|
|
|
131
185
|
### `PrismaService<TClient>`
|
|
@@ -141,6 +195,14 @@ defineModule(ManualPrismaModule, {
|
|
|
141
195
|
|
|
142
196
|
원시 `PrismaClient` 인스턴스를 위한 주입 토큰입니다.
|
|
143
197
|
|
|
198
|
+
### 이름 있는 Prisma 토큰 헬퍼
|
|
199
|
+
|
|
200
|
+
- `getPrismaClientToken(name?)`
|
|
201
|
+
- `getPrismaOptionsToken(name?)`
|
|
202
|
+
- `getPrismaServiceToken(name?)`
|
|
203
|
+
|
|
204
|
+
이 헬퍼들은 `name`이 없으면 기본 이름 없는 토큰을 반환하고, `name`이 있으면 해당 등록 전용 토큰을 반환합니다.
|
|
205
|
+
|
|
144
206
|
### 관련 export 타입
|
|
145
207
|
|
|
146
208
|
- `PrismaModuleOptions`
|
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,7 +176,10 @@ defineModule(ManualPrismaModule, {
|
|
|
125
176
|
### `PrismaModule`
|
|
126
177
|
|
|
127
178
|
- `PrismaModule.forRoot(options)` / `PrismaModule.forRootAsync(options)`
|
|
179
|
+
- `PrismaModule.forName(name, options)` / `PrismaModule.forNameAsync(name, options)`
|
|
180
|
+
- `forRoot(...)` and `forRootAsync(...)` also accept `name` for named/scoped registrations.
|
|
128
181
|
- `forRootAsync(...)` accepts `AsyncModuleOptions<PrismaModuleOptions<...>>`.
|
|
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.
|
|
130
184
|
|
|
131
185
|
### `PrismaService<TClient>`
|
|
@@ -141,6 +195,14 @@ defineModule(ManualPrismaModule, {
|
|
|
141
195
|
|
|
142
196
|
Injectable token for the raw `PrismaClient` instance.
|
|
143
197
|
|
|
198
|
+
### Named Prisma token helpers
|
|
199
|
+
|
|
200
|
+
- `getPrismaClientToken(name?)`
|
|
201
|
+
- `getPrismaOptionsToken(name?)`
|
|
202
|
+
- `getPrismaServiceToken(name?)`
|
|
203
|
+
|
|
204
|
+
These helpers return the default unnamed token when `name` is omitted and a registration-specific token when `name` is provided.
|
|
205
|
+
|
|
144
206
|
### Related exported types
|
|
145
207
|
|
|
146
208
|
- `PrismaModuleOptions`
|
package/dist/module.d.ts
CHANGED
|
@@ -1,10 +1,18 @@
|
|
|
1
|
-
import type
|
|
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
4
|
/**
|
|
5
5
|
* Runtime module entrypoint for Prisma lifecycle and transaction wiring.
|
|
6
6
|
*/
|
|
7
7
|
export declare class PrismaModule {
|
|
8
|
+
/**
|
|
9
|
+
* Registers Prisma providers from static options under an explicit name.
|
|
10
|
+
*
|
|
11
|
+
* @param name Registration name used to generate isolated Prisma DI tokens.
|
|
12
|
+
* @param options Prisma module options with client handle and strict transaction mode.
|
|
13
|
+
* @returns A module definition that exports the named Prisma tokens.
|
|
14
|
+
*/
|
|
15
|
+
static forName<TClient extends PrismaClientLike<TTransactionClient, TTransactionOptions>, TTransactionClient = InferPrismaTransactionClient<TClient>, TTransactionOptions = InferPrismaTransactionOptions<TClient>>(name: string, options: Omit<PrismaModuleOptions<TClient, TTransactionClient, TTransactionOptions>, 'name'>): ModuleType;
|
|
8
16
|
/**
|
|
9
17
|
* Registers Prisma providers from static options.
|
|
10
18
|
*
|
|
@@ -12,12 +20,22 @@ export declare class PrismaModule {
|
|
|
12
20
|
* @returns A module definition that exports `PrismaService` and `PrismaTransactionInterceptor`.
|
|
13
21
|
*/
|
|
14
22
|
static forRoot<TClient extends PrismaClientLike<TTransactionClient, TTransactionOptions>, TTransactionClient = InferPrismaTransactionClient<TClient>, TTransactionOptions = InferPrismaTransactionOptions<TClient>>(options: PrismaModuleOptions<TClient, TTransactionClient, TTransactionOptions>): ModuleType;
|
|
23
|
+
/**
|
|
24
|
+
* Registers Prisma providers from an async DI factory under an explicit name.
|
|
25
|
+
*
|
|
26
|
+
* @param name Registration name used to generate isolated Prisma DI tokens.
|
|
27
|
+
* @param options Async module options that resolve Prisma client/module configuration.
|
|
28
|
+
* @returns A module definition that resolves async options once per application container.
|
|
29
|
+
*/
|
|
30
|
+
static forNameAsync<TClient extends PrismaClientLike<TTransactionClient, TTransactionOptions>, TTransactionClient = InferPrismaTransactionClient<TClient>, TTransactionOptions = InferPrismaTransactionOptions<TClient>>(name: string, options: AsyncModuleOptions<Omit<PrismaModuleOptions<TClient, TTransactionClient, TTransactionOptions>, 'name'>>): ModuleType;
|
|
15
31
|
/**
|
|
16
32
|
* Registers Prisma providers from an async DI factory.
|
|
17
33
|
*
|
|
18
34
|
* @param options Async module options that resolve Prisma client/module configuration.
|
|
19
|
-
* @returns A module definition that
|
|
35
|
+
* @returns A module definition that resolves async options once per application container.
|
|
20
36
|
*/
|
|
21
|
-
static forRootAsync<TClient extends PrismaClientLike<TTransactionClient, TTransactionOptions>, TTransactionClient = InferPrismaTransactionClient<TClient>, TTransactionOptions = InferPrismaTransactionOptions<TClient>>(options: AsyncModuleOptions<PrismaModuleOptions<TClient, TTransactionClient, TTransactionOptions>>
|
|
37
|
+
static forRootAsync<TClient extends PrismaClientLike<TTransactionClient, TTransactionOptions>, TTransactionClient = InferPrismaTransactionClient<TClient>, TTransactionOptions = InferPrismaTransactionOptions<TClient>>(options: AsyncModuleOptions<PrismaModuleOptions<TClient, TTransactionClient, TTransactionOptions>> & {
|
|
38
|
+
name?: string;
|
|
39
|
+
}): ModuleType;
|
|
22
40
|
}
|
|
23
41
|
//# sourceMappingURL=module.d.ts.map
|
package/dist/module.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../src/module.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../src/module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,KAAK,kBAAkB,EAAc,MAAM,cAAc,CAAC;AAE3E,OAAO,EAAgB,KAAK,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAShE,OAAO,KAAK,EACV,4BAA4B,EAC5B,6BAA6B,EAC7B,gBAAgB,EAChB,mBAAmB,EACpB,MAAM,YAAY,CAAC;AA4KpB;;GAEG;AACH,qBAAa,YAAY;IACvB;;;;;;OAMG;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,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,IAAI,CAAC,mBAAmB,CAAC,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,CAAC,EAAE,MAAM,CAAC,GAC3F,UAAU;IAOb;;;;;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;;;;;;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,MAAM,CAAC,CAAC,GAC/G,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,kBAAkB,CAAC,mBAAmB,CAAC,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,CAAC,CAAC,GAAG;QAAE,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,GACrH,UAAU;CAGd"}
|
package/dist/module.js
CHANGED
|
@@ -1,57 +1,90 @@
|
|
|
1
|
+
import { Inject } from '@fluojs/core';
|
|
1
2
|
import { defineModule } from '@fluojs/runtime';
|
|
2
3
|
import { PrismaService } from './service.js';
|
|
3
|
-
import {
|
|
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
|
-
|
|
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,
|
|
10
25
|
strictTransactions: options.strictTransactions ?? false
|
|
11
26
|
};
|
|
12
27
|
}
|
|
13
|
-
function
|
|
28
|
+
function createNamedPrismaServiceProvider(name) {
|
|
29
|
+
const clientToken = getPrismaClientToken(name);
|
|
30
|
+
const optionsToken = getPrismaOptionsToken(name);
|
|
31
|
+
const serviceToken = getPrismaServiceToken(name);
|
|
32
|
+
class NamedPrismaService extends PrismaService {}
|
|
33
|
+
Inject(clientToken, optionsToken)(NamedPrismaService, {});
|
|
34
|
+
return [NamedPrismaService, {
|
|
35
|
+
provide: serviceToken,
|
|
36
|
+
useExisting: NamedPrismaService
|
|
37
|
+
}];
|
|
38
|
+
}
|
|
39
|
+
function createPrismaRuntimeProviders(normalizedOptionsProvider, name) {
|
|
40
|
+
const normalizedOptionsToken = getPrismaNormalizedOptionsToken(name);
|
|
41
|
+
const clientToken = getPrismaClientToken(name);
|
|
42
|
+
const optionsToken = getPrismaOptionsToken(name);
|
|
14
43
|
return [normalizedOptionsProvider, {
|
|
15
|
-
inject: [
|
|
16
|
-
provide:
|
|
44
|
+
inject: [normalizedOptionsToken],
|
|
45
|
+
provide: clientToken,
|
|
17
46
|
useFactory: options => options.client
|
|
18
47
|
}, {
|
|
19
|
-
inject: [
|
|
20
|
-
provide:
|
|
48
|
+
inject: [normalizedOptionsToken],
|
|
49
|
+
provide: optionsToken,
|
|
21
50
|
useFactory: options => ({
|
|
22
51
|
strictTransactions: options.strictTransactions
|
|
23
52
|
})
|
|
24
|
-
}, PrismaService,
|
|
53
|
+
}, ...(name === undefined ? [PrismaService, {
|
|
54
|
+
provide: getPrismaServiceToken(),
|
|
55
|
+
useExisting: PrismaService
|
|
56
|
+
}, PrismaTransactionInterceptor] : createNamedPrismaServiceProvider(name))];
|
|
25
57
|
}
|
|
26
58
|
function buildPrismaModule(options) {
|
|
27
59
|
class PrismaRootModuleDefinition {}
|
|
60
|
+
const normalizedOptions = normalizePrismaModuleOptions(options);
|
|
28
61
|
return defineModule(PrismaRootModuleDefinition, {
|
|
29
|
-
exports:
|
|
62
|
+
exports: normalizedOptions.name === undefined ? [PrismaService, PrismaTransactionInterceptor, getPrismaServiceToken(), getPrismaClientToken(), getPrismaOptionsToken()] : [getPrismaServiceToken(normalizedOptions.name), getPrismaClientToken(normalizedOptions.name), getPrismaOptionsToken(normalizedOptions.name)],
|
|
30
63
|
providers: createPrismaRuntimeProviders({
|
|
31
|
-
provide:
|
|
32
|
-
useValue:
|
|
33
|
-
})
|
|
64
|
+
provide: getPrismaNormalizedOptionsToken(normalizedOptions.name),
|
|
65
|
+
useValue: normalizedOptions
|
|
66
|
+
}, normalizedOptions.name)
|
|
34
67
|
});
|
|
35
68
|
}
|
|
36
69
|
function buildPrismaModuleAsync(options) {
|
|
37
70
|
class PrismaAsyncModuleDefinition {}
|
|
38
71
|
const factory = options.useFactory;
|
|
39
|
-
|
|
40
|
-
const memoizedFactory = (...deps) => {
|
|
41
|
-
if (!cachedResult) {
|
|
42
|
-
cachedResult = Promise.resolve(factory(...deps)).then(resolved => normalizePrismaModuleOptions(resolved));
|
|
43
|
-
}
|
|
44
|
-
return cachedResult;
|
|
45
|
-
};
|
|
72
|
+
const normalizedName = normalizePrismaRegistrationName(options.name);
|
|
46
73
|
const normalizedOptionsProvider = {
|
|
47
74
|
inject: options.inject,
|
|
48
|
-
provide:
|
|
75
|
+
provide: getPrismaNormalizedOptionsToken(normalizedName),
|
|
49
76
|
scope: 'singleton',
|
|
50
|
-
useFactory: (...deps) =>
|
|
77
|
+
useFactory: async (...deps) => {
|
|
78
|
+
const resolvedOptions = await factory(...deps);
|
|
79
|
+
return normalizePrismaModuleOptions({
|
|
80
|
+
...resolvedOptions,
|
|
81
|
+
name: resolvedOptions.name ?? normalizedName
|
|
82
|
+
});
|
|
83
|
+
}
|
|
51
84
|
};
|
|
52
85
|
return defineModule(PrismaAsyncModuleDefinition, {
|
|
53
|
-
exports:
|
|
54
|
-
providers: createPrismaRuntimeProviders(normalizedOptionsProvider)
|
|
86
|
+
exports: normalizedName === undefined ? [PrismaService, PrismaTransactionInterceptor, getPrismaServiceToken(), getPrismaClientToken(), getPrismaOptionsToken()] : [getPrismaServiceToken(normalizedName), getPrismaClientToken(normalizedName), getPrismaOptionsToken(normalizedName)],
|
|
87
|
+
providers: createPrismaRuntimeProviders(normalizedOptionsProvider, normalizedName)
|
|
55
88
|
});
|
|
56
89
|
}
|
|
57
90
|
|
|
@@ -59,6 +92,20 @@ function buildPrismaModuleAsync(options) {
|
|
|
59
92
|
* Runtime module entrypoint for Prisma lifecycle and transaction wiring.
|
|
60
93
|
*/
|
|
61
94
|
export class PrismaModule {
|
|
95
|
+
/**
|
|
96
|
+
* Registers Prisma providers from static options under an explicit name.
|
|
97
|
+
*
|
|
98
|
+
* @param name Registration name used to generate isolated Prisma DI tokens.
|
|
99
|
+
* @param options Prisma module options with client handle and strict transaction mode.
|
|
100
|
+
* @returns A module definition that exports the named Prisma tokens.
|
|
101
|
+
*/
|
|
102
|
+
static forName(name, options) {
|
|
103
|
+
return buildPrismaModule({
|
|
104
|
+
...options,
|
|
105
|
+
name
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
|
|
62
109
|
/**
|
|
63
110
|
* Registers Prisma providers from static options.
|
|
64
111
|
*
|
|
@@ -69,11 +116,25 @@ export class PrismaModule {
|
|
|
69
116
|
return buildPrismaModule(options);
|
|
70
117
|
}
|
|
71
118
|
|
|
119
|
+
/**
|
|
120
|
+
* Registers Prisma providers from an async DI factory under an explicit name.
|
|
121
|
+
*
|
|
122
|
+
* @param name Registration name used to generate isolated Prisma DI tokens.
|
|
123
|
+
* @param options Async module options that resolve Prisma client/module configuration.
|
|
124
|
+
* @returns A module definition that resolves async options once per application container.
|
|
125
|
+
*/
|
|
126
|
+
static forNameAsync(name, options) {
|
|
127
|
+
return buildPrismaModuleAsync({
|
|
128
|
+
...options,
|
|
129
|
+
name
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
|
|
72
133
|
/**
|
|
73
134
|
* Registers Prisma providers from an async DI factory.
|
|
74
135
|
*
|
|
75
136
|
* @param options Async module options that resolve Prisma client/module configuration.
|
|
76
|
-
* @returns A module definition that
|
|
137
|
+
* @returns A module definition that resolves async options once per application container.
|
|
77
138
|
*/
|
|
78
139
|
static forRootAsync(options) {
|
|
79
140
|
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
|
package/dist/status.d.ts.map
CHANGED
|
@@ -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
|
package/dist/tokens.d.ts.map
CHANGED
|
@@ -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,8 @@ 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
|
+
/** Optional registration name used to isolate Prisma tokens inside one application container. */
|
|
45
|
+
name?: string;
|
|
44
46
|
/** Root Prisma client shared outside ambient transaction scopes. */
|
|
45
47
|
client: TClient;
|
|
46
48
|
/**
|
package/dist/types.d.ts.map
CHANGED
|
@@ -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,QAAQ,CAAC,IAAI,YAAY,CAAC,IAAI,CAAC,CAAC;IAChC,WAAW,CAAC,IAAI,YAAY,CAAC,IAAI,CAAC,CAAC;IACnC,YAAY,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,yBAAyB,CAAC,kBAAkB,EAAE,CAAC,CAAC,EAAE,OAAO,CAAC,EAAE,mBAAmB,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;CACzH;AAED;;;;;;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,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"}
|
|
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,QAAQ,CAAC,IAAI,YAAY,CAAC,IAAI,CAAC,CAAC;IAChC,WAAW,CAAC,IAAI,YAAY,CAAC,IAAI,CAAC,CAAC;IACnC,YAAY,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,yBAAyB,CAAC,kBAAkB,EAAE,CAAC,CAAC,EAAE,OAAO,CAAC,EAAE,mBAAmB,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;CACzH;AAED;;;;;;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,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.
|
|
12
|
+
"version": "1.0.0-beta.2",
|
|
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.
|
|
40
|
-
"@fluojs/http": "^1.0.0-beta.1",
|
|
41
|
-
"@fluojs/runtime": "^1.0.0-beta.1",
|
|
39
|
+
"@fluojs/core": "^1.0.0-beta.2",
|
|
42
40
|
"@fluojs/validation": "^1.0.0-beta.1",
|
|
43
|
-
"@fluojs/
|
|
41
|
+
"@fluojs/http": "^1.0.0-beta.3",
|
|
42
|
+
"@fluojs/di": "^1.0.0-beta.4",
|
|
43
|
+
"@fluojs/runtime": "^1.0.0-beta.4"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
46
46
|
"@prisma/client": ">=5.0.0"
|