1
0
mirror of https://github.com/bitwarden/directory-connector synced 2025-12-11 05:43:26 +00:00

Client & Version headers (#226)

This commit is contained in:
Oscar Hinton
2022-02-08 15:28:19 +01:00
committed by GitHub
parent 1146c8f5bf
commit 3be1f2eac6
3 changed files with 8 additions and 4 deletions

2
jslib

Submodule jslib updated: 6b8508579f...8130fce404

View File

@@ -10,8 +10,8 @@ import { AuthGuardService } from "./auth-guard.service";
import { LaunchGuardService } from "./launch-guard.service";
import { I18nService } from "../../services/i18n.service";
import { SyncService } from "../../services/sync.service";
import { NoopTwoFactorService } from "../../services/noop/noopTwoFactor.service";
import { SyncService } from "../../services/sync.service";
import { JslibServicesModule } from "jslib-angular/services/jslib-services.module";
@@ -127,7 +127,7 @@ export function initFactory(
i18nService: I18nServiceAbstraction,
messagingService: MessagingServiceAbstraction,
stateService: StateServiceAbstraction
) => new ElectronPlatformUtilsService(i18nService, messagingService, true, stateService),
) => new ElectronPlatformUtilsService(i18nService, messagingService, false, stateService),
deps: [I18nServiceAbstraction, MessagingServiceAbstraction, StateServiceAbstraction],
},
{ provide: CryptoFunctionServiceAbstraction, useClass: NodeCryptoFunctionService, deps: [] },

View File

@@ -1,6 +1,7 @@
import * as fs from "fs";
import * as path from "path";
import { ClientType } from "jslib-common/enums/clientType";
import { LogLevelType } from "jslib-common/enums/logLevelType";
import { AuthService } from "./services/auth.service";
@@ -110,7 +111,10 @@ export class Main {
const plaintextSecrets = process.env.BITWARDENCLI_CONNECTOR_PLAINTEXT_SECRETS === "true";
this.i18nService = new I18nService("en", "./locales");
this.platformUtilsService = new CliPlatformUtilsService("connector", packageJson);
this.platformUtilsService = new CliPlatformUtilsService(
ClientType.DirectoryConnector,
packageJson
);
this.logService = new ConsoleLogService(
this.platformUtilsService.isDev(),
(level) => process.env.BITWARDENCLI_CONNECTOR_DEBUG !== "true" && level <= LogLevelType.Info