electrodb 2.10.0 → 2.10.2
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/.prettierignore +112 -0
- package/.prettierrc +11 -0
- package/README.md +55 -47
- package/index.d.ts +5288 -2409
- package/index.js +24 -12
- package/package.json +19 -11
- package/src/clauses.js +1557 -1310
- package/src/client.js +255 -235
- package/src/entity.js +4512 -3737
- package/src/errors.js +39 -28
- package/src/events.js +26 -16
- package/src/filterOperations.js +120 -122
- package/src/filters.js +99 -101
- package/src/operations.js +326 -263
- package/src/schema.js +1825 -1473
- package/src/service.js +1081 -852
- package/src/set.js +22 -26
- package/src/transaction.js +179 -153
- package/src/types.js +260 -264
- package/src/update.js +94 -90
- package/src/updateOperations.js +179 -160
- package/src/util.js +45 -32
- package/src/validations.js +337 -325
- package/src/where.js +146 -124
- package/tsconfig.json +12 -11
package/index.js
CHANGED
|
@@ -1,17 +1,29 @@
|
|
|
1
1
|
const { Entity } = require("./src/entity");
|
|
2
2
|
const { Service } = require("./src/service");
|
|
3
|
-
const {
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
const {
|
|
4
|
+
createGetTransaction,
|
|
5
|
+
createWriteTransaction,
|
|
6
|
+
} = require("./src/transaction");
|
|
7
|
+
const {
|
|
8
|
+
createCustomAttribute,
|
|
9
|
+
CustomAttributeType,
|
|
10
|
+
createSchema,
|
|
11
|
+
} = require("./src/schema");
|
|
12
|
+
const {
|
|
13
|
+
ElectroError,
|
|
14
|
+
ElectroValidationError,
|
|
15
|
+
ElectroUserValidationError,
|
|
16
|
+
ElectroAttributeValidationError,
|
|
17
|
+
} = require("./src/errors");
|
|
6
18
|
|
|
7
19
|
module.exports = {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
20
|
+
Entity,
|
|
21
|
+
Service,
|
|
22
|
+
ElectroError,
|
|
23
|
+
createSchema,
|
|
24
|
+
CustomAttributeType,
|
|
25
|
+
createCustomAttribute,
|
|
26
|
+
ElectroValidationError,
|
|
27
|
+
createGetTransaction,
|
|
28
|
+
createWriteTransaction,
|
|
17
29
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "electrodb",
|
|
3
|
-
"version": "2.10.
|
|
3
|
+
"version": "2.10.2",
|
|
4
4
|
"description": "A library to more easily create and interact with multiple entities and heretical relationships in dynamodb",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -12,23 +12,27 @@
|
|
|
12
12
|
"test:init": "node ./test/init.js",
|
|
13
13
|
"test:unit": "mocha -r ts-node/register ./test/**.spec.*",
|
|
14
14
|
"test:types": "tsd",
|
|
15
|
+
"test:format": "prettier -c src/**/*.js examples/**/*",
|
|
15
16
|
"coverage": "npm run test:init && nyc npm run test:unit && nyc report --reporter=text-lcov | coveralls",
|
|
16
17
|
"coverage:local:coveralls": "npm run test:init && nyc npm run test:unit && nyc report --reporter=text-lcov | coveralls",
|
|
17
18
|
"coverage:local:html": "npm run test:init && nyc npm run test:unit && nyc report --reporter=html",
|
|
18
|
-
"ddb:start": "docker compose up -d",
|
|
19
|
+
"ddb:start": "docker compose up -d dynamodb",
|
|
19
20
|
"ddb:load": "docker compose exec electro npm run test:init",
|
|
20
21
|
"ddb:stop": "docker compose stop",
|
|
21
|
-
"examples:load:library": "npm run ddb:init && ts-node ./examples/library/load.ts",
|
|
22
|
-
"examples:query:library": "npm run ddb:init && ts-node ./examples/library/query.ts",
|
|
23
|
-
"examples:load:taskmanager": "npm run ddb:init && ts-node ./examples/
|
|
24
|
-
"examples:query:taskmanager": "npm run ddb:init && ts-node ./examples/
|
|
25
|
-
"examples:load:versioncontrol": "npm run ddb:init && ts-node ./examples/
|
|
26
|
-
"examples:query:versioncontrol": "npm run ddb:init && ts-node ./examples/
|
|
22
|
+
"examples:load:library": "npm run ddb:start && npm run local:init && ts-node ./examples/library/load.ts",
|
|
23
|
+
"examples:query:library": "npm run ddb:start && npm run local:init && ts-node ./examples/library/query.ts",
|
|
24
|
+
"examples:load:taskmanager": "npm run ddb:start && npm run local:init && ts-node ./examples/taskManager/load.ts",
|
|
25
|
+
"examples:query:taskmanager": "npm run ddb:start && npm run local:init && ts-node ./examples/taskManager/query.ts",
|
|
26
|
+
"examples:load:versioncontrol": "npm run ddb:start && npm run local:init && ts-node ./examples/versionControl/load.ts",
|
|
27
|
+
"examples:query:versioncontrol": "npm run ddb:start && npm run local:init && ts-node ./examples/versionControl/query.ts",
|
|
28
|
+
"examples:provisiontable": "npm run ddb:start && npm run local:init && ts-node ./examples/provisionTable",
|
|
29
|
+
"examples:locks": "npm run ddb:start && npm run local:init && ts-node ./examples/locks",
|
|
27
30
|
"local:init": "LOCAL_DYNAMO_ENDPOINT='http://localhost:8000' npm run test:init",
|
|
28
31
|
"local:start": "npm run ddb:start && npm run local:init",
|
|
29
32
|
"local:stop": "npm run ddb:stop",
|
|
30
33
|
"local:exec": "LOCAL_DYNAMO_ENDPOINT='http://localhost:8000' ts-node ./test/debug.ts",
|
|
31
|
-
"local:debug": "npm run local:start && npm run local:exec"
|
|
34
|
+
"local:debug": "npm run local:start && npm run local:exec",
|
|
35
|
+
"format": "prettier -w src/**/*.js examples/**/* --log-level=error"
|
|
32
36
|
},
|
|
33
37
|
"repository": {
|
|
34
38
|
"type": "git",
|
|
@@ -46,7 +50,7 @@
|
|
|
46
50
|
"@istanbuljs/nyc-config-typescript": "^1.0.2",
|
|
47
51
|
"@types/chai": "^4.2.12",
|
|
48
52
|
"@types/mocha": "^8.0.3",
|
|
49
|
-
"@types/node": "^15.
|
|
53
|
+
"@types/node": "^15.14.9",
|
|
50
54
|
"@types/uuid": "^8.3.0",
|
|
51
55
|
"aws-sdk": "2.630.0",
|
|
52
56
|
"browserify": "^17.0.0",
|
|
@@ -58,11 +62,15 @@
|
|
|
58
62
|
"mocha-lcov-reporter": "^1.3.0",
|
|
59
63
|
"moment": "2.24.0",
|
|
60
64
|
"nyc": "^15.1.0",
|
|
65
|
+
"prettier": "^3.0.3",
|
|
66
|
+
"prettier-plugin-astro": "^0.12.0",
|
|
61
67
|
"source-map-support": "^0.5.19",
|
|
68
|
+
"sst": "^2.28.0",
|
|
62
69
|
"ts-node": "^10.9.1",
|
|
63
70
|
"tsd": "^0.28.1",
|
|
64
71
|
"typescript": "^5.2.2",
|
|
65
|
-
"uuid": "7.0.1"
|
|
72
|
+
"uuid": "7.0.1",
|
|
73
|
+
"aws-cdk-lib": "^2.100.0"
|
|
66
74
|
},
|
|
67
75
|
"keywords": [
|
|
68
76
|
"electrodb",
|