Skip to content

Commit a0e0792

Browse files
update
1 parent 233af51 commit a0e0792

File tree

9 files changed

+61
-53
lines changed

9 files changed

+61
-53
lines changed

rollup.config.mjs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,15 @@ import dts from "rollup-plugin-dts";
44

55
export default [
66
{
7-
external: ["@azure/app-configuration", "@azure/keyvault-secrets", "@azure/core-rest-pipeline", "crypto", "dns/promises", "@microsoft/feature-management"],
7+
external: [
8+
"@azure/app-configuration",
9+
"@azure/keyvault-secrets",
10+
"@azure/core-rest-pipeline",
11+
"@azure/identity",
12+
"crypto",
13+
"dns/promises",
14+
"@microsoft/feature-management"
15+
],
816
input: "src/index.ts",
917
output: [
1018
{

src/AzureAppConfigurationImpl.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { AzureAppConfigurationOptions } from "./AzureAppConfigurationOptions.js"
88
import { IKeyValueAdapter } from "./IKeyValueAdapter.js";
99
import { JsonKeyValueAdapter } from "./JsonKeyValueAdapter.js";
1010
import { DEFAULT_STARTUP_TIMEOUT_IN_MS } from "./StartupOptions.js";
11-
import { DEFAULT_REFRESH_INTERVAL_IN_MS, MIN_REFRESH_INTERVAL_IN_MS } from "./RefreshOptions.js";
11+
import { DEFAULT_REFRESH_INTERVAL_IN_MS, MIN_REFRESH_INTERVAL_IN_MS } from "./refresh/refreshOptions.js";
1212
import { Disposable } from "./common/disposable.js";
1313
import { base64Helper, jsonSorter } from "./common/utils.js";
1414
import {

src/AzureAppConfigurationOptions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
import { AppConfigurationClientOptions } from "@azure/app-configuration";
55
import { KeyVaultOptions } from "./keyvault/KeyVaultOptions.js";
6-
import { RefreshOptions } from "./RefreshOptions.js";
6+
import { RefreshOptions } from "./refresh/refreshOptions.js";
77
import { SettingSelector } from "./types.js";
88
import { FeatureFlagOptions } from "./featureManagement/FeatureFlagOptions.js";
99
import { StartupOptions } from "./StartupOptions.js";

src/StartupOptions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export interface StartupOptions {
88
* The amount of time allowed to load data from Azure App Configuration on startup.
99
*
1010
* @remarks
11-
* If not specified, the default value is 100 seconds. Must be greater than 1 second.
11+
* If not specified, the default value is 100 seconds.
1212
*/
1313
timeoutInMs?: number;
1414
}

src/common/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,4 @@ export function getUrlHost(url: string) {
4949

5050
export function instanceOfTokenCredential(obj: unknown) {
5151
return obj && typeof obj === "object" && "getToken" in obj && typeof obj.getToken === "function";
52-
}
52+
}

src/featureManagement/FeatureFlagOptions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright (c) Microsoft Corporation.
22
// Licensed under the MIT license.
33

4-
import { FeatureFlagRefreshOptions } from "../RefreshOptions.js";
4+
import { FeatureFlagRefreshOptions } from "../refresh/refreshOptions.js";
55
import { SettingSelector } from "../types.js";
66

77
/**

src/keyvault/AzureKeyVaultKeyValueAdapter.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ export class AzureKeyVaultKeyValueAdapter implements IKeyValueAdapter {
5050
}
5151

5252
/**
53-
*
53+
*
5454
* @param vaultUrl - The url of the key vault.
55-
* @returns
55+
* @returns
5656
*/
5757
#getSecretClient(vaultUrl: URL): SecretClient | undefined {
5858
if (this.#secretClients === undefined) {
Lines changed: 44 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,44 @@
1-
// Copyright (c) Microsoft Corporation.
2-
// Licensed under the MIT license.
3-
4-
import { WatchedSetting } from "./WatchedSetting.js";
5-
6-
export const DEFAULT_REFRESH_INTERVAL_IN_MS = 30 * 1000;
7-
export const MIN_REFRESH_INTERVAL_IN_MS = 1 * 1000;
8-
9-
export interface RefreshOptions {
10-
/**
11-
* Specifies whether the provider should automatically refresh when the configuration is changed.
12-
*/
13-
enabled: boolean;
14-
15-
/**
16-
* Specifies the minimum time that must elapse before checking the server for any new changes.
17-
* Default value is 30 seconds. Must be greater than 1 second.
18-
* Any refresh operation triggered will not update the value for a key until after the interval.
19-
*/
20-
refreshIntervalInMs?: number;
21-
22-
/**
23-
* One or more configuration settings to be watched for changes on the server.
24-
* Any modifications to watched settings will refresh all settings loaded by the configuration provider when refresh() is called.
25-
*
26-
* @remarks
27-
* If no watched setting is specified, all configuration settings will be watched.
28-
*/
29-
watchedSettings?: WatchedSetting[];
30-
}
31-
32-
export interface FeatureFlagRefreshOptions {
33-
/**
34-
* Specifies whether the provider should automatically refresh all feature flags if any feature flag changes.
35-
*/
36-
enabled: boolean;
37-
38-
/**
39-
* Specifies the minimum time that must elapse before checking the server for any new changes.
40-
* Default value is 30 seconds. Must be greater than 1 second.
41-
* Any refresh operation triggered will not update the value for a key until after the interval.
42-
*/
43-
refreshIntervalInMs?: number;
44-
}
1+
// Copyright (c) Microsoft Corporation.
2+
// Licensed under the MIT license.
3+
4+
import { WatchedSetting } from "../WatchedSetting.js";
5+
6+
export const DEFAULT_REFRESH_INTERVAL_IN_MS = 30 * 1000;
7+
export const MIN_REFRESH_INTERVAL_IN_MS = 1 * 1000;
8+
9+
export interface RefreshOptions {
10+
/**
11+
* Specifies whether the provider should automatically refresh when the configuration is changed.
12+
*/
13+
enabled: boolean;
14+
15+
/**
16+
* Specifies the minimum time that must elapse before checking the server for any new changes.
17+
* Default value is 30 seconds. Must be greater than 1 second.
18+
* Any refresh operation triggered will not update the value for a key until after the interval.
19+
*/
20+
refreshIntervalInMs?: number;
21+
22+
/**
23+
* One or more configuration settings to be watched for changes on the server.
24+
* Any modifications to watched settings will refresh all settings loaded by the configuration provider when refresh() is called.
25+
*
26+
* @remarks
27+
* If no watched setting is specified, all configuration settings will be watched.
28+
*/
29+
watchedSettings?: WatchedSetting[];
30+
}
31+
32+
export interface FeatureFlagRefreshOptions {
33+
/**
34+
* Specifies whether the provider should automatically refresh all feature flags if any feature flag changes.
35+
*/
36+
enabled: boolean;
37+
38+
/**
39+
* Specifies the minimum time that must elapse before checking the server for any new changes.
40+
* Default value is 30 seconds. Must be greater than 1 second.
41+
* Any refresh operation triggered will not update the value for a key until after the interval.
42+
*/
43+
refreshIntervalInMs?: number;
44+
}

test/load.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ describe("load", function () {
359359
* When constructConfigurationObject() is called, it first constructs from key "app5.settings.fontColor" and then from key "app5.settings".
360360
* An error will be thrown when constructing from key "app5.settings" because there is ambiguity between the two keys.
361361
*/
362-
it("Edge case 1: Hierarchical key-value pairs with overlapped key prefix.", async () => {
362+
it("Edge case 2: Hierarchical key-value pairs with overlapped key prefix.", async () => {
363363
const connectionString = createMockedConnectionString();
364364
const settings = await load(connectionString, {
365365
selectors: [{

0 commit comments

Comments
 (0)