@koalarx/nest 1.8.5 → 1.9.1
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/README.md +329 -0
- package/core/database/repository.base.d.ts +1 -1
- package/core/database/repository.base.js +3 -2
- package/core/index.d.ts +1 -0
- package/core/koala-app.d.ts +10 -1
- package/core/koala-app.js +56 -1
- package/core/security/strategies/api-key.strategy.d.ts +16 -0
- package/core/security/strategies/api-key.strategy.js +31 -0
- package/core/validators/file-validator.d.ts +27 -0
- package/core/validators/file-validator.js +94 -0
- package/decorators/upload.decorator.d.ts +1 -0
- package/decorators/upload.decorator.js +19 -0
- package/env/env.d.ts +1 -1
- package/package.json +22 -17
- package/services/logging/logging.service.js +2 -2
- package/tsconfig.lib.tsbuildinfo +1 -1
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UploadDecorator = void 0;
|
|
4
|
+
const common_1 = require("@nestjs/common");
|
|
5
|
+
const file_validator_1 = require("../core/validators/file-validator");
|
|
6
|
+
function UploadDecorator(maxSizeInKb, filetype) {
|
|
7
|
+
const maxSizeBytes = maxSizeInKb * 1024;
|
|
8
|
+
return (0, common_1.UploadedFiles)(new common_1.ParseFilePipe({
|
|
9
|
+
validators: [
|
|
10
|
+
new file_validator_1.FileSizeValidator({ maxSizeBytes, multiple: true }),
|
|
11
|
+
new file_validator_1.FileTypeValidator({
|
|
12
|
+
filetype,
|
|
13
|
+
multiple: true,
|
|
14
|
+
}),
|
|
15
|
+
],
|
|
16
|
+
fileIsRequired: false,
|
|
17
|
+
}));
|
|
18
|
+
}
|
|
19
|
+
exports.UploadDecorator = UploadDecorator;
|
package/env/env.d.ts
CHANGED
|
@@ -8,8 +8,8 @@ export declare const envSchema: z.ZodObject<{
|
|
|
8
8
|
SWAGGER_PASSWORD: z.ZodOptional<z.ZodString>;
|
|
9
9
|
REDIS_CONNECTION_STRING: z.ZodString;
|
|
10
10
|
}, "strip", z.ZodTypeAny, {
|
|
11
|
-
NODE_ENV: "test" | "develop" | "staging" | "production";
|
|
12
11
|
PORT: number;
|
|
12
|
+
NODE_ENV: "test" | "develop" | "staging" | "production";
|
|
13
13
|
PRISMA_QUERY_LOG: boolean;
|
|
14
14
|
REDIS_CONNECTION_STRING: string;
|
|
15
15
|
SWAGGER_USERNAME?: string | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@koalarx/nest",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.9.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -14,21 +14,26 @@
|
|
|
14
14
|
"homepage": "https://github.com/igordrangel/koala-nest#readme",
|
|
15
15
|
"types": "./koala-nest.d.ts",
|
|
16
16
|
"peerDependencies": {
|
|
17
|
-
"@koalarx/utils": "3.1.3",
|
|
18
|
-
"@nestjs/common": "11.0.12",
|
|
19
|
-
"@nestjs/config": "4.0.1",
|
|
20
|
-
"@nestjs/core": "11.0.12",
|
|
21
|
-
"@nestjs/mapped-types": "2.1.0",
|
|
22
|
-
"@nestjs/
|
|
23
|
-
"@nestjs/
|
|
24
|
-
"@
|
|
25
|
-
"@
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"
|
|
17
|
+
"@koalarx/utils": "^3.1.3",
|
|
18
|
+
"@nestjs/common": "^11.0.12",
|
|
19
|
+
"@nestjs/config": "^4.0.1",
|
|
20
|
+
"@nestjs/core": "^11.0.12",
|
|
21
|
+
"@nestjs/mapped-types": "^2.1.0",
|
|
22
|
+
"@nestjs/passport": "^11.0.5",
|
|
23
|
+
"@nestjs/platform-express": "^11.0.12",
|
|
24
|
+
"@nestjs/swagger": "^11.0.7",
|
|
25
|
+
"@prisma/client": "^6.5.0",
|
|
26
|
+
"@scalar/nestjs-api-reference": "^0.4.3",
|
|
27
|
+
"consola": "^3.4.2",
|
|
28
|
+
"dotenv": "^16.0.3",
|
|
29
|
+
"express-basic-auth": "^1.2.1",
|
|
30
|
+
"ioredis": "^5.3.2",
|
|
31
|
+
"ngrok": "^5.0.0-beta.2",
|
|
32
|
+
"passport": "^0.7.0",
|
|
33
|
+
"passport-custom": "^1.1.1",
|
|
34
|
+
"reflect-metadata": "^0.1.13",
|
|
35
|
+
"rimraf": "^3.0.2",
|
|
36
|
+
"zod": "^3.22.4",
|
|
37
|
+
"zod-validation-error": "^1.5.0"
|
|
33
38
|
}
|
|
34
39
|
}
|
|
@@ -8,10 +8,10 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
9
|
exports.LoggingService = void 0;
|
|
10
10
|
const common_1 = require("@nestjs/common");
|
|
11
|
+
const consola_1 = require("consola");
|
|
11
12
|
let LoggingService = exports.LoggingService = class LoggingService {
|
|
12
13
|
async report(data) {
|
|
13
|
-
|
|
14
|
-
console.error(data.error);
|
|
14
|
+
consola_1.default.error(data.error);
|
|
15
15
|
}
|
|
16
16
|
};
|
|
17
17
|
exports.LoggingService = LoggingService = __decorate([
|