@acmekit/test-utils 2.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/acmekit-test-runner-utils/bootstrap-app.d.ts +10 -0
- package/dist/acmekit-test-runner-utils/bootstrap-app.d.ts.map +1 -0
- package/dist/acmekit-test-runner-utils/bootstrap-app.js +113 -0
- package/dist/acmekit-test-runner-utils/bootstrap-app.js.map +1 -0
- package/dist/acmekit-test-runner-utils/clear-instances.d.ts +8 -0
- package/dist/acmekit-test-runner-utils/clear-instances.d.ts.map +1 -0
- package/dist/acmekit-test-runner-utils/clear-instances.js +14 -0
- package/dist/acmekit-test-runner-utils/clear-instances.js.map +1 -0
- package/dist/acmekit-test-runner-utils/config.d.ts +5 -0
- package/dist/acmekit-test-runner-utils/config.d.ts.map +1 -0
- package/dist/acmekit-test-runner-utils/config.js +37 -0
- package/dist/acmekit-test-runner-utils/config.js.map +1 -0
- package/dist/acmekit-test-runner-utils/index.d.ts +6 -0
- package/dist/acmekit-test-runner-utils/index.d.ts.map +1 -0
- package/dist/acmekit-test-runner-utils/index.js +22 -0
- package/dist/acmekit-test-runner-utils/index.js.map +1 -0
- package/dist/acmekit-test-runner-utils/use-db.d.ts +15 -0
- package/dist/acmekit-test-runner-utils/use-db.d.ts.map +1 -0
- package/dist/acmekit-test-runner-utils/use-db.js +55 -0
- package/dist/acmekit-test-runner-utils/use-db.js.map +1 -0
- package/dist/acmekit-test-runner-utils/utils.d.ts +10 -0
- package/dist/acmekit-test-runner-utils/utils.d.ts.map +1 -0
- package/dist/acmekit-test-runner-utils/utils.js +25 -0
- package/dist/acmekit-test-runner-utils/utils.js.map +1 -0
- package/dist/acmekit-test-runner-utils/wait-workflow-executions.d.ts +9 -0
- package/dist/acmekit-test-runner-utils/wait-workflow-executions.d.ts.map +1 -0
- package/dist/acmekit-test-runner-utils/wait-workflow-executions.js +34 -0
- package/dist/acmekit-test-runner-utils/wait-workflow-executions.js.map +1 -0
- package/dist/acmekit-test-runner.d.ts +52 -0
- package/dist/acmekit-test-runner.d.ts.map +1 -0
- package/dist/acmekit-test-runner.js +272 -0
- package/dist/acmekit-test-runner.js.map +1 -0
- package/dist/database.d.ts +29 -0
- package/dist/database.d.ts.map +1 -0
- package/dist/database.js +245 -0
- package/dist/database.js.map +1 -0
- package/dist/events.d.ts +17 -0
- package/dist/events.d.ts.map +1 -0
- package/dist/events.js +161 -0
- package/dist/events.js.map +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +52 -0
- package/dist/index.js.map +1 -0
- package/dist/init-modules.d.ts +19 -0
- package/dist/init-modules.d.ts.map +1 -0
- package/dist/init-modules.js +47 -0
- package/dist/init-modules.js.map +1 -0
- package/dist/jest.d.ts +2 -0
- package/dist/jest.d.ts.map +1 -0
- package/dist/jest.js +24 -0
- package/dist/jest.js.map +1 -0
- package/dist/mock-event-bus-service.d.ts +9 -0
- package/dist/mock-event-bus-service.d.ts.map +1 -0
- package/dist/mock-event-bus-service.js +19 -0
- package/dist/mock-event-bus-service.js.map +1 -0
- package/dist/module-test-runner.d.ts +44 -0
- package/dist/module-test-runner.d.ts.map +1 -0
- package/dist/module-test-runner.js +297 -0
- package/dist/module-test-runner.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +52 -0
package/dist/events.js
ADDED
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.waitSubscribersExecution = void 0;
|
|
4
|
+
// Map to hold pending promises for each event.
|
|
5
|
+
const waits = new Map();
|
|
6
|
+
/**
|
|
7
|
+
* Creates a promise that rejects after a specified timeout.
|
|
8
|
+
* @param timeout - The timeout in milliseconds.
|
|
9
|
+
* @param eventName - The name of the event being waited on.
|
|
10
|
+
* @returns A tuple containing the timeout promise and a function to clear the timeout.
|
|
11
|
+
*/
|
|
12
|
+
const createTimeoutPromise = (timeout, eventName) => {
|
|
13
|
+
let timeoutId = null;
|
|
14
|
+
const promise = new Promise((_, reject) => {
|
|
15
|
+
timeoutId = setTimeout(() => {
|
|
16
|
+
reject(new Error(`Timeout of ${timeout}ms exceeded while waiting for event "${String(eventName)}"`));
|
|
17
|
+
}, timeout);
|
|
18
|
+
timeoutId.unref();
|
|
19
|
+
});
|
|
20
|
+
return [promise, () => timeoutId && clearTimeout(timeoutId)];
|
|
21
|
+
};
|
|
22
|
+
// Core logic to wait for subscribers.
|
|
23
|
+
const doWaitSubscribersExecution = (eventName, eventBus, { timeout = 15000, triggerCount = 1 } = {}) => {
|
|
24
|
+
const eventEmitter = eventBus.eventEmitter_;
|
|
25
|
+
const subscriberPromises = [];
|
|
26
|
+
const [timeoutPromise, clearTimeout] = createTimeoutPromise(timeout, eventName);
|
|
27
|
+
let currentCount = 0;
|
|
28
|
+
if (!eventEmitter.listeners(eventName).length) {
|
|
29
|
+
let ok;
|
|
30
|
+
const promise = new Promise((resolve) => {
|
|
31
|
+
ok = resolve;
|
|
32
|
+
});
|
|
33
|
+
subscriberPromises.push(promise);
|
|
34
|
+
let res = [];
|
|
35
|
+
const newListener = async (...args) => {
|
|
36
|
+
currentCount++;
|
|
37
|
+
res.push(args);
|
|
38
|
+
if (currentCount >= triggerCount) {
|
|
39
|
+
eventEmitter.removeListener(eventName, newListener);
|
|
40
|
+
if (triggerCount === 1) {
|
|
41
|
+
ok(...args);
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
ok(res);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
Object.defineProperty(newListener, "__isSubscribersExecutionWrapper", {
|
|
49
|
+
value: true,
|
|
50
|
+
configurable: true,
|
|
51
|
+
enumerable: false,
|
|
52
|
+
});
|
|
53
|
+
eventEmitter.on(eventName, newListener);
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
eventEmitter.listeners(eventName).forEach((listener) => {
|
|
57
|
+
if (listener.__isSubscribersExecutionWrapper) {
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
eventEmitter.removeListener(eventName, listener);
|
|
61
|
+
let ok, nok;
|
|
62
|
+
const promise = new Promise((resolve, reject) => {
|
|
63
|
+
ok = resolve;
|
|
64
|
+
nok = reject;
|
|
65
|
+
});
|
|
66
|
+
subscriberPromises.push(promise);
|
|
67
|
+
let res = [];
|
|
68
|
+
let cleanupDone = false;
|
|
69
|
+
const newListener = async (...args2) => {
|
|
70
|
+
try {
|
|
71
|
+
const listenerRes = listener.apply(eventBus, args2);
|
|
72
|
+
if (typeof listenerRes?.then === "function") {
|
|
73
|
+
await listenerRes.then((res_) => {
|
|
74
|
+
res.push(res_);
|
|
75
|
+
currentCount++;
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
res.push(listenerRes);
|
|
80
|
+
currentCount++;
|
|
81
|
+
}
|
|
82
|
+
if (currentCount >= triggerCount) {
|
|
83
|
+
const res_ = triggerCount === 1 ? res[0] : res;
|
|
84
|
+
ok(res_);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
catch (error) {
|
|
88
|
+
nok(error);
|
|
89
|
+
}
|
|
90
|
+
if (currentCount >= triggerCount && !cleanupDone) {
|
|
91
|
+
// As soon as the subscriber is executed the required number of times, we restore the original listener
|
|
92
|
+
cleanupDone = true;
|
|
93
|
+
eventEmitter.removeListener(eventName, newListener);
|
|
94
|
+
// Unwrap to find the true original listener
|
|
95
|
+
let listenerToAdd = listener;
|
|
96
|
+
while (listenerToAdd?.originalListener) {
|
|
97
|
+
listenerToAdd = listenerToAdd.originalListener;
|
|
98
|
+
}
|
|
99
|
+
if (listenerToAdd) {
|
|
100
|
+
eventEmitter.on(eventName, listenerToAdd);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
Object.defineProperty(newListener, "__isSubscribersExecutionWrapper", {
|
|
105
|
+
value: true,
|
|
106
|
+
configurable: true,
|
|
107
|
+
enumerable: false,
|
|
108
|
+
});
|
|
109
|
+
Object.defineProperty(newListener, "originalListener", {
|
|
110
|
+
value: listener,
|
|
111
|
+
configurable: true,
|
|
112
|
+
enumerable: false,
|
|
113
|
+
});
|
|
114
|
+
eventEmitter.on(eventName, newListener);
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
const subscribersPromise = Promise.all(subscriberPromises).finally(() => {
|
|
118
|
+
// Clear the timeout since events have been fired and handled
|
|
119
|
+
clearTimeout();
|
|
120
|
+
});
|
|
121
|
+
// Race between the subscribers and the timeout
|
|
122
|
+
return Promise.race([subscribersPromise, timeoutPromise]);
|
|
123
|
+
};
|
|
124
|
+
/**
|
|
125
|
+
* Allows you to wait for all subscribers to execute for a given event.
|
|
126
|
+
* It ensures that concurrent waits for the same event are queued and executed sequentially.
|
|
127
|
+
*
|
|
128
|
+
* @param eventName - The name of the event to wait for.
|
|
129
|
+
* @param eventBus - The event bus instance.
|
|
130
|
+
* @param options - Options including timeout and triggerCount.
|
|
131
|
+
*/
|
|
132
|
+
const waitSubscribersExecution = (eventName, eventBus, options) => {
|
|
133
|
+
const chain = waits.get(eventName);
|
|
134
|
+
if (!chain) {
|
|
135
|
+
const newPromise = doWaitSubscribersExecution(eventName, eventBus, options).finally(() => {
|
|
136
|
+
// Once this chain is done, remove it from the map
|
|
137
|
+
// if it's still the same promise. This prevents race conditions
|
|
138
|
+
// where a new wait is queued before this one is removed.
|
|
139
|
+
if (waits.get(eventName) === newPromise) {
|
|
140
|
+
waits.delete(eventName);
|
|
141
|
+
}
|
|
142
|
+
});
|
|
143
|
+
waits.set(eventName, newPromise);
|
|
144
|
+
return newPromise;
|
|
145
|
+
}
|
|
146
|
+
const runner = () => {
|
|
147
|
+
return doWaitSubscribersExecution(eventName, eventBus, options);
|
|
148
|
+
};
|
|
149
|
+
const newPromise = chain.then(runner, runner).finally(() => {
|
|
150
|
+
// Once this chain is done, remove it from the map
|
|
151
|
+
// if it's still the same promise. This prevents race conditions
|
|
152
|
+
// where a new wait is queued before this one is removed.
|
|
153
|
+
if (waits.get(eventName) === newPromise) {
|
|
154
|
+
waits.delete(eventName);
|
|
155
|
+
}
|
|
156
|
+
});
|
|
157
|
+
waits.set(eventName, newPromise);
|
|
158
|
+
return newPromise;
|
|
159
|
+
};
|
|
160
|
+
exports.waitSubscribersExecution = waitSubscribersExecution;
|
|
161
|
+
//# sourceMappingURL=events.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"events.js","sourceRoot":"","sources":["../src/events.ts"],"names":[],"mappings":";;;AAaA,+CAA+C;AAC/C,MAAM,KAAK,GAAG,IAAI,GAAG,EAAiC,CAAA;AAEtD;;;;;GAKG;AACH,MAAM,oBAAoB,GAAG,CAC3B,OAAe,EACf,SAA0B,EACI,EAAE;IAChC,IAAI,SAAS,GAA0B,IAAI,CAAA;IAC3C,MAAM,OAAO,GAAG,IAAI,OAAO,CAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,EAAE;QAC/C,SAAS,GAAG,UAAU,CAAC,GAAG,EAAE;YAC1B,MAAM,CACJ,IAAI,KAAK,CACP,cAAc,OAAO,wCAAwC,MAAM,CACjE,SAAS,CACV,GAAG,CACL,CACF,CAAA;QACH,CAAC,EAAE,OAAO,CAAC,CAAA;QACX,SAAS,CAAC,KAAK,EAAE,CAAA;IACnB,CAAC,CAAC,CAAA;IACF,OAAO,CAAC,OAAO,EAAE,GAAG,EAAE,CAAC,SAAS,IAAI,YAAY,CAAC,SAAS,CAAC,CAAC,CAAA;AAC9D,CAAC,CAAA;AAED,sCAAsC;AACtC,MAAM,0BAA0B,GAAG,CACjC,SAA0B,EAC1B,QAAkB,EAClB,EAAE,OAAO,GAAG,KAAK,EAAE,YAAY,GAAG,CAAC,KAAsC,EAAE,EAC7D,EAAE;IAChB,MAAM,YAAY,GAAG,QAAQ,CAAC,aAAa,CAAA;IAC3C,MAAM,kBAAkB,GAAmB,EAAE,CAAA;IAC7C,MAA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,SAAS,CAAC,CAAA;IAElC,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,MAAM,UAAU,GAAG,0BAA0B,CAC3C,SAAS,EACT,QAAQ,EACR,OAAO,CACR,CAAC,OAAO,CAAC,GAAG,EAAE;YACb,kDAAkD;YAClD,gEAAgE;YAChE,yDAAyD;YACzD,IAAI,KAAK,CAAC,GAAG,CAAC,SAAS,CAAC,KAAK,UAAU,EAAE,CAAC;gBACxC,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,CAAA;YACzB,CAAC;QACH,CAAC,CAAC,CAAA;QACF,KAAK,CAAC,GAAG,CAAC,SAAS,EAAE,UAAU,CAAC,CAAA;QAChC,OAAO,UAAU,CAAA;IACnB,CAAC;IAED,MAAM,MAAM,GAAG,GAAG,EAAE;QAClB,OAAO,0BAA0B,CAAC,SAAS,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAA;IACjE,CAAC,CAAA;IAED,MAAM,UAAU,GAAG,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE;QACzD,kDAAkD;QAClD,gEAAgE;QAChE,yDAAyD;QACzD,IAAI,KAAK,CAAC,GAAG,CAAC,SAAS,CAAC,KAAK,UAAU,EAAE,CAAC;YACxC,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,CAAA;QACzB,CAAC;IACH,CAAC,CAAC,CAAA;IAEF,KAAK,CAAC,GAAG,CAAC,SAAS,EAAE,UAAU,CAAC,CAAA;IAEhC,OAAO,UAAU,CAAA;AACnB,CAAC,CAAA;AAxCY,QAAA,wBAAwB,4BAwCpC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * as TestDatabaseUtils from "./database";
|
|
2
|
+
export * as TestEventUtils from "./events";
|
|
3
|
+
export * from "./init-modules";
|
|
4
|
+
export * as JestUtils from "./jest";
|
|
5
|
+
export * from "./acmekit-test-runner";
|
|
6
|
+
export * from "./acmekit-test-runner-utils";
|
|
7
|
+
export { default as MockEventBusService } from "./mock-event-bus-service";
|
|
8
|
+
export * from "./module-test-runner";
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,iBAAiB,MAAM,YAAY,CAAA;AAC/C,OAAO,KAAK,cAAc,MAAM,UAAU,CAAA;AAC1C,cAAc,gBAAgB,CAAA;AAC9B,OAAO,KAAK,SAAS,MAAM,QAAQ,CAAA;AACnC,cAAc,uBAAuB,CAAA;AACrC,cAAc,6BAA6B,CAAA;AAC3C,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AACzE,cAAc,sBAAsB,CAAA"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
36
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
37
|
+
};
|
|
38
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
39
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
40
|
+
};
|
|
41
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42
|
+
exports.MockEventBusService = exports.JestUtils = exports.TestEventUtils = exports.TestDatabaseUtils = void 0;
|
|
43
|
+
exports.TestDatabaseUtils = __importStar(require("./database"));
|
|
44
|
+
exports.TestEventUtils = __importStar(require("./events"));
|
|
45
|
+
__exportStar(require("./init-modules"), exports);
|
|
46
|
+
exports.JestUtils = __importStar(require("./jest"));
|
|
47
|
+
__exportStar(require("./acmekit-test-runner"), exports);
|
|
48
|
+
__exportStar(require("./acmekit-test-runner-utils"), exports);
|
|
49
|
+
var mock_event_bus_service_1 = require("./mock-event-bus-service");
|
|
50
|
+
Object.defineProperty(exports, "MockEventBusService", { enumerable: true, get: function () { return __importDefault(mock_event_bus_service_1).default; } });
|
|
51
|
+
__exportStar(require("./module-test-runner"), exports);
|
|
52
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gEAA+C;AAC/C,2DAA0C;AAC1C,iDAA8B;AAC9B,oDAAmC;AACnC,wDAAqC;AACrC,8DAA2C;AAC3C,mEAAyE;AAAhE,8IAAA,OAAO,OAAuB;AACvC,uDAAoC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ExternalModuleDeclaration, InternalModuleDeclaration, ModuleJoinerConfig } from "@acmekit/framework/types";
|
|
2
|
+
export interface InitModulesOptions {
|
|
3
|
+
injectedDependencies?: Record<string, unknown>;
|
|
4
|
+
databaseConfig: {
|
|
5
|
+
clientUrl: string;
|
|
6
|
+
schema?: string;
|
|
7
|
+
};
|
|
8
|
+
modulesConfig: {
|
|
9
|
+
[key: string]: string | boolean | Partial<InternalModuleDeclaration | ExternalModuleDeclaration>;
|
|
10
|
+
};
|
|
11
|
+
joinerConfig?: ModuleJoinerConfig[];
|
|
12
|
+
preventConnectionDestroyWarning?: boolean;
|
|
13
|
+
cwd?: string;
|
|
14
|
+
}
|
|
15
|
+
export declare function initModules({ injectedDependencies, databaseConfig, modulesConfig, joinerConfig, preventConnectionDestroyWarning, cwd, }: InitModulesOptions): Promise<{
|
|
16
|
+
acmekitApp: any;
|
|
17
|
+
shutdown: () => Promise<void>;
|
|
18
|
+
}>;
|
|
19
|
+
//# sourceMappingURL=init-modules.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"init-modules.d.ts","sourceRoot":"","sources":["../src/init-modules.ts"],"names":[],"mappings":"AACA,OAAO,EACL,yBAAyB,EACzB,yBAAyB,EACzB,kBAAkB,EACnB,MAAM,0BAA0B,CAAA;AAOjC,MAAM,WAAW,kBAAkB;IACjC,oBAAoB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAC9C,cAAc,EAAE;QACd,SAAS,EAAE,MAAM,CAAA;QACjB,MAAM,CAAC,EAAE,MAAM,CAAA;KAChB,CAAA;IACD,aAAa,EAAE;QACb,CAAC,GAAG,EAAE,MAAM,GACR,MAAM,GACN,OAAO,GACP,OAAO,CAAC,yBAAyB,GAAG,yBAAyB,CAAC,CAAA;KACnE,CAAA;IACD,YAAY,CAAC,EAAE,kBAAkB,EAAE,CAAA;IACnC,+BAA+B,CAAC,EAAE,OAAO,CAAA;IACzC,GAAG,CAAC,EAAE,MAAM,CAAA;CACb;AAED,wBAAsB,WAAW,CAAC,EAChC,oBAAoB,EACpB,cAAc,EACd,aAAa,EACb,YAAY,EACZ,+BAAuC,EACvC,GAAG,GACJ,EAAE,kBAAkB;;;GAoDpB"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.initModules = initModules;
|
|
4
|
+
const logger_1 = require("@acmekit/framework/logger");
|
|
5
|
+
const utils_1 = require("@acmekit/framework/utils");
|
|
6
|
+
async function initModules({ injectedDependencies, databaseConfig, modulesConfig, joinerConfig, preventConnectionDestroyWarning = false, cwd, }) {
|
|
7
|
+
const moduleSdkImports = require("@acmekit/framework/modules-sdk");
|
|
8
|
+
injectedDependencies ??= {};
|
|
9
|
+
let sharedPgConnection = injectedDependencies?.[utils_1.ContainerRegistrationKeys.PG_CONNECTION];
|
|
10
|
+
let shouldDestroyConnectionAutomatically = !sharedPgConnection;
|
|
11
|
+
if (!sharedPgConnection) {
|
|
12
|
+
sharedPgConnection = (0, utils_1.createPgConnection)({
|
|
13
|
+
clientUrl: databaseConfig.clientUrl,
|
|
14
|
+
schema: databaseConfig.schema,
|
|
15
|
+
});
|
|
16
|
+
injectedDependencies[utils_1.ContainerRegistrationKeys.PG_CONNECTION] =
|
|
17
|
+
sharedPgConnection;
|
|
18
|
+
}
|
|
19
|
+
const acmekitApp = await moduleSdkImports.AcmeKitApp({
|
|
20
|
+
modulesConfig,
|
|
21
|
+
servicesConfig: joinerConfig,
|
|
22
|
+
injectedDependencies,
|
|
23
|
+
cwd,
|
|
24
|
+
});
|
|
25
|
+
await acmekitApp.onApplicationStart();
|
|
26
|
+
async function shutdown() {
|
|
27
|
+
const promises = [];
|
|
28
|
+
if (shouldDestroyConnectionAutomatically) {
|
|
29
|
+
promises.push(sharedPgConnection.context?.destroy());
|
|
30
|
+
promises.push(sharedPgConnection.destroy());
|
|
31
|
+
promises.push(acmekitApp.onApplicationPrepareShutdown());
|
|
32
|
+
promises.push(acmekitApp.onApplicationShutdown());
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
if (!preventConnectionDestroyWarning) {
|
|
36
|
+
logger_1.logger.info(`You are using a custom shared connection. The connection won't be destroyed automatically.`);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
await (0, utils_1.promiseAll)(promises);
|
|
40
|
+
moduleSdkImports.AcmeKitModule.clearInstances();
|
|
41
|
+
}
|
|
42
|
+
return {
|
|
43
|
+
acmekitApp,
|
|
44
|
+
shutdown,
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=init-modules.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"init-modules.js","sourceRoot":"","sources":["../src/init-modules.ts"],"names":[],"mappings":";;AA6BA,kCA2DC;AAxFD,sDAAkD;AAMlD,oDAIiC;AAmB1B,KAAK,UAAU,WAAW,CAAC,EAChC,oBAAoB,EACpB,cAAc,EACd,aAAa,EACb,YAAY,EACZ,+BAA+B,GAAG,KAAK,EACvC,GAAG,GACgB;IACnB,MAAM,gBAAgB,GAAG,OAAO,CAAC,gCAAgC,CAAC,CAAA;IAElE,oBAAoB,KAAK,EAAE,CAAA;IAE3B,IAAI,kBAAkB,GACpB,oBAAoB,EAAE,CAAC,iCAAyB,CAAC,aAAa,CAAC,CAAA;IAEjE,IAAI,oCAAoC,GAAG,CAAC,kBAAkB,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/jest.ts"],"names":[],"mappings":"AAEA,wBAAgB,wBAAwB,SAqBvC"}
|
package/dist/jest.js
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.afterAllHookDropDatabase = afterAllHookDropDatabase;
|
|
4
|
+
const pg_god_1 = require("pg-god");
|
|
5
|
+
function afterAllHookDropDatabase() {
|
|
6
|
+
const DB_HOST = process.env.DB_HOST ?? "localhost";
|
|
7
|
+
const DB_USERNAME = process.env.DB_USERNAME ?? "postgres";
|
|
8
|
+
const DB_PASSWORD = process.env.DB_PASSWORD ?? "";
|
|
9
|
+
const DB_NAME = process.env.DB_TEMP_NAME || "";
|
|
10
|
+
const pgGodCredentials = {
|
|
11
|
+
user: DB_USERNAME,
|
|
12
|
+
password: DB_PASSWORD,
|
|
13
|
+
host: DB_HOST,
|
|
14
|
+
};
|
|
15
|
+
afterAll(async () => {
|
|
16
|
+
try {
|
|
17
|
+
await (0, pg_god_1.dropDatabase)({ databaseName: DB_NAME }, pgGodCredentials);
|
|
18
|
+
}
|
|
19
|
+
catch (e) {
|
|
20
|
+
console.error(`This might fail if it is run during the unit tests since there is no database to drop. Otherwise, please check what is the issue. ${e.message}`);
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=jest.js.map
|
package/dist/jest.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jest.js","sourceRoot":"","sources":["../src/jest.ts"],"names":[],"mappings":";;AAEA,4DAqBC;AAvBD,mCAAqC;AAErC,SAAgB,wBAAwB;IACtC,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,OAAO,IAAI,WAAW,CAAA;IAClD,MAAM,WAAW,GAAG,OAAO,CAAC,GAAG,CAAC,WAAW,IAAI,UAAU,CAAA;IACzD,MAAM,WAAW,GAAG,OAAO,CAAC,GAAG,CAAC,WAAW,IAAI,EAAE,CAAA;IACjD,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,YAAY,IAAI,EAAE,CAAA;IAE9C,MAAM,gBAAgB,GAAG;QACvB,IAAI,EAAE,WAAW;QACjB,QAAQ,EAAE,WAAW;QACrB,IAAI,EAAE,OAAO;KACd,CAAA;IAED,QAAQ,CAAC,KAAK,IAAI,EAAE;QAClB,IAAI,CAAC;YACH,MAAM,IAAA,qBAAY,EAAC,EAAE,YAAY,EAAE,OAAO,EAAE,EAAE,gBAAgB,CAAC,CAAA;QACjE,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,OAAO,CAAC,KAAK,CACX,qIAAqI,CAAC,CAAC,OAAO,EAAE,CACjJ,CAAA;QACH,CAAC;IACH,CAAC,CAAC,CAAA;AACJ,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { EventBusTypes, IEventBusModuleService, Message, Subscriber } from "@acmekit/framework/types";
|
|
2
|
+
export default class EventBusService implements IEventBusModuleService {
|
|
3
|
+
emit<T>(data: Message<T> | Message<T>[], options: Record<string, unknown>): Promise<void>;
|
|
4
|
+
subscribe(event: string | symbol, subscriber: Subscriber): this;
|
|
5
|
+
unsubscribe(event: string | symbol, subscriber: Subscriber, context?: EventBusTypes.SubscriberContext): this;
|
|
6
|
+
releaseGroupedEvents(eventGroupId: string): Promise<void>;
|
|
7
|
+
clearGroupedEvents(eventGroupId: string): Promise<void>;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=mock-event-bus-service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mock-event-bus-service.d.ts","sourceRoot":"","sources":["../src/mock-event-bus-service.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,sBAAsB,EACtB,OAAO,EACP,UAAU,EACX,MAAM,0BAA0B,CAAA;AAEjC,MAAM,CAAC,OAAO,OAAO,eAAgB,YAAW,sBAAsB;IAC9D,IAAI,CAAC,CAAC,EACV,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,EAAE,EAC/B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC/B,OAAO,CAAC,IAAI,CAAC;IAEhB,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,UAAU,EAAE,UAAU,GAAG,IAAI;IAI/D,WAAW,CACT,KAAK,EAAE,MAAM,GAAG,MAAM,EACtB,UAAU,EAAE,UAAU,EACtB,OAAO,CAAC,EAAE,aAAa,CAAC,iBAAiB,GACxC,IAAI;IAIP,oBAAoB,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAIzD,kBAAkB,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAGxD"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
class EventBusService {
|
|
4
|
+
async emit(data, options) { }
|
|
5
|
+
subscribe(event, subscriber) {
|
|
6
|
+
return this;
|
|
7
|
+
}
|
|
8
|
+
unsubscribe(event, subscriber, context) {
|
|
9
|
+
return this;
|
|
10
|
+
}
|
|
11
|
+
releaseGroupedEvents(eventGroupId) {
|
|
12
|
+
return Promise.resolve();
|
|
13
|
+
}
|
|
14
|
+
clearGroupedEvents(eventGroupId) {
|
|
15
|
+
return Promise.resolve();
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
exports.default = EventBusService;
|
|
19
|
+
//# sourceMappingURL=mock-event-bus-service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mock-event-bus-service.js","sourceRoot":"","sources":["../src/mock-event-bus-service.ts"],"names":[],"mappings":";;AAOA,MAAqB,eAAe;IAClC,KAAK,CAAC,IAAI,CACR,IAA+B,EAC/B,OAAgC,IAChB,CAAC;IAEnB,SAAS,CAAC,KAAsB,EAAE,UAAsB;QACtD,OAAO,IAAI,CAAA;IACb,CAAC;IAED,WAAW,CACT,KAAsB,EACtB,UAAsB,EACtB,OAAyC;QAEzC,OAAO,IAAI,CAAA;IACb,CAAC;IAED,oBAAoB,CAAC,YAAoB;QACvC,OAAO,OAAO,CAAC,OAAO,EAAE,CAAA;IAC1B,CAAC;IAED,kBAAkB,CAAC,YAAoB;QACrC,OAAO,OAAO,CAAC,OAAO,EAAE,CAAA;IAC1B,CAAC;CACF;AAzBD,kCAyBC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { TestDatabase } from "./database";
|
|
2
|
+
export interface SuiteOptions<TService = unknown> {
|
|
3
|
+
MikroOrmWrapper: TestDatabase;
|
|
4
|
+
acmekitApp: any;
|
|
5
|
+
service: TService;
|
|
6
|
+
dbConfig: {
|
|
7
|
+
schema: string;
|
|
8
|
+
clientUrl: string;
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
interface ModuleTestRunnerConfig<TService = any> {
|
|
12
|
+
moduleName: string;
|
|
13
|
+
moduleModels?: any[];
|
|
14
|
+
moduleOptions?: Record<string, any>;
|
|
15
|
+
moduleDependencies?: string[];
|
|
16
|
+
joinerConfig?: any[];
|
|
17
|
+
schema?: string;
|
|
18
|
+
dbName?: string;
|
|
19
|
+
injectedDependencies?: Record<string, any>;
|
|
20
|
+
resolve?: string;
|
|
21
|
+
debug?: boolean;
|
|
22
|
+
cwd?: string;
|
|
23
|
+
hooks?: {
|
|
24
|
+
beforeModuleInit?: () => Promise<void>;
|
|
25
|
+
afterModuleInit?: (acmekitApp: any, service: TService) => Promise<void>;
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
export declare function moduleIntegrationTestRunner<TService = any>({ moduleName, moduleModels, moduleOptions, moduleDependencies, joinerConfig, schema, dbName, debug, testSuite, resolve, injectedDependencies, cwd, hooks, }: {
|
|
29
|
+
moduleName: string;
|
|
30
|
+
moduleModels?: any[];
|
|
31
|
+
moduleOptions?: Record<string, any>;
|
|
32
|
+
moduleDependencies?: string[];
|
|
33
|
+
joinerConfig?: any[];
|
|
34
|
+
schema?: string;
|
|
35
|
+
dbName?: string;
|
|
36
|
+
injectedDependencies?: Record<string, any>;
|
|
37
|
+
resolve?: string;
|
|
38
|
+
debug?: boolean;
|
|
39
|
+
cwd?: string;
|
|
40
|
+
hooks?: ModuleTestRunnerConfig<TService>["hooks"];
|
|
41
|
+
testSuite: (options: SuiteOptions<TService>) => void;
|
|
42
|
+
}): void;
|
|
43
|
+
export {};
|
|
44
|
+
//# sourceMappingURL=module-test-runner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"module-test-runner.d.ts","sourceRoot":"","sources":["../src/module-test-runner.ts"],"names":[],"mappings":"AAYA,OAAO,EAAsC,YAAY,EAAE,MAAM,YAAY,CAAA;AAK7E,MAAM,WAAW,YAAY,CAAC,QAAQ,GAAG,OAAO;IAC9C,eAAe,EAAE,YAAY,CAAA;IAC7B,UAAU,EAAE,GAAG,CAAA;IACf,OAAO,EAAE,QAAQ,CAAA;IACjB,QAAQ,EAAE;QACR,MAAM,EAAE,MAAM,CAAA;QACd,SAAS,EAAE,MAAM,CAAA;KAClB,CAAA;CACF;AAED,UAAU,sBAAsB,CAAC,QAAQ,GAAG,GAAG;IAC7C,UAAU,EAAE,MAAM,CAAA;IAClB,YAAY,CAAC,EAAE,GAAG,EAAE,CAAA;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IACnC,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAA;IAC7B,YAAY,CAAC,EAAE,GAAG,EAAE,CAAA;IACpB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,oBAAoB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC1C,OAAO,CAAC,EAAE,MAAM,CAAA;IACh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