@azure/template 1.0.13-beta.4605389 → 1.0.13-beta.4700778
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 -4
- package/dist/browser/configurationClient.d.ts +1 -1
- package/dist/browser/configurationClient.js +1 -1
- package/dist/browser/configurationClient.js.map +1 -1
- package/dist/browser/constants.js +1 -1
- package/dist/browser/constants.js.map +1 -1
- package/dist/browser/generated/generatedClientContext.js +1 -1
- package/dist/browser/generated/generatedClientContext.js.map +1 -1
- package/dist/commonjs/configurationClient.d.ts +1 -1
- package/dist/commonjs/configurationClient.js +1 -1
- package/dist/commonjs/configurationClient.js.map +1 -1
- package/dist/commonjs/constants.js +1 -1
- package/dist/commonjs/constants.js.map +1 -1
- package/dist/commonjs/generated/generatedClientContext.js +1 -1
- package/dist/commonjs/generated/generatedClientContext.js.map +1 -1
- package/dist/commonjs/tsdoc-metadata.json +1 -1
- package/dist/esm/configurationClient.d.ts +1 -1
- package/dist/esm/configurationClient.js +1 -1
- package/dist/esm/configurationClient.js.map +1 -1
- package/dist/esm/constants.js +1 -1
- package/dist/esm/constants.js.map +1 -1
- package/dist/esm/generated/generatedClientContext.js +1 -1
- package/dist/esm/generated/generatedClientContext.js.map +1 -1
- package/dist/react-native/configurationClient.d.ts +1 -1
- package/dist/react-native/configurationClient.js +1 -1
- package/dist/react-native/configurationClient.js.map +1 -1
- package/dist/react-native/constants.js +1 -1
- package/dist/react-native/constants.js.map +1 -1
- package/dist/react-native/generated/generatedClientContext.js +1 -1
- package/dist/react-native/generated/generatedClientContext.js.map +1 -1
- package/package.json +22 -20
package/README.md
CHANGED
|
@@ -75,7 +75,7 @@ Create a section for each top-level service concept you want to explain.
|
|
|
75
75
|
|
|
76
76
|
Create several code examples for how someone would use your library to accomplish a common task with the service.
|
|
77
77
|
|
|
78
|
-
```ts snippet:
|
|
78
|
+
```ts snippet:ReadmeSampleCreateClient
|
|
79
79
|
import { ConfigurationClient } from "@azure/template";
|
|
80
80
|
import { DefaultAzureCredential } from "@azure/identity";
|
|
81
81
|
|
|
@@ -91,7 +91,7 @@ const client = new ConfigurationClient(
|
|
|
91
91
|
|
|
92
92
|
Enabling logging may help uncover useful information about failures. In order to see a log of HTTP requests and responses, set the `AZURE_LOG_LEVEL` environment variable to `info`. Alternatively, logging can be enabled at runtime by calling `setLogLevel` in the `@azure/logger`:
|
|
93
93
|
|
|
94
|
-
```ts snippet:
|
|
94
|
+
```ts snippet:SetLogLevel
|
|
95
95
|
import { setLogLevel } from "@azure/logger";
|
|
96
96
|
|
|
97
97
|
setLogLevel("verbose");
|
|
@@ -111,7 +111,5 @@ If you'd like to contribute to this library, please read the [contributing guide
|
|
|
111
111
|
|
|
112
112
|
- [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js)
|
|
113
113
|
|
|
114
|
-
|
|
115
|
-
|
|
116
114
|
[azure_cli]: https://learn.microsoft.com/cli/azure
|
|
117
115
|
[azure_sub]: https://azure.microsoft.com/free/
|
|
@@ -31,7 +31,7 @@ export declare class ConfigurationClient {
|
|
|
31
31
|
* Creates an instance of a ConfigurationClient.
|
|
32
32
|
*
|
|
33
33
|
* Example usage:
|
|
34
|
-
* ```ts snippet:
|
|
34
|
+
* ```ts snippet:ReadmeSampleCreateClient
|
|
35
35
|
* import { ConfigurationClient } from "@azure/template";
|
|
36
36
|
* import { DefaultAzureCredential } from "@azure/identity";
|
|
37
37
|
*
|
|
@@ -14,7 +14,7 @@ export class ConfigurationClient {
|
|
|
14
14
|
* Creates an instance of a ConfigurationClient.
|
|
15
15
|
*
|
|
16
16
|
* Example usage:
|
|
17
|
-
* ```ts snippet:
|
|
17
|
+
* ```ts snippet:ReadmeSampleCreateClient
|
|
18
18
|
* import { ConfigurationClient } from "@azure/template";
|
|
19
19
|
* import { DefaultAzureCredential } from "@azure/identity";
|
|
20
20
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configurationClient.js","sourceRo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BAAiB;YAC5B,+BAA+B;YAC/B,WAAW,EAAE,iBAAiB;YAC9B,cAAc,EAAE,WAAW;SAC5B,CAAC,CAAC;IACL,CAAC;IAyBM,KAAK,CAAC,uBAAuB,CAClC,YAA2C,EAC3C,UAA0C,EAAE;QAE5C,IAAI,GAAW,CAAC;QAChB,IAAI,WAA+B,CAAC;QAEpC,OAAO,IAAI,CAAC,aAAa,CAAC,QAAQ;QAChC,8DAA8D;QAC9D,6CAA6C,EAC7C,OAAO,EACP,CAAC,cAAc,EAAE,EAAE;YACjB,IAAI,OAAO,YAAY,KAAK,QAAQ,EAAE,CAAC;gBACrC,GAAG,GAAG,YAAY,CAAC;gBACnB,IAAI,OAAO,CAAC,aAAa,EAAE,CAAC;oBAC1B,MAAM,IAAI,UAAU,CAClB,uFAAuF,CACxF,CAAC;gBACJ,CAAC;YACH,CAAC;iBAAM,CAAC;gBACN,GAAG,GAAG,YAAY,CAAC,GAAI,CAAC;gBACxB,MAAM,IAAI,GAAG,YAAY,CAAC,IAAI,CAAC;gBAC/B,IAAI,OAAO,CAAC,aAAa,EAAE,CAAC;oBAC1B,WAAW,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC;gBAChC,CAAC;YACH,CAAC;YAED,0EAA0E;YAC1E,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,GAAG,kCAAO,cAAc,KAAE,WAAW,IAAG,CAAC;QAC1E,CAAC,CACF,CAAC;IACJ,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { GeneratedClient, ConfigurationSetting } from \"./generated/index.js\";\nimport type {\n CommonClientOptions,\n OperationOptions,\n InternalClientPipelineOptions,\n} from \"@azure/core-client\";\nimport { bearerTokenAuthenticationPolicy } from \"@azure/core-rest-pipeline\";\nimport type { TokenCredential } from \"@azure/core-auth\";\nimport type { TracingClient } from \"@azure/core-tracing\";\nimport { createTracingClient } from \"@azure/core-tracing\";\nimport { SDK_VERSION } from \"./constants.js\";\nimport { logger } from \"./logger.js\";\nimport { quoteETag } from \"./util.js\";\n\n// re-export generated types that are used as public interfaces.\nexport { ConfigurationSetting };\n\n/**\n * Options for the `getConfigurationSetting` method of `ConfigurationClient`.\n */\nexport interface GetConfigurationSettingOptions extends OperationOptions {\n /**\n * If set to `true`, the method will use entity tags to instruct the service\n * to send an updated value only if the value has changed.\n *\n * NOTE: This option is only supported if passing a full\n * `ConfigurationSetting` object with an `etag` as the first parameter to\n * `getConfigurationSetting`.\n */\n onlyIfChanged?: boolean;\n}\n\n/**\n * Client options used to configure App Configuration API requests.\n */\nexport interface ConfigurationClientOptions extends CommonClientOptions {\n // Any custom options configured at the client level go here.\n}\n\n/**\n * The client class used to interact with the App Configuration service.\n */\nexport class ConfigurationClient {\n private client: GeneratedClient;\n private tracingClient: TracingClient;\n\n /**\n * Creates an instance of a ConfigurationClient.\n *\n * Example usage:\n * ```ts snippet:
|
|
1
|
+
{"version":3,"file":"configurationClient.js","sourceRoot":"","sources":["../../src/configurationClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,eAAe,EAAwB,MAAM,sBAAsB,CAAC;AAM7E,OAAO,EAAE,+BAA+B,EAAE,MAAM,2BAA2B,CAAC;AAG5E,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AA2BtC;;GAEG;AACH,MAAM,OAAO,mBAAmB;IAI9B;;;;;;;;;;;;;;;;OAgBG;IACH,YACE,WAAmB,EACnB,UAA2B,EAC3B,UAAsC,EAAE;QAExC,wEAAwE;QACxE,qCAAqC;QACrC,MAAM,UAAU,GAAG,+BAA+B,CAAC;YACjD,UAAU;YACV,MAAM,EAAE,GAAG,WAAW,WAAW;SAClC,C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AAC,IAAI,CAAC;gBAC/B,IAAI,OAAO,CAAC,aAAa,EAAE,CAAC;oBAC1B,WAAW,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC;gBAChC,CAAC;YACH,CAAC;YAED,0EAA0E;YAC1E,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,GAAG,kCAAO,cAAc,KAAE,WAAW,IAAG,CAAC;QAC1E,CAAC,CACF,CAAC;IACJ,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { GeneratedClient, ConfigurationSetting } from \"./generated/index.js\";\nimport type {\n CommonClientOptions,\n OperationOptions,\n InternalClientPipelineOptions,\n} from \"@azure/core-client\";\nimport { bearerTokenAuthenticationPolicy } from \"@azure/core-rest-pipeline\";\nimport type { TokenCredential } from \"@azure/core-auth\";\nimport type { TracingClient } from \"@azure/core-tracing\";\nimport { createTracingClient } from \"@azure/core-tracing\";\nimport { SDK_VERSION } from \"./constants.js\";\nimport { logger } from \"./logger.js\";\nimport { quoteETag } from \"./util.js\";\n\n// re-export generated types that are used as public interfaces.\nexport { ConfigurationSetting };\n\n/**\n * Options for the `getConfigurationSetting` method of `ConfigurationClient`.\n */\nexport interface GetConfigurationSettingOptions extends OperationOptions {\n /**\n * If set to `true`, the method will use entity tags to instruct the service\n * to send an updated value only if the value has changed.\n *\n * NOTE: This option is only supported if passing a full\n * `ConfigurationSetting` object with an `etag` as the first parameter to\n * `getConfigurationSetting`.\n */\n onlyIfChanged?: boolean;\n}\n\n/**\n * Client options used to configure App Configuration API requests.\n */\nexport interface ConfigurationClientOptions extends CommonClientOptions {\n // Any custom options configured at the client level go here.\n}\n\n/**\n * The client class used to interact with the App Configuration service.\n */\nexport class ConfigurationClient {\n private client: GeneratedClient;\n private tracingClient: TracingClient;\n\n /**\n * Creates an instance of a ConfigurationClient.\n *\n * Example usage:\n * ```ts snippet:ReadmeSampleCreateClient\n * import { ConfigurationClient } from \"@azure/template\";\n * import { DefaultAzureCredential } from \"@azure/identity\";\n *\n * const client = new ConfigurationClient(\n * process.env.ENDPOINT ?? \"<app configuration endpoint>\",\n * new DefaultAzureCredential(),\n * );\n * ```\n * @param endpointUrl - the URL to the App Configuration endpoint\n * @param credential - used to authenticate requests to the service\n * @param options - optional configuration used to send requests to the service\n */\n constructor(\n endpointUrl: string,\n credential: TokenCredential,\n options: ConfigurationClientOptions = {},\n ) {\n // The AAD scope for an API is usually the baseUri + \"/.default\", but it\n // may be different for your service.\n const authPolicy = bearerTokenAuthenticationPolicy({\n credential,\n scopes: `${endpointUrl}/.default`,\n });\n\n const internalClientPipelineOptions: InternalClientPipelineOptions = {\n ...options,\n deserializationOptions: {\n expectedContentTypes: {\n json: [\n \"application/vnd.microsoft.appconfig.kvset+json\",\n \"application/vnd.microsoft.appconfig.kv+json\",\n \"application/vnd.microsoft.appconfig.kvs+json\",\n \"application/vnd.microsoft.appconfig.keyset+json\",\n \"application/vnd.microsoft.appconfig.revs+json\",\n ],\n },\n },\n ...{\n loggingOptions: {\n logger: logger.info,\n // This array contains header names we want to log that are not already\n // included as safe. Unknown/unsafe headers are logged as \"<REDACTED>\".\n additionalAllowedHeaderNames: [\"x-ms-correlation-request-id\"],\n },\n },\n };\n\n this.client = new GeneratedClient(endpointUrl, internalClientPipelineOptions);\n this.client.pipeline.addPolicy(authPolicy);\n this.tracingClient = createTracingClient({\n // The name of the resource provider requests are made against, as described in\n // https://github.com/Azure/azure-sdk/blob/main/docs/tracing/distributed-tracing-conventions.yml#L11-L15\n namespace: \"Microsoft.Learn\",\n // The package name and version\n packageName: \"@azure/template\",\n packageVersion: SDK_VERSION,\n });\n }\n\n /**\n * Retrieve the contents of an App Configuration setting by name (key).\n *\n * @param key - the unique name of the setting to get\n * @param options - optional configuration for the operation\n */\n public async getConfigurationSetting(\n key: string,\n options?: GetConfigurationSettingOptions,\n ): Promise<ConfigurationSetting>;\n\n /**\n * Retrieve an updated value of an App Configuration setting, allowing for\n * the use of entity tags to request the new value only if it has changed.\n *\n * @param setting - the setting to retrieve from the service\n * @param options - optional configuration for the operation\n */\n public async getConfigurationSetting(\n setting: ConfigurationSetting,\n options?: GetConfigurationSettingOptions,\n ): Promise<ConfigurationSetting>;\n\n public async getConfigurationSetting(\n keyOrSetting: string | ConfigurationSetting,\n options: GetConfigurationSettingOptions = {},\n ): Promise<ConfigurationSetting> {\n let key: string;\n let ifNoneMatch: string | undefined;\n\n return this.tracingClient.withSpan(\n // Span names should take the form \"<className>.<methodName>\".\n \"ConfigurationClient.getConfigurationSetting\",\n options,\n (updatedOptions) => {\n if (typeof keyOrSetting === \"string\") {\n key = keyOrSetting;\n if (options.onlyIfChanged) {\n throw new RangeError(\n \"You must pass a ConfigurationSetting instead of a key to perform a conditional fetch.\",\n );\n }\n } else {\n key = keyOrSetting.key!;\n const etag = keyOrSetting.etag;\n if (options.onlyIfChanged) {\n ifNoneMatch = quoteETag(etag);\n }\n }\n\n // You must pass updatedOptions to any calls you make within the callback.\n return this.client.getKeyValue(key, { ...updatedOptions, ifNoneMatch });\n },\n );\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,MAAM,CAAC,MAAM,WAAW,GAAW,qBAAqB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport const SDK_VERSION: string = \"1.0.13-beta.
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,MAAM,CAAC,MAAM,WAAW,GAAW,qBAAqB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport const SDK_VERSION: string = \"1.0.13-beta.4700778\";\n"]}
|
|
@@ -24,7 +24,7 @@ export class GeneratedClientContext extends coreClient.ServiceClient {
|
|
|
24
24
|
const defaults = {
|
|
25
25
|
requestContentType: "application/json; charset=utf-8"
|
|
26
26
|
};
|
|
27
|
-
const packageDetails = `azsdk-js-template/1.0.13-beta.
|
|
27
|
+
const packageDetails = `azsdk-js-template/1.0.13-beta.4700778`;
|
|
28
28
|
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
29
29
|
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
|
30
30
|
: `${packageDetails}`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generatedClientContext.js","sourceRoot":"","sources":["../../../src/generated/generatedClientContext.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AAGjD,gBAAgB;AAChB,MAAM,OAAO,sBAAuB,SAAQ,UAAU,CAAC,aAAa;IAKlE;;;;OAIG;IACH,YAAY,QAAgB,EAAE,OAAuC;QACnE,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;YAC3B,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC;QAC/C,CAAC;QAED,0CAA0C;QAC1C,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,OAAO,GAAG,EAAE,CAAC;QACf,CAAC;QACD,MAAM,QAAQ,GAAkC;YAC9C,kBAAkB,EAAE,iCAAiC;SACtD,CAAC;QAEF,MAAM,cAAc,GAAG,uCAAuC,CAAC;QAC/D,MAAM,eAAe,GACnB,OAAO,CAAC,gBAAgB,IAAI,OAAO,CAAC,gBAAgB,CAAC,eAAe;YAClE,CAAC,CAAC,GAAG,OAAO,CAAC,gBAAgB,CAAC,eAAe,IAAI,cAAc,EAAE;YACjE,CAAC,CAAC,GAAG,cAAc,EAAE,CAAC;QAE1B,MAAM,mBAAmB,iDACpB,QAAQ,GACR,OAAO,KACV,gBAAgB,EAAE;gBAChB,eAAe;aAChB,EACD,OAAO,EAAE,OAAO,CAAC,QAAQ,IAAI,YAAY,GAC1C,CAAC;QACF,KAAK,CAAC,mBAAmB,CAAC,CAAC;QAC3B,wBAAwB;QACxB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QAEzB,0CAA0C;QAC1C,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,IAAI,YAAY,CAAC;IACvD,CAAC;CACF","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport * as coreClient from \"@azure/core-client\";\nimport { GeneratedClientOptionalParams } from \"./models/index.js\";\n\n/** @internal */\nexport class GeneratedClientContext extends coreClient.ServiceClient {\n endpoint: string;\n syncToken?: string;\n apiVersion: string;\n\n /**\n * Initializes a new instance of the GeneratedClientContext class.\n * @param endpoint The endpoint of the App Configuration instance to send requests to.\n * @param options The parameter options\n */\n constructor(endpoint: string, options?: GeneratedClientOptionalParams) {\n if (endpoint === undefined) {\n throw new Error(\"'endpoint' cannot be null\");\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: GeneratedClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\"\n };\n\n const packageDetails = `azsdk-js-template/1.0.13-beta.
|
|
1
|
+
{"version":3,"file":"generatedClientContext.js","sourceRoot":"","sources":["../../../src/generated/generatedClientContext.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AAGjD,gBAAgB;AAChB,MAAM,OAAO,sBAAuB,SAAQ,UAAU,CAAC,aAAa;IAKlE;;;;OAIG;IACH,YAAY,QAAgB,EAAE,OAAuC;QACnE,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;YAC3B,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC;QAC/C,CAAC;QAED,0CAA0C;QAC1C,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,OAAO,GAAG,EAAE,CAAC;QACf,CAAC;QACD,MAAM,QAAQ,GAAkC;YAC9C,kBAAkB,EAAE,iCAAiC;SACtD,CAAC;QAEF,MAAM,cAAc,GAAG,uCAAuC,CAAC;QAC/D,MAAM,eAAe,GACnB,OAAO,CAAC,gBAAgB,IAAI,OAAO,CAAC,gBAAgB,CAAC,eAAe;YAClE,CAAC,CAAC,GAAG,OAAO,CAAC,gBAAgB,CAAC,eAAe,IAAI,cAAc,EAAE;YACjE,CAAC,CAAC,GAAG,cAAc,EAAE,CAAC;QAE1B,MAAM,mBAAmB,iDACpB,QAAQ,GACR,OAAO,KACV,gBAAgB,EAAE;gBAChB,eAAe;aAChB,EACD,OAAO,EAAE,OAAO,CAAC,QAAQ,IAAI,YAAY,GAC1C,CAAC;QACF,KAAK,CAAC,mBAAmB,CAAC,CAAC;QAC3B,wBAAwB;QACxB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QAEzB,0CAA0C;QAC1C,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,IAAI,YAAY,CAAC;IACvD,CAAC;CACF","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport * as coreClient from \"@azure/core-client\";\nimport { GeneratedClientOptionalParams } from \"./models/index.js\";\n\n/** @internal */\nexport class GeneratedClientContext extends coreClient.ServiceClient {\n endpoint: string;\n syncToken?: string;\n apiVersion: string;\n\n /**\n * Initializes a new instance of the GeneratedClientContext class.\n * @param endpoint The endpoint of the App Configuration instance to send requests to.\n * @param options The parameter options\n */\n constructor(endpoint: string, options?: GeneratedClientOptionalParams) {\n if (endpoint === undefined) {\n throw new Error(\"'endpoint' cannot be null\");\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: GeneratedClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\"\n };\n\n const packageDetails = `azsdk-js-template/1.0.13-beta.4700778`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n const optionsWithDefaults = {\n ...defaults,\n ...options,\n userAgentOptions: {\n userAgentPrefix\n },\n baseUri: options.endpoint || \"{endpoint}\"\n };\n super(optionsWithDefaults);\n // Parameter assignments\n this.endpoint = endpoint;\n\n // Assigning values to Constant parameters\n this.apiVersion = options.apiVersion || \"2023-10-01\";\n }\n}\n"]}
|
|
@@ -31,7 +31,7 @@ export declare class ConfigurationClient {
|
|
|
31
31
|
* Creates an instance of a ConfigurationClient.
|
|
32
32
|
*
|
|
33
33
|
* Example usage:
|
|
34
|
-
* ```ts snippet:
|
|
34
|
+
* ```ts snippet:ReadmeSampleCreateClient
|
|
35
35
|
* import { ConfigurationClient } from "@azure/template";
|
|
36
36
|
* import { DefaultAzureCredential } from "@azure/identity";
|
|
37
37
|
*
|
|
@@ -17,7 +17,7 @@ class ConfigurationClient {
|
|
|
17
17
|
* Creates an instance of a ConfigurationClient.
|
|
18
18
|
*
|
|
19
19
|
* Example usage:
|
|
20
|
-
* ```ts snippet:
|
|
20
|
+
* ```ts snippet:ReadmeSampleCreateClient
|
|
21
21
|
* import { ConfigurationClient } from "@azure/template";
|
|
22
22
|
* import { DefaultAzureCredential } from "@azure/identity";
|
|
23
23
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configurationClient.js","sourceRoot":"","sources":["../../src/configurationClient.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAElC,mDAA6E;AAM7E,kEAA4E;AAG5E,sDAA0D;AAC1D,iDAA6C;AAC7C,2CAAqC;AACrC,uCAAsC;AA2BtC;;GAEG;AACH,MAAa,mBAAmB;IAI9B;;;;;;;;;;;;;;;;OAgBG;IACH,YACE,WAAmB,EACnB,UAA2B,EAC3B,UAAsC,EAAE;QAExC,wEAAwE;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ACxF,CAAC;gBACJ,CAAC;YACH,CAAC;iBAAM,CAAC;gBACN,GAAG,GAAG,YAAY,CAAC,GAAI,CAAC;gBACxB,MAAM,IAAI,GAAG,YAAY,CAAC,IAAI,CAAC;gBAC/B,IAAI,OAAO,CAAC,aAAa,EAAE,CAAC;oBAC1B,WAAW,GAAG,IAAA,mBAAS,EAAC,IAAI,CAAC,CAAC;gBAChC,CAAC;YACH,CAAC;YAED,0EAA0E;YAC1E,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,GAAG,kCAAO,cAAc,KAAE,WAAW,IAAG,CAAC;QAC1E,CAAC,CACF,CAAC;IACJ,CAAC;CACF;AA3HD,kDA2HC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { GeneratedClient, ConfigurationSetting } from \"./generated/index.js\";\nimport type {\n CommonClientOptions,\n OperationOptions,\n InternalClientPipelineOptions,\n} from \"@azure/core-client\";\nimport { bearerTokenAuthenticationPolicy } from \"@azure/core-rest-pipeline\";\nimport type { TokenCredential } from \"@azure/core-auth\";\nimport type { TracingClient } from \"@azure/core-tracing\";\nimport { createTracingClient } from \"@azure/core-tracing\";\nimport { SDK_VERSION } from \"./constants.js\";\nimport { logger } from \"./logger.js\";\nimport { quoteETag } from \"./util.js\";\n\n// re-export generated types that are used as public interfaces.\nexport { ConfigurationSetting };\n\n/**\n * Options for the `getConfigurationSetting` method of `ConfigurationClient`.\n */\nexport interface GetConfigurationSettingOptions extends OperationOptions {\n /**\n * If set to `true`, the method will use entity tags to instruct the service\n * to send an updated value only if the value has changed.\n *\n * NOTE: This option is only supported if passing a full\n * `ConfigurationSetting` object with an `etag` as the first parameter to\n * `getConfigurationSetting`.\n */\n onlyIfChanged?: boolean;\n}\n\n/**\n * Client options used to configure App Configuration API requests.\n */\nexport interface ConfigurationClientOptions extends CommonClientOptions {\n // Any custom options configured at the client level go here.\n}\n\n/**\n * The client class used to interact with the App Configuration service.\n */\nexport class ConfigurationClient {\n private client: GeneratedClient;\n private tracingClient: TracingClient;\n\n /**\n * Creates an instance of a ConfigurationClient.\n *\n * Example usage:\n * ```ts snippet:
|
|
1
|
+
{"version":3,"file":"configurationClient.js","sourceRoot":"","sources":["../../src/configurationClient.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAElC,mDAA6E;AAM7E,kEAA4E;AAG5E,sDAA0D;AAC1D,iDAA6C;AAC7C,2CAAqC;AACrC,uCAAsC;AA2BtC;;GAEG;AACH,MAAa,mBAAmB;IAI9B;;;;;;;;;;;;;;;;OAgBG;IACH,YACE,WAAmB,EACnB,UAA2B,EAC3B,UAAsC,EAAE;QAExC,wEAAwE;QACxE,qCAAqC;QACrC,MAAM,UAAU,GAAG,IAAA,oDAA+B,EAAC;YACjD,UAAU;YACV,MAAM,EAAE,GAAG,WAAW,WAAW;SAClC,CAAC,CAAC;QAEH,MAAM,6BAA6B,iDAC9B,OAAO,KACV,sBAAsB,EAAE;gBACtB,oBAAoB,EAAE;oBACpB,IAAI,EAAE;wBACJ,gDAAgD;wBAChD,6CAA6C;wBAC7C,8CAA8C;wBAC9C,iDAAiD;wBACjD,+CAA+C;qBAChD;iBACF;aACF,KACE;YACD,cAAc,EAAE;gBACd,MAAM,EAAE,kBAAM,CAAC,IAAI;gBACnB,uEAAuE;gBACvE,uEAAuE;gBACvE,4BAA4B,EAAE,CAAC,6BAA6B,CAAC;aAC9D;SACF,CACF,CAAC;QAEF,IAAI,CAAC,MAAM,GAAG,IAAI,0BAAe,CAAC,WAAW,EAAE,6BAA6B,CAAC,CAAC;QAC9E,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;QAC3C,IAAI,CAAC,aAAa,GAAG,IAAA,kCAAmB,EAAC;YACvC,+EAA+E;YAC/E,wGAAwG;YACxG,SAAS,EAAE,iBAAiB;YAC5B,+BAA+B;YAC/B,WAAW,EAAE,iBAAiB;YAC9B,cAAc,EAAE,0BAAW;SAC5B,CAAC,CAAC;IACL,CAAC;IAyBM,KAAK,CAAC,uBAAuB,CAClC,YAA2C,EAC3C,UAA0C,EAAE;QAE5C,IAAI,GAAW,CAAC;QAChB,IAAI,WAA+B,CAAC;QAEpC,OAAO,IAAI,CAAC,aAAa,CAAC,QAAQ;QAChC,8DAA8D;QAC9D,6CAA6C,EAC7C,OAAO,EACP,CAAC,cAAc,EAAE,EAAE;YACjB,IAAI,OAAO,YAAY,KAAK,QAAQ,EAAE,CAAC;gBACrC,GAAG,GAAG,YAAY,CAAC;gBACnB,IAAI,OAAO,CAAC,aAAa,EAAE,CAAC;oBAC1B,MAAM,IAAI,UAAU,CAClB,uFAAuF,CACxF,CAAC;gBACJ,CAAC;YACH,CAAC;iBAAM,CAAC;gBACN,GAAG,GAAG,YAAY,CAAC,GAAI,CAAC;gBACxB,MAAM,IAAI,GAAG,YAAY,CAAC,IAAI,CAAC;gBAC/B,IAAI,OAAO,CAAC,aAAa,EAAE,CAAC;oBAC1B,WAAW,GAAG,IAAA,mBAAS,EAAC,IAAI,CAAC,CAAC;gBAChC,CAAC;YACH,CAAC;YAED,0EAA0E;YAC1E,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,GAAG,kCAAO,cAAc,KAAE,WAAW,IAAG,CAAC;QAC1E,CAAC,CACF,CAAC;IACJ,CAAC;CACF;AA3HD,kDA2HC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { GeneratedClient, ConfigurationSetting } from \"./generated/index.js\";\nimport type {\n CommonClientOptions,\n OperationOptions,\n InternalClientPipelineOptions,\n} from \"@azure/core-client\";\nimport { bearerTokenAuthenticationPolicy } from \"@azure/core-rest-pipeline\";\nimport type { TokenCredential } from \"@azure/core-auth\";\nimport type { TracingClient } from \"@azure/core-tracing\";\nimport { createTracingClient } from \"@azure/core-tracing\";\nimport { SDK_VERSION } from \"./constants.js\";\nimport { logger } from \"./logger.js\";\nimport { quoteETag } from \"./util.js\";\n\n// re-export generated types that are used as public interfaces.\nexport { ConfigurationSetting };\n\n/**\n * Options for the `getConfigurationSetting` method of `ConfigurationClient`.\n */\nexport interface GetConfigurationSettingOptions extends OperationOptions {\n /**\n * If set to `true`, the method will use entity tags to instruct the service\n * to send an updated value only if the value has changed.\n *\n * NOTE: This option is only supported if passing a full\n * `ConfigurationSetting` object with an `etag` as the first parameter to\n * `getConfigurationSetting`.\n */\n onlyIfChanged?: boolean;\n}\n\n/**\n * Client options used to configure App Configuration API requests.\n */\nexport interface ConfigurationClientOptions extends CommonClientOptions {\n // Any custom options configured at the client level go here.\n}\n\n/**\n * The client class used to interact with the App Configuration service.\n */\nexport class ConfigurationClient {\n private client: GeneratedClient;\n private tracingClient: TracingClient;\n\n /**\n * Creates an instance of a ConfigurationClient.\n *\n * Example usage:\n * ```ts snippet:ReadmeSampleCreateClient\n * import { ConfigurationClient } from \"@azure/template\";\n * import { DefaultAzureCredential } from \"@azure/identity\";\n *\n * const client = new ConfigurationClient(\n * process.env.ENDPOINT ?? \"<app configuration endpoint>\",\n * new DefaultAzureCredential(),\n * );\n * ```\n * @param endpointUrl - the URL to the App Configuration endpoint\n * @param credential - used to authenticate requests to the service\n * @param options - optional configuration used to send requests to the service\n */\n constructor(\n endpointUrl: string,\n credential: TokenCredential,\n options: ConfigurationClientOptions = {},\n ) {\n // The AAD scope for an API is usually the baseUri + \"/.default\", but it\n // may be different for your service.\n const authPolicy = bearerTokenAuthenticationPolicy({\n credential,\n scopes: `${endpointUrl}/.default`,\n });\n\n const internalClientPipelineOptions: InternalClientPipelineOptions = {\n ...options,\n deserializationOptions: {\n expectedContentTypes: {\n json: [\n \"application/vnd.microsoft.appconfig.kvset+json\",\n \"application/vnd.microsoft.appconfig.kv+json\",\n \"application/vnd.microsoft.appconfig.kvs+json\",\n \"application/vnd.microsoft.appconfig.keyset+json\",\n \"application/vnd.microsoft.appconfig.revs+json\",\n ],\n },\n },\n ...{\n loggingOptions: {\n logger: logger.info,\n // This array contains header names we want to log that are not already\n // included as safe. Unknown/unsafe headers are logged as \"<REDACTED>\".\n additionalAllowedHeaderNames: [\"x-ms-correlation-request-id\"],\n },\n },\n };\n\n this.client = new GeneratedClient(endpointUrl, internalClientPipelineOptions);\n this.client.pipeline.addPolicy(authPolicy);\n this.tracingClient = createTracingClient({\n // The name of the resource provider requests are made against, as described in\n // https://github.com/Azure/azure-sdk/blob/main/docs/tracing/distributed-tracing-conventions.yml#L11-L15\n namespace: \"Microsoft.Learn\",\n // The package name and version\n packageName: \"@azure/template\",\n packageVersion: SDK_VERSION,\n });\n }\n\n /**\n * Retrieve the contents of an App Configuration setting by name (key).\n *\n * @param key - the unique name of the setting to get\n * @param options - optional configuration for the operation\n */\n public async getConfigurationSetting(\n key: string,\n options?: GetConfigurationSettingOptions,\n ): Promise<ConfigurationSetting>;\n\n /**\n * Retrieve an updated value of an App Configuration setting, allowing for\n * the use of entity tags to request the new value only if it has changed.\n *\n * @param setting - the setting to retrieve from the service\n * @param options - optional configuration for the operation\n */\n public async getConfigurationSetting(\n setting: ConfigurationSetting,\n options?: GetConfigurationSettingOptions,\n ): Promise<ConfigurationSetting>;\n\n public async getConfigurationSetting(\n keyOrSetting: string | ConfigurationSetting,\n options: GetConfigurationSettingOptions = {},\n ): Promise<ConfigurationSetting> {\n let key: string;\n let ifNoneMatch: string | undefined;\n\n return this.tracingClient.withSpan(\n // Span names should take the form \"<className>.<methodName>\".\n \"ConfigurationClient.getConfigurationSetting\",\n options,\n (updatedOptions) => {\n if (typeof keyOrSetting === \"string\") {\n key = keyOrSetting;\n if (options.onlyIfChanged) {\n throw new RangeError(\n \"You must pass a ConfigurationSetting instead of a key to perform a conditional fetch.\",\n );\n }\n } else {\n key = keyOrSetting.key!;\n const etag = keyOrSetting.etag;\n if (options.onlyIfChanged) {\n ifNoneMatch = quoteETag(etag);\n }\n }\n\n // You must pass updatedOptions to any calls you make within the callback.\n return this.client.getKeyValue(key, { ...updatedOptions, ifNoneMatch });\n },\n );\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAErB,QAAA,WAAW,GAAW,qBAAqB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport const SDK_VERSION: string = \"1.0.13-beta.
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAErB,QAAA,WAAW,GAAW,qBAAqB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport const SDK_VERSION: string = \"1.0.13-beta.4700778\";\n"]}
|
|
@@ -28,7 +28,7 @@ class GeneratedClientContext extends coreClient.ServiceClient {
|
|
|
28
28
|
const defaults = {
|
|
29
29
|
requestContentType: "application/json; charset=utf-8"
|
|
30
30
|
};
|
|
31
|
-
const packageDetails = `azsdk-js-template/1.0.13-beta.
|
|
31
|
+
const packageDetails = `azsdk-js-template/1.0.13-beta.4700778`;
|
|
32
32
|
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
33
33
|
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
|
34
34
|
: `${packageDetails}`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generatedClientContext.js","sourceRoot":"","sources":["../../../src/generated/generatedClientContext.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAEH,uEAAiD;AAGjD,gBAAgB;AAChB,MAAa,sBAAuB,SAAQ,UAAU,CAAC,aAAa;IAKlE;;;;OAIG;IACH,YAAY,QAAgB,EAAE,OAAuC;QACnE,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;YAC3B,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC;QAC/C,CAAC;QAED,0CAA0C;QAC1C,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,OAAO,GAAG,EAAE,CAAC;QACf,CAAC;QACD,MAAM,QAAQ,GAAkC;YAC9C,kBAAkB,EAAE,iCAAiC;SACtD,CAAC;QAEF,MAAM,cAAc,GAAG,uCAAuC,CAAC;QAC/D,MAAM,eAAe,GACnB,OAAO,CAAC,gBAAgB,IAAI,OAAO,CAAC,gBAAgB,CAAC,eAAe;YAClE,CAAC,CAAC,GAAG,OAAO,CAAC,gBAAgB,CAAC,eAAe,IAAI,cAAc,EAAE;YACjE,CAAC,CAAC,GAAG,cAAc,EAAE,CAAC;QAE1B,MAAM,mBAAmB,iDACpB,QAAQ,GACR,OAAO,KACV,gBAAgB,EAAE;gBAChB,eAAe;aAChB,EACD,OAAO,EAAE,OAAO,CAAC,QAAQ,IAAI,YAAY,GAC1C,CAAC;QACF,KAAK,CAAC,mBAAmB,CAAC,CAAC;QAC3B,wBAAwB;QACxB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QAEzB,0CAA0C;QAC1C,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,IAAI,YAAY,CAAC;IACvD,CAAC;CACF;AA5CD,wDA4CC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport * as coreClient from \"@azure/core-client\";\nimport { GeneratedClientOptionalParams } from \"./models/index.js\";\n\n/** @internal */\nexport class GeneratedClientContext extends coreClient.ServiceClient {\n endpoint: string;\n syncToken?: string;\n apiVersion: string;\n\n /**\n * Initializes a new instance of the GeneratedClientContext class.\n * @param endpoint The endpoint of the App Configuration instance to send requests to.\n * @param options The parameter options\n */\n constructor(endpoint: string, options?: GeneratedClientOptionalParams) {\n if (endpoint === undefined) {\n throw new Error(\"'endpoint' cannot be null\");\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: GeneratedClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\"\n };\n\n const packageDetails = `azsdk-js-template/1.0.13-beta.
|
|
1
|
+
{"version":3,"file":"generatedClientContext.js","sourceRoot":"","sources":["../../../src/generated/generatedClientContext.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAEH,uEAAiD;AAGjD,gBAAgB;AAChB,MAAa,sBAAuB,SAAQ,UAAU,CAAC,aAAa;IAKlE;;;;OAIG;IACH,YAAY,QAAgB,EAAE,OAAuC;QACnE,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;YAC3B,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC;QAC/C,CAAC;QAED,0CAA0C;QAC1C,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,OAAO,GAAG,EAAE,CAAC;QACf,CAAC;QACD,MAAM,QAAQ,GAAkC;YAC9C,kBAAkB,EAAE,iCAAiC;SACtD,CAAC;QAEF,MAAM,cAAc,GAAG,uCAAuC,CAAC;QAC/D,MAAM,eAAe,GACnB,OAAO,CAAC,gBAAgB,IAAI,OAAO,CAAC,gBAAgB,CAAC,eAAe;YAClE,CAAC,CAAC,GAAG,OAAO,CAAC,gBAAgB,CAAC,eAAe,IAAI,cAAc,EAAE;YACjE,CAAC,CAAC,GAAG,cAAc,EAAE,CAAC;QAE1B,MAAM,mBAAmB,iDACpB,QAAQ,GACR,OAAO,KACV,gBAAgB,EAAE;gBAChB,eAAe;aAChB,EACD,OAAO,EAAE,OAAO,CAAC,QAAQ,IAAI,YAAY,GAC1C,CAAC;QACF,KAAK,CAAC,mBAAmB,CAAC,CAAC;QAC3B,wBAAwB;QACxB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QAEzB,0CAA0C;QAC1C,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,IAAI,YAAY,CAAC;IACvD,CAAC;CACF;AA5CD,wDA4CC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport * as coreClient from \"@azure/core-client\";\nimport { GeneratedClientOptionalParams } from \"./models/index.js\";\n\n/** @internal */\nexport class GeneratedClientContext extends coreClient.ServiceClient {\n endpoint: string;\n syncToken?: string;\n apiVersion: string;\n\n /**\n * Initializes a new instance of the GeneratedClientContext class.\n * @param endpoint The endpoint of the App Configuration instance to send requests to.\n * @param options The parameter options\n */\n constructor(endpoint: string, options?: GeneratedClientOptionalParams) {\n if (endpoint === undefined) {\n throw new Error(\"'endpoint' cannot be null\");\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: GeneratedClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\"\n };\n\n const packageDetails = `azsdk-js-template/1.0.13-beta.4700778`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n const optionsWithDefaults = {\n ...defaults,\n ...options,\n userAgentOptions: {\n userAgentPrefix\n },\n baseUri: options.endpoint || \"{endpoint}\"\n };\n super(optionsWithDefaults);\n // Parameter assignments\n this.endpoint = endpoint;\n\n // Assigning values to Constant parameters\n this.apiVersion = options.apiVersion || \"2023-10-01\";\n }\n}\n"]}
|
|
@@ -31,7 +31,7 @@ export declare class ConfigurationClient {
|
|
|
31
31
|
* Creates an instance of a ConfigurationClient.
|
|
32
32
|
*
|
|
33
33
|
* Example usage:
|
|
34
|
-
* ```ts snippet:
|
|
34
|
+
* ```ts snippet:ReadmeSampleCreateClient
|
|
35
35
|
* import { ConfigurationClient } from "@azure/template";
|
|
36
36
|
* import { DefaultAzureCredential } from "@azure/identity";
|
|
37
37
|
*
|
|
@@ -14,7 +14,7 @@ export class ConfigurationClient {
|
|
|
14
14
|
* Creates an instance of a ConfigurationClient.
|
|
15
15
|
*
|
|
16
16
|
* Example usage:
|
|
17
|
-
* ```ts snippet:
|
|
17
|
+
* ```ts snippet:ReadmeSampleCreateClient
|
|
18
18
|
* import { ConfigurationClient } from "@azure/template";
|
|
19
19
|
* import { DefaultAzureCredential } from "@azure/identity";
|
|
20
20
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configurationClient.js","sourceRoot":"","sources":["../../src/configurationClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,eAAe,EAAwB,MAAM,sBAAsB,CAAC;AAM7E,OAAO,EAAE,+BAA+B,EAAE,MAAM,2BAA2B,CAAC;AAG5E,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AA2BtC;;GAEG;AACH,MAAM,OAAO,mBAAmB;IAI9B;;;;;;;;;;;;;;;;OAgBG;IACH,YACE,WAAmB,EACnB,UAA2B,EAC3B,UAAsC,EAAE;QAExC,wEAAwE;QACxE,qCAAqC;QACrC,MAAM,UAAU,GAAG,+BAA+B,CAAC;YACjD,UAAU;YACV,MAAM,EAAE,GAAG,WAAW,WAAW;SAClC,CAAC,CAAC;QAEH,MAAM,6BAA6B,iDAC9B,OAAO,KACV,sBAAsB,EAAE;gBACtB,oBAAoB,EAAE;oBACpB,IAAI,EAAE;wBACJ,gDAAgD;wBAChD,6CAA6C;wBAC7C,8CAA8C;wBAC9C,iDAAiD;wBACjD,+CAA+C;qBAChD;iBACF;aACF,KACE;YACD,cAAc,EAAE;gBACd,MAAM,EAAE,MAAM,CAAC,IAAI;gBACnB,uEAAuE;gBACvE,uEAAuE;gBACvE,4BAA4B,EAAE,CAAC,6BAA6B,CAAC;aAC9D;SACF,CACF,CAAC;QAEF,IAAI,CAAC,MAAM,GAAG,IAAI,eAAe,CAAC,WAAW,EAAE,6BAA6B,CAAC,CAAC;QAC9E,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;QAC3C,IAAI,CAAC,aAAa,GAAG,mBAAmB,CAAC;YACvC,+EAA+E;YAC/E,wGAAwG;YACxG,SAAS,EAAE,iBAAiB;YAC5B,+BAA+B;YAC/B,WAAW,EAAE,iBAAiB;YAC9B,cAAc,EAAE,WAAW;SAC5B,CAAC,CAAC;IACL,CAAC;IAyBM,KAAK,CAAC,uBAAuB,CAClC,YAA2C,EAC3C,UAA0C,EAAE;QAE5C,IAAI,GAAW,CAAC;QAChB,IAAI,WAA+B,CAAC;QAEpC,OAAO,IAAI,CAAC,aAAa,CAAC,QAAQ;QAChC,8DAA8D;QAC9D,6CAA6C,EAC7C,OAAO,EACP,CAAC,cAAc,EAAE,EAAE;YACjB,IAAI,OAAO,YAAY,KAAK,QAAQ,EAAE,CAAC;gBACrC,GAAG,GAAG,YAAY,CAAC;gBACnB,IAAI,OAAO,CAAC,aAAa,EAAE,CAAC;oBAC1B,MAAM,IAAI,UAAU,CAClB,uFAAuF,CACxF,CAAC;gBACJ,CAAC;YACH,CAAC;iBAAM,CAAC;gBACN,GAAG,GAAG,YAAY,CAAC,GAAI,CAAC;gBACxB,MAAM,IAAI,GAAG,YAAY,CAAC,IAAI,CAAC;gBAC/B,IAAI,OAAO,CAAC,aAAa,EAAE,CAAC;oBAC1B,WAAW,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC;gBAChC,CAAC;YACH,CAAC;YAED,0EAA0E;YAC1E,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,GAAG,kCAAO,cAAc,KAAE,WAAW,IAAG,CAAC;QAC1E,CAAC,CACF,CAAC;IACJ,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { GeneratedClient, ConfigurationSetting } from \"./generated/index.js\";\nimport type {\n CommonClientOptions,\n OperationOptions,\n InternalClientPipelineOptions,\n} from \"@azure/core-client\";\nimport { bearerTokenAuthenticationPolicy } from \"@azure/core-rest-pipeline\";\nimport type { TokenCredential } from \"@azure/core-auth\";\nimport type { TracingClient } from \"@azure/core-tracing\";\nimport { createTracingClient } from \"@azure/core-tracing\";\nimport { SDK_VERSION } from \"./constants.js\";\nimport { logger } from \"./logger.js\";\nimport { quoteETag } from \"./util.js\";\n\n// re-export generated types that are used as public interfaces.\nexport { ConfigurationSetting };\n\n/**\n * Options for the `getConfigurationSetting` method of `ConfigurationClient`.\n */\nexport interface GetConfigurationSettingOptions extends OperationOptions {\n /**\n * If set to `true`, the method will use entity tags to instruct the service\n * to send an updated value only if the value has changed.\n *\n * NOTE: This option is only supported if passing a full\n * `ConfigurationSetting` object with an `etag` as the first parameter to\n * `getConfigurationSetting`.\n */\n onlyIfChanged?: boolean;\n}\n\n/**\n * Client options used to configure App Configuration API requests.\n */\nexport interface ConfigurationClientOptions extends CommonClientOptions {\n // Any custom options configured at the client level go here.\n}\n\n/**\n * The client class used to interact with the App Configuration service.\n */\nexport class ConfigurationClient {\n private client: GeneratedClient;\n private tracingClient: TracingClient;\n\n /**\n * Creates an instance of a ConfigurationClient.\n *\n * Example usage:\n * ```ts snippet:
|
|
1
|
+
{"version":3,"file":"configurationClient.js","sourceRoot":"","sources":["../../src/configurationClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,eAAe,EAAwB,MAAM,sBAAsB,CAAC;AAM7E,OAAO,EAAE,+BAA+B,EAAE,MAAM,2BAA2B,CAAC;AAG5E,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AA2BtC;;GAEG;AACH,M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AG,YAAY,CAAC;gBACnB,IAAI,OAAO,CAAC,aAAa,EAAE,CAAC;oBAC1B,MAAM,IAAI,UAAU,CAClB,uFAAuF,CACxF,CAAC;gBACJ,CAAC;YACH,CAAC;iBAAM,CAAC;gBACN,GAAG,GAAG,YAAY,CAAC,GAAI,CAAC;gBACxB,MAAM,IAAI,GAAG,YAAY,CAAC,IAAI,CAAC;gBAC/B,IAAI,OAAO,CAAC,aAAa,EAAE,CAAC;oBAC1B,WAAW,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC;gBAChC,CAAC;YACH,CAAC;YAED,0EAA0E;YAC1E,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,GAAG,kCAAO,cAAc,KAAE,WAAW,IAAG,CAAC;QAC1E,CAAC,CACF,CAAC;IACJ,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { GeneratedClient, ConfigurationSetting } from \"./generated/index.js\";\nimport type {\n CommonClientOptions,\n OperationOptions,\n InternalClientPipelineOptions,\n} from \"@azure/core-client\";\nimport { bearerTokenAuthenticationPolicy } from \"@azure/core-rest-pipeline\";\nimport type { TokenCredential } from \"@azure/core-auth\";\nimport type { TracingClient } from \"@azure/core-tracing\";\nimport { createTracingClient } from \"@azure/core-tracing\";\nimport { SDK_VERSION } from \"./constants.js\";\nimport { logger } from \"./logger.js\";\nimport { quoteETag } from \"./util.js\";\n\n// re-export generated types that are used as public interfaces.\nexport { ConfigurationSetting };\n\n/**\n * Options for the `getConfigurationSetting` method of `ConfigurationClient`.\n */\nexport interface GetConfigurationSettingOptions extends OperationOptions {\n /**\n * If set to `true`, the method will use entity tags to instruct the service\n * to send an updated value only if the value has changed.\n *\n * NOTE: This option is only supported if passing a full\n * `ConfigurationSetting` object with an `etag` as the first parameter to\n * `getConfigurationSetting`.\n */\n onlyIfChanged?: boolean;\n}\n\n/**\n * Client options used to configure App Configuration API requests.\n */\nexport interface ConfigurationClientOptions extends CommonClientOptions {\n // Any custom options configured at the client level go here.\n}\n\n/**\n * The client class used to interact with the App Configuration service.\n */\nexport class ConfigurationClient {\n private client: GeneratedClient;\n private tracingClient: TracingClient;\n\n /**\n * Creates an instance of a ConfigurationClient.\n *\n * Example usage:\n * ```ts snippet:ReadmeSampleCreateClient\n * import { ConfigurationClient } from \"@azure/template\";\n * import { DefaultAzureCredential } from \"@azure/identity\";\n *\n * const client = new ConfigurationClient(\n * process.env.ENDPOINT ?? \"<app configuration endpoint>\",\n * new DefaultAzureCredential(),\n * );\n * ```\n * @param endpointUrl - the URL to the App Configuration endpoint\n * @param credential - used to authenticate requests to the service\n * @param options - optional configuration used to send requests to the service\n */\n constructor(\n endpointUrl: string,\n credential: TokenCredential,\n options: ConfigurationClientOptions = {},\n ) {\n // The AAD scope for an API is usually the baseUri + \"/.default\", but it\n // may be different for your service.\n const authPolicy = bearerTokenAuthenticationPolicy({\n credential,\n scopes: `${endpointUrl}/.default`,\n });\n\n const internalClientPipelineOptions: InternalClientPipelineOptions = {\n ...options,\n deserializationOptions: {\n expectedContentTypes: {\n json: [\n \"application/vnd.microsoft.appconfig.kvset+json\",\n \"application/vnd.microsoft.appconfig.kv+json\",\n \"application/vnd.microsoft.appconfig.kvs+json\",\n \"application/vnd.microsoft.appconfig.keyset+json\",\n \"application/vnd.microsoft.appconfig.revs+json\",\n ],\n },\n },\n ...{\n loggingOptions: {\n logger: logger.info,\n // This array contains header names we want to log that are not already\n // included as safe. Unknown/unsafe headers are logged as \"<REDACTED>\".\n additionalAllowedHeaderNames: [\"x-ms-correlation-request-id\"],\n },\n },\n };\n\n this.client = new GeneratedClient(endpointUrl, internalClientPipelineOptions);\n this.client.pipeline.addPolicy(authPolicy);\n this.tracingClient = createTracingClient({\n // The name of the resource provider requests are made against, as described in\n // https://github.com/Azure/azure-sdk/blob/main/docs/tracing/distributed-tracing-conventions.yml#L11-L15\n namespace: \"Microsoft.Learn\",\n // The package name and version\n packageName: \"@azure/template\",\n packageVersion: SDK_VERSION,\n });\n }\n\n /**\n * Retrieve the contents of an App Configuration setting by name (key).\n *\n * @param key - the unique name of the setting to get\n * @param options - optional configuration for the operation\n */\n public async getConfigurationSetting(\n key: string,\n options?: GetConfigurationSettingOptions,\n ): Promise<ConfigurationSetting>;\n\n /**\n * Retrieve an updated value of an App Configuration setting, allowing for\n * the use of entity tags to request the new value only if it has changed.\n *\n * @param setting - the setting to retrieve from the service\n * @param options - optional configuration for the operation\n */\n public async getConfigurationSetting(\n setting: ConfigurationSetting,\n options?: GetConfigurationSettingOptions,\n ): Promise<ConfigurationSetting>;\n\n public async getConfigurationSetting(\n keyOrSetting: string | ConfigurationSetting,\n options: GetConfigurationSettingOptions = {},\n ): Promise<ConfigurationSetting> {\n let key: string;\n let ifNoneMatch: string | undefined;\n\n return this.tracingClient.withSpan(\n // Span names should take the form \"<className>.<methodName>\".\n \"ConfigurationClient.getConfigurationSetting\",\n options,\n (updatedOptions) => {\n if (typeof keyOrSetting === \"string\") {\n key = keyOrSetting;\n if (options.onlyIfChanged) {\n throw new RangeError(\n \"You must pass a ConfigurationSetting instead of a key to perform a conditional fetch.\",\n );\n }\n } else {\n key = keyOrSetting.key!;\n const etag = keyOrSetting.etag;\n if (options.onlyIfChanged) {\n ifNoneMatch = quoteETag(etag);\n }\n }\n\n // You must pass updatedOptions to any calls you make within the callback.\n return this.client.getKeyValue(key, { ...updatedOptions, ifNoneMatch });\n },\n );\n }\n}\n"]}
|
package/dist/esm/constants.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,MAAM,CAAC,MAAM,WAAW,GAAW,qBAAqB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport const SDK_VERSION: string = \"1.0.13-beta.
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,MAAM,CAAC,MAAM,WAAW,GAAW,qBAAqB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport const SDK_VERSION: string = \"1.0.13-beta.4700778\";\n"]}
|
|
@@ -24,7 +24,7 @@ export class GeneratedClientContext extends coreClient.ServiceClient {
|
|
|
24
24
|
const defaults = {
|
|
25
25
|
requestContentType: "application/json; charset=utf-8"
|
|
26
26
|
};
|
|
27
|
-
const packageDetails = `azsdk-js-template/1.0.13-beta.
|
|
27
|
+
const packageDetails = `azsdk-js-template/1.0.13-beta.4700778`;
|
|
28
28
|
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
29
29
|
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
|
30
30
|
: `${packageDetails}`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generatedClientContext.js","sourceRoot":"","sources":["../../../src/generated/generatedClientContext.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AAGjD,gBAAgB;AAChB,MAAM,OAAO,sBAAuB,SAAQ,UAAU,CAAC,aAAa;IAKlE;;;;OAIG;IACH,YAAY,QAAgB,EAAE,OAAuC;QACnE,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;YAC3B,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC;QAC/C,CAAC;QAED,0CAA0C;QAC1C,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,OAAO,GAAG,EAAE,CAAC;QACf,CAAC;QACD,MAAM,QAAQ,GAAkC;YAC9C,kBAAkB,EAAE,iCAAiC;SACtD,CAAC;QAEF,MAAM,cAAc,GAAG,uCAAuC,CAAC;QAC/D,MAAM,eAAe,GACnB,OAAO,CAAC,gBAAgB,IAAI,OAAO,CAAC,gBAAgB,CAAC,eAAe;YAClE,CAAC,CAAC,GAAG,OAAO,CAAC,gBAAgB,CAAC,eAAe,IAAI,cAAc,EAAE;YACjE,CAAC,CAAC,GAAG,cAAc,EAAE,CAAC;QAE1B,MAAM,mBAAmB,iDACpB,QAAQ,GACR,OAAO,KACV,gBAAgB,EAAE;gBAChB,eAAe;aAChB,EACD,OAAO,EAAE,OAAO,CAAC,QAAQ,IAAI,YAAY,GAC1C,CAAC;QACF,KAAK,CAAC,mBAAmB,CAAC,CAAC;QAC3B,wBAAwB;QACxB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QAEzB,0CAA0C;QAC1C,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,IAAI,YAAY,CAAC;IACvD,CAAC;CACF","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport * as coreClient from \"@azure/core-client\";\nimport { GeneratedClientOptionalParams } from \"./models/index.js\";\n\n/** @internal */\nexport class GeneratedClientContext extends coreClient.ServiceClient {\n endpoint: string;\n syncToken?: string;\n apiVersion: string;\n\n /**\n * Initializes a new instance of the GeneratedClientContext class.\n * @param endpoint The endpoint of the App Configuration instance to send requests to.\n * @param options The parameter options\n */\n constructor(endpoint: string, options?: GeneratedClientOptionalParams) {\n if (endpoint === undefined) {\n throw new Error(\"'endpoint' cannot be null\");\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: GeneratedClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\"\n };\n\n const packageDetails = `azsdk-js-template/1.0.13-beta.
|
|
1
|
+
{"version":3,"file":"generatedClientContext.js","sourceRoot":"","sources":["../../../src/generated/generatedClientContext.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AAGjD,gBAAgB;AAChB,MAAM,OAAO,sBAAuB,SAAQ,UAAU,CAAC,aAAa;IAKlE;;;;OAIG;IACH,YAAY,QAAgB,EAAE,OAAuC;QACnE,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;YAC3B,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC;QAC/C,CAAC;QAED,0CAA0C;QAC1C,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,OAAO,GAAG,EAAE,CAAC;QACf,CAAC;QACD,MAAM,QAAQ,GAAkC;YAC9C,kBAAkB,EAAE,iCAAiC;SACtD,CAAC;QAEF,MAAM,cAAc,GAAG,uCAAuC,CAAC;QAC/D,MAAM,eAAe,GACnB,OAAO,CAAC,gBAAgB,IAAI,OAAO,CAAC,gBAAgB,CAAC,eAAe;YAClE,CAAC,CAAC,GAAG,OAAO,CAAC,gBAAgB,CAAC,eAAe,IAAI,cAAc,EAAE;YACjE,CAAC,CAAC,GAAG,cAAc,EAAE,CAAC;QAE1B,MAAM,mBAAmB,iDACpB,QAAQ,GACR,OAAO,KACV,gBAAgB,EAAE;gBAChB,eAAe;aAChB,EACD,OAAO,EAAE,OAAO,CAAC,QAAQ,IAAI,YAAY,GAC1C,CAAC;QACF,KAAK,CAAC,mBAAmB,CAAC,CAAC;QAC3B,wBAAwB;QACxB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QAEzB,0CAA0C;QAC1C,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,IAAI,YAAY,CAAC;IACvD,CAAC;CACF","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport * as coreClient from \"@azure/core-client\";\nimport { GeneratedClientOptionalParams } from \"./models/index.js\";\n\n/** @internal */\nexport class GeneratedClientContext extends coreClient.ServiceClient {\n endpoint: string;\n syncToken?: string;\n apiVersion: string;\n\n /**\n * Initializes a new instance of the GeneratedClientContext class.\n * @param endpoint The endpoint of the App Configuration instance to send requests to.\n * @param options The parameter options\n */\n constructor(endpoint: string, options?: GeneratedClientOptionalParams) {\n if (endpoint === undefined) {\n throw new Error(\"'endpoint' cannot be null\");\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: GeneratedClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\"\n };\n\n const packageDetails = `azsdk-js-template/1.0.13-beta.4700778`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n const optionsWithDefaults = {\n ...defaults,\n ...options,\n userAgentOptions: {\n userAgentPrefix\n },\n baseUri: options.endpoint || \"{endpoint}\"\n };\n super(optionsWithDefaults);\n // Parameter assignments\n this.endpoint = endpoint;\n\n // Assigning values to Constant parameters\n this.apiVersion = options.apiVersion || \"2023-10-01\";\n }\n}\n"]}
|
|
@@ -31,7 +31,7 @@ export declare class ConfigurationClient {
|
|
|
31
31
|
* Creates an instance of a ConfigurationClient.
|
|
32
32
|
*
|
|
33
33
|
* Example usage:
|
|
34
|
-
* ```ts snippet:
|
|
34
|
+
* ```ts snippet:ReadmeSampleCreateClient
|
|
35
35
|
* import { ConfigurationClient } from "@azure/template";
|
|
36
36
|
* import { DefaultAzureCredential } from "@azure/identity";
|
|
37
37
|
*
|
|
@@ -14,7 +14,7 @@ export class ConfigurationClient {
|
|
|
14
14
|
* Creates an instance of a ConfigurationClient.
|
|
15
15
|
*
|
|
16
16
|
* Example usage:
|
|
17
|
-
* ```ts snippet:
|
|
17
|
+
* ```ts snippet:ReadmeSampleCreateClient
|
|
18
18
|
* import { ConfigurationClient } from "@azure/template";
|
|
19
19
|
* import { DefaultAzureCredential } from "@azure/identity";
|
|
20
20
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configurationClient.js","sourceRoot":"","sources":["../../src/configurationClient.ts"],"names":[],"mappings":"AAAA,u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iB;YAC9B,cAAc,EAAE,WAAW;SAC5B,CAAC,CAAC;IACL,CAAC;IAyBM,KAAK,CAAC,uBAAuB,CAClC,YAA2C,EAC3C,UAA0C,EAAE;QAE5C,IAAI,GAAW,CAAC;QAChB,IAAI,WAA+B,CAAC;QAEpC,OAAO,IAAI,CAAC,aAAa,CAAC,QAAQ;QAChC,8DAA8D;QAC9D,6CAA6C,EAC7C,OAAO,EACP,CAAC,cAAc,EAAE,EAAE;YACjB,IAAI,OAAO,YAAY,KAAK,QAAQ,EAAE,CAAC;gBACrC,GAAG,GAAG,YAAY,CAAC;gBACnB,IAAI,OAAO,CAAC,aAAa,EAAE,CAAC;oBAC1B,MAAM,IAAI,UAAU,CAClB,uFAAuF,CACxF,CAAC;gBACJ,CAAC;YACH,CAAC;iBAAM,CAAC;gBACN,GAAG,GAAG,YAAY,CAAC,GAAI,CAAC;gBACxB,MAAM,IAAI,GAAG,YAAY,CAAC,IAAI,CAAC;gBAC/B,IAAI,OAAO,CAAC,aAAa,EAAE,CAAC;oBAC1B,WAAW,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC;gBAChC,CAAC;YACH,CAAC;YAED,0EAA0E;YAC1E,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,GAAG,kCAAO,cAAc,KAAE,WAAW,IAAG,CAAC;QAC1E,CAAC,CACF,CAAC;IACJ,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { GeneratedClient, ConfigurationSetting } from \"./generated/index.js\";\nimport type {\n CommonClientOptions,\n OperationOptions,\n InternalClientPipelineOptions,\n} from \"@azure/core-client\";\nimport { bearerTokenAuthenticationPolicy } from \"@azure/core-rest-pipeline\";\nimport type { TokenCredential } from \"@azure/core-auth\";\nimport type { TracingClient } from \"@azure/core-tracing\";\nimport { createTracingClient } from \"@azure/core-tracing\";\nimport { SDK_VERSION } from \"./constants.js\";\nimport { logger } from \"./logger.js\";\nimport { quoteETag } from \"./util.js\";\n\n// re-export generated types that are used as public interfaces.\nexport { ConfigurationSetting };\n\n/**\n * Options for the `getConfigurationSetting` method of `ConfigurationClient`.\n */\nexport interface GetConfigurationSettingOptions extends OperationOptions {\n /**\n * If set to `true`, the method will use entity tags to instruct the service\n * to send an updated value only if the value has changed.\n *\n * NOTE: This option is only supported if passing a full\n * `ConfigurationSetting` object with an `etag` as the first parameter to\n * `getConfigurationSetting`.\n */\n onlyIfChanged?: boolean;\n}\n\n/**\n * Client options used to configure App Configuration API requests.\n */\nexport interface ConfigurationClientOptions extends CommonClientOptions {\n // Any custom options configured at the client level go here.\n}\n\n/**\n * The client class used to interact with the App Configuration service.\n */\nexport class ConfigurationClient {\n private client: GeneratedClient;\n private tracingClient: TracingClient;\n\n /**\n * Creates an instance of a ConfigurationClient.\n *\n * Example usage:\n * ```ts snippet:
|
|
1
|
+
{"version":3,"file":"configurationClient.js","sourceRoot":"","sources":["../../src/configurationClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,eAAe,EAAwB,MAAM,sBAAsB,CAAC;AAM7E,OAAO,EAAE,+BAA+B,EAAE,MAAM,2BAA2B,CAAC;AAG5E,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AA2BtC;;GAEG;AACH,MAAM,OAAO,mBAAmB;IAI9B;;;;;;;;;;;;;;;;OAgBG;IACH,YACE,WAAmB,EACnB,UAA2B,EAC3B,UAAsC,EAAE;QAExC,wEAAwE;QACxE,qCAAqC;QACrC,MAAM,UAAU,GAAG,+BAA+B,CAAC;YACjD,UAAU;YACV,MAAM,EAAE,GAAG,WAAW,WAAW;SAClC,CAAC,CAAC;QAEH,MAAM,6BAA6B,iDAC9B,OAAO,K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a,EAAE,CAAC;oBAC1B,WAAW,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC;gBAChC,CAAC;YACH,CAAC;YAED,0EAA0E;YAC1E,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,GAAG,kCAAO,cAAc,KAAE,WAAW,IAAG,CAAC;QAC1E,CAAC,CACF,CAAC;IACJ,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { GeneratedClient, ConfigurationSetting } from \"./generated/index.js\";\nimport type {\n CommonClientOptions,\n OperationOptions,\n InternalClientPipelineOptions,\n} from \"@azure/core-client\";\nimport { bearerTokenAuthenticationPolicy } from \"@azure/core-rest-pipeline\";\nimport type { TokenCredential } from \"@azure/core-auth\";\nimport type { TracingClient } from \"@azure/core-tracing\";\nimport { createTracingClient } from \"@azure/core-tracing\";\nimport { SDK_VERSION } from \"./constants.js\";\nimport { logger } from \"./logger.js\";\nimport { quoteETag } from \"./util.js\";\n\n// re-export generated types that are used as public interfaces.\nexport { ConfigurationSetting };\n\n/**\n * Options for the `getConfigurationSetting` method of `ConfigurationClient`.\n */\nexport interface GetConfigurationSettingOptions extends OperationOptions {\n /**\n * If set to `true`, the method will use entity tags to instruct the service\n * to send an updated value only if the value has changed.\n *\n * NOTE: This option is only supported if passing a full\n * `ConfigurationSetting` object with an `etag` as the first parameter to\n * `getConfigurationSetting`.\n */\n onlyIfChanged?: boolean;\n}\n\n/**\n * Client options used to configure App Configuration API requests.\n */\nexport interface ConfigurationClientOptions extends CommonClientOptions {\n // Any custom options configured at the client level go here.\n}\n\n/**\n * The client class used to interact with the App Configuration service.\n */\nexport class ConfigurationClient {\n private client: GeneratedClient;\n private tracingClient: TracingClient;\n\n /**\n * Creates an instance of a ConfigurationClient.\n *\n * Example usage:\n * ```ts snippet:ReadmeSampleCreateClient\n * import { ConfigurationClient } from \"@azure/template\";\n * import { DefaultAzureCredential } from \"@azure/identity\";\n *\n * const client = new ConfigurationClient(\n * process.env.ENDPOINT ?? \"<app configuration endpoint>\",\n * new DefaultAzureCredential(),\n * );\n * ```\n * @param endpointUrl - the URL to the App Configuration endpoint\n * @param credential - used to authenticate requests to the service\n * @param options - optional configuration used to send requests to the service\n */\n constructor(\n endpointUrl: string,\n credential: TokenCredential,\n options: ConfigurationClientOptions = {},\n ) {\n // The AAD scope for an API is usually the baseUri + \"/.default\", but it\n // may be different for your service.\n const authPolicy = bearerTokenAuthenticationPolicy({\n credential,\n scopes: `${endpointUrl}/.default`,\n });\n\n const internalClientPipelineOptions: InternalClientPipelineOptions = {\n ...options,\n deserializationOptions: {\n expectedContentTypes: {\n json: [\n \"application/vnd.microsoft.appconfig.kvset+json\",\n \"application/vnd.microsoft.appconfig.kv+json\",\n \"application/vnd.microsoft.appconfig.kvs+json\",\n \"application/vnd.microsoft.appconfig.keyset+json\",\n \"application/vnd.microsoft.appconfig.revs+json\",\n ],\n },\n },\n ...{\n loggingOptions: {\n logger: logger.info,\n // This array contains header names we want to log that are not already\n // included as safe. Unknown/unsafe headers are logged as \"<REDACTED>\".\n additionalAllowedHeaderNames: [\"x-ms-correlation-request-id\"],\n },\n },\n };\n\n this.client = new GeneratedClient(endpointUrl, internalClientPipelineOptions);\n this.client.pipeline.addPolicy(authPolicy);\n this.tracingClient = createTracingClient({\n // The name of the resource provider requests are made against, as described in\n // https://github.com/Azure/azure-sdk/blob/main/docs/tracing/distributed-tracing-conventions.yml#L11-L15\n namespace: \"Microsoft.Learn\",\n // The package name and version\n packageName: \"@azure/template\",\n packageVersion: SDK_VERSION,\n });\n }\n\n /**\n * Retrieve the contents of an App Configuration setting by name (key).\n *\n * @param key - the unique name of the setting to get\n * @param options - optional configuration for the operation\n */\n public async getConfigurationSetting(\n key: string,\n options?: GetConfigurationSettingOptions,\n ): Promise<ConfigurationSetting>;\n\n /**\n * Retrieve an updated value of an App Configuration setting, allowing for\n * the use of entity tags to request the new value only if it has changed.\n *\n * @param setting - the setting to retrieve from the service\n * @param options - optional configuration for the operation\n */\n public async getConfigurationSetting(\n setting: ConfigurationSetting,\n options?: GetConfigurationSettingOptions,\n ): Promise<ConfigurationSetting>;\n\n public async getConfigurationSetting(\n keyOrSetting: string | ConfigurationSetting,\n options: GetConfigurationSettingOptions = {},\n ): Promise<ConfigurationSetting> {\n let key: string;\n let ifNoneMatch: string | undefined;\n\n return this.tracingClient.withSpan(\n // Span names should take the form \"<className>.<methodName>\".\n \"ConfigurationClient.getConfigurationSetting\",\n options,\n (updatedOptions) => {\n if (typeof keyOrSetting === \"string\") {\n key = keyOrSetting;\n if (options.onlyIfChanged) {\n throw new RangeError(\n \"You must pass a ConfigurationSetting instead of a key to perform a conditional fetch.\",\n );\n }\n } else {\n key = keyOrSetting.key!;\n const etag = keyOrSetting.etag;\n if (options.onlyIfChanged) {\n ifNoneMatch = quoteETag(etag);\n }\n }\n\n // You must pass updatedOptions to any calls you make within the callback.\n return this.client.getKeyValue(key, { ...updatedOptions, ifNoneMatch });\n },\n );\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,MAAM,CAAC,MAAM,WAAW,GAAW,qBAAqB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport const SDK_VERSION: string = \"1.0.13-beta.
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,MAAM,CAAC,MAAM,WAAW,GAAW,qBAAqB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport const SDK_VERSION: string = \"1.0.13-beta.4700778\";\n"]}
|
|
@@ -24,7 +24,7 @@ export class GeneratedClientContext extends coreClient.ServiceClient {
|
|
|
24
24
|
const defaults = {
|
|
25
25
|
requestContentType: "application/json; charset=utf-8"
|
|
26
26
|
};
|
|
27
|
-
const packageDetails = `azsdk-js-template/1.0.13-beta.
|
|
27
|
+
const packageDetails = `azsdk-js-template/1.0.13-beta.4700778`;
|
|
28
28
|
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
29
29
|
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
|
30
30
|
: `${packageDetails}`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generatedClientContext.js","sourceRoot":"","sources":["../../../src/generated/generatedClientContext.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AAGjD,gBAAgB;AAChB,MAAM,OAAO,sBAAuB,SAAQ,UAAU,CAAC,aAAa;IAKlE;;;;OAIG;IACH,YAAY,QAAgB,EAAE,OAAuC;QACnE,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;YAC3B,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC;QAC/C,CAAC;QAED,0CAA0C;QAC1C,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,OAAO,GAAG,EAAE,CAAC;QACf,CAAC;QACD,MAAM,QAAQ,GAAkC;YAC9C,kBAAkB,EAAE,iCAAiC;SACtD,CAAC;QAEF,MAAM,cAAc,GAAG,uCAAuC,CAAC;QAC/D,MAAM,eAAe,GACnB,OAAO,CAAC,gBAAgB,IAAI,OAAO,CAAC,gBAAgB,CAAC,eAAe;YAClE,CAAC,CAAC,GAAG,OAAO,CAAC,gBAAgB,CAAC,eAAe,IAAI,cAAc,EAAE;YACjE,CAAC,CAAC,GAAG,cAAc,EAAE,CAAC;QAE1B,MAAM,mBAAmB,iDACpB,QAAQ,GACR,OAAO,KACV,gBAAgB,EAAE;gBAChB,eAAe;aAChB,EACD,OAAO,EAAE,OAAO,CAAC,QAAQ,IAAI,YAAY,GAC1C,CAAC;QACF,KAAK,CAAC,mBAAmB,CAAC,CAAC;QAC3B,wBAAwB;QACxB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QAEzB,0CAA0C;QAC1C,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,IAAI,YAAY,CAAC;IACvD,CAAC;CACF","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport * as coreClient from \"@azure/core-client\";\nimport { GeneratedClientOptionalParams } from \"./models/index.js\";\n\n/** @internal */\nexport class GeneratedClientContext extends coreClient.ServiceClient {\n endpoint: string;\n syncToken?: string;\n apiVersion: string;\n\n /**\n * Initializes a new instance of the GeneratedClientContext class.\n * @param endpoint The endpoint of the App Configuration instance to send requests to.\n * @param options The parameter options\n */\n constructor(endpoint: string, options?: GeneratedClientOptionalParams) {\n if (endpoint === undefined) {\n throw new Error(\"'endpoint' cannot be null\");\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: GeneratedClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\"\n };\n\n const packageDetails = `azsdk-js-template/1.0.13-beta.
|
|
1
|
+
{"version":3,"file":"generatedClientContext.js","sourceRoot":"","sources":["../../../src/generated/generatedClientContext.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AAGjD,gBAAgB;AAChB,MAAM,OAAO,sBAAuB,SAAQ,UAAU,CAAC,aAAa;IAKlE;;;;OAIG;IACH,YAAY,QAAgB,EAAE,OAAuC;QACnE,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;YAC3B,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC;QAC/C,CAAC;QAED,0CAA0C;QAC1C,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,OAAO,GAAG,EAAE,CAAC;QACf,CAAC;QACD,MAAM,QAAQ,GAAkC;YAC9C,kBAAkB,EAAE,iCAAiC;SACtD,CAAC;QAEF,MAAM,cAAc,GAAG,uCAAuC,CAAC;QAC/D,MAAM,eAAe,GACnB,OAAO,CAAC,gBAAgB,IAAI,OAAO,CAAC,gBAAgB,CAAC,eAAe;YAClE,CAAC,CAAC,GAAG,OAAO,CAAC,gBAAgB,CAAC,eAAe,IAAI,cAAc,EAAE;YACjE,CAAC,CAAC,GAAG,cAAc,EAAE,CAAC;QAE1B,MAAM,mBAAmB,iDACpB,QAAQ,GACR,OAAO,KACV,gBAAgB,EAAE;gBAChB,eAAe;aAChB,EACD,OAAO,EAAE,OAAO,CAAC,QAAQ,IAAI,YAAY,GAC1C,CAAC;QACF,KAAK,CAAC,mBAAmB,CAAC,CAAC;QAC3B,wBAAwB;QACxB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QAEzB,0CAA0C;QAC1C,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,IAAI,YAAY,CAAC;IACvD,CAAC;CACF","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport * as coreClient from \"@azure/core-client\";\nimport { GeneratedClientOptionalParams } from \"./models/index.js\";\n\n/** @internal */\nexport class GeneratedClientContext extends coreClient.ServiceClient {\n endpoint: string;\n syncToken?: string;\n apiVersion: string;\n\n /**\n * Initializes a new instance of the GeneratedClientContext class.\n * @param endpoint The endpoint of the App Configuration instance to send requests to.\n * @param options The parameter options\n */\n constructor(endpoint: string, options?: GeneratedClientOptionalParams) {\n if (endpoint === undefined) {\n throw new Error(\"'endpoint' cannot be null\");\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: GeneratedClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\"\n };\n\n const packageDetails = `azsdk-js-template/1.0.13-beta.4700778`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n const optionsWithDefaults = {\n ...defaults,\n ...options,\n userAgentOptions: {\n userAgentPrefix\n },\n baseUri: options.endpoint || \"{endpoint}\"\n };\n super(optionsWithDefaults);\n // Parameter assignments\n this.endpoint = endpoint;\n\n // Assigning values to Constant parameters\n this.apiVersion = options.apiVersion || \"2023-10-01\";\n }\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@azure/template",
|
|
3
|
-
"version": "1.0.13-beta.
|
|
3
|
+
"version": "1.0.13-beta.4700778",
|
|
4
4
|
"description": "Example project for learning how to build a client library",
|
|
5
5
|
"sdk-type": "client",
|
|
6
6
|
"main": "./dist/commonjs/index.js",
|
|
@@ -53,9 +53,9 @@
|
|
|
53
53
|
"test:browser": "npm run clean && npm run integration-test:browser",
|
|
54
54
|
"test:node": "npm run clean && npm run build:test && npm run integration-test:node",
|
|
55
55
|
"unit-test": "npm run unit-test:node && npm run unit-test:browser",
|
|
56
|
-
"unit-test:browser": "npm run
|
|
57
|
-
"unit-test:node": "
|
|
58
|
-
"update-snippets": "dev-tool run
|
|
56
|
+
"unit-test:browser": "npm run clean && dev-tool run build-package && dev-tool run build-test && dev-tool run test:vitest --browser",
|
|
57
|
+
"unit-test:node": "dev-tool run test:vitest",
|
|
58
|
+
"update-snippets": "dev-tool run update-snippets"
|
|
59
59
|
},
|
|
60
60
|
"files": [
|
|
61
61
|
"dist/",
|
|
@@ -80,32 +80,33 @@
|
|
|
80
80
|
"sideEffects": false,
|
|
81
81
|
"prettier": "@azure/eslint-plugin-azure-sdk/prettier.json",
|
|
82
82
|
"dependencies": {
|
|
83
|
-
"@azure/core-auth": "^1.
|
|
84
|
-
"@azure/core-client": "^1.
|
|
83
|
+
"@azure/core-auth": "^1.9.0",
|
|
84
|
+
"@azure/core-client": "^1.9.2",
|
|
85
85
|
"@azure/core-lro": "^2.7.0",
|
|
86
|
-
"@azure/core-rest-pipeline": "^1.
|
|
87
|
-
"@azure/core-tracing": "^1.
|
|
88
|
-
"@azure/logger": "^1.
|
|
89
|
-
"tslib": "^2.
|
|
86
|
+
"@azure/core-rest-pipeline": "^1.19.0",
|
|
87
|
+
"@azure/core-tracing": "^1.2.0",
|
|
88
|
+
"@azure/logger": "^1.1.4",
|
|
89
|
+
"tslib": "^2.8.1"
|
|
90
90
|
},
|
|
91
91
|
"devDependencies": {
|
|
92
92
|
"@azure-tools/test-credential": "^2.0.0",
|
|
93
|
-
"@azure-tools/test-recorder": "^4.
|
|
93
|
+
"@azure-tools/test-recorder": "^4.1.0",
|
|
94
94
|
"@azure-tools/test-utils-vitest": "^1.0.0",
|
|
95
95
|
"@azure-tools/vite-plugin-browser-test-map": "^1.0.0",
|
|
96
96
|
"@azure/dev-tool": "^1.0.0",
|
|
97
97
|
"@azure/eslint-plugin-azure-sdk": "^3.0.0",
|
|
98
|
-
"@azure/identity": "^4.
|
|
98
|
+
"@azure/identity": "^4.7.0",
|
|
99
99
|
"@types/node": "^18.0.0",
|
|
100
|
-
"@vitest/browser": "^3.0.
|
|
101
|
-
"@vitest/coverage-istanbul": "^3.0.
|
|
100
|
+
"@vitest/browser": "^3.0.9",
|
|
101
|
+
"@vitest/coverage-istanbul": "^3.0.9",
|
|
102
102
|
"dotenv": "^16.0.0",
|
|
103
103
|
"eslint": "^9.9.0",
|
|
104
|
-
"playwright": "^1.
|
|
105
|
-
"typescript": "~5.
|
|
106
|
-
"vitest": "^3.0.
|
|
104
|
+
"playwright": "^1.50.1",
|
|
105
|
+
"typescript": "~5.8.2",
|
|
106
|
+
"vitest": "^3.0.9"
|
|
107
107
|
},
|
|
108
108
|
"tshy": {
|
|
109
|
+
"project": "./tsconfig.src.json",
|
|
109
110
|
"exports": {
|
|
110
111
|
"./package.json": "./package.json",
|
|
111
112
|
".": "./src/index.ts"
|
|
@@ -118,8 +119,7 @@
|
|
|
118
119
|
"browser",
|
|
119
120
|
"react-native"
|
|
120
121
|
],
|
|
121
|
-
"selfLink": false
|
|
122
|
-
"project": "./tsconfig.src.json"
|
|
122
|
+
"selfLink": false
|
|
123
123
|
},
|
|
124
124
|
"exports": {
|
|
125
125
|
"./package.json": "./package.json",
|
|
@@ -143,5 +143,7 @@
|
|
|
143
143
|
}
|
|
144
144
|
},
|
|
145
145
|
"type": "module",
|
|
146
|
-
"module": "./dist/esm/index.js"
|
|
146
|
+
"module": "./dist/esm/index.js",
|
|
147
|
+
"browser": "./dist/browser/index.js",
|
|
148
|
+
"react-native": "./dist/react-native/index.js"
|
|
147
149
|
}
|