@azure/storage-queue 12.8.0-alpha.20211217.2 → 12.8.0-alpha.20220113.3

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.
Files changed (38) hide show
  1. package/CHANGELOG.md +2 -2
  2. package/README.md +4 -3
  3. package/dist/index.js +85 -74
  4. package/dist/index.js.map +1 -1
  5. package/dist-esm/src/AccountSASSignatureValues.js +2 -2
  6. package/dist-esm/src/AccountSASSignatureValues.js.map +1 -1
  7. package/dist-esm/src/Pipeline.js +6 -6
  8. package/dist-esm/src/Pipeline.js.map +1 -1
  9. package/dist-esm/src/QueueClient.js +38 -38
  10. package/dist-esm/src/QueueClient.js.map +1 -1
  11. package/dist-esm/src/QueueSASSignatureValues.js +1 -1
  12. package/dist-esm/src/QueueSASSignatureValues.js.map +1 -1
  13. package/dist-esm/src/QueueServiceClient.js +13 -13
  14. package/dist-esm/src/QueueServiceClient.js.map +1 -1
  15. package/dist-esm/src/SASQueryParameters.js +1 -1
  16. package/dist-esm/src/SASQueryParameters.js.map +1 -1
  17. package/dist-esm/src/TelemetryPolicyFactory.js +1 -1
  18. package/dist-esm/src/TelemetryPolicyFactory.js.map +1 -1
  19. package/dist-esm/src/credentials/StorageSharedKeyCredential.js +1 -3
  20. package/dist-esm/src/credentials/StorageSharedKeyCredential.js.map +1 -1
  21. package/dist-esm/src/generatedModels.js.map +1 -1
  22. package/dist-esm/src/policies/StorageBrowserPolicy.js +1 -1
  23. package/dist-esm/src/policies/StorageBrowserPolicy.js.map +1 -1
  24. package/dist-esm/src/policies/StorageRetryPolicy.js +5 -5
  25. package/dist-esm/src/policies/StorageRetryPolicy.js.map +1 -1
  26. package/dist-esm/src/policies/StorageSharedKeyCredentialPolicy.js +1 -1
  27. package/dist-esm/src/policies/StorageSharedKeyCredentialPolicy.js.map +1 -1
  28. package/dist-esm/src/policies/TelemetryPolicy.js +1 -1
  29. package/dist-esm/src/policies/TelemetryPolicy.js.map +1 -1
  30. package/dist-esm/src/utils/constants.js +6 -6
  31. package/dist-esm/src/utils/constants.js.map +1 -1
  32. package/dist-esm/src/utils/tracing.js +2 -2
  33. package/dist-esm/src/utils/tracing.js.map +1 -1
  34. package/dist-esm/src/utils/utils.common.js +1 -1
  35. package/dist-esm/src/utils/utils.common.js.map +1 -1
  36. package/package.json +31 -24
  37. package/{typings → types}/3.1/storage-queue.d.ts +8 -0
  38. /package/{typings → types}/latest/storage-queue.d.ts +0 -0
@@ -40,7 +40,7 @@ export function generateAccountSASQueryParameters(accountSASSignatureValues, sha
40
40
  accountSASSignatureValues.protocol ? accountSASSignatureValues.protocol : "",
41
41
  version,
42
42
  "",
43
- "" // Account SAS requires an additional newline character
43
+ "", // Account SAS requires an additional newline character
44
44
  ].join("\n");
45
45
  }
46
46
  else {
@@ -56,7 +56,7 @@ export function generateAccountSASQueryParameters(accountSASSignatureValues, sha
56
56
  accountSASSignatureValues.ipRange ? ipRangeToString(accountSASSignatureValues.ipRange) : "",
57
57
  accountSASSignatureValues.protocol ? accountSASSignatureValues.protocol : "",
58
58
  version,
59
- "" // Account SAS requires an additional newline character
59
+ "", // Account SAS requires an additional newline character
60
60
  ].join("\n");
61
61
  }
62
62
  const signature = sharedKeyCredential.computeHMACSHA256(stringToSign);
@@ -1 +1 @@
1
- {"version":3,"file":"AccountSASSignatureValues.js","sourceRoot":"","sources":["../../src/AccountSASSignatureValues.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,OAAO,EAAc,eAAe,EAAE,MAAM,cAAc,CAAC;AAC3D,OAAO,EAAe,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AACvE,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,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,mBAAmB,CAAC,WAAW;YAC/B,iBAAiB;YACjB,cAAc;YACd,mBAAmB;YACnB,yBAAyB,CAAC,QAAQ;gBAChC,CAAC,CAAC,oBAAoB,CAAC,yBAAyB,CAAC,QAAQ,EAAE,KAAK,CAAC;gBACjE,CAAC,CAAC,EAAE;YACN,oBAAoB,CAAC,yBAAyB,CAAC,SAAS,EAAE,KAAK,CAAC;YAChE,yBAAyB,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe,CAAC,yBAAyB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE;YAC3F,yBAAyB,CAAC,QAAQ,CAAC,CAAC,CAAC,yBAAyB,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE;YAC5E,OAAO;YACP,EAAE,CAAC,uDAAuD;SAC3D,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;KACd;IAED,MAAM,SAAS,GAAW,mBAAmB,CAAC,iBAAiB,CAAC,YAAY,CAAC,CAAC;IAE9E,OAAO,IAAI,kBAAkB,CAC3B,OAAO,EACP,SAAS,EACT,iBAAiB,EACjB,cAAc,EACd,mBAAmB,EACnB,yBAAyB,CAAC,QAAQ,EAClC,yBAAyB,CAAC,QAAQ,EAClC,yBAAyB,CAAC,SAAS,EACnC,yBAAyB,CAAC,OAAO,CAClC,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { AccountSASPermissions } from \"./AccountSASPermissions\";\nimport { AccountSASResourceTypes } from \"./AccountSASResourceTypes\";\nimport { AccountSASServices } from \"./AccountSASServices\";\nimport { StorageSharedKeyCredential } from \"./credentials/StorageSharedKeyCredential\";\nimport { SasIPRange, ipRangeToString } from \"./SasIPRange\";\nimport { SASProtocol, SASQueryParameters } from \"./SASQueryParameters\";\nimport { SERVICE_VERSION } from \"./utils/constants\";\nimport { truncatedISO8061Date } from \"./utils/utils.common\";\n\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * AccountSASSignatureValues is used to generate a Shared Access Signature (SAS) for an Azure Storage account. Once\n * all the values here are set appropriately, call generateSASQueryParameters() to obtain a representation of the SAS\n * which can actually be applied to queue urls. Note: that both this class and {@link SASQueryParameters} exist because\n * the former is mutable and a logical representation while the latter is immutable and used to generate actual REST\n * requests.\n *\n * @see https://docs.microsoft.com/en-us/azure/storage/common/storage-dotnet-shared-access-signature-part-1\n * for more conceptual information on SAS\n *\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-an-account-sas\n * for descriptions of the parameters, including which are required\n */\nexport interface AccountSASSignatureValues {\n /**\n * If not provided, this defaults to the service version targeted by this version of the library.\n */\n version?: string;\n\n /**\n * Optional. SAS protocols allowed.\n */\n protocol?: SASProtocol;\n\n /**\n * Optional. When the SAS will take effect.\n */\n startsOn?: Date;\n\n /**\n * The time after which the SAS will no longer work.\n */\n expiresOn: Date;\n\n /**\n * Specifies which operations the SAS user may perform. Please refer to {@link AccountSASPermissions} for help\n * constructing the permissions string.\n */\n permissions: AccountSASPermissions;\n\n /**\n * Optional. IP range allowed.\n */\n ipRange?: SasIPRange;\n\n /**\n * The values that indicate the services accessible with this SAS. Please refer to {@link AccountSASServices} to\n * construct this value.\n */\n services: string;\n\n /**\n * The values that indicate the resource types accessible with this SAS. Please refer\n * to {@link AccountSASResourceTypes} to construct this value.\n */\n resourceTypes: string;\n}\n\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * Generates a {@link SASQueryParameters} object which contains all SAS query parameters needed to make an actual\n * REST request.\n *\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-an-account-sas\n *\n * @param accountSASSignatureValues - SAS Signature values of the account\n * @param sharedKeyCredential - Shared key credential.\n */\nexport function generateAccountSASQueryParameters(\n accountSASSignatureValues: AccountSASSignatureValues,\n sharedKeyCredential: StorageSharedKeyCredential\n): SASQueryParameters {\n const version = accountSASSignatureValues.version\n ? accountSASSignatureValues.version\n : SERVICE_VERSION;\n\n const parsedPermissions = AccountSASPermissions.parse(\n accountSASSignatureValues.permissions.toString()\n ).toString();\n const parsedServices = AccountSASServices.parse(accountSASSignatureValues.services).toString();\n const parsedResourceTypes = AccountSASResourceTypes.parse(\n accountSASSignatureValues.resourceTypes\n ).toString();\n\n let stringToSign: string;\n\n if (version >= \"2020-12-06\") {\n stringToSign = [\n sharedKeyCredential.accountName,\n parsedPermissions,\n parsedServices,\n parsedResourceTypes,\n accountSASSignatureValues.startsOn\n ? truncatedISO8061Date(accountSASSignatureValues.startsOn, false)\n : \"\",\n truncatedISO8061Date(accountSASSignatureValues.expiresOn, false),\n accountSASSignatureValues.ipRange ? ipRangeToString(accountSASSignatureValues.ipRange) : \"\",\n accountSASSignatureValues.protocol ? accountSASSignatureValues.protocol : \"\",\n version,\n \"\", // Reserved for encryption scope\n \"\" // Account SAS requires an additional newline character\n ].join(\"\\n\");\n } else {\n stringToSign = [\n sharedKeyCredential.accountName,\n parsedPermissions,\n parsedServices,\n parsedResourceTypes,\n accountSASSignatureValues.startsOn\n ? truncatedISO8061Date(accountSASSignatureValues.startsOn, false)\n : \"\",\n truncatedISO8061Date(accountSASSignatureValues.expiresOn, false),\n accountSASSignatureValues.ipRange ? ipRangeToString(accountSASSignatureValues.ipRange) : \"\",\n accountSASSignatureValues.protocol ? accountSASSignatureValues.protocol : \"\",\n version,\n \"\" // Account SAS requires an additional newline character\n ].join(\"\\n\");\n }\n\n const signature: string = sharedKeyCredential.computeHMACSHA256(stringToSign);\n\n return new SASQueryParameters(\n version,\n signature,\n parsedPermissions,\n parsedServices,\n parsedResourceTypes,\n accountSASSignatureValues.protocol,\n accountSASSignatureValues.startsOn,\n accountSASSignatureValues.expiresOn,\n accountSASSignatureValues.ipRange\n );\n}\n"]}
1
+ {"version":3,"file":"AccountSASSignatureValues.js","sourceRoot":"","sources":["../../src/AccountSASSignatureValues.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,qBAAqB,EAAE,MAAM,y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eAAe,CAAC,yBAAyB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE;YAC3F,yBAAyB,CAAC,QAAQ,CAAC,CAAC,CAAC,yBAAyB,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE;YAC5E,OAAO;YACP,EAAE;YACF,EAAE,EAAE,uDAAuD;SAC5D,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;KACd;SAAM;QACL,YAAY,GAAG;YACb,mBAAmB,CAAC,WAAW;YAC/B,iBAAiB;YACjB,cAAc;YACd,mBAAmB;YACnB,yBAAyB,CAAC,QAAQ;gBAChC,CAAC,CAAC,oBAAoB,CAAC,yBAAyB,CAAC,QAAQ,EAAE,KAAK,CAAC;gBACjE,CAAC,CAAC,EAAE;YACN,oBAAoB,CAAC,yBAAyB,CAAC,SAAS,EAAE,KAAK,CAAC;YAChE,yBAAyB,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe,CAAC,yBAAyB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE;YAC3F,yBAAyB,CAAC,QAAQ,CAAC,CAAC,CAAC,yBAAyB,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE;YAC5E,OAAO;YACP,EAAE,EAAE,uDAAuD;SAC5D,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;KACd;IAED,MAAM,SAAS,GAAW,mBAAmB,CAAC,iBAAiB,CAAC,YAAY,CAAC,CAAC;IAE9E,OAAO,IAAI,kBAAkB,CAC3B,OAAO,EACP,SAAS,EACT,iBAAiB,EACjB,cAAc,EACd,mBAAmB,EACnB,yBAAyB,CAAC,QAAQ,EAClC,yBAAyB,CAAC,QAAQ,EAClC,yBAAyB,CAAC,SAAS,EACnC,yBAAyB,CAAC,OAAO,CAClC,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { AccountSASPermissions } from \"./AccountSASPermissions\";\nimport { AccountSASResourceTypes } from \"./AccountSASResourceTypes\";\nimport { AccountSASServices } from \"./AccountSASServices\";\nimport { StorageSharedKeyCredential } from \"./credentials/StorageSharedKeyCredential\";\nimport { SasIPRange, ipRangeToString } from \"./SasIPRange\";\nimport { SASProtocol, SASQueryParameters } from \"./SASQueryParameters\";\nimport { SERVICE_VERSION } from \"./utils/constants\";\nimport { truncatedISO8061Date } from \"./utils/utils.common\";\n\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * AccountSASSignatureValues is used to generate a Shared Access Signature (SAS) for an Azure Storage account. Once\n * all the values here are set appropriately, call generateSASQueryParameters() to obtain a representation of the SAS\n * which can actually be applied to queue urls. Note: that both this class and {@link SASQueryParameters} exist because\n * the former is mutable and a logical representation while the latter is immutable and used to generate actual REST\n * requests.\n *\n * @see https://docs.microsoft.com/en-us/azure/storage/common/storage-dotnet-shared-access-signature-part-1\n * for more conceptual information on SAS\n *\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-an-account-sas\n * for descriptions of the parameters, including which are required\n */\nexport interface AccountSASSignatureValues {\n /**\n * If not provided, this defaults to the service version targeted by this version of the library.\n */\n version?: string;\n\n /**\n * Optional. SAS protocols allowed.\n */\n protocol?: SASProtocol;\n\n /**\n * Optional. When the SAS will take effect.\n */\n startsOn?: Date;\n\n /**\n * The time after which the SAS will no longer work.\n */\n expiresOn: Date;\n\n /**\n * Specifies which operations the SAS user may perform. Please refer to {@link AccountSASPermissions} for help\n * constructing the permissions string.\n */\n permissions: AccountSASPermissions;\n\n /**\n * Optional. IP range allowed.\n */\n ipRange?: SasIPRange;\n\n /**\n * The values that indicate the services accessible with this SAS. Please refer to {@link AccountSASServices} to\n * construct this value.\n */\n services: string;\n\n /**\n * The values that indicate the resource types accessible with this SAS. Please refer\n * to {@link AccountSASResourceTypes} to construct this value.\n */\n resourceTypes: string;\n}\n\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * Generates a {@link SASQueryParameters} object which contains all SAS query parameters needed to make an actual\n * REST request.\n *\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-an-account-sas\n *\n * @param accountSASSignatureValues - SAS Signature values of the account\n * @param sharedKeyCredential - Shared key credential.\n */\nexport function generateAccountSASQueryParameters(\n accountSASSignatureValues: AccountSASSignatureValues,\n sharedKeyCredential: StorageSharedKeyCredential\n): SASQueryParameters {\n const version = accountSASSignatureValues.version\n ? accountSASSignatureValues.version\n : SERVICE_VERSION;\n\n const parsedPermissions = AccountSASPermissions.parse(\n accountSASSignatureValues.permissions.toString()\n ).toString();\n const parsedServices = AccountSASServices.parse(accountSASSignatureValues.services).toString();\n const parsedResourceTypes = AccountSASResourceTypes.parse(\n accountSASSignatureValues.resourceTypes\n ).toString();\n\n let stringToSign: string;\n\n if (version >= \"2020-12-06\") {\n stringToSign = [\n sharedKeyCredential.accountName,\n parsedPermissions,\n parsedServices,\n parsedResourceTypes,\n accountSASSignatureValues.startsOn\n ? truncatedISO8061Date(accountSASSignatureValues.startsOn, false)\n : \"\",\n truncatedISO8061Date(accountSASSignatureValues.expiresOn, false),\n accountSASSignatureValues.ipRange ? ipRangeToString(accountSASSignatureValues.ipRange) : \"\",\n accountSASSignatureValues.protocol ? accountSASSignatureValues.protocol : \"\",\n version,\n \"\", // Reserved for encryption scope\n \"\", // Account SAS requires an additional newline character\n ].join(\"\\n\");\n } else {\n stringToSign = [\n sharedKeyCredential.accountName,\n parsedPermissions,\n parsedServices,\n parsedResourceTypes,\n accountSASSignatureValues.startsOn\n ? truncatedISO8061Date(accountSASSignatureValues.startsOn, false)\n : \"\",\n truncatedISO8061Date(accountSASSignatureValues.expiresOn, false),\n accountSASSignatureValues.ipRange ? ipRangeToString(accountSASSignatureValues.ipRange) : \"\",\n accountSASSignatureValues.protocol ? accountSASSignatureValues.protocol : \"\",\n version,\n \"\", // Account SAS requires an additional newline character\n ].join(\"\\n\");\n }\n\n const signature: string = sharedKeyCredential.computeHMACSHA256(stringToSign);\n\n return new SASQueryParameters(\n version,\n signature,\n parsedPermissions,\n parsedServices,\n parsedResourceTypes,\n accountSASSignatureValues.protocol,\n accountSASSignatureValues.startsOn,\n accountSASSignatureValues.expiresOn,\n accountSASSignatureValues.ipRange\n );\n}\n"]}
@@ -1,16 +1,16 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
2
  // Licensed under the MIT license.
3
- import { BaseRequestPolicy, deserializationPolicy, HttpHeaders, RequestPolicyOptions, WebResource, proxyPolicy, isNode, isTokenCredential, bearerTokenAuthenticationPolicy, tracingPolicy, logPolicy, generateClientRequestIdPolicy, keepAlivePolicy } from "@azure/core-http";
3
+ import { BaseRequestPolicy, deserializationPolicy, HttpHeaders, RequestPolicyOptions, WebResource, proxyPolicy, isNode, isTokenCredential, bearerTokenAuthenticationPolicy, tracingPolicy, logPolicy, generateClientRequestIdPolicy, keepAlivePolicy, } from "@azure/core-http";
4
4
  import { logger } from "./log";
5
5
  import { StorageBrowserPolicyFactory } from "./StorageBrowserPolicyFactory";
6
6
  import { StorageRetryPolicyFactory } from "./StorageRetryPolicyFactory";
7
7
  import { TelemetryPolicyFactory } from "./TelemetryPolicyFactory";
8
8
  import { AnonymousCredential } from "./credentials/AnonymousCredential";
9
- import { StorageOAuthScopes, StorageQueueLoggingAllowedHeaderNames, StorageQueueLoggingAllowedQueryParameters } from "./utils/constants";
9
+ import { StorageOAuthScopes, StorageQueueLoggingAllowedHeaderNames, StorageQueueLoggingAllowedQueryParameters, } from "./utils/constants";
10
10
  import { getCachedDefaultHttpClient } from "./utils/cache";
11
11
  // Export following interfaces and types for customers who want to implement their
12
12
  // own RequestPolicy or HTTPClient
13
- export { BaseRequestPolicy, StorageOAuthScopes, deserializationPolicy, HttpHeaders, WebResource, RequestPolicyOptions };
13
+ export { BaseRequestPolicy, StorageOAuthScopes, deserializationPolicy, HttpHeaders, WebResource, RequestPolicyOptions, };
14
14
  /**
15
15
  * A Pipeline class containing HTTP request policies.
16
16
  * You can create a default Pipeline by calling newPipeline().
@@ -40,7 +40,7 @@ export class Pipeline {
40
40
  toServiceClientOptions() {
41
41
  return {
42
42
  httpClient: this.options.httpClient,
43
- requestPolicyFactories: this.factories
43
+ requestPolicyFactories: this.factories,
44
44
  };
45
45
  }
46
46
  }
@@ -70,8 +70,8 @@ export function newPipeline(credential, pipelineOptions = {}) {
70
70
  logPolicy({
71
71
  logger: logger.info,
72
72
  allowedHeaderNames: StorageQueueLoggingAllowedHeaderNames,
73
- allowedQueryParameters: StorageQueueLoggingAllowedQueryParameters
74
- })
73
+ allowedQueryParameters: StorageQueueLoggingAllowedQueryParameters,
74
+ }),
75
75
  ];
76
76
  if (isNode) {
77
77
  // ProxyPolicy is only available in Node.js runtime, not in browsers
@@ -1 +1 @@
1
- {"version":3,"file":"Pipeline.js","sourceRoot":"","sources":["../../src/Pipeline.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EACL,iBAAiB,EACjB,qBAAqB,EAErB,WAAW,EAKX,oBAAoB,EAEpB,WAAW,EACX,WAAW,EACX,MAAM,EAEN,iBAAiB,EACjB,+BAA+B,EAC/B,aAAa,EACb,SAAS,EAIT,6BAA6B,EAC7B,eAAe,EAChB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAC5E,OAAO,EAAuB,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AAC7F,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAElE,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,EACL,kBAAkB,EAClB,qCAAqC,EACrC,yCAAyC,EAC1C,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,0BAA0B,EAAE,MAAM,eAAe,CAAC;AAE3D,kFAAkF;AAClF,kCAAkC;AAClC,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,qBAAqB,EAErB,WAAW,EAGX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,WAAW,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC,CAAC;KAC3D;IACD,SAAS,CAAC,IAAI,CACZ,iBAAiB,CAAC,UAAU,CAAC;QAC3B,CAAC,CAAC,+BAA+B,CAAC,UAAU,EAAE,kBAAkB,CAAC;QACjE,CAAC,CAAC,UAAU,CACf,CAAC;IAEF,OAAO,IAAI,QAAQ,CAAC,SAAS,EAAE,eAAe,CAAC,CAAC;AAClD,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport {\n BaseRequestPolicy,\n deserializationPolicy,\n HttpClient as IHttpClient,\n HttpHeaders,\n HttpOperationResponse,\n HttpRequestBody,\n RequestPolicy,\n RequestPolicyFactory,\n RequestPolicyOptions,\n ServiceClientOptions,\n WebResource,\n proxyPolicy,\n isNode,\n TokenCredential,\n isTokenCredential,\n bearerTokenAuthenticationPolicy,\n tracingPolicy,\n logPolicy,\n ProxyOptions,\n KeepAliveOptions,\n UserAgentOptions,\n generateClientRequestIdPolicy,\n keepAlivePolicy\n} from \"@azure/core-http\";\n\nimport { logger } from \"./log\";\nimport { StorageBrowserPolicyFactory } from \"./StorageBrowserPolicyFactory\";\nimport { StorageRetryOptions, StorageRetryPolicyFactory } from \"./StorageRetryPolicyFactory\";\nimport { TelemetryPolicyFactory } from \"./TelemetryPolicyFactory\";\nimport { StorageSharedKeyCredential } from \"./credentials/StorageSharedKeyCredential\";\nimport { AnonymousCredential } from \"./credentials/AnonymousCredential\";\nimport {\n StorageOAuthScopes,\n StorageQueueLoggingAllowedHeaderNames,\n StorageQueueLoggingAllowedQueryParameters\n} from \"./utils/constants\";\nimport { getCachedDefaultHttpClient } from \"./utils/cache\";\n\n// Export following interfaces and types for customers who want to implement their\n// own RequestPolicy or HTTPClient\nexport {\n BaseRequestPolicy,\n StorageOAuthScopes,\n deserializationPolicy,\n IHttpClient,\n HttpHeaders,\n HttpOperationResponse,\n HttpRequestBody,\n WebResource,\n RequestPolicyFactory,\n RequestPolicy,\n RequestPolicyOptions\n};\n\n/**\n * Option interface for Pipeline constructor.\n */\nexport interface PipelineOptions {\n /**\n * Optional. Configures the HTTP client to send requests and receive responses.\n */\n httpClient?: IHttpClient;\n}\n\n/**\n * A Pipeline class containing HTTP request policies.\n * You can create a default Pipeline by calling newPipeline().\n * Or you can create a Pipeline with your own policies by the constructor of Pipeline.\n * Refer to newPipeline() and provided policies as reference before\n * implementing your customized Pipeline.\n */\nexport class Pipeline {\n /**\n * A list of chained request policy factories.\n */\n public readonly factories: RequestPolicyFactory[];\n /**\n * Configures pipeline logger and HTTP client.\n */\n public readonly options: PipelineOptions;\n\n /**\n * Creates an instance of Pipeline. Customize HTTPClient by implementing IHttpClient interface.\n *\n * @param factories -\n * @param options -\n */\n constructor(factories: RequestPolicyFactory[], options: PipelineOptions = {}) {\n this.factories = factories;\n // when options.httpClient is not specified, passing in a DefaultHttpClient instance to\n // avoid each client creating its own http client.\n this.options = {\n ...options,\n httpClient: options.httpClient || getCachedDefaultHttpClient()\n };\n }\n\n /**\n * Transfers Pipeline object to ServiceClientOptions object which required by\n * ServiceClient constructor.\n *\n * @returns The ServiceClientOptions object from this Pipeline.\n */\n public toServiceClientOptions(): ServiceClientOptions {\n return {\n httpClient: this.options.httpClient,\n requestPolicyFactories: this.factories\n };\n }\n}\n\n/**\n * Option interface for newPipeline() method.\n */\nexport interface StoragePipelineOptions {\n /**\n * Options to configure a proxy for outgoing requests.\n */\n proxyOptions?: ProxyOptions;\n /**\n * Options for adding user agent details to outgoing requests.\n */\n userAgentOptions?: UserAgentOptions;\n /**\n * Configures the built-in retry policy behavior.\n */\n retryOptions?: StorageRetryOptions;\n\n /**\n * Keep alive configurations. Default keep-alive is enabled.\n */\n keepAliveOptions?: KeepAliveOptions;\n /**\n * Configures the HTTP client to send requests and receive responses.\n */\n httpClient?: IHttpClient;\n}\n\n/**\n * Creates a new Pipeline object with Credential provided.\n *\n * @param credential - Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the `@azure/identity` package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used.\n * @param pipelineOptions - Options.\n * @returns A new Pipeline object.\n */\nexport function newPipeline(\n credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential,\n pipelineOptions: StoragePipelineOptions = {}\n): Pipeline {\n if (credential === undefined) {\n credential = new AnonymousCredential();\n }\n\n // Order is important. Closer to the API at the top & closer to the network at the bottom.\n // The credential's policy factory must appear close to the wire so it can sign any\n // changes made by other factories (like UniqueRequestIDPolicyFactory)\n const telemetryPolicy = new TelemetryPolicyFactory(pipelineOptions.userAgentOptions);\n const factories: RequestPolicyFactory[] = [\n tracingPolicy({ userAgent: telemetryPolicy.telemetryString }),\n keepAlivePolicy(pipelineOptions.keepAliveOptions),\n telemetryPolicy,\n generateClientRequestIdPolicy(),\n new StorageBrowserPolicyFactory(),\n new StorageRetryPolicyFactory(pipelineOptions.retryOptions), // Retry policy should be above any policy that throws retryable errors\n deserializationPolicy(), // Default deserializationPolicy is provided by protocol layer\n logPolicy({\n logger: logger.info,\n allowedHeaderNames: StorageQueueLoggingAllowedHeaderNames,\n allowedQueryParameters: StorageQueueLoggingAllowedQueryParameters\n })\n ];\n\n if (isNode) {\n // ProxyPolicy is only available in Node.js runtime, not in browsers\n factories.push(proxyPolicy(pipelineOptions.proxyOptions));\n }\n factories.push(\n isTokenCredential(credential)\n ? bearerTokenAuthenticationPolicy(credential, StorageOAuthScopes)\n : credential\n );\n\n return new Pipeline(factories, pipelineOptions);\n}\n"]}
1
+ {"version":3,"file":"Pipeline.js","sourceRoot":"","sources":["../../src/Pipeline.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EACL,iBAAiB,EACjB,qBAAqB,EAErB,WAAW,EAKX,oBAAoB,EAEpB,WAAW,EACX,WAAW,EACX,MAAM,EAEN,iBAAiB,EACjB,+BAA+B,EAC/B,aAAa,EACb,SAAS,EAIT,6BAA6B,EAC7B,eAA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e,GAAG,IAAI,sBAAsB,CAAC,eAAe,CAAC,gBAAgB,CAAC,CAAC;IACrF,MAAM,SAAS,GAA2B;QACxC,aAAa,CAAC,EAAE,SAAS,EAAE,eAAe,CAAC,eAAe,EAAE,CAAC;QAC7D,eAAe,CAAC,eAAe,CAAC,gBAAgB,CAAC;QACjD,eAAe;QACf,6BAA6B,EAAE;QAC/B,IAAI,2BAA2B,EAAE;QACjC,IAAI,yBAAyB,CAAC,eAAe,CAAC,YAAY,CAAC;QAC3D,qBAAqB,EAAE;QACvB,SAAS,CAAC;YACR,MAAM,EAAE,MAAM,CAAC,IAAI;YACnB,kBAAkB,EAAE,qCAAqC;YACzD,sBAAsB,EAAE,yCAAyC;SAClE,CAAC;KACH,CAAC;IAEF,IAAI,MAAM,EAAE;QACV,oEAAoE;QACpE,SAAS,CAAC,IAAI,CAAC,WAAW,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC,CAAC;KAC3D;IACD,SAAS,CAAC,IAAI,CACZ,iBAAiB,CAAC,UAAU,CAAC;QAC3B,CAAC,CAAC,+BAA+B,CAAC,UAAU,EAAE,kBAAkB,CAAC;QACjE,CAAC,CAAC,UAAU,CACf,CAAC;IAEF,OAAO,IAAI,QAAQ,CAAC,SAAS,EAAE,eAAe,CAAC,CAAC;AAClD,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport {\n BaseRequestPolicy,\n deserializationPolicy,\n HttpClient as IHttpClient,\n HttpHeaders,\n HttpOperationResponse,\n HttpRequestBody,\n RequestPolicy,\n RequestPolicyFactory,\n RequestPolicyOptions,\n ServiceClientOptions,\n WebResource,\n proxyPolicy,\n isNode,\n TokenCredential,\n isTokenCredential,\n bearerTokenAuthenticationPolicy,\n tracingPolicy,\n logPolicy,\n ProxyOptions,\n KeepAliveOptions,\n UserAgentOptions,\n generateClientRequestIdPolicy,\n keepAlivePolicy,\n} from \"@azure/core-http\";\n\nimport { logger } from \"./log\";\nimport { StorageBrowserPolicyFactory } from \"./StorageBrowserPolicyFactory\";\nimport { StorageRetryOptions, StorageRetryPolicyFactory } from \"./StorageRetryPolicyFactory\";\nimport { TelemetryPolicyFactory } from \"./TelemetryPolicyFactory\";\nimport { StorageSharedKeyCredential } from \"./credentials/StorageSharedKeyCredential\";\nimport { AnonymousCredential } from \"./credentials/AnonymousCredential\";\nimport {\n StorageOAuthScopes,\n StorageQueueLoggingAllowedHeaderNames,\n StorageQueueLoggingAllowedQueryParameters,\n} from \"./utils/constants\";\nimport { getCachedDefaultHttpClient } from \"./utils/cache\";\n\n// Export following interfaces and types for customers who want to implement their\n// own RequestPolicy or HTTPClient\nexport {\n BaseRequestPolicy,\n StorageOAuthScopes,\n deserializationPolicy,\n IHttpClient,\n HttpHeaders,\n HttpOperationResponse,\n HttpRequestBody,\n WebResource,\n RequestPolicyFactory,\n RequestPolicy,\n RequestPolicyOptions,\n};\n\n/**\n * Option interface for Pipeline constructor.\n */\nexport interface PipelineOptions {\n /**\n * Optional. Configures the HTTP client to send requests and receive responses.\n */\n httpClient?: IHttpClient;\n}\n\n/**\n * A Pipeline class containing HTTP request policies.\n * You can create a default Pipeline by calling newPipeline().\n * Or you can create a Pipeline with your own policies by the constructor of Pipeline.\n * Refer to newPipeline() and provided policies as reference before\n * implementing your customized Pipeline.\n */\nexport class Pipeline {\n /**\n * A list of chained request policy factories.\n */\n public readonly factories: RequestPolicyFactory[];\n /**\n * Configures pipeline logger and HTTP client.\n */\n public readonly options: PipelineOptions;\n\n /**\n * Creates an instance of Pipeline. Customize HTTPClient by implementing IHttpClient interface.\n *\n * @param factories -\n * @param options -\n */\n constructor(factories: RequestPolicyFactory[], options: PipelineOptions = {}) {\n this.factories = factories;\n // when options.httpClient is not specified, passing in a DefaultHttpClient instance to\n // avoid each client creating its own http client.\n this.options = {\n ...options,\n httpClient: options.httpClient || getCachedDefaultHttpClient(),\n };\n }\n\n /**\n * Transfers Pipeline object to ServiceClientOptions object which required by\n * ServiceClient constructor.\n *\n * @returns The ServiceClientOptions object from this Pipeline.\n */\n public toServiceClientOptions(): ServiceClientOptions {\n return {\n httpClient: this.options.httpClient,\n requestPolicyFactories: this.factories,\n };\n }\n}\n\n/**\n * Option interface for newPipeline() method.\n */\nexport interface StoragePipelineOptions {\n /**\n * Options to configure a proxy for outgoing requests.\n */\n proxyOptions?: ProxyOptions;\n /**\n * Options for adding user agent details to outgoing requests.\n */\n userAgentOptions?: UserAgentOptions;\n /**\n * Configures the built-in retry policy behavior.\n */\n retryOptions?: StorageRetryOptions;\n\n /**\n * Keep alive configurations. Default keep-alive is enabled.\n */\n keepAliveOptions?: KeepAliveOptions;\n /**\n * Configures the HTTP client to send requests and receive responses.\n */\n httpClient?: IHttpClient;\n}\n\n/**\n * Creates a new Pipeline object with Credential provided.\n *\n * @param credential - Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the `@azure/identity` package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used.\n * @param pipelineOptions - Options.\n * @returns A new Pipeline object.\n */\nexport function newPipeline(\n credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential,\n pipelineOptions: StoragePipelineOptions = {}\n): Pipeline {\n if (credential === undefined) {\n credential = new AnonymousCredential();\n }\n\n // Order is important. Closer to the API at the top & closer to the network at the bottom.\n // The credential's policy factory must appear close to the wire so it can sign any\n // changes made by other factories (like UniqueRequestIDPolicyFactory)\n const telemetryPolicy = new TelemetryPolicyFactory(pipelineOptions.userAgentOptions);\n const factories: RequestPolicyFactory[] = [\n tracingPolicy({ userAgent: telemetryPolicy.telemetryString }),\n keepAlivePolicy(pipelineOptions.keepAliveOptions),\n telemetryPolicy,\n generateClientRequestIdPolicy(),\n new StorageBrowserPolicyFactory(),\n new StorageRetryPolicyFactory(pipelineOptions.retryOptions), // Retry policy should be above any policy that throws retryable errors\n deserializationPolicy(), // Default deserializationPolicy is provided by protocol layer\n logPolicy({\n logger: logger.info,\n allowedHeaderNames: StorageQueueLoggingAllowedHeaderNames,\n allowedQueryParameters: StorageQueueLoggingAllowedQueryParameters,\n }),\n ];\n\n if (isNode) {\n // ProxyPolicy is only available in Node.js runtime, not in browsers\n factories.push(proxyPolicy(pipelineOptions.proxyOptions));\n }\n factories.push(\n isTokenCredential(credential)\n ? bearerTokenAuthenticationPolicy(credential, StorageOAuthScopes)\n : credential\n );\n\n return new Pipeline(factories, pipelineOptions);\n}\n"]}
@@ -1,11 +1,11 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
2
  // Licensed under the MIT license.
3
- import { isTokenCredential, isNode, getDefaultProxySettings, URLBuilder } from "@azure/core-http";
3
+ import { isTokenCredential, isNode, getDefaultProxySettings, URLBuilder, } from "@azure/core-http";
4
4
  import { SpanStatusCode } from "@azure/core-tracing";
5
5
  import { Messages, MessageId, Queue } from "./generated/src/operations";
6
6
  import { newPipeline, Pipeline } from "./Pipeline";
7
7
  import { StorageClient } from "./StorageClient";
8
- import { appendToURLPath, extractConnectionStringParts, isIpEndpointStyle, truncatedISO8061Date, getStorageClientContext, appendToURLQuery } from "./utils/utils.common";
8
+ import { appendToURLPath, extractConnectionStringParts, isIpEndpointStyle, truncatedISO8061Date, getStorageClientContext, appendToURLQuery, } from "./utils/utils.common";
9
9
  import { StorageSharedKeyCredential } from "./credentials/StorageSharedKeyCredential";
10
10
  import { AnonymousCredential } from "./credentials/AnonymousCredential";
11
11
  import { createSpan } from "./utils/tracing";
@@ -115,7 +115,7 @@ export class QueueClient extends StorageClient {
115
115
  catch (e) {
116
116
  span.setStatus({
117
117
  code: SpanStatusCode.ERROR,
118
- message: e.message
118
+ message: e.message,
119
119
  });
120
120
  throw e;
121
121
  }
@@ -147,13 +147,13 @@ export class QueueClient extends StorageClient {
147
147
  if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "QueueAlreadyExists") {
148
148
  span.setStatus({
149
149
  code: SpanStatusCode.ERROR,
150
- message: "Expected exception when creating a queue only if it does not already exist."
150
+ message: "Expected exception when creating a queue only if it does not already exist.",
151
151
  });
152
152
  return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response });
153
153
  }
154
154
  span.setStatus({
155
155
  code: SpanStatusCode.ERROR,
156
- message: e.message
156
+ message: e.message,
157
157
  });
158
158
  throw e;
159
159
  }
@@ -178,13 +178,13 @@ export class QueueClient extends StorageClient {
178
178
  if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "QueueNotFound") {
179
179
  span.setStatus({
180
180
  code: SpanStatusCode.ERROR,
181
- message: "Expected exception when deleting a queue only if it exists."
181
+ message: "Expected exception when deleting a queue only if it exists.",
182
182
  });
183
183
  return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response });
184
184
  }
185
185
  span.setStatus({
186
186
  code: SpanStatusCode.ERROR,
187
- message: e.message
187
+ message: e.message,
188
188
  });
189
189
  throw e;
190
190
  }
@@ -213,13 +213,13 @@ export class QueueClient extends StorageClient {
213
213
  try {
214
214
  return await this.queueContext.delete({
215
215
  abortSignal: options.abortSignal,
216
- tracingOptions: updatedOptions.tracingOptions
216
+ tracingOptions: updatedOptions.tracingOptions,
217
217
  });
218
218
  }
219
219
  catch (e) {
220
220
  span.setStatus({
221
221
  code: SpanStatusCode.ERROR,
222
- message: e.message
222
+ message: e.message,
223
223
  });
224
224
  throw e;
225
225
  }
@@ -241,7 +241,7 @@ export class QueueClient extends StorageClient {
241
241
  try {
242
242
  await this.getProperties({
243
243
  abortSignal: options.abortSignal,
244
- tracingOptions: updatedOptions.tracingOptions
244
+ tracingOptions: updatedOptions.tracingOptions,
245
245
  });
246
246
  return true;
247
247
  }
@@ -249,13 +249,13 @@ export class QueueClient extends StorageClient {
249
249
  if (e.statusCode === 404) {
250
250
  span.setStatus({
251
251
  code: SpanStatusCode.ERROR,
252
- message: "Expected exception when checking queue existence"
252
+ message: "Expected exception when checking queue existence",
253
253
  });
254
254
  return false;
255
255
  }
256
256
  span.setStatus({
257
257
  code: SpanStatusCode.ERROR,
258
- message: e.message
258
+ message: e.message,
259
259
  });
260
260
  throw e;
261
261
  }
@@ -281,13 +281,13 @@ export class QueueClient extends StorageClient {
281
281
  try {
282
282
  return await this.queueContext.getProperties({
283
283
  abortSignal: options.abortSignal,
284
- tracingOptions: updatedOptions.tracingOptions
284
+ tracingOptions: updatedOptions.tracingOptions,
285
285
  });
286
286
  }
287
287
  catch (e) {
288
288
  span.setStatus({
289
289
  code: SpanStatusCode.ERROR,
290
- message: e.message
290
+ message: e.message,
291
291
  });
292
292
  throw e;
293
293
  }
@@ -312,13 +312,13 @@ export class QueueClient extends StorageClient {
312
312
  return await this.queueContext.setMetadata({
313
313
  abortSignal: options.abortSignal,
314
314
  metadata,
315
- tracingOptions: updatedOptions.tracingOptions
315
+ tracingOptions: updatedOptions.tracingOptions,
316
316
  });
317
317
  }
318
318
  catch (e) {
319
319
  span.setStatus({
320
320
  code: SpanStatusCode.ERROR,
321
- message: e.message
321
+ message: e.message,
322
322
  });
323
323
  throw e;
324
324
  }
@@ -342,7 +342,7 @@ export class QueueClient extends StorageClient {
342
342
  try {
343
343
  const response = await this.queueContext.getAccessPolicy({
344
344
  abortSignal: options.abortSignal,
345
- tracingOptions: updatedOptions.tracingOptions
345
+ tracingOptions: updatedOptions.tracingOptions,
346
346
  });
347
347
  const res = {
348
348
  _response: response._response,
@@ -351,13 +351,13 @@ export class QueueClient extends StorageClient {
351
351
  clientRequestId: response.clientRequestId,
352
352
  signedIdentifiers: [],
353
353
  version: response.version,
354
- errorCode: response.errorCode
354
+ errorCode: response.errorCode,
355
355
  };
356
356
  for (const identifier of response) {
357
357
  let accessPolicy = undefined;
358
358
  if (identifier.accessPolicy) {
359
359
  accessPolicy = {
360
- permissions: identifier.accessPolicy.permissions
360
+ permissions: identifier.accessPolicy.permissions,
361
361
  };
362
362
  if (identifier.accessPolicy.expiresOn) {
363
363
  accessPolicy.expiresOn = new Date(identifier.accessPolicy.expiresOn);
@@ -368,7 +368,7 @@ export class QueueClient extends StorageClient {
368
368
  }
369
369
  res.signedIdentifiers.push({
370
370
  accessPolicy,
371
- id: identifier.id
371
+ id: identifier.id,
372
372
  });
373
373
  }
374
374
  return res;
@@ -376,7 +376,7 @@ export class QueueClient extends StorageClient {
376
376
  catch (e) {
377
377
  span.setStatus({
378
378
  code: SpanStatusCode.ERROR,
379
- message: e.message
379
+ message: e.message,
380
380
  });
381
381
  throw e;
382
382
  }
@@ -405,21 +405,21 @@ export class QueueClient extends StorageClient {
405
405
  permissions: identifier.accessPolicy.permissions,
406
406
  startsOn: identifier.accessPolicy.startsOn
407
407
  ? truncatedISO8061Date(identifier.accessPolicy.startsOn)
408
- : undefined
408
+ : undefined,
409
409
  },
410
- id: identifier.id
410
+ id: identifier.id,
411
411
  });
412
412
  }
413
413
  return await this.queueContext.setAccessPolicy({
414
414
  abortSignal: options.abortSignal,
415
415
  queueAcl: acl,
416
- tracingOptions: updatedOptions.tracingOptions
416
+ tracingOptions: updatedOptions.tracingOptions,
417
417
  });
418
418
  }
419
419
  catch (e) {
420
420
  span.setStatus({
421
421
  code: SpanStatusCode.ERROR,
422
- message: e.message
422
+ message: e.message,
423
423
  });
424
424
  throw e;
425
425
  }
@@ -439,13 +439,13 @@ export class QueueClient extends StorageClient {
439
439
  try {
440
440
  return await this.messagesContext.clear({
441
441
  abortSignal: options.abortSignal,
442
- tracingOptions: updatedOptions.tracingOptions
442
+ tracingOptions: updatedOptions.tracingOptions,
443
443
  });
444
444
  }
445
445
  catch (e) {
446
446
  span.setStatus({
447
447
  code: SpanStatusCode.ERROR,
448
- message: e.message
448
+ message: e.message,
449
449
  });
450
450
  throw e;
451
451
  }
@@ -478,7 +478,7 @@ export class QueueClient extends StorageClient {
478
478
  const { span, updatedOptions } = createSpan("QueueClient-sendMessage", options);
479
479
  try {
480
480
  const response = await this.messagesContext.enqueue({
481
- messageText: messageText
481
+ messageText: messageText,
482
482
  }, updatedOptions);
483
483
  const item = response[0];
484
484
  return {
@@ -492,13 +492,13 @@ export class QueueClient extends StorageClient {
492
492
  popReceipt: item.popReceipt,
493
493
  nextVisibleOn: item.nextVisibleOn,
494
494
  insertedOn: item.insertedOn,
495
- expiresOn: item.expiresOn
495
+ expiresOn: item.expiresOn,
496
496
  };
497
497
  }
498
498
  catch (e) {
499
499
  span.setStatus({
500
500
  code: SpanStatusCode.ERROR,
501
- message: e.message
501
+ message: e.message,
502
502
  });
503
503
  throw e;
504
504
  }
@@ -542,7 +542,7 @@ export class QueueClient extends StorageClient {
542
542
  clientRequestId: response.clientRequestId,
543
543
  receivedMessageItems: [],
544
544
  version: response.version,
545
- errorCode: response.errorCode
545
+ errorCode: response.errorCode,
546
546
  };
547
547
  for (const item of response) {
548
548
  res.receivedMessageItems.push(item);
@@ -552,7 +552,7 @@ export class QueueClient extends StorageClient {
552
552
  catch (e) {
553
553
  span.setStatus({
554
554
  code: SpanStatusCode.ERROR,
555
- message: e.message
555
+ message: e.message,
556
556
  });
557
557
  throw e;
558
558
  }
@@ -585,7 +585,7 @@ export class QueueClient extends StorageClient {
585
585
  clientRequestId: response.clientRequestId,
586
586
  peekedMessageItems: [],
587
587
  version: response.version,
588
- errorCode: response.errorCode
588
+ errorCode: response.errorCode,
589
589
  };
590
590
  for (const item of response) {
591
591
  res.peekedMessageItems.push(item);
@@ -595,7 +595,7 @@ export class QueueClient extends StorageClient {
595
595
  catch (e) {
596
596
  span.setStatus({
597
597
  code: SpanStatusCode.ERROR,
598
- message: e.message
598
+ message: e.message,
599
599
  });
600
600
  throw e;
601
601
  }
@@ -617,13 +617,13 @@ export class QueueClient extends StorageClient {
617
617
  try {
618
618
  return await this.getMessageIdContext(messageId).delete(popReceipt, {
619
619
  abortSignal: options.abortSignal,
620
- tracingOptions: updatedOptions.tracingOptions
620
+ tracingOptions: updatedOptions.tracingOptions,
621
621
  });
622
622
  }
623
623
  catch (e) {
624
624
  span.setStatus({
625
625
  code: SpanStatusCode.ERROR,
626
- message: e.message
626
+ message: e.message,
627
627
  });
628
628
  throw e;
629
629
  }
@@ -658,13 +658,13 @@ export class QueueClient extends StorageClient {
658
658
  return await this.getMessageIdContext(messageId).update(popReceipt, visibilityTimeout || 0, {
659
659
  abortSignal: options.abortSignal,
660
660
  tracingOptions: updatedOptions.tracingOptions,
661
- queueMessage
661
+ queueMessage,
662
662
  });
663
663
  }
664
664
  catch (e) {
665
665
  span.setStatus({
666
666
  code: SpanStatusCode.ERROR,
667
- message: e.message
667
+ message: e.message,
668
668
  });
669
669
  throw e;
670
670
  }