speedly 1.2.42 → 1.2.44
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/cjs/db/db.js
CHANGED
|
@@ -523,7 +523,8 @@ const usingMongoDb = (collectionName, config = { type: "external" }) => {
|
|
|
523
523
|
return next({
|
|
524
524
|
status: 500,
|
|
525
525
|
json: {
|
|
526
|
-
message:
|
|
526
|
+
message: (err instanceof Error ? err.message : String(err)) ||
|
|
527
|
+
"internal server error",
|
|
527
528
|
},
|
|
528
529
|
});
|
|
529
530
|
}
|
|
@@ -7,14 +7,16 @@ exports.put = void 0;
|
|
|
7
7
|
const makeOptional_1 = __importDefault(require("../../util/makeOptional"));
|
|
8
8
|
const yup_1 = require("yup");
|
|
9
9
|
const paramId = (0, yup_1.object)({
|
|
10
|
-
id: (0, yup_1.string)()
|
|
10
|
+
id: (0, yup_1.string)()
|
|
11
|
+
.required("id is required")
|
|
12
|
+
.matches(/^[0-9a-fA-F]{24}$/, "id is invalid"),
|
|
11
13
|
});
|
|
12
14
|
const schema = (0, yup_1.object)({
|
|
13
|
-
translatedText: (0, yup_1.string)().required(
|
|
15
|
+
translatedText: (0, yup_1.string)().required("translatedText is required"),
|
|
14
16
|
});
|
|
15
17
|
//? exports
|
|
16
18
|
const put = {
|
|
17
19
|
params: paramId,
|
|
18
|
-
body: (0, makeOptional_1.default)(schema)
|
|
20
|
+
body: (0, makeOptional_1.default)(schema),
|
|
19
21
|
};
|
|
20
22
|
exports.put = put;
|
package/dist/esm/db/db.js
CHANGED
|
@@ -523,7 +523,8 @@ const usingMongoDb = (collectionName, config = { type: "external" }) => {
|
|
|
523
523
|
return next({
|
|
524
524
|
status: 500,
|
|
525
525
|
json: {
|
|
526
|
-
message:
|
|
526
|
+
message: (err instanceof Error ? err.message : String(err)) ||
|
|
527
|
+
"internal server error",
|
|
527
528
|
},
|
|
528
529
|
});
|
|
529
530
|
}
|
|
@@ -7,14 +7,16 @@ exports.put = void 0;
|
|
|
7
7
|
const makeOptional_1 = __importDefault(require("../../util/makeOptional"));
|
|
8
8
|
const yup_1 = require("yup");
|
|
9
9
|
const paramId = (0, yup_1.object)({
|
|
10
|
-
id: (0, yup_1.string)()
|
|
10
|
+
id: (0, yup_1.string)()
|
|
11
|
+
.required("id is required")
|
|
12
|
+
.matches(/^[0-9a-fA-F]{24}$/, "id is invalid"),
|
|
11
13
|
});
|
|
12
14
|
const schema = (0, yup_1.object)({
|
|
13
|
-
translatedText: (0, yup_1.string)().required(
|
|
15
|
+
translatedText: (0, yup_1.string)().required("translatedText is required"),
|
|
14
16
|
});
|
|
15
17
|
//? exports
|
|
16
18
|
const put = {
|
|
17
19
|
params: paramId,
|
|
18
|
-
body: (0, makeOptional_1.default)(schema)
|
|
20
|
+
body: (0, makeOptional_1.default)(schema),
|
|
19
21
|
};
|
|
20
22
|
exports.put = put;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "speedly",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.44",
|
|
4
4
|
"main": "dist/cjs/index.js",
|
|
5
5
|
"module": "dist/esm/index.js",
|
|
6
6
|
"types": "dist/esm/index.d.ts",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"build": "npm run build:cjs && npm run build:esm",
|
|
15
15
|
"build:cjs": "tsc -p tsconfig.cjs.json",
|
|
16
16
|
"build:esm": "tsc -p tsconfig.esm.json",
|
|
17
|
-
"
|
|
17
|
+
"pub": "npm run build && git add . && git commit -m 'publish' && npm version patch && npm publish ",
|
|
18
18
|
"dev": "ts-node src/index.ts"
|
|
19
19
|
},
|
|
20
20
|
"author": "MAHSERIN",
|