@spytecgps/lambda-utils 1.0.10 → 1.0.11
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.
|
@@ -18,11 +18,18 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
18
18
|
__setModuleDefault(result, mod);
|
|
19
19
|
return result;
|
|
20
20
|
};
|
|
21
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
22
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
23
|
+
};
|
|
21
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
25
|
exports.SpytecJoi = exports.iccidSchema = exports.imeiSchema = exports.urlEncoded = exports.json = void 0;
|
|
23
26
|
var Joi = __importStar(require("joi"));
|
|
24
27
|
var qs = __importStar(require("qs"));
|
|
25
|
-
var
|
|
28
|
+
var dayjs_1 = __importDefault(require("dayjs"));
|
|
29
|
+
var timezone_1 = __importDefault(require("dayjs/plugin/timezone"));
|
|
30
|
+
var utc_1 = __importDefault(require("dayjs/plugin/utc"));
|
|
31
|
+
dayjs_1.default.extend(utc_1.default);
|
|
32
|
+
dayjs_1.default.extend(timezone_1.default);
|
|
26
33
|
exports.json = Joi.extend(function (joi) {
|
|
27
34
|
return {
|
|
28
35
|
type: 'object',
|
|
@@ -108,7 +115,7 @@ exports.SpytecJoi = Joi.extend(function (joi) { return ({
|
|
|
108
115
|
base: joi.date(),
|
|
109
116
|
prepare: function (value) {
|
|
110
117
|
return {
|
|
111
|
-
value:
|
|
118
|
+
value: dayjs_1.default.tz(value, 'UTC').toDate(),
|
|
112
119
|
};
|
|
113
120
|
},
|
|
114
121
|
}); });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spytecgps/lambda-utils",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.11",
|
|
4
4
|
"description": "Lambda Utils",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -33,10 +33,9 @@
|
|
|
33
33
|
"@middy/http-response-serializer": "^2.5.7",
|
|
34
34
|
"@middy/input-output-logger": "^2.5.7",
|
|
35
35
|
"@spytecgps/sdk": "0.5.97",
|
|
36
|
+
"dayjs": "^1.11.9",
|
|
36
37
|
"joi": "^17.4.0",
|
|
37
38
|
"logform": "^2.4.0",
|
|
38
|
-
"moment": "2.29.1",
|
|
39
|
-
"moment-timezone": "0.5.33",
|
|
40
39
|
"qs": "^6.10.1",
|
|
41
40
|
"winston": "^3.7.2",
|
|
42
41
|
"winston-console-format": "^1.0.8"
|