chore(deps): update serve.zone interfaces

This commit is contained in:
2026-04-25 14:16:58 +00:00
parent 373ec05e2c
commit 1b5c16c500
4 changed files with 88 additions and 31 deletions
+1 -1
View File
@@ -80,7 +80,7 @@
"@push.rocks/smartstring": "^4.0.15",
"@push.rocks/taskbuffer": "^3.0.10",
"@serve.zone/api": "^4.10.0",
"@serve.zone/interfaces": "^4.10.0",
"@serve.zone/interfaces": "^5.4.3",
"@tsclass/tsclass": "^4.2.0",
"@types/node": "22.10.2"
},
+57 -14
View File
@@ -67,10 +67,10 @@ importers:
version: 3.1.7
'@serve.zone/api':
specifier: ^4.10.0
version: 4.10.0
version: 4.13.0
'@serve.zone/interfaces':
specifier: ^4.10.0
version: 4.10.0
specifier: ^5.4.3
version: 5.4.3
'@tsclass/tsclass':
specifier: ^4.2.0
version: 4.2.0
@@ -883,6 +883,9 @@ packages:
'@push.rocks/smartpromise@4.0.4':
resolution: {integrity: sha512-Mbh+DnX4+rVPEZgYU7LtTJI/AYoNn7+h27AycEFpPJW41DCfjTiXiI0+ecNdyO1AfbcL0Q02RQjoEauEWx5FQg==}
'@push.rocks/smartpromise@4.2.3':
resolution: {integrity: sha512-Ycg/TJR+tMt+S3wSFurOpEoW6nXv12QBtKXgBcjMZ4RsdO28geN46U09osPn9N9WuwQy1PkmTV5J/V4F9U8qEw==}
'@push.rocks/smartpuppeteer@2.0.2':
resolution: {integrity: sha512-EcYCT0PX++WjfHp7W5UYX3t8x5gSNpJMMUvhA7SHz8b2t76ItslNWxprRcF0CUQyN1fozbf5StZf7dwdGc/dIA==}
@@ -892,6 +895,9 @@ packages:
'@push.rocks/smartrouter@1.3.2':
resolution: {integrity: sha512-JtkxClN4CaHXMSeLDNvfWPwiVEPdEoQVSX2ee3gLgbXNO9dt9hvXdIhFrnFeLwyeA6M8nJdb9SqjrjZroYJsxw==}
'@push.rocks/smartrx@3.0.10':
resolution: {integrity: sha512-USjIYcsSfzn14cwOsxgq/bBmWDTTzy3ouWAnW5NdMyRRzEbmeNrvmy6TRqNeDlJ2PsYNTt1rr/zGUqvIy72ITg==}
'@push.rocks/smartrx@3.0.7':
resolution: {integrity: sha512-qCWy0s3RLAgGSnaw/Gu0BNaJ59CsI6RK5OJDCCqxc7P2X/S755vuLtnAR5/0dEjdhCHXHX9ytPZx+o9g/CNiyA==}
@@ -1088,11 +1094,14 @@ packages:
'@sec-ant/readable-stream@0.4.1':
resolution: {integrity: sha512-831qok9r2t8AlxLko40y2ebgSDhenenCatLVeW/uBtnHPyhHOvG0C7TvfgecV+wHzIm5KUICgzmVpWS+IMEAeg==}
'@serve.zone/api@4.10.0':
resolution: {integrity: sha512-mo2TA0p+A8bhzFg5saeVoK9fqpyTyMIfdeJhD7oVT8oVSZrTwsg5W8jI3URjHsYjDmZf45t6dIILTkeV5O2CEQ==}
'@serve.zone/api@4.13.0':
resolution: {integrity: sha512-fgvAy5k4AClqZriczMTSYuCx1kH95U3BDHy7wGFmmKfWL0pMUlsLFpuM/lCLus+dOiKEpeDPIZtoGusvtq2O9g==}
'@serve.zone/interfaces@4.10.0':
resolution: {integrity: sha512-uGLDZiC8Qep4LyRUEKGW1hwDRMn4y7eA9pC4/hgwEbXDrQfSMsVY4wrkCuxNMRVUpV0ie15rLENMqtWb2eG/LQ==}
'@serve.zone/interfaces@4.13.0':
resolution: {integrity: sha512-lORMc/y1QsD9X78D1JkhIykBx9o6jmRyupiq0yVAQpAl3lGOCL//bgS+3oHZU5c4xuHh3wfLVnj6T1FYXQb+CQ==}
'@serve.zone/interfaces@5.4.3':
resolution: {integrity: sha512-9ijFhHoC7GYyyAUJbBoDYmcoCmIXTFPiD6fI3x68SWiC0xA+2LG0nOe14D32c1QN9X/3i2Ac5/1sUibfjHsIGg==}
'@sinclair/typebox@0.27.8':
resolution: {integrity: sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==}
@@ -1326,6 +1335,9 @@ packages:
'@tsclass/tsclass@4.2.0':
resolution: {integrity: sha512-34p1jFzpOXapfsD95VN+Kq/qW/XDbyCi/qDMcZp3aUCYIv6dlzY3+6s+GOIQSzkL1YW1uKCij88J+jNsWGijbA==}
'@tsclass/tsclass@9.5.0':
resolution: {integrity: sha512-HwMVwkrBnEFMjwOsMkGwWN/q+XEczSpf4a/PBAXgkDdV6sXdxAMFXUH1tW8Y5ecuvXFYMvFry4X57MCCT7Dm8A==}
'@types/accepts@1.3.7':
resolution: {integrity: sha512-Pay9fq2lM2wXPWbteBsRAGiWH2hig4ZE2asK+mm7kUzlxRTfL961rj89I6zV/E3PcIkDqyuBEcMxFT7rccugeQ==}
@@ -3869,6 +3881,10 @@ packages:
os: [darwin, linux, win32, freebsd, openbsd, netbsd, sunos, android]
hasBin: true
tagged-tag@1.0.0:
resolution: {integrity: sha512-yEFYrVhod+hdNyx7g5Bnkkb0G6si8HJurOoOEgC8B/O0uXLHlaey/65KRv6cuWBNhBgHKAROVpc7QyYqE5gFng==}
engines: {node: '>=20'}
tar-fs@2.1.1:
resolution: {integrity: sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==}
@@ -3974,6 +3990,10 @@ packages:
resolution: {integrity: sha512-UJShLPYi1aWqCdq9HycOL/gwsuqda1OISdBO3t8RlXQC4QvtuIz4b5FCfe2dQIWEpmlRExKmcTBfP1r9bhY7ig==}
engines: {node: '>=16'}
type-fest@5.6.0:
resolution: {integrity: sha512-8ZiHFm91orbSAe2PSAiSVBVko18pbhbiB3U9GglSzF/zCGkR+rxpHx6sEMCUm4kxY4LjDIUGgCfUMtwfZfjfUA==}
engines: {node: '>=20'}
type-is@1.6.18:
resolution: {integrity: sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==}
engines: {node: '>= 0.6'}
@@ -5805,6 +5825,8 @@ snapshots:
'@push.rocks/smartpromise@4.0.4': {}
'@push.rocks/smartpromise@4.2.3': {}
'@push.rocks/smartpuppeteer@2.0.2':
dependencies:
'@pushrocks/smartdelay': 2.0.13
@@ -5830,6 +5852,11 @@ snapshots:
'@push.rocks/smartrx': 3.0.7
path-to-regexp: 8.2.0
'@push.rocks/smartrx@3.0.10':
dependencies:
'@push.rocks/smartpromise': 4.2.3
rxjs: 7.8.1
'@push.rocks/smartrx@3.0.7':
dependencies:
'@push.rocks/smartpromise': 4.0.4
@@ -6239,25 +6266,31 @@ snapshots:
'@sec-ant/readable-stream@0.4.1': {}
'@serve.zone/api@4.10.0':
'@serve.zone/api@4.13.0':
dependencies:
'@api.global/typedrequest': 3.1.10
'@api.global/typedsocket': 3.0.1
'@push.rocks/smartpromise': 4.0.4
'@push.rocks/smartrx': 3.0.7
'@push.rocks/smartpromise': 4.2.3
'@push.rocks/smartrx': 3.0.10
'@push.rocks/smartstream': 3.2.5
'@serve.zone/interfaces': 4.10.0
'@tsclass/tsclass': 4.2.0
'@serve.zone/interfaces': 4.13.0
'@tsclass/tsclass': 9.5.0
transitivePeerDependencies:
- bufferutil
- supports-color
- utf-8-validate
'@serve.zone/interfaces@4.10.0':
'@serve.zone/interfaces@4.13.0':
dependencies:
'@api.global/typedrequest-interfaces': 3.0.19
'@push.rocks/smartlog-interfaces': 3.0.2
'@tsclass/tsclass': 4.2.0
'@tsclass/tsclass': 9.5.0
'@serve.zone/interfaces@5.4.3':
dependencies:
'@api.global/typedrequest-interfaces': 3.0.19
'@push.rocks/smartlog-interfaces': 3.0.2
'@tsclass/tsclass': 9.5.0
'@sinclair/typebox@0.27.8': {}
@@ -6616,6 +6649,10 @@ snapshots:
dependencies:
type-fest: 4.30.2
'@tsclass/tsclass@9.5.0':
dependencies:
type-fest: 5.6.0
'@types/accepts@1.3.7':
dependencies:
'@types/node': 22.10.2
@@ -9605,6 +9642,8 @@ snapshots:
systeminformation@5.23.5: {}
tagged-tag@1.0.0: {}
tar-fs@2.1.1:
dependencies:
chownr: 1.1.4
@@ -9719,6 +9758,10 @@ snapshots:
type-fest@4.30.2: {}
type-fest@5.6.0:
dependencies:
tagged-tag: 1.0.0
type-is@1.6.18:
dependencies:
media-typer: 0.3.0
+29 -15
View File
@@ -307,8 +307,7 @@ export class ClusterManager {
name: dockerSecretName,
contentArg: JSON.stringify(await secretBundle.getFlatKeyValueObjectForEnvironment()),
labels: {},
version:
await containerImageFromCloudly.data.versions[serviceArgFromCloudly.data.imageVersion],
version: serviceArgFromCloudly.data.imageVersion,
},
);
containerService = await plugins.docker.DockerService.createService(
@@ -328,11 +327,24 @@ export class ClusterManager {
}
}
public async provisionWorkloadServices(
_clusterConfigArg: plugins.servezoneInterfaces.data.ICluster,
) {
const services =
(await this.coreflowRef.cloudlyConnector.cloudlyApiClient.services.getServices()) as unknown as plugins.servezoneInterfaces.data.IService[];
for (const service of services) {
if (service.data.serviceCategory && service.data.serviceCategory !== 'workload') {
continue;
}
await this.provisionWorkloadService(service);
}
}
/**
* update traffic routing
*/
public async updateTrafficRouting(
clusterConfigArg: plugins.servezoneInterfaces.data.IClusterConfig,
_clusterConfigArg: plugins.servezoneInterfaces.data.ICluster,
) {
const services = await this.coreflowRef.dockerHost.getServices();
const webGatewayNetwork = await plugins.docker.DockerNetwork.getNetworkByName(
@@ -351,8 +363,8 @@ export class ClusterManager {
const certificate =
await this.coreflowRef.cloudlyConnector.getCertificateForDomainFromCloudly(hostNameArg);
reverseProxyConfigs.push({
destinationIp: containerDestinationIp,
destinationPort: webDestinationPort,
destinationIps: [containerDestinationIp],
destinationPorts: [Number(webDestinationPort)],
hostName: hostNameArg,
privateKey: certificate.privateKey,
publicKey: certificate.publicKey,
@@ -364,10 +376,12 @@ export class ClusterManager {
};
logger.log('info', `Found ${services.length} services!`);
const workloadServices =
(await this.coreflowRef.cloudlyConnector.cloudlyApiClient.services.getServices()) as unknown as plugins.servezoneInterfaces.data.IService[];
for (const service of services) {
let workloadConfig: plugins.servezoneInterfaces.data.IClusterConfigContainer;
for (const workloadServiceConfig of clusterConfigArg.data.containers) {
if (service.Spec.Name === workloadServiceConfig.name) {
let workloadConfig: plugins.servezoneInterfaces.data.IService | undefined;
for (const workloadServiceConfig of workloadServices) {
if (service.Spec.Name === workloadServiceConfig.data.name) {
workloadConfig = workloadServiceConfig;
break;
}
@@ -386,13 +400,13 @@ export class ClusterManager {
continue;
}
const containerDestinationIp = containersOfServicesOnNetwork[0].IPv4Address.split('/')[0];
const hostNames: string[] = workloadConfig.domains;
const hostNames = (workloadConfig.data.domains || []).map((domainEntry) => domainEntry.name);
// lets route the web port
const webDestinationPort: string = workloadConfig.ports.web.toString();
const webDestinationPort: string = workloadConfig.data.ports.web.toString();
for (const hostName of hostNames) {
await pushProxyConfig(
workloadConfig.name,
workloadConfig.data.name,
hostName,
containerDestinationIp,
webDestinationPort,
@@ -400,14 +414,14 @@ export class ClusterManager {
}
// lets route custom ports
if (workloadConfig.ports.custom) {
const customDomainKeys = Object.keys(workloadConfig.ports.custom);
if (workloadConfig.data.ports.custom) {
const customDomainKeys = Object.keys(workloadConfig.data.ports.custom);
for (const customDomainKey of customDomainKeys) {
await pushProxyConfig(
workloadConfig.name,
workloadConfig.data.name,
customDomainKey,
containerDestinationIp,
workloadConfig.ports.custom[customDomainKey],
workloadConfig.data.ports.custom[customDomainKey],
);
}
}
+1 -1
View File
@@ -36,7 +36,7 @@ export class CloudlyConnector {
public async getConfigFromCloudly(): Promise<plugins.servezoneInterfaces.data.ICluster> {
const config = await this.cloudlyApiClient.getClusterConfigFromCloudlyByIdentity(this.identity);
return config;
return config as unknown as plugins.servezoneInterfaces.data.ICluster;
}
public async getCertificateForDomainFromCloudly(