@webiny/handler-db 5.41.4 → 5.42.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.js +4 -2
- package/index.js.map +1 -1
- package/package.json +7 -11
package/index.js
CHANGED
|
@@ -7,12 +7,14 @@ exports.default = void 0;
|
|
|
7
7
|
var _db = require("@webiny/db");
|
|
8
8
|
var _api = require("@webiny/api");
|
|
9
9
|
var _default = args => {
|
|
10
|
-
|
|
10
|
+
const plugin = new _api.ContextPlugin(context => {
|
|
11
11
|
if (context.db) {
|
|
12
12
|
return;
|
|
13
13
|
}
|
|
14
14
|
context.db = new _db.Db(args);
|
|
15
|
-
})
|
|
15
|
+
});
|
|
16
|
+
plugin.name = "handler-db.context.db";
|
|
17
|
+
return [plugin];
|
|
16
18
|
};
|
|
17
19
|
exports.default = _default;
|
|
18
20
|
|
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_db","require","_api","_default","args","ContextPlugin","context","db","Db","exports","default"],"sources":["index.ts"],"sourcesContent":["import { ConstructorArgs, Db } from \"@webiny/db\";\nimport { ContextPlugin } from \"@webiny/api\";\nimport { DbContext } from \"./types\";\n\nexport default <T = unknown>(args: ConstructorArgs<T>) => {\n
|
|
1
|
+
{"version":3,"names":["_db","require","_api","_default","args","plugin","ContextPlugin","context","db","Db","name","exports","default"],"sources":["index.ts"],"sourcesContent":["import { ConstructorArgs, Db } from \"@webiny/db\";\nimport { ContextPlugin } from \"@webiny/api\";\nimport { DbContext } from \"./types\";\n\nexport default <T = unknown>(args: ConstructorArgs<T>) => {\n const plugin = new ContextPlugin<DbContext>(context => {\n if (context.db) {\n return;\n }\n context.db = new Db<T>(args);\n });\n plugin.name = \"handler-db.context.db\";\n return [plugin];\n};\n"],"mappings":";;;;;;AAAA,IAAAA,GAAA,GAAAC,OAAA;AACA,IAAAC,IAAA,GAAAD,OAAA;AAA4C,IAAAE,QAAA,GAGfC,IAAwB,IAAK;EACtD,MAAMC,MAAM,GAAG,IAAIC,kBAAa,CAAYC,OAAO,IAAI;IACnD,IAAIA,OAAO,CAACC,EAAE,EAAE;MACZ;IACJ;IACAD,OAAO,CAACC,EAAE,GAAG,IAAIC,MAAE,CAAIL,IAAI,CAAC;EAChC,CAAC,CAAC;EACFC,MAAM,CAACK,IAAI,GAAG,uBAAuB;EACrC,OAAO,CAACL,MAAM,CAAC;AACnB,CAAC;AAAAM,OAAA,CAAAC,OAAA,GAAAT,QAAA","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webiny/handler-db",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.42.0-beta.1",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -10,17 +10,13 @@
|
|
|
10
10
|
"description": "Webiny API plugin that provides a db driver for DynamoDB.",
|
|
11
11
|
"author": "Webiny Ltd.",
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@
|
|
14
|
-
"@webiny/
|
|
15
|
-
"@webiny/db": "5.41.4"
|
|
13
|
+
"@webiny/api": "5.42.0-beta.1",
|
|
14
|
+
"@webiny/db": "5.42.0-beta.1"
|
|
16
15
|
},
|
|
17
16
|
"devDependencies": {
|
|
18
|
-
"@
|
|
19
|
-
"@
|
|
20
|
-
"
|
|
21
|
-
"@webiny/cli": "5.41.4",
|
|
22
|
-
"@webiny/project-utils": "5.41.4",
|
|
23
|
-
"rimraf": "5.0.5",
|
|
17
|
+
"@webiny/cli": "5.42.0-beta.1",
|
|
18
|
+
"@webiny/project-utils": "5.42.0-beta.1",
|
|
19
|
+
"rimraf": "6.0.1",
|
|
24
20
|
"typescript": "4.9.5"
|
|
25
21
|
},
|
|
26
22
|
"publishConfig": {
|
|
@@ -31,5 +27,5 @@
|
|
|
31
27
|
"build": "yarn webiny run build",
|
|
32
28
|
"watch": "yarn webiny run watch"
|
|
33
29
|
},
|
|
34
|
-
"gitHead": "
|
|
30
|
+
"gitHead": "5e69da579efa4f2c8268e0c97ac6407ddc3f5f07"
|
|
35
31
|
}
|