@kosdev-code/kos-codegen-core 0.1.0-next.862 → 0.1.0-next.864
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/index.d.ts +1 -1
- package/index.d.ts.map +1 -1
- package/index.js +391 -23
- package/index.js.map +1 -1
- package/index.mjs +391 -23
- package/index.mjs.map +1 -1
- package/lib/generators/augment/model-mocks.d.ts +47 -0
- package/lib/generators/augment/model-mocks.d.ts.map +1 -0
- package/lib/generators/augment/ts-toolkit.d.ts +7 -0
- package/lib/generators/augment/ts-toolkit.d.ts.map +1 -1
- package/lib/generators/index.d.ts +2 -2
- package/lib/generators/index.d.ts.map +1 -1
- package/lib/generators/member-mutators/add-service-request.d.ts +71 -0
- package/lib/generators/member-mutators/add-service-request.d.ts.map +1 -1
- package/lib/generators/member-mutators/index.d.ts +1 -1
- package/lib/generators/member-mutators/index.d.ts.map +1 -1
- package/lib/generators/service-catalog.d.ts +12 -0
- package/lib/generators/service-catalog.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { CodegenFileSystem } from '../../codegen-filesystem';
|
|
2
|
+
/** Where a model's mocks module lives, whether or not it exists yet. */
|
|
3
|
+
export declare function mocksFilePathFor(modelFilePath: string, modelBase: string): string;
|
|
4
|
+
/** The function an app calls to arm this model's provisional routes. */
|
|
5
|
+
export declare function mockRegisterFunctionName(modelBase: string): string;
|
|
6
|
+
/**
|
|
7
|
+
* KosMock matches `:name` segments; OpenAPI writes `{name}`. Same meaning, one
|
|
8
|
+
* translation — so the route pattern and the endpoint stay recognizably the
|
|
9
|
+
* same string.
|
|
10
|
+
*/
|
|
11
|
+
export declare function toMockRoutePattern(servicePath: string): string;
|
|
12
|
+
export interface EnsureMockRouteOptions {
|
|
13
|
+
modelFilePath: string;
|
|
14
|
+
/** `board-model.ts` → `board`. */
|
|
15
|
+
modelBase: string;
|
|
16
|
+
/** Specifier the MODEL imports the SDK from, e.g. `@kosdev-code/kos-ui-sdk`. */
|
|
17
|
+
sdkModuleSpecifier: string;
|
|
18
|
+
/** Raw wire type exported by the model's services module. */
|
|
19
|
+
rawAlias: string;
|
|
20
|
+
/** Endpoint the route stands in for. */
|
|
21
|
+
servicePath: string;
|
|
22
|
+
method: string;
|
|
23
|
+
/** Catalog key, used to name the sample payload. */
|
|
24
|
+
endpointKey: string;
|
|
25
|
+
/**
|
|
26
|
+
* Sample payload as TypeScript expression text. Omitted when the caller
|
|
27
|
+
* supplied none, and a placeholder + TODO is emitted instead.
|
|
28
|
+
*/
|
|
29
|
+
sampleText?: string;
|
|
30
|
+
}
|
|
31
|
+
export interface EnsureMockRouteResult {
|
|
32
|
+
mocksFilePath: string;
|
|
33
|
+
registerFunction: string;
|
|
34
|
+
routePattern: string;
|
|
35
|
+
sampleName: string;
|
|
36
|
+
/** False when a route for this (method, pattern) was already registered. */
|
|
37
|
+
routeCreated: boolean;
|
|
38
|
+
/** True when no sample was supplied, so the route serves a placeholder. */
|
|
39
|
+
samplePlaceholder: boolean;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Ensure the model's mocks module registers a route for one provisional
|
|
43
|
+
* endpoint. Idempotent on (method, pattern): a second call for the same
|
|
44
|
+
* endpoint adds nothing.
|
|
45
|
+
*/
|
|
46
|
+
export declare function ensureMockRoute(codegenFs: CodegenFileSystem, options: EnsureMockRouteOptions): EnsureMockRouteResult;
|
|
47
|
+
//# sourceMappingURL=model-mocks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"model-mocks.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-codegen-core/src/lib/generators/augment/model-mocks.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAIlE,wEAAwE;AACxE,wBAAgB,gBAAgB,CAC9B,aAAa,EAAE,MAAM,EACrB,SAAS,EAAE,MAAM,GAChB,MAAM,CAMR;AAED,wEAAwE;AACxE,wBAAgB,wBAAwB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAElE;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAE9D;AA0CD,MAAM,WAAW,sBAAsB;IACrC,aAAa,EAAE,MAAM,CAAC;IACtB,kCAAkC;IAClC,SAAS,EAAE,MAAM,CAAC;IAClB,gFAAgF;IAChF,kBAAkB,EAAE,MAAM,CAAC;IAC3B,6DAA6D;IAC7D,QAAQ,EAAE,MAAM,CAAC;IACjB,wCAAwC;IACxC,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,oDAAoD;IACpD,WAAW,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,qBAAqB;IACpC,aAAa,EAAE,MAAM,CAAC;IACtB,gBAAgB,EAAE,MAAM,CAAC;IACzB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,4EAA4E;IAC5E,YAAY,EAAE,OAAO,CAAC;IACtB,2EAA2E;IAC3E,iBAAiB,EAAE,OAAO,CAAC;CAC5B;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAC7B,SAAS,EAAE,iBAAiB,EAC5B,OAAO,EAAE,sBAAsB,GAC9B,qBAAqB,CA6DvB"}
|
|
@@ -80,6 +80,8 @@ export declare function ensureConstCatalogEntry(sourceFile: SourceFile, spec: {
|
|
|
80
80
|
key: string;
|
|
81
81
|
initializer: string;
|
|
82
82
|
equals?: (existing: string, candidate: string) => boolean;
|
|
83
|
+
/** Doc comment for the new entry. Not applied when an entry is reused. */
|
|
84
|
+
leadingTrivia?: string;
|
|
83
85
|
}): {
|
|
84
86
|
key: string;
|
|
85
87
|
created: boolean;
|
|
@@ -88,6 +90,7 @@ export declare function ensureConstCatalogEntry(sourceFile: SourceFile, spec: {
|
|
|
88
90
|
export declare function ensureExportedTypeAlias(sourceFile: SourceFile, spec: {
|
|
89
91
|
name: string;
|
|
90
92
|
type: string;
|
|
93
|
+
docs?: string;
|
|
91
94
|
}): boolean;
|
|
92
95
|
/**
|
|
93
96
|
* Add an exported identity mapper `raw -> data` unless one of that name exists.
|
|
@@ -105,6 +108,8 @@ export declare function ensureBarrelExport(sourceFile: SourceFile, moduleSpecifi
|
|
|
105
108
|
export interface DecoratedMethodSpec {
|
|
106
109
|
name: string;
|
|
107
110
|
decoratorName: string;
|
|
111
|
+
/** Explicit decorator type arguments, e.g. `["RawType", "DataType"]`. */
|
|
112
|
+
decoratorTypeArgs?: string[];
|
|
108
113
|
decoratorArgsText?: string;
|
|
109
114
|
parameters?: {
|
|
110
115
|
name: string;
|
|
@@ -114,6 +119,8 @@ export interface DecoratedMethodSpec {
|
|
|
114
119
|
returnType?: string;
|
|
115
120
|
isAsync?: boolean;
|
|
116
121
|
statements?: string;
|
|
122
|
+
/** Doc comment emitted above the method. */
|
|
123
|
+
docs?: string;
|
|
117
124
|
}
|
|
118
125
|
/**
|
|
119
126
|
* Add a decorated method to a class idempotently (skips if a method of that name
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ts-toolkit.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-codegen-core/src/lib/generators/augment/ts-toolkit.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAQL,KAAK,UAAU,EACf,KAAK,gBAAgB,EACtB,MAAM,UAAU,CAAC;AAClB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAElE;;;;GAIG;AACH,wBAAgB,mBAAmB,CACjC,SAAS,EAAE,iBAAiB,EAC5B,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,CAAC,EAAE,EAAE,UAAU,KAAK,IAAI,GAC/B,IAAI,CAiBN;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,CAAC,EA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gB,uBAAuB,CACrC,UAAU,EAAE,UAAU,EACtB,IAAI,EAAE;IACJ,WAAW,EAAE,MAAM,CAAC;IACpB,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ts-toolkit.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-codegen-core/src/lib/generators/augment/ts-toolkit.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAQL,KAAK,UAAU,EACf,KAAK,gBAAgB,EACtB,MAAM,UAAU,CAAC;AAClB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAElE;;;;GAIG;AACH,wBAAgB,mBAAmB,CACjC,SAAS,EAAE,iBAAiB,EAC5B,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,CAAC,EAAE,EAAE,UAAU,KAAK,IAAI,GAC/B,IAAI,CAiBN;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAC9B,SAAS,EAAE,iBAAiB,EAC5B,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,CAAC,EAAE,EAAE,UAAU,KAAK,CAAC,GAC7B,CAAC,CASH;AAED,oFAAoF;AACpF,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAC/B,UAAU,EAAE,UAAU,EACtB,eAAe,EAAE,MAAM,EACvB,KAAK,EAAE,eAAe,EAAE,GACvB,IAAI,CAyBN;AAED;;;;GAIG;AACH,wBAAgB,yBAAyB,CAAC,UAAU,EAAE,UAAU,GAAG,MAAM,CAKxE;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAC3B,UAAU,EAAE,UAAU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C;IACnB,6EAA6E;IAC7E,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAaD;;;;GAIG;AACH,wBAAgB,gBAAgB,CAC9B,GAAG,EAAE,gBAAgB,EACrB,IAAI,EAAE,iBAAiB,GACtB,OAAO,CAWT;AAED,oDAAoD;AACpD,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,EAAE,MAAM,CAAC;IACtB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,QAAQ,CAAC;IAC3C,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,8EAA8E;IAC9E,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAQD;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,GAAG,EAAE,gBAAgB,EACrB,IAAI,EAAE,qBAAqB,GAC1B,OAAO,CAkBT;AAED,iDAAiD;AACjD,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,gEAAgE;IAChE,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,gBAAgB,EAAE,IAAI,EAAE,UAAU,GAAG,OAAO,CAW1E"}
|
|
@@ -5,7 +5,7 @@ export { syncCiManifests, discoverUiArtifacts, discoverJavaArtifacts, type CiSyn
|
|
|
5
5
|
export { ensureJavaAggregatorPom, type EnsureJavaAggregatorOptions, finalizeArchetypeModule, type FinalizeArchetypeModuleOptions, addJavaArtifactToManifests, type AddJavaArtifactOptions, } from './java-workspace';
|
|
6
6
|
export { normalizeOptions, type KosBaseGeneratorOptions, type NormalizedOptions, } from './normalize-options';
|
|
7
7
|
export { buildKabTargets, buildSbomTarget, resolveKabPath, KAB_OUTPUT_DIR, KAB_OUTPUT_PATH, type KabTargetsOptions, type KabTargetDefinition, UPDATE_RELEASE_VERSION_SCRIPT_PATH, } from './kab-targets';
|
|
8
|
-
export { listServiceCatalog, type ServiceCatalogEntry, type ServiceCatalogQuery, type ServiceOperation, type CatalogMethod, } from './service-catalog';
|
|
8
|
+
export { listServiceCatalog, readServiceModuleOperations, type ServiceCatalogEntry, type ServiceCatalogQuery, type ServiceOperation, type CatalogMethod, } from './service-catalog';
|
|
9
9
|
export { UPDATE_RELEASE_VERSION_SCRIPT } from './release-version-script';
|
|
10
10
|
export { appendBarrelExport } from './barrel-utils';
|
|
11
11
|
export { updateModelIndex } from './update-model-index';
|
|
@@ -16,7 +16,7 @@ export { generateCompanionModel, type CompanionModelOptions, } from './generate-
|
|
|
16
16
|
export { generateModel, type ModelOptions, type GenerateModelParams, } from './generate-model';
|
|
17
17
|
export { addFutureToModel, type AddFutureToModelOptions, type NormalizedAddFutureToModelOptions, } from './add-future-to-model';
|
|
18
18
|
export { addContainerSupportToModel, type AddContainerSupportOptions, } from './add-container-support';
|
|
19
|
-
export { addModelEffectToModel, type AddModelEffectOptions, addDependencyToModel, type AddDependencyOptions, addChildToModel, type AddChildOptions, type ChildShape, addTopicHandlerToModel, type AddTopicHandlerOptions, addConfigPropertyToModel, type AddConfigPropertyOptions, addServiceRequestToModel, type AddServiceRequestOptions, addPropertyToModel, type AddPropertyOptions, addComputedToModel, type AddComputedOptions, } from './member-mutators';
|
|
19
|
+
export { addModelEffectToModel, type AddModelEffectOptions, addDependencyToModel, type AddDependencyOptions, addChildToModel, type AddChildOptions, type ChildShape, addTopicHandlerToModel, type AddTopicHandlerOptions, addConfigPropertyToModel, type AddConfigPropertyOptions, addServiceRequestToModel, type AddServiceRequestOptions, type AddServiceRequestResult, type ServiceRequestMockMode, type UntypedEndpointDetails, type UntypedEndpointError, addPropertyToModel, type AddPropertyOptions, addComputedToModel, type AddComputedOptions, } from './member-mutators';
|
|
20
20
|
export { resolveModelFilePath, type ModelFileQuery, } from './augment/resolve-model-file';
|
|
21
21
|
export { transformSourceFile, ensureNamedImport, resolveSdkModuleSpecifier, getModelClass, addClassDecorator, ensureDeclarationMerge, ensureFileEslintDisable, addDecoratedMethod, addDecoratedProperty, addPlainProperty, addGetter, } from './augment/ts-toolkit';
|
|
22
22
|
export { validateModel, type ValidateModelOptions, type ValidationFinding, type ValidationResult, } from './validate';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../packages/kos-codegen-core/src/lib/generators/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EACrB,KAAK,oBAAoB,GAC1B,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAAE,YAAY,EAAE,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEpE,OAAO,EACL,yBAAyB,EACzB,KAAK,wBAAwB,EAC7B,KAAK,uBAAuB,GAC7B,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,qBAAqB,EACrB,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,GACxB,MAAM,WAAW,CAAC;AAEnB,OAAO,EACL,uBAAuB,EACvB,KAAK,2BAA2B,EAChC,uBAAuB,EACvB,KAAK,8BAA8B,EACnC,0BAA0B,EAC1B,KAAK,sBAAsB,GAC5B,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACL,gBAAgB,EAChB,KAAK,uBAAuB,EAC5B,KAAK,iBAAiB,GACvB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EACL,eAAe,EACf,eAAe,EACf,cAAc,EACd,cAAc,EACd,eAAe,EACf,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,kCAAkC,GACnC,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,kBAAkB,EAClB,KAAK,mBAAmB,EACxB,KAAK,mBAA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B,aAAa,EACb,iBAAiB,EACjB,sBAAsB,EACtB,uBAAuB,EACvB,kBAAkB,EAClB,oBAAoB,EACpB,gBAAgB,EAChB,SAAS,GACV,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,aAAa,EACb,KAAK,oBAAoB,EACzB,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,GACtB,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,aAAa,EACb,KAAK,oBAAoB,EACzB,KAAK,eAAe,EACpB,KAAK,gBAAgB,GACtB,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,aAAa,EACb,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,GACzB,MAAM,SAAS,CAAC;AAGjB,OAAO,EACL,iBAAiB,EACjB,KAAK,gBAAgB,GACtB,MAAM,gCAAgC,CAAC;AACxC,YAAY,EACV,0BAA0B,EAC1B,mBAAmB,EACnB,kBAAkB,EAClB,gBAAgB,EAChB,UAAU,GACX,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,YAAY,EACZ,qBAAqB,EACrB,sBAAsB,EACtB,cAAc,GACf,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAC3E,YAAY,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AACxE,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../packages/kos-codegen-core/src/lib/generators/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EACrB,KAAK,oBAAoB,GAC1B,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAAE,YAAY,EAAE,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAE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AM,SAAS,CAAC;AAGjB,OAAO,EACL,iBAAiB,EACjB,KAAK,gBAAgB,GACtB,MAAM,gCAAgC,CAAC;AACxC,YAAY,EACV,0BAA0B,EAC1B,mBAAmB,EACnB,kBAAkB,EAClB,gBAAgB,EAChB,UAAU,GACX,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,YAAY,EACZ,qBAAqB,EACrB,sBAAsB,EACtB,cAAc,GACf,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAC3E,YAAY,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AACxE,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC"}
|
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
import { CodegenFileSystem } from '../../codegen-filesystem';
|
|
2
2
|
import { ProjectConfiguration } from '../../project-discovery';
|
|
3
3
|
export type ServiceRequestMode = "lifecycle" | "method";
|
|
4
|
+
/**
|
|
5
|
+
* What to do when the generated types do not declare the requested endpoint.
|
|
6
|
+
*
|
|
7
|
+
* `auto` never silently substitutes mocking for a real request — the result says
|
|
8
|
+
* plainly that it did, and why, so the caller reports a missing endpoint rather
|
|
9
|
+
* than a finished feature.
|
|
10
|
+
*/
|
|
11
|
+
export type ServiceRequestMockMode = "auto" | "always" | "never";
|
|
4
12
|
export interface AddServiceRequestOptions {
|
|
5
13
|
modelName: string;
|
|
6
14
|
modelProject: string;
|
|
@@ -20,6 +28,31 @@ export interface AddServiceRequestOptions {
|
|
|
20
28
|
* `lifecycle` mode; defaults to `LOAD` there.
|
|
21
29
|
*/
|
|
22
30
|
lifecycle?: string;
|
|
31
|
+
/**
|
|
32
|
+
* What to do about an endpoint the generated types do not declare.
|
|
33
|
+
*
|
|
34
|
+
* `never` — a hard error; nothing is written.
|
|
35
|
+
* `auto` — (default) emit the provisional, mock-backed form and say so.
|
|
36
|
+
* `always` — emit a KosMock route even for an endpoint that IS typed, for
|
|
37
|
+
* developing against something the spec declares but the device does not
|
|
38
|
+
* serve yet. A typed endpoint keeps its typed request; only the mock is added.
|
|
39
|
+
*/
|
|
40
|
+
mock?: ServiceRequestMockMode;
|
|
41
|
+
/**
|
|
42
|
+
* The raw wire shape a PROVISIONAL endpoint is expected to serve, as TypeScript
|
|
43
|
+
* type text (`DeviceGrantSyncBean[]`, `{ id: string; label: string }`). This is
|
|
44
|
+
* the UNWRAPPED `data` payload: the client strips the `{status, data}` envelope
|
|
45
|
+
* before the transform runs. Defaults to `unknown`, which compiles but leaves
|
|
46
|
+
* the response boundary undescribed.
|
|
47
|
+
*/
|
|
48
|
+
rawType?: string;
|
|
49
|
+
/**
|
|
50
|
+
* Sample payload for the mock route, as TypeScript expression text. Typed
|
|
51
|
+
* against the raw wire shape, so a sample that does not match it fails the
|
|
52
|
+
* build rather than the demo. Without one the route answers with a placeholder
|
|
53
|
+
* and the transform is never exercised.
|
|
54
|
+
*/
|
|
55
|
+
sample?: string;
|
|
23
56
|
/** Import specifier for the generated typed service module (relative to the model
|
|
24
57
|
* file). If omitted, auto-resolved when the project has exactly one. */
|
|
25
58
|
serviceModule?: string;
|
|
@@ -42,6 +75,44 @@ export interface AddServiceRequestResult {
|
|
|
42
75
|
endpointKey: string;
|
|
43
76
|
/** False when an existing catalog entry for this (path, method) was reused. */
|
|
44
77
|
endpointCreated: boolean;
|
|
78
|
+
/**
|
|
79
|
+
* Whether the path was actually checked. False when the generated module
|
|
80
|
+
* exposes no `paths` this can read — which is not evidence the endpoint exists.
|
|
81
|
+
*/
|
|
82
|
+
pathValidated: boolean;
|
|
83
|
+
/** True when the endpoint is absent from the generated types and was mocked. */
|
|
84
|
+
provisional: boolean;
|
|
85
|
+
/** The mock module, when one was written. */
|
|
86
|
+
mocksFilePath?: string;
|
|
87
|
+
/** Function the app must call to arm the routes, when one was written. */
|
|
88
|
+
mockRegisterFunction?: string;
|
|
89
|
+
/** `GET /api/board/grants`, when a route was registered. */
|
|
90
|
+
mockRoute?: string;
|
|
91
|
+
/** True when no sample was supplied, so the mock serves a placeholder. */
|
|
92
|
+
mockSamplePlaceholder?: boolean;
|
|
93
|
+
/** Exactly what to undo when the endpoint lands, in order. */
|
|
94
|
+
removalSteps?: string[];
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Everything needed to report a rejected path, carried on the error rather than
|
|
98
|
+
* flattened into its message — so a tool surface can present the alternatives
|
|
99
|
+
* with their warning attached instead of as a list of corrections.
|
|
100
|
+
*/
|
|
101
|
+
export interface UntypedEndpointDetails {
|
|
102
|
+
servicePath: string;
|
|
103
|
+
method: string;
|
|
104
|
+
/** True when the path is typed, but not for this method. */
|
|
105
|
+
pathTypedForOtherMethods: boolean;
|
|
106
|
+
/** Methods this path DOES support, when it is typed at all. */
|
|
107
|
+
methodsForPath: string[];
|
|
108
|
+
/** Nearest paths in the same API — alternatives to rule out, not to adopt. */
|
|
109
|
+
otherEndpointsInThisApi: string[];
|
|
110
|
+
warning: string;
|
|
111
|
+
waysForward: string[];
|
|
112
|
+
}
|
|
113
|
+
/** A rejected path, with the alternatives kept apart from the verdict. */
|
|
114
|
+
export interface UntypedEndpointError extends Error {
|
|
115
|
+
details: UntypedEndpointDetails;
|
|
45
116
|
}
|
|
46
117
|
export declare function addServiceRequestToModel(codegenFs: CodegenFileSystem, options: AddServiceRequestOptions, projects?: Map<string, ProjectConfiguration>): AddServiceRequestResult;
|
|
47
118
|
//# sourceMappingURL=add-service-request.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add-service-request.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-codegen-core/src/lib/generators/member-mutators/add-service-request.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"add-service-request.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-codegen-core/src/l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OAAO,CAAC;IACvB,gFAAgF;IAChF,WAAW,EAAE,OAAO,CAAC;IACrB,6CAA6C;IAC7C,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,0EAA0E;IAC1E,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,4DAA4D;IAC5D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,0EAA0E;IAC1E,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,8DAA8D;IAC9D,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;CACzB;AAED;;;;GAIG;AACH,MAAM,WAAW,sBAAsB;IACrC,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,4DAA4D;IAC5D,wBAAwB,EAAE,OAAO,CAAC;IAClC,+DAA+D;IAC/D,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,8EAA8E;IAC9E,uBAAuB,EAAE,MAAM,EAAE,CAAC;IAClC,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,EAAE,CAAC;CACvB;AAED,0EAA0E;AAC1E,MAAM,WAAW,oBAAqB,SAAQ,KAAK;IACjD,OAAO,EAAE,sBAAsB,CAAC;CACjC;AA6RD,wBAAgB,wBAAwB,CACtC,SAAS,EAAE,iBAAiB,EAC5B,OAAO,EAAE,wBAAwB,EACjC,QAAQ,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,oBAAoB,CAAC,GAC3C,uBAAuB,CAqXzB"}
|
|
@@ -5,5 +5,5 @@ export { addTopicHandlerToModel, type AddTopicHandlerOptions, } from './add-topi
|
|
|
5
5
|
export { addConfigPropertyToModel, type AddConfigPropertyOptions, } from './add-config-property';
|
|
6
6
|
export { addPropertyToModel, type AddPropertyOptions } from './add-property';
|
|
7
7
|
export { addComputedToModel, type AddComputedOptions } from './add-computed';
|
|
8
|
-
export { addServiceRequestToModel, type AddServiceRequestOptions, } from './add-service-request';
|
|
8
|
+
export { addServiceRequestToModel, type AddServiceRequestOptions, type AddServiceRequestResult, type ServiceRequestMockMode, type UntypedEndpointDetails, type UntypedEndpointError, } from './add-service-request';
|
|
9
9
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-codegen-core/src/lib/generators/member-mutators/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EACrB,KAAK,qBAAqB,GAC3B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,oBAAoB,EACpB,KAAK,oBAAoB,GAC1B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,eAAe,EACf,KAAK,eAAe,EACpB,KAAK,UAAU,GAChB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,sBAAsB,EACtB,KAAK,sBAAsB,GAC5B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,wBAAwB,EACxB,KAAK,wBAAwB,GAC9B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,kBAAkB,EAAE,KAAK,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAC7E,OAAO,EAAE,kBAAkB,EAAE,KAAK,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAC7E,OAAO,EACL,wBAAwB,EACxB,KAAK,wBAAwB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-codegen-core/src/lib/generators/member-mutators/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EACrB,KAAK,qBAAqB,GAC3B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,oBAAoB,EACpB,KAAK,oBAAoB,GAC1B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,eAAe,EACf,KAAK,eAAe,EACpB,KAAK,UAAU,GAChB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,sBAAsB,EACtB,KAAK,sBAAsB,GAC5B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,wBAAwB,EACxB,KAAK,wBAAwB,GAC9B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,kBAAkB,EAAE,KAAK,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAC7E,OAAO,EAAE,kBAAkB,EAAE,KAAK,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAC7E,OAAO,EACL,wBAAwB,EACxB,KAAK,wBAAwB,EAC7B,KAAK,uBAAuB,EAC5B,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,EAC3B,KAAK,oBAAoB,GAC1B,MAAM,uBAAuB,CAAC"}
|
|
@@ -35,5 +35,17 @@ export interface ServiceCatalogQuery {
|
|
|
35
35
|
* should tell the user to run `api:generate`, not treat it as "no endpoints".
|
|
36
36
|
*/
|
|
37
37
|
export declare function listServiceCatalog(codegenFs: CodegenFileSystem, query: ServiceCatalogQuery, projects?: Map<string, ProjectConfiguration>): ServiceCatalogEntry[];
|
|
38
|
+
/**
|
|
39
|
+
* The operations a generated service module types, for callers that hold the
|
|
40
|
+
* module rather than a project name — path validation, above all.
|
|
41
|
+
*
|
|
42
|
+
* `paths` normally lives in the `openapi.d.ts` beside the module, but the module
|
|
43
|
+
* may declare it inline instead. Returns null when NEITHER does: that is "these
|
|
44
|
+
* types cannot answer the question", which a caller must not read as "the
|
|
45
|
+
* endpoint does not exist".
|
|
46
|
+
*
|
|
47
|
+
* @param serviceModuleFile Root-relative path of the module, with or without `.ts`.
|
|
48
|
+
*/
|
|
49
|
+
export declare function readServiceModuleOperations(codegenFs: CodegenFileSystem, serviceModuleFile: string): ServiceOperation[] | null;
|
|
38
50
|
export {};
|
|
39
51
|
//# sourceMappingURL=service-catalog.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service-catalog.d.ts","sourceRoot":"","sources":["../../../../../packages/kos-codegen-core/src/lib/generators/service-catalog.ts"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAIjE,8EAA8E;AAC9E,QAAA,MAAM,eAAe,oDAAqD,CAAC;AAC3E,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC;AAE7D,MAAM,WAAW,gBAAgB;IAC/B,4CAA4C;IAC5C,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,aAAa,CAAC;IACtB,6CAA6C;IAC7C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,mEAAmE;IACnE,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB;AAED,MAAM,WAAW,mBAAmB;IAClC,wDAAwD;IACxD,GAAG,EAAE,MAAM,CAAC;IACZ,gDAAgD;IAChD,OAAO,EAAE,MAAM,CAAC;IAChB,2EAA2E;IAC3E,iBAAiB,EAAE,MAAM,CAAC;IAC1B,UAAU,EAAE,gBAAgB,EAAE,CAAC;CAChC;AAID,MAAM,WAAW,mBAAmB;IAClC,6CAA6C;IAC7C,YAAY,EAAE,MAAM,CAAC;IACrB,kDAAkD;IAClD,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,mDAAmD;IACnD,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAChC,SAAS,EAAE,iBAAiB,EAC5B,KAAK,EAAE,mBAAmB,EAC1B,QAAQ,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,oBAAoB,CAAC,GAC3C,mBAAmB,EAAE,CAiCvB"}
|
|
1
|
+
{"version":3,"file":"service-catalog.d.ts","sourceRoot":"","sources":["../../../../../packages/kos-codegen-core/src/lib/generators/service-catalog.ts"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;A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
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"module": "./index.mjs",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
},
|
|
26
26
|
"kos": {
|
|
27
27
|
"build": {
|
|
28
|
-
"gitHash": "
|
|
28
|
+
"gitHash": "8a9f3bb7a9752d3d7beeaa86f771e474184815d1"
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
}
|