mirror of
https://github.com/actions/cache.git
synced 2026-08-26 12:54:19 +00:00
Compare commits
4
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
47ad7e4077 | ||
|
|
64d30fb518 | ||
|
|
1a2d984507 | ||
|
|
7ca5bf5d35 |
@@ -1,16 +0,0 @@
|
|||||||
# Set to true to add reviewers to pull requests
|
|
||||||
addReviewers: true
|
|
||||||
|
|
||||||
# Set to true to add assignees to pull requests
|
|
||||||
addAssignees: false
|
|
||||||
|
|
||||||
# A list of reviewers to be added to pull requests (GitHub user name)
|
|
||||||
reviewers:
|
|
||||||
- phantsure
|
|
||||||
- aparna-ravindra
|
|
||||||
- tiwarishub
|
|
||||||
- vsvipul
|
|
||||||
|
|
||||||
# A number of reviewers added to the pull request
|
|
||||||
# Set 0 to add all the reviewers (default: 0)
|
|
||||||
numberOfReviewers: 1
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
name: 'Auto Assign'
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
types: [opened, ready_for_review]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
add-reviews:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: kentaro-m/auto-assign-action@v1.2.1
|
|
||||||
@@ -22,13 +22,16 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v2
|
||||||
- name: Setup Node.js 16.x
|
|
||||||
uses: actions/setup-node@v3
|
- name: Set Node.js 12.x
|
||||||
|
uses: actions/setup-node@v1
|
||||||
with:
|
with:
|
||||||
node-version: 16.x
|
node-version: 12.x
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: npm ci
|
run: npm ci
|
||||||
|
|
||||||
- name: Rebuild the dist/ directory
|
- name: Rebuild the dist/ directory
|
||||||
run: npm run build
|
run: npm run build
|
||||||
|
|
||||||
@@ -42,7 +45,7 @@ jobs:
|
|||||||
id: diff
|
id: diff
|
||||||
|
|
||||||
# If index.js was different than expected, upload the expected version as an artifact
|
# If index.js was different than expected, upload the expected version as an artifact
|
||||||
- uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v2
|
||||||
if: ${{ failure() && steps.diff.conclusion == 'failure' }}
|
if: ${{ failure() && steps.diff.conclusion == 'failure' }}
|
||||||
with:
|
with:
|
||||||
name: dist
|
name: dist
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
# We must fetch at least the immediate parents so that if this is
|
# We must fetch at least the immediate parents so that if this is
|
||||||
# a pull request then we can checkout the head.
|
# a pull request then we can checkout the head.
|
||||||
@@ -24,7 +24,7 @@ jobs:
|
|||||||
# the head of the pull request instead of the merge commit.
|
# the head of the pull request instead of the merge commit.
|
||||||
- run: git checkout HEAD^2
|
- run: git checkout HEAD^2
|
||||||
if: ${{ github.event_name == 'pull_request' }}
|
if: ${{ github.event_name == 'pull_request' }}
|
||||||
|
|
||||||
# Initializes the CodeQL tools for scanning.
|
# Initializes the CodeQL tools for scanning.
|
||||||
- name: Initialize CodeQL
|
- name: Initialize CodeQL
|
||||||
uses: github/codeql-action/init@v1
|
uses: github/codeql-action/init@v1
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
name: Check licenses
|
name: Check licenses
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v2
|
||||||
- run: npm ci
|
- run: npm ci
|
||||||
- name: Install licensed
|
- name: Install licensed
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
@@ -24,17 +24,17 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v2
|
||||||
- name: Setup Node.js 16.x
|
- name: Setup Node.js
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v1
|
||||||
with:
|
with:
|
||||||
node-version: 16.x
|
node-version: '12.x'
|
||||||
- name: Determine npm cache directory
|
- name: Determine npm cache directory
|
||||||
id: npm-cache
|
id: npm-cache
|
||||||
run: |
|
run: |
|
||||||
echo "::set-output name=dir::$(npm config get cache)"
|
echo "::set-output name=dir::$(npm config get cache)"
|
||||||
- name: Restore npm cache
|
- name: Restore npm cache
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: ${{ steps.npm-cache.outputs.dir }}
|
path: ${{ steps.npm-cache.outputs.dir }}
|
||||||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
||||||
@@ -57,7 +57,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v2
|
||||||
- name: Generate files in working directory
|
- name: Generate files in working directory
|
||||||
shell: bash
|
shell: bash
|
||||||
run: __tests__/create-cache-files.sh ${{ runner.os }} test-cache
|
run: __tests__/create-cache-files.sh ${{ runner.os }} test-cache
|
||||||
@@ -80,7 +80,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v2
|
||||||
- name: Restore cache
|
- name: Restore cache
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
@@ -110,7 +110,7 @@ jobs:
|
|||||||
https_proxy: http://squid-proxy:3128
|
https_proxy: http://squid-proxy:3128
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v2
|
||||||
- name: Generate files
|
- name: Generate files
|
||||||
run: __tests__/create-cache-files.sh proxy test-cache
|
run: __tests__/create-cache-files.sh proxy test-cache
|
||||||
- name: Save cache
|
- name: Save cache
|
||||||
@@ -133,7 +133,7 @@ jobs:
|
|||||||
https_proxy: http://squid-proxy:3128
|
https_proxy: http://squid-proxy:3128
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v2
|
||||||
- name: Restore cache
|
- name: Restore cache
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
|
|||||||
Generated
+3
-3
@@ -1,9 +1,9 @@
|
|||||||
---
|
---
|
||||||
name: "@actions/cache"
|
name: "@actions/cache"
|
||||||
version: 2.0.2
|
version: 1.0.9
|
||||||
type: npm
|
type: npm
|
||||||
summary:
|
summary: Actions cache lib
|
||||||
homepage:
|
homepage: https://github.com/actions/toolkit/tree/main/packages/cache
|
||||||
license: mit
|
license: mit
|
||||||
licenses:
|
licenses:
|
||||||
- sources: LICENSE.md
|
- sources: LICENSE.md
|
||||||
|
|||||||
Generated
+3
-3
@@ -1,9 +1,9 @@
|
|||||||
---
|
---
|
||||||
name: "@actions/exec"
|
name: "@actions/exec"
|
||||||
version: 1.1.1
|
version: 1.1.0
|
||||||
type: npm
|
type: npm
|
||||||
summary:
|
summary: Actions exec lib
|
||||||
homepage:
|
homepage: https://github.com/actions/toolkit/tree/main/packages/exec
|
||||||
license: mit
|
license: mit
|
||||||
licenses:
|
licenses:
|
||||||
- sources: LICENSE.md
|
- sources: LICENSE.md
|
||||||
|
|||||||
Generated
+3
-3
@@ -1,9 +1,9 @@
|
|||||||
---
|
---
|
||||||
name: "@actions/io"
|
name: "@actions/io"
|
||||||
version: 1.1.2
|
version: 1.1.1
|
||||||
type: npm
|
type: npm
|
||||||
summary:
|
summary: Actions io lib
|
||||||
homepage:
|
homepage: https://github.com/actions/toolkit/tree/main/packages/io
|
||||||
license: mit
|
license: mit
|
||||||
licenses:
|
licenses:
|
||||||
- sources: LICENSE.md
|
- sources: LICENSE.md
|
||||||
|
|||||||
+3
-3
@@ -1,9 +1,9 @@
|
|||||||
---
|
---
|
||||||
name: "@azure/core-asynciterator-polyfill"
|
name: "@azure/core-asynciterator-polyfill"
|
||||||
version: 1.0.2
|
version: 1.0.0
|
||||||
type: npm
|
type: npm
|
||||||
summary:
|
summary: Polyfill for IE/Node 8 for Symbol.asyncIterator
|
||||||
homepage:
|
homepage: https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/core/core-asynciterator-polyfill
|
||||||
license: mit
|
license: mit
|
||||||
licenses:
|
licenses:
|
||||||
- sources: LICENSE
|
- sources: LICENSE
|
||||||
|
|||||||
Generated
+4
-3
@@ -1,9 +1,10 @@
|
|||||||
---
|
---
|
||||||
name: "@azure/core-lro"
|
name: "@azure/core-lro"
|
||||||
version: 2.2.4
|
version: 2.2.3
|
||||||
type: npm
|
type: npm
|
||||||
summary:
|
summary: Isomorphic client library for supporting long-running operations in node.js
|
||||||
homepage:
|
and browser.
|
||||||
|
homepage: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/core/core-lro/README.md
|
||||||
license: mit
|
license: mit
|
||||||
licenses:
|
licenses:
|
||||||
- sources: LICENSE
|
- sources: LICENSE
|
||||||
|
|||||||
Generated
+4
-3
@@ -1,9 +1,10 @@
|
|||||||
---
|
---
|
||||||
name: "@azure/ms-rest-js"
|
name: "@azure/ms-rest-js"
|
||||||
version: 2.6.1
|
version: 2.6.0
|
||||||
type: npm
|
type: npm
|
||||||
summary:
|
summary: Isomorphic client Runtime for Typescript/node.js/browser javascript client
|
||||||
homepage:
|
libraries generated using AutoRest
|
||||||
|
homepage: https://github.com/Azure/ms-rest-js
|
||||||
license: mit
|
license: mit
|
||||||
licenses:
|
licenses:
|
||||||
- sources: LICENSE
|
- sources: LICENSE
|
||||||
|
|||||||
+3
-3
@@ -1,9 +1,9 @@
|
|||||||
---
|
---
|
||||||
name: "@azure/storage-blob"
|
name: "@azure/storage-blob"
|
||||||
version: 12.9.0
|
version: 12.8.0
|
||||||
type: npm
|
type: npm
|
||||||
summary:
|
summary: Microsoft Azure Storage SDK for JavaScript - Blob
|
||||||
homepage:
|
homepage: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/storage/storage-blob/
|
||||||
license: mit
|
license: mit
|
||||||
licenses:
|
licenses:
|
||||||
- sources: LICENSE
|
- sources: LICENSE
|
||||||
|
|||||||
Generated
+3
-3
@@ -1,9 +1,9 @@
|
|||||||
---
|
---
|
||||||
name: "@types/node-fetch"
|
name: "@types/node-fetch"
|
||||||
version: 2.6.1
|
version: 2.5.12
|
||||||
type: npm
|
type: npm
|
||||||
summary:
|
summary: TypeScript definitions for node-fetch
|
||||||
homepage:
|
homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node-fetch
|
||||||
license: mit
|
license: mit
|
||||||
licenses:
|
licenses:
|
||||||
- sources: LICENSE
|
- sources: LICENSE
|
||||||
|
|||||||
Generated
+3
-3
@@ -1,9 +1,9 @@
|
|||||||
---
|
---
|
||||||
name: "@types/node"
|
name: "@types/node"
|
||||||
version: 16.11.26
|
version: 12.20.42
|
||||||
type: npm
|
type: npm
|
||||||
summary:
|
summary: TypeScript definitions for Node.js
|
||||||
homepage:
|
homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node
|
||||||
license: mit
|
license: mit
|
||||||
licenses:
|
licenses:
|
||||||
- sources: LICENSE
|
- sources: LICENSE
|
||||||
|
|||||||
@@ -1,27 +1,20 @@
|
|||||||
# cache
|
# cache
|
||||||
|
|
||||||
Test for autoassign.
|
|
||||||
This action allows caching dependencies and build outputs to improve workflow execution time.
|
This action allows caching dependencies and build outputs to improve workflow execution time.
|
||||||
|
|
||||||
[](https://github.com/actions/cache/actions/workflows/workflow.yml)
|
<a href="https://github.com/actions/cache/actions?query=workflow%3ATests"><img alt="GitHub Actions status" src="https://github.com/actions/cache/workflows/Tests/badge.svg?branch=main&event=push"></a>
|
||||||
|
|
||||||
## Documentation
|
## Documentation
|
||||||
|
|
||||||
See ["Caching dependencies to speed up workflows"](https://help.github.com/github/automating-your-workflow-with-github-actions/caching-dependencies-to-speed-up-workflows).
|
See ["Caching dependencies to speed up workflows"](https://help.github.com/github/automating-your-workflow-with-github-actions/caching-dependencies-to-speed-up-workflows).
|
||||||
|
|
||||||
## What's New
|
## What's New
|
||||||
### v3
|
|
||||||
* Added support for caching from GHES 3.5.
|
|
||||||
* Fixed download issue for files > 2GB during restore.
|
|
||||||
* Updated the minimum runner version support from node 12 -> node 16.
|
|
||||||
|
|
||||||
### v2
|
* Added support for multiple paths, [glob patterns](https://github.com/actions/toolkit/tree/main/packages/glob), and single file caches.
|
||||||
* Increased the cache size limit to 10 GB.
|
|
||||||
* Added support for multiple paths, [glob patterns](https://github.com/actions/toolkit/tree/main/packages/glob), and single file caches.
|
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- name: Cache multiple paths
|
- name: Cache multiple paths
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
~/cache
|
~/cache
|
||||||
@@ -45,7 +38,7 @@ If you are using this inside a container, a POSIX-compliant `tar` needs to be in
|
|||||||
|
|
||||||
### Inputs
|
### Inputs
|
||||||
|
|
||||||
* `path` - A list of files, directories, and wildcard patterns to cache and restore. See [`@actions/glob`](https://github.com/actions/toolkit/tree/main/packages/glob) for supported patterns.
|
* `path` - A list of files, directories, and wildcard patterns to cache and restore. See [`@actions/glob`](https://github.com/actions/toolkit/tree/main/packages/glob) for supported patterns.
|
||||||
* `key` - An explicit key for restoring and saving the cache
|
* `key` - An explicit key for restoring and saving the cache
|
||||||
* `restore-keys` - An ordered list of keys to use for restoring the cache if no cache hit occurred for key
|
* `restore-keys` - An ordered list of keys to use for restoring the cache if no cache hit occurred for key
|
||||||
|
|
||||||
@@ -56,7 +49,7 @@ If you are using this inside a container, a POSIX-compliant `tar` needs to be in
|
|||||||
> See [Skipping steps based on cache-hit](#Skipping-steps-based-on-cache-hit) for info on using this output
|
> See [Skipping steps based on cache-hit](#Skipping-steps-based-on-cache-hit) for info on using this output
|
||||||
|
|
||||||
### Cache scopes
|
### Cache scopes
|
||||||
The cache is scoped to the key and branch. The default branch cache is available to other branches.
|
The cache is scoped to the key and branch. The default branch cache is available to other branches.
|
||||||
|
|
||||||
See [Matching a cache key](https://help.github.com/en/actions/configuring-and-managing-workflows/caching-dependencies-to-speed-up-workflows#matching-a-cache-key) for more info.
|
See [Matching a cache key](https://help.github.com/en/actions/configuring-and-managing-workflows/caching-dependencies-to-speed-up-workflows#matching-a-cache-key) for more info.
|
||||||
|
|
||||||
@@ -72,11 +65,11 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Cache Primes
|
- name: Cache Primes
|
||||||
id: cache-primes
|
id: cache-primes
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: prime-numbers
|
path: prime-numbers
|
||||||
key: ${{ runner.os }}-primes
|
key: ${{ runner.os }}-primes
|
||||||
@@ -95,13 +88,11 @@ Every programming language and framework has its own way of caching.
|
|||||||
|
|
||||||
See [Examples](examples.md) for a list of `actions/cache` implementations for use with:
|
See [Examples](examples.md) for a list of `actions/cache` implementations for use with:
|
||||||
|
|
||||||
- [C# - NuGet](./examples.md#c---nuget)
|
- [C# - Nuget](./examples.md#c---nuget)
|
||||||
- [D - DUB](./examples.md#d---dub)
|
- [D - DUB](./examples.md#d---dub)
|
||||||
- [Deno](./examples.md#deno)
|
|
||||||
- [Elixir - Mix](./examples.md#elixir---mix)
|
- [Elixir - Mix](./examples.md#elixir---mix)
|
||||||
- [Go - Modules](./examples.md#go---modules)
|
- [Go - Modules](./examples.md#go---modules)
|
||||||
- [Haskell - Cabal](./examples.md#haskell---cabal)
|
- [Haskell - Cabal](./examples.md#haskell---cabal)
|
||||||
- [Haskell - Stack](./examples.md#haskell---stack)
|
|
||||||
- [Java - Gradle](./examples.md#java---gradle)
|
- [Java - Gradle](./examples.md#java---gradle)
|
||||||
- [Java - Maven](./examples.md#java---maven)
|
- [Java - Maven](./examples.md#java---maven)
|
||||||
- [Node - npm](./examples.md#node---npm)
|
- [Node - npm](./examples.md#node---npm)
|
||||||
@@ -126,11 +117,11 @@ A cache key can include any of the contexts, functions, literals, and operators
|
|||||||
For example, using the [`hashFiles`](https://help.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions#hashfiles) function allows you to create a new cache when dependencies change.
|
For example, using the [`hashFiles`](https://help.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions#hashfiles) function allows you to create a new cache when dependencies change.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- uses: actions/cache@v3
|
- uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
path/to/dependencies
|
path/to/dependencies
|
||||||
some/other/dependencies
|
some/other/dependencies
|
||||||
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
|
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -144,7 +135,7 @@ Additionally, you can use arbitrary command output in a cache key, such as a dat
|
|||||||
echo "::set-output name=date::$(/bin/date -u "+%Y%m%d")"
|
echo "::set-output name=date::$(/bin/date -u "+%Y%m%d")"
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
- uses: actions/cache@v3
|
- uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: path/to/dependencies
|
path: path/to/dependencies
|
||||||
key: ${{ runner.os }}-${{ steps.get-date.outputs.date }}-${{ hashFiles('**/lockfiles') }}
|
key: ${{ runner.os }}-${{ steps.get-date.outputs.date }}-${{ hashFiles('**/lockfiles') }}
|
||||||
@@ -163,9 +154,9 @@ Using the `cache-hit` output, subsequent steps (such as install or build) can be
|
|||||||
Example:
|
Example:
|
||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
- uses: actions/cache@v3
|
- uses: actions/cache@v2
|
||||||
id: cache
|
id: cache
|
||||||
with:
|
with:
|
||||||
path: path/to/dependencies
|
path: path/to/dependencies
|
||||||
@@ -178,6 +169,12 @@ steps:
|
|||||||
|
|
||||||
> Note: The `id` defined in `actions/cache` must match the `id` in the `if` statement (i.e. `steps.[ID].outputs.cache-hit`)
|
> Note: The `id` defined in `actions/cache` must match the `id` in the `if` statement (i.e. `steps.[ID].outputs.cache-hit`)
|
||||||
|
|
||||||
|
## Known limitation
|
||||||
|
|
||||||
|
- `action/cache` is currently not supported on GitHub Enterprise Server. <https://github.com/github/roadmap/issues/273> is tracking this.
|
||||||
|
|
||||||
|
Since GitHub Enterprise Server uses self-hosted runners, dependencies are typically cached on the runner by whatever dependency management tool is being used (npm, maven, etc.). This eliminates the need for explicit caching in some scenarios.
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
We would love for you to contribute to `actions/cache`, pull requests are welcome! Please see the [CONTRIBUTING.md](CONTRIBUTING.md) for more information.
|
We would love for you to contribute to `actions/cache`, pull requests are welcome! Please see the [CONTRIBUTING.md](CONTRIBUTING.md) for more information.
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +0,0 @@
|
|||||||
# Releases
|
|
||||||
|
|
||||||
### 3.0.0
|
|
||||||
- Updated minimum runner version support from node 12 -> node 16
|
|
||||||
|
|
||||||
### 3.0.1
|
|
||||||
- Added support for caching from GHES 3.5.
|
|
||||||
- Fixed download issue for files > 2GB during restore.
|
|
||||||
@@ -1,4 +1,3 @@
|
|||||||
import * as cache from "@actions/cache";
|
|
||||||
import * as core from "@actions/core";
|
import * as core from "@actions/core";
|
||||||
|
|
||||||
import { Events, Outputs, RefKey, State } from "../src/constants";
|
import { Events, Outputs, RefKey, State } from "../src/constants";
|
||||||
@@ -6,7 +5,6 @@ import * as actionUtils from "../src/utils/actionUtils";
|
|||||||
import * as testUtils from "../src/utils/testUtils";
|
import * as testUtils from "../src/utils/testUtils";
|
||||||
|
|
||||||
jest.mock("@actions/core");
|
jest.mock("@actions/core");
|
||||||
jest.mock("@actions/cache");
|
|
||||||
|
|
||||||
beforeAll(() => {
|
beforeAll(() => {
|
||||||
jest.spyOn(core, "getInput").mockImplementation((name, options) => {
|
jest.spyOn(core, "getInput").mockImplementation((name, options) => {
|
||||||
@@ -234,41 +232,3 @@ test("getInputAsInt throws if required and value missing", () => {
|
|||||||
actionUtils.getInputAsInt("undefined", { required: true })
|
actionUtils.getInputAsInt("undefined", { required: true })
|
||||||
).toThrowError();
|
).toThrowError();
|
||||||
});
|
});
|
||||||
|
|
||||||
test("isCacheFeatureAvailable for ac enabled", () => {
|
|
||||||
jest.spyOn(cache, "isFeatureAvailable").mockImplementation(() => true);
|
|
||||||
|
|
||||||
expect(actionUtils.isCacheFeatureAvailable()).toBe(true);
|
|
||||||
});
|
|
||||||
|
|
||||||
test("isCacheFeatureAvailable for ac disabled on GHES", () => {
|
|
||||||
jest.spyOn(cache, "isFeatureAvailable").mockImplementation(() => false);
|
|
||||||
|
|
||||||
const message =
|
|
||||||
"Cache action is only supported on GHES version >= 3.5. If you are on version >=3.5 Please check with GHES admin if Actions cache service is enabled or not.";
|
|
||||||
const infoMock = jest.spyOn(core, "info");
|
|
||||||
|
|
||||||
try {
|
|
||||||
process.env["GITHUB_SERVER_URL"] = "http://example.com";
|
|
||||||
expect(actionUtils.isCacheFeatureAvailable()).toBe(false);
|
|
||||||
expect(infoMock).toHaveBeenCalledWith(`[warning]${message}`);
|
|
||||||
} finally {
|
|
||||||
delete process.env["GITHUB_SERVER_URL"];
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
test("isCacheFeatureAvailable for ac disabled on dotcom", () => {
|
|
||||||
jest.spyOn(cache, "isFeatureAvailable").mockImplementation(() => false);
|
|
||||||
|
|
||||||
const message =
|
|
||||||
"An internal error has occurred in cache backend. Please check https://www.githubstatus.com/ for any ongoing issue in actions.";
|
|
||||||
const infoMock = jest.spyOn(core, "info");
|
|
||||||
|
|
||||||
try {
|
|
||||||
process.env["GITHUB_SERVER_URL"] = "http://github.com";
|
|
||||||
expect(actionUtils.isCacheFeatureAvailable()).toBe(false);
|
|
||||||
expect(infoMock).toHaveBeenCalledWith(`[warning]${message}`);
|
|
||||||
} finally {
|
|
||||||
delete process.env["GITHUB_SERVER_URL"];
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|||||||
@@ -34,9 +34,6 @@ beforeEach(() => {
|
|||||||
process.env[RefKey] = "refs/heads/feature-branch";
|
process.env[RefKey] = "refs/heads/feature-branch";
|
||||||
|
|
||||||
jest.spyOn(actionUtils, "isGhes").mockImplementation(() => false);
|
jest.spyOn(actionUtils, "isGhes").mockImplementation(() => false);
|
||||||
jest.spyOn(actionUtils, "isCacheFeatureAvailable").mockImplementation(
|
|
||||||
() => true
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
afterEach(() => {
|
afterEach(() => {
|
||||||
@@ -58,12 +55,10 @@ test("restore with invalid event outputs warning", async () => {
|
|||||||
expect(failedMock).toHaveBeenCalledTimes(0);
|
expect(failedMock).toHaveBeenCalledTimes(0);
|
||||||
});
|
});
|
||||||
|
|
||||||
test("restore without AC available should no-op", async () => {
|
test("restore on GHES should no-op", async () => {
|
||||||
jest.spyOn(actionUtils, "isGhes").mockImplementation(() => false);
|
jest.spyOn(actionUtils, "isGhes").mockImplementation(() => true);
|
||||||
jest.spyOn(actionUtils, "isCacheFeatureAvailable").mockImplementation(
|
|
||||||
() => false
|
|
||||||
);
|
|
||||||
|
|
||||||
|
const logWarningMock = jest.spyOn(actionUtils, "logWarning");
|
||||||
const restoreCacheMock = jest.spyOn(cache, "restoreCache");
|
const restoreCacheMock = jest.spyOn(cache, "restoreCache");
|
||||||
const setCacheHitOutputMock = jest.spyOn(actionUtils, "setCacheHitOutput");
|
const setCacheHitOutputMock = jest.spyOn(actionUtils, "setCacheHitOutput");
|
||||||
|
|
||||||
@@ -72,54 +67,9 @@ test("restore without AC available should no-op", async () => {
|
|||||||
expect(restoreCacheMock).toHaveBeenCalledTimes(0);
|
expect(restoreCacheMock).toHaveBeenCalledTimes(0);
|
||||||
expect(setCacheHitOutputMock).toHaveBeenCalledTimes(1);
|
expect(setCacheHitOutputMock).toHaveBeenCalledTimes(1);
|
||||||
expect(setCacheHitOutputMock).toHaveBeenCalledWith(false);
|
expect(setCacheHitOutputMock).toHaveBeenCalledWith(false);
|
||||||
});
|
expect(logWarningMock).toHaveBeenCalledWith(
|
||||||
|
"Cache action is not supported on GHES. See https://github.com/actions/cache/issues/505 for more details"
|
||||||
test("restore on GHES without AC available should no-op", async () => {
|
|
||||||
jest.spyOn(actionUtils, "isGhes").mockImplementation(() => true);
|
|
||||||
jest.spyOn(actionUtils, "isCacheFeatureAvailable").mockImplementation(
|
|
||||||
() => false
|
|
||||||
);
|
);
|
||||||
|
|
||||||
const restoreCacheMock = jest.spyOn(cache, "restoreCache");
|
|
||||||
const setCacheHitOutputMock = jest.spyOn(actionUtils, "setCacheHitOutput");
|
|
||||||
|
|
||||||
await run();
|
|
||||||
|
|
||||||
expect(restoreCacheMock).toHaveBeenCalledTimes(0);
|
|
||||||
expect(setCacheHitOutputMock).toHaveBeenCalledTimes(1);
|
|
||||||
expect(setCacheHitOutputMock).toHaveBeenCalledWith(false);
|
|
||||||
});
|
|
||||||
|
|
||||||
test("restore on GHES with AC available ", async () => {
|
|
||||||
jest.spyOn(actionUtils, "isGhes").mockImplementation(() => true);
|
|
||||||
const path = "node_modules";
|
|
||||||
const key = "node-test";
|
|
||||||
testUtils.setInputs({
|
|
||||||
path: path,
|
|
||||||
key
|
|
||||||
});
|
|
||||||
|
|
||||||
const infoMock = jest.spyOn(core, "info");
|
|
||||||
const failedMock = jest.spyOn(core, "setFailed");
|
|
||||||
const stateMock = jest.spyOn(core, "saveState");
|
|
||||||
const setCacheHitOutputMock = jest.spyOn(actionUtils, "setCacheHitOutput");
|
|
||||||
const restoreCacheMock = jest
|
|
||||||
.spyOn(cache, "restoreCache")
|
|
||||||
.mockImplementationOnce(() => {
|
|
||||||
return Promise.resolve(key);
|
|
||||||
});
|
|
||||||
|
|
||||||
await run();
|
|
||||||
|
|
||||||
expect(restoreCacheMock).toHaveBeenCalledTimes(1);
|
|
||||||
expect(restoreCacheMock).toHaveBeenCalledWith([path], key, []);
|
|
||||||
|
|
||||||
expect(stateMock).toHaveBeenCalledWith("CACHE_KEY", key);
|
|
||||||
expect(setCacheHitOutputMock).toHaveBeenCalledTimes(1);
|
|
||||||
expect(setCacheHitOutputMock).toHaveBeenCalledWith(true);
|
|
||||||
|
|
||||||
expect(infoMock).toHaveBeenCalledWith(`Cache restored from key: ${key}`);
|
|
||||||
expect(failedMock).toHaveBeenCalledTimes(0);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
test("restore with no path should fail", async () => {
|
test("restore with no path should fail", async () => {
|
||||||
|
|||||||
+5
-57
@@ -54,9 +54,6 @@ beforeEach(() => {
|
|||||||
process.env[RefKey] = "refs/heads/feature-branch";
|
process.env[RefKey] = "refs/heads/feature-branch";
|
||||||
|
|
||||||
jest.spyOn(actionUtils, "isGhes").mockImplementation(() => false);
|
jest.spyOn(actionUtils, "isGhes").mockImplementation(() => false);
|
||||||
jest.spyOn(actionUtils, "isCacheFeatureAvailable").mockImplementation(
|
|
||||||
() => true
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
afterEach(() => {
|
afterEach(() => {
|
||||||
@@ -104,67 +101,18 @@ test("save with no primary key in state outputs warning", async () => {
|
|||||||
expect(failedMock).toHaveBeenCalledTimes(0);
|
expect(failedMock).toHaveBeenCalledTimes(0);
|
||||||
});
|
});
|
||||||
|
|
||||||
test("save without AC available should no-op", async () => {
|
test("save on GHES should no-op", async () => {
|
||||||
jest.spyOn(actionUtils, "isCacheFeatureAvailable").mockImplementation(
|
jest.spyOn(actionUtils, "isGhes").mockImplementation(() => true);
|
||||||
() => false
|
|
||||||
);
|
|
||||||
|
|
||||||
|
const logWarningMock = jest.spyOn(actionUtils, "logWarning");
|
||||||
const saveCacheMock = jest.spyOn(cache, "saveCache");
|
const saveCacheMock = jest.spyOn(cache, "saveCache");
|
||||||
|
|
||||||
await run();
|
await run();
|
||||||
|
|
||||||
expect(saveCacheMock).toHaveBeenCalledTimes(0);
|
expect(saveCacheMock).toHaveBeenCalledTimes(0);
|
||||||
});
|
expect(logWarningMock).toHaveBeenCalledWith(
|
||||||
|
"Cache action is not supported on GHES. See https://github.com/actions/cache/issues/505 for more details"
|
||||||
test("save on ghes without AC available should no-op", async () => {
|
|
||||||
jest.spyOn(actionUtils, "isGhes").mockImplementation(() => true);
|
|
||||||
jest.spyOn(actionUtils, "isCacheFeatureAvailable").mockImplementation(
|
|
||||||
() => false
|
|
||||||
);
|
);
|
||||||
|
|
||||||
const saveCacheMock = jest.spyOn(cache, "saveCache");
|
|
||||||
|
|
||||||
await run();
|
|
||||||
|
|
||||||
expect(saveCacheMock).toHaveBeenCalledTimes(0);
|
|
||||||
});
|
|
||||||
|
|
||||||
test("save on GHES with AC available", async () => {
|
|
||||||
jest.spyOn(actionUtils, "isGhes").mockImplementation(() => true);
|
|
||||||
const failedMock = jest.spyOn(core, "setFailed");
|
|
||||||
|
|
||||||
const primaryKey = "Linux-node-bb828da54c148048dd17899ba9fda624811cfb43";
|
|
||||||
const savedCacheKey = "Linux-node-";
|
|
||||||
|
|
||||||
jest.spyOn(core, "getState")
|
|
||||||
// Cache Entry State
|
|
||||||
.mockImplementationOnce(() => {
|
|
||||||
return savedCacheKey;
|
|
||||||
})
|
|
||||||
// Cache Key State
|
|
||||||
.mockImplementationOnce(() => {
|
|
||||||
return primaryKey;
|
|
||||||
});
|
|
||||||
|
|
||||||
const inputPath = "node_modules";
|
|
||||||
testUtils.setInput(Inputs.Path, inputPath);
|
|
||||||
testUtils.setInput(Inputs.UploadChunkSize, "4000000");
|
|
||||||
|
|
||||||
const cacheId = 4;
|
|
||||||
const saveCacheMock = jest
|
|
||||||
.spyOn(cache, "saveCache")
|
|
||||||
.mockImplementationOnce(() => {
|
|
||||||
return Promise.resolve(cacheId);
|
|
||||||
});
|
|
||||||
|
|
||||||
await run();
|
|
||||||
|
|
||||||
expect(saveCacheMock).toHaveBeenCalledTimes(1);
|
|
||||||
expect(saveCacheMock).toHaveBeenCalledWith([inputPath], primaryKey, {
|
|
||||||
uploadChunkSize: 4000000
|
|
||||||
});
|
|
||||||
|
|
||||||
expect(failedMock).toHaveBeenCalledTimes(0);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
test("save with exact match returns early", async () => {
|
test("save with exact match returns early", async () => {
|
||||||
|
|||||||
+1
-1
@@ -18,7 +18,7 @@ outputs:
|
|||||||
cache-hit:
|
cache-hit:
|
||||||
description: 'A boolean value to indicate an exact match was found for the primary key'
|
description: 'A boolean value to indicate an exact match was found for the primary key'
|
||||||
runs:
|
runs:
|
||||||
using: 'node16'
|
using: 'node12'
|
||||||
main: 'dist/restore/index.js'
|
main: 'dist/restore/index.js'
|
||||||
post: 'dist/save/index.js'
|
post: 'dist/save/index.js'
|
||||||
post-if: 'success()'
|
post-if: 'success()'
|
||||||
|
|||||||
Binary file not shown.
Vendored
+542
-1701
@@ -1199,11 +1199,6 @@ function assertDefined(name, value) {
|
|||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
exports.assertDefined = assertDefined;
|
exports.assertDefined = assertDefined;
|
||||||
function isGhes() {
|
|
||||||
const ghUrl = new URL(process.env['GITHUB_SERVER_URL'] || 'https://github.com');
|
|
||||||
return ghUrl.hostname.toUpperCase() !== 'GITHUB.COM';
|
|
||||||
}
|
|
||||||
exports.isGhes = isGhes;
|
|
||||||
//# sourceMappingURL=cacheUtils.js.map
|
//# sourceMappingURL=cacheUtils.js.map
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
@@ -3197,7 +3192,10 @@ const options_1 = __webpack_require__(538);
|
|||||||
const requestUtils_1 = __webpack_require__(899);
|
const requestUtils_1 = __webpack_require__(899);
|
||||||
const versionSalt = '1.0';
|
const versionSalt = '1.0';
|
||||||
function getCacheApiUrl(resource) {
|
function getCacheApiUrl(resource) {
|
||||||
const baseUrl = process.env['ACTIONS_CACHE_URL'] || '';
|
// Ideally we just use ACTIONS_CACHE_URL
|
||||||
|
const baseUrl = (process.env['ACTIONS_CACHE_URL'] ||
|
||||||
|
process.env['ACTIONS_RUNTIME_URL'] ||
|
||||||
|
'').replace('pipelines', 'artifactcache');
|
||||||
if (!baseUrl) {
|
if (!baseUrl) {
|
||||||
throw new Error('Cache Service Url not found, unable to restore cache.');
|
throw new Error('Cache Service Url not found, unable to restore cache.');
|
||||||
}
|
}
|
||||||
@@ -3275,18 +3273,18 @@ function downloadCache(archiveLocation, archivePath, options) {
|
|||||||
exports.downloadCache = downloadCache;
|
exports.downloadCache = downloadCache;
|
||||||
// Reserve Cache
|
// Reserve Cache
|
||||||
function reserveCache(key, paths, options) {
|
function reserveCache(key, paths, options) {
|
||||||
|
var _a, _b;
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
const httpClient = createHttpClient();
|
const httpClient = createHttpClient();
|
||||||
const version = getCacheVersion(paths, options === null || options === void 0 ? void 0 : options.compressionMethod);
|
const version = getCacheVersion(paths, options === null || options === void 0 ? void 0 : options.compressionMethod);
|
||||||
const reserveCacheRequest = {
|
const reserveCacheRequest = {
|
||||||
key,
|
key,
|
||||||
version,
|
version
|
||||||
cacheSize: options === null || options === void 0 ? void 0 : options.cacheSize
|
|
||||||
};
|
};
|
||||||
const response = yield requestUtils_1.retryTypedResponse('reserveCache', () => __awaiter(this, void 0, void 0, function* () {
|
const response = yield requestUtils_1.retryTypedResponse('reserveCache', () => __awaiter(this, void 0, void 0, function* () {
|
||||||
return httpClient.postJson(getCacheApiUrl('caches'), reserveCacheRequest);
|
return httpClient.postJson(getCacheApiUrl('caches'), reserveCacheRequest);
|
||||||
}));
|
}));
|
||||||
return response;
|
return (_b = (_a = response === null || response === void 0 ? void 0 : response.result) === null || _a === void 0 ? void 0 : _a.cacheId) !== null && _b !== void 0 ? _b : -1;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
exports.reserveCache = reserveCache;
|
exports.reserveCache = reserveCache;
|
||||||
@@ -5492,8 +5490,7 @@ function downloadCacheStorageSDK(archiveLocation, archivePath, options) {
|
|||||||
//
|
//
|
||||||
// If the file exceeds the buffer maximum length (~1 GB on 32-bit systems and ~2 GB
|
// If the file exceeds the buffer maximum length (~1 GB on 32-bit systems and ~2 GB
|
||||||
// on 64-bit systems), split the download into multiple segments
|
// on 64-bit systems), split the download into multiple segments
|
||||||
// ~2 GB = 2147483647, beyond this, we start getting out of range error. So, capping it accordingly.
|
const maxSegmentSize = buffer.constants.MAX_LENGTH;
|
||||||
const maxSegmentSize = Math.min(2147483647, buffer.constants.MAX_LENGTH);
|
|
||||||
const downloadProgress = new DownloadProgress(contentLength);
|
const downloadProgress = new DownloadProgress(contentLength);
|
||||||
const fd = fs.openSync(archivePath, 'w');
|
const fd = fs.openSync(archivePath, 'w');
|
||||||
try {
|
try {
|
||||||
@@ -9650,29 +9647,6 @@ var events = __webpack_require__(614);
|
|||||||
var fs = __webpack_require__(747);
|
var fs = __webpack_require__(747);
|
||||||
var util = __webpack_require__(669);
|
var util = __webpack_require__(669);
|
||||||
|
|
||||||
function _interopNamespace(e) {
|
|
||||||
if (e && e.__esModule) return e;
|
|
||||||
var n = Object.create(null);
|
|
||||||
if (e) {
|
|
||||||
Object.keys(e).forEach(function (k) {
|
|
||||||
if (k !== 'default') {
|
|
||||||
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
||||||
Object.defineProperty(n, k, d.get ? d : {
|
|
||||||
enumerable: true,
|
|
||||||
get: function () { return e[k]; }
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
n["default"] = e;
|
|
||||||
return Object.freeze(n);
|
|
||||||
}
|
|
||||||
|
|
||||||
var coreHttp__namespace = /*#__PURE__*/_interopNamespace(coreHttp);
|
|
||||||
var os__namespace = /*#__PURE__*/_interopNamespace(os);
|
|
||||||
var fs__namespace = /*#__PURE__*/_interopNamespace(fs);
|
|
||||||
var util__namespace = /*#__PURE__*/_interopNamespace(util);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) Microsoft Corporation.
|
* Copyright (c) Microsoft Corporation.
|
||||||
* Licensed under the MIT License.
|
* Licensed under the MIT License.
|
||||||
@@ -10627,10 +10601,10 @@ const BlobItemInternal = {
|
|||||||
modelProperties: {
|
modelProperties: {
|
||||||
name: {
|
name: {
|
||||||
serializedName: "Name",
|
serializedName: "Name",
|
||||||
|
required: true,
|
||||||
xmlName: "Name",
|
xmlName: "Name",
|
||||||
type: {
|
type: {
|
||||||
name: "Composite",
|
name: "String"
|
||||||
className: "BlobName"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
deleted: {
|
deleted: {
|
||||||
@@ -10705,30 +10679,6 @@ const BlobItemInternal = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
const BlobName = {
|
|
||||||
serializedName: "BlobName",
|
|
||||||
type: {
|
|
||||||
name: "Composite",
|
|
||||||
className: "BlobName",
|
|
||||||
modelProperties: {
|
|
||||||
encoded: {
|
|
||||||
serializedName: "Encoded",
|
|
||||||
xmlName: "Encoded",
|
|
||||||
xmlIsAttribute: true,
|
|
||||||
type: {
|
|
||||||
name: "Boolean"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
content: {
|
|
||||||
serializedName: "content",
|
|
||||||
xmlName: "content",
|
|
||||||
type: {
|
|
||||||
name: "String"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
const BlobPropertiesInternal = {
|
const BlobPropertiesInternal = {
|
||||||
serializedName: "BlobPropertiesInternal",
|
serializedName: "BlobPropertiesInternal",
|
||||||
xmlName: "Properties",
|
xmlName: "Properties",
|
||||||
@@ -11172,10 +11122,10 @@ const BlobPrefix = {
|
|||||||
modelProperties: {
|
modelProperties: {
|
||||||
name: {
|
name: {
|
||||||
serializedName: "Name",
|
serializedName: "Name",
|
||||||
|
required: true,
|
||||||
xmlName: "Name",
|
xmlName: "Name",
|
||||||
type: {
|
type: {
|
||||||
name: "Composite",
|
name: "String"
|
||||||
className: "BlobName"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -12798,59 +12748,6 @@ const ContainerSubmitBatchExceptionHeaders = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
const ContainerFilterBlobsHeaders = {
|
|
||||||
serializedName: "Container_filterBlobsHeaders",
|
|
||||||
type: {
|
|
||||||
name: "Composite",
|
|
||||||
className: "ContainerFilterBlobsHeaders",
|
|
||||||
modelProperties: {
|
|
||||||
clientRequestId: {
|
|
||||||
serializedName: "x-ms-client-request-id",
|
|
||||||
xmlName: "x-ms-client-request-id",
|
|
||||||
type: {
|
|
||||||
name: "String"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
requestId: {
|
|
||||||
serializedName: "x-ms-request-id",
|
|
||||||
xmlName: "x-ms-request-id",
|
|
||||||
type: {
|
|
||||||
name: "String"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
version: {
|
|
||||||
serializedName: "x-ms-version",
|
|
||||||
xmlName: "x-ms-version",
|
|
||||||
type: {
|
|
||||||
name: "String"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
date: {
|
|
||||||
serializedName: "date",
|
|
||||||
xmlName: "date",
|
|
||||||
type: {
|
|
||||||
name: "DateTimeRfc1123"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
const ContainerFilterBlobsExceptionHeaders = {
|
|
||||||
serializedName: "Container_filterBlobsExceptionHeaders",
|
|
||||||
type: {
|
|
||||||
name: "Composite",
|
|
||||||
className: "ContainerFilterBlobsExceptionHeaders",
|
|
||||||
modelProperties: {
|
|
||||||
errorCode: {
|
|
||||||
serializedName: "x-ms-error-code",
|
|
||||||
xmlName: "x-ms-error-code",
|
|
||||||
type: {
|
|
||||||
name: "String"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
const ContainerAcquireLeaseHeaders = {
|
const ContainerAcquireLeaseHeaders = {
|
||||||
serializedName: "Container_acquireLeaseHeaders",
|
serializedName: "Container_acquireLeaseHeaders",
|
||||||
type: {
|
type: {
|
||||||
@@ -15359,13 +15256,6 @@ const BlobCopyFromURLHeaders = {
|
|||||||
name: "ByteArray"
|
name: "ByteArray"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
encryptionScope: {
|
|
||||||
serializedName: "x-ms-encryption-scope",
|
|
||||||
xmlName: "x-ms-encryption-scope",
|
|
||||||
type: {
|
|
||||||
name: "String"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
errorCode: {
|
errorCode: {
|
||||||
serializedName: "x-ms-error-code",
|
serializedName: "x-ms-error-code",
|
||||||
xmlName: "x-ms-error-code",
|
xmlName: "x-ms-error-code",
|
||||||
@@ -17883,7 +17773,6 @@ var Mappers = /*#__PURE__*/Object.freeze({
|
|||||||
ListBlobsFlatSegmentResponse: ListBlobsFlatSegmentResponse,
|
ListBlobsFlatSegmentResponse: ListBlobsFlatSegmentResponse,
|
||||||
BlobFlatListSegment: BlobFlatListSegment,
|
BlobFlatListSegment: BlobFlatListSegment,
|
||||||
BlobItemInternal: BlobItemInternal,
|
BlobItemInternal: BlobItemInternal,
|
||||||
BlobName: BlobName,
|
|
||||||
BlobPropertiesInternal: BlobPropertiesInternal,
|
BlobPropertiesInternal: BlobPropertiesInternal,
|
||||||
ListBlobsHierarchySegmentResponse: ListBlobsHierarchySegmentResponse,
|
ListBlobsHierarchySegmentResponse: ListBlobsHierarchySegmentResponse,
|
||||||
BlobHierarchyListSegment: BlobHierarchyListSegment,
|
BlobHierarchyListSegment: BlobHierarchyListSegment,
|
||||||
@@ -17935,8 +17824,6 @@ var Mappers = /*#__PURE__*/Object.freeze({
|
|||||||
ContainerRenameExceptionHeaders: ContainerRenameExceptionHeaders,
|
ContainerRenameExceptionHeaders: ContainerRenameExceptionHeaders,
|
||||||
ContainerSubmitBatchHeaders: ContainerSubmitBatchHeaders,
|
ContainerSubmitBatchHeaders: ContainerSubmitBatchHeaders,
|
||||||
ContainerSubmitBatchExceptionHeaders: ContainerSubmitBatchExceptionHeaders,
|
ContainerSubmitBatchExceptionHeaders: ContainerSubmitBatchExceptionHeaders,
|
||||||
ContainerFilterBlobsHeaders: ContainerFilterBlobsHeaders,
|
|
||||||
ContainerFilterBlobsExceptionHeaders: ContainerFilterBlobsExceptionHeaders,
|
|
||||||
ContainerAcquireLeaseHeaders: ContainerAcquireLeaseHeaders,
|
ContainerAcquireLeaseHeaders: ContainerAcquireLeaseHeaders,
|
||||||
ContainerAcquireLeaseExceptionHeaders: ContainerAcquireLeaseExceptionHeaders,
|
ContainerAcquireLeaseExceptionHeaders: ContainerAcquireLeaseExceptionHeaders,
|
||||||
ContainerReleaseLeaseHeaders: ContainerReleaseLeaseHeaders,
|
ContainerReleaseLeaseHeaders: ContainerReleaseLeaseHeaders,
|
||||||
@@ -18124,7 +18011,7 @@ const timeoutInSeconds = {
|
|||||||
const version = {
|
const version = {
|
||||||
parameterPath: "version",
|
parameterPath: "version",
|
||||||
mapper: {
|
mapper: {
|
||||||
defaultValue: "2021-04-10",
|
defaultValue: "2020-10-02",
|
||||||
isConstant: true,
|
isConstant: true,
|
||||||
serializedName: "x-ms-version",
|
serializedName: "x-ms-version",
|
||||||
type: {
|
type: {
|
||||||
@@ -18219,7 +18106,7 @@ const include = {
|
|||||||
element: {
|
element: {
|
||||||
type: {
|
type: {
|
||||||
name: "Enum",
|
name: "Enum",
|
||||||
allowedValues: ["metadata", "deleted", "system"]
|
allowedValues: ["metadata", "deleted"]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -18741,10 +18628,11 @@ const encryptionKeySha256 = {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
const encryptionAlgorithm = {
|
const encryptionAlgorithm = {
|
||||||
parameterPath: ["options", "cpkInfo", "encryptionAlgorithm"],
|
parameterPath: ["options", "encryptionAlgorithm"],
|
||||||
mapper: {
|
mapper: {
|
||||||
|
defaultValue: "AES256",
|
||||||
|
isConstant: true,
|
||||||
serializedName: "x-ms-encryption-algorithm",
|
serializedName: "x-ms-encryption-algorithm",
|
||||||
xmlName: "x-ms-encryption-algorithm",
|
|
||||||
type: {
|
type: {
|
||||||
name: "String"
|
name: "String"
|
||||||
}
|
}
|
||||||
@@ -19661,7 +19549,7 @@ class Service {
|
|||||||
setProperties(blobServiceProperties, options) {
|
setProperties(blobServiceProperties, options) {
|
||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
blobServiceProperties,
|
blobServiceProperties,
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, setPropertiesOperationSpec);
|
return this.client.sendOperationRequest(operationArguments, setPropertiesOperationSpec);
|
||||||
}
|
}
|
||||||
@@ -19672,9 +19560,9 @@ class Service {
|
|||||||
*/
|
*/
|
||||||
getProperties(options) {
|
getProperties(options) {
|
||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, getPropertiesOperationSpec$2);
|
return this.client.sendOperationRequest(operationArguments, getPropertiesOperationSpec);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Retrieves statistics related to replication for the Blob service. It is only available on the
|
* Retrieves statistics related to replication for the Blob service. It is only available on the
|
||||||
@@ -19684,7 +19572,7 @@ class Service {
|
|||||||
*/
|
*/
|
||||||
getStatistics(options) {
|
getStatistics(options) {
|
||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, getStatisticsOperationSpec);
|
return this.client.sendOperationRequest(operationArguments, getStatisticsOperationSpec);
|
||||||
}
|
}
|
||||||
@@ -19694,7 +19582,7 @@ class Service {
|
|||||||
*/
|
*/
|
||||||
listContainersSegment(options) {
|
listContainersSegment(options) {
|
||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, listContainersSegmentOperationSpec);
|
return this.client.sendOperationRequest(operationArguments, listContainersSegmentOperationSpec);
|
||||||
}
|
}
|
||||||
@@ -19707,7 +19595,7 @@ class Service {
|
|||||||
getUserDelegationKey(keyInfo, options) {
|
getUserDelegationKey(keyInfo, options) {
|
||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
keyInfo,
|
keyInfo,
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, getUserDelegationKeyOperationSpec);
|
return this.client.sendOperationRequest(operationArguments, getUserDelegationKeyOperationSpec);
|
||||||
}
|
}
|
||||||
@@ -19717,9 +19605,9 @@ class Service {
|
|||||||
*/
|
*/
|
||||||
getAccountInfo(options) {
|
getAccountInfo(options) {
|
||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, getAccountInfoOperationSpec$2);
|
return this.client.sendOperationRequest(operationArguments, getAccountInfoOperationSpec);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* The Batch operation allows multiple API calls to be embedded into a single HTTP request.
|
* The Batch operation allows multiple API calls to be embedded into a single HTTP request.
|
||||||
@@ -19734,9 +19622,9 @@ class Service {
|
|||||||
contentLength,
|
contentLength,
|
||||||
multipartContentType,
|
multipartContentType,
|
||||||
body,
|
body,
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, submitBatchOperationSpec$1);
|
return this.client.sendOperationRequest(operationArguments, submitBatchOperationSpec);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* The Filter Blobs operation enables callers to list blobs across all containers whose tags match a
|
* The Filter Blobs operation enables callers to list blobs across all containers whose tags match a
|
||||||
@@ -19746,13 +19634,13 @@ class Service {
|
|||||||
*/
|
*/
|
||||||
filterBlobs(options) {
|
filterBlobs(options) {
|
||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, filterBlobsOperationSpec$1);
|
return this.client.sendOperationRequest(operationArguments, filterBlobsOperationSpec);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Operation Specifications
|
// Operation Specifications
|
||||||
const xmlSerializer$5 = new coreHttp__namespace.Serializer(Mappers, /* isXml */ true);
|
const xmlSerializer = new coreHttp.Serializer(Mappers, /* isXml */ true);
|
||||||
const setPropertiesOperationSpec = {
|
const setPropertiesOperationSpec = {
|
||||||
path: "/",
|
path: "/",
|
||||||
httpMethod: "PUT",
|
httpMethod: "PUT",
|
||||||
@@ -19781,9 +19669,9 @@ const setPropertiesOperationSpec = {
|
|||||||
isXML: true,
|
isXML: true,
|
||||||
contentType: "application/xml; charset=utf-8",
|
contentType: "application/xml; charset=utf-8",
|
||||||
mediaType: "xml",
|
mediaType: "xml",
|
||||||
serializer: xmlSerializer$5
|
serializer: xmlSerializer
|
||||||
};
|
};
|
||||||
const getPropertiesOperationSpec$2 = {
|
const getPropertiesOperationSpec = {
|
||||||
path: "/",
|
path: "/",
|
||||||
httpMethod: "GET",
|
httpMethod: "GET",
|
||||||
responses: {
|
responses: {
|
||||||
@@ -19808,7 +19696,7 @@ const getPropertiesOperationSpec$2 = {
|
|||||||
accept1
|
accept1
|
||||||
],
|
],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer$5
|
serializer: xmlSerializer
|
||||||
};
|
};
|
||||||
const getStatisticsOperationSpec = {
|
const getStatisticsOperationSpec = {
|
||||||
path: "/",
|
path: "/",
|
||||||
@@ -19835,7 +19723,7 @@ const getStatisticsOperationSpec = {
|
|||||||
accept1
|
accept1
|
||||||
],
|
],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer$5
|
serializer: xmlSerializer
|
||||||
};
|
};
|
||||||
const listContainersSegmentOperationSpec = {
|
const listContainersSegmentOperationSpec = {
|
||||||
path: "/",
|
path: "/",
|
||||||
@@ -19865,7 +19753,7 @@ const listContainersSegmentOperationSpec = {
|
|||||||
accept1
|
accept1
|
||||||
],
|
],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer$5
|
serializer: xmlSerializer
|
||||||
};
|
};
|
||||||
const getUserDelegationKeyOperationSpec = {
|
const getUserDelegationKeyOperationSpec = {
|
||||||
path: "/",
|
path: "/",
|
||||||
@@ -19896,9 +19784,9 @@ const getUserDelegationKeyOperationSpec = {
|
|||||||
isXML: true,
|
isXML: true,
|
||||||
contentType: "application/xml; charset=utf-8",
|
contentType: "application/xml; charset=utf-8",
|
||||||
mediaType: "xml",
|
mediaType: "xml",
|
||||||
serializer: xmlSerializer$5
|
serializer: xmlSerializer
|
||||||
};
|
};
|
||||||
const getAccountInfoOperationSpec$2 = {
|
const getAccountInfoOperationSpec = {
|
||||||
path: "/",
|
path: "/",
|
||||||
httpMethod: "GET",
|
httpMethod: "GET",
|
||||||
responses: {
|
responses: {
|
||||||
@@ -19914,9 +19802,9 @@ const getAccountInfoOperationSpec$2 = {
|
|||||||
urlParameters: [url],
|
urlParameters: [url],
|
||||||
headerParameters: [version, accept1],
|
headerParameters: [version, accept1],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer$5
|
serializer: xmlSerializer
|
||||||
};
|
};
|
||||||
const submitBatchOperationSpec$1 = {
|
const submitBatchOperationSpec = {
|
||||||
path: "/",
|
path: "/",
|
||||||
httpMethod: "POST",
|
httpMethod: "POST",
|
||||||
responses: {
|
responses: {
|
||||||
@@ -19946,9 +19834,9 @@ const submitBatchOperationSpec$1 = {
|
|||||||
isXML: true,
|
isXML: true,
|
||||||
contentType: "application/xml; charset=utf-8",
|
contentType: "application/xml; charset=utf-8",
|
||||||
mediaType: "xml",
|
mediaType: "xml",
|
||||||
serializer: xmlSerializer$5
|
serializer: xmlSerializer
|
||||||
};
|
};
|
||||||
const filterBlobsOperationSpec$1 = {
|
const filterBlobsOperationSpec = {
|
||||||
path: "/",
|
path: "/",
|
||||||
httpMethod: "GET",
|
httpMethod: "GET",
|
||||||
responses: {
|
responses: {
|
||||||
@@ -19975,7 +19863,7 @@ const filterBlobsOperationSpec$1 = {
|
|||||||
accept1
|
accept1
|
||||||
],
|
],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer$5
|
serializer: xmlSerializer
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -20001,9 +19889,9 @@ class Container {
|
|||||||
*/
|
*/
|
||||||
create(options) {
|
create(options) {
|
||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, createOperationSpec$2);
|
return this.client.sendOperationRequest(operationArguments, createOperationSpec);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* returns all user-defined metadata and system properties for the specified container. The data
|
* returns all user-defined metadata and system properties for the specified container. The data
|
||||||
@@ -20012,7 +19900,7 @@ class Container {
|
|||||||
*/
|
*/
|
||||||
getProperties(options) {
|
getProperties(options) {
|
||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, getPropertiesOperationSpec$1);
|
return this.client.sendOperationRequest(operationArguments, getPropertiesOperationSpec$1);
|
||||||
}
|
}
|
||||||
@@ -20023,9 +19911,9 @@ class Container {
|
|||||||
*/
|
*/
|
||||||
delete(options) {
|
delete(options) {
|
||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, deleteOperationSpec$1);
|
return this.client.sendOperationRequest(operationArguments, deleteOperationSpec);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* operation sets one or more user-defined name-value pairs for the specified container.
|
* operation sets one or more user-defined name-value pairs for the specified container.
|
||||||
@@ -20033,9 +19921,9 @@ class Container {
|
|||||||
*/
|
*/
|
||||||
setMetadata(options) {
|
setMetadata(options) {
|
||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, setMetadataOperationSpec$1);
|
return this.client.sendOperationRequest(operationArguments, setMetadataOperationSpec);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* gets the permissions for the specified container. The permissions indicate whether container data
|
* gets the permissions for the specified container. The permissions indicate whether container data
|
||||||
@@ -20044,7 +19932,7 @@ class Container {
|
|||||||
*/
|
*/
|
||||||
getAccessPolicy(options) {
|
getAccessPolicy(options) {
|
||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, getAccessPolicyOperationSpec);
|
return this.client.sendOperationRequest(operationArguments, getAccessPolicyOperationSpec);
|
||||||
}
|
}
|
||||||
@@ -20055,7 +19943,7 @@ class Container {
|
|||||||
*/
|
*/
|
||||||
setAccessPolicy(options) {
|
setAccessPolicy(options) {
|
||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, setAccessPolicyOperationSpec);
|
return this.client.sendOperationRequest(operationArguments, setAccessPolicyOperationSpec);
|
||||||
}
|
}
|
||||||
@@ -20065,7 +19953,7 @@ class Container {
|
|||||||
*/
|
*/
|
||||||
restore(options) {
|
restore(options) {
|
||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, restoreOperationSpec);
|
return this.client.sendOperationRequest(operationArguments, restoreOperationSpec);
|
||||||
}
|
}
|
||||||
@@ -20077,7 +19965,7 @@ class Container {
|
|||||||
rename(sourceContainerName, options) {
|
rename(sourceContainerName, options) {
|
||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
sourceContainerName,
|
sourceContainerName,
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, renameOperationSpec);
|
return this.client.sendOperationRequest(operationArguments, renameOperationSpec);
|
||||||
}
|
}
|
||||||
@@ -20094,20 +19982,9 @@ class Container {
|
|||||||
contentLength,
|
contentLength,
|
||||||
multipartContentType,
|
multipartContentType,
|
||||||
body,
|
body,
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, submitBatchOperationSpec);
|
return this.client.sendOperationRequest(operationArguments, submitBatchOperationSpec$1);
|
||||||
}
|
|
||||||
/**
|
|
||||||
* The Filter Blobs operation enables callers to list blobs in a container whose tags match a given
|
|
||||||
* search expression. Filter blobs searches within the given container.
|
|
||||||
* @param options The options parameters.
|
|
||||||
*/
|
|
||||||
filterBlobs(options) {
|
|
||||||
const operationArguments = {
|
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
|
||||||
};
|
|
||||||
return this.client.sendOperationRequest(operationArguments, filterBlobsOperationSpec);
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* [Update] establishes and manages a lock on a container for delete operations. The lock duration can
|
* [Update] establishes and manages a lock on a container for delete operations. The lock duration can
|
||||||
@@ -20116,9 +19993,9 @@ class Container {
|
|||||||
*/
|
*/
|
||||||
acquireLease(options) {
|
acquireLease(options) {
|
||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, acquireLeaseOperationSpec$1);
|
return this.client.sendOperationRequest(operationArguments, acquireLeaseOperationSpec);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* [Update] establishes and manages a lock on a container for delete operations. The lock duration can
|
* [Update] establishes and manages a lock on a container for delete operations. The lock duration can
|
||||||
@@ -20129,9 +20006,9 @@ class Container {
|
|||||||
releaseLease(leaseId, options) {
|
releaseLease(leaseId, options) {
|
||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
leaseId,
|
leaseId,
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, releaseLeaseOperationSpec$1);
|
return this.client.sendOperationRequest(operationArguments, releaseLeaseOperationSpec);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* [Update] establishes and manages a lock on a container for delete operations. The lock duration can
|
* [Update] establishes and manages a lock on a container for delete operations. The lock duration can
|
||||||
@@ -20142,9 +20019,9 @@ class Container {
|
|||||||
renewLease(leaseId, options) {
|
renewLease(leaseId, options) {
|
||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
leaseId,
|
leaseId,
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, renewLeaseOperationSpec$1);
|
return this.client.sendOperationRequest(operationArguments, renewLeaseOperationSpec);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* [Update] establishes and manages a lock on a container for delete operations. The lock duration can
|
* [Update] establishes and manages a lock on a container for delete operations. The lock duration can
|
||||||
@@ -20153,9 +20030,9 @@ class Container {
|
|||||||
*/
|
*/
|
||||||
breakLease(options) {
|
breakLease(options) {
|
||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, breakLeaseOperationSpec$1);
|
return this.client.sendOperationRequest(operationArguments, breakLeaseOperationSpec);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* [Update] establishes and manages a lock on a container for delete operations. The lock duration can
|
* [Update] establishes and manages a lock on a container for delete operations. The lock duration can
|
||||||
@@ -20170,9 +20047,9 @@ class Container {
|
|||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
leaseId,
|
leaseId,
|
||||||
proposedLeaseId,
|
proposedLeaseId,
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, changeLeaseOperationSpec$1);
|
return this.client.sendOperationRequest(operationArguments, changeLeaseOperationSpec);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* [Update] The List Blobs operation returns a list of the blobs under the specified container
|
* [Update] The List Blobs operation returns a list of the blobs under the specified container
|
||||||
@@ -20180,7 +20057,7 @@ class Container {
|
|||||||
*/
|
*/
|
||||||
listBlobFlatSegment(options) {
|
listBlobFlatSegment(options) {
|
||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, listBlobFlatSegmentOperationSpec);
|
return this.client.sendOperationRequest(operationArguments, listBlobFlatSegmentOperationSpec);
|
||||||
}
|
}
|
||||||
@@ -20195,7 +20072,7 @@ class Container {
|
|||||||
listBlobHierarchySegment(delimiter, options) {
|
listBlobHierarchySegment(delimiter, options) {
|
||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
delimiter,
|
delimiter,
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, listBlobHierarchySegmentOperationSpec);
|
return this.client.sendOperationRequest(operationArguments, listBlobHierarchySegmentOperationSpec);
|
||||||
}
|
}
|
||||||
@@ -20205,14 +20082,14 @@ class Container {
|
|||||||
*/
|
*/
|
||||||
getAccountInfo(options) {
|
getAccountInfo(options) {
|
||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, getAccountInfoOperationSpec$1);
|
return this.client.sendOperationRequest(operationArguments, getAccountInfoOperationSpec$1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Operation Specifications
|
// Operation Specifications
|
||||||
const xmlSerializer$4 = new coreHttp__namespace.Serializer(Mappers, /* isXml */ true);
|
const xmlSerializer$1 = new coreHttp.Serializer(Mappers, /* isXml */ true);
|
||||||
const createOperationSpec$2 = {
|
const createOperationSpec = {
|
||||||
path: "/{containerName}",
|
path: "/{containerName}",
|
||||||
httpMethod: "PUT",
|
httpMethod: "PUT",
|
||||||
responses: {
|
responses: {
|
||||||
@@ -20236,7 +20113,7 @@ const createOperationSpec$2 = {
|
|||||||
preventEncryptionScopeOverride
|
preventEncryptionScopeOverride
|
||||||
],
|
],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer$4
|
serializer: xmlSerializer$1
|
||||||
};
|
};
|
||||||
const getPropertiesOperationSpec$1 = {
|
const getPropertiesOperationSpec$1 = {
|
||||||
path: "/{containerName}",
|
path: "/{containerName}",
|
||||||
@@ -20259,9 +20136,9 @@ const getPropertiesOperationSpec$1 = {
|
|||||||
leaseId
|
leaseId
|
||||||
],
|
],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer$4
|
serializer: xmlSerializer$1
|
||||||
};
|
};
|
||||||
const deleteOperationSpec$1 = {
|
const deleteOperationSpec = {
|
||||||
path: "/{containerName}",
|
path: "/{containerName}",
|
||||||
httpMethod: "DELETE",
|
httpMethod: "DELETE",
|
||||||
responses: {
|
responses: {
|
||||||
@@ -20284,9 +20161,9 @@ const deleteOperationSpec$1 = {
|
|||||||
ifUnmodifiedSince
|
ifUnmodifiedSince
|
||||||
],
|
],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer$4
|
serializer: xmlSerializer$1
|
||||||
};
|
};
|
||||||
const setMetadataOperationSpec$1 = {
|
const setMetadataOperationSpec = {
|
||||||
path: "/{containerName}",
|
path: "/{containerName}",
|
||||||
httpMethod: "PUT",
|
httpMethod: "PUT",
|
||||||
responses: {
|
responses: {
|
||||||
@@ -20313,7 +20190,7 @@ const setMetadataOperationSpec$1 = {
|
|||||||
ifModifiedSince
|
ifModifiedSince
|
||||||
],
|
],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer$4
|
serializer: xmlSerializer$1
|
||||||
};
|
};
|
||||||
const getAccessPolicyOperationSpec = {
|
const getAccessPolicyOperationSpec = {
|
||||||
path: "/{containerName}",
|
path: "/{containerName}",
|
||||||
@@ -20352,7 +20229,7 @@ const getAccessPolicyOperationSpec = {
|
|||||||
leaseId
|
leaseId
|
||||||
],
|
],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer$4
|
serializer: xmlSerializer$1
|
||||||
};
|
};
|
||||||
const setAccessPolicyOperationSpec = {
|
const setAccessPolicyOperationSpec = {
|
||||||
path: "/{containerName}",
|
path: "/{containerName}",
|
||||||
@@ -20386,7 +20263,7 @@ const setAccessPolicyOperationSpec = {
|
|||||||
isXML: true,
|
isXML: true,
|
||||||
contentType: "application/xml; charset=utf-8",
|
contentType: "application/xml; charset=utf-8",
|
||||||
mediaType: "xml",
|
mediaType: "xml",
|
||||||
serializer: xmlSerializer$4
|
serializer: xmlSerializer$1
|
||||||
};
|
};
|
||||||
const restoreOperationSpec = {
|
const restoreOperationSpec = {
|
||||||
path: "/{containerName}",
|
path: "/{containerName}",
|
||||||
@@ -20414,7 +20291,7 @@ const restoreOperationSpec = {
|
|||||||
deletedContainerVersion
|
deletedContainerVersion
|
||||||
],
|
],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer$4
|
serializer: xmlSerializer$1
|
||||||
};
|
};
|
||||||
const renameOperationSpec = {
|
const renameOperationSpec = {
|
||||||
path: "/{containerName}",
|
path: "/{containerName}",
|
||||||
@@ -20442,9 +20319,9 @@ const renameOperationSpec = {
|
|||||||
sourceLeaseId
|
sourceLeaseId
|
||||||
],
|
],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer$4
|
serializer: xmlSerializer$1
|
||||||
};
|
};
|
||||||
const submitBatchOperationSpec = {
|
const submitBatchOperationSpec$1 = {
|
||||||
path: "/{containerName}",
|
path: "/{containerName}",
|
||||||
httpMethod: "POST",
|
httpMethod: "POST",
|
||||||
responses: {
|
responses: {
|
||||||
@@ -20478,39 +20355,9 @@ const submitBatchOperationSpec = {
|
|||||||
isXML: true,
|
isXML: true,
|
||||||
contentType: "application/xml; charset=utf-8",
|
contentType: "application/xml; charset=utf-8",
|
||||||
mediaType: "xml",
|
mediaType: "xml",
|
||||||
serializer: xmlSerializer$4
|
serializer: xmlSerializer$1
|
||||||
};
|
};
|
||||||
const filterBlobsOperationSpec = {
|
const acquireLeaseOperationSpec = {
|
||||||
path: "/{containerName}",
|
|
||||||
httpMethod: "GET",
|
|
||||||
responses: {
|
|
||||||
200: {
|
|
||||||
bodyMapper: FilterBlobSegment,
|
|
||||||
headersMapper: ContainerFilterBlobsHeaders
|
|
||||||
},
|
|
||||||
default: {
|
|
||||||
bodyMapper: StorageError,
|
|
||||||
headersMapper: ContainerFilterBlobsExceptionHeaders
|
|
||||||
}
|
|
||||||
},
|
|
||||||
queryParameters: [
|
|
||||||
timeoutInSeconds,
|
|
||||||
marker,
|
|
||||||
maxPageSize,
|
|
||||||
comp5,
|
|
||||||
where,
|
|
||||||
restype2
|
|
||||||
],
|
|
||||||
urlParameters: [url],
|
|
||||||
headerParameters: [
|
|
||||||
version,
|
|
||||||
requestId,
|
|
||||||
accept1
|
|
||||||
],
|
|
||||||
isXML: true,
|
|
||||||
serializer: xmlSerializer$4
|
|
||||||
};
|
|
||||||
const acquireLeaseOperationSpec$1 = {
|
|
||||||
path: "/{containerName}",
|
path: "/{containerName}",
|
||||||
httpMethod: "PUT",
|
httpMethod: "PUT",
|
||||||
responses: {
|
responses: {
|
||||||
@@ -20539,9 +20386,9 @@ const acquireLeaseOperationSpec$1 = {
|
|||||||
proposedLeaseId
|
proposedLeaseId
|
||||||
],
|
],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer$4
|
serializer: xmlSerializer$1
|
||||||
};
|
};
|
||||||
const releaseLeaseOperationSpec$1 = {
|
const releaseLeaseOperationSpec = {
|
||||||
path: "/{containerName}",
|
path: "/{containerName}",
|
||||||
httpMethod: "PUT",
|
httpMethod: "PUT",
|
||||||
responses: {
|
responses: {
|
||||||
@@ -20569,9 +20416,9 @@ const releaseLeaseOperationSpec$1 = {
|
|||||||
leaseId1
|
leaseId1
|
||||||
],
|
],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer$4
|
serializer: xmlSerializer$1
|
||||||
};
|
};
|
||||||
const renewLeaseOperationSpec$1 = {
|
const renewLeaseOperationSpec = {
|
||||||
path: "/{containerName}",
|
path: "/{containerName}",
|
||||||
httpMethod: "PUT",
|
httpMethod: "PUT",
|
||||||
responses: {
|
responses: {
|
||||||
@@ -20599,9 +20446,9 @@ const renewLeaseOperationSpec$1 = {
|
|||||||
action2
|
action2
|
||||||
],
|
],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer$4
|
serializer: xmlSerializer$1
|
||||||
};
|
};
|
||||||
const breakLeaseOperationSpec$1 = {
|
const breakLeaseOperationSpec = {
|
||||||
path: "/{containerName}",
|
path: "/{containerName}",
|
||||||
httpMethod: "PUT",
|
httpMethod: "PUT",
|
||||||
responses: {
|
responses: {
|
||||||
@@ -20629,9 +20476,9 @@ const breakLeaseOperationSpec$1 = {
|
|||||||
breakPeriod
|
breakPeriod
|
||||||
],
|
],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer$4
|
serializer: xmlSerializer$1
|
||||||
};
|
};
|
||||||
const changeLeaseOperationSpec$1 = {
|
const changeLeaseOperationSpec = {
|
||||||
path: "/{containerName}",
|
path: "/{containerName}",
|
||||||
httpMethod: "PUT",
|
httpMethod: "PUT",
|
||||||
responses: {
|
responses: {
|
||||||
@@ -20660,7 +20507,7 @@ const changeLeaseOperationSpec$1 = {
|
|||||||
proposedLeaseId1
|
proposedLeaseId1
|
||||||
],
|
],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer$4
|
serializer: xmlSerializer$1
|
||||||
};
|
};
|
||||||
const listBlobFlatSegmentOperationSpec = {
|
const listBlobFlatSegmentOperationSpec = {
|
||||||
path: "/{containerName}",
|
path: "/{containerName}",
|
||||||
@@ -20691,7 +20538,7 @@ const listBlobFlatSegmentOperationSpec = {
|
|||||||
accept1
|
accept1
|
||||||
],
|
],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer$4
|
serializer: xmlSerializer$1
|
||||||
};
|
};
|
||||||
const listBlobHierarchySegmentOperationSpec = {
|
const listBlobHierarchySegmentOperationSpec = {
|
||||||
path: "/{containerName}",
|
path: "/{containerName}",
|
||||||
@@ -20723,7 +20570,7 @@ const listBlobHierarchySegmentOperationSpec = {
|
|||||||
accept1
|
accept1
|
||||||
],
|
],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer$4
|
serializer: xmlSerializer$1
|
||||||
};
|
};
|
||||||
const getAccountInfoOperationSpec$1 = {
|
const getAccountInfoOperationSpec$1 = {
|
||||||
path: "/{containerName}",
|
path: "/{containerName}",
|
||||||
@@ -20741,7 +20588,7 @@ const getAccountInfoOperationSpec$1 = {
|
|||||||
urlParameters: [url],
|
urlParameters: [url],
|
||||||
headerParameters: [version, accept1],
|
headerParameters: [version, accept1],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer$4
|
serializer: xmlSerializer$1
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -20767,7 +20614,7 @@ class Blob$1 {
|
|||||||
*/
|
*/
|
||||||
download(options) {
|
download(options) {
|
||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, downloadOperationSpec);
|
return this.client.sendOperationRequest(operationArguments, downloadOperationSpec);
|
||||||
}
|
}
|
||||||
@@ -20778,9 +20625,9 @@ class Blob$1 {
|
|||||||
*/
|
*/
|
||||||
getProperties(options) {
|
getProperties(options) {
|
||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, getPropertiesOperationSpec);
|
return this.client.sendOperationRequest(operationArguments, getPropertiesOperationSpec$2);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* If the storage account's soft delete feature is disabled then, when a blob is deleted, it is
|
* If the storage account's soft delete feature is disabled then, when a blob is deleted, it is
|
||||||
@@ -20799,9 +20646,9 @@ class Blob$1 {
|
|||||||
*/
|
*/
|
||||||
delete(options) {
|
delete(options) {
|
||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, deleteOperationSpec);
|
return this.client.sendOperationRequest(operationArguments, deleteOperationSpec$1);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Undelete a blob that was previously soft deleted
|
* Undelete a blob that was previously soft deleted
|
||||||
@@ -20809,7 +20656,7 @@ class Blob$1 {
|
|||||||
*/
|
*/
|
||||||
undelete(options) {
|
undelete(options) {
|
||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, undeleteOperationSpec);
|
return this.client.sendOperationRequest(operationArguments, undeleteOperationSpec);
|
||||||
}
|
}
|
||||||
@@ -20821,7 +20668,7 @@ class Blob$1 {
|
|||||||
setExpiry(expiryOptions, options) {
|
setExpiry(expiryOptions, options) {
|
||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
expiryOptions,
|
expiryOptions,
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, setExpiryOperationSpec);
|
return this.client.sendOperationRequest(operationArguments, setExpiryOperationSpec);
|
||||||
}
|
}
|
||||||
@@ -20831,7 +20678,7 @@ class Blob$1 {
|
|||||||
*/
|
*/
|
||||||
setHttpHeaders(options) {
|
setHttpHeaders(options) {
|
||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, setHttpHeadersOperationSpec);
|
return this.client.sendOperationRequest(operationArguments, setHttpHeadersOperationSpec);
|
||||||
}
|
}
|
||||||
@@ -20841,7 +20688,7 @@ class Blob$1 {
|
|||||||
*/
|
*/
|
||||||
setImmutabilityPolicy(options) {
|
setImmutabilityPolicy(options) {
|
||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, setImmutabilityPolicyOperationSpec);
|
return this.client.sendOperationRequest(operationArguments, setImmutabilityPolicyOperationSpec);
|
||||||
}
|
}
|
||||||
@@ -20851,7 +20698,7 @@ class Blob$1 {
|
|||||||
*/
|
*/
|
||||||
deleteImmutabilityPolicy(options) {
|
deleteImmutabilityPolicy(options) {
|
||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, deleteImmutabilityPolicyOperationSpec);
|
return this.client.sendOperationRequest(operationArguments, deleteImmutabilityPolicyOperationSpec);
|
||||||
}
|
}
|
||||||
@@ -20863,7 +20710,7 @@ class Blob$1 {
|
|||||||
setLegalHold(legalHold, options) {
|
setLegalHold(legalHold, options) {
|
||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
legalHold,
|
legalHold,
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, setLegalHoldOperationSpec);
|
return this.client.sendOperationRequest(operationArguments, setLegalHoldOperationSpec);
|
||||||
}
|
}
|
||||||
@@ -20874,9 +20721,9 @@ class Blob$1 {
|
|||||||
*/
|
*/
|
||||||
setMetadata(options) {
|
setMetadata(options) {
|
||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, setMetadataOperationSpec);
|
return this.client.sendOperationRequest(operationArguments, setMetadataOperationSpec$1);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete
|
* [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete
|
||||||
@@ -20885,9 +20732,9 @@ class Blob$1 {
|
|||||||
*/
|
*/
|
||||||
acquireLease(options) {
|
acquireLease(options) {
|
||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, acquireLeaseOperationSpec);
|
return this.client.sendOperationRequest(operationArguments, acquireLeaseOperationSpec$1);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete
|
* [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete
|
||||||
@@ -20898,9 +20745,9 @@ class Blob$1 {
|
|||||||
releaseLease(leaseId, options) {
|
releaseLease(leaseId, options) {
|
||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
leaseId,
|
leaseId,
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, releaseLeaseOperationSpec);
|
return this.client.sendOperationRequest(operationArguments, releaseLeaseOperationSpec$1);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete
|
* [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete
|
||||||
@@ -20911,9 +20758,9 @@ class Blob$1 {
|
|||||||
renewLease(leaseId, options) {
|
renewLease(leaseId, options) {
|
||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
leaseId,
|
leaseId,
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, renewLeaseOperationSpec);
|
return this.client.sendOperationRequest(operationArguments, renewLeaseOperationSpec$1);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete
|
* [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete
|
||||||
@@ -20928,9 +20775,9 @@ class Blob$1 {
|
|||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
leaseId,
|
leaseId,
|
||||||
proposedLeaseId,
|
proposedLeaseId,
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, changeLeaseOperationSpec);
|
return this.client.sendOperationRequest(operationArguments, changeLeaseOperationSpec$1);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete
|
* [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete
|
||||||
@@ -20939,9 +20786,9 @@ class Blob$1 {
|
|||||||
*/
|
*/
|
||||||
breakLease(options) {
|
breakLease(options) {
|
||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, breakLeaseOperationSpec);
|
return this.client.sendOperationRequest(operationArguments, breakLeaseOperationSpec$1);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* The Create Snapshot operation creates a read-only snapshot of a blob
|
* The Create Snapshot operation creates a read-only snapshot of a blob
|
||||||
@@ -20949,7 +20796,7 @@ class Blob$1 {
|
|||||||
*/
|
*/
|
||||||
createSnapshot(options) {
|
createSnapshot(options) {
|
||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, createSnapshotOperationSpec);
|
return this.client.sendOperationRequest(operationArguments, createSnapshotOperationSpec);
|
||||||
}
|
}
|
||||||
@@ -20964,7 +20811,7 @@ class Blob$1 {
|
|||||||
startCopyFromURL(copySource, options) {
|
startCopyFromURL(copySource, options) {
|
||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
copySource,
|
copySource,
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, startCopyFromURLOperationSpec);
|
return this.client.sendOperationRequest(operationArguments, startCopyFromURLOperationSpec);
|
||||||
}
|
}
|
||||||
@@ -20980,7 +20827,7 @@ class Blob$1 {
|
|||||||
copyFromURL(copySource, options) {
|
copyFromURL(copySource, options) {
|
||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
copySource,
|
copySource,
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, copyFromURLOperationSpec);
|
return this.client.sendOperationRequest(operationArguments, copyFromURLOperationSpec);
|
||||||
}
|
}
|
||||||
@@ -20994,7 +20841,7 @@ class Blob$1 {
|
|||||||
abortCopyFromURL(copyId, options) {
|
abortCopyFromURL(copyId, options) {
|
||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
copyId,
|
copyId,
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, abortCopyFromURLOperationSpec);
|
return this.client.sendOperationRequest(operationArguments, abortCopyFromURLOperationSpec);
|
||||||
}
|
}
|
||||||
@@ -21010,7 +20857,7 @@ class Blob$1 {
|
|||||||
setTier(tier, options) {
|
setTier(tier, options) {
|
||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
tier,
|
tier,
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, setTierOperationSpec);
|
return this.client.sendOperationRequest(operationArguments, setTierOperationSpec);
|
||||||
}
|
}
|
||||||
@@ -21020,9 +20867,9 @@ class Blob$1 {
|
|||||||
*/
|
*/
|
||||||
getAccountInfo(options) {
|
getAccountInfo(options) {
|
||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, getAccountInfoOperationSpec);
|
return this.client.sendOperationRequest(operationArguments, getAccountInfoOperationSpec$2);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* The Query operation enables users to select/project on blob data by providing simple query
|
* The Query operation enables users to select/project on blob data by providing simple query
|
||||||
@@ -21031,7 +20878,7 @@ class Blob$1 {
|
|||||||
*/
|
*/
|
||||||
query(options) {
|
query(options) {
|
||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, queryOperationSpec);
|
return this.client.sendOperationRequest(operationArguments, queryOperationSpec);
|
||||||
}
|
}
|
||||||
@@ -21041,7 +20888,7 @@ class Blob$1 {
|
|||||||
*/
|
*/
|
||||||
getTags(options) {
|
getTags(options) {
|
||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, getTagsOperationSpec);
|
return this.client.sendOperationRequest(operationArguments, getTagsOperationSpec);
|
||||||
}
|
}
|
||||||
@@ -21051,13 +20898,13 @@ class Blob$1 {
|
|||||||
*/
|
*/
|
||||||
setTags(options) {
|
setTags(options) {
|
||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, setTagsOperationSpec);
|
return this.client.sendOperationRequest(operationArguments, setTagsOperationSpec);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Operation Specifications
|
// Operation Specifications
|
||||||
const xmlSerializer$3 = new coreHttp__namespace.Serializer(Mappers, /* isXml */ true);
|
const xmlSerializer$2 = new coreHttp.Serializer(Mappers, /* isXml */ true);
|
||||||
const downloadOperationSpec = {
|
const downloadOperationSpec = {
|
||||||
path: "/{containerName}/{blob}",
|
path: "/{containerName}/{blob}",
|
||||||
httpMethod: "GET",
|
httpMethod: "GET",
|
||||||
@@ -21105,9 +20952,9 @@ const downloadOperationSpec = {
|
|||||||
ifTags
|
ifTags
|
||||||
],
|
],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer$3
|
serializer: xmlSerializer$2
|
||||||
};
|
};
|
||||||
const getPropertiesOperationSpec = {
|
const getPropertiesOperationSpec$2 = {
|
||||||
path: "/{containerName}/{blob}",
|
path: "/{containerName}/{blob}",
|
||||||
httpMethod: "HEAD",
|
httpMethod: "HEAD",
|
||||||
responses: {
|
responses: {
|
||||||
@@ -21140,9 +20987,9 @@ const getPropertiesOperationSpec = {
|
|||||||
ifTags
|
ifTags
|
||||||
],
|
],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer$3
|
serializer: xmlSerializer$2
|
||||||
};
|
};
|
||||||
const deleteOperationSpec = {
|
const deleteOperationSpec$1 = {
|
||||||
path: "/{containerName}/{blob}",
|
path: "/{containerName}/{blob}",
|
||||||
httpMethod: "DELETE",
|
httpMethod: "DELETE",
|
||||||
responses: {
|
responses: {
|
||||||
@@ -21174,7 +21021,7 @@ const deleteOperationSpec = {
|
|||||||
deleteSnapshots
|
deleteSnapshots
|
||||||
],
|
],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer$3
|
serializer: xmlSerializer$2
|
||||||
};
|
};
|
||||||
const undeleteOperationSpec = {
|
const undeleteOperationSpec = {
|
||||||
path: "/{containerName}/{blob}",
|
path: "/{containerName}/{blob}",
|
||||||
@@ -21196,7 +21043,7 @@ const undeleteOperationSpec = {
|
|||||||
accept1
|
accept1
|
||||||
],
|
],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer$3
|
serializer: xmlSerializer$2
|
||||||
};
|
};
|
||||||
const setExpiryOperationSpec = {
|
const setExpiryOperationSpec = {
|
||||||
path: "/{containerName}/{blob}",
|
path: "/{containerName}/{blob}",
|
||||||
@@ -21220,7 +21067,7 @@ const setExpiryOperationSpec = {
|
|||||||
expiresOn
|
expiresOn
|
||||||
],
|
],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer$3
|
serializer: xmlSerializer$2
|
||||||
};
|
};
|
||||||
const setHttpHeadersOperationSpec = {
|
const setHttpHeadersOperationSpec = {
|
||||||
path: "/{containerName}/{blob}",
|
path: "/{containerName}/{blob}",
|
||||||
@@ -21254,7 +21101,7 @@ const setHttpHeadersOperationSpec = {
|
|||||||
blobContentDisposition
|
blobContentDisposition
|
||||||
],
|
],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer$3
|
serializer: xmlSerializer$2
|
||||||
};
|
};
|
||||||
const setImmutabilityPolicyOperationSpec = {
|
const setImmutabilityPolicyOperationSpec = {
|
||||||
path: "/{containerName}/{blob}",
|
path: "/{containerName}/{blob}",
|
||||||
@@ -21279,7 +21126,7 @@ const setImmutabilityPolicyOperationSpec = {
|
|||||||
immutabilityPolicyMode
|
immutabilityPolicyMode
|
||||||
],
|
],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer$3
|
serializer: xmlSerializer$2
|
||||||
};
|
};
|
||||||
const deleteImmutabilityPolicyOperationSpec = {
|
const deleteImmutabilityPolicyOperationSpec = {
|
||||||
path: "/{containerName}/{blob}",
|
path: "/{containerName}/{blob}",
|
||||||
@@ -21301,7 +21148,7 @@ const deleteImmutabilityPolicyOperationSpec = {
|
|||||||
accept1
|
accept1
|
||||||
],
|
],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer$3
|
serializer: xmlSerializer$2
|
||||||
};
|
};
|
||||||
const setLegalHoldOperationSpec = {
|
const setLegalHoldOperationSpec = {
|
||||||
path: "/{containerName}/{blob}",
|
path: "/{containerName}/{blob}",
|
||||||
@@ -21324,9 +21171,9 @@ const setLegalHoldOperationSpec = {
|
|||||||
legalHold
|
legalHold
|
||||||
],
|
],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer$3
|
serializer: xmlSerializer$2
|
||||||
};
|
};
|
||||||
const setMetadataOperationSpec = {
|
const setMetadataOperationSpec$1 = {
|
||||||
path: "/{containerName}/{blob}",
|
path: "/{containerName}/{blob}",
|
||||||
httpMethod: "PUT",
|
httpMethod: "PUT",
|
||||||
responses: {
|
responses: {
|
||||||
@@ -21357,9 +21204,9 @@ const setMetadataOperationSpec = {
|
|||||||
encryptionScope
|
encryptionScope
|
||||||
],
|
],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer$3
|
serializer: xmlSerializer$2
|
||||||
};
|
};
|
||||||
const acquireLeaseOperationSpec = {
|
const acquireLeaseOperationSpec$1 = {
|
||||||
path: "/{containerName}/{blob}",
|
path: "/{containerName}/{blob}",
|
||||||
httpMethod: "PUT",
|
httpMethod: "PUT",
|
||||||
responses: {
|
responses: {
|
||||||
@@ -21387,9 +21234,9 @@ const acquireLeaseOperationSpec = {
|
|||||||
ifTags
|
ifTags
|
||||||
],
|
],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer$3
|
serializer: xmlSerializer$2
|
||||||
};
|
};
|
||||||
const releaseLeaseOperationSpec = {
|
const releaseLeaseOperationSpec$1 = {
|
||||||
path: "/{containerName}/{blob}",
|
path: "/{containerName}/{blob}",
|
||||||
httpMethod: "PUT",
|
httpMethod: "PUT",
|
||||||
responses: {
|
responses: {
|
||||||
@@ -21416,9 +21263,9 @@ const releaseLeaseOperationSpec = {
|
|||||||
ifTags
|
ifTags
|
||||||
],
|
],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer$3
|
serializer: xmlSerializer$2
|
||||||
};
|
};
|
||||||
const renewLeaseOperationSpec = {
|
const renewLeaseOperationSpec$1 = {
|
||||||
path: "/{containerName}/{blob}",
|
path: "/{containerName}/{blob}",
|
||||||
httpMethod: "PUT",
|
httpMethod: "PUT",
|
||||||
responses: {
|
responses: {
|
||||||
@@ -21445,9 +21292,9 @@ const renewLeaseOperationSpec = {
|
|||||||
ifTags
|
ifTags
|
||||||
],
|
],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer$3
|
serializer: xmlSerializer$2
|
||||||
};
|
};
|
||||||
const changeLeaseOperationSpec = {
|
const changeLeaseOperationSpec$1 = {
|
||||||
path: "/{containerName}/{blob}",
|
path: "/{containerName}/{blob}",
|
||||||
httpMethod: "PUT",
|
httpMethod: "PUT",
|
||||||
responses: {
|
responses: {
|
||||||
@@ -21475,9 +21322,9 @@ const changeLeaseOperationSpec = {
|
|||||||
ifTags
|
ifTags
|
||||||
],
|
],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer$3
|
serializer: xmlSerializer$2
|
||||||
};
|
};
|
||||||
const breakLeaseOperationSpec = {
|
const breakLeaseOperationSpec$1 = {
|
||||||
path: "/{containerName}/{blob}",
|
path: "/{containerName}/{blob}",
|
||||||
httpMethod: "PUT",
|
httpMethod: "PUT",
|
||||||
responses: {
|
responses: {
|
||||||
@@ -21504,7 +21351,7 @@ const breakLeaseOperationSpec = {
|
|||||||
ifTags
|
ifTags
|
||||||
],
|
],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer$3
|
serializer: xmlSerializer$2
|
||||||
};
|
};
|
||||||
const createSnapshotOperationSpec = {
|
const createSnapshotOperationSpec = {
|
||||||
path: "/{containerName}/{blob}",
|
path: "/{containerName}/{blob}",
|
||||||
@@ -21537,7 +21384,7 @@ const createSnapshotOperationSpec = {
|
|||||||
encryptionScope
|
encryptionScope
|
||||||
],
|
],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer$3
|
serializer: xmlSerializer$2
|
||||||
};
|
};
|
||||||
const startCopyFromURLOperationSpec = {
|
const startCopyFromURLOperationSpec = {
|
||||||
path: "/{containerName}/{blob}",
|
path: "/{containerName}/{blob}",
|
||||||
@@ -21579,7 +21426,7 @@ const startCopyFromURLOperationSpec = {
|
|||||||
legalHold1
|
legalHold1
|
||||||
],
|
],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer$3
|
serializer: xmlSerializer$2
|
||||||
};
|
};
|
||||||
const copyFromURLOperationSpec = {
|
const copyFromURLOperationSpec = {
|
||||||
path: "/{containerName}/{blob}",
|
path: "/{containerName}/{blob}",
|
||||||
@@ -21608,7 +21455,6 @@ const copyFromURLOperationSpec = {
|
|||||||
ifTags,
|
ifTags,
|
||||||
immutabilityPolicyExpiry,
|
immutabilityPolicyExpiry,
|
||||||
immutabilityPolicyMode,
|
immutabilityPolicyMode,
|
||||||
encryptionScope,
|
|
||||||
tier,
|
tier,
|
||||||
sourceIfModifiedSince,
|
sourceIfModifiedSince,
|
||||||
sourceIfUnmodifiedSince,
|
sourceIfUnmodifiedSince,
|
||||||
@@ -21622,7 +21468,7 @@ const copyFromURLOperationSpec = {
|
|||||||
copySourceAuthorization
|
copySourceAuthorization
|
||||||
],
|
],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer$3
|
serializer: xmlSerializer$2
|
||||||
};
|
};
|
||||||
const abortCopyFromURLOperationSpec = {
|
const abortCopyFromURLOperationSpec = {
|
||||||
path: "/{containerName}/{blob}",
|
path: "/{containerName}/{blob}",
|
||||||
@@ -21650,7 +21496,7 @@ const abortCopyFromURLOperationSpec = {
|
|||||||
copyActionAbortConstant
|
copyActionAbortConstant
|
||||||
],
|
],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer$3
|
serializer: xmlSerializer$2
|
||||||
};
|
};
|
||||||
const setTierOperationSpec = {
|
const setTierOperationSpec = {
|
||||||
path: "/{containerName}/{blob}",
|
path: "/{containerName}/{blob}",
|
||||||
@@ -21684,9 +21530,9 @@ const setTierOperationSpec = {
|
|||||||
tier1
|
tier1
|
||||||
],
|
],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer$3
|
serializer: xmlSerializer$2
|
||||||
};
|
};
|
||||||
const getAccountInfoOperationSpec = {
|
const getAccountInfoOperationSpec$2 = {
|
||||||
path: "/{containerName}/{blob}",
|
path: "/{containerName}/{blob}",
|
||||||
httpMethod: "GET",
|
httpMethod: "GET",
|
||||||
responses: {
|
responses: {
|
||||||
@@ -21702,7 +21548,7 @@ const getAccountInfoOperationSpec = {
|
|||||||
urlParameters: [url],
|
urlParameters: [url],
|
||||||
headerParameters: [version, accept1],
|
headerParameters: [version, accept1],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer$3
|
serializer: xmlSerializer$2
|
||||||
};
|
};
|
||||||
const queryOperationSpec = {
|
const queryOperationSpec = {
|
||||||
path: "/{containerName}/{blob}",
|
path: "/{containerName}/{blob}",
|
||||||
@@ -21752,7 +21598,7 @@ const queryOperationSpec = {
|
|||||||
isXML: true,
|
isXML: true,
|
||||||
contentType: "application/xml; charset=utf-8",
|
contentType: "application/xml; charset=utf-8",
|
||||||
mediaType: "xml",
|
mediaType: "xml",
|
||||||
serializer: xmlSerializer$3
|
serializer: xmlSerializer$2
|
||||||
};
|
};
|
||||||
const getTagsOperationSpec = {
|
const getTagsOperationSpec = {
|
||||||
path: "/{containerName}/{blob}",
|
path: "/{containerName}/{blob}",
|
||||||
@@ -21782,7 +21628,7 @@ const getTagsOperationSpec = {
|
|||||||
ifTags
|
ifTags
|
||||||
],
|
],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer$3
|
serializer: xmlSerializer$2
|
||||||
};
|
};
|
||||||
const setTagsOperationSpec = {
|
const setTagsOperationSpec = {
|
||||||
path: "/{containerName}/{blob}",
|
path: "/{containerName}/{blob}",
|
||||||
@@ -21816,7 +21662,7 @@ const setTagsOperationSpec = {
|
|||||||
isXML: true,
|
isXML: true,
|
||||||
contentType: "application/xml; charset=utf-8",
|
contentType: "application/xml; charset=utf-8",
|
||||||
mediaType: "xml",
|
mediaType: "xml",
|
||||||
serializer: xmlSerializer$3
|
serializer: xmlSerializer$2
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -21846,7 +21692,7 @@ class PageBlob {
|
|||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
contentLength,
|
contentLength,
|
||||||
blobContentLength,
|
blobContentLength,
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, createOperationSpec$1);
|
return this.client.sendOperationRequest(operationArguments, createOperationSpec$1);
|
||||||
}
|
}
|
||||||
@@ -21860,7 +21706,7 @@ class PageBlob {
|
|||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
contentLength,
|
contentLength,
|
||||||
body,
|
body,
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, uploadPagesOperationSpec);
|
return this.client.sendOperationRequest(operationArguments, uploadPagesOperationSpec);
|
||||||
}
|
}
|
||||||
@@ -21872,7 +21718,7 @@ class PageBlob {
|
|||||||
clearPages(contentLength, options) {
|
clearPages(contentLength, options) {
|
||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
contentLength,
|
contentLength,
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, clearPagesOperationSpec);
|
return this.client.sendOperationRequest(operationArguments, clearPagesOperationSpec);
|
||||||
}
|
}
|
||||||
@@ -21893,7 +21739,7 @@ class PageBlob {
|
|||||||
sourceRange,
|
sourceRange,
|
||||||
contentLength,
|
contentLength,
|
||||||
range,
|
range,
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, uploadPagesFromURLOperationSpec);
|
return this.client.sendOperationRequest(operationArguments, uploadPagesFromURLOperationSpec);
|
||||||
}
|
}
|
||||||
@@ -21904,7 +21750,7 @@ class PageBlob {
|
|||||||
*/
|
*/
|
||||||
getPageRanges(options) {
|
getPageRanges(options) {
|
||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, getPageRangesOperationSpec);
|
return this.client.sendOperationRequest(operationArguments, getPageRangesOperationSpec);
|
||||||
}
|
}
|
||||||
@@ -21915,7 +21761,7 @@ class PageBlob {
|
|||||||
*/
|
*/
|
||||||
getPageRangesDiff(options) {
|
getPageRangesDiff(options) {
|
||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, getPageRangesDiffOperationSpec);
|
return this.client.sendOperationRequest(operationArguments, getPageRangesDiffOperationSpec);
|
||||||
}
|
}
|
||||||
@@ -21928,7 +21774,7 @@ class PageBlob {
|
|||||||
resize(blobContentLength, options) {
|
resize(blobContentLength, options) {
|
||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
blobContentLength,
|
blobContentLength,
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, resizeOperationSpec);
|
return this.client.sendOperationRequest(operationArguments, resizeOperationSpec);
|
||||||
}
|
}
|
||||||
@@ -21942,7 +21788,7 @@ class PageBlob {
|
|||||||
updateSequenceNumber(sequenceNumberAction, options) {
|
updateSequenceNumber(sequenceNumberAction, options) {
|
||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
sequenceNumberAction,
|
sequenceNumberAction,
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, updateSequenceNumberOperationSpec);
|
return this.client.sendOperationRequest(operationArguments, updateSequenceNumberOperationSpec);
|
||||||
}
|
}
|
||||||
@@ -21961,14 +21807,14 @@ class PageBlob {
|
|||||||
copyIncremental(copySource, options) {
|
copyIncremental(copySource, options) {
|
||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
copySource,
|
copySource,
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, copyIncrementalOperationSpec);
|
return this.client.sendOperationRequest(operationArguments, copyIncrementalOperationSpec);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Operation Specifications
|
// Operation Specifications
|
||||||
const xmlSerializer$2 = new coreHttp__namespace.Serializer(Mappers, /* isXml */ true);
|
const xmlSerializer$3 = new coreHttp.Serializer(Mappers, /* isXml */ true);
|
||||||
const serializer$2 = new coreHttp__namespace.Serializer(Mappers, /* isXml */ false);
|
const serializer = new coreHttp.Serializer(Mappers, /* isXml */ false);
|
||||||
const createOperationSpec$1 = {
|
const createOperationSpec$1 = {
|
||||||
path: "/{containerName}/{blob}",
|
path: "/{containerName}/{blob}",
|
||||||
httpMethod: "PUT",
|
httpMethod: "PUT",
|
||||||
@@ -22015,7 +21861,7 @@ const createOperationSpec$1 = {
|
|||||||
blobSequenceNumber
|
blobSequenceNumber
|
||||||
],
|
],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer$2
|
serializer: xmlSerializer$3
|
||||||
};
|
};
|
||||||
const uploadPagesOperationSpec = {
|
const uploadPagesOperationSpec = {
|
||||||
path: "/{containerName}/{blob}",
|
path: "/{containerName}/{blob}",
|
||||||
@@ -22057,7 +21903,7 @@ const uploadPagesOperationSpec = {
|
|||||||
ifSequenceNumberEqualTo
|
ifSequenceNumberEqualTo
|
||||||
],
|
],
|
||||||
mediaType: "binary",
|
mediaType: "binary",
|
||||||
serializer: serializer$2
|
serializer
|
||||||
};
|
};
|
||||||
const clearPagesOperationSpec = {
|
const clearPagesOperationSpec = {
|
||||||
path: "/{containerName}/{blob}",
|
path: "/{containerName}/{blob}",
|
||||||
@@ -22095,7 +21941,7 @@ const clearPagesOperationSpec = {
|
|||||||
pageWrite1
|
pageWrite1
|
||||||
],
|
],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer$2
|
serializer: xmlSerializer$3
|
||||||
};
|
};
|
||||||
const uploadPagesFromURLOperationSpec = {
|
const uploadPagesFromURLOperationSpec = {
|
||||||
path: "/{containerName}/{blob}",
|
path: "/{containerName}/{blob}",
|
||||||
@@ -22142,7 +21988,7 @@ const uploadPagesFromURLOperationSpec = {
|
|||||||
range1
|
range1
|
||||||
],
|
],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer$2
|
serializer: xmlSerializer$3
|
||||||
};
|
};
|
||||||
const getPageRangesOperationSpec = {
|
const getPageRangesOperationSpec = {
|
||||||
path: "/{containerName}/{blob}",
|
path: "/{containerName}/{blob}",
|
||||||
@@ -22176,7 +22022,7 @@ const getPageRangesOperationSpec = {
|
|||||||
ifTags
|
ifTags
|
||||||
],
|
],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer$2
|
serializer: xmlSerializer$3
|
||||||
};
|
};
|
||||||
const getPageRangesDiffOperationSpec = {
|
const getPageRangesDiffOperationSpec = {
|
||||||
path: "/{containerName}/{blob}",
|
path: "/{containerName}/{blob}",
|
||||||
@@ -22212,7 +22058,7 @@ const getPageRangesDiffOperationSpec = {
|
|||||||
prevSnapshotUrl
|
prevSnapshotUrl
|
||||||
],
|
],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer$2
|
serializer: xmlSerializer$3
|
||||||
};
|
};
|
||||||
const resizeOperationSpec = {
|
const resizeOperationSpec = {
|
||||||
path: "/{containerName}/{blob}",
|
path: "/{containerName}/{blob}",
|
||||||
@@ -22245,7 +22091,7 @@ const resizeOperationSpec = {
|
|||||||
blobContentLength
|
blobContentLength
|
||||||
],
|
],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer$2
|
serializer: xmlSerializer$3
|
||||||
};
|
};
|
||||||
const updateSequenceNumberOperationSpec = {
|
const updateSequenceNumberOperationSpec = {
|
||||||
path: "/{containerName}/{blob}",
|
path: "/{containerName}/{blob}",
|
||||||
@@ -22275,7 +22121,7 @@ const updateSequenceNumberOperationSpec = {
|
|||||||
sequenceNumberAction
|
sequenceNumberAction
|
||||||
],
|
],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer$2
|
serializer: xmlSerializer$3
|
||||||
};
|
};
|
||||||
const copyIncrementalOperationSpec = {
|
const copyIncrementalOperationSpec = {
|
||||||
path: "/{containerName}/{blob}",
|
path: "/{containerName}/{blob}",
|
||||||
@@ -22303,7 +22149,7 @@ const copyIncrementalOperationSpec = {
|
|||||||
copySource
|
copySource
|
||||||
],
|
],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer$2
|
serializer: xmlSerializer$3
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -22330,9 +22176,9 @@ class AppendBlob {
|
|||||||
create(contentLength, options) {
|
create(contentLength, options) {
|
||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
contentLength,
|
contentLength,
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, createOperationSpec);
|
return this.client.sendOperationRequest(operationArguments, createOperationSpec$2);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* The Append Block operation commits a new block of data to the end of an existing append blob. The
|
* The Append Block operation commits a new block of data to the end of an existing append blob. The
|
||||||
@@ -22346,7 +22192,7 @@ class AppendBlob {
|
|||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
contentLength,
|
contentLength,
|
||||||
body,
|
body,
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, appendBlockOperationSpec);
|
return this.client.sendOperationRequest(operationArguments, appendBlockOperationSpec);
|
||||||
}
|
}
|
||||||
@@ -22363,7 +22209,7 @@ class AppendBlob {
|
|||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
sourceUrl,
|
sourceUrl,
|
||||||
contentLength,
|
contentLength,
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, appendBlockFromUrlOperationSpec);
|
return this.client.sendOperationRequest(operationArguments, appendBlockFromUrlOperationSpec);
|
||||||
}
|
}
|
||||||
@@ -22374,15 +22220,15 @@ class AppendBlob {
|
|||||||
*/
|
*/
|
||||||
seal(options) {
|
seal(options) {
|
||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, sealOperationSpec);
|
return this.client.sendOperationRequest(operationArguments, sealOperationSpec);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Operation Specifications
|
// Operation Specifications
|
||||||
const xmlSerializer$1 = new coreHttp__namespace.Serializer(Mappers, /* isXml */ true);
|
const xmlSerializer$4 = new coreHttp.Serializer(Mappers, /* isXml */ true);
|
||||||
const serializer$1 = new coreHttp__namespace.Serializer(Mappers, /* isXml */ false);
|
const serializer$1 = new coreHttp.Serializer(Mappers, /* isXml */ false);
|
||||||
const createOperationSpec = {
|
const createOperationSpec$2 = {
|
||||||
path: "/{containerName}/{blob}",
|
path: "/{containerName}/{blob}",
|
||||||
httpMethod: "PUT",
|
httpMethod: "PUT",
|
||||||
responses: {
|
responses: {
|
||||||
@@ -22425,7 +22271,7 @@ const createOperationSpec = {
|
|||||||
blobType1
|
blobType1
|
||||||
],
|
],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer$1
|
serializer: xmlSerializer$4
|
||||||
};
|
};
|
||||||
const appendBlockOperationSpec = {
|
const appendBlockOperationSpec = {
|
||||||
path: "/{containerName}/{blob}",
|
path: "/{containerName}/{blob}",
|
||||||
@@ -22509,7 +22355,7 @@ const appendBlockFromUrlOperationSpec = {
|
|||||||
sourceRange1
|
sourceRange1
|
||||||
],
|
],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer$1
|
serializer: xmlSerializer$4
|
||||||
};
|
};
|
||||||
const sealOperationSpec = {
|
const sealOperationSpec = {
|
||||||
path: "/{containerName}/{blob}",
|
path: "/{containerName}/{blob}",
|
||||||
@@ -22537,7 +22383,7 @@ const sealOperationSpec = {
|
|||||||
appendPosition
|
appendPosition
|
||||||
],
|
],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer$1
|
serializer: xmlSerializer$4
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -22569,7 +22415,7 @@ class BlockBlob {
|
|||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
contentLength,
|
contentLength,
|
||||||
body,
|
body,
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, uploadOperationSpec);
|
return this.client.sendOperationRequest(operationArguments, uploadOperationSpec);
|
||||||
}
|
}
|
||||||
@@ -22590,7 +22436,7 @@ class BlockBlob {
|
|||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
contentLength,
|
contentLength,
|
||||||
copySource,
|
copySource,
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, putBlobFromUrlOperationSpec);
|
return this.client.sendOperationRequest(operationArguments, putBlobFromUrlOperationSpec);
|
||||||
}
|
}
|
||||||
@@ -22608,7 +22454,7 @@ class BlockBlob {
|
|||||||
blockId,
|
blockId,
|
||||||
contentLength,
|
contentLength,
|
||||||
body,
|
body,
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, stageBlockOperationSpec);
|
return this.client.sendOperationRequest(operationArguments, stageBlockOperationSpec);
|
||||||
}
|
}
|
||||||
@@ -22627,7 +22473,7 @@ class BlockBlob {
|
|||||||
blockId,
|
blockId,
|
||||||
contentLength,
|
contentLength,
|
||||||
sourceUrl,
|
sourceUrl,
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, stageBlockFromURLOperationSpec);
|
return this.client.sendOperationRequest(operationArguments, stageBlockFromURLOperationSpec);
|
||||||
}
|
}
|
||||||
@@ -22645,7 +22491,7 @@ class BlockBlob {
|
|||||||
commitBlockList(blocks, options) {
|
commitBlockList(blocks, options) {
|
||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
blocks,
|
blocks,
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, commitBlockListOperationSpec);
|
return this.client.sendOperationRequest(operationArguments, commitBlockListOperationSpec);
|
||||||
}
|
}
|
||||||
@@ -22659,14 +22505,14 @@ class BlockBlob {
|
|||||||
getBlockList(listType, options) {
|
getBlockList(listType, options) {
|
||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
listType,
|
listType,
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, getBlockListOperationSpec);
|
return this.client.sendOperationRequest(operationArguments, getBlockListOperationSpec);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Operation Specifications
|
// Operation Specifications
|
||||||
const xmlSerializer = new coreHttp__namespace.Serializer(Mappers, /* isXml */ true);
|
const xmlSerializer$5 = new coreHttp.Serializer(Mappers, /* isXml */ true);
|
||||||
const serializer = new coreHttp__namespace.Serializer(Mappers, /* isXml */ false);
|
const serializer$2 = new coreHttp.Serializer(Mappers, /* isXml */ false);
|
||||||
const uploadOperationSpec = {
|
const uploadOperationSpec = {
|
||||||
path: "/{containerName}/{blob}",
|
path: "/{containerName}/{blob}",
|
||||||
httpMethod: "PUT",
|
httpMethod: "PUT",
|
||||||
@@ -22714,7 +22560,7 @@ const uploadOperationSpec = {
|
|||||||
blobType2
|
blobType2
|
||||||
],
|
],
|
||||||
mediaType: "binary",
|
mediaType: "binary",
|
||||||
serializer
|
serializer: serializer$2
|
||||||
};
|
};
|
||||||
const putBlobFromUrlOperationSpec = {
|
const putBlobFromUrlOperationSpec = {
|
||||||
path: "/{containerName}/{blob}",
|
path: "/{containerName}/{blob}",
|
||||||
@@ -22767,7 +22613,7 @@ const putBlobFromUrlOperationSpec = {
|
|||||||
copySourceBlobProperties
|
copySourceBlobProperties
|
||||||
],
|
],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer
|
serializer: xmlSerializer$5
|
||||||
};
|
};
|
||||||
const stageBlockOperationSpec = {
|
const stageBlockOperationSpec = {
|
||||||
path: "/{containerName}/{blob}",
|
path: "/{containerName}/{blob}",
|
||||||
@@ -22803,7 +22649,7 @@ const stageBlockOperationSpec = {
|
|||||||
accept2
|
accept2
|
||||||
],
|
],
|
||||||
mediaType: "binary",
|
mediaType: "binary",
|
||||||
serializer
|
serializer: serializer$2
|
||||||
};
|
};
|
||||||
const stageBlockFromURLOperationSpec = {
|
const stageBlockFromURLOperationSpec = {
|
||||||
path: "/{containerName}/{blob}",
|
path: "/{containerName}/{blob}",
|
||||||
@@ -22844,7 +22690,7 @@ const stageBlockFromURLOperationSpec = {
|
|||||||
sourceRange1
|
sourceRange1
|
||||||
],
|
],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer
|
serializer: xmlSerializer$5
|
||||||
};
|
};
|
||||||
const commitBlockListOperationSpec = {
|
const commitBlockListOperationSpec = {
|
||||||
path: "/{containerName}/{blob}",
|
path: "/{containerName}/{blob}",
|
||||||
@@ -22894,7 +22740,7 @@ const commitBlockListOperationSpec = {
|
|||||||
isXML: true,
|
isXML: true,
|
||||||
contentType: "application/xml; charset=utf-8",
|
contentType: "application/xml; charset=utf-8",
|
||||||
mediaType: "xml",
|
mediaType: "xml",
|
||||||
serializer: xmlSerializer
|
serializer: xmlSerializer$5
|
||||||
};
|
};
|
||||||
const getBlockListOperationSpec = {
|
const getBlockListOperationSpec = {
|
||||||
path: "/{containerName}/{blob}",
|
path: "/{containerName}/{blob}",
|
||||||
@@ -22924,7 +22770,7 @@ const getBlockListOperationSpec = {
|
|||||||
ifTags
|
ifTags
|
||||||
],
|
],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer
|
serializer: xmlSerializer$5
|
||||||
};
|
};
|
||||||
|
|
||||||
// Copyright (c) Microsoft Corporation.
|
// Copyright (c) Microsoft Corporation.
|
||||||
@@ -22935,8 +22781,8 @@ const logger = logger$1.createClientLogger("storage-blob");
|
|||||||
|
|
||||||
// Copyright (c) Microsoft Corporation.
|
// Copyright (c) Microsoft Corporation.
|
||||||
// Licensed under the MIT license.
|
// Licensed under the MIT license.
|
||||||
const SDK_VERSION = "12.9.0";
|
const SDK_VERSION = "12.8.0";
|
||||||
const SERVICE_VERSION = "2021-04-10";
|
const SERVICE_VERSION = "2020-10-02";
|
||||||
const BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES = 256 * 1024 * 1024; // 256MB
|
const BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES = 256 * 1024 * 1024; // 256MB
|
||||||
const BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES = 4000 * 1024 * 1024; // 4000MB
|
const BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES = 4000 * 1024 * 1024; // 4000MB
|
||||||
const BLOCK_BLOB_MAX_BLOCKS = 50000;
|
const BLOCK_BLOB_MAX_BLOCKS = 50000;
|
||||||
@@ -22953,15 +22799,15 @@ const URLConstants = {
|
|||||||
SIGNATURE: "sig",
|
SIGNATURE: "sig",
|
||||||
SNAPSHOT: "snapshot",
|
SNAPSHOT: "snapshot",
|
||||||
VERSIONID: "versionid",
|
VERSIONID: "versionid",
|
||||||
TIMEOUT: "timeout",
|
TIMEOUT: "timeout"
|
||||||
},
|
}
|
||||||
};
|
};
|
||||||
const HTTPURLConnection = {
|
const HTTPURLConnection = {
|
||||||
HTTP_ACCEPTED: 202,
|
HTTP_ACCEPTED: 202,
|
||||||
HTTP_CONFLICT: 409,
|
HTTP_CONFLICT: 409,
|
||||||
HTTP_NOT_FOUND: 404,
|
HTTP_NOT_FOUND: 404,
|
||||||
HTTP_PRECON_FAILED: 412,
|
HTTP_PRECON_FAILED: 412,
|
||||||
HTTP_RANGE_NOT_SATISFIABLE: 416,
|
HTTP_RANGE_NOT_SATISFIABLE: 416
|
||||||
};
|
};
|
||||||
const HeaderConstants = {
|
const HeaderConstants = {
|
||||||
AUTHORIZATION: "Authorization",
|
AUTHORIZATION: "Authorization",
|
||||||
@@ -22986,7 +22832,7 @@ const HeaderConstants = {
|
|||||||
X_MS_COPY_SOURCE: "x-ms-copy-source",
|
X_MS_COPY_SOURCE: "x-ms-copy-source",
|
||||||
X_MS_DATE: "x-ms-date",
|
X_MS_DATE: "x-ms-date",
|
||||||
X_MS_ERROR_CODE: "x-ms-error-code",
|
X_MS_ERROR_CODE: "x-ms-error-code",
|
||||||
X_MS_VERSION: "x-ms-version",
|
X_MS_VERSION: "x-ms-version"
|
||||||
};
|
};
|
||||||
const ETagNone = "";
|
const ETagNone = "";
|
||||||
const ETagAny = "*";
|
const ETagAny = "*";
|
||||||
@@ -23091,7 +22937,7 @@ const StorageBlobLoggingAllowedHeaderNames = [
|
|||||||
"x-ms-tag-count",
|
"x-ms-tag-count",
|
||||||
"x-ms-encryption-key-sha256",
|
"x-ms-encryption-key-sha256",
|
||||||
"x-ms-if-tags",
|
"x-ms-if-tags",
|
||||||
"x-ms-source-if-tags",
|
"x-ms-source-if-tags"
|
||||||
];
|
];
|
||||||
const StorageBlobLoggingAllowedQueryParameters = [
|
const StorageBlobLoggingAllowedQueryParameters = [
|
||||||
"comp",
|
"comp",
|
||||||
@@ -23126,9 +22972,8 @@ const StorageBlobLoggingAllowedQueryParameters = [
|
|||||||
"skt",
|
"skt",
|
||||||
"sktid",
|
"sktid",
|
||||||
"skv",
|
"skv",
|
||||||
"snapshot",
|
"snapshot"
|
||||||
];
|
];
|
||||||
const BlobUsesCustomerSpecifiedEncryptionMsg = "BlobUsesCustomerSpecifiedEncryption";
|
|
||||||
|
|
||||||
// Copyright (c) Microsoft Corporation.
|
// Copyright (c) Microsoft Corporation.
|
||||||
/**
|
/**
|
||||||
@@ -23268,7 +23113,7 @@ function extractConnectionStringParts(connectionString) {
|
|||||||
url: blobEndpoint,
|
url: blobEndpoint,
|
||||||
accountName,
|
accountName,
|
||||||
accountKey,
|
accountKey,
|
||||||
proxyUri,
|
proxyUri
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -23600,14 +23445,14 @@ function toBlobTags(tags) {
|
|||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
const res = {
|
const res = {
|
||||||
blobTagSet: [],
|
blobTagSet: []
|
||||||
};
|
};
|
||||||
for (const key in tags) {
|
for (const key in tags) {
|
||||||
if (Object.prototype.hasOwnProperty.call(tags, key)) {
|
if (Object.prototype.hasOwnProperty.call(tags, key)) {
|
||||||
const value = tags[key];
|
const value = tags[key];
|
||||||
res.blobTagSet.push({
|
res.blobTagSet.push({
|
||||||
key,
|
key,
|
||||||
value,
|
value
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -23647,33 +23492,33 @@ function toQuerySerialization(textConfiguration) {
|
|||||||
fieldQuote: textConfiguration.fieldQuote || "",
|
fieldQuote: textConfiguration.fieldQuote || "",
|
||||||
recordSeparator: textConfiguration.recordSeparator,
|
recordSeparator: textConfiguration.recordSeparator,
|
||||||
escapeChar: textConfiguration.escapeCharacter || "",
|
escapeChar: textConfiguration.escapeCharacter || "",
|
||||||
headersPresent: textConfiguration.hasHeaders || false,
|
headersPresent: textConfiguration.hasHeaders || false
|
||||||
},
|
}
|
||||||
},
|
}
|
||||||
};
|
};
|
||||||
case "json":
|
case "json":
|
||||||
return {
|
return {
|
||||||
format: {
|
format: {
|
||||||
type: "json",
|
type: "json",
|
||||||
jsonTextConfiguration: {
|
jsonTextConfiguration: {
|
||||||
recordSeparator: textConfiguration.recordSeparator,
|
recordSeparator: textConfiguration.recordSeparator
|
||||||
},
|
}
|
||||||
},
|
}
|
||||||
};
|
};
|
||||||
case "arrow":
|
case "arrow":
|
||||||
return {
|
return {
|
||||||
format: {
|
format: {
|
||||||
type: "arrow",
|
type: "arrow",
|
||||||
arrowConfiguration: {
|
arrowConfiguration: {
|
||||||
schema: textConfiguration.schema,
|
schema: textConfiguration.schema
|
||||||
},
|
}
|
||||||
},
|
}
|
||||||
};
|
};
|
||||||
case "parquet":
|
case "parquet":
|
||||||
return {
|
return {
|
||||||
format: {
|
format: {
|
||||||
type: "parquet",
|
type: "parquet"
|
||||||
},
|
}
|
||||||
};
|
};
|
||||||
default:
|
default:
|
||||||
throw Error("Invalid BlobQueryTextConfiguration.");
|
throw Error("Invalid BlobQueryTextConfiguration.");
|
||||||
@@ -23697,7 +23542,7 @@ function parseObjectReplicationRecord(objectReplicationRecord) {
|
|||||||
}
|
}
|
||||||
const rule = {
|
const rule = {
|
||||||
ruleId: ids[1],
|
ruleId: ids[1],
|
||||||
replicationStatus: objectReplicationRecord[key],
|
replicationStatus: objectReplicationRecord[key]
|
||||||
};
|
};
|
||||||
const policyIndex = orProperties.findIndex((policy) => policy.policyId === ids[0]);
|
const policyIndex = orProperties.findIndex((policy) => policy.policyId === ids[0]);
|
||||||
if (policyIndex > -1) {
|
if (policyIndex > -1) {
|
||||||
@@ -23706,7 +23551,7 @@ function parseObjectReplicationRecord(objectReplicationRecord) {
|
|||||||
else {
|
else {
|
||||||
orProperties.push({
|
orProperties.push({
|
||||||
policyId: ids[0],
|
policyId: ids[0],
|
||||||
rules: [rule],
|
rules: [rule]
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -23725,202 +23570,6 @@ function attachCredential(thing, credential) {
|
|||||||
function httpAuthorizationToString(httpAuthorization) {
|
function httpAuthorizationToString(httpAuthorization) {
|
||||||
return httpAuthorization ? httpAuthorization.scheme + " " + httpAuthorization.value : undefined;
|
return httpAuthorization ? httpAuthorization.scheme + " " + httpAuthorization.value : undefined;
|
||||||
}
|
}
|
||||||
function BlobNameToString(name) {
|
|
||||||
if (name.encoded) {
|
|
||||||
return decodeURIComponent(name.content);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
return name.content;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
function ConvertInternalResponseOfListBlobFlat(internalResponse) {
|
|
||||||
return Object.assign(Object.assign({}, internalResponse), { segment: {
|
|
||||||
blobItems: internalResponse.segment.blobItems.map((blobItemInteral) => {
|
|
||||||
const blobItem = Object.assign(Object.assign({}, blobItemInteral), { name: BlobNameToString(blobItemInteral.name) });
|
|
||||||
return blobItem;
|
|
||||||
}),
|
|
||||||
} });
|
|
||||||
}
|
|
||||||
function ConvertInternalResponseOfListBlobHierarchy(internalResponse) {
|
|
||||||
var _a;
|
|
||||||
return Object.assign(Object.assign({}, internalResponse), { segment: {
|
|
||||||
blobPrefixes: (_a = internalResponse.segment.blobPrefixes) === null || _a === void 0 ? void 0 : _a.map((blobPrefixInternal) => {
|
|
||||||
const blobPrefix = {
|
|
||||||
name: BlobNameToString(blobPrefixInternal.name),
|
|
||||||
};
|
|
||||||
return blobPrefix;
|
|
||||||
}),
|
|
||||||
blobItems: internalResponse.segment.blobItems.map((blobItemInteral) => {
|
|
||||||
const blobItem = Object.assign(Object.assign({}, blobItemInteral), { name: BlobNameToString(blobItemInteral.name) });
|
|
||||||
return blobItem;
|
|
||||||
}),
|
|
||||||
} });
|
|
||||||
}
|
|
||||||
function decodeBase64String(value) {
|
|
||||||
if (coreHttp.isNode) {
|
|
||||||
return Buffer.from(value, "base64");
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
const byteString = atob(value);
|
|
||||||
const arr = new Uint8Array(byteString.length);
|
|
||||||
for (let i = 0; i < byteString.length; i++) {
|
|
||||||
arr[i] = byteString.charCodeAt(i);
|
|
||||||
}
|
|
||||||
return arr;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
function ParseBoolean(content) {
|
|
||||||
if (content === undefined)
|
|
||||||
return undefined;
|
|
||||||
if (content === "true")
|
|
||||||
return true;
|
|
||||||
if (content === "false")
|
|
||||||
return false;
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
function ParseBlobName(blobNameInXML) {
|
|
||||||
if (blobNameInXML["$"] !== undefined && blobNameInXML["#"] !== undefined) {
|
|
||||||
return {
|
|
||||||
encoded: ParseBoolean(blobNameInXML["$"]["Encoded"]),
|
|
||||||
content: blobNameInXML["#"],
|
|
||||||
};
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
return {
|
|
||||||
encoded: false,
|
|
||||||
content: blobNameInXML,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
function ParseBlobItem(blobInXML) {
|
|
||||||
const blobPropertiesInXML = blobInXML["Properties"];
|
|
||||||
const blobProperties = {
|
|
||||||
createdOn: new Date(blobPropertiesInXML["Creation-Time"]),
|
|
||||||
lastModified: new Date(blobPropertiesInXML["Last-Modified"]),
|
|
||||||
etag: blobPropertiesInXML["Etag"],
|
|
||||||
contentLength: blobPropertiesInXML["Content-Length"] === undefined
|
|
||||||
? undefined
|
|
||||||
: parseFloat(blobPropertiesInXML["Content-Length"]),
|
|
||||||
contentType: blobPropertiesInXML["Content-Type"],
|
|
||||||
contentEncoding: blobPropertiesInXML["Content-Encoding"],
|
|
||||||
contentLanguage: blobPropertiesInXML["Content-Language"],
|
|
||||||
contentMD5: decodeBase64String(blobPropertiesInXML["Content-MD5"]),
|
|
||||||
contentDisposition: blobPropertiesInXML["Content-Disposition"],
|
|
||||||
cacheControl: blobPropertiesInXML["Cache-Control"],
|
|
||||||
blobSequenceNumber: blobPropertiesInXML["x-ms-blob-sequence-number"] === undefined
|
|
||||||
? undefined
|
|
||||||
: parseFloat(blobPropertiesInXML["x-ms-blob-sequence-number"]),
|
|
||||||
blobType: blobPropertiesInXML["BlobType"],
|
|
||||||
leaseStatus: blobPropertiesInXML["LeaseStatus"],
|
|
||||||
leaseState: blobPropertiesInXML["LeaseState"],
|
|
||||||
leaseDuration: blobPropertiesInXML["LeaseDuration"],
|
|
||||||
copyId: blobPropertiesInXML["CopyId"],
|
|
||||||
copyStatus: blobPropertiesInXML["CopyStatus"],
|
|
||||||
copySource: blobPropertiesInXML["CopySource"],
|
|
||||||
copyProgress: blobPropertiesInXML["CopyProgress"],
|
|
||||||
copyCompletedOn: blobPropertiesInXML["CopyCompletionTime"] === undefined
|
|
||||||
? undefined
|
|
||||||
: new Date(blobPropertiesInXML["CopyCompletionTime"]),
|
|
||||||
copyStatusDescription: blobPropertiesInXML["CopyStatusDescription"],
|
|
||||||
serverEncrypted: ParseBoolean(blobPropertiesInXML["ServerEncrypted"]),
|
|
||||||
incrementalCopy: ParseBoolean(blobPropertiesInXML["IncrementalCopy"]),
|
|
||||||
destinationSnapshot: blobPropertiesInXML["DestinationSnapshot"],
|
|
||||||
deletedOn: blobPropertiesInXML["DeletedTime"] === undefined
|
|
||||||
? undefined
|
|
||||||
: new Date(blobPropertiesInXML["DeletedTime"]),
|
|
||||||
remainingRetentionDays: blobPropertiesInXML["RemainingRetentionDays"] === undefined
|
|
||||||
? undefined
|
|
||||||
: parseFloat(blobPropertiesInXML["RemainingRetentionDays"]),
|
|
||||||
accessTier: blobPropertiesInXML["AccessTier"],
|
|
||||||
accessTierInferred: ParseBoolean(blobPropertiesInXML["AccessTierInferred"]),
|
|
||||||
archiveStatus: blobPropertiesInXML["ArchiveStatus"],
|
|
||||||
customerProvidedKeySha256: blobPropertiesInXML["CustomerProvidedKeySha256"],
|
|
||||||
encryptionScope: blobPropertiesInXML["EncryptionScope"],
|
|
||||||
accessTierChangedOn: blobPropertiesInXML["AccessTierChangeTime"] === undefined
|
|
||||||
? undefined
|
|
||||||
: new Date(blobPropertiesInXML["AccessTierChangeTime"]),
|
|
||||||
tagCount: blobPropertiesInXML["TagCount"] === undefined
|
|
||||||
? undefined
|
|
||||||
: parseFloat(blobPropertiesInXML["TagCount"]),
|
|
||||||
expiresOn: blobPropertiesInXML["Expiry-Time"] === undefined
|
|
||||||
? undefined
|
|
||||||
: new Date(blobPropertiesInXML["Expiry-Time"]),
|
|
||||||
isSealed: ParseBoolean(blobPropertiesInXML["Sealed"]),
|
|
||||||
rehydratePriority: blobPropertiesInXML["RehydratePriority"],
|
|
||||||
lastAccessedOn: blobPropertiesInXML["LastAccessTime"] === undefined
|
|
||||||
? undefined
|
|
||||||
: new Date(blobPropertiesInXML["LastAccessTime"]),
|
|
||||||
immutabilityPolicyExpiresOn: blobPropertiesInXML["ImmutabilityPolicyUntilDate"] === undefined
|
|
||||||
? undefined
|
|
||||||
: new Date(blobPropertiesInXML["ImmutabilityPolicyUntilDate"]),
|
|
||||||
immutabilityPolicyMode: blobPropertiesInXML["ImmutabilityPolicyMode"],
|
|
||||||
legalHold: ParseBoolean(blobPropertiesInXML["LegalHold"]),
|
|
||||||
};
|
|
||||||
return {
|
|
||||||
name: ParseBlobName(blobInXML["Name"]),
|
|
||||||
deleted: ParseBoolean(blobInXML["Deleted"]),
|
|
||||||
snapshot: blobInXML["Snapshot"],
|
|
||||||
versionId: blobInXML["VersionId"],
|
|
||||||
isCurrentVersion: ParseBoolean(blobInXML["IsCurrentVersion"]),
|
|
||||||
properties: blobProperties,
|
|
||||||
metadata: blobInXML["Metadata"],
|
|
||||||
blobTags: ParseBlobTags(blobInXML["Tags"]),
|
|
||||||
objectReplicationMetadata: blobInXML["OrMetadata"],
|
|
||||||
hasVersionsOnly: ParseBoolean(blobInXML["HasVersionsOnly"]),
|
|
||||||
};
|
|
||||||
}
|
|
||||||
function ParseBlobPrefix(blobPrefixInXML) {
|
|
||||||
return {
|
|
||||||
name: ParseBlobName(blobPrefixInXML["Name"]),
|
|
||||||
};
|
|
||||||
}
|
|
||||||
function ParseBlobTag(blobTagInXML) {
|
|
||||||
return {
|
|
||||||
key: blobTagInXML["Key"],
|
|
||||||
value: blobTagInXML["Value"],
|
|
||||||
};
|
|
||||||
}
|
|
||||||
function ParseBlobTags(blobTagsInXML) {
|
|
||||||
if (blobTagsInXML === undefined ||
|
|
||||||
blobTagsInXML["TagSet"] === undefined ||
|
|
||||||
blobTagsInXML["TagSet"]["Tag"] === undefined) {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
const blobTagSet = [];
|
|
||||||
if (blobTagsInXML["TagSet"]["Tag"] instanceof Array) {
|
|
||||||
blobTagsInXML["TagSet"]["Tag"].forEach((blobTagInXML) => {
|
|
||||||
blobTagSet.push(ParseBlobTag(blobTagInXML));
|
|
||||||
});
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
blobTagSet.push(ParseBlobTag(blobTagsInXML["TagSet"]["Tag"]));
|
|
||||||
}
|
|
||||||
return { blobTagSet: blobTagSet };
|
|
||||||
}
|
|
||||||
function ProcessBlobItems(blobArrayInXML) {
|
|
||||||
const blobItems = [];
|
|
||||||
if (blobArrayInXML instanceof Array) {
|
|
||||||
blobArrayInXML.forEach((blobInXML) => {
|
|
||||||
blobItems.push(ParseBlobItem(blobInXML));
|
|
||||||
});
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
blobItems.push(ParseBlobItem(blobArrayInXML));
|
|
||||||
}
|
|
||||||
return blobItems;
|
|
||||||
}
|
|
||||||
function ProcessBlobPrefixes(blobPrefixesInXML) {
|
|
||||||
const blobPrefixes = [];
|
|
||||||
if (blobPrefixesInXML instanceof Array) {
|
|
||||||
blobPrefixesInXML.forEach((blobPrefixInXML) => {
|
|
||||||
blobPrefixes.push(ParseBlobPrefix(blobPrefixInXML));
|
|
||||||
});
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
blobPrefixes.push(ParseBlobPrefix(blobPrefixesInXML));
|
|
||||||
}
|
|
||||||
return blobPrefixes;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Copyright (c) Microsoft Corporation.
|
// Copyright (c) Microsoft Corporation.
|
||||||
/**
|
/**
|
||||||
@@ -23951,16 +23600,9 @@ class StorageBrowserPolicy extends coreHttp.BaseRequestPolicy {
|
|||||||
* @param request -
|
* @param request -
|
||||||
*/
|
*/
|
||||||
async sendRequest(request) {
|
async sendRequest(request) {
|
||||||
if (coreHttp.isNode) {
|
{
|
||||||
return this._nextPolicy.sendRequest(request);
|
return this._nextPolicy.sendRequest(request);
|
||||||
}
|
}
|
||||||
if (request.method.toUpperCase() === "GET" || request.method.toUpperCase() === "HEAD") {
|
|
||||||
request.url = setURLParameter(request.url, URLConstants.Parameters.FORCE_BROWSER_NO_CACHE, new Date().getTime().toString());
|
|
||||||
}
|
|
||||||
request.headers.remove(HeaderConstants.COOKIE);
|
|
||||||
// According to XHR standards, content-length should be fully controlled by browsers
|
|
||||||
request.headers.remove(HeaderConstants.CONTENT_LENGTH);
|
|
||||||
return this._nextPolicy.sendRequest(request);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -23981,10 +23623,6 @@ class StorageBrowserPolicyFactory {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Copyright (c) Microsoft Corporation.
|
// Copyright (c) Microsoft Corporation.
|
||||||
/**
|
|
||||||
* RetryPolicy types.
|
|
||||||
*/
|
|
||||||
exports.StorageRetryPolicyType = void 0;
|
|
||||||
(function (StorageRetryPolicyType) {
|
(function (StorageRetryPolicyType) {
|
||||||
/**
|
/**
|
||||||
* Exponential retry. Retry time delay grows exponentially.
|
* Exponential retry. Retry time delay grows exponentially.
|
||||||
@@ -24002,7 +23640,7 @@ const DEFAULT_RETRY_OPTIONS = {
|
|||||||
retryDelayInMs: 4 * 1000,
|
retryDelayInMs: 4 * 1000,
|
||||||
retryPolicyType: exports.StorageRetryPolicyType.EXPONENTIAL,
|
retryPolicyType: exports.StorageRetryPolicyType.EXPONENTIAL,
|
||||||
secondaryHost: "",
|
secondaryHost: "",
|
||||||
tryTimeoutInMs: undefined, // Use server side default timeout strategy
|
tryTimeoutInMs: undefined // Use server side default timeout strategy
|
||||||
};
|
};
|
||||||
const RETRY_ABORT_ERROR = new abortController.AbortError("The operation was aborted.");
|
const RETRY_ABORT_ERROR = new abortController.AbortError("The operation was aborted.");
|
||||||
/**
|
/**
|
||||||
@@ -24039,7 +23677,7 @@ class StorageRetryPolicy extends coreHttp.BaseRequestPolicy {
|
|||||||
: DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs,
|
: DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs,
|
||||||
secondaryHost: retryOptions.secondaryHost
|
secondaryHost: retryOptions.secondaryHost
|
||||||
? retryOptions.secondaryHost
|
? retryOptions.secondaryHost
|
||||||
: DEFAULT_RETRY_OPTIONS.secondaryHost,
|
: DEFAULT_RETRY_OPTIONS.secondaryHost
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@@ -24116,7 +23754,7 @@ class StorageRetryPolicy extends coreHttp.BaseRequestPolicy {
|
|||||||
"ENOTFOUND",
|
"ENOTFOUND",
|
||||||
"TIMEOUT",
|
"TIMEOUT",
|
||||||
"EPIPE",
|
"EPIPE",
|
||||||
"REQUEST_SEND_ERROR", // For default xhr based http client provided in ms-rest-js
|
"REQUEST_SEND_ERROR" // For default xhr based http client provided in ms-rest-js
|
||||||
];
|
];
|
||||||
if (err) {
|
if (err) {
|
||||||
for (const retriableError of retriableErrors) {
|
for (const retriableError of retriableErrors) {
|
||||||
@@ -24302,7 +23940,7 @@ class TelemetryPolicy extends coreHttp.BaseRequestPolicy {
|
|||||||
* @param request -
|
* @param request -
|
||||||
*/
|
*/
|
||||||
async sendRequest(request) {
|
async sendRequest(request) {
|
||||||
if (coreHttp.isNode) {
|
{
|
||||||
if (!request.headers) {
|
if (!request.headers) {
|
||||||
request.headers = new coreHttp.HttpHeaders();
|
request.headers = new coreHttp.HttpHeaders();
|
||||||
}
|
}
|
||||||
@@ -24325,7 +23963,7 @@ class TelemetryPolicyFactory {
|
|||||||
*/
|
*/
|
||||||
constructor(telemetry) {
|
constructor(telemetry) {
|
||||||
const userAgentInfo = [];
|
const userAgentInfo = [];
|
||||||
if (coreHttp.isNode) {
|
{
|
||||||
if (telemetry) {
|
if (telemetry) {
|
||||||
const telemetryString = telemetry.userAgentPrefix || "";
|
const telemetryString = telemetry.userAgentPrefix || "";
|
||||||
if (telemetryString.length > 0 && userAgentInfo.indexOf(telemetryString) === -1) {
|
if (telemetryString.length > 0 && userAgentInfo.indexOf(telemetryString) === -1) {
|
||||||
@@ -24338,7 +23976,7 @@ class TelemetryPolicyFactory {
|
|||||||
userAgentInfo.push(libInfo);
|
userAgentInfo.push(libInfo);
|
||||||
}
|
}
|
||||||
// e.g. (NODE-VERSION 4.9.1; Windows_NT 10.0.16299)
|
// e.g. (NODE-VERSION 4.9.1; Windows_NT 10.0.16299)
|
||||||
const runtimeInfo = `(NODE-VERSION ${process.version}; ${os__namespace.type()} ${os__namespace.release()})`;
|
const runtimeInfo = `(NODE-VERSION ${process.version}; ${os.type()} ${os.release()})`;
|
||||||
if (userAgentInfo.indexOf(runtimeInfo) === -1) {
|
if (userAgentInfo.indexOf(runtimeInfo) === -1) {
|
||||||
userAgentInfo.push(runtimeInfo);
|
userAgentInfo.push(runtimeInfo);
|
||||||
}
|
}
|
||||||
@@ -24362,247 +24000,6 @@ function getCachedDefaultHttpClient() {
|
|||||||
return _defaultHttpClient;
|
return _defaultHttpClient;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Copyright (c) Microsoft Corporation.
|
|
||||||
/**
|
|
||||||
* A set of constants used internally when processing requests.
|
|
||||||
*/
|
|
||||||
const Constants = {
|
|
||||||
DefaultScope: "/.default",
|
|
||||||
/**
|
|
||||||
* Defines constants for use with HTTP headers.
|
|
||||||
*/
|
|
||||||
HeaderConstants: {
|
|
||||||
/**
|
|
||||||
* The Authorization header.
|
|
||||||
*/
|
|
||||||
AUTHORIZATION: "authorization",
|
|
||||||
},
|
|
||||||
};
|
|
||||||
// Default options for the cycler if none are provided
|
|
||||||
const DEFAULT_CYCLER_OPTIONS = {
|
|
||||||
forcedRefreshWindowInMs: 1000,
|
|
||||||
retryIntervalInMs: 3000,
|
|
||||||
refreshWindowInMs: 1000 * 60 * 2, // Start refreshing 2m before expiry
|
|
||||||
};
|
|
||||||
/**
|
|
||||||
* Converts an an unreliable access token getter (which may resolve with null)
|
|
||||||
* into an AccessTokenGetter by retrying the unreliable getter in a regular
|
|
||||||
* interval.
|
|
||||||
*
|
|
||||||
* @param getAccessToken - a function that produces a promise of an access
|
|
||||||
* token that may fail by returning null
|
|
||||||
* @param retryIntervalInMs - the time (in milliseconds) to wait between retry
|
|
||||||
* attempts
|
|
||||||
* @param timeoutInMs - the timestamp after which the refresh attempt will fail,
|
|
||||||
* throwing an exception
|
|
||||||
* @returns - a promise that, if it resolves, will resolve with an access token
|
|
||||||
*/
|
|
||||||
async function beginRefresh(getAccessToken, retryIntervalInMs, timeoutInMs) {
|
|
||||||
// This wrapper handles exceptions gracefully as long as we haven't exceeded
|
|
||||||
// the timeout.
|
|
||||||
async function tryGetAccessToken() {
|
|
||||||
if (Date.now() < timeoutInMs) {
|
|
||||||
try {
|
|
||||||
return await getAccessToken();
|
|
||||||
}
|
|
||||||
catch (_a) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
const finalToken = await getAccessToken();
|
|
||||||
// Timeout is up, so throw if it's still null
|
|
||||||
if (finalToken === null) {
|
|
||||||
throw new Error("Failed to refresh access token.");
|
|
||||||
}
|
|
||||||
return finalToken;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
let token = await tryGetAccessToken();
|
|
||||||
while (token === null) {
|
|
||||||
await coreHttp.delay(retryIntervalInMs);
|
|
||||||
token = await tryGetAccessToken();
|
|
||||||
}
|
|
||||||
return token;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Creates a token cycler from a credential, scopes, and optional settings.
|
|
||||||
*
|
|
||||||
* A token cycler represents a way to reliably retrieve a valid access token
|
|
||||||
* from a TokenCredential. It will handle initializing the token, refreshing it
|
|
||||||
* when it nears expiration, and synchronizes refresh attempts to avoid
|
|
||||||
* concurrency hazards.
|
|
||||||
*
|
|
||||||
* @param credential - the underlying TokenCredential that provides the access
|
|
||||||
* token
|
|
||||||
* @param scopes - the scopes to request authorization for
|
|
||||||
* @param tokenCyclerOptions - optionally override default settings for the cycler
|
|
||||||
*
|
|
||||||
* @returns - a function that reliably produces a valid access token
|
|
||||||
*/
|
|
||||||
function createTokenCycler(credential, scopes, tokenCyclerOptions) {
|
|
||||||
let refreshWorker = null;
|
|
||||||
let token = null;
|
|
||||||
const options = Object.assign(Object.assign({}, DEFAULT_CYCLER_OPTIONS), tokenCyclerOptions);
|
|
||||||
/**
|
|
||||||
* This little holder defines several predicates that we use to construct
|
|
||||||
* the rules of refreshing the token.
|
|
||||||
*/
|
|
||||||
const cycler = {
|
|
||||||
/**
|
|
||||||
* Produces true if a refresh job is currently in progress.
|
|
||||||
*/
|
|
||||||
get isRefreshing() {
|
|
||||||
return refreshWorker !== null;
|
|
||||||
},
|
|
||||||
/**
|
|
||||||
* Produces true if the cycler SHOULD refresh (we are within the refresh
|
|
||||||
* window and not already refreshing)
|
|
||||||
*/
|
|
||||||
get shouldRefresh() {
|
|
||||||
var _a;
|
|
||||||
return (!cycler.isRefreshing &&
|
|
||||||
((_a = token === null || token === void 0 ? void 0 : token.expiresOnTimestamp) !== null && _a !== void 0 ? _a : 0) - options.refreshWindowInMs < Date.now());
|
|
||||||
},
|
|
||||||
/**
|
|
||||||
* Produces true if the cycler MUST refresh (null or nearly-expired
|
|
||||||
* token).
|
|
||||||
*/
|
|
||||||
get mustRefresh() {
|
|
||||||
return (token === null || token.expiresOnTimestamp - options.forcedRefreshWindowInMs < Date.now());
|
|
||||||
},
|
|
||||||
};
|
|
||||||
/**
|
|
||||||
* Starts a refresh job or returns the existing job if one is already
|
|
||||||
* running.
|
|
||||||
*/
|
|
||||||
function refresh(getTokenOptions) {
|
|
||||||
var _a;
|
|
||||||
if (!cycler.isRefreshing) {
|
|
||||||
// We bind `scopes` here to avoid passing it around a lot
|
|
||||||
const tryGetAccessToken = () => credential.getToken(scopes, getTokenOptions);
|
|
||||||
// Take advantage of promise chaining to insert an assignment to `token`
|
|
||||||
// before the refresh can be considered done.
|
|
||||||
refreshWorker = beginRefresh(tryGetAccessToken, options.retryIntervalInMs,
|
|
||||||
// If we don't have a token, then we should timeout immediately
|
|
||||||
(_a = token === null || token === void 0 ? void 0 : token.expiresOnTimestamp) !== null && _a !== void 0 ? _a : Date.now())
|
|
||||||
.then((_token) => {
|
|
||||||
refreshWorker = null;
|
|
||||||
token = _token;
|
|
||||||
return token;
|
|
||||||
})
|
|
||||||
.catch((reason) => {
|
|
||||||
// We also should reset the refresher if we enter a failed state. All
|
|
||||||
// existing awaiters will throw, but subsequent requests will start a
|
|
||||||
// new retry chain.
|
|
||||||
refreshWorker = null;
|
|
||||||
token = null;
|
|
||||||
throw reason;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
return refreshWorker;
|
|
||||||
}
|
|
||||||
return async (tokenOptions) => {
|
|
||||||
//
|
|
||||||
// Simple rules:
|
|
||||||
// - If we MUST refresh, then return the refresh task, blocking
|
|
||||||
// the pipeline until a token is available.
|
|
||||||
// - If we SHOULD refresh, then run refresh but don't return it
|
|
||||||
// (we can still use the cached token).
|
|
||||||
// - Return the token, since it's fine if we didn't return in
|
|
||||||
// step 1.
|
|
||||||
//
|
|
||||||
if (cycler.mustRefresh)
|
|
||||||
return refresh(tokenOptions);
|
|
||||||
if (cycler.shouldRefresh) {
|
|
||||||
refresh(tokenOptions);
|
|
||||||
}
|
|
||||||
return token;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* We will retrieve the challenge only if the response status code was 401,
|
|
||||||
* and if the response contained the header "WWW-Authenticate" with a non-empty value.
|
|
||||||
*/
|
|
||||||
function getChallenge(response) {
|
|
||||||
const challenge = response.headers.get("WWW-Authenticate");
|
|
||||||
if (response.status === 401 && challenge) {
|
|
||||||
return challenge;
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Converts: `Bearer a="b" c="d"`.
|
|
||||||
* Into: `[ { a: 'b', c: 'd' }]`.
|
|
||||||
*
|
|
||||||
* @internal
|
|
||||||
*/
|
|
||||||
function parseChallenge(challenge) {
|
|
||||||
const bearerChallenge = challenge.slice("Bearer ".length);
|
|
||||||
const challengeParts = `${bearerChallenge.trim()} `.split(" ").filter((x) => x);
|
|
||||||
const keyValuePairs = challengeParts.map((keyValue) => (([key, value]) => ({ [key]: value }))(keyValue.trim().split("=")));
|
|
||||||
// Key-value pairs to plain object:
|
|
||||||
return keyValuePairs.reduce((a, b) => (Object.assign(Object.assign({}, a), b)), {});
|
|
||||||
}
|
|
||||||
// #endregion
|
|
||||||
/**
|
|
||||||
* Creates a new factory for a RequestPolicy that applies a bearer token to
|
|
||||||
* the requests' `Authorization` headers.
|
|
||||||
*
|
|
||||||
* @param credential - The TokenCredential implementation that can supply the bearer token.
|
|
||||||
* @param scopes - The scopes for which the bearer token applies.
|
|
||||||
*/
|
|
||||||
function storageBearerTokenChallengeAuthenticationPolicy(credential, scopes) {
|
|
||||||
// This simple function encapsulates the entire process of reliably retrieving the token
|
|
||||||
let getToken = createTokenCycler(credential, scopes);
|
|
||||||
class StorageBearerTokenChallengeAuthenticationPolicy extends coreHttp.BaseRequestPolicy {
|
|
||||||
constructor(nextPolicy, options) {
|
|
||||||
super(nextPolicy, options);
|
|
||||||
}
|
|
||||||
async sendRequest(webResource) {
|
|
||||||
if (!webResource.url.toLowerCase().startsWith("https://")) {
|
|
||||||
throw new Error("Bearer token authentication is not permitted for non-TLS protected (non-https) URLs.");
|
|
||||||
}
|
|
||||||
const getTokenInternal = getToken;
|
|
||||||
const token = (await getTokenInternal({
|
|
||||||
abortSignal: webResource.abortSignal,
|
|
||||||
tracingOptions: {
|
|
||||||
tracingContext: webResource.tracingContext,
|
|
||||||
},
|
|
||||||
})).token;
|
|
||||||
webResource.headers.set(Constants.HeaderConstants.AUTHORIZATION, `Bearer ${token}`);
|
|
||||||
const response = await this._nextPolicy.sendRequest(webResource);
|
|
||||||
if ((response === null || response === void 0 ? void 0 : response.status) === 401) {
|
|
||||||
const challenge = getChallenge(response);
|
|
||||||
if (challenge) {
|
|
||||||
const challengeInfo = parseChallenge(challenge);
|
|
||||||
const challengeScopes = challengeInfo.resource_id + Constants.DefaultScope;
|
|
||||||
const parsedAuthUri = coreHttp.URLBuilder.parse(challengeInfo.authorization_uri);
|
|
||||||
const pathSegments = parsedAuthUri.getPath().split("/");
|
|
||||||
const tenantId = pathSegments[1];
|
|
||||||
const getTokenForChallenge = createTokenCycler(credential, challengeScopes);
|
|
||||||
const tokenForChallenge = (await getTokenForChallenge({
|
|
||||||
abortSignal: webResource.abortSignal,
|
|
||||||
tracingOptions: {
|
|
||||||
tracingContext: webResource.tracingContext,
|
|
||||||
},
|
|
||||||
tenantId: tenantId,
|
|
||||||
})).token;
|
|
||||||
getToken = getTokenForChallenge;
|
|
||||||
webResource.headers.set(Constants.HeaderConstants.AUTHORIZATION, `Bearer ${tokenForChallenge}`);
|
|
||||||
return this._nextPolicy.sendRequest(webResource);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return response;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
create: (nextPolicy, options) => {
|
|
||||||
return new StorageBearerTokenChallengeAuthenticationPolicy(nextPolicy, options);
|
|
||||||
},
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
// Copyright (c) Microsoft Corporation.
|
// Copyright (c) Microsoft Corporation.
|
||||||
/**
|
/**
|
||||||
* A helper to decide if a given argument satisfies the Pipeline contract
|
* A helper to decide if a given argument satisfies the Pipeline contract
|
||||||
@@ -24648,7 +24045,7 @@ class Pipeline {
|
|||||||
toServiceClientOptions() {
|
toServiceClientOptions() {
|
||||||
return {
|
return {
|
||||||
httpClient: this.options.httpClient,
|
httpClient: this.options.httpClient,
|
||||||
requestPolicyFactories: this.factories,
|
requestPolicyFactories: this.factories
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -24660,7 +24057,6 @@ class Pipeline {
|
|||||||
* @returns A new Pipeline object.
|
* @returns A new Pipeline object.
|
||||||
*/
|
*/
|
||||||
function newPipeline(credential, pipelineOptions = {}) {
|
function newPipeline(credential, pipelineOptions = {}) {
|
||||||
var _a;
|
|
||||||
if (credential === undefined) {
|
if (credential === undefined) {
|
||||||
credential = new AnonymousCredential();
|
credential = new AnonymousCredential();
|
||||||
}
|
}
|
||||||
@@ -24682,16 +24078,16 @@ function newPipeline(credential, pipelineOptions = {}) {
|
|||||||
coreHttp.logPolicy({
|
coreHttp.logPolicy({
|
||||||
logger: logger.info,
|
logger: logger.info,
|
||||||
allowedHeaderNames: StorageBlobLoggingAllowedHeaderNames,
|
allowedHeaderNames: StorageBlobLoggingAllowedHeaderNames,
|
||||||
allowedQueryParameters: StorageBlobLoggingAllowedQueryParameters,
|
allowedQueryParameters: StorageBlobLoggingAllowedQueryParameters
|
||||||
}),
|
})
|
||||||
];
|
];
|
||||||
if (coreHttp.isNode) {
|
{
|
||||||
// policies only available in Node.js runtime, not in browsers
|
// policies only available in Node.js runtime, not in browsers
|
||||||
factories.push(coreHttp.proxyPolicy(pipelineOptions.proxyOptions));
|
factories.push(coreHttp.proxyPolicy(pipelineOptions.proxyOptions));
|
||||||
factories.push(coreHttp.disableResponseDecompressionPolicy());
|
factories.push(coreHttp.disableResponseDecompressionPolicy());
|
||||||
}
|
}
|
||||||
factories.push(coreHttp.isTokenCredential(credential)
|
factories.push(coreHttp.isTokenCredential(credential)
|
||||||
? attachCredential(storageBearerTokenChallengeAuthenticationPolicy(credential, (_a = pipelineOptions.audience) !== null && _a !== void 0 ? _a : StorageOAuthScopes), credential)
|
? attachCredential(coreHttp.bearerTokenAuthenticationPolicy(credential, StorageOAuthScopes), credential)
|
||||||
: credential);
|
: credential);
|
||||||
return new Pipeline(factories, pipelineOptions);
|
return new Pipeline(factories, pipelineOptions);
|
||||||
}
|
}
|
||||||
@@ -24718,9 +24114,7 @@ class StorageSharedKeyCredentialPolicy extends CredentialPolicy {
|
|||||||
*/
|
*/
|
||||||
signRequest(request) {
|
signRequest(request) {
|
||||||
request.headers.set(HeaderConstants.X_MS_DATE, new Date().toUTCString());
|
request.headers.set(HeaderConstants.X_MS_DATE, new Date().toUTCString());
|
||||||
if (request.body &&
|
if (request.body && typeof request.body === "string" && request.body.length > 0) {
|
||||||
(typeof request.body === "string" || request.body !== undefined) &&
|
|
||||||
request.body.length > 0) {
|
|
||||||
request.headers.set(HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body));
|
request.headers.set(HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body));
|
||||||
}
|
}
|
||||||
const stringToSign = [
|
const stringToSign = [
|
||||||
@@ -24735,7 +24129,7 @@ class StorageSharedKeyCredentialPolicy extends CredentialPolicy {
|
|||||||
this.getHeaderValueToSign(request, HeaderConstants.IF_MATCH),
|
this.getHeaderValueToSign(request, HeaderConstants.IF_MATCH),
|
||||||
this.getHeaderValueToSign(request, HeaderConstants.IF_NONE_MATCH),
|
this.getHeaderValueToSign(request, HeaderConstants.IF_NONE_MATCH),
|
||||||
this.getHeaderValueToSign(request, HeaderConstants.IF_UNMODIFIED_SINCE),
|
this.getHeaderValueToSign(request, HeaderConstants.IF_UNMODIFIED_SINCE),
|
||||||
this.getHeaderValueToSign(request, HeaderConstants.RANGE),
|
this.getHeaderValueToSign(request, HeaderConstants.RANGE)
|
||||||
].join("\n") +
|
].join("\n") +
|
||||||
"\n" +
|
"\n" +
|
||||||
this.getCanonicalizedHeadersString(request) +
|
this.getCanonicalizedHeadersString(request) +
|
||||||
@@ -24864,7 +24258,9 @@ class StorageSharedKeyCredential extends Credential {
|
|||||||
* @param stringToSign -
|
* @param stringToSign -
|
||||||
*/
|
*/
|
||||||
computeHMACSHA256(stringToSign) {
|
computeHMACSHA256(stringToSign) {
|
||||||
return crypto.createHmac("sha256", this.accountKey).update(stringToSign, "utf8").digest("base64");
|
return crypto.createHmac("sha256", this.accountKey)
|
||||||
|
.update(stringToSign, "utf8")
|
||||||
|
.digest("base64");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -24876,8 +24272,8 @@ class StorageSharedKeyCredential extends Credential {
|
|||||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||||
*/
|
*/
|
||||||
const packageName = "azure-storage-blob";
|
const packageName = "azure-storage-blob";
|
||||||
const packageVersion = "12.9.0";
|
const packageVersion = "12.8.0";
|
||||||
class StorageClientContext extends coreHttp__namespace.ServiceClient {
|
class StorageClientContext extends coreHttp.ServiceClient {
|
||||||
/**
|
/**
|
||||||
* Initializes a new instance of the StorageClientContext class.
|
* Initializes a new instance of the StorageClientContext class.
|
||||||
* @param url The URL of the service account, container, or blob that is the target of the desired
|
* @param url The URL of the service account, container, or blob that is the target of the desired
|
||||||
@@ -24893,7 +24289,7 @@ class StorageClientContext extends coreHttp__namespace.ServiceClient {
|
|||||||
options = {};
|
options = {};
|
||||||
}
|
}
|
||||||
if (!options.userAgent) {
|
if (!options.userAgent) {
|
||||||
const defaultUserAgent = coreHttp__namespace.getDefaultUserAgentValue();
|
const defaultUserAgent = coreHttp.getDefaultUserAgentValue();
|
||||||
options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`;
|
options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`;
|
||||||
}
|
}
|
||||||
super(undefined, options);
|
super(undefined, options);
|
||||||
@@ -24902,7 +24298,7 @@ class StorageClientContext extends coreHttp__namespace.ServiceClient {
|
|||||||
// Parameter assignments
|
// Parameter assignments
|
||||||
this.url = url;
|
this.url = url;
|
||||||
// Assigning values to Constant parameters
|
// Assigning values to Constant parameters
|
||||||
this.version = options.version || "2021-04-10";
|
this.version = options.version || "2020-10-02";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -24949,7 +24345,7 @@ class StorageClient {
|
|||||||
*/
|
*/
|
||||||
const createSpan = coreTracing.createSpanFunction({
|
const createSpan = coreTracing.createSpanFunction({
|
||||||
packagePrefix: "Azure.Storage.Blob",
|
packagePrefix: "Azure.Storage.Blob",
|
||||||
namespace: "Microsoft.Storage",
|
namespace: "Microsoft.Storage"
|
||||||
});
|
});
|
||||||
/**
|
/**
|
||||||
* @internal
|
* @internal
|
||||||
@@ -24963,7 +24359,7 @@ function convertTracingToRequestOptionsBase(options) {
|
|||||||
return {
|
return {
|
||||||
// By passing spanOptions if they exist at runtime, we're backwards compatible with @azure/core-tracing@preview.13 and earlier.
|
// By passing spanOptions if they exist at runtime, we're backwards compatible with @azure/core-tracing@preview.13 and earlier.
|
||||||
spanOptions: (_a = options === null || options === void 0 ? void 0 : options.tracingOptions) === null || _a === void 0 ? void 0 : _a.spanOptions,
|
spanOptions: (_a = options === null || options === void 0 ? void 0 : options.tracingOptions) === null || _a === void 0 ? void 0 : _a.spanOptions,
|
||||||
tracingContext: (_b = options === null || options === void 0 ? void 0 : options.tracingOptions) === null || _b === void 0 ? void 0 : _b.tracingContext,
|
tracingContext: (_b = options === null || options === void 0 ? void 0 : options.tracingOptions) === null || _b === void 0 ? void 0 : _b.tracingContext
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -25020,10 +24416,6 @@ class BlobSASPermissions {
|
|||||||
* Specifies SetImmutabilityPolicy access granted.
|
* Specifies SetImmutabilityPolicy access granted.
|
||||||
*/
|
*/
|
||||||
this.setImmutabilityPolicy = false;
|
this.setImmutabilityPolicy = false;
|
||||||
/**
|
|
||||||
* Specifies that Permanent Delete is permitted.
|
|
||||||
*/
|
|
||||||
this.permanentDelete = false;
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Creates a {@link BlobSASPermissions} from the specified permissions string. This method will throw an
|
* Creates a {@link BlobSASPermissions} from the specified permissions string. This method will throw an
|
||||||
@@ -25065,9 +24457,6 @@ class BlobSASPermissions {
|
|||||||
case "i":
|
case "i":
|
||||||
blobSASPermissions.setImmutabilityPolicy = true;
|
blobSASPermissions.setImmutabilityPolicy = true;
|
||||||
break;
|
break;
|
||||||
case "y":
|
|
||||||
blobSASPermissions.permanentDelete = true;
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
throw new RangeError(`Invalid permission: ${char}`);
|
throw new RangeError(`Invalid permission: ${char}`);
|
||||||
}
|
}
|
||||||
@@ -25112,9 +24501,6 @@ class BlobSASPermissions {
|
|||||||
if (permissionLike.setImmutabilityPolicy) {
|
if (permissionLike.setImmutabilityPolicy) {
|
||||||
blobSASPermissions.setImmutabilityPolicy = true;
|
blobSASPermissions.setImmutabilityPolicy = true;
|
||||||
}
|
}
|
||||||
if (permissionLike.permanentDelete) {
|
|
||||||
blobSASPermissions.permanentDelete = true;
|
|
||||||
}
|
|
||||||
return blobSASPermissions;
|
return blobSASPermissions;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@@ -25155,9 +24541,6 @@ class BlobSASPermissions {
|
|||||||
if (this.setImmutabilityPolicy) {
|
if (this.setImmutabilityPolicy) {
|
||||||
permissions.push("i");
|
permissions.push("i");
|
||||||
}
|
}
|
||||||
if (this.permanentDelete) {
|
|
||||||
permissions.push("y");
|
|
||||||
}
|
|
||||||
return permissions.join("");
|
return permissions.join("");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -25217,14 +24600,6 @@ class ContainerSASPermissions {
|
|||||||
* Specifies SetImmutabilityPolicy access granted.
|
* Specifies SetImmutabilityPolicy access granted.
|
||||||
*/
|
*/
|
||||||
this.setImmutabilityPolicy = false;
|
this.setImmutabilityPolicy = false;
|
||||||
/**
|
|
||||||
* Specifies that Permanent Delete is permitted.
|
|
||||||
*/
|
|
||||||
this.permanentDelete = false;
|
|
||||||
/**
|
|
||||||
* Specifies that Filter Blobs by Tags is permitted.
|
|
||||||
*/
|
|
||||||
this.filterByTags = false;
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Creates an {@link ContainerSASPermissions} from the specified permissions string. This method will throw an
|
* Creates an {@link ContainerSASPermissions} from the specified permissions string. This method will throw an
|
||||||
@@ -25269,12 +24644,6 @@ class ContainerSASPermissions {
|
|||||||
case "i":
|
case "i":
|
||||||
containerSASPermissions.setImmutabilityPolicy = true;
|
containerSASPermissions.setImmutabilityPolicy = true;
|
||||||
break;
|
break;
|
||||||
case "y":
|
|
||||||
containerSASPermissions.permanentDelete = true;
|
|
||||||
break;
|
|
||||||
case "f":
|
|
||||||
containerSASPermissions.filterByTags = true;
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
throw new RangeError(`Invalid permission ${char}`);
|
throw new RangeError(`Invalid permission ${char}`);
|
||||||
}
|
}
|
||||||
@@ -25322,12 +24691,6 @@ class ContainerSASPermissions {
|
|||||||
if (permissionLike.setImmutabilityPolicy) {
|
if (permissionLike.setImmutabilityPolicy) {
|
||||||
containerSASPermissions.setImmutabilityPolicy = true;
|
containerSASPermissions.setImmutabilityPolicy = true;
|
||||||
}
|
}
|
||||||
if (permissionLike.permanentDelete) {
|
|
||||||
containerSASPermissions.permanentDelete = true;
|
|
||||||
}
|
|
||||||
if (permissionLike.filterByTags) {
|
|
||||||
containerSASPermissions.filterByTags = true;
|
|
||||||
}
|
|
||||||
return containerSASPermissions;
|
return containerSASPermissions;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@@ -25373,12 +24736,6 @@ class ContainerSASPermissions {
|
|||||||
if (this.setImmutabilityPolicy) {
|
if (this.setImmutabilityPolicy) {
|
||||||
permissions.push("i");
|
permissions.push("i");
|
||||||
}
|
}
|
||||||
if (this.permanentDelete) {
|
|
||||||
permissions.push("y");
|
|
||||||
}
|
|
||||||
if (this.filterByTags) {
|
|
||||||
permissions.push("f");
|
|
||||||
}
|
|
||||||
return permissions.join("");
|
return permissions.join("");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -25408,7 +24765,9 @@ class UserDelegationKeyCredential {
|
|||||||
*/
|
*/
|
||||||
computeHMACSHA256(stringToSign) {
|
computeHMACSHA256(stringToSign) {
|
||||||
// console.log(`stringToSign: ${JSON.stringify(stringToSign)}`);
|
// console.log(`stringToSign: ${JSON.stringify(stringToSign)}`);
|
||||||
return crypto.createHmac("sha256", this.key).update(stringToSign, "utf8").digest("base64");
|
return crypto.createHmac("sha256", this.key)
|
||||||
|
.update(stringToSign, "utf8")
|
||||||
|
.digest("base64");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -25426,10 +24785,6 @@ function ipRangeToString(ipRange) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Copyright (c) Microsoft Corporation.
|
// Copyright (c) Microsoft Corporation.
|
||||||
/**
|
|
||||||
* Protocols for generated SAS.
|
|
||||||
*/
|
|
||||||
exports.SASProtocol = void 0;
|
|
||||||
(function (SASProtocol) {
|
(function (SASProtocol) {
|
||||||
/**
|
/**
|
||||||
* Protocol that allows HTTPS only
|
* Protocol that allows HTTPS only
|
||||||
@@ -25450,7 +24805,7 @@ exports.SASProtocol = void 0;
|
|||||||
* NOTE: Instances of this class are immutable.
|
* NOTE: Instances of this class are immutable.
|
||||||
*/
|
*/
|
||||||
class SASQueryParameters {
|
class SASQueryParameters {
|
||||||
constructor(version, signature, permissionsOrOptions, services, resourceTypes, protocol, startsOn, expiresOn, ipRange, identifier, resource, cacheControl, contentDisposition, contentEncoding, contentLanguage, contentType, userDelegationKey, preauthorizedAgentObjectId, correlationId, encryptionScope) {
|
constructor(version, signature, permissionsOrOptions, services, resourceTypes, protocol, startsOn, expiresOn, ipRange, identifier, resource, cacheControl, contentDisposition, contentEncoding, contentLanguage, contentType, userDelegationKey, preauthorizedAgentObjectId, correlationId) {
|
||||||
this.version = version;
|
this.version = version;
|
||||||
this.signature = signature;
|
this.signature = signature;
|
||||||
if (permissionsOrOptions !== undefined && typeof permissionsOrOptions !== "string") {
|
if (permissionsOrOptions !== undefined && typeof permissionsOrOptions !== "string") {
|
||||||
@@ -25463,7 +24818,6 @@ class SASQueryParameters {
|
|||||||
this.expiresOn = permissionsOrOptions.expiresOn;
|
this.expiresOn = permissionsOrOptions.expiresOn;
|
||||||
this.ipRangeInner = permissionsOrOptions.ipRange;
|
this.ipRangeInner = permissionsOrOptions.ipRange;
|
||||||
this.identifier = permissionsOrOptions.identifier;
|
this.identifier = permissionsOrOptions.identifier;
|
||||||
this.encryptionScope = permissionsOrOptions.encryptionScope;
|
|
||||||
this.resource = permissionsOrOptions.resource;
|
this.resource = permissionsOrOptions.resource;
|
||||||
this.cacheControl = permissionsOrOptions.cacheControl;
|
this.cacheControl = permissionsOrOptions.cacheControl;
|
||||||
this.contentDisposition = permissionsOrOptions.contentDisposition;
|
this.contentDisposition = permissionsOrOptions.contentDisposition;
|
||||||
@@ -25489,7 +24843,6 @@ class SASQueryParameters {
|
|||||||
this.protocol = protocol;
|
this.protocol = protocol;
|
||||||
this.startsOn = startsOn;
|
this.startsOn = startsOn;
|
||||||
this.ipRangeInner = ipRange;
|
this.ipRangeInner = ipRange;
|
||||||
this.encryptionScope = encryptionScope;
|
|
||||||
this.identifier = identifier;
|
this.identifier = identifier;
|
||||||
this.resource = resource;
|
this.resource = resource;
|
||||||
this.cacheControl = cacheControl;
|
this.cacheControl = cacheControl;
|
||||||
@@ -25518,7 +24871,7 @@ class SASQueryParameters {
|
|||||||
if (this.ipRangeInner) {
|
if (this.ipRangeInner) {
|
||||||
return {
|
return {
|
||||||
end: this.ipRangeInner.end,
|
end: this.ipRangeInner.end,
|
||||||
start: this.ipRangeInner.start,
|
start: this.ipRangeInner.start
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
return undefined;
|
return undefined;
|
||||||
@@ -25537,7 +24890,6 @@ class SASQueryParameters {
|
|||||||
"se",
|
"se",
|
||||||
"sip",
|
"sip",
|
||||||
"si",
|
"si",
|
||||||
"ses",
|
|
||||||
"skoid",
|
"skoid",
|
||||||
"sktid",
|
"sktid",
|
||||||
"skt",
|
"skt",
|
||||||
@@ -25553,7 +24905,7 @@ class SASQueryParameters {
|
|||||||
"rscl",
|
"rscl",
|
||||||
"rsct",
|
"rsct",
|
||||||
"saoid",
|
"saoid",
|
||||||
"scid",
|
"scid"
|
||||||
];
|
];
|
||||||
const queries = [];
|
const queries = [];
|
||||||
for (const param of params) {
|
for (const param of params) {
|
||||||
@@ -25582,9 +24934,6 @@ class SASQueryParameters {
|
|||||||
case "si":
|
case "si":
|
||||||
this.tryAppendQueryParameter(queries, param, this.identifier);
|
this.tryAppendQueryParameter(queries, param, this.identifier);
|
||||||
break;
|
break;
|
||||||
case "ses":
|
|
||||||
this.tryAppendQueryParameter(queries, param, this.encryptionScope);
|
|
||||||
break;
|
|
||||||
case "skoid": // Signed object ID
|
case "skoid": // Signed object ID
|
||||||
this.tryAppendQueryParameter(queries, param, this.signedOid);
|
this.tryAppendQueryParameter(queries, param, this.signedOid);
|
||||||
break;
|
break;
|
||||||
@@ -25669,15 +25018,6 @@ function generateBlobSASQueryParameters(blobSASSignatureValues, sharedKeyCredent
|
|||||||
if (sharedKeyCredential === undefined && userDelegationKeyCredential === undefined) {
|
if (sharedKeyCredential === undefined && userDelegationKeyCredential === undefined) {
|
||||||
throw TypeError("Invalid sharedKeyCredential, userDelegationKey or accountName.");
|
throw TypeError("Invalid sharedKeyCredential, userDelegationKey or accountName.");
|
||||||
}
|
}
|
||||||
// Version 2020-12-06 adds support for encryptionscope in SAS.
|
|
||||||
if (version >= "2020-12-06") {
|
|
||||||
if (sharedKeyCredential !== undefined) {
|
|
||||||
return generateBlobSASQueryParameters20201206(blobSASSignatureValues, sharedKeyCredential);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
return generateBlobSASQueryParametersUDK20201206(blobSASSignatureValues, userDelegationKeyCredential);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// Version 2019-12-12 adds support for the blob tags permission.
|
// Version 2019-12-12 adds support for the blob tags permission.
|
||||||
// Version 2018-11-09 adds support for the signed resource and signed blob snapshot time fields.
|
// Version 2018-11-09 adds support for the signed resource and signed blob snapshot time fields.
|
||||||
// https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas#constructing-the-signature-string
|
// https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas#constructing-the-signature-string
|
||||||
@@ -25759,7 +25099,7 @@ function generateBlobSASQueryParameters20150405(blobSASSignatureValues, sharedKe
|
|||||||
blobSASSignatureValues.contentDisposition ? blobSASSignatureValues.contentDisposition : "",
|
blobSASSignatureValues.contentDisposition ? blobSASSignatureValues.contentDisposition : "",
|
||||||
blobSASSignatureValues.contentEncoding ? blobSASSignatureValues.contentEncoding : "",
|
blobSASSignatureValues.contentEncoding ? blobSASSignatureValues.contentEncoding : "",
|
||||||
blobSASSignatureValues.contentLanguage ? blobSASSignatureValues.contentLanguage : "",
|
blobSASSignatureValues.contentLanguage ? blobSASSignatureValues.contentLanguage : "",
|
||||||
blobSASSignatureValues.contentType ? blobSASSignatureValues.contentType : "",
|
blobSASSignatureValues.contentType ? blobSASSignatureValues.contentType : ""
|
||||||
].join("\n");
|
].join("\n");
|
||||||
const signature = sharedKeyCredential.computeHMACSHA256(stringToSign);
|
const signature = sharedKeyCredential.computeHMACSHA256(stringToSign);
|
||||||
return new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, undefined, undefined, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType);
|
return new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, undefined, undefined, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType);
|
||||||
@@ -25828,81 +25168,11 @@ function generateBlobSASQueryParameters20181109(blobSASSignatureValues, sharedKe
|
|||||||
blobSASSignatureValues.contentDisposition ? blobSASSignatureValues.contentDisposition : "",
|
blobSASSignatureValues.contentDisposition ? blobSASSignatureValues.contentDisposition : "",
|
||||||
blobSASSignatureValues.contentEncoding ? blobSASSignatureValues.contentEncoding : "",
|
blobSASSignatureValues.contentEncoding ? blobSASSignatureValues.contentEncoding : "",
|
||||||
blobSASSignatureValues.contentLanguage ? blobSASSignatureValues.contentLanguage : "",
|
blobSASSignatureValues.contentLanguage ? blobSASSignatureValues.contentLanguage : "",
|
||||||
blobSASSignatureValues.contentType ? blobSASSignatureValues.contentType : "",
|
blobSASSignatureValues.contentType ? blobSASSignatureValues.contentType : ""
|
||||||
].join("\n");
|
].join("\n");
|
||||||
const signature = sharedKeyCredential.computeHMACSHA256(stringToSign);
|
const signature = sharedKeyCredential.computeHMACSHA256(stringToSign);
|
||||||
return new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, undefined, undefined, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType);
|
return new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, undefined, undefined, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType);
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* ONLY AVAILABLE IN NODE.JS RUNTIME.
|
|
||||||
* IMPLEMENTATION FOR API VERSION FROM 2020-12-06.
|
|
||||||
*
|
|
||||||
* Creates an instance of SASQueryParameters.
|
|
||||||
*
|
|
||||||
* Only accepts required settings needed to create a SAS. For optional settings please
|
|
||||||
* set corresponding properties directly, such as permissions, startsOn and identifier.
|
|
||||||
*
|
|
||||||
* WARNING: When identifier is not provided, permissions and expiresOn are required.
|
|
||||||
* You MUST assign value to identifier or expiresOn & permissions manually if you initial with
|
|
||||||
* this constructor.
|
|
||||||
*
|
|
||||||
* @param blobSASSignatureValues -
|
|
||||||
* @param sharedKeyCredential -
|
|
||||||
*/
|
|
||||||
function generateBlobSASQueryParameters20201206(blobSASSignatureValues, sharedKeyCredential) {
|
|
||||||
blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues);
|
|
||||||
if (!blobSASSignatureValues.identifier &&
|
|
||||||
!(blobSASSignatureValues.permissions && blobSASSignatureValues.expiresOn)) {
|
|
||||||
throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided.");
|
|
||||||
}
|
|
||||||
let resource = "c";
|
|
||||||
let timestamp = blobSASSignatureValues.snapshotTime;
|
|
||||||
if (blobSASSignatureValues.blobName) {
|
|
||||||
resource = "b";
|
|
||||||
if (blobSASSignatureValues.snapshotTime) {
|
|
||||||
resource = "bs";
|
|
||||||
}
|
|
||||||
else if (blobSASSignatureValues.versionId) {
|
|
||||||
resource = "bv";
|
|
||||||
timestamp = blobSASSignatureValues.versionId;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// Calling parse and toString guarantees the proper ordering and throws on invalid characters.
|
|
||||||
let verifiedPermissions;
|
|
||||||
if (blobSASSignatureValues.permissions) {
|
|
||||||
if (blobSASSignatureValues.blobName) {
|
|
||||||
verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString();
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// Signature is generated on the un-url-encoded values.
|
|
||||||
const stringToSign = [
|
|
||||||
verifiedPermissions ? verifiedPermissions : "",
|
|
||||||
blobSASSignatureValues.startsOn
|
|
||||||
? truncatedISO8061Date(blobSASSignatureValues.startsOn, false)
|
|
||||||
: "",
|
|
||||||
blobSASSignatureValues.expiresOn
|
|
||||||
? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false)
|
|
||||||
: "",
|
|
||||||
getCanonicalName(sharedKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName),
|
|
||||||
blobSASSignatureValues.identifier,
|
|
||||||
blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "",
|
|
||||||
blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "",
|
|
||||||
blobSASSignatureValues.version,
|
|
||||||
resource,
|
|
||||||
timestamp,
|
|
||||||
blobSASSignatureValues.encryptionScope,
|
|
||||||
blobSASSignatureValues.cacheControl ? blobSASSignatureValues.cacheControl : "",
|
|
||||||
blobSASSignatureValues.contentDisposition ? blobSASSignatureValues.contentDisposition : "",
|
|
||||||
blobSASSignatureValues.contentEncoding ? blobSASSignatureValues.contentEncoding : "",
|
|
||||||
blobSASSignatureValues.contentLanguage ? blobSASSignatureValues.contentLanguage : "",
|
|
||||||
blobSASSignatureValues.contentType ? blobSASSignatureValues.contentType : "",
|
|
||||||
].join("\n");
|
|
||||||
const signature = sharedKeyCredential.computeHMACSHA256(stringToSign);
|
|
||||||
return new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, undefined, undefined, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, undefined, undefined, undefined, blobSASSignatureValues.encryptionScope);
|
|
||||||
}
|
|
||||||
/**
|
/**
|
||||||
* ONLY AVAILABLE IN NODE.JS RUNTIME.
|
* ONLY AVAILABLE IN NODE.JS RUNTIME.
|
||||||
* IMPLEMENTATION FOR API VERSION FROM 2018-11-09.
|
* IMPLEMENTATION FOR API VERSION FROM 2018-11-09.
|
||||||
@@ -25974,7 +25244,7 @@ function generateBlobSASQueryParametersUDK20181109(blobSASSignatureValues, userD
|
|||||||
blobSASSignatureValues.contentDisposition,
|
blobSASSignatureValues.contentDisposition,
|
||||||
blobSASSignatureValues.contentEncoding,
|
blobSASSignatureValues.contentEncoding,
|
||||||
blobSASSignatureValues.contentLanguage,
|
blobSASSignatureValues.contentLanguage,
|
||||||
blobSASSignatureValues.contentType,
|
blobSASSignatureValues.contentType
|
||||||
].join("\n");
|
].join("\n");
|
||||||
const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign);
|
const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign);
|
||||||
return new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, undefined, undefined, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey);
|
return new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, undefined, undefined, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey);
|
||||||
@@ -26053,91 +25323,11 @@ function generateBlobSASQueryParametersUDK20200210(blobSASSignatureValues, userD
|
|||||||
blobSASSignatureValues.contentDisposition,
|
blobSASSignatureValues.contentDisposition,
|
||||||
blobSASSignatureValues.contentEncoding,
|
blobSASSignatureValues.contentEncoding,
|
||||||
blobSASSignatureValues.contentLanguage,
|
blobSASSignatureValues.contentLanguage,
|
||||||
blobSASSignatureValues.contentType,
|
blobSASSignatureValues.contentType
|
||||||
].join("\n");
|
].join("\n");
|
||||||
const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign);
|
const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign);
|
||||||
return new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, undefined, undefined, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, blobSASSignatureValues.preauthorizedAgentObjectId, blobSASSignatureValues.correlationId);
|
return new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, undefined, undefined, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, blobSASSignatureValues.preauthorizedAgentObjectId, blobSASSignatureValues.correlationId);
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* ONLY AVAILABLE IN NODE.JS RUNTIME.
|
|
||||||
* IMPLEMENTATION FOR API VERSION FROM 2020-12-06.
|
|
||||||
*
|
|
||||||
* Creates an instance of SASQueryParameters.
|
|
||||||
*
|
|
||||||
* Only accepts required settings needed to create a SAS. For optional settings please
|
|
||||||
* set corresponding properties directly, such as permissions, startsOn.
|
|
||||||
*
|
|
||||||
* WARNING: identifier will be ignored, permissions and expiresOn are required.
|
|
||||||
*
|
|
||||||
* @param blobSASSignatureValues -
|
|
||||||
* @param userDelegationKeyCredential -
|
|
||||||
*/
|
|
||||||
function generateBlobSASQueryParametersUDK20201206(blobSASSignatureValues, userDelegationKeyCredential) {
|
|
||||||
blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues);
|
|
||||||
// Stored access policies are not supported for a user delegation SAS.
|
|
||||||
if (!blobSASSignatureValues.permissions || !blobSASSignatureValues.expiresOn) {
|
|
||||||
throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");
|
|
||||||
}
|
|
||||||
let resource = "c";
|
|
||||||
let timestamp = blobSASSignatureValues.snapshotTime;
|
|
||||||
if (blobSASSignatureValues.blobName) {
|
|
||||||
resource = "b";
|
|
||||||
if (blobSASSignatureValues.snapshotTime) {
|
|
||||||
resource = "bs";
|
|
||||||
}
|
|
||||||
else if (blobSASSignatureValues.versionId) {
|
|
||||||
resource = "bv";
|
|
||||||
timestamp = blobSASSignatureValues.versionId;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// Calling parse and toString guarantees the proper ordering and throws on invalid characters.
|
|
||||||
let verifiedPermissions;
|
|
||||||
if (blobSASSignatureValues.permissions) {
|
|
||||||
if (blobSASSignatureValues.blobName) {
|
|
||||||
verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString();
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// Signature is generated on the un-url-encoded values.
|
|
||||||
const stringToSign = [
|
|
||||||
verifiedPermissions ? verifiedPermissions : "",
|
|
||||||
blobSASSignatureValues.startsOn
|
|
||||||
? truncatedISO8061Date(blobSASSignatureValues.startsOn, false)
|
|
||||||
: "",
|
|
||||||
blobSASSignatureValues.expiresOn
|
|
||||||
? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false)
|
|
||||||
: "",
|
|
||||||
getCanonicalName(userDelegationKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName),
|
|
||||||
userDelegationKeyCredential.userDelegationKey.signedObjectId,
|
|
||||||
userDelegationKeyCredential.userDelegationKey.signedTenantId,
|
|
||||||
userDelegationKeyCredential.userDelegationKey.signedStartsOn
|
|
||||||
? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false)
|
|
||||||
: "",
|
|
||||||
userDelegationKeyCredential.userDelegationKey.signedExpiresOn
|
|
||||||
? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false)
|
|
||||||
: "",
|
|
||||||
userDelegationKeyCredential.userDelegationKey.signedService,
|
|
||||||
userDelegationKeyCredential.userDelegationKey.signedVersion,
|
|
||||||
blobSASSignatureValues.preauthorizedAgentObjectId,
|
|
||||||
undefined,
|
|
||||||
blobSASSignatureValues.correlationId,
|
|
||||||
blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "",
|
|
||||||
blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "",
|
|
||||||
blobSASSignatureValues.version,
|
|
||||||
resource,
|
|
||||||
timestamp,
|
|
||||||
blobSASSignatureValues.encryptionScope,
|
|
||||||
blobSASSignatureValues.cacheControl,
|
|
||||||
blobSASSignatureValues.contentDisposition,
|
|
||||||
blobSASSignatureValues.contentEncoding,
|
|
||||||
blobSASSignatureValues.contentLanguage,
|
|
||||||
blobSASSignatureValues.contentType,
|
|
||||||
].join("\n");
|
|
||||||
const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign);
|
|
||||||
return new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, undefined, undefined, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, blobSASSignatureValues.preauthorizedAgentObjectId, blobSASSignatureValues.correlationId, blobSASSignatureValues.encryptionScope);
|
|
||||||
}
|
|
||||||
function getCanonicalName(accountName, containerName, blobName) {
|
function getCanonicalName(accountName, containerName, blobName) {
|
||||||
// Container: "/blob/account/containerName"
|
// Container: "/blob/account/containerName"
|
||||||
// Blob: "/blob/account/containerName/blobName"
|
// Blob: "/blob/account/containerName/blobName"
|
||||||
@@ -26171,11 +25361,6 @@ function SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues) {
|
|||||||
version < "2019-10-10") {
|
version < "2019-10-10") {
|
||||||
throw RangeError("'version' must be >= '2019-10-10' when providing 'x' permission.");
|
throw RangeError("'version' must be >= '2019-10-10' when providing 'x' permission.");
|
||||||
}
|
}
|
||||||
if (blobSASSignatureValues.permissions &&
|
|
||||||
blobSASSignatureValues.permissions.permanentDelete &&
|
|
||||||
version < "2019-10-10") {
|
|
||||||
throw RangeError("'version' must be >= '2019-10-10' when providing 'y' permission.");
|
|
||||||
}
|
|
||||||
if (blobSASSignatureValues.permissions &&
|
if (blobSASSignatureValues.permissions &&
|
||||||
blobSASSignatureValues.permissions.tag &&
|
blobSASSignatureValues.permissions.tag &&
|
||||||
version < "2019-12-12") {
|
version < "2019-12-12") {
|
||||||
@@ -26186,18 +25371,10 @@ function SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues) {
|
|||||||
(blobSASSignatureValues.permissions.move || blobSASSignatureValues.permissions.execute)) {
|
(blobSASSignatureValues.permissions.move || blobSASSignatureValues.permissions.execute)) {
|
||||||
throw RangeError("'version' must be >= '2020-02-10' when providing the 'm' or 'e' permission.");
|
throw RangeError("'version' must be >= '2020-02-10' when providing the 'm' or 'e' permission.");
|
||||||
}
|
}
|
||||||
if (version < "2021-04-10" &&
|
|
||||||
blobSASSignatureValues.permissions &&
|
|
||||||
blobSASSignatureValues.permissions.filterByTags) {
|
|
||||||
throw RangeError("'version' must be >= '2021-04-10' when providing the 'f' permission.");
|
|
||||||
}
|
|
||||||
if (version < "2020-02-10" &&
|
if (version < "2020-02-10" &&
|
||||||
(blobSASSignatureValues.preauthorizedAgentObjectId || blobSASSignatureValues.correlationId)) {
|
(blobSASSignatureValues.preauthorizedAgentObjectId || blobSASSignatureValues.correlationId)) {
|
||||||
throw RangeError("'version' must be >= '2020-02-10' when providing 'preauthorizedAgentObjectId' or 'correlationId'.");
|
throw RangeError("'version' must be >= '2020-02-10' when providing 'preauthorizedAgentObjectId' or 'correlationId'.");
|
||||||
}
|
}
|
||||||
if (blobSASSignatureValues.encryptionScope && version < "2020-12-06") {
|
|
||||||
throw RangeError("'version' must be >= '2020-12-06' when provided 'encryptionScope' in SAS.");
|
|
||||||
}
|
|
||||||
blobSASSignatureValues.version = version;
|
blobSASSignatureValues.version = version;
|
||||||
return blobSASSignatureValues;
|
return blobSASSignatureValues;
|
||||||
}
|
}
|
||||||
@@ -26271,7 +25448,7 @@ class BlobLeaseClient {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -26306,7 +25483,7 @@ class BlobLeaseClient {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -26339,7 +25516,7 @@ class BlobLeaseClient {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -26371,7 +25548,7 @@ class BlobLeaseClient {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -26406,7 +25583,7 @@ class BlobLeaseClient {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -26486,7 +25663,8 @@ class RetriableReadableStream extends stream.Readable {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
this.destroy(new Error(`Data corruption failure: received less data than required and reached maxRetires limitation. Received data offset: ${this.offset - 1}, data needed offset: ${this.end}, retries: ${this.retries}, max retries: ${this.maxRetryRequests}`));
|
this.destroy(new Error(`Data corruption failure: received less data than required and reached maxRetires limitation. Received data offset: ${this
|
||||||
|
.offset - 1}, data needed offset: ${this.end}, retries: ${this.retries}, max retries: ${this.maxRetryRequests}`));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -27331,7 +26509,7 @@ class AvroReader {
|
|||||||
}
|
}
|
||||||
async initialize(options = {}) {
|
async initialize(options = {}) {
|
||||||
const header = await AvroParser.readFixedBytes(this._headerStream, AVRO_INIT_BYTES.length, {
|
const header = await AvroParser.readFixedBytes(this._headerStream, AVRO_INIT_BYTES.length, {
|
||||||
abortSignal: options.abortSignal,
|
abortSignal: options.abortSignal
|
||||||
});
|
});
|
||||||
if (!arraysEqual(header, AVRO_INIT_BYTES)) {
|
if (!arraysEqual(header, AVRO_INIT_BYTES)) {
|
||||||
throw new Error("Stream is not an Avro file.");
|
throw new Error("Stream is not an Avro file.");
|
||||||
@@ -27339,7 +26517,7 @@ class AvroReader {
|
|||||||
// File metadata is written as if defined by the following map schema:
|
// File metadata is written as if defined by the following map schema:
|
||||||
// { "type": "map", "values": "bytes"}
|
// { "type": "map", "values": "bytes"}
|
||||||
this._metadata = await AvroParser.readMap(this._headerStream, AvroParser.readString, {
|
this._metadata = await AvroParser.readMap(this._headerStream, AvroParser.readString, {
|
||||||
abortSignal: options.abortSignal,
|
abortSignal: options.abortSignal
|
||||||
});
|
});
|
||||||
// Validate codec
|
// Validate codec
|
||||||
const codec = this._metadata[AVRO_CODEC_KEY];
|
const codec = this._metadata[AVRO_CODEC_KEY];
|
||||||
@@ -27348,7 +26526,7 @@ class AvroReader {
|
|||||||
}
|
}
|
||||||
// The 16-byte, randomly-generated sync marker for this file.
|
// The 16-byte, randomly-generated sync marker for this file.
|
||||||
this._syncMarker = await AvroParser.readFixedBytes(this._headerStream, AVRO_SYNC_MARKER_SIZE, {
|
this._syncMarker = await AvroParser.readFixedBytes(this._headerStream, AVRO_SYNC_MARKER_SIZE, {
|
||||||
abortSignal: options.abortSignal,
|
abortSignal: options.abortSignal
|
||||||
});
|
});
|
||||||
// Parse the schema
|
// Parse the schema
|
||||||
const schema = JSON.parse(this._metadata[AVRO_SCHEMA_KEY]);
|
const schema = JSON.parse(this._metadata[AVRO_SCHEMA_KEY]);
|
||||||
@@ -27357,7 +26535,7 @@ class AvroReader {
|
|||||||
this._blockOffset = this._initialBlockOffset + this._dataStream.position;
|
this._blockOffset = this._initialBlockOffset + this._dataStream.position;
|
||||||
}
|
}
|
||||||
this._itemsRemainingInBlock = await AvroParser.readLong(this._dataStream, {
|
this._itemsRemainingInBlock = await AvroParser.readLong(this._dataStream, {
|
||||||
abortSignal: options.abortSignal,
|
abortSignal: options.abortSignal
|
||||||
});
|
});
|
||||||
// skip block length
|
// skip block length
|
||||||
await AvroParser.readLong(this._dataStream, { abortSignal: options.abortSignal });
|
await AvroParser.readLong(this._dataStream, { abortSignal: options.abortSignal });
|
||||||
@@ -27379,13 +26557,13 @@ class AvroReader {
|
|||||||
}
|
}
|
||||||
while (this.hasNext()) {
|
while (this.hasNext()) {
|
||||||
const result = yield tslib.__await(this._itemType.read(this._dataStream, {
|
const result = yield tslib.__await(this._itemType.read(this._dataStream, {
|
||||||
abortSignal: options.abortSignal,
|
abortSignal: options.abortSignal
|
||||||
}));
|
}));
|
||||||
this._itemsRemainingInBlock--;
|
this._itemsRemainingInBlock--;
|
||||||
this._objectIndex++;
|
this._objectIndex++;
|
||||||
if (this._itemsRemainingInBlock == 0) {
|
if (this._itemsRemainingInBlock == 0) {
|
||||||
const marker = yield tslib.__await(AvroParser.readFixedBytes(this._dataStream, AVRO_SYNC_MARKER_SIZE, {
|
const marker = yield tslib.__await(AvroParser.readFixedBytes(this._dataStream, AVRO_SYNC_MARKER_SIZE, {
|
||||||
abortSignal: options.abortSignal,
|
abortSignal: options.abortSignal
|
||||||
}));
|
}));
|
||||||
this._blockOffset = this._initialBlockOffset + this._dataStream.position;
|
this._blockOffset = this._initialBlockOffset + this._dataStream.position;
|
||||||
this._objectIndex = 0;
|
this._objectIndex = 0;
|
||||||
@@ -27394,7 +26572,7 @@ class AvroReader {
|
|||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
this._itemsRemainingInBlock = yield tslib.__await(AvroParser.readLong(this._dataStream, {
|
this._itemsRemainingInBlock = yield tslib.__await(AvroParser.readLong(this._dataStream, {
|
||||||
abortSignal: options.abortSignal,
|
abortSignal: options.abortSignal
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
catch (err) {
|
catch (err) {
|
||||||
@@ -27593,7 +26771,7 @@ class BlobQuickQueryStream extends stream.Readable {
|
|||||||
position,
|
position,
|
||||||
name,
|
name,
|
||||||
isFatal: fatal,
|
isFatal: fatal,
|
||||||
description,
|
description
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -27969,11 +27147,6 @@ class BlobQueryResponse {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Copyright (c) Microsoft Corporation.
|
// Copyright (c) Microsoft Corporation.
|
||||||
/**
|
|
||||||
* Represents the access tier on a blob.
|
|
||||||
* For detailed information about block blob level tiering see {@link https://docs.microsoft.com/azure/storage/blobs/storage-blob-storage-tiers|Hot, cool and archive storage tiers.}
|
|
||||||
*/
|
|
||||||
exports.BlockBlobTier = void 0;
|
|
||||||
(function (BlockBlobTier) {
|
(function (BlockBlobTier) {
|
||||||
/**
|
/**
|
||||||
* Optimized for storing data that is accessed frequently.
|
* Optimized for storing data that is accessed frequently.
|
||||||
@@ -27989,12 +27162,6 @@ exports.BlockBlobTier = void 0;
|
|||||||
*/
|
*/
|
||||||
BlockBlobTier["Archive"] = "Archive";
|
BlockBlobTier["Archive"] = "Archive";
|
||||||
})(exports.BlockBlobTier || (exports.BlockBlobTier = {}));
|
})(exports.BlockBlobTier || (exports.BlockBlobTier = {}));
|
||||||
/**
|
|
||||||
* Specifies the page blob tier to set the blob to. This is only applicable to page blobs on premium storage accounts.
|
|
||||||
* Please see {@link https://docs.microsoft.com/azure/storage/storage-premium-storage#scalability-and-performance-targets|here}
|
|
||||||
* for detailed information on the corresponding IOPS and throughput per PageBlobTier.
|
|
||||||
*/
|
|
||||||
exports.PremiumPageBlobTier = void 0;
|
|
||||||
(function (PremiumPageBlobTier) {
|
(function (PremiumPageBlobTier) {
|
||||||
/**
|
/**
|
||||||
* P4 Tier.
|
* P4 Tier.
|
||||||
@@ -28055,20 +27222,6 @@ function ensureCpkIfSpecified(cpk, isHttps) {
|
|||||||
cpk.encryptionAlgorithm = EncryptionAlgorithmAES25;
|
cpk.encryptionAlgorithm = EncryptionAlgorithmAES25;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* Defines the known cloud audiences for Storage.
|
|
||||||
*/
|
|
||||||
exports.StorageBlobAudience = void 0;
|
|
||||||
(function (StorageBlobAudience) {
|
|
||||||
/**
|
|
||||||
* The OAuth scope to use to retrieve an AAD token for Azure Storage.
|
|
||||||
*/
|
|
||||||
StorageBlobAudience["StorageOAuthScopes"] = "https://storage.azure.com/.default";
|
|
||||||
/**
|
|
||||||
* The OAuth scope to use to retrieve an AAD token for Azure Disk.
|
|
||||||
*/
|
|
||||||
StorageBlobAudience["DiskComputeOAuthScopes"] = "https://disk.compute.azure.com/.default";
|
|
||||||
})(exports.StorageBlobAudience || (exports.StorageBlobAudience = {}));
|
|
||||||
|
|
||||||
// Copyright (c) Microsoft Corporation.
|
// Copyright (c) Microsoft Corporation.
|
||||||
// Licensed under the MIT license.
|
// Licensed under the MIT license.
|
||||||
@@ -28081,16 +27234,16 @@ exports.StorageBlobAudience = void 0;
|
|||||||
function rangeResponseFromModel(response) {
|
function rangeResponseFromModel(response) {
|
||||||
const pageRange = (response._response.parsedBody.pageRange || []).map((x) => ({
|
const pageRange = (response._response.parsedBody.pageRange || []).map((x) => ({
|
||||||
offset: x.start,
|
offset: x.start,
|
||||||
count: x.end - x.start,
|
count: x.end - x.start
|
||||||
}));
|
}));
|
||||||
const clearRange = (response._response.parsedBody.clearRange || []).map((x) => ({
|
const clearRange = (response._response.parsedBody.clearRange || []).map((x) => ({
|
||||||
offset: x.start,
|
offset: x.start,
|
||||||
count: x.end - x.start,
|
count: x.end - x.start
|
||||||
}));
|
}));
|
||||||
return Object.assign(Object.assign({}, response), { pageRange,
|
return Object.assign(Object.assign({}, response), { pageRange,
|
||||||
clearRange, _response: Object.assign(Object.assign({}, response._response), { parsedBody: {
|
clearRange, _response: Object.assign(Object.assign({}, response._response), { parsedBody: {
|
||||||
pageRange,
|
pageRange,
|
||||||
clearRange,
|
clearRange
|
||||||
} }) });
|
} }) });
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -28103,7 +27256,7 @@ function rangeResponseFromModel(response) {
|
|||||||
*/
|
*/
|
||||||
class BlobBeginCopyFromUrlPoller extends coreLro.Poller {
|
class BlobBeginCopyFromUrlPoller extends coreLro.Poller {
|
||||||
constructor(options) {
|
constructor(options) {
|
||||||
const { blobClient, copySource, intervalInMs = 15000, onProgress, resumeFrom, startCopyFromURLOptions, } = options;
|
const { blobClient, copySource, intervalInMs = 15000, onProgress, resumeFrom, startCopyFromURLOptions } = options;
|
||||||
let state;
|
let state;
|
||||||
if (resumeFrom) {
|
if (resumeFrom) {
|
||||||
state = JSON.parse(resumeFrom).state;
|
state = JSON.parse(resumeFrom).state;
|
||||||
@@ -28139,7 +27292,7 @@ const cancel = async function cancel(options = {}) {
|
|||||||
}
|
}
|
||||||
// if abortCopyFromURL throws, it will bubble up to user's poller.cancelOperation call
|
// if abortCopyFromURL throws, it will bubble up to user's poller.cancelOperation call
|
||||||
await state.blobClient.abortCopyFromURL(copyId, {
|
await state.blobClient.abortCopyFromURL(copyId, {
|
||||||
abortSignal: options.abortSignal,
|
abortSignal: options.abortSignal
|
||||||
});
|
});
|
||||||
state.isCancelled = true;
|
state.isCancelled = true;
|
||||||
return makeBlobBeginCopyFromURLPollOperation(state);
|
return makeBlobBeginCopyFromURLPollOperation(state);
|
||||||
@@ -28217,7 +27370,7 @@ function makeBlobBeginCopyFromURLPollOperation(state) {
|
|||||||
state: Object.assign({}, state),
|
state: Object.assign({}, state),
|
||||||
cancel,
|
cancel,
|
||||||
toString,
|
toString,
|
||||||
update,
|
update
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -28859,7 +28012,7 @@ async function streamToBuffer2(stream, buffer, encoding) {
|
|||||||
*/
|
*/
|
||||||
async function readStreamToLocalFile(rs, file) {
|
async function readStreamToLocalFile(rs, file) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
const ws = fs__namespace.createWriteStream(file);
|
const ws = fs.createWriteStream(file);
|
||||||
rs.on("error", (err) => {
|
rs.on("error", (err) => {
|
||||||
reject(err);
|
reject(err);
|
||||||
});
|
});
|
||||||
@@ -28875,8 +28028,8 @@ async function readStreamToLocalFile(rs, file) {
|
|||||||
*
|
*
|
||||||
* Promisified version of fs.stat().
|
* Promisified version of fs.stat().
|
||||||
*/
|
*/
|
||||||
const fsStat = util__namespace.promisify(fs__namespace.stat);
|
const fsStat = util.promisify(fs.stat);
|
||||||
const fsCreateReadStream = fs__namespace.createReadStream;
|
const fsCreateReadStream = fs.createReadStream;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A BlobClient represents a URL to an Azure Storage blob; the blob may be a block blob,
|
* A BlobClient represents a URL to an Azure Storage blob; the blob may be a block blob,
|
||||||
@@ -28919,17 +28072,12 @@ class BlobClient extends StorageClient {
|
|||||||
const blobName = blobNameOrOptions;
|
const blobName = blobNameOrOptions;
|
||||||
const extractedCreds = extractConnectionStringParts(urlOrConnectionString);
|
const extractedCreds = extractConnectionStringParts(urlOrConnectionString);
|
||||||
if (extractedCreds.kind === "AccountConnString") {
|
if (extractedCreds.kind === "AccountConnString") {
|
||||||
if (coreHttp.isNode) {
|
{
|
||||||
const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey);
|
const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey);
|
||||||
url = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName));
|
url = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName));
|
||||||
if (!options.proxyOptions) {
|
options.proxyOptions = coreHttp.getDefaultProxySettings(extractedCreds.proxyUri);
|
||||||
options.proxyOptions = coreHttp.getDefaultProxySettings(extractedCreds.proxyUri);
|
|
||||||
}
|
|
||||||
pipeline = newPipeline(sharedKeyCredential, options);
|
pipeline = newPipeline(sharedKeyCredential, options);
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
throw new Error("Account connection string is only supported in Node.js environment");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if (extractedCreds.kind === "SASConnString") {
|
else if (extractedCreds.kind === "SASConnString") {
|
||||||
url =
|
url =
|
||||||
@@ -28946,8 +28094,10 @@ class BlobClient extends StorageClient {
|
|||||||
throw new Error("Expecting non-empty strings for containerName and blobName parameters");
|
throw new Error("Expecting non-empty strings for containerName and blobName parameters");
|
||||||
}
|
}
|
||||||
super(url, pipeline);
|
super(url, pipeline);
|
||||||
({ blobName: this._name, containerName: this._containerName } =
|
({
|
||||||
this.getBlobAndContainerNamesFromUrl());
|
blobName: this._name,
|
||||||
|
containerName: this._containerName
|
||||||
|
} = this.getBlobAndContainerNamesFromUrl());
|
||||||
this.blobContext = new Blob$1(this.storageClientContext);
|
this.blobContext = new Blob$1(this.storageClientContext);
|
||||||
this._snapshot = getURLParameter(this.url, URLConstants.Parameters.SNAPSHOT);
|
this._snapshot = getURLParameter(this.url, URLConstants.Parameters.SNAPSHOT);
|
||||||
this._versionId = getURLParameter(this.url, URLConstants.Parameters.VERSIONID);
|
this._versionId = getURLParameter(this.url, URLConstants.Parameters.VERSIONID);
|
||||||
@@ -29072,13 +28222,11 @@ class BlobClient extends StorageClient {
|
|||||||
const { span, updatedOptions } = createSpan("BlobClient-download", options);
|
const { span, updatedOptions } = createSpan("BlobClient-download", options);
|
||||||
try {
|
try {
|
||||||
const res = await this.blobContext.download(Object.assign({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), requestOptions: {
|
const res = await this.blobContext.download(Object.assign({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), requestOptions: {
|
||||||
onDownloadProgress: coreHttp.isNode ? undefined : options.onProgress, // for Node.js, progress is reported by RetriableReadableStream
|
onDownloadProgress: coreHttp.isNode ? undefined : options.onProgress // for Node.js, progress is reported by RetriableReadableStream
|
||||||
}, range: offset === 0 && !count ? undefined : rangeToString({ offset, count }), rangeGetContentMD5: options.rangeGetContentMD5, rangeGetContentCRC64: options.rangeGetContentCrc64, snapshot: options.snapshot, cpkInfo: options.customerProvidedKey }, convertTracingToRequestOptionsBase(updatedOptions)));
|
}, range: offset === 0 && !count ? undefined : rangeToString({ offset, count }), rangeGetContentMD5: options.rangeGetContentMD5, rangeGetContentCRC64: options.rangeGetContentCrc64, snapshot: options.snapshot, cpkInfo: options.customerProvidedKey }, convertTracingToRequestOptionsBase(updatedOptions)));
|
||||||
const wrappedRes = Object.assign(Object.assign({}, res), { _response: res._response, objectReplicationDestinationPolicyId: res.objectReplicationPolicyId, objectReplicationSourceProperties: parseObjectReplicationRecord(res.objectReplicationRules) });
|
const wrappedRes = Object.assign(Object.assign({}, res), { _response: res._response, objectReplicationDestinationPolicyId: res.objectReplicationPolicyId, objectReplicationSourceProperties: parseObjectReplicationRecord(res.objectReplicationRules) });
|
||||||
// Return browser response immediately
|
// Return browser response immediately
|
||||||
if (!coreHttp.isNode) {
|
if (false) {}
|
||||||
return wrappedRes;
|
|
||||||
}
|
|
||||||
// We support retrying when download stream unexpected ends in Node.js runtime
|
// We support retrying when download stream unexpected ends in Node.js runtime
|
||||||
// Following code shouldn't be bundled into browser build, however some
|
// Following code shouldn't be bundled into browser build, however some
|
||||||
// bundlers may try to bundle following code and "FileReadResponse.ts".
|
// bundlers may try to bundle following code and "FileReadResponse.ts".
|
||||||
@@ -29103,16 +28251,16 @@ class BlobClient extends StorageClient {
|
|||||||
ifModifiedSince: options.conditions.ifModifiedSince,
|
ifModifiedSince: options.conditions.ifModifiedSince,
|
||||||
ifNoneMatch: options.conditions.ifNoneMatch,
|
ifNoneMatch: options.conditions.ifNoneMatch,
|
||||||
ifUnmodifiedSince: options.conditions.ifUnmodifiedSince,
|
ifUnmodifiedSince: options.conditions.ifUnmodifiedSince,
|
||||||
ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions,
|
ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions
|
||||||
},
|
},
|
||||||
range: rangeToString({
|
range: rangeToString({
|
||||||
count: offset + res.contentLength - start,
|
count: offset + res.contentLength - start,
|
||||||
offset: start,
|
offset: start
|
||||||
}),
|
}),
|
||||||
rangeGetContentMD5: options.rangeGetContentMD5,
|
rangeGetContentMD5: options.rangeGetContentMD5,
|
||||||
rangeGetContentCRC64: options.rangeGetContentCrc64,
|
rangeGetContentCRC64: options.rangeGetContentCrc64,
|
||||||
snapshot: options.snapshot,
|
snapshot: options.snapshot,
|
||||||
cpkInfo: options.customerProvidedKey,
|
cpkInfo: options.customerProvidedKey
|
||||||
};
|
};
|
||||||
// Debug purpose only
|
// Debug purpose only
|
||||||
// console.log(
|
// console.log(
|
||||||
@@ -29123,13 +28271,13 @@ class BlobClient extends StorageClient {
|
|||||||
return (await this.blobContext.download(Object.assign({ abortSignal: options.abortSignal }, updatedDownloadOptions))).readableStreamBody;
|
return (await this.blobContext.download(Object.assign({ abortSignal: options.abortSignal }, updatedDownloadOptions))).readableStreamBody;
|
||||||
}, offset, res.contentLength, {
|
}, offset, res.contentLength, {
|
||||||
maxRetryRequests: options.maxRetryRequests,
|
maxRetryRequests: options.maxRetryRequests,
|
||||||
onProgress: options.onProgress,
|
onProgress: options.onProgress
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -29154,23 +28302,21 @@ class BlobClient extends StorageClient {
|
|||||||
abortSignal: options.abortSignal,
|
abortSignal: options.abortSignal,
|
||||||
customerProvidedKey: options.customerProvidedKey,
|
customerProvidedKey: options.customerProvidedKey,
|
||||||
conditions: options.conditions,
|
conditions: options.conditions,
|
||||||
tracingOptions: updatedOptions.tracingOptions,
|
tracingOptions: updatedOptions.tracingOptions
|
||||||
});
|
});
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
if (e.statusCode === 404) {
|
if (e.statusCode === 404) {
|
||||||
// Expected exception when checking blob existence
|
span.setStatus({
|
||||||
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
|
message: "Expected exception when checking blob existence"
|
||||||
|
});
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else if (e.statusCode === 409 &&
|
|
||||||
e.details.errorCode === BlobUsesCustomerSpecifiedEncryptionMsg) {
|
|
||||||
// Expected exception when checking blob existence
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -29202,7 +28348,7 @@ class BlobClient extends StorageClient {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -29229,7 +28375,7 @@ class BlobClient extends StorageClient {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -29251,19 +28397,20 @@ class BlobClient extends StorageClient {
|
|||||||
const { span, updatedOptions } = createSpan("BlobClient-deleteIfExists", options);
|
const { span, updatedOptions } = createSpan("BlobClient-deleteIfExists", options);
|
||||||
try {
|
try {
|
||||||
const res = await this.delete(updatedOptions);
|
const res = await this.delete(updatedOptions);
|
||||||
return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response });
|
return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response // _response is made non-enumerable
|
||||||
|
});
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "BlobNotFound") {
|
if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "BlobNotFound") {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: "Expected exception when deleting a blob or snapshot only if it exists.",
|
message: "Expected exception when deleting a blob or snapshot only if it exists."
|
||||||
});
|
});
|
||||||
return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response });
|
return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response });
|
||||||
}
|
}
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -29287,7 +28434,7 @@ class BlobClient extends StorageClient {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -29321,7 +28468,7 @@ class BlobClient extends StorageClient {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -29351,7 +28498,7 @@ class BlobClient extends StorageClient {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -29377,7 +28524,7 @@ class BlobClient extends StorageClient {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -29401,7 +28548,7 @@ class BlobClient extends StorageClient {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -29435,7 +28582,7 @@ class BlobClient extends StorageClient {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -29519,7 +28666,7 @@ class BlobClient extends StorageClient {
|
|||||||
const client = {
|
const client = {
|
||||||
abortCopyFromURL: (...args) => this.abortCopyFromURL(...args),
|
abortCopyFromURL: (...args) => this.abortCopyFromURL(...args),
|
||||||
getProperties: (...args) => this.getProperties(...args),
|
getProperties: (...args) => this.getProperties(...args),
|
||||||
startCopyFromURL: (...args) => this.startCopyFromURL(...args),
|
startCopyFromURL: (...args) => this.startCopyFromURL(...args)
|
||||||
};
|
};
|
||||||
const poller = new BlobBeginCopyFromUrlPoller({
|
const poller = new BlobBeginCopyFromUrlPoller({
|
||||||
blobClient: client,
|
blobClient: client,
|
||||||
@@ -29527,7 +28674,7 @@ class BlobClient extends StorageClient {
|
|||||||
intervalInMs: options.intervalInMs,
|
intervalInMs: options.intervalInMs,
|
||||||
onProgress: options.onProgress,
|
onProgress: options.onProgress,
|
||||||
resumeFrom: options.resumeFrom,
|
resumeFrom: options.resumeFrom,
|
||||||
startCopyFromURLOptions: options,
|
startCopyFromURLOptions: options
|
||||||
});
|
});
|
||||||
// Trigger the startCopyFromURL call by calling poll.
|
// Trigger the startCopyFromURL call by calling poll.
|
||||||
// Any errors from this method should be surfaced to the user.
|
// Any errors from this method should be surfaced to the user.
|
||||||
@@ -29550,7 +28697,7 @@ class BlobClient extends StorageClient {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -29576,13 +28723,13 @@ class BlobClient extends StorageClient {
|
|||||||
sourceIfMatch: options.sourceConditions.ifMatch,
|
sourceIfMatch: options.sourceConditions.ifMatch,
|
||||||
sourceIfModifiedSince: options.sourceConditions.ifModifiedSince,
|
sourceIfModifiedSince: options.sourceConditions.ifModifiedSince,
|
||||||
sourceIfNoneMatch: options.sourceConditions.ifNoneMatch,
|
sourceIfNoneMatch: options.sourceConditions.ifNoneMatch,
|
||||||
sourceIfUnmodifiedSince: options.sourceConditions.ifUnmodifiedSince,
|
sourceIfUnmodifiedSince: options.sourceConditions.ifUnmodifiedSince
|
||||||
}, sourceContentMD5: options.sourceContentMD5, copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), blobTagsString: toBlobTagsString(options.tags), immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn, immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode, legalHold: options.legalHold, encryptionScope: options.encryptionScope }, convertTracingToRequestOptionsBase(updatedOptions)));
|
}, sourceContentMD5: options.sourceContentMD5, copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), blobTagsString: toBlobTagsString(options.tags), immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn, immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode, legalHold: options.legalHold }, convertTracingToRequestOptionsBase(updatedOptions)));
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -29610,7 +28757,7 @@ class BlobClient extends StorageClient {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -29687,7 +28834,7 @@ class BlobClient extends StorageClient {
|
|||||||
conditions: options.conditions,
|
conditions: options.conditions,
|
||||||
maxRetryRequests: options.maxRetryRequestsPerBlock,
|
maxRetryRequests: options.maxRetryRequestsPerBlock,
|
||||||
customerProvidedKey: options.customerProvidedKey,
|
customerProvidedKey: options.customerProvidedKey,
|
||||||
tracingOptions: Object.assign(Object.assign({}, options.tracingOptions), convertTracingToRequestOptionsBase(updatedOptions)),
|
tracingOptions: Object.assign(Object.assign({}, options.tracingOptions), convertTracingToRequestOptionsBase(updatedOptions))
|
||||||
});
|
});
|
||||||
const stream = response.readableStreamBody;
|
const stream = response.readableStreamBody;
|
||||||
await streamToBuffer(stream, buffer, off - offset, chunkEnd - offset);
|
await streamToBuffer(stream, buffer, off - offset, chunkEnd - offset);
|
||||||
@@ -29706,7 +28853,7 @@ class BlobClient extends StorageClient {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -29744,7 +28891,7 @@ class BlobClient extends StorageClient {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -29825,13 +28972,13 @@ class BlobClient extends StorageClient {
|
|||||||
sourceIfModifiedSince: options.sourceConditions.ifModifiedSince,
|
sourceIfModifiedSince: options.sourceConditions.ifModifiedSince,
|
||||||
sourceIfNoneMatch: options.sourceConditions.ifNoneMatch,
|
sourceIfNoneMatch: options.sourceConditions.ifNoneMatch,
|
||||||
sourceIfUnmodifiedSince: options.sourceConditions.ifUnmodifiedSince,
|
sourceIfUnmodifiedSince: options.sourceConditions.ifUnmodifiedSince,
|
||||||
sourceIfTags: options.sourceConditions.tagConditions,
|
sourceIfTags: options.sourceConditions.tagConditions
|
||||||
}, immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn, immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode, legalHold: options.legalHold, rehydratePriority: options.rehydratePriority, tier: toAccessTier(options.tier), blobTagsString: toBlobTagsString(options.tags), sealBlob: options.sealBlob }, convertTracingToRequestOptionsBase(updatedOptions)));
|
}, immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn, immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode, legalHold: options.legalHold, rehydratePriority: options.rehydratePriority, tier: toAccessTier(options.tier), blobTagsString: toBlobTagsString(options.tags), sealBlob: options.sealBlob }, convertTracingToRequestOptionsBase(updatedOptions)));
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -29872,7 +29019,7 @@ class BlobClient extends StorageClient {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -29893,7 +29040,7 @@ class BlobClient extends StorageClient {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -29914,7 +29061,7 @@ class BlobClient extends StorageClient {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -29965,17 +29112,12 @@ class AppendBlobClient extends BlobClient {
|
|||||||
const blobName = blobNameOrOptions;
|
const blobName = blobNameOrOptions;
|
||||||
const extractedCreds = extractConnectionStringParts(urlOrConnectionString);
|
const extractedCreds = extractConnectionStringParts(urlOrConnectionString);
|
||||||
if (extractedCreds.kind === "AccountConnString") {
|
if (extractedCreds.kind === "AccountConnString") {
|
||||||
if (coreHttp.isNode) {
|
{
|
||||||
const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey);
|
const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey);
|
||||||
url = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName));
|
url = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName));
|
||||||
if (!options.proxyOptions) {
|
options.proxyOptions = coreHttp.getDefaultProxySettings(extractedCreds.proxyUri);
|
||||||
options.proxyOptions = coreHttp.getDefaultProxySettings(extractedCreds.proxyUri);
|
|
||||||
}
|
|
||||||
pipeline = newPipeline(sharedKeyCredential, options);
|
pipeline = newPipeline(sharedKeyCredential, options);
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
throw new Error("Account connection string is only supported in Node.js environment");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if (extractedCreds.kind === "SASConnString") {
|
else if (extractedCreds.kind === "SASConnString") {
|
||||||
url =
|
url =
|
||||||
@@ -30030,7 +29172,7 @@ class AppendBlobClient extends BlobClient {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -30051,19 +29193,20 @@ class AppendBlobClient extends BlobClient {
|
|||||||
const conditions = { ifNoneMatch: ETagAny };
|
const conditions = { ifNoneMatch: ETagAny };
|
||||||
try {
|
try {
|
||||||
const res = await this.create(Object.assign(Object.assign({}, updatedOptions), { conditions }));
|
const res = await this.create(Object.assign(Object.assign({}, updatedOptions), { conditions }));
|
||||||
return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response });
|
return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response // _response is made non-enumerable
|
||||||
|
});
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "BlobAlreadyExists") {
|
if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "BlobAlreadyExists") {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: "Expected exception when creating a blob only if it does not already exist.",
|
message: "Expected exception when creating a blob only if it does not already exist."
|
||||||
});
|
});
|
||||||
return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response });
|
return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response });
|
||||||
}
|
}
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -30086,7 +29229,7 @@ class AppendBlobClient extends BlobClient {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -30125,13 +29268,13 @@ class AppendBlobClient extends BlobClient {
|
|||||||
try {
|
try {
|
||||||
ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);
|
ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);
|
||||||
return await this.appendBlobContext.appendBlock(contentLength, body, Object.assign({ abortSignal: options.abortSignal, appendPositionAccessConditions: options.conditions, leaseAccessConditions: options.conditions, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), requestOptions: {
|
return await this.appendBlobContext.appendBlock(contentLength, body, Object.assign({ abortSignal: options.abortSignal, appendPositionAccessConditions: options.conditions, leaseAccessConditions: options.conditions, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), requestOptions: {
|
||||||
onUploadProgress: options.onProgress,
|
onUploadProgress: options.onProgress
|
||||||
}, transactionalContentMD5: options.transactionalContentMD5, transactionalContentCrc64: options.transactionalContentCrc64, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope }, convertTracingToRequestOptionsBase(updatedOptions)));
|
}, transactionalContentMD5: options.transactionalContentMD5, transactionalContentCrc64: options.transactionalContentCrc64, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope }, convertTracingToRequestOptionsBase(updatedOptions)));
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -30164,13 +29307,13 @@ class AppendBlobClient extends BlobClient {
|
|||||||
sourceIfMatch: options.sourceConditions.ifMatch,
|
sourceIfMatch: options.sourceConditions.ifMatch,
|
||||||
sourceIfModifiedSince: options.sourceConditions.ifModifiedSince,
|
sourceIfModifiedSince: options.sourceConditions.ifModifiedSince,
|
||||||
sourceIfNoneMatch: options.sourceConditions.ifNoneMatch,
|
sourceIfNoneMatch: options.sourceConditions.ifNoneMatch,
|
||||||
sourceIfUnmodifiedSince: options.sourceConditions.ifUnmodifiedSince,
|
sourceIfUnmodifiedSince: options.sourceConditions.ifUnmodifiedSince
|
||||||
}, copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope }, convertTracingToRequestOptionsBase(updatedOptions)));
|
}, copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope }, convertTracingToRequestOptionsBase(updatedOptions)));
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -30221,17 +29364,12 @@ class BlockBlobClient extends BlobClient {
|
|||||||
const blobName = blobNameOrOptions;
|
const blobName = blobNameOrOptions;
|
||||||
const extractedCreds = extractConnectionStringParts(urlOrConnectionString);
|
const extractedCreds = extractConnectionStringParts(urlOrConnectionString);
|
||||||
if (extractedCreds.kind === "AccountConnString") {
|
if (extractedCreds.kind === "AccountConnString") {
|
||||||
if (coreHttp.isNode) {
|
{
|
||||||
const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey);
|
const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey);
|
||||||
url = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName));
|
url = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName));
|
||||||
if (!options.proxyOptions) {
|
options.proxyOptions = coreHttp.getDefaultProxySettings(extractedCreds.proxyUri);
|
||||||
options.proxyOptions = coreHttp.getDefaultProxySettings(extractedCreds.proxyUri);
|
|
||||||
}
|
|
||||||
pipeline = newPipeline(sharedKeyCredential, options);
|
pipeline = newPipeline(sharedKeyCredential, options);
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
throw new Error("Account connection string is only supported in Node.js environment");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if (extractedCreds.kind === "SASConnString") {
|
else if (extractedCreds.kind === "SASConnString") {
|
||||||
url =
|
url =
|
||||||
@@ -30297,25 +29435,23 @@ class BlockBlobClient extends BlobClient {
|
|||||||
ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);
|
ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);
|
||||||
const { span, updatedOptions } = createSpan("BlockBlobClient-query", options);
|
const { span, updatedOptions } = createSpan("BlockBlobClient-query", options);
|
||||||
try {
|
try {
|
||||||
if (!coreHttp.isNode) {
|
if (false) {}
|
||||||
throw new Error("This operation currently is only supported in Node.js.");
|
|
||||||
}
|
|
||||||
const response = await this._blobContext.query(Object.assign({ abortSignal: options.abortSignal, queryRequest: {
|
const response = await this._blobContext.query(Object.assign({ abortSignal: options.abortSignal, queryRequest: {
|
||||||
queryType: "SQL",
|
queryType: "SQL",
|
||||||
expression: query,
|
expression: query,
|
||||||
inputSerialization: toQuerySerialization(options.inputTextConfiguration),
|
inputSerialization: toQuerySerialization(options.inputTextConfiguration),
|
||||||
outputSerialization: toQuerySerialization(options.outputTextConfiguration),
|
outputSerialization: toQuerySerialization(options.outputTextConfiguration)
|
||||||
}, leaseAccessConditions: options.conditions, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }) }, convertTracingToRequestOptionsBase(updatedOptions)));
|
}, leaseAccessConditions: options.conditions, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }) }, convertTracingToRequestOptionsBase(updatedOptions)));
|
||||||
return new BlobQueryResponse(response, {
|
return new BlobQueryResponse(response, {
|
||||||
abortSignal: options.abortSignal,
|
abortSignal: options.abortSignal,
|
||||||
onProgress: options.onProgress,
|
onProgress: options.onProgress,
|
||||||
onError: options.onError,
|
onError: options.onError
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -30357,13 +29493,13 @@ class BlockBlobClient extends BlobClient {
|
|||||||
try {
|
try {
|
||||||
ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);
|
ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);
|
||||||
return await this.blockBlobContext.upload(contentLength, body, Object.assign({ abortSignal: options.abortSignal, blobHttpHeaders: options.blobHTTPHeaders, leaseAccessConditions: options.conditions, metadata: options.metadata, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), requestOptions: {
|
return await this.blockBlobContext.upload(contentLength, body, Object.assign({ abortSignal: options.abortSignal, blobHttpHeaders: options.blobHTTPHeaders, leaseAccessConditions: options.conditions, metadata: options.metadata, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), requestOptions: {
|
||||||
onUploadProgress: options.onProgress,
|
onUploadProgress: options.onProgress
|
||||||
}, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn, immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode, legalHold: options.legalHold, tier: toAccessTier(options.tier), blobTagsString: toBlobTagsString(options.tags) }, convertTracingToRequestOptionsBase(updatedOptions)));
|
}, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn, immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode, legalHold: options.legalHold, tier: toAccessTier(options.tier), blobTagsString: toBlobTagsString(options.tags) }, convertTracingToRequestOptionsBase(updatedOptions)));
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -30400,13 +29536,13 @@ class BlockBlobClient extends BlobClient {
|
|||||||
sourceIfModifiedSince: (_b = options.sourceConditions) === null || _b === void 0 ? void 0 : _b.ifModifiedSince,
|
sourceIfModifiedSince: (_b = options.sourceConditions) === null || _b === void 0 ? void 0 : _b.ifModifiedSince,
|
||||||
sourceIfNoneMatch: (_c = options.sourceConditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch,
|
sourceIfNoneMatch: (_c = options.sourceConditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch,
|
||||||
sourceIfUnmodifiedSince: (_d = options.sourceConditions) === null || _d === void 0 ? void 0 : _d.ifUnmodifiedSince,
|
sourceIfUnmodifiedSince: (_d = options.sourceConditions) === null || _d === void 0 ? void 0 : _d.ifUnmodifiedSince,
|
||||||
sourceIfTags: (_e = options.sourceConditions) === null || _e === void 0 ? void 0 : _e.tagConditions,
|
sourceIfTags: (_e = options.sourceConditions) === null || _e === void 0 ? void 0 : _e.tagConditions
|
||||||
}, cpkInfo: options.customerProvidedKey, copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), tier: toAccessTier(options.tier), blobTagsString: toBlobTagsString(options.tags) }), convertTracingToRequestOptionsBase(updatedOptions)));
|
}, cpkInfo: options.customerProvidedKey, copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), tier: toAccessTier(options.tier), blobTagsString: toBlobTagsString(options.tags) }), convertTracingToRequestOptionsBase(updatedOptions)));
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -30430,13 +29566,13 @@ class BlockBlobClient extends BlobClient {
|
|||||||
try {
|
try {
|
||||||
ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);
|
ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);
|
||||||
return await this.blockBlobContext.stageBlock(blockId, contentLength, body, Object.assign({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, requestOptions: {
|
return await this.blockBlobContext.stageBlock(blockId, contentLength, body, Object.assign({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, requestOptions: {
|
||||||
onUploadProgress: options.onProgress,
|
onUploadProgress: options.onProgress
|
||||||
}, transactionalContentMD5: options.transactionalContentMD5, transactionalContentCrc64: options.transactionalContentCrc64, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope }, convertTracingToRequestOptionsBase(updatedOptions)));
|
}, transactionalContentMD5: options.transactionalContentMD5, transactionalContentCrc64: options.transactionalContentCrc64, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope }, convertTracingToRequestOptionsBase(updatedOptions)));
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -30474,7 +29610,7 @@ class BlockBlobClient extends BlobClient {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -30505,7 +29641,7 @@ class BlockBlobClient extends BlobClient {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -30539,7 +29675,7 @@ class BlockBlobClient extends BlobClient {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -30566,7 +29702,7 @@ class BlockBlobClient extends BlobClient {
|
|||||||
async uploadData(data, options = {}) {
|
async uploadData(data, options = {}) {
|
||||||
const { span, updatedOptions } = createSpan("BlockBlobClient-uploadData", options);
|
const { span, updatedOptions } = createSpan("BlockBlobClient-uploadData", options);
|
||||||
try {
|
try {
|
||||||
if (coreHttp.isNode) {
|
if (true) {
|
||||||
let buffer;
|
let buffer;
|
||||||
if (data instanceof Buffer) {
|
if (data instanceof Buffer) {
|
||||||
buffer = data;
|
buffer = data;
|
||||||
@@ -30580,15 +29716,12 @@ class BlockBlobClient extends BlobClient {
|
|||||||
}
|
}
|
||||||
return this.uploadSeekableInternal((offset, size) => buffer.slice(offset, offset + size), buffer.byteLength, updatedOptions);
|
return this.uploadSeekableInternal((offset, size) => buffer.slice(offset, offset + size), buffer.byteLength, updatedOptions);
|
||||||
}
|
}
|
||||||
else {
|
else {}
|
||||||
const browserBlob = new Blob([data]);
|
|
||||||
return this.uploadSeekableInternal((offset, size) => browserBlob.slice(offset, offset + size), browserBlob.size, updatedOptions);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -30624,7 +29757,7 @@ class BlockBlobClient extends BlobClient {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -30637,7 +29770,7 @@ class BlockBlobClient extends BlobClient {
|
|||||||
* Uploads data to block blob. Requires a bodyFactory as the data source,
|
* Uploads data to block blob. Requires a bodyFactory as the data source,
|
||||||
* which need to return a {@link HttpRequestBody} object with the offset and size provided.
|
* which need to return a {@link HttpRequestBody} object with the offset and size provided.
|
||||||
*
|
*
|
||||||
* When data length is no more than the specified {@link BlockBlobParallelUploadOptions.maxSingleShotSize} (default is
|
* When data length is no more than the specifiled {@link BlockBlobParallelUploadOptions.maxSingleShotSize} (default is
|
||||||
* {@link BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES}), this method will use 1 {@link upload} call to finish the upload.
|
* {@link BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES}), this method will use 1 {@link upload} call to finish the upload.
|
||||||
* Otherwise, this method will call {@link stageBlock} to upload blocks, and finally call {@link commitBlockList}
|
* Otherwise, this method will call {@link stageBlock} to upload blocks, and finally call {@link commitBlockList}
|
||||||
* to commit the block list.
|
* to commit the block list.
|
||||||
@@ -30703,14 +29836,14 @@ class BlockBlobClient extends BlobClient {
|
|||||||
abortSignal: options.abortSignal,
|
abortSignal: options.abortSignal,
|
||||||
conditions: options.conditions,
|
conditions: options.conditions,
|
||||||
encryptionScope: options.encryptionScope,
|
encryptionScope: options.encryptionScope,
|
||||||
tracingOptions: updatedOptions.tracingOptions,
|
tracingOptions: updatedOptions.tracingOptions
|
||||||
});
|
});
|
||||||
// Update progress after block is successfully uploaded to server, in case of block trying
|
// Update progress after block is successfully uploaded to server, in case of block trying
|
||||||
// TODO: Hook with convenience layer progress event in finer level
|
// TODO: Hook with convenience layer progress event in finer level
|
||||||
transferProgress += contentLength;
|
transferProgress += contentLength;
|
||||||
if (options.onProgress) {
|
if (options.onProgress) {
|
||||||
options.onProgress({
|
options.onProgress({
|
||||||
loadedBytes: transferProgress,
|
loadedBytes: transferProgress
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -30721,7 +29854,7 @@ class BlockBlobClient extends BlobClient {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -30750,14 +29883,14 @@ class BlockBlobClient extends BlobClient {
|
|||||||
return () => fsCreateReadStream(filePath, {
|
return () => fsCreateReadStream(filePath, {
|
||||||
autoClose: true,
|
autoClose: true,
|
||||||
end: count ? offset + count - 1 : Infinity,
|
end: count ? offset + count - 1 : Infinity,
|
||||||
start: offset,
|
start: offset
|
||||||
});
|
});
|
||||||
}, size, Object.assign(Object.assign({}, options), { tracingOptions: Object.assign(Object.assign({}, options.tracingOptions), convertTracingToRequestOptionsBase(updatedOptions)) }));
|
}, size, Object.assign(Object.assign({}, options), { tracingOptions: Object.assign(Object.assign({}, options.tracingOptions), convertTracingToRequestOptionsBase(updatedOptions)) }));
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -30801,7 +29934,7 @@ class BlockBlobClient extends BlobClient {
|
|||||||
await this.stageBlock(blockID, body, length, {
|
await this.stageBlock(blockID, body, length, {
|
||||||
conditions: options.conditions,
|
conditions: options.conditions,
|
||||||
encryptionScope: options.encryptionScope,
|
encryptionScope: options.encryptionScope,
|
||||||
tracingOptions: updatedOptions.tracingOptions,
|
tracingOptions: updatedOptions.tracingOptions
|
||||||
});
|
});
|
||||||
// Update progress after block is successfully uploaded to server, in case of block trying
|
// Update progress after block is successfully uploaded to server, in case of block trying
|
||||||
transferProgress += length;
|
transferProgress += length;
|
||||||
@@ -30820,7 +29953,7 @@ class BlockBlobClient extends BlobClient {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -30871,17 +30004,12 @@ class PageBlobClient extends BlobClient {
|
|||||||
const blobName = blobNameOrOptions;
|
const blobName = blobNameOrOptions;
|
||||||
const extractedCreds = extractConnectionStringParts(urlOrConnectionString);
|
const extractedCreds = extractConnectionStringParts(urlOrConnectionString);
|
||||||
if (extractedCreds.kind === "AccountConnString") {
|
if (extractedCreds.kind === "AccountConnString") {
|
||||||
if (coreHttp.isNode) {
|
{
|
||||||
const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey);
|
const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey);
|
||||||
url = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName));
|
url = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName));
|
||||||
if (!options.proxyOptions) {
|
options.proxyOptions = coreHttp.getDefaultProxySettings(extractedCreds.proxyUri);
|
||||||
options.proxyOptions = coreHttp.getDefaultProxySettings(extractedCreds.proxyUri);
|
|
||||||
}
|
|
||||||
pipeline = newPipeline(sharedKeyCredential, options);
|
pipeline = newPipeline(sharedKeyCredential, options);
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
throw new Error("Account connection string is only supported in Node.js environment");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if (extractedCreds.kind === "SASConnString") {
|
else if (extractedCreds.kind === "SASConnString") {
|
||||||
url =
|
url =
|
||||||
@@ -30931,7 +30059,7 @@ class PageBlobClient extends BlobClient {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -30954,19 +30082,20 @@ class PageBlobClient extends BlobClient {
|
|||||||
try {
|
try {
|
||||||
const conditions = { ifNoneMatch: ETagAny };
|
const conditions = { ifNoneMatch: ETagAny };
|
||||||
const res = await this.create(size, Object.assign(Object.assign({}, options), { conditions, tracingOptions: updatedOptions.tracingOptions }));
|
const res = await this.create(size, Object.assign(Object.assign({}, options), { conditions, tracingOptions: updatedOptions.tracingOptions }));
|
||||||
return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response });
|
return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response // _response is made non-enumerable
|
||||||
|
});
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "BlobAlreadyExists") {
|
if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "BlobAlreadyExists") {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: "Expected exception when creating a blob only if it does not already exist.",
|
message: "Expected exception when creating a blob only if it does not already exist."
|
||||||
});
|
});
|
||||||
return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response });
|
return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response });
|
||||||
}
|
}
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -30991,13 +30120,13 @@ class PageBlobClient extends BlobClient {
|
|||||||
try {
|
try {
|
||||||
ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);
|
ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);
|
||||||
return await this.pageBlobContext.uploadPages(count, body, Object.assign({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), requestOptions: {
|
return await this.pageBlobContext.uploadPages(count, body, Object.assign({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), requestOptions: {
|
||||||
onUploadProgress: options.onProgress,
|
onUploadProgress: options.onProgress
|
||||||
}, range: rangeToString({ offset, count }), sequenceNumberAccessConditions: options.conditions, transactionalContentMD5: options.transactionalContentMD5, transactionalContentCrc64: options.transactionalContentCrc64, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope }, convertTracingToRequestOptionsBase(updatedOptions)));
|
}, range: rangeToString({ offset, count }), sequenceNumberAccessConditions: options.conditions, transactionalContentMD5: options.transactionalContentMD5, transactionalContentCrc64: options.transactionalContentCrc64, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope }, convertTracingToRequestOptionsBase(updatedOptions)));
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -31027,13 +30156,13 @@ class PageBlobClient extends BlobClient {
|
|||||||
sourceIfMatch: options.sourceConditions.ifMatch,
|
sourceIfMatch: options.sourceConditions.ifMatch,
|
||||||
sourceIfModifiedSince: options.sourceConditions.ifModifiedSince,
|
sourceIfModifiedSince: options.sourceConditions.ifModifiedSince,
|
||||||
sourceIfNoneMatch: options.sourceConditions.ifNoneMatch,
|
sourceIfNoneMatch: options.sourceConditions.ifNoneMatch,
|
||||||
sourceIfUnmodifiedSince: options.sourceConditions.ifUnmodifiedSince,
|
sourceIfUnmodifiedSince: options.sourceConditions.ifUnmodifiedSince
|
||||||
}, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization) }, convertTracingToRequestOptionsBase(updatedOptions)));
|
}, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization) }, convertTracingToRequestOptionsBase(updatedOptions)));
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -31060,7 +30189,7 @@ class PageBlobClient extends BlobClient {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -31089,7 +30218,7 @@ class PageBlobClient extends BlobClient {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -31119,7 +30248,7 @@ class PageBlobClient extends BlobClient {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -31149,7 +30278,7 @@ class PageBlobClient extends BlobClient {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -31175,7 +30304,7 @@ class PageBlobClient extends BlobClient {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -31202,7 +30331,7 @@ class PageBlobClient extends BlobClient {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -31232,7 +30361,7 @@ class PageBlobClient extends BlobClient {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -31380,7 +30509,7 @@ class BatchResponseParser {
|
|||||||
return {
|
return {
|
||||||
subResponses: deserializedSubResponses,
|
subResponses: deserializedSubResponses,
|
||||||
subResponsesSucceededCount: subResponsesSucceededCount,
|
subResponsesSucceededCount: subResponsesSucceededCount,
|
||||||
subResponsesFailedCount: subResponsesFailedCount,
|
subResponsesFailedCount: subResponsesFailedCount
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -31527,7 +30656,7 @@ class BlobBatch {
|
|||||||
this.setBatchType("delete");
|
this.setBatchType("delete");
|
||||||
await this.addSubRequestInternal({
|
await this.addSubRequestInternal({
|
||||||
url: url,
|
url: url,
|
||||||
credential: credential,
|
credential: credential
|
||||||
}, async () => {
|
}, async () => {
|
||||||
await new BlobClient(url, this.batchRequest.createPipeline(credential)).delete(updatedOptions);
|
await new BlobClient(url, this.batchRequest.createPipeline(credential)).delete(updatedOptions);
|
||||||
});
|
});
|
||||||
@@ -31535,7 +30664,7 @@ class BlobBatch {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -31574,7 +30703,7 @@ class BlobBatch {
|
|||||||
this.setBatchType("setAccessTier");
|
this.setBatchType("setAccessTier");
|
||||||
await this.addSubRequestInternal({
|
await this.addSubRequestInternal({
|
||||||
url: url,
|
url: url,
|
||||||
credential: credential,
|
credential: credential
|
||||||
}, async () => {
|
}, async () => {
|
||||||
await new BlobClient(url, this.batchRequest.createPipeline(credential)).setAccessTier(tier, updatedOptions);
|
await new BlobClient(url, this.batchRequest.createPipeline(credential)).setAccessTier(tier, updatedOptions);
|
||||||
});
|
});
|
||||||
@@ -31582,7 +30711,7 @@ class BlobBatch {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -31639,7 +30768,7 @@ class InnerBatchRequest {
|
|||||||
this.subRequestPrefix,
|
this.subRequestPrefix,
|
||||||
`${HeaderConstants.CONTENT_ID}: ${this.operationCount}`,
|
`${HeaderConstants.CONTENT_ID}: ${this.operationCount}`,
|
||||||
"",
|
"",
|
||||||
`${request.method.toString()} ${getURLPathAndQuery(request.url)} ${HTTP_VERSION_1_1}${HTTP_LINE_ENDING}`, // sub request start line with method
|
`${request.method.toString()} ${getURLPathAndQuery(request.url)} ${HTTP_VERSION_1_1}${HTTP_LINE_ENDING}` // sub request start line with method
|
||||||
].join(HTTP_LINE_ENDING);
|
].join(HTTP_LINE_ENDING);
|
||||||
for (const header of request.headers.headersArray()) {
|
for (const header of request.headers.headersArray()) {
|
||||||
this.body += `${header.name}: ${header.value}${HTTP_LINE_ENDING}`;
|
this.body += `${header.name}: ${header.value}${HTTP_LINE_ENDING}`;
|
||||||
@@ -31679,7 +30808,7 @@ class BatchRequestAssemblePolicy extends coreHttp.BaseRequestPolicy {
|
|||||||
this.dummyResponse = {
|
this.dummyResponse = {
|
||||||
request: new coreHttp.WebResource(),
|
request: new coreHttp.WebResource(),
|
||||||
status: 200,
|
status: 200,
|
||||||
headers: new coreHttp.HttpHeaders(),
|
headers: new coreHttp.HttpHeaders()
|
||||||
};
|
};
|
||||||
this.batchRequest = batchRequest;
|
this.batchRequest = batchRequest;
|
||||||
}
|
}
|
||||||
@@ -31846,14 +30975,14 @@ class BlobBatchClient {
|
|||||||
version: rawBatchResponse.version,
|
version: rawBatchResponse.version,
|
||||||
subResponses: responseSummary.subResponses,
|
subResponses: responseSummary.subResponses,
|
||||||
subResponsesSucceededCount: responseSummary.subResponsesSucceededCount,
|
subResponsesSucceededCount: responseSummary.subResponsesSucceededCount,
|
||||||
subResponsesFailedCount: responseSummary.subResponsesFailedCount,
|
subResponsesFailedCount: responseSummary.subResponsesFailedCount
|
||||||
};
|
};
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -31899,17 +31028,12 @@ class ContainerClient extends StorageClient {
|
|||||||
const containerName = credentialOrPipelineOrContainerName;
|
const containerName = credentialOrPipelineOrContainerName;
|
||||||
const extractedCreds = extractConnectionStringParts(urlOrConnectionString);
|
const extractedCreds = extractConnectionStringParts(urlOrConnectionString);
|
||||||
if (extractedCreds.kind === "AccountConnString") {
|
if (extractedCreds.kind === "AccountConnString") {
|
||||||
if (coreHttp.isNode) {
|
{
|
||||||
const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey);
|
const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey);
|
||||||
url = appendToURLPath(extractedCreds.url, encodeURIComponent(containerName));
|
url = appendToURLPath(extractedCreds.url, encodeURIComponent(containerName));
|
||||||
if (!options.proxyOptions) {
|
options.proxyOptions = coreHttp.getDefaultProxySettings(extractedCreds.proxyUri);
|
||||||
options.proxyOptions = coreHttp.getDefaultProxySettings(extractedCreds.proxyUri);
|
|
||||||
}
|
|
||||||
pipeline = newPipeline(sharedKeyCredential, options);
|
pipeline = newPipeline(sharedKeyCredential, options);
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
throw new Error("Account connection string is only supported in Node.js environment");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if (extractedCreds.kind === "SASConnString") {
|
else if (extractedCreds.kind === "SASConnString") {
|
||||||
url =
|
url =
|
||||||
@@ -31961,7 +31085,7 @@ class ContainerClient extends StorageClient {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -31981,19 +31105,20 @@ class ContainerClient extends StorageClient {
|
|||||||
const { span, updatedOptions } = createSpan("ContainerClient-createIfNotExists", options);
|
const { span, updatedOptions } = createSpan("ContainerClient-createIfNotExists", options);
|
||||||
try {
|
try {
|
||||||
const res = await this.create(updatedOptions);
|
const res = await this.create(updatedOptions);
|
||||||
return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response });
|
return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response // _response is made non-enumerable
|
||||||
|
});
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "ContainerAlreadyExists") {
|
if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "ContainerAlreadyExists") {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: "Expected exception when creating a container only if it does not already exist.",
|
message: "Expected exception when creating a container only if it does not already exist."
|
||||||
});
|
});
|
||||||
return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response });
|
return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response });
|
||||||
}
|
}
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -32015,7 +31140,7 @@ class ContainerClient extends StorageClient {
|
|||||||
try {
|
try {
|
||||||
await this.getProperties({
|
await this.getProperties({
|
||||||
abortSignal: options.abortSignal,
|
abortSignal: options.abortSignal,
|
||||||
tracingOptions: updatedOptions.tracingOptions,
|
tracingOptions: updatedOptions.tracingOptions
|
||||||
});
|
});
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -32023,13 +31148,13 @@ class ContainerClient extends StorageClient {
|
|||||||
if (e.statusCode === 404) {
|
if (e.statusCode === 404) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: "Expected exception when checking container existence",
|
message: "Expected exception when checking container existence"
|
||||||
});
|
});
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -32103,7 +31228,7 @@ class ContainerClient extends StorageClient {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -32129,7 +31254,7 @@ class ContainerClient extends StorageClient {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -32149,19 +31274,20 @@ class ContainerClient extends StorageClient {
|
|||||||
const { span, updatedOptions } = createSpan("ContainerClient-deleteIfExists", options);
|
const { span, updatedOptions } = createSpan("ContainerClient-deleteIfExists", options);
|
||||||
try {
|
try {
|
||||||
const res = await this.delete(updatedOptions);
|
const res = await this.delete(updatedOptions);
|
||||||
return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response });
|
return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response // _response is made non-enumerable
|
||||||
|
});
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "ContainerNotFound") {
|
if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "ContainerNotFound") {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: "Expected exception when deleting a container only if it exists.",
|
message: "Expected exception when deleting a container only if it exists."
|
||||||
});
|
});
|
||||||
return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response });
|
return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response });
|
||||||
}
|
}
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -32195,7 +31321,7 @@ class ContainerClient extends StorageClient {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -32231,13 +31357,13 @@ class ContainerClient extends StorageClient {
|
|||||||
requestId: response.requestId,
|
requestId: response.requestId,
|
||||||
clientRequestId: response.clientRequestId,
|
clientRequestId: response.clientRequestId,
|
||||||
signedIdentifiers: [],
|
signedIdentifiers: [],
|
||||||
version: response.version,
|
version: response.version
|
||||||
};
|
};
|
||||||
for (const identifier of response) {
|
for (const identifier of response) {
|
||||||
let accessPolicy = undefined;
|
let accessPolicy = undefined;
|
||||||
if (identifier.accessPolicy) {
|
if (identifier.accessPolicy) {
|
||||||
accessPolicy = {
|
accessPolicy = {
|
||||||
permissions: identifier.accessPolicy.permissions,
|
permissions: identifier.accessPolicy.permissions
|
||||||
};
|
};
|
||||||
if (identifier.accessPolicy.expiresOn) {
|
if (identifier.accessPolicy.expiresOn) {
|
||||||
accessPolicy.expiresOn = new Date(identifier.accessPolicy.expiresOn);
|
accessPolicy.expiresOn = new Date(identifier.accessPolicy.expiresOn);
|
||||||
@@ -32248,7 +31374,7 @@ class ContainerClient extends StorageClient {
|
|||||||
}
|
}
|
||||||
res.signedIdentifiers.push({
|
res.signedIdentifiers.push({
|
||||||
accessPolicy,
|
accessPolicy,
|
||||||
id: identifier.id,
|
id: identifier.id
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
@@ -32256,7 +31382,7 @@ class ContainerClient extends StorageClient {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -32295,9 +31421,9 @@ class ContainerClient extends StorageClient {
|
|||||||
permissions: identifier.accessPolicy.permissions,
|
permissions: identifier.accessPolicy.permissions,
|
||||||
startsOn: identifier.accessPolicy.startsOn
|
startsOn: identifier.accessPolicy.startsOn
|
||||||
? truncatedISO8061Date(identifier.accessPolicy.startsOn)
|
? truncatedISO8061Date(identifier.accessPolicy.startsOn)
|
||||||
: "",
|
: ""
|
||||||
},
|
},
|
||||||
id: identifier.id,
|
id: identifier.id
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
return await this.containerContext.setAccessPolicy(Object.assign({ abortSignal: options.abortSignal, access, containerAcl: acl, leaseAccessConditions: options.conditions, modifiedAccessConditions: options.conditions }, convertTracingToRequestOptionsBase(updatedOptions)));
|
return await this.containerContext.setAccessPolicy(Object.assign({ abortSignal: options.abortSignal, access, containerAcl: acl, leaseAccessConditions: options.conditions, modifiedAccessConditions: options.conditions }, convertTracingToRequestOptionsBase(updatedOptions)));
|
||||||
@@ -32305,7 +31431,7 @@ class ContainerClient extends StorageClient {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -32351,13 +31477,13 @@ class ContainerClient extends StorageClient {
|
|||||||
const response = await blockBlobClient.upload(body, contentLength, updatedOptions);
|
const response = await blockBlobClient.upload(body, contentLength, updatedOptions);
|
||||||
return {
|
return {
|
||||||
blockBlobClient,
|
blockBlobClient,
|
||||||
response,
|
response
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -32388,7 +31514,7 @@ class ContainerClient extends StorageClient {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -32410,12 +31536,8 @@ class ContainerClient extends StorageClient {
|
|||||||
const { span, updatedOptions } = createSpan("ContainerClient-listBlobFlatSegment", options);
|
const { span, updatedOptions } = createSpan("ContainerClient-listBlobFlatSegment", options);
|
||||||
try {
|
try {
|
||||||
const response = await this.containerContext.listBlobFlatSegment(Object.assign(Object.assign({ marker }, options), convertTracingToRequestOptionsBase(updatedOptions)));
|
const response = await this.containerContext.listBlobFlatSegment(Object.assign(Object.assign({ marker }, options), convertTracingToRequestOptionsBase(updatedOptions)));
|
||||||
response.segment.blobItems = [];
|
const wrappedResponse = Object.assign(Object.assign({}, response), { _response: response._response, segment: Object.assign(Object.assign({}, response.segment), { blobItems: response.segment.blobItems.map((blobItemInteral) => {
|
||||||
if (response.segment["Blob"] !== undefined) {
|
const blobItem = Object.assign(Object.assign({}, blobItemInteral), { tags: toTags(blobItemInteral.blobTags), objectReplicationSourceProperties: parseObjectReplicationRecord(blobItemInteral.objectReplicationMetadata) });
|
||||||
response.segment.blobItems = ProcessBlobItems(response.segment["Blob"]);
|
|
||||||
}
|
|
||||||
const wrappedResponse = Object.assign(Object.assign({}, response), { _response: Object.assign(Object.assign({}, response._response), { parsedBody: ConvertInternalResponseOfListBlobFlat(response._response.parsedBody) }), segment: Object.assign(Object.assign({}, response.segment), { blobItems: response.segment.blobItems.map((blobItemInteral) => {
|
|
||||||
const blobItem = Object.assign(Object.assign({}, blobItemInteral), { name: BlobNameToString(blobItemInteral.name), tags: toTags(blobItemInteral.blobTags), objectReplicationSourceProperties: parseObjectReplicationRecord(blobItemInteral.objectReplicationMetadata) });
|
|
||||||
return blobItem;
|
return blobItem;
|
||||||
}) }) });
|
}) }) });
|
||||||
return wrappedResponse;
|
return wrappedResponse;
|
||||||
@@ -32423,7 +31545,7 @@ class ContainerClient extends StorageClient {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -32443,33 +31565,19 @@ class ContainerClient extends StorageClient {
|
|||||||
* @param options - Options to Container List Blob Hierarchy Segment operation.
|
* @param options - Options to Container List Blob Hierarchy Segment operation.
|
||||||
*/
|
*/
|
||||||
async listBlobHierarchySegment(delimiter, marker, options = {}) {
|
async listBlobHierarchySegment(delimiter, marker, options = {}) {
|
||||||
var _a;
|
|
||||||
const { span, updatedOptions } = createSpan("ContainerClient-listBlobHierarchySegment", options);
|
const { span, updatedOptions } = createSpan("ContainerClient-listBlobHierarchySegment", options);
|
||||||
try {
|
try {
|
||||||
const response = await this.containerContext.listBlobHierarchySegment(delimiter, Object.assign(Object.assign({ marker }, options), convertTracingToRequestOptionsBase(updatedOptions)));
|
const response = await this.containerContext.listBlobHierarchySegment(delimiter, Object.assign(Object.assign({ marker }, options), convertTracingToRequestOptionsBase(updatedOptions)));
|
||||||
response.segment.blobItems = [];
|
const wrappedResponse = Object.assign(Object.assign({}, response), { _response: response._response, segment: Object.assign(Object.assign({}, response.segment), { blobItems: response.segment.blobItems.map((blobItemInteral) => {
|
||||||
if (response.segment["Blob"] !== undefined) {
|
const blobItem = Object.assign(Object.assign({}, blobItemInteral), { tags: toTags(blobItemInteral.blobTags), objectReplicationSourceProperties: parseObjectReplicationRecord(blobItemInteral.objectReplicationMetadata) });
|
||||||
response.segment.blobItems = ProcessBlobItems(response.segment["Blob"]);
|
|
||||||
}
|
|
||||||
response.segment.blobPrefixes = [];
|
|
||||||
if (response.segment["BlobPrefix"] !== undefined) {
|
|
||||||
response.segment.blobPrefixes = ProcessBlobPrefixes(response.segment["BlobPrefix"]);
|
|
||||||
}
|
|
||||||
const wrappedResponse = Object.assign(Object.assign({}, response), { _response: Object.assign(Object.assign({}, response._response), { parsedBody: ConvertInternalResponseOfListBlobHierarchy(response._response.parsedBody) }), segment: Object.assign(Object.assign({}, response.segment), { blobItems: response.segment.blobItems.map((blobItemInteral) => {
|
|
||||||
const blobItem = Object.assign(Object.assign({}, blobItemInteral), { name: BlobNameToString(blobItemInteral.name), tags: toTags(blobItemInteral.blobTags), objectReplicationSourceProperties: parseObjectReplicationRecord(blobItemInteral.objectReplicationMetadata) });
|
|
||||||
return blobItem;
|
return blobItem;
|
||||||
}), blobPrefixes: (_a = response.segment.blobPrefixes) === null || _a === void 0 ? void 0 : _a.map((blobPrefixInternal) => {
|
|
||||||
const blobPrefix = {
|
|
||||||
name: BlobNameToString(blobPrefixInternal.name),
|
|
||||||
};
|
|
||||||
return blobPrefix;
|
|
||||||
}) }) });
|
}) }) });
|
||||||
return wrappedResponse;
|
return wrappedResponse;
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -32651,7 +31759,7 @@ class ContainerClient extends StorageClient {
|
|||||||
*/
|
*/
|
||||||
byPage: (settings = {}) => {
|
byPage: (settings = {}) => {
|
||||||
return this.listSegments(settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, updatedOptions));
|
return this.listSegments(settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, updatedOptions));
|
||||||
},
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@@ -32725,7 +31833,7 @@ class ContainerClient extends StorageClient {
|
|||||||
* if (item.kind === "prefix") {
|
* if (item.kind === "prefix") {
|
||||||
* console.log(`\tBlobPrefix: ${item.name}`);
|
* console.log(`\tBlobPrefix: ${item.name}`);
|
||||||
* } else {
|
* } else {
|
||||||
* console.log(`\tBlobItem: name - ${item.name}`);
|
* console.log(`\tBlobItem: name - ${item.name}, last modified - ${item.properties.lastModified}`);
|
||||||
* }
|
* }
|
||||||
* }
|
* }
|
||||||
* ```
|
* ```
|
||||||
@@ -32740,7 +31848,7 @@ class ContainerClient extends StorageClient {
|
|||||||
* if (item.kind === "prefix") {
|
* if (item.kind === "prefix") {
|
||||||
* console.log(`\tBlobPrefix: ${item.name}`);
|
* console.log(`\tBlobPrefix: ${item.name}`);
|
||||||
* } else {
|
* } else {
|
||||||
* console.log(`\tBlobItem: name - ${item.name}`);
|
* console.log(`\tBlobItem: name - ${item.name}, last modified - ${item.properties.lastModified}`);
|
||||||
* }
|
* }
|
||||||
* entity = await iter.next();
|
* entity = await iter.next();
|
||||||
* }
|
* }
|
||||||
@@ -32758,7 +31866,7 @@ class ContainerClient extends StorageClient {
|
|||||||
* }
|
* }
|
||||||
* }
|
* }
|
||||||
* for (const blob of response.segment.blobItems) {
|
* for (const blob of response.segment.blobItems) {
|
||||||
* console.log(`\tBlobItem: name - ${blob.name}`);
|
* console.log(`\tBlobItem: name - ${blob.name}, last modified - ${blob.properties.lastModified}`);
|
||||||
* }
|
* }
|
||||||
* }
|
* }
|
||||||
* ```
|
* ```
|
||||||
@@ -32769,9 +31877,7 @@ class ContainerClient extends StorageClient {
|
|||||||
* console.log("Listing blobs by hierarchy by page, specifying a prefix and a max page size");
|
* console.log("Listing blobs by hierarchy by page, specifying a prefix and a max page size");
|
||||||
*
|
*
|
||||||
* let i = 1;
|
* let i = 1;
|
||||||
* for await (const response of containerClient
|
* for await (const response of containerClient.listBlobsByHierarchy("/", { prefix: "prefix2/sub1/"}).byPage({ maxPageSize: 2 })) {
|
||||||
* .listBlobsByHierarchy("/", { prefix: "prefix2/sub1/" })
|
|
||||||
* .byPage({ maxPageSize: 2 })) {
|
|
||||||
* console.log(`Page ${i++}`);
|
* console.log(`Page ${i++}`);
|
||||||
* const segment = response.segment;
|
* const segment = response.segment;
|
||||||
*
|
*
|
||||||
@@ -32782,7 +31888,7 @@ class ContainerClient extends StorageClient {
|
|||||||
* }
|
* }
|
||||||
*
|
*
|
||||||
* for (const blob of response.segment.blobItems) {
|
* for (const blob of response.segment.blobItems) {
|
||||||
* console.log(`\tBlobItem: name - ${blob.name}`);
|
* console.log(`\tBlobItem: name - ${blob.name}, last modified - ${blob.properties.lastModified}`);
|
||||||
* }
|
* }
|
||||||
* }
|
* }
|
||||||
* ```
|
* ```
|
||||||
@@ -32849,208 +31955,7 @@ class ContainerClient extends StorageClient {
|
|||||||
*/
|
*/
|
||||||
byPage: (settings = {}) => {
|
byPage: (settings = {}) => {
|
||||||
return this.listHierarchySegments(delimiter, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, updatedOptions));
|
return this.listHierarchySegments(delimiter, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, updatedOptions));
|
||||||
},
|
|
||||||
};
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* The Filter Blobs operation enables callers to list blobs in the container whose tags
|
|
||||||
* match a given search expression.
|
|
||||||
*
|
|
||||||
* @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression.
|
|
||||||
* The given expression must evaluate to true for a blob to be returned in the results.
|
|
||||||
* The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter;
|
|
||||||
* however, only a subset of the OData filter syntax is supported in the Blob service.
|
|
||||||
* @param marker - A string value that identifies the portion of
|
|
||||||
* the list of blobs to be returned with the next listing operation. The
|
|
||||||
* operation returns the continuationToken value within the response body if the
|
|
||||||
* listing operation did not return all blobs remaining to be listed
|
|
||||||
* with the current page. The continuationToken value can be used as the value for
|
|
||||||
* the marker parameter in a subsequent call to request the next page of list
|
|
||||||
* items. The marker value is opaque to the client.
|
|
||||||
* @param options - Options to find blobs by tags.
|
|
||||||
*/
|
|
||||||
async findBlobsByTagsSegment(tagFilterSqlExpression, marker, options = {}) {
|
|
||||||
const { span, updatedOptions } = createSpan("ContainerClient-findBlobsByTagsSegment", options);
|
|
||||||
try {
|
|
||||||
const response = await this.containerContext.filterBlobs(Object.assign({ abortSignal: options.abortSignal, where: tagFilterSqlExpression, marker, maxPageSize: options.maxPageSize }, convertTracingToRequestOptionsBase(updatedOptions)));
|
|
||||||
const wrappedResponse = Object.assign(Object.assign({}, response), { _response: response._response, blobs: response.blobs.map((blob) => {
|
|
||||||
var _a;
|
|
||||||
let tagValue = "";
|
|
||||||
if (((_a = blob.tags) === null || _a === void 0 ? void 0 : _a.blobTagSet.length) === 1) {
|
|
||||||
tagValue = blob.tags.blobTagSet[0].value;
|
|
||||||
}
|
|
||||||
return Object.assign(Object.assign({}, blob), { tags: toTags(blob.tags), tagValue });
|
|
||||||
}) });
|
|
||||||
return wrappedResponse;
|
|
||||||
}
|
|
||||||
catch (e) {
|
|
||||||
span.setStatus({
|
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
|
||||||
message: e.message,
|
|
||||||
});
|
|
||||||
throw e;
|
|
||||||
}
|
|
||||||
finally {
|
|
||||||
span.end();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Returns an AsyncIterableIterator for ContainerFindBlobsByTagsSegmentResponse.
|
|
||||||
*
|
|
||||||
* @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression.
|
|
||||||
* The given expression must evaluate to true for a blob to be returned in the results.
|
|
||||||
* The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter;
|
|
||||||
* however, only a subset of the OData filter syntax is supported in the Blob service.
|
|
||||||
* @param marker - A string value that identifies the portion of
|
|
||||||
* the list of blobs to be returned with the next listing operation. The
|
|
||||||
* operation returns the continuationToken value within the response body if the
|
|
||||||
* listing operation did not return all blobs remaining to be listed
|
|
||||||
* with the current page. The continuationToken value can be used as the value for
|
|
||||||
* the marker parameter in a subsequent call to request the next page of list
|
|
||||||
* items. The marker value is opaque to the client.
|
|
||||||
* @param options - Options to find blobs by tags.
|
|
||||||
*/
|
|
||||||
findBlobsByTagsSegments(tagFilterSqlExpression, marker, options = {}) {
|
|
||||||
return tslib.__asyncGenerator(this, arguments, function* findBlobsByTagsSegments_1() {
|
|
||||||
let response;
|
|
||||||
if (!!marker || marker === undefined) {
|
|
||||||
do {
|
|
||||||
response = yield tslib.__await(this.findBlobsByTagsSegment(tagFilterSqlExpression, marker, options));
|
|
||||||
response.blobs = response.blobs || [];
|
|
||||||
marker = response.continuationToken;
|
|
||||||
yield yield tslib.__await(response);
|
|
||||||
} while (marker);
|
|
||||||
}
|
}
|
||||||
});
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Returns an AsyncIterableIterator for blobs.
|
|
||||||
*
|
|
||||||
* @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression.
|
|
||||||
* The given expression must evaluate to true for a blob to be returned in the results.
|
|
||||||
* The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter;
|
|
||||||
* however, only a subset of the OData filter syntax is supported in the Blob service.
|
|
||||||
* @param options - Options to findBlobsByTagsItems.
|
|
||||||
*/
|
|
||||||
findBlobsByTagsItems(tagFilterSqlExpression, options = {}) {
|
|
||||||
return tslib.__asyncGenerator(this, arguments, function* findBlobsByTagsItems_1() {
|
|
||||||
var e_3, _a;
|
|
||||||
let marker;
|
|
||||||
try {
|
|
||||||
for (var _b = tslib.__asyncValues(this.findBlobsByTagsSegments(tagFilterSqlExpression, marker, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
|
|
||||||
const segment = _c.value;
|
|
||||||
yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(segment.blobs)));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
|
||||||
finally {
|
|
||||||
try {
|
|
||||||
if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
|
|
||||||
}
|
|
||||||
finally { if (e_3) throw e_3.error; }
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Returns an async iterable iterator to find all blobs with specified tag
|
|
||||||
* under the specified container.
|
|
||||||
*
|
|
||||||
* .byPage() returns an async iterable iterator to list the blobs in pages.
|
|
||||||
*
|
|
||||||
* Example using `for await` syntax:
|
|
||||||
*
|
|
||||||
* ```js
|
|
||||||
* let i = 1;
|
|
||||||
* for await (const blob of containerClient.findBlobsByTags("tagkey='tagvalue'")) {
|
|
||||||
* console.log(`Blob ${i++}: ${blob.name}`);
|
|
||||||
* }
|
|
||||||
* ```
|
|
||||||
*
|
|
||||||
* Example using `iter.next()`:
|
|
||||||
*
|
|
||||||
* ```js
|
|
||||||
* let i = 1;
|
|
||||||
* const iter = containerClient.findBlobsByTags("tagkey='tagvalue'");
|
|
||||||
* let blobItem = await iter.next();
|
|
||||||
* while (!blobItem.done) {
|
|
||||||
* console.log(`Blob ${i++}: ${blobItem.value.name}`);
|
|
||||||
* blobItem = await iter.next();
|
|
||||||
* }
|
|
||||||
* ```
|
|
||||||
*
|
|
||||||
* Example using `byPage()`:
|
|
||||||
*
|
|
||||||
* ```js
|
|
||||||
* // passing optional maxPageSize in the page settings
|
|
||||||
* let i = 1;
|
|
||||||
* for await (const response of containerClient.findBlobsByTags("tagkey='tagvalue'").byPage({ maxPageSize: 20 })) {
|
|
||||||
* if (response.blobs) {
|
|
||||||
* for (const blob of response.blobs) {
|
|
||||||
* console.log(`Blob ${i++}: ${blob.name}`);
|
|
||||||
* }
|
|
||||||
* }
|
|
||||||
* }
|
|
||||||
* ```
|
|
||||||
*
|
|
||||||
* Example using paging with a marker:
|
|
||||||
*
|
|
||||||
* ```js
|
|
||||||
* let i = 1;
|
|
||||||
* let iterator = containerClient.findBlobsByTags("tagkey='tagvalue'").byPage({ maxPageSize: 2 });
|
|
||||||
* let response = (await iterator.next()).value;
|
|
||||||
*
|
|
||||||
* // Prints 2 blob names
|
|
||||||
* if (response.blobs) {
|
|
||||||
* for (const blob of response.blobs) {
|
|
||||||
* console.log(`Blob ${i++}: ${blob.name}`);
|
|
||||||
* }
|
|
||||||
* }
|
|
||||||
*
|
|
||||||
* // Gets next marker
|
|
||||||
* let marker = response.continuationToken;
|
|
||||||
* // Passing next marker as continuationToken
|
|
||||||
* iterator = containerClient
|
|
||||||
* .findBlobsByTags("tagkey='tagvalue'")
|
|
||||||
* .byPage({ continuationToken: marker, maxPageSize: 10 });
|
|
||||||
* response = (await iterator.next()).value;
|
|
||||||
*
|
|
||||||
* // Prints blob names
|
|
||||||
* if (response.blobs) {
|
|
||||||
* for (const blob of response.blobs) {
|
|
||||||
* console.log(`Blob ${i++}: ${blob.name}`);
|
|
||||||
* }
|
|
||||||
* }
|
|
||||||
* ```
|
|
||||||
*
|
|
||||||
* @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression.
|
|
||||||
* The given expression must evaluate to true for a blob to be returned in the results.
|
|
||||||
* The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter;
|
|
||||||
* however, only a subset of the OData filter syntax is supported in the Blob service.
|
|
||||||
* @param options - Options to find blobs by tags.
|
|
||||||
*/
|
|
||||||
findBlobsByTags(tagFilterSqlExpression, options = {}) {
|
|
||||||
// AsyncIterableIterator to iterate over blobs
|
|
||||||
const listSegmentOptions = Object.assign({}, options);
|
|
||||||
const iter = this.findBlobsByTagsItems(tagFilterSqlExpression, listSegmentOptions);
|
|
||||||
return {
|
|
||||||
/**
|
|
||||||
* The next method, part of the iteration protocol
|
|
||||||
*/
|
|
||||||
next() {
|
|
||||||
return iter.next();
|
|
||||||
},
|
|
||||||
/**
|
|
||||||
* The connection to the async iterator, part of the iteration protocol
|
|
||||||
*/
|
|
||||||
[Symbol.asyncIterator]() {
|
|
||||||
return this;
|
|
||||||
},
|
|
||||||
/**
|
|
||||||
* Return an AsyncIterableIterator that works a page at a time
|
|
||||||
*/
|
|
||||||
byPage: (settings = {}) => {
|
|
||||||
return this.findBlobsByTagsSegments(tagFilterSqlExpression, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, listSegmentOptions));
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
getContainerNameFromUrl() {
|
getContainerNameFromUrl() {
|
||||||
@@ -33183,10 +32088,6 @@ class AccountSASPermissions {
|
|||||||
* Permission to set immutability policy.
|
* Permission to set immutability policy.
|
||||||
*/
|
*/
|
||||||
this.setImmutabilityPolicy = false;
|
this.setImmutabilityPolicy = false;
|
||||||
/**
|
|
||||||
* Specifies that Permanent Delete is permitted.
|
|
||||||
*/
|
|
||||||
this.permanentDelete = false;
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Parse initializes the AccountSASPermissions fields from a string.
|
* Parse initializes the AccountSASPermissions fields from a string.
|
||||||
@@ -33233,9 +32134,6 @@ class AccountSASPermissions {
|
|||||||
case "i":
|
case "i":
|
||||||
accountSASPermissions.setImmutabilityPolicy = true;
|
accountSASPermissions.setImmutabilityPolicy = true;
|
||||||
break;
|
break;
|
||||||
case "y":
|
|
||||||
accountSASPermissions.permanentDelete = true;
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
throw new RangeError(`Invalid permission character: ${c}`);
|
throw new RangeError(`Invalid permission character: ${c}`);
|
||||||
}
|
}
|
||||||
@@ -33286,9 +32184,6 @@ class AccountSASPermissions {
|
|||||||
if (permissionLike.setImmutabilityPolicy) {
|
if (permissionLike.setImmutabilityPolicy) {
|
||||||
accountSASPermissions.setImmutabilityPolicy = true;
|
accountSASPermissions.setImmutabilityPolicy = true;
|
||||||
}
|
}
|
||||||
if (permissionLike.permanentDelete) {
|
|
||||||
accountSASPermissions.permanentDelete = true;
|
|
||||||
}
|
|
||||||
return accountSASPermissions;
|
return accountSASPermissions;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@@ -33342,9 +32237,6 @@ class AccountSASPermissions {
|
|||||||
if (this.setImmutabilityPolicy) {
|
if (this.setImmutabilityPolicy) {
|
||||||
permissions.push("i");
|
permissions.push("i");
|
||||||
}
|
}
|
||||||
if (this.permanentDelete) {
|
|
||||||
permissions.push("y");
|
|
||||||
}
|
|
||||||
return permissions.join("");
|
return permissions.join("");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -33527,11 +32419,6 @@ function generateAccountSASQueryParameters(accountSASSignatureValues, sharedKeyC
|
|||||||
version < "2019-10-10") {
|
version < "2019-10-10") {
|
||||||
throw RangeError("'version' must be >= '2019-10-10' when provided 'x' permission.");
|
throw RangeError("'version' must be >= '2019-10-10' when provided 'x' permission.");
|
||||||
}
|
}
|
||||||
if (accountSASSignatureValues.permissions &&
|
|
||||||
accountSASSignatureValues.permissions.permanentDelete &&
|
|
||||||
version < "2019-10-10") {
|
|
||||||
throw RangeError("'version' must be >= '2019-10-10' when provided 'y' permission.");
|
|
||||||
}
|
|
||||||
if (accountSASSignatureValues.permissions &&
|
if (accountSASSignatureValues.permissions &&
|
||||||
accountSASSignatureValues.permissions.tag &&
|
accountSASSignatureValues.permissions.tag &&
|
||||||
version < "2019-12-12") {
|
version < "2019-12-12") {
|
||||||
@@ -33542,48 +32429,25 @@ function generateAccountSASQueryParameters(accountSASSignatureValues, sharedKeyC
|
|||||||
version < "2019-12-12") {
|
version < "2019-12-12") {
|
||||||
throw RangeError("'version' must be >= '2019-12-12' when provided 'f' permission.");
|
throw RangeError("'version' must be >= '2019-12-12' when provided 'f' permission.");
|
||||||
}
|
}
|
||||||
if (accountSASSignatureValues.encryptionScope && version < "2020-12-06") {
|
|
||||||
throw RangeError("'version' must be >= '2020-12-06' when provided 'encryptionScope' in SAS.");
|
|
||||||
}
|
|
||||||
const parsedPermissions = AccountSASPermissions.parse(accountSASSignatureValues.permissions.toString());
|
const parsedPermissions = AccountSASPermissions.parse(accountSASSignatureValues.permissions.toString());
|
||||||
const parsedServices = AccountSASServices.parse(accountSASSignatureValues.services).toString();
|
const parsedServices = AccountSASServices.parse(accountSASSignatureValues.services).toString();
|
||||||
const parsedResourceTypes = AccountSASResourceTypes.parse(accountSASSignatureValues.resourceTypes).toString();
|
const parsedResourceTypes = AccountSASResourceTypes.parse(accountSASSignatureValues.resourceTypes).toString();
|
||||||
let stringToSign;
|
const stringToSign = [
|
||||||
if (version >= "2020-12-06") {
|
sharedKeyCredential.accountName,
|
||||||
stringToSign = [
|
parsedPermissions,
|
||||||
sharedKeyCredential.accountName,
|
parsedServices,
|
||||||
parsedPermissions,
|
parsedResourceTypes,
|
||||||
parsedServices,
|
accountSASSignatureValues.startsOn
|
||||||
parsedResourceTypes,
|
? truncatedISO8061Date(accountSASSignatureValues.startsOn, false)
|
||||||
accountSASSignatureValues.startsOn
|
: "",
|
||||||
? truncatedISO8061Date(accountSASSignatureValues.startsOn, false)
|
truncatedISO8061Date(accountSASSignatureValues.expiresOn, false),
|
||||||
: "",
|
accountSASSignatureValues.ipRange ? ipRangeToString(accountSASSignatureValues.ipRange) : "",
|
||||||
truncatedISO8061Date(accountSASSignatureValues.expiresOn, false),
|
accountSASSignatureValues.protocol ? accountSASSignatureValues.protocol : "",
|
||||||
accountSASSignatureValues.ipRange ? ipRangeToString(accountSASSignatureValues.ipRange) : "",
|
version,
|
||||||
accountSASSignatureValues.protocol ? accountSASSignatureValues.protocol : "",
|
"" // Account SAS requires an additional newline character
|
||||||
version,
|
].join("\n");
|
||||||
accountSASSignatureValues.encryptionScope ? accountSASSignatureValues.encryptionScope : "",
|
|
||||||
"", // Account SAS requires an additional newline character
|
|
||||||
].join("\n");
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
stringToSign = [
|
|
||||||
sharedKeyCredential.accountName,
|
|
||||||
parsedPermissions,
|
|
||||||
parsedServices,
|
|
||||||
parsedResourceTypes,
|
|
||||||
accountSASSignatureValues.startsOn
|
|
||||||
? truncatedISO8061Date(accountSASSignatureValues.startsOn, false)
|
|
||||||
: "",
|
|
||||||
truncatedISO8061Date(accountSASSignatureValues.expiresOn, false),
|
|
||||||
accountSASSignatureValues.ipRange ? ipRangeToString(accountSASSignatureValues.ipRange) : "",
|
|
||||||
accountSASSignatureValues.protocol ? accountSASSignatureValues.protocol : "",
|
|
||||||
version,
|
|
||||||
"", // Account SAS requires an additional newline character
|
|
||||||
].join("\n");
|
|
||||||
}
|
|
||||||
const signature = sharedKeyCredential.computeHMACSHA256(stringToSign);
|
const signature = sharedKeyCredential.computeHMACSHA256(stringToSign);
|
||||||
return new SASQueryParameters(version, signature, parsedPermissions.toString(), parsedServices, parsedResourceTypes, accountSASSignatureValues.protocol, accountSASSignatureValues.startsOn, accountSASSignatureValues.expiresOn, accountSASSignatureValues.ipRange, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, accountSASSignatureValues.encryptionScope);
|
return new SASQueryParameters(version, signature, parsedPermissions.toString(), parsedServices, parsedResourceTypes, accountSASSignatureValues.protocol, accountSASSignatureValues.startsOn, accountSASSignatureValues.expiresOn, accountSASSignatureValues.ipRange);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -33630,17 +32494,12 @@ class BlobServiceClient extends StorageClient {
|
|||||||
options = options || {};
|
options = options || {};
|
||||||
const extractedCreds = extractConnectionStringParts(connectionString);
|
const extractedCreds = extractConnectionStringParts(connectionString);
|
||||||
if (extractedCreds.kind === "AccountConnString") {
|
if (extractedCreds.kind === "AccountConnString") {
|
||||||
if (coreHttp.isNode) {
|
{
|
||||||
const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey);
|
const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey);
|
||||||
if (!options.proxyOptions) {
|
options.proxyOptions = coreHttp.getDefaultProxySettings(extractedCreds.proxyUri);
|
||||||
options.proxyOptions = coreHttp.getDefaultProxySettings(extractedCreds.proxyUri);
|
|
||||||
}
|
|
||||||
const pipeline = newPipeline(sharedKeyCredential, options);
|
const pipeline = newPipeline(sharedKeyCredential, options);
|
||||||
return new BlobServiceClient(extractedCreds.url, pipeline);
|
return new BlobServiceClient(extractedCreds.url, pipeline);
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
throw new Error("Account connection string is only supported in Node.js environment");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if (extractedCreds.kind === "SASConnString") {
|
else if (extractedCreds.kind === "SASConnString") {
|
||||||
const pipeline = newPipeline(new AnonymousCredential(), options);
|
const pipeline = newPipeline(new AnonymousCredential(), options);
|
||||||
@@ -33679,13 +32538,13 @@ class BlobServiceClient extends StorageClient {
|
|||||||
const containerCreateResponse = await containerClient.create(updatedOptions);
|
const containerCreateResponse = await containerClient.create(updatedOptions);
|
||||||
return {
|
return {
|
||||||
containerClient,
|
containerClient,
|
||||||
containerCreateResponse,
|
containerCreateResponse
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -33709,7 +32568,7 @@ class BlobServiceClient extends StorageClient {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -33739,7 +32598,7 @@ class BlobServiceClient extends StorageClient {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -33769,7 +32628,7 @@ class BlobServiceClient extends StorageClient {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -33793,7 +32652,7 @@ class BlobServiceClient extends StorageClient {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -33818,7 +32677,7 @@ class BlobServiceClient extends StorageClient {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -33843,7 +32702,7 @@ class BlobServiceClient extends StorageClient {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -33869,7 +32728,7 @@ class BlobServiceClient extends StorageClient {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -33899,7 +32758,7 @@ class BlobServiceClient extends StorageClient {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -33942,7 +32801,7 @@ class BlobServiceClient extends StorageClient {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -34108,7 +32967,7 @@ class BlobServiceClient extends StorageClient {
|
|||||||
*/
|
*/
|
||||||
byPage: (settings = {}) => {
|
byPage: (settings = {}) => {
|
||||||
return this.findBlobsByTagsSegments(tagFilterSqlExpression, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, listSegmentOptions));
|
return this.findBlobsByTagsSegments(tagFilterSqlExpression, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, listSegmentOptions));
|
||||||
},
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@@ -34246,9 +33105,6 @@ class BlobServiceClient extends StorageClient {
|
|||||||
if (options.includeMetadata) {
|
if (options.includeMetadata) {
|
||||||
include.push("metadata");
|
include.push("metadata");
|
||||||
}
|
}
|
||||||
if (options.includeSystem) {
|
|
||||||
include.push("system");
|
|
||||||
}
|
|
||||||
// AsyncIterableIterator to iterate over containers
|
// AsyncIterableIterator to iterate over containers
|
||||||
const listSegmentOptions = Object.assign(Object.assign({}, options), (include.length > 0 ? { include } : {}));
|
const listSegmentOptions = Object.assign(Object.assign({}, options), (include.length > 0 ? { include } : {}));
|
||||||
const iter = this.listItems(listSegmentOptions);
|
const iter = this.listItems(listSegmentOptions);
|
||||||
@@ -34270,7 +33126,7 @@ class BlobServiceClient extends StorageClient {
|
|||||||
*/
|
*/
|
||||||
byPage: (settings = {}) => {
|
byPage: (settings = {}) => {
|
||||||
return this.listSegments(settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, listSegmentOptions));
|
return this.listSegments(settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, listSegmentOptions));
|
||||||
},
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@@ -34289,7 +33145,7 @@ class BlobServiceClient extends StorageClient {
|
|||||||
try {
|
try {
|
||||||
const response = await this.serviceContext.getUserDelegationKey({
|
const response = await this.serviceContext.getUserDelegationKey({
|
||||||
startsOn: truncatedISO8061Date(startsOn, false),
|
startsOn: truncatedISO8061Date(startsOn, false),
|
||||||
expiresOn: truncatedISO8061Date(expiresOn, false),
|
expiresOn: truncatedISO8061Date(expiresOn, false)
|
||||||
}, Object.assign({ abortSignal: options.abortSignal }, convertTracingToRequestOptionsBase(updatedOptions)));
|
}, Object.assign({ abortSignal: options.abortSignal }, convertTracingToRequestOptionsBase(updatedOptions)));
|
||||||
const userDelegationKey = {
|
const userDelegationKey = {
|
||||||
signedObjectId: response.signedObjectId,
|
signedObjectId: response.signedObjectId,
|
||||||
@@ -34298,7 +33154,7 @@ class BlobServiceClient extends StorageClient {
|
|||||||
signedExpiresOn: new Date(response.signedExpiresOn),
|
signedExpiresOn: new Date(response.signedExpiresOn),
|
||||||
signedService: response.signedService,
|
signedService: response.signedService,
|
||||||
signedVersion: response.signedVersion,
|
signedVersion: response.signedVersion,
|
||||||
value: response.value,
|
value: response.value
|
||||||
};
|
};
|
||||||
const res = Object.assign({ _response: response._response, requestId: response.requestId, clientRequestId: response.clientRequestId, version: response.version, date: response.date, errorCode: response.errorCode }, userDelegationKey);
|
const res = Object.assign({ _response: response._response, requestId: response.requestId, clientRequestId: response.clientRequestId, version: response.version, date: response.date, errorCode: response.errorCode }, userDelegationKey);
|
||||||
return res;
|
return res;
|
||||||
@@ -34306,7 +33162,7 @@ class BlobServiceClient extends StorageClient {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -34355,27 +33211,39 @@ class BlobServiceClient extends StorageClient {
|
|||||||
|
|
||||||
Object.defineProperty(exports, 'BaseRequestPolicy', {
|
Object.defineProperty(exports, 'BaseRequestPolicy', {
|
||||||
enumerable: true,
|
enumerable: true,
|
||||||
get: function () { return coreHttp.BaseRequestPolicy; }
|
get: function () {
|
||||||
|
return coreHttp.BaseRequestPolicy;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
Object.defineProperty(exports, 'HttpHeaders', {
|
Object.defineProperty(exports, 'HttpHeaders', {
|
||||||
enumerable: true,
|
enumerable: true,
|
||||||
get: function () { return coreHttp.HttpHeaders; }
|
get: function () {
|
||||||
|
return coreHttp.HttpHeaders;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
Object.defineProperty(exports, 'RequestPolicyOptions', {
|
Object.defineProperty(exports, 'RequestPolicyOptions', {
|
||||||
enumerable: true,
|
enumerable: true,
|
||||||
get: function () { return coreHttp.RequestPolicyOptions; }
|
get: function () {
|
||||||
|
return coreHttp.RequestPolicyOptions;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
Object.defineProperty(exports, 'RestError', {
|
Object.defineProperty(exports, 'RestError', {
|
||||||
enumerable: true,
|
enumerable: true,
|
||||||
get: function () { return coreHttp.RestError; }
|
get: function () {
|
||||||
|
return coreHttp.RestError;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
Object.defineProperty(exports, 'WebResource', {
|
Object.defineProperty(exports, 'WebResource', {
|
||||||
enumerable: true,
|
enumerable: true,
|
||||||
get: function () { return coreHttp.WebResource; }
|
get: function () {
|
||||||
|
return coreHttp.WebResource;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
Object.defineProperty(exports, 'deserializationPolicy', {
|
Object.defineProperty(exports, 'deserializationPolicy', {
|
||||||
enumerable: true,
|
enumerable: true,
|
||||||
get: function () { return coreHttp.deserializationPolicy; }
|
get: function () {
|
||||||
|
return coreHttp.deserializationPolicy;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
exports.AccountSASPermissions = AccountSASPermissions;
|
exports.AccountSASPermissions = AccountSASPermissions;
|
||||||
exports.AccountSASResourceTypes = AccountSASResourceTypes;
|
exports.AccountSASResourceTypes = AccountSASResourceTypes;
|
||||||
@@ -37120,9 +35988,9 @@ function extractTar(archivePath, compressionMethod) {
|
|||||||
function getCompressionProgram() {
|
function getCompressionProgram() {
|
||||||
switch (compressionMethod) {
|
switch (compressionMethod) {
|
||||||
case constants_1.CompressionMethod.Zstd:
|
case constants_1.CompressionMethod.Zstd:
|
||||||
return ['--use-compress-program', 'zstd -d --long=30'];
|
return ['--use-compress-program', 'zstd -d --fast=1 --long=30'];
|
||||||
case constants_1.CompressionMethod.ZstdWithoutLong:
|
case constants_1.CompressionMethod.ZstdWithoutLong:
|
||||||
return ['--use-compress-program', 'zstd -d'];
|
return ['--use-compress-program', 'zstd -d --fast=1'];
|
||||||
default:
|
default:
|
||||||
return ['-z'];
|
return ['-z'];
|
||||||
}
|
}
|
||||||
@@ -37153,9 +36021,9 @@ function createTar(archiveFolder, sourceDirectories, compressionMethod) {
|
|||||||
function getCompressionProgram() {
|
function getCompressionProgram() {
|
||||||
switch (compressionMethod) {
|
switch (compressionMethod) {
|
||||||
case constants_1.CompressionMethod.Zstd:
|
case constants_1.CompressionMethod.Zstd:
|
||||||
return ['--use-compress-program', 'zstd -T0 --long=30'];
|
return ['--use-compress-program', 'zstd -T0 --fast=1 --long=30'];
|
||||||
case constants_1.CompressionMethod.ZstdWithoutLong:
|
case constants_1.CompressionMethod.ZstdWithoutLong:
|
||||||
return ['--use-compress-program', 'zstd -T0'];
|
return ['--use-compress-program', 'zstd -T0 --fast=1'];
|
||||||
default:
|
default:
|
||||||
return ['-z'];
|
return ['-z'];
|
||||||
}
|
}
|
||||||
@@ -37184,9 +36052,9 @@ function listTar(archivePath, compressionMethod) {
|
|||||||
function getCompressionProgram() {
|
function getCompressionProgram() {
|
||||||
switch (compressionMethod) {
|
switch (compressionMethod) {
|
||||||
case constants_1.CompressionMethod.Zstd:
|
case constants_1.CompressionMethod.Zstd:
|
||||||
return ['--use-compress-program', 'zstd -d --long=30'];
|
return ['--use-compress-program', 'zstd -d --fast=1 --long=30'];
|
||||||
case constants_1.CompressionMethod.ZstdWithoutLong:
|
case constants_1.CompressionMethod.ZstdWithoutLong:
|
||||||
return ['--use-compress-program', 'zstd -d'];
|
return ['--use-compress-program', 'zstd -d --fast=1'];
|
||||||
default:
|
default:
|
||||||
return ['-z'];
|
return ['-z'];
|
||||||
}
|
}
|
||||||
@@ -37428,8 +36296,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|||||||
return result;
|
return result;
|
||||||
};
|
};
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
exports.isCacheFeatureAvailable = exports.getInputAsInt = exports.getInputAsArray = exports.isValidEvent = exports.logWarning = exports.getCacheState = exports.setOutputAndState = exports.setCacheHitOutput = exports.setCacheState = exports.isExactKeyMatch = exports.isGhes = void 0;
|
exports.getInputAsInt = exports.getInputAsArray = exports.isValidEvent = exports.logWarning = exports.getCacheState = exports.setOutputAndState = exports.setCacheHitOutput = exports.setCacheState = exports.isExactKeyMatch = exports.isGhes = void 0;
|
||||||
const cache = __importStar(__webpack_require__(692));
|
|
||||||
const core = __importStar(__webpack_require__(470));
|
const core = __importStar(__webpack_require__(470));
|
||||||
const constants_1 = __webpack_require__(196);
|
const constants_1 = __webpack_require__(196);
|
||||||
function isGhes() {
|
function isGhes() {
|
||||||
@@ -37494,19 +36361,6 @@ function getInputAsInt(name, options) {
|
|||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
exports.getInputAsInt = getInputAsInt;
|
exports.getInputAsInt = getInputAsInt;
|
||||||
function isCacheFeatureAvailable() {
|
|
||||||
if (!cache.isFeatureAvailable()) {
|
|
||||||
if (isGhes()) {
|
|
||||||
logWarning("Cache action is only supported on GHES version >= 3.5. If you are on version >=3.5 Please check with GHES admin if Actions cache service is enabled or not.");
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
logWarning("An internal error has occurred in cache backend. Please check https://www.githubstatus.com/ for any ongoing issue in actions.");
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
exports.isCacheFeatureAvailable = isCacheFeatureAvailable;
|
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
@@ -46371,15 +45225,6 @@ function checkKey(key) {
|
|||||||
throw new ValidationError(`Key Validation Error: ${key} cannot contain commas.`);
|
throw new ValidationError(`Key Validation Error: ${key} cannot contain commas.`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* isFeatureAvailable to check the presence of Actions cache service
|
|
||||||
*
|
|
||||||
* @returns boolean return true if Actions cache service feature is available, otherwise false
|
|
||||||
*/
|
|
||||||
function isFeatureAvailable() {
|
|
||||||
return !!process.env['ACTIONS_CACHE_URL'];
|
|
||||||
}
|
|
||||||
exports.isFeatureAvailable = isFeatureAvailable;
|
|
||||||
/**
|
/**
|
||||||
* Restores cache from keys
|
* Restores cache from keys
|
||||||
*
|
*
|
||||||
@@ -46446,12 +45291,18 @@ exports.restoreCache = restoreCache;
|
|||||||
* @returns number returns cacheId if the cache was saved successfully and throws an error if save fails
|
* @returns number returns cacheId if the cache was saved successfully and throws an error if save fails
|
||||||
*/
|
*/
|
||||||
function saveCache(paths, key, options) {
|
function saveCache(paths, key, options) {
|
||||||
var _a, _b, _c, _d, _e;
|
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
checkPaths(paths);
|
checkPaths(paths);
|
||||||
checkKey(key);
|
checkKey(key);
|
||||||
const compressionMethod = yield utils.getCompressionMethod();
|
const compressionMethod = yield utils.getCompressionMethod();
|
||||||
let cacheId = null;
|
core.debug('Reserving Cache');
|
||||||
|
const cacheId = yield cacheHttpClient.reserveCache(key, paths, {
|
||||||
|
compressionMethod
|
||||||
|
});
|
||||||
|
if (cacheId === -1) {
|
||||||
|
throw new ReserveCacheError(`Unable to reserve cache with key ${key}, another job may be creating this cache.`);
|
||||||
|
}
|
||||||
|
core.debug(`Cache ID: ${cacheId}`);
|
||||||
const cachePaths = yield utils.resolvePaths(paths);
|
const cachePaths = yield utils.resolvePaths(paths);
|
||||||
core.debug('Cache Paths:');
|
core.debug('Cache Paths:');
|
||||||
core.debug(`${JSON.stringify(cachePaths)}`);
|
core.debug(`${JSON.stringify(cachePaths)}`);
|
||||||
@@ -46466,24 +45317,9 @@ function saveCache(paths, key, options) {
|
|||||||
const fileSizeLimit = 10 * 1024 * 1024 * 1024; // 10GB per repo limit
|
const fileSizeLimit = 10 * 1024 * 1024 * 1024; // 10GB per repo limit
|
||||||
const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath);
|
const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath);
|
||||||
core.debug(`File Size: ${archiveFileSize}`);
|
core.debug(`File Size: ${archiveFileSize}`);
|
||||||
// For GHES, this check will take place in ReserveCache API with enterprise file size limit
|
if (archiveFileSize > fileSizeLimit) {
|
||||||
if (archiveFileSize > fileSizeLimit && !utils.isGhes()) {
|
|
||||||
throw new Error(`Cache size of ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B) is over the 10GB limit, not saving cache.`);
|
throw new Error(`Cache size of ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B) is over the 10GB limit, not saving cache.`);
|
||||||
}
|
}
|
||||||
core.debug('Reserving Cache');
|
|
||||||
const reserveCacheResponse = yield cacheHttpClient.reserveCache(key, paths, {
|
|
||||||
compressionMethod,
|
|
||||||
cacheSize: archiveFileSize
|
|
||||||
});
|
|
||||||
if ((_a = reserveCacheResponse === null || reserveCacheResponse === void 0 ? void 0 : reserveCacheResponse.result) === null || _a === void 0 ? void 0 : _a.cacheId) {
|
|
||||||
cacheId = (_b = reserveCacheResponse === null || reserveCacheResponse === void 0 ? void 0 : reserveCacheResponse.result) === null || _b === void 0 ? void 0 : _b.cacheId;
|
|
||||||
}
|
|
||||||
else if ((reserveCacheResponse === null || reserveCacheResponse === void 0 ? void 0 : reserveCacheResponse.statusCode) === 400) {
|
|
||||||
throw new Error((_d = (_c = reserveCacheResponse === null || reserveCacheResponse === void 0 ? void 0 : reserveCacheResponse.error) === null || _c === void 0 ? void 0 : _c.message) !== null && _d !== void 0 ? _d : `Cache size of ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B) is over the data cap limit, not saving cache.`);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
throw new ReserveCacheError(`Unable to reserve cache with key ${key}, another job may be creating this cache. More details: ${(_e = reserveCacheResponse === null || reserveCacheResponse === void 0 ? void 0 : reserveCacheResponse.error) === null || _e === void 0 ? void 0 : _e.message}`);
|
|
||||||
}
|
|
||||||
core.debug(`Saving Cache (ID: ${cacheId})`);
|
core.debug(`Saving Cache (ID: ${cacheId})`);
|
||||||
yield cacheHttpClient.saveCache(cacheId, archivePath, options);
|
yield cacheHttpClient.saveCache(cacheId, archivePath, options);
|
||||||
}
|
}
|
||||||
@@ -47917,7 +46753,8 @@ const utils = __importStar(__webpack_require__(443));
|
|||||||
function run() {
|
function run() {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
try {
|
try {
|
||||||
if (!utils.isCacheFeatureAvailable()) {
|
if (utils.isGhes()) {
|
||||||
|
utils.logWarning("Cache action is not supported on GHES. See https://github.com/actions/cache/issues/505 for more details");
|
||||||
utils.setCacheHitOutput(false);
|
utils.setCacheHitOutput(false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -50741,6 +49578,7 @@ class Poller {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
* @internal
|
||||||
* Starts a loop that will break only if the poller is done
|
* Starts a loop that will break only if the poller is done
|
||||||
* or if the poller is stopped.
|
* or if the poller is stopped.
|
||||||
*/
|
*/
|
||||||
@@ -50754,6 +49592,7 @@ class Poller {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
* @internal
|
||||||
* pollOnce does one polling, by calling to the update method of the underlying
|
* pollOnce does one polling, by calling to the update method of the underlying
|
||||||
* poll operation to make any relevant change effective.
|
* poll operation to make any relevant change effective.
|
||||||
*
|
*
|
||||||
@@ -50787,6 +49626,7 @@ class Poller {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
* @internal
|
||||||
* fireProgress calls the functions passed in via onProgress the method of the poller.
|
* fireProgress calls the functions passed in via onProgress the method of the poller.
|
||||||
*
|
*
|
||||||
* It loops over all of the callbacks received from onProgress, and executes them, sending them
|
* It loops over all of the callbacks received from onProgress, and executes them, sending them
|
||||||
@@ -50800,6 +49640,7 @@ class Poller {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
* @internal
|
||||||
* Invokes the underlying operation's cancel method, and rejects the
|
* Invokes the underlying operation's cancel method, and rejects the
|
||||||
* pollUntilDone promise.
|
* pollUntilDone promise.
|
||||||
*/
|
*/
|
||||||
@@ -50973,7 +49814,7 @@ class Poller {
|
|||||||
*/
|
*/
|
||||||
function getPollingUrl(rawResponse, defaultPath) {
|
function getPollingUrl(rawResponse, defaultPath) {
|
||||||
var _a, _b, _c;
|
var _a, _b, _c;
|
||||||
return ((_c = (_b = (_a = getAzureAsyncOperation(rawResponse)) !== null && _a !== void 0 ? _a : getOperationLocation(rawResponse)) !== null && _b !== void 0 ? _b : getLocation(rawResponse)) !== null && _c !== void 0 ? _c : defaultPath);
|
return ((_c = (_b = (_a = getAzureAsyncOperation(rawResponse)) !== null && _a !== void 0 ? _a : getLocation(rawResponse)) !== null && _b !== void 0 ? _b : getOperationLocation(rawResponse)) !== null && _c !== void 0 ? _c : defaultPath);
|
||||||
}
|
}
|
||||||
function getLocation(rawResponse) {
|
function getLocation(rawResponse) {
|
||||||
return rawResponse.headers["location"];
|
return rawResponse.headers["location"];
|
||||||
@@ -50984,29 +49825,19 @@ function getOperationLocation(rawResponse) {
|
|||||||
function getAzureAsyncOperation(rawResponse) {
|
function getAzureAsyncOperation(rawResponse) {
|
||||||
return rawResponse.headers["azure-asyncoperation"];
|
return rawResponse.headers["azure-asyncoperation"];
|
||||||
}
|
}
|
||||||
function findResourceLocation(requestMethod, rawResponse, requestPath) {
|
|
||||||
switch (requestMethod) {
|
|
||||||
case "PUT": {
|
|
||||||
return requestPath;
|
|
||||||
}
|
|
||||||
case "POST":
|
|
||||||
case "PATCH": {
|
|
||||||
return getLocation(rawResponse);
|
|
||||||
}
|
|
||||||
default: {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
function inferLroMode(requestPath, requestMethod, rawResponse) {
|
function inferLroMode(requestPath, requestMethod, rawResponse) {
|
||||||
if (getAzureAsyncOperation(rawResponse) !== undefined ||
|
if (getAzureAsyncOperation(rawResponse) !== undefined) {
|
||||||
getOperationLocation(rawResponse) !== undefined) {
|
|
||||||
return {
|
return {
|
||||||
mode: "Location",
|
mode: "AzureAsync",
|
||||||
resourceLocation: findResourceLocation(requestMethod, rawResponse, requestPath),
|
resourceLocation: requestMethod === "PUT"
|
||||||
|
? requestPath
|
||||||
|
: requestMethod === "POST" || requestMethod === "PATCH"
|
||||||
|
? getLocation(rawResponse)
|
||||||
|
: undefined,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
else if (getLocation(rawResponse) !== undefined) {
|
else if (getLocation(rawResponse) !== undefined ||
|
||||||
|
getOperationLocation(rawResponse) !== undefined) {
|
||||||
return {
|
return {
|
||||||
mode: "Location",
|
mode: "Location",
|
||||||
};
|
};
|
||||||
@@ -51076,13 +49907,13 @@ function processBodyPollingOperationResult(response) {
|
|||||||
const logger = logger$1.createClientLogger("core-lro");
|
const logger = logger$1.createClientLogger("core-lro");
|
||||||
|
|
||||||
// Copyright (c) Microsoft Corporation.
|
// Copyright (c) Microsoft Corporation.
|
||||||
function isPollingDone(rawResponse) {
|
function getResponseStatus(rawResponse) {
|
||||||
var _a;
|
var _a;
|
||||||
if (isUnexpectedPollingResponse(rawResponse) || rawResponse.statusCode === 202) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
const { status } = (_a = rawResponse.body) !== null && _a !== void 0 ? _a : {};
|
const { status } = (_a = rawResponse.body) !== null && _a !== void 0 ? _a : {};
|
||||||
const state = typeof status === "string" ? status.toLowerCase() : "succeeded";
|
return typeof status === "string" ? status.toLowerCase() : "succeeded";
|
||||||
|
}
|
||||||
|
function isAzureAsyncPollingDone(rawResponse) {
|
||||||
|
const state = getResponseStatus(rawResponse);
|
||||||
if (isUnexpectedPollingResponse(rawResponse) || failureStates.includes(state)) {
|
if (isUnexpectedPollingResponse(rawResponse) || failureStates.includes(state)) {
|
||||||
throw new Error(`The long running operation has failed. The provisioning state: ${state}.`);
|
throw new Error(`The long running operation has failed. The provisioning state: ${state}.`);
|
||||||
}
|
}
|
||||||
@@ -51102,9 +49933,9 @@ async function sendFinalRequest(lro, resourceLocation, lroResourceLocationConfig
|
|||||||
return lro.sendPollRequest(resourceLocation !== null && resourceLocation !== void 0 ? resourceLocation : lro.requestPath);
|
return lro.sendPollRequest(resourceLocation !== null && resourceLocation !== void 0 ? resourceLocation : lro.requestPath);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function processLocationPollingOperationResult(lro, resourceLocation, lroResourceLocationConfig) {
|
function processAzureAsyncOperationResult(lro, resourceLocation, lroResourceLocationConfig) {
|
||||||
return (response) => {
|
return (response) => {
|
||||||
if (isPollingDone(response.rawResponse)) {
|
if (isAzureAsyncPollingDone(response.rawResponse)) {
|
||||||
if (resourceLocation === undefined) {
|
if (resourceLocation === undefined) {
|
||||||
return Object.assign(Object.assign({}, response), { done: true });
|
return Object.assign(Object.assign({}, response), { done: true });
|
||||||
}
|
}
|
||||||
@@ -51119,6 +49950,14 @@ function processLocationPollingOperationResult(lro, resourceLocation, lroResourc
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Copyright (c) Microsoft Corporation.
|
||||||
|
function isLocationPollingDone(rawResponse) {
|
||||||
|
return !isUnexpectedPollingResponse(rawResponse) && rawResponse.statusCode !== 202;
|
||||||
|
}
|
||||||
|
function processLocationPollingOperationResult(response) {
|
||||||
|
return Object.assign(Object.assign({}, response), { done: isLocationPollingDone(response.rawResponse) });
|
||||||
|
}
|
||||||
|
|
||||||
// Copyright (c) Microsoft Corporation.
|
// Copyright (c) Microsoft Corporation.
|
||||||
// Licensed under the MIT license.
|
// Licensed under the MIT license.
|
||||||
function processPassthroughOperationResult(response) {
|
function processPassthroughOperationResult(response) {
|
||||||
@@ -51131,8 +49970,11 @@ function processPassthroughOperationResult(response) {
|
|||||||
*/
|
*/
|
||||||
function createGetLroStatusFromResponse(lroPrimitives, config, lroResourceLocationConfig) {
|
function createGetLroStatusFromResponse(lroPrimitives, config, lroResourceLocationConfig) {
|
||||||
switch (config.mode) {
|
switch (config.mode) {
|
||||||
|
case "AzureAsync": {
|
||||||
|
return processAzureAsyncOperationResult(lroPrimitives, config.resourceLocation, lroResourceLocationConfig);
|
||||||
|
}
|
||||||
case "Location": {
|
case "Location": {
|
||||||
return processLocationPollingOperationResult(lroPrimitives, config.resourceLocation, lroResourceLocationConfig);
|
return processLocationPollingOperationResult;
|
||||||
}
|
}
|
||||||
case "Body": {
|
case "Body": {
|
||||||
return processBodyPollingOperationResult;
|
return processBodyPollingOperationResult;
|
||||||
@@ -51582,8 +50424,7 @@ function retryTypedResponse(name, method, maxAttempts = constants_1.DefaultRetry
|
|||||||
return {
|
return {
|
||||||
statusCode: error.statusCode,
|
statusCode: error.statusCode,
|
||||||
result: null,
|
result: null,
|
||||||
headers: {},
|
headers: {}
|
||||||
error
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
Vendored
+542
-1701
@@ -1199,11 +1199,6 @@ function assertDefined(name, value) {
|
|||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
exports.assertDefined = assertDefined;
|
exports.assertDefined = assertDefined;
|
||||||
function isGhes() {
|
|
||||||
const ghUrl = new URL(process.env['GITHUB_SERVER_URL'] || 'https://github.com');
|
|
||||||
return ghUrl.hostname.toUpperCase() !== 'GITHUB.COM';
|
|
||||||
}
|
|
||||||
exports.isGhes = isGhes;
|
|
||||||
//# sourceMappingURL=cacheUtils.js.map
|
//# sourceMappingURL=cacheUtils.js.map
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
@@ -3197,7 +3192,10 @@ const options_1 = __webpack_require__(538);
|
|||||||
const requestUtils_1 = __webpack_require__(899);
|
const requestUtils_1 = __webpack_require__(899);
|
||||||
const versionSalt = '1.0';
|
const versionSalt = '1.0';
|
||||||
function getCacheApiUrl(resource) {
|
function getCacheApiUrl(resource) {
|
||||||
const baseUrl = process.env['ACTIONS_CACHE_URL'] || '';
|
// Ideally we just use ACTIONS_CACHE_URL
|
||||||
|
const baseUrl = (process.env['ACTIONS_CACHE_URL'] ||
|
||||||
|
process.env['ACTIONS_RUNTIME_URL'] ||
|
||||||
|
'').replace('pipelines', 'artifactcache');
|
||||||
if (!baseUrl) {
|
if (!baseUrl) {
|
||||||
throw new Error('Cache Service Url not found, unable to restore cache.');
|
throw new Error('Cache Service Url not found, unable to restore cache.');
|
||||||
}
|
}
|
||||||
@@ -3275,18 +3273,18 @@ function downloadCache(archiveLocation, archivePath, options) {
|
|||||||
exports.downloadCache = downloadCache;
|
exports.downloadCache = downloadCache;
|
||||||
// Reserve Cache
|
// Reserve Cache
|
||||||
function reserveCache(key, paths, options) {
|
function reserveCache(key, paths, options) {
|
||||||
|
var _a, _b;
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
const httpClient = createHttpClient();
|
const httpClient = createHttpClient();
|
||||||
const version = getCacheVersion(paths, options === null || options === void 0 ? void 0 : options.compressionMethod);
|
const version = getCacheVersion(paths, options === null || options === void 0 ? void 0 : options.compressionMethod);
|
||||||
const reserveCacheRequest = {
|
const reserveCacheRequest = {
|
||||||
key,
|
key,
|
||||||
version,
|
version
|
||||||
cacheSize: options === null || options === void 0 ? void 0 : options.cacheSize
|
|
||||||
};
|
};
|
||||||
const response = yield requestUtils_1.retryTypedResponse('reserveCache', () => __awaiter(this, void 0, void 0, function* () {
|
const response = yield requestUtils_1.retryTypedResponse('reserveCache', () => __awaiter(this, void 0, void 0, function* () {
|
||||||
return httpClient.postJson(getCacheApiUrl('caches'), reserveCacheRequest);
|
return httpClient.postJson(getCacheApiUrl('caches'), reserveCacheRequest);
|
||||||
}));
|
}));
|
||||||
return response;
|
return (_b = (_a = response === null || response === void 0 ? void 0 : response.result) === null || _a === void 0 ? void 0 : _a.cacheId) !== null && _b !== void 0 ? _b : -1;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
exports.reserveCache = reserveCache;
|
exports.reserveCache = reserveCache;
|
||||||
@@ -5492,8 +5490,7 @@ function downloadCacheStorageSDK(archiveLocation, archivePath, options) {
|
|||||||
//
|
//
|
||||||
// If the file exceeds the buffer maximum length (~1 GB on 32-bit systems and ~2 GB
|
// If the file exceeds the buffer maximum length (~1 GB on 32-bit systems and ~2 GB
|
||||||
// on 64-bit systems), split the download into multiple segments
|
// on 64-bit systems), split the download into multiple segments
|
||||||
// ~2 GB = 2147483647, beyond this, we start getting out of range error. So, capping it accordingly.
|
const maxSegmentSize = buffer.constants.MAX_LENGTH;
|
||||||
const maxSegmentSize = Math.min(2147483647, buffer.constants.MAX_LENGTH);
|
|
||||||
const downloadProgress = new DownloadProgress(contentLength);
|
const downloadProgress = new DownloadProgress(contentLength);
|
||||||
const fd = fs.openSync(archivePath, 'w');
|
const fd = fs.openSync(archivePath, 'w');
|
||||||
try {
|
try {
|
||||||
@@ -9650,29 +9647,6 @@ var events = __webpack_require__(614);
|
|||||||
var fs = __webpack_require__(747);
|
var fs = __webpack_require__(747);
|
||||||
var util = __webpack_require__(669);
|
var util = __webpack_require__(669);
|
||||||
|
|
||||||
function _interopNamespace(e) {
|
|
||||||
if (e && e.__esModule) return e;
|
|
||||||
var n = Object.create(null);
|
|
||||||
if (e) {
|
|
||||||
Object.keys(e).forEach(function (k) {
|
|
||||||
if (k !== 'default') {
|
|
||||||
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
||||||
Object.defineProperty(n, k, d.get ? d : {
|
|
||||||
enumerable: true,
|
|
||||||
get: function () { return e[k]; }
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
n["default"] = e;
|
|
||||||
return Object.freeze(n);
|
|
||||||
}
|
|
||||||
|
|
||||||
var coreHttp__namespace = /*#__PURE__*/_interopNamespace(coreHttp);
|
|
||||||
var os__namespace = /*#__PURE__*/_interopNamespace(os);
|
|
||||||
var fs__namespace = /*#__PURE__*/_interopNamespace(fs);
|
|
||||||
var util__namespace = /*#__PURE__*/_interopNamespace(util);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) Microsoft Corporation.
|
* Copyright (c) Microsoft Corporation.
|
||||||
* Licensed under the MIT License.
|
* Licensed under the MIT License.
|
||||||
@@ -10627,10 +10601,10 @@ const BlobItemInternal = {
|
|||||||
modelProperties: {
|
modelProperties: {
|
||||||
name: {
|
name: {
|
||||||
serializedName: "Name",
|
serializedName: "Name",
|
||||||
|
required: true,
|
||||||
xmlName: "Name",
|
xmlName: "Name",
|
||||||
type: {
|
type: {
|
||||||
name: "Composite",
|
name: "String"
|
||||||
className: "BlobName"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
deleted: {
|
deleted: {
|
||||||
@@ -10705,30 +10679,6 @@ const BlobItemInternal = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
const BlobName = {
|
|
||||||
serializedName: "BlobName",
|
|
||||||
type: {
|
|
||||||
name: "Composite",
|
|
||||||
className: "BlobName",
|
|
||||||
modelProperties: {
|
|
||||||
encoded: {
|
|
||||||
serializedName: "Encoded",
|
|
||||||
xmlName: "Encoded",
|
|
||||||
xmlIsAttribute: true,
|
|
||||||
type: {
|
|
||||||
name: "Boolean"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
content: {
|
|
||||||
serializedName: "content",
|
|
||||||
xmlName: "content",
|
|
||||||
type: {
|
|
||||||
name: "String"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
const BlobPropertiesInternal = {
|
const BlobPropertiesInternal = {
|
||||||
serializedName: "BlobPropertiesInternal",
|
serializedName: "BlobPropertiesInternal",
|
||||||
xmlName: "Properties",
|
xmlName: "Properties",
|
||||||
@@ -11172,10 +11122,10 @@ const BlobPrefix = {
|
|||||||
modelProperties: {
|
modelProperties: {
|
||||||
name: {
|
name: {
|
||||||
serializedName: "Name",
|
serializedName: "Name",
|
||||||
|
required: true,
|
||||||
xmlName: "Name",
|
xmlName: "Name",
|
||||||
type: {
|
type: {
|
||||||
name: "Composite",
|
name: "String"
|
||||||
className: "BlobName"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -12798,59 +12748,6 @@ const ContainerSubmitBatchExceptionHeaders = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
const ContainerFilterBlobsHeaders = {
|
|
||||||
serializedName: "Container_filterBlobsHeaders",
|
|
||||||
type: {
|
|
||||||
name: "Composite",
|
|
||||||
className: "ContainerFilterBlobsHeaders",
|
|
||||||
modelProperties: {
|
|
||||||
clientRequestId: {
|
|
||||||
serializedName: "x-ms-client-request-id",
|
|
||||||
xmlName: "x-ms-client-request-id",
|
|
||||||
type: {
|
|
||||||
name: "String"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
requestId: {
|
|
||||||
serializedName: "x-ms-request-id",
|
|
||||||
xmlName: "x-ms-request-id",
|
|
||||||
type: {
|
|
||||||
name: "String"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
version: {
|
|
||||||
serializedName: "x-ms-version",
|
|
||||||
xmlName: "x-ms-version",
|
|
||||||
type: {
|
|
||||||
name: "String"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
date: {
|
|
||||||
serializedName: "date",
|
|
||||||
xmlName: "date",
|
|
||||||
type: {
|
|
||||||
name: "DateTimeRfc1123"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
const ContainerFilterBlobsExceptionHeaders = {
|
|
||||||
serializedName: "Container_filterBlobsExceptionHeaders",
|
|
||||||
type: {
|
|
||||||
name: "Composite",
|
|
||||||
className: "ContainerFilterBlobsExceptionHeaders",
|
|
||||||
modelProperties: {
|
|
||||||
errorCode: {
|
|
||||||
serializedName: "x-ms-error-code",
|
|
||||||
xmlName: "x-ms-error-code",
|
|
||||||
type: {
|
|
||||||
name: "String"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
const ContainerAcquireLeaseHeaders = {
|
const ContainerAcquireLeaseHeaders = {
|
||||||
serializedName: "Container_acquireLeaseHeaders",
|
serializedName: "Container_acquireLeaseHeaders",
|
||||||
type: {
|
type: {
|
||||||
@@ -15359,13 +15256,6 @@ const BlobCopyFromURLHeaders = {
|
|||||||
name: "ByteArray"
|
name: "ByteArray"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
encryptionScope: {
|
|
||||||
serializedName: "x-ms-encryption-scope",
|
|
||||||
xmlName: "x-ms-encryption-scope",
|
|
||||||
type: {
|
|
||||||
name: "String"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
errorCode: {
|
errorCode: {
|
||||||
serializedName: "x-ms-error-code",
|
serializedName: "x-ms-error-code",
|
||||||
xmlName: "x-ms-error-code",
|
xmlName: "x-ms-error-code",
|
||||||
@@ -17883,7 +17773,6 @@ var Mappers = /*#__PURE__*/Object.freeze({
|
|||||||
ListBlobsFlatSegmentResponse: ListBlobsFlatSegmentResponse,
|
ListBlobsFlatSegmentResponse: ListBlobsFlatSegmentResponse,
|
||||||
BlobFlatListSegment: BlobFlatListSegment,
|
BlobFlatListSegment: BlobFlatListSegment,
|
||||||
BlobItemInternal: BlobItemInternal,
|
BlobItemInternal: BlobItemInternal,
|
||||||
BlobName: BlobName,
|
|
||||||
BlobPropertiesInternal: BlobPropertiesInternal,
|
BlobPropertiesInternal: BlobPropertiesInternal,
|
||||||
ListBlobsHierarchySegmentResponse: ListBlobsHierarchySegmentResponse,
|
ListBlobsHierarchySegmentResponse: ListBlobsHierarchySegmentResponse,
|
||||||
BlobHierarchyListSegment: BlobHierarchyListSegment,
|
BlobHierarchyListSegment: BlobHierarchyListSegment,
|
||||||
@@ -17935,8 +17824,6 @@ var Mappers = /*#__PURE__*/Object.freeze({
|
|||||||
ContainerRenameExceptionHeaders: ContainerRenameExceptionHeaders,
|
ContainerRenameExceptionHeaders: ContainerRenameExceptionHeaders,
|
||||||
ContainerSubmitBatchHeaders: ContainerSubmitBatchHeaders,
|
ContainerSubmitBatchHeaders: ContainerSubmitBatchHeaders,
|
||||||
ContainerSubmitBatchExceptionHeaders: ContainerSubmitBatchExceptionHeaders,
|
ContainerSubmitBatchExceptionHeaders: ContainerSubmitBatchExceptionHeaders,
|
||||||
ContainerFilterBlobsHeaders: ContainerFilterBlobsHeaders,
|
|
||||||
ContainerFilterBlobsExceptionHeaders: ContainerFilterBlobsExceptionHeaders,
|
|
||||||
ContainerAcquireLeaseHeaders: ContainerAcquireLeaseHeaders,
|
ContainerAcquireLeaseHeaders: ContainerAcquireLeaseHeaders,
|
||||||
ContainerAcquireLeaseExceptionHeaders: ContainerAcquireLeaseExceptionHeaders,
|
ContainerAcquireLeaseExceptionHeaders: ContainerAcquireLeaseExceptionHeaders,
|
||||||
ContainerReleaseLeaseHeaders: ContainerReleaseLeaseHeaders,
|
ContainerReleaseLeaseHeaders: ContainerReleaseLeaseHeaders,
|
||||||
@@ -18124,7 +18011,7 @@ const timeoutInSeconds = {
|
|||||||
const version = {
|
const version = {
|
||||||
parameterPath: "version",
|
parameterPath: "version",
|
||||||
mapper: {
|
mapper: {
|
||||||
defaultValue: "2021-04-10",
|
defaultValue: "2020-10-02",
|
||||||
isConstant: true,
|
isConstant: true,
|
||||||
serializedName: "x-ms-version",
|
serializedName: "x-ms-version",
|
||||||
type: {
|
type: {
|
||||||
@@ -18219,7 +18106,7 @@ const include = {
|
|||||||
element: {
|
element: {
|
||||||
type: {
|
type: {
|
||||||
name: "Enum",
|
name: "Enum",
|
||||||
allowedValues: ["metadata", "deleted", "system"]
|
allowedValues: ["metadata", "deleted"]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -18741,10 +18628,11 @@ const encryptionKeySha256 = {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
const encryptionAlgorithm = {
|
const encryptionAlgorithm = {
|
||||||
parameterPath: ["options", "cpkInfo", "encryptionAlgorithm"],
|
parameterPath: ["options", "encryptionAlgorithm"],
|
||||||
mapper: {
|
mapper: {
|
||||||
|
defaultValue: "AES256",
|
||||||
|
isConstant: true,
|
||||||
serializedName: "x-ms-encryption-algorithm",
|
serializedName: "x-ms-encryption-algorithm",
|
||||||
xmlName: "x-ms-encryption-algorithm",
|
|
||||||
type: {
|
type: {
|
||||||
name: "String"
|
name: "String"
|
||||||
}
|
}
|
||||||
@@ -19661,7 +19549,7 @@ class Service {
|
|||||||
setProperties(blobServiceProperties, options) {
|
setProperties(blobServiceProperties, options) {
|
||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
blobServiceProperties,
|
blobServiceProperties,
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, setPropertiesOperationSpec);
|
return this.client.sendOperationRequest(operationArguments, setPropertiesOperationSpec);
|
||||||
}
|
}
|
||||||
@@ -19672,9 +19560,9 @@ class Service {
|
|||||||
*/
|
*/
|
||||||
getProperties(options) {
|
getProperties(options) {
|
||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, getPropertiesOperationSpec$2);
|
return this.client.sendOperationRequest(operationArguments, getPropertiesOperationSpec);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Retrieves statistics related to replication for the Blob service. It is only available on the
|
* Retrieves statistics related to replication for the Blob service. It is only available on the
|
||||||
@@ -19684,7 +19572,7 @@ class Service {
|
|||||||
*/
|
*/
|
||||||
getStatistics(options) {
|
getStatistics(options) {
|
||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, getStatisticsOperationSpec);
|
return this.client.sendOperationRequest(operationArguments, getStatisticsOperationSpec);
|
||||||
}
|
}
|
||||||
@@ -19694,7 +19582,7 @@ class Service {
|
|||||||
*/
|
*/
|
||||||
listContainersSegment(options) {
|
listContainersSegment(options) {
|
||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, listContainersSegmentOperationSpec);
|
return this.client.sendOperationRequest(operationArguments, listContainersSegmentOperationSpec);
|
||||||
}
|
}
|
||||||
@@ -19707,7 +19595,7 @@ class Service {
|
|||||||
getUserDelegationKey(keyInfo, options) {
|
getUserDelegationKey(keyInfo, options) {
|
||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
keyInfo,
|
keyInfo,
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, getUserDelegationKeyOperationSpec);
|
return this.client.sendOperationRequest(operationArguments, getUserDelegationKeyOperationSpec);
|
||||||
}
|
}
|
||||||
@@ -19717,9 +19605,9 @@ class Service {
|
|||||||
*/
|
*/
|
||||||
getAccountInfo(options) {
|
getAccountInfo(options) {
|
||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, getAccountInfoOperationSpec$2);
|
return this.client.sendOperationRequest(operationArguments, getAccountInfoOperationSpec);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* The Batch operation allows multiple API calls to be embedded into a single HTTP request.
|
* The Batch operation allows multiple API calls to be embedded into a single HTTP request.
|
||||||
@@ -19734,9 +19622,9 @@ class Service {
|
|||||||
contentLength,
|
contentLength,
|
||||||
multipartContentType,
|
multipartContentType,
|
||||||
body,
|
body,
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, submitBatchOperationSpec$1);
|
return this.client.sendOperationRequest(operationArguments, submitBatchOperationSpec);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* The Filter Blobs operation enables callers to list blobs across all containers whose tags match a
|
* The Filter Blobs operation enables callers to list blobs across all containers whose tags match a
|
||||||
@@ -19746,13 +19634,13 @@ class Service {
|
|||||||
*/
|
*/
|
||||||
filterBlobs(options) {
|
filterBlobs(options) {
|
||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, filterBlobsOperationSpec$1);
|
return this.client.sendOperationRequest(operationArguments, filterBlobsOperationSpec);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Operation Specifications
|
// Operation Specifications
|
||||||
const xmlSerializer$5 = new coreHttp__namespace.Serializer(Mappers, /* isXml */ true);
|
const xmlSerializer = new coreHttp.Serializer(Mappers, /* isXml */ true);
|
||||||
const setPropertiesOperationSpec = {
|
const setPropertiesOperationSpec = {
|
||||||
path: "/",
|
path: "/",
|
||||||
httpMethod: "PUT",
|
httpMethod: "PUT",
|
||||||
@@ -19781,9 +19669,9 @@ const setPropertiesOperationSpec = {
|
|||||||
isXML: true,
|
isXML: true,
|
||||||
contentType: "application/xml; charset=utf-8",
|
contentType: "application/xml; charset=utf-8",
|
||||||
mediaType: "xml",
|
mediaType: "xml",
|
||||||
serializer: xmlSerializer$5
|
serializer: xmlSerializer
|
||||||
};
|
};
|
||||||
const getPropertiesOperationSpec$2 = {
|
const getPropertiesOperationSpec = {
|
||||||
path: "/",
|
path: "/",
|
||||||
httpMethod: "GET",
|
httpMethod: "GET",
|
||||||
responses: {
|
responses: {
|
||||||
@@ -19808,7 +19696,7 @@ const getPropertiesOperationSpec$2 = {
|
|||||||
accept1
|
accept1
|
||||||
],
|
],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer$5
|
serializer: xmlSerializer
|
||||||
};
|
};
|
||||||
const getStatisticsOperationSpec = {
|
const getStatisticsOperationSpec = {
|
||||||
path: "/",
|
path: "/",
|
||||||
@@ -19835,7 +19723,7 @@ const getStatisticsOperationSpec = {
|
|||||||
accept1
|
accept1
|
||||||
],
|
],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer$5
|
serializer: xmlSerializer
|
||||||
};
|
};
|
||||||
const listContainersSegmentOperationSpec = {
|
const listContainersSegmentOperationSpec = {
|
||||||
path: "/",
|
path: "/",
|
||||||
@@ -19865,7 +19753,7 @@ const listContainersSegmentOperationSpec = {
|
|||||||
accept1
|
accept1
|
||||||
],
|
],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer$5
|
serializer: xmlSerializer
|
||||||
};
|
};
|
||||||
const getUserDelegationKeyOperationSpec = {
|
const getUserDelegationKeyOperationSpec = {
|
||||||
path: "/",
|
path: "/",
|
||||||
@@ -19896,9 +19784,9 @@ const getUserDelegationKeyOperationSpec = {
|
|||||||
isXML: true,
|
isXML: true,
|
||||||
contentType: "application/xml; charset=utf-8",
|
contentType: "application/xml; charset=utf-8",
|
||||||
mediaType: "xml",
|
mediaType: "xml",
|
||||||
serializer: xmlSerializer$5
|
serializer: xmlSerializer
|
||||||
};
|
};
|
||||||
const getAccountInfoOperationSpec$2 = {
|
const getAccountInfoOperationSpec = {
|
||||||
path: "/",
|
path: "/",
|
||||||
httpMethod: "GET",
|
httpMethod: "GET",
|
||||||
responses: {
|
responses: {
|
||||||
@@ -19914,9 +19802,9 @@ const getAccountInfoOperationSpec$2 = {
|
|||||||
urlParameters: [url],
|
urlParameters: [url],
|
||||||
headerParameters: [version, accept1],
|
headerParameters: [version, accept1],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer$5
|
serializer: xmlSerializer
|
||||||
};
|
};
|
||||||
const submitBatchOperationSpec$1 = {
|
const submitBatchOperationSpec = {
|
||||||
path: "/",
|
path: "/",
|
||||||
httpMethod: "POST",
|
httpMethod: "POST",
|
||||||
responses: {
|
responses: {
|
||||||
@@ -19946,9 +19834,9 @@ const submitBatchOperationSpec$1 = {
|
|||||||
isXML: true,
|
isXML: true,
|
||||||
contentType: "application/xml; charset=utf-8",
|
contentType: "application/xml; charset=utf-8",
|
||||||
mediaType: "xml",
|
mediaType: "xml",
|
||||||
serializer: xmlSerializer$5
|
serializer: xmlSerializer
|
||||||
};
|
};
|
||||||
const filterBlobsOperationSpec$1 = {
|
const filterBlobsOperationSpec = {
|
||||||
path: "/",
|
path: "/",
|
||||||
httpMethod: "GET",
|
httpMethod: "GET",
|
||||||
responses: {
|
responses: {
|
||||||
@@ -19975,7 +19863,7 @@ const filterBlobsOperationSpec$1 = {
|
|||||||
accept1
|
accept1
|
||||||
],
|
],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer$5
|
serializer: xmlSerializer
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -20001,9 +19889,9 @@ class Container {
|
|||||||
*/
|
*/
|
||||||
create(options) {
|
create(options) {
|
||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, createOperationSpec$2);
|
return this.client.sendOperationRequest(operationArguments, createOperationSpec);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* returns all user-defined metadata and system properties for the specified container. The data
|
* returns all user-defined metadata and system properties for the specified container. The data
|
||||||
@@ -20012,7 +19900,7 @@ class Container {
|
|||||||
*/
|
*/
|
||||||
getProperties(options) {
|
getProperties(options) {
|
||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, getPropertiesOperationSpec$1);
|
return this.client.sendOperationRequest(operationArguments, getPropertiesOperationSpec$1);
|
||||||
}
|
}
|
||||||
@@ -20023,9 +19911,9 @@ class Container {
|
|||||||
*/
|
*/
|
||||||
delete(options) {
|
delete(options) {
|
||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, deleteOperationSpec$1);
|
return this.client.sendOperationRequest(operationArguments, deleteOperationSpec);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* operation sets one or more user-defined name-value pairs for the specified container.
|
* operation sets one or more user-defined name-value pairs for the specified container.
|
||||||
@@ -20033,9 +19921,9 @@ class Container {
|
|||||||
*/
|
*/
|
||||||
setMetadata(options) {
|
setMetadata(options) {
|
||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, setMetadataOperationSpec$1);
|
return this.client.sendOperationRequest(operationArguments, setMetadataOperationSpec);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* gets the permissions for the specified container. The permissions indicate whether container data
|
* gets the permissions for the specified container. The permissions indicate whether container data
|
||||||
@@ -20044,7 +19932,7 @@ class Container {
|
|||||||
*/
|
*/
|
||||||
getAccessPolicy(options) {
|
getAccessPolicy(options) {
|
||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, getAccessPolicyOperationSpec);
|
return this.client.sendOperationRequest(operationArguments, getAccessPolicyOperationSpec);
|
||||||
}
|
}
|
||||||
@@ -20055,7 +19943,7 @@ class Container {
|
|||||||
*/
|
*/
|
||||||
setAccessPolicy(options) {
|
setAccessPolicy(options) {
|
||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, setAccessPolicyOperationSpec);
|
return this.client.sendOperationRequest(operationArguments, setAccessPolicyOperationSpec);
|
||||||
}
|
}
|
||||||
@@ -20065,7 +19953,7 @@ class Container {
|
|||||||
*/
|
*/
|
||||||
restore(options) {
|
restore(options) {
|
||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, restoreOperationSpec);
|
return this.client.sendOperationRequest(operationArguments, restoreOperationSpec);
|
||||||
}
|
}
|
||||||
@@ -20077,7 +19965,7 @@ class Container {
|
|||||||
rename(sourceContainerName, options) {
|
rename(sourceContainerName, options) {
|
||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
sourceContainerName,
|
sourceContainerName,
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, renameOperationSpec);
|
return this.client.sendOperationRequest(operationArguments, renameOperationSpec);
|
||||||
}
|
}
|
||||||
@@ -20094,20 +19982,9 @@ class Container {
|
|||||||
contentLength,
|
contentLength,
|
||||||
multipartContentType,
|
multipartContentType,
|
||||||
body,
|
body,
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, submitBatchOperationSpec);
|
return this.client.sendOperationRequest(operationArguments, submitBatchOperationSpec$1);
|
||||||
}
|
|
||||||
/**
|
|
||||||
* The Filter Blobs operation enables callers to list blobs in a container whose tags match a given
|
|
||||||
* search expression. Filter blobs searches within the given container.
|
|
||||||
* @param options The options parameters.
|
|
||||||
*/
|
|
||||||
filterBlobs(options) {
|
|
||||||
const operationArguments = {
|
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
|
||||||
};
|
|
||||||
return this.client.sendOperationRequest(operationArguments, filterBlobsOperationSpec);
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* [Update] establishes and manages a lock on a container for delete operations. The lock duration can
|
* [Update] establishes and manages a lock on a container for delete operations. The lock duration can
|
||||||
@@ -20116,9 +19993,9 @@ class Container {
|
|||||||
*/
|
*/
|
||||||
acquireLease(options) {
|
acquireLease(options) {
|
||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, acquireLeaseOperationSpec$1);
|
return this.client.sendOperationRequest(operationArguments, acquireLeaseOperationSpec);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* [Update] establishes and manages a lock on a container for delete operations. The lock duration can
|
* [Update] establishes and manages a lock on a container for delete operations. The lock duration can
|
||||||
@@ -20129,9 +20006,9 @@ class Container {
|
|||||||
releaseLease(leaseId, options) {
|
releaseLease(leaseId, options) {
|
||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
leaseId,
|
leaseId,
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, releaseLeaseOperationSpec$1);
|
return this.client.sendOperationRequest(operationArguments, releaseLeaseOperationSpec);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* [Update] establishes and manages a lock on a container for delete operations. The lock duration can
|
* [Update] establishes and manages a lock on a container for delete operations. The lock duration can
|
||||||
@@ -20142,9 +20019,9 @@ class Container {
|
|||||||
renewLease(leaseId, options) {
|
renewLease(leaseId, options) {
|
||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
leaseId,
|
leaseId,
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, renewLeaseOperationSpec$1);
|
return this.client.sendOperationRequest(operationArguments, renewLeaseOperationSpec);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* [Update] establishes and manages a lock on a container for delete operations. The lock duration can
|
* [Update] establishes and manages a lock on a container for delete operations. The lock duration can
|
||||||
@@ -20153,9 +20030,9 @@ class Container {
|
|||||||
*/
|
*/
|
||||||
breakLease(options) {
|
breakLease(options) {
|
||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, breakLeaseOperationSpec$1);
|
return this.client.sendOperationRequest(operationArguments, breakLeaseOperationSpec);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* [Update] establishes and manages a lock on a container for delete operations. The lock duration can
|
* [Update] establishes and manages a lock on a container for delete operations. The lock duration can
|
||||||
@@ -20170,9 +20047,9 @@ class Container {
|
|||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
leaseId,
|
leaseId,
|
||||||
proposedLeaseId,
|
proposedLeaseId,
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, changeLeaseOperationSpec$1);
|
return this.client.sendOperationRequest(operationArguments, changeLeaseOperationSpec);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* [Update] The List Blobs operation returns a list of the blobs under the specified container
|
* [Update] The List Blobs operation returns a list of the blobs under the specified container
|
||||||
@@ -20180,7 +20057,7 @@ class Container {
|
|||||||
*/
|
*/
|
||||||
listBlobFlatSegment(options) {
|
listBlobFlatSegment(options) {
|
||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, listBlobFlatSegmentOperationSpec);
|
return this.client.sendOperationRequest(operationArguments, listBlobFlatSegmentOperationSpec);
|
||||||
}
|
}
|
||||||
@@ -20195,7 +20072,7 @@ class Container {
|
|||||||
listBlobHierarchySegment(delimiter, options) {
|
listBlobHierarchySegment(delimiter, options) {
|
||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
delimiter,
|
delimiter,
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, listBlobHierarchySegmentOperationSpec);
|
return this.client.sendOperationRequest(operationArguments, listBlobHierarchySegmentOperationSpec);
|
||||||
}
|
}
|
||||||
@@ -20205,14 +20082,14 @@ class Container {
|
|||||||
*/
|
*/
|
||||||
getAccountInfo(options) {
|
getAccountInfo(options) {
|
||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, getAccountInfoOperationSpec$1);
|
return this.client.sendOperationRequest(operationArguments, getAccountInfoOperationSpec$1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Operation Specifications
|
// Operation Specifications
|
||||||
const xmlSerializer$4 = new coreHttp__namespace.Serializer(Mappers, /* isXml */ true);
|
const xmlSerializer$1 = new coreHttp.Serializer(Mappers, /* isXml */ true);
|
||||||
const createOperationSpec$2 = {
|
const createOperationSpec = {
|
||||||
path: "/{containerName}",
|
path: "/{containerName}",
|
||||||
httpMethod: "PUT",
|
httpMethod: "PUT",
|
||||||
responses: {
|
responses: {
|
||||||
@@ -20236,7 +20113,7 @@ const createOperationSpec$2 = {
|
|||||||
preventEncryptionScopeOverride
|
preventEncryptionScopeOverride
|
||||||
],
|
],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer$4
|
serializer: xmlSerializer$1
|
||||||
};
|
};
|
||||||
const getPropertiesOperationSpec$1 = {
|
const getPropertiesOperationSpec$1 = {
|
||||||
path: "/{containerName}",
|
path: "/{containerName}",
|
||||||
@@ -20259,9 +20136,9 @@ const getPropertiesOperationSpec$1 = {
|
|||||||
leaseId
|
leaseId
|
||||||
],
|
],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer$4
|
serializer: xmlSerializer$1
|
||||||
};
|
};
|
||||||
const deleteOperationSpec$1 = {
|
const deleteOperationSpec = {
|
||||||
path: "/{containerName}",
|
path: "/{containerName}",
|
||||||
httpMethod: "DELETE",
|
httpMethod: "DELETE",
|
||||||
responses: {
|
responses: {
|
||||||
@@ -20284,9 +20161,9 @@ const deleteOperationSpec$1 = {
|
|||||||
ifUnmodifiedSince
|
ifUnmodifiedSince
|
||||||
],
|
],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer$4
|
serializer: xmlSerializer$1
|
||||||
};
|
};
|
||||||
const setMetadataOperationSpec$1 = {
|
const setMetadataOperationSpec = {
|
||||||
path: "/{containerName}",
|
path: "/{containerName}",
|
||||||
httpMethod: "PUT",
|
httpMethod: "PUT",
|
||||||
responses: {
|
responses: {
|
||||||
@@ -20313,7 +20190,7 @@ const setMetadataOperationSpec$1 = {
|
|||||||
ifModifiedSince
|
ifModifiedSince
|
||||||
],
|
],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer$4
|
serializer: xmlSerializer$1
|
||||||
};
|
};
|
||||||
const getAccessPolicyOperationSpec = {
|
const getAccessPolicyOperationSpec = {
|
||||||
path: "/{containerName}",
|
path: "/{containerName}",
|
||||||
@@ -20352,7 +20229,7 @@ const getAccessPolicyOperationSpec = {
|
|||||||
leaseId
|
leaseId
|
||||||
],
|
],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer$4
|
serializer: xmlSerializer$1
|
||||||
};
|
};
|
||||||
const setAccessPolicyOperationSpec = {
|
const setAccessPolicyOperationSpec = {
|
||||||
path: "/{containerName}",
|
path: "/{containerName}",
|
||||||
@@ -20386,7 +20263,7 @@ const setAccessPolicyOperationSpec = {
|
|||||||
isXML: true,
|
isXML: true,
|
||||||
contentType: "application/xml; charset=utf-8",
|
contentType: "application/xml; charset=utf-8",
|
||||||
mediaType: "xml",
|
mediaType: "xml",
|
||||||
serializer: xmlSerializer$4
|
serializer: xmlSerializer$1
|
||||||
};
|
};
|
||||||
const restoreOperationSpec = {
|
const restoreOperationSpec = {
|
||||||
path: "/{containerName}",
|
path: "/{containerName}",
|
||||||
@@ -20414,7 +20291,7 @@ const restoreOperationSpec = {
|
|||||||
deletedContainerVersion
|
deletedContainerVersion
|
||||||
],
|
],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer$4
|
serializer: xmlSerializer$1
|
||||||
};
|
};
|
||||||
const renameOperationSpec = {
|
const renameOperationSpec = {
|
||||||
path: "/{containerName}",
|
path: "/{containerName}",
|
||||||
@@ -20442,9 +20319,9 @@ const renameOperationSpec = {
|
|||||||
sourceLeaseId
|
sourceLeaseId
|
||||||
],
|
],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer$4
|
serializer: xmlSerializer$1
|
||||||
};
|
};
|
||||||
const submitBatchOperationSpec = {
|
const submitBatchOperationSpec$1 = {
|
||||||
path: "/{containerName}",
|
path: "/{containerName}",
|
||||||
httpMethod: "POST",
|
httpMethod: "POST",
|
||||||
responses: {
|
responses: {
|
||||||
@@ -20478,39 +20355,9 @@ const submitBatchOperationSpec = {
|
|||||||
isXML: true,
|
isXML: true,
|
||||||
contentType: "application/xml; charset=utf-8",
|
contentType: "application/xml; charset=utf-8",
|
||||||
mediaType: "xml",
|
mediaType: "xml",
|
||||||
serializer: xmlSerializer$4
|
serializer: xmlSerializer$1
|
||||||
};
|
};
|
||||||
const filterBlobsOperationSpec = {
|
const acquireLeaseOperationSpec = {
|
||||||
path: "/{containerName}",
|
|
||||||
httpMethod: "GET",
|
|
||||||
responses: {
|
|
||||||
200: {
|
|
||||||
bodyMapper: FilterBlobSegment,
|
|
||||||
headersMapper: ContainerFilterBlobsHeaders
|
|
||||||
},
|
|
||||||
default: {
|
|
||||||
bodyMapper: StorageError,
|
|
||||||
headersMapper: ContainerFilterBlobsExceptionHeaders
|
|
||||||
}
|
|
||||||
},
|
|
||||||
queryParameters: [
|
|
||||||
timeoutInSeconds,
|
|
||||||
marker,
|
|
||||||
maxPageSize,
|
|
||||||
comp5,
|
|
||||||
where,
|
|
||||||
restype2
|
|
||||||
],
|
|
||||||
urlParameters: [url],
|
|
||||||
headerParameters: [
|
|
||||||
version,
|
|
||||||
requestId,
|
|
||||||
accept1
|
|
||||||
],
|
|
||||||
isXML: true,
|
|
||||||
serializer: xmlSerializer$4
|
|
||||||
};
|
|
||||||
const acquireLeaseOperationSpec$1 = {
|
|
||||||
path: "/{containerName}",
|
path: "/{containerName}",
|
||||||
httpMethod: "PUT",
|
httpMethod: "PUT",
|
||||||
responses: {
|
responses: {
|
||||||
@@ -20539,9 +20386,9 @@ const acquireLeaseOperationSpec$1 = {
|
|||||||
proposedLeaseId
|
proposedLeaseId
|
||||||
],
|
],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer$4
|
serializer: xmlSerializer$1
|
||||||
};
|
};
|
||||||
const releaseLeaseOperationSpec$1 = {
|
const releaseLeaseOperationSpec = {
|
||||||
path: "/{containerName}",
|
path: "/{containerName}",
|
||||||
httpMethod: "PUT",
|
httpMethod: "PUT",
|
||||||
responses: {
|
responses: {
|
||||||
@@ -20569,9 +20416,9 @@ const releaseLeaseOperationSpec$1 = {
|
|||||||
leaseId1
|
leaseId1
|
||||||
],
|
],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer$4
|
serializer: xmlSerializer$1
|
||||||
};
|
};
|
||||||
const renewLeaseOperationSpec$1 = {
|
const renewLeaseOperationSpec = {
|
||||||
path: "/{containerName}",
|
path: "/{containerName}",
|
||||||
httpMethod: "PUT",
|
httpMethod: "PUT",
|
||||||
responses: {
|
responses: {
|
||||||
@@ -20599,9 +20446,9 @@ const renewLeaseOperationSpec$1 = {
|
|||||||
action2
|
action2
|
||||||
],
|
],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer$4
|
serializer: xmlSerializer$1
|
||||||
};
|
};
|
||||||
const breakLeaseOperationSpec$1 = {
|
const breakLeaseOperationSpec = {
|
||||||
path: "/{containerName}",
|
path: "/{containerName}",
|
||||||
httpMethod: "PUT",
|
httpMethod: "PUT",
|
||||||
responses: {
|
responses: {
|
||||||
@@ -20629,9 +20476,9 @@ const breakLeaseOperationSpec$1 = {
|
|||||||
breakPeriod
|
breakPeriod
|
||||||
],
|
],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer$4
|
serializer: xmlSerializer$1
|
||||||
};
|
};
|
||||||
const changeLeaseOperationSpec$1 = {
|
const changeLeaseOperationSpec = {
|
||||||
path: "/{containerName}",
|
path: "/{containerName}",
|
||||||
httpMethod: "PUT",
|
httpMethod: "PUT",
|
||||||
responses: {
|
responses: {
|
||||||
@@ -20660,7 +20507,7 @@ const changeLeaseOperationSpec$1 = {
|
|||||||
proposedLeaseId1
|
proposedLeaseId1
|
||||||
],
|
],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer$4
|
serializer: xmlSerializer$1
|
||||||
};
|
};
|
||||||
const listBlobFlatSegmentOperationSpec = {
|
const listBlobFlatSegmentOperationSpec = {
|
||||||
path: "/{containerName}",
|
path: "/{containerName}",
|
||||||
@@ -20691,7 +20538,7 @@ const listBlobFlatSegmentOperationSpec = {
|
|||||||
accept1
|
accept1
|
||||||
],
|
],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer$4
|
serializer: xmlSerializer$1
|
||||||
};
|
};
|
||||||
const listBlobHierarchySegmentOperationSpec = {
|
const listBlobHierarchySegmentOperationSpec = {
|
||||||
path: "/{containerName}",
|
path: "/{containerName}",
|
||||||
@@ -20723,7 +20570,7 @@ const listBlobHierarchySegmentOperationSpec = {
|
|||||||
accept1
|
accept1
|
||||||
],
|
],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer$4
|
serializer: xmlSerializer$1
|
||||||
};
|
};
|
||||||
const getAccountInfoOperationSpec$1 = {
|
const getAccountInfoOperationSpec$1 = {
|
||||||
path: "/{containerName}",
|
path: "/{containerName}",
|
||||||
@@ -20741,7 +20588,7 @@ const getAccountInfoOperationSpec$1 = {
|
|||||||
urlParameters: [url],
|
urlParameters: [url],
|
||||||
headerParameters: [version, accept1],
|
headerParameters: [version, accept1],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer$4
|
serializer: xmlSerializer$1
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -20767,7 +20614,7 @@ class Blob$1 {
|
|||||||
*/
|
*/
|
||||||
download(options) {
|
download(options) {
|
||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, downloadOperationSpec);
|
return this.client.sendOperationRequest(operationArguments, downloadOperationSpec);
|
||||||
}
|
}
|
||||||
@@ -20778,9 +20625,9 @@ class Blob$1 {
|
|||||||
*/
|
*/
|
||||||
getProperties(options) {
|
getProperties(options) {
|
||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, getPropertiesOperationSpec);
|
return this.client.sendOperationRequest(operationArguments, getPropertiesOperationSpec$2);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* If the storage account's soft delete feature is disabled then, when a blob is deleted, it is
|
* If the storage account's soft delete feature is disabled then, when a blob is deleted, it is
|
||||||
@@ -20799,9 +20646,9 @@ class Blob$1 {
|
|||||||
*/
|
*/
|
||||||
delete(options) {
|
delete(options) {
|
||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, deleteOperationSpec);
|
return this.client.sendOperationRequest(operationArguments, deleteOperationSpec$1);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Undelete a blob that was previously soft deleted
|
* Undelete a blob that was previously soft deleted
|
||||||
@@ -20809,7 +20656,7 @@ class Blob$1 {
|
|||||||
*/
|
*/
|
||||||
undelete(options) {
|
undelete(options) {
|
||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, undeleteOperationSpec);
|
return this.client.sendOperationRequest(operationArguments, undeleteOperationSpec);
|
||||||
}
|
}
|
||||||
@@ -20821,7 +20668,7 @@ class Blob$1 {
|
|||||||
setExpiry(expiryOptions, options) {
|
setExpiry(expiryOptions, options) {
|
||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
expiryOptions,
|
expiryOptions,
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, setExpiryOperationSpec);
|
return this.client.sendOperationRequest(operationArguments, setExpiryOperationSpec);
|
||||||
}
|
}
|
||||||
@@ -20831,7 +20678,7 @@ class Blob$1 {
|
|||||||
*/
|
*/
|
||||||
setHttpHeaders(options) {
|
setHttpHeaders(options) {
|
||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, setHttpHeadersOperationSpec);
|
return this.client.sendOperationRequest(operationArguments, setHttpHeadersOperationSpec);
|
||||||
}
|
}
|
||||||
@@ -20841,7 +20688,7 @@ class Blob$1 {
|
|||||||
*/
|
*/
|
||||||
setImmutabilityPolicy(options) {
|
setImmutabilityPolicy(options) {
|
||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, setImmutabilityPolicyOperationSpec);
|
return this.client.sendOperationRequest(operationArguments, setImmutabilityPolicyOperationSpec);
|
||||||
}
|
}
|
||||||
@@ -20851,7 +20698,7 @@ class Blob$1 {
|
|||||||
*/
|
*/
|
||||||
deleteImmutabilityPolicy(options) {
|
deleteImmutabilityPolicy(options) {
|
||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, deleteImmutabilityPolicyOperationSpec);
|
return this.client.sendOperationRequest(operationArguments, deleteImmutabilityPolicyOperationSpec);
|
||||||
}
|
}
|
||||||
@@ -20863,7 +20710,7 @@ class Blob$1 {
|
|||||||
setLegalHold(legalHold, options) {
|
setLegalHold(legalHold, options) {
|
||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
legalHold,
|
legalHold,
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, setLegalHoldOperationSpec);
|
return this.client.sendOperationRequest(operationArguments, setLegalHoldOperationSpec);
|
||||||
}
|
}
|
||||||
@@ -20874,9 +20721,9 @@ class Blob$1 {
|
|||||||
*/
|
*/
|
||||||
setMetadata(options) {
|
setMetadata(options) {
|
||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, setMetadataOperationSpec);
|
return this.client.sendOperationRequest(operationArguments, setMetadataOperationSpec$1);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete
|
* [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete
|
||||||
@@ -20885,9 +20732,9 @@ class Blob$1 {
|
|||||||
*/
|
*/
|
||||||
acquireLease(options) {
|
acquireLease(options) {
|
||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, acquireLeaseOperationSpec);
|
return this.client.sendOperationRequest(operationArguments, acquireLeaseOperationSpec$1);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete
|
* [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete
|
||||||
@@ -20898,9 +20745,9 @@ class Blob$1 {
|
|||||||
releaseLease(leaseId, options) {
|
releaseLease(leaseId, options) {
|
||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
leaseId,
|
leaseId,
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, releaseLeaseOperationSpec);
|
return this.client.sendOperationRequest(operationArguments, releaseLeaseOperationSpec$1);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete
|
* [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete
|
||||||
@@ -20911,9 +20758,9 @@ class Blob$1 {
|
|||||||
renewLease(leaseId, options) {
|
renewLease(leaseId, options) {
|
||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
leaseId,
|
leaseId,
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, renewLeaseOperationSpec);
|
return this.client.sendOperationRequest(operationArguments, renewLeaseOperationSpec$1);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete
|
* [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete
|
||||||
@@ -20928,9 +20775,9 @@ class Blob$1 {
|
|||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
leaseId,
|
leaseId,
|
||||||
proposedLeaseId,
|
proposedLeaseId,
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, changeLeaseOperationSpec);
|
return this.client.sendOperationRequest(operationArguments, changeLeaseOperationSpec$1);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete
|
* [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete
|
||||||
@@ -20939,9 +20786,9 @@ class Blob$1 {
|
|||||||
*/
|
*/
|
||||||
breakLease(options) {
|
breakLease(options) {
|
||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, breakLeaseOperationSpec);
|
return this.client.sendOperationRequest(operationArguments, breakLeaseOperationSpec$1);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* The Create Snapshot operation creates a read-only snapshot of a blob
|
* The Create Snapshot operation creates a read-only snapshot of a blob
|
||||||
@@ -20949,7 +20796,7 @@ class Blob$1 {
|
|||||||
*/
|
*/
|
||||||
createSnapshot(options) {
|
createSnapshot(options) {
|
||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, createSnapshotOperationSpec);
|
return this.client.sendOperationRequest(operationArguments, createSnapshotOperationSpec);
|
||||||
}
|
}
|
||||||
@@ -20964,7 +20811,7 @@ class Blob$1 {
|
|||||||
startCopyFromURL(copySource, options) {
|
startCopyFromURL(copySource, options) {
|
||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
copySource,
|
copySource,
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, startCopyFromURLOperationSpec);
|
return this.client.sendOperationRequest(operationArguments, startCopyFromURLOperationSpec);
|
||||||
}
|
}
|
||||||
@@ -20980,7 +20827,7 @@ class Blob$1 {
|
|||||||
copyFromURL(copySource, options) {
|
copyFromURL(copySource, options) {
|
||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
copySource,
|
copySource,
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, copyFromURLOperationSpec);
|
return this.client.sendOperationRequest(operationArguments, copyFromURLOperationSpec);
|
||||||
}
|
}
|
||||||
@@ -20994,7 +20841,7 @@ class Blob$1 {
|
|||||||
abortCopyFromURL(copyId, options) {
|
abortCopyFromURL(copyId, options) {
|
||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
copyId,
|
copyId,
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, abortCopyFromURLOperationSpec);
|
return this.client.sendOperationRequest(operationArguments, abortCopyFromURLOperationSpec);
|
||||||
}
|
}
|
||||||
@@ -21010,7 +20857,7 @@ class Blob$1 {
|
|||||||
setTier(tier, options) {
|
setTier(tier, options) {
|
||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
tier,
|
tier,
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, setTierOperationSpec);
|
return this.client.sendOperationRequest(operationArguments, setTierOperationSpec);
|
||||||
}
|
}
|
||||||
@@ -21020,9 +20867,9 @@ class Blob$1 {
|
|||||||
*/
|
*/
|
||||||
getAccountInfo(options) {
|
getAccountInfo(options) {
|
||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, getAccountInfoOperationSpec);
|
return this.client.sendOperationRequest(operationArguments, getAccountInfoOperationSpec$2);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* The Query operation enables users to select/project on blob data by providing simple query
|
* The Query operation enables users to select/project on blob data by providing simple query
|
||||||
@@ -21031,7 +20878,7 @@ class Blob$1 {
|
|||||||
*/
|
*/
|
||||||
query(options) {
|
query(options) {
|
||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, queryOperationSpec);
|
return this.client.sendOperationRequest(operationArguments, queryOperationSpec);
|
||||||
}
|
}
|
||||||
@@ -21041,7 +20888,7 @@ class Blob$1 {
|
|||||||
*/
|
*/
|
||||||
getTags(options) {
|
getTags(options) {
|
||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, getTagsOperationSpec);
|
return this.client.sendOperationRequest(operationArguments, getTagsOperationSpec);
|
||||||
}
|
}
|
||||||
@@ -21051,13 +20898,13 @@ class Blob$1 {
|
|||||||
*/
|
*/
|
||||||
setTags(options) {
|
setTags(options) {
|
||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, setTagsOperationSpec);
|
return this.client.sendOperationRequest(operationArguments, setTagsOperationSpec);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Operation Specifications
|
// Operation Specifications
|
||||||
const xmlSerializer$3 = new coreHttp__namespace.Serializer(Mappers, /* isXml */ true);
|
const xmlSerializer$2 = new coreHttp.Serializer(Mappers, /* isXml */ true);
|
||||||
const downloadOperationSpec = {
|
const downloadOperationSpec = {
|
||||||
path: "/{containerName}/{blob}",
|
path: "/{containerName}/{blob}",
|
||||||
httpMethod: "GET",
|
httpMethod: "GET",
|
||||||
@@ -21105,9 +20952,9 @@ const downloadOperationSpec = {
|
|||||||
ifTags
|
ifTags
|
||||||
],
|
],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer$3
|
serializer: xmlSerializer$2
|
||||||
};
|
};
|
||||||
const getPropertiesOperationSpec = {
|
const getPropertiesOperationSpec$2 = {
|
||||||
path: "/{containerName}/{blob}",
|
path: "/{containerName}/{blob}",
|
||||||
httpMethod: "HEAD",
|
httpMethod: "HEAD",
|
||||||
responses: {
|
responses: {
|
||||||
@@ -21140,9 +20987,9 @@ const getPropertiesOperationSpec = {
|
|||||||
ifTags
|
ifTags
|
||||||
],
|
],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer$3
|
serializer: xmlSerializer$2
|
||||||
};
|
};
|
||||||
const deleteOperationSpec = {
|
const deleteOperationSpec$1 = {
|
||||||
path: "/{containerName}/{blob}",
|
path: "/{containerName}/{blob}",
|
||||||
httpMethod: "DELETE",
|
httpMethod: "DELETE",
|
||||||
responses: {
|
responses: {
|
||||||
@@ -21174,7 +21021,7 @@ const deleteOperationSpec = {
|
|||||||
deleteSnapshots
|
deleteSnapshots
|
||||||
],
|
],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer$3
|
serializer: xmlSerializer$2
|
||||||
};
|
};
|
||||||
const undeleteOperationSpec = {
|
const undeleteOperationSpec = {
|
||||||
path: "/{containerName}/{blob}",
|
path: "/{containerName}/{blob}",
|
||||||
@@ -21196,7 +21043,7 @@ const undeleteOperationSpec = {
|
|||||||
accept1
|
accept1
|
||||||
],
|
],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer$3
|
serializer: xmlSerializer$2
|
||||||
};
|
};
|
||||||
const setExpiryOperationSpec = {
|
const setExpiryOperationSpec = {
|
||||||
path: "/{containerName}/{blob}",
|
path: "/{containerName}/{blob}",
|
||||||
@@ -21220,7 +21067,7 @@ const setExpiryOperationSpec = {
|
|||||||
expiresOn
|
expiresOn
|
||||||
],
|
],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer$3
|
serializer: xmlSerializer$2
|
||||||
};
|
};
|
||||||
const setHttpHeadersOperationSpec = {
|
const setHttpHeadersOperationSpec = {
|
||||||
path: "/{containerName}/{blob}",
|
path: "/{containerName}/{blob}",
|
||||||
@@ -21254,7 +21101,7 @@ const setHttpHeadersOperationSpec = {
|
|||||||
blobContentDisposition
|
blobContentDisposition
|
||||||
],
|
],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer$3
|
serializer: xmlSerializer$2
|
||||||
};
|
};
|
||||||
const setImmutabilityPolicyOperationSpec = {
|
const setImmutabilityPolicyOperationSpec = {
|
||||||
path: "/{containerName}/{blob}",
|
path: "/{containerName}/{blob}",
|
||||||
@@ -21279,7 +21126,7 @@ const setImmutabilityPolicyOperationSpec = {
|
|||||||
immutabilityPolicyMode
|
immutabilityPolicyMode
|
||||||
],
|
],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer$3
|
serializer: xmlSerializer$2
|
||||||
};
|
};
|
||||||
const deleteImmutabilityPolicyOperationSpec = {
|
const deleteImmutabilityPolicyOperationSpec = {
|
||||||
path: "/{containerName}/{blob}",
|
path: "/{containerName}/{blob}",
|
||||||
@@ -21301,7 +21148,7 @@ const deleteImmutabilityPolicyOperationSpec = {
|
|||||||
accept1
|
accept1
|
||||||
],
|
],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer$3
|
serializer: xmlSerializer$2
|
||||||
};
|
};
|
||||||
const setLegalHoldOperationSpec = {
|
const setLegalHoldOperationSpec = {
|
||||||
path: "/{containerName}/{blob}",
|
path: "/{containerName}/{blob}",
|
||||||
@@ -21324,9 +21171,9 @@ const setLegalHoldOperationSpec = {
|
|||||||
legalHold
|
legalHold
|
||||||
],
|
],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer$3
|
serializer: xmlSerializer$2
|
||||||
};
|
};
|
||||||
const setMetadataOperationSpec = {
|
const setMetadataOperationSpec$1 = {
|
||||||
path: "/{containerName}/{blob}",
|
path: "/{containerName}/{blob}",
|
||||||
httpMethod: "PUT",
|
httpMethod: "PUT",
|
||||||
responses: {
|
responses: {
|
||||||
@@ -21357,9 +21204,9 @@ const setMetadataOperationSpec = {
|
|||||||
encryptionScope
|
encryptionScope
|
||||||
],
|
],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer$3
|
serializer: xmlSerializer$2
|
||||||
};
|
};
|
||||||
const acquireLeaseOperationSpec = {
|
const acquireLeaseOperationSpec$1 = {
|
||||||
path: "/{containerName}/{blob}",
|
path: "/{containerName}/{blob}",
|
||||||
httpMethod: "PUT",
|
httpMethod: "PUT",
|
||||||
responses: {
|
responses: {
|
||||||
@@ -21387,9 +21234,9 @@ const acquireLeaseOperationSpec = {
|
|||||||
ifTags
|
ifTags
|
||||||
],
|
],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer$3
|
serializer: xmlSerializer$2
|
||||||
};
|
};
|
||||||
const releaseLeaseOperationSpec = {
|
const releaseLeaseOperationSpec$1 = {
|
||||||
path: "/{containerName}/{blob}",
|
path: "/{containerName}/{blob}",
|
||||||
httpMethod: "PUT",
|
httpMethod: "PUT",
|
||||||
responses: {
|
responses: {
|
||||||
@@ -21416,9 +21263,9 @@ const releaseLeaseOperationSpec = {
|
|||||||
ifTags
|
ifTags
|
||||||
],
|
],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer$3
|
serializer: xmlSerializer$2
|
||||||
};
|
};
|
||||||
const renewLeaseOperationSpec = {
|
const renewLeaseOperationSpec$1 = {
|
||||||
path: "/{containerName}/{blob}",
|
path: "/{containerName}/{blob}",
|
||||||
httpMethod: "PUT",
|
httpMethod: "PUT",
|
||||||
responses: {
|
responses: {
|
||||||
@@ -21445,9 +21292,9 @@ const renewLeaseOperationSpec = {
|
|||||||
ifTags
|
ifTags
|
||||||
],
|
],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer$3
|
serializer: xmlSerializer$2
|
||||||
};
|
};
|
||||||
const changeLeaseOperationSpec = {
|
const changeLeaseOperationSpec$1 = {
|
||||||
path: "/{containerName}/{blob}",
|
path: "/{containerName}/{blob}",
|
||||||
httpMethod: "PUT",
|
httpMethod: "PUT",
|
||||||
responses: {
|
responses: {
|
||||||
@@ -21475,9 +21322,9 @@ const changeLeaseOperationSpec = {
|
|||||||
ifTags
|
ifTags
|
||||||
],
|
],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer$3
|
serializer: xmlSerializer$2
|
||||||
};
|
};
|
||||||
const breakLeaseOperationSpec = {
|
const breakLeaseOperationSpec$1 = {
|
||||||
path: "/{containerName}/{blob}",
|
path: "/{containerName}/{blob}",
|
||||||
httpMethod: "PUT",
|
httpMethod: "PUT",
|
||||||
responses: {
|
responses: {
|
||||||
@@ -21504,7 +21351,7 @@ const breakLeaseOperationSpec = {
|
|||||||
ifTags
|
ifTags
|
||||||
],
|
],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer$3
|
serializer: xmlSerializer$2
|
||||||
};
|
};
|
||||||
const createSnapshotOperationSpec = {
|
const createSnapshotOperationSpec = {
|
||||||
path: "/{containerName}/{blob}",
|
path: "/{containerName}/{blob}",
|
||||||
@@ -21537,7 +21384,7 @@ const createSnapshotOperationSpec = {
|
|||||||
encryptionScope
|
encryptionScope
|
||||||
],
|
],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer$3
|
serializer: xmlSerializer$2
|
||||||
};
|
};
|
||||||
const startCopyFromURLOperationSpec = {
|
const startCopyFromURLOperationSpec = {
|
||||||
path: "/{containerName}/{blob}",
|
path: "/{containerName}/{blob}",
|
||||||
@@ -21579,7 +21426,7 @@ const startCopyFromURLOperationSpec = {
|
|||||||
legalHold1
|
legalHold1
|
||||||
],
|
],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer$3
|
serializer: xmlSerializer$2
|
||||||
};
|
};
|
||||||
const copyFromURLOperationSpec = {
|
const copyFromURLOperationSpec = {
|
||||||
path: "/{containerName}/{blob}",
|
path: "/{containerName}/{blob}",
|
||||||
@@ -21608,7 +21455,6 @@ const copyFromURLOperationSpec = {
|
|||||||
ifTags,
|
ifTags,
|
||||||
immutabilityPolicyExpiry,
|
immutabilityPolicyExpiry,
|
||||||
immutabilityPolicyMode,
|
immutabilityPolicyMode,
|
||||||
encryptionScope,
|
|
||||||
tier,
|
tier,
|
||||||
sourceIfModifiedSince,
|
sourceIfModifiedSince,
|
||||||
sourceIfUnmodifiedSince,
|
sourceIfUnmodifiedSince,
|
||||||
@@ -21622,7 +21468,7 @@ const copyFromURLOperationSpec = {
|
|||||||
copySourceAuthorization
|
copySourceAuthorization
|
||||||
],
|
],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer$3
|
serializer: xmlSerializer$2
|
||||||
};
|
};
|
||||||
const abortCopyFromURLOperationSpec = {
|
const abortCopyFromURLOperationSpec = {
|
||||||
path: "/{containerName}/{blob}",
|
path: "/{containerName}/{blob}",
|
||||||
@@ -21650,7 +21496,7 @@ const abortCopyFromURLOperationSpec = {
|
|||||||
copyActionAbortConstant
|
copyActionAbortConstant
|
||||||
],
|
],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer$3
|
serializer: xmlSerializer$2
|
||||||
};
|
};
|
||||||
const setTierOperationSpec = {
|
const setTierOperationSpec = {
|
||||||
path: "/{containerName}/{blob}",
|
path: "/{containerName}/{blob}",
|
||||||
@@ -21684,9 +21530,9 @@ const setTierOperationSpec = {
|
|||||||
tier1
|
tier1
|
||||||
],
|
],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer$3
|
serializer: xmlSerializer$2
|
||||||
};
|
};
|
||||||
const getAccountInfoOperationSpec = {
|
const getAccountInfoOperationSpec$2 = {
|
||||||
path: "/{containerName}/{blob}",
|
path: "/{containerName}/{blob}",
|
||||||
httpMethod: "GET",
|
httpMethod: "GET",
|
||||||
responses: {
|
responses: {
|
||||||
@@ -21702,7 +21548,7 @@ const getAccountInfoOperationSpec = {
|
|||||||
urlParameters: [url],
|
urlParameters: [url],
|
||||||
headerParameters: [version, accept1],
|
headerParameters: [version, accept1],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer$3
|
serializer: xmlSerializer$2
|
||||||
};
|
};
|
||||||
const queryOperationSpec = {
|
const queryOperationSpec = {
|
||||||
path: "/{containerName}/{blob}",
|
path: "/{containerName}/{blob}",
|
||||||
@@ -21752,7 +21598,7 @@ const queryOperationSpec = {
|
|||||||
isXML: true,
|
isXML: true,
|
||||||
contentType: "application/xml; charset=utf-8",
|
contentType: "application/xml; charset=utf-8",
|
||||||
mediaType: "xml",
|
mediaType: "xml",
|
||||||
serializer: xmlSerializer$3
|
serializer: xmlSerializer$2
|
||||||
};
|
};
|
||||||
const getTagsOperationSpec = {
|
const getTagsOperationSpec = {
|
||||||
path: "/{containerName}/{blob}",
|
path: "/{containerName}/{blob}",
|
||||||
@@ -21782,7 +21628,7 @@ const getTagsOperationSpec = {
|
|||||||
ifTags
|
ifTags
|
||||||
],
|
],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer$3
|
serializer: xmlSerializer$2
|
||||||
};
|
};
|
||||||
const setTagsOperationSpec = {
|
const setTagsOperationSpec = {
|
||||||
path: "/{containerName}/{blob}",
|
path: "/{containerName}/{blob}",
|
||||||
@@ -21816,7 +21662,7 @@ const setTagsOperationSpec = {
|
|||||||
isXML: true,
|
isXML: true,
|
||||||
contentType: "application/xml; charset=utf-8",
|
contentType: "application/xml; charset=utf-8",
|
||||||
mediaType: "xml",
|
mediaType: "xml",
|
||||||
serializer: xmlSerializer$3
|
serializer: xmlSerializer$2
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -21846,7 +21692,7 @@ class PageBlob {
|
|||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
contentLength,
|
contentLength,
|
||||||
blobContentLength,
|
blobContentLength,
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, createOperationSpec$1);
|
return this.client.sendOperationRequest(operationArguments, createOperationSpec$1);
|
||||||
}
|
}
|
||||||
@@ -21860,7 +21706,7 @@ class PageBlob {
|
|||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
contentLength,
|
contentLength,
|
||||||
body,
|
body,
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, uploadPagesOperationSpec);
|
return this.client.sendOperationRequest(operationArguments, uploadPagesOperationSpec);
|
||||||
}
|
}
|
||||||
@@ -21872,7 +21718,7 @@ class PageBlob {
|
|||||||
clearPages(contentLength, options) {
|
clearPages(contentLength, options) {
|
||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
contentLength,
|
contentLength,
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, clearPagesOperationSpec);
|
return this.client.sendOperationRequest(operationArguments, clearPagesOperationSpec);
|
||||||
}
|
}
|
||||||
@@ -21893,7 +21739,7 @@ class PageBlob {
|
|||||||
sourceRange,
|
sourceRange,
|
||||||
contentLength,
|
contentLength,
|
||||||
range,
|
range,
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, uploadPagesFromURLOperationSpec);
|
return this.client.sendOperationRequest(operationArguments, uploadPagesFromURLOperationSpec);
|
||||||
}
|
}
|
||||||
@@ -21904,7 +21750,7 @@ class PageBlob {
|
|||||||
*/
|
*/
|
||||||
getPageRanges(options) {
|
getPageRanges(options) {
|
||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, getPageRangesOperationSpec);
|
return this.client.sendOperationRequest(operationArguments, getPageRangesOperationSpec);
|
||||||
}
|
}
|
||||||
@@ -21915,7 +21761,7 @@ class PageBlob {
|
|||||||
*/
|
*/
|
||||||
getPageRangesDiff(options) {
|
getPageRangesDiff(options) {
|
||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, getPageRangesDiffOperationSpec);
|
return this.client.sendOperationRequest(operationArguments, getPageRangesDiffOperationSpec);
|
||||||
}
|
}
|
||||||
@@ -21928,7 +21774,7 @@ class PageBlob {
|
|||||||
resize(blobContentLength, options) {
|
resize(blobContentLength, options) {
|
||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
blobContentLength,
|
blobContentLength,
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, resizeOperationSpec);
|
return this.client.sendOperationRequest(operationArguments, resizeOperationSpec);
|
||||||
}
|
}
|
||||||
@@ -21942,7 +21788,7 @@ class PageBlob {
|
|||||||
updateSequenceNumber(sequenceNumberAction, options) {
|
updateSequenceNumber(sequenceNumberAction, options) {
|
||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
sequenceNumberAction,
|
sequenceNumberAction,
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, updateSequenceNumberOperationSpec);
|
return this.client.sendOperationRequest(operationArguments, updateSequenceNumberOperationSpec);
|
||||||
}
|
}
|
||||||
@@ -21961,14 +21807,14 @@ class PageBlob {
|
|||||||
copyIncremental(copySource, options) {
|
copyIncremental(copySource, options) {
|
||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
copySource,
|
copySource,
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, copyIncrementalOperationSpec);
|
return this.client.sendOperationRequest(operationArguments, copyIncrementalOperationSpec);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Operation Specifications
|
// Operation Specifications
|
||||||
const xmlSerializer$2 = new coreHttp__namespace.Serializer(Mappers, /* isXml */ true);
|
const xmlSerializer$3 = new coreHttp.Serializer(Mappers, /* isXml */ true);
|
||||||
const serializer$2 = new coreHttp__namespace.Serializer(Mappers, /* isXml */ false);
|
const serializer = new coreHttp.Serializer(Mappers, /* isXml */ false);
|
||||||
const createOperationSpec$1 = {
|
const createOperationSpec$1 = {
|
||||||
path: "/{containerName}/{blob}",
|
path: "/{containerName}/{blob}",
|
||||||
httpMethod: "PUT",
|
httpMethod: "PUT",
|
||||||
@@ -22015,7 +21861,7 @@ const createOperationSpec$1 = {
|
|||||||
blobSequenceNumber
|
blobSequenceNumber
|
||||||
],
|
],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer$2
|
serializer: xmlSerializer$3
|
||||||
};
|
};
|
||||||
const uploadPagesOperationSpec = {
|
const uploadPagesOperationSpec = {
|
||||||
path: "/{containerName}/{blob}",
|
path: "/{containerName}/{blob}",
|
||||||
@@ -22057,7 +21903,7 @@ const uploadPagesOperationSpec = {
|
|||||||
ifSequenceNumberEqualTo
|
ifSequenceNumberEqualTo
|
||||||
],
|
],
|
||||||
mediaType: "binary",
|
mediaType: "binary",
|
||||||
serializer: serializer$2
|
serializer
|
||||||
};
|
};
|
||||||
const clearPagesOperationSpec = {
|
const clearPagesOperationSpec = {
|
||||||
path: "/{containerName}/{blob}",
|
path: "/{containerName}/{blob}",
|
||||||
@@ -22095,7 +21941,7 @@ const clearPagesOperationSpec = {
|
|||||||
pageWrite1
|
pageWrite1
|
||||||
],
|
],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer$2
|
serializer: xmlSerializer$3
|
||||||
};
|
};
|
||||||
const uploadPagesFromURLOperationSpec = {
|
const uploadPagesFromURLOperationSpec = {
|
||||||
path: "/{containerName}/{blob}",
|
path: "/{containerName}/{blob}",
|
||||||
@@ -22142,7 +21988,7 @@ const uploadPagesFromURLOperationSpec = {
|
|||||||
range1
|
range1
|
||||||
],
|
],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer$2
|
serializer: xmlSerializer$3
|
||||||
};
|
};
|
||||||
const getPageRangesOperationSpec = {
|
const getPageRangesOperationSpec = {
|
||||||
path: "/{containerName}/{blob}",
|
path: "/{containerName}/{blob}",
|
||||||
@@ -22176,7 +22022,7 @@ const getPageRangesOperationSpec = {
|
|||||||
ifTags
|
ifTags
|
||||||
],
|
],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer$2
|
serializer: xmlSerializer$3
|
||||||
};
|
};
|
||||||
const getPageRangesDiffOperationSpec = {
|
const getPageRangesDiffOperationSpec = {
|
||||||
path: "/{containerName}/{blob}",
|
path: "/{containerName}/{blob}",
|
||||||
@@ -22212,7 +22058,7 @@ const getPageRangesDiffOperationSpec = {
|
|||||||
prevSnapshotUrl
|
prevSnapshotUrl
|
||||||
],
|
],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer$2
|
serializer: xmlSerializer$3
|
||||||
};
|
};
|
||||||
const resizeOperationSpec = {
|
const resizeOperationSpec = {
|
||||||
path: "/{containerName}/{blob}",
|
path: "/{containerName}/{blob}",
|
||||||
@@ -22245,7 +22091,7 @@ const resizeOperationSpec = {
|
|||||||
blobContentLength
|
blobContentLength
|
||||||
],
|
],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer$2
|
serializer: xmlSerializer$3
|
||||||
};
|
};
|
||||||
const updateSequenceNumberOperationSpec = {
|
const updateSequenceNumberOperationSpec = {
|
||||||
path: "/{containerName}/{blob}",
|
path: "/{containerName}/{blob}",
|
||||||
@@ -22275,7 +22121,7 @@ const updateSequenceNumberOperationSpec = {
|
|||||||
sequenceNumberAction
|
sequenceNumberAction
|
||||||
],
|
],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer$2
|
serializer: xmlSerializer$3
|
||||||
};
|
};
|
||||||
const copyIncrementalOperationSpec = {
|
const copyIncrementalOperationSpec = {
|
||||||
path: "/{containerName}/{blob}",
|
path: "/{containerName}/{blob}",
|
||||||
@@ -22303,7 +22149,7 @@ const copyIncrementalOperationSpec = {
|
|||||||
copySource
|
copySource
|
||||||
],
|
],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer$2
|
serializer: xmlSerializer$3
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -22330,9 +22176,9 @@ class AppendBlob {
|
|||||||
create(contentLength, options) {
|
create(contentLength, options) {
|
||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
contentLength,
|
contentLength,
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, createOperationSpec);
|
return this.client.sendOperationRequest(operationArguments, createOperationSpec$2);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* The Append Block operation commits a new block of data to the end of an existing append blob. The
|
* The Append Block operation commits a new block of data to the end of an existing append blob. The
|
||||||
@@ -22346,7 +22192,7 @@ class AppendBlob {
|
|||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
contentLength,
|
contentLength,
|
||||||
body,
|
body,
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, appendBlockOperationSpec);
|
return this.client.sendOperationRequest(operationArguments, appendBlockOperationSpec);
|
||||||
}
|
}
|
||||||
@@ -22363,7 +22209,7 @@ class AppendBlob {
|
|||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
sourceUrl,
|
sourceUrl,
|
||||||
contentLength,
|
contentLength,
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, appendBlockFromUrlOperationSpec);
|
return this.client.sendOperationRequest(operationArguments, appendBlockFromUrlOperationSpec);
|
||||||
}
|
}
|
||||||
@@ -22374,15 +22220,15 @@ class AppendBlob {
|
|||||||
*/
|
*/
|
||||||
seal(options) {
|
seal(options) {
|
||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, sealOperationSpec);
|
return this.client.sendOperationRequest(operationArguments, sealOperationSpec);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Operation Specifications
|
// Operation Specifications
|
||||||
const xmlSerializer$1 = new coreHttp__namespace.Serializer(Mappers, /* isXml */ true);
|
const xmlSerializer$4 = new coreHttp.Serializer(Mappers, /* isXml */ true);
|
||||||
const serializer$1 = new coreHttp__namespace.Serializer(Mappers, /* isXml */ false);
|
const serializer$1 = new coreHttp.Serializer(Mappers, /* isXml */ false);
|
||||||
const createOperationSpec = {
|
const createOperationSpec$2 = {
|
||||||
path: "/{containerName}/{blob}",
|
path: "/{containerName}/{blob}",
|
||||||
httpMethod: "PUT",
|
httpMethod: "PUT",
|
||||||
responses: {
|
responses: {
|
||||||
@@ -22425,7 +22271,7 @@ const createOperationSpec = {
|
|||||||
blobType1
|
blobType1
|
||||||
],
|
],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer$1
|
serializer: xmlSerializer$4
|
||||||
};
|
};
|
||||||
const appendBlockOperationSpec = {
|
const appendBlockOperationSpec = {
|
||||||
path: "/{containerName}/{blob}",
|
path: "/{containerName}/{blob}",
|
||||||
@@ -22509,7 +22355,7 @@ const appendBlockFromUrlOperationSpec = {
|
|||||||
sourceRange1
|
sourceRange1
|
||||||
],
|
],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer$1
|
serializer: xmlSerializer$4
|
||||||
};
|
};
|
||||||
const sealOperationSpec = {
|
const sealOperationSpec = {
|
||||||
path: "/{containerName}/{blob}",
|
path: "/{containerName}/{blob}",
|
||||||
@@ -22537,7 +22383,7 @@ const sealOperationSpec = {
|
|||||||
appendPosition
|
appendPosition
|
||||||
],
|
],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer$1
|
serializer: xmlSerializer$4
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -22569,7 +22415,7 @@ class BlockBlob {
|
|||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
contentLength,
|
contentLength,
|
||||||
body,
|
body,
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, uploadOperationSpec);
|
return this.client.sendOperationRequest(operationArguments, uploadOperationSpec);
|
||||||
}
|
}
|
||||||
@@ -22590,7 +22436,7 @@ class BlockBlob {
|
|||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
contentLength,
|
contentLength,
|
||||||
copySource,
|
copySource,
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, putBlobFromUrlOperationSpec);
|
return this.client.sendOperationRequest(operationArguments, putBlobFromUrlOperationSpec);
|
||||||
}
|
}
|
||||||
@@ -22608,7 +22454,7 @@ class BlockBlob {
|
|||||||
blockId,
|
blockId,
|
||||||
contentLength,
|
contentLength,
|
||||||
body,
|
body,
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, stageBlockOperationSpec);
|
return this.client.sendOperationRequest(operationArguments, stageBlockOperationSpec);
|
||||||
}
|
}
|
||||||
@@ -22627,7 +22473,7 @@ class BlockBlob {
|
|||||||
blockId,
|
blockId,
|
||||||
contentLength,
|
contentLength,
|
||||||
sourceUrl,
|
sourceUrl,
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, stageBlockFromURLOperationSpec);
|
return this.client.sendOperationRequest(operationArguments, stageBlockFromURLOperationSpec);
|
||||||
}
|
}
|
||||||
@@ -22645,7 +22491,7 @@ class BlockBlob {
|
|||||||
commitBlockList(blocks, options) {
|
commitBlockList(blocks, options) {
|
||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
blocks,
|
blocks,
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, commitBlockListOperationSpec);
|
return this.client.sendOperationRequest(operationArguments, commitBlockListOperationSpec);
|
||||||
}
|
}
|
||||||
@@ -22659,14 +22505,14 @@ class BlockBlob {
|
|||||||
getBlockList(listType, options) {
|
getBlockList(listType, options) {
|
||||||
const operationArguments = {
|
const operationArguments = {
|
||||||
listType,
|
listType,
|
||||||
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
||||||
};
|
};
|
||||||
return this.client.sendOperationRequest(operationArguments, getBlockListOperationSpec);
|
return this.client.sendOperationRequest(operationArguments, getBlockListOperationSpec);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Operation Specifications
|
// Operation Specifications
|
||||||
const xmlSerializer = new coreHttp__namespace.Serializer(Mappers, /* isXml */ true);
|
const xmlSerializer$5 = new coreHttp.Serializer(Mappers, /* isXml */ true);
|
||||||
const serializer = new coreHttp__namespace.Serializer(Mappers, /* isXml */ false);
|
const serializer$2 = new coreHttp.Serializer(Mappers, /* isXml */ false);
|
||||||
const uploadOperationSpec = {
|
const uploadOperationSpec = {
|
||||||
path: "/{containerName}/{blob}",
|
path: "/{containerName}/{blob}",
|
||||||
httpMethod: "PUT",
|
httpMethod: "PUT",
|
||||||
@@ -22714,7 +22560,7 @@ const uploadOperationSpec = {
|
|||||||
blobType2
|
blobType2
|
||||||
],
|
],
|
||||||
mediaType: "binary",
|
mediaType: "binary",
|
||||||
serializer
|
serializer: serializer$2
|
||||||
};
|
};
|
||||||
const putBlobFromUrlOperationSpec = {
|
const putBlobFromUrlOperationSpec = {
|
||||||
path: "/{containerName}/{blob}",
|
path: "/{containerName}/{blob}",
|
||||||
@@ -22767,7 +22613,7 @@ const putBlobFromUrlOperationSpec = {
|
|||||||
copySourceBlobProperties
|
copySourceBlobProperties
|
||||||
],
|
],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer
|
serializer: xmlSerializer$5
|
||||||
};
|
};
|
||||||
const stageBlockOperationSpec = {
|
const stageBlockOperationSpec = {
|
||||||
path: "/{containerName}/{blob}",
|
path: "/{containerName}/{blob}",
|
||||||
@@ -22803,7 +22649,7 @@ const stageBlockOperationSpec = {
|
|||||||
accept2
|
accept2
|
||||||
],
|
],
|
||||||
mediaType: "binary",
|
mediaType: "binary",
|
||||||
serializer
|
serializer: serializer$2
|
||||||
};
|
};
|
||||||
const stageBlockFromURLOperationSpec = {
|
const stageBlockFromURLOperationSpec = {
|
||||||
path: "/{containerName}/{blob}",
|
path: "/{containerName}/{blob}",
|
||||||
@@ -22844,7 +22690,7 @@ const stageBlockFromURLOperationSpec = {
|
|||||||
sourceRange1
|
sourceRange1
|
||||||
],
|
],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer
|
serializer: xmlSerializer$5
|
||||||
};
|
};
|
||||||
const commitBlockListOperationSpec = {
|
const commitBlockListOperationSpec = {
|
||||||
path: "/{containerName}/{blob}",
|
path: "/{containerName}/{blob}",
|
||||||
@@ -22894,7 +22740,7 @@ const commitBlockListOperationSpec = {
|
|||||||
isXML: true,
|
isXML: true,
|
||||||
contentType: "application/xml; charset=utf-8",
|
contentType: "application/xml; charset=utf-8",
|
||||||
mediaType: "xml",
|
mediaType: "xml",
|
||||||
serializer: xmlSerializer
|
serializer: xmlSerializer$5
|
||||||
};
|
};
|
||||||
const getBlockListOperationSpec = {
|
const getBlockListOperationSpec = {
|
||||||
path: "/{containerName}/{blob}",
|
path: "/{containerName}/{blob}",
|
||||||
@@ -22924,7 +22770,7 @@ const getBlockListOperationSpec = {
|
|||||||
ifTags
|
ifTags
|
||||||
],
|
],
|
||||||
isXML: true,
|
isXML: true,
|
||||||
serializer: xmlSerializer
|
serializer: xmlSerializer$5
|
||||||
};
|
};
|
||||||
|
|
||||||
// Copyright (c) Microsoft Corporation.
|
// Copyright (c) Microsoft Corporation.
|
||||||
@@ -22935,8 +22781,8 @@ const logger = logger$1.createClientLogger("storage-blob");
|
|||||||
|
|
||||||
// Copyright (c) Microsoft Corporation.
|
// Copyright (c) Microsoft Corporation.
|
||||||
// Licensed under the MIT license.
|
// Licensed under the MIT license.
|
||||||
const SDK_VERSION = "12.9.0";
|
const SDK_VERSION = "12.8.0";
|
||||||
const SERVICE_VERSION = "2021-04-10";
|
const SERVICE_VERSION = "2020-10-02";
|
||||||
const BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES = 256 * 1024 * 1024; // 256MB
|
const BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES = 256 * 1024 * 1024; // 256MB
|
||||||
const BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES = 4000 * 1024 * 1024; // 4000MB
|
const BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES = 4000 * 1024 * 1024; // 4000MB
|
||||||
const BLOCK_BLOB_MAX_BLOCKS = 50000;
|
const BLOCK_BLOB_MAX_BLOCKS = 50000;
|
||||||
@@ -22953,15 +22799,15 @@ const URLConstants = {
|
|||||||
SIGNATURE: "sig",
|
SIGNATURE: "sig",
|
||||||
SNAPSHOT: "snapshot",
|
SNAPSHOT: "snapshot",
|
||||||
VERSIONID: "versionid",
|
VERSIONID: "versionid",
|
||||||
TIMEOUT: "timeout",
|
TIMEOUT: "timeout"
|
||||||
},
|
}
|
||||||
};
|
};
|
||||||
const HTTPURLConnection = {
|
const HTTPURLConnection = {
|
||||||
HTTP_ACCEPTED: 202,
|
HTTP_ACCEPTED: 202,
|
||||||
HTTP_CONFLICT: 409,
|
HTTP_CONFLICT: 409,
|
||||||
HTTP_NOT_FOUND: 404,
|
HTTP_NOT_FOUND: 404,
|
||||||
HTTP_PRECON_FAILED: 412,
|
HTTP_PRECON_FAILED: 412,
|
||||||
HTTP_RANGE_NOT_SATISFIABLE: 416,
|
HTTP_RANGE_NOT_SATISFIABLE: 416
|
||||||
};
|
};
|
||||||
const HeaderConstants = {
|
const HeaderConstants = {
|
||||||
AUTHORIZATION: "Authorization",
|
AUTHORIZATION: "Authorization",
|
||||||
@@ -22986,7 +22832,7 @@ const HeaderConstants = {
|
|||||||
X_MS_COPY_SOURCE: "x-ms-copy-source",
|
X_MS_COPY_SOURCE: "x-ms-copy-source",
|
||||||
X_MS_DATE: "x-ms-date",
|
X_MS_DATE: "x-ms-date",
|
||||||
X_MS_ERROR_CODE: "x-ms-error-code",
|
X_MS_ERROR_CODE: "x-ms-error-code",
|
||||||
X_MS_VERSION: "x-ms-version",
|
X_MS_VERSION: "x-ms-version"
|
||||||
};
|
};
|
||||||
const ETagNone = "";
|
const ETagNone = "";
|
||||||
const ETagAny = "*";
|
const ETagAny = "*";
|
||||||
@@ -23091,7 +22937,7 @@ const StorageBlobLoggingAllowedHeaderNames = [
|
|||||||
"x-ms-tag-count",
|
"x-ms-tag-count",
|
||||||
"x-ms-encryption-key-sha256",
|
"x-ms-encryption-key-sha256",
|
||||||
"x-ms-if-tags",
|
"x-ms-if-tags",
|
||||||
"x-ms-source-if-tags",
|
"x-ms-source-if-tags"
|
||||||
];
|
];
|
||||||
const StorageBlobLoggingAllowedQueryParameters = [
|
const StorageBlobLoggingAllowedQueryParameters = [
|
||||||
"comp",
|
"comp",
|
||||||
@@ -23126,9 +22972,8 @@ const StorageBlobLoggingAllowedQueryParameters = [
|
|||||||
"skt",
|
"skt",
|
||||||
"sktid",
|
"sktid",
|
||||||
"skv",
|
"skv",
|
||||||
"snapshot",
|
"snapshot"
|
||||||
];
|
];
|
||||||
const BlobUsesCustomerSpecifiedEncryptionMsg = "BlobUsesCustomerSpecifiedEncryption";
|
|
||||||
|
|
||||||
// Copyright (c) Microsoft Corporation.
|
// Copyright (c) Microsoft Corporation.
|
||||||
/**
|
/**
|
||||||
@@ -23268,7 +23113,7 @@ function extractConnectionStringParts(connectionString) {
|
|||||||
url: blobEndpoint,
|
url: blobEndpoint,
|
||||||
accountName,
|
accountName,
|
||||||
accountKey,
|
accountKey,
|
||||||
proxyUri,
|
proxyUri
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -23600,14 +23445,14 @@ function toBlobTags(tags) {
|
|||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
const res = {
|
const res = {
|
||||||
blobTagSet: [],
|
blobTagSet: []
|
||||||
};
|
};
|
||||||
for (const key in tags) {
|
for (const key in tags) {
|
||||||
if (Object.prototype.hasOwnProperty.call(tags, key)) {
|
if (Object.prototype.hasOwnProperty.call(tags, key)) {
|
||||||
const value = tags[key];
|
const value = tags[key];
|
||||||
res.blobTagSet.push({
|
res.blobTagSet.push({
|
||||||
key,
|
key,
|
||||||
value,
|
value
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -23647,33 +23492,33 @@ function toQuerySerialization(textConfiguration) {
|
|||||||
fieldQuote: textConfiguration.fieldQuote || "",
|
fieldQuote: textConfiguration.fieldQuote || "",
|
||||||
recordSeparator: textConfiguration.recordSeparator,
|
recordSeparator: textConfiguration.recordSeparator,
|
||||||
escapeChar: textConfiguration.escapeCharacter || "",
|
escapeChar: textConfiguration.escapeCharacter || "",
|
||||||
headersPresent: textConfiguration.hasHeaders || false,
|
headersPresent: textConfiguration.hasHeaders || false
|
||||||
},
|
}
|
||||||
},
|
}
|
||||||
};
|
};
|
||||||
case "json":
|
case "json":
|
||||||
return {
|
return {
|
||||||
format: {
|
format: {
|
||||||
type: "json",
|
type: "json",
|
||||||
jsonTextConfiguration: {
|
jsonTextConfiguration: {
|
||||||
recordSeparator: textConfiguration.recordSeparator,
|
recordSeparator: textConfiguration.recordSeparator
|
||||||
},
|
}
|
||||||
},
|
}
|
||||||
};
|
};
|
||||||
case "arrow":
|
case "arrow":
|
||||||
return {
|
return {
|
||||||
format: {
|
format: {
|
||||||
type: "arrow",
|
type: "arrow",
|
||||||
arrowConfiguration: {
|
arrowConfiguration: {
|
||||||
schema: textConfiguration.schema,
|
schema: textConfiguration.schema
|
||||||
},
|
}
|
||||||
},
|
}
|
||||||
};
|
};
|
||||||
case "parquet":
|
case "parquet":
|
||||||
return {
|
return {
|
||||||
format: {
|
format: {
|
||||||
type: "parquet",
|
type: "parquet"
|
||||||
},
|
}
|
||||||
};
|
};
|
||||||
default:
|
default:
|
||||||
throw Error("Invalid BlobQueryTextConfiguration.");
|
throw Error("Invalid BlobQueryTextConfiguration.");
|
||||||
@@ -23697,7 +23542,7 @@ function parseObjectReplicationRecord(objectReplicationRecord) {
|
|||||||
}
|
}
|
||||||
const rule = {
|
const rule = {
|
||||||
ruleId: ids[1],
|
ruleId: ids[1],
|
||||||
replicationStatus: objectReplicationRecord[key],
|
replicationStatus: objectReplicationRecord[key]
|
||||||
};
|
};
|
||||||
const policyIndex = orProperties.findIndex((policy) => policy.policyId === ids[0]);
|
const policyIndex = orProperties.findIndex((policy) => policy.policyId === ids[0]);
|
||||||
if (policyIndex > -1) {
|
if (policyIndex > -1) {
|
||||||
@@ -23706,7 +23551,7 @@ function parseObjectReplicationRecord(objectReplicationRecord) {
|
|||||||
else {
|
else {
|
||||||
orProperties.push({
|
orProperties.push({
|
||||||
policyId: ids[0],
|
policyId: ids[0],
|
||||||
rules: [rule],
|
rules: [rule]
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -23725,202 +23570,6 @@ function attachCredential(thing, credential) {
|
|||||||
function httpAuthorizationToString(httpAuthorization) {
|
function httpAuthorizationToString(httpAuthorization) {
|
||||||
return httpAuthorization ? httpAuthorization.scheme + " " + httpAuthorization.value : undefined;
|
return httpAuthorization ? httpAuthorization.scheme + " " + httpAuthorization.value : undefined;
|
||||||
}
|
}
|
||||||
function BlobNameToString(name) {
|
|
||||||
if (name.encoded) {
|
|
||||||
return decodeURIComponent(name.content);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
return name.content;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
function ConvertInternalResponseOfListBlobFlat(internalResponse) {
|
|
||||||
return Object.assign(Object.assign({}, internalResponse), { segment: {
|
|
||||||
blobItems: internalResponse.segment.blobItems.map((blobItemInteral) => {
|
|
||||||
const blobItem = Object.assign(Object.assign({}, blobItemInteral), { name: BlobNameToString(blobItemInteral.name) });
|
|
||||||
return blobItem;
|
|
||||||
}),
|
|
||||||
} });
|
|
||||||
}
|
|
||||||
function ConvertInternalResponseOfListBlobHierarchy(internalResponse) {
|
|
||||||
var _a;
|
|
||||||
return Object.assign(Object.assign({}, internalResponse), { segment: {
|
|
||||||
blobPrefixes: (_a = internalResponse.segment.blobPrefixes) === null || _a === void 0 ? void 0 : _a.map((blobPrefixInternal) => {
|
|
||||||
const blobPrefix = {
|
|
||||||
name: BlobNameToString(blobPrefixInternal.name),
|
|
||||||
};
|
|
||||||
return blobPrefix;
|
|
||||||
}),
|
|
||||||
blobItems: internalResponse.segment.blobItems.map((blobItemInteral) => {
|
|
||||||
const blobItem = Object.assign(Object.assign({}, blobItemInteral), { name: BlobNameToString(blobItemInteral.name) });
|
|
||||||
return blobItem;
|
|
||||||
}),
|
|
||||||
} });
|
|
||||||
}
|
|
||||||
function decodeBase64String(value) {
|
|
||||||
if (coreHttp.isNode) {
|
|
||||||
return Buffer.from(value, "base64");
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
const byteString = atob(value);
|
|
||||||
const arr = new Uint8Array(byteString.length);
|
|
||||||
for (let i = 0; i < byteString.length; i++) {
|
|
||||||
arr[i] = byteString.charCodeAt(i);
|
|
||||||
}
|
|
||||||
return arr;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
function ParseBoolean(content) {
|
|
||||||
if (content === undefined)
|
|
||||||
return undefined;
|
|
||||||
if (content === "true")
|
|
||||||
return true;
|
|
||||||
if (content === "false")
|
|
||||||
return false;
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
function ParseBlobName(blobNameInXML) {
|
|
||||||
if (blobNameInXML["$"] !== undefined && blobNameInXML["#"] !== undefined) {
|
|
||||||
return {
|
|
||||||
encoded: ParseBoolean(blobNameInXML["$"]["Encoded"]),
|
|
||||||
content: blobNameInXML["#"],
|
|
||||||
};
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
return {
|
|
||||||
encoded: false,
|
|
||||||
content: blobNameInXML,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
function ParseBlobItem(blobInXML) {
|
|
||||||
const blobPropertiesInXML = blobInXML["Properties"];
|
|
||||||
const blobProperties = {
|
|
||||||
createdOn: new Date(blobPropertiesInXML["Creation-Time"]),
|
|
||||||
lastModified: new Date(blobPropertiesInXML["Last-Modified"]),
|
|
||||||
etag: blobPropertiesInXML["Etag"],
|
|
||||||
contentLength: blobPropertiesInXML["Content-Length"] === undefined
|
|
||||||
? undefined
|
|
||||||
: parseFloat(blobPropertiesInXML["Content-Length"]),
|
|
||||||
contentType: blobPropertiesInXML["Content-Type"],
|
|
||||||
contentEncoding: blobPropertiesInXML["Content-Encoding"],
|
|
||||||
contentLanguage: blobPropertiesInXML["Content-Language"],
|
|
||||||
contentMD5: decodeBase64String(blobPropertiesInXML["Content-MD5"]),
|
|
||||||
contentDisposition: blobPropertiesInXML["Content-Disposition"],
|
|
||||||
cacheControl: blobPropertiesInXML["Cache-Control"],
|
|
||||||
blobSequenceNumber: blobPropertiesInXML["x-ms-blob-sequence-number"] === undefined
|
|
||||||
? undefined
|
|
||||||
: parseFloat(blobPropertiesInXML["x-ms-blob-sequence-number"]),
|
|
||||||
blobType: blobPropertiesInXML["BlobType"],
|
|
||||||
leaseStatus: blobPropertiesInXML["LeaseStatus"],
|
|
||||||
leaseState: blobPropertiesInXML["LeaseState"],
|
|
||||||
leaseDuration: blobPropertiesInXML["LeaseDuration"],
|
|
||||||
copyId: blobPropertiesInXML["CopyId"],
|
|
||||||
copyStatus: blobPropertiesInXML["CopyStatus"],
|
|
||||||
copySource: blobPropertiesInXML["CopySource"],
|
|
||||||
copyProgress: blobPropertiesInXML["CopyProgress"],
|
|
||||||
copyCompletedOn: blobPropertiesInXML["CopyCompletionTime"] === undefined
|
|
||||||
? undefined
|
|
||||||
: new Date(blobPropertiesInXML["CopyCompletionTime"]),
|
|
||||||
copyStatusDescription: blobPropertiesInXML["CopyStatusDescription"],
|
|
||||||
serverEncrypted: ParseBoolean(blobPropertiesInXML["ServerEncrypted"]),
|
|
||||||
incrementalCopy: ParseBoolean(blobPropertiesInXML["IncrementalCopy"]),
|
|
||||||
destinationSnapshot: blobPropertiesInXML["DestinationSnapshot"],
|
|
||||||
deletedOn: blobPropertiesInXML["DeletedTime"] === undefined
|
|
||||||
? undefined
|
|
||||||
: new Date(blobPropertiesInXML["DeletedTime"]),
|
|
||||||
remainingRetentionDays: blobPropertiesInXML["RemainingRetentionDays"] === undefined
|
|
||||||
? undefined
|
|
||||||
: parseFloat(blobPropertiesInXML["RemainingRetentionDays"]),
|
|
||||||
accessTier: blobPropertiesInXML["AccessTier"],
|
|
||||||
accessTierInferred: ParseBoolean(blobPropertiesInXML["AccessTierInferred"]),
|
|
||||||
archiveStatus: blobPropertiesInXML["ArchiveStatus"],
|
|
||||||
customerProvidedKeySha256: blobPropertiesInXML["CustomerProvidedKeySha256"],
|
|
||||||
encryptionScope: blobPropertiesInXML["EncryptionScope"],
|
|
||||||
accessTierChangedOn: blobPropertiesInXML["AccessTierChangeTime"] === undefined
|
|
||||||
? undefined
|
|
||||||
: new Date(blobPropertiesInXML["AccessTierChangeTime"]),
|
|
||||||
tagCount: blobPropertiesInXML["TagCount"] === undefined
|
|
||||||
? undefined
|
|
||||||
: parseFloat(blobPropertiesInXML["TagCount"]),
|
|
||||||
expiresOn: blobPropertiesInXML["Expiry-Time"] === undefined
|
|
||||||
? undefined
|
|
||||||
: new Date(blobPropertiesInXML["Expiry-Time"]),
|
|
||||||
isSealed: ParseBoolean(blobPropertiesInXML["Sealed"]),
|
|
||||||
rehydratePriority: blobPropertiesInXML["RehydratePriority"],
|
|
||||||
lastAccessedOn: blobPropertiesInXML["LastAccessTime"] === undefined
|
|
||||||
? undefined
|
|
||||||
: new Date(blobPropertiesInXML["LastAccessTime"]),
|
|
||||||
immutabilityPolicyExpiresOn: blobPropertiesInXML["ImmutabilityPolicyUntilDate"] === undefined
|
|
||||||
? undefined
|
|
||||||
: new Date(blobPropertiesInXML["ImmutabilityPolicyUntilDate"]),
|
|
||||||
immutabilityPolicyMode: blobPropertiesInXML["ImmutabilityPolicyMode"],
|
|
||||||
legalHold: ParseBoolean(blobPropertiesInXML["LegalHold"]),
|
|
||||||
};
|
|
||||||
return {
|
|
||||||
name: ParseBlobName(blobInXML["Name"]),
|
|
||||||
deleted: ParseBoolean(blobInXML["Deleted"]),
|
|
||||||
snapshot: blobInXML["Snapshot"],
|
|
||||||
versionId: blobInXML["VersionId"],
|
|
||||||
isCurrentVersion: ParseBoolean(blobInXML["IsCurrentVersion"]),
|
|
||||||
properties: blobProperties,
|
|
||||||
metadata: blobInXML["Metadata"],
|
|
||||||
blobTags: ParseBlobTags(blobInXML["Tags"]),
|
|
||||||
objectReplicationMetadata: blobInXML["OrMetadata"],
|
|
||||||
hasVersionsOnly: ParseBoolean(blobInXML["HasVersionsOnly"]),
|
|
||||||
};
|
|
||||||
}
|
|
||||||
function ParseBlobPrefix(blobPrefixInXML) {
|
|
||||||
return {
|
|
||||||
name: ParseBlobName(blobPrefixInXML["Name"]),
|
|
||||||
};
|
|
||||||
}
|
|
||||||
function ParseBlobTag(blobTagInXML) {
|
|
||||||
return {
|
|
||||||
key: blobTagInXML["Key"],
|
|
||||||
value: blobTagInXML["Value"],
|
|
||||||
};
|
|
||||||
}
|
|
||||||
function ParseBlobTags(blobTagsInXML) {
|
|
||||||
if (blobTagsInXML === undefined ||
|
|
||||||
blobTagsInXML["TagSet"] === undefined ||
|
|
||||||
blobTagsInXML["TagSet"]["Tag"] === undefined) {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
const blobTagSet = [];
|
|
||||||
if (blobTagsInXML["TagSet"]["Tag"] instanceof Array) {
|
|
||||||
blobTagsInXML["TagSet"]["Tag"].forEach((blobTagInXML) => {
|
|
||||||
blobTagSet.push(ParseBlobTag(blobTagInXML));
|
|
||||||
});
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
blobTagSet.push(ParseBlobTag(blobTagsInXML["TagSet"]["Tag"]));
|
|
||||||
}
|
|
||||||
return { blobTagSet: blobTagSet };
|
|
||||||
}
|
|
||||||
function ProcessBlobItems(blobArrayInXML) {
|
|
||||||
const blobItems = [];
|
|
||||||
if (blobArrayInXML instanceof Array) {
|
|
||||||
blobArrayInXML.forEach((blobInXML) => {
|
|
||||||
blobItems.push(ParseBlobItem(blobInXML));
|
|
||||||
});
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
blobItems.push(ParseBlobItem(blobArrayInXML));
|
|
||||||
}
|
|
||||||
return blobItems;
|
|
||||||
}
|
|
||||||
function ProcessBlobPrefixes(blobPrefixesInXML) {
|
|
||||||
const blobPrefixes = [];
|
|
||||||
if (blobPrefixesInXML instanceof Array) {
|
|
||||||
blobPrefixesInXML.forEach((blobPrefixInXML) => {
|
|
||||||
blobPrefixes.push(ParseBlobPrefix(blobPrefixInXML));
|
|
||||||
});
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
blobPrefixes.push(ParseBlobPrefix(blobPrefixesInXML));
|
|
||||||
}
|
|
||||||
return blobPrefixes;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Copyright (c) Microsoft Corporation.
|
// Copyright (c) Microsoft Corporation.
|
||||||
/**
|
/**
|
||||||
@@ -23951,16 +23600,9 @@ class StorageBrowserPolicy extends coreHttp.BaseRequestPolicy {
|
|||||||
* @param request -
|
* @param request -
|
||||||
*/
|
*/
|
||||||
async sendRequest(request) {
|
async sendRequest(request) {
|
||||||
if (coreHttp.isNode) {
|
{
|
||||||
return this._nextPolicy.sendRequest(request);
|
return this._nextPolicy.sendRequest(request);
|
||||||
}
|
}
|
||||||
if (request.method.toUpperCase() === "GET" || request.method.toUpperCase() === "HEAD") {
|
|
||||||
request.url = setURLParameter(request.url, URLConstants.Parameters.FORCE_BROWSER_NO_CACHE, new Date().getTime().toString());
|
|
||||||
}
|
|
||||||
request.headers.remove(HeaderConstants.COOKIE);
|
|
||||||
// According to XHR standards, content-length should be fully controlled by browsers
|
|
||||||
request.headers.remove(HeaderConstants.CONTENT_LENGTH);
|
|
||||||
return this._nextPolicy.sendRequest(request);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -23981,10 +23623,6 @@ class StorageBrowserPolicyFactory {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Copyright (c) Microsoft Corporation.
|
// Copyright (c) Microsoft Corporation.
|
||||||
/**
|
|
||||||
* RetryPolicy types.
|
|
||||||
*/
|
|
||||||
exports.StorageRetryPolicyType = void 0;
|
|
||||||
(function (StorageRetryPolicyType) {
|
(function (StorageRetryPolicyType) {
|
||||||
/**
|
/**
|
||||||
* Exponential retry. Retry time delay grows exponentially.
|
* Exponential retry. Retry time delay grows exponentially.
|
||||||
@@ -24002,7 +23640,7 @@ const DEFAULT_RETRY_OPTIONS = {
|
|||||||
retryDelayInMs: 4 * 1000,
|
retryDelayInMs: 4 * 1000,
|
||||||
retryPolicyType: exports.StorageRetryPolicyType.EXPONENTIAL,
|
retryPolicyType: exports.StorageRetryPolicyType.EXPONENTIAL,
|
||||||
secondaryHost: "",
|
secondaryHost: "",
|
||||||
tryTimeoutInMs: undefined, // Use server side default timeout strategy
|
tryTimeoutInMs: undefined // Use server side default timeout strategy
|
||||||
};
|
};
|
||||||
const RETRY_ABORT_ERROR = new abortController.AbortError("The operation was aborted.");
|
const RETRY_ABORT_ERROR = new abortController.AbortError("The operation was aborted.");
|
||||||
/**
|
/**
|
||||||
@@ -24039,7 +23677,7 @@ class StorageRetryPolicy extends coreHttp.BaseRequestPolicy {
|
|||||||
: DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs,
|
: DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs,
|
||||||
secondaryHost: retryOptions.secondaryHost
|
secondaryHost: retryOptions.secondaryHost
|
||||||
? retryOptions.secondaryHost
|
? retryOptions.secondaryHost
|
||||||
: DEFAULT_RETRY_OPTIONS.secondaryHost,
|
: DEFAULT_RETRY_OPTIONS.secondaryHost
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@@ -24116,7 +23754,7 @@ class StorageRetryPolicy extends coreHttp.BaseRequestPolicy {
|
|||||||
"ENOTFOUND",
|
"ENOTFOUND",
|
||||||
"TIMEOUT",
|
"TIMEOUT",
|
||||||
"EPIPE",
|
"EPIPE",
|
||||||
"REQUEST_SEND_ERROR", // For default xhr based http client provided in ms-rest-js
|
"REQUEST_SEND_ERROR" // For default xhr based http client provided in ms-rest-js
|
||||||
];
|
];
|
||||||
if (err) {
|
if (err) {
|
||||||
for (const retriableError of retriableErrors) {
|
for (const retriableError of retriableErrors) {
|
||||||
@@ -24302,7 +23940,7 @@ class TelemetryPolicy extends coreHttp.BaseRequestPolicy {
|
|||||||
* @param request -
|
* @param request -
|
||||||
*/
|
*/
|
||||||
async sendRequest(request) {
|
async sendRequest(request) {
|
||||||
if (coreHttp.isNode) {
|
{
|
||||||
if (!request.headers) {
|
if (!request.headers) {
|
||||||
request.headers = new coreHttp.HttpHeaders();
|
request.headers = new coreHttp.HttpHeaders();
|
||||||
}
|
}
|
||||||
@@ -24325,7 +23963,7 @@ class TelemetryPolicyFactory {
|
|||||||
*/
|
*/
|
||||||
constructor(telemetry) {
|
constructor(telemetry) {
|
||||||
const userAgentInfo = [];
|
const userAgentInfo = [];
|
||||||
if (coreHttp.isNode) {
|
{
|
||||||
if (telemetry) {
|
if (telemetry) {
|
||||||
const telemetryString = telemetry.userAgentPrefix || "";
|
const telemetryString = telemetry.userAgentPrefix || "";
|
||||||
if (telemetryString.length > 0 && userAgentInfo.indexOf(telemetryString) === -1) {
|
if (telemetryString.length > 0 && userAgentInfo.indexOf(telemetryString) === -1) {
|
||||||
@@ -24338,7 +23976,7 @@ class TelemetryPolicyFactory {
|
|||||||
userAgentInfo.push(libInfo);
|
userAgentInfo.push(libInfo);
|
||||||
}
|
}
|
||||||
// e.g. (NODE-VERSION 4.9.1; Windows_NT 10.0.16299)
|
// e.g. (NODE-VERSION 4.9.1; Windows_NT 10.0.16299)
|
||||||
const runtimeInfo = `(NODE-VERSION ${process.version}; ${os__namespace.type()} ${os__namespace.release()})`;
|
const runtimeInfo = `(NODE-VERSION ${process.version}; ${os.type()} ${os.release()})`;
|
||||||
if (userAgentInfo.indexOf(runtimeInfo) === -1) {
|
if (userAgentInfo.indexOf(runtimeInfo) === -1) {
|
||||||
userAgentInfo.push(runtimeInfo);
|
userAgentInfo.push(runtimeInfo);
|
||||||
}
|
}
|
||||||
@@ -24362,247 +24000,6 @@ function getCachedDefaultHttpClient() {
|
|||||||
return _defaultHttpClient;
|
return _defaultHttpClient;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Copyright (c) Microsoft Corporation.
|
|
||||||
/**
|
|
||||||
* A set of constants used internally when processing requests.
|
|
||||||
*/
|
|
||||||
const Constants = {
|
|
||||||
DefaultScope: "/.default",
|
|
||||||
/**
|
|
||||||
* Defines constants for use with HTTP headers.
|
|
||||||
*/
|
|
||||||
HeaderConstants: {
|
|
||||||
/**
|
|
||||||
* The Authorization header.
|
|
||||||
*/
|
|
||||||
AUTHORIZATION: "authorization",
|
|
||||||
},
|
|
||||||
};
|
|
||||||
// Default options for the cycler if none are provided
|
|
||||||
const DEFAULT_CYCLER_OPTIONS = {
|
|
||||||
forcedRefreshWindowInMs: 1000,
|
|
||||||
retryIntervalInMs: 3000,
|
|
||||||
refreshWindowInMs: 1000 * 60 * 2, // Start refreshing 2m before expiry
|
|
||||||
};
|
|
||||||
/**
|
|
||||||
* Converts an an unreliable access token getter (which may resolve with null)
|
|
||||||
* into an AccessTokenGetter by retrying the unreliable getter in a regular
|
|
||||||
* interval.
|
|
||||||
*
|
|
||||||
* @param getAccessToken - a function that produces a promise of an access
|
|
||||||
* token that may fail by returning null
|
|
||||||
* @param retryIntervalInMs - the time (in milliseconds) to wait between retry
|
|
||||||
* attempts
|
|
||||||
* @param timeoutInMs - the timestamp after which the refresh attempt will fail,
|
|
||||||
* throwing an exception
|
|
||||||
* @returns - a promise that, if it resolves, will resolve with an access token
|
|
||||||
*/
|
|
||||||
async function beginRefresh(getAccessToken, retryIntervalInMs, timeoutInMs) {
|
|
||||||
// This wrapper handles exceptions gracefully as long as we haven't exceeded
|
|
||||||
// the timeout.
|
|
||||||
async function tryGetAccessToken() {
|
|
||||||
if (Date.now() < timeoutInMs) {
|
|
||||||
try {
|
|
||||||
return await getAccessToken();
|
|
||||||
}
|
|
||||||
catch (_a) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
const finalToken = await getAccessToken();
|
|
||||||
// Timeout is up, so throw if it's still null
|
|
||||||
if (finalToken === null) {
|
|
||||||
throw new Error("Failed to refresh access token.");
|
|
||||||
}
|
|
||||||
return finalToken;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
let token = await tryGetAccessToken();
|
|
||||||
while (token === null) {
|
|
||||||
await coreHttp.delay(retryIntervalInMs);
|
|
||||||
token = await tryGetAccessToken();
|
|
||||||
}
|
|
||||||
return token;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Creates a token cycler from a credential, scopes, and optional settings.
|
|
||||||
*
|
|
||||||
* A token cycler represents a way to reliably retrieve a valid access token
|
|
||||||
* from a TokenCredential. It will handle initializing the token, refreshing it
|
|
||||||
* when it nears expiration, and synchronizes refresh attempts to avoid
|
|
||||||
* concurrency hazards.
|
|
||||||
*
|
|
||||||
* @param credential - the underlying TokenCredential that provides the access
|
|
||||||
* token
|
|
||||||
* @param scopes - the scopes to request authorization for
|
|
||||||
* @param tokenCyclerOptions - optionally override default settings for the cycler
|
|
||||||
*
|
|
||||||
* @returns - a function that reliably produces a valid access token
|
|
||||||
*/
|
|
||||||
function createTokenCycler(credential, scopes, tokenCyclerOptions) {
|
|
||||||
let refreshWorker = null;
|
|
||||||
let token = null;
|
|
||||||
const options = Object.assign(Object.assign({}, DEFAULT_CYCLER_OPTIONS), tokenCyclerOptions);
|
|
||||||
/**
|
|
||||||
* This little holder defines several predicates that we use to construct
|
|
||||||
* the rules of refreshing the token.
|
|
||||||
*/
|
|
||||||
const cycler = {
|
|
||||||
/**
|
|
||||||
* Produces true if a refresh job is currently in progress.
|
|
||||||
*/
|
|
||||||
get isRefreshing() {
|
|
||||||
return refreshWorker !== null;
|
|
||||||
},
|
|
||||||
/**
|
|
||||||
* Produces true if the cycler SHOULD refresh (we are within the refresh
|
|
||||||
* window and not already refreshing)
|
|
||||||
*/
|
|
||||||
get shouldRefresh() {
|
|
||||||
var _a;
|
|
||||||
return (!cycler.isRefreshing &&
|
|
||||||
((_a = token === null || token === void 0 ? void 0 : token.expiresOnTimestamp) !== null && _a !== void 0 ? _a : 0) - options.refreshWindowInMs < Date.now());
|
|
||||||
},
|
|
||||||
/**
|
|
||||||
* Produces true if the cycler MUST refresh (null or nearly-expired
|
|
||||||
* token).
|
|
||||||
*/
|
|
||||||
get mustRefresh() {
|
|
||||||
return (token === null || token.expiresOnTimestamp - options.forcedRefreshWindowInMs < Date.now());
|
|
||||||
},
|
|
||||||
};
|
|
||||||
/**
|
|
||||||
* Starts a refresh job or returns the existing job if one is already
|
|
||||||
* running.
|
|
||||||
*/
|
|
||||||
function refresh(getTokenOptions) {
|
|
||||||
var _a;
|
|
||||||
if (!cycler.isRefreshing) {
|
|
||||||
// We bind `scopes` here to avoid passing it around a lot
|
|
||||||
const tryGetAccessToken = () => credential.getToken(scopes, getTokenOptions);
|
|
||||||
// Take advantage of promise chaining to insert an assignment to `token`
|
|
||||||
// before the refresh can be considered done.
|
|
||||||
refreshWorker = beginRefresh(tryGetAccessToken, options.retryIntervalInMs,
|
|
||||||
// If we don't have a token, then we should timeout immediately
|
|
||||||
(_a = token === null || token === void 0 ? void 0 : token.expiresOnTimestamp) !== null && _a !== void 0 ? _a : Date.now())
|
|
||||||
.then((_token) => {
|
|
||||||
refreshWorker = null;
|
|
||||||
token = _token;
|
|
||||||
return token;
|
|
||||||
})
|
|
||||||
.catch((reason) => {
|
|
||||||
// We also should reset the refresher if we enter a failed state. All
|
|
||||||
// existing awaiters will throw, but subsequent requests will start a
|
|
||||||
// new retry chain.
|
|
||||||
refreshWorker = null;
|
|
||||||
token = null;
|
|
||||||
throw reason;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
return refreshWorker;
|
|
||||||
}
|
|
||||||
return async (tokenOptions) => {
|
|
||||||
//
|
|
||||||
// Simple rules:
|
|
||||||
// - If we MUST refresh, then return the refresh task, blocking
|
|
||||||
// the pipeline until a token is available.
|
|
||||||
// - If we SHOULD refresh, then run refresh but don't return it
|
|
||||||
// (we can still use the cached token).
|
|
||||||
// - Return the token, since it's fine if we didn't return in
|
|
||||||
// step 1.
|
|
||||||
//
|
|
||||||
if (cycler.mustRefresh)
|
|
||||||
return refresh(tokenOptions);
|
|
||||||
if (cycler.shouldRefresh) {
|
|
||||||
refresh(tokenOptions);
|
|
||||||
}
|
|
||||||
return token;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* We will retrieve the challenge only if the response status code was 401,
|
|
||||||
* and if the response contained the header "WWW-Authenticate" with a non-empty value.
|
|
||||||
*/
|
|
||||||
function getChallenge(response) {
|
|
||||||
const challenge = response.headers.get("WWW-Authenticate");
|
|
||||||
if (response.status === 401 && challenge) {
|
|
||||||
return challenge;
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Converts: `Bearer a="b" c="d"`.
|
|
||||||
* Into: `[ { a: 'b', c: 'd' }]`.
|
|
||||||
*
|
|
||||||
* @internal
|
|
||||||
*/
|
|
||||||
function parseChallenge(challenge) {
|
|
||||||
const bearerChallenge = challenge.slice("Bearer ".length);
|
|
||||||
const challengeParts = `${bearerChallenge.trim()} `.split(" ").filter((x) => x);
|
|
||||||
const keyValuePairs = challengeParts.map((keyValue) => (([key, value]) => ({ [key]: value }))(keyValue.trim().split("=")));
|
|
||||||
// Key-value pairs to plain object:
|
|
||||||
return keyValuePairs.reduce((a, b) => (Object.assign(Object.assign({}, a), b)), {});
|
|
||||||
}
|
|
||||||
// #endregion
|
|
||||||
/**
|
|
||||||
* Creates a new factory for a RequestPolicy that applies a bearer token to
|
|
||||||
* the requests' `Authorization` headers.
|
|
||||||
*
|
|
||||||
* @param credential - The TokenCredential implementation that can supply the bearer token.
|
|
||||||
* @param scopes - The scopes for which the bearer token applies.
|
|
||||||
*/
|
|
||||||
function storageBearerTokenChallengeAuthenticationPolicy(credential, scopes) {
|
|
||||||
// This simple function encapsulates the entire process of reliably retrieving the token
|
|
||||||
let getToken = createTokenCycler(credential, scopes);
|
|
||||||
class StorageBearerTokenChallengeAuthenticationPolicy extends coreHttp.BaseRequestPolicy {
|
|
||||||
constructor(nextPolicy, options) {
|
|
||||||
super(nextPolicy, options);
|
|
||||||
}
|
|
||||||
async sendRequest(webResource) {
|
|
||||||
if (!webResource.url.toLowerCase().startsWith("https://")) {
|
|
||||||
throw new Error("Bearer token authentication is not permitted for non-TLS protected (non-https) URLs.");
|
|
||||||
}
|
|
||||||
const getTokenInternal = getToken;
|
|
||||||
const token = (await getTokenInternal({
|
|
||||||
abortSignal: webResource.abortSignal,
|
|
||||||
tracingOptions: {
|
|
||||||
tracingContext: webResource.tracingContext,
|
|
||||||
},
|
|
||||||
})).token;
|
|
||||||
webResource.headers.set(Constants.HeaderConstants.AUTHORIZATION, `Bearer ${token}`);
|
|
||||||
const response = await this._nextPolicy.sendRequest(webResource);
|
|
||||||
if ((response === null || response === void 0 ? void 0 : response.status) === 401) {
|
|
||||||
const challenge = getChallenge(response);
|
|
||||||
if (challenge) {
|
|
||||||
const challengeInfo = parseChallenge(challenge);
|
|
||||||
const challengeScopes = challengeInfo.resource_id + Constants.DefaultScope;
|
|
||||||
const parsedAuthUri = coreHttp.URLBuilder.parse(challengeInfo.authorization_uri);
|
|
||||||
const pathSegments = parsedAuthUri.getPath().split("/");
|
|
||||||
const tenantId = pathSegments[1];
|
|
||||||
const getTokenForChallenge = createTokenCycler(credential, challengeScopes);
|
|
||||||
const tokenForChallenge = (await getTokenForChallenge({
|
|
||||||
abortSignal: webResource.abortSignal,
|
|
||||||
tracingOptions: {
|
|
||||||
tracingContext: webResource.tracingContext,
|
|
||||||
},
|
|
||||||
tenantId: tenantId,
|
|
||||||
})).token;
|
|
||||||
getToken = getTokenForChallenge;
|
|
||||||
webResource.headers.set(Constants.HeaderConstants.AUTHORIZATION, `Bearer ${tokenForChallenge}`);
|
|
||||||
return this._nextPolicy.sendRequest(webResource);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return response;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
create: (nextPolicy, options) => {
|
|
||||||
return new StorageBearerTokenChallengeAuthenticationPolicy(nextPolicy, options);
|
|
||||||
},
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
// Copyright (c) Microsoft Corporation.
|
// Copyright (c) Microsoft Corporation.
|
||||||
/**
|
/**
|
||||||
* A helper to decide if a given argument satisfies the Pipeline contract
|
* A helper to decide if a given argument satisfies the Pipeline contract
|
||||||
@@ -24648,7 +24045,7 @@ class Pipeline {
|
|||||||
toServiceClientOptions() {
|
toServiceClientOptions() {
|
||||||
return {
|
return {
|
||||||
httpClient: this.options.httpClient,
|
httpClient: this.options.httpClient,
|
||||||
requestPolicyFactories: this.factories,
|
requestPolicyFactories: this.factories
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -24660,7 +24057,6 @@ class Pipeline {
|
|||||||
* @returns A new Pipeline object.
|
* @returns A new Pipeline object.
|
||||||
*/
|
*/
|
||||||
function newPipeline(credential, pipelineOptions = {}) {
|
function newPipeline(credential, pipelineOptions = {}) {
|
||||||
var _a;
|
|
||||||
if (credential === undefined) {
|
if (credential === undefined) {
|
||||||
credential = new AnonymousCredential();
|
credential = new AnonymousCredential();
|
||||||
}
|
}
|
||||||
@@ -24682,16 +24078,16 @@ function newPipeline(credential, pipelineOptions = {}) {
|
|||||||
coreHttp.logPolicy({
|
coreHttp.logPolicy({
|
||||||
logger: logger.info,
|
logger: logger.info,
|
||||||
allowedHeaderNames: StorageBlobLoggingAllowedHeaderNames,
|
allowedHeaderNames: StorageBlobLoggingAllowedHeaderNames,
|
||||||
allowedQueryParameters: StorageBlobLoggingAllowedQueryParameters,
|
allowedQueryParameters: StorageBlobLoggingAllowedQueryParameters
|
||||||
}),
|
})
|
||||||
];
|
];
|
||||||
if (coreHttp.isNode) {
|
{
|
||||||
// policies only available in Node.js runtime, not in browsers
|
// policies only available in Node.js runtime, not in browsers
|
||||||
factories.push(coreHttp.proxyPolicy(pipelineOptions.proxyOptions));
|
factories.push(coreHttp.proxyPolicy(pipelineOptions.proxyOptions));
|
||||||
factories.push(coreHttp.disableResponseDecompressionPolicy());
|
factories.push(coreHttp.disableResponseDecompressionPolicy());
|
||||||
}
|
}
|
||||||
factories.push(coreHttp.isTokenCredential(credential)
|
factories.push(coreHttp.isTokenCredential(credential)
|
||||||
? attachCredential(storageBearerTokenChallengeAuthenticationPolicy(credential, (_a = pipelineOptions.audience) !== null && _a !== void 0 ? _a : StorageOAuthScopes), credential)
|
? attachCredential(coreHttp.bearerTokenAuthenticationPolicy(credential, StorageOAuthScopes), credential)
|
||||||
: credential);
|
: credential);
|
||||||
return new Pipeline(factories, pipelineOptions);
|
return new Pipeline(factories, pipelineOptions);
|
||||||
}
|
}
|
||||||
@@ -24718,9 +24114,7 @@ class StorageSharedKeyCredentialPolicy extends CredentialPolicy {
|
|||||||
*/
|
*/
|
||||||
signRequest(request) {
|
signRequest(request) {
|
||||||
request.headers.set(HeaderConstants.X_MS_DATE, new Date().toUTCString());
|
request.headers.set(HeaderConstants.X_MS_DATE, new Date().toUTCString());
|
||||||
if (request.body &&
|
if (request.body && typeof request.body === "string" && request.body.length > 0) {
|
||||||
(typeof request.body === "string" || request.body !== undefined) &&
|
|
||||||
request.body.length > 0) {
|
|
||||||
request.headers.set(HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body));
|
request.headers.set(HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body));
|
||||||
}
|
}
|
||||||
const stringToSign = [
|
const stringToSign = [
|
||||||
@@ -24735,7 +24129,7 @@ class StorageSharedKeyCredentialPolicy extends CredentialPolicy {
|
|||||||
this.getHeaderValueToSign(request, HeaderConstants.IF_MATCH),
|
this.getHeaderValueToSign(request, HeaderConstants.IF_MATCH),
|
||||||
this.getHeaderValueToSign(request, HeaderConstants.IF_NONE_MATCH),
|
this.getHeaderValueToSign(request, HeaderConstants.IF_NONE_MATCH),
|
||||||
this.getHeaderValueToSign(request, HeaderConstants.IF_UNMODIFIED_SINCE),
|
this.getHeaderValueToSign(request, HeaderConstants.IF_UNMODIFIED_SINCE),
|
||||||
this.getHeaderValueToSign(request, HeaderConstants.RANGE),
|
this.getHeaderValueToSign(request, HeaderConstants.RANGE)
|
||||||
].join("\n") +
|
].join("\n") +
|
||||||
"\n" +
|
"\n" +
|
||||||
this.getCanonicalizedHeadersString(request) +
|
this.getCanonicalizedHeadersString(request) +
|
||||||
@@ -24864,7 +24258,9 @@ class StorageSharedKeyCredential extends Credential {
|
|||||||
* @param stringToSign -
|
* @param stringToSign -
|
||||||
*/
|
*/
|
||||||
computeHMACSHA256(stringToSign) {
|
computeHMACSHA256(stringToSign) {
|
||||||
return crypto.createHmac("sha256", this.accountKey).update(stringToSign, "utf8").digest("base64");
|
return crypto.createHmac("sha256", this.accountKey)
|
||||||
|
.update(stringToSign, "utf8")
|
||||||
|
.digest("base64");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -24876,8 +24272,8 @@ class StorageSharedKeyCredential extends Credential {
|
|||||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||||
*/
|
*/
|
||||||
const packageName = "azure-storage-blob";
|
const packageName = "azure-storage-blob";
|
||||||
const packageVersion = "12.9.0";
|
const packageVersion = "12.8.0";
|
||||||
class StorageClientContext extends coreHttp__namespace.ServiceClient {
|
class StorageClientContext extends coreHttp.ServiceClient {
|
||||||
/**
|
/**
|
||||||
* Initializes a new instance of the StorageClientContext class.
|
* Initializes a new instance of the StorageClientContext class.
|
||||||
* @param url The URL of the service account, container, or blob that is the target of the desired
|
* @param url The URL of the service account, container, or blob that is the target of the desired
|
||||||
@@ -24893,7 +24289,7 @@ class StorageClientContext extends coreHttp__namespace.ServiceClient {
|
|||||||
options = {};
|
options = {};
|
||||||
}
|
}
|
||||||
if (!options.userAgent) {
|
if (!options.userAgent) {
|
||||||
const defaultUserAgent = coreHttp__namespace.getDefaultUserAgentValue();
|
const defaultUserAgent = coreHttp.getDefaultUserAgentValue();
|
||||||
options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`;
|
options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`;
|
||||||
}
|
}
|
||||||
super(undefined, options);
|
super(undefined, options);
|
||||||
@@ -24902,7 +24298,7 @@ class StorageClientContext extends coreHttp__namespace.ServiceClient {
|
|||||||
// Parameter assignments
|
// Parameter assignments
|
||||||
this.url = url;
|
this.url = url;
|
||||||
// Assigning values to Constant parameters
|
// Assigning values to Constant parameters
|
||||||
this.version = options.version || "2021-04-10";
|
this.version = options.version || "2020-10-02";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -24949,7 +24345,7 @@ class StorageClient {
|
|||||||
*/
|
*/
|
||||||
const createSpan = coreTracing.createSpanFunction({
|
const createSpan = coreTracing.createSpanFunction({
|
||||||
packagePrefix: "Azure.Storage.Blob",
|
packagePrefix: "Azure.Storage.Blob",
|
||||||
namespace: "Microsoft.Storage",
|
namespace: "Microsoft.Storage"
|
||||||
});
|
});
|
||||||
/**
|
/**
|
||||||
* @internal
|
* @internal
|
||||||
@@ -24963,7 +24359,7 @@ function convertTracingToRequestOptionsBase(options) {
|
|||||||
return {
|
return {
|
||||||
// By passing spanOptions if they exist at runtime, we're backwards compatible with @azure/core-tracing@preview.13 and earlier.
|
// By passing spanOptions if they exist at runtime, we're backwards compatible with @azure/core-tracing@preview.13 and earlier.
|
||||||
spanOptions: (_a = options === null || options === void 0 ? void 0 : options.tracingOptions) === null || _a === void 0 ? void 0 : _a.spanOptions,
|
spanOptions: (_a = options === null || options === void 0 ? void 0 : options.tracingOptions) === null || _a === void 0 ? void 0 : _a.spanOptions,
|
||||||
tracingContext: (_b = options === null || options === void 0 ? void 0 : options.tracingOptions) === null || _b === void 0 ? void 0 : _b.tracingContext,
|
tracingContext: (_b = options === null || options === void 0 ? void 0 : options.tracingOptions) === null || _b === void 0 ? void 0 : _b.tracingContext
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -25020,10 +24416,6 @@ class BlobSASPermissions {
|
|||||||
* Specifies SetImmutabilityPolicy access granted.
|
* Specifies SetImmutabilityPolicy access granted.
|
||||||
*/
|
*/
|
||||||
this.setImmutabilityPolicy = false;
|
this.setImmutabilityPolicy = false;
|
||||||
/**
|
|
||||||
* Specifies that Permanent Delete is permitted.
|
|
||||||
*/
|
|
||||||
this.permanentDelete = false;
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Creates a {@link BlobSASPermissions} from the specified permissions string. This method will throw an
|
* Creates a {@link BlobSASPermissions} from the specified permissions string. This method will throw an
|
||||||
@@ -25065,9 +24457,6 @@ class BlobSASPermissions {
|
|||||||
case "i":
|
case "i":
|
||||||
blobSASPermissions.setImmutabilityPolicy = true;
|
blobSASPermissions.setImmutabilityPolicy = true;
|
||||||
break;
|
break;
|
||||||
case "y":
|
|
||||||
blobSASPermissions.permanentDelete = true;
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
throw new RangeError(`Invalid permission: ${char}`);
|
throw new RangeError(`Invalid permission: ${char}`);
|
||||||
}
|
}
|
||||||
@@ -25112,9 +24501,6 @@ class BlobSASPermissions {
|
|||||||
if (permissionLike.setImmutabilityPolicy) {
|
if (permissionLike.setImmutabilityPolicy) {
|
||||||
blobSASPermissions.setImmutabilityPolicy = true;
|
blobSASPermissions.setImmutabilityPolicy = true;
|
||||||
}
|
}
|
||||||
if (permissionLike.permanentDelete) {
|
|
||||||
blobSASPermissions.permanentDelete = true;
|
|
||||||
}
|
|
||||||
return blobSASPermissions;
|
return blobSASPermissions;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@@ -25155,9 +24541,6 @@ class BlobSASPermissions {
|
|||||||
if (this.setImmutabilityPolicy) {
|
if (this.setImmutabilityPolicy) {
|
||||||
permissions.push("i");
|
permissions.push("i");
|
||||||
}
|
}
|
||||||
if (this.permanentDelete) {
|
|
||||||
permissions.push("y");
|
|
||||||
}
|
|
||||||
return permissions.join("");
|
return permissions.join("");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -25217,14 +24600,6 @@ class ContainerSASPermissions {
|
|||||||
* Specifies SetImmutabilityPolicy access granted.
|
* Specifies SetImmutabilityPolicy access granted.
|
||||||
*/
|
*/
|
||||||
this.setImmutabilityPolicy = false;
|
this.setImmutabilityPolicy = false;
|
||||||
/**
|
|
||||||
* Specifies that Permanent Delete is permitted.
|
|
||||||
*/
|
|
||||||
this.permanentDelete = false;
|
|
||||||
/**
|
|
||||||
* Specifies that Filter Blobs by Tags is permitted.
|
|
||||||
*/
|
|
||||||
this.filterByTags = false;
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Creates an {@link ContainerSASPermissions} from the specified permissions string. This method will throw an
|
* Creates an {@link ContainerSASPermissions} from the specified permissions string. This method will throw an
|
||||||
@@ -25269,12 +24644,6 @@ class ContainerSASPermissions {
|
|||||||
case "i":
|
case "i":
|
||||||
containerSASPermissions.setImmutabilityPolicy = true;
|
containerSASPermissions.setImmutabilityPolicy = true;
|
||||||
break;
|
break;
|
||||||
case "y":
|
|
||||||
containerSASPermissions.permanentDelete = true;
|
|
||||||
break;
|
|
||||||
case "f":
|
|
||||||
containerSASPermissions.filterByTags = true;
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
throw new RangeError(`Invalid permission ${char}`);
|
throw new RangeError(`Invalid permission ${char}`);
|
||||||
}
|
}
|
||||||
@@ -25322,12 +24691,6 @@ class ContainerSASPermissions {
|
|||||||
if (permissionLike.setImmutabilityPolicy) {
|
if (permissionLike.setImmutabilityPolicy) {
|
||||||
containerSASPermissions.setImmutabilityPolicy = true;
|
containerSASPermissions.setImmutabilityPolicy = true;
|
||||||
}
|
}
|
||||||
if (permissionLike.permanentDelete) {
|
|
||||||
containerSASPermissions.permanentDelete = true;
|
|
||||||
}
|
|
||||||
if (permissionLike.filterByTags) {
|
|
||||||
containerSASPermissions.filterByTags = true;
|
|
||||||
}
|
|
||||||
return containerSASPermissions;
|
return containerSASPermissions;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@@ -25373,12 +24736,6 @@ class ContainerSASPermissions {
|
|||||||
if (this.setImmutabilityPolicy) {
|
if (this.setImmutabilityPolicy) {
|
||||||
permissions.push("i");
|
permissions.push("i");
|
||||||
}
|
}
|
||||||
if (this.permanentDelete) {
|
|
||||||
permissions.push("y");
|
|
||||||
}
|
|
||||||
if (this.filterByTags) {
|
|
||||||
permissions.push("f");
|
|
||||||
}
|
|
||||||
return permissions.join("");
|
return permissions.join("");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -25408,7 +24765,9 @@ class UserDelegationKeyCredential {
|
|||||||
*/
|
*/
|
||||||
computeHMACSHA256(stringToSign) {
|
computeHMACSHA256(stringToSign) {
|
||||||
// console.log(`stringToSign: ${JSON.stringify(stringToSign)}`);
|
// console.log(`stringToSign: ${JSON.stringify(stringToSign)}`);
|
||||||
return crypto.createHmac("sha256", this.key).update(stringToSign, "utf8").digest("base64");
|
return crypto.createHmac("sha256", this.key)
|
||||||
|
.update(stringToSign, "utf8")
|
||||||
|
.digest("base64");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -25426,10 +24785,6 @@ function ipRangeToString(ipRange) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Copyright (c) Microsoft Corporation.
|
// Copyright (c) Microsoft Corporation.
|
||||||
/**
|
|
||||||
* Protocols for generated SAS.
|
|
||||||
*/
|
|
||||||
exports.SASProtocol = void 0;
|
|
||||||
(function (SASProtocol) {
|
(function (SASProtocol) {
|
||||||
/**
|
/**
|
||||||
* Protocol that allows HTTPS only
|
* Protocol that allows HTTPS only
|
||||||
@@ -25450,7 +24805,7 @@ exports.SASProtocol = void 0;
|
|||||||
* NOTE: Instances of this class are immutable.
|
* NOTE: Instances of this class are immutable.
|
||||||
*/
|
*/
|
||||||
class SASQueryParameters {
|
class SASQueryParameters {
|
||||||
constructor(version, signature, permissionsOrOptions, services, resourceTypes, protocol, startsOn, expiresOn, ipRange, identifier, resource, cacheControl, contentDisposition, contentEncoding, contentLanguage, contentType, userDelegationKey, preauthorizedAgentObjectId, correlationId, encryptionScope) {
|
constructor(version, signature, permissionsOrOptions, services, resourceTypes, protocol, startsOn, expiresOn, ipRange, identifier, resource, cacheControl, contentDisposition, contentEncoding, contentLanguage, contentType, userDelegationKey, preauthorizedAgentObjectId, correlationId) {
|
||||||
this.version = version;
|
this.version = version;
|
||||||
this.signature = signature;
|
this.signature = signature;
|
||||||
if (permissionsOrOptions !== undefined && typeof permissionsOrOptions !== "string") {
|
if (permissionsOrOptions !== undefined && typeof permissionsOrOptions !== "string") {
|
||||||
@@ -25463,7 +24818,6 @@ class SASQueryParameters {
|
|||||||
this.expiresOn = permissionsOrOptions.expiresOn;
|
this.expiresOn = permissionsOrOptions.expiresOn;
|
||||||
this.ipRangeInner = permissionsOrOptions.ipRange;
|
this.ipRangeInner = permissionsOrOptions.ipRange;
|
||||||
this.identifier = permissionsOrOptions.identifier;
|
this.identifier = permissionsOrOptions.identifier;
|
||||||
this.encryptionScope = permissionsOrOptions.encryptionScope;
|
|
||||||
this.resource = permissionsOrOptions.resource;
|
this.resource = permissionsOrOptions.resource;
|
||||||
this.cacheControl = permissionsOrOptions.cacheControl;
|
this.cacheControl = permissionsOrOptions.cacheControl;
|
||||||
this.contentDisposition = permissionsOrOptions.contentDisposition;
|
this.contentDisposition = permissionsOrOptions.contentDisposition;
|
||||||
@@ -25489,7 +24843,6 @@ class SASQueryParameters {
|
|||||||
this.protocol = protocol;
|
this.protocol = protocol;
|
||||||
this.startsOn = startsOn;
|
this.startsOn = startsOn;
|
||||||
this.ipRangeInner = ipRange;
|
this.ipRangeInner = ipRange;
|
||||||
this.encryptionScope = encryptionScope;
|
|
||||||
this.identifier = identifier;
|
this.identifier = identifier;
|
||||||
this.resource = resource;
|
this.resource = resource;
|
||||||
this.cacheControl = cacheControl;
|
this.cacheControl = cacheControl;
|
||||||
@@ -25518,7 +24871,7 @@ class SASQueryParameters {
|
|||||||
if (this.ipRangeInner) {
|
if (this.ipRangeInner) {
|
||||||
return {
|
return {
|
||||||
end: this.ipRangeInner.end,
|
end: this.ipRangeInner.end,
|
||||||
start: this.ipRangeInner.start,
|
start: this.ipRangeInner.start
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
return undefined;
|
return undefined;
|
||||||
@@ -25537,7 +24890,6 @@ class SASQueryParameters {
|
|||||||
"se",
|
"se",
|
||||||
"sip",
|
"sip",
|
||||||
"si",
|
"si",
|
||||||
"ses",
|
|
||||||
"skoid",
|
"skoid",
|
||||||
"sktid",
|
"sktid",
|
||||||
"skt",
|
"skt",
|
||||||
@@ -25553,7 +24905,7 @@ class SASQueryParameters {
|
|||||||
"rscl",
|
"rscl",
|
||||||
"rsct",
|
"rsct",
|
||||||
"saoid",
|
"saoid",
|
||||||
"scid",
|
"scid"
|
||||||
];
|
];
|
||||||
const queries = [];
|
const queries = [];
|
||||||
for (const param of params) {
|
for (const param of params) {
|
||||||
@@ -25582,9 +24934,6 @@ class SASQueryParameters {
|
|||||||
case "si":
|
case "si":
|
||||||
this.tryAppendQueryParameter(queries, param, this.identifier);
|
this.tryAppendQueryParameter(queries, param, this.identifier);
|
||||||
break;
|
break;
|
||||||
case "ses":
|
|
||||||
this.tryAppendQueryParameter(queries, param, this.encryptionScope);
|
|
||||||
break;
|
|
||||||
case "skoid": // Signed object ID
|
case "skoid": // Signed object ID
|
||||||
this.tryAppendQueryParameter(queries, param, this.signedOid);
|
this.tryAppendQueryParameter(queries, param, this.signedOid);
|
||||||
break;
|
break;
|
||||||
@@ -25669,15 +25018,6 @@ function generateBlobSASQueryParameters(blobSASSignatureValues, sharedKeyCredent
|
|||||||
if (sharedKeyCredential === undefined && userDelegationKeyCredential === undefined) {
|
if (sharedKeyCredential === undefined && userDelegationKeyCredential === undefined) {
|
||||||
throw TypeError("Invalid sharedKeyCredential, userDelegationKey or accountName.");
|
throw TypeError("Invalid sharedKeyCredential, userDelegationKey or accountName.");
|
||||||
}
|
}
|
||||||
// Version 2020-12-06 adds support for encryptionscope in SAS.
|
|
||||||
if (version >= "2020-12-06") {
|
|
||||||
if (sharedKeyCredential !== undefined) {
|
|
||||||
return generateBlobSASQueryParameters20201206(blobSASSignatureValues, sharedKeyCredential);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
return generateBlobSASQueryParametersUDK20201206(blobSASSignatureValues, userDelegationKeyCredential);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// Version 2019-12-12 adds support for the blob tags permission.
|
// Version 2019-12-12 adds support for the blob tags permission.
|
||||||
// Version 2018-11-09 adds support for the signed resource and signed blob snapshot time fields.
|
// Version 2018-11-09 adds support for the signed resource and signed blob snapshot time fields.
|
||||||
// https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas#constructing-the-signature-string
|
// https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas#constructing-the-signature-string
|
||||||
@@ -25759,7 +25099,7 @@ function generateBlobSASQueryParameters20150405(blobSASSignatureValues, sharedKe
|
|||||||
blobSASSignatureValues.contentDisposition ? blobSASSignatureValues.contentDisposition : "",
|
blobSASSignatureValues.contentDisposition ? blobSASSignatureValues.contentDisposition : "",
|
||||||
blobSASSignatureValues.contentEncoding ? blobSASSignatureValues.contentEncoding : "",
|
blobSASSignatureValues.contentEncoding ? blobSASSignatureValues.contentEncoding : "",
|
||||||
blobSASSignatureValues.contentLanguage ? blobSASSignatureValues.contentLanguage : "",
|
blobSASSignatureValues.contentLanguage ? blobSASSignatureValues.contentLanguage : "",
|
||||||
blobSASSignatureValues.contentType ? blobSASSignatureValues.contentType : "",
|
blobSASSignatureValues.contentType ? blobSASSignatureValues.contentType : ""
|
||||||
].join("\n");
|
].join("\n");
|
||||||
const signature = sharedKeyCredential.computeHMACSHA256(stringToSign);
|
const signature = sharedKeyCredential.computeHMACSHA256(stringToSign);
|
||||||
return new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, undefined, undefined, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType);
|
return new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, undefined, undefined, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType);
|
||||||
@@ -25828,81 +25168,11 @@ function generateBlobSASQueryParameters20181109(blobSASSignatureValues, sharedKe
|
|||||||
blobSASSignatureValues.contentDisposition ? blobSASSignatureValues.contentDisposition : "",
|
blobSASSignatureValues.contentDisposition ? blobSASSignatureValues.contentDisposition : "",
|
||||||
blobSASSignatureValues.contentEncoding ? blobSASSignatureValues.contentEncoding : "",
|
blobSASSignatureValues.contentEncoding ? blobSASSignatureValues.contentEncoding : "",
|
||||||
blobSASSignatureValues.contentLanguage ? blobSASSignatureValues.contentLanguage : "",
|
blobSASSignatureValues.contentLanguage ? blobSASSignatureValues.contentLanguage : "",
|
||||||
blobSASSignatureValues.contentType ? blobSASSignatureValues.contentType : "",
|
blobSASSignatureValues.contentType ? blobSASSignatureValues.contentType : ""
|
||||||
].join("\n");
|
].join("\n");
|
||||||
const signature = sharedKeyCredential.computeHMACSHA256(stringToSign);
|
const signature = sharedKeyCredential.computeHMACSHA256(stringToSign);
|
||||||
return new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, undefined, undefined, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType);
|
return new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, undefined, undefined, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType);
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* ONLY AVAILABLE IN NODE.JS RUNTIME.
|
|
||||||
* IMPLEMENTATION FOR API VERSION FROM 2020-12-06.
|
|
||||||
*
|
|
||||||
* Creates an instance of SASQueryParameters.
|
|
||||||
*
|
|
||||||
* Only accepts required settings needed to create a SAS. For optional settings please
|
|
||||||
* set corresponding properties directly, such as permissions, startsOn and identifier.
|
|
||||||
*
|
|
||||||
* WARNING: When identifier is not provided, permissions and expiresOn are required.
|
|
||||||
* You MUST assign value to identifier or expiresOn & permissions manually if you initial with
|
|
||||||
* this constructor.
|
|
||||||
*
|
|
||||||
* @param blobSASSignatureValues -
|
|
||||||
* @param sharedKeyCredential -
|
|
||||||
*/
|
|
||||||
function generateBlobSASQueryParameters20201206(blobSASSignatureValues, sharedKeyCredential) {
|
|
||||||
blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues);
|
|
||||||
if (!blobSASSignatureValues.identifier &&
|
|
||||||
!(blobSASSignatureValues.permissions && blobSASSignatureValues.expiresOn)) {
|
|
||||||
throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided.");
|
|
||||||
}
|
|
||||||
let resource = "c";
|
|
||||||
let timestamp = blobSASSignatureValues.snapshotTime;
|
|
||||||
if (blobSASSignatureValues.blobName) {
|
|
||||||
resource = "b";
|
|
||||||
if (blobSASSignatureValues.snapshotTime) {
|
|
||||||
resource = "bs";
|
|
||||||
}
|
|
||||||
else if (blobSASSignatureValues.versionId) {
|
|
||||||
resource = "bv";
|
|
||||||
timestamp = blobSASSignatureValues.versionId;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// Calling parse and toString guarantees the proper ordering and throws on invalid characters.
|
|
||||||
let verifiedPermissions;
|
|
||||||
if (blobSASSignatureValues.permissions) {
|
|
||||||
if (blobSASSignatureValues.blobName) {
|
|
||||||
verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString();
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// Signature is generated on the un-url-encoded values.
|
|
||||||
const stringToSign = [
|
|
||||||
verifiedPermissions ? verifiedPermissions : "",
|
|
||||||
blobSASSignatureValues.startsOn
|
|
||||||
? truncatedISO8061Date(blobSASSignatureValues.startsOn, false)
|
|
||||||
: "",
|
|
||||||
blobSASSignatureValues.expiresOn
|
|
||||||
? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false)
|
|
||||||
: "",
|
|
||||||
getCanonicalName(sharedKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName),
|
|
||||||
blobSASSignatureValues.identifier,
|
|
||||||
blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "",
|
|
||||||
blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "",
|
|
||||||
blobSASSignatureValues.version,
|
|
||||||
resource,
|
|
||||||
timestamp,
|
|
||||||
blobSASSignatureValues.encryptionScope,
|
|
||||||
blobSASSignatureValues.cacheControl ? blobSASSignatureValues.cacheControl : "",
|
|
||||||
blobSASSignatureValues.contentDisposition ? blobSASSignatureValues.contentDisposition : "",
|
|
||||||
blobSASSignatureValues.contentEncoding ? blobSASSignatureValues.contentEncoding : "",
|
|
||||||
blobSASSignatureValues.contentLanguage ? blobSASSignatureValues.contentLanguage : "",
|
|
||||||
blobSASSignatureValues.contentType ? blobSASSignatureValues.contentType : "",
|
|
||||||
].join("\n");
|
|
||||||
const signature = sharedKeyCredential.computeHMACSHA256(stringToSign);
|
|
||||||
return new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, undefined, undefined, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, undefined, undefined, undefined, blobSASSignatureValues.encryptionScope);
|
|
||||||
}
|
|
||||||
/**
|
/**
|
||||||
* ONLY AVAILABLE IN NODE.JS RUNTIME.
|
* ONLY AVAILABLE IN NODE.JS RUNTIME.
|
||||||
* IMPLEMENTATION FOR API VERSION FROM 2018-11-09.
|
* IMPLEMENTATION FOR API VERSION FROM 2018-11-09.
|
||||||
@@ -25974,7 +25244,7 @@ function generateBlobSASQueryParametersUDK20181109(blobSASSignatureValues, userD
|
|||||||
blobSASSignatureValues.contentDisposition,
|
blobSASSignatureValues.contentDisposition,
|
||||||
blobSASSignatureValues.contentEncoding,
|
blobSASSignatureValues.contentEncoding,
|
||||||
blobSASSignatureValues.contentLanguage,
|
blobSASSignatureValues.contentLanguage,
|
||||||
blobSASSignatureValues.contentType,
|
blobSASSignatureValues.contentType
|
||||||
].join("\n");
|
].join("\n");
|
||||||
const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign);
|
const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign);
|
||||||
return new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, undefined, undefined, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey);
|
return new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, undefined, undefined, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey);
|
||||||
@@ -26053,91 +25323,11 @@ function generateBlobSASQueryParametersUDK20200210(blobSASSignatureValues, userD
|
|||||||
blobSASSignatureValues.contentDisposition,
|
blobSASSignatureValues.contentDisposition,
|
||||||
blobSASSignatureValues.contentEncoding,
|
blobSASSignatureValues.contentEncoding,
|
||||||
blobSASSignatureValues.contentLanguage,
|
blobSASSignatureValues.contentLanguage,
|
||||||
blobSASSignatureValues.contentType,
|
blobSASSignatureValues.contentType
|
||||||
].join("\n");
|
].join("\n");
|
||||||
const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign);
|
const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign);
|
||||||
return new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, undefined, undefined, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, blobSASSignatureValues.preauthorizedAgentObjectId, blobSASSignatureValues.correlationId);
|
return new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, undefined, undefined, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, blobSASSignatureValues.preauthorizedAgentObjectId, blobSASSignatureValues.correlationId);
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* ONLY AVAILABLE IN NODE.JS RUNTIME.
|
|
||||||
* IMPLEMENTATION FOR API VERSION FROM 2020-12-06.
|
|
||||||
*
|
|
||||||
* Creates an instance of SASQueryParameters.
|
|
||||||
*
|
|
||||||
* Only accepts required settings needed to create a SAS. For optional settings please
|
|
||||||
* set corresponding properties directly, such as permissions, startsOn.
|
|
||||||
*
|
|
||||||
* WARNING: identifier will be ignored, permissions and expiresOn are required.
|
|
||||||
*
|
|
||||||
* @param blobSASSignatureValues -
|
|
||||||
* @param userDelegationKeyCredential -
|
|
||||||
*/
|
|
||||||
function generateBlobSASQueryParametersUDK20201206(blobSASSignatureValues, userDelegationKeyCredential) {
|
|
||||||
blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues);
|
|
||||||
// Stored access policies are not supported for a user delegation SAS.
|
|
||||||
if (!blobSASSignatureValues.permissions || !blobSASSignatureValues.expiresOn) {
|
|
||||||
throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");
|
|
||||||
}
|
|
||||||
let resource = "c";
|
|
||||||
let timestamp = blobSASSignatureValues.snapshotTime;
|
|
||||||
if (blobSASSignatureValues.blobName) {
|
|
||||||
resource = "b";
|
|
||||||
if (blobSASSignatureValues.snapshotTime) {
|
|
||||||
resource = "bs";
|
|
||||||
}
|
|
||||||
else if (blobSASSignatureValues.versionId) {
|
|
||||||
resource = "bv";
|
|
||||||
timestamp = blobSASSignatureValues.versionId;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// Calling parse and toString guarantees the proper ordering and throws on invalid characters.
|
|
||||||
let verifiedPermissions;
|
|
||||||
if (blobSASSignatureValues.permissions) {
|
|
||||||
if (blobSASSignatureValues.blobName) {
|
|
||||||
verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString();
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// Signature is generated on the un-url-encoded values.
|
|
||||||
const stringToSign = [
|
|
||||||
verifiedPermissions ? verifiedPermissions : "",
|
|
||||||
blobSASSignatureValues.startsOn
|
|
||||||
? truncatedISO8061Date(blobSASSignatureValues.startsOn, false)
|
|
||||||
: "",
|
|
||||||
blobSASSignatureValues.expiresOn
|
|
||||||
? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false)
|
|
||||||
: "",
|
|
||||||
getCanonicalName(userDelegationKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName),
|
|
||||||
userDelegationKeyCredential.userDelegationKey.signedObjectId,
|
|
||||||
userDelegationKeyCredential.userDelegationKey.signedTenantId,
|
|
||||||
userDelegationKeyCredential.userDelegationKey.signedStartsOn
|
|
||||||
? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false)
|
|
||||||
: "",
|
|
||||||
userDelegationKeyCredential.userDelegationKey.signedExpiresOn
|
|
||||||
? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false)
|
|
||||||
: "",
|
|
||||||
userDelegationKeyCredential.userDelegationKey.signedService,
|
|
||||||
userDelegationKeyCredential.userDelegationKey.signedVersion,
|
|
||||||
blobSASSignatureValues.preauthorizedAgentObjectId,
|
|
||||||
undefined,
|
|
||||||
blobSASSignatureValues.correlationId,
|
|
||||||
blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "",
|
|
||||||
blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "",
|
|
||||||
blobSASSignatureValues.version,
|
|
||||||
resource,
|
|
||||||
timestamp,
|
|
||||||
blobSASSignatureValues.encryptionScope,
|
|
||||||
blobSASSignatureValues.cacheControl,
|
|
||||||
blobSASSignatureValues.contentDisposition,
|
|
||||||
blobSASSignatureValues.contentEncoding,
|
|
||||||
blobSASSignatureValues.contentLanguage,
|
|
||||||
blobSASSignatureValues.contentType,
|
|
||||||
].join("\n");
|
|
||||||
const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign);
|
|
||||||
return new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, undefined, undefined, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, blobSASSignatureValues.preauthorizedAgentObjectId, blobSASSignatureValues.correlationId, blobSASSignatureValues.encryptionScope);
|
|
||||||
}
|
|
||||||
function getCanonicalName(accountName, containerName, blobName) {
|
function getCanonicalName(accountName, containerName, blobName) {
|
||||||
// Container: "/blob/account/containerName"
|
// Container: "/blob/account/containerName"
|
||||||
// Blob: "/blob/account/containerName/blobName"
|
// Blob: "/blob/account/containerName/blobName"
|
||||||
@@ -26171,11 +25361,6 @@ function SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues) {
|
|||||||
version < "2019-10-10") {
|
version < "2019-10-10") {
|
||||||
throw RangeError("'version' must be >= '2019-10-10' when providing 'x' permission.");
|
throw RangeError("'version' must be >= '2019-10-10' when providing 'x' permission.");
|
||||||
}
|
}
|
||||||
if (blobSASSignatureValues.permissions &&
|
|
||||||
blobSASSignatureValues.permissions.permanentDelete &&
|
|
||||||
version < "2019-10-10") {
|
|
||||||
throw RangeError("'version' must be >= '2019-10-10' when providing 'y' permission.");
|
|
||||||
}
|
|
||||||
if (blobSASSignatureValues.permissions &&
|
if (blobSASSignatureValues.permissions &&
|
||||||
blobSASSignatureValues.permissions.tag &&
|
blobSASSignatureValues.permissions.tag &&
|
||||||
version < "2019-12-12") {
|
version < "2019-12-12") {
|
||||||
@@ -26186,18 +25371,10 @@ function SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues) {
|
|||||||
(blobSASSignatureValues.permissions.move || blobSASSignatureValues.permissions.execute)) {
|
(blobSASSignatureValues.permissions.move || blobSASSignatureValues.permissions.execute)) {
|
||||||
throw RangeError("'version' must be >= '2020-02-10' when providing the 'm' or 'e' permission.");
|
throw RangeError("'version' must be >= '2020-02-10' when providing the 'm' or 'e' permission.");
|
||||||
}
|
}
|
||||||
if (version < "2021-04-10" &&
|
|
||||||
blobSASSignatureValues.permissions &&
|
|
||||||
blobSASSignatureValues.permissions.filterByTags) {
|
|
||||||
throw RangeError("'version' must be >= '2021-04-10' when providing the 'f' permission.");
|
|
||||||
}
|
|
||||||
if (version < "2020-02-10" &&
|
if (version < "2020-02-10" &&
|
||||||
(blobSASSignatureValues.preauthorizedAgentObjectId || blobSASSignatureValues.correlationId)) {
|
(blobSASSignatureValues.preauthorizedAgentObjectId || blobSASSignatureValues.correlationId)) {
|
||||||
throw RangeError("'version' must be >= '2020-02-10' when providing 'preauthorizedAgentObjectId' or 'correlationId'.");
|
throw RangeError("'version' must be >= '2020-02-10' when providing 'preauthorizedAgentObjectId' or 'correlationId'.");
|
||||||
}
|
}
|
||||||
if (blobSASSignatureValues.encryptionScope && version < "2020-12-06") {
|
|
||||||
throw RangeError("'version' must be >= '2020-12-06' when provided 'encryptionScope' in SAS.");
|
|
||||||
}
|
|
||||||
blobSASSignatureValues.version = version;
|
blobSASSignatureValues.version = version;
|
||||||
return blobSASSignatureValues;
|
return blobSASSignatureValues;
|
||||||
}
|
}
|
||||||
@@ -26271,7 +25448,7 @@ class BlobLeaseClient {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -26306,7 +25483,7 @@ class BlobLeaseClient {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -26339,7 +25516,7 @@ class BlobLeaseClient {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -26371,7 +25548,7 @@ class BlobLeaseClient {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -26406,7 +25583,7 @@ class BlobLeaseClient {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -26486,7 +25663,8 @@ class RetriableReadableStream extends stream.Readable {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
this.destroy(new Error(`Data corruption failure: received less data than required and reached maxRetires limitation. Received data offset: ${this.offset - 1}, data needed offset: ${this.end}, retries: ${this.retries}, max retries: ${this.maxRetryRequests}`));
|
this.destroy(new Error(`Data corruption failure: received less data than required and reached maxRetires limitation. Received data offset: ${this
|
||||||
|
.offset - 1}, data needed offset: ${this.end}, retries: ${this.retries}, max retries: ${this.maxRetryRequests}`));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -27331,7 +26509,7 @@ class AvroReader {
|
|||||||
}
|
}
|
||||||
async initialize(options = {}) {
|
async initialize(options = {}) {
|
||||||
const header = await AvroParser.readFixedBytes(this._headerStream, AVRO_INIT_BYTES.length, {
|
const header = await AvroParser.readFixedBytes(this._headerStream, AVRO_INIT_BYTES.length, {
|
||||||
abortSignal: options.abortSignal,
|
abortSignal: options.abortSignal
|
||||||
});
|
});
|
||||||
if (!arraysEqual(header, AVRO_INIT_BYTES)) {
|
if (!arraysEqual(header, AVRO_INIT_BYTES)) {
|
||||||
throw new Error("Stream is not an Avro file.");
|
throw new Error("Stream is not an Avro file.");
|
||||||
@@ -27339,7 +26517,7 @@ class AvroReader {
|
|||||||
// File metadata is written as if defined by the following map schema:
|
// File metadata is written as if defined by the following map schema:
|
||||||
// { "type": "map", "values": "bytes"}
|
// { "type": "map", "values": "bytes"}
|
||||||
this._metadata = await AvroParser.readMap(this._headerStream, AvroParser.readString, {
|
this._metadata = await AvroParser.readMap(this._headerStream, AvroParser.readString, {
|
||||||
abortSignal: options.abortSignal,
|
abortSignal: options.abortSignal
|
||||||
});
|
});
|
||||||
// Validate codec
|
// Validate codec
|
||||||
const codec = this._metadata[AVRO_CODEC_KEY];
|
const codec = this._metadata[AVRO_CODEC_KEY];
|
||||||
@@ -27348,7 +26526,7 @@ class AvroReader {
|
|||||||
}
|
}
|
||||||
// The 16-byte, randomly-generated sync marker for this file.
|
// The 16-byte, randomly-generated sync marker for this file.
|
||||||
this._syncMarker = await AvroParser.readFixedBytes(this._headerStream, AVRO_SYNC_MARKER_SIZE, {
|
this._syncMarker = await AvroParser.readFixedBytes(this._headerStream, AVRO_SYNC_MARKER_SIZE, {
|
||||||
abortSignal: options.abortSignal,
|
abortSignal: options.abortSignal
|
||||||
});
|
});
|
||||||
// Parse the schema
|
// Parse the schema
|
||||||
const schema = JSON.parse(this._metadata[AVRO_SCHEMA_KEY]);
|
const schema = JSON.parse(this._metadata[AVRO_SCHEMA_KEY]);
|
||||||
@@ -27357,7 +26535,7 @@ class AvroReader {
|
|||||||
this._blockOffset = this._initialBlockOffset + this._dataStream.position;
|
this._blockOffset = this._initialBlockOffset + this._dataStream.position;
|
||||||
}
|
}
|
||||||
this._itemsRemainingInBlock = await AvroParser.readLong(this._dataStream, {
|
this._itemsRemainingInBlock = await AvroParser.readLong(this._dataStream, {
|
||||||
abortSignal: options.abortSignal,
|
abortSignal: options.abortSignal
|
||||||
});
|
});
|
||||||
// skip block length
|
// skip block length
|
||||||
await AvroParser.readLong(this._dataStream, { abortSignal: options.abortSignal });
|
await AvroParser.readLong(this._dataStream, { abortSignal: options.abortSignal });
|
||||||
@@ -27379,13 +26557,13 @@ class AvroReader {
|
|||||||
}
|
}
|
||||||
while (this.hasNext()) {
|
while (this.hasNext()) {
|
||||||
const result = yield tslib.__await(this._itemType.read(this._dataStream, {
|
const result = yield tslib.__await(this._itemType.read(this._dataStream, {
|
||||||
abortSignal: options.abortSignal,
|
abortSignal: options.abortSignal
|
||||||
}));
|
}));
|
||||||
this._itemsRemainingInBlock--;
|
this._itemsRemainingInBlock--;
|
||||||
this._objectIndex++;
|
this._objectIndex++;
|
||||||
if (this._itemsRemainingInBlock == 0) {
|
if (this._itemsRemainingInBlock == 0) {
|
||||||
const marker = yield tslib.__await(AvroParser.readFixedBytes(this._dataStream, AVRO_SYNC_MARKER_SIZE, {
|
const marker = yield tslib.__await(AvroParser.readFixedBytes(this._dataStream, AVRO_SYNC_MARKER_SIZE, {
|
||||||
abortSignal: options.abortSignal,
|
abortSignal: options.abortSignal
|
||||||
}));
|
}));
|
||||||
this._blockOffset = this._initialBlockOffset + this._dataStream.position;
|
this._blockOffset = this._initialBlockOffset + this._dataStream.position;
|
||||||
this._objectIndex = 0;
|
this._objectIndex = 0;
|
||||||
@@ -27394,7 +26572,7 @@ class AvroReader {
|
|||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
this._itemsRemainingInBlock = yield tslib.__await(AvroParser.readLong(this._dataStream, {
|
this._itemsRemainingInBlock = yield tslib.__await(AvroParser.readLong(this._dataStream, {
|
||||||
abortSignal: options.abortSignal,
|
abortSignal: options.abortSignal
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
catch (err) {
|
catch (err) {
|
||||||
@@ -27593,7 +26771,7 @@ class BlobQuickQueryStream extends stream.Readable {
|
|||||||
position,
|
position,
|
||||||
name,
|
name,
|
||||||
isFatal: fatal,
|
isFatal: fatal,
|
||||||
description,
|
description
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -27969,11 +27147,6 @@ class BlobQueryResponse {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Copyright (c) Microsoft Corporation.
|
// Copyright (c) Microsoft Corporation.
|
||||||
/**
|
|
||||||
* Represents the access tier on a blob.
|
|
||||||
* For detailed information about block blob level tiering see {@link https://docs.microsoft.com/azure/storage/blobs/storage-blob-storage-tiers|Hot, cool and archive storage tiers.}
|
|
||||||
*/
|
|
||||||
exports.BlockBlobTier = void 0;
|
|
||||||
(function (BlockBlobTier) {
|
(function (BlockBlobTier) {
|
||||||
/**
|
/**
|
||||||
* Optimized for storing data that is accessed frequently.
|
* Optimized for storing data that is accessed frequently.
|
||||||
@@ -27989,12 +27162,6 @@ exports.BlockBlobTier = void 0;
|
|||||||
*/
|
*/
|
||||||
BlockBlobTier["Archive"] = "Archive";
|
BlockBlobTier["Archive"] = "Archive";
|
||||||
})(exports.BlockBlobTier || (exports.BlockBlobTier = {}));
|
})(exports.BlockBlobTier || (exports.BlockBlobTier = {}));
|
||||||
/**
|
|
||||||
* Specifies the page blob tier to set the blob to. This is only applicable to page blobs on premium storage accounts.
|
|
||||||
* Please see {@link https://docs.microsoft.com/azure/storage/storage-premium-storage#scalability-and-performance-targets|here}
|
|
||||||
* for detailed information on the corresponding IOPS and throughput per PageBlobTier.
|
|
||||||
*/
|
|
||||||
exports.PremiumPageBlobTier = void 0;
|
|
||||||
(function (PremiumPageBlobTier) {
|
(function (PremiumPageBlobTier) {
|
||||||
/**
|
/**
|
||||||
* P4 Tier.
|
* P4 Tier.
|
||||||
@@ -28055,20 +27222,6 @@ function ensureCpkIfSpecified(cpk, isHttps) {
|
|||||||
cpk.encryptionAlgorithm = EncryptionAlgorithmAES25;
|
cpk.encryptionAlgorithm = EncryptionAlgorithmAES25;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* Defines the known cloud audiences for Storage.
|
|
||||||
*/
|
|
||||||
exports.StorageBlobAudience = void 0;
|
|
||||||
(function (StorageBlobAudience) {
|
|
||||||
/**
|
|
||||||
* The OAuth scope to use to retrieve an AAD token for Azure Storage.
|
|
||||||
*/
|
|
||||||
StorageBlobAudience["StorageOAuthScopes"] = "https://storage.azure.com/.default";
|
|
||||||
/**
|
|
||||||
* The OAuth scope to use to retrieve an AAD token for Azure Disk.
|
|
||||||
*/
|
|
||||||
StorageBlobAudience["DiskComputeOAuthScopes"] = "https://disk.compute.azure.com/.default";
|
|
||||||
})(exports.StorageBlobAudience || (exports.StorageBlobAudience = {}));
|
|
||||||
|
|
||||||
// Copyright (c) Microsoft Corporation.
|
// Copyright (c) Microsoft Corporation.
|
||||||
// Licensed under the MIT license.
|
// Licensed under the MIT license.
|
||||||
@@ -28081,16 +27234,16 @@ exports.StorageBlobAudience = void 0;
|
|||||||
function rangeResponseFromModel(response) {
|
function rangeResponseFromModel(response) {
|
||||||
const pageRange = (response._response.parsedBody.pageRange || []).map((x) => ({
|
const pageRange = (response._response.parsedBody.pageRange || []).map((x) => ({
|
||||||
offset: x.start,
|
offset: x.start,
|
||||||
count: x.end - x.start,
|
count: x.end - x.start
|
||||||
}));
|
}));
|
||||||
const clearRange = (response._response.parsedBody.clearRange || []).map((x) => ({
|
const clearRange = (response._response.parsedBody.clearRange || []).map((x) => ({
|
||||||
offset: x.start,
|
offset: x.start,
|
||||||
count: x.end - x.start,
|
count: x.end - x.start
|
||||||
}));
|
}));
|
||||||
return Object.assign(Object.assign({}, response), { pageRange,
|
return Object.assign(Object.assign({}, response), { pageRange,
|
||||||
clearRange, _response: Object.assign(Object.assign({}, response._response), { parsedBody: {
|
clearRange, _response: Object.assign(Object.assign({}, response._response), { parsedBody: {
|
||||||
pageRange,
|
pageRange,
|
||||||
clearRange,
|
clearRange
|
||||||
} }) });
|
} }) });
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -28103,7 +27256,7 @@ function rangeResponseFromModel(response) {
|
|||||||
*/
|
*/
|
||||||
class BlobBeginCopyFromUrlPoller extends coreLro.Poller {
|
class BlobBeginCopyFromUrlPoller extends coreLro.Poller {
|
||||||
constructor(options) {
|
constructor(options) {
|
||||||
const { blobClient, copySource, intervalInMs = 15000, onProgress, resumeFrom, startCopyFromURLOptions, } = options;
|
const { blobClient, copySource, intervalInMs = 15000, onProgress, resumeFrom, startCopyFromURLOptions } = options;
|
||||||
let state;
|
let state;
|
||||||
if (resumeFrom) {
|
if (resumeFrom) {
|
||||||
state = JSON.parse(resumeFrom).state;
|
state = JSON.parse(resumeFrom).state;
|
||||||
@@ -28139,7 +27292,7 @@ const cancel = async function cancel(options = {}) {
|
|||||||
}
|
}
|
||||||
// if abortCopyFromURL throws, it will bubble up to user's poller.cancelOperation call
|
// if abortCopyFromURL throws, it will bubble up to user's poller.cancelOperation call
|
||||||
await state.blobClient.abortCopyFromURL(copyId, {
|
await state.blobClient.abortCopyFromURL(copyId, {
|
||||||
abortSignal: options.abortSignal,
|
abortSignal: options.abortSignal
|
||||||
});
|
});
|
||||||
state.isCancelled = true;
|
state.isCancelled = true;
|
||||||
return makeBlobBeginCopyFromURLPollOperation(state);
|
return makeBlobBeginCopyFromURLPollOperation(state);
|
||||||
@@ -28217,7 +27370,7 @@ function makeBlobBeginCopyFromURLPollOperation(state) {
|
|||||||
state: Object.assign({}, state),
|
state: Object.assign({}, state),
|
||||||
cancel,
|
cancel,
|
||||||
toString,
|
toString,
|
||||||
update,
|
update
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -28859,7 +28012,7 @@ async function streamToBuffer2(stream, buffer, encoding) {
|
|||||||
*/
|
*/
|
||||||
async function readStreamToLocalFile(rs, file) {
|
async function readStreamToLocalFile(rs, file) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
const ws = fs__namespace.createWriteStream(file);
|
const ws = fs.createWriteStream(file);
|
||||||
rs.on("error", (err) => {
|
rs.on("error", (err) => {
|
||||||
reject(err);
|
reject(err);
|
||||||
});
|
});
|
||||||
@@ -28875,8 +28028,8 @@ async function readStreamToLocalFile(rs, file) {
|
|||||||
*
|
*
|
||||||
* Promisified version of fs.stat().
|
* Promisified version of fs.stat().
|
||||||
*/
|
*/
|
||||||
const fsStat = util__namespace.promisify(fs__namespace.stat);
|
const fsStat = util.promisify(fs.stat);
|
||||||
const fsCreateReadStream = fs__namespace.createReadStream;
|
const fsCreateReadStream = fs.createReadStream;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A BlobClient represents a URL to an Azure Storage blob; the blob may be a block blob,
|
* A BlobClient represents a URL to an Azure Storage blob; the blob may be a block blob,
|
||||||
@@ -28919,17 +28072,12 @@ class BlobClient extends StorageClient {
|
|||||||
const blobName = blobNameOrOptions;
|
const blobName = blobNameOrOptions;
|
||||||
const extractedCreds = extractConnectionStringParts(urlOrConnectionString);
|
const extractedCreds = extractConnectionStringParts(urlOrConnectionString);
|
||||||
if (extractedCreds.kind === "AccountConnString") {
|
if (extractedCreds.kind === "AccountConnString") {
|
||||||
if (coreHttp.isNode) {
|
{
|
||||||
const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey);
|
const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey);
|
||||||
url = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName));
|
url = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName));
|
||||||
if (!options.proxyOptions) {
|
options.proxyOptions = coreHttp.getDefaultProxySettings(extractedCreds.proxyUri);
|
||||||
options.proxyOptions = coreHttp.getDefaultProxySettings(extractedCreds.proxyUri);
|
|
||||||
}
|
|
||||||
pipeline = newPipeline(sharedKeyCredential, options);
|
pipeline = newPipeline(sharedKeyCredential, options);
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
throw new Error("Account connection string is only supported in Node.js environment");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if (extractedCreds.kind === "SASConnString") {
|
else if (extractedCreds.kind === "SASConnString") {
|
||||||
url =
|
url =
|
||||||
@@ -28946,8 +28094,10 @@ class BlobClient extends StorageClient {
|
|||||||
throw new Error("Expecting non-empty strings for containerName and blobName parameters");
|
throw new Error("Expecting non-empty strings for containerName and blobName parameters");
|
||||||
}
|
}
|
||||||
super(url, pipeline);
|
super(url, pipeline);
|
||||||
({ blobName: this._name, containerName: this._containerName } =
|
({
|
||||||
this.getBlobAndContainerNamesFromUrl());
|
blobName: this._name,
|
||||||
|
containerName: this._containerName
|
||||||
|
} = this.getBlobAndContainerNamesFromUrl());
|
||||||
this.blobContext = new Blob$1(this.storageClientContext);
|
this.blobContext = new Blob$1(this.storageClientContext);
|
||||||
this._snapshot = getURLParameter(this.url, URLConstants.Parameters.SNAPSHOT);
|
this._snapshot = getURLParameter(this.url, URLConstants.Parameters.SNAPSHOT);
|
||||||
this._versionId = getURLParameter(this.url, URLConstants.Parameters.VERSIONID);
|
this._versionId = getURLParameter(this.url, URLConstants.Parameters.VERSIONID);
|
||||||
@@ -29072,13 +28222,11 @@ class BlobClient extends StorageClient {
|
|||||||
const { span, updatedOptions } = createSpan("BlobClient-download", options);
|
const { span, updatedOptions } = createSpan("BlobClient-download", options);
|
||||||
try {
|
try {
|
||||||
const res = await this.blobContext.download(Object.assign({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), requestOptions: {
|
const res = await this.blobContext.download(Object.assign({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), requestOptions: {
|
||||||
onDownloadProgress: coreHttp.isNode ? undefined : options.onProgress, // for Node.js, progress is reported by RetriableReadableStream
|
onDownloadProgress: coreHttp.isNode ? undefined : options.onProgress // for Node.js, progress is reported by RetriableReadableStream
|
||||||
}, range: offset === 0 && !count ? undefined : rangeToString({ offset, count }), rangeGetContentMD5: options.rangeGetContentMD5, rangeGetContentCRC64: options.rangeGetContentCrc64, snapshot: options.snapshot, cpkInfo: options.customerProvidedKey }, convertTracingToRequestOptionsBase(updatedOptions)));
|
}, range: offset === 0 && !count ? undefined : rangeToString({ offset, count }), rangeGetContentMD5: options.rangeGetContentMD5, rangeGetContentCRC64: options.rangeGetContentCrc64, snapshot: options.snapshot, cpkInfo: options.customerProvidedKey }, convertTracingToRequestOptionsBase(updatedOptions)));
|
||||||
const wrappedRes = Object.assign(Object.assign({}, res), { _response: res._response, objectReplicationDestinationPolicyId: res.objectReplicationPolicyId, objectReplicationSourceProperties: parseObjectReplicationRecord(res.objectReplicationRules) });
|
const wrappedRes = Object.assign(Object.assign({}, res), { _response: res._response, objectReplicationDestinationPolicyId: res.objectReplicationPolicyId, objectReplicationSourceProperties: parseObjectReplicationRecord(res.objectReplicationRules) });
|
||||||
// Return browser response immediately
|
// Return browser response immediately
|
||||||
if (!coreHttp.isNode) {
|
if (false) {}
|
||||||
return wrappedRes;
|
|
||||||
}
|
|
||||||
// We support retrying when download stream unexpected ends in Node.js runtime
|
// We support retrying when download stream unexpected ends in Node.js runtime
|
||||||
// Following code shouldn't be bundled into browser build, however some
|
// Following code shouldn't be bundled into browser build, however some
|
||||||
// bundlers may try to bundle following code and "FileReadResponse.ts".
|
// bundlers may try to bundle following code and "FileReadResponse.ts".
|
||||||
@@ -29103,16 +28251,16 @@ class BlobClient extends StorageClient {
|
|||||||
ifModifiedSince: options.conditions.ifModifiedSince,
|
ifModifiedSince: options.conditions.ifModifiedSince,
|
||||||
ifNoneMatch: options.conditions.ifNoneMatch,
|
ifNoneMatch: options.conditions.ifNoneMatch,
|
||||||
ifUnmodifiedSince: options.conditions.ifUnmodifiedSince,
|
ifUnmodifiedSince: options.conditions.ifUnmodifiedSince,
|
||||||
ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions,
|
ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions
|
||||||
},
|
},
|
||||||
range: rangeToString({
|
range: rangeToString({
|
||||||
count: offset + res.contentLength - start,
|
count: offset + res.contentLength - start,
|
||||||
offset: start,
|
offset: start
|
||||||
}),
|
}),
|
||||||
rangeGetContentMD5: options.rangeGetContentMD5,
|
rangeGetContentMD5: options.rangeGetContentMD5,
|
||||||
rangeGetContentCRC64: options.rangeGetContentCrc64,
|
rangeGetContentCRC64: options.rangeGetContentCrc64,
|
||||||
snapshot: options.snapshot,
|
snapshot: options.snapshot,
|
||||||
cpkInfo: options.customerProvidedKey,
|
cpkInfo: options.customerProvidedKey
|
||||||
};
|
};
|
||||||
// Debug purpose only
|
// Debug purpose only
|
||||||
// console.log(
|
// console.log(
|
||||||
@@ -29123,13 +28271,13 @@ class BlobClient extends StorageClient {
|
|||||||
return (await this.blobContext.download(Object.assign({ abortSignal: options.abortSignal }, updatedDownloadOptions))).readableStreamBody;
|
return (await this.blobContext.download(Object.assign({ abortSignal: options.abortSignal }, updatedDownloadOptions))).readableStreamBody;
|
||||||
}, offset, res.contentLength, {
|
}, offset, res.contentLength, {
|
||||||
maxRetryRequests: options.maxRetryRequests,
|
maxRetryRequests: options.maxRetryRequests,
|
||||||
onProgress: options.onProgress,
|
onProgress: options.onProgress
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -29154,23 +28302,21 @@ class BlobClient extends StorageClient {
|
|||||||
abortSignal: options.abortSignal,
|
abortSignal: options.abortSignal,
|
||||||
customerProvidedKey: options.customerProvidedKey,
|
customerProvidedKey: options.customerProvidedKey,
|
||||||
conditions: options.conditions,
|
conditions: options.conditions,
|
||||||
tracingOptions: updatedOptions.tracingOptions,
|
tracingOptions: updatedOptions.tracingOptions
|
||||||
});
|
});
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
if (e.statusCode === 404) {
|
if (e.statusCode === 404) {
|
||||||
// Expected exception when checking blob existence
|
span.setStatus({
|
||||||
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
|
message: "Expected exception when checking blob existence"
|
||||||
|
});
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else if (e.statusCode === 409 &&
|
|
||||||
e.details.errorCode === BlobUsesCustomerSpecifiedEncryptionMsg) {
|
|
||||||
// Expected exception when checking blob existence
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -29202,7 +28348,7 @@ class BlobClient extends StorageClient {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -29229,7 +28375,7 @@ class BlobClient extends StorageClient {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -29251,19 +28397,20 @@ class BlobClient extends StorageClient {
|
|||||||
const { span, updatedOptions } = createSpan("BlobClient-deleteIfExists", options);
|
const { span, updatedOptions } = createSpan("BlobClient-deleteIfExists", options);
|
||||||
try {
|
try {
|
||||||
const res = await this.delete(updatedOptions);
|
const res = await this.delete(updatedOptions);
|
||||||
return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response });
|
return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response // _response is made non-enumerable
|
||||||
|
});
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "BlobNotFound") {
|
if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "BlobNotFound") {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: "Expected exception when deleting a blob or snapshot only if it exists.",
|
message: "Expected exception when deleting a blob or snapshot only if it exists."
|
||||||
});
|
});
|
||||||
return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response });
|
return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response });
|
||||||
}
|
}
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -29287,7 +28434,7 @@ class BlobClient extends StorageClient {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -29321,7 +28468,7 @@ class BlobClient extends StorageClient {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -29351,7 +28498,7 @@ class BlobClient extends StorageClient {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -29377,7 +28524,7 @@ class BlobClient extends StorageClient {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -29401,7 +28548,7 @@ class BlobClient extends StorageClient {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -29435,7 +28582,7 @@ class BlobClient extends StorageClient {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -29519,7 +28666,7 @@ class BlobClient extends StorageClient {
|
|||||||
const client = {
|
const client = {
|
||||||
abortCopyFromURL: (...args) => this.abortCopyFromURL(...args),
|
abortCopyFromURL: (...args) => this.abortCopyFromURL(...args),
|
||||||
getProperties: (...args) => this.getProperties(...args),
|
getProperties: (...args) => this.getProperties(...args),
|
||||||
startCopyFromURL: (...args) => this.startCopyFromURL(...args),
|
startCopyFromURL: (...args) => this.startCopyFromURL(...args)
|
||||||
};
|
};
|
||||||
const poller = new BlobBeginCopyFromUrlPoller({
|
const poller = new BlobBeginCopyFromUrlPoller({
|
||||||
blobClient: client,
|
blobClient: client,
|
||||||
@@ -29527,7 +28674,7 @@ class BlobClient extends StorageClient {
|
|||||||
intervalInMs: options.intervalInMs,
|
intervalInMs: options.intervalInMs,
|
||||||
onProgress: options.onProgress,
|
onProgress: options.onProgress,
|
||||||
resumeFrom: options.resumeFrom,
|
resumeFrom: options.resumeFrom,
|
||||||
startCopyFromURLOptions: options,
|
startCopyFromURLOptions: options
|
||||||
});
|
});
|
||||||
// Trigger the startCopyFromURL call by calling poll.
|
// Trigger the startCopyFromURL call by calling poll.
|
||||||
// Any errors from this method should be surfaced to the user.
|
// Any errors from this method should be surfaced to the user.
|
||||||
@@ -29550,7 +28697,7 @@ class BlobClient extends StorageClient {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -29576,13 +28723,13 @@ class BlobClient extends StorageClient {
|
|||||||
sourceIfMatch: options.sourceConditions.ifMatch,
|
sourceIfMatch: options.sourceConditions.ifMatch,
|
||||||
sourceIfModifiedSince: options.sourceConditions.ifModifiedSince,
|
sourceIfModifiedSince: options.sourceConditions.ifModifiedSince,
|
||||||
sourceIfNoneMatch: options.sourceConditions.ifNoneMatch,
|
sourceIfNoneMatch: options.sourceConditions.ifNoneMatch,
|
||||||
sourceIfUnmodifiedSince: options.sourceConditions.ifUnmodifiedSince,
|
sourceIfUnmodifiedSince: options.sourceConditions.ifUnmodifiedSince
|
||||||
}, sourceContentMD5: options.sourceContentMD5, copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), blobTagsString: toBlobTagsString(options.tags), immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn, immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode, legalHold: options.legalHold, encryptionScope: options.encryptionScope }, convertTracingToRequestOptionsBase(updatedOptions)));
|
}, sourceContentMD5: options.sourceContentMD5, copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), blobTagsString: toBlobTagsString(options.tags), immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn, immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode, legalHold: options.legalHold }, convertTracingToRequestOptionsBase(updatedOptions)));
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -29610,7 +28757,7 @@ class BlobClient extends StorageClient {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -29687,7 +28834,7 @@ class BlobClient extends StorageClient {
|
|||||||
conditions: options.conditions,
|
conditions: options.conditions,
|
||||||
maxRetryRequests: options.maxRetryRequestsPerBlock,
|
maxRetryRequests: options.maxRetryRequestsPerBlock,
|
||||||
customerProvidedKey: options.customerProvidedKey,
|
customerProvidedKey: options.customerProvidedKey,
|
||||||
tracingOptions: Object.assign(Object.assign({}, options.tracingOptions), convertTracingToRequestOptionsBase(updatedOptions)),
|
tracingOptions: Object.assign(Object.assign({}, options.tracingOptions), convertTracingToRequestOptionsBase(updatedOptions))
|
||||||
});
|
});
|
||||||
const stream = response.readableStreamBody;
|
const stream = response.readableStreamBody;
|
||||||
await streamToBuffer(stream, buffer, off - offset, chunkEnd - offset);
|
await streamToBuffer(stream, buffer, off - offset, chunkEnd - offset);
|
||||||
@@ -29706,7 +28853,7 @@ class BlobClient extends StorageClient {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -29744,7 +28891,7 @@ class BlobClient extends StorageClient {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -29825,13 +28972,13 @@ class BlobClient extends StorageClient {
|
|||||||
sourceIfModifiedSince: options.sourceConditions.ifModifiedSince,
|
sourceIfModifiedSince: options.sourceConditions.ifModifiedSince,
|
||||||
sourceIfNoneMatch: options.sourceConditions.ifNoneMatch,
|
sourceIfNoneMatch: options.sourceConditions.ifNoneMatch,
|
||||||
sourceIfUnmodifiedSince: options.sourceConditions.ifUnmodifiedSince,
|
sourceIfUnmodifiedSince: options.sourceConditions.ifUnmodifiedSince,
|
||||||
sourceIfTags: options.sourceConditions.tagConditions,
|
sourceIfTags: options.sourceConditions.tagConditions
|
||||||
}, immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn, immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode, legalHold: options.legalHold, rehydratePriority: options.rehydratePriority, tier: toAccessTier(options.tier), blobTagsString: toBlobTagsString(options.tags), sealBlob: options.sealBlob }, convertTracingToRequestOptionsBase(updatedOptions)));
|
}, immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn, immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode, legalHold: options.legalHold, rehydratePriority: options.rehydratePriority, tier: toAccessTier(options.tier), blobTagsString: toBlobTagsString(options.tags), sealBlob: options.sealBlob }, convertTracingToRequestOptionsBase(updatedOptions)));
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -29872,7 +29019,7 @@ class BlobClient extends StorageClient {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -29893,7 +29040,7 @@ class BlobClient extends StorageClient {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -29914,7 +29061,7 @@ class BlobClient extends StorageClient {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -29965,17 +29112,12 @@ class AppendBlobClient extends BlobClient {
|
|||||||
const blobName = blobNameOrOptions;
|
const blobName = blobNameOrOptions;
|
||||||
const extractedCreds = extractConnectionStringParts(urlOrConnectionString);
|
const extractedCreds = extractConnectionStringParts(urlOrConnectionString);
|
||||||
if (extractedCreds.kind === "AccountConnString") {
|
if (extractedCreds.kind === "AccountConnString") {
|
||||||
if (coreHttp.isNode) {
|
{
|
||||||
const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey);
|
const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey);
|
||||||
url = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName));
|
url = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName));
|
||||||
if (!options.proxyOptions) {
|
options.proxyOptions = coreHttp.getDefaultProxySettings(extractedCreds.proxyUri);
|
||||||
options.proxyOptions = coreHttp.getDefaultProxySettings(extractedCreds.proxyUri);
|
|
||||||
}
|
|
||||||
pipeline = newPipeline(sharedKeyCredential, options);
|
pipeline = newPipeline(sharedKeyCredential, options);
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
throw new Error("Account connection string is only supported in Node.js environment");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if (extractedCreds.kind === "SASConnString") {
|
else if (extractedCreds.kind === "SASConnString") {
|
||||||
url =
|
url =
|
||||||
@@ -30030,7 +29172,7 @@ class AppendBlobClient extends BlobClient {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -30051,19 +29193,20 @@ class AppendBlobClient extends BlobClient {
|
|||||||
const conditions = { ifNoneMatch: ETagAny };
|
const conditions = { ifNoneMatch: ETagAny };
|
||||||
try {
|
try {
|
||||||
const res = await this.create(Object.assign(Object.assign({}, updatedOptions), { conditions }));
|
const res = await this.create(Object.assign(Object.assign({}, updatedOptions), { conditions }));
|
||||||
return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response });
|
return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response // _response is made non-enumerable
|
||||||
|
});
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "BlobAlreadyExists") {
|
if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "BlobAlreadyExists") {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: "Expected exception when creating a blob only if it does not already exist.",
|
message: "Expected exception when creating a blob only if it does not already exist."
|
||||||
});
|
});
|
||||||
return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response });
|
return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response });
|
||||||
}
|
}
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -30086,7 +29229,7 @@ class AppendBlobClient extends BlobClient {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -30125,13 +29268,13 @@ class AppendBlobClient extends BlobClient {
|
|||||||
try {
|
try {
|
||||||
ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);
|
ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);
|
||||||
return await this.appendBlobContext.appendBlock(contentLength, body, Object.assign({ abortSignal: options.abortSignal, appendPositionAccessConditions: options.conditions, leaseAccessConditions: options.conditions, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), requestOptions: {
|
return await this.appendBlobContext.appendBlock(contentLength, body, Object.assign({ abortSignal: options.abortSignal, appendPositionAccessConditions: options.conditions, leaseAccessConditions: options.conditions, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), requestOptions: {
|
||||||
onUploadProgress: options.onProgress,
|
onUploadProgress: options.onProgress
|
||||||
}, transactionalContentMD5: options.transactionalContentMD5, transactionalContentCrc64: options.transactionalContentCrc64, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope }, convertTracingToRequestOptionsBase(updatedOptions)));
|
}, transactionalContentMD5: options.transactionalContentMD5, transactionalContentCrc64: options.transactionalContentCrc64, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope }, convertTracingToRequestOptionsBase(updatedOptions)));
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -30164,13 +29307,13 @@ class AppendBlobClient extends BlobClient {
|
|||||||
sourceIfMatch: options.sourceConditions.ifMatch,
|
sourceIfMatch: options.sourceConditions.ifMatch,
|
||||||
sourceIfModifiedSince: options.sourceConditions.ifModifiedSince,
|
sourceIfModifiedSince: options.sourceConditions.ifModifiedSince,
|
||||||
sourceIfNoneMatch: options.sourceConditions.ifNoneMatch,
|
sourceIfNoneMatch: options.sourceConditions.ifNoneMatch,
|
||||||
sourceIfUnmodifiedSince: options.sourceConditions.ifUnmodifiedSince,
|
sourceIfUnmodifiedSince: options.sourceConditions.ifUnmodifiedSince
|
||||||
}, copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope }, convertTracingToRequestOptionsBase(updatedOptions)));
|
}, copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope }, convertTracingToRequestOptionsBase(updatedOptions)));
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -30221,17 +29364,12 @@ class BlockBlobClient extends BlobClient {
|
|||||||
const blobName = blobNameOrOptions;
|
const blobName = blobNameOrOptions;
|
||||||
const extractedCreds = extractConnectionStringParts(urlOrConnectionString);
|
const extractedCreds = extractConnectionStringParts(urlOrConnectionString);
|
||||||
if (extractedCreds.kind === "AccountConnString") {
|
if (extractedCreds.kind === "AccountConnString") {
|
||||||
if (coreHttp.isNode) {
|
{
|
||||||
const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey);
|
const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey);
|
||||||
url = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName));
|
url = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName));
|
||||||
if (!options.proxyOptions) {
|
options.proxyOptions = coreHttp.getDefaultProxySettings(extractedCreds.proxyUri);
|
||||||
options.proxyOptions = coreHttp.getDefaultProxySettings(extractedCreds.proxyUri);
|
|
||||||
}
|
|
||||||
pipeline = newPipeline(sharedKeyCredential, options);
|
pipeline = newPipeline(sharedKeyCredential, options);
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
throw new Error("Account connection string is only supported in Node.js environment");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if (extractedCreds.kind === "SASConnString") {
|
else if (extractedCreds.kind === "SASConnString") {
|
||||||
url =
|
url =
|
||||||
@@ -30297,25 +29435,23 @@ class BlockBlobClient extends BlobClient {
|
|||||||
ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);
|
ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);
|
||||||
const { span, updatedOptions } = createSpan("BlockBlobClient-query", options);
|
const { span, updatedOptions } = createSpan("BlockBlobClient-query", options);
|
||||||
try {
|
try {
|
||||||
if (!coreHttp.isNode) {
|
if (false) {}
|
||||||
throw new Error("This operation currently is only supported in Node.js.");
|
|
||||||
}
|
|
||||||
const response = await this._blobContext.query(Object.assign({ abortSignal: options.abortSignal, queryRequest: {
|
const response = await this._blobContext.query(Object.assign({ abortSignal: options.abortSignal, queryRequest: {
|
||||||
queryType: "SQL",
|
queryType: "SQL",
|
||||||
expression: query,
|
expression: query,
|
||||||
inputSerialization: toQuerySerialization(options.inputTextConfiguration),
|
inputSerialization: toQuerySerialization(options.inputTextConfiguration),
|
||||||
outputSerialization: toQuerySerialization(options.outputTextConfiguration),
|
outputSerialization: toQuerySerialization(options.outputTextConfiguration)
|
||||||
}, leaseAccessConditions: options.conditions, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }) }, convertTracingToRequestOptionsBase(updatedOptions)));
|
}, leaseAccessConditions: options.conditions, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }) }, convertTracingToRequestOptionsBase(updatedOptions)));
|
||||||
return new BlobQueryResponse(response, {
|
return new BlobQueryResponse(response, {
|
||||||
abortSignal: options.abortSignal,
|
abortSignal: options.abortSignal,
|
||||||
onProgress: options.onProgress,
|
onProgress: options.onProgress,
|
||||||
onError: options.onError,
|
onError: options.onError
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -30357,13 +29493,13 @@ class BlockBlobClient extends BlobClient {
|
|||||||
try {
|
try {
|
||||||
ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);
|
ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);
|
||||||
return await this.blockBlobContext.upload(contentLength, body, Object.assign({ abortSignal: options.abortSignal, blobHttpHeaders: options.blobHTTPHeaders, leaseAccessConditions: options.conditions, metadata: options.metadata, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), requestOptions: {
|
return await this.blockBlobContext.upload(contentLength, body, Object.assign({ abortSignal: options.abortSignal, blobHttpHeaders: options.blobHTTPHeaders, leaseAccessConditions: options.conditions, metadata: options.metadata, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), requestOptions: {
|
||||||
onUploadProgress: options.onProgress,
|
onUploadProgress: options.onProgress
|
||||||
}, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn, immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode, legalHold: options.legalHold, tier: toAccessTier(options.tier), blobTagsString: toBlobTagsString(options.tags) }, convertTracingToRequestOptionsBase(updatedOptions)));
|
}, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn, immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode, legalHold: options.legalHold, tier: toAccessTier(options.tier), blobTagsString: toBlobTagsString(options.tags) }, convertTracingToRequestOptionsBase(updatedOptions)));
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -30400,13 +29536,13 @@ class BlockBlobClient extends BlobClient {
|
|||||||
sourceIfModifiedSince: (_b = options.sourceConditions) === null || _b === void 0 ? void 0 : _b.ifModifiedSince,
|
sourceIfModifiedSince: (_b = options.sourceConditions) === null || _b === void 0 ? void 0 : _b.ifModifiedSince,
|
||||||
sourceIfNoneMatch: (_c = options.sourceConditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch,
|
sourceIfNoneMatch: (_c = options.sourceConditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch,
|
||||||
sourceIfUnmodifiedSince: (_d = options.sourceConditions) === null || _d === void 0 ? void 0 : _d.ifUnmodifiedSince,
|
sourceIfUnmodifiedSince: (_d = options.sourceConditions) === null || _d === void 0 ? void 0 : _d.ifUnmodifiedSince,
|
||||||
sourceIfTags: (_e = options.sourceConditions) === null || _e === void 0 ? void 0 : _e.tagConditions,
|
sourceIfTags: (_e = options.sourceConditions) === null || _e === void 0 ? void 0 : _e.tagConditions
|
||||||
}, cpkInfo: options.customerProvidedKey, copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), tier: toAccessTier(options.tier), blobTagsString: toBlobTagsString(options.tags) }), convertTracingToRequestOptionsBase(updatedOptions)));
|
}, cpkInfo: options.customerProvidedKey, copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), tier: toAccessTier(options.tier), blobTagsString: toBlobTagsString(options.tags) }), convertTracingToRequestOptionsBase(updatedOptions)));
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -30430,13 +29566,13 @@ class BlockBlobClient extends BlobClient {
|
|||||||
try {
|
try {
|
||||||
ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);
|
ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);
|
||||||
return await this.blockBlobContext.stageBlock(blockId, contentLength, body, Object.assign({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, requestOptions: {
|
return await this.blockBlobContext.stageBlock(blockId, contentLength, body, Object.assign({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, requestOptions: {
|
||||||
onUploadProgress: options.onProgress,
|
onUploadProgress: options.onProgress
|
||||||
}, transactionalContentMD5: options.transactionalContentMD5, transactionalContentCrc64: options.transactionalContentCrc64, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope }, convertTracingToRequestOptionsBase(updatedOptions)));
|
}, transactionalContentMD5: options.transactionalContentMD5, transactionalContentCrc64: options.transactionalContentCrc64, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope }, convertTracingToRequestOptionsBase(updatedOptions)));
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -30474,7 +29610,7 @@ class BlockBlobClient extends BlobClient {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -30505,7 +29641,7 @@ class BlockBlobClient extends BlobClient {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -30539,7 +29675,7 @@ class BlockBlobClient extends BlobClient {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -30566,7 +29702,7 @@ class BlockBlobClient extends BlobClient {
|
|||||||
async uploadData(data, options = {}) {
|
async uploadData(data, options = {}) {
|
||||||
const { span, updatedOptions } = createSpan("BlockBlobClient-uploadData", options);
|
const { span, updatedOptions } = createSpan("BlockBlobClient-uploadData", options);
|
||||||
try {
|
try {
|
||||||
if (coreHttp.isNode) {
|
if (true) {
|
||||||
let buffer;
|
let buffer;
|
||||||
if (data instanceof Buffer) {
|
if (data instanceof Buffer) {
|
||||||
buffer = data;
|
buffer = data;
|
||||||
@@ -30580,15 +29716,12 @@ class BlockBlobClient extends BlobClient {
|
|||||||
}
|
}
|
||||||
return this.uploadSeekableInternal((offset, size) => buffer.slice(offset, offset + size), buffer.byteLength, updatedOptions);
|
return this.uploadSeekableInternal((offset, size) => buffer.slice(offset, offset + size), buffer.byteLength, updatedOptions);
|
||||||
}
|
}
|
||||||
else {
|
else {}
|
||||||
const browserBlob = new Blob([data]);
|
|
||||||
return this.uploadSeekableInternal((offset, size) => browserBlob.slice(offset, offset + size), browserBlob.size, updatedOptions);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -30624,7 +29757,7 @@ class BlockBlobClient extends BlobClient {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -30637,7 +29770,7 @@ class BlockBlobClient extends BlobClient {
|
|||||||
* Uploads data to block blob. Requires a bodyFactory as the data source,
|
* Uploads data to block blob. Requires a bodyFactory as the data source,
|
||||||
* which need to return a {@link HttpRequestBody} object with the offset and size provided.
|
* which need to return a {@link HttpRequestBody} object with the offset and size provided.
|
||||||
*
|
*
|
||||||
* When data length is no more than the specified {@link BlockBlobParallelUploadOptions.maxSingleShotSize} (default is
|
* When data length is no more than the specifiled {@link BlockBlobParallelUploadOptions.maxSingleShotSize} (default is
|
||||||
* {@link BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES}), this method will use 1 {@link upload} call to finish the upload.
|
* {@link BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES}), this method will use 1 {@link upload} call to finish the upload.
|
||||||
* Otherwise, this method will call {@link stageBlock} to upload blocks, and finally call {@link commitBlockList}
|
* Otherwise, this method will call {@link stageBlock} to upload blocks, and finally call {@link commitBlockList}
|
||||||
* to commit the block list.
|
* to commit the block list.
|
||||||
@@ -30703,14 +29836,14 @@ class BlockBlobClient extends BlobClient {
|
|||||||
abortSignal: options.abortSignal,
|
abortSignal: options.abortSignal,
|
||||||
conditions: options.conditions,
|
conditions: options.conditions,
|
||||||
encryptionScope: options.encryptionScope,
|
encryptionScope: options.encryptionScope,
|
||||||
tracingOptions: updatedOptions.tracingOptions,
|
tracingOptions: updatedOptions.tracingOptions
|
||||||
});
|
});
|
||||||
// Update progress after block is successfully uploaded to server, in case of block trying
|
// Update progress after block is successfully uploaded to server, in case of block trying
|
||||||
// TODO: Hook with convenience layer progress event in finer level
|
// TODO: Hook with convenience layer progress event in finer level
|
||||||
transferProgress += contentLength;
|
transferProgress += contentLength;
|
||||||
if (options.onProgress) {
|
if (options.onProgress) {
|
||||||
options.onProgress({
|
options.onProgress({
|
||||||
loadedBytes: transferProgress,
|
loadedBytes: transferProgress
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -30721,7 +29854,7 @@ class BlockBlobClient extends BlobClient {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -30750,14 +29883,14 @@ class BlockBlobClient extends BlobClient {
|
|||||||
return () => fsCreateReadStream(filePath, {
|
return () => fsCreateReadStream(filePath, {
|
||||||
autoClose: true,
|
autoClose: true,
|
||||||
end: count ? offset + count - 1 : Infinity,
|
end: count ? offset + count - 1 : Infinity,
|
||||||
start: offset,
|
start: offset
|
||||||
});
|
});
|
||||||
}, size, Object.assign(Object.assign({}, options), { tracingOptions: Object.assign(Object.assign({}, options.tracingOptions), convertTracingToRequestOptionsBase(updatedOptions)) }));
|
}, size, Object.assign(Object.assign({}, options), { tracingOptions: Object.assign(Object.assign({}, options.tracingOptions), convertTracingToRequestOptionsBase(updatedOptions)) }));
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -30801,7 +29934,7 @@ class BlockBlobClient extends BlobClient {
|
|||||||
await this.stageBlock(blockID, body, length, {
|
await this.stageBlock(blockID, body, length, {
|
||||||
conditions: options.conditions,
|
conditions: options.conditions,
|
||||||
encryptionScope: options.encryptionScope,
|
encryptionScope: options.encryptionScope,
|
||||||
tracingOptions: updatedOptions.tracingOptions,
|
tracingOptions: updatedOptions.tracingOptions
|
||||||
});
|
});
|
||||||
// Update progress after block is successfully uploaded to server, in case of block trying
|
// Update progress after block is successfully uploaded to server, in case of block trying
|
||||||
transferProgress += length;
|
transferProgress += length;
|
||||||
@@ -30820,7 +29953,7 @@ class BlockBlobClient extends BlobClient {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -30871,17 +30004,12 @@ class PageBlobClient extends BlobClient {
|
|||||||
const blobName = blobNameOrOptions;
|
const blobName = blobNameOrOptions;
|
||||||
const extractedCreds = extractConnectionStringParts(urlOrConnectionString);
|
const extractedCreds = extractConnectionStringParts(urlOrConnectionString);
|
||||||
if (extractedCreds.kind === "AccountConnString") {
|
if (extractedCreds.kind === "AccountConnString") {
|
||||||
if (coreHttp.isNode) {
|
{
|
||||||
const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey);
|
const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey);
|
||||||
url = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName));
|
url = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName));
|
||||||
if (!options.proxyOptions) {
|
options.proxyOptions = coreHttp.getDefaultProxySettings(extractedCreds.proxyUri);
|
||||||
options.proxyOptions = coreHttp.getDefaultProxySettings(extractedCreds.proxyUri);
|
|
||||||
}
|
|
||||||
pipeline = newPipeline(sharedKeyCredential, options);
|
pipeline = newPipeline(sharedKeyCredential, options);
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
throw new Error("Account connection string is only supported in Node.js environment");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if (extractedCreds.kind === "SASConnString") {
|
else if (extractedCreds.kind === "SASConnString") {
|
||||||
url =
|
url =
|
||||||
@@ -30931,7 +30059,7 @@ class PageBlobClient extends BlobClient {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -30954,19 +30082,20 @@ class PageBlobClient extends BlobClient {
|
|||||||
try {
|
try {
|
||||||
const conditions = { ifNoneMatch: ETagAny };
|
const conditions = { ifNoneMatch: ETagAny };
|
||||||
const res = await this.create(size, Object.assign(Object.assign({}, options), { conditions, tracingOptions: updatedOptions.tracingOptions }));
|
const res = await this.create(size, Object.assign(Object.assign({}, options), { conditions, tracingOptions: updatedOptions.tracingOptions }));
|
||||||
return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response });
|
return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response // _response is made non-enumerable
|
||||||
|
});
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "BlobAlreadyExists") {
|
if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "BlobAlreadyExists") {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: "Expected exception when creating a blob only if it does not already exist.",
|
message: "Expected exception when creating a blob only if it does not already exist."
|
||||||
});
|
});
|
||||||
return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response });
|
return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response });
|
||||||
}
|
}
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -30991,13 +30120,13 @@ class PageBlobClient extends BlobClient {
|
|||||||
try {
|
try {
|
||||||
ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);
|
ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);
|
||||||
return await this.pageBlobContext.uploadPages(count, body, Object.assign({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), requestOptions: {
|
return await this.pageBlobContext.uploadPages(count, body, Object.assign({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), requestOptions: {
|
||||||
onUploadProgress: options.onProgress,
|
onUploadProgress: options.onProgress
|
||||||
}, range: rangeToString({ offset, count }), sequenceNumberAccessConditions: options.conditions, transactionalContentMD5: options.transactionalContentMD5, transactionalContentCrc64: options.transactionalContentCrc64, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope }, convertTracingToRequestOptionsBase(updatedOptions)));
|
}, range: rangeToString({ offset, count }), sequenceNumberAccessConditions: options.conditions, transactionalContentMD5: options.transactionalContentMD5, transactionalContentCrc64: options.transactionalContentCrc64, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope }, convertTracingToRequestOptionsBase(updatedOptions)));
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -31027,13 +30156,13 @@ class PageBlobClient extends BlobClient {
|
|||||||
sourceIfMatch: options.sourceConditions.ifMatch,
|
sourceIfMatch: options.sourceConditions.ifMatch,
|
||||||
sourceIfModifiedSince: options.sourceConditions.ifModifiedSince,
|
sourceIfModifiedSince: options.sourceConditions.ifModifiedSince,
|
||||||
sourceIfNoneMatch: options.sourceConditions.ifNoneMatch,
|
sourceIfNoneMatch: options.sourceConditions.ifNoneMatch,
|
||||||
sourceIfUnmodifiedSince: options.sourceConditions.ifUnmodifiedSince,
|
sourceIfUnmodifiedSince: options.sourceConditions.ifUnmodifiedSince
|
||||||
}, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization) }, convertTracingToRequestOptionsBase(updatedOptions)));
|
}, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization) }, convertTracingToRequestOptionsBase(updatedOptions)));
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -31060,7 +30189,7 @@ class PageBlobClient extends BlobClient {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -31089,7 +30218,7 @@ class PageBlobClient extends BlobClient {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -31119,7 +30248,7 @@ class PageBlobClient extends BlobClient {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -31149,7 +30278,7 @@ class PageBlobClient extends BlobClient {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -31175,7 +30304,7 @@ class PageBlobClient extends BlobClient {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -31202,7 +30331,7 @@ class PageBlobClient extends BlobClient {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -31232,7 +30361,7 @@ class PageBlobClient extends BlobClient {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -31380,7 +30509,7 @@ class BatchResponseParser {
|
|||||||
return {
|
return {
|
||||||
subResponses: deserializedSubResponses,
|
subResponses: deserializedSubResponses,
|
||||||
subResponsesSucceededCount: subResponsesSucceededCount,
|
subResponsesSucceededCount: subResponsesSucceededCount,
|
||||||
subResponsesFailedCount: subResponsesFailedCount,
|
subResponsesFailedCount: subResponsesFailedCount
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -31527,7 +30656,7 @@ class BlobBatch {
|
|||||||
this.setBatchType("delete");
|
this.setBatchType("delete");
|
||||||
await this.addSubRequestInternal({
|
await this.addSubRequestInternal({
|
||||||
url: url,
|
url: url,
|
||||||
credential: credential,
|
credential: credential
|
||||||
}, async () => {
|
}, async () => {
|
||||||
await new BlobClient(url, this.batchRequest.createPipeline(credential)).delete(updatedOptions);
|
await new BlobClient(url, this.batchRequest.createPipeline(credential)).delete(updatedOptions);
|
||||||
});
|
});
|
||||||
@@ -31535,7 +30664,7 @@ class BlobBatch {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -31574,7 +30703,7 @@ class BlobBatch {
|
|||||||
this.setBatchType("setAccessTier");
|
this.setBatchType("setAccessTier");
|
||||||
await this.addSubRequestInternal({
|
await this.addSubRequestInternal({
|
||||||
url: url,
|
url: url,
|
||||||
credential: credential,
|
credential: credential
|
||||||
}, async () => {
|
}, async () => {
|
||||||
await new BlobClient(url, this.batchRequest.createPipeline(credential)).setAccessTier(tier, updatedOptions);
|
await new BlobClient(url, this.batchRequest.createPipeline(credential)).setAccessTier(tier, updatedOptions);
|
||||||
});
|
});
|
||||||
@@ -31582,7 +30711,7 @@ class BlobBatch {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -31639,7 +30768,7 @@ class InnerBatchRequest {
|
|||||||
this.subRequestPrefix,
|
this.subRequestPrefix,
|
||||||
`${HeaderConstants.CONTENT_ID}: ${this.operationCount}`,
|
`${HeaderConstants.CONTENT_ID}: ${this.operationCount}`,
|
||||||
"",
|
"",
|
||||||
`${request.method.toString()} ${getURLPathAndQuery(request.url)} ${HTTP_VERSION_1_1}${HTTP_LINE_ENDING}`, // sub request start line with method
|
`${request.method.toString()} ${getURLPathAndQuery(request.url)} ${HTTP_VERSION_1_1}${HTTP_LINE_ENDING}` // sub request start line with method
|
||||||
].join(HTTP_LINE_ENDING);
|
].join(HTTP_LINE_ENDING);
|
||||||
for (const header of request.headers.headersArray()) {
|
for (const header of request.headers.headersArray()) {
|
||||||
this.body += `${header.name}: ${header.value}${HTTP_LINE_ENDING}`;
|
this.body += `${header.name}: ${header.value}${HTTP_LINE_ENDING}`;
|
||||||
@@ -31679,7 +30808,7 @@ class BatchRequestAssemblePolicy extends coreHttp.BaseRequestPolicy {
|
|||||||
this.dummyResponse = {
|
this.dummyResponse = {
|
||||||
request: new coreHttp.WebResource(),
|
request: new coreHttp.WebResource(),
|
||||||
status: 200,
|
status: 200,
|
||||||
headers: new coreHttp.HttpHeaders(),
|
headers: new coreHttp.HttpHeaders()
|
||||||
};
|
};
|
||||||
this.batchRequest = batchRequest;
|
this.batchRequest = batchRequest;
|
||||||
}
|
}
|
||||||
@@ -31846,14 +30975,14 @@ class BlobBatchClient {
|
|||||||
version: rawBatchResponse.version,
|
version: rawBatchResponse.version,
|
||||||
subResponses: responseSummary.subResponses,
|
subResponses: responseSummary.subResponses,
|
||||||
subResponsesSucceededCount: responseSummary.subResponsesSucceededCount,
|
subResponsesSucceededCount: responseSummary.subResponsesSucceededCount,
|
||||||
subResponsesFailedCount: responseSummary.subResponsesFailedCount,
|
subResponsesFailedCount: responseSummary.subResponsesFailedCount
|
||||||
};
|
};
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -31899,17 +31028,12 @@ class ContainerClient extends StorageClient {
|
|||||||
const containerName = credentialOrPipelineOrContainerName;
|
const containerName = credentialOrPipelineOrContainerName;
|
||||||
const extractedCreds = extractConnectionStringParts(urlOrConnectionString);
|
const extractedCreds = extractConnectionStringParts(urlOrConnectionString);
|
||||||
if (extractedCreds.kind === "AccountConnString") {
|
if (extractedCreds.kind === "AccountConnString") {
|
||||||
if (coreHttp.isNode) {
|
{
|
||||||
const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey);
|
const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey);
|
||||||
url = appendToURLPath(extractedCreds.url, encodeURIComponent(containerName));
|
url = appendToURLPath(extractedCreds.url, encodeURIComponent(containerName));
|
||||||
if (!options.proxyOptions) {
|
options.proxyOptions = coreHttp.getDefaultProxySettings(extractedCreds.proxyUri);
|
||||||
options.proxyOptions = coreHttp.getDefaultProxySettings(extractedCreds.proxyUri);
|
|
||||||
}
|
|
||||||
pipeline = newPipeline(sharedKeyCredential, options);
|
pipeline = newPipeline(sharedKeyCredential, options);
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
throw new Error("Account connection string is only supported in Node.js environment");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if (extractedCreds.kind === "SASConnString") {
|
else if (extractedCreds.kind === "SASConnString") {
|
||||||
url =
|
url =
|
||||||
@@ -31961,7 +31085,7 @@ class ContainerClient extends StorageClient {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -31981,19 +31105,20 @@ class ContainerClient extends StorageClient {
|
|||||||
const { span, updatedOptions } = createSpan("ContainerClient-createIfNotExists", options);
|
const { span, updatedOptions } = createSpan("ContainerClient-createIfNotExists", options);
|
||||||
try {
|
try {
|
||||||
const res = await this.create(updatedOptions);
|
const res = await this.create(updatedOptions);
|
||||||
return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response });
|
return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response // _response is made non-enumerable
|
||||||
|
});
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "ContainerAlreadyExists") {
|
if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "ContainerAlreadyExists") {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: "Expected exception when creating a container only if it does not already exist.",
|
message: "Expected exception when creating a container only if it does not already exist."
|
||||||
});
|
});
|
||||||
return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response });
|
return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response });
|
||||||
}
|
}
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -32015,7 +31140,7 @@ class ContainerClient extends StorageClient {
|
|||||||
try {
|
try {
|
||||||
await this.getProperties({
|
await this.getProperties({
|
||||||
abortSignal: options.abortSignal,
|
abortSignal: options.abortSignal,
|
||||||
tracingOptions: updatedOptions.tracingOptions,
|
tracingOptions: updatedOptions.tracingOptions
|
||||||
});
|
});
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -32023,13 +31148,13 @@ class ContainerClient extends StorageClient {
|
|||||||
if (e.statusCode === 404) {
|
if (e.statusCode === 404) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: "Expected exception when checking container existence",
|
message: "Expected exception when checking container existence"
|
||||||
});
|
});
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -32103,7 +31228,7 @@ class ContainerClient extends StorageClient {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -32129,7 +31254,7 @@ class ContainerClient extends StorageClient {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -32149,19 +31274,20 @@ class ContainerClient extends StorageClient {
|
|||||||
const { span, updatedOptions } = createSpan("ContainerClient-deleteIfExists", options);
|
const { span, updatedOptions } = createSpan("ContainerClient-deleteIfExists", options);
|
||||||
try {
|
try {
|
||||||
const res = await this.delete(updatedOptions);
|
const res = await this.delete(updatedOptions);
|
||||||
return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response });
|
return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response // _response is made non-enumerable
|
||||||
|
});
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "ContainerNotFound") {
|
if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "ContainerNotFound") {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: "Expected exception when deleting a container only if it exists.",
|
message: "Expected exception when deleting a container only if it exists."
|
||||||
});
|
});
|
||||||
return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response });
|
return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response });
|
||||||
}
|
}
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -32195,7 +31321,7 @@ class ContainerClient extends StorageClient {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -32231,13 +31357,13 @@ class ContainerClient extends StorageClient {
|
|||||||
requestId: response.requestId,
|
requestId: response.requestId,
|
||||||
clientRequestId: response.clientRequestId,
|
clientRequestId: response.clientRequestId,
|
||||||
signedIdentifiers: [],
|
signedIdentifiers: [],
|
||||||
version: response.version,
|
version: response.version
|
||||||
};
|
};
|
||||||
for (const identifier of response) {
|
for (const identifier of response) {
|
||||||
let accessPolicy = undefined;
|
let accessPolicy = undefined;
|
||||||
if (identifier.accessPolicy) {
|
if (identifier.accessPolicy) {
|
||||||
accessPolicy = {
|
accessPolicy = {
|
||||||
permissions: identifier.accessPolicy.permissions,
|
permissions: identifier.accessPolicy.permissions
|
||||||
};
|
};
|
||||||
if (identifier.accessPolicy.expiresOn) {
|
if (identifier.accessPolicy.expiresOn) {
|
||||||
accessPolicy.expiresOn = new Date(identifier.accessPolicy.expiresOn);
|
accessPolicy.expiresOn = new Date(identifier.accessPolicy.expiresOn);
|
||||||
@@ -32248,7 +31374,7 @@ class ContainerClient extends StorageClient {
|
|||||||
}
|
}
|
||||||
res.signedIdentifiers.push({
|
res.signedIdentifiers.push({
|
||||||
accessPolicy,
|
accessPolicy,
|
||||||
id: identifier.id,
|
id: identifier.id
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
@@ -32256,7 +31382,7 @@ class ContainerClient extends StorageClient {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -32295,9 +31421,9 @@ class ContainerClient extends StorageClient {
|
|||||||
permissions: identifier.accessPolicy.permissions,
|
permissions: identifier.accessPolicy.permissions,
|
||||||
startsOn: identifier.accessPolicy.startsOn
|
startsOn: identifier.accessPolicy.startsOn
|
||||||
? truncatedISO8061Date(identifier.accessPolicy.startsOn)
|
? truncatedISO8061Date(identifier.accessPolicy.startsOn)
|
||||||
: "",
|
: ""
|
||||||
},
|
},
|
||||||
id: identifier.id,
|
id: identifier.id
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
return await this.containerContext.setAccessPolicy(Object.assign({ abortSignal: options.abortSignal, access, containerAcl: acl, leaseAccessConditions: options.conditions, modifiedAccessConditions: options.conditions }, convertTracingToRequestOptionsBase(updatedOptions)));
|
return await this.containerContext.setAccessPolicy(Object.assign({ abortSignal: options.abortSignal, access, containerAcl: acl, leaseAccessConditions: options.conditions, modifiedAccessConditions: options.conditions }, convertTracingToRequestOptionsBase(updatedOptions)));
|
||||||
@@ -32305,7 +31431,7 @@ class ContainerClient extends StorageClient {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -32351,13 +31477,13 @@ class ContainerClient extends StorageClient {
|
|||||||
const response = await blockBlobClient.upload(body, contentLength, updatedOptions);
|
const response = await blockBlobClient.upload(body, contentLength, updatedOptions);
|
||||||
return {
|
return {
|
||||||
blockBlobClient,
|
blockBlobClient,
|
||||||
response,
|
response
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -32388,7 +31514,7 @@ class ContainerClient extends StorageClient {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -32410,12 +31536,8 @@ class ContainerClient extends StorageClient {
|
|||||||
const { span, updatedOptions } = createSpan("ContainerClient-listBlobFlatSegment", options);
|
const { span, updatedOptions } = createSpan("ContainerClient-listBlobFlatSegment", options);
|
||||||
try {
|
try {
|
||||||
const response = await this.containerContext.listBlobFlatSegment(Object.assign(Object.assign({ marker }, options), convertTracingToRequestOptionsBase(updatedOptions)));
|
const response = await this.containerContext.listBlobFlatSegment(Object.assign(Object.assign({ marker }, options), convertTracingToRequestOptionsBase(updatedOptions)));
|
||||||
response.segment.blobItems = [];
|
const wrappedResponse = Object.assign(Object.assign({}, response), { _response: response._response, segment: Object.assign(Object.assign({}, response.segment), { blobItems: response.segment.blobItems.map((blobItemInteral) => {
|
||||||
if (response.segment["Blob"] !== undefined) {
|
const blobItem = Object.assign(Object.assign({}, blobItemInteral), { tags: toTags(blobItemInteral.blobTags), objectReplicationSourceProperties: parseObjectReplicationRecord(blobItemInteral.objectReplicationMetadata) });
|
||||||
response.segment.blobItems = ProcessBlobItems(response.segment["Blob"]);
|
|
||||||
}
|
|
||||||
const wrappedResponse = Object.assign(Object.assign({}, response), { _response: Object.assign(Object.assign({}, response._response), { parsedBody: ConvertInternalResponseOfListBlobFlat(response._response.parsedBody) }), segment: Object.assign(Object.assign({}, response.segment), { blobItems: response.segment.blobItems.map((blobItemInteral) => {
|
|
||||||
const blobItem = Object.assign(Object.assign({}, blobItemInteral), { name: BlobNameToString(blobItemInteral.name), tags: toTags(blobItemInteral.blobTags), objectReplicationSourceProperties: parseObjectReplicationRecord(blobItemInteral.objectReplicationMetadata) });
|
|
||||||
return blobItem;
|
return blobItem;
|
||||||
}) }) });
|
}) }) });
|
||||||
return wrappedResponse;
|
return wrappedResponse;
|
||||||
@@ -32423,7 +31545,7 @@ class ContainerClient extends StorageClient {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -32443,33 +31565,19 @@ class ContainerClient extends StorageClient {
|
|||||||
* @param options - Options to Container List Blob Hierarchy Segment operation.
|
* @param options - Options to Container List Blob Hierarchy Segment operation.
|
||||||
*/
|
*/
|
||||||
async listBlobHierarchySegment(delimiter, marker, options = {}) {
|
async listBlobHierarchySegment(delimiter, marker, options = {}) {
|
||||||
var _a;
|
|
||||||
const { span, updatedOptions } = createSpan("ContainerClient-listBlobHierarchySegment", options);
|
const { span, updatedOptions } = createSpan("ContainerClient-listBlobHierarchySegment", options);
|
||||||
try {
|
try {
|
||||||
const response = await this.containerContext.listBlobHierarchySegment(delimiter, Object.assign(Object.assign({ marker }, options), convertTracingToRequestOptionsBase(updatedOptions)));
|
const response = await this.containerContext.listBlobHierarchySegment(delimiter, Object.assign(Object.assign({ marker }, options), convertTracingToRequestOptionsBase(updatedOptions)));
|
||||||
response.segment.blobItems = [];
|
const wrappedResponse = Object.assign(Object.assign({}, response), { _response: response._response, segment: Object.assign(Object.assign({}, response.segment), { blobItems: response.segment.blobItems.map((blobItemInteral) => {
|
||||||
if (response.segment["Blob"] !== undefined) {
|
const blobItem = Object.assign(Object.assign({}, blobItemInteral), { tags: toTags(blobItemInteral.blobTags), objectReplicationSourceProperties: parseObjectReplicationRecord(blobItemInteral.objectReplicationMetadata) });
|
||||||
response.segment.blobItems = ProcessBlobItems(response.segment["Blob"]);
|
|
||||||
}
|
|
||||||
response.segment.blobPrefixes = [];
|
|
||||||
if (response.segment["BlobPrefix"] !== undefined) {
|
|
||||||
response.segment.blobPrefixes = ProcessBlobPrefixes(response.segment["BlobPrefix"]);
|
|
||||||
}
|
|
||||||
const wrappedResponse = Object.assign(Object.assign({}, response), { _response: Object.assign(Object.assign({}, response._response), { parsedBody: ConvertInternalResponseOfListBlobHierarchy(response._response.parsedBody) }), segment: Object.assign(Object.assign({}, response.segment), { blobItems: response.segment.blobItems.map((blobItemInteral) => {
|
|
||||||
const blobItem = Object.assign(Object.assign({}, blobItemInteral), { name: BlobNameToString(blobItemInteral.name), tags: toTags(blobItemInteral.blobTags), objectReplicationSourceProperties: parseObjectReplicationRecord(blobItemInteral.objectReplicationMetadata) });
|
|
||||||
return blobItem;
|
return blobItem;
|
||||||
}), blobPrefixes: (_a = response.segment.blobPrefixes) === null || _a === void 0 ? void 0 : _a.map((blobPrefixInternal) => {
|
|
||||||
const blobPrefix = {
|
|
||||||
name: BlobNameToString(blobPrefixInternal.name),
|
|
||||||
};
|
|
||||||
return blobPrefix;
|
|
||||||
}) }) });
|
}) }) });
|
||||||
return wrappedResponse;
|
return wrappedResponse;
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -32651,7 +31759,7 @@ class ContainerClient extends StorageClient {
|
|||||||
*/
|
*/
|
||||||
byPage: (settings = {}) => {
|
byPage: (settings = {}) => {
|
||||||
return this.listSegments(settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, updatedOptions));
|
return this.listSegments(settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, updatedOptions));
|
||||||
},
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@@ -32725,7 +31833,7 @@ class ContainerClient extends StorageClient {
|
|||||||
* if (item.kind === "prefix") {
|
* if (item.kind === "prefix") {
|
||||||
* console.log(`\tBlobPrefix: ${item.name}`);
|
* console.log(`\tBlobPrefix: ${item.name}`);
|
||||||
* } else {
|
* } else {
|
||||||
* console.log(`\tBlobItem: name - ${item.name}`);
|
* console.log(`\tBlobItem: name - ${item.name}, last modified - ${item.properties.lastModified}`);
|
||||||
* }
|
* }
|
||||||
* }
|
* }
|
||||||
* ```
|
* ```
|
||||||
@@ -32740,7 +31848,7 @@ class ContainerClient extends StorageClient {
|
|||||||
* if (item.kind === "prefix") {
|
* if (item.kind === "prefix") {
|
||||||
* console.log(`\tBlobPrefix: ${item.name}`);
|
* console.log(`\tBlobPrefix: ${item.name}`);
|
||||||
* } else {
|
* } else {
|
||||||
* console.log(`\tBlobItem: name - ${item.name}`);
|
* console.log(`\tBlobItem: name - ${item.name}, last modified - ${item.properties.lastModified}`);
|
||||||
* }
|
* }
|
||||||
* entity = await iter.next();
|
* entity = await iter.next();
|
||||||
* }
|
* }
|
||||||
@@ -32758,7 +31866,7 @@ class ContainerClient extends StorageClient {
|
|||||||
* }
|
* }
|
||||||
* }
|
* }
|
||||||
* for (const blob of response.segment.blobItems) {
|
* for (const blob of response.segment.blobItems) {
|
||||||
* console.log(`\tBlobItem: name - ${blob.name}`);
|
* console.log(`\tBlobItem: name - ${blob.name}, last modified - ${blob.properties.lastModified}`);
|
||||||
* }
|
* }
|
||||||
* }
|
* }
|
||||||
* ```
|
* ```
|
||||||
@@ -32769,9 +31877,7 @@ class ContainerClient extends StorageClient {
|
|||||||
* console.log("Listing blobs by hierarchy by page, specifying a prefix and a max page size");
|
* console.log("Listing blobs by hierarchy by page, specifying a prefix and a max page size");
|
||||||
*
|
*
|
||||||
* let i = 1;
|
* let i = 1;
|
||||||
* for await (const response of containerClient
|
* for await (const response of containerClient.listBlobsByHierarchy("/", { prefix: "prefix2/sub1/"}).byPage({ maxPageSize: 2 })) {
|
||||||
* .listBlobsByHierarchy("/", { prefix: "prefix2/sub1/" })
|
|
||||||
* .byPage({ maxPageSize: 2 })) {
|
|
||||||
* console.log(`Page ${i++}`);
|
* console.log(`Page ${i++}`);
|
||||||
* const segment = response.segment;
|
* const segment = response.segment;
|
||||||
*
|
*
|
||||||
@@ -32782,7 +31888,7 @@ class ContainerClient extends StorageClient {
|
|||||||
* }
|
* }
|
||||||
*
|
*
|
||||||
* for (const blob of response.segment.blobItems) {
|
* for (const blob of response.segment.blobItems) {
|
||||||
* console.log(`\tBlobItem: name - ${blob.name}`);
|
* console.log(`\tBlobItem: name - ${blob.name}, last modified - ${blob.properties.lastModified}`);
|
||||||
* }
|
* }
|
||||||
* }
|
* }
|
||||||
* ```
|
* ```
|
||||||
@@ -32849,208 +31955,7 @@ class ContainerClient extends StorageClient {
|
|||||||
*/
|
*/
|
||||||
byPage: (settings = {}) => {
|
byPage: (settings = {}) => {
|
||||||
return this.listHierarchySegments(delimiter, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, updatedOptions));
|
return this.listHierarchySegments(delimiter, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, updatedOptions));
|
||||||
},
|
|
||||||
};
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* The Filter Blobs operation enables callers to list blobs in the container whose tags
|
|
||||||
* match a given search expression.
|
|
||||||
*
|
|
||||||
* @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression.
|
|
||||||
* The given expression must evaluate to true for a blob to be returned in the results.
|
|
||||||
* The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter;
|
|
||||||
* however, only a subset of the OData filter syntax is supported in the Blob service.
|
|
||||||
* @param marker - A string value that identifies the portion of
|
|
||||||
* the list of blobs to be returned with the next listing operation. The
|
|
||||||
* operation returns the continuationToken value within the response body if the
|
|
||||||
* listing operation did not return all blobs remaining to be listed
|
|
||||||
* with the current page. The continuationToken value can be used as the value for
|
|
||||||
* the marker parameter in a subsequent call to request the next page of list
|
|
||||||
* items. The marker value is opaque to the client.
|
|
||||||
* @param options - Options to find blobs by tags.
|
|
||||||
*/
|
|
||||||
async findBlobsByTagsSegment(tagFilterSqlExpression, marker, options = {}) {
|
|
||||||
const { span, updatedOptions } = createSpan("ContainerClient-findBlobsByTagsSegment", options);
|
|
||||||
try {
|
|
||||||
const response = await this.containerContext.filterBlobs(Object.assign({ abortSignal: options.abortSignal, where: tagFilterSqlExpression, marker, maxPageSize: options.maxPageSize }, convertTracingToRequestOptionsBase(updatedOptions)));
|
|
||||||
const wrappedResponse = Object.assign(Object.assign({}, response), { _response: response._response, blobs: response.blobs.map((blob) => {
|
|
||||||
var _a;
|
|
||||||
let tagValue = "";
|
|
||||||
if (((_a = blob.tags) === null || _a === void 0 ? void 0 : _a.blobTagSet.length) === 1) {
|
|
||||||
tagValue = blob.tags.blobTagSet[0].value;
|
|
||||||
}
|
|
||||||
return Object.assign(Object.assign({}, blob), { tags: toTags(blob.tags), tagValue });
|
|
||||||
}) });
|
|
||||||
return wrappedResponse;
|
|
||||||
}
|
|
||||||
catch (e) {
|
|
||||||
span.setStatus({
|
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
|
||||||
message: e.message,
|
|
||||||
});
|
|
||||||
throw e;
|
|
||||||
}
|
|
||||||
finally {
|
|
||||||
span.end();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Returns an AsyncIterableIterator for ContainerFindBlobsByTagsSegmentResponse.
|
|
||||||
*
|
|
||||||
* @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression.
|
|
||||||
* The given expression must evaluate to true for a blob to be returned in the results.
|
|
||||||
* The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter;
|
|
||||||
* however, only a subset of the OData filter syntax is supported in the Blob service.
|
|
||||||
* @param marker - A string value that identifies the portion of
|
|
||||||
* the list of blobs to be returned with the next listing operation. The
|
|
||||||
* operation returns the continuationToken value within the response body if the
|
|
||||||
* listing operation did not return all blobs remaining to be listed
|
|
||||||
* with the current page. The continuationToken value can be used as the value for
|
|
||||||
* the marker parameter in a subsequent call to request the next page of list
|
|
||||||
* items. The marker value is opaque to the client.
|
|
||||||
* @param options - Options to find blobs by tags.
|
|
||||||
*/
|
|
||||||
findBlobsByTagsSegments(tagFilterSqlExpression, marker, options = {}) {
|
|
||||||
return tslib.__asyncGenerator(this, arguments, function* findBlobsByTagsSegments_1() {
|
|
||||||
let response;
|
|
||||||
if (!!marker || marker === undefined) {
|
|
||||||
do {
|
|
||||||
response = yield tslib.__await(this.findBlobsByTagsSegment(tagFilterSqlExpression, marker, options));
|
|
||||||
response.blobs = response.blobs || [];
|
|
||||||
marker = response.continuationToken;
|
|
||||||
yield yield tslib.__await(response);
|
|
||||||
} while (marker);
|
|
||||||
}
|
}
|
||||||
});
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Returns an AsyncIterableIterator for blobs.
|
|
||||||
*
|
|
||||||
* @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression.
|
|
||||||
* The given expression must evaluate to true for a blob to be returned in the results.
|
|
||||||
* The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter;
|
|
||||||
* however, only a subset of the OData filter syntax is supported in the Blob service.
|
|
||||||
* @param options - Options to findBlobsByTagsItems.
|
|
||||||
*/
|
|
||||||
findBlobsByTagsItems(tagFilterSqlExpression, options = {}) {
|
|
||||||
return tslib.__asyncGenerator(this, arguments, function* findBlobsByTagsItems_1() {
|
|
||||||
var e_3, _a;
|
|
||||||
let marker;
|
|
||||||
try {
|
|
||||||
for (var _b = tslib.__asyncValues(this.findBlobsByTagsSegments(tagFilterSqlExpression, marker, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
|
|
||||||
const segment = _c.value;
|
|
||||||
yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(segment.blobs)));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
|
||||||
finally {
|
|
||||||
try {
|
|
||||||
if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
|
|
||||||
}
|
|
||||||
finally { if (e_3) throw e_3.error; }
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Returns an async iterable iterator to find all blobs with specified tag
|
|
||||||
* under the specified container.
|
|
||||||
*
|
|
||||||
* .byPage() returns an async iterable iterator to list the blobs in pages.
|
|
||||||
*
|
|
||||||
* Example using `for await` syntax:
|
|
||||||
*
|
|
||||||
* ```js
|
|
||||||
* let i = 1;
|
|
||||||
* for await (const blob of containerClient.findBlobsByTags("tagkey='tagvalue'")) {
|
|
||||||
* console.log(`Blob ${i++}: ${blob.name}`);
|
|
||||||
* }
|
|
||||||
* ```
|
|
||||||
*
|
|
||||||
* Example using `iter.next()`:
|
|
||||||
*
|
|
||||||
* ```js
|
|
||||||
* let i = 1;
|
|
||||||
* const iter = containerClient.findBlobsByTags("tagkey='tagvalue'");
|
|
||||||
* let blobItem = await iter.next();
|
|
||||||
* while (!blobItem.done) {
|
|
||||||
* console.log(`Blob ${i++}: ${blobItem.value.name}`);
|
|
||||||
* blobItem = await iter.next();
|
|
||||||
* }
|
|
||||||
* ```
|
|
||||||
*
|
|
||||||
* Example using `byPage()`:
|
|
||||||
*
|
|
||||||
* ```js
|
|
||||||
* // passing optional maxPageSize in the page settings
|
|
||||||
* let i = 1;
|
|
||||||
* for await (const response of containerClient.findBlobsByTags("tagkey='tagvalue'").byPage({ maxPageSize: 20 })) {
|
|
||||||
* if (response.blobs) {
|
|
||||||
* for (const blob of response.blobs) {
|
|
||||||
* console.log(`Blob ${i++}: ${blob.name}`);
|
|
||||||
* }
|
|
||||||
* }
|
|
||||||
* }
|
|
||||||
* ```
|
|
||||||
*
|
|
||||||
* Example using paging with a marker:
|
|
||||||
*
|
|
||||||
* ```js
|
|
||||||
* let i = 1;
|
|
||||||
* let iterator = containerClient.findBlobsByTags("tagkey='tagvalue'").byPage({ maxPageSize: 2 });
|
|
||||||
* let response = (await iterator.next()).value;
|
|
||||||
*
|
|
||||||
* // Prints 2 blob names
|
|
||||||
* if (response.blobs) {
|
|
||||||
* for (const blob of response.blobs) {
|
|
||||||
* console.log(`Blob ${i++}: ${blob.name}`);
|
|
||||||
* }
|
|
||||||
* }
|
|
||||||
*
|
|
||||||
* // Gets next marker
|
|
||||||
* let marker = response.continuationToken;
|
|
||||||
* // Passing next marker as continuationToken
|
|
||||||
* iterator = containerClient
|
|
||||||
* .findBlobsByTags("tagkey='tagvalue'")
|
|
||||||
* .byPage({ continuationToken: marker, maxPageSize: 10 });
|
|
||||||
* response = (await iterator.next()).value;
|
|
||||||
*
|
|
||||||
* // Prints blob names
|
|
||||||
* if (response.blobs) {
|
|
||||||
* for (const blob of response.blobs) {
|
|
||||||
* console.log(`Blob ${i++}: ${blob.name}`);
|
|
||||||
* }
|
|
||||||
* }
|
|
||||||
* ```
|
|
||||||
*
|
|
||||||
* @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression.
|
|
||||||
* The given expression must evaluate to true for a blob to be returned in the results.
|
|
||||||
* The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter;
|
|
||||||
* however, only a subset of the OData filter syntax is supported in the Blob service.
|
|
||||||
* @param options - Options to find blobs by tags.
|
|
||||||
*/
|
|
||||||
findBlobsByTags(tagFilterSqlExpression, options = {}) {
|
|
||||||
// AsyncIterableIterator to iterate over blobs
|
|
||||||
const listSegmentOptions = Object.assign({}, options);
|
|
||||||
const iter = this.findBlobsByTagsItems(tagFilterSqlExpression, listSegmentOptions);
|
|
||||||
return {
|
|
||||||
/**
|
|
||||||
* The next method, part of the iteration protocol
|
|
||||||
*/
|
|
||||||
next() {
|
|
||||||
return iter.next();
|
|
||||||
},
|
|
||||||
/**
|
|
||||||
* The connection to the async iterator, part of the iteration protocol
|
|
||||||
*/
|
|
||||||
[Symbol.asyncIterator]() {
|
|
||||||
return this;
|
|
||||||
},
|
|
||||||
/**
|
|
||||||
* Return an AsyncIterableIterator that works a page at a time
|
|
||||||
*/
|
|
||||||
byPage: (settings = {}) => {
|
|
||||||
return this.findBlobsByTagsSegments(tagFilterSqlExpression, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, listSegmentOptions));
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
getContainerNameFromUrl() {
|
getContainerNameFromUrl() {
|
||||||
@@ -33183,10 +32088,6 @@ class AccountSASPermissions {
|
|||||||
* Permission to set immutability policy.
|
* Permission to set immutability policy.
|
||||||
*/
|
*/
|
||||||
this.setImmutabilityPolicy = false;
|
this.setImmutabilityPolicy = false;
|
||||||
/**
|
|
||||||
* Specifies that Permanent Delete is permitted.
|
|
||||||
*/
|
|
||||||
this.permanentDelete = false;
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Parse initializes the AccountSASPermissions fields from a string.
|
* Parse initializes the AccountSASPermissions fields from a string.
|
||||||
@@ -33233,9 +32134,6 @@ class AccountSASPermissions {
|
|||||||
case "i":
|
case "i":
|
||||||
accountSASPermissions.setImmutabilityPolicy = true;
|
accountSASPermissions.setImmutabilityPolicy = true;
|
||||||
break;
|
break;
|
||||||
case "y":
|
|
||||||
accountSASPermissions.permanentDelete = true;
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
throw new RangeError(`Invalid permission character: ${c}`);
|
throw new RangeError(`Invalid permission character: ${c}`);
|
||||||
}
|
}
|
||||||
@@ -33286,9 +32184,6 @@ class AccountSASPermissions {
|
|||||||
if (permissionLike.setImmutabilityPolicy) {
|
if (permissionLike.setImmutabilityPolicy) {
|
||||||
accountSASPermissions.setImmutabilityPolicy = true;
|
accountSASPermissions.setImmutabilityPolicy = true;
|
||||||
}
|
}
|
||||||
if (permissionLike.permanentDelete) {
|
|
||||||
accountSASPermissions.permanentDelete = true;
|
|
||||||
}
|
|
||||||
return accountSASPermissions;
|
return accountSASPermissions;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@@ -33342,9 +32237,6 @@ class AccountSASPermissions {
|
|||||||
if (this.setImmutabilityPolicy) {
|
if (this.setImmutabilityPolicy) {
|
||||||
permissions.push("i");
|
permissions.push("i");
|
||||||
}
|
}
|
||||||
if (this.permanentDelete) {
|
|
||||||
permissions.push("y");
|
|
||||||
}
|
|
||||||
return permissions.join("");
|
return permissions.join("");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -33527,11 +32419,6 @@ function generateAccountSASQueryParameters(accountSASSignatureValues, sharedKeyC
|
|||||||
version < "2019-10-10") {
|
version < "2019-10-10") {
|
||||||
throw RangeError("'version' must be >= '2019-10-10' when provided 'x' permission.");
|
throw RangeError("'version' must be >= '2019-10-10' when provided 'x' permission.");
|
||||||
}
|
}
|
||||||
if (accountSASSignatureValues.permissions &&
|
|
||||||
accountSASSignatureValues.permissions.permanentDelete &&
|
|
||||||
version < "2019-10-10") {
|
|
||||||
throw RangeError("'version' must be >= '2019-10-10' when provided 'y' permission.");
|
|
||||||
}
|
|
||||||
if (accountSASSignatureValues.permissions &&
|
if (accountSASSignatureValues.permissions &&
|
||||||
accountSASSignatureValues.permissions.tag &&
|
accountSASSignatureValues.permissions.tag &&
|
||||||
version < "2019-12-12") {
|
version < "2019-12-12") {
|
||||||
@@ -33542,48 +32429,25 @@ function generateAccountSASQueryParameters(accountSASSignatureValues, sharedKeyC
|
|||||||
version < "2019-12-12") {
|
version < "2019-12-12") {
|
||||||
throw RangeError("'version' must be >= '2019-12-12' when provided 'f' permission.");
|
throw RangeError("'version' must be >= '2019-12-12' when provided 'f' permission.");
|
||||||
}
|
}
|
||||||
if (accountSASSignatureValues.encryptionScope && version < "2020-12-06") {
|
|
||||||
throw RangeError("'version' must be >= '2020-12-06' when provided 'encryptionScope' in SAS.");
|
|
||||||
}
|
|
||||||
const parsedPermissions = AccountSASPermissions.parse(accountSASSignatureValues.permissions.toString());
|
const parsedPermissions = AccountSASPermissions.parse(accountSASSignatureValues.permissions.toString());
|
||||||
const parsedServices = AccountSASServices.parse(accountSASSignatureValues.services).toString();
|
const parsedServices = AccountSASServices.parse(accountSASSignatureValues.services).toString();
|
||||||
const parsedResourceTypes = AccountSASResourceTypes.parse(accountSASSignatureValues.resourceTypes).toString();
|
const parsedResourceTypes = AccountSASResourceTypes.parse(accountSASSignatureValues.resourceTypes).toString();
|
||||||
let stringToSign;
|
const stringToSign = [
|
||||||
if (version >= "2020-12-06") {
|
sharedKeyCredential.accountName,
|
||||||
stringToSign = [
|
parsedPermissions,
|
||||||
sharedKeyCredential.accountName,
|
parsedServices,
|
||||||
parsedPermissions,
|
parsedResourceTypes,
|
||||||
parsedServices,
|
accountSASSignatureValues.startsOn
|
||||||
parsedResourceTypes,
|
? truncatedISO8061Date(accountSASSignatureValues.startsOn, false)
|
||||||
accountSASSignatureValues.startsOn
|
: "",
|
||||||
? truncatedISO8061Date(accountSASSignatureValues.startsOn, false)
|
truncatedISO8061Date(accountSASSignatureValues.expiresOn, false),
|
||||||
: "",
|
accountSASSignatureValues.ipRange ? ipRangeToString(accountSASSignatureValues.ipRange) : "",
|
||||||
truncatedISO8061Date(accountSASSignatureValues.expiresOn, false),
|
accountSASSignatureValues.protocol ? accountSASSignatureValues.protocol : "",
|
||||||
accountSASSignatureValues.ipRange ? ipRangeToString(accountSASSignatureValues.ipRange) : "",
|
version,
|
||||||
accountSASSignatureValues.protocol ? accountSASSignatureValues.protocol : "",
|
"" // Account SAS requires an additional newline character
|
||||||
version,
|
].join("\n");
|
||||||
accountSASSignatureValues.encryptionScope ? accountSASSignatureValues.encryptionScope : "",
|
|
||||||
"", // Account SAS requires an additional newline character
|
|
||||||
].join("\n");
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
stringToSign = [
|
|
||||||
sharedKeyCredential.accountName,
|
|
||||||
parsedPermissions,
|
|
||||||
parsedServices,
|
|
||||||
parsedResourceTypes,
|
|
||||||
accountSASSignatureValues.startsOn
|
|
||||||
? truncatedISO8061Date(accountSASSignatureValues.startsOn, false)
|
|
||||||
: "",
|
|
||||||
truncatedISO8061Date(accountSASSignatureValues.expiresOn, false),
|
|
||||||
accountSASSignatureValues.ipRange ? ipRangeToString(accountSASSignatureValues.ipRange) : "",
|
|
||||||
accountSASSignatureValues.protocol ? accountSASSignatureValues.protocol : "",
|
|
||||||
version,
|
|
||||||
"", // Account SAS requires an additional newline character
|
|
||||||
].join("\n");
|
|
||||||
}
|
|
||||||
const signature = sharedKeyCredential.computeHMACSHA256(stringToSign);
|
const signature = sharedKeyCredential.computeHMACSHA256(stringToSign);
|
||||||
return new SASQueryParameters(version, signature, parsedPermissions.toString(), parsedServices, parsedResourceTypes, accountSASSignatureValues.protocol, accountSASSignatureValues.startsOn, accountSASSignatureValues.expiresOn, accountSASSignatureValues.ipRange, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, accountSASSignatureValues.encryptionScope);
|
return new SASQueryParameters(version, signature, parsedPermissions.toString(), parsedServices, parsedResourceTypes, accountSASSignatureValues.protocol, accountSASSignatureValues.startsOn, accountSASSignatureValues.expiresOn, accountSASSignatureValues.ipRange);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -33630,17 +32494,12 @@ class BlobServiceClient extends StorageClient {
|
|||||||
options = options || {};
|
options = options || {};
|
||||||
const extractedCreds = extractConnectionStringParts(connectionString);
|
const extractedCreds = extractConnectionStringParts(connectionString);
|
||||||
if (extractedCreds.kind === "AccountConnString") {
|
if (extractedCreds.kind === "AccountConnString") {
|
||||||
if (coreHttp.isNode) {
|
{
|
||||||
const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey);
|
const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey);
|
||||||
if (!options.proxyOptions) {
|
options.proxyOptions = coreHttp.getDefaultProxySettings(extractedCreds.proxyUri);
|
||||||
options.proxyOptions = coreHttp.getDefaultProxySettings(extractedCreds.proxyUri);
|
|
||||||
}
|
|
||||||
const pipeline = newPipeline(sharedKeyCredential, options);
|
const pipeline = newPipeline(sharedKeyCredential, options);
|
||||||
return new BlobServiceClient(extractedCreds.url, pipeline);
|
return new BlobServiceClient(extractedCreds.url, pipeline);
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
throw new Error("Account connection string is only supported in Node.js environment");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if (extractedCreds.kind === "SASConnString") {
|
else if (extractedCreds.kind === "SASConnString") {
|
||||||
const pipeline = newPipeline(new AnonymousCredential(), options);
|
const pipeline = newPipeline(new AnonymousCredential(), options);
|
||||||
@@ -33679,13 +32538,13 @@ class BlobServiceClient extends StorageClient {
|
|||||||
const containerCreateResponse = await containerClient.create(updatedOptions);
|
const containerCreateResponse = await containerClient.create(updatedOptions);
|
||||||
return {
|
return {
|
||||||
containerClient,
|
containerClient,
|
||||||
containerCreateResponse,
|
containerCreateResponse
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -33709,7 +32568,7 @@ class BlobServiceClient extends StorageClient {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -33739,7 +32598,7 @@ class BlobServiceClient extends StorageClient {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -33769,7 +32628,7 @@ class BlobServiceClient extends StorageClient {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -33793,7 +32652,7 @@ class BlobServiceClient extends StorageClient {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -33818,7 +32677,7 @@ class BlobServiceClient extends StorageClient {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -33843,7 +32702,7 @@ class BlobServiceClient extends StorageClient {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -33869,7 +32728,7 @@ class BlobServiceClient extends StorageClient {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -33899,7 +32758,7 @@ class BlobServiceClient extends StorageClient {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -33942,7 +32801,7 @@ class BlobServiceClient extends StorageClient {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -34108,7 +32967,7 @@ class BlobServiceClient extends StorageClient {
|
|||||||
*/
|
*/
|
||||||
byPage: (settings = {}) => {
|
byPage: (settings = {}) => {
|
||||||
return this.findBlobsByTagsSegments(tagFilterSqlExpression, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, listSegmentOptions));
|
return this.findBlobsByTagsSegments(tagFilterSqlExpression, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, listSegmentOptions));
|
||||||
},
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@@ -34246,9 +33105,6 @@ class BlobServiceClient extends StorageClient {
|
|||||||
if (options.includeMetadata) {
|
if (options.includeMetadata) {
|
||||||
include.push("metadata");
|
include.push("metadata");
|
||||||
}
|
}
|
||||||
if (options.includeSystem) {
|
|
||||||
include.push("system");
|
|
||||||
}
|
|
||||||
// AsyncIterableIterator to iterate over containers
|
// AsyncIterableIterator to iterate over containers
|
||||||
const listSegmentOptions = Object.assign(Object.assign({}, options), (include.length > 0 ? { include } : {}));
|
const listSegmentOptions = Object.assign(Object.assign({}, options), (include.length > 0 ? { include } : {}));
|
||||||
const iter = this.listItems(listSegmentOptions);
|
const iter = this.listItems(listSegmentOptions);
|
||||||
@@ -34270,7 +33126,7 @@ class BlobServiceClient extends StorageClient {
|
|||||||
*/
|
*/
|
||||||
byPage: (settings = {}) => {
|
byPage: (settings = {}) => {
|
||||||
return this.listSegments(settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, listSegmentOptions));
|
return this.listSegments(settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, listSegmentOptions));
|
||||||
},
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@@ -34289,7 +33145,7 @@ class BlobServiceClient extends StorageClient {
|
|||||||
try {
|
try {
|
||||||
const response = await this.serviceContext.getUserDelegationKey({
|
const response = await this.serviceContext.getUserDelegationKey({
|
||||||
startsOn: truncatedISO8061Date(startsOn, false),
|
startsOn: truncatedISO8061Date(startsOn, false),
|
||||||
expiresOn: truncatedISO8061Date(expiresOn, false),
|
expiresOn: truncatedISO8061Date(expiresOn, false)
|
||||||
}, Object.assign({ abortSignal: options.abortSignal }, convertTracingToRequestOptionsBase(updatedOptions)));
|
}, Object.assign({ abortSignal: options.abortSignal }, convertTracingToRequestOptionsBase(updatedOptions)));
|
||||||
const userDelegationKey = {
|
const userDelegationKey = {
|
||||||
signedObjectId: response.signedObjectId,
|
signedObjectId: response.signedObjectId,
|
||||||
@@ -34298,7 +33154,7 @@ class BlobServiceClient extends StorageClient {
|
|||||||
signedExpiresOn: new Date(response.signedExpiresOn),
|
signedExpiresOn: new Date(response.signedExpiresOn),
|
||||||
signedService: response.signedService,
|
signedService: response.signedService,
|
||||||
signedVersion: response.signedVersion,
|
signedVersion: response.signedVersion,
|
||||||
value: response.value,
|
value: response.value
|
||||||
};
|
};
|
||||||
const res = Object.assign({ _response: response._response, requestId: response.requestId, clientRequestId: response.clientRequestId, version: response.version, date: response.date, errorCode: response.errorCode }, userDelegationKey);
|
const res = Object.assign({ _response: response._response, requestId: response.requestId, clientRequestId: response.clientRequestId, version: response.version, date: response.date, errorCode: response.errorCode }, userDelegationKey);
|
||||||
return res;
|
return res;
|
||||||
@@ -34306,7 +33162,7 @@ class BlobServiceClient extends StorageClient {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
span.setStatus({
|
span.setStatus({
|
||||||
code: coreTracing.SpanStatusCode.ERROR,
|
code: coreTracing.SpanStatusCode.ERROR,
|
||||||
message: e.message,
|
message: e.message
|
||||||
});
|
});
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@@ -34355,27 +33211,39 @@ class BlobServiceClient extends StorageClient {
|
|||||||
|
|
||||||
Object.defineProperty(exports, 'BaseRequestPolicy', {
|
Object.defineProperty(exports, 'BaseRequestPolicy', {
|
||||||
enumerable: true,
|
enumerable: true,
|
||||||
get: function () { return coreHttp.BaseRequestPolicy; }
|
get: function () {
|
||||||
|
return coreHttp.BaseRequestPolicy;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
Object.defineProperty(exports, 'HttpHeaders', {
|
Object.defineProperty(exports, 'HttpHeaders', {
|
||||||
enumerable: true,
|
enumerable: true,
|
||||||
get: function () { return coreHttp.HttpHeaders; }
|
get: function () {
|
||||||
|
return coreHttp.HttpHeaders;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
Object.defineProperty(exports, 'RequestPolicyOptions', {
|
Object.defineProperty(exports, 'RequestPolicyOptions', {
|
||||||
enumerable: true,
|
enumerable: true,
|
||||||
get: function () { return coreHttp.RequestPolicyOptions; }
|
get: function () {
|
||||||
|
return coreHttp.RequestPolicyOptions;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
Object.defineProperty(exports, 'RestError', {
|
Object.defineProperty(exports, 'RestError', {
|
||||||
enumerable: true,
|
enumerable: true,
|
||||||
get: function () { return coreHttp.RestError; }
|
get: function () {
|
||||||
|
return coreHttp.RestError;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
Object.defineProperty(exports, 'WebResource', {
|
Object.defineProperty(exports, 'WebResource', {
|
||||||
enumerable: true,
|
enumerable: true,
|
||||||
get: function () { return coreHttp.WebResource; }
|
get: function () {
|
||||||
|
return coreHttp.WebResource;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
Object.defineProperty(exports, 'deserializationPolicy', {
|
Object.defineProperty(exports, 'deserializationPolicy', {
|
||||||
enumerable: true,
|
enumerable: true,
|
||||||
get: function () { return coreHttp.deserializationPolicy; }
|
get: function () {
|
||||||
|
return coreHttp.deserializationPolicy;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
exports.AccountSASPermissions = AccountSASPermissions;
|
exports.AccountSASPermissions = AccountSASPermissions;
|
||||||
exports.AccountSASResourceTypes = AccountSASResourceTypes;
|
exports.AccountSASResourceTypes = AccountSASResourceTypes;
|
||||||
@@ -37120,9 +35988,9 @@ function extractTar(archivePath, compressionMethod) {
|
|||||||
function getCompressionProgram() {
|
function getCompressionProgram() {
|
||||||
switch (compressionMethod) {
|
switch (compressionMethod) {
|
||||||
case constants_1.CompressionMethod.Zstd:
|
case constants_1.CompressionMethod.Zstd:
|
||||||
return ['--use-compress-program', 'zstd -d --long=30'];
|
return ['--use-compress-program', 'zstd -d --fast=1 --long=30'];
|
||||||
case constants_1.CompressionMethod.ZstdWithoutLong:
|
case constants_1.CompressionMethod.ZstdWithoutLong:
|
||||||
return ['--use-compress-program', 'zstd -d'];
|
return ['--use-compress-program', 'zstd -d --fast=1'];
|
||||||
default:
|
default:
|
||||||
return ['-z'];
|
return ['-z'];
|
||||||
}
|
}
|
||||||
@@ -37153,9 +36021,9 @@ function createTar(archiveFolder, sourceDirectories, compressionMethod) {
|
|||||||
function getCompressionProgram() {
|
function getCompressionProgram() {
|
||||||
switch (compressionMethod) {
|
switch (compressionMethod) {
|
||||||
case constants_1.CompressionMethod.Zstd:
|
case constants_1.CompressionMethod.Zstd:
|
||||||
return ['--use-compress-program', 'zstd -T0 --long=30'];
|
return ['--use-compress-program', 'zstd -T0 --fast=1 --long=30'];
|
||||||
case constants_1.CompressionMethod.ZstdWithoutLong:
|
case constants_1.CompressionMethod.ZstdWithoutLong:
|
||||||
return ['--use-compress-program', 'zstd -T0'];
|
return ['--use-compress-program', 'zstd -T0 --fast=1'];
|
||||||
default:
|
default:
|
||||||
return ['-z'];
|
return ['-z'];
|
||||||
}
|
}
|
||||||
@@ -37184,9 +36052,9 @@ function listTar(archivePath, compressionMethod) {
|
|||||||
function getCompressionProgram() {
|
function getCompressionProgram() {
|
||||||
switch (compressionMethod) {
|
switch (compressionMethod) {
|
||||||
case constants_1.CompressionMethod.Zstd:
|
case constants_1.CompressionMethod.Zstd:
|
||||||
return ['--use-compress-program', 'zstd -d --long=30'];
|
return ['--use-compress-program', 'zstd -d --fast=1 --long=30'];
|
||||||
case constants_1.CompressionMethod.ZstdWithoutLong:
|
case constants_1.CompressionMethod.ZstdWithoutLong:
|
||||||
return ['--use-compress-program', 'zstd -d'];
|
return ['--use-compress-program', 'zstd -d --fast=1'];
|
||||||
default:
|
default:
|
||||||
return ['-z'];
|
return ['-z'];
|
||||||
}
|
}
|
||||||
@@ -37428,8 +36296,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|||||||
return result;
|
return result;
|
||||||
};
|
};
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
exports.isCacheFeatureAvailable = exports.getInputAsInt = exports.getInputAsArray = exports.isValidEvent = exports.logWarning = exports.getCacheState = exports.setOutputAndState = exports.setCacheHitOutput = exports.setCacheState = exports.isExactKeyMatch = exports.isGhes = void 0;
|
exports.getInputAsInt = exports.getInputAsArray = exports.isValidEvent = exports.logWarning = exports.getCacheState = exports.setOutputAndState = exports.setCacheHitOutput = exports.setCacheState = exports.isExactKeyMatch = exports.isGhes = void 0;
|
||||||
const cache = __importStar(__webpack_require__(692));
|
|
||||||
const core = __importStar(__webpack_require__(470));
|
const core = __importStar(__webpack_require__(470));
|
||||||
const constants_1 = __webpack_require__(196);
|
const constants_1 = __webpack_require__(196);
|
||||||
function isGhes() {
|
function isGhes() {
|
||||||
@@ -37494,19 +36361,6 @@ function getInputAsInt(name, options) {
|
|||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
exports.getInputAsInt = getInputAsInt;
|
exports.getInputAsInt = getInputAsInt;
|
||||||
function isCacheFeatureAvailable() {
|
|
||||||
if (!cache.isFeatureAvailable()) {
|
|
||||||
if (isGhes()) {
|
|
||||||
logWarning("Cache action is only supported on GHES version >= 3.5. If you are on version >=3.5 Please check with GHES admin if Actions cache service is enabled or not.");
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
logWarning("An internal error has occurred in cache backend. Please check https://www.githubstatus.com/ for any ongoing issue in actions.");
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
exports.isCacheFeatureAvailable = isCacheFeatureAvailable;
|
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
@@ -46320,7 +45174,8 @@ process.on("uncaughtException", e => utils.logWarning(e.message));
|
|||||||
function run() {
|
function run() {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
try {
|
try {
|
||||||
if (!utils.isCacheFeatureAvailable()) {
|
if (utils.isGhes()) {
|
||||||
|
utils.logWarning("Cache action is not supported on GHES. See https://github.com/actions/cache/issues/505 for more details");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!utils.isValidEvent()) {
|
if (!utils.isValidEvent()) {
|
||||||
@@ -46464,15 +45319,6 @@ function checkKey(key) {
|
|||||||
throw new ValidationError(`Key Validation Error: ${key} cannot contain commas.`);
|
throw new ValidationError(`Key Validation Error: ${key} cannot contain commas.`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* isFeatureAvailable to check the presence of Actions cache service
|
|
||||||
*
|
|
||||||
* @returns boolean return true if Actions cache service feature is available, otherwise false
|
|
||||||
*/
|
|
||||||
function isFeatureAvailable() {
|
|
||||||
return !!process.env['ACTIONS_CACHE_URL'];
|
|
||||||
}
|
|
||||||
exports.isFeatureAvailable = isFeatureAvailable;
|
|
||||||
/**
|
/**
|
||||||
* Restores cache from keys
|
* Restores cache from keys
|
||||||
*
|
*
|
||||||
@@ -46539,12 +45385,18 @@ exports.restoreCache = restoreCache;
|
|||||||
* @returns number returns cacheId if the cache was saved successfully and throws an error if save fails
|
* @returns number returns cacheId if the cache was saved successfully and throws an error if save fails
|
||||||
*/
|
*/
|
||||||
function saveCache(paths, key, options) {
|
function saveCache(paths, key, options) {
|
||||||
var _a, _b, _c, _d, _e;
|
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
checkPaths(paths);
|
checkPaths(paths);
|
||||||
checkKey(key);
|
checkKey(key);
|
||||||
const compressionMethod = yield utils.getCompressionMethod();
|
const compressionMethod = yield utils.getCompressionMethod();
|
||||||
let cacheId = null;
|
core.debug('Reserving Cache');
|
||||||
|
const cacheId = yield cacheHttpClient.reserveCache(key, paths, {
|
||||||
|
compressionMethod
|
||||||
|
});
|
||||||
|
if (cacheId === -1) {
|
||||||
|
throw new ReserveCacheError(`Unable to reserve cache with key ${key}, another job may be creating this cache.`);
|
||||||
|
}
|
||||||
|
core.debug(`Cache ID: ${cacheId}`);
|
||||||
const cachePaths = yield utils.resolvePaths(paths);
|
const cachePaths = yield utils.resolvePaths(paths);
|
||||||
core.debug('Cache Paths:');
|
core.debug('Cache Paths:');
|
||||||
core.debug(`${JSON.stringify(cachePaths)}`);
|
core.debug(`${JSON.stringify(cachePaths)}`);
|
||||||
@@ -46559,24 +45411,9 @@ function saveCache(paths, key, options) {
|
|||||||
const fileSizeLimit = 10 * 1024 * 1024 * 1024; // 10GB per repo limit
|
const fileSizeLimit = 10 * 1024 * 1024 * 1024; // 10GB per repo limit
|
||||||
const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath);
|
const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath);
|
||||||
core.debug(`File Size: ${archiveFileSize}`);
|
core.debug(`File Size: ${archiveFileSize}`);
|
||||||
// For GHES, this check will take place in ReserveCache API with enterprise file size limit
|
if (archiveFileSize > fileSizeLimit) {
|
||||||
if (archiveFileSize > fileSizeLimit && !utils.isGhes()) {
|
|
||||||
throw new Error(`Cache size of ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B) is over the 10GB limit, not saving cache.`);
|
throw new Error(`Cache size of ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B) is over the 10GB limit, not saving cache.`);
|
||||||
}
|
}
|
||||||
core.debug('Reserving Cache');
|
|
||||||
const reserveCacheResponse = yield cacheHttpClient.reserveCache(key, paths, {
|
|
||||||
compressionMethod,
|
|
||||||
cacheSize: archiveFileSize
|
|
||||||
});
|
|
||||||
if ((_a = reserveCacheResponse === null || reserveCacheResponse === void 0 ? void 0 : reserveCacheResponse.result) === null || _a === void 0 ? void 0 : _a.cacheId) {
|
|
||||||
cacheId = (_b = reserveCacheResponse === null || reserveCacheResponse === void 0 ? void 0 : reserveCacheResponse.result) === null || _b === void 0 ? void 0 : _b.cacheId;
|
|
||||||
}
|
|
||||||
else if ((reserveCacheResponse === null || reserveCacheResponse === void 0 ? void 0 : reserveCacheResponse.statusCode) === 400) {
|
|
||||||
throw new Error((_d = (_c = reserveCacheResponse === null || reserveCacheResponse === void 0 ? void 0 : reserveCacheResponse.error) === null || _c === void 0 ? void 0 : _c.message) !== null && _d !== void 0 ? _d : `Cache size of ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B) is over the data cap limit, not saving cache.`);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
throw new ReserveCacheError(`Unable to reserve cache with key ${key}, another job may be creating this cache. More details: ${(_e = reserveCacheResponse === null || reserveCacheResponse === void 0 ? void 0 : reserveCacheResponse.error) === null || _e === void 0 ? void 0 : _e.message}`);
|
|
||||||
}
|
|
||||||
core.debug(`Saving Cache (ID: ${cacheId})`);
|
core.debug(`Saving Cache (ID: ${cacheId})`);
|
||||||
yield cacheHttpClient.saveCache(cacheId, archivePath, options);
|
yield cacheHttpClient.saveCache(cacheId, archivePath, options);
|
||||||
}
|
}
|
||||||
@@ -50744,6 +49581,7 @@ class Poller {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
* @internal
|
||||||
* Starts a loop that will break only if the poller is done
|
* Starts a loop that will break only if the poller is done
|
||||||
* or if the poller is stopped.
|
* or if the poller is stopped.
|
||||||
*/
|
*/
|
||||||
@@ -50757,6 +49595,7 @@ class Poller {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
* @internal
|
||||||
* pollOnce does one polling, by calling to the update method of the underlying
|
* pollOnce does one polling, by calling to the update method of the underlying
|
||||||
* poll operation to make any relevant change effective.
|
* poll operation to make any relevant change effective.
|
||||||
*
|
*
|
||||||
@@ -50790,6 +49629,7 @@ class Poller {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
* @internal
|
||||||
* fireProgress calls the functions passed in via onProgress the method of the poller.
|
* fireProgress calls the functions passed in via onProgress the method of the poller.
|
||||||
*
|
*
|
||||||
* It loops over all of the callbacks received from onProgress, and executes them, sending them
|
* It loops over all of the callbacks received from onProgress, and executes them, sending them
|
||||||
@@ -50803,6 +49643,7 @@ class Poller {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
* @internal
|
||||||
* Invokes the underlying operation's cancel method, and rejects the
|
* Invokes the underlying operation's cancel method, and rejects the
|
||||||
* pollUntilDone promise.
|
* pollUntilDone promise.
|
||||||
*/
|
*/
|
||||||
@@ -50976,7 +49817,7 @@ class Poller {
|
|||||||
*/
|
*/
|
||||||
function getPollingUrl(rawResponse, defaultPath) {
|
function getPollingUrl(rawResponse, defaultPath) {
|
||||||
var _a, _b, _c;
|
var _a, _b, _c;
|
||||||
return ((_c = (_b = (_a = getAzureAsyncOperation(rawResponse)) !== null && _a !== void 0 ? _a : getOperationLocation(rawResponse)) !== null && _b !== void 0 ? _b : getLocation(rawResponse)) !== null && _c !== void 0 ? _c : defaultPath);
|
return ((_c = (_b = (_a = getAzureAsyncOperation(rawResponse)) !== null && _a !== void 0 ? _a : getLocation(rawResponse)) !== null && _b !== void 0 ? _b : getOperationLocation(rawResponse)) !== null && _c !== void 0 ? _c : defaultPath);
|
||||||
}
|
}
|
||||||
function getLocation(rawResponse) {
|
function getLocation(rawResponse) {
|
||||||
return rawResponse.headers["location"];
|
return rawResponse.headers["location"];
|
||||||
@@ -50987,29 +49828,19 @@ function getOperationLocation(rawResponse) {
|
|||||||
function getAzureAsyncOperation(rawResponse) {
|
function getAzureAsyncOperation(rawResponse) {
|
||||||
return rawResponse.headers["azure-asyncoperation"];
|
return rawResponse.headers["azure-asyncoperation"];
|
||||||
}
|
}
|
||||||
function findResourceLocation(requestMethod, rawResponse, requestPath) {
|
|
||||||
switch (requestMethod) {
|
|
||||||
case "PUT": {
|
|
||||||
return requestPath;
|
|
||||||
}
|
|
||||||
case "POST":
|
|
||||||
case "PATCH": {
|
|
||||||
return getLocation(rawResponse);
|
|
||||||
}
|
|
||||||
default: {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
function inferLroMode(requestPath, requestMethod, rawResponse) {
|
function inferLroMode(requestPath, requestMethod, rawResponse) {
|
||||||
if (getAzureAsyncOperation(rawResponse) !== undefined ||
|
if (getAzureAsyncOperation(rawResponse) !== undefined) {
|
||||||
getOperationLocation(rawResponse) !== undefined) {
|
|
||||||
return {
|
return {
|
||||||
mode: "Location",
|
mode: "AzureAsync",
|
||||||
resourceLocation: findResourceLocation(requestMethod, rawResponse, requestPath),
|
resourceLocation: requestMethod === "PUT"
|
||||||
|
? requestPath
|
||||||
|
: requestMethod === "POST" || requestMethod === "PATCH"
|
||||||
|
? getLocation(rawResponse)
|
||||||
|
: undefined,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
else if (getLocation(rawResponse) !== undefined) {
|
else if (getLocation(rawResponse) !== undefined ||
|
||||||
|
getOperationLocation(rawResponse) !== undefined) {
|
||||||
return {
|
return {
|
||||||
mode: "Location",
|
mode: "Location",
|
||||||
};
|
};
|
||||||
@@ -51079,13 +49910,13 @@ function processBodyPollingOperationResult(response) {
|
|||||||
const logger = logger$1.createClientLogger("core-lro");
|
const logger = logger$1.createClientLogger("core-lro");
|
||||||
|
|
||||||
// Copyright (c) Microsoft Corporation.
|
// Copyright (c) Microsoft Corporation.
|
||||||
function isPollingDone(rawResponse) {
|
function getResponseStatus(rawResponse) {
|
||||||
var _a;
|
var _a;
|
||||||
if (isUnexpectedPollingResponse(rawResponse) || rawResponse.statusCode === 202) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
const { status } = (_a = rawResponse.body) !== null && _a !== void 0 ? _a : {};
|
const { status } = (_a = rawResponse.body) !== null && _a !== void 0 ? _a : {};
|
||||||
const state = typeof status === "string" ? status.toLowerCase() : "succeeded";
|
return typeof status === "string" ? status.toLowerCase() : "succeeded";
|
||||||
|
}
|
||||||
|
function isAzureAsyncPollingDone(rawResponse) {
|
||||||
|
const state = getResponseStatus(rawResponse);
|
||||||
if (isUnexpectedPollingResponse(rawResponse) || failureStates.includes(state)) {
|
if (isUnexpectedPollingResponse(rawResponse) || failureStates.includes(state)) {
|
||||||
throw new Error(`The long running operation has failed. The provisioning state: ${state}.`);
|
throw new Error(`The long running operation has failed. The provisioning state: ${state}.`);
|
||||||
}
|
}
|
||||||
@@ -51105,9 +49936,9 @@ async function sendFinalRequest(lro, resourceLocation, lroResourceLocationConfig
|
|||||||
return lro.sendPollRequest(resourceLocation !== null && resourceLocation !== void 0 ? resourceLocation : lro.requestPath);
|
return lro.sendPollRequest(resourceLocation !== null && resourceLocation !== void 0 ? resourceLocation : lro.requestPath);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function processLocationPollingOperationResult(lro, resourceLocation, lroResourceLocationConfig) {
|
function processAzureAsyncOperationResult(lro, resourceLocation, lroResourceLocationConfig) {
|
||||||
return (response) => {
|
return (response) => {
|
||||||
if (isPollingDone(response.rawResponse)) {
|
if (isAzureAsyncPollingDone(response.rawResponse)) {
|
||||||
if (resourceLocation === undefined) {
|
if (resourceLocation === undefined) {
|
||||||
return Object.assign(Object.assign({}, response), { done: true });
|
return Object.assign(Object.assign({}, response), { done: true });
|
||||||
}
|
}
|
||||||
@@ -51122,6 +49953,14 @@ function processLocationPollingOperationResult(lro, resourceLocation, lroResourc
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Copyright (c) Microsoft Corporation.
|
||||||
|
function isLocationPollingDone(rawResponse) {
|
||||||
|
return !isUnexpectedPollingResponse(rawResponse) && rawResponse.statusCode !== 202;
|
||||||
|
}
|
||||||
|
function processLocationPollingOperationResult(response) {
|
||||||
|
return Object.assign(Object.assign({}, response), { done: isLocationPollingDone(response.rawResponse) });
|
||||||
|
}
|
||||||
|
|
||||||
// Copyright (c) Microsoft Corporation.
|
// Copyright (c) Microsoft Corporation.
|
||||||
// Licensed under the MIT license.
|
// Licensed under the MIT license.
|
||||||
function processPassthroughOperationResult(response) {
|
function processPassthroughOperationResult(response) {
|
||||||
@@ -51134,8 +49973,11 @@ function processPassthroughOperationResult(response) {
|
|||||||
*/
|
*/
|
||||||
function createGetLroStatusFromResponse(lroPrimitives, config, lroResourceLocationConfig) {
|
function createGetLroStatusFromResponse(lroPrimitives, config, lroResourceLocationConfig) {
|
||||||
switch (config.mode) {
|
switch (config.mode) {
|
||||||
|
case "AzureAsync": {
|
||||||
|
return processAzureAsyncOperationResult(lroPrimitives, config.resourceLocation, lroResourceLocationConfig);
|
||||||
|
}
|
||||||
case "Location": {
|
case "Location": {
|
||||||
return processLocationPollingOperationResult(lroPrimitives, config.resourceLocation, lroResourceLocationConfig);
|
return processLocationPollingOperationResult;
|
||||||
}
|
}
|
||||||
case "Body": {
|
case "Body": {
|
||||||
return processBodyPollingOperationResult;
|
return processBodyPollingOperationResult;
|
||||||
@@ -51585,8 +50427,7 @@ function retryTypedResponse(name, method, maxAttempts = constants_1.DefaultRetry
|
|||||||
return {
|
return {
|
||||||
statusCode: error.statusCode,
|
statusCode: error.statusCode,
|
||||||
result: null,
|
result: null,
|
||||||
headers: {},
|
headers: {}
|
||||||
error
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
+44
-101
@@ -4,22 +4,17 @@
|
|||||||
- [D - DUB](#d---dub)
|
- [D - DUB](#d---dub)
|
||||||
- [POSIX](#posix)
|
- [POSIX](#posix)
|
||||||
- [Windows](#windows)
|
- [Windows](#windows)
|
||||||
- [Deno](#deno)
|
- [Elixir - Mix](#elixir---mix)
|
||||||
|
- [Go - Modules](#go---modules)
|
||||||
- [Linux](#linux)
|
- [Linux](#linux)
|
||||||
- [macOS](#macos)
|
- [macOS](#macos)
|
||||||
- [Windows](#windows-1)
|
- [Windows](#windows-1)
|
||||||
- [Elixir - Mix](#elixir---mix)
|
|
||||||
- [Go - Modules](#go---modules)
|
|
||||||
- [Linux](#linux-1)
|
|
||||||
- [macOS](#macos-1)
|
|
||||||
- [Windows](#windows-2)
|
|
||||||
- [Haskell - Cabal](#haskell---cabal)
|
- [Haskell - Cabal](#haskell---cabal)
|
||||||
- [Haskell - Stack](#haskell---stack)
|
|
||||||
- [Java - Gradle](#java---gradle)
|
- [Java - Gradle](#java---gradle)
|
||||||
- [Java - Maven](#java---maven)
|
- [Java - Maven](#java---maven)
|
||||||
- [Node - npm](#node---npm)
|
- [Node - npm](#node---npm)
|
||||||
- [macOS and Ubuntu](#macos-and-ubuntu)
|
- [macOS and Ubuntu](#macos-and-ubuntu)
|
||||||
- [Windows](#windows-3)
|
- [Windows](#windows-2)
|
||||||
- [Using multiple systems and `npm config`](#using-multiple-systems-and-npm-config)
|
- [Using multiple systems and `npm config`](#using-multiple-systems-and-npm-config)
|
||||||
- [Node - Lerna](#node---lerna)
|
- [Node - Lerna](#node---lerna)
|
||||||
- [Node - Yarn](#node---yarn)
|
- [Node - Yarn](#node---yarn)
|
||||||
@@ -33,6 +28,8 @@
|
|||||||
- [Using pip to get cache location](#using-pip-to-get-cache-location)
|
- [Using pip to get cache location](#using-pip-to-get-cache-location)
|
||||||
- [Python - pipenv](#python---pipenv)
|
- [Python - pipenv](#python---pipenv)
|
||||||
- [R - renv](#r---renv)
|
- [R - renv](#r---renv)
|
||||||
|
- [Simple example](#simple-example-1)
|
||||||
|
- [Multiple OS's in a workflow](#multiple-oss-in-a-workflow-1)
|
||||||
- [Ruby - Bundler](#ruby---bundler)
|
- [Ruby - Bundler](#ruby---bundler)
|
||||||
- [Rust - Cargo](#rust---cargo)
|
- [Rust - Cargo](#rust---cargo)
|
||||||
- [Scala - SBT](#scala---sbt)
|
- [Scala - SBT](#scala---sbt)
|
||||||
@@ -45,7 +42,7 @@
|
|||||||
Using [NuGet lock files](https://docs.microsoft.com/nuget/consume-packages/package-references-in-project-files#locking-dependencies):
|
Using [NuGet lock files](https://docs.microsoft.com/nuget/consume-packages/package-references-in-project-files#locking-dependencies):
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- uses: actions/cache@v3
|
- uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: ~/.nuget/packages
|
path: ~/.nuget/packages
|
||||||
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
|
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
|
||||||
@@ -54,10 +51,10 @@ Using [NuGet lock files](https://docs.microsoft.com/nuget/consume-packages/packa
|
|||||||
```
|
```
|
||||||
|
|
||||||
Depending on the environment, huge packages might be pre-installed in the global cache folder.
|
Depending on the environment, huge packages might be pre-installed in the global cache folder.
|
||||||
With `actions/cache@v3` you can now exclude unwanted packages with [exclude pattern](https://github.com/actions/toolkit/tree/main/packages/glob#exclude-patterns)
|
With `actions/cache@v2` you can now exclude unwanted packages with [exclude pattern](https://github.com/actions/toolkit/tree/main/packages/glob#exclude-patterns)
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- uses: actions/cache@v3
|
- uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
~/.nuget/packages
|
~/.nuget/packages
|
||||||
@@ -69,12 +66,11 @@ With `actions/cache@v3` you can now exclude unwanted packages with [exclude patt
|
|||||||
|
|
||||||
Or you could move the cache folder like below.
|
Or you could move the cache folder like below.
|
||||||
>Note: This workflow does not work for projects that require files to be placed in user profile package folder
|
>Note: This workflow does not work for projects that require files to be placed in user profile package folder
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
env:
|
env:
|
||||||
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages
|
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/cache@v3
|
- uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: ${{ github.workspace }}/.nuget/packages
|
path: ${{ github.workspace }}/.nuget/packages
|
||||||
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
|
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
|
||||||
@@ -87,7 +83,7 @@ steps:
|
|||||||
### POSIX
|
### POSIX
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- uses: actions/cache@v3
|
- uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: ~/.dub
|
path: ~/.dub
|
||||||
key: ${{ runner.os }}-dub-${{ hashFiles('**/dub.json') }}
|
key: ${{ runner.os }}-dub-${{ hashFiles('**/dub.json') }}
|
||||||
@@ -98,7 +94,7 @@ steps:
|
|||||||
### Windows
|
### Windows
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- uses: actions/cache@v3
|
- uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: ~\AppData\Local\dub
|
path: ~\AppData\Local\dub
|
||||||
key: ${{ runner.os }}-dub-${{ hashFiles('**/dub.json') }}
|
key: ${{ runner.os }}-dub-${{ hashFiles('**/dub.json') }}
|
||||||
@@ -106,46 +102,10 @@ steps:
|
|||||||
${{ runner.os }}-dub-
|
${{ runner.os }}-dub-
|
||||||
```
|
```
|
||||||
|
|
||||||
## Deno
|
|
||||||
|
|
||||||
### Linux
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
- uses: actions/cache@v3
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/.deno
|
|
||||||
~/.cache/deno
|
|
||||||
key: ${{ runner.os }}-deno-${{ hashFiles('**/deps.ts') }}
|
|
||||||
```
|
|
||||||
|
|
||||||
### macOS
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
- uses: actions/cache@v3
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/.deno
|
|
||||||
~/Library/Caches/deno
|
|
||||||
key: ${{ runner.os }}-deno-${{ hashFiles('**/deps.ts') }}
|
|
||||||
```
|
|
||||||
|
|
||||||
### Windows
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
- uses: actions/cache@v3
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~\.deno
|
|
||||||
%LocalAppData%\deno
|
|
||||||
key: ${{ runner.os }}-deno-${{ hashFiles('**/deps.ts') }}
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
## Elixir - Mix
|
## Elixir - Mix
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- uses: actions/cache@v3
|
- uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
deps
|
deps
|
||||||
@@ -160,7 +120,7 @@ steps:
|
|||||||
### Linux
|
### Linux
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- uses: actions/cache@v3
|
- uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
~/.cache/go-build
|
~/.cache/go-build
|
||||||
@@ -173,7 +133,7 @@ steps:
|
|||||||
### macOS
|
### macOS
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- uses: actions/cache@v3
|
- uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
~/Library/Caches/go-build
|
~/Library/Caches/go-build
|
||||||
@@ -186,11 +146,11 @@ steps:
|
|||||||
### Windows
|
### Windows
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- uses: actions/cache@v3
|
- uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
~\AppData\Local\go-build
|
%LocalAppData%\go-build
|
||||||
~\go\pkg\mod
|
~/go/pkg/mod
|
||||||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-go-
|
${{ runner.os }}-go-
|
||||||
@@ -202,7 +162,7 @@ We cache the elements of the Cabal store separately, as the entirety of `~/.caba
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- name: Cache ~/.cabal/packages, ~/.cabal/store and dist-newstyle
|
- name: Cache ~/.cabal/packages, ~/.cabal/store and dist-newstyle
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
~/.cabal/packages
|
~/.cabal/packages
|
||||||
@@ -212,31 +172,12 @@ We cache the elements of the Cabal store separately, as the entirety of `~/.caba
|
|||||||
restore-keys: ${{ runner.os }}-${{ matrix.ghc }}-
|
restore-keys: ${{ runner.os }}-${{ matrix.ghc }}-
|
||||||
```
|
```
|
||||||
|
|
||||||
## Haskell - Stack
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
- uses: actions/cache@v3
|
|
||||||
name: Cache ~/.stack
|
|
||||||
with:
|
|
||||||
path: ~/.stack
|
|
||||||
key: ${{ runner.os }}-stack-global-${{ hashFiles('stack.yaml') }}-${{ hashFiles('package.yaml') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-stack-global-
|
|
||||||
- uses: actions/cache@v3
|
|
||||||
name: Cache .stack-work
|
|
||||||
with:
|
|
||||||
path: .stack-work
|
|
||||||
key: ${{ runner.os }}-stack-work-${{ hashFiles('stack.yaml') }}-${{ hashFiles('package.yaml') }}-${{ hashFiles('**/*.hs') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-stack-work-
|
|
||||||
```
|
|
||||||
|
|
||||||
## Java - Gradle
|
## Java - Gradle
|
||||||
|
|
||||||
>Note: Ensure no Gradle daemons are running anymore when your workflow completes. Creating the cache package might fail due to locks being held by Gradle. Refer to the [Gradle Daemon documentation](https://docs.gradle.org/current/userguide/gradle_daemon.html) on how to disable or stop the Gradle Daemons.
|
>Note: Ensure no Gradle daemons are running anymore when your workflow completes. Creating the cache package might fail due to locks being held by Gradle. Refer to the [Gradle Daemon documentation](https://docs.gradle.org/current/userguide/gradle_daemon.html) on how to disable or stop the Gradle Daemons.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- uses: actions/cache@v3
|
- uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
~/.gradle/caches
|
~/.gradle/caches
|
||||||
@@ -250,7 +191,7 @@ We cache the elements of the Cabal store separately, as the entirety of `~/.caba
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- name: Cache local Maven repository
|
- name: Cache local Maven repository
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: ~/.m2/repository
|
path: ~/.m2/repository
|
||||||
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
|
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
|
||||||
@@ -269,7 +210,7 @@ If using `npm config` to retrieve the cache directory, ensure you run [actions/s
|
|||||||
### macOS and Ubuntu
|
### macOS and Ubuntu
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- uses: actions/cache@v3
|
- uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: ~/.npm
|
path: ~/.npm
|
||||||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
||||||
@@ -284,7 +225,7 @@ If using `npm config` to retrieve the cache directory, ensure you run [actions/s
|
|||||||
id: npm-cache
|
id: npm-cache
|
||||||
run: |
|
run: |
|
||||||
echo "::set-output name=dir::$(npm config get cache)"
|
echo "::set-output name=dir::$(npm config get cache)"
|
||||||
- uses: actions/cache@v3
|
- uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: ${{ steps.npm-cache.outputs.dir }}
|
path: ${{ steps.npm-cache.outputs.dir }}
|
||||||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
||||||
@@ -299,7 +240,7 @@ If using `npm config` to retrieve the cache directory, ensure you run [actions/s
|
|||||||
id: npm-cache-dir
|
id: npm-cache-dir
|
||||||
run: |
|
run: |
|
||||||
echo "::set-output name=dir::$(npm config get cache)"
|
echo "::set-output name=dir::$(npm config get cache)"
|
||||||
- uses: actions/cache@v3
|
- uses: actions/cache@v2
|
||||||
id: npm-cache # use this to check for `cache-hit` ==> if: steps.npm-cache.outputs.cache-hit != 'true'
|
id: npm-cache # use this to check for `cache-hit` ==> if: steps.npm-cache.outputs.cache-hit != 'true'
|
||||||
with:
|
with:
|
||||||
path: ${{ steps.npm-cache-dir.outputs.dir }}
|
path: ${{ steps.npm-cache-dir.outputs.dir }}
|
||||||
@@ -312,9 +253,11 @@ If using `npm config` to retrieve the cache directory, ensure you run [actions/s
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- name: restore lerna
|
- name: restore lerna
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: **/node_modules
|
path: |
|
||||||
|
node_modules
|
||||||
|
*/*/node_modules
|
||||||
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
|
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -326,7 +269,7 @@ The yarn cache directory will depend on your operating system and version of `ya
|
|||||||
id: yarn-cache-dir-path
|
id: yarn-cache-dir-path
|
||||||
run: echo "::set-output name=dir::$(yarn cache dir)"
|
run: echo "::set-output name=dir::$(yarn cache dir)"
|
||||||
|
|
||||||
- uses: actions/cache@v3
|
- uses: actions/cache@v2
|
||||||
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
|
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
|
||||||
with:
|
with:
|
||||||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
||||||
@@ -344,7 +287,7 @@ The yarn 2 cache directory will depend on your config. See https://yarnpkg.com/c
|
|||||||
id: yarn-cache-dir-path
|
id: yarn-cache-dir-path
|
||||||
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
|
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
|
||||||
|
|
||||||
- uses: actions/cache@v3
|
- uses: actions/cache@v2
|
||||||
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
|
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
|
||||||
with:
|
with:
|
||||||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
||||||
@@ -359,7 +302,7 @@ Esy allows you to export built dependencies and import pre-built dependencies.
|
|||||||
```yaml
|
```yaml
|
||||||
- name: Restore Cache
|
- name: Restore Cache
|
||||||
id: restore-cache
|
id: restore-cache
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: _export
|
path: _export
|
||||||
key: ${{ runner.os }}-esy-${{ hashFiles('esy.lock/index.json') }}
|
key: ${{ runner.os }}-esy-${{ hashFiles('esy.lock/index.json') }}
|
||||||
@@ -388,7 +331,7 @@ Esy allows you to export built dependencies and import pre-built dependencies.
|
|||||||
id: composer-cache
|
id: composer-cache
|
||||||
run: |
|
run: |
|
||||||
echo "::set-output name=dir::$(composer config cache-files-dir)"
|
echo "::set-output name=dir::$(composer config cache-files-dir)"
|
||||||
- uses: actions/cache@v3
|
- uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: ${{ steps.composer-cache.outputs.dir }}
|
path: ${{ steps.composer-cache.outputs.dir }}
|
||||||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
||||||
@@ -409,7 +352,7 @@ Locations:
|
|||||||
### Simple example
|
### Simple example
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- uses: actions/cache@v3
|
- uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: ~/.cache/pip
|
path: ~/.cache/pip
|
||||||
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
|
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
|
||||||
@@ -422,7 +365,7 @@ Replace `~/.cache/pip` with the correct `path` if not using Ubuntu.
|
|||||||
### Multiple OS's in a workflow
|
### Multiple OS's in a workflow
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- uses: actions/cache@v3
|
- uses: actions/cache@v2
|
||||||
if: startsWith(runner.os, 'Linux')
|
if: startsWith(runner.os, 'Linux')
|
||||||
with:
|
with:
|
||||||
path: ~/.cache/pip
|
path: ~/.cache/pip
|
||||||
@@ -430,7 +373,7 @@ Replace `~/.cache/pip` with the correct `path` if not using Ubuntu.
|
|||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-pip-
|
${{ runner.os }}-pip-
|
||||||
|
|
||||||
- uses: actions/cache@v3
|
- uses: actions/cache@v2
|
||||||
if: startsWith(runner.os, 'macOS')
|
if: startsWith(runner.os, 'macOS')
|
||||||
with:
|
with:
|
||||||
path: ~/Library/Caches/pip
|
path: ~/Library/Caches/pip
|
||||||
@@ -438,7 +381,7 @@ Replace `~/.cache/pip` with the correct `path` if not using Ubuntu.
|
|||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-pip-
|
${{ runner.os }}-pip-
|
||||||
|
|
||||||
- uses: actions/cache@v3
|
- uses: actions/cache@v2
|
||||||
if: startsWith(runner.os, 'Windows')
|
if: startsWith(runner.os, 'Windows')
|
||||||
with:
|
with:
|
||||||
path: ~\AppData\Local\pip\Cache
|
path: ~\AppData\Local\pip\Cache
|
||||||
@@ -464,7 +407,7 @@ jobs:
|
|||||||
- os: windows-latest
|
- os: windows-latest
|
||||||
path: ~\AppData\Local\pip\Cache
|
path: ~\AppData\Local\pip\Cache
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/cache@v3
|
- uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: ${{ matrix.path }}
|
path: ${{ matrix.path }}
|
||||||
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
|
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
|
||||||
@@ -482,7 +425,7 @@ jobs:
|
|||||||
echo "::set-output name=dir::$(pip cache dir)"
|
echo "::set-output name=dir::$(pip cache dir)"
|
||||||
|
|
||||||
- name: pip cache
|
- name: pip cache
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: ${{ steps.pip-cache.outputs.dir }}
|
path: ${{ steps.pip-cache.outputs.dir }}
|
||||||
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
|
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
|
||||||
@@ -500,7 +443,7 @@ jobs:
|
|||||||
|
|
||||||
⋮
|
⋮
|
||||||
|
|
||||||
- uses: actions/cache@v3
|
- uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: ~/.local/share/virtualenvs
|
path: ~/.local/share/virtualenvs
|
||||||
key: ${{ runner.os }}-python-${{ steps.setup-python.outputs.python-version }}-pipenv-${{ hashFiles('Pipfile.lock') }}
|
key: ${{ runner.os }}-python-${{ steps.setup-python.outputs.python-version }}-pipenv-${{ hashFiles('Pipfile.lock') }}
|
||||||
@@ -527,7 +470,7 @@ For renv, the cache directory will vary by OS. The `RENV_PATHS_ROOT` environment
|
|||||||
cat("##[set-output name=r-version;]", R.Version()$version.string, sep = "")
|
cat("##[set-output name=r-version;]", R.Version()$version.string, sep = "")
|
||||||
shell: Rscript {0}
|
shell: Rscript {0}
|
||||||
- name: Restore Renv package cache
|
- name: Restore Renv package cache
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: ${{ env.RENV_PATHS_ROOT }}
|
path: ${{ env.RENV_PATHS_ROOT }}
|
||||||
key: ${{ steps.get-version.outputs.os-version }}-${{ steps.get-version.outputs.r-version }}-${{ inputs.cache-version }}-${{ hashFiles('renv.lock') }}
|
key: ${{ steps.get-version.outputs.os-version }}-${{ steps.get-version.outputs.r-version }}-${{ inputs.cache-version }}-${{ hashFiles('renv.lock') }}
|
||||||
@@ -553,7 +496,7 @@ whenever possible:
|
|||||||
## Rust - Cargo
|
## Rust - Cargo
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- uses: actions/cache@v3
|
- uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
~/.cargo/bin/
|
~/.cargo/bin/
|
||||||
@@ -568,7 +511,7 @@ whenever possible:
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- name: Cache SBT
|
- name: Cache SBT
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
~/.ivy2/cache
|
~/.ivy2/cache
|
||||||
@@ -579,7 +522,7 @@ whenever possible:
|
|||||||
## Swift, Objective-C - Carthage
|
## Swift, Objective-C - Carthage
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- uses: actions/cache@v3
|
- uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: Carthage
|
path: Carthage
|
||||||
key: ${{ runner.os }}-carthage-${{ hashFiles('**/Cartfile.resolved') }}
|
key: ${{ runner.os }}-carthage-${{ hashFiles('**/Cartfile.resolved') }}
|
||||||
@@ -590,7 +533,7 @@ whenever possible:
|
|||||||
## Swift, Objective-C - CocoaPods
|
## Swift, Objective-C - CocoaPods
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- uses: actions/cache@v3
|
- uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: Pods
|
path: Pods
|
||||||
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }}
|
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }}
|
||||||
@@ -601,7 +544,7 @@ whenever possible:
|
|||||||
## Swift - Swift Package Manager
|
## Swift - Swift Package Manager
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- uses: actions/cache@v3
|
- uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: .build
|
path: .build
|
||||||
key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}
|
key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}
|
||||||
|
|||||||
Generated
+3266
-1118
File diff suppressed because it is too large
Load Diff
+15
-15
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "cache",
|
"name": "cache",
|
||||||
"version": "3.0.2",
|
"version": "2.1.7",
|
||||||
"private": true,
|
"private": true,
|
||||||
"description": "Cache dependencies and build outputs",
|
"description": "Cache dependencies and build outputs",
|
||||||
"main": "dist/restore/index.js",
|
"main": "dist/restore/index.js",
|
||||||
@@ -23,29 +23,29 @@
|
|||||||
"author": "GitHub",
|
"author": "GitHub",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/cache": "^2.0.2",
|
"@actions/cache": "file:actions-cache-1.0.9.tgz",
|
||||||
"@actions/core": "^1.2.6",
|
"@actions/core": "^1.2.6",
|
||||||
"@actions/exec": "^1.1.1",
|
"@actions/exec": "^1.0.1",
|
||||||
"@actions/io": "^1.1.2"
|
"@actions/io": "^1.1.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/jest": "^27.4.1",
|
"@types/jest": "^27.4.0",
|
||||||
"@types/nock": "^11.1.0",
|
"@types/nock": "^11.1.0",
|
||||||
"@types/node": "^16.11.26",
|
"@types/node": "^12.20.42",
|
||||||
"@typescript-eslint/eslint-plugin": "^5.16.0",
|
"@typescript-eslint/eslint-plugin": "^5.10.1",
|
||||||
"@typescript-eslint/parser": "^5.16.0",
|
"@typescript-eslint/parser": "^5.10.1",
|
||||||
"@zeit/ncc": "^0.20.5",
|
"@zeit/ncc": "^0.20.5",
|
||||||
"eslint": "^8.11.0",
|
"eslint": "^8.8.0",
|
||||||
"eslint-config-prettier": "^8.5.0",
|
"eslint-config-prettier": "^8.3.0",
|
||||||
"eslint-plugin-import": "^2.25.4",
|
"eslint-plugin-import": "^2.25.4",
|
||||||
"eslint-plugin-jest": "^26.1.3",
|
"eslint-plugin-jest": "^26.0.0",
|
||||||
"eslint-plugin-prettier": "^4.0.0",
|
"eslint-plugin-prettier": "^4.0.0",
|
||||||
"eslint-plugin-simple-import-sort": "^7.0.0",
|
"eslint-plugin-simple-import-sort": "^7.0.0",
|
||||||
"jest": "^27.5.1",
|
"jest": "^27.4.7",
|
||||||
"jest-circus": "^27.5.1",
|
"jest-circus": "^27.4.6",
|
||||||
"nock": "^11.7.0",
|
"nock": "^11.7.0",
|
||||||
"prettier": "^2.6.1",
|
"prettier": "^2.5.1",
|
||||||
"ts-jest": "^27.1.4",
|
"ts-jest": "^27.1.3",
|
||||||
"typescript": "^3.9.9"
|
"typescript": "^3.9.9"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-1
@@ -6,7 +6,10 @@ import * as utils from "./utils/actionUtils";
|
|||||||
|
|
||||||
async function run(): Promise<void> {
|
async function run(): Promise<void> {
|
||||||
try {
|
try {
|
||||||
if (!utils.isCacheFeatureAvailable()) {
|
if (utils.isGhes()) {
|
||||||
|
utils.logWarning(
|
||||||
|
"Cache action is not supported on GHES. See https://github.com/actions/cache/issues/505 for more details"
|
||||||
|
);
|
||||||
utils.setCacheHitOutput(false);
|
utils.setCacheHitOutput(false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-1
@@ -11,7 +11,10 @@ process.on("uncaughtException", e => utils.logWarning(e.message));
|
|||||||
|
|
||||||
async function run(): Promise<void> {
|
async function run(): Promise<void> {
|
||||||
try {
|
try {
|
||||||
if (!utils.isCacheFeatureAvailable()) {
|
if (utils.isGhes()) {
|
||||||
|
utils.logWarning(
|
||||||
|
"Cache action is not supported on GHES. See https://github.com/actions/cache/issues/505 for more details"
|
||||||
|
);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import * as cache from "@actions/cache";
|
|
||||||
import * as core from "@actions/core";
|
import * as core from "@actions/core";
|
||||||
|
|
||||||
import { Outputs, RefKey, State } from "../constants";
|
import { Outputs, RefKey, State } from "../constants";
|
||||||
@@ -75,20 +74,3 @@ export function getInputAsInt(
|
|||||||
}
|
}
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function isCacheFeatureAvailable(): boolean {
|
|
||||||
if (!cache.isFeatureAvailable()) {
|
|
||||||
if (isGhes()) {
|
|
||||||
logWarning(
|
|
||||||
"Cache action is only supported on GHES version >= 3.5. If you are on version >=3.5 Please check with GHES admin if Actions cache service is enabled or not."
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
logWarning(
|
|
||||||
"An internal error has occurred in cache backend. Please check https://www.githubstatus.com/ for any ongoing issue in actions."
|
|
||||||
);
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user