Skip to content

Commit 197f4b8

Browse files
resolve merge conflict
2 parents 6dad98d + 7503688 commit 197f4b8

22 files changed

+138
-2677
lines changed

package-lock.json

Lines changed: 25 additions & 2614 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@azure/app-configuration-provider",
3-
"version": "1.1.0",
3+
"version": "1.1.1",
44
"description": "The JavaScript configuration provider for Azure App Configuration",
55
"main": "dist/index.js",
66
"module": "./dist-esm/index.js",
@@ -35,7 +35,7 @@
3535
"devDependencies": {
3636
"@rollup/plugin-typescript": "^11.1.2",
3737
"@types/mocha": "^10.0.4",
38-
"@types/node": "^20.5.7",
38+
"@types/node": "^22.7.7",
3939
"@types/sinon": "^17.0.1",
4040
"@types/uuid": "^9.0.7",
4141
"@typescript-eslint/eslint-plugin": "^6.6.0",
@@ -47,11 +47,11 @@
4747
"mocha": "^10.2.0",
4848
"nock": "^13.3.3",
4949
"rimraf": "^5.0.1",
50-
"rollup": "^3.26.3",
50+
"rollup": "^3.29.5",
5151
"rollup-plugin-dts": "^5.3.0",
5252
"sinon": "^15.2.0",
5353
"tslib": "^2.6.0",
54-
"typescript": "^5.1.6",
54+
"typescript": "^5.6.3",
5555
"uuid": "^9.0.1"
5656
},
5757
"dependencies": {

src/AzureAppConfiguration.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 { Disposable } from "./common/disposable";
4+
import { Disposable } from "./common/disposable.js";
55

66
export type AzureAppConfiguration = {
77
/**

src/AzureAppConfigurationImpl.ts

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33

44
import { AppConfigurationClient, ConfigurationSetting, ConfigurationSettingId, GetConfigurationSettingOptions, GetConfigurationSettingResponse, ListConfigurationSettingsOptions, featureFlagPrefix, isFeatureFlag } from "@azure/app-configuration";
55
import { isRestError } from "@azure/core-rest-pipeline";
6-
import { AzureAppConfiguration, ConfigurationObjectConstructionOptions } from "./AzureAppConfiguration";
7-
import { AzureAppConfigurationOptions } from "./AzureAppConfigurationOptions";
8-
import { IKeyValueAdapter } from "./IKeyValueAdapter";
9-
import { JsonKeyValueAdapter } from "./JsonKeyValueAdapter";
10-
import { DEFAULT_REFRESH_INTERVAL_IN_MS, MIN_REFRESH_INTERVAL_IN_MS } from "./RefreshOptions";
11-
import { Disposable } from "./common/disposable";
12-
import { base64Helper, jsonSorter } from "./common/utils";
6+
import { AzureAppConfiguration, ConfigurationObjectConstructionOptions } from "./AzureAppConfiguration.js";
7+
import { AzureAppConfigurationOptions } from "./AzureAppConfigurationOptions.js";
8+
import { IKeyValueAdapter } from "./IKeyValueAdapter.js";
9+
import { JsonKeyValueAdapter } from "./JsonKeyValueAdapter.js";
10+
import { DEFAULT_REFRESH_INTERVAL_IN_MS, MIN_REFRESH_INTERVAL_IN_MS } from "./RefreshOptions.js";
11+
import { Disposable } from "./common/disposable.js";
12+
import { base64Helper, jsonSorter } from "./common/utils.js";
1313
import {
1414
FEATURE_FLAGS_KEY_NAME,
1515
FEATURE_MANAGEMENT_KEY_NAME,
@@ -30,11 +30,11 @@ import {
3030
VARIANT_KEY_NAME,
3131
VARIANTS_KEY_NAME,
3232
CONFIGURATION_VALUE_KEY_NAME
33-
} from "./featureManagement/constants";
34-
import { AzureKeyVaultKeyValueAdapter } from "./keyvault/AzureKeyVaultKeyValueAdapter";
35-
import { RefreshTimer } from "./refresh/RefreshTimer";
36-
import { getConfigurationSettingWithTrace, listConfigurationSettingsWithTrace, requestTracingEnabled } from "./requestTracing/utils";
37-
import { KeyFilter, LabelFilter, SettingSelector } from "./types";
33+
} from "./featureManagement/constants.js";
34+
import { AzureKeyVaultKeyValueAdapter } from "./keyvault/AzureKeyVaultKeyValueAdapter.js";
35+
import { RefreshTimer } from "./refresh/RefreshTimer.js";
36+
import { getConfigurationSettingWithTrace, listConfigurationSettingsWithTrace, requestTracingEnabled } from "./requestTracing/utils.js";
37+
import { KeyFilter, LabelFilter, SettingSelector } from "./types.js";
3838

3939
type PagedSettingSelector = SettingSelector & {
4040
/**
@@ -87,7 +87,7 @@ export class AzureAppConfigurationImpl implements AzureAppConfiguration {
8787
this.#options = options;
8888

8989
// Enable request tracing if not opt-out
90-
this.#requestTracingEnabled = requestTracingEnabled();
90+
this.#requestTracingEnabled = options?.requestTracingOptions?.enabled ?? requestTracingEnabled();
9191

9292
if (options?.trimKeyPrefixes) {
9393
this.#sortedTrimKeyPrefixes = [...options.trimKeyPrefixes].sort((a, b) => b.localeCompare(a));
@@ -164,19 +164,19 @@ export class AzureAppConfigurationImpl implements AzureAppConfiguration {
164164
return this.#configMap.size;
165165
}
166166

167-
entries(): IterableIterator<[string, any]> {
167+
entries(): MapIterator<[string, any]> {
168168
return this.#configMap.entries();
169169
}
170170

171-
keys(): IterableIterator<string> {
171+
keys(): MapIterator<string> {
172172
return this.#configMap.keys();
173173
}
174174

175-
values(): IterableIterator<any> {
175+
values(): MapIterator<any> {
176176
return this.#configMap.values();
177177
}
178178

179-
[Symbol.iterator](): IterableIterator<[string, any]> {
179+
[Symbol.iterator](): MapIterator<[string, any]> {
180180
return this.#configMap[Symbol.iterator]();
181181
}
182182
// #endregion

src/AzureAppConfigurationOptions.ts

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22
// Licensed under the MIT license.
33

44
import { AppConfigurationClientOptions } from "@azure/app-configuration";
5-
import { KeyVaultOptions } from "./keyvault/KeyVaultOptions";
6-
import { RefreshOptions } from "./RefreshOptions";
7-
import { SettingSelector } from "./types";
8-
import { FeatureFlagOptions } from "./featureManagement/FeatureFlagOptions";
5+
import { KeyVaultOptions } from "./keyvault/KeyVaultOptions.js";
6+
import { RefreshOptions } from "./RefreshOptions.js";
7+
import { SettingSelector } from "./types.js";
8+
import { FeatureFlagOptions } from "./featureManagement/FeatureFlagOptions.js";
9+
import { RequestTracingOptions } from "./requestTracing/RequestTracingOptions.js";
910

1011
export const MaxRetries = 2;
1112
export const MaxRetryDelayInMs = 60000;
@@ -47,4 +48,9 @@ export interface AzureAppConfigurationOptions {
4748
* Specifies options used to configure feature flags.
4849
*/
4950
featureFlagOptions?: FeatureFlagOptions;
50-
}
51+
52+
/**
53+
* Specifies options used to configure request tracing.
54+
*/
55+
requestTracingOptions?: RequestTracingOptions;
56+
}

src/JsonKeyValueAdapter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Licensed under the MIT license.
33

44
import { ConfigurationSetting, featureFlagContentType, secretReferenceContentType } from "@azure/app-configuration";
5-
import { IKeyValueAdapter } from "./IKeyValueAdapter";
5+
import { IKeyValueAdapter } from "./IKeyValueAdapter.js";
66

77
export class JsonKeyValueAdapter implements IKeyValueAdapter {
88
static readonly #ExcludedJsonContentTypes: string[] = [

src/RefreshOptions.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 { WatchedSetting } from "./WatchedSetting";
4+
import { WatchedSetting } from "./WatchedSetting.js";
55

66
export const DEFAULT_REFRESH_INTERVAL_IN_MS = 30 * 1000;
77
export const MIN_REFRESH_INTERVAL_IN_MS = 1 * 1000;

src/featureManagement/FeatureFlagOptions.ts

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

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

77
/**
88
* Options used to configure feature flags.
@@ -27,4 +27,4 @@ export interface FeatureFlagOptions {
2727
* Specifies how feature flag refresh is configured. All selected feature flags will be watched for changes.
2828
*/
2929
refresh?: FeatureFlagRefreshOptions;
30-
}
30+
}

src/index.ts

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

4-
export { AzureAppConfiguration } from "./AzureAppConfiguration";
5-
export { Disposable } from "./common/disposable";
6-
export { load } from "./load";
7-
export { KeyFilter, LabelFilter } from "./types";
4+
export { AzureAppConfiguration } from "./AzureAppConfiguration.js";
5+
export { Disposable } from "./common/disposable.js";
6+
export { load, loadFromCdn } from "./load.js";
7+
export { KeyFilter, LabelFilter } from "./types.js";
8+
export { VERSION } from "./version.js";

src/keyvault/AzureKeyVaultKeyValueAdapter.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
// Licensed under the MIT license.
33

44
import { ConfigurationSetting, isSecretReference, parseSecretReference } from "@azure/app-configuration";
5-
import { IKeyValueAdapter } from "../IKeyValueAdapter";
6-
import { KeyVaultOptions } from "./KeyVaultOptions";
5+
import { IKeyValueAdapter } from "../IKeyValueAdapter.js";
6+
import { KeyVaultOptions } from "./KeyVaultOptions.js";
77
import { SecretClient, parseKeyVaultSecretIdentifier } from "@azure/keyvault-secrets";
88

99
export class AzureKeyVaultKeyValueAdapter implements IKeyValueAdapter {
@@ -72,4 +72,4 @@ export class AzureKeyVaultKeyValueAdapter implements IKeyValueAdapter {
7272

7373
function getHost(url: string) {
7474
return new URL(url).host;
75-
}
75+
}

0 commit comments

Comments
 (0)