@webiny/handler-db 6.3.0-beta.4 → 6.4.0-beta.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/index.js CHANGED
@@ -1,14 +1,15 @@
1
1
  import { Db } from "@webiny/db";
2
2
  import { createRegisterExtensionPlugin } from "@webiny/handler";
3
- export default args => {
4
- const plugin = createRegisterExtensionPlugin(async context => {
5
- if (context.db) {
6
- return;
7
- }
8
- context.db = new Db(args);
9
- });
10
- plugin.name = "handler-db/extension/db";
11
- return [plugin];
3
+ const src = (args)=>{
4
+ const plugin = createRegisterExtensionPlugin(async (context)=>{
5
+ if (context.db) return;
6
+ context.db = new Db(args);
7
+ });
8
+ plugin.name = "handler-db/extension/db";
9
+ return [
10
+ plugin
11
+ ];
12
12
  };
13
+ export default src;
13
14
 
14
15
  //# sourceMappingURL=index.js.map
package/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"names":["Db","createRegisterExtensionPlugin","args","plugin","context","db","name"],"sources":["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"],"mappings":"AACA,SAASA,EAAE,QAAQ,YAAY;AAC/B,SAASC,6BAA6B,QAAQ,iBAAiB;AAG/D,eAA6BC,IAAwB,IAAK;EACtD,MAAMC,MAAM,GAAGF,6BAA6B,CAAY,MAAMG,OAAO,IAAI;IACrE,IAAIA,OAAO,CAACC,EAAE,EAAE;MACZ;IACJ;IACAD,OAAO,CAACC,EAAE,GAAG,IAAIL,EAAE,CAAIE,IAAI,CAAC;EAChC,CAAC,CAAC;EACFC,MAAM,CAACG,IAAI,GAAG,yBAAyB;EACvC,OAAO,CAACH,MAAM,CAAC;AACnB,CAAC","ignoreList":[]}
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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webiny/handler-db",
3
- "version": "6.3.0-beta.4",
3
+ "version": "6.4.0-beta.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": "./index.js",
@@ -14,11 +14,11 @@
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.3.0-beta.4",
18
- "@webiny/handler": "6.3.0-beta.4"
17
+ "@webiny/db": "6.4.0-beta.0",
18
+ "@webiny/handler": "6.4.0-beta.0"
19
19
  },
20
20
  "devDependencies": {
21
- "@webiny/build-tools": "6.3.0-beta.4",
21
+ "@webiny/build-tools": "6.4.0-beta.0",
22
22
  "rimraf": "6.1.3",
23
23
  "typescript": "6.0.3"
24
24
  },
@@ -26,5 +26,5 @@
26
26
  "access": "public",
27
27
  "directory": "dist"
28
28
  },
29
- "gitHead": "7cefe15431dbd65504e1f58147dc9e55bcbfa693"
29
+ "gitHead": "a545d7529828af07d08d49c3da1bcb967483b9ce"
30
30
  }
package/types.js CHANGED
@@ -1,3 +0,0 @@
1
- export {};
2
-
3
- //# sourceMappingURL=types.js.map
package/types.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import type { Db } from \"@webiny/db\";\nimport type { Context } from \"@webiny/handler/types.js\";\n\nexport interface DbContext extends Context {\n db: Db<unknown>;\n}\n"],"mappings":"","ignoreList":[]}