@skmtc/core 0.0.339 → 0.0.341
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/esm/dsl/GeneratorBase.d.ts +6 -0
- package/esm/dsl/GeneratorBase.d.ts.map +1 -0
- package/esm/dsl/GeneratorBase.js +11 -0
- package/esm/dsl/model/ModelBase.d.ts +21 -0
- package/esm/dsl/model/ModelBase.d.ts.map +1 -0
- package/esm/dsl/model/ModelBase.js +34 -0
- package/esm/dsl/model/toModelConfig.d.ts +47 -0
- package/esm/dsl/model/toModelConfig.d.ts.map +1 -0
- package/esm/dsl/model/toModelConfig.js +92 -0
- package/esm/dsl/operation/toOperationConfig.d.ts +61 -0
- package/esm/dsl/operation/toOperationConfig.d.ts.map +1 -0
- package/esm/dsl/operation/toOperationConfig.js +116 -0
- package/esm/mod.d.ts +11 -7
- package/esm/mod.d.ts.map +1 -1
- package/esm/mod.js +11 -7
- package/package.json +1 -1
- package/script/dsl/GeneratorBase.d.ts +6 -0
- package/script/dsl/GeneratorBase.d.ts.map +1 -0
- package/script/dsl/GeneratorBase.js +15 -0
- package/script/dsl/model/ModelBase.d.ts +21 -0
- package/script/dsl/model/ModelBase.d.ts.map +1 -0
- package/script/dsl/model/ModelBase.js +38 -0
- package/script/dsl/model/toModelConfig.d.ts +47 -0
- package/script/dsl/model/toModelConfig.d.ts.map +1 -0
- package/script/dsl/model/toModelConfig.js +96 -0
- package/script/dsl/operation/toOperationConfig.d.ts +61 -0
- package/script/dsl/operation/toOperationConfig.d.ts.map +1 -0
- package/script/dsl/operation/toOperationConfig.js +120 -0
- package/script/mod.d.ts +11 -7
- package/script/mod.d.ts.map +1 -1
- package/script/mod.js +11 -7
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GeneratorBase.d.ts","sourceRoot":"","sources":["../../src/dsl/GeneratorBase.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAEpE,qBAAa,aAAa;IACxB,OAAO,EAAE,eAAe,CAAA;gBACZ,OAAO,EAAE,eAAe;CAGrC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { GenerateContext, RegisterArgs } from '../../context/GenerateContext.js';
|
|
2
|
+
import type { GeneratedValue } from '../../types/GeneratedValue.js';
|
|
3
|
+
import type { GeneratorKey } from '../../types/GeneratorKeys.js';
|
|
4
|
+
import type { RefName } from '../../types/RefName.js';
|
|
5
|
+
import type { ContentSettings } from '../ContentSettings.js';
|
|
6
|
+
import type { ModelInsertable } from './ModelInsertable.js';
|
|
7
|
+
import { ValueBase } from '../ValueBase.js';
|
|
8
|
+
export type ModelBaseArgs = {
|
|
9
|
+
context: GenerateContext;
|
|
10
|
+
settings: ContentSettings;
|
|
11
|
+
generatorKey: GeneratorKey;
|
|
12
|
+
refName: RefName;
|
|
13
|
+
};
|
|
14
|
+
export declare class ModelBase extends ValueBase {
|
|
15
|
+
settings: ContentSettings;
|
|
16
|
+
refName: RefName;
|
|
17
|
+
constructor({ context, settings, generatorKey, refName }: ModelBaseArgs);
|
|
18
|
+
transform<V extends GeneratedValue>(insertable: ModelInsertable<V>, refName: RefName): void;
|
|
19
|
+
register(args: Partial<RegisterArgs>): void;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=ModelBase.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ModelBase.d.ts","sourceRoot":"","sources":["../../../src/dsl/model/ModelBase.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EACf,YAAY,EACb,MAAM,kCAAkC,CAAA;AACzC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAA;AACnE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAChE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAA;AACrD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAC5D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAE3C,MAAM,MAAM,aAAa,GAAG;IAC1B,OAAO,EAAE,eAAe,CAAA;IACxB,QAAQ,EAAE,eAAe,CAAA;IACzB,YAAY,EAAE,YAAY,CAAA;IAC1B,OAAO,EAAE,OAAO,CAAA;CACjB,CAAA;AAED,qBAAa,SAAU,SAAQ,SAAS;IACtC,QAAQ,EAAE,eAAe,CAAA;IACzB,OAAO,EAAE,OAAO,CAAA;gBACJ,EAAE,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,OAAO,EAAE,EAAE,aAAa;IAOvE,SAAS,CAAC,CAAC,SAAS,cAAc,EAChC,UAAU,EAAE,eAAe,CAAC,CAAC,CAAC,EAC9B,OAAO,EAAE,OAAO;IAUlB,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC,YAAY,CAAC;CAMrC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { ValueBase } from '../ValueBase.js';
|
|
2
|
+
export class ModelBase extends ValueBase {
|
|
3
|
+
constructor({ context, settings, generatorKey, refName }) {
|
|
4
|
+
super({ context, generatorKey });
|
|
5
|
+
Object.defineProperty(this, "settings", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
configurable: true,
|
|
8
|
+
writable: true,
|
|
9
|
+
value: void 0
|
|
10
|
+
});
|
|
11
|
+
Object.defineProperty(this, "refName", {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
configurable: true,
|
|
14
|
+
writable: true,
|
|
15
|
+
value: void 0
|
|
16
|
+
});
|
|
17
|
+
this.refName = refName;
|
|
18
|
+
this.settings = settings;
|
|
19
|
+
}
|
|
20
|
+
transform(insertable, refName) {
|
|
21
|
+
this.context.insert({
|
|
22
|
+
insertable,
|
|
23
|
+
refName,
|
|
24
|
+
generation: 'force',
|
|
25
|
+
destinationPath: this.settings.exportPath
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
register(args) {
|
|
29
|
+
this.context.register({
|
|
30
|
+
...args,
|
|
31
|
+
destinationPath: args.destinationPath ?? this.settings.exportPath
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { GenerateContext } from '../../context/GenerateContext.js';
|
|
2
|
+
import type { RefName } from '../../types/RefName.js';
|
|
3
|
+
import type { ContentSettings } from '../ContentSettings.js';
|
|
4
|
+
import { EntityType } from '../EntityType.js';
|
|
5
|
+
import type { IsModelSelectedArgs, ToModelExportPathArgs, ToModelNameArgs } from './ModelInsertable.js';
|
|
6
|
+
export type ModelInsertableArgs = {
|
|
7
|
+
context: GenerateContext;
|
|
8
|
+
settings: ContentSettings;
|
|
9
|
+
refName: RefName;
|
|
10
|
+
};
|
|
11
|
+
type ToModelConfigArgs = {
|
|
12
|
+
id: string;
|
|
13
|
+
entityType?: EntityType;
|
|
14
|
+
toName: ({ refName, baseSettings }: ToModelNameArgs) => string;
|
|
15
|
+
toExportPath: ({ refName, baseSettings }: ToModelExportPathArgs) => string;
|
|
16
|
+
isSelected?: ({ refName, baseSettings }: IsModelSelectedArgs) => boolean;
|
|
17
|
+
};
|
|
18
|
+
export declare const toModelConfig: ({ id, entityType, toName, toExportPath, isSelected }: ToModelConfigArgs) => {
|
|
19
|
+
ModelInsertable: {
|
|
20
|
+
new (args: ModelInsertableArgs): {
|
|
21
|
+
settings: ContentSettings;
|
|
22
|
+
refName: RefName;
|
|
23
|
+
transform<V extends import("../../mod.js").GeneratedValue>(insertable: import("./ModelInsertable.js").ModelInsertable<V>, refName: RefName): void;
|
|
24
|
+
register(args: Partial<import("../../context/GenerateContext.js").RegisterArgs>): void;
|
|
25
|
+
context: GenerateContext;
|
|
26
|
+
skipped: boolean;
|
|
27
|
+
generatorKey: import("../../types/GeneratorKeys.js").GeneratorKey | undefined;
|
|
28
|
+
};
|
|
29
|
+
id: string;
|
|
30
|
+
type: string;
|
|
31
|
+
entityType: EntityType;
|
|
32
|
+
toName: ({ refName, baseSettings }: ToModelNameArgs) => string;
|
|
33
|
+
toExportPath: ({ refName, baseSettings }: ToModelExportPathArgs) => string;
|
|
34
|
+
isSelected: (({ refName, baseSettings }: IsModelSelectedArgs) => boolean) | undefined;
|
|
35
|
+
pinnable: boolean;
|
|
36
|
+
};
|
|
37
|
+
ModelGenerator: {
|
|
38
|
+
new (context: GenerateContext): {
|
|
39
|
+
context: GenerateContext;
|
|
40
|
+
};
|
|
41
|
+
id: string;
|
|
42
|
+
type: string;
|
|
43
|
+
pinnable: boolean;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
export {};
|
|
47
|
+
//# sourceMappingURL=toModelConfig.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toModelConfig.d.ts","sourceRoot":"","sources":["../../../src/dsl/model/toModelConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAA;AAEvE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAA;AACrD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAE7C,OAAO,KAAK,EACV,mBAAmB,EACnB,qBAAqB,EACrB,eAAe,EAChB,MAAM,sBAAsB,CAAA;AAG7B,MAAM,MAAM,mBAAmB,GAAG;IAChC,OAAO,EAAE,eAAe,CAAA;IACxB,QAAQ,EAAE,eAAe,CAAA;IACzB,OAAO,EAAE,OAAO,CAAA;CACjB,CAAA;AAED,KAAK,iBAAiB,GAAG;IACvB,EAAE,EAAE,MAAM,CAAA;IACV,UAAU,CAAC,EAAE,UAAU,CAAA;IACvB,MAAM,EAAE,CAAC,EAAE,OAAO,EAAE,YAAY,EAAE,EAAE,eAAe,KAAK,MAAM,CAAA;IAC9D,YAAY,EAAE,CAAC,EAAE,OAAO,EAAE,YAAY,EAAE,EAAE,qBAAqB,KAAK,MAAM,CAAA;IAC1E,UAAU,CAAC,EAAE,CAAC,EAAE,OAAO,EAAE,YAAY,EAAE,EAAE,mBAAmB,KAAK,OAAO,CAAA;CACzE,CAAA;AAED,eAAO,MAAM,aAAa,yDAMvB,iBAAiB;;mBAUE,mBAAmB;;;;;;;;;;;;4CArBH,eAAe,KAAK,MAAM;kDACpB,qBAAqB,KAAK,MAAM;iDACjC,mBAAmB,KAAK,OAAO;;;;sBAmCjD,eAAe;;;;;;;CAMvC,CAAA"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
var __setFunctionName = (this && this.__setFunctionName) || function (f, name, prefix) {
|
|
2
|
+
if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";
|
|
3
|
+
return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
|
|
4
|
+
};
|
|
5
|
+
import { toModelGeneratorKey } from '../../types/GeneratorKeys.js';
|
|
6
|
+
import { EntityType } from '../EntityType.js';
|
|
7
|
+
import { GeneratorBase } from '../GeneratorBase.js';
|
|
8
|
+
import { ModelBase } from './ModelBase.js';
|
|
9
|
+
export const toModelConfig = ({ id, entityType, toName, toExportPath, isSelected }) => {
|
|
10
|
+
var _a, _b;
|
|
11
|
+
const ModelInsertable = (_a = class extends ModelBase {
|
|
12
|
+
constructor(args) {
|
|
13
|
+
super({
|
|
14
|
+
...args,
|
|
15
|
+
generatorKey: toModelGeneratorKey({
|
|
16
|
+
generatorId: id,
|
|
17
|
+
refName: args.refName
|
|
18
|
+
})
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
__setFunctionName(_a, "ModelInsertable"),
|
|
23
|
+
Object.defineProperty(_a, "id", {
|
|
24
|
+
enumerable: true,
|
|
25
|
+
configurable: true,
|
|
26
|
+
writable: true,
|
|
27
|
+
value: id
|
|
28
|
+
}),
|
|
29
|
+
Object.defineProperty(_a, "type", {
|
|
30
|
+
enumerable: true,
|
|
31
|
+
configurable: true,
|
|
32
|
+
writable: true,
|
|
33
|
+
value: 'model'
|
|
34
|
+
}),
|
|
35
|
+
Object.defineProperty(_a, "entityType", {
|
|
36
|
+
enumerable: true,
|
|
37
|
+
configurable: true,
|
|
38
|
+
writable: true,
|
|
39
|
+
value: entityType ?? new EntityType('variable')
|
|
40
|
+
}),
|
|
41
|
+
Object.defineProperty(_a, "toName", {
|
|
42
|
+
enumerable: true,
|
|
43
|
+
configurable: true,
|
|
44
|
+
writable: true,
|
|
45
|
+
value: toName
|
|
46
|
+
}),
|
|
47
|
+
Object.defineProperty(_a, "toExportPath", {
|
|
48
|
+
enumerable: true,
|
|
49
|
+
configurable: true,
|
|
50
|
+
writable: true,
|
|
51
|
+
value: toExportPath
|
|
52
|
+
}),
|
|
53
|
+
Object.defineProperty(_a, "isSelected", {
|
|
54
|
+
enumerable: true,
|
|
55
|
+
configurable: true,
|
|
56
|
+
writable: true,
|
|
57
|
+
value: isSelected
|
|
58
|
+
}),
|
|
59
|
+
Object.defineProperty(_a, "pinnable", {
|
|
60
|
+
enumerable: true,
|
|
61
|
+
configurable: true,
|
|
62
|
+
writable: true,
|
|
63
|
+
value: false
|
|
64
|
+
}),
|
|
65
|
+
_a);
|
|
66
|
+
const ModelGenerator = (_b = class extends GeneratorBase {
|
|
67
|
+
constructor(context) {
|
|
68
|
+
super(context);
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
__setFunctionName(_b, "ModelGenerator"),
|
|
72
|
+
Object.defineProperty(_b, "id", {
|
|
73
|
+
enumerable: true,
|
|
74
|
+
configurable: true,
|
|
75
|
+
writable: true,
|
|
76
|
+
value: id
|
|
77
|
+
}),
|
|
78
|
+
Object.defineProperty(_b, "type", {
|
|
79
|
+
enumerable: true,
|
|
80
|
+
configurable: true,
|
|
81
|
+
writable: true,
|
|
82
|
+
value: 'model'
|
|
83
|
+
}),
|
|
84
|
+
Object.defineProperty(_b, "pinnable", {
|
|
85
|
+
enumerable: true,
|
|
86
|
+
configurable: true,
|
|
87
|
+
writable: true,
|
|
88
|
+
value: false
|
|
89
|
+
}),
|
|
90
|
+
_b);
|
|
91
|
+
return { ModelInsertable, ModelGenerator };
|
|
92
|
+
};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { EntityType } from '../EntityType.js';
|
|
2
|
+
import type { GenerateContext } from '../../context/GenerateContext.js';
|
|
3
|
+
import type { OasOperation } from '../../oas/operation/Operation.js';
|
|
4
|
+
import type { ContentSettings } from '../ContentSettings.js';
|
|
5
|
+
import type { ToOperationNameArgs, ToOperationExportPathArgs, IsOperationSelectedArgs } from './OperationInsertable.js';
|
|
6
|
+
export type OperationInsertableArgs = {
|
|
7
|
+
context: GenerateContext;
|
|
8
|
+
settings: ContentSettings;
|
|
9
|
+
operation: OasOperation;
|
|
10
|
+
};
|
|
11
|
+
type ToOperationConfigArgs = {
|
|
12
|
+
id: string;
|
|
13
|
+
entityType?: EntityType;
|
|
14
|
+
toName: ({ operation, baseSettings }: ToOperationNameArgs) => string;
|
|
15
|
+
toExportPath: ({ operation, baseSettings }: ToOperationExportPathArgs) => string;
|
|
16
|
+
isSelected?: ({ operation, baseSettings }: IsOperationSelectedArgs) => boolean;
|
|
17
|
+
isSupported?: (operation: OasOperation) => boolean;
|
|
18
|
+
pinnable?: boolean;
|
|
19
|
+
};
|
|
20
|
+
export declare const toOperationConfig: ({ id, entityType, toName, toExportPath, isSelected, isSupported, pinnable }: ToOperationConfigArgs) => {
|
|
21
|
+
OperationInsertable: {
|
|
22
|
+
new (args: OperationInsertableArgs): {
|
|
23
|
+
settings: ContentSettings;
|
|
24
|
+
operation: OasOperation;
|
|
25
|
+
insert<V extends import("../../mod.js").GeneratedValue>(insertable: import("./OperationInsertable.js").OperationInsertable<V>, operation: OasOperation): {
|
|
26
|
+
settings: ContentSettings;
|
|
27
|
+
definition: import("../Definition.js").Definition<V>;
|
|
28
|
+
};
|
|
29
|
+
createAndRegisterDefinition<Schema extends import("../../mod.js").SchemaType>({ schema, identifier, schemaToValueFn }: {
|
|
30
|
+
schema: Schema;
|
|
31
|
+
identifier: import("../Identifier.js").Identifier;
|
|
32
|
+
schemaToValueFn: import("../../mod.js").SchemaToValueFn;
|
|
33
|
+
}): import("../Definition.js").Definition<import("../../mod.js").TypeSystemOutput<Schema["type"]>>;
|
|
34
|
+
register(args: Partial<import("../../context/GenerateContext.js").RegisterArgs>): void;
|
|
35
|
+
context: GenerateContext;
|
|
36
|
+
skipped: boolean;
|
|
37
|
+
generatorKey: import("../../types/GeneratorKeys.js").GeneratorKey | undefined;
|
|
38
|
+
};
|
|
39
|
+
id: string;
|
|
40
|
+
type: string;
|
|
41
|
+
_class: string;
|
|
42
|
+
entityType: EntityType;
|
|
43
|
+
toName: ({ operation, baseSettings }: ToOperationNameArgs) => string;
|
|
44
|
+
toExportPath: ({ operation, baseSettings }: ToOperationExportPathArgs) => string;
|
|
45
|
+
isSelected: (({ operation, baseSettings }: IsOperationSelectedArgs) => boolean) | undefined;
|
|
46
|
+
isSupported: (operation: OasOperation) => boolean;
|
|
47
|
+
pinnable: boolean;
|
|
48
|
+
};
|
|
49
|
+
OperationGenerator: {
|
|
50
|
+
new (context: GenerateContext): {
|
|
51
|
+
context: GenerateContext;
|
|
52
|
+
};
|
|
53
|
+
id: string;
|
|
54
|
+
type: string;
|
|
55
|
+
_class: string;
|
|
56
|
+
isSupported: (operation: OasOperation) => boolean;
|
|
57
|
+
pinnable: boolean;
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
export {};
|
|
61
|
+
//# sourceMappingURL=toOperationConfig.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toOperationConfig.d.ts","sourceRoot":"","sources":["../../../src/dsl/operation/toOperationConfig.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAE7C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAA;AACvE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAA;AACpE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAC5D,OAAO,KAAK,EACV,mBAAmB,EACnB,yBAAyB,EACzB,uBAAuB,EACxB,MAAM,0BAA0B,CAAA;AAIjC,MAAM,MAAM,uBAAuB,GAAG;IACpC,OAAO,EAAE,eAAe,CAAA;IACxB,QAAQ,EAAE,eAAe,CAAA;IACzB,SAAS,EAAE,YAAY,CAAA;CACxB,CAAA;AAED,KAAK,qBAAqB,GAAG;IAC3B,EAAE,EAAE,MAAM,CAAA;IACV,UAAU,CAAC,EAAE,UAAU,CAAA;IACvB,MAAM,EAAE,CAAC,EAAE,SAAS,EAAE,YAAY,EAAE,EAAE,mBAAmB,KAAK,MAAM,CAAA;IACpE,YAAY,EAAE,CAAC,EACb,SAAS,EACT,YAAY,EACb,EAAE,yBAAyB,KAAK,MAAM,CAAA;IACvC,UAAU,CAAC,EAAE,CAAC,EAAE,SAAS,EAAE,YAAY,EAAE,EAAE,uBAAuB,KAAK,OAAO,CAAA;IAC9E,WAAW,CAAC,EAAE,CAAC,SAAS,EAAE,YAAY,KAAK,OAAO,CAAA;IAClD,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAA;AAED,eAAO,MAAM,iBAAiB,gFAQ3B,qBAAqB;;mBAYF,uBAAuB;;;;;;;;;;;;;;;;;;;;;8CA9BL,mBAAmB,KAAK,MAAM;oDAIjE,yBAAyB,KAAK,MAAM;mDACI,uBAAuB,KAAK,OAAO;iCACpD,YAAY,KAAK,OAAO;;;;sBA0C3B,eAAe;;;;;;iCA1CZ,YAAY,KAAK,OAAO;;;CAgDnD,CAAA"}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
var __setFunctionName = (this && this.__setFunctionName) || function (f, name, prefix) {
|
|
2
|
+
if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";
|
|
3
|
+
return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
|
|
4
|
+
};
|
|
5
|
+
import { EntityType } from '../EntityType.js';
|
|
6
|
+
import { toOperationGeneratorKey } from '../../types/GeneratorKeys.js';
|
|
7
|
+
import { OperationBase } from './OperationBase.js';
|
|
8
|
+
import { GeneratorBase } from '../GeneratorBase.js';
|
|
9
|
+
export const toOperationConfig = ({ id, entityType, toName, toExportPath, isSelected, isSupported, pinnable }) => {
|
|
10
|
+
var _a, _b;
|
|
11
|
+
const OperationInsertable = (_a = class extends OperationBase {
|
|
12
|
+
constructor(args) {
|
|
13
|
+
super({
|
|
14
|
+
...args,
|
|
15
|
+
generatorKey: toOperationGeneratorKey({
|
|
16
|
+
generatorId: id,
|
|
17
|
+
operation: args.operation
|
|
18
|
+
})
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
__setFunctionName(_a, "OperationInsertable"),
|
|
23
|
+
Object.defineProperty(_a, "id", {
|
|
24
|
+
enumerable: true,
|
|
25
|
+
configurable: true,
|
|
26
|
+
writable: true,
|
|
27
|
+
value: id
|
|
28
|
+
}),
|
|
29
|
+
Object.defineProperty(_a, "type", {
|
|
30
|
+
enumerable: true,
|
|
31
|
+
configurable: true,
|
|
32
|
+
writable: true,
|
|
33
|
+
value: 'operation'
|
|
34
|
+
}),
|
|
35
|
+
Object.defineProperty(_a, "_class", {
|
|
36
|
+
enumerable: true,
|
|
37
|
+
configurable: true,
|
|
38
|
+
writable: true,
|
|
39
|
+
value: 'OperationInsertable'
|
|
40
|
+
}),
|
|
41
|
+
Object.defineProperty(_a, "entityType", {
|
|
42
|
+
enumerable: true,
|
|
43
|
+
configurable: true,
|
|
44
|
+
writable: true,
|
|
45
|
+
value: entityType ?? new EntityType('variable')
|
|
46
|
+
}),
|
|
47
|
+
Object.defineProperty(_a, "toName", {
|
|
48
|
+
enumerable: true,
|
|
49
|
+
configurable: true,
|
|
50
|
+
writable: true,
|
|
51
|
+
value: toName
|
|
52
|
+
}),
|
|
53
|
+
Object.defineProperty(_a, "toExportPath", {
|
|
54
|
+
enumerable: true,
|
|
55
|
+
configurable: true,
|
|
56
|
+
writable: true,
|
|
57
|
+
value: toExportPath
|
|
58
|
+
}),
|
|
59
|
+
Object.defineProperty(_a, "isSelected", {
|
|
60
|
+
enumerable: true,
|
|
61
|
+
configurable: true,
|
|
62
|
+
writable: true,
|
|
63
|
+
value: isSelected
|
|
64
|
+
}),
|
|
65
|
+
Object.defineProperty(_a, "isSupported", {
|
|
66
|
+
enumerable: true,
|
|
67
|
+
configurable: true,
|
|
68
|
+
writable: true,
|
|
69
|
+
value: isSupported ?? (() => true)
|
|
70
|
+
}),
|
|
71
|
+
Object.defineProperty(_a, "pinnable", {
|
|
72
|
+
enumerable: true,
|
|
73
|
+
configurable: true,
|
|
74
|
+
writable: true,
|
|
75
|
+
value: pinnable ?? false
|
|
76
|
+
}),
|
|
77
|
+
_a);
|
|
78
|
+
const OperationGenerator = (_b = class extends GeneratorBase {
|
|
79
|
+
constructor(context) {
|
|
80
|
+
super(context);
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
__setFunctionName(_b, "OperationGenerator"),
|
|
84
|
+
Object.defineProperty(_b, "id", {
|
|
85
|
+
enumerable: true,
|
|
86
|
+
configurable: true,
|
|
87
|
+
writable: true,
|
|
88
|
+
value: id
|
|
89
|
+
}),
|
|
90
|
+
Object.defineProperty(_b, "type", {
|
|
91
|
+
enumerable: true,
|
|
92
|
+
configurable: true,
|
|
93
|
+
writable: true,
|
|
94
|
+
value: 'operation'
|
|
95
|
+
}),
|
|
96
|
+
Object.defineProperty(_b, "_class", {
|
|
97
|
+
enumerable: true,
|
|
98
|
+
configurable: true,
|
|
99
|
+
writable: true,
|
|
100
|
+
value: 'OperationGenerator'
|
|
101
|
+
}),
|
|
102
|
+
Object.defineProperty(_b, "isSupported", {
|
|
103
|
+
enumerable: true,
|
|
104
|
+
configurable: true,
|
|
105
|
+
writable: true,
|
|
106
|
+
value: isSupported ?? (() => true)
|
|
107
|
+
}),
|
|
108
|
+
Object.defineProperty(_b, "pinnable", {
|
|
109
|
+
enumerable: true,
|
|
110
|
+
configurable: true,
|
|
111
|
+
writable: true,
|
|
112
|
+
value: pinnable ?? false
|
|
113
|
+
}),
|
|
114
|
+
_b);
|
|
115
|
+
return { OperationInsertable, OperationGenerator };
|
|
116
|
+
};
|
package/esm/mod.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import "./_dnt.polyfills.js";
|
|
2
2
|
export * from './context/CoreContext.js';
|
|
3
|
-
export * from './context/ParseContext.js';
|
|
4
3
|
export * from './context/GenerateContext.js';
|
|
5
|
-
export * from './
|
|
4
|
+
export * from './context/ParseContext.js';
|
|
6
5
|
export * from './dsl/constants.js';
|
|
7
6
|
export * from './dsl/ContentSettings.js';
|
|
8
7
|
export * from './dsl/ContentSettings.js';
|
|
@@ -11,18 +10,22 @@ export * from './dsl/EntityType.js';
|
|
|
11
10
|
export * from './dsl/GeneratedValueList.js';
|
|
12
11
|
export * from './dsl/Identifier.js';
|
|
13
12
|
export * from './dsl/Import.js';
|
|
14
|
-
export * from './dsl/model/
|
|
13
|
+
export * from './dsl/model/ModelBase.js';
|
|
15
14
|
export * from './dsl/model/ModelDriver.js';
|
|
16
|
-
export * from './dsl/
|
|
15
|
+
export * from './dsl/model/ModelInsertable.js';
|
|
16
|
+
export * from './dsl/model/toModelConfig.js';
|
|
17
|
+
export * from './dsl/operation/OperationBase.js';
|
|
18
|
+
export * from './dsl/operation/OperationBase.js';
|
|
17
19
|
export * from './dsl/operation/OperationDriver.js';
|
|
20
|
+
export * from './dsl/operation/OperationInsertable.js';
|
|
21
|
+
export * from './dsl/operation/toOperationConfig.js';
|
|
18
22
|
export * from './dsl/Stringable.js';
|
|
19
23
|
export * from './dsl/ValueBase.js';
|
|
20
|
-
export * from './transform/transform.js';
|
|
21
24
|
export * from './helpers/isImported.js';
|
|
22
25
|
export * from './helpers/naming.js';
|
|
23
26
|
export * from './helpers/refFns.js';
|
|
24
|
-
export * from './helpers/toResolvedArtifactPath.js';
|
|
25
27
|
export * from './helpers/strings.js';
|
|
28
|
+
export * from './helpers/toResolvedArtifactPath.js';
|
|
26
29
|
export * from './oas/discriminator/Discriminator.js';
|
|
27
30
|
export * from './oas/document/Document.js';
|
|
28
31
|
export * from './oas/integer/Integer.js';
|
|
@@ -36,6 +39,7 @@ export * from './oas/string/String.js';
|
|
|
36
39
|
export * from './oas/tag/Tag.js';
|
|
37
40
|
export * from './oas/void/Void.js';
|
|
38
41
|
export * from './server/createServer.js';
|
|
42
|
+
export * from './transform/transform.js';
|
|
39
43
|
export * from './types/CustomValue.js';
|
|
40
44
|
export * from './types/GeneratedValue.js';
|
|
41
45
|
export * from './types/GeneratorKeys.js';
|
|
@@ -46,10 +50,10 @@ export * from './types/RefName.js';
|
|
|
46
50
|
export * from './types/Settings.js';
|
|
47
51
|
export * from './types/Settings.js';
|
|
48
52
|
export * from './types/TypeSystem.js';
|
|
49
|
-
export * from './typescript/List.js';
|
|
50
53
|
export * from './typescript/FunctionParameter.js';
|
|
51
54
|
export * from './typescript/identifiers.js';
|
|
52
55
|
export * from './typescript/keyValues.js';
|
|
56
|
+
export * from './typescript/List.js';
|
|
53
57
|
export * from './typescript/PathParams.js';
|
|
54
58
|
export * from './typescript/ReactRouterPathParams.js';
|
|
55
59
|
export * from './typescript/toPathTemplate.js';
|
package/esm/mod.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../src/mod.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,CAAC;AAC7B,cAAc,0BAA0B,CAAA;AACxC,cAAc,
|
|
1
|
+
{"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../src/mod.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,CAAC;AAC7B,cAAc,0BAA0B,CAAA;AACxC,cAAc,8BAA8B,CAAA;AAC5C,cAAc,2BAA2B,CAAA;AACzC,cAAc,oBAAoB,CAAA;AAClC,cAAc,0BAA0B,CAAA;AACxC,cAAc,0BAA0B,CAAA;AACxC,cAAc,qBAAqB,CAAA;AACnC,cAAc,qBAAqB,CAAA;AACnC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,qBAAqB,CAAA;AACnC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,0BAA0B,CAAA;AACxC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,gCAAgC,CAAA;AAC9C,cAAc,8BAA8B,CAAA;AAC5C,cAAc,kCAAkC,CAAA;AAChD,cAAc,kCAAkC,CAAA;AAChD,cAAc,oCAAoC,CAAA;AAClD,cAAc,wCAAwC,CAAA;AACtD,cAAc,sCAAsC,CAAA;AACpD,cAAc,qBAAqB,CAAA;AACnC,cAAc,oBAAoB,CAAA;AAClC,cAAc,yBAAyB,CAAA;AACvC,cAAc,qBAAqB,CAAA;AACnC,cAAc,qBAAqB,CAAA;AACnC,cAAc,sBAAsB,CAAA;AACpC,cAAc,qCAAqC,CAAA;AACnD,cAAc,sCAAsC,CAAA;AACpD,cAAc,4BAA4B,CAAA;AAC1C,cAAc,0BAA0B,CAAA;AACxC,cAAc,wBAAwB,CAAA;AACtC,cAAc,8BAA8B,CAAA;AAC5C,cAAc,8BAA8B,CAAA;AAC5C,cAAc,kBAAkB,CAAA;AAChC,cAAc,kCAAkC,CAAA;AAChD,cAAc,wBAAwB,CAAA;AACtC,cAAc,wBAAwB,CAAA;AACtC,cAAc,kBAAkB,CAAA;AAChC,cAAc,oBAAoB,CAAA;AAClC,cAAc,0BAA0B,CAAA;AACxC,cAAc,0BAA0B,CAAA;AACxC,cAAc,wBAAwB,CAAA;AACtC,cAAc,2BAA2B,CAAA;AACzC,cAAc,0BAA0B,CAAA;AACxC,cAAc,mBAAmB,CAAA;AACjC,cAAc,sBAAsB,CAAA;AACpC,cAAc,2BAA2B,CAAA;AACzC,cAAc,oBAAoB,CAAA;AAClC,cAAc,qBAAqB,CAAA;AACnC,cAAc,qBAAqB,CAAA;AACnC,cAAc,uBAAuB,CAAA;AACrC,cAAc,mCAAmC,CAAA;AACjD,cAAc,6BAA6B,CAAA;AAC3C,cAAc,2BAA2B,CAAA;AACzC,cAAc,sBAAsB,CAAA;AACpC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,uCAAuC,CAAA;AACrD,cAAc,gCAAgC,CAAA;AAC9C,cAAc,iCAAiC,CAAA"}
|
package/esm/mod.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import "./_dnt.polyfills.js";
|
|
2
2
|
export * from './context/CoreContext.js';
|
|
3
|
-
export * from './context/ParseContext.js';
|
|
4
3
|
export * from './context/GenerateContext.js';
|
|
5
|
-
export * from './
|
|
4
|
+
export * from './context/ParseContext.js';
|
|
6
5
|
export * from './dsl/constants.js';
|
|
7
6
|
export * from './dsl/ContentSettings.js';
|
|
8
7
|
export * from './dsl/ContentSettings.js';
|
|
@@ -11,18 +10,22 @@ export * from './dsl/EntityType.js';
|
|
|
11
10
|
export * from './dsl/GeneratedValueList.js';
|
|
12
11
|
export * from './dsl/Identifier.js';
|
|
13
12
|
export * from './dsl/Import.js';
|
|
14
|
-
export * from './dsl/model/
|
|
13
|
+
export * from './dsl/model/ModelBase.js';
|
|
15
14
|
export * from './dsl/model/ModelDriver.js';
|
|
16
|
-
export * from './dsl/
|
|
15
|
+
export * from './dsl/model/ModelInsertable.js';
|
|
16
|
+
export * from './dsl/model/toModelConfig.js';
|
|
17
|
+
export * from './dsl/operation/OperationBase.js';
|
|
18
|
+
export * from './dsl/operation/OperationBase.js';
|
|
17
19
|
export * from './dsl/operation/OperationDriver.js';
|
|
20
|
+
export * from './dsl/operation/OperationInsertable.js';
|
|
21
|
+
export * from './dsl/operation/toOperationConfig.js';
|
|
18
22
|
export * from './dsl/Stringable.js';
|
|
19
23
|
export * from './dsl/ValueBase.js';
|
|
20
|
-
export * from './transform/transform.js';
|
|
21
24
|
export * from './helpers/isImported.js';
|
|
22
25
|
export * from './helpers/naming.js';
|
|
23
26
|
export * from './helpers/refFns.js';
|
|
24
|
-
export * from './helpers/toResolvedArtifactPath.js';
|
|
25
27
|
export * from './helpers/strings.js';
|
|
28
|
+
export * from './helpers/toResolvedArtifactPath.js';
|
|
26
29
|
export * from './oas/discriminator/Discriminator.js';
|
|
27
30
|
export * from './oas/document/Document.js';
|
|
28
31
|
export * from './oas/integer/Integer.js';
|
|
@@ -36,6 +39,7 @@ export * from './oas/string/String.js';
|
|
|
36
39
|
export * from './oas/tag/Tag.js';
|
|
37
40
|
export * from './oas/void/Void.js';
|
|
38
41
|
export * from './server/createServer.js';
|
|
42
|
+
export * from './transform/transform.js';
|
|
39
43
|
export * from './types/CustomValue.js';
|
|
40
44
|
export * from './types/GeneratedValue.js';
|
|
41
45
|
export * from './types/GeneratorKeys.js';
|
|
@@ -46,10 +50,10 @@ export * from './types/RefName.js';
|
|
|
46
50
|
export * from './types/Settings.js';
|
|
47
51
|
export * from './types/Settings.js';
|
|
48
52
|
export * from './types/TypeSystem.js';
|
|
49
|
-
export * from './typescript/List.js';
|
|
50
53
|
export * from './typescript/FunctionParameter.js';
|
|
51
54
|
export * from './typescript/identifiers.js';
|
|
52
55
|
export * from './typescript/keyValues.js';
|
|
56
|
+
export * from './typescript/List.js';
|
|
53
57
|
export * from './typescript/PathParams.js';
|
|
54
58
|
export * from './typescript/ReactRouterPathParams.js';
|
|
55
59
|
export * from './typescript/toPathTemplate.js';
|
package/package.json
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GeneratorBase.d.ts","sourceRoot":"","sources":["../../src/dsl/GeneratorBase.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAEpE,qBAAa,aAAa;IACxB,OAAO,EAAE,eAAe,CAAA;gBACZ,OAAO,EAAE,eAAe;CAGrC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GeneratorBase = void 0;
|
|
4
|
+
class GeneratorBase {
|
|
5
|
+
constructor(context) {
|
|
6
|
+
Object.defineProperty(this, "context", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
configurable: true,
|
|
9
|
+
writable: true,
|
|
10
|
+
value: void 0
|
|
11
|
+
});
|
|
12
|
+
this.context = context;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
exports.GeneratorBase = GeneratorBase;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { GenerateContext, RegisterArgs } from '../../context/GenerateContext.js';
|
|
2
|
+
import type { GeneratedValue } from '../../types/GeneratedValue.js';
|
|
3
|
+
import type { GeneratorKey } from '../../types/GeneratorKeys.js';
|
|
4
|
+
import type { RefName } from '../../types/RefName.js';
|
|
5
|
+
import type { ContentSettings } from '../ContentSettings.js';
|
|
6
|
+
import type { ModelInsertable } from './ModelInsertable.js';
|
|
7
|
+
import { ValueBase } from '../ValueBase.js';
|
|
8
|
+
export type ModelBaseArgs = {
|
|
9
|
+
context: GenerateContext;
|
|
10
|
+
settings: ContentSettings;
|
|
11
|
+
generatorKey: GeneratorKey;
|
|
12
|
+
refName: RefName;
|
|
13
|
+
};
|
|
14
|
+
export declare class ModelBase extends ValueBase {
|
|
15
|
+
settings: ContentSettings;
|
|
16
|
+
refName: RefName;
|
|
17
|
+
constructor({ context, settings, generatorKey, refName }: ModelBaseArgs);
|
|
18
|
+
transform<V extends GeneratedValue>(insertable: ModelInsertable<V>, refName: RefName): void;
|
|
19
|
+
register(args: Partial<RegisterArgs>): void;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=ModelBase.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ModelBase.d.ts","sourceRoot":"","sources":["../../../src/dsl/model/ModelBase.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EACf,YAAY,EACb,MAAM,kCAAkC,CAAA;AACzC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAA;AACnE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAChE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAA;AACrD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAC5D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAE3C,MAAM,MAAM,aAAa,GAAG;IAC1B,OAAO,EAAE,eAAe,CAAA;IACxB,QAAQ,EAAE,eAAe,CAAA;IACzB,YAAY,EAAE,YAAY,CAAA;IAC1B,OAAO,EAAE,OAAO,CAAA;CACjB,CAAA;AAED,qBAAa,SAAU,SAAQ,SAAS;IACtC,QAAQ,EAAE,eAAe,CAAA;IACzB,OAAO,EAAE,OAAO,CAAA;gBACJ,EAAE,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,OAAO,EAAE,EAAE,aAAa;IAOvE,SAAS,CAAC,CAAC,SAAS,cAAc,EAChC,UAAU,EAAE,eAAe,CAAC,CAAC,CAAC,EAC9B,OAAO,EAAE,OAAO;IAUlB,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC,YAAY,CAAC;CAMrC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ModelBase = void 0;
|
|
4
|
+
const ValueBase_js_1 = require("../ValueBase.js");
|
|
5
|
+
class ModelBase extends ValueBase_js_1.ValueBase {
|
|
6
|
+
constructor({ context, settings, generatorKey, refName }) {
|
|
7
|
+
super({ context, generatorKey });
|
|
8
|
+
Object.defineProperty(this, "settings", {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
configurable: true,
|
|
11
|
+
writable: true,
|
|
12
|
+
value: void 0
|
|
13
|
+
});
|
|
14
|
+
Object.defineProperty(this, "refName", {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
configurable: true,
|
|
17
|
+
writable: true,
|
|
18
|
+
value: void 0
|
|
19
|
+
});
|
|
20
|
+
this.refName = refName;
|
|
21
|
+
this.settings = settings;
|
|
22
|
+
}
|
|
23
|
+
transform(insertable, refName) {
|
|
24
|
+
this.context.insert({
|
|
25
|
+
insertable,
|
|
26
|
+
refName,
|
|
27
|
+
generation: 'force',
|
|
28
|
+
destinationPath: this.settings.exportPath
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
register(args) {
|
|
32
|
+
this.context.register({
|
|
33
|
+
...args,
|
|
34
|
+
destinationPath: args.destinationPath ?? this.settings.exportPath
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
exports.ModelBase = ModelBase;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { GenerateContext } from '../../context/GenerateContext.js';
|
|
2
|
+
import type { RefName } from '../../types/RefName.js';
|
|
3
|
+
import type { ContentSettings } from '../ContentSettings.js';
|
|
4
|
+
import { EntityType } from '../EntityType.js';
|
|
5
|
+
import type { IsModelSelectedArgs, ToModelExportPathArgs, ToModelNameArgs } from './ModelInsertable.js';
|
|
6
|
+
export type ModelInsertableArgs = {
|
|
7
|
+
context: GenerateContext;
|
|
8
|
+
settings: ContentSettings;
|
|
9
|
+
refName: RefName;
|
|
10
|
+
};
|
|
11
|
+
type ToModelConfigArgs = {
|
|
12
|
+
id: string;
|
|
13
|
+
entityType?: EntityType;
|
|
14
|
+
toName: ({ refName, baseSettings }: ToModelNameArgs) => string;
|
|
15
|
+
toExportPath: ({ refName, baseSettings }: ToModelExportPathArgs) => string;
|
|
16
|
+
isSelected?: ({ refName, baseSettings }: IsModelSelectedArgs) => boolean;
|
|
17
|
+
};
|
|
18
|
+
export declare const toModelConfig: ({ id, entityType, toName, toExportPath, isSelected }: ToModelConfigArgs) => {
|
|
19
|
+
ModelInsertable: {
|
|
20
|
+
new (args: ModelInsertableArgs): {
|
|
21
|
+
settings: ContentSettings;
|
|
22
|
+
refName: RefName;
|
|
23
|
+
transform<V extends import("../../mod.js").GeneratedValue>(insertable: import("./ModelInsertable.js").ModelInsertable<V>, refName: RefName): void;
|
|
24
|
+
register(args: Partial<import("../../context/GenerateContext.js").RegisterArgs>): void;
|
|
25
|
+
context: GenerateContext;
|
|
26
|
+
skipped: boolean;
|
|
27
|
+
generatorKey: import("../../types/GeneratorKeys.js").GeneratorKey | undefined;
|
|
28
|
+
};
|
|
29
|
+
id: string;
|
|
30
|
+
type: string;
|
|
31
|
+
entityType: EntityType;
|
|
32
|
+
toName: ({ refName, baseSettings }: ToModelNameArgs) => string;
|
|
33
|
+
toExportPath: ({ refName, baseSettings }: ToModelExportPathArgs) => string;
|
|
34
|
+
isSelected: (({ refName, baseSettings }: IsModelSelectedArgs) => boolean) | undefined;
|
|
35
|
+
pinnable: boolean;
|
|
36
|
+
};
|
|
37
|
+
ModelGenerator: {
|
|
38
|
+
new (context: GenerateContext): {
|
|
39
|
+
context: GenerateContext;
|
|
40
|
+
};
|
|
41
|
+
id: string;
|
|
42
|
+
type: string;
|
|
43
|
+
pinnable: boolean;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
export {};
|
|
47
|
+
//# sourceMappingURL=toModelConfig.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toModelConfig.d.ts","sourceRoot":"","sources":["../../../src/dsl/model/toModelConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAA;AAEvE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAA;AACrD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAE7C,OAAO,KAAK,EACV,mBAAmB,EACnB,qBAAqB,EACrB,eAAe,EAChB,MAAM,sBAAsB,CAAA;AAG7B,MAAM,MAAM,mBAAmB,GAAG;IAChC,OAAO,EAAE,eAAe,CAAA;IACxB,QAAQ,EAAE,eAAe,CAAA;IACzB,OAAO,EAAE,OAAO,CAAA;CACjB,CAAA;AAED,KAAK,iBAAiB,GAAG;IACvB,EAAE,EAAE,MAAM,CAAA;IACV,UAAU,CAAC,EAAE,UAAU,CAAA;IACvB,MAAM,EAAE,CAAC,EAAE,OAAO,EAAE,YAAY,EAAE,EAAE,eAAe,KAAK,MAAM,CAAA;IAC9D,YAAY,EAAE,CAAC,EAAE,OAAO,EAAE,YAAY,EAAE,EAAE,qBAAqB,KAAK,MAAM,CAAA;IAC1E,UAAU,CAAC,EAAE,CAAC,EAAE,OAAO,EAAE,YAAY,EAAE,EAAE,mBAAmB,KAAK,OAAO,CAAA;CACzE,CAAA;AAED,eAAO,MAAM,aAAa,yDAMvB,iBAAiB;;mBAUE,mBAAmB;;;;;;;;;;;;4CArBH,eAAe,KAAK,MAAM;kDACpB,qBAAqB,KAAK,MAAM;iDACjC,mBAAmB,KAAK,OAAO;;;;sBAmCjD,eAAe;;;;;;;CAMvC,CAAA"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __setFunctionName = (this && this.__setFunctionName) || function (f, name, prefix) {
|
|
3
|
+
if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";
|
|
4
|
+
return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
|
|
5
|
+
};
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.toModelConfig = void 0;
|
|
8
|
+
const GeneratorKeys_js_1 = require("../../types/GeneratorKeys.js");
|
|
9
|
+
const EntityType_js_1 = require("../EntityType.js");
|
|
10
|
+
const GeneratorBase_js_1 = require("../GeneratorBase.js");
|
|
11
|
+
const ModelBase_js_1 = require("./ModelBase.js");
|
|
12
|
+
const toModelConfig = ({ id, entityType, toName, toExportPath, isSelected }) => {
|
|
13
|
+
var _a, _b;
|
|
14
|
+
const ModelInsertable = (_a = class extends ModelBase_js_1.ModelBase {
|
|
15
|
+
constructor(args) {
|
|
16
|
+
super({
|
|
17
|
+
...args,
|
|
18
|
+
generatorKey: (0, GeneratorKeys_js_1.toModelGeneratorKey)({
|
|
19
|
+
generatorId: id,
|
|
20
|
+
refName: args.refName
|
|
21
|
+
})
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
__setFunctionName(_a, "ModelInsertable"),
|
|
26
|
+
Object.defineProperty(_a, "id", {
|
|
27
|
+
enumerable: true,
|
|
28
|
+
configurable: true,
|
|
29
|
+
writable: true,
|
|
30
|
+
value: id
|
|
31
|
+
}),
|
|
32
|
+
Object.defineProperty(_a, "type", {
|
|
33
|
+
enumerable: true,
|
|
34
|
+
configurable: true,
|
|
35
|
+
writable: true,
|
|
36
|
+
value: 'model'
|
|
37
|
+
}),
|
|
38
|
+
Object.defineProperty(_a, "entityType", {
|
|
39
|
+
enumerable: true,
|
|
40
|
+
configurable: true,
|
|
41
|
+
writable: true,
|
|
42
|
+
value: entityType ?? new EntityType_js_1.EntityType('variable')
|
|
43
|
+
}),
|
|
44
|
+
Object.defineProperty(_a, "toName", {
|
|
45
|
+
enumerable: true,
|
|
46
|
+
configurable: true,
|
|
47
|
+
writable: true,
|
|
48
|
+
value: toName
|
|
49
|
+
}),
|
|
50
|
+
Object.defineProperty(_a, "toExportPath", {
|
|
51
|
+
enumerable: true,
|
|
52
|
+
configurable: true,
|
|
53
|
+
writable: true,
|
|
54
|
+
value: toExportPath
|
|
55
|
+
}),
|
|
56
|
+
Object.defineProperty(_a, "isSelected", {
|
|
57
|
+
enumerable: true,
|
|
58
|
+
configurable: true,
|
|
59
|
+
writable: true,
|
|
60
|
+
value: isSelected
|
|
61
|
+
}),
|
|
62
|
+
Object.defineProperty(_a, "pinnable", {
|
|
63
|
+
enumerable: true,
|
|
64
|
+
configurable: true,
|
|
65
|
+
writable: true,
|
|
66
|
+
value: false
|
|
67
|
+
}),
|
|
68
|
+
_a);
|
|
69
|
+
const ModelGenerator = (_b = class extends GeneratorBase_js_1.GeneratorBase {
|
|
70
|
+
constructor(context) {
|
|
71
|
+
super(context);
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
__setFunctionName(_b, "ModelGenerator"),
|
|
75
|
+
Object.defineProperty(_b, "id", {
|
|
76
|
+
enumerable: true,
|
|
77
|
+
configurable: true,
|
|
78
|
+
writable: true,
|
|
79
|
+
value: id
|
|
80
|
+
}),
|
|
81
|
+
Object.defineProperty(_b, "type", {
|
|
82
|
+
enumerable: true,
|
|
83
|
+
configurable: true,
|
|
84
|
+
writable: true,
|
|
85
|
+
value: 'model'
|
|
86
|
+
}),
|
|
87
|
+
Object.defineProperty(_b, "pinnable", {
|
|
88
|
+
enumerable: true,
|
|
89
|
+
configurable: true,
|
|
90
|
+
writable: true,
|
|
91
|
+
value: false
|
|
92
|
+
}),
|
|
93
|
+
_b);
|
|
94
|
+
return { ModelInsertable, ModelGenerator };
|
|
95
|
+
};
|
|
96
|
+
exports.toModelConfig = toModelConfig;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { EntityType } from '../EntityType.js';
|
|
2
|
+
import type { GenerateContext } from '../../context/GenerateContext.js';
|
|
3
|
+
import type { OasOperation } from '../../oas/operation/Operation.js';
|
|
4
|
+
import type { ContentSettings } from '../ContentSettings.js';
|
|
5
|
+
import type { ToOperationNameArgs, ToOperationExportPathArgs, IsOperationSelectedArgs } from './OperationInsertable.js';
|
|
6
|
+
export type OperationInsertableArgs = {
|
|
7
|
+
context: GenerateContext;
|
|
8
|
+
settings: ContentSettings;
|
|
9
|
+
operation: OasOperation;
|
|
10
|
+
};
|
|
11
|
+
type ToOperationConfigArgs = {
|
|
12
|
+
id: string;
|
|
13
|
+
entityType?: EntityType;
|
|
14
|
+
toName: ({ operation, baseSettings }: ToOperationNameArgs) => string;
|
|
15
|
+
toExportPath: ({ operation, baseSettings }: ToOperationExportPathArgs) => string;
|
|
16
|
+
isSelected?: ({ operation, baseSettings }: IsOperationSelectedArgs) => boolean;
|
|
17
|
+
isSupported?: (operation: OasOperation) => boolean;
|
|
18
|
+
pinnable?: boolean;
|
|
19
|
+
};
|
|
20
|
+
export declare const toOperationConfig: ({ id, entityType, toName, toExportPath, isSelected, isSupported, pinnable }: ToOperationConfigArgs) => {
|
|
21
|
+
OperationInsertable: {
|
|
22
|
+
new (args: OperationInsertableArgs): {
|
|
23
|
+
settings: ContentSettings;
|
|
24
|
+
operation: OasOperation;
|
|
25
|
+
insert<V extends import("../../mod.js").GeneratedValue>(insertable: import("./OperationInsertable.js").OperationInsertable<V>, operation: OasOperation): {
|
|
26
|
+
settings: ContentSettings;
|
|
27
|
+
definition: import("../Definition.js").Definition<V>;
|
|
28
|
+
};
|
|
29
|
+
createAndRegisterDefinition<Schema extends import("../../mod.js").SchemaType>({ schema, identifier, schemaToValueFn }: {
|
|
30
|
+
schema: Schema;
|
|
31
|
+
identifier: import("../Identifier.js").Identifier;
|
|
32
|
+
schemaToValueFn: import("../../mod.js").SchemaToValueFn;
|
|
33
|
+
}): import("../Definition.js").Definition<import("../../mod.js").TypeSystemOutput<Schema["type"]>>;
|
|
34
|
+
register(args: Partial<import("../../context/GenerateContext.js").RegisterArgs>): void;
|
|
35
|
+
context: GenerateContext;
|
|
36
|
+
skipped: boolean;
|
|
37
|
+
generatorKey: import("../../types/GeneratorKeys.js").GeneratorKey | undefined;
|
|
38
|
+
};
|
|
39
|
+
id: string;
|
|
40
|
+
type: string;
|
|
41
|
+
_class: string;
|
|
42
|
+
entityType: EntityType;
|
|
43
|
+
toName: ({ operation, baseSettings }: ToOperationNameArgs) => string;
|
|
44
|
+
toExportPath: ({ operation, baseSettings }: ToOperationExportPathArgs) => string;
|
|
45
|
+
isSelected: (({ operation, baseSettings }: IsOperationSelectedArgs) => boolean) | undefined;
|
|
46
|
+
isSupported: (operation: OasOperation) => boolean;
|
|
47
|
+
pinnable: boolean;
|
|
48
|
+
};
|
|
49
|
+
OperationGenerator: {
|
|
50
|
+
new (context: GenerateContext): {
|
|
51
|
+
context: GenerateContext;
|
|
52
|
+
};
|
|
53
|
+
id: string;
|
|
54
|
+
type: string;
|
|
55
|
+
_class: string;
|
|
56
|
+
isSupported: (operation: OasOperation) => boolean;
|
|
57
|
+
pinnable: boolean;
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
export {};
|
|
61
|
+
//# sourceMappingURL=toOperationConfig.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toOperationConfig.d.ts","sourceRoot":"","sources":["../../../src/dsl/operation/toOperationConfig.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAE7C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAA;AACvE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAA;AACpE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAC5D,OAAO,KAAK,EACV,mBAAmB,EACnB,yBAAyB,EACzB,uBAAuB,EACxB,MAAM,0BAA0B,CAAA;AAIjC,MAAM,MAAM,uBAAuB,GAAG;IACpC,OAAO,EAAE,eAAe,CAAA;IACxB,QAAQ,EAAE,eAAe,CAAA;IACzB,SAAS,EAAE,YAAY,CAAA;CACxB,CAAA;AAED,KAAK,qBAAqB,GAAG;IAC3B,EAAE,EAAE,MAAM,CAAA;IACV,UAAU,CAAC,EAAE,UAAU,CAAA;IACvB,MAAM,EAAE,CAAC,EAAE,SAAS,EAAE,YAAY,EAAE,EAAE,mBAAmB,KAAK,MAAM,CAAA;IACpE,YAAY,EAAE,CAAC,EACb,SAAS,EACT,YAAY,EACb,EAAE,yBAAyB,KAAK,MAAM,CAAA;IACvC,UAAU,CAAC,EAAE,CAAC,EAAE,SAAS,EAAE,YAAY,EAAE,EAAE,uBAAuB,KAAK,OAAO,CAAA;IAC9E,WAAW,CAAC,EAAE,CAAC,SAAS,EAAE,YAAY,KAAK,OAAO,CAAA;IAClD,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAA;AAED,eAAO,MAAM,iBAAiB,gFAQ3B,qBAAqB;;mBAYF,uBAAuB;;;;;;;;;;;;;;;;;;;;;8CA9BL,mBAAmB,KAAK,MAAM;oDAIjE,yBAAyB,KAAK,MAAM;mDACI,uBAAuB,KAAK,OAAO;iCACpD,YAAY,KAAK,OAAO;;;;sBA0C3B,eAAe;;;;;;iCA1CZ,YAAY,KAAK,OAAO;;;CAgDnD,CAAA"}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __setFunctionName = (this && this.__setFunctionName) || function (f, name, prefix) {
|
|
3
|
+
if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";
|
|
4
|
+
return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
|
|
5
|
+
};
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.toOperationConfig = void 0;
|
|
8
|
+
const EntityType_js_1 = require("../EntityType.js");
|
|
9
|
+
const GeneratorKeys_js_1 = require("../../types/GeneratorKeys.js");
|
|
10
|
+
const OperationBase_js_1 = require("./OperationBase.js");
|
|
11
|
+
const GeneratorBase_js_1 = require("../GeneratorBase.js");
|
|
12
|
+
const toOperationConfig = ({ id, entityType, toName, toExportPath, isSelected, isSupported, pinnable }) => {
|
|
13
|
+
var _a, _b;
|
|
14
|
+
const OperationInsertable = (_a = class extends OperationBase_js_1.OperationBase {
|
|
15
|
+
constructor(args) {
|
|
16
|
+
super({
|
|
17
|
+
...args,
|
|
18
|
+
generatorKey: (0, GeneratorKeys_js_1.toOperationGeneratorKey)({
|
|
19
|
+
generatorId: id,
|
|
20
|
+
operation: args.operation
|
|
21
|
+
})
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
__setFunctionName(_a, "OperationInsertable"),
|
|
26
|
+
Object.defineProperty(_a, "id", {
|
|
27
|
+
enumerable: true,
|
|
28
|
+
configurable: true,
|
|
29
|
+
writable: true,
|
|
30
|
+
value: id
|
|
31
|
+
}),
|
|
32
|
+
Object.defineProperty(_a, "type", {
|
|
33
|
+
enumerable: true,
|
|
34
|
+
configurable: true,
|
|
35
|
+
writable: true,
|
|
36
|
+
value: 'operation'
|
|
37
|
+
}),
|
|
38
|
+
Object.defineProperty(_a, "_class", {
|
|
39
|
+
enumerable: true,
|
|
40
|
+
configurable: true,
|
|
41
|
+
writable: true,
|
|
42
|
+
value: 'OperationInsertable'
|
|
43
|
+
}),
|
|
44
|
+
Object.defineProperty(_a, "entityType", {
|
|
45
|
+
enumerable: true,
|
|
46
|
+
configurable: true,
|
|
47
|
+
writable: true,
|
|
48
|
+
value: entityType ?? new EntityType_js_1.EntityType('variable')
|
|
49
|
+
}),
|
|
50
|
+
Object.defineProperty(_a, "toName", {
|
|
51
|
+
enumerable: true,
|
|
52
|
+
configurable: true,
|
|
53
|
+
writable: true,
|
|
54
|
+
value: toName
|
|
55
|
+
}),
|
|
56
|
+
Object.defineProperty(_a, "toExportPath", {
|
|
57
|
+
enumerable: true,
|
|
58
|
+
configurable: true,
|
|
59
|
+
writable: true,
|
|
60
|
+
value: toExportPath
|
|
61
|
+
}),
|
|
62
|
+
Object.defineProperty(_a, "isSelected", {
|
|
63
|
+
enumerable: true,
|
|
64
|
+
configurable: true,
|
|
65
|
+
writable: true,
|
|
66
|
+
value: isSelected
|
|
67
|
+
}),
|
|
68
|
+
Object.defineProperty(_a, "isSupported", {
|
|
69
|
+
enumerable: true,
|
|
70
|
+
configurable: true,
|
|
71
|
+
writable: true,
|
|
72
|
+
value: isSupported ?? (() => true)
|
|
73
|
+
}),
|
|
74
|
+
Object.defineProperty(_a, "pinnable", {
|
|
75
|
+
enumerable: true,
|
|
76
|
+
configurable: true,
|
|
77
|
+
writable: true,
|
|
78
|
+
value: pinnable ?? false
|
|
79
|
+
}),
|
|
80
|
+
_a);
|
|
81
|
+
const OperationGenerator = (_b = class extends GeneratorBase_js_1.GeneratorBase {
|
|
82
|
+
constructor(context) {
|
|
83
|
+
super(context);
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
__setFunctionName(_b, "OperationGenerator"),
|
|
87
|
+
Object.defineProperty(_b, "id", {
|
|
88
|
+
enumerable: true,
|
|
89
|
+
configurable: true,
|
|
90
|
+
writable: true,
|
|
91
|
+
value: id
|
|
92
|
+
}),
|
|
93
|
+
Object.defineProperty(_b, "type", {
|
|
94
|
+
enumerable: true,
|
|
95
|
+
configurable: true,
|
|
96
|
+
writable: true,
|
|
97
|
+
value: 'operation'
|
|
98
|
+
}),
|
|
99
|
+
Object.defineProperty(_b, "_class", {
|
|
100
|
+
enumerable: true,
|
|
101
|
+
configurable: true,
|
|
102
|
+
writable: true,
|
|
103
|
+
value: 'OperationGenerator'
|
|
104
|
+
}),
|
|
105
|
+
Object.defineProperty(_b, "isSupported", {
|
|
106
|
+
enumerable: true,
|
|
107
|
+
configurable: true,
|
|
108
|
+
writable: true,
|
|
109
|
+
value: isSupported ?? (() => true)
|
|
110
|
+
}),
|
|
111
|
+
Object.defineProperty(_b, "pinnable", {
|
|
112
|
+
enumerable: true,
|
|
113
|
+
configurable: true,
|
|
114
|
+
writable: true,
|
|
115
|
+
value: pinnable ?? false
|
|
116
|
+
}),
|
|
117
|
+
_b);
|
|
118
|
+
return { OperationInsertable, OperationGenerator };
|
|
119
|
+
};
|
|
120
|
+
exports.toOperationConfig = toOperationConfig;
|
package/script/mod.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import "./_dnt.polyfills.js";
|
|
2
2
|
export * from './context/CoreContext.js';
|
|
3
|
-
export * from './context/ParseContext.js';
|
|
4
3
|
export * from './context/GenerateContext.js';
|
|
5
|
-
export * from './
|
|
4
|
+
export * from './context/ParseContext.js';
|
|
6
5
|
export * from './dsl/constants.js';
|
|
7
6
|
export * from './dsl/ContentSettings.js';
|
|
8
7
|
export * from './dsl/ContentSettings.js';
|
|
@@ -11,18 +10,22 @@ export * from './dsl/EntityType.js';
|
|
|
11
10
|
export * from './dsl/GeneratedValueList.js';
|
|
12
11
|
export * from './dsl/Identifier.js';
|
|
13
12
|
export * from './dsl/Import.js';
|
|
14
|
-
export * from './dsl/model/
|
|
13
|
+
export * from './dsl/model/ModelBase.js';
|
|
15
14
|
export * from './dsl/model/ModelDriver.js';
|
|
16
|
-
export * from './dsl/
|
|
15
|
+
export * from './dsl/model/ModelInsertable.js';
|
|
16
|
+
export * from './dsl/model/toModelConfig.js';
|
|
17
|
+
export * from './dsl/operation/OperationBase.js';
|
|
18
|
+
export * from './dsl/operation/OperationBase.js';
|
|
17
19
|
export * from './dsl/operation/OperationDriver.js';
|
|
20
|
+
export * from './dsl/operation/OperationInsertable.js';
|
|
21
|
+
export * from './dsl/operation/toOperationConfig.js';
|
|
18
22
|
export * from './dsl/Stringable.js';
|
|
19
23
|
export * from './dsl/ValueBase.js';
|
|
20
|
-
export * from './transform/transform.js';
|
|
21
24
|
export * from './helpers/isImported.js';
|
|
22
25
|
export * from './helpers/naming.js';
|
|
23
26
|
export * from './helpers/refFns.js';
|
|
24
|
-
export * from './helpers/toResolvedArtifactPath.js';
|
|
25
27
|
export * from './helpers/strings.js';
|
|
28
|
+
export * from './helpers/toResolvedArtifactPath.js';
|
|
26
29
|
export * from './oas/discriminator/Discriminator.js';
|
|
27
30
|
export * from './oas/document/Document.js';
|
|
28
31
|
export * from './oas/integer/Integer.js';
|
|
@@ -36,6 +39,7 @@ export * from './oas/string/String.js';
|
|
|
36
39
|
export * from './oas/tag/Tag.js';
|
|
37
40
|
export * from './oas/void/Void.js';
|
|
38
41
|
export * from './server/createServer.js';
|
|
42
|
+
export * from './transform/transform.js';
|
|
39
43
|
export * from './types/CustomValue.js';
|
|
40
44
|
export * from './types/GeneratedValue.js';
|
|
41
45
|
export * from './types/GeneratorKeys.js';
|
|
@@ -46,10 +50,10 @@ export * from './types/RefName.js';
|
|
|
46
50
|
export * from './types/Settings.js';
|
|
47
51
|
export * from './types/Settings.js';
|
|
48
52
|
export * from './types/TypeSystem.js';
|
|
49
|
-
export * from './typescript/List.js';
|
|
50
53
|
export * from './typescript/FunctionParameter.js';
|
|
51
54
|
export * from './typescript/identifiers.js';
|
|
52
55
|
export * from './typescript/keyValues.js';
|
|
56
|
+
export * from './typescript/List.js';
|
|
53
57
|
export * from './typescript/PathParams.js';
|
|
54
58
|
export * from './typescript/ReactRouterPathParams.js';
|
|
55
59
|
export * from './typescript/toPathTemplate.js';
|
package/script/mod.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../src/mod.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,CAAC;AAC7B,cAAc,0BAA0B,CAAA;AACxC,cAAc,
|
|
1
|
+
{"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../src/mod.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,CAAC;AAC7B,cAAc,0BAA0B,CAAA;AACxC,cAAc,8BAA8B,CAAA;AAC5C,cAAc,2BAA2B,CAAA;AACzC,cAAc,oBAAoB,CAAA;AAClC,cAAc,0BAA0B,CAAA;AACxC,cAAc,0BAA0B,CAAA;AACxC,cAAc,qBAAqB,CAAA;AACnC,cAAc,qBAAqB,CAAA;AACnC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,qBAAqB,CAAA;AACnC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,0BAA0B,CAAA;AACxC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,gCAAgC,CAAA;AAC9C,cAAc,8BAA8B,CAAA;AAC5C,cAAc,kCAAkC,CAAA;AAChD,cAAc,kCAAkC,CAAA;AAChD,cAAc,oCAAoC,CAAA;AAClD,cAAc,wCAAwC,CAAA;AACtD,cAAc,sCAAsC,CAAA;AACpD,cAAc,qBAAqB,CAAA;AACnC,cAAc,oBAAoB,CAAA;AAClC,cAAc,yBAAyB,CAAA;AACvC,cAAc,qBAAqB,CAAA;AACnC,cAAc,qBAAqB,CAAA;AACnC,cAAc,sBAAsB,CAAA;AACpC,cAAc,qCAAqC,CAAA;AACnD,cAAc,sCAAsC,CAAA;AACpD,cAAc,4BAA4B,CAAA;AAC1C,cAAc,0BAA0B,CAAA;AACxC,cAAc,wBAAwB,CAAA;AACtC,cAAc,8BAA8B,CAAA;AAC5C,cAAc,8BAA8B,CAAA;AAC5C,cAAc,kBAAkB,CAAA;AAChC,cAAc,kCAAkC,CAAA;AAChD,cAAc,wBAAwB,CAAA;AACtC,cAAc,wBAAwB,CAAA;AACtC,cAAc,kBAAkB,CAAA;AAChC,cAAc,oBAAoB,CAAA;AAClC,cAAc,0BAA0B,CAAA;AACxC,cAAc,0BAA0B,CAAA;AACxC,cAAc,wBAAwB,CAAA;AACtC,cAAc,2BAA2B,CAAA;AACzC,cAAc,0BAA0B,CAAA;AACxC,cAAc,mBAAmB,CAAA;AACjC,cAAc,sBAAsB,CAAA;AACpC,cAAc,2BAA2B,CAAA;AACzC,cAAc,oBAAoB,CAAA;AAClC,cAAc,qBAAqB,CAAA;AACnC,cAAc,qBAAqB,CAAA;AACnC,cAAc,uBAAuB,CAAA;AACrC,cAAc,mCAAmC,CAAA;AACjD,cAAc,6BAA6B,CAAA;AAC3C,cAAc,2BAA2B,CAAA;AACzC,cAAc,sBAAsB,CAAA;AACpC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,uCAAuC,CAAA;AACrD,cAAc,gCAAgC,CAAA;AAC9C,cAAc,iCAAiC,CAAA"}
|
package/script/mod.js
CHANGED
|
@@ -16,9 +16,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
require("./_dnt.polyfills.js");
|
|
18
18
|
__exportStar(require("./context/CoreContext.js"), exports);
|
|
19
|
-
__exportStar(require("./context/ParseContext.js"), exports);
|
|
20
19
|
__exportStar(require("./context/GenerateContext.js"), exports);
|
|
21
|
-
__exportStar(require("./
|
|
20
|
+
__exportStar(require("./context/ParseContext.js"), exports);
|
|
22
21
|
__exportStar(require("./dsl/constants.js"), exports);
|
|
23
22
|
__exportStar(require("./dsl/ContentSettings.js"), exports);
|
|
24
23
|
__exportStar(require("./dsl/ContentSettings.js"), exports);
|
|
@@ -27,18 +26,22 @@ __exportStar(require("./dsl/EntityType.js"), exports);
|
|
|
27
26
|
__exportStar(require("./dsl/GeneratedValueList.js"), exports);
|
|
28
27
|
__exportStar(require("./dsl/Identifier.js"), exports);
|
|
29
28
|
__exportStar(require("./dsl/Import.js"), exports);
|
|
30
|
-
__exportStar(require("./dsl/model/
|
|
29
|
+
__exportStar(require("./dsl/model/ModelBase.js"), exports);
|
|
31
30
|
__exportStar(require("./dsl/model/ModelDriver.js"), exports);
|
|
32
|
-
__exportStar(require("./dsl/
|
|
31
|
+
__exportStar(require("./dsl/model/ModelInsertable.js"), exports);
|
|
32
|
+
__exportStar(require("./dsl/model/toModelConfig.js"), exports);
|
|
33
|
+
__exportStar(require("./dsl/operation/OperationBase.js"), exports);
|
|
34
|
+
__exportStar(require("./dsl/operation/OperationBase.js"), exports);
|
|
33
35
|
__exportStar(require("./dsl/operation/OperationDriver.js"), exports);
|
|
36
|
+
__exportStar(require("./dsl/operation/OperationInsertable.js"), exports);
|
|
37
|
+
__exportStar(require("./dsl/operation/toOperationConfig.js"), exports);
|
|
34
38
|
__exportStar(require("./dsl/Stringable.js"), exports);
|
|
35
39
|
__exportStar(require("./dsl/ValueBase.js"), exports);
|
|
36
|
-
__exportStar(require("./transform/transform.js"), exports);
|
|
37
40
|
__exportStar(require("./helpers/isImported.js"), exports);
|
|
38
41
|
__exportStar(require("./helpers/naming.js"), exports);
|
|
39
42
|
__exportStar(require("./helpers/refFns.js"), exports);
|
|
40
|
-
__exportStar(require("./helpers/toResolvedArtifactPath.js"), exports);
|
|
41
43
|
__exportStar(require("./helpers/strings.js"), exports);
|
|
44
|
+
__exportStar(require("./helpers/toResolvedArtifactPath.js"), exports);
|
|
42
45
|
__exportStar(require("./oas/discriminator/Discriminator.js"), exports);
|
|
43
46
|
__exportStar(require("./oas/document/Document.js"), exports);
|
|
44
47
|
__exportStar(require("./oas/integer/Integer.js"), exports);
|
|
@@ -52,6 +55,7 @@ __exportStar(require("./oas/string/String.js"), exports);
|
|
|
52
55
|
__exportStar(require("./oas/tag/Tag.js"), exports);
|
|
53
56
|
__exportStar(require("./oas/void/Void.js"), exports);
|
|
54
57
|
__exportStar(require("./server/createServer.js"), exports);
|
|
58
|
+
__exportStar(require("./transform/transform.js"), exports);
|
|
55
59
|
__exportStar(require("./types/CustomValue.js"), exports);
|
|
56
60
|
__exportStar(require("./types/GeneratedValue.js"), exports);
|
|
57
61
|
__exportStar(require("./types/GeneratorKeys.js"), exports);
|
|
@@ -62,10 +66,10 @@ __exportStar(require("./types/RefName.js"), exports);
|
|
|
62
66
|
__exportStar(require("./types/Settings.js"), exports);
|
|
63
67
|
__exportStar(require("./types/Settings.js"), exports);
|
|
64
68
|
__exportStar(require("./types/TypeSystem.js"), exports);
|
|
65
|
-
__exportStar(require("./typescript/List.js"), exports);
|
|
66
69
|
__exportStar(require("./typescript/FunctionParameter.js"), exports);
|
|
67
70
|
__exportStar(require("./typescript/identifiers.js"), exports);
|
|
68
71
|
__exportStar(require("./typescript/keyValues.js"), exports);
|
|
72
|
+
__exportStar(require("./typescript/List.js"), exports);
|
|
69
73
|
__exportStar(require("./typescript/PathParams.js"), exports);
|
|
70
74
|
__exportStar(require("./typescript/ReactRouterPathParams.js"), exports);
|
|
71
75
|
__exportStar(require("./typescript/toPathTemplate.js"), exports);
|