@azure/app-configuration-importer 1.0.0-preview → 1.1.0-preview
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +67 -0
- package/dist/index.js +7110 -217
- package/dist/index.js.map +1 -1
- package/dist-esm/src/MsFeatureFlagSchema.js +122 -0
- package/dist-esm/src/MsFeatureFlagSchema.js.map +1 -0
- package/dist-esm/src/appConfigurationImporter.js +157 -0
- package/dist-esm/src/appConfigurationImporter.js.map +1 -0
- package/dist-esm/src/enums.js +28 -0
- package/dist-esm/src/enums.js.map +1 -0
- package/dist-esm/src/errors.js +53 -0
- package/dist-esm/src/errors.js.map +1 -0
- package/dist-esm/src/featureFlag.js +12 -0
- package/dist-esm/src/featureFlag.js.map +1 -0
- package/dist-esm/src/importOptions.js +4 -0
- package/dist-esm/src/importOptions.js.map +1 -0
- package/dist-esm/src/index.js +9 -0
- package/dist-esm/src/index.js.map +1 -0
- package/dist-esm/src/internal/adaptiveTaskManager.js +69 -0
- package/dist-esm/src/internal/adaptiveTaskManager.js.map +1 -0
- package/dist-esm/src/internal/constants.js +36 -0
- package/dist-esm/src/internal/constants.js.map +1 -0
- package/dist-esm/src/internal/parsers/configurationSettingsConverter.js +4 -0
- package/dist-esm/src/internal/parsers/configurationSettingsConverter.js.map +1 -0
- package/dist-esm/src/internal/parsers/defaultConfigurationSettingsConverter.js +328 -0
- package/dist-esm/src/internal/parsers/defaultConfigurationSettingsConverter.js.map +1 -0
- package/dist-esm/src/internal/parsers/kvSetConfigurationSettingsConverter.js +66 -0
- package/dist-esm/src/internal/parsers/kvSetConfigurationSettingsConverter.js.map +1 -0
- package/dist-esm/src/internal/stream.browser.js +16 -0
- package/dist-esm/src/internal/stream.browser.js.map +1 -0
- package/dist-esm/src/internal/stream.js +15 -0
- package/dist-esm/src/internal/stream.js.map +1 -0
- package/dist-esm/src/internal/utils.js +129 -0
- package/dist-esm/src/internal/utils.js.map +1 -0
- package/dist-esm/src/models.js +4 -0
- package/dist-esm/src/models.js.map +1 -0
- package/dist-esm/src/settingsImport/configurationSettingsSource.js +4 -0
- package/dist-esm/src/settingsImport/configurationSettingsSource.js.map +1 -0
- package/dist-esm/src/settingsImport/iterableConfigurationSettingsSource.js +83 -0
- package/dist-esm/src/settingsImport/iterableConfigurationSettingsSource.js.map +1 -0
- package/dist-esm/src/settingsImport/readableStreamConfigurationSettingsSource.js +49 -0
- package/dist-esm/src/settingsImport/readableStreamConfigurationSettingsSource.js.map +1 -0
- package/dist-esm/src/settingsImport/stringConfigurationSettingsSource.js +92 -0
- package/dist-esm/src/settingsImport/stringConfigurationSettingsSource.js.map +1 -0
- package/package.json +20 -5
- package/types/azure-app-configuration-importer.d.ts +13 -0
- package/types/src/MsFeatureFlagSchema.d.ts +164 -0
- package/types/src/MsFeatureFlagSchema.d.ts.map +1 -0
- package/types/src/appConfigurationImporter.d.ts +37 -0
- package/types/src/appConfigurationImporter.d.ts.map +1 -0
- package/types/src/enums.d.ts +23 -0
- package/types/src/enums.d.ts.map +1 -0
- package/types/src/errors.d.ts +36 -0
- package/types/src/errors.d.ts.map +1 -0
- package/types/src/featureFlag.d.ts +50 -0
- package/types/src/featureFlag.d.ts.map +1 -0
- package/types/src/importOptions.d.ts +39 -0
- package/types/src/importOptions.d.ts.map +1 -0
- package/types/src/index.d.ts +10 -0
- package/types/src/index.d.ts.map +1 -0
- package/types/src/internal/adaptiveTaskManager.d.ts +20 -0
- package/types/src/internal/adaptiveTaskManager.d.ts.map +1 -0
- package/types/src/internal/constants.d.ts +10 -0
- package/types/src/internal/constants.d.ts.map +1 -0
- package/types/src/internal/parsers/configurationSettingsConverter.d.ts +11 -0
- package/types/src/internal/parsers/configurationSettingsConverter.d.ts.map +1 -0
- package/types/src/internal/parsers/defaultConfigurationSettingsConverter.d.ts +21 -0
- package/types/src/internal/parsers/defaultConfigurationSettingsConverter.d.ts.map +1 -0
- package/types/src/internal/parsers/kvSetConfigurationSettingsConverter.d.ts +15 -0
- package/types/src/internal/parsers/kvSetConfigurationSettingsConverter.d.ts.map +1 -0
- package/types/src/internal/stream.browser.d.ts +4 -0
- package/types/src/internal/stream.browser.d.ts.map +1 -0
- package/types/src/internal/stream.d.ts +4 -0
- package/types/src/internal/stream.d.ts.map +1 -0
- package/types/src/internal/utils.d.ts +17 -0
- package/types/src/internal/utils.d.ts.map +1 -0
- package/types/src/models.d.ts +42 -0
- package/types/src/models.d.ts.map +1 -0
- package/types/src/settingsImport/configurationSettingsSource.d.ts +19 -0
- package/types/src/settingsImport/configurationSettingsSource.d.ts.map +1 -0
- package/types/src/settingsImport/iterableConfigurationSettingsSource.d.ts +14 -0
- package/types/src/settingsImport/iterableConfigurationSettingsSource.d.ts.map +1 -0
- package/types/src/settingsImport/readableStreamConfigurationSettingsSource.d.ts +11 -0
- package/types/src/settingsImport/readableStreamConfigurationSettingsSource.d.ts.map +1 -0
- package/types/src/settingsImport/stringConfigurationSettingsSource.d.ts +24 -0
- package/types/src/settingsImport/stringConfigurationSettingsSource.d.ts.map +1 -0
- package/NOTICE.txt +0 -370
- package/app-configuration-importer.test.log +0 -164
- package/dist/app-configuration-importer.api.md +0 -136
- package/examples/README.md +0 -59
- package/examples/package.json +0 -32
- package/examples/sample.env +0 -6
- package/examples/testFiles/default.json +0 -24
- package/examples/testFiles/kvset.json +0 -35
- package/types/tsdoc-metadata.json +0 -11
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) Microsoft Corporation.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE
|
package/README.md
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# Azure App Configuration - JavaScript Importer
|
|
2
|
+
|
|
3
|
+
The [Azure App Configuration](https://docs.microsoft.com/azure/azure-app-configuration/overview) Importer for JavaScript enables developers to import their configuration settings from a configuration sources to Azure App Configuration service.
|
|
4
|
+
|
|
5
|
+
Key links:
|
|
6
|
+
|
|
7
|
+
- [Source code](https://github.com/Azure/AppConfiguration-JavaScriptImporter/tree/main/libraries/azure-app-configuration-importer)
|
|
8
|
+
- [Package (NPM)](https://www.npmjs.com/package/@azure/app-configuration-importer)
|
|
9
|
+
- [Product documentation](https://docs.microsoft.com/azure/azure-app-configuration/)
|
|
10
|
+
- [Examples](https://github.com/Azure/AppConfiguration-JavaScriptImporter/tree/main/libraries/azure-app-configuration-importer/examples)
|
|
11
|
+
|
|
12
|
+
## Getting started
|
|
13
|
+
|
|
14
|
+
### Currently supported environments
|
|
15
|
+
|
|
16
|
+
- [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule)
|
|
17
|
+
- Latest versions of Safari, Chrome, Edge, and Firefox.
|
|
18
|
+
|
|
19
|
+
### Prerequisites
|
|
20
|
+
|
|
21
|
+
- An [Azure Subscription](https://azure.microsoft.com)
|
|
22
|
+
- An [App Configuration store](https://learn.microsoft.com/azure/azure-app-configuration/quickstart-azure-app-configuration-create?tabs=azure-portal) resource
|
|
23
|
+
|
|
24
|
+
### Install the package
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
npm install @azure/app-configuration-importer
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
### Use the API
|
|
31
|
+
|
|
32
|
+
```ts
|
|
33
|
+
import { AppConfigurationImporter, StringConfigurationSettingsSource } from "@azure/app-configuration-importer";
|
|
34
|
+
|
|
35
|
+
const client = new AppConfigurationClient("<app-configuration-connection-string>");
|
|
36
|
+
const appConfigurationImporterClient = new AppConfigurationImporter(client);
|
|
37
|
+
|
|
38
|
+
// Import settings
|
|
39
|
+
const result = await appConfigurationImporterClient.Import(new StringConfigurationSettingsSource({data: "{\"app:Settings:FontSize\": \"45\"}", format: ConfigurationFormat.Json}));
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
## Examples
|
|
44
|
+
|
|
45
|
+
See code snippets under [examples/](./examples/) folder.
|
|
46
|
+
|
|
47
|
+
## Contributing
|
|
48
|
+
|
|
49
|
+
This project welcomes contributions and suggestions. Most contributions require you to agree to a
|
|
50
|
+
Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us
|
|
51
|
+
the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.
|
|
52
|
+
|
|
53
|
+
When you submit a pull request, a CLA bot will automatically determine whether you need to provide
|
|
54
|
+
a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions
|
|
55
|
+
provided by the bot. You will only need to do this once across all repos using our CLA.
|
|
56
|
+
|
|
57
|
+
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
|
|
58
|
+
For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or
|
|
59
|
+
contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
|
|
60
|
+
|
|
61
|
+
## Trademarks
|
|
62
|
+
|
|
63
|
+
This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft
|
|
64
|
+
trademarks or logos is subject to and must follow
|
|
65
|
+
[Microsoft's Trademark & Brand Guidelines](https://www.microsoft.com/legal/intellectualproperty/trademarks/usage/general).
|
|
66
|
+
Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship.
|
|
67
|
+
Any use of third-party trademarks or logos are subject to those third-party's policies.
|