speedly 1.2.7 → 1.2.8
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 +1 -1
- package/dist/cjs/index.d.ts +60 -1
- package/dist/cjs/index.js +4 -1
- package/dist/esm/db/db.js +1 -1
- package/dist/esm/index.d.ts +60 -1
- package/dist/esm/index.js +4 -1
- package/package.json +4 -2
package/dist/cjs/db/db.js
CHANGED
|
@@ -21,7 +21,7 @@ const usingMongoDb = (collectionName, config = {}) => {
|
|
|
21
21
|
};
|
|
22
22
|
if (config?.path)
|
|
23
23
|
__path = config.path;
|
|
24
|
-
model = require(path_1.default.join(
|
|
24
|
+
model = require(path_1.default.join(__path, collectionName));
|
|
25
25
|
const actionHandler = {
|
|
26
26
|
find: (match = {}) => {
|
|
27
27
|
queryState.action = "find";
|
package/dist/cjs/index.d.ts
CHANGED
|
@@ -2,4 +2,63 @@ import auth from './auth/auth';
|
|
|
2
2
|
import db from './db/db';
|
|
3
3
|
import uploader from './uploader/uploader';
|
|
4
4
|
import validator from './validator/validator';
|
|
5
|
-
|
|
5
|
+
declare const models: {
|
|
6
|
+
translation: import("mongoose").Model<{
|
|
7
|
+
createdAt: NativeDate;
|
|
8
|
+
updatedAt: NativeDate;
|
|
9
|
+
} & {
|
|
10
|
+
text: string;
|
|
11
|
+
lang: string;
|
|
12
|
+
translatedText: string;
|
|
13
|
+
}, {}, {}, {}, import("mongoose").Document<unknown, {}, {
|
|
14
|
+
createdAt: NativeDate;
|
|
15
|
+
updatedAt: NativeDate;
|
|
16
|
+
} & {
|
|
17
|
+
text: string;
|
|
18
|
+
lang: string;
|
|
19
|
+
translatedText: string;
|
|
20
|
+
}, {}, {
|
|
21
|
+
timestamps: true;
|
|
22
|
+
}> & {
|
|
23
|
+
createdAt: NativeDate;
|
|
24
|
+
updatedAt: NativeDate;
|
|
25
|
+
} & {
|
|
26
|
+
text: string;
|
|
27
|
+
lang: string;
|
|
28
|
+
translatedText: string;
|
|
29
|
+
} & {
|
|
30
|
+
_id: import("mongoose").Types.ObjectId;
|
|
31
|
+
} & {
|
|
32
|
+
__v: number;
|
|
33
|
+
}, import("mongoose").Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
34
|
+
timestamps: true;
|
|
35
|
+
}, {
|
|
36
|
+
createdAt: NativeDate;
|
|
37
|
+
updatedAt: NativeDate;
|
|
38
|
+
} & {
|
|
39
|
+
text: string;
|
|
40
|
+
lang: string;
|
|
41
|
+
translatedText: string;
|
|
42
|
+
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
43
|
+
createdAt: NativeDate;
|
|
44
|
+
updatedAt: NativeDate;
|
|
45
|
+
} & {
|
|
46
|
+
text: string;
|
|
47
|
+
lang: string;
|
|
48
|
+
translatedText: string;
|
|
49
|
+
}>, {}, import("mongoose").ResolveSchemaOptions<{
|
|
50
|
+
timestamps: true;
|
|
51
|
+
}>> & import("mongoose").FlatRecord<{
|
|
52
|
+
createdAt: NativeDate;
|
|
53
|
+
updatedAt: NativeDate;
|
|
54
|
+
} & {
|
|
55
|
+
text: string;
|
|
56
|
+
lang: string;
|
|
57
|
+
translatedText: string;
|
|
58
|
+
}> & {
|
|
59
|
+
_id: import("mongoose").Types.ObjectId;
|
|
60
|
+
} & {
|
|
61
|
+
__v: number;
|
|
62
|
+
}>>;
|
|
63
|
+
};
|
|
64
|
+
export { auth, db, uploader, validator, models };
|
package/dist/cjs/index.js
CHANGED
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.validator = exports.uploader = exports.db = exports.auth = void 0;
|
|
6
|
+
exports.models = exports.validator = exports.uploader = exports.db = exports.auth = void 0;
|
|
7
7
|
const auth_1 = __importDefault(require("./auth/auth"));
|
|
8
8
|
exports.auth = auth_1.default;
|
|
9
9
|
const db_1 = __importDefault(require("./db/db"));
|
|
@@ -12,3 +12,6 @@ const uploader_1 = __importDefault(require("./uploader/uploader"));
|
|
|
12
12
|
exports.uploader = uploader_1.default;
|
|
13
13
|
const validator_1 = __importDefault(require("./validator/validator"));
|
|
14
14
|
exports.validator = validator_1.default;
|
|
15
|
+
const translation_1 = __importDefault(require("./model/translation"));
|
|
16
|
+
const models = { translation: translation_1.default };
|
|
17
|
+
exports.models = models;
|
package/dist/esm/db/db.js
CHANGED
|
@@ -21,7 +21,7 @@ const usingMongoDb = (collectionName, config = {}) => {
|
|
|
21
21
|
};
|
|
22
22
|
if (config?.path)
|
|
23
23
|
__path = config.path;
|
|
24
|
-
model = require(path_1.default.join(
|
|
24
|
+
model = require(path_1.default.join(__path, collectionName));
|
|
25
25
|
const actionHandler = {
|
|
26
26
|
find: (match = {}) => {
|
|
27
27
|
queryState.action = "find";
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -2,4 +2,63 @@ import auth from './auth/auth';
|
|
|
2
2
|
import db from './db/db';
|
|
3
3
|
import uploader from './uploader/uploader';
|
|
4
4
|
import validator from './validator/validator';
|
|
5
|
-
|
|
5
|
+
declare const models: {
|
|
6
|
+
translation: import("mongoose").Model<{
|
|
7
|
+
createdAt: NativeDate;
|
|
8
|
+
updatedAt: NativeDate;
|
|
9
|
+
} & {
|
|
10
|
+
text: string;
|
|
11
|
+
lang: string;
|
|
12
|
+
translatedText: string;
|
|
13
|
+
}, {}, {}, {}, import("mongoose").Document<unknown, {}, {
|
|
14
|
+
createdAt: NativeDate;
|
|
15
|
+
updatedAt: NativeDate;
|
|
16
|
+
} & {
|
|
17
|
+
text: string;
|
|
18
|
+
lang: string;
|
|
19
|
+
translatedText: string;
|
|
20
|
+
}, {}, {
|
|
21
|
+
timestamps: true;
|
|
22
|
+
}> & {
|
|
23
|
+
createdAt: NativeDate;
|
|
24
|
+
updatedAt: NativeDate;
|
|
25
|
+
} & {
|
|
26
|
+
text: string;
|
|
27
|
+
lang: string;
|
|
28
|
+
translatedText: string;
|
|
29
|
+
} & {
|
|
30
|
+
_id: import("mongoose").Types.ObjectId;
|
|
31
|
+
} & {
|
|
32
|
+
__v: number;
|
|
33
|
+
}, import("mongoose").Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
34
|
+
timestamps: true;
|
|
35
|
+
}, {
|
|
36
|
+
createdAt: NativeDate;
|
|
37
|
+
updatedAt: NativeDate;
|
|
38
|
+
} & {
|
|
39
|
+
text: string;
|
|
40
|
+
lang: string;
|
|
41
|
+
translatedText: string;
|
|
42
|
+
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
43
|
+
createdAt: NativeDate;
|
|
44
|
+
updatedAt: NativeDate;
|
|
45
|
+
} & {
|
|
46
|
+
text: string;
|
|
47
|
+
lang: string;
|
|
48
|
+
translatedText: string;
|
|
49
|
+
}>, {}, import("mongoose").ResolveSchemaOptions<{
|
|
50
|
+
timestamps: true;
|
|
51
|
+
}>> & import("mongoose").FlatRecord<{
|
|
52
|
+
createdAt: NativeDate;
|
|
53
|
+
updatedAt: NativeDate;
|
|
54
|
+
} & {
|
|
55
|
+
text: string;
|
|
56
|
+
lang: string;
|
|
57
|
+
translatedText: string;
|
|
58
|
+
}> & {
|
|
59
|
+
_id: import("mongoose").Types.ObjectId;
|
|
60
|
+
} & {
|
|
61
|
+
__v: number;
|
|
62
|
+
}>>;
|
|
63
|
+
};
|
|
64
|
+
export { auth, db, uploader, validator, models };
|
package/dist/esm/index.js
CHANGED
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.validator = exports.uploader = exports.db = exports.auth = void 0;
|
|
6
|
+
exports.models = exports.validator = exports.uploader = exports.db = exports.auth = void 0;
|
|
7
7
|
const auth_1 = __importDefault(require("./auth/auth"));
|
|
8
8
|
exports.auth = auth_1.default;
|
|
9
9
|
const db_1 = __importDefault(require("./db/db"));
|
|
@@ -12,3 +12,6 @@ const uploader_1 = __importDefault(require("./uploader/uploader"));
|
|
|
12
12
|
exports.uploader = uploader_1.default;
|
|
13
13
|
const validator_1 = __importDefault(require("./validator/validator"));
|
|
14
14
|
exports.validator = validator_1.default;
|
|
15
|
+
const translation_1 = __importDefault(require("./model/translation"));
|
|
16
|
+
const models = { translation: translation_1.default };
|
|
17
|
+
exports.models = models;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "speedly",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.8",
|
|
4
4
|
"main": "dist/cjs/index.js",
|
|
5
5
|
"module": "dist/esm/index.js",
|
|
6
6
|
"types": "dist/esm/index.d.ts",
|
|
@@ -24,10 +24,12 @@
|
|
|
24
24
|
"@types/multer": "^2.0.0",
|
|
25
25
|
"@types/node": "^24.5.2",
|
|
26
26
|
"ts-node": "^10.9.2",
|
|
27
|
-
"
|
|
27
|
+
"tsc": "^2.0.4",
|
|
28
|
+
"typescript": "^5.9.3"
|
|
28
29
|
},
|
|
29
30
|
"dependencies": {
|
|
30
31
|
"axios": "^1.11.0",
|
|
32
|
+
"cosmiconfig": "^9.0.0",
|
|
31
33
|
"express": "^5.1.0",
|
|
32
34
|
"jsonwebtoken": "^9.0.2",
|
|
33
35
|
"mongoose": "^8.18.2",
|