@azure/app-configuration 1.5.0-beta.2 → 1.5.0
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/README.md +2 -11
- package/dist/index.js +2044 -2064
- package/dist/index.js.map +1 -1
- package/dist-esm/samples-dev/featureFlag.js +3 -8
- package/dist-esm/samples-dev/featureFlag.js.map +1 -1
- package/dist-esm/samples-dev/getSettingOnlyIfChanged.js +4 -9
- package/dist-esm/samples-dev/getSettingOnlyIfChanged.js.map +1 -1
- package/dist-esm/samples-dev/helloworld.js +3 -8
- package/dist-esm/samples-dev/helloworld.js.map +1 -1
- package/dist-esm/samples-dev/helloworldWithLabels.js +3 -8
- package/dist-esm/samples-dev/helloworldWithLabels.js.map +1 -1
- package/dist-esm/samples-dev/listConfigurationSettings.js +6 -16
- package/dist-esm/samples-dev/listConfigurationSettings.js.map +1 -1
- package/dist-esm/samples-dev/listRevisions.js +7 -17
- package/dist-esm/samples-dev/listRevisions.js.map +1 -1
- package/dist-esm/samples-dev/optimisticConcurrencyViaEtag.js +4 -9
- package/dist-esm/samples-dev/optimisticConcurrencyViaEtag.js.map +1 -1
- package/dist-esm/samples-dev/secretReference.js +3 -8
- package/dist-esm/samples-dev/secretReference.js.map +1 -1
- package/dist-esm/samples-dev/setReadOnlySample.js +4 -9
- package/dist-esm/samples-dev/setReadOnlySample.js.map +1 -1
- package/dist-esm/samples-dev/snapshot.js +9 -24
- package/dist-esm/samples-dev/snapshot.js.map +1 -1
- package/dist-esm/samples-dev/updateSyncTokenSample.js +3 -8
- package/dist-esm/samples-dev/updateSyncTokenSample.js.map +1 -1
- package/dist-esm/src/appConfigurationClient.js +2 -4
- package/dist-esm/src/appConfigurationClient.js.map +1 -1
- package/dist-esm/src/generated/src/appConfiguration.js +1 -1
- package/dist-esm/src/generated/src/appConfiguration.js.map +1 -1
- package/dist-esm/src/internal/constants.js +5 -1
- package/dist-esm/src/internal/constants.js.map +1 -1
- package/dist-esm/src/internal/helpers.js +6 -0
- package/dist-esm/src/internal/helpers.js.map +1 -1
- package/dist-esm/src/models.js +0 -26
- package/dist-esm/src/models.js.map +1 -1
- package/dist-esm/test/public/auth.spec.js +1 -2
- package/dist-esm/test/public/auth.spec.js.map +1 -1
- package/dist-esm/test/public/etags.spec.js +12 -0
- package/dist-esm/test/public/etags.spec.js.map +1 -1
- package/dist-esm/test/public/featureFlag.spec.js +17 -27
- package/dist-esm/test/public/featureFlag.spec.js.map +1 -1
- package/dist-esm/test/public/index.spec.js +3 -3
- package/dist-esm/test/public/index.spec.js.map +1 -1
- package/dist-esm/test/public/secretReference.spec.js +16 -26
- package/dist-esm/test/public/secretReference.spec.js.map +1 -1
- package/dist-esm/test/public/snapshot.spec.js +16 -36
- package/dist-esm/test/public/snapshot.spec.js.map +1 -1
- package/dist-esm/test/public/utils/testHelpers.js +21 -51
- package/dist-esm/test/public/utils/testHelpers.js.map +1 -1
- package/package.json +6 -7
- package/types/app-configuration.d.ts +0 -37
package/README.md
CHANGED
|
@@ -111,6 +111,7 @@ The [`AppConfigurationClient`](https://docs.microsoft.com/javascript/api/@azure/
|
|
|
111
111
|
|
|
112
112
|
- Key/Value pairs are represented as [`ConfigurationSetting`](https://docs.microsoft.com/javascript/api/@azure/app-configuration/configurationsetting) objects
|
|
113
113
|
- Locking and unlocking a setting is represented in the `isReadOnly` field, which you can toggle using `setReadOnly`.
|
|
114
|
+
- Snapshots are represented as `ConfigurationSnapshot` objects.
|
|
114
115
|
|
|
115
116
|
The client follows a simple design methodology - [`ConfigurationSetting`](https://docs.microsoft.com/javascript/api/@azure/app-configuration/configurationsetting) can be passed into any method that takes a [`ConfigurationSettingParam`](https://docs.microsoft.com/javascript/api/@azure/app-configuration/configurationsettingparam) or [`ConfigurationSettingId`](https://docs.microsoft.com/javascript/api/@azure/app-configuration/configurationsettingid).
|
|
116
117
|
|
|
@@ -257,17 +258,6 @@ let recoverSnapshot = await client.recoverSnapshot("testsnapshot");
|
|
|
257
258
|
console.log("Snapshot updated status is:", recoverSnapshot.status);
|
|
258
259
|
```
|
|
259
260
|
|
|
260
|
-
You can also use an overload that takes the name of the snapshot only.
|
|
261
|
-
```javascript
|
|
262
|
-
// Snapshot is in ready status
|
|
263
|
-
let archivedSnapshot = await client.archiveSnapshot("testsnapshot");
|
|
264
|
-
console.log("Snapshot updated status is:", archivedSnapshot.status);
|
|
265
|
-
|
|
266
|
-
// Snapshot is in archive status
|
|
267
|
-
let recoverSnapshot = await client.recoverSnapshot("testsnapshot");
|
|
268
|
-
console.log("Snapshot updated status is:", recoverSnapshot.status);
|
|
269
|
-
```
|
|
270
|
-
|
|
271
261
|
## Troubleshooting
|
|
272
262
|
|
|
273
263
|
### Logging
|
|
@@ -297,6 +287,7 @@ The following samples show you the various ways you can interact with App Config
|
|
|
297
287
|
- [`getSettingOnlyIfChanged.ts`](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/appconfiguration/app-configuration/samples/v1/typescript/src/getSettingOnlyIfChanged.ts) - Get a setting only if it changed from the last time you got it.
|
|
298
288
|
- [`listRevisions.ts`](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/appconfiguration/app-configuration/samples/v1/typescript/src/listRevisions.ts) - List the revisions of a key, allowing you to see previous values and when they were set.
|
|
299
289
|
- [`secretReference.ts`](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/appconfiguration/app-configuration/samples/v1/typescript/src/secretReference.ts) - SecretReference represents a configuration setting that references as KeyVault secret.
|
|
290
|
+
- [`snapshot.ts`](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/appconfiguration/app-configuration/samples/v1-beta/typescript/src/snapshot.ts) - Create, list configuration settings, and archive snapshots.
|
|
300
291
|
- [`featureFlag.ts`](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/appconfiguration/app-configuration/samples/v1/typescript/src/featureFlag.ts) - Feature flags are settings that follow specific JSON schema for the value.
|
|
301
292
|
|
|
302
293
|
More in-depth examples can be found in the [samples](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/appconfiguration/app-configuration/samples/v1/) folder on GitHub.
|