@decaf-ts/for-nest 0.9.0 → 0.10.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 +45 -1
- package/dist/for-nest.cjs +1 -1
- package/dist/for-nest.cjs.map +1 -1
- package/dist/for-nest.js +1 -1
- package/dist/for-nest.js.map +1 -1
- package/lib/cjs/cli-module.cjs +100 -82
- package/lib/cjs/cli-module.cjs.map +1 -1
- package/lib/cjs/constants.cjs +2 -1
- package/lib/cjs/constants.cjs.map +1 -1
- package/lib/cjs/controllers.cjs +1 -1
- package/lib/cjs/controllers.cjs.map +1 -1
- package/lib/cjs/core-module.cjs +10 -17
- package/lib/cjs/core-module.cjs.map +1 -1
- package/lib/cjs/index.cjs +17 -2
- package/lib/cjs/index.cjs.map +1 -1
- package/lib/cjs/migrations/index.cjs +35 -0
- package/lib/cjs/migrations/index.cjs.map +1 -0
- package/lib/cjs/migrations/migration-module.cjs +60 -0
- package/lib/cjs/migrations/migration-module.cjs.map +1 -0
- package/lib/cjs/migrations/migration-options.cjs +4 -0
- package/lib/cjs/migrations/migration-options.cjs.map +1 -0
- package/lib/cjs/module.cjs +2 -0
- package/lib/cjs/module.cjs.map +1 -1
- package/lib/cjs/swagger-types.cjs +4 -0
- package/lib/cjs/swagger-types.cjs.map +1 -0
- package/lib/esm/cli-module.js +100 -83
- package/lib/esm/cli-module.js.map +1 -1
- package/lib/esm/constants.js +1 -0
- package/lib/esm/constants.js.map +1 -1
- package/lib/esm/controllers.js +1 -1
- package/lib/esm/controllers.js.map +1 -1
- package/lib/esm/core-module.js +10 -17
- package/lib/esm/core-module.js.map +1 -1
- package/lib/esm/decaf-model/FromModelController.js.map +1 -1
- package/lib/esm/index.js +16 -1
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/migrations/index.js +18 -0
- package/lib/esm/migrations/index.js.map +1 -0
- package/lib/esm/migrations/migration-module.js +52 -0
- package/lib/esm/migrations/migration-module.js.map +1 -0
- package/lib/esm/migrations/migration-options.js +7 -0
- package/lib/esm/migrations/migration-options.js.map +1 -0
- package/lib/esm/module.js +1 -0
- package/lib/esm/module.js.map +1 -1
- package/lib/esm/overrides/decoration.js.map +1 -1
- package/lib/esm/swagger-types.js +2 -0
- package/lib/esm/swagger-types.js.map +1 -0
- package/lib/types/cli-module.d.cts +9 -0
- package/lib/types/cli-module.d.mts +9 -0
- package/lib/types/constants.d.cts +1 -0
- package/lib/types/constants.d.mts +1 -0
- package/lib/types/core-module.d.cts +1 -1
- package/lib/types/core-module.d.mts +1 -1
- package/lib/types/factory/openapi/constants.d.cts +1 -1
- package/lib/types/factory/openapi/constants.d.mts +1 -1
- package/lib/types/index.d.cts +16 -1
- package/lib/types/index.d.mts +16 -1
- package/lib/types/migrations/index.d.cts +17 -0
- package/lib/types/migrations/index.d.mts +17 -0
- package/lib/types/migrations/migration-module.d.cts +15 -0
- package/lib/types/migrations/migration-module.d.mts +15 -0
- package/lib/types/migrations/migration-options.d.cts +11 -0
- package/lib/types/migrations/migration-options.d.mts +11 -0
- package/lib/types/module.d.cts +1 -0
- package/lib/types/module.d.mts +1 -0
- package/lib/types/overrides/decoration.d.cts +1 -3
- package/lib/types/overrides/decoration.d.mts +1 -3
- package/lib/types/swagger-types.d.cts +67 -0
- package/lib/types/swagger-types.d.mts +67 -0
- package/package.json +12 -1
package/lib/types/module.d.mts
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { Type } from "@nestjs/common";
|
|
2
|
-
import type { EnumSchemaAttributes } from "
|
|
3
|
-
import type { SchemaObjectMetadata } from "@nestjs/swagger/dist/interfaces/schema-object-metadata.interface";
|
|
4
|
-
import { type SwaggerEnumType } from "@nestjs/swagger/dist/types/swagger-enum.type";
|
|
2
|
+
import type { EnumSchemaAttributes, SchemaObjectMetadata, SwaggerEnumType } from "../swagger-types.d.cts";
|
|
5
3
|
export declare const isUndefined: (obj: any) => obj is undefined;
|
|
6
4
|
export declare function getEnumValues(enumType: SwaggerEnumType | (() => SwaggerEnumType)): string[] | number[];
|
|
7
5
|
export declare function getEnumType(values: (string | number)[]): "string" | "number";
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { Type } from "@nestjs/common";
|
|
2
|
-
import type { EnumSchemaAttributes } from "
|
|
3
|
-
import type { SchemaObjectMetadata } from "@nestjs/swagger/dist/interfaces/schema-object-metadata.interface";
|
|
4
|
-
import { type SwaggerEnumType } from "@nestjs/swagger/dist/types/swagger-enum.type";
|
|
2
|
+
import type { EnumSchemaAttributes, SchemaObjectMetadata, SwaggerEnumType } from "../swagger-types.d.mts";
|
|
5
3
|
export declare const isUndefined: (obj: any) => obj is undefined;
|
|
6
4
|
export declare function getEnumValues(enumType: SwaggerEnumType | (() => SwaggerEnumType)): string[] | number[];
|
|
7
5
|
export declare function getEnumType(values: (string | number)[]): "string" | "number";
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { Type } from "@nestjs/common";
|
|
2
|
+
export interface SecuritySchemeObject {
|
|
3
|
+
type: "apiKey" | "http" | "oauth2" | "openIdConnect";
|
|
4
|
+
description?: string;
|
|
5
|
+
name?: string;
|
|
6
|
+
in?: string;
|
|
7
|
+
scheme?: string;
|
|
8
|
+
bearerFormat?: string;
|
|
9
|
+
flows?: Record<string, unknown>;
|
|
10
|
+
openIdConnectUrl?: string;
|
|
11
|
+
"x-tokenName"?: string;
|
|
12
|
+
[extension: `x-${string}`]: unknown;
|
|
13
|
+
}
|
|
14
|
+
export interface SchemaObject {
|
|
15
|
+
nullable?: boolean;
|
|
16
|
+
deprecated?: boolean;
|
|
17
|
+
readOnly?: boolean;
|
|
18
|
+
writeOnly?: boolean;
|
|
19
|
+
default?: unknown;
|
|
20
|
+
description?: string;
|
|
21
|
+
type?: string;
|
|
22
|
+
enum?: unknown[];
|
|
23
|
+
pattern?: string;
|
|
24
|
+
required?: string[];
|
|
25
|
+
properties?: Record<string, SchemaObjectMetadata>;
|
|
26
|
+
additionalProperties?: unknown;
|
|
27
|
+
items?: unknown;
|
|
28
|
+
format?: string;
|
|
29
|
+
maximum?: number;
|
|
30
|
+
minimum?: number;
|
|
31
|
+
maxLength?: number;
|
|
32
|
+
minLength?: number;
|
|
33
|
+
}
|
|
34
|
+
export interface ReferenceObject {
|
|
35
|
+
$ref: string;
|
|
36
|
+
}
|
|
37
|
+
export type EnumAllowedTypes = any[] | Record<string, any> | (() => any[] | Record<string, any>);
|
|
38
|
+
export type EnumSchemaAttributes = Pick<SchemaObject, "default" | "description" | "deprecated" | "readOnly" | "writeOnly" | "nullable">;
|
|
39
|
+
type SchemaObjectCommonMetadata = Omit<SchemaObject, "type" | "required" | "properties" | "enum" | "pattern"> & {
|
|
40
|
+
isArray?: boolean;
|
|
41
|
+
name?: string;
|
|
42
|
+
pattern?: string | RegExp;
|
|
43
|
+
enum?: EnumAllowedTypes;
|
|
44
|
+
[key: string]: any;
|
|
45
|
+
};
|
|
46
|
+
export type SchemaObjectMetadata = (SchemaObjectCommonMetadata & {
|
|
47
|
+
type?: Type<unknown> | Function | [Function] | "array" | "string" | "number" | "boolean" | "integer" | "file" | "null";
|
|
48
|
+
required?: boolean;
|
|
49
|
+
}) | (SchemaObjectCommonMetadata & {
|
|
50
|
+
type?: Type<unknown> | Function | [Function] | Record<string, any>;
|
|
51
|
+
required?: boolean;
|
|
52
|
+
enumName: string;
|
|
53
|
+
enumSchema?: EnumSchemaAttributes;
|
|
54
|
+
}) | (SchemaObjectCommonMetadata & {
|
|
55
|
+
type: "object";
|
|
56
|
+
properties: Record<string, SchemaObjectMetadata>;
|
|
57
|
+
required?: string[];
|
|
58
|
+
selfRequired?: boolean;
|
|
59
|
+
}) | (SchemaObjectCommonMetadata & {
|
|
60
|
+
type: "object";
|
|
61
|
+
properties?: Record<string, SchemaObjectMetadata>;
|
|
62
|
+
additionalProperties: SchemaObject | ReferenceObject | boolean;
|
|
63
|
+
required?: string[];
|
|
64
|
+
selfRequired?: boolean;
|
|
65
|
+
});
|
|
66
|
+
export type SwaggerEnumType = string[] | number[] | boolean[] | (string | number | boolean)[] | Record<number, string>;
|
|
67
|
+
export {};
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { Type } from "@nestjs/common";
|
|
2
|
+
export interface SecuritySchemeObject {
|
|
3
|
+
type: "apiKey" | "http" | "oauth2" | "openIdConnect";
|
|
4
|
+
description?: string;
|
|
5
|
+
name?: string;
|
|
6
|
+
in?: string;
|
|
7
|
+
scheme?: string;
|
|
8
|
+
bearerFormat?: string;
|
|
9
|
+
flows?: Record<string, unknown>;
|
|
10
|
+
openIdConnectUrl?: string;
|
|
11
|
+
"x-tokenName"?: string;
|
|
12
|
+
[extension: `x-${string}`]: unknown;
|
|
13
|
+
}
|
|
14
|
+
export interface SchemaObject {
|
|
15
|
+
nullable?: boolean;
|
|
16
|
+
deprecated?: boolean;
|
|
17
|
+
readOnly?: boolean;
|
|
18
|
+
writeOnly?: boolean;
|
|
19
|
+
default?: unknown;
|
|
20
|
+
description?: string;
|
|
21
|
+
type?: string;
|
|
22
|
+
enum?: unknown[];
|
|
23
|
+
pattern?: string;
|
|
24
|
+
required?: string[];
|
|
25
|
+
properties?: Record<string, SchemaObjectMetadata>;
|
|
26
|
+
additionalProperties?: unknown;
|
|
27
|
+
items?: unknown;
|
|
28
|
+
format?: string;
|
|
29
|
+
maximum?: number;
|
|
30
|
+
minimum?: number;
|
|
31
|
+
maxLength?: number;
|
|
32
|
+
minLength?: number;
|
|
33
|
+
}
|
|
34
|
+
export interface ReferenceObject {
|
|
35
|
+
$ref: string;
|
|
36
|
+
}
|
|
37
|
+
export type EnumAllowedTypes = any[] | Record<string, any> | (() => any[] | Record<string, any>);
|
|
38
|
+
export type EnumSchemaAttributes = Pick<SchemaObject, "default" | "description" | "deprecated" | "readOnly" | "writeOnly" | "nullable">;
|
|
39
|
+
type SchemaObjectCommonMetadata = Omit<SchemaObject, "type" | "required" | "properties" | "enum" | "pattern"> & {
|
|
40
|
+
isArray?: boolean;
|
|
41
|
+
name?: string;
|
|
42
|
+
pattern?: string | RegExp;
|
|
43
|
+
enum?: EnumAllowedTypes;
|
|
44
|
+
[key: string]: any;
|
|
45
|
+
};
|
|
46
|
+
export type SchemaObjectMetadata = (SchemaObjectCommonMetadata & {
|
|
47
|
+
type?: Type<unknown> | Function | [Function] | "array" | "string" | "number" | "boolean" | "integer" | "file" | "null";
|
|
48
|
+
required?: boolean;
|
|
49
|
+
}) | (SchemaObjectCommonMetadata & {
|
|
50
|
+
type?: Type<unknown> | Function | [Function] | Record<string, any>;
|
|
51
|
+
required?: boolean;
|
|
52
|
+
enumName: string;
|
|
53
|
+
enumSchema?: EnumSchemaAttributes;
|
|
54
|
+
}) | (SchemaObjectCommonMetadata & {
|
|
55
|
+
type: "object";
|
|
56
|
+
properties: Record<string, SchemaObjectMetadata>;
|
|
57
|
+
required?: string[];
|
|
58
|
+
selfRequired?: boolean;
|
|
59
|
+
}) | (SchemaObjectCommonMetadata & {
|
|
60
|
+
type: "object";
|
|
61
|
+
properties?: Record<string, SchemaObjectMetadata>;
|
|
62
|
+
additionalProperties: SchemaObject | ReferenceObject | boolean;
|
|
63
|
+
required?: string[];
|
|
64
|
+
selfRequired?: boolean;
|
|
65
|
+
});
|
|
66
|
+
export type SwaggerEnumType = string[] | number[] | boolean[] | (string | number | boolean)[] | Record<number, string>;
|
|
67
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@decaf-ts/for-nest",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.1",
|
|
4
4
|
"description": "NestJS decaf integration",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -25,6 +25,17 @@
|
|
|
25
25
|
"default": "./lib/cjs/ram/index.cjs"
|
|
26
26
|
},
|
|
27
27
|
"default": "./lib/esm/ram/index.js"
|
|
28
|
+
},
|
|
29
|
+
"./cli": {
|
|
30
|
+
"import": {
|
|
31
|
+
"types": "./lib/types/cli-module.d.mts",
|
|
32
|
+
"default": "./lib/esm/cli-module.js"
|
|
33
|
+
},
|
|
34
|
+
"require": {
|
|
35
|
+
"types": "./lib/types/cli-module.d.cts",
|
|
36
|
+
"default": "./lib/cjs/cli-module.cjs"
|
|
37
|
+
},
|
|
38
|
+
"default": "./lib/esm/cli-module.js"
|
|
28
39
|
}
|
|
29
40
|
},
|
|
30
41
|
"bin": {
|