@webiny/handler-db 6.4.12-beta.5 → 6.5.0-beta.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/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  import type { ConstructorArgs } from "@webiny/db";
2
2
  import type { DbContext } from "./types.js";
3
- declare const _default: <T = unknown>(args: ConstructorArgs<T>) => import("@webiny/handler").RegisterExtensionPlugin<DbContext>[];
4
3
  export default _default;
4
+ declare function _default<T = unknown>(args: ConstructorArgs<T>): import("@webiny/handler").RegisterExtensionPlugin<DbContext>[];
package/index.js CHANGED
@@ -1,8 +1,10 @@
1
1
  import { Db } from "@webiny/db";
2
2
  import { createRegisterExtensionPlugin } from "@webiny/handler";
3
+ import { DbRegistryFeature } from "@webiny/db/exports/api/db.js";
3
4
  const src = (args)=>{
4
5
  const plugin = createRegisterExtensionPlugin(async (context)=>{
5
6
  if (context.db) return;
7
+ DbRegistryFeature.register(context.container);
6
8
  context.db = new Db(args);
7
9
  });
8
10
  plugin.name = "handler-db/extension/db";
package/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":["import type { ConstructorArgs } from \"@webiny/db\";\nimport { Db } from \"@webiny/db\";\nimport { createRegisterExtensionPlugin } from \"@webiny/handler\";\nimport type { DbContext } from \"./types.js\";\n\nexport default <T = unknown>(args: ConstructorArgs<T>) => {\n const plugin = createRegisterExtensionPlugin<DbContext>(async context => {\n if (context.db) {\n return;\n }\n context.db = new Db<T>(args);\n });\n plugin.name = \"handler-db/extension/db\";\n return [plugin];\n};\n"],"names":["args","plugin","createRegisterExtensionPlugin","context","Db"],"mappings":";;AAKA,YAAe,CAAcA;IACzB,MAAMC,SAASC,8BAAyC,OAAMC;QAC1D,IAAIA,QAAQ,EAAE,EACV;QAEJA,QAAQ,EAAE,GAAG,IAAIC,GAAMJ;IAC3B;IACAC,OAAO,IAAI,GAAG;IACd,OAAO;QAACA;KAAO;AACnB"}
1
+ {"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":["import type { ConstructorArgs } from \"@webiny/db\";\nimport { Db } from \"@webiny/db\";\nimport { createRegisterExtensionPlugin } from \"@webiny/handler\";\nimport type { DbContext } from \"./types.js\";\nimport { DbRegistryFeature } from \"@webiny/db/exports/api/db.js\";\n\nexport default <T = unknown>(args: ConstructorArgs<T>) => {\n const plugin = createRegisterExtensionPlugin<DbContext>(async context => {\n if (context.db) {\n return;\n }\n\n DbRegistryFeature.register(context.container);\n\n context.db = new Db<T>(args);\n });\n plugin.name = \"handler-db/extension/db\";\n return [plugin];\n};\n"],"names":["args","plugin","createRegisterExtensionPlugin","context","DbRegistryFeature","Db"],"mappings":";;;AAMA,YAAe,CAAcA;IACzB,MAAMC,SAASC,8BAAyC,OAAMC;QAC1D,IAAIA,QAAQ,EAAE,EACV;QAGJC,kBAAkB,QAAQ,CAACD,QAAQ,SAAS;QAE5CA,QAAQ,EAAE,GAAG,IAAIE,GAAML;IAC3B;IACAC,OAAO,IAAI,GAAG;IACd,OAAO;QAACA;KAAO;AACnB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webiny/handler-db",
3
- "version": "6.4.12-beta.5",
3
+ "version": "6.5.0-beta.1",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": "./index.js",
@@ -14,13 +14,13 @@
14
14
  "description": "Webiny API plugin that provides a db driver for DynamoDB.",
15
15
  "author": "Webiny Ltd.",
16
16
  "dependencies": {
17
- "@webiny/db": "6.4.12-beta.5",
18
- "@webiny/handler": "6.4.12-beta.5"
17
+ "@webiny/db": "6.5.0-beta.1",
18
+ "@webiny/handler": "6.5.0-beta.1"
19
19
  },
20
20
  "devDependencies": {
21
- "@webiny/build-tools": "6.4.12-beta.5",
21
+ "@webiny/build-tools": "6.5.0-beta.1",
22
22
  "rimraf": "6.1.3",
23
- "typescript": "6.0.3"
23
+ "typescript": "7.0.2"
24
24
  },
25
25
  "publishConfig": {
26
26
  "access": "public"