@skmtc/core 0.0.263 → 0.0.265
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 +9 -21
- package/esm/context/CoreContext.d.ts.map +1 -1
- package/esm/context/CoreContext.js +4 -4
- package/esm/context/GenerateContext.d.ts +14 -18
- package/esm/context/GenerateContext.d.ts.map +1 -1
- package/esm/context/GenerateContext.js +6 -6
- package/esm/dsl/ModelDriver.d.ts +10 -10
- package/esm/dsl/ModelDriver.d.ts.map +1 -1
- package/esm/dsl/ModelDriver.js +33 -21
- package/esm/dsl/{ModelCreator.d.ts → ModelInsertable.d.ts} +2 -14
- package/esm/dsl/ModelInsertable.d.ts.map +1 -0
- package/esm/dsl/OperationDriver.d.ts +10 -10
- package/esm/dsl/OperationDriver.d.ts.map +1 -1
- package/esm/dsl/OperationDriver.js +33 -22
- package/{script/dsl/OperationCreator.d.ts → esm/dsl/OperationInsertable.d.ts} +2 -2
- package/esm/dsl/OperationInsertable.d.ts.map +1 -0
- package/esm/dsl/base.d.ts +5 -5
- package/esm/dsl/base.d.ts.map +1 -1
- package/esm/dsl/base.js +3 -3
- package/esm/dsl/withConfig.d.ts +13 -13
- package/esm/dsl/withConfig.d.ts.map +1 -1
- package/esm/dsl/withConfig.js +2 -2
- package/esm/generate/generate.d.ts +2 -2
- package/esm/generate/generate.d.ts.map +1 -1
- package/esm/mod.d.ts +2 -4
- package/esm/mod.d.ts.map +1 -1
- package/esm/mod.js +2 -4
- package/esm/server/createServer.d.ts +2 -2
- package/esm/server/createServer.d.ts.map +1 -1
- package/esm/types/GeneratedValue.d.ts +13 -0
- package/esm/types/GeneratedValue.d.ts.map +1 -1
- package/esm/types/GeneratorKeys.d.ts +1 -1
- package/esm/types/GeneratorKeys.d.ts.map +1 -1
- package/package.json +1 -1
- package/script/context/CoreContext.d.ts +9 -21
- package/script/context/CoreContext.d.ts.map +1 -1
- package/script/context/CoreContext.js +4 -4
- package/script/context/GenerateContext.d.ts +14 -18
- package/script/context/GenerateContext.d.ts.map +1 -1
- package/script/context/GenerateContext.js +6 -6
- package/script/dsl/ModelDriver.d.ts +10 -10
- package/script/dsl/ModelDriver.d.ts.map +1 -1
- package/script/dsl/ModelDriver.js +33 -21
- package/script/dsl/{ModelCreator.d.ts → ModelInsertable.d.ts} +2 -14
- package/script/dsl/ModelInsertable.d.ts.map +1 -0
- package/script/dsl/OperationDriver.d.ts +10 -10
- package/script/dsl/OperationDriver.d.ts.map +1 -1
- package/script/dsl/OperationDriver.js +33 -22
- package/{esm/dsl/OperationCreator.d.ts → script/dsl/OperationInsertable.d.ts} +2 -2
- package/script/dsl/OperationInsertable.d.ts.map +1 -0
- package/script/dsl/base.d.ts +5 -5
- package/script/dsl/base.d.ts.map +1 -1
- package/script/dsl/base.js +3 -3
- package/script/dsl/withConfig.d.ts +13 -13
- package/script/dsl/withConfig.d.ts.map +1 -1
- package/script/dsl/withConfig.js +5 -5
- package/script/generate/generate.d.ts +2 -2
- package/script/generate/generate.d.ts.map +1 -1
- package/script/mod.d.ts +2 -4
- package/script/mod.d.ts.map +1 -1
- package/script/mod.js +2 -4
- package/script/server/createServer.d.ts +2 -2
- package/script/server/createServer.d.ts.map +1 -1
- package/script/types/GeneratedValue.d.ts +13 -0
- package/script/types/GeneratedValue.d.ts.map +1 -1
- package/script/types/GeneratorKeys.d.ts +1 -1
- package/script/types/GeneratorKeys.d.ts.map +1 -1
- package/esm/dsl/ModelCreator.d.ts.map +0 -1
- package/esm/dsl/OperationCreator.d.ts.map +0 -1
- package/esm/helpers/verifyType.d.ts +0 -4
- package/esm/helpers/verifyType.d.ts.map +0 -1
- package/esm/helpers/verifyType.js +0 -12
- package/esm/types/GenerationType.d.ts +0 -16
- package/esm/types/GenerationType.d.ts.map +0 -1
- package/esm/types/GenerationType.js +0 -15
- package/esm/typescript/toOperationResponse.d.ts +0 -16
- package/esm/typescript/toOperationResponse.d.ts.map +0 -1
- package/esm/typescript/toOperationResponse.js +0 -17
- package/script/dsl/ModelCreator.d.ts.map +0 -1
- package/script/dsl/OperationCreator.d.ts.map +0 -1
- package/script/helpers/verifyType.d.ts +0 -4
- package/script/helpers/verifyType.d.ts.map +0 -1
- package/script/helpers/verifyType.js +0 -15
- package/script/types/GenerationType.d.ts +0 -16
- package/script/types/GenerationType.d.ts.map +0 -1
- package/script/types/GenerationType.js +0 -16
- package/script/typescript/toOperationResponse.d.ts +0 -16
- package/script/typescript/toOperationResponse.d.ts.map +0 -1
- package/script/typescript/toOperationResponse.js +0 -21
- /package/esm/dsl/{ModelCreator.js → ModelInsertable.js} +0 -0
- /package/esm/dsl/{OperationCreator.js → OperationInsertable.js} +0 -0
- /package/script/dsl/{ModelCreator.js → ModelInsertable.js} +0 -0
- /package/script/dsl/{OperationCreator.js → OperationInsertable.js} +0 -0
|
@@ -1,6 +1,19 @@
|
|
|
1
|
+
import type { Definition } from '../dsl/Definition.js';
|
|
1
2
|
import type { Stringable } from '../dsl/Stringable.js';
|
|
2
3
|
import type { GeneratorKey } from './GeneratorKeys.js';
|
|
4
|
+
/**
|
|
5
|
+
* 'force' - will generate content even it is not selected.
|
|
6
|
+
* Use this option when generating code via a dependency.
|
|
7
|
+
* For example, when you are generating a form and it needs
|
|
8
|
+
* an accompanying API client as well. You should use 'force'
|
|
9
|
+
* when generating the API client to ensure it is generated
|
|
10
|
+
* event the API client itself is not selected.
|
|
11
|
+
*
|
|
12
|
+
* 'regular' - will generate content only if it is selected.
|
|
13
|
+
*/
|
|
14
|
+
export type GenerationType = 'force' | 'regular';
|
|
3
15
|
export type GeneratedValue = Stringable & {
|
|
4
16
|
generatorKey: GeneratorKey;
|
|
5
17
|
};
|
|
18
|
+
export type GeneratedDefintion<V extends GeneratedValue, T extends GenerationType> = T extends 'force' ? Definition<V> : Definition<V> | undefined;
|
|
6
19
|
//# sourceMappingURL=GeneratedValue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GeneratedValue.d.ts","sourceRoot":"","sources":["../../src/types/GeneratedValue.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AACtD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAEtD,MAAM,MAAM,cAAc,GAAG,UAAU,GAAG;IACxC,YAAY,EAAE,YAAY,CAAA;CAC3B,CAAA"}
|
|
1
|
+
{"version":3,"file":"GeneratedValue.d.ts","sourceRoot":"","sources":["../../src/types/GeneratedValue.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AACtD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AACtD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAEtD;;;;;;;;;GASG;AAEH,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,SAAS,CAAA;AAEhD,MAAM,MAAM,cAAc,GAAG,UAAU,GAAG;IACxC,YAAY,EAAE,YAAY,CAAA;CAC3B,CAAA;AAED,MAAM,MAAM,kBAAkB,CAC5B,CAAC,SAAS,cAAc,EACxB,CAAC,SAAS,cAAc,IACtB,CAAC,SAAS,OAAO,GAAG,UAAU,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,GAAG,SAAS,CAAA"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "../_dnt.polyfills.js";
|
|
2
2
|
import type { OasOperation } from '../oas/operation/Operation.js';
|
|
3
3
|
import type { Brand } from './Brand.js';
|
|
4
|
-
import { type Method } from './Method.js';
|
|
5
4
|
import type { RefName } from './RefName.js';
|
|
5
|
+
import { type Method } from './Method.js';
|
|
6
6
|
export type NakedOperationGeneratorKey = `${string}|${string}|${Method}`;
|
|
7
7
|
export type NakedModelGeneratorKey = `${string}|${string}`;
|
|
8
8
|
export type OperationGeneratorKey = Brand<NakedOperationGeneratorKey, 'OperationGeneratorKey'>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GeneratorKeys.d.ts","sourceRoot":"","sources":["../../src/types/GeneratorKeys.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AACjE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AACvC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"GeneratorKeys.d.ts","sourceRoot":"","sources":["../../src/types/GeneratorKeys.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AACjE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AACvC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAC3C,OAAO,EAAE,KAAK,MAAM,EAAY,MAAM,aAAa,CAAA;AAEnD,MAAM,MAAM,0BAA0B,GAAG,GAAG,MAAM,IAAI,MAAM,IAAI,MAAM,EAAE,CAAA;AAExE,MAAM,MAAM,sBAAsB,GAAG,GAAG,MAAM,IAAI,MAAM,EAAE,CAAA;AAE1D,MAAM,MAAM,qBAAqB,GAAG,KAAK,CACvC,0BAA0B,EAC1B,uBAAuB,CACxB,CAAA;AAED,MAAM,MAAM,iBAAiB,GAAG,KAAK,CACnC,sBAAsB,EACtB,mBAAmB,CACpB,CAAA;AAED,MAAM,MAAM,gBAAgB,GAAG,KAAK,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAA;AAEhE,MAAM,MAAM,YAAY,GACpB,qBAAqB,GACrB,iBAAiB,GACjB,gBAAgB,CAAA;AAEpB,KAAK,2BAA2B,GAC5B;IACE,WAAW,EAAE,MAAM,CAAA;IACnB,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,CAAA;CACf,GACD;IACE,WAAW,EAAE,MAA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OAAO,CAAA;CAE9E,GAAG,QAAQ,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"verifyType.d.ts","sourceRoot":"","sources":["../../src/helpers/verifyType.ts"],"names":[],"mappings":"AAEA,wBAAgB,UAAU,CAAC,CAAC,SAAS,MAAM,EACzC,QAAQ,EAAE,OAAO,EAEjB,SAAS,EAAE,QAAQ,GAAG;IAAE,SAAS,EAAE,CAAC,CAAA;CAAE,GACrC,OAAO,CAAC,QAAQ,IAAI,CAAC,CAcvB"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
// From https://stackoverflow.com/questions/74185545/type-representing-a-generic-class-with-a-private-constructor
|
|
2
|
-
export function verifyType(instance,
|
|
3
|
-
// deno-lint-ignore ban-types
|
|
4
|
-
classType) {
|
|
5
|
-
if (!classType.prototype) {
|
|
6
|
-
throw new Error(`Wait, ${classType.name || 'that'} is not a class constructor`);
|
|
7
|
-
}
|
|
8
|
-
if (!(instance instanceof classType)) {
|
|
9
|
-
console.log('Instance: ', instance);
|
|
10
|
-
throw new Error(`Expecting instance of ${classType.name}, received: ${instance}`);
|
|
11
|
-
}
|
|
12
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 'force' - will generate content even it is not selected.
|
|
3
|
-
* Use this option when generating code via a dependency.
|
|
4
|
-
* For example, when you are generating a form and it needs
|
|
5
|
-
* an accompanying API client as well. You should use 'force'
|
|
6
|
-
* when generating the API client to ensure it is generated
|
|
7
|
-
* event the API client itself is not selected.
|
|
8
|
-
*
|
|
9
|
-
* 'regular' - will generate content only if it is selected.
|
|
10
|
-
*
|
|
11
|
-
* 'lazy' - will create a Driver instance but not apply it, until
|
|
12
|
-
* the value is accessed. This is useful when you want a quick way
|
|
13
|
-
* to access settings for a creator without generating the content.
|
|
14
|
-
*/
|
|
15
|
-
export type GenerationType = 'force' | 'regular' | 'lazy';
|
|
16
|
-
//# sourceMappingURL=GenerationType.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"GenerationType.d.ts","sourceRoot":"","sources":["../../src/types/GenerationType.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAA"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 'force' - will generate content even it is not selected.
|
|
3
|
-
* Use this option when generating code via a dependency.
|
|
4
|
-
* For example, when you are generating a form and it needs
|
|
5
|
-
* an accompanying API client as well. You should use 'force'
|
|
6
|
-
* when generating the API client to ensure it is generated
|
|
7
|
-
* event the API client itself is not selected.
|
|
8
|
-
*
|
|
9
|
-
* 'regular' - will generate content only if it is selected.
|
|
10
|
-
*
|
|
11
|
-
* 'lazy' - will create a Driver instance but not apply it, until
|
|
12
|
-
* the value is accessed. This is useful when you want a quick way
|
|
13
|
-
* to access settings for a creator without generating the content.
|
|
14
|
-
*/
|
|
15
|
-
export {};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { CoreContext } from '../context/CoreContext.js';
|
|
2
|
-
import { Definition } from '../dsl/Definition.js';
|
|
3
|
-
import type { OasOperation } from '../oas/operation/Operation.js';
|
|
4
|
-
import type { TypeSystemCreator } from '../dsl/ModelCreator.js';
|
|
5
|
-
import type { Identifier } from '../dsl/Identifier.js';
|
|
6
|
-
import type { GeneratedValue } from '../types/GeneratedValue.js';
|
|
7
|
-
type ToOperationResponseArgs<V extends GeneratedValue> = {
|
|
8
|
-
context: CoreContext;
|
|
9
|
-
operation: OasOperation;
|
|
10
|
-
destinationPath: string;
|
|
11
|
-
typeSystemCreator: TypeSystemCreator<V>;
|
|
12
|
-
toIdentifier: (name: string) => Identifier;
|
|
13
|
-
};
|
|
14
|
-
export declare const toOperationResponse: <V extends GeneratedValue>({ context, operation, destinationPath, typeSystemCreator, toIdentifier }: ToOperationResponseArgs<V>) => Definition;
|
|
15
|
-
export {};
|
|
16
|
-
//# sourceMappingURL=toOperationResponse.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"toOperationResponse.d.ts","sourceRoot":"","sources":["../../src/typescript/toOperationResponse.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAA;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AACjD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AAGjE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAC/D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AACtD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAA;AAEhE,KAAK,uBAAuB,CAAC,CAAC,SAAS,cAAc,IAAI;IACvD,OAAO,EAAE,WAAW,CAAA;IACpB,SAAS,EAAE,YAAY,CAAA;IACvB,eAAe,EAAE,MAAM,CAAA;IACvB,iBAAiB,EAAE,iBAAiB,CAAC,CAAC,CAAC,CAAA;IACvC,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,UAAU,CAAA;CAC3C,CAAA;AAED,eAAO,MAAM,mBAAmB,GAAI,CAAC,SAAS,cAAc,4EAMzD,uBAAuB,CAAC,CAAC,CAAC,KAAG,UAe/B,CAAA"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { Definition } from '../dsl/Definition.js';
|
|
2
|
-
import { OasVoid } from '../oas/void/Void.js';
|
|
3
|
-
import { toResponseName } from '../helpers/naming.js';
|
|
4
|
-
export const toOperationResponse = ({ context, operation, destinationPath, typeSystemCreator, toIdentifier }) => {
|
|
5
|
-
const successResponse = operation.toSuccessResponse()?.resolve();
|
|
6
|
-
const value = typeSystemCreator.create({
|
|
7
|
-
context,
|
|
8
|
-
schema: successResponse?.toSchema() ?? OasVoid.empty(context),
|
|
9
|
-
destinationPath
|
|
10
|
-
});
|
|
11
|
-
return new Definition({
|
|
12
|
-
context,
|
|
13
|
-
identifier: toIdentifier(toResponseName(operation)),
|
|
14
|
-
value,
|
|
15
|
-
description: successResponse?.description
|
|
16
|
-
});
|
|
17
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ModelCreator.d.ts","sourceRoot":"","sources":["../../src/dsl/ModelCreator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAA;AAC5D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAA;AACxD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAC/C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAC1D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAC3D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AACxD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAElD,MAAM,MAAM,eAAe,GAAG;IAC5B,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,mBAAmB,GAAG;IAChC,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,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AU,EAAE,UAAU,CAAA;IACtB,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,EAAE,CAAC,EAAE,SAAS,EAAE,YAAY,EAAE,EAAE,uBAAuB,KAAK,OAAO,CAAA;CAE9E,GAAG,QAAQ,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"verifyType.d.ts","sourceRoot":"","sources":["../../src/helpers/verifyType.ts"],"names":[],"mappings":"AAEA,wBAAgB,UAAU,CAAC,CAAC,SAAS,MAAM,EACzC,QAAQ,EAAE,OAAO,EAEjB,SAAS,EAAE,QAAQ,GAAG;IAAE,SAAS,EAAE,CAAC,CAAA;CAAE,GACrC,OAAO,CAAC,QAAQ,IAAI,CAAC,CAcvB"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// From https://stackoverflow.com/questions/74185545/type-representing-a-generic-class-with-a-private-constructor
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.verifyType = verifyType;
|
|
5
|
-
function verifyType(instance,
|
|
6
|
-
// deno-lint-ignore ban-types
|
|
7
|
-
classType) {
|
|
8
|
-
if (!classType.prototype) {
|
|
9
|
-
throw new Error(`Wait, ${classType.name || 'that'} is not a class constructor`);
|
|
10
|
-
}
|
|
11
|
-
if (!(instance instanceof classType)) {
|
|
12
|
-
console.log('Instance: ', instance);
|
|
13
|
-
throw new Error(`Expecting instance of ${classType.name}, received: ${instance}`);
|
|
14
|
-
}
|
|
15
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 'force' - will generate content even it is not selected.
|
|
3
|
-
* Use this option when generating code via a dependency.
|
|
4
|
-
* For example, when you are generating a form and it needs
|
|
5
|
-
* an accompanying API client as well. You should use 'force'
|
|
6
|
-
* when generating the API client to ensure it is generated
|
|
7
|
-
* event the API client itself is not selected.
|
|
8
|
-
*
|
|
9
|
-
* 'regular' - will generate content only if it is selected.
|
|
10
|
-
*
|
|
11
|
-
* 'lazy' - will create a Driver instance but not apply it, until
|
|
12
|
-
* the value is accessed. This is useful when you want a quick way
|
|
13
|
-
* to access settings for a creator without generating the content.
|
|
14
|
-
*/
|
|
15
|
-
export type GenerationType = 'force' | 'regular' | 'lazy';
|
|
16
|
-
//# sourceMappingURL=GenerationType.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"GenerationType.d.ts","sourceRoot":"","sources":["../../src/types/GenerationType.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAA"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* 'force' - will generate content even it is not selected.
|
|
4
|
-
* Use this option when generating code via a dependency.
|
|
5
|
-
* For example, when you are generating a form and it needs
|
|
6
|
-
* an accompanying API client as well. You should use 'force'
|
|
7
|
-
* when generating the API client to ensure it is generated
|
|
8
|
-
* event the API client itself is not selected.
|
|
9
|
-
*
|
|
10
|
-
* 'regular' - will generate content only if it is selected.
|
|
11
|
-
*
|
|
12
|
-
* 'lazy' - will create a Driver instance but not apply it, until
|
|
13
|
-
* the value is accessed. This is useful when you want a quick way
|
|
14
|
-
* to access settings for a creator without generating the content.
|
|
15
|
-
*/
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { CoreContext } from '../context/CoreContext.js';
|
|
2
|
-
import { Definition } from '../dsl/Definition.js';
|
|
3
|
-
import type { OasOperation } from '../oas/operation/Operation.js';
|
|
4
|
-
import type { TypeSystemCreator } from '../dsl/ModelCreator.js';
|
|
5
|
-
import type { Identifier } from '../dsl/Identifier.js';
|
|
6
|
-
import type { GeneratedValue } from '../types/GeneratedValue.js';
|
|
7
|
-
type ToOperationResponseArgs<V extends GeneratedValue> = {
|
|
8
|
-
context: CoreContext;
|
|
9
|
-
operation: OasOperation;
|
|
10
|
-
destinationPath: string;
|
|
11
|
-
typeSystemCreator: TypeSystemCreator<V>;
|
|
12
|
-
toIdentifier: (name: string) => Identifier;
|
|
13
|
-
};
|
|
14
|
-
export declare const toOperationResponse: <V extends GeneratedValue>({ context, operation, destinationPath, typeSystemCreator, toIdentifier }: ToOperationResponseArgs<V>) => Definition;
|
|
15
|
-
export {};
|
|
16
|
-
//# sourceMappingURL=toOperationResponse.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"toOperationResponse.d.ts","sourceRoot":"","sources":["../../src/typescript/toOperationResponse.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAA;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AACjD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AAGjE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAC/D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AACtD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAA;AAEhE,KAAK,uBAAuB,CAAC,CAAC,SAAS,cAAc,IAAI;IACvD,OAAO,EAAE,WAAW,CAAA;IACpB,SAAS,EAAE,YAAY,CAAA;IACvB,eAAe,EAAE,MAAM,CAAA;IACvB,iBAAiB,EAAE,iBAAiB,CAAC,CAAC,CAAC,CAAA;IACvC,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,UAAU,CAAA;CAC3C,CAAA;AAED,eAAO,MAAM,mBAAmB,GAAI,CAAC,SAAS,cAAc,4EAMzD,uBAAuB,CAAC,CAAC,CAAC,KAAG,UAe/B,CAAA"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.toOperationResponse = void 0;
|
|
4
|
-
const Definition_js_1 = require("../dsl/Definition.js");
|
|
5
|
-
const Void_js_1 = require("../oas/void/Void.js");
|
|
6
|
-
const naming_js_1 = require("../helpers/naming.js");
|
|
7
|
-
const toOperationResponse = ({ context, operation, destinationPath, typeSystemCreator, toIdentifier }) => {
|
|
8
|
-
const successResponse = operation.toSuccessResponse()?.resolve();
|
|
9
|
-
const value = typeSystemCreator.create({
|
|
10
|
-
context,
|
|
11
|
-
schema: successResponse?.toSchema() ?? Void_js_1.OasVoid.empty(context),
|
|
12
|
-
destinationPath
|
|
13
|
-
});
|
|
14
|
-
return new Definition_js_1.Definition({
|
|
15
|
-
context,
|
|
16
|
-
identifier: toIdentifier((0, naming_js_1.toResponseName)(operation)),
|
|
17
|
-
value,
|
|
18
|
-
description: successResponse?.description
|
|
19
|
-
});
|
|
20
|
-
};
|
|
21
|
-
exports.toOperationResponse = toOperationResponse;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|