chore(deps): modernize coreflow tooling

This commit is contained in:
2026-04-28 12:02:22 +00:00
parent 9cce79f040
commit 6ba5e36f4f
20 changed files with 6311 additions and 6166 deletions
+13 -5
View File
@@ -7,21 +7,29 @@ import { Coreflow } from './coreflow.classes.coreflow.js';
export class CloudlyConnector {
public coreflowRef: Coreflow;
public cloudlyApiClient: plugins.servezoneApi.CloudlyApiClient;
public coreflowJumpCode: string;
public identity: plugins.servezoneInterfaces.data.IIdentity;
public cloudlyApiClient!: plugins.servezoneApi.CloudlyApiClient;
public coreflowJumpCode!: string;
public identity!: plugins.servezoneInterfaces.data.IIdentity;
constructor(coreflowRefArg: Coreflow) {
this.coreflowRef = coreflowRefArg;
}
public async start() {
const cloudlyUrl = await this.coreflowRef.serviceQenv.getEnvVarOnDemand('CLOUDLY_URL');
if (!cloudlyUrl) {
throw new Error('Missing required CLOUDLY_URL environment variable');
}
this.cloudlyApiClient = new plugins.servezoneApi.CloudlyApiClient({
registerAs: 'coreflow',
cloudlyUrl: await this.coreflowRef.serviceQenv.getEnvVarOnDemand('CLOUDLY_URL'),
cloudlyUrl,
});
await this.cloudlyApiClient.start();
this.coreflowJumpCode = await this.coreflowRef.serviceQenv.getEnvVarOnDemand('JUMPCODE');
const coreflowJumpCode = await this.coreflowRef.serviceQenv.getEnvVarOnDemand('JUMPCODE');
if (!coreflowJumpCode) {
throw new Error('Missing required JUMPCODE environment variable');
}
this.coreflowJumpCode = coreflowJumpCode;
// get identity and tag connection (second parameter is true -> tags the connection)
this.identity = await this.cloudlyApiClient.getIdentityByToken(this.coreflowJumpCode, {