Skip to content

Commit

Permalink
refactor: pass Camunda8 through
Browse files Browse the repository at this point in the history
  • Loading branch information
jwulf committed Apr 10, 2024
1 parent 56d9a23 commit 4c9773a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions app/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const path = require('path');

const fs = require('fs');

const Camunda8 = require('@camunda8/sdk');
const { Camunda8 } = require('@camunda8/sdk');

const Cli = require('./cli');
const Config = require('./config');
Expand Down Expand Up @@ -680,7 +680,7 @@ function bootstrap() {
errorTracking.setTag(Sentry, 'plugins', generatePluginsTag(plugins));

// (9) zeebe API
const zeebeAPI = new ZeebeAPI({ readFile }, Camunda8.ZeebeGrpcApiClient, flags);
const zeebeAPI = new ZeebeAPI({ readFile }, Camunda8, flags);

return {
config,
Expand Down
6 changes: 3 additions & 3 deletions app/lib/zeebe-api/zeebe-api.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,10 @@ const RESOURCE_TYPES = {
*/

class ZeebeAPI {
constructor(fs, ZeebeGrpcApiClient, flags, log = createLog('app:zeebe-api')) {
constructor(fs, Camunda8, flags, log = createLog('app:zeebe-api')) {
this._fs = fs;

this._ZeebeGrpcApiClient = ZeebeGrpcApiClient;
this._Camunda8 = Camunda8;
this._flags = flags;
this._log = log;

Expand Down Expand Up @@ -355,7 +355,7 @@ class ZeebeAPI {
])
});

return new this._ZeebeGrpcApiClient({ config: options });
return (new this._Camunda8(options)).getZeebeGrpcApiClient();
}

async _withTLSConfig(url, options) {
Expand Down

0 comments on commit 4c9773a

Please sign in to comment.