@skmtc/core 0.0.421 → 0.0.423
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/context/GenerateContext.d.ts +2 -2
- package/esm/context/GenerateContext.js +8 -8
- package/esm/dsl/model/ModelInsertable.d.ts +0 -5
- package/esm/dsl/model/ModelInsertable.d.ts.map +1 -1
- package/esm/dsl/model/toModelInsertable.d.ts +1 -3
- package/esm/dsl/model/toModelInsertable.d.ts.map +1 -1
- package/esm/dsl/model/toModelInsertable.js +0 -6
- package/esm/dsl/operation/OperationInsertable.d.ts +0 -11
- package/esm/dsl/operation/OperationInsertable.d.ts.map +1 -1
- package/esm/dsl/operation/toOperationGateway.d.ts +0 -5
- package/esm/dsl/operation/toOperationGateway.d.ts.map +1 -1
- package/esm/dsl/operation/toOperationGateway.js +0 -12
- package/esm/dsl/operation/toOperationInsertable.d.ts +1 -3
- package/esm/dsl/operation/toOperationInsertable.d.ts.map +1 -1
- package/esm/dsl/operation/toOperationInsertable.js +0 -6
- package/esm/oas/schema/toSchemasV3.d.ts.map +1 -1
- package/esm/oas/schema/toSchemasV3.js +10 -12
- package/package.json +1 -1
- package/script/context/GenerateContext.d.ts +2 -2
- package/script/context/GenerateContext.js +8 -8
- package/script/dsl/model/ModelInsertable.d.ts +0 -5
- package/script/dsl/model/ModelInsertable.d.ts.map +1 -1
- package/script/dsl/model/toModelInsertable.d.ts +1 -3
- package/script/dsl/model/toModelInsertable.d.ts.map +1 -1
- package/script/dsl/model/toModelInsertable.js +0 -6
- package/script/dsl/operation/OperationInsertable.d.ts +0 -11
- package/script/dsl/operation/OperationInsertable.d.ts.map +1 -1
- package/script/dsl/operation/toOperationGateway.d.ts +0 -5
- package/script/dsl/operation/toOperationGateway.d.ts.map +1 -1
- package/script/dsl/operation/toOperationGateway.js +0 -12
- package/script/dsl/operation/toOperationInsertable.d.ts +1 -3
- package/script/dsl/operation/toOperationInsertable.d.ts.map +1 -1
- package/script/dsl/operation/toOperationInsertable.js +0 -6
- package/script/oas/schema/toSchemasV3.d.ts.map +1 -1
- package/script/oas/schema/toSchemasV3.js +10 -12
|
@@ -174,7 +174,7 @@ export declare class GenerateContext {
|
|
|
174
174
|
* operation.
|
|
175
175
|
*
|
|
176
176
|
* Content settings are produced by passing base settings and operation
|
|
177
|
-
* through toIdentifier
|
|
177
|
+
* through toIdentifier and toExportPath static methods on the
|
|
178
178
|
* insertable.
|
|
179
179
|
* @param { operation, insertable }
|
|
180
180
|
* @returns
|
|
@@ -184,7 +184,7 @@ export declare class GenerateContext {
|
|
|
184
184
|
* Generate and return content settings for model insertable and refName.
|
|
185
185
|
*
|
|
186
186
|
* Content settings are produced by passing base settings and refName
|
|
187
|
-
* through toIdentifier
|
|
187
|
+
* through toIdentifier and toExportPath static methods on the
|
|
188
188
|
* insertable.
|
|
189
189
|
* @param { refName, insertable }
|
|
190
190
|
* @returns Content settings for model
|
|
@@ -266,7 +266,7 @@ export class GenerateContext {
|
|
|
266
266
|
* operation.
|
|
267
267
|
*
|
|
268
268
|
* Content settings are produced by passing base settings and operation
|
|
269
|
-
* through toIdentifier
|
|
269
|
+
* through toIdentifier and toExportPath static methods on the
|
|
270
270
|
* insertable.
|
|
271
271
|
* @param { operation, insertable }
|
|
272
272
|
* @returns
|
|
@@ -281,7 +281,7 @@ export class GenerateContext {
|
|
|
281
281
|
const exportPath = __classPrivateFieldGet(this, _GenerateContext_instances, "m", _GenerateContext_setExportPath).call(this, { generatedExportPath, baseSettings });
|
|
282
282
|
return new ContentSettings({
|
|
283
283
|
identifier: insertable.toIdentifier({ operation, baseSettings }),
|
|
284
|
-
selected:
|
|
284
|
+
selected: baseSettings.selected,
|
|
285
285
|
exportPath,
|
|
286
286
|
importFrom: baseSettings.importFrom ?? exportPath,
|
|
287
287
|
parentExportPath: baseSettings.parentExportPath
|
|
@@ -291,7 +291,7 @@ export class GenerateContext {
|
|
|
291
291
|
* Generate and return content settings for model insertable and refName.
|
|
292
292
|
*
|
|
293
293
|
* Content settings are produced by passing base settings and refName
|
|
294
|
-
* through toIdentifier
|
|
294
|
+
* through toIdentifier and toExportPath static methods on the
|
|
295
295
|
* insertable.
|
|
296
296
|
* @param { refName, insertable }
|
|
297
297
|
* @returns Content settings for model
|
|
@@ -305,7 +305,7 @@ export class GenerateContext {
|
|
|
305
305
|
const exportPath = __classPrivateFieldGet(this, _GenerateContext_instances, "m", _GenerateContext_setExportPath).call(this, { generatedExportPath, baseSettings });
|
|
306
306
|
return new ContentSettings({
|
|
307
307
|
identifier: insertable.toIdentifier({ refName, baseSettings }),
|
|
308
|
-
selected:
|
|
308
|
+
selected: baseSettings.selected,
|
|
309
309
|
exportPath,
|
|
310
310
|
importFrom: baseSettings.importFrom ?? exportPath,
|
|
311
311
|
parentExportPath: baseSettings.parentExportPath
|
|
@@ -324,7 +324,7 @@ export class GenerateContext {
|
|
|
324
324
|
const exportPath = gateway.toExportPath(baseSettings);
|
|
325
325
|
return new ContentSettings({
|
|
326
326
|
identifier: gateway.toIdentifier(baseSettings),
|
|
327
|
-
selected:
|
|
327
|
+
selected: baseSettings.selected,
|
|
328
328
|
exportPath,
|
|
329
329
|
importFrom: baseSettings.importFrom ?? exportPath,
|
|
330
330
|
parentExportPath: baseSettings.parentExportPath
|
|
@@ -379,7 +379,7 @@ _GenerateContext_files = new WeakMap(), _GenerateContext_stackTrail = new WeakMa
|
|
|
379
379
|
path,
|
|
380
380
|
method
|
|
381
381
|
});
|
|
382
|
-
if (!
|
|
382
|
+
if (!baseSettings.selected) {
|
|
383
383
|
return this.captureCurrentResult('notSelected');
|
|
384
384
|
}
|
|
385
385
|
gatewayInstance.transformOperation(operation);
|
|
@@ -411,7 +411,7 @@ _GenerateContext_files = new WeakMap(), _GenerateContext_stackTrail = new WeakMa
|
|
|
411
411
|
path,
|
|
412
412
|
method
|
|
413
413
|
});
|
|
414
|
-
if (!
|
|
414
|
+
if (!baseSettings.selected) {
|
|
415
415
|
return this.captureCurrentResult('notSelected');
|
|
416
416
|
}
|
|
417
417
|
this.insertOperation({ insertable: generator, operation });
|
|
@@ -431,7 +431,7 @@ _GenerateContext_files = new WeakMap(), _GenerateContext_stackTrail = new WeakMa
|
|
|
431
431
|
generatorId: generator.id,
|
|
432
432
|
refName
|
|
433
433
|
});
|
|
434
|
-
if (!
|
|
434
|
+
if (!baseSettings.selected) {
|
|
435
435
|
return this.captureCurrentResult('notSelected');
|
|
436
436
|
}
|
|
437
437
|
this.insertModel({ insertable: generator, refName });
|
|
@@ -17,10 +17,6 @@ export type ToModelExportPathArgs = {
|
|
|
17
17
|
refName: RefName;
|
|
18
18
|
baseSettings: BaseSettings;
|
|
19
19
|
};
|
|
20
|
-
export type IsModelSelectedArgs = {
|
|
21
|
-
refName: RefName;
|
|
22
|
-
baseSettings: BaseSettings;
|
|
23
|
-
};
|
|
24
20
|
export type WithTransformModel = {
|
|
25
21
|
transformModel: (refName: RefName) => void;
|
|
26
22
|
};
|
|
@@ -33,7 +29,6 @@ export type ModelInsertable<V> = {
|
|
|
33
29
|
_class: 'ModelInsertable';
|
|
34
30
|
toIdentifier: ({ refName, baseSettings }: ToModelIdentifierArgs) => Identifier;
|
|
35
31
|
toExportPath: ({ refName, baseSettings }: ToModelExportPathArgs) => string;
|
|
36
|
-
isSelected: ({ refName, baseSettings }: IsModelSelectedArgs) => boolean;
|
|
37
32
|
isSupported: () => boolean;
|
|
38
33
|
pinnable: boolean;
|
|
39
34
|
} & Function;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModelInsertable.d.ts","sourceRoot":"","sources":["../../../src/dsl/model/ModelInsertable.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAA;AACvE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAC5D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAA;AAC3D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,w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,GAAG;IAC/B,cAAc,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAA;CAC3C,CAAA;AAED,MAAM,MAAM,eAAe,CAAC,CAAC,IAAI;IAAE,SAAS,EAAE,CAAC,CAAA;CAAE,GAAG;IAClD,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,EAAE,8BAA8B,GAAG,CAAC,CAAA;IACxF,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,OAAO,CAAA;IACb,MAAM,EAAE,iBAAiB,CAAA;IAEzB,YAAY,EAAE,CAAC,EAAE,OAAO,EAAE,YAAY,EAAE,EAAE,qBAAqB,KAAK,UAAU,CAAA;IAC9E,YAAY,EAAE,CAAC,EAAE,OAAO,EAAE,YAAY,EAAE,EAAE,qBAAqB,KAAK,MAAM,CAAA;IAE1E,WAAW,EAAE,MAAM,OAAO,CAAA;IAE1B,QAAQ,EAAE,OAAO,CAAA;CAGlB,GAAG,QAAQ,CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { GenerateContext } from '../../context/GenerateContext.js';
|
|
2
2
|
import type { RefName } from '../../types/RefName.js';
|
|
3
3
|
import type { ContentSettings } from '../ContentSettings.js';
|
|
4
|
-
import type {
|
|
4
|
+
import type { ToModelExportPathArgs, ToModelIdentifierArgs } from './ModelInsertable.js';
|
|
5
5
|
import type { Identifier } from '../Identifier.js';
|
|
6
6
|
export type ModelInsertableArgs = {
|
|
7
7
|
context: GenerateContext;
|
|
@@ -12,7 +12,6 @@ export type ModelConfig = {
|
|
|
12
12
|
id: string;
|
|
13
13
|
toIdentifier: ({ refName, baseSettings }: ToModelIdentifierArgs) => Identifier;
|
|
14
14
|
toExportPath: ({ refName, baseSettings }: ToModelExportPathArgs) => string;
|
|
15
|
-
isSelected?: ({ refName, baseSettings }: IsModelSelectedArgs) => boolean;
|
|
16
15
|
};
|
|
17
16
|
export declare const toModelInsertable: (config: ModelConfig) => {
|
|
18
17
|
new (args: ModelInsertableArgs): {
|
|
@@ -29,7 +28,6 @@ export declare const toModelInsertable: (config: ModelConfig) => {
|
|
|
29
28
|
_class: "ModelInsertable";
|
|
30
29
|
toIdentifier: ({ refName, baseSettings }: ToModelIdentifierArgs) => Identifier;
|
|
31
30
|
toExportPath: ({ refName, baseSettings }: ToModelExportPathArgs) => string;
|
|
32
|
-
isSelected: ({ refName, baseSettings }: IsModelSelectedArgs) => boolean;
|
|
33
31
|
isSupported: () => boolean;
|
|
34
32
|
pinnable: boolean;
|
|
35
33
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toModelInsertable.d.ts","sourceRoot":"","sources":["../../../src/dsl/model/toModelInsertable.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,KAAK,
|
|
1
|
+
{"version":3,"file":"toModelInsertable.d.ts","sourceRoot":"","sources":["../../../src/dsl/model/toModelInsertable.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,KAAK,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAA;AAExF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAElD,MAAM,MAAM,mBAAmB,GAAG;IAChC,OAAO,EAAE,eAAe,CAAA;IACxB,QAAQ,EAAE,eAAe,CAAA;IACzB,OAAO,EAAE,OAAO,CAAA;CACjB,CAAA;AAED,MAAM,MAAM,WAAW,GAAG;IACxB,EAAE,EAAE,MAAM,CAAA;IACV,YAAY,EAAE,CAAC,EAAE,OAAO,EAAE,YAAY,EAAE,EAAE,qBAAqB,KAAK,UAAU,CAAA;IAC9E,YAAY,EAAE,CAAC,EAAE,OAAO,EAAE,YAAY,EAAE,EAAE,qBAAqB,KAAK,MAAM,CAAA;CAC3E,CAAA;AAED,eAAO,MAAM,iBAAiB,WAAY,WAAW;eAa/B,mBAAmB;;;;;;;;;;;;8CAjBG,qBAAqB,KAAK,UAAU;8CACpC,qBAAqB,KAAK,MAAM;;;CA4B3E,CAAA"}
|
|
@@ -48,12 +48,6 @@ export const toModelInsertable = (config) => {
|
|
|
48
48
|
writable: true,
|
|
49
49
|
value: config.toExportPath.bind(config)
|
|
50
50
|
}),
|
|
51
|
-
Object.defineProperty(_a, "isSelected", {
|
|
52
|
-
enumerable: true,
|
|
53
|
-
configurable: true,
|
|
54
|
-
writable: true,
|
|
55
|
-
value: config.isSelected ?? (() => true)
|
|
56
|
-
}),
|
|
57
51
|
Object.defineProperty(_a, "isSupported", {
|
|
58
52
|
enumerable: true,
|
|
59
53
|
configurable: true,
|
|
@@ -16,14 +16,6 @@ export type ToOperationExportPathArgs = {
|
|
|
16
16
|
operation: OasOperation;
|
|
17
17
|
baseSettings: BaseSettings;
|
|
18
18
|
};
|
|
19
|
-
export type IsOperationSelectedArgs = {
|
|
20
|
-
operation: OasOperation;
|
|
21
|
-
baseSettings: BaseSettings;
|
|
22
|
-
};
|
|
23
|
-
export type IsGeneratorSelectedArgs = {
|
|
24
|
-
operation: OasOperation;
|
|
25
|
-
baseSettings: BaseSettings;
|
|
26
|
-
};
|
|
27
19
|
export type WithTransformOperation = {
|
|
28
20
|
transformOperation: (operation: OasOperation) => void;
|
|
29
21
|
};
|
|
@@ -38,8 +30,6 @@ export type OperationGateway = {
|
|
|
38
30
|
_class: 'OperationGateway';
|
|
39
31
|
toIdentifier: (baseSettings: BaseSettings) => Identifier;
|
|
40
32
|
toExportPath: (baseSettings: BaseSettings) => string;
|
|
41
|
-
isGeneratorSelected: (baseSettings: BaseSettings) => boolean;
|
|
42
|
-
isOperationSelected: ({ operation, baseSettings }: IsOperationSelectedArgs) => boolean;
|
|
43
33
|
isSupported: (operation: OasOperation) => boolean;
|
|
44
34
|
pinnable: boolean;
|
|
45
35
|
};
|
|
@@ -52,7 +42,6 @@ export type OperationInsertable<V> = {
|
|
|
52
42
|
_class: 'OperationInsertable';
|
|
53
43
|
toIdentifier: ({ operation, baseSettings }: ToOperationIdentifierArgs) => Identifier;
|
|
54
44
|
toExportPath: ({ operation, baseSettings }: ToOperationExportPathArgs) => string;
|
|
55
|
-
isSelected: ({ operation, baseSettings }: IsOperationSelectedArgs) => boolean;
|
|
56
45
|
isSupported: (operation: OasOperation) => boolean;
|
|
57
46
|
pinnable: boolean;
|
|
58
47
|
} & Function;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OperationInsertable.d.ts","sourceRoot":"","sources":["../../../src/dsl/operation/OperationInsertable.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAA;AACpE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAC5D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAA;AAC3D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAA;AACvE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAElD,KAAK,kCAAkC,GAAG;IACxC,OAAO,EAAE,eAAe,CAAA;IACxB,QAAQ,EAAE,eAAe,CAAA;IACzB,SAAS,EAAE,YAAY,CAAA;CACxB,CAAA;AAED,MAAM,MAAM,yBAAyB,GAAG;IACtC,SAAS,EAAE,YAAY,CAAA;IACvB,YAAY,EAAE,YAAY,CAAA;CAC3B,CAAA;AAED,MAAM,MAAM,yBAAyB,GAAG;IACtC,SAAS,EAAE,YAAY,CAAA;IACvB,YAAY,EAAE,YAAY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AAA;IACxD,YAAY,EAAE,CAAC,YAAY,EAAE,YAAY,KAAK,MAAM,CAAA;IAEpD,WAAW,EAAE,CAAC,SAAS,EAAE,YAAY,KAAK,OAAO,CAAA;IAEjD,QAAQ,EAAE,OAAO,CAAA;CAClB,CAAA;AAED,MAAM,MAAM,mBAAmB,CAAC,CAAC,IAAI;IAAE,SAAS,EAAE,CAAC,CAAA;CAAE,GAAG;IACtD,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,kCAAkC,GAAG,CAAC,CAAA;IAC7E,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,WAAW,CAAA;IACjB,MAAM,EAAE,qBAAqB,CAAA;IAC7B,YAAY,EAAE,CAAC,EAAE,SAAS,EAAE,YAAY,EAAE,EAAE,yBAAyB,KAAK,UAAU,CAAA;IACpF,YAAY,EAAE,CAAC,EAAE,SAAS,EAAE,YAAY,EAAE,EAAE,yBAAyB,KAAK,MAAM,CAAA;IAEhF,WAAW,EAAE,CAAC,SAAS,EAAE,YAAY,KAAK,OAAO,CAAA;IAEjD,QAAQ,EAAE,OAAO,CAAA;CAGlB,GAAG,QAAQ,CAAA"}
|
|
@@ -2,13 +2,10 @@ import type { OasOperation } from '../../oas/operation/Operation.js';
|
|
|
2
2
|
import { type OperationGatewayArgs } from '../GatewayBase.js';
|
|
3
3
|
import type { Identifier } from '../Identifier.js';
|
|
4
4
|
import type { BaseSettings } from '../../types/Settings.js';
|
|
5
|
-
import type { IsOperationSelectedArgs } from './OperationInsertable.js';
|
|
6
5
|
export type ToOperationGatewayArgs = {
|
|
7
6
|
id: string;
|
|
8
7
|
toIdentifier: (baseSettings: BaseSettings) => Identifier;
|
|
9
8
|
toExportPath: (baseSettings: BaseSettings) => string;
|
|
10
|
-
isGeneratorSelected?: (baseSettings: BaseSettings) => boolean;
|
|
11
|
-
isOperationSelected?: ({ operation, baseSettings }: IsOperationSelectedArgs) => boolean;
|
|
12
9
|
isSupported?: (operation: OasOperation) => boolean;
|
|
13
10
|
};
|
|
14
11
|
export declare const toOperationGateway: (config: ToOperationGatewayArgs) => {
|
|
@@ -24,8 +21,6 @@ export declare const toOperationGateway: (config: ToOperationGatewayArgs) => {
|
|
|
24
21
|
_class: "OperationGateway";
|
|
25
22
|
toIdentifier: (baseSettings: BaseSettings) => Identifier;
|
|
26
23
|
toExportPath: (baseSettings: BaseSettings) => string;
|
|
27
|
-
isGeneratorSelected: (baseSettings: BaseSettings) => boolean;
|
|
28
|
-
isOperationSelected: ({ operation, baseSettings }: IsOperationSelectedArgs) => boolean;
|
|
29
24
|
isSupported: (operation: OasOperation) => boolean;
|
|
30
25
|
pinnable: boolean;
|
|
31
26
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toOperationGateway.d.ts","sourceRoot":"","sources":["../../../src/dsl/operation/toOperationGateway.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAA;AACpE,OAAO,EAAe,KAAK,oBAAoB,EAAE,MAAM,mBAAmB,CAAA;AAC1E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAClD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAA;
|
|
1
|
+
{"version":3,"file":"toOperationGateway.d.ts","sourceRoot":"","sources":["../../../src/dsl/operation/toOperationGateway.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAA;AACpE,OAAO,EAAe,KAAK,oBAAoB,EAAE,MAAM,mBAAmB,CAAA;AAC1E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAClD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAA;AAE3D,MAAM,MAAM,sBAAsB,GAAG;IACnC,EAAE,EAAE,MAAM,CAAA;IACV,YAAY,EAAE,CAAC,YAAY,EAAE,YAAY,KAAK,UAAU,CAAA;IACxD,YAAY,EAAE,CAAC,YAAY,EAAE,YAAY,KAAK,MAAM,CAAA;IACpD,WAAW,CAAC,EAAE,CAAC,SAAS,EAAE,YAAY,KAAK,OAAO,CAAA;CACnD,CAAA;AAED,eAAO,MAAM,kBAAkB,WAAY,sBAAsB;gCAa1B,oBAAoB;;;;;;;;;;iCAlB5B,YAAY,KAAK,UAAU;iCAC3B,YAAY,KAAK,MAAM;6BAC1B,YAAY,KAAK,OAAO;;CAsBnD,CAAA"}
|
|
@@ -41,18 +41,6 @@ export const toOperationGateway = (config) => {
|
|
|
41
41
|
writable: true,
|
|
42
42
|
value: config.toExportPath.bind(config)
|
|
43
43
|
}),
|
|
44
|
-
Object.defineProperty(_a, "isGeneratorSelected", {
|
|
45
|
-
enumerable: true,
|
|
46
|
-
configurable: true,
|
|
47
|
-
writable: true,
|
|
48
|
-
value: config.isGeneratorSelected ?? (() => true)
|
|
49
|
-
}),
|
|
50
|
-
Object.defineProperty(_a, "isOperationSelected", {
|
|
51
|
-
enumerable: true,
|
|
52
|
-
configurable: true,
|
|
53
|
-
writable: true,
|
|
54
|
-
value: config.isOperationSelected ?? (() => true)
|
|
55
|
-
}),
|
|
56
44
|
Object.defineProperty(_a, "isSupported", {
|
|
57
45
|
enumerable: true,
|
|
58
46
|
configurable: true,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { GenerateContext } from '../../context/GenerateContext.js';
|
|
2
2
|
import type { OasOperation } from '../../oas/operation/Operation.js';
|
|
3
3
|
import type { ContentSettings } from '../ContentSettings.js';
|
|
4
|
-
import type { ToOperationIdentifierArgs, ToOperationExportPathArgs
|
|
4
|
+
import type { ToOperationIdentifierArgs, ToOperationExportPathArgs } from './OperationInsertable.js';
|
|
5
5
|
import type { Identifier } from '../Identifier.js';
|
|
6
6
|
export type OperationInsertableArgs = {
|
|
7
7
|
context: GenerateContext;
|
|
@@ -12,7 +12,6 @@ export type ToOperationInsertableArgs = {
|
|
|
12
12
|
id: string;
|
|
13
13
|
toIdentifier: ({ operation, baseSettings }: ToOperationIdentifierArgs) => Identifier;
|
|
14
14
|
toExportPath: ({ operation, baseSettings }: ToOperationExportPathArgs) => string;
|
|
15
|
-
isSelected?: ({ operation, baseSettings }: IsOperationSelectedArgs) => boolean;
|
|
16
15
|
isSupported?: (operation: OasOperation) => boolean;
|
|
17
16
|
pinnable?: boolean;
|
|
18
17
|
};
|
|
@@ -37,7 +36,6 @@ export declare const toOperationInsertable: (config: ToOperationInsertableArgs)
|
|
|
37
36
|
_class: "OperationInsertable";
|
|
38
37
|
toIdentifier: ({ operation, baseSettings }: ToOperationIdentifierArgs) => Identifier;
|
|
39
38
|
toExportPath: ({ operation, baseSettings }: ToOperationExportPathArgs) => string;
|
|
40
|
-
isSelected: ({ operation, baseSettings }: IsOperationSelectedArgs) => boolean;
|
|
41
39
|
isSupported: (operation: OasOperation) => boolean;
|
|
42
40
|
pinnable: boolean;
|
|
43
41
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toOperationInsertable.d.ts","sourceRoot":"","sources":["../../../src/dsl/operation/toOperationInsertable.ts"],"names":[],"mappings":"AACA,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,
|
|
1
|
+
{"version":3,"file":"toOperationInsertable.d.ts","sourceRoot":"","sources":["../../../src/dsl/operation/toOperationInsertable.ts"],"names":[],"mappings":"AACA,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,EAAE,yBAAyB,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAA;AAEpG,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAElD,MAAM,MAAM,uBAAuB,GAAG;IACpC,OAAO,EAAE,eAAe,CAAA;IACxB,QAAQ,EAAE,eAAe,CAAA;IACzB,SAAS,EAAE,YAAY,CAAA;CACxB,CAAA;AAED,MAAM,MAAM,yBAAyB,GAAG;IACtC,EAAE,EAAE,MAAM,CAAA;IACV,YAAY,EAAE,CAAC,EAAE,SAAS,EAAE,YAAY,EAAE,EAAE,yBAAyB,KAAK,UAAU,CAAA;IACpF,YAAY,EAAE,CAAC,EAAE,SAAS,EAAE,YAAY,EAAE,EAAE,yBAAyB,KAAK,MAAM,CAAA;IAChF,WAAW,CAAC,EAAE,CAAC,SAAS,EAAE,YAAY,KAAK,OAAO,CAAA;IAClD,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAA;AAED,eAAO,MAAM,qBAAqB,WAAY,yBAAyB;eAajD,uBAAuB;;;;;;;;;;;;;;;;;;gDAnBC,yBAAyB,KAAK,UAAU;gDACxC,yBAAyB,KAAK,MAAM;6BACtD,YAAY,KAAK,OAAO;;CA6BnD,CAAA"}
|
|
@@ -48,12 +48,6 @@ export const toOperationInsertable = (config) => {
|
|
|
48
48
|
writable: true,
|
|
49
49
|
value: config.toExportPath.bind(config)
|
|
50
50
|
}),
|
|
51
|
-
Object.defineProperty(_a, "isSelected", {
|
|
52
|
-
enumerable: true,
|
|
53
|
-
configurable: true,
|
|
54
|
-
writable: true,
|
|
55
|
-
value: config.isSelected ?? (() => true)
|
|
56
|
-
}),
|
|
57
51
|
Object.defineProperty(_a, "isSupported", {
|
|
58
52
|
enumerable: true,
|
|
59
53
|
configurable: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toSchemasV3.d.ts","sourceRoot":"","sources":["../../../src/oas/schema/toSchemasV3.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,C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F,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,mBAAmB,yBAG7B,uBAAuB,KAAG,MAAM,CAAC,MAAM,EAAE,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC,GAAG,SAM3E,CAAA;AAED,KAAK,cAAc,GAAG;IACpB,MAAM,EAAE,SAAS,CAAC,eAAe,GAAG,SAAS,CAAC,YAAY,CAAA;IAC1D,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,UAAU,wBAAyB,cAAc,KAAG,SAAS,GAAG,MAAM,CAAC,QAAQ,CAuC3F,CAAA;AAED,KAAK,sBAAsB,GAAG;IAC5B,MAAM,EAAE,SAAS,CAAC,eAAe,GAAG,SAAS,CAAC,YAAY,GAAG,SAAS,CAAA;IACtE,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,kBAAkB,wBAG5B,sBAAsB,KAAG,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC,GAAG,SAM1D,CAAA"}
|
|
@@ -26,28 +26,26 @@ export const toSchemaV3 = ({ schema, context }) => {
|
|
|
26
26
|
return toRefV31({ ref: schema, refType: 'schema', context });
|
|
27
27
|
}
|
|
28
28
|
// Workaround for dodgy Reapit schema
|
|
29
|
-
if (schema.type !== 'array' &&
|
|
30
|
-
'optional' in schema &&
|
|
31
|
-
schema.optional === true) {
|
|
29
|
+
if (schema.type !== 'array' && 'optional' in schema && schema.optional === true) {
|
|
32
30
|
schema.nullable = true;
|
|
33
31
|
}
|
|
34
32
|
return match(schema)
|
|
35
33
|
.with({ oneOf: P.array() }, ({ oneOf: members, ...value }) => {
|
|
36
|
-
if (members.length === 1) {
|
|
37
|
-
|
|
38
|
-
}
|
|
34
|
+
// if (members.length === 1) {
|
|
35
|
+
// return toSchemaV3({ schema: members[0], context })
|
|
36
|
+
// }
|
|
39
37
|
return toUnion({ value, members, context });
|
|
40
38
|
})
|
|
41
39
|
.with({ anyOf: P.array() }, ({ anyOf: members, ...value }) => {
|
|
42
|
-
if (members.length === 1) {
|
|
43
|
-
|
|
44
|
-
}
|
|
40
|
+
// if (members.length === 1) {
|
|
41
|
+
// return toSchemaV3({ schema: members[0], context })
|
|
42
|
+
// }
|
|
45
43
|
return context.trace('anyOf', () => toUnion({ value, members, context }));
|
|
46
44
|
})
|
|
47
45
|
.with({ allOf: P.array() }, ({ allOf: members, ...value }) => {
|
|
48
|
-
if (members.length === 1) {
|
|
49
|
-
|
|
50
|
-
}
|
|
46
|
+
// if (members.length === 1) {
|
|
47
|
+
// return toSchemaV3({ schema: members[0], context })
|
|
48
|
+
// }
|
|
51
49
|
return context.trace('allOf', () => toIntersection({ value, members, context }));
|
|
52
50
|
})
|
|
53
51
|
.with({ type: 'object' }, value => toObject({ value, context }))
|
package/package.json
CHANGED
|
@@ -174,7 +174,7 @@ export declare class GenerateContext {
|
|
|
174
174
|
* operation.
|
|
175
175
|
*
|
|
176
176
|
* Content settings are produced by passing base settings and operation
|
|
177
|
-
* through toIdentifier
|
|
177
|
+
* through toIdentifier and toExportPath static methods on the
|
|
178
178
|
* insertable.
|
|
179
179
|
* @param { operation, insertable }
|
|
180
180
|
* @returns
|
|
@@ -184,7 +184,7 @@ export declare class GenerateContext {
|
|
|
184
184
|
* Generate and return content settings for model insertable and refName.
|
|
185
185
|
*
|
|
186
186
|
* Content settings are produced by passing base settings and refName
|
|
187
|
-
* through toIdentifier
|
|
187
|
+
* through toIdentifier and toExportPath static methods on the
|
|
188
188
|
* insertable.
|
|
189
189
|
* @param { refName, insertable }
|
|
190
190
|
* @returns Content settings for model
|
|
@@ -295,7 +295,7 @@ class GenerateContext {
|
|
|
295
295
|
* operation.
|
|
296
296
|
*
|
|
297
297
|
* Content settings are produced by passing base settings and operation
|
|
298
|
-
* through toIdentifier
|
|
298
|
+
* through toIdentifier and toExportPath static methods on the
|
|
299
299
|
* insertable.
|
|
300
300
|
* @param { operation, insertable }
|
|
301
301
|
* @returns
|
|
@@ -310,7 +310,7 @@ class GenerateContext {
|
|
|
310
310
|
const exportPath = __classPrivateFieldGet(this, _GenerateContext_instances, "m", _GenerateContext_setExportPath).call(this, { generatedExportPath, baseSettings });
|
|
311
311
|
return new ContentSettings_js_1.ContentSettings({
|
|
312
312
|
identifier: insertable.toIdentifier({ operation, baseSettings }),
|
|
313
|
-
selected:
|
|
313
|
+
selected: baseSettings.selected,
|
|
314
314
|
exportPath,
|
|
315
315
|
importFrom: baseSettings.importFrom ?? exportPath,
|
|
316
316
|
parentExportPath: baseSettings.parentExportPath
|
|
@@ -320,7 +320,7 @@ class GenerateContext {
|
|
|
320
320
|
* Generate and return content settings for model insertable and refName.
|
|
321
321
|
*
|
|
322
322
|
* Content settings are produced by passing base settings and refName
|
|
323
|
-
* through toIdentifier
|
|
323
|
+
* through toIdentifier and toExportPath static methods on the
|
|
324
324
|
* insertable.
|
|
325
325
|
* @param { refName, insertable }
|
|
326
326
|
* @returns Content settings for model
|
|
@@ -334,7 +334,7 @@ class GenerateContext {
|
|
|
334
334
|
const exportPath = __classPrivateFieldGet(this, _GenerateContext_instances, "m", _GenerateContext_setExportPath).call(this, { generatedExportPath, baseSettings });
|
|
335
335
|
return new ContentSettings_js_1.ContentSettings({
|
|
336
336
|
identifier: insertable.toIdentifier({ refName, baseSettings }),
|
|
337
|
-
selected:
|
|
337
|
+
selected: baseSettings.selected,
|
|
338
338
|
exportPath,
|
|
339
339
|
importFrom: baseSettings.importFrom ?? exportPath,
|
|
340
340
|
parentExportPath: baseSettings.parentExportPath
|
|
@@ -353,7 +353,7 @@ class GenerateContext {
|
|
|
353
353
|
const exportPath = gateway.toExportPath(baseSettings);
|
|
354
354
|
return new ContentSettings_js_1.ContentSettings({
|
|
355
355
|
identifier: gateway.toIdentifier(baseSettings),
|
|
356
|
-
selected:
|
|
356
|
+
selected: baseSettings.selected,
|
|
357
357
|
exportPath,
|
|
358
358
|
importFrom: baseSettings.importFrom ?? exportPath,
|
|
359
359
|
parentExportPath: baseSettings.parentExportPath
|
|
@@ -409,7 +409,7 @@ _GenerateContext_files = new WeakMap(), _GenerateContext_stackTrail = new WeakMa
|
|
|
409
409
|
path,
|
|
410
410
|
method
|
|
411
411
|
});
|
|
412
|
-
if (!
|
|
412
|
+
if (!baseSettings.selected) {
|
|
413
413
|
return this.captureCurrentResult('notSelected');
|
|
414
414
|
}
|
|
415
415
|
gatewayInstance.transformOperation(operation);
|
|
@@ -441,7 +441,7 @@ _GenerateContext_files = new WeakMap(), _GenerateContext_stackTrail = new WeakMa
|
|
|
441
441
|
path,
|
|
442
442
|
method
|
|
443
443
|
});
|
|
444
|
-
if (!
|
|
444
|
+
if (!baseSettings.selected) {
|
|
445
445
|
return this.captureCurrentResult('notSelected');
|
|
446
446
|
}
|
|
447
447
|
this.insertOperation({ insertable: generator, operation });
|
|
@@ -461,7 +461,7 @@ _GenerateContext_files = new WeakMap(), _GenerateContext_stackTrail = new WeakMa
|
|
|
461
461
|
generatorId: generator.id,
|
|
462
462
|
refName
|
|
463
463
|
});
|
|
464
|
-
if (!
|
|
464
|
+
if (!baseSettings.selected) {
|
|
465
465
|
return this.captureCurrentResult('notSelected');
|
|
466
466
|
}
|
|
467
467
|
this.insertModel({ insertable: generator, refName });
|
|
@@ -17,10 +17,6 @@ export type ToModelExportPathArgs = {
|
|
|
17
17
|
refName: RefName;
|
|
18
18
|
baseSettings: BaseSettings;
|
|
19
19
|
};
|
|
20
|
-
export type IsModelSelectedArgs = {
|
|
21
|
-
refName: RefName;
|
|
22
|
-
baseSettings: BaseSettings;
|
|
23
|
-
};
|
|
24
20
|
export type WithTransformModel = {
|
|
25
21
|
transformModel: (refName: RefName) => void;
|
|
26
22
|
};
|
|
@@ -33,7 +29,6 @@ export type ModelInsertable<V> = {
|
|
|
33
29
|
_class: 'ModelInsertable';
|
|
34
30
|
toIdentifier: ({ refName, baseSettings }: ToModelIdentifierArgs) => Identifier;
|
|
35
31
|
toExportPath: ({ refName, baseSettings }: ToModelExportPathArgs) => string;
|
|
36
|
-
isSelected: ({ refName, baseSettings }: IsModelSelectedArgs) => boolean;
|
|
37
32
|
isSupported: () => boolean;
|
|
38
33
|
pinnable: boolean;
|
|
39
34
|
} & Function;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModelInsertable.d.ts","sourceRoot":"","sources":["../../../src/dsl/model/ModelInsertable.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAA;AACvE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAC5D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAA;AAC3D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAA;AACrD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAElD,KAAK,8BAA8B,GAAG;IACpC,OAAO,EAAE,eAAe,CAAA;IACxB,OAAO,EAAE,OAAO,CAAA;IAChB,QAAQ,EAAE,eAAe,CAAA;IACzB,eAAe,EAAE,MAAM,CAAA;CACxB,CAAA;AAED,MAAM,MAAM,qBAAqB,GAAG;IAClC,OAAO,EAAE,OAAO,CAAA;IAChB,YAAY,EAAE,YAAY,CAAA;CAC3B,CAAA;AAED,MAAM,MAAM,qBAAqB,GAAG;IAClC,OAAO,EAAE,OAAO,CAAA;IAChB,YAAY,EAAE,YAAY,CAAA;CAC3B,CAAA;AAED,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"ModelInsertable.d.ts","sourceRoot":"","sources":["../../../src/dsl/model/ModelInsertable.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAA;AACvE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAC5D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAA;AAC3D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAA;AACrD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAElD,KAAK,8BAA8B,GAAG;IACpC,OAAO,EAAE,eAAe,CAAA;IACxB,OAAO,EAAE,OAAO,CAAA;IAChB,QAAQ,EAAE,eAAe,CAAA;IACzB,eAAe,EAAE,MAAM,CAAA;CACxB,CAAA;AAED,MAAM,MAAM,qBAAqB,GAAG;IAClC,OAAO,EAAE,OAAO,CAAA;IAChB,YAAY,EAAE,YAAY,CAAA;CAC3B,CAAA;AAED,MAAM,MAAM,qBAAqB,GAAG;IAClC,OAAO,EAAE,OAAO,CAAA;IAChB,YAAY,EAAE,YAAY,CAAA;CAC3B,CAAA;AAED,MAAM,MAAM,kBAAkB,GAAG;IAC/B,cAAc,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAA;CAC3C,CAAA;AAED,MAAM,MAAM,eAAe,CAAC,CAAC,IAAI;IAAE,SAAS,EAAE,CAAC,CAAA;CAAE,GAAG;IAClD,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,EAAE,8BAA8B,GAAG,CAAC,CAAA;IACxF,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,OAAO,CAAA;IACb,MAAM,EAAE,iBAAiB,CAAA;IAEzB,YAAY,EAAE,CAAC,EAAE,OAAO,EAAE,YAAY,EAAE,EAAE,qBAAqB,KAAK,UAAU,CAAA;IAC9E,YAAY,EAAE,CAAC,EAAE,OAAO,EAAE,YAAY,EAAE,EAAE,qBAAqB,KAAK,MAAM,CAAA;IAE1E,WAAW,EAAE,MAAM,OAAO,CAAA;IAE1B,QAAQ,EAAE,OAAO,CAAA;CAGlB,GAAG,QAAQ,CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { GenerateContext } from '../../context/GenerateContext.js';
|
|
2
2
|
import type { RefName } from '../../types/RefName.js';
|
|
3
3
|
import type { ContentSettings } from '../ContentSettings.js';
|
|
4
|
-
import type {
|
|
4
|
+
import type { ToModelExportPathArgs, ToModelIdentifierArgs } from './ModelInsertable.js';
|
|
5
5
|
import type { Identifier } from '../Identifier.js';
|
|
6
6
|
export type ModelInsertableArgs = {
|
|
7
7
|
context: GenerateContext;
|
|
@@ -12,7 +12,6 @@ export type ModelConfig = {
|
|
|
12
12
|
id: string;
|
|
13
13
|
toIdentifier: ({ refName, baseSettings }: ToModelIdentifierArgs) => Identifier;
|
|
14
14
|
toExportPath: ({ refName, baseSettings }: ToModelExportPathArgs) => string;
|
|
15
|
-
isSelected?: ({ refName, baseSettings }: IsModelSelectedArgs) => boolean;
|
|
16
15
|
};
|
|
17
16
|
export declare const toModelInsertable: (config: ModelConfig) => {
|
|
18
17
|
new (args: ModelInsertableArgs): {
|
|
@@ -29,7 +28,6 @@ export declare const toModelInsertable: (config: ModelConfig) => {
|
|
|
29
28
|
_class: "ModelInsertable";
|
|
30
29
|
toIdentifier: ({ refName, baseSettings }: ToModelIdentifierArgs) => Identifier;
|
|
31
30
|
toExportPath: ({ refName, baseSettings }: ToModelExportPathArgs) => string;
|
|
32
|
-
isSelected: ({ refName, baseSettings }: IsModelSelectedArgs) => boolean;
|
|
33
31
|
isSupported: () => boolean;
|
|
34
32
|
pinnable: boolean;
|
|
35
33
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toModelInsertable.d.ts","sourceRoot":"","sources":["../../../src/dsl/model/toModelInsertable.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,KAAK,
|
|
1
|
+
{"version":3,"file":"toModelInsertable.d.ts","sourceRoot":"","sources":["../../../src/dsl/model/toModelInsertable.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,KAAK,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAA;AAExF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAElD,MAAM,MAAM,mBAAmB,GAAG;IAChC,OAAO,EAAE,eAAe,CAAA;IACxB,QAAQ,EAAE,eAAe,CAAA;IACzB,OAAO,EAAE,OAAO,CAAA;CACjB,CAAA;AAED,MAAM,MAAM,WAAW,GAAG;IACxB,EAAE,EAAE,MAAM,CAAA;IACV,YAAY,EAAE,CAAC,EAAE,OAAO,EAAE,YAAY,EAAE,EAAE,qBAAqB,KAAK,UAAU,CAAA;IAC9E,YAAY,EAAE,CAAC,EAAE,OAAO,EAAE,YAAY,EAAE,EAAE,qBAAqB,KAAK,MAAM,CAAA;CAC3E,CAAA;AAED,eAAO,MAAM,iBAAiB,WAAY,WAAW;eAa/B,mBAAmB;;;;;;;;;;;;8CAjBG,qBAAqB,KAAK,UAAU;8CACpC,qBAAqB,KAAK,MAAM;;;CA4B3E,CAAA"}
|
|
@@ -51,12 +51,6 @@ const toModelInsertable = (config) => {
|
|
|
51
51
|
writable: true,
|
|
52
52
|
value: config.toExportPath.bind(config)
|
|
53
53
|
}),
|
|
54
|
-
Object.defineProperty(_a, "isSelected", {
|
|
55
|
-
enumerable: true,
|
|
56
|
-
configurable: true,
|
|
57
|
-
writable: true,
|
|
58
|
-
value: config.isSelected ?? (() => true)
|
|
59
|
-
}),
|
|
60
54
|
Object.defineProperty(_a, "isSupported", {
|
|
61
55
|
enumerable: true,
|
|
62
56
|
configurable: true,
|
|
@@ -16,14 +16,6 @@ export type ToOperationExportPathArgs = {
|
|
|
16
16
|
operation: OasOperation;
|
|
17
17
|
baseSettings: BaseSettings;
|
|
18
18
|
};
|
|
19
|
-
export type IsOperationSelectedArgs = {
|
|
20
|
-
operation: OasOperation;
|
|
21
|
-
baseSettings: BaseSettings;
|
|
22
|
-
};
|
|
23
|
-
export type IsGeneratorSelectedArgs = {
|
|
24
|
-
operation: OasOperation;
|
|
25
|
-
baseSettings: BaseSettings;
|
|
26
|
-
};
|
|
27
19
|
export type WithTransformOperation = {
|
|
28
20
|
transformOperation: (operation: OasOperation) => void;
|
|
29
21
|
};
|
|
@@ -38,8 +30,6 @@ export type OperationGateway = {
|
|
|
38
30
|
_class: 'OperationGateway';
|
|
39
31
|
toIdentifier: (baseSettings: BaseSettings) => Identifier;
|
|
40
32
|
toExportPath: (baseSettings: BaseSettings) => string;
|
|
41
|
-
isGeneratorSelected: (baseSettings: BaseSettings) => boolean;
|
|
42
|
-
isOperationSelected: ({ operation, baseSettings }: IsOperationSelectedArgs) => boolean;
|
|
43
33
|
isSupported: (operation: OasOperation) => boolean;
|
|
44
34
|
pinnable: boolean;
|
|
45
35
|
};
|
|
@@ -52,7 +42,6 @@ export type OperationInsertable<V> = {
|
|
|
52
42
|
_class: 'OperationInsertable';
|
|
53
43
|
toIdentifier: ({ operation, baseSettings }: ToOperationIdentifierArgs) => Identifier;
|
|
54
44
|
toExportPath: ({ operation, baseSettings }: ToOperationExportPathArgs) => string;
|
|
55
|
-
isSelected: ({ operation, baseSettings }: IsOperationSelectedArgs) => boolean;
|
|
56
45
|
isSupported: (operation: OasOperation) => boolean;
|
|
57
46
|
pinnable: boolean;
|
|
58
47
|
} & Function;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OperationInsertable.d.ts","sourceRoot":"","sources":["../../../src/dsl/operation/OperationInsertable.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAA;AACpE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAC5D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAA;AAC3D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAA;AACvE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAElD,KAAK,kCAAkC,GAAG;IACxC,OAAO,EAAE,eAAe,CAAA;IACxB,QAAQ,EAAE,eAAe,CAAA;IACzB,SAAS,EAAE,YAAY,CAAA;CACxB,CAAA;AAED,MAAM,MAAM,yBAAyB,GAAG;IACtC,SAAS,EAAE,YAAY,CAAA;IACvB,YAAY,EAAE,YAAY,CAAA;CAC3B,CAAA;AAED,MAAM,MAAM,yBAAyB,GAAG;IACtC,SAAS,EAAE,YAAY,CAAA;IACvB,YAAY,EAAE,YAAY,CAAA;CAC3B,CAAA;AAED,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"OperationInsertable.d.ts","sourceRoot":"","sources":["../../../src/dsl/operation/OperationInsertable.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAA;AACpE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAC5D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAA;AAC3D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAA;AACvE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAElD,KAAK,kCAAkC,GAAG;IACxC,OAAO,EAAE,eAAe,CAAA;IACxB,QAAQ,EAAE,eAAe,CAAA;IACzB,SAAS,EAAE,YAAY,CAAA;CACxB,CAAA;AAED,MAAM,MAAM,yBAAyB,GAAG;IACtC,SAAS,EAAE,YAAY,CAAA;IACvB,YAAY,EAAE,YAAY,CAAA;CAC3B,CAAA;AAED,MAAM,MAAM,yBAAyB,GAAG;IACtC,SAAS,EAAE,YAAY,CAAA;IACvB,YAAY,EAAE,YAAY,CAAA;CAC3B,CAAA;AAED,MAAM,MAAM,sB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/Operation.js';
|
|
|
2
2
|
import { type OperationGatewayArgs } from '../GatewayBase.js';
|
|
3
3
|
import type { Identifier } from '../Identifier.js';
|
|
4
4
|
import type { BaseSettings } from '../../types/Settings.js';
|
|
5
|
-
import type { IsOperationSelectedArgs } from './OperationInsertable.js';
|
|
6
5
|
export type ToOperationGatewayArgs = {
|
|
7
6
|
id: string;
|
|
8
7
|
toIdentifier: (baseSettings: BaseSettings) => Identifier;
|
|
9
8
|
toExportPath: (baseSettings: BaseSettings) => string;
|
|
10
|
-
isGeneratorSelected?: (baseSettings: BaseSettings) => boolean;
|
|
11
|
-
isOperationSelected?: ({ operation, baseSettings }: IsOperationSelectedArgs) => boolean;
|
|
12
9
|
isSupported?: (operation: OasOperation) => boolean;
|
|
13
10
|
};
|
|
14
11
|
export declare const toOperationGateway: (config: ToOperationGatewayArgs) => {
|
|
@@ -24,8 +21,6 @@ export declare const toOperationGateway: (config: ToOperationGatewayArgs) => {
|
|
|
24
21
|
_class: "OperationGateway";
|
|
25
22
|
toIdentifier: (baseSettings: BaseSettings) => Identifier;
|
|
26
23
|
toExportPath: (baseSettings: BaseSettings) => string;
|
|
27
|
-
isGeneratorSelected: (baseSettings: BaseSettings) => boolean;
|
|
28
|
-
isOperationSelected: ({ operation, baseSettings }: IsOperationSelectedArgs) => boolean;
|
|
29
24
|
isSupported: (operation: OasOperation) => boolean;
|
|
30
25
|
pinnable: boolean;
|
|
31
26
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toOperationGateway.d.ts","sourceRoot":"","sources":["../../../src/dsl/operation/toOperationGateway.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAA;AACpE,OAAO,EAAe,KAAK,oBAAoB,EAAE,MAAM,mBAAmB,CAAA;AAC1E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAClD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAA;
|
|
1
|
+
{"version":3,"file":"toOperationGateway.d.ts","sourceRoot":"","sources":["../../../src/dsl/operation/toOperationGateway.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAA;AACpE,OAAO,EAAe,KAAK,oBAAoB,EAAE,MAAM,mBAAmB,CAAA;AAC1E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAClD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAA;AAE3D,MAAM,MAAM,sBAAsB,GAAG;IACnC,EAAE,EAAE,MAAM,CAAA;IACV,YAAY,EAAE,CAAC,YAAY,EAAE,YAAY,KAAK,UAAU,CAAA;IACxD,YAAY,EAAE,CAAC,YAAY,EAAE,YAAY,KAAK,MAAM,CAAA;IACpD,WAAW,CAAC,EAAE,CAAC,SAAS,EAAE,YAAY,KAAK,OAAO,CAAA;CACnD,CAAA;AAED,eAAO,MAAM,kBAAkB,WAAY,sBAAsB;gCAa1B,oBAAoB;;;;;;;;;;iCAlB5B,YAAY,KAAK,UAAU;iCAC3B,YAAY,KAAK,MAAM;6BAC1B,YAAY,KAAK,OAAO;;CAsBnD,CAAA"}
|
|
@@ -44,18 +44,6 @@ const toOperationGateway = (config) => {
|
|
|
44
44
|
writable: true,
|
|
45
45
|
value: config.toExportPath.bind(config)
|
|
46
46
|
}),
|
|
47
|
-
Object.defineProperty(_a, "isGeneratorSelected", {
|
|
48
|
-
enumerable: true,
|
|
49
|
-
configurable: true,
|
|
50
|
-
writable: true,
|
|
51
|
-
value: config.isGeneratorSelected ?? (() => true)
|
|
52
|
-
}),
|
|
53
|
-
Object.defineProperty(_a, "isOperationSelected", {
|
|
54
|
-
enumerable: true,
|
|
55
|
-
configurable: true,
|
|
56
|
-
writable: true,
|
|
57
|
-
value: config.isOperationSelected ?? (() => true)
|
|
58
|
-
}),
|
|
59
47
|
Object.defineProperty(_a, "isSupported", {
|
|
60
48
|
enumerable: true,
|
|
61
49
|
configurable: true,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { GenerateContext } from '../../context/GenerateContext.js';
|
|
2
2
|
import type { OasOperation } from '../../oas/operation/Operation.js';
|
|
3
3
|
import type { ContentSettings } from '../ContentSettings.js';
|
|
4
|
-
import type { ToOperationIdentifierArgs, ToOperationExportPathArgs
|
|
4
|
+
import type { ToOperationIdentifierArgs, ToOperationExportPathArgs } from './OperationInsertable.js';
|
|
5
5
|
import type { Identifier } from '../Identifier.js';
|
|
6
6
|
export type OperationInsertableArgs = {
|
|
7
7
|
context: GenerateContext;
|
|
@@ -12,7 +12,6 @@ export type ToOperationInsertableArgs = {
|
|
|
12
12
|
id: string;
|
|
13
13
|
toIdentifier: ({ operation, baseSettings }: ToOperationIdentifierArgs) => Identifier;
|
|
14
14
|
toExportPath: ({ operation, baseSettings }: ToOperationExportPathArgs) => string;
|
|
15
|
-
isSelected?: ({ operation, baseSettings }: IsOperationSelectedArgs) => boolean;
|
|
16
15
|
isSupported?: (operation: OasOperation) => boolean;
|
|
17
16
|
pinnable?: boolean;
|
|
18
17
|
};
|
|
@@ -37,7 +36,6 @@ export declare const toOperationInsertable: (config: ToOperationInsertableArgs)
|
|
|
37
36
|
_class: "OperationInsertable";
|
|
38
37
|
toIdentifier: ({ operation, baseSettings }: ToOperationIdentifierArgs) => Identifier;
|
|
39
38
|
toExportPath: ({ operation, baseSettings }: ToOperationExportPathArgs) => string;
|
|
40
|
-
isSelected: ({ operation, baseSettings }: IsOperationSelectedArgs) => boolean;
|
|
41
39
|
isSupported: (operation: OasOperation) => boolean;
|
|
42
40
|
pinnable: boolean;
|
|
43
41
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toOperationInsertable.d.ts","sourceRoot":"","sources":["../../../src/dsl/operation/toOperationInsertable.ts"],"names":[],"mappings":"AACA,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,
|
|
1
|
+
{"version":3,"file":"toOperationInsertable.d.ts","sourceRoot":"","sources":["../../../src/dsl/operation/toOperationInsertable.ts"],"names":[],"mappings":"AACA,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,EAAE,yBAAyB,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAA;AAEpG,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAElD,MAAM,MAAM,uBAAuB,GAAG;IACpC,OAAO,EAAE,eAAe,CAAA;IACxB,QAAQ,EAAE,eAAe,CAAA;IACzB,SAAS,EAAE,YAAY,CAAA;CACxB,CAAA;AAED,MAAM,MAAM,yBAAyB,GAAG;IACtC,EAAE,EAAE,MAAM,CAAA;IACV,YAAY,EAAE,CAAC,EAAE,SAAS,EAAE,YAAY,EAAE,EAAE,yBAAyB,KAAK,UAAU,CAAA;IACpF,YAAY,EAAE,CAAC,EAAE,SAAS,EAAE,YAAY,EAAE,EAAE,yBAAyB,KAAK,MAAM,CAAA;IAChF,WAAW,CAAC,EAAE,CAAC,SAAS,EAAE,YAAY,KAAK,OAAO,CAAA;IAClD,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAA;AAED,eAAO,MAAM,qBAAqB,WAAY,yBAAyB;eAajD,uBAAuB;;;;;;;;;;;;;;;;;;gDAnBC,yBAAyB,KAAK,UAAU;gDACxC,yBAAyB,KAAK,MAAM;6BACtD,YAAY,KAAK,OAAO;;CA6BnD,CAAA"}
|
|
@@ -51,12 +51,6 @@ const toOperationInsertable = (config) => {
|
|
|
51
51
|
writable: true,
|
|
52
52
|
value: config.toExportPath.bind(config)
|
|
53
53
|
}),
|
|
54
|
-
Object.defineProperty(_a, "isSelected", {
|
|
55
|
-
enumerable: true,
|
|
56
|
-
configurable: true,
|
|
57
|
-
writable: true,
|
|
58
|
-
value: config.isSelected ?? (() => true)
|
|
59
|
-
}),
|
|
60
54
|
Object.defineProperty(_a, "isSupported", {
|
|
61
55
|
enumerable: true,
|
|
62
56
|
configurable: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toSchemasV3.d.ts","sourceRoot":"","sources":["../../../src/oas/schema/toSchemasV3.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AAEjE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAE9C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAC5C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAW3C,KAAK,eAAe,GAAG;IACrB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,eAAe,GAAG,SAAS,CAAC,YAAY,CAAC,CAAA;IAC3E,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,WAAW,yBAGrB,eAAe,KAAG,MAAM,CAAC,MAAM,EAAE,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC,CAM/D,CAAA;AAED,KAAK,uBAAuB,GAAG;IAC7B,OAAO,
|
|
1
|
+
{"version":3,"file":"toSchemasV3.d.ts","sourceRoot":"","sources":["../../../src/oas/schema/toSchemasV3.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AAEjE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAE9C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAC5C,OAAO,KAAK,EAAE,M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33
|
// Workaround for dodgy Reapit schema
|
|
34
|
-
if (schema.type !== 'array' &&
|
|
35
|
-
'optional' in schema &&
|
|
36
|
-
schema.optional === true) {
|
|
34
|
+
if (schema.type !== 'array' && 'optional' in schema && schema.optional === true) {
|
|
37
35
|
schema.nullable = true;
|
|
38
36
|
}
|
|
39
37
|
return (0, ts_pattern_1.match)(schema)
|
|
40
38
|
.with({ oneOf: ts_pattern_1.P.array() }, ({ oneOf: members, ...value }) => {
|
|
41
|
-
if (members.length === 1) {
|
|
42
|
-
|
|
43
|
-
}
|
|
39
|
+
// if (members.length === 1) {
|
|
40
|
+
// return toSchemaV3({ schema: members[0], context })
|
|
41
|
+
// }
|
|
44
42
|
return (0, toUnion_js_1.toUnion)({ value, members, context });
|
|
45
43
|
})
|
|
46
44
|
.with({ anyOf: ts_pattern_1.P.array() }, ({ anyOf: members, ...value }) => {
|
|
47
|
-
if (members.length === 1) {
|
|
48
|
-
|
|
49
|
-
}
|
|
45
|
+
// if (members.length === 1) {
|
|
46
|
+
// return toSchemaV3({ schema: members[0], context })
|
|
47
|
+
// }
|
|
50
48
|
return context.trace('anyOf', () => (0, toUnion_js_1.toUnion)({ value, members, context }));
|
|
51
49
|
})
|
|
52
50
|
.with({ allOf: ts_pattern_1.P.array() }, ({ allOf: members, ...value }) => {
|
|
53
|
-
if (members.length === 1) {
|
|
54
|
-
|
|
55
|
-
}
|
|
51
|
+
// if (members.length === 1) {
|
|
52
|
+
// return toSchemaV3({ schema: members[0], context })
|
|
53
|
+
// }
|
|
56
54
|
return context.trace('allOf', () => (0, toIntersection_js_1.toIntersection)({ value, members, context }));
|
|
57
55
|
})
|
|
58
56
|
.with({ type: 'object' }, value => (0, toObject_js_1.toObject)({ value, context }))
|