speedly 1.2.31 → 1.2.33
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.d.ts +2 -2
- package/dist/cjs/modules/translation/translation.validator.d.ts +7 -1
- package/dist/cjs/uploader/uploader.d.ts +1 -1
- package/dist/cjs/util/makeOptional.d.ts +10 -1
- package/dist/cjs/util/makeOptional.js +35 -5
- package/dist/esm/db/db.d.ts +2 -2
- package/dist/esm/modules/translation/translation.validator.d.ts +7 -1
- package/dist/esm/uploader/uploader.d.ts +1 -1
- package/dist/esm/util/makeOptional.d.ts +10 -1
- package/dist/esm/util/makeOptional.js +35 -5
- package/package.json +1 -1
package/dist/cjs/db/db.d.ts
CHANGED
|
@@ -117,7 +117,7 @@ declare const db: (collectionName: string, config?: ConfigsType) => {
|
|
|
117
117
|
limit(value: number): /*elided*/ any;
|
|
118
118
|
populate(value: string | object | (string | object)[]): /*elided*/ any;
|
|
119
119
|
};
|
|
120
|
-
aggregate: (pipeline?:
|
|
120
|
+
aggregate: (pipeline?: never[]) => {
|
|
121
121
|
(req: Request, res: Response, next: NextFunction): Promise<void>;
|
|
122
122
|
select(value: string | {
|
|
123
123
|
[key: string]: -1 | 1;
|
|
@@ -177,5 +177,5 @@ declare const db: (collectionName: string, config?: ConfigsType) => {
|
|
|
177
177
|
limit(value: number): /*elided*/ any;
|
|
178
178
|
populate(value: string | object | (string | object)[]): /*elided*/ any;
|
|
179
179
|
};
|
|
180
|
-
};
|
|
180
|
+
} | undefined;
|
|
181
181
|
export default db;
|
|
@@ -4,6 +4,12 @@ declare const put: {
|
|
|
4
4
|
}, import("yup").AnyObject, {
|
|
5
5
|
id: undefined;
|
|
6
6
|
}, "">;
|
|
7
|
-
body:
|
|
7
|
+
body: {
|
|
8
|
+
[key: string]: any;
|
|
9
|
+
} | import("yup").ObjectSchema<{
|
|
10
|
+
[x: string]: any;
|
|
11
|
+
}, import("yup").AnyObject, {
|
|
12
|
+
[x: string]: any;
|
|
13
|
+
}, "">;
|
|
8
14
|
};
|
|
9
15
|
export { put };
|
|
@@ -20,5 +20,5 @@ declare const _default: (destination?: string | ((req: Request, file: Express.Mu
|
|
|
20
20
|
fields: (fields: multer.Field[]) => (req: Request, res: Response, next: NextFunction) => void;
|
|
21
21
|
any: () => (req: Request, res: Response, next: NextFunction) => void;
|
|
22
22
|
none: () => (req: Request, res: Response, next: NextFunction) => void;
|
|
23
|
-
};
|
|
23
|
+
} | undefined;
|
|
24
24
|
export default _default;
|
|
@@ -1,17 +1,47 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
5
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
36
|
exports.default = default_1;
|
|
7
|
-
const
|
|
37
|
+
const yup = __importStar(require("yup"));
|
|
8
38
|
function default_1(schema) {
|
|
9
39
|
if (schema.fields) {
|
|
10
40
|
const shape = {};
|
|
11
41
|
for (const key in schema.fields) {
|
|
12
42
|
shape[key] = schema.fields[key].optional();
|
|
13
43
|
}
|
|
14
|
-
return
|
|
44
|
+
return yup.object().shape(shape);
|
|
15
45
|
}
|
|
16
46
|
return schema;
|
|
17
47
|
}
|
package/dist/esm/db/db.d.ts
CHANGED
|
@@ -117,7 +117,7 @@ declare const db: (collectionName: string, config?: ConfigsType) => {
|
|
|
117
117
|
limit(value: number): /*elided*/ any;
|
|
118
118
|
populate(value: string | object | (string | object)[]): /*elided*/ any;
|
|
119
119
|
};
|
|
120
|
-
aggregate: (pipeline?:
|
|
120
|
+
aggregate: (pipeline?: never[]) => {
|
|
121
121
|
(req: Request, res: Response, next: NextFunction): Promise<void>;
|
|
122
122
|
select(value: string | {
|
|
123
123
|
[key: string]: -1 | 1;
|
|
@@ -177,5 +177,5 @@ declare const db: (collectionName: string, config?: ConfigsType) => {
|
|
|
177
177
|
limit(value: number): /*elided*/ any;
|
|
178
178
|
populate(value: string | object | (string | object)[]): /*elided*/ any;
|
|
179
179
|
};
|
|
180
|
-
};
|
|
180
|
+
} | undefined;
|
|
181
181
|
export default db;
|
|
@@ -4,6 +4,12 @@ declare const put: {
|
|
|
4
4
|
}, import("yup").AnyObject, {
|
|
5
5
|
id: undefined;
|
|
6
6
|
}, "">;
|
|
7
|
-
body:
|
|
7
|
+
body: {
|
|
8
|
+
[key: string]: any;
|
|
9
|
+
} | import("yup").ObjectSchema<{
|
|
10
|
+
[x: string]: any;
|
|
11
|
+
}, import("yup").AnyObject, {
|
|
12
|
+
[x: string]: any;
|
|
13
|
+
}, "">;
|
|
8
14
|
};
|
|
9
15
|
export { put };
|
|
@@ -20,5 +20,5 @@ declare const _default: (destination?: string | ((req: Request, file: Express.Mu
|
|
|
20
20
|
fields: (fields: multer.Field[]) => (req: Request, res: Response, next: NextFunction) => void;
|
|
21
21
|
any: () => (req: Request, res: Response, next: NextFunction) => void;
|
|
22
22
|
none: () => (req: Request, res: Response, next: NextFunction) => void;
|
|
23
|
-
};
|
|
23
|
+
} | undefined;
|
|
24
24
|
export default _default;
|
|
@@ -1,17 +1,47 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
5
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
36
|
exports.default = default_1;
|
|
7
|
-
const
|
|
37
|
+
const yup = __importStar(require("yup"));
|
|
8
38
|
function default_1(schema) {
|
|
9
39
|
if (schema.fields) {
|
|
10
40
|
const shape = {};
|
|
11
41
|
for (const key in schema.fields) {
|
|
12
42
|
shape[key] = schema.fields[key].optional();
|
|
13
43
|
}
|
|
14
|
-
return
|
|
44
|
+
return yup.object().shape(shape);
|
|
15
45
|
}
|
|
16
46
|
return schema;
|
|
17
47
|
}
|