Skip to content

Commit 4f99512

Browse files
rename api to loadFromAzureFrontDoor
1 parent 3f05285 commit 4f99512

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

src/index.ts

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

44
export { AzureAppConfiguration } from "./AzureAppConfiguration.js";
55
export { Disposable } from "./common/disposable.js";
6-
export { load, loadFromCdn } from "./load.js";
6+
export { load, loadFromAzureFrontDoor } from "./load.js";
77
export { KeyFilter, LabelFilter } from "./types.js";
88
export { VERSION } from "./version.js";

src/load.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,14 +66,14 @@ export async function load(
6666
}
6767

6868
/**
69-
* Loads the data from a CDN and returns an instance of AzureAppConfiguration.
70-
* @param cdnEndpoint The URL to the CDN.
69+
* Loads the data from Azure Front Door (CDN) and returns an instance of AzureAppConfiguration.
70+
* @param endpoint The URL to the Azure Front Door.
7171
* @param appConfigOptions Optional parameters.
7272
*/
73-
export async function loadFromCdn(cdnEndpoint: URL | string, options?: AzureAppConfigurationOptions): Promise<AzureAppConfiguration>;
73+
export async function loadFromAzureFrontDoor(endpoint: URL | string, options?: AzureAppConfigurationOptions): Promise<AzureAppConfiguration>;
7474

75-
export async function loadFromCdn(
76-
cdnEndpoint: string | URL,
75+
export async function loadFromAzureFrontDoor(
76+
endpoint: string | URL,
7777
appConfigOptions?: AzureAppConfigurationOptions
7878
): Promise<AzureAppConfiguration> {
7979
if (appConfigOptions === undefined) {
@@ -97,5 +97,5 @@ export async function loadFromCdn(
9797
]
9898
};
9999

100-
return await load(cdnEndpoint, emptyTokenCredential, appConfigOptions);
100+
return await load(endpoint, emptyTokenCredential, appConfigOptions);
101101
}

test/exportedApi.ts

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

4-
export { load, loadFromCdn } from "../src";
4+
export { load, loadFromAzureFrontDoor } from "../src";

test/requestTracing.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ chai.use(chaiAsPromised);
77
const expect = chai.expect;
88
import { MAX_TIME_OUT, HttpRequestHeadersPolicy, createMockedConnectionString, createMockedKeyValue, createMockedFeatureFlag, createMockedTokenCredential, mockAppConfigurationClientListConfigurationSettings, restoreMocks, sinon, sleepInMs } from "./utils/testHelper.js";
99
import { ConfigurationClientManager } from "../src/ConfigurationClientManager.js";
10-
import { load, loadFromCdn } from "./exportedApi.js";
10+
import { load, loadFromAzureFrontDoor } from "./exportedApi.js";
1111

1212
const CORRELATION_CONTEXT_HEADER_NAME = "Correlation-Context";
1313

@@ -111,9 +111,9 @@ describe("request tracing", function () {
111111
sinon.restore();
112112
});
113113

114-
it("should have cdn tag in correlation-context header when loadFromCdn is used", async () => {
114+
it("should have cdn tag in correlation-context header when loadFromAzureFrontDoor is used", async () => {
115115
try {
116-
await loadFromCdn(fakeEndpoint, {
116+
await loadFromAzureFrontDoor(fakeEndpoint, {
117117
clientOptions,
118118
startupOptions: {
119119
timeoutInMs: 1

0 commit comments

Comments
 (0)