@nestjs-transactional/core 1.0.0-alpha.5 → 2.0.0
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.md +131 -178
- package/dist/bootstrap/transactional-methods.bootstrap.d.ts +2 -2
- package/dist/bootstrap/transactional-methods.bootstrap.js +19 -22
- package/dist/bootstrap/transactional-methods.bootstrap.js.map +1 -1
- package/dist/context/transaction-context-view.d.ts +1 -1
- package/dist/context/transaction-context-view.js +3 -7
- package/dist/context/transaction-context-view.js.map +1 -1
- package/dist/context/transaction.context.d.ts +3 -3
- package/dist/context/transaction.context.js +6 -10
- package/dist/context/transaction.context.js.map +1 -1
- package/dist/decorators/inject-decorators.js +6 -12
- package/dist/decorators/inject-decorators.js.map +1 -1
- package/dist/decorators/transactional.decorator.d.ts +6 -1
- package/dist/decorators/transactional.decorator.js +15 -17
- package/dist/decorators/transactional.decorator.js.map +1 -1
- package/dist/index.d.ts +18 -18
- package/dist/index.js +18 -34
- package/dist/index.js.map +1 -1
- package/dist/interceptor/transactional.interceptor.d.ts +1 -1
- package/dist/interceptor/transactional.interceptor.js +12 -15
- package/dist/interceptor/transactional.interceptor.js.map +1 -1
- package/dist/internal/markers.js +1 -4
- package/dist/internal/markers.js.map +1 -1
- package/dist/manager/adapter.registry.d.ts +1 -1
- package/dist/manager/adapter.registry.js +12 -15
- package/dist/manager/adapter.registry.js.map +1 -1
- package/dist/manager/transaction.manager.d.ts +3 -3
- package/dist/manager/transaction.manager.js +38 -41
- package/dist/manager/transaction.manager.js.map +1 -1
- package/dist/module/transactional.module.d.ts +5 -5
- package/dist/module/transactional.module.js +48 -54
- package/dist/module/transactional.module.js.map +1 -1
- package/dist/observability/transaction-observer.d.ts +1 -1
- package/dist/observability/transaction-observer.js +1 -4
- package/dist/observability/transaction-observer.js.map +1 -1
- package/dist/testing/in-memory.adapter.d.ts +3 -3
- package/dist/testing/in-memory.adapter.js +4 -8
- package/dist/testing/in-memory.adapter.js.map +1 -1
- package/dist/testing/index.d.ts +1 -1
- package/dist/testing/index.js +1 -17
- package/dist/testing/index.js.map +1 -1
- package/dist/tokens/constants.js +1 -4
- package/dist/tokens/constants.js.map +1 -1
- package/dist/tokens/index.d.ts +2 -2
- package/dist/tokens/index.js +2 -10
- package/dist/tokens/index.js.map +1 -1
- package/dist/tokens/token-utils.js +5 -11
- package/dist/tokens/token-utils.js.map +1 -1
- package/dist/types/domain-event.js +1 -2
- package/dist/types/errors.js +4 -11
- package/dist/types/errors.js.map +1 -1
- package/dist/types/isolation.js +1 -2
- package/dist/types/propagation.js +2 -5
- package/dist/types/propagation.js.map +1 -1
- package/dist/types/transaction-adapter.d.ts +2 -2
- package/dist/types/transaction-adapter.js +1 -2
- package/dist/types/transaction-handle.js +1 -2
- package/dist/types/transaction-options.d.ts +32 -9
- package/dist/types/transaction-options.js +1 -2
- package/package.json +29 -15
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transaction.context.js","sourceRoot":"","sources":["../../src/context/transaction.context.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"transaction.context.js","sourceRoot":"","sources":["../../src/context/transaction.context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAErD,OAAO,EAAE,4BAA4B,EAAE,MAAM,oBAAoB,CAAC;AAwDlE,MAAM,GAAG,GAAG,IAAI,iBAAiB,EAA2B,CAAC;AAE7D;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,OAAO,kBAAkB;IAC7B;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,GAAG,CAAI,aAAqB,EAAE,EAAoB;QACvD,IAAI,GAAG,CAAC,QAAQ,EAAE,KAAK,SAAS,EAAE,CAAC;YACjC,OAAO,EAAE,EAAE,CAAC;QACd,CAAC;QACD,MAAM,KAAK,GAA4B;YACrC,kBAAkB,EAAE,IAAI,GAAG,EAA6B;YACxD,aAAa;YACb,SAAS,EAAE,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C,CAAC;IACjE,CAAC;CACF"}
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const common_1 = require("@nestjs/common");
|
|
5
|
-
const constants_1 = require("../tokens/constants");
|
|
6
|
-
const token_utils_1 = require("../tokens/token-utils");
|
|
1
|
+
import { Inject } from '@nestjs/common';
|
|
2
|
+
import { DEFAULT_DATA_SOURCE_NAME } from '../tokens/constants.js';
|
|
3
|
+
import { getTransactionContextToken, getTransactionManagerToken, getTransactionalAdapterToken, } from '../tokens/token-utils.js';
|
|
7
4
|
/**
|
|
8
5
|
* Inject the per-dataSource `TransactionManager`. Sugar over
|
|
9
6
|
* `@Inject(getTransactionManagerToken(dataSource))` for IDE
|
|
@@ -26,20 +23,17 @@ const token_utils_1 = require("../tokens/token-utils");
|
|
|
26
23
|
* }
|
|
27
24
|
* ```
|
|
28
25
|
*/
|
|
29
|
-
const InjectTransactionManager = (dataSource =
|
|
30
|
-
exports.InjectTransactionManager = InjectTransactionManager;
|
|
26
|
+
export const InjectTransactionManager = (dataSource = DEFAULT_DATA_SOURCE_NAME) => Inject(getTransactionManagerToken(dataSource));
|
|
31
27
|
/**
|
|
32
28
|
* Inject the per-dataSource `TransactionContext`. See
|
|
33
29
|
* {@link InjectTransactionManager} for ergonomics.
|
|
34
30
|
*/
|
|
35
|
-
const InjectTransactionContext = (dataSource =
|
|
36
|
-
exports.InjectTransactionContext = InjectTransactionContext;
|
|
31
|
+
export const InjectTransactionContext = (dataSource = DEFAULT_DATA_SOURCE_NAME) => Inject(getTransactionContextToken(dataSource));
|
|
37
32
|
/**
|
|
38
33
|
* Inject the per-dataSource `TransactionAdapter` instance. Useful
|
|
39
34
|
* for advanced consumers that need to call adapter-specific methods
|
|
40
35
|
* not exposed through `TransactionManager`. See
|
|
41
36
|
* {@link InjectTransactionManager} for ergonomics.
|
|
42
37
|
*/
|
|
43
|
-
const InjectTransactionalAdapter = (dataSource =
|
|
44
|
-
exports.InjectTransactionalAdapter = InjectTransactionalAdapter;
|
|
38
|
+
export const InjectTransactionalAdapter = (dataSource = DEFAULT_DATA_SOURCE_NAME) => Inject(getTransactionalAdapterToken(dataSource));
|
|
45
39
|
//# sourceMappingURL=inject-decorators.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inject-decorators.js","sourceRoot":"","sources":["../../src/decorators/inject-decorators.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"inject-decorators.js","sourceRoot":"","sources":["../../src/decorators/inject-decorators.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC,OAAO,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAClE,OAAO,EACL,0BAA0B,EAC1B,0BAA0B,EAC1B,4BAA4B,GAC7B,MAAM,0BAA0B,CAAC;AAElC;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,CACtC,aAAqB,wBAAwB,EACzB,EAAE,CAAC,MAAM,CAAC,0BAA0B,CAAC,UAAU,CAAC,CAAC,CAAC;AAExE;;;GAGG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,CACtC,aAAqB,wBAAwB,EACzB,EAAE,CAAC,MAAM,CAAC,0BAA0B,CAAC,UAAU,CAAC,CAAC,CAAC;AAExE;;;;;GAKG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,CACxC,aAAqB,wBAAwB,EACzB,EAAE,CAAC,MAAM,CAAC,4BAA4B,CAAC,UAAU,CAAC,CAAC,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ExtendedTransactionOptions } from '../types/transaction-options';
|
|
1
|
+
import type { ExtendedTransactionOptions } from '../types/transaction-options.js';
|
|
2
2
|
/**
|
|
3
3
|
* Metadata key under which {@link Transactional} stores its options on a
|
|
4
4
|
* target (a method's function object or a class constructor). Exposed for
|
|
@@ -38,6 +38,11 @@ export declare function Transactional(options?: Partial<TransactionalMetadata>):
|
|
|
38
38
|
* must not mutate state. Options are applied first and the `readOnly: true`
|
|
39
39
|
* flag is overlaid on top, so callers cannot turn it off from here — use
|
|
40
40
|
* `@Transactional` directly if that is the intent.
|
|
41
|
+
*
|
|
42
|
+
* Enforcement is per-dialect (DD-027). On Postgres-family databases
|
|
43
|
+
* `TypeOrmTransactionAdapter` issues `SET TRANSACTION READ ONLY`, so a
|
|
44
|
+
* stray write fails at the database. Elsewhere — MySQL, SQLite, ... —
|
|
45
|
+
* the flag documents intent but nothing stops the write.
|
|
41
46
|
*/
|
|
42
47
|
export declare const ReadOnly: (options?: Partial<TransactionalMetadata>) => MethodDecorator & ClassDecorator;
|
|
43
48
|
/**
|
|
@@ -1,16 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TransactionalOn = exports.ReadOnly = exports.TRANSACTIONAL_METADATA = void 0;
|
|
4
|
-
exports.Transactional = Transactional;
|
|
5
|
-
exports.getTransactionalMetadata = getTransactionalMetadata;
|
|
6
|
-
const propagation_1 = require("../types/propagation");
|
|
1
|
+
import { PropagationMode } from '../types/propagation.js';
|
|
7
2
|
/**
|
|
8
3
|
* Metadata key under which {@link Transactional} stores its options on a
|
|
9
4
|
* target (a method's function object or a class constructor). Exposed for
|
|
10
5
|
* advanced introspection; most code should use
|
|
11
6
|
* {@link getTransactionalMetadata}.
|
|
12
7
|
*/
|
|
13
|
-
|
|
8
|
+
export const TRANSACTIONAL_METADATA = Symbol('TRANSACTIONAL_METADATA');
|
|
14
9
|
/**
|
|
15
10
|
* Mark a method or a class as transactional.
|
|
16
11
|
*
|
|
@@ -30,18 +25,18 @@ exports.TRANSACTIONAL_METADATA = Symbol('TRANSACTIONAL_METADATA');
|
|
|
30
25
|
*
|
|
31
26
|
* Default propagation is {@link PropagationMode.REQUIRED}.
|
|
32
27
|
*/
|
|
33
|
-
function Transactional(options = {}) {
|
|
28
|
+
export function Transactional(options = {}) {
|
|
34
29
|
const metadata = {
|
|
35
|
-
propagation:
|
|
30
|
+
propagation: PropagationMode.REQUIRED,
|
|
36
31
|
...options,
|
|
37
32
|
};
|
|
38
33
|
const decorator = (target, _propertyKey, descriptor) => {
|
|
39
34
|
const methodTarget = descriptor?.value;
|
|
40
35
|
if (typeof methodTarget === 'function') {
|
|
41
|
-
Reflect.defineMetadata(
|
|
36
|
+
Reflect.defineMetadata(TRANSACTIONAL_METADATA, metadata, methodTarget);
|
|
42
37
|
}
|
|
43
38
|
else {
|
|
44
|
-
Reflect.defineMetadata(
|
|
39
|
+
Reflect.defineMetadata(TRANSACTIONAL_METADATA, metadata, target);
|
|
45
40
|
}
|
|
46
41
|
};
|
|
47
42
|
return decorator;
|
|
@@ -51,9 +46,13 @@ function Transactional(options = {}) {
|
|
|
51
46
|
* must not mutate state. Options are applied first and the `readOnly: true`
|
|
52
47
|
* flag is overlaid on top, so callers cannot turn it off from here — use
|
|
53
48
|
* `@Transactional` directly if that is the intent.
|
|
49
|
+
*
|
|
50
|
+
* Enforcement is per-dialect (DD-027). On Postgres-family databases
|
|
51
|
+
* `TypeOrmTransactionAdapter` issues `SET TRANSACTION READ ONLY`, so a
|
|
52
|
+
* stray write fails at the database. Elsewhere — MySQL, SQLite, ... —
|
|
53
|
+
* the flag documents intent but nothing stops the write.
|
|
54
54
|
*/
|
|
55
|
-
const ReadOnly = (options = {}) => Transactional({ ...options, readOnly: true });
|
|
56
|
-
exports.ReadOnly = ReadOnly;
|
|
55
|
+
export const ReadOnly = (options = {}) => Transactional({ ...options, readOnly: true });
|
|
57
56
|
/**
|
|
58
57
|
* Alias for `@Transactional({ adapterInstance })`. Targets a specific
|
|
59
58
|
* adapter instance, for multi-datasource setups:
|
|
@@ -66,8 +65,7 @@ exports.ReadOnly = ReadOnly;
|
|
|
66
65
|
* The `adapterInstance` argument overrides any `adapterInstance` set in the
|
|
67
66
|
* options object.
|
|
68
67
|
*/
|
|
69
|
-
const TransactionalOn = (adapterInstance, options = {}) => Transactional({ ...options, adapterInstance });
|
|
70
|
-
exports.TransactionalOn = TransactionalOn;
|
|
68
|
+
export const TransactionalOn = (adapterInstance, options = {}) => Transactional({ ...options, adapterInstance });
|
|
71
69
|
/**
|
|
72
70
|
* Read the {@link TransactionalMetadata} stored by {@link Transactional} on
|
|
73
71
|
* `target`. Returns `undefined` when the target was not decorated.
|
|
@@ -75,8 +73,8 @@ exports.TransactionalOn = TransactionalOn;
|
|
|
75
73
|
* @param target - A class constructor (for class-level metadata) or a
|
|
76
74
|
* method function (for method-level metadata).
|
|
77
75
|
*/
|
|
78
|
-
function getTransactionalMetadata(target) {
|
|
79
|
-
const value = Reflect.getMetadata(
|
|
76
|
+
export function getTransactionalMetadata(target) {
|
|
77
|
+
const value = Reflect.getMetadata(TRANSACTIONAL_METADATA, target);
|
|
80
78
|
return value;
|
|
81
79
|
}
|
|
82
80
|
//# sourceMappingURL=transactional.decorator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transactional.decorator.js","sourceRoot":"","sources":["../../src/decorators/transactional.decorator.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"transactional.decorator.js","sourceRoot":"","sources":["../../src/decorators/transactional.decorator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAG1D;;;;;GAKG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,MAAM,CAAC,wBAAwB,CAAC,CAAC;AAUvE;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,UAAU,aAAa,CAC3B,UAA0C,EAAE;IAE5C,MAAM,QAAQ,GAA0B;QACtC,WAAW,EAAE,eAAe,CAAC,QAAQ;QACrC,GAAG,OAAO;KACX,CAAC;IAEF,MAAM,SAAS,GAAqC,CAClD,MAAc,EACd,YAA8B,EAC9B,UAA+B,EACzB,EAAE;QACR,MAAM,YAAY,GAAY,UAAU,EAAE,KAAK,CAAC;QAChD,IAAI,OAAO,YAAY,KAAK,UAAU,EAAE,CAAC;YACvC,OAAO,CAAC,cAAc,CAAC,sBAAsB,EAAE,QAAQ,EAAE,YAAY,CAAC,CAAC;QACzE,CAAC;aAAM,CAAC;YACN,OAAO,CAAC,cAAc,CAAC,sBAAsB,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;QACnE,CAAC;IACH,CAAC,CAAC;IAEF,OAAO,SAAS,CAAC;AACnB,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,CACtB,UAA0C,EAAE,EACV,EAAE,CAAC,aAAa,CAAC,EAAE,GAAG,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;AAErF;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAC7B,eAAuB,EACvB,UAA0C,EAAE,EACV,EAAE,CAAC,aAAa,CAAC,EAAE,GAAG,OAAO,EAAE,eAAe,EAAE,CAAC,CAAC;AAEtF;;;;;;GAMG;AACH,MAAM,UAAU,wBAAwB,CAAC,MAAc;IACrD,MAAM,KAAK,GAAY,OAAO,CAAC,WAAW,CAAC,sBAAsB,EAAE,MAAM,CAAC,CAAC;IAC3E,OAAO,KAA0C,CAAC;AACpD,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
export * from './types/propagation';
|
|
2
|
-
export * from './types/isolation';
|
|
3
|
-
export * from './types/transaction-handle';
|
|
4
|
-
export * from './types/transaction-options';
|
|
5
|
-
export * from './types/transaction-adapter';
|
|
6
|
-
export * from './types/domain-event';
|
|
7
|
-
export * from './types/errors';
|
|
8
|
-
export * from './context/transaction.context';
|
|
9
|
-
export * from './context/transaction-context-view';
|
|
10
|
-
export * from './manager/adapter.registry';
|
|
11
|
-
export * from './manager/transaction.manager';
|
|
12
|
-
export * from './decorators/transactional.decorator';
|
|
13
|
-
export * from './decorators/inject-decorators';
|
|
14
|
-
export * from './tokens';
|
|
15
|
-
export * from './interceptor/transactional.interceptor';
|
|
16
|
-
export * from './bootstrap/transactional-methods.bootstrap';
|
|
17
|
-
export * from './module/transactional.module';
|
|
18
|
-
export * from './observability/transaction-observer';
|
|
1
|
+
export * from './types/propagation.js';
|
|
2
|
+
export * from './types/isolation.js';
|
|
3
|
+
export * from './types/transaction-handle.js';
|
|
4
|
+
export * from './types/transaction-options.js';
|
|
5
|
+
export * from './types/transaction-adapter.js';
|
|
6
|
+
export * from './types/domain-event.js';
|
|
7
|
+
export * from './types/errors.js';
|
|
8
|
+
export * from './context/transaction.context.js';
|
|
9
|
+
export * from './context/transaction-context-view.js';
|
|
10
|
+
export * from './manager/adapter.registry.js';
|
|
11
|
+
export * from './manager/transaction.manager.js';
|
|
12
|
+
export * from './decorators/transactional.decorator.js';
|
|
13
|
+
export * from './decorators/inject-decorators.js';
|
|
14
|
+
export * from './tokens/index.js';
|
|
15
|
+
export * from './interceptor/transactional.interceptor.js';
|
|
16
|
+
export * from './bootstrap/transactional-methods.bootstrap.js';
|
|
17
|
+
export * from './module/transactional.module.js';
|
|
18
|
+
export * from './observability/transaction-observer.js';
|
|
19
19
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
CHANGED
|
@@ -1,35 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
__exportStar(require("./types/transaction-handle"), exports);
|
|
20
|
-
__exportStar(require("./types/transaction-options"), exports);
|
|
21
|
-
__exportStar(require("./types/transaction-adapter"), exports);
|
|
22
|
-
__exportStar(require("./types/domain-event"), exports);
|
|
23
|
-
__exportStar(require("./types/errors"), exports);
|
|
24
|
-
__exportStar(require("./context/transaction.context"), exports);
|
|
25
|
-
__exportStar(require("./context/transaction-context-view"), exports);
|
|
26
|
-
__exportStar(require("./manager/adapter.registry"), exports);
|
|
27
|
-
__exportStar(require("./manager/transaction.manager"), exports);
|
|
28
|
-
__exportStar(require("./decorators/transactional.decorator"), exports);
|
|
29
|
-
__exportStar(require("./decorators/inject-decorators"), exports);
|
|
30
|
-
__exportStar(require("./tokens"), exports);
|
|
31
|
-
__exportStar(require("./interceptor/transactional.interceptor"), exports);
|
|
32
|
-
__exportStar(require("./bootstrap/transactional-methods.bootstrap"), exports);
|
|
33
|
-
__exportStar(require("./module/transactional.module"), exports);
|
|
34
|
-
__exportStar(require("./observability/transaction-observer"), exports);
|
|
1
|
+
export * from './types/propagation.js';
|
|
2
|
+
export * from './types/isolation.js';
|
|
3
|
+
export * from './types/transaction-handle.js';
|
|
4
|
+
export * from './types/transaction-options.js';
|
|
5
|
+
export * from './types/transaction-adapter.js';
|
|
6
|
+
export * from './types/domain-event.js';
|
|
7
|
+
export * from './types/errors.js';
|
|
8
|
+
export * from './context/transaction.context.js';
|
|
9
|
+
export * from './context/transaction-context-view.js';
|
|
10
|
+
export * from './manager/adapter.registry.js';
|
|
11
|
+
export * from './manager/transaction.manager.js';
|
|
12
|
+
export * from './decorators/transactional.decorator.js';
|
|
13
|
+
export * from './decorators/inject-decorators.js';
|
|
14
|
+
export * from './tokens/index.js';
|
|
15
|
+
export * from './interceptor/transactional.interceptor.js';
|
|
16
|
+
export * from './bootstrap/transactional-methods.bootstrap.js';
|
|
17
|
+
export * from './module/transactional.module.js';
|
|
18
|
+
export * from './observability/transaction-observer.js';
|
|
35
19
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,yBAAyB,CAAC;AACxC,cAAc,mBAAmB,CAAC;AAElC,cAAc,kCAAkC,CAAC;AACjD,cAAc,uCAAuC,CAAC;AACtD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,kCAAkC,CAAC;AAEjD,cAAc,yCAAyC,CAAC;AACxD,cAAc,mCAAmC,CAAC;AAElD,cAAc,mBAAmB,CAAC;AAElC,cAAc,4CAA4C,CAAC;AAC3D,cAAc,gDAAgD,CAAC;AAC/D,cAAc,kCAAkC,CAAC;AAEjD,cAAc,yCAAyC,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type CallHandler, type ExecutionContext, type NestInterceptor } from '@nestjs/common';
|
|
2
2
|
import { Reflector } from '@nestjs/core';
|
|
3
3
|
import { type Observable } from 'rxjs';
|
|
4
|
-
import { TransactionManager } from '../manager/transaction.manager';
|
|
4
|
+
import { TransactionManager } from '../manager/transaction.manager.js';
|
|
5
5
|
/**
|
|
6
6
|
* NestJS interceptor that wraps a request-boundary handler in a transaction
|
|
7
7
|
* when the handler (or its controller class) carries `@Transactional()`
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
2
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
3
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -8,13 +7,11 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
7
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
9
|
};
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
const transactional_decorator_1 = require("../decorators/transactional.decorator");
|
|
17
|
-
const transaction_manager_1 = require("../manager/transaction.manager");
|
|
10
|
+
import { Injectable, } from '@nestjs/common';
|
|
11
|
+
import { Reflector } from '@nestjs/core';
|
|
12
|
+
import { defer, firstValueFrom } from 'rxjs';
|
|
13
|
+
import { TRANSACTIONAL_METADATA, } from '../decorators/transactional.decorator.js';
|
|
14
|
+
import { TransactionManager } from '../manager/transaction.manager.js';
|
|
18
15
|
/**
|
|
19
16
|
* NestJS interceptor that wraps a request-boundary handler in a transaction
|
|
20
17
|
* when the handler (or its controller class) carries `@Transactional()`
|
|
@@ -40,17 +37,17 @@ let TransactionalInterceptor = class TransactionalInterceptor {
|
|
|
40
37
|
this.reflector = reflector;
|
|
41
38
|
}
|
|
42
39
|
intercept(context, next) {
|
|
43
|
-
const metadata = this.reflector.getAllAndOverride(
|
|
40
|
+
const metadata = this.reflector.getAllAndOverride(TRANSACTIONAL_METADATA, [context.getHandler(), context.getClass()]);
|
|
44
41
|
if (metadata === undefined) {
|
|
45
42
|
return next.handle();
|
|
46
43
|
}
|
|
47
|
-
return
|
|
44
|
+
return defer(() => this.manager.run(metadata, () => firstValueFrom(next.handle())));
|
|
48
45
|
}
|
|
49
46
|
};
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
(
|
|
53
|
-
|
|
54
|
-
core_1.Reflector])
|
|
47
|
+
TransactionalInterceptor = __decorate([
|
|
48
|
+
Injectable(),
|
|
49
|
+
__metadata("design:paramtypes", [TransactionManager,
|
|
50
|
+
Reflector])
|
|
55
51
|
], TransactionalInterceptor);
|
|
52
|
+
export { TransactionalInterceptor };
|
|
56
53
|
//# sourceMappingURL=transactional.interceptor.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transactional.interceptor.js","sourceRoot":"","sources":["../../src/interceptor/transactional.interceptor.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"transactional.interceptor.js","sourceRoot":"","sources":["../../src/interceptor/transactional.interceptor.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAGL,UAAU,GAEX,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAmB,KAAK,EAAE,cAAc,EAAE,MAAM,MAAM,CAAC;AAE9D,OAAO,EACL,sBAAsB,GAEvB,MAAM,0CAA0C,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AAEvE;;;;;;;;;;;;;;;;GAgBG;AAEI,IAAM,wBAAwB,GAA9B,MAAM,wBAAwB;IAEhB;IACA;IAFnB,YACmB,OAA2B,EAC3B,SAAoB;QADpB,YAAO,GAAP,OAAO,CAAoB;QAC3B,cAAS,GAAT,SAAS,CAAW;IACpC,CAAC;IAEJ,SAAS,CAAC,OAAyB,EAAE,IAAiB;QACpD,MAAM,QAAQ,GAAG,IAAI,CAAC,SAAS,CAAC,iBAAiB,CAC/C,sBAAsB,EACtB,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,OAAO,CAAC,QAAQ,EAAE,CAAC,CAC3C,CAAC;QAEF,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;YAC3B,OAAO,IAAI,CAAC,MAAM,EAAE,CAAC;QACvB,CAAC;QAED,OAAO,KAAK,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,GAAG,EAAE,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC;IACtF,CAAC;CACF,CAAA;AAlBY,wBAAwB;IADpC,UAAU,EAAE;qCAGiB,kBAAkB;QAChB,SAAS;GAH5B,wBAAwB,CAkBpC"}
|
package/dist/internal/markers.js
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.WRAPPED_MARKER = void 0;
|
|
4
1
|
/**
|
|
5
2
|
* Identity marker placed via `Reflect.defineMetadata` on methods that have
|
|
6
3
|
* been wrapped by one of the coordinated wrapping mechanisms described in
|
|
@@ -14,5 +11,5 @@ exports.WRAPPED_MARKER = void 0;
|
|
|
14
11
|
* Internal: not re-exported from the public API. The three wrapping
|
|
15
12
|
* mechanisms are the only legitimate users.
|
|
16
13
|
*/
|
|
17
|
-
|
|
14
|
+
export const WRAPPED_MARKER = Symbol.for('@nestjs-transactional/wrapped');
|
|
18
15
|
//# sourceMappingURL=markers.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"markers.js","sourceRoot":"","sources":["../../src/internal/markers.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"markers.js","sourceRoot":"","sources":["../../src/internal/markers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,MAAM,CAAC,GAAG,CAAC,+BAA+B,CAAC,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { TransactionAdapter } from '../types/transaction-adapter';
|
|
1
|
+
import type { TransactionAdapter } from '../types/transaction-adapter.js';
|
|
2
2
|
/**
|
|
3
3
|
* A single entry in the {@link AdapterRegistry}: an adapter instance bound to
|
|
4
4
|
* its type name and instance name. Used as both the input shape of
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
2
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
3
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -6,16 +5,14 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
6
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
6
|
};
|
|
8
7
|
var AdapterRegistry_1;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
const common_1 = require("@nestjs/common");
|
|
12
|
-
const errors_1 = require("../types/errors");
|
|
8
|
+
import { Injectable } from '@nestjs/common';
|
|
9
|
+
import { IllegalTransactionStateError, TransactionAdapterNotFoundError } from '../types/errors.js';
|
|
13
10
|
/**
|
|
14
11
|
* DI token for the {@link AdapterRegistry}. Consumers who need to register
|
|
15
12
|
* adapters manually (for example, integration tests or custom modules)
|
|
16
13
|
* can inject this token and call {@link AdapterRegistry.register}.
|
|
17
14
|
*/
|
|
18
|
-
|
|
15
|
+
export const ADAPTER_REGISTRY = Symbol('ADAPTER_REGISTRY');
|
|
19
16
|
/**
|
|
20
17
|
* In-memory registry of {@link TransactionAdapter} instances, keyed by
|
|
21
18
|
* `(adapterName, instanceName)`. Each adapter type (e.g. `'typeorm'`) may
|
|
@@ -60,7 +57,7 @@ let AdapterRegistry = AdapterRegistry_1 = class AdapterRegistry {
|
|
|
60
57
|
get(adapterName, instanceName) {
|
|
61
58
|
const adapter = this.adapters.get(AdapterRegistry_1.keyFor(adapterName, instanceName));
|
|
62
59
|
if (adapter === undefined) {
|
|
63
|
-
throw new
|
|
60
|
+
throw new TransactionAdapterNotFoundError(adapterName, instanceName);
|
|
64
61
|
}
|
|
65
62
|
return adapter;
|
|
66
63
|
}
|
|
@@ -92,11 +89,11 @@ let AdapterRegistry = AdapterRegistry_1 = class AdapterRegistry {
|
|
|
92
89
|
}
|
|
93
90
|
}
|
|
94
91
|
if (matches.length === 0) {
|
|
95
|
-
throw new
|
|
92
|
+
throw new TransactionAdapterNotFoundError('*', dataSource);
|
|
96
93
|
}
|
|
97
94
|
if (matches.length > 1) {
|
|
98
95
|
const names = matches.map((m) => `${m.adapterName}:${dataSource}`).join(', ');
|
|
99
|
-
throw new
|
|
96
|
+
throw new IllegalTransactionStateError(`Multiple adapters registered for dataSource '${dataSource}' (${names}). ` +
|
|
100
97
|
`Use the explicit \`adapter\` + \`adapterInstance\` options to disambiguate.`);
|
|
101
98
|
}
|
|
102
99
|
// Length is exactly 1 here (checked above) — non-null is provably safe.
|
|
@@ -121,11 +118,11 @@ let AdapterRegistry = AdapterRegistry_1 = class AdapterRegistry {
|
|
|
121
118
|
}
|
|
122
119
|
}
|
|
123
120
|
if (matches.length === 0) {
|
|
124
|
-
throw new
|
|
121
|
+
throw new TransactionAdapterNotFoundError('*', dataSource);
|
|
125
122
|
}
|
|
126
123
|
if (matches.length > 1) {
|
|
127
124
|
const names = matches.map((n) => `${n}:${dataSource}`).join(', ');
|
|
128
|
-
throw new
|
|
125
|
+
throw new IllegalTransactionStateError(`Multiple adapters registered for dataSource '${dataSource}' (${names}). ` +
|
|
129
126
|
`Use the explicit \`adapter\` + \`adapterInstance\` options to disambiguate.`);
|
|
130
127
|
}
|
|
131
128
|
// Length is exactly 1 here (checked above) — non-null is provably safe.
|
|
@@ -140,7 +137,7 @@ let AdapterRegistry = AdapterRegistry_1 = class AdapterRegistry {
|
|
|
140
137
|
*/
|
|
141
138
|
getDefaultAdapterName() {
|
|
142
139
|
if (this.defaultAdapterName === null) {
|
|
143
|
-
throw new
|
|
140
|
+
throw new IllegalTransactionStateError('No default adapter registered. Register at least one adapter via ' +
|
|
144
141
|
'TypeOrmTransactionalModule.forFeature() or the corresponding ' +
|
|
145
142
|
'transactional module for your ORM.');
|
|
146
143
|
}
|
|
@@ -172,8 +169,8 @@ let AdapterRegistry = AdapterRegistry_1 = class AdapterRegistry {
|
|
|
172
169
|
return `${adapterName}:${instanceName}`;
|
|
173
170
|
}
|
|
174
171
|
};
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
(0, common_1.Injectable)()
|
|
172
|
+
AdapterRegistry = AdapterRegistry_1 = __decorate([
|
|
173
|
+
Injectable()
|
|
178
174
|
], AdapterRegistry);
|
|
175
|
+
export { AdapterRegistry };
|
|
179
176
|
//# sourceMappingURL=adapter.registry.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adapter.registry.js","sourceRoot":"","sources":["../../src/manager/adapter.registry.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"adapter.registry.js","sourceRoot":"","sources":["../../src/manager/adapter.registry.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5C,OAAO,EAAE,4BAA4B,EAAE,+BAA+B,EAAE,MAAM,oBAAoB,CAAC;AAoBnG;;;;GAIG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,MAAM,CAAC,kBAAkB,CAAC,CAAC;AAE3D;;;;;;;;;;;;;GAaG;AAEI,IAAM,eAAe,uBAArB,MAAM,eAAe;IACT,QAAQ,GAAG,IAAI,GAAG,EAA8B,CAAC;IAC1D,kBAAkB,GAAkB,IAAI,CAAC;IACzC,mBAAmB,GAAG,SAAS,CAAC;IAExC;;;;;;;;OAQG;IACH,QAAQ,CAAC,YAAiC,EAAE,SAAS,GAAG,KAAK;QAC3D,MAAM,GAAG,GAAG,iBAAe,CAAC,MAAM,CAAC,YAAY,CAAC,WAAW,EAAE,YAAY,CAAC,YAAY,CAAC,CAAC;QACxF,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,EAAE,YAAY,CAAC,OAAO,CAAC,CAAC;QAE7C,IAAI,SAAS,IAAI,IAAI,CAAC,kBAAkB,KAAK,IAAI,EAAE,CAAC;YAClD,IAAI,CAAC,kBAAkB,GAAG,YAAY,CAAC,WAAW,CAAC;YACnD,IAAI,CAAC,mBAAmB,GAAG,YAAY,CAAC,YAAY,CAAC;QACvD,CAAC;IACH,CAAC;IAED;;;;;OAKG;IACH,GAAG,CAAC,WAAmB,EAAE,YAAoB;QAC3C,MAAM,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,iBAAe,CAAC,MAAM,CAAC,WAAW,EAAE,YAAY,CAA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AAO,IAAI,CAAC,kBAAkB,CAAC;IACjC,CAAC;IAED;;;;OAIG;IACH,sBAAsB;QACpB,OAAO,IAAI,CAAC,mBAAmB,CAAC;IAClC,CAAC;IAED;;;OAGG;IACH,MAAM;QACJ,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,GAAG,EAAE,OAAO,CAAC,EAAE,EAAE;YAC5D,MAAM,KAAK,GAAG,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;YAC/B,OAAO;gBACL,WAAW,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC;gBAChC,YAAY,EAAE,GAAG,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC;gBAClC,OAAO;aACR,CAAC;QACJ,CAAC,CAAC,CAAC;IACL,CAAC;IAEO,MAAM,CAAC,MAAM,CAAC,WAAmB,EAAE,YAAoB;QAC7D,OAAO,GAAG,WAAW,IAAI,YAAY,EAAE,CAAC;IAC1C,CAAC;CACF,CAAA;AAhKY,eAAe;IAD3B,UAAU,EAAE;GACA,eAAe,CAgK3B"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { type TransactionObserver } from '../observability/transaction-observer';
|
|
2
|
-
import type { ExtendedTransactionOptions } from '../types/transaction-options';
|
|
3
|
-
import { AdapterRegistry } from './adapter.registry';
|
|
1
|
+
import { type TransactionObserver } from '../observability/transaction-observer.js';
|
|
2
|
+
import type { ExtendedTransactionOptions } from '../types/transaction-options.js';
|
|
3
|
+
import { AdapterRegistry } from './adapter.registry.js';
|
|
4
4
|
/**
|
|
5
5
|
* Runtime that executes a callback inside a transaction, following the
|
|
6
6
|
* requested {@link PropagationMode}. Exposes registration points for
|