@tomassabol/dynamodb-tools 1.0.19 → 1.0.20
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/dist/utils/create-ttl.js
CHANGED
|
@@ -7,7 +7,10 @@ exports.createTTL = createTTL;
|
|
|
7
7
|
function createTTL(ttl) {
|
|
8
8
|
if (ttl === null)
|
|
9
9
|
return null;
|
|
10
|
-
const ttlSeconds = (
|
|
10
|
+
const ttlSeconds = (ttl.years || 0) * 365 * 24 * 3600 +
|
|
11
|
+
(ttl.months || 0) * 30 * 24 * 3600 +
|
|
12
|
+
(ttl.weeks || 0) * 7 * 24 * 3600 +
|
|
13
|
+
((ttl.days || 0) * 24 + (ttl.hours || 0)) * 3600 +
|
|
11
14
|
(ttl.minutes || 0) * 60 +
|
|
12
15
|
(ttl.seconds || 0);
|
|
13
16
|
return Math.floor(Date.now() / 1000) + ttlSeconds;
|
package/package.json
CHANGED
|
@@ -1,24 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tomassabol/dynamodb-tools",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.20",
|
|
4
4
|
"description": "Tools for working with DynamoDB using AWS SDK v3",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"files": [
|
|
8
8
|
"dist/*"
|
|
9
9
|
],
|
|
10
|
-
"publishConfig": {
|
|
11
|
-
"access": "public"
|
|
12
|
-
},
|
|
13
10
|
"scripts": {
|
|
14
11
|
"build-doc": "typedoc",
|
|
15
12
|
"build": "tsc -b tsconfig.build.json",
|
|
16
13
|
"clean": "rimraf dist/",
|
|
17
14
|
"format-check": "prettier --check .",
|
|
18
|
-
"husky-install": "husky install",
|
|
19
15
|
"lint": "eslint . --max-warnings 0",
|
|
20
16
|
"open-coverage": "open .coverage/lcov-report/index.html",
|
|
21
|
-
"prepare": "npm-run-all
|
|
17
|
+
"prepare": "npm-run-all lint clean build",
|
|
22
18
|
"test": "jest"
|
|
23
19
|
},
|
|
24
20
|
"dependencies": {
|
|
@@ -40,21 +36,14 @@
|
|
|
40
36
|
"eslint-plugin-import": "^2.25.4",
|
|
41
37
|
"eslint-plugin-json": "^3.1.0",
|
|
42
38
|
"eslint-plugin-markdown": "^3.0.0",
|
|
43
|
-
"husky": "^8.0.1",
|
|
44
39
|
"jest": "^29.4.3",
|
|
45
40
|
"jest-cli": "^29.4.3",
|
|
46
|
-
"jest-sonar-reporter": "^2.0.0",
|
|
47
|
-
"lint-staged": "^13.1.2",
|
|
48
41
|
"npm-run-all": "^4.1.5",
|
|
49
42
|
"prettier": "^2.6.2",
|
|
50
43
|
"prettier-plugin-sh": "^0.12.8",
|
|
51
44
|
"rimraf": "^4.1.2",
|
|
52
|
-
"typedoc": "^0.
|
|
53
|
-
"typedoc-plugin-markdown": "^
|
|
45
|
+
"typedoc": "^0.28.15",
|
|
46
|
+
"typedoc-plugin-markdown": "^4.9.0",
|
|
54
47
|
"typescript": "^5.9.3"
|
|
55
|
-
},
|
|
56
|
-
"jestSonar": {
|
|
57
|
-
"reportPath": ".sonar",
|
|
58
|
-
"reportFile": "test-report.xml"
|
|
59
48
|
}
|
|
60
49
|
}
|