@webiny/handler-db 0.0.0-mt-3 → 0.0.0-unstable.5e7233243f
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 +4 -1
- package/index.js +5 -2
- package/index.js.map +1 -0
- package/package.json +11 -11
- package/types.d.ts +3 -2
- package/types.js.map +1 -0
package/index.d.ts
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
import { ContextPlugin } from "@webiny/
|
|
1
|
+
import { ContextPlugin } from "@webiny/api";
|
|
2
2
|
import { DbContext } from "./types";
|
|
3
|
+
/**
|
|
4
|
+
* TODO: remove this package.
|
|
5
|
+
*/
|
|
3
6
|
declare const _default: (args: any) => ContextPlugin<DbContext>[];
|
|
4
7
|
export default _default;
|
package/index.js
CHANGED
|
@@ -7,10 +7,13 @@ exports.default = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _db = require("@webiny/db");
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _api = require("@webiny/api");
|
|
11
11
|
|
|
12
|
+
/**
|
|
13
|
+
* TODO: remove this package.
|
|
14
|
+
*/
|
|
12
15
|
var _default = args => {
|
|
13
|
-
return [new
|
|
16
|
+
return [new _api.ContextPlugin(context => {
|
|
14
17
|
if (context.db) {
|
|
15
18
|
return;
|
|
16
19
|
}
|
package/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["args","ContextPlugin","context","db","Db"],"sources":["index.ts"],"sourcesContent":["import { Db } from \"@webiny/db\";\nimport { ContextPlugin } from \"@webiny/api\";\nimport { DbContext } from \"./types\";\n\n/**\n * TODO: remove this package.\n */\nexport default (args: any) => {\n return [\n new ContextPlugin<DbContext>(context => {\n if (context.db) {\n return;\n }\n context.db = new Db(args);\n })\n ];\n};\n"],"mappings":";;;;;;;AAAA;;AACA;;AAGA;AACA;AACA;eACgBA,IAAD,IAAe;EAC1B,OAAO,CACH,IAAIC,kBAAJ,CAA6BC,OAAO,IAAI;IACpC,IAAIA,OAAO,CAACC,EAAZ,EAAgB;MACZ;IACH;;IACDD,OAAO,CAACC,EAAR,GAAa,IAAIC,MAAJ,CAAOJ,IAAP,CAAb;EACH,CALD,CADG,CAAP;AAQH,C"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webiny/handler-db",
|
|
3
|
-
"version": "0.0.0-
|
|
3
|
+
"version": "0.0.0-unstable.5e7233243f",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -10,18 +10,18 @@
|
|
|
10
10
|
"description": "Webiny API plugin that provides a db driver for DynamoDB.",
|
|
11
11
|
"author": "Webiny Ltd.",
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@babel/runtime": "7.
|
|
14
|
-
"@webiny/
|
|
15
|
-
"@webiny/
|
|
13
|
+
"@babel/runtime": "7.18.9",
|
|
14
|
+
"@webiny/api": "0.0.0-unstable.5e7233243f",
|
|
15
|
+
"@webiny/db": "0.0.0-unstable.5e7233243f"
|
|
16
16
|
},
|
|
17
17
|
"devDependencies": {
|
|
18
|
-
"@babel/cli": "^7.
|
|
19
|
-
"@babel/core": "^7.
|
|
20
|
-
"@babel/preset-env": "^7.
|
|
21
|
-
"@webiny/cli": "^0.0.0-
|
|
22
|
-
"@webiny/project-utils": "^0.0.0-
|
|
18
|
+
"@babel/cli": "^7.16.0",
|
|
19
|
+
"@babel/core": "^7.16.0",
|
|
20
|
+
"@babel/preset-env": "^7.16.4",
|
|
21
|
+
"@webiny/cli": "^0.0.0-unstable.5e7233243f",
|
|
22
|
+
"@webiny/project-utils": "^0.0.0-unstable.5e7233243f",
|
|
23
23
|
"rimraf": "^3.0.2",
|
|
24
|
-
"typescript": "
|
|
24
|
+
"typescript": "4.7.4"
|
|
25
25
|
},
|
|
26
26
|
"publishConfig": {
|
|
27
27
|
"access": "public",
|
|
@@ -31,5 +31,5 @@
|
|
|
31
31
|
"build": "yarn webiny run build",
|
|
32
32
|
"watch": "yarn webiny run watch"
|
|
33
33
|
},
|
|
34
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "995a4b337db9b8497c6615e335dcd206afe26f8f"
|
|
35
35
|
}
|
package/types.d.ts
CHANGED
package/types.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import { Db } from \"@webiny/db\";\nimport { Context } from \"@webiny/api/types\";\n\nexport interface DbContext extends Context {\n db: Db;\n}\n"],"mappings":""}
|