@loutrejs/loutre 0.8.1 → 0.9.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 +3 -3
- package/dist/adapters/bun.d.ts +1 -0
- package/dist/adapters/bun.js +41 -75
- package/dist/application/definition.d.ts +4 -4
- package/dist/application/kernel.js +1 -1
- package/dist/core/extension.d.ts +7 -3
- package/dist/core/generic-layer.d.ts +2 -2
- package/dist/core/generic-layer.js +1 -1
- package/dist/core/index.d.ts +4 -4
- package/dist/core/index.js +1 -1
- package/dist/core/injection.d.ts +11 -1
- package/dist/core/injection.js +7 -3
- package/dist/core/model/context.d.ts +2 -1
- package/dist/core/model/context.js +23 -12
- package/dist/core/model/lifecycle.js +1 -1
- package/dist/core/model/modules.js +6 -6
- package/dist/core/model/providers.js +2 -2
- package/dist/core/model/visibility.d.ts +3 -2
- package/dist/core/model/visibility.js +3 -5
- package/dist/core/model.js +1 -1
- package/dist/core/module.d.ts +6 -4
- package/dist/core/module.js +6 -1
- package/dist/generated/version.d.ts +1 -1
- package/dist/generated/version.js +1 -1
- package/dist/http/extension.js +7 -6
- package/dist/message-port/extension.js +3 -3
- package/dist/runtime/di.d.ts +4 -2
- package/dist/runtime/di.js +33 -14
- package/dist/runtime/engine.d.ts +1 -0
- package/dist/runtime/engine.js +15 -1
- package/dist/runtime/index.d.ts +5 -1
- package/dist/runtime/index.js +3 -1
- package/dist/runtime/kernel.d.ts +2 -2
- package/dist/runtime/kernel.js +47 -9
- package/dist/runtime/shutdown-hooks.d.ts +16 -0
- package/dist/runtime/shutdown-hooks.js +69 -0
- package/dist/runtime/shutdown.d.ts +20 -0
- package/dist/runtime/shutdown.js +71 -0
- package/dist/tasks/extension.js +11 -10
- package/dist/websocket/extension.js +5 -5
- package/package.json +1 -1
|
@@ -170,23 +170,23 @@ function joinPath(parent, child) {
|
|
|
170
170
|
return child;
|
|
171
171
|
return `${parent}${child}`;
|
|
172
172
|
}
|
|
173
|
-
function createWebSocketRuntime(
|
|
173
|
+
function createWebSocketRuntime(bindings, driver, applicationRuntime) {
|
|
174
174
|
const handlers = new Map();
|
|
175
175
|
const sessions = new Set();
|
|
176
176
|
let state = 'running';
|
|
177
177
|
const ingress = new IngressGate();
|
|
178
|
-
for (const execution of
|
|
178
|
+
for (const { execution, resolve } of bindings) {
|
|
179
179
|
handlers.set(execution.id, runInInjectionContext({
|
|
180
180
|
consumer: {
|
|
181
181
|
kind: 'execution',
|
|
182
182
|
id: `websocket:${execution.id}`,
|
|
183
183
|
name: execution.id,
|
|
184
184
|
},
|
|
185
|
-
resolve: (token) =>
|
|
185
|
+
resolve: (token, consumer) => resolve(token, { consumer }),
|
|
186
186
|
}, () => execution.compiled.factory()));
|
|
187
187
|
}
|
|
188
|
-
const routes =
|
|
189
|
-
.flatMap((execution) => execution.compiled.routes.map((route) => ({
|
|
188
|
+
const routes = bindings
|
|
189
|
+
.flatMap(({ execution }) => execution.compiled.routes.map((route) => ({
|
|
190
190
|
executionId: execution.id,
|
|
191
191
|
route,
|
|
192
192
|
})))
|