Skip to content

Commit 28cbd6d

Browse files
Add .gitattributes and normalize line endings (#195)
* add gitattributes * fix line endings
1 parent 1e2f74d commit 28cbd6d

34 files changed

+4435
-4432
lines changed

.gitattributes

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# If there are abnormal line endings in any file, run "git add --renormalize <file_name>",
2+
# review the changes, and commit them to fix the line endings.
3+
* text=auto

.github/workflows/ci.yml

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
1-
name: AppConfiguration-JavaScriptProvider CI
2-
3-
on:
4-
push:
5-
branches: [ "main", "preview" ]
6-
pull_request:
7-
branches: [ "main", "preview" ]
8-
9-
jobs:
10-
build:
11-
12-
runs-on: ubuntu-latest
13-
14-
strategy:
15-
matrix:
16-
node-version: [18.x, 20.x, 22.x]
17-
18-
steps:
19-
- uses: actions/checkout@v3
20-
- name: Use Node.js ${{ matrix.node-version }}
21-
uses: actions/setup-node@v3
22-
with:
23-
node-version: ${{ matrix.node-version }}
24-
cache: 'npm'
25-
- run: npm ci
26-
- run: npm run lint
27-
- run: npm run build
28-
- run: npm test
1+
name: AppConfiguration-JavaScriptProvider CI
2+
3+
on:
4+
push:
5+
branches: [ "main", "preview" ]
6+
pull_request:
7+
branches: [ "main", "preview" ]
8+
9+
jobs:
10+
build:
11+
12+
runs-on: ubuntu-latest
13+
14+
strategy:
15+
matrix:
16+
node-version: [18.x, 20.x, 22.x]
17+
18+
steps:
19+
- uses: actions/checkout@v3
20+
- name: Use Node.js ${{ matrix.node-version }}
21+
uses: actions/setup-node@v3
22+
with:
23+
node-version: ${{ matrix.node-version }}
24+
cache: 'npm'
25+
- run: npm ci
26+
- run: npm run lint
27+
- run: npm run build
28+
- run: npm test

SUPPORT.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
# Support
2-
3-
## How to file issues and get help
4-
5-
This project uses GitHub Issues to track bugs and feature requests. Please search the existing
6-
issues before filing new issues to avoid duplicates. For new issues, file your bug or
7-
feature request as a new Issue.
8-
9-
For help and questions about using this project, please ask a question in Stack Overflow with [azure-app-configuration](https://stackoverflow.com/questions/tagged/azure-app-configuration) tag.
10-
11-
## Microsoft Support Policy
12-
13-
Support for this project is limited to the resources listed above.
1+
# Support
2+
3+
## How to file issues and get help
4+
5+
This project uses GitHub Issues to track bugs and feature requests. Please search the existing
6+
issues before filing new issues to avoid duplicates. For new issues, file your bug or
7+
feature request as a new Issue.
8+
9+
For help and questions about using this project, please ask a question in Stack Overflow with [azure-app-configuration](https://stackoverflow.com/questions/tagged/azure-app-configuration) tag.
10+
11+
## Microsoft Support Policy
12+
13+
Support for this project is limited to the resources listed above.

rollup.config.mjs

Lines changed: 49 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,49 @@
1-
// rollup.config.js
2-
import typescript from "@rollup/plugin-typescript";
3-
import dts from "rollup-plugin-dts";
4-
5-
export default [
6-
{
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-
],
16-
input: "src/index.ts",
17-
output: [
18-
{
19-
file: "dist/index.js",
20-
format: "cjs",
21-
sourcemap: true
22-
},
23-
],
24-
plugins: [
25-
typescript({
26-
compilerOptions: {
27-
"lib": [
28-
"DOM",
29-
"WebWorker",
30-
"ESNext"
31-
],
32-
"skipDefaultLibCheck": true,
33-
"module": "ESNext",
34-
"moduleResolution": "Node",
35-
"target": "ES2022",
36-
"strictNullChecks": true,
37-
"strictFunctionTypes": true,
38-
"sourceMap": true,
39-
"inlineSources": true
40-
}
41-
})
42-
],
43-
},
44-
{
45-
input: "src/index.ts",
46-
output: [{ file: "types/index.d.ts", format: "es" }],
47-
plugins: [dts()],
48-
},
49-
];
1+
// rollup.config.js
2+
import typescript from "@rollup/plugin-typescript";
3+
import dts from "rollup-plugin-dts";
4+
5+
export default [
6+
{
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+
],
16+
input: "src/index.ts",
17+
output: [
18+
{
19+
file: "dist/index.js",
20+
format: "cjs",
21+
sourcemap: true
22+
},
23+
],
24+
plugins: [
25+
typescript({
26+
compilerOptions: {
27+
"lib": [
28+
"DOM",
29+
"WebWorker",
30+
"ESNext"
31+
],
32+
"skipDefaultLibCheck": true,
33+
"module": "ESNext",
34+
"moduleResolution": "Node",
35+
"target": "ES2022",
36+
"strictNullChecks": true,
37+
"strictFunctionTypes": true,
38+
"sourceMap": true,
39+
"inlineSources": true
40+
}
41+
})
42+
],
43+
},
44+
{
45+
input: "src/index.ts",
46+
output: [{ file: "types/index.d.ts", format: "es" }],
47+
plugins: [dts()],
48+
},
49+
];

src/AzureAppConfiguration.ts

Lines changed: 47 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,47 @@
1-
// Copyright (c) Microsoft Corporation.
2-
// Licensed under the MIT license.
3-
4-
import { Disposable } from "./common/disposable.js";
5-
6-
/**
7-
* Azure App Configuration provider.
8-
*/
9-
export type AzureAppConfiguration = {
10-
/**
11-
* API to trigger refresh operation.
12-
*/
13-
refresh(): Promise<void>;
14-
15-
/**
16-
* API to register callback listeners, which will be called only when a refresh operation successfully updates key-values or feature flags.
17-
*
18-
* @param listener - Callback function to be registered.
19-
* @param thisArg - Optional. Value to use as `this` when executing callback.
20-
*/
21-
onRefresh(listener: () => any, thisArg?: any): Disposable;
22-
} & IGettable & ReadonlyMap<string, any> & IConfigurationObject;
23-
24-
interface IConfigurationObject {
25-
/**
26-
* Construct configuration object based on Map-styled data structure and hierarchical keys.
27-
* @param options - The options to control the conversion behavior.
28-
*/
29-
constructConfigurationObject(options?: ConfigurationObjectConstructionOptions): Record<string, any>;
30-
}
31-
32-
export interface ConfigurationObjectConstructionOptions {
33-
/**
34-
* The separator to use when converting hierarchical keys to object properties.
35-
* Supported values: '.', ',', ';', '-', '_', '__', '/', ':'.
36-
* If separator is undefined, '.' will be used by default.
37-
*/
38-
separator?: "." | "," | ";" | "-" | "_" | "__" | "/" | ":";
39-
}
40-
41-
interface IGettable {
42-
/**
43-
* Get the value of a key-value from the Map-styled data structure.
44-
* @param key - The key of the key-value to be retrieved.
45-
*/
46-
get<T>(key: string): T | undefined;
47-
}
1+
// Copyright (c) Microsoft Corporation.
2+
// Licensed under the MIT license.
3+
4+
import { Disposable } from "./common/disposable.js";
5+
6+
/**
7+
* Azure App Configuration provider.
8+
*/
9+
export type AzureAppConfiguration = {
10+
/**
11+
* API to trigger refresh operation.
12+
*/
13+
refresh(): Promise<void>;
14+
15+
/**
16+
* API to register callback listeners, which will be called only when a refresh operation successfully updates key-values or feature flags.
17+
*
18+
* @param listener - Callback function to be registered.
19+
* @param thisArg - Optional. Value to use as `this` when executing callback.
20+
*/
21+
onRefresh(listener: () => any, thisArg?: any): Disposable;
22+
} & IGettable & ReadonlyMap<string, any> & IConfigurationObject;
23+
24+
interface IConfigurationObject {
25+
/**
26+
* Construct configuration object based on Map-styled data structure and hierarchical keys.
27+
* @param options - The options to control the conversion behavior.
28+
*/
29+
constructConfigurationObject(options?: ConfigurationObjectConstructionOptions): Record<string, any>;
30+
}
31+
32+
export interface ConfigurationObjectConstructionOptions {
33+
/**
34+
* The separator to use when converting hierarchical keys to object properties.
35+
* Supported values: '.', ',', ';', '-', '_', '__', '/', ':'.
36+
* If separator is undefined, '.' will be used by default.
37+
*/
38+
separator?: "." | "," | ";" | "-" | "_" | "__" | "/" | ":";
39+
}
40+
41+
interface IGettable {
42+
/**
43+
* Get the value of a key-value from the Map-styled data structure.
44+
* @param key - The key of the key-value to be retrieved.
45+
*/
46+
get<T>(key: string): T | undefined;
47+
}

0 commit comments

Comments
 (0)