speedly 1.2.19 → 1.2.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/cjs/auth/auth.js +4 -1
- package/dist/cjs/db/db.d.ts +2 -2
- package/dist/cjs/db/db.js +7 -4
- package/dist/cjs/index.js +8 -5
- package/dist/cjs/model/translation.js +4 -1
- package/dist/cjs/uploader/uploader.d.ts +1 -1
- package/dist/cjs/uploader/uploader.js +8 -5
- package/dist/cjs/util/getConfig.js +5 -2
- package/dist/cjs/util/translator.js +6 -3
- package/package.json +2 -2
package/dist/cjs/auth/auth.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const getConfig_1 = require("../util/getConfig");
|
|
6
|
+
const getConfig_1 = __importDefault(require("../util/getConfig"));
|
|
4
7
|
const gConfig = {
|
|
5
8
|
admin: { role: "ADMIN", model: "../models/admin" },
|
|
6
9
|
jwtSecretEnv: "JWT_KEY",
|
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;
|
package/dist/cjs/db/db.js
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
let __path = "./models/";
|
|
4
|
-
const path_1 = require("path");
|
|
5
|
-
const strToObj_1 = require("../util/strToObj");
|
|
6
|
-
const getConfig_1 = require("../util/getConfig");
|
|
7
|
-
const translator_1 = require("../util/translator");
|
|
7
|
+
const path_1 = __importDefault(require("path"));
|
|
8
|
+
const strToObj_1 = __importDefault(require("../util/strToObj"));
|
|
9
|
+
const getConfig_1 = __importDefault(require("../util/getConfig"));
|
|
10
|
+
const translator_1 = __importDefault(require("../util/translator"));
|
|
8
11
|
let configs = {
|
|
9
12
|
dbType: "mongodb",
|
|
10
13
|
path: "../models",
|
package/dist/cjs/index.js
CHANGED
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.models = exports.validator = exports.uploader = exports.db = exports.auth = void 0;
|
|
4
|
-
const auth_1 = require("./auth/auth");
|
|
7
|
+
const auth_1 = __importDefault(require("./auth/auth"));
|
|
5
8
|
exports.auth = auth_1.default;
|
|
6
|
-
const db_1 = require("./db/db");
|
|
9
|
+
const db_1 = __importDefault(require("./db/db"));
|
|
7
10
|
exports.db = db_1.default;
|
|
8
|
-
const uploader_1 = require("./uploader/uploader");
|
|
11
|
+
const uploader_1 = __importDefault(require("./uploader/uploader"));
|
|
9
12
|
exports.uploader = uploader_1.default;
|
|
10
|
-
const validator_1 = require("./validator/validator");
|
|
13
|
+
const validator_1 = __importDefault(require("./validator/validator"));
|
|
11
14
|
exports.validator = validator_1.default;
|
|
12
|
-
const translation_1 = require("./model/translation");
|
|
15
|
+
const translation_1 = __importDefault(require("./model/translation"));
|
|
13
16
|
const models = { translation: translation_1.default };
|
|
14
17
|
exports.models = models;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const mongoose_1 = require("mongoose");
|
|
6
|
+
const mongoose_1 = __importDefault(require("mongoose"));
|
|
4
7
|
const schema = new mongoose_1.default.Schema({
|
|
5
8
|
text: { type: String, required: true },
|
|
6
9
|
lang: { type: String, required: true, },
|
|
@@ -19,5 +19,5 @@ declare const _default: (destination?: string | ((req: Request, file: Express.Mu
|
|
|
19
19
|
fields: (fields: multer.Field[]) => (req: Request, res: Response, next: NextFunction) => void;
|
|
20
20
|
any: () => (req: Request, res: Response, next: NextFunction) => void;
|
|
21
21
|
none: () => (req: Request, res: Response, next: NextFunction) => void;
|
|
22
|
-
};
|
|
22
|
+
} | undefined;
|
|
23
23
|
export default _default;
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const path_1 = require("path");
|
|
4
|
-
const fs_1 = require("fs");
|
|
5
|
-
const multer_1 = require("multer");
|
|
6
|
-
const mongoose_1 = require("mongoose");
|
|
7
|
-
const getConfig_1 = require("../util/getConfig");
|
|
6
|
+
const path_1 = __importDefault(require("path"));
|
|
7
|
+
const fs_1 = __importDefault(require("fs"));
|
|
8
|
+
const multer_1 = __importDefault(require("multer"));
|
|
9
|
+
const mongoose_1 = __importDefault(require("mongoose"));
|
|
10
|
+
const getConfig_1 = __importDefault(require("../util/getConfig"));
|
|
8
11
|
const relativePath = '../../../public';
|
|
9
12
|
let configs = {
|
|
10
13
|
saveInDb: false,
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const fs_1 = require("fs");
|
|
4
|
-
const path_1 = require("path");
|
|
6
|
+
const fs_1 = __importDefault(require("fs"));
|
|
7
|
+
const path_1 = __importDefault(require("path"));
|
|
5
8
|
const find = (field, ...args) => {
|
|
6
9
|
const rel = path_1.default.join.apply(null, [].slice.call(args));
|
|
7
10
|
if (!require?.main?.filename)
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const axios_1 = require("axios");
|
|
4
|
-
const translation_1 = require("./../model/translation");
|
|
5
|
-
const getConfig_1 = require("./getConfig");
|
|
6
|
+
const axios_1 = __importDefault(require("axios"));
|
|
7
|
+
const translation_1 = __importDefault(require("./../model/translation"));
|
|
8
|
+
const getConfig_1 = __importDefault(require("./getConfig"));
|
|
6
9
|
const configs = { ...(0, getConfig_1.default)('translate') };
|
|
7
10
|
async function firstSuccessful(promises) {
|
|
8
11
|
return new Promise((resolve, reject) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "speedly",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.20",
|
|
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
|
-
"publish": "git add . && git commit -m 'publish' && npm version patch && npm publish ",
|
|
17
|
+
"publish": "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",
|