Skip to content

Commit 98f1a0a

Browse files
Merge pull request #130 from Azure/zhiyuanliang/revert
Revert loadFromCdn
2 parents 173e890 + ae78584 commit 98f1a0a

File tree

2 files changed

+1
-18
lines changed

2 files changed

+1
-18
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 } from "./load.js";
77
export { KeyFilter, LabelFilter } from "./types.js";
88
export { VERSION } from "./version.js";

src/load.ts

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -82,23 +82,6 @@ export async function load(
8282
}
8383
}
8484

85-
/**
86-
* Loads the data from a CDN and returns an instance of AzureAppConfiguration.
87-
* @param cdnEndpoint The URL to the CDN.
88-
* @param appConfigOptions Optional parameters.
89-
*/
90-
export async function loadFromCdn(cdnEndpoint: URL | string, options?: AzureAppConfigurationOptions): Promise<AzureAppConfiguration>;
91-
92-
export async function loadFromCdn(
93-
cdnEndpoint: string | URL,
94-
appConfigOptions?: AzureAppConfigurationOptions
95-
): Promise<AzureAppConfiguration> {
96-
const emptyTokenCredential: TokenCredential = {
97-
getToken: async () => ({ token: "", expiresOnTimestamp: 0 })
98-
};
99-
return await load(cdnEndpoint, emptyTokenCredential, appConfigOptions);
100-
}
101-
10285
function instanceOfTokenCredential(obj: unknown) {
10386
return obj && typeof obj === "object" && "getToken" in obj && typeof obj.getToken === "function";
10487
}

0 commit comments

Comments
 (0)