@maroonedsoftware/koa 1.8.0 → 1.8.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.
@@ -15,7 +15,10 @@ import { AppConfig } from '@maroonedsoftware/appconfig';
15
15
  * async setup(registry, config) {
16
16
  * registry.register(MyService, new MyService(config.myService));
17
17
  * },
18
- * async teardown(container) {
18
+ * async start(container) {
19
+ * await container.resolve(MyService).start();
20
+ * },
21
+ * async shutdown(container) {
19
22
  * await container.resolve(MyService).close();
20
23
  * },
21
24
  * };
@@ -36,17 +39,14 @@ export interface ServerKitModule<ConfigT = AppConfig> {
36
39
  *
37
40
  * @param container - The built InjectKit container for resolving services.
38
41
  */
39
- teardown?: (container: Container) => Promise<void>;
42
+ shutdown?: (container: Container) => Promise<void>;
40
43
  /**
41
44
  * Called after the application is fully initialized and ready to serve
42
45
  * requests. Use this to begin background work (e.g. start polling, open
43
46
  * socket connections).
47
+ *
48
+ * @param container - The built InjectKit container for resolving services.
44
49
  */
45
- start?: () => Promise<void>;
46
- /**
47
- * Called before the application begins shutting down. Use this to
48
- * gracefully stop background work started in `start`.
49
- */
50
- stop?: () => Promise<void>;
50
+ start?: (container: Container) => Promise<void>;
51
51
  }
52
52
  //# sourceMappingURL=serverkit.module.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"serverkit.module.d.ts","sourceRoot":"","sources":["../src/serverkit.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAExD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,WAAW,eAAe,CAAC,OAAO,GAAG,SAAS;IAClD;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,CAAC,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAE/D;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,CAAC,SAAS,EAAE,SAAS,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAEnD;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAE5B;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC5B"}
1
+ {"version":3,"file":"serverkit.module.d.ts","sourceRoot":"","sources":["../src/serverkit.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAExD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,WAAW,eAAe,CAAC,OAAO,GAAG,SAAS;IAClD;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,CAAC,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAE/D;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,CAAC,SAAS,EAAE,SAAS,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAEnD;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,CAAC,SAAS,EAAE,SAAS,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CACjD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maroonedsoftware/koa",
3
- "version": "1.8.0",
3
+ "version": "1.8.1",
4
4
  "description": "Koa middleware, body parsing, and utilities for ServerKit",
5
5
  "author": {
6
6
  "name": "Marooned Software",
@@ -37,12 +37,12 @@
37
37
  "qs": "^6.15.0",
38
38
  "rate-limiter-flexible": "^9.1.1",
39
39
  "raw-body": "^3.0.2",
40
- "@maroonedsoftware/errors": "1.3.0",
41
40
  "@maroonedsoftware/appconfig": "1.3.0",
42
- "@maroonedsoftware/utilities": "1.1.0",
43
- "@maroonedsoftware/authentication": "0.1.0",
41
+ "@maroonedsoftware/errors": "1.3.0",
42
+ "@maroonedsoftware/logger": "1.0.0",
44
43
  "@maroonedsoftware/multipart": "1.0.3",
45
- "@maroonedsoftware/logger": "1.0.0"
44
+ "@maroonedsoftware/authentication": "0.1.0",
45
+ "@maroonedsoftware/utilities": "1.1.0"
46
46
  },
47
47
  "peerDependencies": {
48
48
  "@koa/cors": "^5.0.0",
@@ -58,8 +58,8 @@
58
58
  "@types/koa__cors": "^5.0.1",
59
59
  "@types/qs": "^6.15.0",
60
60
  "koa": "^3.1.2",
61
- "@repo/config-eslint": "0.1.0",
62
- "@repo/config-typescript": "0.0.0"
61
+ "@repo/config-typescript": "0.0.0",
62
+ "@repo/config-eslint": "0.1.0"
63
63
  },
64
64
  "scripts": {
65
65
  "build": "tsup src/index.ts --format esm --sourcemap --dts && tsc --emitDeclarationOnly --declaration",