@tsofist/schema-forge 2.8.0 → 2.10.0-next.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/lib/artefacts-policy.d.ts +3 -0
- package/lib/artefacts-policy.d.ts.map +1 -0
- package/lib/artefacts-policy.js +7 -0
- package/lib/dbml-generator/converter.d.ts +5 -0
- package/lib/dbml-generator/converter.d.ts.map +1 -0
- package/lib/dbml-generator/converter.js +15 -0
- package/lib/dbml-generator/generator.d.ts +4 -0
- package/lib/dbml-generator/generator.d.ts.map +1 -0
- package/lib/dbml-generator/generator.js +423 -0
- package/lib/dbml-generator/generator.spec.d.ts +2 -0
- package/lib/dbml-generator/generator.spec.d.ts.map +1 -0
- package/lib/dbml-generator/generator.spec.js +94 -0
- package/lib/dbml-generator/types.d.ts +144 -0
- package/lib/dbml-generator/types.d.ts.map +1 -0
- package/lib/dbml-generator/types.js +53 -0
- package/lib/definition-info/api-signature.d.ts +18 -0
- package/lib/definition-info/api-signature.d.ts.map +1 -0
- package/lib/definition-info/api-signature.js +31 -0
- package/lib/definition-info/parser.d.ts +3 -0
- package/lib/definition-info/parser.d.ts.map +1 -0
- package/lib/definition-info/parser.js +44 -0
- package/lib/definition-info/ref.d.ts +3 -0
- package/lib/definition-info/ref.d.ts.map +1 -0
- package/lib/definition-info/ref.js +6 -0
- package/lib/definition-info/types.d.ts +48 -0
- package/lib/definition-info/types.d.ts.map +1 -0
- package/lib/definition-info/types.js +20 -0
- package/lib/efc.d.ts +27 -0
- package/lib/efc.d.ts.map +1 -0
- package/lib/efc.js +9 -0
- package/lib/fake-generator/generator-host.d.ts +4 -0
- package/lib/fake-generator/generator-host.d.ts.map +1 -0
- package/lib/fake-generator/generator-host.js +57 -0
- package/lib/fake-generator/generator.d.ts +6 -0
- package/lib/fake-generator/generator.d.ts.map +1 -0
- package/lib/fake-generator/generator.js +64 -0
- package/lib/fake-generator/generator.spec.d.ts +2 -0
- package/lib/fake-generator/generator.spec.d.ts.map +1 -0
- package/lib/{fake-generator.spec.js → fake-generator/generator.spec.js} +21 -19
- package/lib/fake-generator/modules.d.ts +3 -0
- package/lib/fake-generator/modules.d.ts.map +1 -0
- package/lib/fake-generator/modules.js +44 -0
- package/lib/fake-generator/types.d.ts +18 -0
- package/lib/fake-generator/types.d.ts.map +1 -0
- package/lib/fake-generator/types.js +2 -0
- package/lib/schema-generator/extended-annotations-reader.d.ts +2 -0
- package/lib/schema-generator/extended-annotations-reader.d.ts.map +1 -0
- package/lib/{util/patch.extended-annotations-reader.js → schema-generator/extended-annotations-reader.js} +2 -2
- package/lib/schema-generator/forge.d.ts +3 -0
- package/lib/schema-generator/forge.d.ts.map +1 -0
- package/lib/{generator.js → schema-generator/forge.js} +13 -33
- package/lib/schema-generator/forge.spec.d.ts +2 -0
- package/lib/schema-generator/forge.spec.d.ts.map +1 -0
- package/lib/{generator.spec.js → schema-generator/forge.spec.js} +157 -103
- package/lib/schema-generator/format-error.d.ts +2 -0
- package/lib/schema-generator/format-error.d.ts.map +1 -0
- package/lib/{util/format.error.js → schema-generator/format-error.js} +3 -2
- package/lib/schema-generator/generate-drafts.d.ts +17 -0
- package/lib/schema-generator/generate-drafts.d.ts.map +1 -0
- package/lib/{generator/types-generator.js → schema-generator/generate-drafts.js} +140 -120
- package/lib/schema-generator/generate-schema.d.ts +15 -0
- package/lib/schema-generator/generate-schema.d.ts.map +1 -0
- package/lib/{generator/schema-generator.js → schema-generator/generate-schema.js} +46 -19
- package/lib/{util/tsc.d.ts → schema-generator/helpers-tsc.d.ts} +2 -1
- package/lib/schema-generator/helpers-tsc.d.ts.map +1 -0
- package/lib/schema-generator/shrink-definition-name.d.ts +7 -0
- package/lib/schema-generator/shrink-definition-name.d.ts.map +1 -0
- package/lib/schema-generator/shrink-definition-name.js +21 -0
- package/lib/schema-generator/sort-properties.d.ts +3 -0
- package/lib/schema-generator/sort-properties.d.ts.map +1 -0
- package/lib/{util → schema-generator}/sort-properties.js +2 -2
- package/lib/schema-generator/types.d.ts +18 -0
- package/lib/schema-generator/types.d.ts.map +1 -0
- package/lib/{generator → schema-generator}/types.js +20 -8
- package/lib/schema-registry/kw-api.d.ts +3 -0
- package/lib/schema-registry/kw-api.d.ts.map +1 -0
- package/lib/schema-registry/kw-api.js +25 -0
- package/lib/schema-registry/kw-common.d.ts +3 -0
- package/lib/schema-registry/kw-common.d.ts.map +1 -0
- package/lib/schema-registry/kw-common.js +47 -0
- package/lib/schema-registry/kw-dbml.d.ts +3 -0
- package/lib/schema-registry/kw-dbml.d.ts.map +1 -0
- package/lib/schema-registry/kw-dbml.js +79 -0
- package/lib/schema-registry/loader.d.ts +10 -0
- package/lib/schema-registry/loader.d.ts.map +1 -0
- package/lib/schema-registry/loader.js +24 -0
- package/lib/schema-registry/registry.d.ts +25 -0
- package/lib/schema-registry/registry.d.ts.map +1 -0
- package/lib/schema-registry/registry.js +230 -0
- package/lib/schema-registry/types.d.ts +78 -0
- package/lib/schema-registry/types.d.ts.map +1 -0
- package/lib/schema-registry/types.js +2 -0
- package/lib/types.d.ts +53 -79
- package/lib/types.d.ts.map +1 -0
- package/lib/types.js +0 -15
- package/package.json +9 -6
- package/lib/fake-generator.d.ts +0 -21
- package/lib/fake-generator.js +0 -158
- package/lib/fake-generator.spec.d.ts +0 -1
- package/lib/generator/schema-generator.d.ts +0 -20
- package/lib/generator/types-generator.d.ts +0 -13
- package/lib/generator/types.d.ts +0 -40
- package/lib/generator.d.ts +0 -5
- package/lib/generator.spec.d.ts +0 -1
- package/lib/index.d.ts +0 -7
- package/lib/index.js +0 -64
- package/lib/types/db.types.d.ts +0 -64
- package/lib/types/db.types.js +0 -17
- package/lib/util/format.error.d.ts +0 -1
- package/lib/util/patch.extended-annotations-reader.d.ts +0 -1
- package/lib/util/sort-properties.d.ts +0 -2
- package/lib/validator.d.ts +0 -47
- package/lib/validator.js +0 -385
- /package/lib/{util/tsc.js → schema-generator/helpers-tsc.js} +0 -0
package/lib/types.d.ts
CHANGED
|
@@ -1,18 +1,35 @@
|
|
|
1
|
-
import { NonEmptyString, Nullable, PRec } from '@tsofist/stem';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import type { NonEmptyString, Nullable, PRec } from '@tsofist/stem';
|
|
2
|
+
import type { ErrorObject, ErrorsTextOptions, SchemaObject, ValidateFunction } from 'ajv';
|
|
3
|
+
import type { Config } from 'ts-json-schema-generator';
|
|
4
|
+
export interface ForgeSchemaOptions {
|
|
5
|
+
/**
|
|
6
|
+
* Generate schema definitions for public types only
|
|
7
|
+
* This option can help to protect leaked internal types
|
|
8
|
+
*/
|
|
9
|
+
readonly explicitPublic?: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* By default, generator use description jsdoc-tag
|
|
12
|
+
* If this option is true, then generator will use fallback description from type comment
|
|
13
|
+
*/
|
|
14
|
+
readonly allowUseFallbackDescription?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Filter for definitions
|
|
17
|
+
* Important: dependencies will not be filtered
|
|
18
|
+
*/
|
|
19
|
+
readonly definitionsFilter?: (name: string) => boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Create shared $ref definitions for all types.
|
|
22
|
+
* Or: Do not create shared $ref definitions.
|
|
23
|
+
* Or: (default) Create shared $ref definitions only for exported types (not tagged as `@internal`).
|
|
24
|
+
*/
|
|
25
|
+
readonly expose?: TypeExposeKind;
|
|
10
26
|
/**
|
|
11
27
|
* $id for generated schema
|
|
12
28
|
*/
|
|
13
29
|
readonly schemaId?: string;
|
|
14
30
|
/**
|
|
15
31
|
* Metadata keywords for schema
|
|
32
|
+
*
|
|
16
33
|
* @see https://ajv.js.org/json-schema.html#metadata-keywords ajv
|
|
17
34
|
*/
|
|
18
35
|
readonly schemaMetadata?: {
|
|
@@ -24,16 +41,18 @@ export interface SchemaForgeOptions extends SchemaForgeBaseOptions {
|
|
|
24
41
|
};
|
|
25
42
|
/**
|
|
26
43
|
* Directories pattern for searching source files
|
|
44
|
+
*
|
|
27
45
|
* @example
|
|
28
|
-
*
|
|
29
|
-
*
|
|
46
|
+
* src/**
|
|
47
|
+
* {src,types}/**
|
|
30
48
|
*/
|
|
31
49
|
readonly sourcesDirectoryPattern: string;
|
|
32
50
|
/**
|
|
33
51
|
* Filenames pattern of source files
|
|
52
|
+
*
|
|
34
53
|
* @example
|
|
35
|
-
*
|
|
36
|
-
*
|
|
54
|
+
* service-api.ts
|
|
55
|
+
* *.{api,api-types}.ts
|
|
37
56
|
*/
|
|
38
57
|
readonly sourcesFilesPattern: string | string[];
|
|
39
58
|
/**
|
|
@@ -46,39 +65,39 @@ export interface SchemaForgeOptions extends SchemaForgeBaseOptions {
|
|
|
46
65
|
readonly tsconfigFrom?: string;
|
|
47
66
|
/**
|
|
48
67
|
* Schema file locations
|
|
68
|
+
*
|
|
49
69
|
* @example
|
|
50
|
-
*
|
|
51
|
-
*
|
|
70
|
+
* result.schema.json
|
|
71
|
+
* /absolute/path/to/result.schema.json
|
|
52
72
|
*/
|
|
53
73
|
readonly outputSchemaFile: string;
|
|
54
74
|
/**
|
|
55
75
|
* Definitions file location
|
|
76
|
+
*
|
|
56
77
|
* @example
|
|
57
|
-
*
|
|
58
|
-
*
|
|
78
|
+
* result.schema-metadata.json
|
|
79
|
+
* /absolute/path/to/result.schema-metadata.json
|
|
59
80
|
*/
|
|
60
81
|
readonly outputSchemaMetadataFile?: string;
|
|
61
|
-
|
|
62
|
-
* Generate openapi compatible schema
|
|
63
|
-
* @default false
|
|
64
|
-
*/
|
|
65
|
-
readonly openapiCompatible?: boolean;
|
|
82
|
+
readonly discriminatorType?: DiscriminatorType;
|
|
66
83
|
/**
|
|
67
84
|
* Determines whether to sort the properties of object schemas in alphabetical order.
|
|
68
|
-
*
|
|
69
|
-
*
|
|
70
|
-
*
|
|
71
|
-
*
|
|
72
|
-
*
|
|
85
|
+
* If set to `true`, the tool will sort both the fields in the `properties` section
|
|
86
|
+
* and the field names in the `required` array for object-schema definitions.
|
|
87
|
+
* Sorting can improve readability and consistency,
|
|
88
|
+
* but may affect the order in which properties appear in generated outputs.
|
|
89
|
+
* Applicable only to schemas of type `object`.
|
|
90
|
+
*
|
|
73
91
|
* @default false
|
|
74
92
|
*/
|
|
75
93
|
readonly sortObjectProperties?: boolean;
|
|
76
94
|
/**
|
|
77
|
-
* If you want to shrink the schema definition names,
|
|
95
|
+
* If you want to shrink the schema definition names,
|
|
96
|
+
* you have to provide a replacement function.
|
|
78
97
|
*
|
|
79
|
-
*
|
|
98
|
+
* @see shrinkDefinitionName
|
|
80
99
|
*/
|
|
81
|
-
readonly shrinkDefinitionNames?: (definitionName: string) => undefined | NonEmptyString;
|
|
100
|
+
readonly shrinkDefinitionNames?: boolean | ((definitionName: string) => undefined | NonEmptyString);
|
|
82
101
|
}
|
|
83
102
|
export interface SchemaForgeMetadata {
|
|
84
103
|
$id: string;
|
|
@@ -92,29 +111,12 @@ export interface SchemaForgeMetadata {
|
|
|
92
111
|
serviceRefs: PRec<string, SchemaForgeDefinitionRef>;
|
|
93
112
|
serviceNames: PRec<SchemaForgeDefinitionRef>;
|
|
94
113
|
}
|
|
95
|
-
export interface
|
|
114
|
+
export interface ForgeSchemaResult {
|
|
96
115
|
schema: SchemaObject;
|
|
97
116
|
refs: readonly SchemaForgeDefinitionRef[];
|
|
98
117
|
generatedTemporaryFiles: readonly string[];
|
|
99
118
|
generatedNamesBySourceFile: ReadonlyMap<string, ReadonlySet<string>>;
|
|
100
119
|
}
|
|
101
|
-
export declare const SchemaNotFoundErrorCode: ErrorCode;
|
|
102
|
-
export type SchemaNotFoundErrorContext = SchemaForgeValidationContextBase & {
|
|
103
|
-
schema: SchemaForgeDefinitionRef;
|
|
104
|
-
};
|
|
105
|
-
export declare const SchemaForgeValidationErrorCode: ErrorCode;
|
|
106
|
-
export type SchemaForgeValidationErrorContext = SchemaForgeValidationErrorContextBase & {
|
|
107
|
-
schema: SchemaForgeDefinitionRef;
|
|
108
|
-
errors: SchemaForgeValidationReport;
|
|
109
|
-
};
|
|
110
|
-
export interface SchemaForgeValidationContextBase {
|
|
111
|
-
errorMessage?: string;
|
|
112
|
-
instancePath?: string;
|
|
113
|
-
}
|
|
114
|
-
export interface SchemaForgeValidationErrorContextBase extends SchemaForgeValidationContextBase {
|
|
115
|
-
schema: SchemaForgeDefinitionRef;
|
|
116
|
-
errors: SchemaForgeValidationReport;
|
|
117
|
-
}
|
|
118
120
|
/**
|
|
119
121
|
* Reference to schema definition
|
|
120
122
|
* @example
|
|
@@ -123,37 +125,6 @@ export interface SchemaForgeValidationErrorContextBase extends SchemaForgeValida
|
|
|
123
125
|
* 'SomeSchemaId#/definitions/MyType'
|
|
124
126
|
*/
|
|
125
127
|
export type SchemaForgeDefinitionRef = '' | `${string}#/definitions/${string}`;
|
|
126
|
-
export declare enum SchemaDefinitionKind {
|
|
127
|
-
Type = 0,
|
|
128
|
-
API = 1,
|
|
129
|
-
APIMethodResult = 2,
|
|
130
|
-
APIMethodArguments = 3
|
|
131
|
-
}
|
|
132
|
-
interface SDIBase {
|
|
133
|
-
name: string;
|
|
134
|
-
schemaId: string;
|
|
135
|
-
ref: SchemaForgeDefinitionRef;
|
|
136
|
-
kind: SchemaDefinitionKind;
|
|
137
|
-
}
|
|
138
|
-
export interface SDIType extends SDIBase {
|
|
139
|
-
kind: SchemaDefinitionKind.Type;
|
|
140
|
-
type: string;
|
|
141
|
-
}
|
|
142
|
-
export interface SDIAPIInterface extends SDIBase {
|
|
143
|
-
kind: SchemaDefinitionKind.API;
|
|
144
|
-
interface: string;
|
|
145
|
-
}
|
|
146
|
-
export interface SDIMethodArguments extends SDIBase {
|
|
147
|
-
kind: SchemaDefinitionKind.APIMethodArguments;
|
|
148
|
-
interface: string;
|
|
149
|
-
method: string;
|
|
150
|
-
}
|
|
151
|
-
export interface SDIMethodResult extends SDIBase {
|
|
152
|
-
kind: SchemaDefinitionKind.APIMethodResult;
|
|
153
|
-
interface: string;
|
|
154
|
-
method: string;
|
|
155
|
-
}
|
|
156
|
-
export type SchemaDefinitionInfo = SDIType | SDIAPIInterface | SDIMethodArguments | SDIMethodResult;
|
|
157
128
|
export interface SchemaForgeValidationResult {
|
|
158
129
|
valid: boolean;
|
|
159
130
|
errors: Nullable<SchemaForgeValidationReport>;
|
|
@@ -161,4 +132,7 @@ export interface SchemaForgeValidationResult {
|
|
|
161
132
|
}
|
|
162
133
|
export type SchemaForgeValidationFunction<T = unknown> = ValidateFunction<T>;
|
|
163
134
|
export type SchemaForgeValidationReport = ErrorObject[];
|
|
135
|
+
type TypeExposeKind = Config['expose'];
|
|
136
|
+
type DiscriminatorType = Config['discriminatorType'];
|
|
164
137
|
export {};
|
|
138
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"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"}
|
package/lib/types.js
CHANGED
|
@@ -1,17 +1,2 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SchemaDefinitionKind = exports.SchemaForgeValidationErrorCode = exports.SchemaNotFoundErrorCode = exports.SchemaForgeSignatureSuffix = void 0;
|
|
4
|
-
var SchemaForgeSignatureSuffix;
|
|
5
|
-
(function (SchemaForgeSignatureSuffix) {
|
|
6
|
-
SchemaForgeSignatureSuffix[SchemaForgeSignatureSuffix["MethodArguments"] = 0] = "MethodArguments";
|
|
7
|
-
SchemaForgeSignatureSuffix[SchemaForgeSignatureSuffix["MethodResult"] = 1] = "MethodResult";
|
|
8
|
-
})(SchemaForgeSignatureSuffix || (exports.SchemaForgeSignatureSuffix = SchemaForgeSignatureSuffix = {}));
|
|
9
|
-
exports.SchemaNotFoundErrorCode = 'EC_SCHEMA_NOT_FOUND';
|
|
10
|
-
exports.SchemaForgeValidationErrorCode = 'EC_SCHEMA_VALIDATION_FAILED';
|
|
11
|
-
var SchemaDefinitionKind;
|
|
12
|
-
(function (SchemaDefinitionKind) {
|
|
13
|
-
SchemaDefinitionKind[SchemaDefinitionKind["Type"] = 0] = "Type";
|
|
14
|
-
SchemaDefinitionKind[SchemaDefinitionKind["API"] = 1] = "API";
|
|
15
|
-
SchemaDefinitionKind[SchemaDefinitionKind["APIMethodResult"] = 2] = "APIMethodResult";
|
|
16
|
-
SchemaDefinitionKind[SchemaDefinitionKind["APIMethodArguments"] = 3] = "APIMethodArguments";
|
|
17
|
-
})(SchemaDefinitionKind || (exports.SchemaDefinitionKind = SchemaDefinitionKind = {}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsofist/schema-forge",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.10.0-next.1",
|
|
4
4
|
"description": "Generate JSON schema from TypeScript types",
|
|
5
5
|
"author": "Andrew Berdnikov <tsofistgudmen@gmail.com>",
|
|
6
6
|
"license": "LGPL-3.0",
|
|
@@ -20,10 +20,12 @@
|
|
|
20
20
|
"test:watch": "jest --watch"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@
|
|
24
|
-
"@
|
|
23
|
+
"@dbml/core": "~3.13.5",
|
|
24
|
+
"@faker-js/faker": "^9.8.0",
|
|
25
|
+
"@tsofist/stem": "^5.1.0",
|
|
25
26
|
"ajv": "^8.17.1",
|
|
26
27
|
"ajv-formats": "^3.0.1",
|
|
28
|
+
"json-schema": "^0.4.0",
|
|
27
29
|
"json-schema-faker": "^0.5.9",
|
|
28
30
|
"jsonpath-plus": "^10.3.0",
|
|
29
31
|
"ts-json-schema-generator": "~2.3.0",
|
|
@@ -32,12 +34,12 @@
|
|
|
32
34
|
"devDependencies": {
|
|
33
35
|
"@tsofist/web-buddy": "^1.21.0",
|
|
34
36
|
"@types/jest": "^29.5.14",
|
|
35
|
-
"@types/node": "^20.
|
|
37
|
+
"@types/node": "^20.19.0",
|
|
36
38
|
"@types/supertest": "^6.0.3",
|
|
37
39
|
"jest": "~29.7.0",
|
|
38
40
|
"rimraf": "^6.0.1",
|
|
39
|
-
"supertest": "^7.1.
|
|
40
|
-
"ts-jest": "~29.
|
|
41
|
+
"supertest": "^7.1.1",
|
|
42
|
+
"ts-jest": "~29.4.0",
|
|
41
43
|
"typescript": "~5.8.3"
|
|
42
44
|
},
|
|
43
45
|
"publishConfig": {
|
|
@@ -66,6 +68,7 @@
|
|
|
66
68
|
"collectCoverageFrom": [
|
|
67
69
|
"**/*.(t|j)s"
|
|
68
70
|
],
|
|
71
|
+
"prettierPath": null,
|
|
69
72
|
"cacheDirectory": ".jest-cache",
|
|
70
73
|
"coverageDirectory": ".coverage",
|
|
71
74
|
"testEnvironment": "node",
|
package/lib/fake-generator.d.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import * as fakerModule from '@faker-js/faker';
|
|
2
|
-
import { ArrayMay } from '@tsofist/stem';
|
|
3
|
-
import { JSONSchemaFaker, JSONSchemaFakerOptions } from 'json-schema-faker';
|
|
4
|
-
import { SchemaForgeDefinitionRef } from './types';
|
|
5
|
-
import { SchemaForgeValidator } from './validator';
|
|
6
|
-
export type SetupFakerModules = (faker: fakerModule.Faker) => object;
|
|
7
|
-
export type FakerRangeNum = Parameters<fakerModule.HelpersModule['rangeToNumber']>[0];
|
|
8
|
-
export type FakeGeneratorLocaleName = keyof typeof fakerModule.allLocales;
|
|
9
|
-
export interface FakeGeneratorOptions extends JSONSchemaFakerOptions {
|
|
10
|
-
locale?: ArrayMay<FakeGeneratorLocaleName>;
|
|
11
|
-
setupFakerModules?: SetupFakerModules[];
|
|
12
|
-
}
|
|
13
|
-
export interface FakeGeneratorHost {
|
|
14
|
-
readonly validator: SchemaForgeValidator;
|
|
15
|
-
readonly faker: fakerModule.Faker;
|
|
16
|
-
readonly generator: typeof JSONSchemaFaker;
|
|
17
|
-
readonly rebuild: () => this;
|
|
18
|
-
}
|
|
19
|
-
export declare function createFakeGeneratorHost(source: SchemaForgeValidator, options?: FakeGeneratorOptions): FakeGeneratorHost;
|
|
20
|
-
export declare function generateFakeData<T = unknown>(validator: SchemaForgeValidator, source: SchemaForgeDefinitionRef, options?: FakeGeneratorOptions): T;
|
|
21
|
-
export declare function generateFakeData<T = unknown>(host: FakeGeneratorHost, source: SchemaForgeDefinitionRef): T;
|
package/lib/fake-generator.js
DELETED
|
@@ -1,158 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createFakeGeneratorHost = createFakeGeneratorHost;
|
|
4
|
-
exports.generateFakeData = generateFakeData;
|
|
5
|
-
const fakerModule = require("@faker-js/faker");
|
|
6
|
-
const as_array_1 = require("@tsofist/stem/lib/as-array");
|
|
7
|
-
const native_date_1 = require("@tsofist/stem/lib/cldr/date-time/native-date");
|
|
8
|
-
const types_1 = require("@tsofist/stem/lib/cldr/date-time/types");
|
|
9
|
-
const entries_1 = require("@tsofist/stem/lib/object/entries");
|
|
10
|
-
const substr_1 = require("@tsofist/stem/lib/string/substr");
|
|
11
|
-
const json_schema_faker_1 = require("json-schema-faker");
|
|
12
|
-
function createFakeGeneratorHost(source, options = {}) {
|
|
13
|
-
const rebuild = () => {
|
|
14
|
-
const validator = source;
|
|
15
|
-
const faker = new fakerModule.Faker({
|
|
16
|
-
locale: (0, as_array_1.asArray)(options.locale || ['en']).map((name) => fakerModule.allLocales[name]),
|
|
17
|
-
});
|
|
18
|
-
const generator = json_schema_faker_1.JSONSchemaFaker.extend('faker', () => {
|
|
19
|
-
Object.assign(faker, {
|
|
20
|
-
date: proxyFakerDateModule(faker.date),
|
|
21
|
-
});
|
|
22
|
-
for (const item of [
|
|
23
|
-
//
|
|
24
|
-
...EmbeddedModules,
|
|
25
|
-
...(options.setupFakerModules || []),
|
|
26
|
-
]) {
|
|
27
|
-
const modules = item(faker);
|
|
28
|
-
Object.assign(faker, modules);
|
|
29
|
-
}
|
|
30
|
-
return faker;
|
|
31
|
-
});
|
|
32
|
-
generator.option({
|
|
33
|
-
alwaysFakeOptionals: true,
|
|
34
|
-
refDepthMax: 1_000,
|
|
35
|
-
pruneProperties: ['dbEntity', 'dbIndex'],
|
|
36
|
-
...options,
|
|
37
|
-
resolveJsonPath: false,
|
|
38
|
-
});
|
|
39
|
-
return {
|
|
40
|
-
rebuild,
|
|
41
|
-
generator,
|
|
42
|
-
faker,
|
|
43
|
-
validator,
|
|
44
|
-
};
|
|
45
|
-
};
|
|
46
|
-
return rebuild();
|
|
47
|
-
}
|
|
48
|
-
function generateFakeData(validatorOrHost, source, options = {}) {
|
|
49
|
-
const host = 'validator' in validatorOrHost
|
|
50
|
-
? validatorOrHost
|
|
51
|
-
: createFakeGeneratorHost(validatorOrHost, options);
|
|
52
|
-
const { validator, generator } = host;
|
|
53
|
-
const refs = {};
|
|
54
|
-
{
|
|
55
|
-
const rootSchemaId = (0, substr_1.substr)(source, 0, '#');
|
|
56
|
-
for (const def of validator.listDefinitions()) {
|
|
57
|
-
const schema = validator.getSchema(def.ref);
|
|
58
|
-
if (rootSchemaId === def.schemaId) {
|
|
59
|
-
refs[`#/definitions/${def.name}`] = schema;
|
|
60
|
-
}
|
|
61
|
-
else {
|
|
62
|
-
refs[def.ref] = schema;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
const schema = validator.getSchema(source);
|
|
67
|
-
if (schema == null)
|
|
68
|
-
throw new Error(`Schema not found: ${source}`);
|
|
69
|
-
const result = generator.generate(schema, refs);
|
|
70
|
-
cleanJSFQuirksArtefacts(result);
|
|
71
|
-
return result;
|
|
72
|
-
}
|
|
73
|
-
const EmbeddedModules = [
|
|
74
|
-
(faker) => ({
|
|
75
|
-
sf: {
|
|
76
|
-
/** FakerModule: sf.url */
|
|
77
|
-
url(origin = 'https://example.com', paths = { min: 1, max: 5 }, pathWords = { min: 1, max: 3 }) {
|
|
78
|
-
const pathParts = new Array(faker.helpers.rangeToNumber(paths))
|
|
79
|
-
.fill('')
|
|
80
|
-
.map(() => faker.lorem.slug(pathWords));
|
|
81
|
-
return `${origin}/${pathParts.join('/')}`;
|
|
82
|
-
},
|
|
83
|
-
},
|
|
84
|
-
cldr: {
|
|
85
|
-
/** FakerModule: cldr.localDateTime */
|
|
86
|
-
localDateTime() {
|
|
87
|
-
return (0, native_date_1.dateToTypedString)(new Date(), types_1.ISODateTimeType.LocalDateTime, true);
|
|
88
|
-
},
|
|
89
|
-
/** FakerModule: cldr.localDate */
|
|
90
|
-
localDate() {
|
|
91
|
-
return (0, native_date_1.dateToTypedString)(new Date(), types_1.ISODateTimeType.LocalDate);
|
|
92
|
-
},
|
|
93
|
-
/** FakerModule: cldr.localTime */
|
|
94
|
-
localTime() {
|
|
95
|
-
return (0, native_date_1.dateToTypedString)(new Date(), types_1.ISODateTimeType.LocalTime, true);
|
|
96
|
-
},
|
|
97
|
-
/** FakerModule: cldr.zuluDateTime */
|
|
98
|
-
zuluDateTime() {
|
|
99
|
-
return (0, native_date_1.dateToTypedString)(new Date(), types_1.ISODateTimeType.ZuluDateTime);
|
|
100
|
-
},
|
|
101
|
-
/** FakerModule: cldr.zuluDate */
|
|
102
|
-
zuluDate() {
|
|
103
|
-
return (0, native_date_1.dateToTypedString)(new Date(), types_1.ISODateTimeType.ZuluDate);
|
|
104
|
-
},
|
|
105
|
-
/** FakerModule: cldr.zuluTime */
|
|
106
|
-
zuluTime() {
|
|
107
|
-
return (0, native_date_1.dateToTypedString)(new Date(), types_1.ISODateTimeType.ZuluTime);
|
|
108
|
-
},
|
|
109
|
-
},
|
|
110
|
-
}),
|
|
111
|
-
];
|
|
112
|
-
function proxyFakerDateModule(obj) {
|
|
113
|
-
return new Proxy(obj, {
|
|
114
|
-
get(target, prop, receiver) {
|
|
115
|
-
const originalValue = Reflect.get(target, prop, receiver);
|
|
116
|
-
if (typeof originalValue === 'function') {
|
|
117
|
-
return function (...args) {
|
|
118
|
-
const result = originalValue.apply(this, args);
|
|
119
|
-
return result instanceof Date ? result.toISOString() : result;
|
|
120
|
-
};
|
|
121
|
-
}
|
|
122
|
-
return originalValue;
|
|
123
|
-
},
|
|
124
|
-
});
|
|
125
|
-
}
|
|
126
|
-
function cleanJSFQuirksArtefacts(target) {
|
|
127
|
-
const stack = [[target]];
|
|
128
|
-
const hasProblem = (item) => {
|
|
129
|
-
return (typeof item === 'object' &&
|
|
130
|
-
item !== null &&
|
|
131
|
-
('$ref' in item || 'anyOf' in item || 'allOf' in item || 'not' in item));
|
|
132
|
-
};
|
|
133
|
-
while (stack.length > 0) {
|
|
134
|
-
const [current] = stack.pop();
|
|
135
|
-
if (Array.isArray(current)) {
|
|
136
|
-
for (let i = current.length - 1; i >= 0; i--) {
|
|
137
|
-
const element = current[i];
|
|
138
|
-
if (hasProblem(element)) {
|
|
139
|
-
current.splice(i, 1);
|
|
140
|
-
}
|
|
141
|
-
else if (typeof element === 'object' && element !== null) {
|
|
142
|
-
stack.push([element]);
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
else if (current != null && typeof current === 'object') {
|
|
147
|
-
for (const [propKey, propValue] of (0, entries_1.entries)(current)) {
|
|
148
|
-
if (hasProblem(propValue)) {
|
|
149
|
-
delete current[propKey];
|
|
150
|
-
}
|
|
151
|
-
else if (typeof propValue === 'object' && propValue !== null) {
|
|
152
|
-
stack.push([propValue]);
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
return target;
|
|
158
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import '../util/patch.extended-annotations-reader';
|
|
2
|
-
import { SchemaObject } from 'ajv';
|
|
3
|
-
import { CompletedConfig } from 'ts-json-schema-generator';
|
|
4
|
-
import { SchemaForgeOptions } from '../types';
|
|
5
|
-
import { TypeExposeKind } from './types';
|
|
6
|
-
interface Options {
|
|
7
|
-
tsconfig: string;
|
|
8
|
-
sourcesDirectoryPattern: string;
|
|
9
|
-
sourcesTypesGeneratorConfig: CompletedConfig;
|
|
10
|
-
outputSchemaFile: string;
|
|
11
|
-
definitions: string[];
|
|
12
|
-
schemaId?: string;
|
|
13
|
-
expose?: TypeExposeKind;
|
|
14
|
-
openapiCompatible?: boolean;
|
|
15
|
-
sortObjectProperties?: boolean;
|
|
16
|
-
allowUseFallbackDescription?: boolean;
|
|
17
|
-
shrinkDefinitionNames: SchemaForgeOptions['shrinkDefinitionNames'];
|
|
18
|
-
}
|
|
19
|
-
export declare function generateSchemaByDraftTypes(options: Options): Promise<SchemaObject>;
|
|
20
|
-
export {};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { CompletedConfig } from 'ts-json-schema-generator/dist/src/Config';
|
|
2
|
-
import { SchemaForgeBaseOptions } from './types';
|
|
3
|
-
interface Options extends SchemaForgeBaseOptions {
|
|
4
|
-
tsconfig: string;
|
|
5
|
-
sourcesPattern: string[];
|
|
6
|
-
}
|
|
7
|
-
export declare function generateDraftTypeFiles(options: Options): Promise<{
|
|
8
|
-
sourcesTypesGeneratorConfig: CompletedConfig;
|
|
9
|
-
files: string[];
|
|
10
|
-
definitions: string[];
|
|
11
|
-
namesBySourceFile: Map<string, Set<string>>;
|
|
12
|
-
}>;
|
|
13
|
-
export {};
|
package/lib/generator/types.d.ts
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { Config } from 'ts-json-schema-generator';
|
|
2
|
-
export type TypeExposeKind = Config['expose'];
|
|
3
|
-
export declare const TMP_FILES_SUFFIX = ".schema-forge.temporary-generated.tmp";
|
|
4
|
-
export declare const SG_CONFIG_MANDATORY: Config;
|
|
5
|
-
export declare const SG_CONFIG_DEFAULTS: {
|
|
6
|
-
sortProps: true;
|
|
7
|
-
additionalProperties: false;
|
|
8
|
-
expose: "export";
|
|
9
|
-
strictTuples: true;
|
|
10
|
-
extraTags: string[];
|
|
11
|
-
encodeRefs: false;
|
|
12
|
-
markdownDescription: false;
|
|
13
|
-
discriminatorType: undefined;
|
|
14
|
-
functions: "hide";
|
|
15
|
-
};
|
|
16
|
-
export interface SchemaForgeBaseOptions {
|
|
17
|
-
/**
|
|
18
|
-
* Generate schema definitions for public types only
|
|
19
|
-
* This option can help to protect leaked internal types
|
|
20
|
-
* @default true
|
|
21
|
-
*/
|
|
22
|
-
readonly explicitPublic?: boolean;
|
|
23
|
-
/**
|
|
24
|
-
* By default, generator use description jsdoc-tag
|
|
25
|
-
* If this option is true, then generator will use fallback description from type comment
|
|
26
|
-
*/
|
|
27
|
-
readonly allowUseFallbackDescription?: boolean;
|
|
28
|
-
/**
|
|
29
|
-
* Filter for definitions
|
|
30
|
-
* Important: dependencies will not be filtered
|
|
31
|
-
*/
|
|
32
|
-
readonly definitionsFilter?: (name: string) => boolean;
|
|
33
|
-
/**
|
|
34
|
-
* Create shared $ref definitions for all types
|
|
35
|
-
*
|
|
36
|
-
* Or: Do not create shared $ref definitions
|
|
37
|
-
* Or: (default) Create shared $ref definitions only for exported types (not tagged as `@internal`)
|
|
38
|
-
*/
|
|
39
|
-
readonly expose?: TypeExposeKind;
|
|
40
|
-
}
|
package/lib/generator.d.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { SchemaObject } from 'ajv';
|
|
2
|
-
import { SchemaForgeOptions, SchemaForgeResult } from './types';
|
|
3
|
-
export declare function forgeSchema(options: SchemaForgeOptions): Promise<SchemaForgeResult>;
|
|
4
|
-
export declare function loadJSONSchema(files: string[]): Promise<SchemaObject[]>;
|
|
5
|
-
export declare function loadJSONSchemaSync(files: string[]): SchemaObject[];
|
package/lib/generator.spec.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/lib/index.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import '@total-typescript/ts-reset';
|
|
2
|
-
import { SchemaDefinitionInfo, SchemaForgeDefinitionRef, SchemaForgeSignatureSuffix } from './types';
|
|
3
|
-
export declare function buildAPIInterfaceSchemaSignature(interfaceName: string): string;
|
|
4
|
-
export declare function buildAPIInterfaceSchemaSignature(interfaceName: string, memberName: string): string;
|
|
5
|
-
export declare function buildAPIInterfaceSchemaSignature(interfaceName: string, methodName: string, suffix: SchemaForgeSignatureSuffix): string;
|
|
6
|
-
export declare function buildSchemaDefinitionRef(definitionName: string, schemaId: string | undefined): SchemaForgeDefinitionRef;
|
|
7
|
-
export declare function parseSchemaDefinitionInfo(name: string, schemaId: string): SchemaDefinitionInfo;
|
package/lib/index.js
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.buildAPIInterfaceSchemaSignature = buildAPIInterfaceSchemaSignature;
|
|
4
|
-
exports.buildSchemaDefinitionRef = buildSchemaDefinitionRef;
|
|
5
|
-
exports.parseSchemaDefinitionInfo = parseSchemaDefinitionInfo;
|
|
6
|
-
require("@total-typescript/ts-reset");
|
|
7
|
-
const substr_1 = require("@tsofist/stem/lib/string/substr");
|
|
8
|
-
const types_1 = require("./types");
|
|
9
|
-
const N_I = '_InterfaceDeclaration';
|
|
10
|
-
const N_A = '_Args';
|
|
11
|
-
const N_R = '_Result';
|
|
12
|
-
function buildAPIInterfaceSchemaSignature(interfaceName, memberName, suffix) {
|
|
13
|
-
let result = `${interfaceName}${memberName ? `_${memberName}` : N_I}`;
|
|
14
|
-
switch (suffix) {
|
|
15
|
-
case types_1.SchemaForgeSignatureSuffix.MethodArguments:
|
|
16
|
-
result += N_A;
|
|
17
|
-
break;
|
|
18
|
-
case types_1.SchemaForgeSignatureSuffix.MethodResult:
|
|
19
|
-
result += N_R;
|
|
20
|
-
break;
|
|
21
|
-
}
|
|
22
|
-
return result;
|
|
23
|
-
}
|
|
24
|
-
function buildSchemaDefinitionRef(definitionName, schemaId) {
|
|
25
|
-
return `${schemaId || ''}#/definitions/${definitionName}`;
|
|
26
|
-
}
|
|
27
|
-
function parseSchemaDefinitionInfo(name, schemaId) {
|
|
28
|
-
const kind = name.endsWith(N_I)
|
|
29
|
-
? types_1.SchemaDefinitionKind.API
|
|
30
|
-
: name.endsWith(N_A)
|
|
31
|
-
? types_1.SchemaDefinitionKind.APIMethodArguments
|
|
32
|
-
: name.endsWith(N_R)
|
|
33
|
-
? types_1.SchemaDefinitionKind.APIMethodResult
|
|
34
|
-
: types_1.SchemaDefinitionKind.Type;
|
|
35
|
-
const ref = buildSchemaDefinitionRef(name, schemaId);
|
|
36
|
-
switch (kind) {
|
|
37
|
-
case types_1.SchemaDefinitionKind.API:
|
|
38
|
-
return {
|
|
39
|
-
ref,
|
|
40
|
-
kind,
|
|
41
|
-
name,
|
|
42
|
-
schemaId,
|
|
43
|
-
interface: (0, substr_1.substr)(name, 0, N_I),
|
|
44
|
-
};
|
|
45
|
-
case types_1.SchemaDefinitionKind.APIMethodArguments:
|
|
46
|
-
case types_1.SchemaDefinitionKind.APIMethodResult:
|
|
47
|
-
return {
|
|
48
|
-
ref,
|
|
49
|
-
kind,
|
|
50
|
-
name,
|
|
51
|
-
schemaId,
|
|
52
|
-
interface: (0, substr_1.substr)(name, 0, '_'),
|
|
53
|
-
method: (0, substr_1.substr)(name, '_', '_'),
|
|
54
|
-
};
|
|
55
|
-
case types_1.SchemaDefinitionKind.Type:
|
|
56
|
-
return {
|
|
57
|
-
ref,
|
|
58
|
-
kind,
|
|
59
|
-
name,
|
|
60
|
-
schemaId,
|
|
61
|
-
type: name,
|
|
62
|
-
};
|
|
63
|
-
}
|
|
64
|
-
}
|