@skmtc/core 0.0.352 → 0.0.354
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/model/toModelConfig.d.ts +2 -3
- package/esm/dsl/model/toModelConfig.d.ts.map +1 -1
- package/esm/dsl/model/toModelConfig.js +8 -8
- package/esm/dsl/operation/toOperationConfig.d.ts +2 -3
- package/esm/dsl/operation/toOperationConfig.d.ts.map +1 -1
- package/esm/dsl/operation/toOperationConfig.js +12 -12
- package/package.json +1 -1
- package/script/dsl/model/toModelConfig.d.ts +2 -3
- package/script/dsl/model/toModelConfig.d.ts.map +1 -1
- package/script/dsl/model/toModelConfig.js +8 -8
- package/script/dsl/operation/toOperationConfig.d.ts +2 -3
- package/script/dsl/operation/toOperationConfig.d.ts.map +1 -1
- package/script/dsl/operation/toOperationConfig.js +14 -14
|
@@ -8,14 +8,14 @@ export type ModelInsertableArgs = {
|
|
|
8
8
|
settings: ContentSettings;
|
|
9
9
|
refName: RefName;
|
|
10
10
|
};
|
|
11
|
-
type
|
|
11
|
+
export type ModelConfig = {
|
|
12
12
|
id: string;
|
|
13
13
|
entityType?: EntityType;
|
|
14
14
|
toName: ({ refName, baseSettings }: ToModelNameArgs) => string;
|
|
15
15
|
toExportPath: ({ refName, baseSettings }: ToModelExportPathArgs) => string;
|
|
16
16
|
isSelected?: ({ refName, baseSettings }: IsModelSelectedArgs) => boolean;
|
|
17
17
|
};
|
|
18
|
-
export declare const toModelConfig: (
|
|
18
|
+
export declare const toModelConfig: (config: ModelConfig) => {
|
|
19
19
|
ModelInsertable: {
|
|
20
20
|
new (args: ModelInsertableArgs): {
|
|
21
21
|
settings: ContentSettings;
|
|
@@ -47,5 +47,4 @@ export declare const toModelConfig: ({ id, entityType, toName, toExportPath, isS
|
|
|
47
47
|
pinnable: boolean;
|
|
48
48
|
};
|
|
49
49
|
};
|
|
50
|
-
export {};
|
|
51
50
|
//# sourceMappingURL=toModelConfig.d.ts.map
|
|
@@ -1 +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,
|
|
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,MAAM,MAAM,WAAW,GAAG;IACxB,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,WAAY,WAAW;;mBAY3B,mBAAmB;;;;;;;;;;;;;4CAjBH,eAAe,KAAK,MAAM;kDACpB,qBAAqB,KAAK,MAAM;gDACjC,mBAAmB,KAAK,OAAO;;;;;sBAiCjD,eAAe;;;;;;;;;CAMvC,CAAA"}
|
|
@@ -6,14 +6,14 @@ import { toModelGeneratorKey } from '../../types/GeneratorKeys.js';
|
|
|
6
6
|
import { EntityType } from '../EntityType.js';
|
|
7
7
|
import { GatewayBase } from '../GeneratorBase.js';
|
|
8
8
|
import { ModelBase } from './ModelBase.js';
|
|
9
|
-
export const toModelConfig = (
|
|
9
|
+
export const toModelConfig = (config) => {
|
|
10
10
|
var _a, _b;
|
|
11
11
|
const ModelInsertable = (_a = class extends ModelBase {
|
|
12
12
|
constructor(args) {
|
|
13
13
|
super({
|
|
14
14
|
...args,
|
|
15
15
|
generatorKey: toModelGeneratorKey({
|
|
16
|
-
generatorId: id,
|
|
16
|
+
generatorId: config.id,
|
|
17
17
|
refName: args.refName
|
|
18
18
|
})
|
|
19
19
|
});
|
|
@@ -24,7 +24,7 @@ export const toModelConfig = ({ id, entityType, toName, toExportPath, isSelected
|
|
|
24
24
|
enumerable: true,
|
|
25
25
|
configurable: true,
|
|
26
26
|
writable: true,
|
|
27
|
-
value: id
|
|
27
|
+
value: config.id
|
|
28
28
|
}),
|
|
29
29
|
Object.defineProperty(_a, "type", {
|
|
30
30
|
enumerable: true,
|
|
@@ -42,25 +42,25 @@ export const toModelConfig = ({ id, entityType, toName, toExportPath, isSelected
|
|
|
42
42
|
enumerable: true,
|
|
43
43
|
configurable: true,
|
|
44
44
|
writable: true,
|
|
45
|
-
value: entityType ?? new EntityType('variable')
|
|
45
|
+
value: config.entityType ?? new EntityType('variable')
|
|
46
46
|
}),
|
|
47
47
|
Object.defineProperty(_a, "toName", {
|
|
48
48
|
enumerable: true,
|
|
49
49
|
configurable: true,
|
|
50
50
|
writable: true,
|
|
51
|
-
value: toName
|
|
51
|
+
value: config.toName.bind(config)
|
|
52
52
|
}),
|
|
53
53
|
Object.defineProperty(_a, "toExportPath", {
|
|
54
54
|
enumerable: true,
|
|
55
55
|
configurable: true,
|
|
56
56
|
writable: true,
|
|
57
|
-
value: toExportPath
|
|
57
|
+
value: config.toExportPath.bind(config)
|
|
58
58
|
}),
|
|
59
59
|
Object.defineProperty(_a, "isSelected", {
|
|
60
60
|
enumerable: true,
|
|
61
61
|
configurable: true,
|
|
62
62
|
writable: true,
|
|
63
|
-
value: isSelected ?? (() => true)
|
|
63
|
+
value: config.isSelected ?? (() => true)
|
|
64
64
|
}),
|
|
65
65
|
Object.defineProperty(_a, "isSupported", {
|
|
66
66
|
enumerable: true,
|
|
@@ -85,7 +85,7 @@ export const toModelConfig = ({ id, entityType, toName, toExportPath, isSelected
|
|
|
85
85
|
enumerable: true,
|
|
86
86
|
configurable: true,
|
|
87
87
|
writable: true,
|
|
88
|
-
value: id
|
|
88
|
+
value: config.id
|
|
89
89
|
}),
|
|
90
90
|
Object.defineProperty(_b, "type", {
|
|
91
91
|
enumerable: true,
|
|
@@ -8,7 +8,7 @@ export type OperationInsertableArgs = {
|
|
|
8
8
|
settings: ContentSettings;
|
|
9
9
|
operation: OasOperation;
|
|
10
10
|
};
|
|
11
|
-
type
|
|
11
|
+
export type OperationConfig = {
|
|
12
12
|
id: string;
|
|
13
13
|
entityType?: EntityType;
|
|
14
14
|
toName: ({ operation, baseSettings }: ToOperationNameArgs) => string;
|
|
@@ -17,7 +17,7 @@ type ToOperationConfigArgs = {
|
|
|
17
17
|
isSupported?: (operation: OasOperation) => boolean;
|
|
18
18
|
pinnable?: boolean;
|
|
19
19
|
};
|
|
20
|
-
export declare const
|
|
20
|
+
export declare const toOperationBase: (config: OperationConfig) => {
|
|
21
21
|
OperationInsertable: {
|
|
22
22
|
new (args: OperationInsertableArgs): {
|
|
23
23
|
settings: ContentSettings;
|
|
@@ -57,5 +57,4 @@ export declare const toOperationConfig: ({ id, entityType, toName, toExportPath,
|
|
|
57
57
|
pinnable: boolean;
|
|
58
58
|
};
|
|
59
59
|
};
|
|
60
|
-
export {};
|
|
61
60
|
//# sourceMappingURL=toOperationConfig.d.ts.map
|
|
@@ -1 +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,
|
|
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,MAAM,MAAM,eAAe,GAAG;IAC5B,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,eAAe,WAAY,eAAe;;mBAYjC,uBAAuB;;;;;;;;;;;;;;;;;;;;;8CAtBL,mBAAmB,KAAK,MAAM;oDAIjE,yBAAyB,KAAK,MAAM;kDACI,uBAAuB,KAAK,OAAO;iCACpD,YAAY,KAAK,OAAO;;;;sBAkC3B,eAAe;;;;;;iCAlCZ,YAAY,KAAK,OAAO;;;CAwCnD,CAAA"}
|
|
@@ -6,14 +6,14 @@ import { EntityType } from '../EntityType.js';
|
|
|
6
6
|
import { toOperationGeneratorKey } from '../../types/GeneratorKeys.js';
|
|
7
7
|
import { OperationBase } from './OperationBase.js';
|
|
8
8
|
import { GatewayBase } from '../GeneratorBase.js';
|
|
9
|
-
export const
|
|
9
|
+
export const toOperationBase = (config) => {
|
|
10
10
|
var _a, _b;
|
|
11
11
|
const OperationInsertable = (_a = class extends OperationBase {
|
|
12
12
|
constructor(args) {
|
|
13
13
|
super({
|
|
14
14
|
...args,
|
|
15
15
|
generatorKey: toOperationGeneratorKey({
|
|
16
|
-
generatorId: id,
|
|
16
|
+
generatorId: config.id,
|
|
17
17
|
operation: args.operation
|
|
18
18
|
})
|
|
19
19
|
});
|
|
@@ -24,7 +24,7 @@ export const toOperationConfig = ({ id, entityType, toName, toExportPath, isSele
|
|
|
24
24
|
enumerable: true,
|
|
25
25
|
configurable: true,
|
|
26
26
|
writable: true,
|
|
27
|
-
value: id
|
|
27
|
+
value: config.id
|
|
28
28
|
}),
|
|
29
29
|
Object.defineProperty(_a, "type", {
|
|
30
30
|
enumerable: true,
|
|
@@ -42,37 +42,37 @@ export const toOperationConfig = ({ id, entityType, toName, toExportPath, isSele
|
|
|
42
42
|
enumerable: true,
|
|
43
43
|
configurable: true,
|
|
44
44
|
writable: true,
|
|
45
|
-
value: entityType ?? new EntityType('variable')
|
|
45
|
+
value: config.entityType ?? new EntityType('variable')
|
|
46
46
|
}),
|
|
47
47
|
Object.defineProperty(_a, "toName", {
|
|
48
48
|
enumerable: true,
|
|
49
49
|
configurable: true,
|
|
50
50
|
writable: true,
|
|
51
|
-
value: toName
|
|
51
|
+
value: config.toName.bind(config)
|
|
52
52
|
}),
|
|
53
53
|
Object.defineProperty(_a, "toExportPath", {
|
|
54
54
|
enumerable: true,
|
|
55
55
|
configurable: true,
|
|
56
56
|
writable: true,
|
|
57
|
-
value: toExportPath
|
|
57
|
+
value: config.toExportPath.bind(config)
|
|
58
58
|
}),
|
|
59
59
|
Object.defineProperty(_a, "isSelected", {
|
|
60
60
|
enumerable: true,
|
|
61
61
|
configurable: true,
|
|
62
62
|
writable: true,
|
|
63
|
-
value: isSelected ?? (() => true)
|
|
63
|
+
value: config.isSelected ?? (() => true)
|
|
64
64
|
}),
|
|
65
65
|
Object.defineProperty(_a, "isSupported", {
|
|
66
66
|
enumerable: true,
|
|
67
67
|
configurable: true,
|
|
68
68
|
writable: true,
|
|
69
|
-
value: isSupported ?? (() => true)
|
|
69
|
+
value: config.isSupported ?? (() => true)
|
|
70
70
|
}),
|
|
71
71
|
Object.defineProperty(_a, "pinnable", {
|
|
72
72
|
enumerable: true,
|
|
73
73
|
configurable: true,
|
|
74
74
|
writable: true,
|
|
75
|
-
value: pinnable ?? false
|
|
75
|
+
value: config.pinnable ?? false
|
|
76
76
|
}),
|
|
77
77
|
_a);
|
|
78
78
|
const OperationGateway = (_b = class extends GatewayBase {
|
|
@@ -85,7 +85,7 @@ export const toOperationConfig = ({ id, entityType, toName, toExportPath, isSele
|
|
|
85
85
|
enumerable: true,
|
|
86
86
|
configurable: true,
|
|
87
87
|
writable: true,
|
|
88
|
-
value: id
|
|
88
|
+
value: config.id
|
|
89
89
|
}),
|
|
90
90
|
Object.defineProperty(_b, "type", {
|
|
91
91
|
enumerable: true,
|
|
@@ -103,13 +103,13 @@ export const toOperationConfig = ({ id, entityType, toName, toExportPath, isSele
|
|
|
103
103
|
enumerable: true,
|
|
104
104
|
configurable: true,
|
|
105
105
|
writable: true,
|
|
106
|
-
value: isSupported ?? (() => true)
|
|
106
|
+
value: config.isSupported ?? (() => true)
|
|
107
107
|
}),
|
|
108
108
|
Object.defineProperty(_b, "pinnable", {
|
|
109
109
|
enumerable: true,
|
|
110
110
|
configurable: true,
|
|
111
111
|
writable: true,
|
|
112
|
-
value: pinnable ?? false
|
|
112
|
+
value: config.pinnable ?? false
|
|
113
113
|
}),
|
|
114
114
|
_b);
|
|
115
115
|
return { OperationInsertable, OperationGateway };
|
package/package.json
CHANGED
|
@@ -8,14 +8,14 @@ export type ModelInsertableArgs = {
|
|
|
8
8
|
settings: ContentSettings;
|
|
9
9
|
refName: RefName;
|
|
10
10
|
};
|
|
11
|
-
type
|
|
11
|
+
export type ModelConfig = {
|
|
12
12
|
id: string;
|
|
13
13
|
entityType?: EntityType;
|
|
14
14
|
toName: ({ refName, baseSettings }: ToModelNameArgs) => string;
|
|
15
15
|
toExportPath: ({ refName, baseSettings }: ToModelExportPathArgs) => string;
|
|
16
16
|
isSelected?: ({ refName, baseSettings }: IsModelSelectedArgs) => boolean;
|
|
17
17
|
};
|
|
18
|
-
export declare const toModelConfig: (
|
|
18
|
+
export declare const toModelConfig: (config: ModelConfig) => {
|
|
19
19
|
ModelInsertable: {
|
|
20
20
|
new (args: ModelInsertableArgs): {
|
|
21
21
|
settings: ContentSettings;
|
|
@@ -47,5 +47,4 @@ export declare const toModelConfig: ({ id, entityType, toName, toExportPath, isS
|
|
|
47
47
|
pinnable: boolean;
|
|
48
48
|
};
|
|
49
49
|
};
|
|
50
|
-
export {};
|
|
51
50
|
//# sourceMappingURL=toModelConfig.d.ts.map
|
|
@@ -1 +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,
|
|
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,MAAM,MAAM,WAAW,GAAG;IACxB,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,WAAY,WAAW;;mBAY3B,mBAAmB;;;;;;;;;;;;;4CAjBH,eAAe,KAAK,MAAM;kDACpB,qBAAqB,KAAK,MAAM;gDACjC,mBAAmB,KAAK,OAAO;;;;;sBAiCjD,eAAe;;;;;;;;;CAMvC,CAAA"}
|
|
@@ -9,14 +9,14 @@ const GeneratorKeys_js_1 = require("../../types/GeneratorKeys.js");
|
|
|
9
9
|
const EntityType_js_1 = require("../EntityType.js");
|
|
10
10
|
const GeneratorBase_js_1 = require("../GeneratorBase.js");
|
|
11
11
|
const ModelBase_js_1 = require("./ModelBase.js");
|
|
12
|
-
const toModelConfig = (
|
|
12
|
+
const toModelConfig = (config) => {
|
|
13
13
|
var _a, _b;
|
|
14
14
|
const ModelInsertable = (_a = class extends ModelBase_js_1.ModelBase {
|
|
15
15
|
constructor(args) {
|
|
16
16
|
super({
|
|
17
17
|
...args,
|
|
18
18
|
generatorKey: (0, GeneratorKeys_js_1.toModelGeneratorKey)({
|
|
19
|
-
generatorId: id,
|
|
19
|
+
generatorId: config.id,
|
|
20
20
|
refName: args.refName
|
|
21
21
|
})
|
|
22
22
|
});
|
|
@@ -27,7 +27,7 @@ const toModelConfig = ({ id, entityType, toName, toExportPath, isSelected }) =>
|
|
|
27
27
|
enumerable: true,
|
|
28
28
|
configurable: true,
|
|
29
29
|
writable: true,
|
|
30
|
-
value: id
|
|
30
|
+
value: config.id
|
|
31
31
|
}),
|
|
32
32
|
Object.defineProperty(_a, "type", {
|
|
33
33
|
enumerable: true,
|
|
@@ -45,25 +45,25 @@ const toModelConfig = ({ id, entityType, toName, toExportPath, isSelected }) =>
|
|
|
45
45
|
enumerable: true,
|
|
46
46
|
configurable: true,
|
|
47
47
|
writable: true,
|
|
48
|
-
value: entityType ?? new EntityType_js_1.EntityType('variable')
|
|
48
|
+
value: config.entityType ?? new EntityType_js_1.EntityType('variable')
|
|
49
49
|
}),
|
|
50
50
|
Object.defineProperty(_a, "toName", {
|
|
51
51
|
enumerable: true,
|
|
52
52
|
configurable: true,
|
|
53
53
|
writable: true,
|
|
54
|
-
value: toName
|
|
54
|
+
value: config.toName.bind(config)
|
|
55
55
|
}),
|
|
56
56
|
Object.defineProperty(_a, "toExportPath", {
|
|
57
57
|
enumerable: true,
|
|
58
58
|
configurable: true,
|
|
59
59
|
writable: true,
|
|
60
|
-
value: toExportPath
|
|
60
|
+
value: config.toExportPath.bind(config)
|
|
61
61
|
}),
|
|
62
62
|
Object.defineProperty(_a, "isSelected", {
|
|
63
63
|
enumerable: true,
|
|
64
64
|
configurable: true,
|
|
65
65
|
writable: true,
|
|
66
|
-
value: isSelected ?? (() => true)
|
|
66
|
+
value: config.isSelected ?? (() => true)
|
|
67
67
|
}),
|
|
68
68
|
Object.defineProperty(_a, "isSupported", {
|
|
69
69
|
enumerable: true,
|
|
@@ -88,7 +88,7 @@ const toModelConfig = ({ id, entityType, toName, toExportPath, isSelected }) =>
|
|
|
88
88
|
enumerable: true,
|
|
89
89
|
configurable: true,
|
|
90
90
|
writable: true,
|
|
91
|
-
value: id
|
|
91
|
+
value: config.id
|
|
92
92
|
}),
|
|
93
93
|
Object.defineProperty(_b, "type", {
|
|
94
94
|
enumerable: true,
|
|
@@ -8,7 +8,7 @@ export type OperationInsertableArgs = {
|
|
|
8
8
|
settings: ContentSettings;
|
|
9
9
|
operation: OasOperation;
|
|
10
10
|
};
|
|
11
|
-
type
|
|
11
|
+
export type OperationConfig = {
|
|
12
12
|
id: string;
|
|
13
13
|
entityType?: EntityType;
|
|
14
14
|
toName: ({ operation, baseSettings }: ToOperationNameArgs) => string;
|
|
@@ -17,7 +17,7 @@ type ToOperationConfigArgs = {
|
|
|
17
17
|
isSupported?: (operation: OasOperation) => boolean;
|
|
18
18
|
pinnable?: boolean;
|
|
19
19
|
};
|
|
20
|
-
export declare const
|
|
20
|
+
export declare const toOperationBase: (config: OperationConfig) => {
|
|
21
21
|
OperationInsertable: {
|
|
22
22
|
new (args: OperationInsertableArgs): {
|
|
23
23
|
settings: ContentSettings;
|
|
@@ -57,5 +57,4 @@ export declare const toOperationConfig: ({ id, entityType, toName, toExportPath,
|
|
|
57
57
|
pinnable: boolean;
|
|
58
58
|
};
|
|
59
59
|
};
|
|
60
|
-
export {};
|
|
61
60
|
//# sourceMappingURL=toOperationConfig.d.ts.map
|
|
@@ -1 +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,
|
|
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,MAAM,MAAM,eAAe,GAAG;IAC5B,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,eAAe,WAAY,eAAe;;mBAYjC,uBAAuB;;;;;;;;;;;;;;;;;;;;;8CAtBL,mBAAmB,KAAK,MAAM;oDAIjE,yBAAyB,KAAK,MAAM;kDACI,uBAAuB,KAAK,OAAO;iCACpD,YAAY,KAAK,OAAO;;;;sBAkC3B,eAAe;;;;;;iCAlCZ,YAAY,KAAK,OAAO;;;CAwCnD,CAAA"}
|
|
@@ -4,19 +4,19 @@ var __setFunctionName = (this && this.__setFunctionName) || function (f, name, p
|
|
|
4
4
|
return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
|
|
5
5
|
};
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.
|
|
7
|
+
exports.toOperationBase = void 0;
|
|
8
8
|
const EntityType_js_1 = require("../EntityType.js");
|
|
9
9
|
const GeneratorKeys_js_1 = require("../../types/GeneratorKeys.js");
|
|
10
10
|
const OperationBase_js_1 = require("./OperationBase.js");
|
|
11
11
|
const GeneratorBase_js_1 = require("../GeneratorBase.js");
|
|
12
|
-
const
|
|
12
|
+
const toOperationBase = (config) => {
|
|
13
13
|
var _a, _b;
|
|
14
14
|
const OperationInsertable = (_a = class extends OperationBase_js_1.OperationBase {
|
|
15
15
|
constructor(args) {
|
|
16
16
|
super({
|
|
17
17
|
...args,
|
|
18
18
|
generatorKey: (0, GeneratorKeys_js_1.toOperationGeneratorKey)({
|
|
19
|
-
generatorId: id,
|
|
19
|
+
generatorId: config.id,
|
|
20
20
|
operation: args.operation
|
|
21
21
|
})
|
|
22
22
|
});
|
|
@@ -27,7 +27,7 @@ const toOperationConfig = ({ id, entityType, toName, toExportPath, isSelected, i
|
|
|
27
27
|
enumerable: true,
|
|
28
28
|
configurable: true,
|
|
29
29
|
writable: true,
|
|
30
|
-
value: id
|
|
30
|
+
value: config.id
|
|
31
31
|
}),
|
|
32
32
|
Object.defineProperty(_a, "type", {
|
|
33
33
|
enumerable: true,
|
|
@@ -45,37 +45,37 @@ const toOperationConfig = ({ id, entityType, toName, toExportPath, isSelected, i
|
|
|
45
45
|
enumerable: true,
|
|
46
46
|
configurable: true,
|
|
47
47
|
writable: true,
|
|
48
|
-
value: entityType ?? new EntityType_js_1.EntityType('variable')
|
|
48
|
+
value: config.entityType ?? new EntityType_js_1.EntityType('variable')
|
|
49
49
|
}),
|
|
50
50
|
Object.defineProperty(_a, "toName", {
|
|
51
51
|
enumerable: true,
|
|
52
52
|
configurable: true,
|
|
53
53
|
writable: true,
|
|
54
|
-
value: toName
|
|
54
|
+
value: config.toName.bind(config)
|
|
55
55
|
}),
|
|
56
56
|
Object.defineProperty(_a, "toExportPath", {
|
|
57
57
|
enumerable: true,
|
|
58
58
|
configurable: true,
|
|
59
59
|
writable: true,
|
|
60
|
-
value: toExportPath
|
|
60
|
+
value: config.toExportPath.bind(config)
|
|
61
61
|
}),
|
|
62
62
|
Object.defineProperty(_a, "isSelected", {
|
|
63
63
|
enumerable: true,
|
|
64
64
|
configurable: true,
|
|
65
65
|
writable: true,
|
|
66
|
-
value: isSelected ?? (() => true)
|
|
66
|
+
value: config.isSelected ?? (() => true)
|
|
67
67
|
}),
|
|
68
68
|
Object.defineProperty(_a, "isSupported", {
|
|
69
69
|
enumerable: true,
|
|
70
70
|
configurable: true,
|
|
71
71
|
writable: true,
|
|
72
|
-
value: isSupported ?? (() => true)
|
|
72
|
+
value: config.isSupported ?? (() => true)
|
|
73
73
|
}),
|
|
74
74
|
Object.defineProperty(_a, "pinnable", {
|
|
75
75
|
enumerable: true,
|
|
76
76
|
configurable: true,
|
|
77
77
|
writable: true,
|
|
78
|
-
value: pinnable ?? false
|
|
78
|
+
value: config.pinnable ?? false
|
|
79
79
|
}),
|
|
80
80
|
_a);
|
|
81
81
|
const OperationGateway = (_b = class extends GeneratorBase_js_1.GatewayBase {
|
|
@@ -88,7 +88,7 @@ const toOperationConfig = ({ id, entityType, toName, toExportPath, isSelected, i
|
|
|
88
88
|
enumerable: true,
|
|
89
89
|
configurable: true,
|
|
90
90
|
writable: true,
|
|
91
|
-
value: id
|
|
91
|
+
value: config.id
|
|
92
92
|
}),
|
|
93
93
|
Object.defineProperty(_b, "type", {
|
|
94
94
|
enumerable: true,
|
|
@@ -106,15 +106,15 @@ const toOperationConfig = ({ id, entityType, toName, toExportPath, isSelected, i
|
|
|
106
106
|
enumerable: true,
|
|
107
107
|
configurable: true,
|
|
108
108
|
writable: true,
|
|
109
|
-
value: isSupported ?? (() => true)
|
|
109
|
+
value: config.isSupported ?? (() => true)
|
|
110
110
|
}),
|
|
111
111
|
Object.defineProperty(_b, "pinnable", {
|
|
112
112
|
enumerable: true,
|
|
113
113
|
configurable: true,
|
|
114
114
|
writable: true,
|
|
115
|
-
value: pinnable ?? false
|
|
115
|
+
value: config.pinnable ?? false
|
|
116
116
|
}),
|
|
117
117
|
_b);
|
|
118
118
|
return { OperationInsertable, OperationGateway };
|
|
119
119
|
};
|
|
120
|
-
exports.
|
|
120
|
+
exports.toOperationBase = toOperationBase;
|