@treeseed/sdk 0.13.0-rc.27 → 0.13.0-rc.28
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/deployment/catalog.js +10 -0
- package/package.json +1 -1
|
@@ -21,6 +21,16 @@ function resolveMixedTrackCatalog(input) {
|
|
|
21
21
|
return { components, warnings };
|
|
22
22
|
}
|
|
23
23
|
function collectHostAliases(components, overrides = {}) {
|
|
24
|
+
const endpoints = /* @__PURE__ */ new Map();
|
|
25
|
+
for (const component of components) for (const service of component.runtime.services) for (const endpoint of service.endpoints) {
|
|
26
|
+
if (endpoint.visibility === "host") endpoints.set(`${component.componentId}.${service.id}.${endpoint.id}`, endpoint);
|
|
27
|
+
}
|
|
28
|
+
for (const [key, alias] of Object.entries(overrides)) {
|
|
29
|
+
const endpoint = endpoints.get(key);
|
|
30
|
+
if (!endpoint) throw new Error(`Alias override ${key} does not identify an accepted host endpoint.`);
|
|
31
|
+
if (!endpoint.aliasOverride) throw new Error(`Host endpoint ${key} does not permit alias overrides.`);
|
|
32
|
+
if (!/^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]*[a-z0-9])?)*\.localhost$/u.test(alias)) throw new Error(`Alias override ${key} must use the .localhost namespace.`);
|
|
33
|
+
}
|
|
24
34
|
const aliases = /* @__PURE__ */ new Map();
|
|
25
35
|
for (const component of components) for (const service of component.runtime.services) for (const endpoint of service.endpoints) {
|
|
26
36
|
if (endpoint.visibility !== "host") continue;
|