@elysiumjs/core 0.4.1 → 0.4.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/package.json CHANGED
@@ -1,13 +1,10 @@
1
1
  {
2
2
  "name": "@elysiumjs/core",
3
- "version": "0.4.1",
3
+ "version": "0.4.2",
4
4
  "license": "Apache-2.0",
5
5
  "description": "A super-charged web framework for Bun, built on top of ElysiaJS.",
6
6
  "private": false,
7
- "author": {
8
- "name": "Axel Nana",
9
- "email": "axel.nana@workbud.com"
10
- },
7
+ "author": "Workbud Technologies Inc.",
11
8
  "repository": {
12
9
  "type": "git",
13
10
  "url": "https://github.com/Workerly/elysium"
package/src/http.ts CHANGED
@@ -346,9 +346,9 @@ export namespace Http {
346
346
 
347
347
  if (props.scope === HttpControllerScope.SERVER) {
348
348
  const controller = Service.make(target);
349
- app.decorate('controller', () => controller);
349
+ app.resolve({ as: 'local' }, () => ({ controller: () => controller }));
350
350
  } else if (props.scope === HttpControllerScope.REQUEST) {
351
- app.decorate('controller', () => Service.make(target));
351
+ app.resolve({ as: 'local' }, () => ({ controller: () => Service.make(target) }));
352
352
  }
353
353
 
354
354
  const onRequest = Reflect.getMetadata('http:onRequest', target) ?? {};
package/src/module.ts CHANGED
@@ -66,7 +66,7 @@ export abstract class Module {
66
66
  const props = assign({ controllers: [] }, options) as Required<ModuleProps>;
67
67
 
68
68
  const plugin: ElysiaApp = new Elysia({ name: target.name, prefix: options.prefix });
69
- plugin.decorate('module', m);
69
+ plugin.resolve({ as: 'local' }, () => ({ module: m }));
70
70
 
71
71
  const middlewares = Reflect.getMetadata(Symbols.middlewares, target) ?? [];
72
72
  applyMiddlewares(middlewares, plugin);
package/src/wamp.ts CHANGED
@@ -14,8 +14,6 @@
14
14
 
15
15
  import type { Class, Primitive } from 'type-fest';
16
16
 
17
- import { setInterval } from 'node:timers/promises';
18
-
19
17
  import { Elysia } from 'elysia';
20
18
  import { omit } from 'radash';
21
19
  // @ts-expect-error The Wampy type definitions are not up to date