@skmtc/core 0.0.381 → 0.0.382
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/CoreContext.d.ts +2 -2
- package/esm/context/CoreContext.d.ts.map +1 -1
- package/esm/context/GenerateContext.d.ts +46 -14
- package/esm/context/GenerateContext.d.ts.map +1 -1
- package/esm/context/GenerateContext.js +187 -76
- package/esm/context/RenderContext.d.ts +3 -3
- package/esm/context/RenderContext.d.ts.map +1 -1
- package/esm/context/types.d.ts +2 -2
- package/esm/context/types.d.ts.map +1 -1
- package/esm/dsl/model/ModelBase.d.ts.map +1 -1
- package/esm/dsl/model/ModelBase.js +1 -1
- package/esm/dsl/model/ModelInsertable.d.ts +13 -5
- package/esm/dsl/model/ModelInsertable.d.ts.map +1 -1
- package/esm/dsl/model/toModelGateway.d.ts +26 -0
- package/esm/dsl/model/toModelGateway.d.ts.map +1 -0
- package/esm/dsl/model/toModelGateway.js +70 -0
- package/esm/dsl/model/toModelInsertable.d.ts +36 -0
- package/esm/dsl/model/toModelInsertable.d.ts.map +1 -0
- package/esm/dsl/model/{toModelBase.js → toModelInsertable.js} +3 -41
- package/esm/dsl/operation/OperationBase.d.ts.map +1 -1
- package/esm/dsl/operation/OperationBase.js +1 -1
- package/esm/dsl/operation/OperationInsertable.d.ts +17 -5
- package/esm/dsl/operation/OperationInsertable.d.ts.map +1 -1
- package/esm/dsl/operation/toOperationGateway.d.ts +28 -0
- package/esm/dsl/operation/toOperationGateway.d.ts.map +1 -0
- package/esm/dsl/operation/toOperationGateway.js +70 -0
- package/esm/dsl/operation/toOperationInsertable.d.ts +43 -0
- package/esm/dsl/operation/toOperationInsertable.d.ts.map +1 -0
- package/esm/dsl/operation/{toOperationBase.js → toOperationInsertable.js} +3 -41
- package/esm/helpers/ResultsLog.d.ts +2 -2
- package/esm/helpers/ResultsLog.d.ts.map +1 -1
- package/esm/helpers/ResultsLog.js +11 -3
- package/esm/mod.d.ts +4 -2
- package/esm/mod.d.ts.map +1 -1
- package/esm/mod.js +4 -2
- package/esm/types/Results.d.ts +3 -3
- package/esm/types/Results.d.ts.map +1 -1
- package/esm/types/Results.js +2 -2
- package/esm/types/Settings.d.ts +24 -12
- package/esm/types/Settings.d.ts.map +1 -1
- package/esm/types/Settings.js +4 -3
- package/package.json +1 -1
- package/script/context/CoreContext.d.ts +2 -2
- package/script/context/CoreContext.d.ts.map +1 -1
- package/script/context/GenerateContext.d.ts +46 -14
- package/script/context/GenerateContext.d.ts.map +1 -1
- package/script/context/GenerateContext.js +187 -76
- package/script/context/RenderContext.d.ts +3 -3
- package/script/context/RenderContext.d.ts.map +1 -1
- package/script/context/types.d.ts +2 -2
- package/script/context/types.d.ts.map +1 -1
- package/script/dsl/model/ModelBase.d.ts.map +1 -1
- package/script/dsl/model/ModelBase.js +1 -1
- package/script/dsl/model/ModelInsertable.d.ts +13 -5
- package/script/dsl/model/ModelInsertable.d.ts.map +1 -1
- package/script/dsl/model/toModelGateway.d.ts +26 -0
- package/script/dsl/model/toModelGateway.d.ts.map +1 -0
- package/script/dsl/model/toModelGateway.js +74 -0
- package/script/dsl/model/toModelInsertable.d.ts +36 -0
- package/script/dsl/model/toModelInsertable.d.ts.map +1 -0
- package/script/dsl/model/{toModelBase.js → toModelInsertable.js} +5 -43
- package/script/dsl/operation/OperationBase.d.ts.map +1 -1
- package/script/dsl/operation/OperationBase.js +1 -1
- package/script/dsl/operation/OperationInsertable.d.ts +17 -5
- package/script/dsl/operation/OperationInsertable.d.ts.map +1 -1
- package/script/dsl/operation/toOperationGateway.d.ts +28 -0
- package/script/dsl/operation/toOperationGateway.d.ts.map +1 -0
- package/script/dsl/operation/toOperationGateway.js +74 -0
- package/script/dsl/operation/toOperationInsertable.d.ts +43 -0
- package/script/dsl/operation/toOperationInsertable.d.ts.map +1 -0
- package/script/dsl/operation/{toOperationBase.js → toOperationInsertable.js} +5 -43
- package/script/helpers/ResultsLog.d.ts +2 -2
- package/script/helpers/ResultsLog.d.ts.map +1 -1
- package/script/helpers/ResultsLog.js +11 -3
- package/script/mod.d.ts +4 -2
- package/script/mod.d.ts.map +1 -1
- package/script/mod.js +4 -2
- package/script/types/Results.d.ts +3 -3
- package/script/types/Results.d.ts.map +1 -1
- package/script/types/Results.js +3 -3
- package/script/types/Settings.d.ts +24 -12
- package/script/types/Settings.d.ts.map +1 -1
- package/script/types/Settings.js +4 -3
- package/esm/dsl/model/toModelBase.d.ts +0 -48
- package/esm/dsl/model/toModelBase.d.ts.map +0 -1
- package/esm/dsl/operation/toOperationBase.d.ts +0 -55
- package/esm/dsl/operation/toOperationBase.d.ts.map +0 -1
- package/script/dsl/model/toModelBase.d.ts +0 -48
- package/script/dsl/model/toModelBase.d.ts.map +0 -1
- package/script/dsl/operation/toOperationBase.d.ts +0 -55
- package/script/dsl/operation/toOperationBase.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/context/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AACtD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAC7D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AACzD,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/context/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AACtD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAC7D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AACzD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AAErD,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,UAAU,GAAG,QAAQ,CAAA;AAEvD,MAAM,MAAM,YAAY,GAAG;IACzB,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC,CAAA;IACjC,WAAW,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,CAAA;IACpC,aAAa,EAAE,GAAG,CAAC,YAAY,CAAC,CAAA;CACjC,CAAA;AAED,MAAM,MAAM,cAAc,GAAG;IAC3B,eAAe,CAAC,EAAE,OAAO,CAAA;CAC1B,CAAA;AAED,MAAM,MAAM,mBAAmB,GAAG;IAChC,YAAY,EAAE,YAAY,CAAA;CAC3B,CAAA;AAED,MAAM,MAAM,iBAAiB,GAAG;IAC9B,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACjC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAA;IACpC,QAAQ,EAAE,OAAO,CAAC,MAAM,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC,CAAA;CAChD,CAAA;AAED,MAAM,MAAM,YAAY,GAAG;IACzB,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACjC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAA;IACpC,QAAQ,EAAE,OAAO,CAAC,MAAM,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC,CAAA;IAC/C,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAA;CACpC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModelBase.d.ts","sourceRoot":"","sources":["../../../src/dsl/model/ModelBase.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"ModelBase.d.ts","sourceRoot":"","sources":["../../../src/dsl/model/ModelBase.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAA;AACrF,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;AAC3C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAE9C,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;IAChB,YAAY,EAAE,YAAY,CAAA;gBACd,EAAE,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,OAAO,EAAE,EAAE,aAAa;IAQvE,SAAS,CAAC,CAAC,SAAS,cAAc,EAChC,UAAU,EAAE,eAAe,CAAC,CAAC,CAAC,EAC9B,OAAO,EAAE,OAAO,GACf,QAAQ,CAAC,CAAC,EAAE,OAAO,CAAC;IASvB,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC,YAAY,CAAC,GAAG,IAAI;CAM5C"}
|
|
@@ -9,7 +9,7 @@ type ModelInsertableConstructorArgs = {
|
|
|
9
9
|
settings: ContentSettings;
|
|
10
10
|
destinationPath: string;
|
|
11
11
|
};
|
|
12
|
-
export type
|
|
12
|
+
export type ToModelIdentifierArgs = {
|
|
13
13
|
refName: RefName;
|
|
14
14
|
baseSettings: BaseSettings;
|
|
15
15
|
};
|
|
@@ -24,13 +24,21 @@ export type IsModelSelectedArgs = {
|
|
|
24
24
|
export type WithTransformModel = {
|
|
25
25
|
transformModel: (refName: RefName) => void;
|
|
26
26
|
};
|
|
27
|
+
export type ModelGatewayConstructorArgs = {
|
|
28
|
+
context: GenerateContext;
|
|
29
|
+
settings: ContentSettings;
|
|
30
|
+
};
|
|
27
31
|
export type ModelGateway = {
|
|
28
|
-
new (context:
|
|
32
|
+
new ({ context, settings }: ModelGatewayConstructorArgs): WithTransformModel;
|
|
29
33
|
id: string;
|
|
30
34
|
type: 'model';
|
|
31
35
|
_class: 'ModelGateway';
|
|
32
|
-
|
|
36
|
+
toIdentifier: (baseSettings: BaseSettings) => Identifier;
|
|
37
|
+
toExportPath: (baseSettings: BaseSettings) => string;
|
|
38
|
+
isGeneratorSelected: (baseSettings: BaseSettings) => boolean;
|
|
39
|
+
isModelSelected: ({ refName, baseSettings }: IsModelSelectedArgs) => boolean;
|
|
33
40
|
isSupported: () => boolean;
|
|
41
|
+
pinnable: boolean;
|
|
34
42
|
};
|
|
35
43
|
export type ModelInsertable<V> = {
|
|
36
44
|
prototype: V;
|
|
@@ -39,11 +47,11 @@ export type ModelInsertable<V> = {
|
|
|
39
47
|
id: string;
|
|
40
48
|
type: 'model';
|
|
41
49
|
_class: 'ModelInsertable';
|
|
42
|
-
toIdentifier: ({ refName, baseSettings }:
|
|
50
|
+
toIdentifier: ({ refName, baseSettings }: ToModelIdentifierArgs) => Identifier;
|
|
43
51
|
toExportPath: ({ refName, baseSettings }: ToModelExportPathArgs) => string;
|
|
44
52
|
isSelected: ({ refName, baseSettings }: IsModelSelectedArgs) => boolean;
|
|
45
|
-
pinnable: boolean;
|
|
46
53
|
isSupported: () => boolean;
|
|
54
|
+
pinnable: boolean;
|
|
47
55
|
} & Function;
|
|
48
56
|
export {};
|
|
49
57
|
//# sourceMappingURL=ModelInsertable.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModelInsertable.d.ts","sourceRoot":"","sources":["../../../src/dsl/model/ModelInsertable.ts"],"names":[],"mappings":"AAA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,EAAE,MAAM,OAAO,CAAA;IAE1B,QAAQ,EAAE,OAAO,CAAA;CAClB,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,UAAU,EAAE,CAAC,EAAE,OAAO,EAAE,YAAY,EAAE,EAAE,mBAAmB,KAAK,OAAO,CAAA;IACvE,WAAW,EAAE,MAAM,OAAO,CAAA;IAE1B,QAAQ,EAAE,OAAO,CAAA;CAGlB,GAAG,QAAQ,CAAA"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { GenerateContext } from '../../context/GenerateContext.js';
|
|
2
|
+
import type { Identifier } from '../Identifier.js';
|
|
3
|
+
import type { BaseSettings } from '../../types/Settings.js';
|
|
4
|
+
import type { IsModelSelectedArgs } from './ModelInsertable.js';
|
|
5
|
+
export type ToModelGatewayArgs = {
|
|
6
|
+
id: string;
|
|
7
|
+
toIdentifier: (baseSettings: BaseSettings) => Identifier;
|
|
8
|
+
toExportPath: (baseSettings: BaseSettings) => string;
|
|
9
|
+
isGeneratorSelected?: (baseSettings: BaseSettings) => boolean;
|
|
10
|
+
isModelSelected?: ({ refName, baseSettings }: IsModelSelectedArgs) => boolean;
|
|
11
|
+
};
|
|
12
|
+
export declare const toModelGateway: (config: ToModelGatewayArgs) => {
|
|
13
|
+
new (context: GenerateContext): {
|
|
14
|
+
context: GenerateContext;
|
|
15
|
+
};
|
|
16
|
+
id: string;
|
|
17
|
+
type: "model";
|
|
18
|
+
_class: "ModelGateway";
|
|
19
|
+
toIdentifier: (baseSettings: BaseSettings) => Identifier;
|
|
20
|
+
toExportPath: (baseSettings: BaseSettings) => string;
|
|
21
|
+
isGeneratorSelected: (baseSettings: BaseSettings) => boolean;
|
|
22
|
+
isModelSelected: ({ refName, baseSettings }: IsModelSelectedArgs) => boolean;
|
|
23
|
+
isSupported: () => boolean;
|
|
24
|
+
pinnable: boolean;
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=toModelGateway.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toModelGateway.d.ts","sourceRoot":"","sources":["../../../src/dsl/model/toModelGateway.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAA;AAEvE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAClD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAA;AAC3D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAE/D,MAAM,MAAM,kBAAkB,GAAG;IAC/B,EAAE,EAAE,MAAM,CAAA;IACV,YAAY,EAAE,CAAC,YAAY,EAAE,YAAY,KAAK,UAAU,CAAA;IACxD,YAAY,EAAE,CAAC,YAAY,EAAE,YAAY,KAAK,MAAM,CAAA;IAEpD,mBAAmB,CAAC,EAAE,CAAC,YAAY,EAAE,YAAY,KAAK,OAAO,CAAA;IAC7D,eAAe,CAAC,EAAE,CAAC,EAAE,OAAO,EAAE,YAAY,EAAE,EAAE,mBAAmB,KAAK,OAAO,CAAA;CAC9E,CAAA;AAED,eAAO,MAAM,cAAc,WAAY,kBAAkB;kBAehC,eAAe;;;;;;iCAtBT,YAAY,KAAK,UAAU;iCAC3B,YAAY,KAAK,MAAM;wCAEf,YAAY,KAAK,OAAO;iDACf,mBAAmB,KAAK,OAAO;;;CAwB9E,CAAA"}
|
|
@@ -0,0 +1,70 @@
|
|
|
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 { GatewayBase } from '../GeneratorBase.js';
|
|
6
|
+
export const toModelGateway = (config) => {
|
|
7
|
+
var _a;
|
|
8
|
+
const ModelGateway = (_a = class extends GatewayBase {
|
|
9
|
+
constructor(context) {
|
|
10
|
+
super(context);
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
__setFunctionName(_a, "ModelGateway"),
|
|
14
|
+
Object.defineProperty(_a, "id", {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
configurable: true,
|
|
17
|
+
writable: true,
|
|
18
|
+
value: config.id
|
|
19
|
+
}),
|
|
20
|
+
Object.defineProperty(_a, "type", {
|
|
21
|
+
enumerable: true,
|
|
22
|
+
configurable: true,
|
|
23
|
+
writable: true,
|
|
24
|
+
value: 'model'
|
|
25
|
+
}),
|
|
26
|
+
Object.defineProperty(_a, "_class", {
|
|
27
|
+
enumerable: true,
|
|
28
|
+
configurable: true,
|
|
29
|
+
writable: true,
|
|
30
|
+
value: 'ModelGateway'
|
|
31
|
+
}),
|
|
32
|
+
Object.defineProperty(_a, "toIdentifier", {
|
|
33
|
+
enumerable: true,
|
|
34
|
+
configurable: true,
|
|
35
|
+
writable: true,
|
|
36
|
+
value: config.toIdentifier.bind(config)
|
|
37
|
+
}),
|
|
38
|
+
Object.defineProperty(_a, "toExportPath", {
|
|
39
|
+
enumerable: true,
|
|
40
|
+
configurable: true,
|
|
41
|
+
writable: true,
|
|
42
|
+
value: config.toExportPath.bind(config)
|
|
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, "isModelSelected", {
|
|
51
|
+
enumerable: true,
|
|
52
|
+
configurable: true,
|
|
53
|
+
writable: true,
|
|
54
|
+
value: config.isModelSelected ?? (() => true)
|
|
55
|
+
}),
|
|
56
|
+
Object.defineProperty(_a, "isSupported", {
|
|
57
|
+
enumerable: true,
|
|
58
|
+
configurable: true,
|
|
59
|
+
writable: true,
|
|
60
|
+
value: () => true
|
|
61
|
+
}),
|
|
62
|
+
Object.defineProperty(_a, "pinnable", {
|
|
63
|
+
enumerable: true,
|
|
64
|
+
configurable: true,
|
|
65
|
+
writable: true,
|
|
66
|
+
value: false
|
|
67
|
+
}),
|
|
68
|
+
_a);
|
|
69
|
+
return ModelGateway;
|
|
70
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
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 type { IsModelSelectedArgs, ToModelExportPathArgs, ToModelIdentifierArgs } from './ModelInsertable.js';
|
|
5
|
+
import type { Identifier } from '../Identifier.js';
|
|
6
|
+
export type ModelInsertableArgs = {
|
|
7
|
+
context: GenerateContext;
|
|
8
|
+
settings: ContentSettings;
|
|
9
|
+
refName: RefName;
|
|
10
|
+
};
|
|
11
|
+
export type ModelConfig = {
|
|
12
|
+
id: string;
|
|
13
|
+
toIdentifier: ({ refName, baseSettings }: ToModelIdentifierArgs) => Identifier;
|
|
14
|
+
toExportPath: ({ refName, baseSettings }: ToModelExportPathArgs) => string;
|
|
15
|
+
isSelected?: ({ refName, baseSettings }: IsModelSelectedArgs) => boolean;
|
|
16
|
+
};
|
|
17
|
+
export declare const toModelInsertable: (config: ModelConfig) => {
|
|
18
|
+
new (args: ModelInsertableArgs): {
|
|
19
|
+
settings: ContentSettings;
|
|
20
|
+
refName: RefName;
|
|
21
|
+
generatorKey: import("../../types/GeneratorKeys.js").GeneratorKey;
|
|
22
|
+
transform<V extends import("../../mod.js").GeneratedValue>(insertable: import("./ModelInsertable.js").ModelInsertable<V>, refName: RefName): import("../Inserted.js").Inserted<V, "force">;
|
|
23
|
+
register(args: Partial<import("../../context/GenerateContext.js").RegisterArgs>): void;
|
|
24
|
+
context: GenerateContext;
|
|
25
|
+
skipped: boolean;
|
|
26
|
+
};
|
|
27
|
+
id: string;
|
|
28
|
+
type: "model";
|
|
29
|
+
_class: "ModelInsertable";
|
|
30
|
+
toIdentifier: ({ refName, baseSettings }: ToModelIdentifierArgs) => Identifier;
|
|
31
|
+
toExportPath: ({ refName, baseSettings }: ToModelExportPathArgs) => string;
|
|
32
|
+
isSelected: ({ refName, baseSettings }: IsModelSelectedArgs) => boolean;
|
|
33
|
+
isSupported: () => boolean;
|
|
34
|
+
pinnable: boolean;
|
|
35
|
+
};
|
|
36
|
+
//# sourceMappingURL=toModelInsertable.d.ts.map
|
|
@@ -0,0 +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,EACV,mBAAmB,EACnB,qBAAqB,EACrB,qBAAqB,EACtB,MAAM,sBAAsB,CAAA;AAE7B,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;IAC1E,UAAU,CAAC,EAAE,CAAC,EAAE,OAAO,EAAE,YAAY,EAAE,EAAE,mBAAmB,KAAK,OAAO,CAAA;CACzE,CAAA;AAED,eAAO,MAAM,iBAAiB,WAAY,WAAW;eAc/B,mBAAmB;;;;;;;;;;;;8CAnBG,qBAAqB,KAAK,UAAU;8CACpC,qBAAqB,KAAK,MAAM;4CACjC,mBAAmB,KAAK,OAAO;;;CA6BzE,CAAA"}
|
|
@@ -3,10 +3,9 @@ var __setFunctionName = (this && this.__setFunctionName) || function (f, name, p
|
|
|
3
3
|
return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
|
|
4
4
|
};
|
|
5
5
|
import { toModelGeneratorKey } from '../../types/GeneratorKeys.js';
|
|
6
|
-
import { GatewayBase } from '../GeneratorBase.js';
|
|
7
6
|
import { ModelBase } from './ModelBase.js';
|
|
8
|
-
export const
|
|
9
|
-
var _a
|
|
7
|
+
export const toModelInsertable = (config) => {
|
|
8
|
+
var _a;
|
|
10
9
|
const ModelInsertable = (_a = class extends ModelBase {
|
|
11
10
|
constructor(args) {
|
|
12
11
|
super({
|
|
@@ -68,42 +67,5 @@ export const toModelBase = (config) => {
|
|
|
68
67
|
value: false
|
|
69
68
|
}),
|
|
70
69
|
_a);
|
|
71
|
-
|
|
72
|
-
constructor(context) {
|
|
73
|
-
super(context);
|
|
74
|
-
}
|
|
75
|
-
},
|
|
76
|
-
__setFunctionName(_b, "ModelGateway"),
|
|
77
|
-
Object.defineProperty(_b, "id", {
|
|
78
|
-
enumerable: true,
|
|
79
|
-
configurable: true,
|
|
80
|
-
writable: true,
|
|
81
|
-
value: config.id
|
|
82
|
-
}),
|
|
83
|
-
Object.defineProperty(_b, "type", {
|
|
84
|
-
enumerable: true,
|
|
85
|
-
configurable: true,
|
|
86
|
-
writable: true,
|
|
87
|
-
value: 'model'
|
|
88
|
-
}),
|
|
89
|
-
Object.defineProperty(_b, "_class", {
|
|
90
|
-
enumerable: true,
|
|
91
|
-
configurable: true,
|
|
92
|
-
writable: true,
|
|
93
|
-
value: 'ModelGateway'
|
|
94
|
-
}),
|
|
95
|
-
Object.defineProperty(_b, "isSupported", {
|
|
96
|
-
enumerable: true,
|
|
97
|
-
configurable: true,
|
|
98
|
-
writable: true,
|
|
99
|
-
value: () => true
|
|
100
|
-
}),
|
|
101
|
-
Object.defineProperty(_b, "pinnable", {
|
|
102
|
-
enumerable: true,
|
|
103
|
-
configurable: true,
|
|
104
|
-
writable: true,
|
|
105
|
-
value: false
|
|
106
|
-
}),
|
|
107
|
-
_b);
|
|
108
|
-
return { ModelInsertable, ModelGateway };
|
|
70
|
+
return ModelInsertable;
|
|
109
71
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OperationBase.d.ts","sourceRoot":"","sources":["../../../src/dsl/operation/OperationBase.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AACnE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAA;AACpE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAC5D,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"OperationBase.d.ts","sourceRoot":"","sources":["../../../src/dsl/operation/OperationBase.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AACnE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAA;AACpE,OAAO,KAA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AAS,UAAU,EAAE,EACrD,MAAM,EACN,UAAU,EACV,eAAe,EAChB,EAAE,2BAA2B,CAAC,MAAM,CAAC,GAAG,UAAU,CAAC,gBAAgB,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC;IASrF,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC,YAAY,CAAC;CAMrC"}
|
|
@@ -8,7 +8,7 @@ type OperationInsertableConstructorArgs = {
|
|
|
8
8
|
settings: ContentSettings;
|
|
9
9
|
operation: OasOperation;
|
|
10
10
|
};
|
|
11
|
-
export type
|
|
11
|
+
export type ToOperationIdentifierArgs = {
|
|
12
12
|
operation: OasOperation;
|
|
13
13
|
baseSettings: BaseSettings;
|
|
14
14
|
};
|
|
@@ -20,16 +20,28 @@ export type IsOperationSelectedArgs = {
|
|
|
20
20
|
operation: OasOperation;
|
|
21
21
|
baseSettings: BaseSettings;
|
|
22
22
|
};
|
|
23
|
+
export type IsGeneratorSelectedArgs = {
|
|
24
|
+
operation: OasOperation;
|
|
25
|
+
baseSettings: BaseSettings;
|
|
26
|
+
};
|
|
23
27
|
export type WithTransformOperation = {
|
|
24
28
|
transformOperation: (operation: OasOperation) => void;
|
|
25
29
|
};
|
|
30
|
+
export type OperationGatewayConstructorArgs = {
|
|
31
|
+
context: GenerateContext;
|
|
32
|
+
settings: ContentSettings;
|
|
33
|
+
};
|
|
26
34
|
export type OperationGateway = {
|
|
27
|
-
new (context:
|
|
35
|
+
new ({ context, settings }: OperationGatewayConstructorArgs): WithTransformOperation;
|
|
28
36
|
id: string;
|
|
29
37
|
type: 'operation';
|
|
30
38
|
_class: 'OperationGateway';
|
|
31
|
-
|
|
39
|
+
toIdentifier: (baseSettings: BaseSettings) => Identifier;
|
|
40
|
+
toExportPath: (baseSettings: BaseSettings) => string;
|
|
41
|
+
isGeneratorSelected: (baseSettings: BaseSettings) => boolean;
|
|
42
|
+
isOperationSelected: ({ operation, baseSettings }: IsOperationSelectedArgs) => boolean;
|
|
32
43
|
isSupported: (operation: OasOperation) => boolean;
|
|
44
|
+
pinnable: boolean;
|
|
33
45
|
};
|
|
34
46
|
export type OperationInsertable<V> = {
|
|
35
47
|
prototype: V;
|
|
@@ -38,11 +50,11 @@ export type OperationInsertable<V> = {
|
|
|
38
50
|
id: string;
|
|
39
51
|
type: 'operation';
|
|
40
52
|
_class: 'OperationInsertable';
|
|
41
|
-
toIdentifier: ({ operation, baseSettings }:
|
|
53
|
+
toIdentifier: ({ operation, baseSettings }: ToOperationIdentifierArgs) => Identifier;
|
|
42
54
|
toExportPath: ({ operation, baseSettings }: ToOperationExportPathArgs) => string;
|
|
43
55
|
isSelected: ({ operation, baseSettings }: IsOperationSelectedArgs) => boolean;
|
|
44
|
-
pinnable: boolean;
|
|
45
56
|
isSupported: (operation: OasOperation) => boolean;
|
|
57
|
+
pinnable: boolean;
|
|
46
58
|
} & Function;
|
|
47
59
|
export {};
|
|
48
60
|
//# sourceMappingURL=OperationInsertable.d.ts.map
|
|
@@ -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,uBAAuB,GAAG;IACpC,SAAS,EAAE,YAAY,CAAA;IACvB,YAAY,EAAE,YAAY,CAAA;CAC3B,CAAA;AAED,MAAM,MAAM,sBAAsB,GAAG;IACnC,kBAAkB,EAAE,CAAC,SAAS,EAAE,YAAY,KAAK,IAAI,CAAA;CACtD,CAAA;AAED,MAAM,MAAM,gBAAgB,GAAG;IAC7B,KAAK,OAAO,EAAE,
|
|
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,uBAAuB,GAAG;IACpC,SAAS,EAAE,YAAY,CAAA;IACvB,YAAY,EAAE,YAAY,CAAA;CAC3B,CAAA;AAED,MAAM,MAAM,uBAAuB,G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,YAAY,EAAE,CAAC,EAAE,SAAS,EAAE,YAAY,EAAE,EAAE,yBAAyB,KAAK,MAAM,CAAA;IAEhF,UAAU,EAAE,CAAC,EAAE,SAAS,EAAE,YAAY,EAAE,EAAE,uBAAuB,KAAK,OAAO,CAAA;IAC7E,WAAW,EAAE,CAAC,SAAS,EAAE,YAAY,KAAK,OAAO,CAAA;IAEjD,QAAQ,EAAE,OAAO,CAAA;CAGlB,GAAG,QAAQ,CAAA"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { GenerateContext } from '../../context/GenerateContext.js';
|
|
2
|
+
import type { OasOperation } from '../../oas/operation/Operation.js';
|
|
3
|
+
import type { Identifier } from '../Identifier.js';
|
|
4
|
+
import type { BaseSettings } from '../../types/Settings.js';
|
|
5
|
+
import type { IsOperationSelectedArgs } from './OperationInsertable.js';
|
|
6
|
+
export type ToOperationGatewayArgs = {
|
|
7
|
+
id: string;
|
|
8
|
+
toIdentifier: (baseSettings: BaseSettings) => Identifier;
|
|
9
|
+
toExportPath: (baseSettings: BaseSettings) => string;
|
|
10
|
+
isGeneratorSelected?: (baseSettings: BaseSettings) => boolean;
|
|
11
|
+
isOperationSelected?: ({ operation, baseSettings }: IsOperationSelectedArgs) => boolean;
|
|
12
|
+
isSupported?: (operation: OasOperation) => boolean;
|
|
13
|
+
};
|
|
14
|
+
export declare const toOperationGateway: (config: ToOperationGatewayArgs) => {
|
|
15
|
+
new (context: GenerateContext): {
|
|
16
|
+
context: GenerateContext;
|
|
17
|
+
};
|
|
18
|
+
id: string;
|
|
19
|
+
type: "operation";
|
|
20
|
+
_class: "OperationGateway";
|
|
21
|
+
toIdentifier: (baseSettings: BaseSettings) => Identifier;
|
|
22
|
+
toExportPath: (baseSettings: BaseSettings) => string;
|
|
23
|
+
isGeneratorSelected: (baseSettings: BaseSettings) => boolean;
|
|
24
|
+
isOperationSelected: ({ operation, baseSettings }: IsOperationSelectedArgs) => boolean;
|
|
25
|
+
isSupported: (operation: OasOperation) => boolean;
|
|
26
|
+
pinnable: boolean;
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=toOperationGateway.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toOperationGateway.d.ts","sourceRoot":"","sources":["../../../src/dsl/operation/toOperationGateway.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAA;AACvE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAA;AAEpE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAClD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAA;AAC3D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAA;AAEvE,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;IAEpD,mBAAmB,CAAC,EAAE,CAAC,YAAY,EAAE,YAAY,KAAK,OAAO,CAAA;IAC7D,mBAAmB,CAAC,EAAE,CAAC,EAAE,SAAS,EAAE,YAAY,EAAE,EAAE,uBAAuB,KAAK,OAAO,CAAA;IAEvF,WAAW,CAAC,EAAE,CAAC,SAAS,EAAE,YAAY,KAAK,OAAO,CAAA;CACnD,CAAA;AAED,eAAO,MAAM,kBAAkB,WAAY,sBAAsB;kBAexC,eAAe;;;;;;iCAxBT,YAAY,KAAK,UAAU;iCAC3B,YAAY,KAAK,MAAM;wCAEf,YAAY,KAAK,OAAO;uDACT,uBAAuB,KAAK,OAAO;6BAE7D,YAAY,KAAK,OAAO;;CAwBnD,CAAA"}
|
|
@@ -0,0 +1,70 @@
|
|
|
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 { GatewayBase } from '../GeneratorBase.js';
|
|
6
|
+
export const toOperationGateway = (config) => {
|
|
7
|
+
var _a;
|
|
8
|
+
const OperationGateway = (_a = class extends GatewayBase {
|
|
9
|
+
constructor(context) {
|
|
10
|
+
super(context);
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
__setFunctionName(_a, "OperationGateway"),
|
|
14
|
+
Object.defineProperty(_a, "id", {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
configurable: true,
|
|
17
|
+
writable: true,
|
|
18
|
+
value: config.id
|
|
19
|
+
}),
|
|
20
|
+
Object.defineProperty(_a, "type", {
|
|
21
|
+
enumerable: true,
|
|
22
|
+
configurable: true,
|
|
23
|
+
writable: true,
|
|
24
|
+
value: 'operation'
|
|
25
|
+
}),
|
|
26
|
+
Object.defineProperty(_a, "_class", {
|
|
27
|
+
enumerable: true,
|
|
28
|
+
configurable: true,
|
|
29
|
+
writable: true,
|
|
30
|
+
value: 'OperationGateway'
|
|
31
|
+
}),
|
|
32
|
+
Object.defineProperty(_a, "toIdentifier", {
|
|
33
|
+
enumerable: true,
|
|
34
|
+
configurable: true,
|
|
35
|
+
writable: true,
|
|
36
|
+
value: config.toIdentifier.bind(config)
|
|
37
|
+
}),
|
|
38
|
+
Object.defineProperty(_a, "toExportPath", {
|
|
39
|
+
enumerable: true,
|
|
40
|
+
configurable: true,
|
|
41
|
+
writable: true,
|
|
42
|
+
value: config.toExportPath.bind(config)
|
|
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
|
+
Object.defineProperty(_a, "isSupported", {
|
|
57
|
+
enumerable: true,
|
|
58
|
+
configurable: true,
|
|
59
|
+
writable: true,
|
|
60
|
+
value: config.isSupported ?? (() => true)
|
|
61
|
+
}),
|
|
62
|
+
Object.defineProperty(_a, "pinnable", {
|
|
63
|
+
enumerable: true,
|
|
64
|
+
configurable: true,
|
|
65
|
+
writable: true,
|
|
66
|
+
value: false
|
|
67
|
+
}),
|
|
68
|
+
_a);
|
|
69
|
+
return OperationGateway;
|
|
70
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { GenerateContext } from '../../context/GenerateContext.js';
|
|
2
|
+
import type { OasOperation } from '../../oas/operation/Operation.js';
|
|
3
|
+
import type { ContentSettings } from '../ContentSettings.js';
|
|
4
|
+
import type { ToOperationIdentifierArgs, ToOperationExportPathArgs, IsOperationSelectedArgs } from './OperationInsertable.js';
|
|
5
|
+
import type { Identifier } from '../Identifier.js';
|
|
6
|
+
export type OperationInsertableArgs = {
|
|
7
|
+
context: GenerateContext;
|
|
8
|
+
settings: ContentSettings;
|
|
9
|
+
operation: OasOperation;
|
|
10
|
+
};
|
|
11
|
+
export type ToOperationInsertableArgs = {
|
|
12
|
+
id: string;
|
|
13
|
+
toIdentifier: ({ operation, baseSettings }: ToOperationIdentifierArgs) => Identifier;
|
|
14
|
+
toExportPath: ({ operation, baseSettings }: ToOperationExportPathArgs) => string;
|
|
15
|
+
isSelected?: ({ operation, baseSettings }: IsOperationSelectedArgs) => boolean;
|
|
16
|
+
isSupported?: (operation: OasOperation) => boolean;
|
|
17
|
+
pinnable?: boolean;
|
|
18
|
+
};
|
|
19
|
+
export declare const toOperationInsertable: (config: ToOperationInsertableArgs) => {
|
|
20
|
+
new (args: OperationInsertableArgs): {
|
|
21
|
+
settings: ContentSettings;
|
|
22
|
+
operation: OasOperation;
|
|
23
|
+
generatorKey: import("../../types/GeneratorKeys.js").GeneratorKey;
|
|
24
|
+
insert<V extends import("../../mod.js").GeneratedValue>(insertable: import("./OperationInsertable.js").OperationInsertable<V>, operation: OasOperation): import("../Inserted.js").Inserted<V, "force">;
|
|
25
|
+
createAndRegisterDefinition<Schema extends import("../../mod.js").SchemaType>({ schema, identifier, schemaToValueFn }: {
|
|
26
|
+
schema: Schema;
|
|
27
|
+
identifier: Identifier;
|
|
28
|
+
schemaToValueFn: import("../../mod.js").SchemaToValueFn;
|
|
29
|
+
}): import("../Definition.js").Definition<import("../../mod.js").TypeSystemOutput<Schema["type"]>>;
|
|
30
|
+
register(args: Partial<import("../../context/GenerateContext.js").RegisterArgs>): void;
|
|
31
|
+
context: GenerateContext;
|
|
32
|
+
skipped: boolean;
|
|
33
|
+
};
|
|
34
|
+
id: string;
|
|
35
|
+
type: "operation";
|
|
36
|
+
_class: "OperationInsertable";
|
|
37
|
+
toIdentifier: ({ operation, baseSettings }: ToOperationIdentifierArgs) => Identifier;
|
|
38
|
+
toExportPath: ({ operation, baseSettings }: ToOperationExportPathArgs) => string;
|
|
39
|
+
isSelected: ({ operation, baseSettings }: IsOperationSelectedArgs) => boolean;
|
|
40
|
+
isSupported: (operation: OasOperation) => boolean;
|
|
41
|
+
pinnable: boolean;
|
|
42
|
+
};
|
|
43
|
+
//# sourceMappingURL=toOperationInsertable.d.ts.map
|
|
@@ -0,0 +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,EACV,yBAAyB,EACzB,yBAAyB,EACzB,uBAAuB,EACxB,MAAM,0BAA0B,CAAA;AAEjC,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,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,qBAAqB,WAAY,yBAAyB;eAcjD,uBAAuB;;;;;;;;;;;;;;;;;gDArBC,yBAAyB,KAAK,UAAU;gDACxC,yBAAyB,KAAK,MAAM;8CACrC,uBAAuB,KAAK,OAAO;6BACpD,YAAY,KAAK,OAAO;;CA8BnD,CAAA"}
|
|
@@ -4,9 +4,8 @@ var __setFunctionName = (this && this.__setFunctionName) || function (f, name, p
|
|
|
4
4
|
};
|
|
5
5
|
import { toOperationGeneratorKey } from '../../types/GeneratorKeys.js';
|
|
6
6
|
import { OperationBase } from './OperationBase.js';
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
var _a, _b;
|
|
7
|
+
export const toOperationInsertable = (config) => {
|
|
8
|
+
var _a;
|
|
10
9
|
const OperationInsertable = (_a = class extends OperationBase {
|
|
11
10
|
constructor(args) {
|
|
12
11
|
super({
|
|
@@ -68,42 +67,5 @@ export const toOperationBase = (config) => {
|
|
|
68
67
|
value: config.pinnable ?? false
|
|
69
68
|
}),
|
|
70
69
|
_a);
|
|
71
|
-
|
|
72
|
-
constructor(context) {
|
|
73
|
-
super(context);
|
|
74
|
-
}
|
|
75
|
-
},
|
|
76
|
-
__setFunctionName(_b, "OperationGateway"),
|
|
77
|
-
Object.defineProperty(_b, "id", {
|
|
78
|
-
enumerable: true,
|
|
79
|
-
configurable: true,
|
|
80
|
-
writable: true,
|
|
81
|
-
value: config.id
|
|
82
|
-
}),
|
|
83
|
-
Object.defineProperty(_b, "type", {
|
|
84
|
-
enumerable: true,
|
|
85
|
-
configurable: true,
|
|
86
|
-
writable: true,
|
|
87
|
-
value: 'operation'
|
|
88
|
-
}),
|
|
89
|
-
Object.defineProperty(_b, "_class", {
|
|
90
|
-
enumerable: true,
|
|
91
|
-
configurable: true,
|
|
92
|
-
writable: true,
|
|
93
|
-
value: 'OperationGateway'
|
|
94
|
-
}),
|
|
95
|
-
Object.defineProperty(_b, "isSupported", {
|
|
96
|
-
enumerable: true,
|
|
97
|
-
configurable: true,
|
|
98
|
-
writable: true,
|
|
99
|
-
value: config.isSupported ?? (() => true)
|
|
100
|
-
}),
|
|
101
|
-
Object.defineProperty(_b, "pinnable", {
|
|
102
|
-
enumerable: true,
|
|
103
|
-
configurable: true,
|
|
104
|
-
writable: true,
|
|
105
|
-
value: config.pinnable ?? false
|
|
106
|
-
}),
|
|
107
|
-
_b);
|
|
108
|
-
return { OperationInsertable, OperationGateway };
|
|
70
|
+
return OperationInsertable;
|
|
109
71
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { ResultsItem,
|
|
1
|
+
import type { ResultsItem, ResultType } from '../types/Results.js';
|
|
2
2
|
export declare class ResultsLog {
|
|
3
3
|
#private;
|
|
4
4
|
constructor();
|
|
5
|
-
capture(stackTrail: string, result:
|
|
5
|
+
capture(stackTrail: string, result: ResultType): void;
|
|
6
6
|
toTree(): ResultsItem;
|
|
7
7
|
}
|
|
8
8
|
//# sourceMappingURL=ResultsLog.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResultsLog.d.ts","sourceRoot":"","sources":["../../src/helpers/ResultsLog.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"ResultsLog.d.ts","sourceRoot":"","sources":["../../src/helpers/ResultsLog.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AAGlE,qBAAa,UAAU;;;IAOrB,OAAO,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU;IAc9C,MAAM,IAAI,WAAW;CAWtB"}
|
|
@@ -32,7 +32,15 @@ export class ResultsLog {
|
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
_ResultsLog_results = new WeakMap(), _ResultsLog_instances = new WeakSet(), _ResultsLog_incomingResultIsWorse = function _ResultsLog_incomingResultIsWorse(current, incoming) {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
35
|
+
if (current === undefined) {
|
|
36
|
+
return true;
|
|
37
|
+
}
|
|
38
|
+
return resultRankings[current] < resultRankings[incoming];
|
|
39
|
+
};
|
|
40
|
+
const resultRankings = {
|
|
41
|
+
error: 50,
|
|
42
|
+
warning: 40,
|
|
43
|
+
success: 30,
|
|
44
|
+
notSelected: 20,
|
|
45
|
+
notSupported: 10
|
|
38
46
|
};
|
package/esm/mod.d.ts
CHANGED
|
@@ -14,12 +14,14 @@ export * from './dsl/Inserted.js';
|
|
|
14
14
|
export * from './dsl/model/ModelBase.js';
|
|
15
15
|
export * from './dsl/model/ModelDriver.js';
|
|
16
16
|
export * from './dsl/model/ModelInsertable.js';
|
|
17
|
-
export * from './dsl/model/
|
|
17
|
+
export * from './dsl/model/toModelInsertable.js';
|
|
18
|
+
export * from './dsl/model/toModelGateway.js';
|
|
18
19
|
export * from './dsl/operation/OperationBase.js';
|
|
19
20
|
export * from './dsl/operation/OperationBase.js';
|
|
20
21
|
export * from './dsl/operation/OperationDriver.js';
|
|
21
22
|
export * from './dsl/operation/OperationInsertable.js';
|
|
22
|
-
export * from './dsl/operation/
|
|
23
|
+
export * from './dsl/operation/toOperationInsertable.js';
|
|
24
|
+
export * from './dsl/operation/toOperationGateway.js';
|
|
23
25
|
export * from './dsl/Stringable.js';
|
|
24
26
|
export * from './dsl/ValueBase.js';
|
|
25
27
|
export * from './helpers/isImported.js';
|