@cat-factory/server 0.269.3 → 0.270.1
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/dist/app.d.ts.map +1 -1
- package/dist/app.js +7 -0
- package/dist/app.js.map +1 -1
- package/dist/config/problems.d.ts.map +1 -1
- package/dist/config/problems.js +2 -1
- package/dist/config/problems.js.map +1 -1
- package/dist/github/GitHubPullRequestMerger.d.ts.map +1 -1
- package/dist/github/GitHubPullRequestMerger.js +2 -1
- package/dist/github/GitHubPullRequestMerger.js.map +1 -1
- package/dist/github/reviewPosting.d.ts.map +1 -1
- package/dist/github/reviewPosting.js +2 -1
- package/dist/github/reviewPosting.js.map +1 -1
- package/dist/modules/llmProxy/LlmProxyController.d.ts.map +1 -1
- package/dist/modules/llmProxy/LlmProxyController.js +5 -5
- package/dist/modules/llmProxy/LlmProxyController.js.map +1 -1
- package/dist/modules/models/ModelController.d.ts.map +1 -1
- package/dist/modules/models/ModelController.js +6 -38
- package/dist/modules/models/ModelController.js.map +1 -1
- package/dist/modules/models/workspaceCatalog.d.ts +22 -0
- package/dist/modules/models/workspaceCatalog.d.ts.map +1 -0
- package/dist/modules/models/workspaceCatalog.js +51 -0
- package/dist/modules/models/workspaceCatalog.js.map +1 -0
- package/dist/modules/notifications/NotificationRelayController.d.ts.map +1 -1
- package/dist/modules/notifications/NotificationRelayController.js +3 -3
- package/dist/modules/notifications/NotificationRelayController.js.map +1 -1
- package/dist/modules/persistence/GitHubDelegationController.js +2 -2
- package/dist/modules/persistence/GitHubDelegationController.js.map +1 -1
- package/dist/modules/publicApi/PublicProvisioningController.d.ts +50 -0
- package/dist/modules/publicApi/PublicProvisioningController.d.ts.map +1 -0
- package/dist/modules/publicApi/PublicProvisioningController.js +426 -0
- package/dist/modules/publicApi/PublicProvisioningController.js.map +1 -0
- package/dist/modules/publicApi/boardProjection.d.ts +9 -2
- package/dist/modules/publicApi/boardProjection.d.ts.map +1 -1
- package/dist/modules/publicApi/boardProjection.js +46 -1
- package/dist/modules/publicApi/boardProjection.js.map +1 -1
- package/dist/modules/publicApi/openapiDocument.generated.d.ts +1 -1
- package/dist/modules/publicApi/openapiDocument.generated.d.ts.map +1 -1
- package/dist/modules/publicApi/openapiDocument.generated.js +1 -1
- package/dist/modules/publicApi/openapiDocument.generated.js.map +1 -1
- package/dist/modules/telemetry/TelemetryIngestController.d.ts.map +1 -1
- package/dist/modules/telemetry/TelemetryIngestController.js +2 -1
- package/dist/modules/telemetry/TelemetryIngestController.js.map +1 -1
- package/dist/modules/telemetry/TelemetryReadController.d.ts.map +1 -1
- package/dist/modules/telemetry/TelemetryReadController.js +2 -1
- package/dist/modules/telemetry/TelemetryReadController.js.map +1 -1
- package/dist/modules/webSearch/WebSearchProxyController.js +2 -2
- package/dist/modules/webSearch/WebSearchProxyController.js.map +1 -1
- package/dist/modules/workspaces/WorkspaceController.d.ts.map +1 -1
- package/dist/modules/workspaces/WorkspaceController.js +2 -2
- package/dist/modules/workspaces/WorkspaceController.js.map +1 -1
- package/dist/modules/workspaces/infraSetup.d.ts.map +1 -1
- package/dist/modules/workspaces/infraSetup.js +2 -1
- package/dist/modules/workspaces/infraSetup.js.map +1 -1
- package/dist/notifications/notificationDelivery.js +3 -3
- package/dist/notifications/notificationDelivery.js.map +1 -1
- package/dist/observability/logger.d.ts +1 -1
- package/dist/observability/logger.d.ts.map +1 -1
- package/dist/observability/logger.js +2 -2
- package/dist/observability/logger.js.map +1 -1
- package/dist/runtime/platformHealth.js +2 -2
- package/dist/runtime/platformHealth.js.map +1 -1
- package/package.json +8 -8
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { publicKubernetesRendererSchema, } from '@cat-factory/contracts';
|
|
1
2
|
// The `Block` → public-resource projections, shared by every controller that answers with one.
|
|
2
3
|
//
|
|
3
4
|
// Their own module because there are now two: the task lifecycle (`PublicApiController`) and board
|
|
@@ -26,14 +27,58 @@ export function toPublicTask(block, serviceId) {
|
|
|
26
27
|
autoStartDependents: block.autoStartDependents === true,
|
|
27
28
|
};
|
|
28
29
|
}
|
|
29
|
-
/**
|
|
30
|
+
/**
|
|
31
|
+
* Project a service frame block onto the external service resource.
|
|
32
|
+
*
|
|
33
|
+
* `provisioning` is projected only for the shapes this surface publishes (today `kubernetes`). A
|
|
34
|
+
* service provisioned through another engine reports NOTHING here rather than a coerced value: the
|
|
35
|
+
* public union cannot describe it, and answering with the nearest member would tell a caller its
|
|
36
|
+
* service deploys from manifests it never declared.
|
|
37
|
+
*/
|
|
30
38
|
export function toPublicService(frame) {
|
|
39
|
+
const provisioning = frame.provisioning;
|
|
40
|
+
const manifestSource = provisioning?.type === 'kubernetes' && provisioning.manifestSource
|
|
41
|
+
? toPublicManifestSource(provisioning.manifestSource)
|
|
42
|
+
: null;
|
|
31
43
|
return {
|
|
32
44
|
serviceId: frame.id,
|
|
33
45
|
title: frame.title,
|
|
34
46
|
description: frame.description,
|
|
35
47
|
type: frame.type,
|
|
36
48
|
status: frame.status,
|
|
49
|
+
...(manifestSource ? { provisioning: { type: 'kubernetes', manifestSource } } : {}),
|
|
37
50
|
};
|
|
38
51
|
}
|
|
52
|
+
/**
|
|
53
|
+
* Lift a stored manifest source onto the published one, or null when this surface cannot describe
|
|
54
|
+
* it.
|
|
55
|
+
*
|
|
56
|
+
* The public shape is a PROJECTION of the internal one rather than the internal one (see the
|
|
57
|
+
* contracts header), so the lift is explicit in both directions. Null is the same disposition the
|
|
58
|
+
* caller above already takes for a non-Kubernetes engine, and it is what makes a stored value this
|
|
59
|
+
* build cannot express (a source kind or a renderer added by a deployment ahead of this one)
|
|
60
|
+
* report as "nothing published" rather than as a manifest source with a member silently dropped.
|
|
61
|
+
*/
|
|
62
|
+
function toPublicManifestSource(source) {
|
|
63
|
+
if (source.renderer !== undefined && !PUBLIC_RENDERERS.has(source.renderer))
|
|
64
|
+
return null;
|
|
65
|
+
const renderer = source.renderer === undefined ? {} : { renderer: source.renderer };
|
|
66
|
+
if (source.type === 'colocated')
|
|
67
|
+
return { type: 'colocated', path: source.path, ...renderer };
|
|
68
|
+
if (source.type === 'separate') {
|
|
69
|
+
return {
|
|
70
|
+
type: 'separate',
|
|
71
|
+
repo: source.repo,
|
|
72
|
+
...(source.ref === undefined ? {} : { ref: source.ref }),
|
|
73
|
+
path: source.path,
|
|
74
|
+
...renderer,
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
return null;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* The renderers this surface publishes, DERIVED from the public picklist rather than restated, so
|
|
81
|
+
* adding one there is all it takes for a stored value to start being reported.
|
|
82
|
+
*/
|
|
83
|
+
const PUBLIC_RENDERERS = new Set(publicKubernetesRendererSchema.options);
|
|
39
84
|
//# sourceMappingURL=boardProjection.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"boardProjection.js","sourceRoot":"","sources":["../../../src/modules/publicApi/boardProjection.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"boardProjection.js","sourceRoot":"","sources":["../../../src/modules/publicApi/boardProjection.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,8BAA8B,GAM/B,MAAM,wBAAwB,CAAA;AAE/B,+FAA+F;AAC/F,EAAE;AACF,mGAAmG;AACnG,qGAAqG;AACrG,qGAAqG;AACrG,kGAAkG;AAClG,mGAAmG;AACnG,yDAAyD;AAEzD,kEAAkE;AAClE,MAAM,UAAU,YAAY,CAAC,KAAY,EAAE,SAAiB;IAC1D,OAAO;QACL,MAAM,EAAE,KAAK,CAAC,EAAE;QAChB,SAAS;QACT,KAAK,EAAE,KAAK,CAAC,KAAK;QAClB,WAAW,EAAE,KAAK,CAAC,WAAW;QAC9B,QAAQ,EAAE,KAAK,CAAC,QAAQ,IAAI,SAAS;QACrC,MAAM,EAAE,KAAK,CAAC,MAAM;QACpB,QAAQ,EAAE,KAAK,CAAC,QAAQ;QACxB,4FAA4F;QAC5F,6DAA6D;QAC7D,KAAK,EAAE,KAAK,CAAC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