Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@
// Licensed under the MIT license.

export { AzureAppConfiguration } from "./appConfiguration.js";
export { AzureAppConfigurationOptions } from "./appConfigurationOptions.js";
export { Disposable } from "./common/disposable.js";
export { load, loadFromAzureFrontDoor } from "./load.js";
export { KeyFilter, LabelFilter } from "./types.js";
export { FeatureFlagOptions } from "./featureManagement/featureFlagOptions.js";
export { KeyVaultOptions } from "./keyvault/keyVaultOptions.js";
export { RefreshOptions, FeatureFlagRefreshOptions } from "./refresh/refreshOptions.js";
export { StartupOptions } from "./startupOptions.js";
export { KeyFilter, LabelFilter, SettingSelector } from "./types.js";
export { VERSION } from "./version.js";
11 changes: 5 additions & 6 deletions test/utils/testHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ import { ConfigurationClientWrapper } from "../../src/configurationClientWrapper

const sleepInMs = (ms: number) => new Promise<void>((resolve) => setTimeout(resolve, ms));

const TEST_CLIENT_ID = "00000000-0000-0000-0000-000000000000";
const TEST_TENANT_ID = "00000000-0000-0000-0000-000000000000";
const TEST_CLIENT_SECRET = "0000000000000000000000000000000000000000";

// Async, browser-safe SHA-256 using native crypto.subtle when available; falls back to tiny FNV-1a for Node without subtle.
async function _sha256(input: string): Promise<string> {
let crypto;
Expand Down Expand Up @@ -290,8 +286,11 @@ const createMockedConnectionString = (endpoint = createMockedEndpoint(), secret
return `Endpoint=${endpoint};Id=${id};Secret=${secret}`;
};

const createMockedTokenCredential = (tenantId = TEST_TENANT_ID, clientId = TEST_CLIENT_ID, clientSecret = TEST_CLIENT_SECRET) => {
return new ClientSecretCredential(tenantId, clientId, clientSecret);
const createMockedTokenCredential = () => {
const effectiveTenantId = uuid.v4();
const effectiveClientId = uuid.v4();
const effectiveClientSecret = uuid.v4();
return new ClientSecretCredential(effectiveTenantId, effectiveClientId, effectiveClientSecret);
};

const createMockedKeyVaultReference = (key: string, vaultUri: string): ConfigurationSetting => ({
Expand Down