From 799e2f6cad4e8fdd30415d362fb6b8c1ae9d312a Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Thu, 25 Apr 2024 12:40:55 +0200
Subject: [PATCH] chore(deps-dev): Bump the all group with 4 updates (#78)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Bumps the all group with 4 updates:
[@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core),
[@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env),
[eslint](https://github.com/eslint/eslint) and
[eslint-plugin-jest](https://github.com/jest-community/eslint-plugin-jest).
Updates `@babel/core` from 7.24.3 to 7.24.4
Release notes
Sourced from @babel/core
's
releases.
v7.24.4 (2024-04-03)
Thanks @Dunqing
, @luiscubal
, and @samualtnorman
for your first PRs!
:eyeglasses: Spec Compliance
babel-parser
babel-helpers
,
babel-plugin-proposal-decorators
,
babel-runtime-corejs3
:bug: Bug Fix
babel-generator
babel-compat-data
,
babel-plugin-bugfix-firefox-class-in-computed-class-key
,
babel-preset-env
babel-helper-create-class-features-plugin
,
babel-plugin-proposal-decorators
babel-plugin-transform-block-scoping
babel-core
,
babel-plugin-transform-block-scoped-functions
,
babel-plugin-transform-block-scoping
Committers: 7
Changelog
Sourced from @babel/core
's
changelog.
v7.24.4 (2024-04-03)
:eyeglasses: Spec Compliance
babel-parser
babel-helpers
,
babel-plugin-proposal-decorators
,
babel-runtime-corejs3
:bug: Bug Fix
babel-generator
babel-compat-data
,
babel-plugin-bugfix-firefox-class-in-computed-class-key
,
babel-preset-env
babel-helper-create-class-features-plugin
,
babel-plugin-proposal-decorators
babel-plugin-transform-block-scoping
babel-core
,
babel-plugin-transform-block-scoped-functions
,
babel-plugin-transform-block-scoping
Commits
Updates `@babel/preset-env` from 7.24.3 to 7.24.4
Release notes
Sourced from @babel/preset-env
's
releases.
v7.24.4 (2024-04-03)
Thanks @Dunqing
, @luiscubal
, and @samualtnorman
for your first PRs!
:eyeglasses: Spec Compliance
babel-parser
babel-helpers
,
babel-plugin-proposal-decorators
,
babel-runtime-corejs3
:bug: Bug Fix
babel-generator
babel-compat-data
,
babel-plugin-bugfix-firefox-class-in-computed-class-key
,
babel-preset-env
babel-helper-create-class-features-plugin
,
babel-plugin-proposal-decorators
babel-plugin-transform-block-scoping
babel-core
,
babel-plugin-transform-block-scoped-functions
,
babel-plugin-transform-block-scoping
Committers: 7
Changelog
Sourced from @babel/preset-env
's
changelog.
v7.24.4 (2024-04-03)
:eyeglasses: Spec Compliance
babel-parser
babel-helpers
,
babel-plugin-proposal-decorators
,
babel-runtime-corejs3
:bug: Bug Fix
babel-generator
babel-compat-data
,
babel-plugin-bugfix-firefox-class-in-computed-class-key
,
babel-preset-env
babel-helper-create-class-features-plugin
,
babel-plugin-proposal-decorators
babel-plugin-transform-block-scoping
babel-core
,
babel-plugin-transform-block-scoped-functions
,
babel-plugin-transform-block-scoping
Commits
Updates `eslint` from 8.57.0 to 9.1.0
Release notes
Sourced from eslint's
releases.
v9.1.0
Features
03068f1
feat: Provide helpful error message for nullish configs (#18357)
(Nicholas C. Zakas)
751b518
feat: replace dependency graphemer with Intl.Segmenter
(#18110)
(Francesco Trotta)
4d11e56
feat: add name
to eslint configs (#18289)
(唯然)
1cbe1f6
feat: allow while(true)
in
no-constant-condition
(#18286)
(Tanuj Kanti)
0db676f
feat: add Intl
in es6 globals (#18318)
(唯然)
Bug Fixes
8d18958
fix: Remove name from eslint/js packages (#18368)
(Nicholas C. Zakas)
594eb0e
fix: do not crash on error in fs.walk
filter (#18295)
(Francesco Trotta)
0d8cf63
fix: EMFILE errors (#18313)
(Nicholas C. Zakas)
e1ac0b5
fix: --inspect-config only for flat config and respect -c (#18306)
(Nicholas C. Zakas)
09675e1
fix: --no-ignore
should not apply to non-global ignores (#18334)
(Milos Djermanovic)
Documentation
fb50077
docs: include notes about globals in migration-guide (#18356)
(Gabriel Rohden)
71c771f
docs: Fix missing accessible name for scroll-to-top link (#18329)
(Germán Freixinós)
200fd4e
docs: indicate eslintrc mode for .eslintignore
(#18285)
(Francesco Trotta)
16b6a8b
docs: Update README (GitHub Actions Bot)
df5f8a9
docs: paths
and patterns
difference in
no-restricted-imports
(#18273)
(Tanuj Kanti)
c537d76
docs: update npm init @eslint/config
generated file names
(#18298)
(唯然)
e1e305d
docs: fix linebreak-style
examples (#18262)
(Francesco Trotta)
113f51e
docs: Mention package.json config support dropped (#18305)
(Nicholas C. Zakas)
5c35321
docs: add eslintrc-only note to --rulesdir
(#18281)
(Adam Lui 刘展鹏)
Build Related
1fa6622
build: do not use --force
flag to install dependencies (#18284)
(Francesco Trotta)
Chores
d9a2983
chore: upgrade @eslint/js
to v9.1.1 (#18367)
(Francesco Trotta)
50d406d
chore: package.json update for @eslint/js
release
(Jenkins)
155c71c
chore: package.json update for @eslint/js
release
(Jenkins)
0588fc5
refactor: Move directive gathering to SourceCode (#18328)
(Nicholas C. Zakas)
9048e21
chore: lint docs/src/_data
js files (#18335)
(Milos Djermanovic)
4820790
chore: upgrade globals@15.0.0 dev dependency (#18332)
(Milos Djermanovic)
698d9ff
chore: upgrade jsdoc & unicorn plugins in eslint-config-eslint (#18333)
(Milos Djermanovic)
32c08cf
chore: drop Node < 18 and use @eslint/js
v9 in
eslint-config-eslint (#18323)
(Milos Djermanovic)
a76fb55
chore: @eslint-community/eslint-plugin-eslint-comments
v4.3.0 (#18319)
(Milos Djermanovic)
78e45b1
chore: eslint-plugin-eslint-plugin v6.0.0 (#18316)
(唯然)
36103a5
chore: eslint-plugin-n v17.0.0 (#18315)
(唯然)
v9.0.0
Breaking Changes
b7cf3bd
fix!: correct camelcase
rule schema for allow
option (#18232)
(eMerzh)
09bd7fe
feat!: move AST traversal into SourceCode (#18167)
(Nicholas C. Zakas)
79a95eb
feat!: disallow multiple configuration comments for same rule (#18157)
(Milos Djermanovic)
9163646
feat!: Rule Tester checks for missing placeholder data in the message
(#18073)
(fnx)
3c4d51d
feat!: default for enforceForClassMembers
in
no-useless-computed-key
(#18054)
(Francesco Trotta)
47e60f8
feat!: Stricter rule test validations (#17654)
(fnx)
... (truncated)
Changelog
Sourced from eslint's
changelog.
v9.1.0 - April 19, 2024
d9a2983
chore: upgrade @eslint/js
to v9.1.1 (#18367)
(Francesco Trotta)
03068f1
feat: Provide helpful error message for nullish configs (#18357)
(Nicholas C. Zakas)
50d406d
chore: package.json update for @eslint/js
release
(Jenkins)
8d18958
fix: Remove name from eslint/js packages (#18368)
(Nicholas C. Zakas)
155c71c
chore: package.json update for @eslint/js
release
(Jenkins)
594eb0e
fix: do not crash on error in fs.walk
filter (#18295)
(Francesco Trotta)
751b518
feat: replace dependency graphemer with Intl.Segmenter
(#18110)
(Francesco Trotta)
fb50077
docs: include notes about globals in migration-guide (#18356)
(Gabriel Rohden)
4d11e56
feat: add name
to eslint configs (#18289)
(唯然)
1cbe1f6
feat: allow while(true)
in
no-constant-condition
(#18286)
(Tanuj Kanti)
0588fc5
refactor: Move directive gathering to SourceCode (#18328)
(Nicholas C. Zakas)
0d8cf63
fix: EMFILE errors (#18313)
(Nicholas C. Zakas)
e1ac0b5
fix: --inspect-config only for flat config and respect -c (#18306)
(Nicholas C. Zakas)
09675e1
fix: --no-ignore
should not apply to non-global ignores (#18334)
(Milos Djermanovic)
9048e21
chore: lint docs/src/_data
js files (#18335)
(Milos Djermanovic)
4820790
chore: upgrade globals@15.0.0 dev dependency (#18332)
(Milos Djermanovic)
698d9ff
chore: upgrade jsdoc & unicorn plugins in eslint-config-eslint (#18333)
(Milos Djermanovic)
71c771f
docs: Fix missing accessible name for scroll-to-top link (#18329)
(Germán Freixinós)
0db676f
feat: add Intl
in es6 globals (#18318)
(唯然)
200fd4e
docs: indicate eslintrc mode for .eslintignore
(#18285)
(Francesco Trotta)
32c08cf
chore: drop Node < 18 and use @eslint/js
v9 in
eslint-config-eslint (#18323)
(Milos Djermanovic)
16b6a8b
docs: Update README (GitHub Actions Bot)
a76fb55
chore: @eslint-community/eslint-plugin-eslint-comments
v4.3.0 (#18319)
(Milos Djermanovic)
df5f8a9
docs: paths
and patterns
difference in
no-restricted-imports
(#18273)
(Tanuj Kanti)
c537d76
docs: update npm init @eslint/config
generated file names
(#18298)
(唯然)
78e45b1
chore: eslint-plugin-eslint-plugin v6.0.0 (#18316)
(唯然)
36103a5
chore: eslint-plugin-n v17.0.0 (#18315)
(唯然)
e1e305d
docs: fix linebreak-style
examples (#18262)
(Francesco Trotta)
113f51e
docs: Mention package.json config support dropped (#18305)
(Nicholas C. Zakas)
1fa6622
build: do not use --force
flag to install dependencies (#18284)
(Francesco Trotta)
5c35321
docs: add eslintrc-only note to --rulesdir
(#18281)
(Adam Lui 刘展鹏)
v9.0.0 - April 5, 2024
19f9a89
chore: Update dependencies for v9.0.0 (#18275)
(Nicholas C. Zakas)
7c957f2
chore: package.json update for @eslint/js
release
(Jenkins)
d73a33c
chore: ignore /docs/v8.x
in link checker (#18274)
(Milos Djermanovic)
d54a412
feat: Add --inspect-config CLI flag (#18270)
(Nicholas C. Zakas)
e151050
docs: update get-started to the new @eslint/create-config
(#18217)
(唯然)
610c148
fix: Support using
declarations in no-lone-blocks (#18269)
(Kirk Waiblinger)
44a81c6
chore: upgrade knip (#18272)
(Lars Kappert)
94178ad
docs: mention about name
field in flat config (#18252)
(Anthony Fu)
1765c24
docs: add Troubleshooting page (#18181)
(Josh Goldberg ✨)
e80b60c
chore: remove code for testing version selectors (#18266)
(Milos Djermanovic)
96607d0
docs: version selectors synchronization (#18260)
(Milos Djermanovic)
e508800
fix: rule tester ignore irrelevant test case properties (#18235)
(fnx)
a129acb
fix: flat config name on ignores object (#18258)
(Nicholas C. Zakas)
97ce45b
feat: Add reportUsedIgnorePattern
option to
no-unused-vars
rule (#17662)
(Pearce Ropion)
... (truncated)
Commits
b78d831
9.1.0
e4d9c92
Build: changelog update for 9.1.0
d9a2983
chore: upgrade @eslint/js
to v9.1.1 (#18367)
03068f1
feat: Provide helpful error message for nullish configs (#18357)
50d406d
chore: package.json update for @eslint/js
release
8d18958
fix: Remove name from eslint/js packages (#18368)
155c71c
chore: package.json update for @eslint/js
release
594eb0e
fix: do not crash on error in fs.walk
filter (#18295)
751b518
feat: replace dependency graphemer with Intl.Segmenter
(#18110)
fb50077
docs: include notes about globals in migration-guide (#18356)
- Additional commits viewable in compare
view
Updates `eslint-plugin-jest` from 27.9.0 to 28.2.0
Release notes
Sourced from eslint-plugin-jest's
releases.
v28.2.0
28.2.0
(2024-04-06)
Features
- support providing aliases for
@jest/globals
package (#1543)
(744d4f6)
v28.1.1
28.1.1
(2024-04-06)
Bug Fixes
- max-expects: properly reset counter when exiting a
test case (#1550)
(b4b7cbc)
v28.1.0
28.1.0
(2024-04-06)
Features
v28.0.0
28.0.0
(2024-04-06)
Bug Fixes
- allow ESLint 9 as peer dependency (#1547)
(3c5e167)
- drop support for Node 19 (#1548)
(c87e388)
- no-large-snapshots: avoid
instanceof
RegExp
check for ESLint v9 compatibility (#1542)
(af4a9c9)
Features
BREAKING CHANGES
- Node v19 is no longer supported
- removed unneeded
snapshot
processor and
flat/snapshot
config
- dropped support for
@typescript-eslint/eslint-plugin
v5
- dropped support for Node v14
... (truncated)
Changelog
Sourced from eslint-plugin-jest's
changelog.
28.2.0
(2024-04-06)
Features
- support providing aliases for
@jest/globals
package (#1543)
(744d4f6)
28.1.1
(2024-04-06)
Bug Fixes
- max-expects: properly reset counter when exiting a
test case (#1550)
(b4b7cbc)
28.1.0
(2024-04-06)
Features
28.0.0
(2024-04-06)
Bug Fixes
- allow ESLint 9 as peer dependency (#1547)
(3c5e167)
- drop support for Node 19 (#1548)
(c87e388)
- no-large-snapshots: avoid
instanceof
RegExp
check for ESLint v9 compatibility (#1542)
(af4a9c9)
Features
BREAKING CHANGES
- Node v19 is no longer supported
- removed unneeded
snapshot
processor and
flat/snapshot
config
- dropped support for
@typescript-eslint/eslint-plugin
v5
- dropped support for Node v14
- removed
no-if
in favor of
no-conditional-in-test
... (truncated)
Commits
9f918bc
chore(release): 28.2.0 [skip ci]
744d4f6
feat: support providing aliases for @jest/globals
package
(#1543)
8f59e2b
chore(release): 28.1.1 [skip ci]
b4b7cbc
fix(max-expects): properly reset counter when exiting a test case (#1550)
6aaabc4
chore(release): 28.1.0 [skip ci]
37478d8
feat: add prefer-importing-jest-globals
rule (#1490)
9aa7aee
chore: remove patch (#1549)
5bc0b88
chore(release): 28.0.0 [skip ci]
7ecbae2
Merge pull request #1531
from jest-community/next
9854767
chore(deps): update wagoid/commitlint-github-action action to v6 (#1539)
- Additional commits viewable in compare
view
Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore ` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore ` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore ` will
remove the ignore condition of the specified dependency and ignore
conditions
---------
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Rok Garbas
---
.eslintignore | 4 -
.github/linters/.eslintrc.yml | 51 -
.github/linters/.markdown-lint.yml | 7 -
.github/linters/.yaml-lint.yml | 10 -
.github/workflows/ci.yml | 3 -
dist/index.js | 55926 ++++++++++++++-------------
flake.lock | 12 +-
package-lock.json | 5476 +--
package.json | 14 +-
9 files changed, 29674 insertions(+), 31829 deletions(-)
delete mode 100644 .eslintignore
delete mode 100644 .github/linters/.eslintrc.yml
delete mode 100644 .github/linters/.markdown-lint.yml
delete mode 100644 .github/linters/.yaml-lint.yml
diff --git a/.eslintignore b/.eslintignore
deleted file mode 100644
index 9ff5c1c..0000000
--- a/.eslintignore
+++ /dev/null
@@ -1,4 +0,0 @@
-lib/
-dist/
-node_modules/
-coverage/
diff --git a/.github/linters/.eslintrc.yml b/.github/linters/.eslintrc.yml
deleted file mode 100644
index 4248d25..0000000
--- a/.github/linters/.eslintrc.yml
+++ /dev/null
@@ -1,51 +0,0 @@
-env:
- commonjs: true
- es6: true
- jest: true
- node: true
-
-globals:
- Atomics: readonly
- SharedArrayBuffer: readonly
-
-ignorePatterns:
- - '!.*'
- - '.direnv/*'
- - '**/node_modules/.*'
- - '**/dist/.*'
- - '**/coverage/.*'
- - '*.json'
-
-parser: '@babel/eslint-parser'
-
-parserOptions:
- ecmaVersion: 2023
- sourceType: module
- requireConfigFile: false
- babelOptions:
- babelrc: false
- configFile: false
- presets:
- - jest
-
-plugins:
- - jest
-
-extends:
- - eslint:recommended
- - plugin:github/recommended
- - plugin:jest/recommended
-
-rules:
- {
- 'camelcase': 'off',
- 'eslint-comments/no-use': 'off',
- 'eslint-comments/no-unused-disable': 'off',
- 'i18n-text/no-en': 'off',
- 'import/no-commonjs': 'off',
- 'import/no-namespace': 'off',
- 'no-console': 'off',
- 'no-unused-vars': 'off',
- 'prettier/prettier': 'error',
- 'semi': 'off'
- }
diff --git a/.github/linters/.markdown-lint.yml b/.github/linters/.markdown-lint.yml
deleted file mode 100644
index 6d79773..0000000
--- a/.github/linters/.markdown-lint.yml
+++ /dev/null
@@ -1,7 +0,0 @@
-# Unordered list style
-MD004:
- style: dash
-
-# Ordered list item prefix
-MD029:
- style: one
diff --git a/.github/linters/.yaml-lint.yml b/.github/linters/.yaml-lint.yml
deleted file mode 100644
index c975a33..0000000
--- a/.github/linters/.yaml-lint.yml
+++ /dev/null
@@ -1,10 +0,0 @@
-rules:
- document-end: disable
- document-start:
- level: warning
- present: false
- line-length:
- level: warning
- max: 80
- allow-non-breakable-words: true
- allow-non-breakable-inline-mappings: true
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index b57dbfc..6d6b748 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -52,9 +52,6 @@ jobs:
- name: "Check Format"
run: nix develop --command npm run format:check
- - name: "Lint"
- run: nix develop --command npm run lint
-
- name: "Test"
run: nix develop --command npm run ci-test
diff --git a/dist/index.js b/dist/index.js
index 2265aca..078a742 100644
--- a/dist/index.js
+++ b/dist/index.js
@@ -5712,7 +5712,7 @@ class HttpClient {
if (this._keepAlive && useProxy) {
agent = this._proxyAgent;
}
- if (this._keepAlive && !useProxy) {
+ if (!useProxy) {
agent = this._agent;
}
// if agent is already assigned use that agent.
@@ -5744,16 +5744,12 @@ class HttpClient {
agent = tunnelAgent(agentOptions);
this._proxyAgent = agent;
}
- // if reusing agent across request and tunneling agent isn't assigned create a new agent
- if (this._keepAlive && !agent) {
+ // if tunneling agent isn't assigned create a new agent
+ if (!agent) {
const options = { keepAlive: this._keepAlive, maxSockets };
agent = usingSsl ? new https.Agent(options) : new http.Agent(options);
this._agent = agent;
}
- // if not using private agent and tunnel agent isn't setup then use global agent
- if (!agent) {
- agent = usingSsl ? https.globalAgent : http.globalAgent;
- }
if (usingSsl && this._ignoreSslError) {
// we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process
// http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options
@@ -6697,192 +6693,6 @@ exports.AbortSignal = AbortSignal;
//# sourceMappingURL=index.js.map
-/***/ }),
-
-/***/ 9645:
-/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
-
-"use strict";
-
-
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-
-var coreUtil = __nccwpck_require__(1333);
-
-// Copyright (c) Microsoft Corporation.
-// Licensed under the MIT license.
-/**
- * A static-key-based credential that supports updating
- * the underlying key value.
- */
-class AzureKeyCredential {
- /**
- * The value of the key to be used in authentication
- */
- get key() {
- return this._key;
- }
- /**
- * Create an instance of an AzureKeyCredential for use
- * with a service client.
- *
- * @param key - The initial value of the key to use in authentication
- */
- constructor(key) {
- if (!key) {
- throw new Error("key must be a non-empty string");
- }
- this._key = key;
- }
- /**
- * Change the value of the key.
- *
- * Updates will take effect upon the next request after
- * updating the key value.
- *
- * @param newKey - The new key value to be used
- */
- update(newKey) {
- this._key = newKey;
- }
-}
-
-// Copyright (c) Microsoft Corporation.
-/**
- * A static name/key-based credential that supports updating
- * the underlying name and key values.
- */
-class AzureNamedKeyCredential {
- /**
- * The value of the key to be used in authentication.
- */
- get key() {
- return this._key;
- }
- /**
- * The value of the name to be used in authentication.
- */
- get name() {
- return this._name;
- }
- /**
- * Create an instance of an AzureNamedKeyCredential for use
- * with a service client.
- *
- * @param name - The initial value of the name to use in authentication.
- * @param key - The initial value of the key to use in authentication.
- */
- constructor(name, key) {
- if (!name || !key) {
- throw new TypeError("name and key must be non-empty strings");
- }
- this._name = name;
- this._key = key;
- }
- /**
- * Change the value of the key.
- *
- * Updates will take effect upon the next request after
- * updating the key value.
- *
- * @param newName - The new name value to be used.
- * @param newKey - The new key value to be used.
- */
- update(newName, newKey) {
- if (!newName || !newKey) {
- throw new TypeError("newName and newKey must be non-empty strings");
- }
- this._name = newName;
- this._key = newKey;
- }
-}
-/**
- * Tests an object to determine whether it implements NamedKeyCredential.
- *
- * @param credential - The assumed NamedKeyCredential to be tested.
- */
-function isNamedKeyCredential(credential) {
- return (coreUtil.isObjectWithProperties(credential, ["name", "key"]) &&
- typeof credential.key === "string" &&
- typeof credential.name === "string");
-}
-
-// Copyright (c) Microsoft Corporation.
-/**
- * A static-signature-based credential that supports updating
- * the underlying signature value.
- */
-class AzureSASCredential {
- /**
- * The value of the shared access signature to be used in authentication
- */
- get signature() {
- return this._signature;
- }
- /**
- * Create an instance of an AzureSASCredential for use
- * with a service client.
- *
- * @param signature - The initial value of the shared access signature to use in authentication
- */
- constructor(signature) {
- if (!signature) {
- throw new Error("shared access signature must be a non-empty string");
- }
- this._signature = signature;
- }
- /**
- * Change the value of the signature.
- *
- * Updates will take effect upon the next request after
- * updating the signature value.
- *
- * @param newSignature - The new shared access signature value to be used
- */
- update(newSignature) {
- if (!newSignature) {
- throw new Error("shared access signature must be a non-empty string");
- }
- this._signature = newSignature;
- }
-}
-/**
- * Tests an object to determine whether it implements SASCredential.
- *
- * @param credential - The assumed SASCredential to be tested.
- */
-function isSASCredential(credential) {
- return (coreUtil.isObjectWithProperties(credential, ["signature"]) && typeof credential.signature === "string");
-}
-
-// Copyright (c) Microsoft Corporation.
-// Licensed under the MIT license.
-/**
- * Tests an object to determine whether it implements TokenCredential.
- *
- * @param credential - The assumed TokenCredential to be tested.
- */
-function isTokenCredential(credential) {
- // Check for an object with a 'getToken' function and possibly with
- // a 'signRequest' function. We do this check to make sure that
- // a ServiceClientCredentials implementor (like TokenClientCredentials
- // in ms-rest-nodeauth) doesn't get mistaken for a TokenCredential if
- // it doesn't actually implement TokenCredential also.
- const castCredential = credential;
- return (castCredential &&
- typeof castCredential.getToken === "function" &&
- (castCredential.signRequest === undefined || castCredential.getToken.length > 0));
-}
-
-exports.AzureKeyCredential = AzureKeyCredential;
-exports.AzureNamedKeyCredential = AzureNamedKeyCredential;
-exports.AzureSASCredential = AzureSASCredential;
-exports.isNamedKeyCredential = isNamedKeyCredential;
-exports.isSASCredential = isSASCredential;
-exports.isTokenCredential = isTokenCredential;
-//# sourceMappingURL=index.js.map
-
-
/***/ }),
/***/ 4607:
@@ -6897,9 +6707,9 @@ var uuid = __nccwpck_require__(3415);
var util = __nccwpck_require__(3837);
var tslib = __nccwpck_require__(9679);
var xml2js = __nccwpck_require__(6189);
-var coreUtil = __nccwpck_require__(1333);
-var logger$1 = __nccwpck_require__(3233);
-var coreAuth = __nccwpck_require__(9645);
+var coreUtil = __nccwpck_require__(637);
+var logger$1 = __nccwpck_require__(9497);
+var coreAuth = __nccwpck_require__(8834);
var os = __nccwpck_require__(2037);
var http = __nccwpck_require__(3685);
var https = __nccwpck_require__(5687);
@@ -6985,7 +6795,7 @@ class HttpHeaders {
set(headerName, headerValue) {
this._headersMap[getHeaderKey(headerName)] = {
name: headerName,
- value: headerValue.toString(),
+ value: headerValue.toString().trim(),
};
}
/**
@@ -7125,7 +6935,7 @@ const Constants = {
/**
* The core-http version
*/
- coreHttpVersion: "3.0.3",
+ coreHttpVersion: "3.0.4",
/**
* Specifies HTTP.
*/
@@ -12370,7 +12180,7 @@ var parseUrl = (__nccwpck_require__(7310).parse);
var fs = __nccwpck_require__(7147);
var Stream = (__nccwpck_require__(2781).Stream);
var mime = __nccwpck_require__(3583);
-var asynckit = __nccwpck_require__(4812);
+var asynckit = __nccwpck_require__(6284);
var populate = __nccwpck_require__(3971);
// Public API
@@ -13529,7 +13339,7 @@ exports["default"] = _default;
/***/ }),
-/***/ 7094:
+/***/ 4175:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
@@ -13537,2545 +13347,1660 @@ exports["default"] = _default;
Object.defineProperty(exports, "__esModule", ({ value: true }));
-var logger$1 = __nccwpck_require__(3233);
-var abortController = __nccwpck_require__(2557);
-var coreUtil = __nccwpck_require__(1333);
+var api = __nccwpck_require__(5163);
// Copyright (c) Microsoft Corporation.
+(function (SpanKind) {
+ /** Default value. Indicates that the span is used internally. */
+ SpanKind[SpanKind["INTERNAL"] = 0] = "INTERNAL";
+ /**
+ * Indicates that the span covers server-side handling of an RPC or other
+ * remote request.
+ */
+ SpanKind[SpanKind["SERVER"] = 1] = "SERVER";
+ /**
+ * Indicates that the span covers the client-side wrapper around an RPC or
+ * other remote request.
+ */
+ SpanKind[SpanKind["CLIENT"] = 2] = "CLIENT";
+ /**
+ * Indicates that the span describes producer sending a message to a
+ * broker. Unlike client and server, there is no direct critical path latency
+ * relationship between producer and consumer spans.
+ */
+ SpanKind[SpanKind["PRODUCER"] = 3] = "PRODUCER";
+ /**
+ * Indicates that the span describes consumer receiving a message from a
+ * broker. Unlike client and server, there is no direct critical path latency
+ * relationship between producer and consumer spans.
+ */
+ SpanKind[SpanKind["CONSUMER"] = 4] = "CONSUMER";
+})(exports.SpanKind || (exports.SpanKind = {}));
/**
- * The `@azure/logger` configuration for this package.
- * @internal
+ * Return the span if one exists
+ *
+ * @param context - context to get span from
*/
-const logger = logger$1.createClientLogger("core-lro");
-
-// Copyright (c) Microsoft Corporation.
-// Licensed under the MIT license.
+function getSpan(context) {
+ return api.trace.getSpan(context);
+}
/**
- * The default time interval to wait before sending the next polling request.
+ * Set the span on a context
+ *
+ * @param context - context to use as parent
+ * @param span - span to set active
*/
-const POLL_INTERVAL_IN_MS = 2000;
+function setSpan(context, span) {
+ return api.trace.setSpan(context, span);
+}
/**
- * The closed set of terminal states.
+ * Wrap span context in a NoopSpan and set as span in a new
+ * context
+ *
+ * @param context - context to set active span on
+ * @param spanContext - span context to be wrapped
*/
-const terminalStates = ["succeeded", "canceled", "failed"];
-
-// Copyright (c) Microsoft Corporation.
+function setSpanContext(context, spanContext) {
+ return api.trace.setSpanContext(context, spanContext);
+}
/**
- * Deserializes the state
+ * Get the span context of the span if it exists.
+ *
+ * @param context - context to get values from
*/
-function deserializeState(serializedState) {
- try {
- return JSON.parse(serializedState).state;
- }
- catch (e) {
- throw new Error(`Unable to deserialize input state: ${serializedState}`);
- }
+function getSpanContext(context) {
+ return api.trace.getSpanContext(context);
}
-function setStateError(inputs) {
- const { state, stateProxy, isOperationError } = inputs;
- return (error) => {
- if (isOperationError(error)) {
- stateProxy.setError(state, error);
- stateProxy.setFailed(state);
- }
- throw error;
- };
+/**
+ * Returns true of the given {@link SpanContext} is valid.
+ * A valid {@link SpanContext} is one which has a valid trace ID and span ID as per the spec.
+ *
+ * @param context - the {@link SpanContext} to validate.
+ *
+ * @returns true if the {@link SpanContext} is valid, false otherwise.
+ */
+function isSpanContextValid(context) {
+ return api.trace.isSpanContextValid(context);
}
-function appendReadableErrorMessage(currentMessage, innerMessage) {
- let message = currentMessage;
- if (message.slice(-1) !== ".") {
- message = message + ".";
- }
- return message + " " + innerMessage;
+function getTracer(name, version) {
+ return api.trace.getTracer(name || "azure/core-tracing", version);
}
-function simplifyError(err) {
- let message = err.message;
- let code = err.code;
- let curErr = err;
- while (curErr.innererror) {
- curErr = curErr.innererror;
- code = curErr.code;
- message = appendReadableErrorMessage(message, curErr.message);
+/** Entrypoint for context API */
+const context = api.context;
+(function (SpanStatusCode) {
+ /**
+ * The default status.
+ */
+ SpanStatusCode[SpanStatusCode["UNSET"] = 0] = "UNSET";
+ /**
+ * The operation has been validated by an Application developer or
+ * Operator to have completed successfully.
+ */
+ SpanStatusCode[SpanStatusCode["OK"] = 1] = "OK";
+ /**
+ * The operation contains an error.
+ */
+ SpanStatusCode[SpanStatusCode["ERROR"] = 2] = "ERROR";
+})(exports.SpanStatusCode || (exports.SpanStatusCode = {}));
+
+// Copyright (c) Microsoft Corporation.
+function isTracingDisabled() {
+ var _a;
+ if (typeof process === "undefined") {
+ // not supported in browser for now without polyfills
+ return false;
}
- return {
- code,
- message,
- };
+ const azureTracingDisabledValue = (_a = process.env.AZURE_TRACING_DISABLED) === null || _a === void 0 ? void 0 : _a.toLowerCase();
+ if (azureTracingDisabledValue === "false" || azureTracingDisabledValue === "0") {
+ return false;
+ }
+ return Boolean(azureTracingDisabledValue);
}
-function processOperationStatus(result) {
- const { state, stateProxy, status, isDone, processResult, getError, response, setErrorAsResult } = result;
- switch (status) {
- case "succeeded": {
- stateProxy.setSucceeded(state);
- break;
+/**
+ * Creates a function that can be used to create spans using the global tracer.
+ *
+ * Usage:
+ *
+ * ```typescript
+ * // once
+ * const createSpan = createSpanFunction({ packagePrefix: "Azure.Data.AppConfiguration", namespace: "Microsoft.AppConfiguration" });
+ *
+ * // in each operation
+ * const span = createSpan("deleteConfigurationSetting", operationOptions);
+ * // code...
+ * span.end();
+ * ```
+ *
+ * @hidden
+ * @param args - allows configuration of the prefix for each span as well as the az.namespace field.
+ */
+function createSpanFunction(args) {
+ return function (operationName, operationOptions) {
+ const tracer = getTracer();
+ const tracingOptions = (operationOptions === null || operationOptions === void 0 ? void 0 : operationOptions.tracingOptions) || {};
+ const spanOptions = Object.assign({ kind: exports.SpanKind.INTERNAL }, tracingOptions.spanOptions);
+ const spanName = args.packagePrefix ? `${args.packagePrefix}.${operationName}` : operationName;
+ let span;
+ if (isTracingDisabled()) {
+ span = api.trace.wrapSpanContext(api.INVALID_SPAN_CONTEXT);
}
- case "failed": {
- const err = getError === null || getError === void 0 ? void 0 : getError(response);
- let postfix = "";
- if (err) {
- const { code, message } = simplifyError(err);
- postfix = `. ${code}. ${message}`;
- }
- const errStr = `The long-running operation has failed${postfix}`;
- stateProxy.setError(state, new Error(errStr));
- stateProxy.setFailed(state);
- logger.warning(errStr);
- break;
+ else {
+ span = tracer.startSpan(spanName, spanOptions, tracingOptions.tracingContext);
}
- case "canceled": {
- stateProxy.setCanceled(state);
- break;
+ if (args.namespace) {
+ span.setAttribute("az.namespace", args.namespace);
}
- }
- if ((isDone === null || isDone === void 0 ? void 0 : isDone(response, state)) ||
- (isDone === undefined &&
- ["succeeded", "canceled"].concat(setErrorAsResult ? [] : ["failed"]).includes(status))) {
- stateProxy.setResult(state, buildResult({
- response,
- state,
- processResult,
- }));
- }
-}
-function buildResult(inputs) {
- const { processResult, response, state } = inputs;
- return processResult ? processResult(response, state) : response;
+ let newSpanOptions = tracingOptions.spanOptions || {};
+ if (span.isRecording() && args.namespace) {
+ newSpanOptions = Object.assign(Object.assign({}, tracingOptions.spanOptions), { attributes: Object.assign(Object.assign({}, spanOptions.attributes), { "az.namespace": args.namespace }) });
+ }
+ const newTracingOptions = Object.assign(Object.assign({}, tracingOptions), { spanOptions: newSpanOptions, tracingContext: setSpan(tracingOptions.tracingContext || context.active(), span) });
+ const newOperationOptions = Object.assign(Object.assign({}, operationOptions), { tracingOptions: newTracingOptions });
+ return {
+ span,
+ updatedOptions: newOperationOptions
+ };
+ };
}
+
+// Copyright (c) Microsoft Corporation.
+// Licensed under the MIT license.
+const VERSION = "00";
/**
- * Initiates the long-running operation.
+ * Generates a `SpanContext` given a `traceparent` header value.
+ * @param traceParent - Serialized span context data as a `traceparent` header value.
+ * @returns The `SpanContext` generated from the `traceparent` value.
*/
-async function initOperation(inputs) {
- const { init, stateProxy, processResult, getOperationStatus, withOperationLocation, setErrorAsResult, } = inputs;
- const { operationLocation, resourceLocation, metadata, response } = await init();
- if (operationLocation)
- withOperationLocation === null || withOperationLocation === void 0 ? void 0 : withOperationLocation(operationLocation, false);
- const config = {
- metadata,
- operationLocation,
- resourceLocation,
+function extractSpanContextFromTraceParentHeader(traceParentHeader) {
+ const parts = traceParentHeader.split("-");
+ if (parts.length !== 4) {
+ return;
+ }
+ const [version, traceId, spanId, traceOptions] = parts;
+ if (version !== VERSION) {
+ return;
+ }
+ const traceFlags = parseInt(traceOptions, 16);
+ const spanContext = {
+ spanId,
+ traceId,
+ traceFlags
};
- logger.verbose(`LRO: Operation description:`, config);
- const state = stateProxy.initState(config);
- const status = getOperationStatus({ response, state, operationLocation });
- processOperationStatus({ state, status, stateProxy, response, setErrorAsResult, processResult });
- return state;
+ return spanContext;
}
-async function pollOperationHelper(inputs) {
- const { poll, state, stateProxy, operationLocation, getOperationStatus, getResourceLocation, isOperationError, options, } = inputs;
- const response = await poll(operationLocation, options).catch(setStateError({
- state,
- stateProxy,
- isOperationError,
- }));
- const status = getOperationStatus(response, state);
- logger.verbose(`LRO: Status:\n\tPolling from: ${state.config.operationLocation}\n\tOperation status: ${status}\n\tPolling status: ${terminalStates.includes(status) ? "Stopped" : "Running"}`);
- if (status === "succeeded") {
- const resourceLocation = getResourceLocation(response, state);
- if (resourceLocation !== undefined) {
- return {
- response: await poll(resourceLocation).catch(setStateError({ state, stateProxy, isOperationError })),
- status,
- };
- }
+/**
+ * Generates a `traceparent` value given a span context.
+ * @param spanContext - Contains context for a specific span.
+ * @returns The `spanContext` represented as a `traceparent` value.
+ */
+function getTraceParentHeader(spanContext) {
+ const missingFields = [];
+ if (!spanContext.traceId) {
+ missingFields.push("traceId");
}
- return { response, status };
-}
-/** Polls the long-running operation. */
-async function pollOperation(inputs) {
- const { poll, state, stateProxy, options, getOperationStatus, getResourceLocation, getOperationLocation, isOperationError, withOperationLocation, getPollingInterval, processResult, getError, updateState, setDelay, isDone, setErrorAsResult, } = inputs;
- const { operationLocation } = state.config;
- if (operationLocation !== undefined) {
- const { response, status } = await pollOperationHelper({
- poll,
- getOperationStatus,
- state,
- stateProxy,
- operationLocation,
- getResourceLocation,
- isOperationError,
- options,
- });
- processOperationStatus({
- status,
- response,
- state,
- stateProxy,
- isDone,
- processResult,
- getError,
- setErrorAsResult,
- });
- if (!terminalStates.includes(status)) {
- const intervalInMs = getPollingInterval === null || getPollingInterval === void 0 ? void 0 : getPollingInterval(response);
- if (intervalInMs)
- setDelay(intervalInMs);
- const location = getOperationLocation === null || getOperationLocation === void 0 ? void 0 : getOperationLocation(response, state);
- if (location !== undefined) {
- const isUpdated = operationLocation !== location;
- state.config.operationLocation = location;
- withOperationLocation === null || withOperationLocation === void 0 ? void 0 : withOperationLocation(location, isUpdated);
- }
- else
- withOperationLocation === null || withOperationLocation === void 0 ? void 0 : withOperationLocation(operationLocation, false);
- }
- updateState === null || updateState === void 0 ? void 0 : updateState(state, response);
+ if (!spanContext.spanId) {
+ missingFields.push("spanId");
}
-}
-
-// Copyright (c) Microsoft Corporation.
-function getOperationLocationPollingUrl(inputs) {
- const { azureAsyncOperation, operationLocation } = inputs;
- return operationLocation !== null && operationLocation !== void 0 ? operationLocation : azureAsyncOperation;
-}
-function getLocationHeader(rawResponse) {
- return rawResponse.headers["location"];
-}
-function getOperationLocationHeader(rawResponse) {
- return rawResponse.headers["operation-location"];
-}
-function getAzureAsyncOperationHeader(rawResponse) {
- return rawResponse.headers["azure-asyncoperation"];
-}
-function findResourceLocation(inputs) {
- var _a;
- const { location, requestMethod, requestPath, resourceLocationConfig } = inputs;
- switch (requestMethod) {
- case "PUT": {
- return requestPath;
- }
- case "DELETE": {
- return undefined;
- }
- case "PATCH": {
- return (_a = getDefault()) !== null && _a !== void 0 ? _a : requestPath;
- }
- default: {
- return getDefault();
- }
- }
- function getDefault() {
- switch (resourceLocationConfig) {
- case "azure-async-operation": {
- return undefined;
- }
- case "original-uri": {
- return requestPath;
- }
- case "location":
- default: {
- return location;
- }
- }
- }
-}
-function inferLroMode(inputs) {
- const { rawResponse, requestMethod, requestPath, resourceLocationConfig } = inputs;
- const operationLocation = getOperationLocationHeader(rawResponse);
- const azureAsyncOperation = getAzureAsyncOperationHeader(rawResponse);
- const pollingUrl = getOperationLocationPollingUrl({ operationLocation, azureAsyncOperation });
- const location = getLocationHeader(rawResponse);
- const normalizedRequestMethod = requestMethod === null || requestMethod === void 0 ? void 0 : requestMethod.toLocaleUpperCase();
- if (pollingUrl !== undefined) {
- return {
- mode: "OperationLocation",
- operationLocation: pollingUrl,
- resourceLocation: findResourceLocation({
- requestMethod: normalizedRequestMethod,
- location,
- requestPath,
- resourceLocationConfig,
- }),
- };
- }
- else if (location !== undefined) {
- return {
- mode: "ResourceLocation",
- operationLocation: location,
- };
- }
- else if (normalizedRequestMethod === "PUT" && requestPath) {
- return {
- mode: "Body",
- operationLocation: requestPath,
- };
- }
- else {
- return undefined;
- }
-}
-function transformStatus(inputs) {
- const { status, statusCode } = inputs;
- if (typeof status !== "string" && status !== undefined) {
- throw new Error(`Polling was unsuccessful. Expected status to have a string value or no value but it has instead: ${status}. This doesn't necessarily indicate the operation has failed. Check your Azure subscription or resource status for more information.`);
- }
- switch (status === null || status === void 0 ? void 0 : status.toLocaleLowerCase()) {
- case undefined:
- return toOperationStatus(statusCode);
- case "succeeded":
- return "succeeded";
- case "failed":
- return "failed";
- case "running":
- case "accepted":
- case "started":
- case "canceling":
- case "cancelling":
- return "running";
- case "canceled":
- case "cancelled":
- return "canceled";
- default: {
- logger.verbose(`LRO: unrecognized operation status: ${status}`);
- return status;
- }
- }
-}
-function getStatus(rawResponse) {
- var _a;
- const { status } = (_a = rawResponse.body) !== null && _a !== void 0 ? _a : {};
- return transformStatus({ status, statusCode: rawResponse.statusCode });
-}
-function getProvisioningState(rawResponse) {
- var _a, _b;
- const { properties, provisioningState } = (_a = rawResponse.body) !== null && _a !== void 0 ? _a : {};
- const status = (_b = properties === null || properties === void 0 ? void 0 : properties.provisioningState) !== null && _b !== void 0 ? _b : provisioningState;
- return transformStatus({ status, statusCode: rawResponse.statusCode });
-}
-function toOperationStatus(statusCode) {
- if (statusCode === 202) {
- return "running";
- }
- else if (statusCode < 300) {
- return "succeeded";
- }
- else {
- return "failed";
- }
-}
-function parseRetryAfter({ rawResponse }) {
- const retryAfter = rawResponse.headers["retry-after"];
- if (retryAfter !== undefined) {
- // Retry-After header value is either in HTTP date format, or in seconds
- const retryAfterInSeconds = parseInt(retryAfter);
- return isNaN(retryAfterInSeconds)
- ? calculatePollingIntervalFromDate(new Date(retryAfter))
- : retryAfterInSeconds * 1000;
- }
- return undefined;
-}
-function getErrorFromResponse(response) {
- const error = response.flatResponse.error;
- if (!error) {
- logger.warning(`The long-running operation failed but there is no error property in the response's body`);
- return;
- }
- if (!error.code || !error.message) {
- logger.warning(`The long-running operation failed but the error property in the response's body doesn't contain code or message`);
+ if (missingFields.length) {
return;
}
- return error;
-}
-function calculatePollingIntervalFromDate(retryAfterDate) {
- const timeNow = Math.floor(new Date().getTime());
- const retryAfterTime = retryAfterDate.getTime();
- if (timeNow < retryAfterTime) {
- return retryAfterTime - timeNow;
- }
- return undefined;
-}
-function getStatusFromInitialResponse(inputs) {
- const { response, state, operationLocation } = inputs;
- function helper() {
- var _a;
- const mode = (_a = state.config.metadata) === null || _a === void 0 ? void 0 : _a["mode"];
- switch (mode) {
- case undefined:
- return toOperationStatus(response.rawResponse.statusCode);
- case "Body":
- return getOperationStatus(response, state);
- default:
- return "running";
- }
- }
- const status = helper();
- return status === "running" && operationLocation === undefined ? "succeeded" : status;
-}
-/**
- * Initiates the long-running operation.
- */
-async function initHttpOperation(inputs) {
- const { stateProxy, resourceLocationConfig, processResult, lro, setErrorAsResult } = inputs;
- return initOperation({
- init: async () => {
- const response = await lro.sendInitialRequest();
- const config = inferLroMode({
- rawResponse: response.rawResponse,
- requestPath: lro.requestPath,
- requestMethod: lro.requestMethod,
- resourceLocationConfig,
- });
- return Object.assign({ response, operationLocation: config === null || config === void 0 ? void 0 : config.operationLocation, resourceLocation: config === null || config === void 0 ? void 0 : config.resourceLocation }, ((config === null || config === void 0 ? void 0 : config.mode) ? { metadata: { mode: config.mode } } : {}));
- },
- stateProxy,
- processResult: processResult
- ? ({ flatResponse }, state) => processResult(flatResponse, state)
- : ({ flatResponse }) => flatResponse,
- getOperationStatus: getStatusFromInitialResponse,
- setErrorAsResult,
- });
-}
-function getOperationLocation({ rawResponse }, state) {
- var _a;
- const mode = (_a = state.config.metadata) === null || _a === void 0 ? void 0 : _a["mode"];
- switch (mode) {
- case "OperationLocation": {
- return getOperationLocationPollingUrl({
- operationLocation: getOperationLocationHeader(rawResponse),
- azureAsyncOperation: getAzureAsyncOperationHeader(rawResponse),
- });
- }
- case "ResourceLocation": {
- return getLocationHeader(rawResponse);
- }
- case "Body":
- default: {
- return undefined;
- }
- }
-}
-function getOperationStatus({ rawResponse }, state) {
- var _a;
- const mode = (_a = state.config.metadata) === null || _a === void 0 ? void 0 : _a["mode"];
- switch (mode) {
- case "OperationLocation": {
- return getStatus(rawResponse);
- }
- case "ResourceLocation": {
- return toOperationStatus(rawResponse.statusCode);
- }
- case "Body": {
- return getProvisioningState(rawResponse);
- }
- default:
- throw new Error(`Internal error: Unexpected operation mode: ${mode}`);
- }
+ const flags = spanContext.traceFlags || 0 /* NONE */;
+ const hexFlags = flags.toString(16);
+ const traceFlags = hexFlags.length === 1 ? `0${hexFlags}` : hexFlags;
+ // https://www.w3.org/TR/trace-context/#traceparent-header-field-values
+ return `${VERSION}-${spanContext.traceId}-${spanContext.spanId}-${traceFlags}`;
}
-function getResourceLocation({ flatResponse }, state) {
- if (typeof flatResponse === "object") {
- const resourceLocation = flatResponse.resourceLocation;
- if (resourceLocation !== undefined) {
- state.config.resourceLocation = resourceLocation;
- }
+
+exports.context = context;
+exports.createSpanFunction = createSpanFunction;
+exports.extractSpanContextFromTraceParentHeader = extractSpanContextFromTraceParentHeader;
+exports.getSpan = getSpan;
+exports.getSpanContext = getSpanContext;
+exports.getTraceParentHeader = getTraceParentHeader;
+exports.getTracer = getTracer;
+exports.isSpanContextValid = isSpanContextValid;
+exports.setSpan = setSpan;
+exports.setSpanContext = setSpanContext;
+//# sourceMappingURL=index.js.map
+
+
+/***/ }),
+
+/***/ 4100:
+/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+
+var coreHttp = __nccwpck_require__(4607);
+var tslib = __nccwpck_require__(9679);
+var coreTracing = __nccwpck_require__(4175);
+var logger$1 = __nccwpck_require__(9497);
+var abortController = __nccwpck_require__(2557);
+var os = __nccwpck_require__(2037);
+var crypto = __nccwpck_require__(6113);
+var stream = __nccwpck_require__(2781);
+__nccwpck_require__(7947);
+var coreLro = __nccwpck_require__(334);
+var events = __nccwpck_require__(2361);
+var fs = __nccwpck_require__(7147);
+var util = __nccwpck_require__(3837);
+
+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]; }
+ });
+ }
+ });
}
- return state.config.resourceLocation;
-}
-function isOperationError(e) {
- return e.name === "RestError";
-}
-/** Polls the long-running operation. */
-async function pollHttpOperation(inputs) {
- const { lro, stateProxy, options, processResult, updateState, setDelay, state, setErrorAsResult, } = inputs;
- return pollOperation({
- state,
- stateProxy,
- setDelay,
- processResult: processResult
- ? ({ flatResponse }, inputState) => processResult(flatResponse, inputState)
- : ({ flatResponse }) => flatResponse,
- getError: getErrorFromResponse,
- updateState,
- getPollingInterval: parseRetryAfter,
- getOperationLocation,
- getOperationStatus,
- isOperationError,
- getResourceLocation,
- options,
- /**
- * The expansion here is intentional because `lro` could be an object that
- * references an inner this, so we need to preserve a reference to it.
- */
- poll: async (location, inputOptions) => lro.sendPollRequest(location, inputOptions),
- setErrorAsResult,
- });
+ n["default"] = e;
+ return Object.freeze(n);
}
-// Copyright (c) Microsoft Corporation.
-const createStateProxy$1 = () => ({
- /**
- * The state at this point is created to be of type OperationState.
- * It will be updated later to be of type TState when the
- * customer-provided callback, `updateState`, is called during polling.
- */
- initState: (config) => ({ status: "running", config }),
- setCanceled: (state) => (state.status = "canceled"),
- setError: (state, error) => (state.error = error),
- setResult: (state, result) => (state.result = result),
- setRunning: (state) => (state.status = "running"),
- setSucceeded: (state) => (state.status = "succeeded"),
- setFailed: (state) => (state.status = "failed"),
- getError: (state) => state.error,
- getResult: (state) => state.result,
- isCanceled: (state) => state.status === "canceled",
- isFailed: (state) => state.status === "failed",
- isRunning: (state) => state.status === "running",
- isSucceeded: (state) => state.status === "succeeded",
-});
-/**
- * Returns a poller factory.
+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.
+ * Licensed under the MIT License.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
-function buildCreatePoller(inputs) {
- const { getOperationLocation, getStatusFromInitialResponse, getStatusFromPollResponse, isOperationError, getResourceLocation, getPollingInterval, getError, resolveOnUnsuccessful, } = inputs;
- return async ({ init, poll }, options) => {
- const { processResult, updateState, withOperationLocation: withOperationLocationCallback, intervalInMs = POLL_INTERVAL_IN_MS, restoreFrom, } = options || {};
- const stateProxy = createStateProxy$1();
- const withOperationLocation = withOperationLocationCallback
- ? (() => {
- let called = false;
- return (operationLocation, isUpdated) => {
- if (isUpdated)
- withOperationLocationCallback(operationLocation);
- else if (!called)
- withOperationLocationCallback(operationLocation);
- called = true;
- };
- })()
- : undefined;
- const state = restoreFrom
- ? deserializeState(restoreFrom)
- : await initOperation({
- init,
- stateProxy,
- processResult,
- getOperationStatus: getStatusFromInitialResponse,
- withOperationLocation,
- setErrorAsResult: !resolveOnUnsuccessful,
- });
- let resultPromise;
- const abortController$1 = new abortController.AbortController();
- const handlers = new Map();
- const handleProgressEvents = async () => handlers.forEach((h) => h(state));
- const cancelErrMsg = "Operation was canceled";
- let currentPollIntervalInMs = intervalInMs;
- const poller = {
- getOperationState: () => state,
- getResult: () => state.result,
- isDone: () => ["succeeded", "failed", "canceled"].includes(state.status),
- isStopped: () => resultPromise === undefined,
- stopPolling: () => {
- abortController$1.abort();
- },
- toString: () => JSON.stringify({
- state,
- }),
- onProgress: (callback) => {
- const s = Symbol();
- handlers.set(s, callback);
- return () => handlers.delete(s);
+const BlobServiceProperties = {
+ serializedName: "BlobServiceProperties",
+ xmlName: "StorageServiceProperties",
+ type: {
+ name: "Composite",
+ className: "BlobServiceProperties",
+ modelProperties: {
+ blobAnalyticsLogging: {
+ serializedName: "Logging",
+ xmlName: "Logging",
+ type: {
+ name: "Composite",
+ className: "Logging"
+ }
},
- pollUntilDone: (pollOptions) => (resultPromise !== null && resultPromise !== void 0 ? resultPromise : (resultPromise = (async () => {
- const { abortSignal: inputAbortSignal } = pollOptions || {};
- const { signal: abortSignal } = inputAbortSignal
- ? new abortController.AbortController([inputAbortSignal, abortController$1.signal])
- : abortController$1;
- if (!poller.isDone()) {
- await poller.poll({ abortSignal });
- while (!poller.isDone()) {
- await coreUtil.delay(currentPollIntervalInMs, { abortSignal });
- await poller.poll({ abortSignal });
- }
+ hourMetrics: {
+ serializedName: "HourMetrics",
+ xmlName: "HourMetrics",
+ type: {
+ name: "Composite",
+ className: "Metrics"
}
- if (resolveOnUnsuccessful) {
- return poller.getResult();
+ },
+ minuteMetrics: {
+ serializedName: "MinuteMetrics",
+ xmlName: "MinuteMetrics",
+ type: {
+ name: "Composite",
+ className: "Metrics"
}
- else {
- switch (state.status) {
- case "succeeded":
- return poller.getResult();
- case "canceled":
- throw new Error(cancelErrMsg);
- case "failed":
- throw state.error;
- case "notStarted":
- case "running":
- throw new Error(`Polling completed without succeeding or failing`);
+ },
+ cors: {
+ serializedName: "Cors",
+ xmlName: "Cors",
+ xmlIsWrapped: true,
+ xmlElementName: "CorsRule",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "CorsRule"
+ }
}
}
- })().finally(() => {
- resultPromise = undefined;
- }))),
- async poll(pollOptions) {
- if (resolveOnUnsuccessful) {
- if (poller.isDone())
- return;
- }
- else {
- switch (state.status) {
- case "succeeded":
- return;
- case "canceled":
- throw new Error(cancelErrMsg);
- case "failed":
- throw state.error;
- }
+ },
+ defaultServiceVersion: {
+ serializedName: "DefaultServiceVersion",
+ xmlName: "DefaultServiceVersion",
+ type: {
+ name: "String"
}
- await pollOperation({
- poll,
- state,
- stateProxy,
- getOperationLocation,
- isOperationError,
- withOperationLocation,
- getPollingInterval,
- getOperationStatus: getStatusFromPollResponse,
- getResourceLocation,
- processResult,
- getError,
- updateState,
- options: pollOptions,
- setDelay: (pollIntervalInMs) => {
- currentPollIntervalInMs = pollIntervalInMs;
- },
- setErrorAsResult: !resolveOnUnsuccessful,
- });
- await handleProgressEvents();
- if (!resolveOnUnsuccessful) {
- switch (state.status) {
- case "canceled":
- throw new Error(cancelErrMsg);
- case "failed":
- throw state.error;
- }
+ },
+ deleteRetentionPolicy: {
+ serializedName: "DeleteRetentionPolicy",
+ xmlName: "DeleteRetentionPolicy",
+ type: {
+ name: "Composite",
+ className: "RetentionPolicy"
}
},
- };
- return poller;
- };
-}
-
-// Copyright (c) Microsoft Corporation.
-/**
- * Creates a poller that can be used to poll a long-running operation.
- * @param lro - Description of the long-running operation
- * @param options - options to configure the poller
- * @returns an initialized poller
- */
-async function createHttpPoller(lro, options) {
- const { resourceLocationConfig, intervalInMs, processResult, restoreFrom, updateState, withOperationLocation, resolveOnUnsuccessful = false, } = options || {};
- return buildCreatePoller({
- getStatusFromInitialResponse,
- getStatusFromPollResponse: getOperationStatus,
- isOperationError,
- getOperationLocation,
- getResourceLocation,
- getPollingInterval: parseRetryAfter,
- getError: getErrorFromResponse,
- resolveOnUnsuccessful,
- })({
- init: async () => {
- const response = await lro.sendInitialRequest();
- const config = inferLroMode({
- rawResponse: response.rawResponse,
- requestPath: lro.requestPath,
- requestMethod: lro.requestMethod,
- resourceLocationConfig,
- });
- return Object.assign({ response, operationLocation: config === null || config === void 0 ? void 0 : config.operationLocation, resourceLocation: config === null || config === void 0 ? void 0 : config.resourceLocation }, ((config === null || config === void 0 ? void 0 : config.mode) ? { metadata: { mode: config.mode } } : {}));
- },
- poll: lro.sendPollRequest,
- }, {
- intervalInMs,
- withOperationLocation,
- restoreFrom,
- updateState,
- processResult: processResult
- ? ({ flatResponse }, state) => processResult(flatResponse, state)
- : ({ flatResponse }) => flatResponse,
- });
-}
-
-// Copyright (c) Microsoft Corporation.
-const createStateProxy = () => ({
- initState: (config) => ({ config, isStarted: true }),
- setCanceled: (state) => (state.isCancelled = true),
- setError: (state, error) => (state.error = error),
- setResult: (state, result) => (state.result = result),
- setRunning: (state) => (state.isStarted = true),
- setSucceeded: (state) => (state.isCompleted = true),
- setFailed: () => {
- /** empty body */
- },
- getError: (state) => state.error,
- getResult: (state) => state.result,
- isCanceled: (state) => !!state.isCancelled,
- isFailed: (state) => !!state.error,
- isRunning: (state) => !!state.isStarted,
- isSucceeded: (state) => Boolean(state.isCompleted && !state.isCancelled && !state.error),
-});
-class GenericPollOperation {
- constructor(state, lro, setErrorAsResult, lroResourceLocationConfig, processResult, updateState, isDone) {
- this.state = state;
- this.lro = lro;
- this.setErrorAsResult = setErrorAsResult;
- this.lroResourceLocationConfig = lroResourceLocationConfig;
- this.processResult = processResult;
- this.updateState = updateState;
- this.isDone = isDone;
- }
- setPollerConfig(pollerConfig) {
- this.pollerConfig = pollerConfig;
- }
- async update(options) {
- var _a;
- const stateProxy = createStateProxy();
- if (!this.state.isStarted) {
- this.state = Object.assign(Object.assign({}, this.state), (await initHttpOperation({
- lro: this.lro,
- stateProxy,
- resourceLocationConfig: this.lroResourceLocationConfig,
- processResult: this.processResult,
- setErrorAsResult: this.setErrorAsResult,
- })));
- }
- const updateState = this.updateState;
- const isDone = this.isDone;
- if (!this.state.isCompleted && this.state.error === undefined) {
- await pollHttpOperation({
- lro: this.lro,
- state: this.state,
- stateProxy,
- processResult: this.processResult,
- updateState: updateState
- ? (state, { rawResponse }) => updateState(state, rawResponse)
- : undefined,
- isDone: isDone
- ? ({ flatResponse }, state) => isDone(flatResponse, state)
- : undefined,
- options,
- setDelay: (intervalInMs) => {
- this.pollerConfig.intervalInMs = intervalInMs;
- },
- setErrorAsResult: this.setErrorAsResult,
- });
- }
- (_a = options === null || options === void 0 ? void 0 : options.fireProgress) === null || _a === void 0 ? void 0 : _a.call(options, this.state);
- return this;
- }
- async cancel() {
- logger.error("`cancelOperation` is deprecated because it wasn't implemented");
- return this;
- }
- /**
- * Serializes the Poller operation.
- */
- toString() {
- return JSON.stringify({
- state: this.state,
- });
- }
-}
-
-// Copyright (c) Microsoft Corporation.
-// Licensed under the MIT license.
-/**
- * When a poller is manually stopped through the `stopPolling` method,
- * the poller will be rejected with an instance of the PollerStoppedError.
- */
-class PollerStoppedError extends Error {
- constructor(message) {
- super(message);
- this.name = "PollerStoppedError";
- Object.setPrototypeOf(this, PollerStoppedError.prototype);
- }
-}
-/**
- * When the operation is cancelled, the poller will be rejected with an instance
- * of the PollerCancelledError.
- */
-class PollerCancelledError extends Error {
- constructor(message) {
- super(message);
- this.name = "PollerCancelledError";
- Object.setPrototypeOf(this, PollerCancelledError.prototype);
- }
-}
-/**
- * A class that represents the definition of a program that polls through consecutive requests
- * until it reaches a state of completion.
- *
- * A poller can be executed manually, by polling request by request by calling to the `poll()` method repeatedly, until its operation is completed.
- * It also provides a way to wait until the operation completes, by calling `pollUntilDone()` and waiting until the operation finishes.
- * Pollers can also request the cancellation of the ongoing process to whom is providing the underlying long running operation.
- *
- * ```ts
- * const poller = new MyPoller();
- *
- * // Polling just once:
- * await poller.poll();
- *
- * // We can try to cancel the request here, by calling:
- * //
- * // await poller.cancelOperation();
- * //
- *
- * // Getting the final result:
- * const result = await poller.pollUntilDone();
- * ```
- *
- * The Poller is defined by two types, a type representing the state of the poller, which
- * must include a basic set of properties from `PollOperationState`,
- * and a return type defined by `TResult`, which can be anything.
- *
- * The Poller class implements the `PollerLike` interface, which allows poller implementations to avoid having
- * to export the Poller's class directly, and instead only export the already instantiated poller with the PollerLike type.
- *
- * ```ts
- * class Client {
- * public async makePoller: PollerLike {
- * const poller = new MyPoller({});
- * // It might be preferred to return the poller after the first request is made,
- * // so that some information can be obtained right away.
- * await poller.poll();
- * return poller;
- * }
- * }
- *
- * const poller: PollerLike = myClient.makePoller();
- * ```
- *
- * A poller can be created through its constructor, then it can be polled until it's completed.
- * At any point in time, the state of the poller can be obtained without delay through the getOperationState method.
- * At any point in time, the intermediate forms of the result type can be requested without delay.
- * Once the underlying operation is marked as completed, the poller will stop and the final value will be returned.
- *
- * ```ts
- * const poller = myClient.makePoller();
- * const state: MyOperationState = poller.getOperationState();
- *
- * // The intermediate result can be obtained at any time.
- * const result: MyResult | undefined = poller.getResult();
- *
- * // The final result can only be obtained after the poller finishes.
- * const result: MyResult = await poller.pollUntilDone();
- * ```
- *
- */
-// eslint-disable-next-line no-use-before-define
-class Poller {
- /**
- * A poller needs to be initialized by passing in at least the basic properties of the `PollOperation`.
- *
- * When writing an implementation of a Poller, this implementation needs to deal with the initialization
- * of any custom state beyond the basic definition of the poller. The basic poller assumes that the poller's
- * operation has already been defined, at least its basic properties. The code below shows how to approach
- * the definition of the constructor of a new custom poller.
- *
- * ```ts
- * export class MyPoller extends Poller {
- * constructor({
- * // Anything you might need outside of the basics
- * }) {
- * let state: MyOperationState = {
- * privateProperty: private,
- * publicProperty: public,
- * };
- *
- * const operation = {
- * state,
- * update,
- * cancel,
- * toString
- * }
- *
- * // Sending the operation to the parent's constructor.
- * super(operation);
- *
- * // You can assign more local properties here.
- * }
- * }
- * ```
- *
- * Inside of this constructor, a new promise is created. This will be used to
- * tell the user when the poller finishes (see `pollUntilDone()`). The promise's
- * resolve and reject methods are also used internally to control when to resolve
- * or reject anyone waiting for the poller to finish.
- *
- * The constructor of a custom implementation of a poller is where any serialized version of
- * a previous poller's operation should be deserialized into the operation sent to the
- * base constructor. For example:
- *
- * ```ts
- * export class MyPoller extends Poller {
- * constructor(
- * baseOperation: string | undefined
- * ) {
- * let state: MyOperationState = {};
- * if (baseOperation) {
- * state = {
- * ...JSON.parse(baseOperation).state,
- * ...state
- * };
- * }
- * const operation = {
- * state,
- * // ...
- * }
- * super(operation);
- * }
- * }
- * ```
- *
- * @param operation - Must contain the basic properties of `PollOperation`.
- */
- constructor(operation) {
- /** controls whether to throw an error if the operation failed or was canceled. */
- this.resolveOnUnsuccessful = false;
- this.stopped = true;
- this.pollProgressCallbacks = [];
- this.operation = operation;
- this.promise = new Promise((resolve, reject) => {
- this.resolve = resolve;
- this.reject = reject;
- });
- // This prevents the UnhandledPromiseRejectionWarning in node.js from being thrown.
- // The above warning would get thrown if `poller.poll` is called, it returns an error,
- // and pullUntilDone did not have a .catch or await try/catch on it's return value.
- this.promise.catch(() => {
- /* intentionally blank */
- });
- }
- /**
- * Starts a loop that will break only if the poller is done
- * or if the poller is stopped.
- */
- async startPolling(pollOptions = {}) {
- if (this.stopped) {
- this.stopped = false;
- }
- while (!this.isStopped() && !this.isDone()) {
- await this.poll(pollOptions);
- await this.delay();
+ staticWebsite: {
+ serializedName: "StaticWebsite",
+ xmlName: "StaticWebsite",
+ type: {
+ name: "Composite",
+ className: "StaticWebsite"
+ }
+ }
}
}
- /**
- * pollOnce does one polling, by calling to the update method of the underlying
- * poll operation to make any relevant change effective.
- *
- * It only optionally receives an object with an abortSignal property, from \@azure/abort-controller's AbortSignalLike.
- *
- * @param options - Optional properties passed to the operation's update method.
- */
- async pollOnce(options = {}) {
- if (!this.isDone()) {
- this.operation = await this.operation.update({
- abortSignal: options.abortSignal,
- fireProgress: this.fireProgress.bind(this),
- });
+};
+const Logging = {
+ serializedName: "Logging",
+ type: {
+ name: "Composite",
+ className: "Logging",
+ modelProperties: {
+ version: {
+ serializedName: "Version",
+ required: true,
+ xmlName: "Version",
+ type: {
+ name: "String"
+ }
+ },
+ deleteProperty: {
+ serializedName: "Delete",
+ required: true,
+ xmlName: "Delete",
+ type: {
+ name: "Boolean"
+ }
+ },
+ read: {
+ serializedName: "Read",
+ required: true,
+ xmlName: "Read",
+ type: {
+ name: "Boolean"
+ }
+ },
+ write: {
+ serializedName: "Write",
+ required: true,
+ xmlName: "Write",
+ type: {
+ name: "Boolean"
+ }
+ },
+ retentionPolicy: {
+ serializedName: "RetentionPolicy",
+ xmlName: "RetentionPolicy",
+ type: {
+ name: "Composite",
+ className: "RetentionPolicy"
+ }
+ }
}
- this.processUpdatedState();
}
- /**
- * 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
- * the current operation state.
- *
- * @param state - The current operation state.
- */
- fireProgress(state) {
- for (const callback of this.pollProgressCallbacks) {
- callback(state);
+};
+const RetentionPolicy = {
+ serializedName: "RetentionPolicy",
+ type: {
+ name: "Composite",
+ className: "RetentionPolicy",
+ modelProperties: {
+ enabled: {
+ serializedName: "Enabled",
+ required: true,
+ xmlName: "Enabled",
+ type: {
+ name: "Boolean"
+ }
+ },
+ days: {
+ constraints: {
+ InclusiveMinimum: 1
+ },
+ serializedName: "Days",
+ xmlName: "Days",
+ type: {
+ name: "Number"
+ }
+ }
}
}
- /**
- * Invokes the underlying operation's cancel method.
- */
- async cancelOnce(options = {}) {
- this.operation = await this.operation.cancel(options);
- }
- /**
- * Returns a promise that will resolve once a single polling request finishes.
- * It does this by calling the update method of the Poller's operation.
- *
- * It only optionally receives an object with an abortSignal property, from \@azure/abort-controller's AbortSignalLike.
- *
- * @param options - Optional properties passed to the operation's update method.
- */
- poll(options = {}) {
- if (!this.pollOncePromise) {
- this.pollOncePromise = this.pollOnce(options);
- const clearPollOncePromise = () => {
- this.pollOncePromise = undefined;
- };
- this.pollOncePromise.then(clearPollOncePromise, clearPollOncePromise).catch(this.reject);
+};
+const Metrics = {
+ serializedName: "Metrics",
+ type: {
+ name: "Composite",
+ className: "Metrics",
+ modelProperties: {
+ version: {
+ serializedName: "Version",
+ xmlName: "Version",
+ type: {
+ name: "String"
+ }
+ },
+ enabled: {
+ serializedName: "Enabled",
+ required: true,
+ xmlName: "Enabled",
+ type: {
+ name: "Boolean"
+ }
+ },
+ includeAPIs: {
+ serializedName: "IncludeAPIs",
+ xmlName: "IncludeAPIs",
+ type: {
+ name: "Boolean"
+ }
+ },
+ retentionPolicy: {
+ serializedName: "RetentionPolicy",
+ xmlName: "RetentionPolicy",
+ type: {
+ name: "Composite",
+ className: "RetentionPolicy"
+ }
+ }
}
- return this.pollOncePromise;
}
- processUpdatedState() {
- if (this.operation.state.error) {
- this.stopped = true;
- if (!this.resolveOnUnsuccessful) {
- this.reject(this.operation.state.error);
- throw this.operation.state.error;
+};
+const CorsRule = {
+ serializedName: "CorsRule",
+ type: {
+ name: "Composite",
+ className: "CorsRule",
+ modelProperties: {
+ allowedOrigins: {
+ serializedName: "AllowedOrigins",
+ required: true,
+ xmlName: "AllowedOrigins",
+ type: {
+ name: "String"
+ }
+ },
+ allowedMethods: {
+ serializedName: "AllowedMethods",
+ required: true,
+ xmlName: "AllowedMethods",
+ type: {
+ name: "String"
+ }
+ },
+ allowedHeaders: {
+ serializedName: "AllowedHeaders",
+ required: true,
+ xmlName: "AllowedHeaders",
+ type: {
+ name: "String"
+ }
+ },
+ exposedHeaders: {
+ serializedName: "ExposedHeaders",
+ required: true,
+ xmlName: "ExposedHeaders",
+ type: {
+ name: "String"
+ }
+ },
+ maxAgeInSeconds: {
+ constraints: {
+ InclusiveMinimum: 0
+ },
+ serializedName: "MaxAgeInSeconds",
+ required: true,
+ xmlName: "MaxAgeInSeconds",
+ type: {
+ name: "Number"
+ }
}
}
- if (this.operation.state.isCancelled) {
- this.stopped = true;
- if (!this.resolveOnUnsuccessful) {
- const error = new PollerCancelledError("Operation was canceled");
- this.reject(error);
- throw error;
+ }
+};
+const StaticWebsite = {
+ serializedName: "StaticWebsite",
+ type: {
+ name: "Composite",
+ className: "StaticWebsite",
+ modelProperties: {
+ enabled: {
+ serializedName: "Enabled",
+ required: true,
+ xmlName: "Enabled",
+ type: {
+ name: "Boolean"
+ }
+ },
+ indexDocument: {
+ serializedName: "IndexDocument",
+ xmlName: "IndexDocument",
+ type: {
+ name: "String"
+ }
+ },
+ errorDocument404Path: {
+ serializedName: "ErrorDocument404Path",
+ xmlName: "ErrorDocument404Path",
+ type: {
+ name: "String"
+ }
+ },
+ defaultIndexDocumentPath: {
+ serializedName: "DefaultIndexDocumentPath",
+ xmlName: "DefaultIndexDocumentPath",
+ type: {
+ name: "String"
+ }
}
}
- if (this.isDone() && this.resolve) {
- // If the poller has finished polling, this means we now have a result.
- // However, it can be the case that TResult is instantiated to void, so
- // we are not expecting a result anyway. To assert that we might not
- // have a result eventually after finishing polling, we cast the result
- // to TResult.
- this.resolve(this.getResult());
- }
}
- /**
- * Returns a promise that will resolve once the underlying operation is completed.
- */
- async pollUntilDone(pollOptions = {}) {
- if (this.stopped) {
- this.startPolling(pollOptions).catch(this.reject);
+};
+const StorageError = {
+ serializedName: "StorageError",
+ type: {
+ name: "Composite",
+ className: "StorageError",
+ modelProperties: {
+ message: {
+ serializedName: "Message",
+ xmlName: "Message",
+ type: {
+ name: "String"
+ }
+ },
+ code: {
+ serializedName: "Code",
+ xmlName: "Code",
+ type: {
+ name: "String"
+ }
+ }
}
- // This is needed because the state could have been updated by
- // `cancelOperation`, e.g. the operation is canceled or an error occurred.
- this.processUpdatedState();
- return this.promise;
- }
- /**
- * Invokes the provided callback after each polling is completed,
- * sending the current state of the poller's operation.
- *
- * It returns a method that can be used to stop receiving updates on the given callback function.
- */
- onProgress(callback) {
- this.pollProgressCallbacks.push(callback);
- return () => {
- this.pollProgressCallbacks = this.pollProgressCallbacks.filter((c) => c !== callback);
- };
- }
- /**
- * Returns true if the poller has finished polling.
- */
- isDone() {
- const state = this.operation.state;
- return Boolean(state.isCompleted || state.isCancelled || state.error);
}
- /**
- * Stops the poller from continuing to poll.
- */
- stopPolling() {
- if (!this.stopped) {
- this.stopped = true;
- if (this.reject) {
- this.reject(new PollerStoppedError("This poller is already stopped"));
+};
+const BlobServiceStatistics = {
+ serializedName: "BlobServiceStatistics",
+ xmlName: "StorageServiceStats",
+ type: {
+ name: "Composite",
+ className: "BlobServiceStatistics",
+ modelProperties: {
+ geoReplication: {
+ serializedName: "GeoReplication",
+ xmlName: "GeoReplication",
+ type: {
+ name: "Composite",
+ className: "GeoReplication"
+ }
}
}
}
- /**
- * Returns true if the poller is stopped.
- */
- isStopped() {
- return this.stopped;
- }
- /**
- * Attempts to cancel the underlying operation.
- *
- * It only optionally receives an object with an abortSignal property, from \@azure/abort-controller's AbortSignalLike.
- *
- * If it's called again before it finishes, it will throw an error.
- *
- * @param options - Optional properties passed to the operation's update method.
- */
- cancelOperation(options = {}) {
- if (!this.cancelPromise) {
- this.cancelPromise = this.cancelOnce(options);
- }
- else if (options.abortSignal) {
- throw new Error("A cancel request is currently pending");
+};
+const GeoReplication = {
+ serializedName: "GeoReplication",
+ type: {
+ name: "Composite",
+ className: "GeoReplication",
+ modelProperties: {
+ status: {
+ serializedName: "Status",
+ required: true,
+ xmlName: "Status",
+ type: {
+ name: "Enum",
+ allowedValues: ["live", "bootstrap", "unavailable"]
+ }
+ },
+ lastSyncOn: {
+ serializedName: "LastSyncTime",
+ required: true,
+ xmlName: "LastSyncTime",
+ type: {
+ name: "DateTimeRfc1123"
+ }
+ }
}
- return this.cancelPromise;
- }
- /**
- * Returns the state of the operation.
- *
- * Even though TState will be the same type inside any of the methods of any extension of the Poller class,
- * implementations of the pollers can customize what's shared with the public by writing their own
- * version of the `getOperationState` method, and by defining two types, one representing the internal state of the poller
- * and a public type representing a safe to share subset of the properties of the internal state.
- * Their definition of getOperationState can then return their public type.
- *
- * Example:
- *
- * ```ts
- * // Let's say we have our poller's operation state defined as:
- * interface MyOperationState extends PollOperationState {
- * privateProperty?: string;
- * publicProperty?: string;
- * }
- *
- * // To allow us to have a true separation of public and private state, we have to define another interface:
- * interface PublicState extends PollOperationState {
- * publicProperty?: string;
- * }
- *
- * // Then, we define our Poller as follows:
- * export class MyPoller extends Poller {
- * // ... More content is needed here ...
- *
- * public getOperationState(): PublicState {
- * const state: PublicState = this.operation.state;
- * return {
- * // Properties from PollOperationState
- * isStarted: state.isStarted,
- * isCompleted: state.isCompleted,
- * isCancelled: state.isCancelled,
- * error: state.error,
- * result: state.result,
- *
- * // The only other property needed by PublicState.
- * publicProperty: state.publicProperty
- * }
- * }
- * }
- * ```
- *
- * You can see this in the tests of this repository, go to the file:
- * `../test/utils/testPoller.ts`
- * and look for the getOperationState implementation.
- */
- getOperationState() {
- return this.operation.state;
- }
- /**
- * Returns the result value of the operation,
- * regardless of the state of the poller.
- * It can return undefined or an incomplete form of the final TResult value
- * depending on the implementation.
- */
- getResult() {
- const state = this.operation.state;
- return state.result;
- }
- /**
- * Returns a serialized version of the poller's operation
- * by invoking the operation's toString method.
- */
- toString() {
- return this.operation.toString();
- }
-}
-
-// Copyright (c) Microsoft Corporation.
-/**
- * The LRO Engine, a class that performs polling.
- */
-class LroEngine extends Poller {
- constructor(lro, options) {
- const { intervalInMs = POLL_INTERVAL_IN_MS, resumeFrom, resolveOnUnsuccessful = false, isDone, lroResourceLocationConfig, processResult, updateState, } = options || {};
- const state = resumeFrom
- ? deserializeState(resumeFrom)
- : {};
- const operation = new GenericPollOperation(state, lro, !resolveOnUnsuccessful, lroResourceLocationConfig, processResult, updateState, isDone);
- super(operation);
- this.resolveOnUnsuccessful = resolveOnUnsuccessful;
- this.config = { intervalInMs: intervalInMs };
- operation.setPollerConfig(this.config);
- }
- /**
- * The method used by the poller to wait before attempting to update its operation.
- */
- delay() {
- return new Promise((resolve) => setTimeout(() => resolve(), this.config.intervalInMs));
}
-}
-
-exports.LroEngine = LroEngine;
-exports.Poller = Poller;
-exports.PollerCancelledError = PollerCancelledError;
-exports.PollerStoppedError = PollerStoppedError;
-exports.createHttpPoller = createHttpPoller;
-//# sourceMappingURL=index.js.map
-
-
-/***/ }),
-
-/***/ 4559:
-/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
-
-"use strict";
-
-
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-
-var tslib = __nccwpck_require__(9679);
-
-// Copyright (c) Microsoft Corporation.
-/**
- * returns an async iterator that iterates over results. It also has a `byPage`
- * method that returns pages of items at once.
- *
- * @param pagedResult - an object that specifies how to get pages.
- * @returns a paged async iterator that iterates over results.
- */
-function getPagedAsyncIterator(pagedResult) {
- var _a;
- const iter = getItemAsyncIterator(pagedResult);
- return {
- next() {
- return iter.next();
- },
- [Symbol.asyncIterator]() {
- return this;
- },
- byPage: (_a = pagedResult === null || pagedResult === void 0 ? void 0 : pagedResult.byPage) !== null && _a !== void 0 ? _a : ((settings) => {
- const { continuationToken, maxPageSize } = settings !== null && settings !== void 0 ? settings : {};
- return getPageAsyncIterator(pagedResult, {
- pageLink: continuationToken,
- maxPageSize,
- });
- }),
- };
-}
-function getItemAsyncIterator(pagedResult) {
- return tslib.__asyncGenerator(this, arguments, function* getItemAsyncIterator_1() {
- var e_1, _a, e_2, _b;
- const pages = getPageAsyncIterator(pagedResult);
- const firstVal = yield tslib.__await(pages.next());
- // if the result does not have an array shape, i.e. TPage = TElement, then we return it as is
- if (!Array.isArray(firstVal.value)) {
- // can extract elements from this page
- const { toElements } = pagedResult;
- if (toElements) {
- yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(toElements(firstVal.value))));
- try {
- for (var pages_1 = tslib.__asyncValues(pages), pages_1_1; pages_1_1 = yield tslib.__await(pages_1.next()), !pages_1_1.done;) {
- const page = pages_1_1.value;
- yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(toElements(page))));
- }
+};
+const ListContainersSegmentResponse = {
+ serializedName: "ListContainersSegmentResponse",
+ xmlName: "EnumerationResults",
+ type: {
+ name: "Composite",
+ className: "ListContainersSegmentResponse",
+ modelProperties: {
+ serviceEndpoint: {
+ serializedName: "ServiceEndpoint",
+ required: true,
+ xmlName: "ServiceEndpoint",
+ xmlIsAttribute: true,
+ type: {
+ name: "String"
}
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
- finally {
- try {
- if (pages_1_1 && !pages_1_1.done && (_a = pages_1.return)) yield tslib.__await(_a.call(pages_1));
+ },
+ prefix: {
+ serializedName: "Prefix",
+ xmlName: "Prefix",
+ type: {
+ name: "String"
+ }
+ },
+ marker: {
+ serializedName: "Marker",
+ xmlName: "Marker",
+ type: {
+ name: "String"
+ }
+ },
+ maxPageSize: {
+ serializedName: "MaxResults",
+ xmlName: "MaxResults",
+ type: {
+ name: "Number"
+ }
+ },
+ containerItems: {
+ serializedName: "ContainerItems",
+ required: true,
+ xmlName: "Containers",
+ xmlIsWrapped: true,
+ xmlElementName: "Container",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "ContainerItem"
+ }
}
- finally { if (e_1) throw e_1.error; }
}
- }
- else {
- yield yield tslib.__await(firstVal.value);
- // `pages` is of type `AsyncIterableIterator` but TPage = TElement in this case
- yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(pages)));
+ },
+ continuationToken: {
+ serializedName: "NextMarker",
+ xmlName: "NextMarker",
+ type: {
+ name: "String"
+ }
}
}
- else {
- yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(firstVal.value)));
- try {
- for (var pages_2 = tslib.__asyncValues(pages), pages_2_1; pages_2_1 = yield tslib.__await(pages_2.next()), !pages_2_1.done;) {
- const page = pages_2_1.value;
- // pages is of type `AsyncIterableIterator` so `page` is of type `TPage`. In this branch,
- // it must be the case that `TPage = TElement[]`
- yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
+ }
+};
+const ContainerItem = {
+ serializedName: "ContainerItem",
+ xmlName: "Container",
+ type: {
+ name: "Composite",
+ className: "ContainerItem",
+ modelProperties: {
+ name: {
+ serializedName: "Name",
+ required: true,
+ xmlName: "Name",
+ type: {
+ name: "String"
}
- }
- catch (e_2_1) { e_2 = { error: e_2_1 }; }
- finally {
- try {
- if (pages_2_1 && !pages_2_1.done && (_b = pages_2.return)) yield tslib.__await(_b.call(pages_2));
+ },
+ deleted: {
+ serializedName: "Deleted",
+ xmlName: "Deleted",
+ type: {
+ name: "Boolean"
+ }
+ },
+ version: {
+ serializedName: "Version",
+ xmlName: "Version",
+ type: {
+ name: "String"
+ }
+ },
+ properties: {
+ serializedName: "Properties",
+ xmlName: "Properties",
+ type: {
+ name: "Composite",
+ className: "ContainerProperties"
+ }
+ },
+ metadata: {
+ serializedName: "Metadata",
+ xmlName: "Metadata",
+ type: {
+ name: "Dictionary",
+ value: { type: { name: "String" } }
}
- finally { if (e_2) throw e_2.error; }
- }
- }
- });
-}
-function getPageAsyncIterator(pagedResult, options = {}) {
- return tslib.__asyncGenerator(this, arguments, function* getPageAsyncIterator_1() {
- const { pageLink, maxPageSize } = options;
- let response = yield tslib.__await(pagedResult.getPage(pageLink !== null && pageLink !== void 0 ? pageLink : pagedResult.firstPageLink, maxPageSize));
- if (!response) {
- return yield tslib.__await(void 0);
- }
- yield yield tslib.__await(response.page);
- while (response.nextPageLink) {
- response = yield tslib.__await(pagedResult.getPage(response.nextPageLink, maxPageSize));
- if (!response) {
- return yield tslib.__await(void 0);
}
- yield yield tslib.__await(response.page);
}
- });
-}
-
-exports.getPagedAsyncIterator = getPagedAsyncIterator;
-//# sourceMappingURL=index.js.map
-
-
-/***/ }),
-
-/***/ 4175:
-/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
-
-"use strict";
-
-
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-
-var api = __nccwpck_require__(5163);
-
-// Copyright (c) Microsoft Corporation.
-(function (SpanKind) {
- /** Default value. Indicates that the span is used internally. */
- SpanKind[SpanKind["INTERNAL"] = 0] = "INTERNAL";
- /**
- * Indicates that the span covers server-side handling of an RPC or other
- * remote request.
- */
- SpanKind[SpanKind["SERVER"] = 1] = "SERVER";
- /**
- * Indicates that the span covers the client-side wrapper around an RPC or
- * other remote request.
- */
- SpanKind[SpanKind["CLIENT"] = 2] = "CLIENT";
- /**
- * Indicates that the span describes producer sending a message to a
- * broker. Unlike client and server, there is no direct critical path latency
- * relationship between producer and consumer spans.
- */
- SpanKind[SpanKind["PRODUCER"] = 3] = "PRODUCER";
- /**
- * Indicates that the span describes consumer receiving a message from a
- * broker. Unlike client and server, there is no direct critical path latency
- * relationship between producer and consumer spans.
- */
- SpanKind[SpanKind["CONSUMER"] = 4] = "CONSUMER";
-})(exports.SpanKind || (exports.SpanKind = {}));
-/**
- * Return the span if one exists
- *
- * @param context - context to get span from
- */
-function getSpan(context) {
- return api.trace.getSpan(context);
-}
-/**
- * Set the span on a context
- *
- * @param context - context to use as parent
- * @param span - span to set active
- */
-function setSpan(context, span) {
- return api.trace.setSpan(context, span);
-}
-/**
- * Wrap span context in a NoopSpan and set as span in a new
- * context
- *
- * @param context - context to set active span on
- * @param spanContext - span context to be wrapped
- */
-function setSpanContext(context, spanContext) {
- return api.trace.setSpanContext(context, spanContext);
-}
-/**
- * Get the span context of the span if it exists.
- *
- * @param context - context to get values from
- */
-function getSpanContext(context) {
- return api.trace.getSpanContext(context);
-}
-/**
- * Returns true of the given {@link SpanContext} is valid.
- * A valid {@link SpanContext} is one which has a valid trace ID and span ID as per the spec.
- *
- * @param context - the {@link SpanContext} to validate.
- *
- * @returns true if the {@link SpanContext} is valid, false otherwise.
- */
-function isSpanContextValid(context) {
- return api.trace.isSpanContextValid(context);
-}
-function getTracer(name, version) {
- return api.trace.getTracer(name || "azure/core-tracing", version);
-}
-/** Entrypoint for context API */
-const context = api.context;
-(function (SpanStatusCode) {
- /**
- * The default status.
- */
- SpanStatusCode[SpanStatusCode["UNSET"] = 0] = "UNSET";
- /**
- * The operation has been validated by an Application developer or
- * Operator to have completed successfully.
- */
- SpanStatusCode[SpanStatusCode["OK"] = 1] = "OK";
- /**
- * The operation contains an error.
- */
- SpanStatusCode[SpanStatusCode["ERROR"] = 2] = "ERROR";
-})(exports.SpanStatusCode || (exports.SpanStatusCode = {}));
-
-// Copyright (c) Microsoft Corporation.
-function isTracingDisabled() {
- var _a;
- if (typeof process === "undefined") {
- // not supported in browser for now without polyfills
- return false;
- }
- const azureTracingDisabledValue = (_a = process.env.AZURE_TRACING_DISABLED) === null || _a === void 0 ? void 0 : _a.toLowerCase();
- if (azureTracingDisabledValue === "false" || azureTracingDisabledValue === "0") {
- return false;
}
- return Boolean(azureTracingDisabledValue);
-}
-/**
- * Creates a function that can be used to create spans using the global tracer.
- *
- * Usage:
- *
- * ```typescript
- * // once
- * const createSpan = createSpanFunction({ packagePrefix: "Azure.Data.AppConfiguration", namespace: "Microsoft.AppConfiguration" });
- *
- * // in each operation
- * const span = createSpan("deleteConfigurationSetting", operationOptions);
- * // code...
- * span.end();
- * ```
- *
- * @hidden
- * @param args - allows configuration of the prefix for each span as well as the az.namespace field.
- */
-function createSpanFunction(args) {
- return function (operationName, operationOptions) {
- const tracer = getTracer();
- const tracingOptions = (operationOptions === null || operationOptions === void 0 ? void 0 : operationOptions.tracingOptions) || {};
- const spanOptions = Object.assign({ kind: exports.SpanKind.INTERNAL }, tracingOptions.spanOptions);
- const spanName = args.packagePrefix ? `${args.packagePrefix}.${operationName}` : operationName;
- let span;
- if (isTracingDisabled()) {
- span = api.trace.wrapSpanContext(api.INVALID_SPAN_CONTEXT);
+};
+const ContainerProperties = {
+ serializedName: "ContainerProperties",
+ type: {
+ name: "Composite",
+ className: "ContainerProperties",
+ modelProperties: {
+ lastModified: {
+ serializedName: "Last-Modified",
+ required: true,
+ xmlName: "Last-Modified",
+ type: {
+ name: "DateTimeRfc1123"
+ }
+ },
+ etag: {
+ serializedName: "Etag",
+ required: true,
+ xmlName: "Etag",
+ type: {
+ name: "String"
+ }
+ },
+ leaseStatus: {
+ serializedName: "LeaseStatus",
+ xmlName: "LeaseStatus",
+ type: {
+ name: "Enum",
+ allowedValues: ["locked", "unlocked"]
+ }
+ },
+ leaseState: {
+ serializedName: "LeaseState",
+ xmlName: "LeaseState",
+ type: {
+ name: "Enum",
+ allowedValues: [
+ "available",
+ "leased",
+ "expired",
+ "breaking",
+ "broken"
+ ]
+ }
+ },
+ leaseDuration: {
+ serializedName: "LeaseDuration",
+ xmlName: "LeaseDuration",
+ type: {
+ name: "Enum",
+ allowedValues: ["infinite", "fixed"]
+ }
+ },
+ publicAccess: {
+ serializedName: "PublicAccess",
+ xmlName: "PublicAccess",
+ type: {
+ name: "Enum",
+ allowedValues: ["container", "blob"]
+ }
+ },
+ hasImmutabilityPolicy: {
+ serializedName: "HasImmutabilityPolicy",
+ xmlName: "HasImmutabilityPolicy",
+ type: {
+ name: "Boolean"
+ }
+ },
+ hasLegalHold: {
+ serializedName: "HasLegalHold",
+ xmlName: "HasLegalHold",
+ type: {
+ name: "Boolean"
+ }
+ },
+ defaultEncryptionScope: {
+ serializedName: "DefaultEncryptionScope",
+ xmlName: "DefaultEncryptionScope",
+ type: {
+ name: "String"
+ }
+ },
+ preventEncryptionScopeOverride: {
+ serializedName: "DenyEncryptionScopeOverride",
+ xmlName: "DenyEncryptionScopeOverride",
+ type: {
+ name: "Boolean"
+ }
+ },
+ deletedOn: {
+ serializedName: "DeletedTime",
+ xmlName: "DeletedTime",
+ type: {
+ name: "DateTimeRfc1123"
+ }
+ },
+ remainingRetentionDays: {
+ serializedName: "RemainingRetentionDays",
+ xmlName: "RemainingRetentionDays",
+ type: {
+ name: "Number"
+ }
+ },
+ isImmutableStorageWithVersioningEnabled: {
+ serializedName: "ImmutableStorageWithVersioningEnabled",
+ xmlName: "ImmutableStorageWithVersioningEnabled",
+ type: {
+ name: "Boolean"
+ }
+ }
}
- else {
- span = tracer.startSpan(spanName, spanOptions, tracingOptions.tracingContext);
+ }
+};
+const KeyInfo = {
+ serializedName: "KeyInfo",
+ type: {
+ name: "Composite",
+ className: "KeyInfo",
+ modelProperties: {
+ startsOn: {
+ serializedName: "Start",
+ required: true,
+ xmlName: "Start",
+ type: {
+ name: "String"
+ }
+ },
+ expiresOn: {
+ serializedName: "Expiry",
+ required: true,
+ xmlName: "Expiry",
+ type: {
+ name: "String"
+ }
+ }
}
- if (args.namespace) {
- span.setAttribute("az.namespace", args.namespace);
+ }
+};
+const UserDelegationKey = {
+ serializedName: "UserDelegationKey",
+ type: {
+ name: "Composite",
+ className: "UserDelegationKey",
+ modelProperties: {
+ signedObjectId: {
+ serializedName: "SignedOid",
+ required: true,
+ xmlName: "SignedOid",
+ type: {
+ name: "String"
+ }
+ },
+ signedTenantId: {
+ serializedName: "SignedTid",
+ required: true,
+ xmlName: "SignedTid",
+ type: {
+ name: "String"
+ }
+ },
+ signedStartsOn: {
+ serializedName: "SignedStart",
+ required: true,
+ xmlName: "SignedStart",
+ type: {
+ name: "String"
+ }
+ },
+ signedExpiresOn: {
+ serializedName: "SignedExpiry",
+ required: true,
+ xmlName: "SignedExpiry",
+ type: {
+ name: "String"
+ }
+ },
+ signedService: {
+ serializedName: "SignedService",
+ required: true,
+ xmlName: "SignedService",
+ type: {
+ name: "String"
+ }
+ },
+ signedVersion: {
+ serializedName: "SignedVersion",
+ required: true,
+ xmlName: "SignedVersion",
+ type: {
+ name: "String"
+ }
+ },
+ value: {
+ serializedName: "Value",
+ required: true,
+ xmlName: "Value",
+ type: {
+ name: "String"
+ }
+ }
}
- let newSpanOptions = tracingOptions.spanOptions || {};
- if (span.isRecording() && args.namespace) {
- newSpanOptions = Object.assign(Object.assign({}, tracingOptions.spanOptions), { attributes: Object.assign(Object.assign({}, spanOptions.attributes), { "az.namespace": args.namespace }) });
+ }
+};
+const FilterBlobSegment = {
+ serializedName: "FilterBlobSegment",
+ xmlName: "EnumerationResults",
+ type: {
+ name: "Composite",
+ className: "FilterBlobSegment",
+ modelProperties: {
+ serviceEndpoint: {
+ serializedName: "ServiceEndpoint",
+ required: true,
+ xmlName: "ServiceEndpoint",
+ xmlIsAttribute: true,
+ type: {
+ name: "String"
+ }
+ },
+ where: {
+ serializedName: "Where",
+ required: true,
+ xmlName: "Where",
+ type: {
+ name: "String"
+ }
+ },
+ blobs: {
+ serializedName: "Blobs",
+ required: true,
+ xmlName: "Blobs",
+ xmlIsWrapped: true,
+ xmlElementName: "Blob",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "FilterBlobItem"
+ }
+ }
+ }
+ },
+ continuationToken: {
+ serializedName: "NextMarker",
+ xmlName: "NextMarker",
+ type: {
+ name: "String"
+ }
+ }
}
- const newTracingOptions = Object.assign(Object.assign({}, tracingOptions), { spanOptions: newSpanOptions, tracingContext: setSpan(tracingOptions.tracingContext || context.active(), span) });
- const newOperationOptions = Object.assign(Object.assign({}, operationOptions), { tracingOptions: newTracingOptions });
- return {
- span,
- updatedOptions: newOperationOptions
- };
- };
-}
-
-// Copyright (c) Microsoft Corporation.
-// Licensed under the MIT license.
-const VERSION = "00";
-/**
- * Generates a `SpanContext` given a `traceparent` header value.
- * @param traceParent - Serialized span context data as a `traceparent` header value.
- * @returns The `SpanContext` generated from the `traceparent` value.
- */
-function extractSpanContextFromTraceParentHeader(traceParentHeader) {
- const parts = traceParentHeader.split("-");
- if (parts.length !== 4) {
- return;
}
- const [version, traceId, spanId, traceOptions] = parts;
- if (version !== VERSION) {
- return;
+};
+const FilterBlobItem = {
+ serializedName: "FilterBlobItem",
+ xmlName: "Blob",
+ type: {
+ name: "Composite",
+ className: "FilterBlobItem",
+ modelProperties: {
+ name: {
+ serializedName: "Name",
+ required: true,
+ xmlName: "Name",
+ type: {
+ name: "String"
+ }
+ },
+ containerName: {
+ serializedName: "ContainerName",
+ required: true,
+ xmlName: "ContainerName",
+ type: {
+ name: "String"
+ }
+ },
+ tags: {
+ serializedName: "Tags",
+ xmlName: "Tags",
+ type: {
+ name: "Composite",
+ className: "BlobTags"
+ }
+ }
+ }
}
- const traceFlags = parseInt(traceOptions, 16);
- const spanContext = {
- spanId,
- traceId,
- traceFlags
- };
- return spanContext;
-}
-/**
- * Generates a `traceparent` value given a span context.
- * @param spanContext - Contains context for a specific span.
- * @returns The `spanContext` represented as a `traceparent` value.
- */
-function getTraceParentHeader(spanContext) {
- const missingFields = [];
- if (!spanContext.traceId) {
- missingFields.push("traceId");
+};
+const BlobTags = {
+ serializedName: "BlobTags",
+ xmlName: "Tags",
+ type: {
+ name: "Composite",
+ className: "BlobTags",
+ modelProperties: {
+ blobTagSet: {
+ serializedName: "BlobTagSet",
+ required: true,
+ xmlName: "TagSet",
+ xmlIsWrapped: true,
+ xmlElementName: "Tag",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "BlobTag"
+ }
+ }
+ }
+ }
+ }
}
- if (!spanContext.spanId) {
- missingFields.push("spanId");
+};
+const BlobTag = {
+ serializedName: "BlobTag",
+ xmlName: "Tag",
+ type: {
+ name: "Composite",
+ className: "BlobTag",
+ modelProperties: {
+ key: {
+ serializedName: "Key",
+ required: true,
+ xmlName: "Key",
+ type: {
+ name: "String"
+ }
+ },
+ value: {
+ serializedName: "Value",
+ required: true,
+ xmlName: "Value",
+ type: {
+ name: "String"
+ }
+ }
+ }
}
- if (missingFields.length) {
- return;
+};
+const SignedIdentifier = {
+ serializedName: "SignedIdentifier",
+ xmlName: "SignedIdentifier",
+ type: {
+ name: "Composite",
+ className: "SignedIdentifier",
+ modelProperties: {
+ id: {
+ serializedName: "Id",
+ required: true,
+ xmlName: "Id",
+ type: {
+ name: "String"
+ }
+ },
+ accessPolicy: {
+ serializedName: "AccessPolicy",
+ xmlName: "AccessPolicy",
+ type: {
+ name: "Composite",
+ className: "AccessPolicy"
+ }
+ }
+ }
}
- const flags = spanContext.traceFlags || 0 /* NONE */;
- const hexFlags = flags.toString(16);
- const traceFlags = hexFlags.length === 1 ? `0${hexFlags}` : hexFlags;
- // https://www.w3.org/TR/trace-context/#traceparent-header-field-values
- return `${VERSION}-${spanContext.traceId}-${spanContext.spanId}-${traceFlags}`;
-}
-
-exports.context = context;
-exports.createSpanFunction = createSpanFunction;
-exports.extractSpanContextFromTraceParentHeader = extractSpanContextFromTraceParentHeader;
-exports.getSpan = getSpan;
-exports.getSpanContext = getSpanContext;
-exports.getTraceParentHeader = getTraceParentHeader;
-exports.getTracer = getTracer;
-exports.isSpanContextValid = isSpanContextValid;
-exports.setSpan = setSpan;
-exports.setSpanContext = setSpanContext;
-//# sourceMappingURL=index.js.map
-
-
-/***/ }),
-
-/***/ 1333:
-/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
-
-"use strict";
-
-
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-
-var abortController = __nccwpck_require__(2557);
-var crypto = __nccwpck_require__(6113);
-
-// Copyright (c) Microsoft Corporation.
-/**
- * Creates an abortable promise.
- * @param buildPromise - A function that takes the resolve and reject functions as parameters.
- * @param options - The options for the abortable promise.
- * @returns A promise that can be aborted.
- */
-function createAbortablePromise(buildPromise, options) {
- const { cleanupBeforeAbort, abortSignal, abortErrorMsg } = options !== null && options !== void 0 ? options : {};
- return new Promise((resolve, reject) => {
- function rejectOnAbort() {
- reject(new abortController.AbortError(abortErrorMsg !== null && abortErrorMsg !== void 0 ? abortErrorMsg : "The operation was aborted."));
- }
- function removeListeners() {
- abortSignal === null || abortSignal === void 0 ? void 0 : abortSignal.removeEventListener("abort", onAbort);
- }
- function onAbort() {
- cleanupBeforeAbort === null || cleanupBeforeAbort === void 0 ? void 0 : cleanupBeforeAbort();
- removeListeners();
- rejectOnAbort();
- }
- if (abortSignal === null || abortSignal === void 0 ? void 0 : abortSignal.aborted) {
- return rejectOnAbort();
- }
- try {
- buildPromise((x) => {
- removeListeners();
- resolve(x);
- }, (x) => {
- removeListeners();
- reject(x);
- });
- }
- catch (err) {
- reject(err);
+};
+const AccessPolicy = {
+ serializedName: "AccessPolicy",
+ type: {
+ name: "Composite",
+ className: "AccessPolicy",
+ modelProperties: {
+ startsOn: {
+ serializedName: "Start",
+ xmlName: "Start",
+ type: {
+ name: "String"
+ }
+ },
+ expiresOn: {
+ serializedName: "Expiry",
+ xmlName: "Expiry",
+ type: {
+ name: "String"
+ }
+ },
+ permissions: {
+ serializedName: "Permission",
+ xmlName: "Permission",
+ type: {
+ name: "String"
+ }
+ }
}
- abortSignal === null || abortSignal === void 0 ? void 0 : abortSignal.addEventListener("abort", onAbort);
- });
-}
-
-// Copyright (c) Microsoft Corporation.
-const StandardAbortMessage = "The delay was aborted.";
-/**
- * A wrapper for setTimeout that resolves a promise after timeInMs milliseconds.
- * @param timeInMs - The number of milliseconds to be delayed.
- * @param options - The options for delay - currently abort options
- * @returns Promise that is resolved after timeInMs
- */
-function delay(timeInMs, options) {
- let token;
- const { abortSignal, abortErrorMsg } = options !== null && options !== void 0 ? options : {};
- return createAbortablePromise((resolve) => {
- token = setTimeout(resolve, timeInMs);
- }, {
- cleanupBeforeAbort: () => clearTimeout(token),
- abortSignal,
- abortErrorMsg: abortErrorMsg !== null && abortErrorMsg !== void 0 ? abortErrorMsg : StandardAbortMessage,
- });
-}
-
-// Copyright (c) Microsoft Corporation.
-/**
- * promise.race() wrapper that aborts rest of promises as soon as the first promise settles.
- */
-async function cancelablePromiseRace(abortablePromiseBuilders, options) {
- var _a, _b;
- const aborter = new abortController.AbortController();
- function abortHandler() {
- aborter.abort();
- }
- (_a = options === null || options === void 0 ? void 0 : options.abortSignal) === null || _a === void 0 ? void 0 : _a.addEventListener("abort", abortHandler);
- try {
- return await Promise.race(abortablePromiseBuilders.map((p) => p({ abortSignal: aborter.signal })));
- }
- finally {
- aborter.abort();
- (_b = options === null || options === void 0 ? void 0 : options.abortSignal) === null || _b === void 0 ? void 0 : _b.removeEventListener("abort", abortHandler);
- }
-}
-
-// Copyright (c) Microsoft Corporation.
-// Licensed under the MIT license.
-/**
- * Returns a random integer value between a lower and upper bound,
- * inclusive of both bounds.
- * Note that this uses Math.random and isn't secure. If you need to use
- * this for any kind of security purpose, find a better source of random.
- * @param min - The smallest integer value allowed.
- * @param max - The largest integer value allowed.
- */
-function getRandomIntegerInclusive(min, max) {
- // Make sure inputs are integers.
- min = Math.ceil(min);
- max = Math.floor(max);
- // Pick a random offset from zero to the size of the range.
- // Since Math.random() can never return 1, we have to make the range one larger
- // in order to be inclusive of the maximum value after we take the floor.
- const offset = Math.floor(Math.random() * (max - min + 1));
- return offset + min;
-}
-
-// Copyright (c) Microsoft Corporation.
-// Licensed under the MIT license.
-/**
- * Helper to determine when an input is a generic JS object.
- * @returns true when input is an object type that is not null, Array, RegExp, or Date.
- */
-function isObject(input) {
- return (typeof input === "object" &&
- input !== null &&
- !Array.isArray(input) &&
- !(input instanceof RegExp) &&
- !(input instanceof Date));
-}
-
-// Copyright (c) Microsoft Corporation.
-/**
- * Typeguard for an error object shape (has name and message)
- * @param e - Something caught by a catch clause.
- */
-function isError(e) {
- if (isObject(e)) {
- const hasName = typeof e.name === "string";
- const hasMessage = typeof e.message === "string";
- return hasName && hasMessage;
- }
- return false;
-}
-/**
- * Given what is thought to be an error object, return the message if possible.
- * If the message is missing, returns a stringified version of the input.
- * @param e - Something thrown from a try block
- * @returns The error message or a string of the input
- */
-function getErrorMessage(e) {
- if (isError(e)) {
- return e.message;
}
- else {
- let stringified;
- try {
- if (typeof e === "object" && e) {
- stringified = JSON.stringify(e);
- }
- else {
- stringified = String(e);
+};
+const ListBlobsFlatSegmentResponse = {
+ serializedName: "ListBlobsFlatSegmentResponse",
+ xmlName: "EnumerationResults",
+ type: {
+ name: "Composite",
+ className: "ListBlobsFlatSegmentResponse",
+ modelProperties: {
+ serviceEndpoint: {
+ serializedName: "ServiceEndpoint",
+ required: true,
+ xmlName: "ServiceEndpoint",
+ xmlIsAttribute: true,
+ type: {
+ name: "String"
+ }
+ },
+ containerName: {
+ serializedName: "ContainerName",
+ required: true,
+ xmlName: "ContainerName",
+ xmlIsAttribute: true,
+ type: {
+ name: "String"
+ }
+ },
+ prefix: {
+ serializedName: "Prefix",
+ xmlName: "Prefix",
+ type: {
+ name: "String"
+ }
+ },
+ marker: {
+ serializedName: "Marker",
+ xmlName: "Marker",
+ type: {
+ name: "String"
+ }
+ },
+ maxPageSize: {
+ serializedName: "MaxResults",
+ xmlName: "MaxResults",
+ type: {
+ name: "Number"
+ }
+ },
+ segment: {
+ serializedName: "Segment",
+ xmlName: "Blobs",
+ type: {
+ name: "Composite",
+ className: "BlobFlatListSegment"
+ }
+ },
+ continuationToken: {
+ serializedName: "NextMarker",
+ xmlName: "NextMarker",
+ type: {
+ name: "String"
+ }
}
}
- catch (err) {
- stringified = "[unable to stringify input]";
- }
- return `Unknown error ${stringified}`;
- }
-}
-
-// Copyright (c) Microsoft Corporation.
-/**
- * Generates a SHA-256 HMAC signature.
- * @param key - The HMAC key represented as a base64 string, used to generate the cryptographic HMAC hash.
- * @param stringToSign - The data to be signed.
- * @param encoding - The textual encoding to use for the returned HMAC digest.
- */
-async function computeSha256Hmac(key, stringToSign, encoding) {
- const decodedKey = Buffer.from(key, "base64");
- return crypto.createHmac("sha256", decodedKey).update(stringToSign).digest(encoding);
-}
-/**
- * Generates a SHA-256 hash.
- * @param content - The data to be included in the hash.
- * @param encoding - The textual encoding to use for the returned hash.
- */
-async function computeSha256Hash(content, encoding) {
- return crypto.createHash("sha256").update(content).digest(encoding);
-}
-
-// Copyright (c) Microsoft Corporation.
-// Licensed under the MIT license.
-/**
- * Helper TypeGuard that checks if something is defined or not.
- * @param thing - Anything
- */
-function isDefined(thing) {
- return typeof thing !== "undefined" && thing !== null;
-}
-/**
- * Helper TypeGuard that checks if the input is an object with the specified properties.
- * @param thing - Anything.
- * @param properties - The name of the properties that should appear in the object.
- */
-function isObjectWithProperties(thing, properties) {
- if (!isDefined(thing) || typeof thing !== "object") {
- return false;
}
- for (const property of properties) {
- if (!objectHasProperty(thing, property)) {
- return false;
+};
+const BlobFlatListSegment = {
+ serializedName: "BlobFlatListSegment",
+ xmlName: "Blobs",
+ type: {
+ name: "Composite",
+ className: "BlobFlatListSegment",
+ modelProperties: {
+ blobItems: {
+ serializedName: "BlobItems",
+ required: true,
+ xmlName: "BlobItems",
+ xmlElementName: "Blob",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "BlobItemInternal"
+ }
+ }
+ }
+ }
}
}
- return true;
-}
-/**
- * Helper TypeGuard that checks if the input is an object with the specified property.
- * @param thing - Any object.
- * @param property - The name of the property that should appear in the object.
- */
-function objectHasProperty(thing, property) {
- return (isDefined(thing) && typeof thing === "object" && property in thing);
-}
-
-// Copyright (c) Microsoft Corporation.
-// Licensed under the MIT license.
-/*
- * NOTE: When moving this file, please update "react-native" section in package.json.
- */
-/**
- * Generated Universally Unique Identifier
- *
- * @returns RFC4122 v4 UUID.
- */
-function generateUUID() {
- let uuid = "";
- for (let i = 0; i < 32; i++) {
- // Generate a random number between 0 and 15
- const randomNumber = Math.floor(Math.random() * 16);
- // Set the UUID version to 4 in the 13th position
- if (i === 12) {
- uuid += "4";
- }
- else if (i === 16) {
- // Set the UUID variant to "10" in the 17th position
- uuid += (randomNumber & 0x3) | 0x8;
- }
- else {
- // Add a random hexadecimal digit to the UUID string
- uuid += randomNumber.toString(16);
- }
- // Add hyphens to the UUID string at the appropriate positions
- if (i === 7 || i === 11 || i === 15 || i === 19) {
- uuid += "-";
+};
+const BlobItemInternal = {
+ serializedName: "BlobItemInternal",
+ xmlName: "Blob",
+ type: {
+ name: "Composite",
+ className: "BlobItemInternal",
+ modelProperties: {
+ name: {
+ serializedName: "Name",
+ xmlName: "Name",
+ type: {
+ name: "Composite",
+ className: "BlobName"
+ }
+ },
+ deleted: {
+ serializedName: "Deleted",
+ required: true,
+ xmlName: "Deleted",
+ type: {
+ name: "Boolean"
+ }
+ },
+ snapshot: {
+ serializedName: "Snapshot",
+ required: true,
+ xmlName: "Snapshot",
+ type: {
+ name: "String"
+ }
+ },
+ versionId: {
+ serializedName: "VersionId",
+ xmlName: "VersionId",
+ type: {
+ name: "String"
+ }
+ },
+ isCurrentVersion: {
+ serializedName: "IsCurrentVersion",
+ xmlName: "IsCurrentVersion",
+ type: {
+ name: "Boolean"
+ }
+ },
+ properties: {
+ serializedName: "Properties",
+ xmlName: "Properties",
+ type: {
+ name: "Composite",
+ className: "BlobPropertiesInternal"
+ }
+ },
+ metadata: {
+ serializedName: "Metadata",
+ xmlName: "Metadata",
+ type: {
+ name: "Dictionary",
+ value: { type: { name: "String" } }
+ }
+ },
+ blobTags: {
+ serializedName: "BlobTags",
+ xmlName: "Tags",
+ type: {
+ name: "Composite",
+ className: "BlobTags"
+ }
+ },
+ objectReplicationMetadata: {
+ serializedName: "ObjectReplicationMetadata",
+ xmlName: "OrMetadata",
+ type: {
+ name: "Dictionary",
+ value: { type: { name: "String" } }
+ }
+ },
+ hasVersionsOnly: {
+ serializedName: "HasVersionsOnly",
+ xmlName: "HasVersionsOnly",
+ type: {
+ name: "Boolean"
+ }
+ }
}
}
- return uuid;
-}
-
-// Copyright (c) Microsoft Corporation.
-// Licensed under the MIT license.
-var _a$1;
-// NOTE: This is a workaround until we can use `globalThis.crypto.randomUUID` in Node.js 19+.
-let uuidFunction = typeof ((_a$1 = globalThis === null || globalThis === void 0 ? void 0 : globalThis.crypto) === null || _a$1 === void 0 ? void 0 : _a$1.randomUUID) === "function"
- ? globalThis.crypto.randomUUID.bind(globalThis.crypto)
- : crypto.randomUUID;
-// Not defined in earlier versions of Node.js 14
-if (!uuidFunction) {
- uuidFunction = generateUUID;
-}
-/**
- * Generated Universally Unique Identifier
- *
- * @returns RFC4122 v4 UUID.
- */
-function randomUUID() {
- return uuidFunction();
-}
-
-// Copyright (c) Microsoft Corporation.
-// Licensed under the MIT license.
-var _a, _b, _c, _d;
-/**
- * A constant that indicates whether the environment the code is running is a Web Browser.
- */
-// eslint-disable-next-line @azure/azure-sdk/ts-no-window
-const isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined";
-/**
- * A constant that indicates whether the environment the code is running is a Web Worker.
- */
-const isWebWorker = typeof self === "object" &&
- typeof (self === null || self === void 0 ? void 0 : self.importScripts) === "function" &&
- (((_a = self.constructor) === null || _a === void 0 ? void 0 : _a.name) === "DedicatedWorkerGlobalScope" ||
- ((_b = self.constructor) === null || _b === void 0 ? void 0 : _b.name) === "ServiceWorkerGlobalScope" ||
- ((_c = self.constructor) === null || _c === void 0 ? void 0 : _c.name) === "SharedWorkerGlobalScope");
-/**
- * A constant that indicates whether the environment the code is running is Node.JS.
- */
-const isNode = typeof process !== "undefined" && Boolean(process.version) && Boolean((_d = process.versions) === null || _d === void 0 ? void 0 : _d.node);
-/**
- * A constant that indicates whether the environment the code is running is Deno.
- */
-const isDeno = typeof Deno !== "undefined" &&
- typeof Deno.version !== "undefined" &&
- typeof Deno.version.deno !== "undefined";
-/**
- * A constant that indicates whether the environment the code is running is Bun.sh.
- */
-const isBun = typeof Bun !== "undefined" && typeof Bun.version !== "undefined";
-/**
- * A constant that indicates whether the environment the code is running is in React-Native.
- */
-// https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/Core/setUpNavigator.js
-const isReactNative = typeof navigator !== "undefined" && (navigator === null || navigator === void 0 ? void 0 : navigator.product) === "ReactNative";
-
-// Copyright (c) Microsoft Corporation.
-// Licensed under the MIT license.
-/**
- * The helper that transforms bytes with specific character encoding into string
- * @param bytes - the uint8array bytes
- * @param format - the format we use to encode the byte
- * @returns a string of the encoded string
- */
-function uint8ArrayToString(bytes, format) {
- switch (format) {
- case "utf-8":
- return uint8ArrayToUtf8String(bytes);
- case "base64":
- return uint8ArrayToBase64(bytes);
- case "base64url":
- return uint8ArrayToBase64Url(bytes);
- }
-}
-/**
- * The helper that transforms string to specific character encoded bytes array.
- * @param value - the string to be converted
- * @param format - the format we use to decode the value
- * @returns a uint8array
- */
-function stringToUint8Array(value, format) {
- switch (format) {
- case "utf-8":
- return utf8StringToUint8Array(value);
- case "base64":
- return base64ToUint8Array(value);
- case "base64url":
- return base64UrlToUint8Array(value);
+};
+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",
+ xmlIsMsText: true,
+ type: {
+ name: "String"
+ }
+ }
+ }
}
-}
-/**
- * Decodes a Uint8Array into a Base64 string.
- * @internal
- */
-function uint8ArrayToBase64(bytes) {
- return Buffer.from(bytes).toString("base64");
-}
-/**
- * Decodes a Uint8Array into a Base64Url string.
- * @internal
- */
-function uint8ArrayToBase64Url(bytes) {
- return Buffer.from(bytes).toString("base64url");
-}
-/**
- * Decodes a Uint8Array into a javascript string.
- * @internal
- */
-function uint8ArrayToUtf8String(bytes) {
- return Buffer.from(bytes).toString("utf-8");
-}
-/**
- * Encodes a JavaScript string into a Uint8Array.
- * @internal
- */
-function utf8StringToUint8Array(value) {
- return Buffer.from(value);
-}
-/**
- * Encodes a Base64 string into a Uint8Array.
- * @internal
- */
-function base64ToUint8Array(value) {
- return Buffer.from(value, "base64");
-}
-/**
- * Encodes a Base64Url string into a Uint8Array.
- * @internal
- */
-function base64UrlToUint8Array(value) {
- return Buffer.from(value, "base64url");
-}
-
-exports.cancelablePromiseRace = cancelablePromiseRace;
-exports.computeSha256Hash = computeSha256Hash;
-exports.computeSha256Hmac = computeSha256Hmac;
-exports.createAbortablePromise = createAbortablePromise;
-exports.delay = delay;
-exports.getErrorMessage = getErrorMessage;
-exports.getRandomIntegerInclusive = getRandomIntegerInclusive;
-exports.isBrowser = isBrowser;
-exports.isBun = isBun;
-exports.isDefined = isDefined;
-exports.isDeno = isDeno;
-exports.isError = isError;
-exports.isNode = isNode;
-exports.isObject = isObject;
-exports.isObjectWithProperties = isObjectWithProperties;
-exports.isReactNative = isReactNative;
-exports.isWebWorker = isWebWorker;
-exports.objectHasProperty = objectHasProperty;
-exports.randomUUID = randomUUID;
-exports.stringToUint8Array = stringToUint8Array;
-exports.uint8ArrayToString = uint8ArrayToString;
-//# sourceMappingURL=index.js.map
-
-
-/***/ }),
-
-/***/ 3233:
-/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
-
-"use strict";
-
-
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-
-var os = __nccwpck_require__(2037);
-var util = __nccwpck_require__(3837);
-
-function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
-
-var util__default = /*#__PURE__*/_interopDefaultLegacy(util);
-
-// Copyright (c) Microsoft Corporation.
-function log(message, ...args) {
- process.stderr.write(`${util__default["default"].format(message, ...args)}${os.EOL}`);
-}
-
-// Copyright (c) Microsoft Corporation.
-const debugEnvVariable = (typeof process !== "undefined" && process.env && process.env.DEBUG) || undefined;
-let enabledString;
-let enabledNamespaces = [];
-let skippedNamespaces = [];
-const debuggers = [];
-if (debugEnvVariable) {
- enable(debugEnvVariable);
-}
-const debugObj = Object.assign((namespace) => {
- return createDebugger(namespace);
-}, {
- enable,
- enabled,
- disable,
- log,
-});
-function enable(namespaces) {
- enabledString = namespaces;
- enabledNamespaces = [];
- skippedNamespaces = [];
- const wildcard = /\*/g;
- const namespaceList = namespaces.split(",").map((ns) => ns.trim().replace(wildcard, ".*?"));
- for (const ns of namespaceList) {
- if (ns.startsWith("-")) {
- skippedNamespaces.push(new RegExp(`^${ns.substr(1)}$`));
- }
- else {
- enabledNamespaces.push(new RegExp(`^${ns}$`));
- }
- }
- for (const instance of debuggers) {
- instance.enabled = enabled(instance.namespace);
- }
-}
-function enabled(namespace) {
- if (namespace.endsWith("*")) {
- return true;
- }
- for (const skipped of skippedNamespaces) {
- if (skipped.test(namespace)) {
- return false;
- }
- }
- for (const enabledNamespace of enabledNamespaces) {
- if (enabledNamespace.test(namespace)) {
- return true;
- }
- }
- return false;
-}
-function disable() {
- const result = enabledString || "";
- enable("");
- return result;
-}
-function createDebugger(namespace) {
- const newDebugger = Object.assign(debug, {
- enabled: enabled(namespace),
- destroy,
- log: debugObj.log,
- namespace,
- extend,
- });
- function debug(...args) {
- if (!newDebugger.enabled) {
- return;
- }
- if (args.length > 0) {
- args[0] = `${namespace} ${args[0]}`;
- }
- newDebugger.log(...args);
- }
- debuggers.push(newDebugger);
- return newDebugger;
-}
-function destroy() {
- const index = debuggers.indexOf(this);
- if (index >= 0) {
- debuggers.splice(index, 1);
- return true;
- }
- return false;
-}
-function extend(namespace) {
- const newDebugger = createDebugger(`${this.namespace}:${namespace}`);
- newDebugger.log = this.log;
- return newDebugger;
-}
-var debug = debugObj;
-
-// Copyright (c) Microsoft Corporation.
-const registeredLoggers = new Set();
-const logLevelFromEnv = (typeof process !== "undefined" && process.env && process.env.AZURE_LOG_LEVEL) || undefined;
-let azureLogLevel;
-/**
- * The AzureLogger provides a mechanism for overriding where logs are output to.
- * By default, logs are sent to stderr.
- * Override the `log` method to redirect logs to another location.
- */
-const AzureLogger = debug("azure");
-AzureLogger.log = (...args) => {
- debug.log(...args);
-};
-const AZURE_LOG_LEVELS = ["verbose", "info", "warning", "error"];
-if (logLevelFromEnv) {
- // avoid calling setLogLevel because we don't want a mis-set environment variable to crash
- if (isAzureLogLevel(logLevelFromEnv)) {
- setLogLevel(logLevelFromEnv);
- }
- else {
- console.error(`AZURE_LOG_LEVEL set to unknown log level '${logLevelFromEnv}'; logging is not enabled. Acceptable values: ${AZURE_LOG_LEVELS.join(", ")}.`);
- }
-}
-/**
- * Immediately enables logging at the specified log level. If no level is specified, logging is disabled.
- * @param level - The log level to enable for logging.
- * Options from most verbose to least verbose are:
- * - verbose
- * - info
- * - warning
- * - error
- */
-function setLogLevel(level) {
- if (level && !isAzureLogLevel(level)) {
- throw new Error(`Unknown log level '${level}'. Acceptable values: ${AZURE_LOG_LEVELS.join(",")}`);
- }
- azureLogLevel = level;
- const enabledNamespaces = [];
- for (const logger of registeredLoggers) {
- if (shouldEnable(logger)) {
- enabledNamespaces.push(logger.namespace);
- }
- }
- debug.enable(enabledNamespaces.join(","));
-}
-/**
- * Retrieves the currently specified log level.
- */
-function getLogLevel() {
- return azureLogLevel;
-}
-const levelMap = {
- verbose: 400,
- info: 300,
- warning: 200,
- error: 100,
};
-/**
- * Creates a logger for use by the Azure SDKs that inherits from `AzureLogger`.
- * @param namespace - The name of the SDK package.
- * @hidden
- */
-function createClientLogger(namespace) {
- const clientRootLogger = AzureLogger.extend(namespace);
- patchLogMethod(AzureLogger, clientRootLogger);
- return {
- error: createLogger(clientRootLogger, "error"),
- warning: createLogger(clientRootLogger, "warning"),
- info: createLogger(clientRootLogger, "info"),
- verbose: createLogger(clientRootLogger, "verbose"),
- };
-}
-function patchLogMethod(parent, child) {
- child.log = (...args) => {
- parent.log(...args);
- };
-}
-function createLogger(parent, level) {
- const logger = Object.assign(parent.extend(level), {
- level,
- });
- patchLogMethod(parent, logger);
- if (shouldEnable(logger)) {
- const enabledNamespaces = debug.disable();
- debug.enable(enabledNamespaces + "," + logger.namespace);
- }
- registeredLoggers.add(logger);
- return logger;
-}
-function shouldEnable(logger) {
- return Boolean(azureLogLevel && levelMap[logger.level] <= levelMap[azureLogLevel]);
-}
-function isAzureLogLevel(logLevel) {
- return AZURE_LOG_LEVELS.includes(logLevel);
-}
-
-exports.AzureLogger = AzureLogger;
-exports.createClientLogger = createClientLogger;
-exports.getLogLevel = getLogLevel;
-exports.setLogLevel = setLogLevel;
-//# sourceMappingURL=index.js.map
-
-
-/***/ }),
-
-/***/ 4100:
-/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
-
-"use strict";
-
-
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-
-var coreHttp = __nccwpck_require__(4607);
-var tslib = __nccwpck_require__(9679);
-var coreTracing = __nccwpck_require__(4175);
-var logger$1 = __nccwpck_require__(3233);
-var abortController = __nccwpck_require__(2557);
-var os = __nccwpck_require__(2037);
-var crypto = __nccwpck_require__(6113);
-var stream = __nccwpck_require__(2781);
-__nccwpck_require__(4559);
-var coreLro = __nccwpck_require__(7094);
-var events = __nccwpck_require__(2361);
-var fs = __nccwpck_require__(7147);
-var util = __nccwpck_require__(3837);
-
-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.
- * Licensed under the MIT License.
- *
- * Code generated by Microsoft (R) AutoRest Code Generator.
- * Changes may cause incorrect behavior and will be lost if the code is regenerated.
- */
-const BlobServiceProperties = {
- serializedName: "BlobServiceProperties",
- xmlName: "StorageServiceProperties",
+const BlobPropertiesInternal = {
+ serializedName: "BlobPropertiesInternal",
+ xmlName: "Properties",
type: {
name: "Composite",
- className: "BlobServiceProperties",
+ className: "BlobPropertiesInternal",
modelProperties: {
- blobAnalyticsLogging: {
- serializedName: "Logging",
- xmlName: "Logging",
+ createdOn: {
+ serializedName: "Creation-Time",
+ xmlName: "Creation-Time",
type: {
- name: "Composite",
- className: "Logging"
+ name: "DateTimeRfc1123"
}
},
- hourMetrics: {
- serializedName: "HourMetrics",
- xmlName: "HourMetrics",
+ lastModified: {
+ serializedName: "Last-Modified",
+ required: true,
+ xmlName: "Last-Modified",
type: {
- name: "Composite",
- className: "Metrics"
+ name: "DateTimeRfc1123"
}
},
- minuteMetrics: {
- serializedName: "MinuteMetrics",
- xmlName: "MinuteMetrics",
+ etag: {
+ serializedName: "Etag",
+ required: true,
+ xmlName: "Etag",
type: {
- name: "Composite",
- className: "Metrics"
+ name: "String"
}
},
- cors: {
- serializedName: "Cors",
- xmlName: "Cors",
- xmlIsWrapped: true,
- xmlElementName: "CorsRule",
+ contentLength: {
+ serializedName: "Content-Length",
+ xmlName: "Content-Length",
type: {
- name: "Sequence",
- element: {
- type: {
- name: "Composite",
- className: "CorsRule"
- }
- }
+ name: "Number"
}
},
- defaultServiceVersion: {
- serializedName: "DefaultServiceVersion",
- xmlName: "DefaultServiceVersion",
+ contentType: {
+ serializedName: "Content-Type",
+ xmlName: "Content-Type",
type: {
name: "String"
}
},
- deleteRetentionPolicy: {
- serializedName: "DeleteRetentionPolicy",
- xmlName: "DeleteRetentionPolicy",
+ contentEncoding: {
+ serializedName: "Content-Encoding",
+ xmlName: "Content-Encoding",
type: {
- name: "Composite",
- className: "RetentionPolicy"
+ name: "String"
}
},
- staticWebsite: {
- serializedName: "StaticWebsite",
- xmlName: "StaticWebsite",
+ contentLanguage: {
+ serializedName: "Content-Language",
+ xmlName: "Content-Language",
type: {
- name: "Composite",
- className: "StaticWebsite"
+ name: "String"
}
- }
- }
- }
-};
-const Logging = {
- serializedName: "Logging",
- type: {
- name: "Composite",
- className: "Logging",
- modelProperties: {
- version: {
- serializedName: "Version",
- required: true,
- xmlName: "Version",
+ },
+ contentMD5: {
+ serializedName: "Content-MD5",
+ xmlName: "Content-MD5",
+ type: {
+ name: "ByteArray"
+ }
+ },
+ contentDisposition: {
+ serializedName: "Content-Disposition",
+ xmlName: "Content-Disposition",
type: {
name: "String"
}
},
- deleteProperty: {
- serializedName: "Delete",
- required: true,
- xmlName: "Delete",
+ cacheControl: {
+ serializedName: "Cache-Control",
+ xmlName: "Cache-Control",
type: {
- name: "Boolean"
+ name: "String"
}
},
- read: {
- serializedName: "Read",
- required: true,
- xmlName: "Read",
+ blobSequenceNumber: {
+ serializedName: "x-ms-blob-sequence-number",
+ xmlName: "x-ms-blob-sequence-number",
type: {
- name: "Boolean"
+ name: "Number"
}
},
- write: {
- serializedName: "Write",
- required: true,
- xmlName: "Write",
+ blobType: {
+ serializedName: "BlobType",
+ xmlName: "BlobType",
type: {
- name: "Boolean"
+ name: "Enum",
+ allowedValues: ["BlockBlob", "PageBlob", "AppendBlob"]
}
},
- retentionPolicy: {
- serializedName: "RetentionPolicy",
- xmlName: "RetentionPolicy",
+ leaseStatus: {
+ serializedName: "LeaseStatus",
+ xmlName: "LeaseStatus",
type: {
- name: "Composite",
- className: "RetentionPolicy"
+ name: "Enum",
+ allowedValues: ["locked", "unlocked"]
}
- }
- }
- }
-};
-const RetentionPolicy = {
- serializedName: "RetentionPolicy",
- type: {
- name: "Composite",
- className: "RetentionPolicy",
- modelProperties: {
- enabled: {
- serializedName: "Enabled",
- required: true,
- xmlName: "Enabled",
+ },
+ leaseState: {
+ serializedName: "LeaseState",
+ xmlName: "LeaseState",
type: {
- name: "Boolean"
+ name: "Enum",
+ allowedValues: [
+ "available",
+ "leased",
+ "expired",
+ "breaking",
+ "broken"
+ ]
}
},
- days: {
- constraints: {
- InclusiveMinimum: 1
- },
- serializedName: "Days",
- xmlName: "Days",
+ leaseDuration: {
+ serializedName: "LeaseDuration",
+ xmlName: "LeaseDuration",
type: {
- name: "Number"
+ name: "Enum",
+ allowedValues: ["infinite", "fixed"]
}
- }
- }
- }
-};
-const Metrics = {
- serializedName: "Metrics",
- type: {
- name: "Composite",
- className: "Metrics",
- modelProperties: {
- version: {
- serializedName: "Version",
- xmlName: "Version",
+ },
+ copyId: {
+ serializedName: "CopyId",
+ xmlName: "CopyId",
type: {
name: "String"
}
},
- enabled: {
- serializedName: "Enabled",
- required: true,
- xmlName: "Enabled",
+ copyStatus: {
+ serializedName: "CopyStatus",
+ xmlName: "CopyStatus",
type: {
- name: "Boolean"
+ name: "Enum",
+ allowedValues: ["pending", "success", "aborted", "failed"]
}
},
- includeAPIs: {
- serializedName: "IncludeAPIs",
- xmlName: "IncludeAPIs",
+ copySource: {
+ serializedName: "CopySource",
+ xmlName: "CopySource",
type: {
- name: "Boolean"
+ name: "String"
}
},
- retentionPolicy: {
- serializedName: "RetentionPolicy",
- xmlName: "RetentionPolicy",
+ copyProgress: {
+ serializedName: "CopyProgress",
+ xmlName: "CopyProgress",
type: {
- name: "Composite",
- className: "RetentionPolicy"
+ name: "String"
}
- }
- }
- }
-};
-const CorsRule = {
- serializedName: "CorsRule",
- type: {
- name: "Composite",
- className: "CorsRule",
- modelProperties: {
- allowedOrigins: {
- serializedName: "AllowedOrigins",
- required: true,
- xmlName: "AllowedOrigins",
+ },
+ copyCompletedOn: {
+ serializedName: "CopyCompletionTime",
+ xmlName: "CopyCompletionTime",
type: {
- name: "String"
+ name: "DateTimeRfc1123"
}
},
- allowedMethods: {
- serializedName: "AllowedMethods",
- required: true,
- xmlName: "AllowedMethods",
+ copyStatusDescription: {
+ serializedName: "CopyStatusDescription",
+ xmlName: "CopyStatusDescription",
type: {
name: "String"
}
},
- allowedHeaders: {
- serializedName: "AllowedHeaders",
- required: true,
- xmlName: "AllowedHeaders",
+ serverEncrypted: {
+ serializedName: "ServerEncrypted",
+ xmlName: "ServerEncrypted",
type: {
- name: "String"
+ name: "Boolean"
}
},
- exposedHeaders: {
- serializedName: "ExposedHeaders",
- required: true,
- xmlName: "ExposedHeaders",
+ incrementalCopy: {
+ serializedName: "IncrementalCopy",
+ xmlName: "IncrementalCopy",
+ type: {
+ name: "Boolean"
+ }
+ },
+ destinationSnapshot: {
+ serializedName: "DestinationSnapshot",
+ xmlName: "DestinationSnapshot",
type: {
name: "String"
}
},
- maxAgeInSeconds: {
- constraints: {
- InclusiveMinimum: 0
- },
- serializedName: "MaxAgeInSeconds",
- required: true,
- xmlName: "MaxAgeInSeconds",
+ deletedOn: {
+ serializedName: "DeletedTime",
+ xmlName: "DeletedTime",
+ type: {
+ name: "DateTimeRfc1123"
+ }
+ },
+ remainingRetentionDays: {
+ serializedName: "RemainingRetentionDays",
+ xmlName: "RemainingRetentionDays",
type: {
name: "Number"
}
- }
- }
- }
-};
-const StaticWebsite = {
- serializedName: "StaticWebsite",
- type: {
- name: "Composite",
- className: "StaticWebsite",
- modelProperties: {
- enabled: {
- serializedName: "Enabled",
- required: true,
- xmlName: "Enabled",
+ },
+ accessTier: {
+ serializedName: "AccessTier",
+ xmlName: "AccessTier",
+ type: {
+ name: "Enum",
+ allowedValues: [
+ "P4",
+ "P6",
+ "P10",
+ "P15",
+ "P20",
+ "P30",
+ "P40",
+ "P50",
+ "P60",
+ "P70",
+ "P80",
+ "Hot",
+ "Cool",
+ "Archive",
+ "Cold"
+ ]
+ }
+ },
+ accessTierInferred: {
+ serializedName: "AccessTierInferred",
+ xmlName: "AccessTierInferred",
type: {
name: "Boolean"
}
},
- indexDocument: {
- serializedName: "IndexDocument",
- xmlName: "IndexDocument",
+ archiveStatus: {
+ serializedName: "ArchiveStatus",
+ xmlName: "ArchiveStatus",
type: {
- name: "String"
+ name: "Enum",
+ allowedValues: [
+ "rehydrate-pending-to-hot",
+ "rehydrate-pending-to-cool",
+ "rehydrate-pending-to-cold"
+ ]
}
},
- errorDocument404Path: {
- serializedName: "ErrorDocument404Path",
- xmlName: "ErrorDocument404Path",
+ customerProvidedKeySha256: {
+ serializedName: "CustomerProvidedKeySha256",
+ xmlName: "CustomerProvidedKeySha256",
type: {
name: "String"
}
},
- defaultIndexDocumentPath: {
- serializedName: "DefaultIndexDocumentPath",
- xmlName: "DefaultIndexDocumentPath",
+ encryptionScope: {
+ serializedName: "EncryptionScope",
+ xmlName: "EncryptionScope",
type: {
name: "String"
}
- }
- }
- }
-};
-const StorageError = {
- serializedName: "StorageError",
- type: {
- name: "Composite",
- className: "StorageError",
- modelProperties: {
- message: {
- serializedName: "Message",
- xmlName: "Message",
+ },
+ accessTierChangedOn: {
+ serializedName: "AccessTierChangeTime",
+ xmlName: "AccessTierChangeTime",
type: {
- name: "String"
+ name: "DateTimeRfc1123"
}
},
- code: {
- serializedName: "Code",
- xmlName: "Code",
+ tagCount: {
+ serializedName: "TagCount",
+ xmlName: "TagCount",
type: {
- name: "String"
+ name: "Number"
}
- }
- }
- }
-};
-const BlobServiceStatistics = {
- serializedName: "BlobServiceStatistics",
- xmlName: "StorageServiceStats",
- type: {
- name: "Composite",
- className: "BlobServiceStatistics",
- modelProperties: {
- geoReplication: {
- serializedName: "GeoReplication",
- xmlName: "GeoReplication",
+ },
+ expiresOn: {
+ serializedName: "Expiry-Time",
+ xmlName: "Expiry-Time",
type: {
- name: "Composite",
- className: "GeoReplication"
+ name: "DateTimeRfc1123"
}
- }
- }
- }
-};
-const GeoReplication = {
- serializedName: "GeoReplication",
- type: {
- name: "Composite",
- className: "GeoReplication",
- modelProperties: {
- status: {
- serializedName: "Status",
- required: true,
- xmlName: "Status",
+ },
+ isSealed: {
+ serializedName: "Sealed",
+ xmlName: "Sealed",
+ type: {
+ name: "Boolean"
+ }
+ },
+ rehydratePriority: {
+ serializedName: "RehydratePriority",
+ xmlName: "RehydratePriority",
type: {
name: "Enum",
- allowedValues: ["live", "bootstrap", "unavailable"]
+ allowedValues: ["High", "Standard"]
}
},
- lastSyncOn: {
- serializedName: "LastSyncTime",
- required: true,
- xmlName: "LastSyncTime",
+ lastAccessedOn: {
+ serializedName: "LastAccessTime",
+ xmlName: "LastAccessTime",
+ type: {
+ name: "DateTimeRfc1123"
+ }
+ },
+ immutabilityPolicyExpiresOn: {
+ serializedName: "ImmutabilityPolicyUntilDate",
+ xmlName: "ImmutabilityPolicyUntilDate",
type: {
name: "DateTimeRfc1123"
}
+ },
+ immutabilityPolicyMode: {
+ serializedName: "ImmutabilityPolicyMode",
+ xmlName: "ImmutabilityPolicyMode",
+ type: {
+ name: "Enum",
+ allowedValues: ["Mutable", "Unlocked", "Locked"]
+ }
+ },
+ legalHold: {
+ serializedName: "LegalHold",
+ xmlName: "LegalHold",
+ type: {
+ name: "Boolean"
+ }
}
}
}
};
-const ListContainersSegmentResponse = {
- serializedName: "ListContainersSegmentResponse",
+const ListBlobsHierarchySegmentResponse = {
+ serializedName: "ListBlobsHierarchySegmentResponse",
xmlName: "EnumerationResults",
type: {
name: "Composite",
- className: "ListContainersSegmentResponse",
+ className: "ListBlobsHierarchySegmentResponse",
modelProperties: {
serviceEndpoint: {
serializedName: "ServiceEndpoint",
@@ -16086,6 +15011,15 @@ const ListContainersSegmentResponse = {
name: "String"
}
},
+ containerName: {
+ serializedName: "ContainerName",
+ required: true,
+ xmlName: "ContainerName",
+ xmlIsAttribute: true,
+ type: {
+ name: "String"
+ }
+ },
prefix: {
serializedName: "Prefix",
xmlName: "Prefix",
@@ -16107,385 +15041,485 @@ const ListContainersSegmentResponse = {
name: "Number"
}
},
- containerItems: {
- serializedName: "ContainerItems",
- required: true,
- xmlName: "Containers",
- xmlIsWrapped: true,
- xmlElementName: "Container",
+ delimiter: {
+ serializedName: "Delimiter",
+ xmlName: "Delimiter",
+ type: {
+ name: "String"
+ }
+ },
+ segment: {
+ serializedName: "Segment",
+ xmlName: "Blobs",
+ type: {
+ name: "Composite",
+ className: "BlobHierarchyListSegment"
+ }
+ },
+ continuationToken: {
+ serializedName: "NextMarker",
+ xmlName: "NextMarker",
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+};
+const BlobHierarchyListSegment = {
+ serializedName: "BlobHierarchyListSegment",
+ xmlName: "Blobs",
+ type: {
+ name: "Composite",
+ className: "BlobHierarchyListSegment",
+ modelProperties: {
+ blobPrefixes: {
+ serializedName: "BlobPrefixes",
+ xmlName: "BlobPrefixes",
+ xmlElementName: "BlobPrefix",
type: {
name: "Sequence",
element: {
type: {
name: "Composite",
- className: "ContainerItem"
+ className: "BlobPrefix"
}
}
}
},
- continuationToken: {
- serializedName: "NextMarker",
- xmlName: "NextMarker",
+ blobItems: {
+ serializedName: "BlobItems",
+ required: true,
+ xmlName: "BlobItems",
+ xmlElementName: "Blob",
type: {
- name: "String"
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "BlobItemInternal"
+ }
+ }
}
}
}
}
};
-const ContainerItem = {
- serializedName: "ContainerItem",
- xmlName: "Container",
+const BlobPrefix = {
+ serializedName: "BlobPrefix",
type: {
name: "Composite",
- className: "ContainerItem",
+ className: "BlobPrefix",
modelProperties: {
name: {
serializedName: "Name",
- required: true,
xmlName: "Name",
type: {
- name: "String"
- }
- },
- deleted: {
- serializedName: "Deleted",
- xmlName: "Deleted",
- type: {
- name: "Boolean"
+ name: "Composite",
+ className: "BlobName"
}
- },
- version: {
- serializedName: "Version",
- xmlName: "Version",
+ }
+ }
+ }
+};
+const BlockLookupList = {
+ serializedName: "BlockLookupList",
+ xmlName: "BlockList",
+ type: {
+ name: "Composite",
+ className: "BlockLookupList",
+ modelProperties: {
+ committed: {
+ serializedName: "Committed",
+ xmlName: "Committed",
+ xmlElementName: "Committed",
type: {
- name: "String"
+ name: "Sequence",
+ element: {
+ type: {
+ name: "String"
+ }
+ }
}
},
- properties: {
- serializedName: "Properties",
- xmlName: "Properties",
+ uncommitted: {
+ serializedName: "Uncommitted",
+ xmlName: "Uncommitted",
+ xmlElementName: "Uncommitted",
type: {
- name: "Composite",
- className: "ContainerProperties"
+ name: "Sequence",
+ element: {
+ type: {
+ name: "String"
+ }
+ }
}
},
- metadata: {
- serializedName: "Metadata",
- xmlName: "Metadata",
+ latest: {
+ serializedName: "Latest",
+ xmlName: "Latest",
+ xmlElementName: "Latest",
type: {
- name: "Dictionary",
- value: { type: { name: "String" } }
+ name: "Sequence",
+ element: {
+ type: {
+ name: "String"
+ }
+ }
}
}
}
}
};
-const ContainerProperties = {
- serializedName: "ContainerProperties",
+const BlockList = {
+ serializedName: "BlockList",
type: {
name: "Composite",
- className: "ContainerProperties",
+ className: "BlockList",
modelProperties: {
- lastModified: {
- serializedName: "Last-Modified",
- required: true,
- xmlName: "Last-Modified",
+ committedBlocks: {
+ serializedName: "CommittedBlocks",
+ xmlName: "CommittedBlocks",
+ xmlIsWrapped: true,
+ xmlElementName: "Block",
type: {
- name: "DateTimeRfc1123"
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "Block"
+ }
+ }
}
},
- etag: {
- serializedName: "Etag",
- required: true,
- xmlName: "Etag",
+ uncommittedBlocks: {
+ serializedName: "UncommittedBlocks",
+ xmlName: "UncommittedBlocks",
+ xmlIsWrapped: true,
+ xmlElementName: "Block",
type: {
- name: "String"
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "Block"
+ }
+ }
}
- },
- leaseStatus: {
- serializedName: "LeaseStatus",
- xmlName: "LeaseStatus",
+ }
+ }
+ }
+};
+const Block = {
+ serializedName: "Block",
+ type: {
+ name: "Composite",
+ className: "Block",
+ modelProperties: {
+ name: {
+ serializedName: "Name",
+ required: true,
+ xmlName: "Name",
type: {
- name: "Enum",
- allowedValues: ["locked", "unlocked"]
+ name: "String"
}
},
- leaseState: {
- serializedName: "LeaseState",
- xmlName: "LeaseState",
+ size: {
+ serializedName: "Size",
+ required: true,
+ xmlName: "Size",
type: {
- name: "Enum",
- allowedValues: [
- "available",
- "leased",
- "expired",
- "breaking",
- "broken"
- ]
+ name: "Number"
}
- },
- leaseDuration: {
- serializedName: "LeaseDuration",
- xmlName: "LeaseDuration",
+ }
+ }
+ }
+};
+const PageList = {
+ serializedName: "PageList",
+ type: {
+ name: "Composite",
+ className: "PageList",
+ modelProperties: {
+ pageRange: {
+ serializedName: "PageRange",
+ xmlName: "PageRange",
+ xmlElementName: "PageRange",
type: {
- name: "Enum",
- allowedValues: ["infinite", "fixed"]
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "PageRange"
+ }
+ }
}
},
- publicAccess: {
- serializedName: "PublicAccess",
- xmlName: "PublicAccess",
+ clearRange: {
+ serializedName: "ClearRange",
+ xmlName: "ClearRange",
+ xmlElementName: "ClearRange",
type: {
- name: "Enum",
- allowedValues: ["container", "blob"]
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "ClearRange"
+ }
+ }
}
},
- hasImmutabilityPolicy: {
- serializedName: "HasImmutabilityPolicy",
- xmlName: "HasImmutabilityPolicy",
+ continuationToken: {
+ serializedName: "NextMarker",
+ xmlName: "NextMarker",
type: {
- name: "Boolean"
+ name: "String"
}
- },
- hasLegalHold: {
- serializedName: "HasLegalHold",
- xmlName: "HasLegalHold",
- type: {
- name: "Boolean"
- }
- },
- defaultEncryptionScope: {
- serializedName: "DefaultEncryptionScope",
- xmlName: "DefaultEncryptionScope",
- type: {
- name: "String"
- }
- },
- preventEncryptionScopeOverride: {
- serializedName: "DenyEncryptionScopeOverride",
- xmlName: "DenyEncryptionScopeOverride",
- type: {
- name: "Boolean"
- }
- },
- deletedOn: {
- serializedName: "DeletedTime",
- xmlName: "DeletedTime",
- type: {
- name: "DateTimeRfc1123"
- }
- },
- remainingRetentionDays: {
- serializedName: "RemainingRetentionDays",
- xmlName: "RemainingRetentionDays",
+ }
+ }
+ }
+};
+const PageRange = {
+ serializedName: "PageRange",
+ xmlName: "PageRange",
+ type: {
+ name: "Composite",
+ className: "PageRange",
+ modelProperties: {
+ start: {
+ serializedName: "Start",
+ required: true,
+ xmlName: "Start",
type: {
name: "Number"
}
},
- isImmutableStorageWithVersioningEnabled: {
- serializedName: "ImmutableStorageWithVersioningEnabled",
- xmlName: "ImmutableStorageWithVersioningEnabled",
+ end: {
+ serializedName: "End",
+ required: true,
+ xmlName: "End",
type: {
- name: "Boolean"
+ name: "Number"
}
}
}
}
};
-const KeyInfo = {
- serializedName: "KeyInfo",
+const ClearRange = {
+ serializedName: "ClearRange",
+ xmlName: "ClearRange",
type: {
name: "Composite",
- className: "KeyInfo",
+ className: "ClearRange",
modelProperties: {
- startsOn: {
+ start: {
serializedName: "Start",
required: true,
xmlName: "Start",
type: {
- name: "String"
+ name: "Number"
}
},
- expiresOn: {
- serializedName: "Expiry",
+ end: {
+ serializedName: "End",
required: true,
- xmlName: "Expiry",
+ xmlName: "End",
type: {
- name: "String"
+ name: "Number"
}
}
}
}
};
-const UserDelegationKey = {
- serializedName: "UserDelegationKey",
+const QueryRequest = {
+ serializedName: "QueryRequest",
+ xmlName: "QueryRequest",
type: {
name: "Composite",
- className: "UserDelegationKey",
+ className: "QueryRequest",
modelProperties: {
- signedObjectId: {
- serializedName: "SignedOid",
+ queryType: {
+ serializedName: "QueryType",
required: true,
- xmlName: "SignedOid",
+ xmlName: "QueryType",
type: {
name: "String"
}
},
- signedTenantId: {
- serializedName: "SignedTid",
+ expression: {
+ serializedName: "Expression",
required: true,
- xmlName: "SignedTid",
+ xmlName: "Expression",
type: {
name: "String"
}
},
- signedStartsOn: {
- serializedName: "SignedStart",
- required: true,
- xmlName: "SignedStart",
+ inputSerialization: {
+ serializedName: "InputSerialization",
+ xmlName: "InputSerialization",
type: {
- name: "String"
+ name: "Composite",
+ className: "QuerySerialization"
}
},
- signedExpiresOn: {
- serializedName: "SignedExpiry",
+ outputSerialization: {
+ serializedName: "OutputSerialization",
+ xmlName: "OutputSerialization",
+ type: {
+ name: "Composite",
+ className: "QuerySerialization"
+ }
+ }
+ }
+ }
+};
+const QuerySerialization = {
+ serializedName: "QuerySerialization",
+ type: {
+ name: "Composite",
+ className: "QuerySerialization",
+ modelProperties: {
+ format: {
+ serializedName: "Format",
+ xmlName: "Format",
+ type: {
+ name: "Composite",
+ className: "QueryFormat"
+ }
+ }
+ }
+ }
+};
+const QueryFormat = {
+ serializedName: "QueryFormat",
+ type: {
+ name: "Composite",
+ className: "QueryFormat",
+ modelProperties: {
+ type: {
+ serializedName: "Type",
required: true,
- xmlName: "SignedExpiry",
+ xmlName: "Type",
type: {
- name: "String"
+ name: "Enum",
+ allowedValues: ["delimited", "json", "arrow", "parquet"]
}
},
- signedService: {
- serializedName: "SignedService",
- required: true,
- xmlName: "SignedService",
+ delimitedTextConfiguration: {
+ serializedName: "DelimitedTextConfiguration",
+ xmlName: "DelimitedTextConfiguration",
type: {
- name: "String"
+ name: "Composite",
+ className: "DelimitedTextConfiguration"
}
},
- signedVersion: {
- serializedName: "SignedVersion",
- required: true,
- xmlName: "SignedVersion",
+ jsonTextConfiguration: {
+ serializedName: "JsonTextConfiguration",
+ xmlName: "JsonTextConfiguration",
type: {
- name: "String"
+ name: "Composite",
+ className: "JsonTextConfiguration"
}
},
- value: {
- serializedName: "Value",
- required: true,
- xmlName: "Value",
+ arrowConfiguration: {
+ serializedName: "ArrowConfiguration",
+ xmlName: "ArrowConfiguration",
type: {
- name: "String"
+ name: "Composite",
+ className: "ArrowConfiguration"
+ }
+ },
+ parquetTextConfiguration: {
+ serializedName: "ParquetTextConfiguration",
+ xmlName: "ParquetTextConfiguration",
+ type: {
+ name: "any"
}
}
}
}
};
-const FilterBlobSegment = {
- serializedName: "FilterBlobSegment",
- xmlName: "EnumerationResults",
+const DelimitedTextConfiguration = {
+ serializedName: "DelimitedTextConfiguration",
+ xmlName: "DelimitedTextConfiguration",
type: {
name: "Composite",
- className: "FilterBlobSegment",
+ className: "DelimitedTextConfiguration",
modelProperties: {
- serviceEndpoint: {
- serializedName: "ServiceEndpoint",
- required: true,
- xmlName: "ServiceEndpoint",
- xmlIsAttribute: true,
+ columnSeparator: {
+ serializedName: "ColumnSeparator",
+ xmlName: "ColumnSeparator",
type: {
name: "String"
}
},
- where: {
- serializedName: "Where",
- required: true,
- xmlName: "Where",
+ fieldQuote: {
+ serializedName: "FieldQuote",
+ xmlName: "FieldQuote",
type: {
name: "String"
}
},
- blobs: {
- serializedName: "Blobs",
- required: true,
- xmlName: "Blobs",
- xmlIsWrapped: true,
- xmlElementName: "Blob",
+ recordSeparator: {
+ serializedName: "RecordSeparator",
+ xmlName: "RecordSeparator",
type: {
- name: "Sequence",
- element: {
- type: {
- name: "Composite",
- className: "FilterBlobItem"
- }
- }
+ name: "String"
}
},
- continuationToken: {
- serializedName: "NextMarker",
- xmlName: "NextMarker",
+ escapeChar: {
+ serializedName: "EscapeChar",
+ xmlName: "EscapeChar",
type: {
name: "String"
}
+ },
+ headersPresent: {
+ serializedName: "HeadersPresent",
+ xmlName: "HasHeaders",
+ type: {
+ name: "Boolean"
+ }
}
}
}
};
-const FilterBlobItem = {
- serializedName: "FilterBlobItem",
- xmlName: "Blob",
+const JsonTextConfiguration = {
+ serializedName: "JsonTextConfiguration",
+ xmlName: "JsonTextConfiguration",
type: {
name: "Composite",
- className: "FilterBlobItem",
+ className: "JsonTextConfiguration",
modelProperties: {
- name: {
- serializedName: "Name",
- required: true,
- xmlName: "Name",
- type: {
- name: "String"
- }
- },
- containerName: {
- serializedName: "ContainerName",
- required: true,
- xmlName: "ContainerName",
+ recordSeparator: {
+ serializedName: "RecordSeparator",
+ xmlName: "RecordSeparator",
type: {
name: "String"
}
- },
- tags: {
- serializedName: "Tags",
- xmlName: "Tags",
- type: {
- name: "Composite",
- className: "BlobTags"
- }
}
}
}
};
-const BlobTags = {
- serializedName: "BlobTags",
- xmlName: "Tags",
+const ArrowConfiguration = {
+ serializedName: "ArrowConfiguration",
+ xmlName: "ArrowConfiguration",
type: {
name: "Composite",
- className: "BlobTags",
+ className: "ArrowConfiguration",
modelProperties: {
- blobTagSet: {
- serializedName: "BlobTagSet",
+ schema: {
+ serializedName: "Schema",
required: true,
- xmlName: "TagSet",
+ xmlName: "Schema",
xmlIsWrapped: true,
- xmlElementName: "Tag",
+ xmlElementName: "Field",
type: {
name: "Sequence",
element: {
type: {
name: "Composite",
- className: "BlobTag"
+ className: "ArrowField"
}
}
}
@@ -16493,81 +15527,75 @@ const BlobTags = {
}
}
};
-const BlobTag = {
- serializedName: "BlobTag",
- xmlName: "Tag",
+const ArrowField = {
+ serializedName: "ArrowField",
+ xmlName: "Field",
type: {
name: "Composite",
- className: "BlobTag",
+ className: "ArrowField",
modelProperties: {
- key: {
- serializedName: "Key",
+ type: {
+ serializedName: "Type",
required: true,
- xmlName: "Key",
+ xmlName: "Type",
type: {
name: "String"
}
},
- value: {
- serializedName: "Value",
- required: true,
- xmlName: "Value",
+ name: {
+ serializedName: "Name",
+ xmlName: "Name",
type: {
name: "String"
}
- }
- }
- }
-};
-const SignedIdentifier = {
- serializedName: "SignedIdentifier",
- xmlName: "SignedIdentifier",
- type: {
- name: "Composite",
- className: "SignedIdentifier",
- modelProperties: {
- id: {
- serializedName: "Id",
- required: true,
- xmlName: "Id",
+ },
+ precision: {
+ serializedName: "Precision",
+ xmlName: "Precision",
type: {
- name: "String"
+ name: "Number"
}
},
- accessPolicy: {
- serializedName: "AccessPolicy",
- xmlName: "AccessPolicy",
+ scale: {
+ serializedName: "Scale",
+ xmlName: "Scale",
type: {
- name: "Composite",
- className: "AccessPolicy"
+ name: "Number"
}
}
}
}
};
-const AccessPolicy = {
- serializedName: "AccessPolicy",
+const ServiceSetPropertiesHeaders = {
+ serializedName: "Service_setPropertiesHeaders",
type: {
name: "Composite",
- className: "AccessPolicy",
+ className: "ServiceSetPropertiesHeaders",
modelProperties: {
- startsOn: {
- serializedName: "Start",
- xmlName: "Start",
+ clientRequestId: {
+ serializedName: "x-ms-client-request-id",
+ xmlName: "x-ms-client-request-id",
type: {
name: "String"
}
},
- expiresOn: {
- serializedName: "Expiry",
- xmlName: "Expiry",
+ requestId: {
+ serializedName: "x-ms-request-id",
+ xmlName: "x-ms-request-id",
type: {
name: "String"
}
},
- permissions: {
- serializedName: "Permission",
- xmlName: "Permission",
+ version: {
+ serializedName: "x-ms-version",
+ xmlName: "x-ms-version",
+ type: {
+ name: "String"
+ }
+ },
+ errorCode: {
+ serializedName: "x-ms-error-code",
+ xmlName: "x-ms-error-code",
type: {
name: "String"
}
@@ -16575,63 +15603,52 @@ const AccessPolicy = {
}
}
};
-const ListBlobsFlatSegmentResponse = {
- serializedName: "ListBlobsFlatSegmentResponse",
- xmlName: "EnumerationResults",
+const ServiceSetPropertiesExceptionHeaders = {
+ serializedName: "Service_setPropertiesExceptionHeaders",
type: {
name: "Composite",
- className: "ListBlobsFlatSegmentResponse",
+ className: "ServiceSetPropertiesExceptionHeaders",
modelProperties: {
- serviceEndpoint: {
- serializedName: "ServiceEndpoint",
- required: true,
- xmlName: "ServiceEndpoint",
- xmlIsAttribute: true,
+ errorCode: {
+ serializedName: "x-ms-error-code",
+ xmlName: "x-ms-error-code",
type: {
name: "String"
}
- },
- containerName: {
- serializedName: "ContainerName",
- required: true,
- xmlName: "ContainerName",
- xmlIsAttribute: true,
+ }
+ }
+ }
+};
+const ServiceGetPropertiesHeaders = {
+ serializedName: "Service_getPropertiesHeaders",
+ type: {
+ name: "Composite",
+ className: "ServiceGetPropertiesHeaders",
+ modelProperties: {
+ clientRequestId: {
+ serializedName: "x-ms-client-request-id",
+ xmlName: "x-ms-client-request-id",
type: {
name: "String"
}
},
- prefix: {
- serializedName: "Prefix",
- xmlName: "Prefix",
+ requestId: {
+ serializedName: "x-ms-request-id",
+ xmlName: "x-ms-request-id",
type: {
name: "String"
}
},
- marker: {
- serializedName: "Marker",
- xmlName: "Marker",
+ version: {
+ serializedName: "x-ms-version",
+ xmlName: "x-ms-version",
type: {
name: "String"
}
},
- maxPageSize: {
- serializedName: "MaxResults",
- xmlName: "MaxResults",
- type: {
- name: "Number"
- }
- },
- segment: {
- serializedName: "Segment",
- xmlName: "Blobs",
- type: {
- name: "Composite",
- className: "BlobFlatListSegment"
- }
- },
- continuationToken: {
- serializedName: "NextMarker",
- xmlName: "NextMarker",
+ errorCode: {
+ serializedName: "x-ms-error-code",
+ xmlName: "x-ms-error-code",
type: {
name: "String"
}
@@ -16639,136 +15656,128 @@ const ListBlobsFlatSegmentResponse = {
}
}
};
-const BlobFlatListSegment = {
- serializedName: "BlobFlatListSegment",
- xmlName: "Blobs",
+const ServiceGetPropertiesExceptionHeaders = {
+ serializedName: "Service_getPropertiesExceptionHeaders",
type: {
name: "Composite",
- className: "BlobFlatListSegment",
+ className: "ServiceGetPropertiesExceptionHeaders",
modelProperties: {
- blobItems: {
- serializedName: "BlobItems",
- required: true,
- xmlName: "BlobItems",
- xmlElementName: "Blob",
+ errorCode: {
+ serializedName: "x-ms-error-code",
+ xmlName: "x-ms-error-code",
type: {
- name: "Sequence",
- element: {
- type: {
- name: "Composite",
- className: "BlobItemInternal"
- }
- }
+ name: "String"
}
}
}
}
};
-const BlobItemInternal = {
- serializedName: "BlobItemInternal",
- xmlName: "Blob",
+const ServiceGetStatisticsHeaders = {
+ serializedName: "Service_getStatisticsHeaders",
type: {
name: "Composite",
- className: "BlobItemInternal",
+ className: "ServiceGetStatisticsHeaders",
modelProperties: {
- name: {
- serializedName: "Name",
- xmlName: "Name",
- type: {
- name: "Composite",
- className: "BlobName"
- }
- },
- deleted: {
- serializedName: "Deleted",
- required: true,
- xmlName: "Deleted",
+ clientRequestId: {
+ serializedName: "x-ms-client-request-id",
+ xmlName: "x-ms-client-request-id",
type: {
- name: "Boolean"
+ name: "String"
}
},
- snapshot: {
- serializedName: "Snapshot",
- required: true,
- xmlName: "Snapshot",
+ requestId: {
+ serializedName: "x-ms-request-id",
+ xmlName: "x-ms-request-id",
type: {
name: "String"
}
},
- versionId: {
- serializedName: "VersionId",
- xmlName: "VersionId",
+ version: {
+ serializedName: "x-ms-version",
+ xmlName: "x-ms-version",
type: {
name: "String"
}
},
- isCurrentVersion: {
- serializedName: "IsCurrentVersion",
- xmlName: "IsCurrentVersion",
+ date: {
+ serializedName: "date",
+ xmlName: "date",
type: {
- name: "Boolean"
+ name: "DateTimeRfc1123"
}
},
- properties: {
- serializedName: "Properties",
- xmlName: "Properties",
+ errorCode: {
+ serializedName: "x-ms-error-code",
+ xmlName: "x-ms-error-code",
type: {
- name: "Composite",
- className: "BlobPropertiesInternal"
+ name: "String"
}
- },
- metadata: {
- serializedName: "Metadata",
- xmlName: "Metadata",
+ }
+ }
+ }
+};
+const ServiceGetStatisticsExceptionHeaders = {
+ serializedName: "Service_getStatisticsExceptionHeaders",
+ type: {
+ name: "Composite",
+ className: "ServiceGetStatisticsExceptionHeaders",
+ modelProperties: {
+ errorCode: {
+ serializedName: "x-ms-error-code",
+ xmlName: "x-ms-error-code",
type: {
- name: "Dictionary",
- value: { type: { name: "String" } }
+ name: "String"
+ }
+ }
+ }
+ }
+};
+const ServiceListContainersSegmentHeaders = {
+ serializedName: "Service_listContainersSegmentHeaders",
+ type: {
+ name: "Composite",
+ className: "ServiceListContainersSegmentHeaders",
+ modelProperties: {
+ clientRequestId: {
+ serializedName: "x-ms-client-request-id",
+ xmlName: "x-ms-client-request-id",
+ type: {
+ name: "String"
}
},
- blobTags: {
- serializedName: "BlobTags",
- xmlName: "Tags",
+ requestId: {
+ serializedName: "x-ms-request-id",
+ xmlName: "x-ms-request-id",
type: {
- name: "Composite",
- className: "BlobTags"
+ name: "String"
}
},
- objectReplicationMetadata: {
- serializedName: "ObjectReplicationMetadata",
- xmlName: "OrMetadata",
+ version: {
+ serializedName: "x-ms-version",
+ xmlName: "x-ms-version",
type: {
- name: "Dictionary",
- value: { type: { name: "String" } }
+ name: "String"
}
},
- hasVersionsOnly: {
- serializedName: "HasVersionsOnly",
- xmlName: "HasVersionsOnly",
+ errorCode: {
+ serializedName: "x-ms-error-code",
+ xmlName: "x-ms-error-code",
type: {
- name: "Boolean"
+ name: "String"
}
}
}
}
};
-const BlobName = {
- serializedName: "BlobName",
+const ServiceListContainersSegmentExceptionHeaders = {
+ serializedName: "Service_listContainersSegmentExceptionHeaders",
type: {
name: "Composite",
- className: "BlobName",
+ className: "ServiceListContainersSegmentExceptionHeaders",
modelProperties: {
- encoded: {
- serializedName: "Encoded",
- xmlName: "Encoded",
- xmlIsAttribute: true,
- type: {
- name: "Boolean"
- }
- },
- content: {
- serializedName: "content",
- xmlName: "content",
- xmlIsMsText: true,
+ errorCode: {
+ serializedName: "x-ms-error-code",
+ xmlName: "x-ms-error-code",
type: {
name: "String"
}
@@ -16776,832 +15785,720 @@ const BlobName = {
}
}
};
-const BlobPropertiesInternal = {
- serializedName: "BlobPropertiesInternal",
- xmlName: "Properties",
+const ServiceGetUserDelegationKeyHeaders = {
+ serializedName: "Service_getUserDelegationKeyHeaders",
type: {
name: "Composite",
- className: "BlobPropertiesInternal",
+ className: "ServiceGetUserDelegationKeyHeaders",
modelProperties: {
- createdOn: {
- serializedName: "Creation-Time",
- xmlName: "Creation-Time",
+ clientRequestId: {
+ serializedName: "x-ms-client-request-id",
+ xmlName: "x-ms-client-request-id",
type: {
- name: "DateTimeRfc1123"
+ name: "String"
}
},
- lastModified: {
- serializedName: "Last-Modified",
- required: true,
- xmlName: "Last-Modified",
+ requestId: {
+ serializedName: "x-ms-request-id",
+ xmlName: "x-ms-request-id",
type: {
- name: "DateTimeRfc1123"
+ name: "String"
}
},
- etag: {
- serializedName: "Etag",
- required: true,
- xmlName: "Etag",
+ version: {
+ serializedName: "x-ms-version",
+ xmlName: "x-ms-version",
type: {
name: "String"
}
},
- contentLength: {
- serializedName: "Content-Length",
- xmlName: "Content-Length",
+ date: {
+ serializedName: "date",
+ xmlName: "date",
type: {
- name: "Number"
+ name: "DateTimeRfc1123"
}
},
- contentType: {
- serializedName: "Content-Type",
- xmlName: "Content-Type",
+ errorCode: {
+ serializedName: "x-ms-error-code",
+ xmlName: "x-ms-error-code",
type: {
name: "String"
}
- },
- contentEncoding: {
- serializedName: "Content-Encoding",
- xmlName: "Content-Encoding",
+ }
+ }
+ }
+};
+const ServiceGetUserDelegationKeyExceptionHeaders = {
+ serializedName: "Service_getUserDelegationKeyExceptionHeaders",
+ type: {
+ name: "Composite",
+ className: "ServiceGetUserDelegationKeyExceptionHeaders",
+ modelProperties: {
+ errorCode: {
+ serializedName: "x-ms-error-code",
+ xmlName: "x-ms-error-code",
type: {
name: "String"
}
- },
- contentLanguage: {
- serializedName: "Content-Language",
- xmlName: "Content-Language",
+ }
+ }
+ }
+};
+const ServiceGetAccountInfoHeaders = {
+ serializedName: "Service_getAccountInfoHeaders",
+ type: {
+ name: "Composite",
+ className: "ServiceGetAccountInfoHeaders",
+ modelProperties: {
+ clientRequestId: {
+ serializedName: "x-ms-client-request-id",
+ xmlName: "x-ms-client-request-id",
type: {
name: "String"
}
},
- contentMD5: {
- serializedName: "Content-MD5",
- xmlName: "Content-MD5",
- type: {
- name: "ByteArray"
- }
- },
- contentDisposition: {
- serializedName: "Content-Disposition",
- xmlName: "Content-Disposition",
+ requestId: {
+ serializedName: "x-ms-request-id",
+ xmlName: "x-ms-request-id",
type: {
name: "String"
}
},
- cacheControl: {
- serializedName: "Cache-Control",
- xmlName: "Cache-Control",
+ version: {
+ serializedName: "x-ms-version",
+ xmlName: "x-ms-version",
type: {
name: "String"
}
},
- blobSequenceNumber: {
- serializedName: "x-ms-blob-sequence-number",
- xmlName: "x-ms-blob-sequence-number",
- type: {
- name: "Number"
- }
- },
- blobType: {
- serializedName: "BlobType",
- xmlName: "BlobType",
+ date: {
+ serializedName: "date",
+ xmlName: "date",
type: {
- name: "Enum",
- allowedValues: ["BlockBlob", "PageBlob", "AppendBlob"]
+ name: "DateTimeRfc1123"
}
},
- leaseStatus: {
- serializedName: "LeaseStatus",
- xmlName: "LeaseStatus",
+ skuName: {
+ serializedName: "x-ms-sku-name",
+ xmlName: "x-ms-sku-name",
type: {
name: "Enum",
- allowedValues: ["locked", "unlocked"]
+ allowedValues: [
+ "Standard_LRS",
+ "Standard_GRS",
+ "Standard_RAGRS",
+ "Standard_ZRS",
+ "Premium_LRS"
+ ]
}
},
- leaseState: {
- serializedName: "LeaseState",
- xmlName: "LeaseState",
+ accountKind: {
+ serializedName: "x-ms-account-kind",
+ xmlName: "x-ms-account-kind",
type: {
name: "Enum",
allowedValues: [
- "available",
- "leased",
- "expired",
- "breaking",
- "broken"
+ "Storage",
+ "BlobStorage",
+ "StorageV2",
+ "FileStorage",
+ "BlockBlobStorage"
]
}
},
- leaseDuration: {
- serializedName: "LeaseDuration",
- xmlName: "LeaseDuration",
+ isHierarchicalNamespaceEnabled: {
+ serializedName: "x-ms-is-hns-enabled",
+ xmlName: "x-ms-is-hns-enabled",
type: {
- name: "Enum",
- allowedValues: ["infinite", "fixed"]
+ name: "Boolean"
}
},
- copyId: {
- serializedName: "CopyId",
- xmlName: "CopyId",
+ errorCode: {
+ serializedName: "x-ms-error-code",
+ xmlName: "x-ms-error-code",
type: {
name: "String"
}
- },
- copyStatus: {
- serializedName: "CopyStatus",
- xmlName: "CopyStatus",
- type: {
- name: "Enum",
- allowedValues: ["pending", "success", "aborted", "failed"]
- }
- },
- copySource: {
- serializedName: "CopySource",
- xmlName: "CopySource",
+ }
+ }
+ }
+};
+const ServiceGetAccountInfoExceptionHeaders = {
+ serializedName: "Service_getAccountInfoExceptionHeaders",
+ type: {
+ name: "Composite",
+ className: "ServiceGetAccountInfoExceptionHeaders",
+ modelProperties: {
+ errorCode: {
+ serializedName: "x-ms-error-code",
+ xmlName: "x-ms-error-code",
type: {
name: "String"
}
- },
- copyProgress: {
- serializedName: "CopyProgress",
- xmlName: "CopyProgress",
+ }
+ }
+ }
+};
+const ServiceSubmitBatchHeaders = {
+ serializedName: "Service_submitBatchHeaders",
+ type: {
+ name: "Composite",
+ className: "ServiceSubmitBatchHeaders",
+ modelProperties: {
+ contentType: {
+ serializedName: "content-type",
+ xmlName: "content-type",
type: {
name: "String"
}
},
- copyCompletedOn: {
- serializedName: "CopyCompletionTime",
- xmlName: "CopyCompletionTime",
- type: {
- name: "DateTimeRfc1123"
- }
- },
- copyStatusDescription: {
- serializedName: "CopyStatusDescription",
- xmlName: "CopyStatusDescription",
+ requestId: {
+ serializedName: "x-ms-request-id",
+ xmlName: "x-ms-request-id",
type: {
name: "String"
}
},
- serverEncrypted: {
- serializedName: "ServerEncrypted",
- xmlName: "ServerEncrypted",
+ version: {
+ serializedName: "x-ms-version",
+ xmlName: "x-ms-version",
type: {
- name: "Boolean"
+ name: "String"
}
},
- incrementalCopy: {
- serializedName: "IncrementalCopy",
- xmlName: "IncrementalCopy",
+ clientRequestId: {
+ serializedName: "x-ms-client-request-id",
+ xmlName: "x-ms-client-request-id",
type: {
- name: "Boolean"
+ name: "String"
}
},
- destinationSnapshot: {
- serializedName: "DestinationSnapshot",
- xmlName: "DestinationSnapshot",
+ errorCode: {
+ serializedName: "x-ms-error-code",
+ xmlName: "x-ms-error-code",
type: {
name: "String"
}
- },
- deletedOn: {
- serializedName: "DeletedTime",
- xmlName: "DeletedTime",
+ }
+ }
+ }
+};
+const ServiceSubmitBatchExceptionHeaders = {
+ serializedName: "Service_submitBatchExceptionHeaders",
+ type: {
+ name: "Composite",
+ className: "ServiceSubmitBatchExceptionHeaders",
+ modelProperties: {
+ errorCode: {
+ serializedName: "x-ms-error-code",
+ xmlName: "x-ms-error-code",
type: {
- name: "DateTimeRfc1123"
+ name: "String"
}
- },
- remainingRetentionDays: {
- serializedName: "RemainingRetentionDays",
- xmlName: "RemainingRetentionDays",
+ }
+ }
+ }
+};
+const ServiceFilterBlobsHeaders = {
+ serializedName: "Service_filterBlobsHeaders",
+ type: {
+ name: "Composite",
+ className: "ServiceFilterBlobsHeaders",
+ modelProperties: {
+ clientRequestId: {
+ serializedName: "x-ms-client-request-id",
+ xmlName: "x-ms-client-request-id",
type: {
- name: "Number"
+ name: "String"
}
},
- accessTier: {
- serializedName: "AccessTier",
- xmlName: "AccessTier",
+ requestId: {
+ serializedName: "x-ms-request-id",
+ xmlName: "x-ms-request-id",
type: {
- name: "Enum",
- allowedValues: [
- "P4",
- "P6",
- "P10",
- "P15",
- "P20",
- "P30",
- "P40",
- "P50",
- "P60",
- "P70",
- "P80",
- "Hot",
- "Cool",
- "Archive",
- "Cold"
- ]
+ name: "String"
}
},
- accessTierInferred: {
- serializedName: "AccessTierInferred",
- xmlName: "AccessTierInferred",
+ version: {
+ serializedName: "x-ms-version",
+ xmlName: "x-ms-version",
type: {
- name: "Boolean"
+ name: "String"
}
},
- archiveStatus: {
- serializedName: "ArchiveStatus",
- xmlName: "ArchiveStatus",
+ date: {
+ serializedName: "date",
+ xmlName: "date",
type: {
- name: "Enum",
- allowedValues: [
- "rehydrate-pending-to-hot",
- "rehydrate-pending-to-cool",
- "rehydrate-pending-to-cold"
- ]
+ name: "DateTimeRfc1123"
}
},
- customerProvidedKeySha256: {
- serializedName: "CustomerProvidedKeySha256",
- xmlName: "CustomerProvidedKeySha256",
+ errorCode: {
+ serializedName: "x-ms-error-code",
+ xmlName: "x-ms-error-code",
type: {
name: "String"
}
- },
- encryptionScope: {
- serializedName: "EncryptionScope",
- xmlName: "EncryptionScope",
+ }
+ }
+ }
+};
+const ServiceFilterBlobsExceptionHeaders = {
+ serializedName: "Service_filterBlobsExceptionHeaders",
+ type: {
+ name: "Composite",
+ className: "ServiceFilterBlobsExceptionHeaders",
+ modelProperties: {
+ errorCode: {
+ serializedName: "x-ms-error-code",
+ xmlName: "x-ms-error-code",
type: {
name: "String"
}
- },
- accessTierChangedOn: {
- serializedName: "AccessTierChangeTime",
- xmlName: "AccessTierChangeTime",
- type: {
- name: "DateTimeRfc1123"
- }
- },
- tagCount: {
- serializedName: "TagCount",
- xmlName: "TagCount",
+ }
+ }
+ }
+};
+const ContainerCreateHeaders = {
+ serializedName: "Container_createHeaders",
+ type: {
+ name: "Composite",
+ className: "ContainerCreateHeaders",
+ modelProperties: {
+ etag: {
+ serializedName: "etag",
+ xmlName: "etag",
type: {
- name: "Number"
+ name: "String"
}
},
- expiresOn: {
- serializedName: "Expiry-Time",
- xmlName: "Expiry-Time",
+ lastModified: {
+ serializedName: "last-modified",
+ xmlName: "last-modified",
type: {
name: "DateTimeRfc1123"
}
},
- isSealed: {
- serializedName: "Sealed",
- xmlName: "Sealed",
+ clientRequestId: {
+ serializedName: "x-ms-client-request-id",
+ xmlName: "x-ms-client-request-id",
type: {
- name: "Boolean"
+ name: "String"
}
},
- rehydratePriority: {
- serializedName: "RehydratePriority",
- xmlName: "RehydratePriority",
+ requestId: {
+ serializedName: "x-ms-request-id",
+ xmlName: "x-ms-request-id",
type: {
- name: "Enum",
- allowedValues: ["High", "Standard"]
+ name: "String"
}
},
- lastAccessedOn: {
- serializedName: "LastAccessTime",
- xmlName: "LastAccessTime",
+ version: {
+ serializedName: "x-ms-version",
+ xmlName: "x-ms-version",
type: {
- name: "DateTimeRfc1123"
+ name: "String"
}
},
- immutabilityPolicyExpiresOn: {
- serializedName: "ImmutabilityPolicyUntilDate",
- xmlName: "ImmutabilityPolicyUntilDate",
+ date: {
+ serializedName: "date",
+ xmlName: "date",
type: {
name: "DateTimeRfc1123"
}
},
- immutabilityPolicyMode: {
- serializedName: "ImmutabilityPolicyMode",
- xmlName: "ImmutabilityPolicyMode",
- type: {
- name: "Enum",
- allowedValues: ["Mutable", "Unlocked", "Locked"]
- }
- },
- legalHold: {
- serializedName: "LegalHold",
- xmlName: "LegalHold",
+ errorCode: {
+ serializedName: "x-ms-error-code",
+ xmlName: "x-ms-error-code",
type: {
- name: "Boolean"
+ name: "String"
}
}
}
}
};
-const ListBlobsHierarchySegmentResponse = {
- serializedName: "ListBlobsHierarchySegmentResponse",
- xmlName: "EnumerationResults",
+const ContainerCreateExceptionHeaders = {
+ serializedName: "Container_createExceptionHeaders",
type: {
name: "Composite",
- className: "ListBlobsHierarchySegmentResponse",
+ className: "ContainerCreateExceptionHeaders",
modelProperties: {
- serviceEndpoint: {
- serializedName: "ServiceEndpoint",
- required: true,
- xmlName: "ServiceEndpoint",
- xmlIsAttribute: true,
+ errorCode: {
+ serializedName: "x-ms-error-code",
+ xmlName: "x-ms-error-code",
type: {
name: "String"
}
+ }
+ }
+ }
+};
+const ContainerGetPropertiesHeaders = {
+ serializedName: "Container_getPropertiesHeaders",
+ type: {
+ name: "Composite",
+ className: "ContainerGetPropertiesHeaders",
+ modelProperties: {
+ metadata: {
+ serializedName: "x-ms-meta",
+ xmlName: "x-ms-meta",
+ type: {
+ name: "Dictionary",
+ value: { type: { name: "String" } }
+ },
+ headerCollectionPrefix: "x-ms-meta-"
},
- containerName: {
- serializedName: "ContainerName",
- required: true,
- xmlName: "ContainerName",
- xmlIsAttribute: true,
+ etag: {
+ serializedName: "etag",
+ xmlName: "etag",
type: {
name: "String"
}
},
- prefix: {
- serializedName: "Prefix",
- xmlName: "Prefix",
+ lastModified: {
+ serializedName: "last-modified",
+ xmlName: "last-modified",
type: {
- name: "String"
+ name: "DateTimeRfc1123"
}
},
- marker: {
- serializedName: "Marker",
- xmlName: "Marker",
+ leaseDuration: {
+ serializedName: "x-ms-lease-duration",
+ xmlName: "x-ms-lease-duration",
type: {
- name: "String"
+ name: "Enum",
+ allowedValues: ["infinite", "fixed"]
}
},
- maxPageSize: {
- serializedName: "MaxResults",
- xmlName: "MaxResults",
+ leaseState: {
+ serializedName: "x-ms-lease-state",
+ xmlName: "x-ms-lease-state",
type: {
- name: "Number"
+ name: "Enum",
+ allowedValues: [
+ "available",
+ "leased",
+ "expired",
+ "breaking",
+ "broken"
+ ]
}
},
- delimiter: {
- serializedName: "Delimiter",
- xmlName: "Delimiter",
+ leaseStatus: {
+ serializedName: "x-ms-lease-status",
+ xmlName: "x-ms-lease-status",
+ type: {
+ name: "Enum",
+ allowedValues: ["locked", "unlocked"]
+ }
+ },
+ clientRequestId: {
+ serializedName: "x-ms-client-request-id",
+ xmlName: "x-ms-client-request-id",
type: {
name: "String"
}
},
- segment: {
- serializedName: "Segment",
- xmlName: "Blobs",
+ requestId: {
+ serializedName: "x-ms-request-id",
+ xmlName: "x-ms-request-id",
type: {
- name: "Composite",
- className: "BlobHierarchyListSegment"
+ name: "String"
}
},
- continuationToken: {
- serializedName: "NextMarker",
- xmlName: "NextMarker",
+ version: {
+ serializedName: "x-ms-version",
+ xmlName: "x-ms-version",
type: {
name: "String"
}
- }
- }
- }
-};
-const BlobHierarchyListSegment = {
- serializedName: "BlobHierarchyListSegment",
- xmlName: "Blobs",
- type: {
- name: "Composite",
- className: "BlobHierarchyListSegment",
- modelProperties: {
- blobPrefixes: {
- serializedName: "BlobPrefixes",
- xmlName: "BlobPrefixes",
- xmlElementName: "BlobPrefix",
+ },
+ date: {
+ serializedName: "date",
+ xmlName: "date",
type: {
- name: "Sequence",
- element: {
- type: {
- name: "Composite",
- className: "BlobPrefix"
- }
- }
+ name: "DateTimeRfc1123"
}
},
- blobItems: {
- serializedName: "BlobItems",
- required: true,
- xmlName: "BlobItems",
- xmlElementName: "Blob",
+ blobPublicAccess: {
+ serializedName: "x-ms-blob-public-access",
+ xmlName: "x-ms-blob-public-access",
type: {
- name: "Sequence",
- element: {
- type: {
- name: "Composite",
- className: "BlobItemInternal"
- }
- }
+ name: "Enum",
+ allowedValues: ["container", "blob"]
}
- }
- }
- }
-};
-const BlobPrefix = {
- serializedName: "BlobPrefix",
- type: {
- name: "Composite",
- className: "BlobPrefix",
- modelProperties: {
- name: {
- serializedName: "Name",
- xmlName: "Name",
+ },
+ hasImmutabilityPolicy: {
+ serializedName: "x-ms-has-immutability-policy",
+ xmlName: "x-ms-has-immutability-policy",
type: {
- name: "Composite",
- className: "BlobName"
+ name: "Boolean"
}
- }
- }
- }
-};
-const BlockLookupList = {
- serializedName: "BlockLookupList",
- xmlName: "BlockList",
- type: {
- name: "Composite",
- className: "BlockLookupList",
- modelProperties: {
- committed: {
- serializedName: "Committed",
- xmlName: "Committed",
- xmlElementName: "Committed",
+ },
+ hasLegalHold: {
+ serializedName: "x-ms-has-legal-hold",
+ xmlName: "x-ms-has-legal-hold",
type: {
- name: "Sequence",
- element: {
- type: {
- name: "String"
- }
- }
+ name: "Boolean"
}
},
- uncommitted: {
- serializedName: "Uncommitted",
- xmlName: "Uncommitted",
- xmlElementName: "Uncommitted",
+ defaultEncryptionScope: {
+ serializedName: "x-ms-default-encryption-scope",
+ xmlName: "x-ms-default-encryption-scope",
type: {
- name: "Sequence",
- element: {
- type: {
- name: "String"
- }
- }
+ name: "String"
}
},
- latest: {
- serializedName: "Latest",
- xmlName: "Latest",
- xmlElementName: "Latest",
+ denyEncryptionScopeOverride: {
+ serializedName: "x-ms-deny-encryption-scope-override",
+ xmlName: "x-ms-deny-encryption-scope-override",
type: {
- name: "Sequence",
- element: {
- type: {
- name: "String"
- }
- }
+ name: "Boolean"
}
- }
- }
- }
-};
-const BlockList = {
- serializedName: "BlockList",
- type: {
- name: "Composite",
- className: "BlockList",
- modelProperties: {
- committedBlocks: {
- serializedName: "CommittedBlocks",
- xmlName: "CommittedBlocks",
- xmlIsWrapped: true,
- xmlElementName: "Block",
+ },
+ isImmutableStorageWithVersioningEnabled: {
+ serializedName: "x-ms-immutable-storage-with-versioning-enabled",
+ xmlName: "x-ms-immutable-storage-with-versioning-enabled",
type: {
- name: "Sequence",
- element: {
- type: {
- name: "Composite",
- className: "Block"
- }
- }
+ name: "Boolean"
}
},
- uncommittedBlocks: {
- serializedName: "UncommittedBlocks",
- xmlName: "UncommittedBlocks",
- xmlIsWrapped: true,
- xmlElementName: "Block",
+ errorCode: {
+ serializedName: "x-ms-error-code",
+ xmlName: "x-ms-error-code",
type: {
- name: "Sequence",
- element: {
- type: {
- name: "Composite",
- className: "Block"
- }
- }
+ name: "String"
}
}
}
}
};
-const Block = {
- serializedName: "Block",
+const ContainerGetPropertiesExceptionHeaders = {
+ serializedName: "Container_getPropertiesExceptionHeaders",
type: {
name: "Composite",
- className: "Block",
+ className: "ContainerGetPropertiesExceptionHeaders",
modelProperties: {
- name: {
- serializedName: "Name",
- required: true,
- xmlName: "Name",
+ errorCode: {
+ serializedName: "x-ms-error-code",
+ xmlName: "x-ms-error-code",
type: {
name: "String"
}
- },
- size: {
- serializedName: "Size",
- required: true,
- xmlName: "Size",
- type: {
- name: "Number"
- }
}
}
}
};
-const PageList = {
- serializedName: "PageList",
+const ContainerDeleteHeaders = {
+ serializedName: "Container_deleteHeaders",
type: {
name: "Composite",
- className: "PageList",
+ className: "ContainerDeleteHeaders",
modelProperties: {
- pageRange: {
- serializedName: "PageRange",
- xmlName: "PageRange",
- xmlElementName: "PageRange",
+ clientRequestId: {
+ serializedName: "x-ms-client-request-id",
+ xmlName: "x-ms-client-request-id",
type: {
- name: "Sequence",
- element: {
- type: {
- name: "Composite",
- className: "PageRange"
- }
- }
+ name: "String"
}
},
- clearRange: {
- serializedName: "ClearRange",
- xmlName: "ClearRange",
- xmlElementName: "ClearRange",
+ requestId: {
+ serializedName: "x-ms-request-id",
+ xmlName: "x-ms-request-id",
type: {
- name: "Sequence",
- element: {
- type: {
- name: "Composite",
- className: "ClearRange"
- }
- }
+ name: "String"
}
},
- continuationToken: {
- serializedName: "NextMarker",
- xmlName: "NextMarker",
+ version: {
+ serializedName: "x-ms-version",
+ xmlName: "x-ms-version",
type: {
name: "String"
}
- }
- }
- }
-};
-const PageRange = {
- serializedName: "PageRange",
- xmlName: "PageRange",
- type: {
- name: "Composite",
- className: "PageRange",
- modelProperties: {
- start: {
- serializedName: "Start",
- required: true,
- xmlName: "Start",
+ },
+ date: {
+ serializedName: "date",
+ xmlName: "date",
type: {
- name: "Number"
+ name: "DateTimeRfc1123"
}
},
- end: {
- serializedName: "End",
- required: true,
- xmlName: "End",
+ errorCode: {
+ serializedName: "x-ms-error-code",
+ xmlName: "x-ms-error-code",
type: {
- name: "Number"
+ name: "String"
}
}
}
}
};
-const ClearRange = {
- serializedName: "ClearRange",
- xmlName: "ClearRange",
+const ContainerDeleteExceptionHeaders = {
+ serializedName: "Container_deleteExceptionHeaders",
type: {
name: "Composite",
- className: "ClearRange",
+ className: "ContainerDeleteExceptionHeaders",
modelProperties: {
- start: {
- serializedName: "Start",
- required: true,
- xmlName: "Start",
- type: {
- name: "Number"
- }
- },
- end: {
- serializedName: "End",
- required: true,
- xmlName: "End",
+ errorCode: {
+ serializedName: "x-ms-error-code",
+ xmlName: "x-ms-error-code",
type: {
- name: "Number"
+ name: "String"
}
}
}
}
};
-const QueryRequest = {
- serializedName: "QueryRequest",
- xmlName: "QueryRequest",
+const ContainerSetMetadataHeaders = {
+ serializedName: "Container_setMetadataHeaders",
type: {
name: "Composite",
- className: "QueryRequest",
+ className: "ContainerSetMetadataHeaders",
modelProperties: {
- queryType: {
- serializedName: "QueryType",
- required: true,
- xmlName: "QueryType",
+ etag: {
+ serializedName: "etag",
+ xmlName: "etag",
type: {
name: "String"
}
},
- expression: {
- serializedName: "Expression",
- required: true,
- xmlName: "Expression",
+ lastModified: {
+ serializedName: "last-modified",
+ xmlName: "last-modified",
+ type: {
+ name: "DateTimeRfc1123"
+ }
+ },
+ clientRequestId: {
+ serializedName: "x-ms-client-request-id",
+ xmlName: "x-ms-client-request-id",
type: {
name: "String"
}
},
- inputSerialization: {
- serializedName: "InputSerialization",
- xmlName: "InputSerialization",
+ requestId: {
+ serializedName: "x-ms-request-id",
+ xmlName: "x-ms-request-id",
type: {
- name: "Composite",
- className: "QuerySerialization"
+ name: "String"
}
},
- outputSerialization: {
- serializedName: "OutputSerialization",
- xmlName: "OutputSerialization",
+ version: {
+ serializedName: "x-ms-version",
+ xmlName: "x-ms-version",
type: {
- name: "Composite",
- className: "QuerySerialization"
+ name: "String"
+ }
+ },
+ date: {
+ serializedName: "date",
+ xmlName: "date",
+ type: {
+ name: "DateTimeRfc1123"
+ }
+ },
+ errorCode: {
+ serializedName: "x-ms-error-code",
+ xmlName: "x-ms-error-code",
+ type: {
+ name: "String"
}
}
}
}
};
-const QuerySerialization = {
- serializedName: "QuerySerialization",
+const ContainerSetMetadataExceptionHeaders = {
+ serializedName: "Container_setMetadataExceptionHeaders",
type: {
name: "Composite",
- className: "QuerySerialization",
+ className: "ContainerSetMetadataExceptionHeaders",
modelProperties: {
- format: {
- serializedName: "Format",
- xmlName: "Format",
+ errorCode: {
+ serializedName: "x-ms-error-code",
+ xmlName: "x-ms-error-code",
type: {
- name: "Composite",
- className: "QueryFormat"
+ name: "String"
}
}
}
}
};
-const QueryFormat = {
- serializedName: "QueryFormat",
+const ContainerGetAccessPolicyHeaders = {
+ serializedName: "Container_getAccessPolicyHeaders",
type: {
name: "Composite",
- className: "QueryFormat",
+ className: "ContainerGetAccessPolicyHeaders",
modelProperties: {
- type: {
- serializedName: "Type",
- required: true,
- xmlName: "Type",
+ blobPublicAccess: {
+ serializedName: "x-ms-blob-public-access",
+ xmlName: "x-ms-blob-public-access",
type: {
name: "Enum",
- allowedValues: ["delimited", "json", "arrow", "parquet"]
+ allowedValues: ["container", "blob"]
}
},
- delimitedTextConfiguration: {
- serializedName: "DelimitedTextConfiguration",
- xmlName: "DelimitedTextConfiguration",
+ etag: {
+ serializedName: "etag",
+ xmlName: "etag",
type: {
- name: "Composite",
- className: "DelimitedTextConfiguration"
+ name: "String"
}
},
- jsonTextConfiguration: {
- serializedName: "JsonTextConfiguration",
- xmlName: "JsonTextConfiguration",
+ lastModified: {
+ serializedName: "last-modified",
+ xmlName: "last-modified",
type: {
- name: "Composite",
- className: "JsonTextConfiguration"
+ name: "DateTimeRfc1123"
}
},
- arrowConfiguration: {
- serializedName: "ArrowConfiguration",
- xmlName: "ArrowConfiguration",
+ clientRequestId: {
+ serializedName: "x-ms-client-request-id",
+ xmlName: "x-ms-client-request-id",
type: {
- name: "Composite",
- className: "ArrowConfiguration"
+ name: "String"
}
},
- parquetTextConfiguration: {
- serializedName: "ParquetTextConfiguration",
- xmlName: "ParquetTextConfiguration",
+ requestId: {
+ serializedName: "x-ms-request-id",
+ xmlName: "x-ms-request-id",
type: {
- name: "any"
- }
- }
- }
- }
-};
-const DelimitedTextConfiguration = {
- serializedName: "DelimitedTextConfiguration",
- xmlName: "DelimitedTextConfiguration",
- type: {
- name: "Composite",
- className: "DelimitedTextConfiguration",
- modelProperties: {
- columnSeparator: {
- serializedName: "ColumnSeparator",
- xmlName: "ColumnSeparator",
- type: {
- name: "String"
+ name: "String"
}
},
- fieldQuote: {
- serializedName: "FieldQuote",
- xmlName: "FieldQuote",
+ version: {
+ serializedName: "x-ms-version",
+ xmlName: "x-ms-version",
type: {
name: "String"
}
},
- recordSeparator: {
- serializedName: "RecordSeparator",
- xmlName: "RecordSeparator",
+ date: {
+ serializedName: "date",
+ xmlName: "date",
type: {
- name: "String"
+ name: "DateTimeRfc1123"
}
},
- escapeChar: {
- serializedName: "EscapeChar",
- xmlName: "EscapeChar",
+ errorCode: {
+ serializedName: "x-ms-error-code",
+ xmlName: "x-ms-error-code",
type: {
name: "String"
}
- },
- headersPresent: {
- serializedName: "HeadersPresent",
- xmlName: "HasHeaders",
- type: {
- name: "Boolean"
- }
}
}
}
};
-const JsonTextConfiguration = {
- serializedName: "JsonTextConfiguration",
- xmlName: "JsonTextConfiguration",
+const ContainerGetAccessPolicyExceptionHeaders = {
+ serializedName: "Container_getAccessPolicyExceptionHeaders",
type: {
name: "Composite",
- className: "JsonTextConfiguration",
+ className: "ContainerGetAccessPolicyExceptionHeaders",
modelProperties: {
- recordSeparator: {
- serializedName: "RecordSeparator",
- xmlName: "RecordSeparator",
+ errorCode: {
+ serializedName: "x-ms-error-code",
+ xmlName: "x-ms-error-code",
type: {
name: "String"
}
@@ -17609,77 +16506,26 @@ const JsonTextConfiguration = {
}
}
};
-const ArrowConfiguration = {
- serializedName: "ArrowConfiguration",
- xmlName: "ArrowConfiguration",
- type: {
- name: "Composite",
- className: "ArrowConfiguration",
- modelProperties: {
- schema: {
- serializedName: "Schema",
- required: true,
- xmlName: "Schema",
- xmlIsWrapped: true,
- xmlElementName: "Field",
- type: {
- name: "Sequence",
- element: {
- type: {
- name: "Composite",
- className: "ArrowField"
- }
- }
- }
- }
- }
- }
-};
-const ArrowField = {
- serializedName: "ArrowField",
- xmlName: "Field",
+const ContainerSetAccessPolicyHeaders = {
+ serializedName: "Container_setAccessPolicyHeaders",
type: {
name: "Composite",
- className: "ArrowField",
+ className: "ContainerSetAccessPolicyHeaders",
modelProperties: {
- type: {
- serializedName: "Type",
- required: true,
- xmlName: "Type",
- type: {
- name: "String"
- }
- },
- name: {
- serializedName: "Name",
- xmlName: "Name",
+ etag: {
+ serializedName: "etag",
+ xmlName: "etag",
type: {
name: "String"
}
},
- precision: {
- serializedName: "Precision",
- xmlName: "Precision",
+ lastModified: {
+ serializedName: "last-modified",
+ xmlName: "last-modified",
type: {
- name: "Number"
+ name: "DateTimeRfc1123"
}
},
- scale: {
- serializedName: "Scale",
- xmlName: "Scale",
- type: {
- name: "Number"
- }
- }
- }
- }
-};
-const ServiceSetPropertiesHeaders = {
- serializedName: "Service_setPropertiesHeaders",
- type: {
- name: "Composite",
- className: "ServiceSetPropertiesHeaders",
- modelProperties: {
clientRequestId: {
serializedName: "x-ms-client-request-id",
xmlName: "x-ms-client-request-id",
@@ -17701,6 +16547,13 @@ const ServiceSetPropertiesHeaders = {
name: "String"
}
},
+ date: {
+ serializedName: "date",
+ xmlName: "date",
+ type: {
+ name: "DateTimeRfc1123"
+ }
+ },
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
@@ -17711,11 +16564,11 @@ const ServiceSetPropertiesHeaders = {
}
}
};
-const ServiceSetPropertiesExceptionHeaders = {
- serializedName: "Service_setPropertiesExceptionHeaders",
+const ContainerSetAccessPolicyExceptionHeaders = {
+ serializedName: "Container_setAccessPolicyExceptionHeaders",
type: {
name: "Composite",
- className: "ServiceSetPropertiesExceptionHeaders",
+ className: "ContainerSetAccessPolicyExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
@@ -17727,11 +16580,11 @@ const ServiceSetPropertiesExceptionHeaders = {
}
}
};
-const ServiceGetPropertiesHeaders = {
- serializedName: "Service_getPropertiesHeaders",
+const ContainerRestoreHeaders = {
+ serializedName: "Container_restoreHeaders",
type: {
name: "Composite",
- className: "ServiceGetPropertiesHeaders",
+ className: "ContainerRestoreHeaders",
modelProperties: {
clientRequestId: {
serializedName: "x-ms-client-request-id",
@@ -17754,6 +16607,13 @@ const ServiceGetPropertiesHeaders = {
name: "String"
}
},
+ date: {
+ serializedName: "date",
+ xmlName: "date",
+ type: {
+ name: "DateTimeRfc1123"
+ }
+ },
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
@@ -17764,11 +16624,11 @@ const ServiceGetPropertiesHeaders = {
}
}
};
-const ServiceGetPropertiesExceptionHeaders = {
- serializedName: "Service_getPropertiesExceptionHeaders",
+const ContainerRestoreExceptionHeaders = {
+ serializedName: "Container_restoreExceptionHeaders",
type: {
name: "Composite",
- className: "ServiceGetPropertiesExceptionHeaders",
+ className: "ContainerRestoreExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
@@ -17780,11 +16640,11 @@ const ServiceGetPropertiesExceptionHeaders = {
}
}
};
-const ServiceGetStatisticsHeaders = {
- serializedName: "Service_getStatisticsHeaders",
+const ContainerRenameHeaders = {
+ serializedName: "Container_renameHeaders",
type: {
name: "Composite",
- className: "ServiceGetStatisticsHeaders",
+ className: "ContainerRenameHeaders",
modelProperties: {
clientRequestId: {
serializedName: "x-ms-client-request-id",
@@ -17824,11 +16684,11 @@ const ServiceGetStatisticsHeaders = {
}
}
};
-const ServiceGetStatisticsExceptionHeaders = {
- serializedName: "Service_getStatisticsExceptionHeaders",
+const ContainerRenameExceptionHeaders = {
+ serializedName: "Container_renameExceptionHeaders",
type: {
name: "Composite",
- className: "ServiceGetStatisticsExceptionHeaders",
+ className: "ContainerRenameExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
@@ -17840,15 +16700,15 @@ const ServiceGetStatisticsExceptionHeaders = {
}
}
};
-const ServiceListContainersSegmentHeaders = {
- serializedName: "Service_listContainersSegmentHeaders",
+const ContainerSubmitBatchHeaders = {
+ serializedName: "Container_submitBatchHeaders",
type: {
name: "Composite",
- className: "ServiceListContainersSegmentHeaders",
+ className: "ContainerSubmitBatchHeaders",
modelProperties: {
- clientRequestId: {
- serializedName: "x-ms-client-request-id",
- xmlName: "x-ms-client-request-id",
+ contentType: {
+ serializedName: "content-type",
+ xmlName: "content-type",
type: {
name: "String"
}
@@ -17866,22 +16726,15 @@ const ServiceListContainersSegmentHeaders = {
type: {
name: "String"
}
- },
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
- type: {
- name: "String"
- }
}
}
}
};
-const ServiceListContainersSegmentExceptionHeaders = {
- serializedName: "Service_listContainersSegmentExceptionHeaders",
+const ContainerSubmitBatchExceptionHeaders = {
+ serializedName: "Container_submitBatchExceptionHeaders",
type: {
name: "Composite",
- className: "ServiceListContainersSegmentExceptionHeaders",
+ className: "ContainerSubmitBatchExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
@@ -17893,11 +16746,11 @@ const ServiceListContainersSegmentExceptionHeaders = {
}
}
};
-const ServiceGetUserDelegationKeyHeaders = {
- serializedName: "Service_getUserDelegationKeyHeaders",
+const ContainerFilterBlobsHeaders = {
+ serializedName: "Container_filterBlobsHeaders",
type: {
name: "Composite",
- className: "ServiceGetUserDelegationKeyHeaders",
+ className: "ContainerFilterBlobsHeaders",
modelProperties: {
clientRequestId: {
serializedName: "x-ms-client-request-id",
@@ -17926,22 +16779,15 @@ const ServiceGetUserDelegationKeyHeaders = {
type: {
name: "DateTimeRfc1123"
}
- },
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
- type: {
- name: "String"
- }
}
}
}
};
-const ServiceGetUserDelegationKeyExceptionHeaders = {
- serializedName: "Service_getUserDelegationKeyExceptionHeaders",
+const ContainerFilterBlobsExceptionHeaders = {
+ serializedName: "Container_filterBlobsExceptionHeaders",
type: {
name: "Composite",
- className: "ServiceGetUserDelegationKeyExceptionHeaders",
+ className: "ContainerFilterBlobsExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
@@ -17953,12 +16799,33 @@ const ServiceGetUserDelegationKeyExceptionHeaders = {
}
}
};
-const ServiceGetAccountInfoHeaders = {
- serializedName: "Service_getAccountInfoHeaders",
+const ContainerAcquireLeaseHeaders = {
+ serializedName: "Container_acquireLeaseHeaders",
type: {
name: "Composite",
- className: "ServiceGetAccountInfoHeaders",
+ className: "ContainerAcquireLeaseHeaders",
modelProperties: {
+ etag: {
+ serializedName: "etag",
+ xmlName: "etag",
+ type: {
+ name: "String"
+ }
+ },
+ lastModified: {
+ serializedName: "last-modified",
+ xmlName: "last-modified",
+ type: {
+ name: "DateTimeRfc1123"
+ }
+ },
+ leaseId: {
+ serializedName: "x-ms-lease-id",
+ xmlName: "x-ms-lease-id",
+ type: {
+ name: "String"
+ }
+ },
clientRequestId: {
serializedName: "x-ms-client-request-id",
xmlName: "x-ms-client-request-id",
@@ -17986,57 +16853,15 @@ const ServiceGetAccountInfoHeaders = {
type: {
name: "DateTimeRfc1123"
}
- },
- skuName: {
- serializedName: "x-ms-sku-name",
- xmlName: "x-ms-sku-name",
- type: {
- name: "Enum",
- allowedValues: [
- "Standard_LRS",
- "Standard_GRS",
- "Standard_RAGRS",
- "Standard_ZRS",
- "Premium_LRS"
- ]
- }
- },
- accountKind: {
- serializedName: "x-ms-account-kind",
- xmlName: "x-ms-account-kind",
- type: {
- name: "Enum",
- allowedValues: [
- "Storage",
- "BlobStorage",
- "StorageV2",
- "FileStorage",
- "BlockBlobStorage"
- ]
- }
- },
- isHierarchicalNamespaceEnabled: {
- serializedName: "x-ms-is-hns-enabled",
- xmlName: "x-ms-is-hns-enabled",
- type: {
- name: "Boolean"
- }
- },
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
- type: {
- name: "String"
- }
}
}
}
};
-const ServiceGetAccountInfoExceptionHeaders = {
- serializedName: "Service_getAccountInfoExceptionHeaders",
+const ContainerAcquireLeaseExceptionHeaders = {
+ serializedName: "Container_acquireLeaseExceptionHeaders",
type: {
name: "Composite",
- className: "ServiceGetAccountInfoExceptionHeaders",
+ className: "ContainerAcquireLeaseExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
@@ -18048,15 +16873,29 @@ const ServiceGetAccountInfoExceptionHeaders = {
}
}
};
-const ServiceSubmitBatchHeaders = {
- serializedName: "Service_submitBatchHeaders",
+const ContainerReleaseLeaseHeaders = {
+ serializedName: "Container_releaseLeaseHeaders",
type: {
name: "Composite",
- className: "ServiceSubmitBatchHeaders",
+ className: "ContainerReleaseLeaseHeaders",
modelProperties: {
- contentType: {
- serializedName: "content-type",
- xmlName: "content-type",
+ etag: {
+ serializedName: "etag",
+ xmlName: "etag",
+ type: {
+ name: "String"
+ }
+ },
+ lastModified: {
+ serializedName: "last-modified",
+ xmlName: "last-modified",
+ type: {
+ name: "DateTimeRfc1123"
+ }
+ },
+ clientRequestId: {
+ serializedName: "x-ms-client-request-id",
+ xmlName: "x-ms-client-request-id",
type: {
name: "String"
}
@@ -18075,28 +16914,21 @@ const ServiceSubmitBatchHeaders = {
name: "String"
}
},
- clientRequestId: {
- serializedName: "x-ms-client-request-id",
- xmlName: "x-ms-client-request-id",
- type: {
- name: "String"
- }
- },
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
+ date: {
+ serializedName: "date",
+ xmlName: "date",
type: {
- name: "String"
+ name: "DateTimeRfc1123"
}
}
}
}
};
-const ServiceSubmitBatchExceptionHeaders = {
- serializedName: "Service_submitBatchExceptionHeaders",
+const ContainerReleaseLeaseExceptionHeaders = {
+ serializedName: "Container_releaseLeaseExceptionHeaders",
type: {
name: "Composite",
- className: "ServiceSubmitBatchExceptionHeaders",
+ className: "ContainerReleaseLeaseExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
@@ -18108,12 +16940,33 @@ const ServiceSubmitBatchExceptionHeaders = {
}
}
};
-const ServiceFilterBlobsHeaders = {
- serializedName: "Service_filterBlobsHeaders",
+const ContainerRenewLeaseHeaders = {
+ serializedName: "Container_renewLeaseHeaders",
type: {
name: "Composite",
- className: "ServiceFilterBlobsHeaders",
+ className: "ContainerRenewLeaseHeaders",
modelProperties: {
+ etag: {
+ serializedName: "etag",
+ xmlName: "etag",
+ type: {
+ name: "String"
+ }
+ },
+ lastModified: {
+ serializedName: "last-modified",
+ xmlName: "last-modified",
+ type: {
+ name: "DateTimeRfc1123"
+ }
+ },
+ leaseId: {
+ serializedName: "x-ms-lease-id",
+ xmlName: "x-ms-lease-id",
+ type: {
+ name: "String"
+ }
+ },
clientRequestId: {
serializedName: "x-ms-client-request-id",
xmlName: "x-ms-client-request-id",
@@ -18141,22 +16994,15 @@ const ServiceFilterBlobsHeaders = {
type: {
name: "DateTimeRfc1123"
}
- },
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
- type: {
- name: "String"
- }
}
}
}
};
-const ServiceFilterBlobsExceptionHeaders = {
- serializedName: "Service_filterBlobsExceptionHeaders",
+const ContainerRenewLeaseExceptionHeaders = {
+ serializedName: "Container_renewLeaseExceptionHeaders",
type: {
name: "Composite",
- className: "ServiceFilterBlobsExceptionHeaders",
+ className: "ContainerRenewLeaseExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
@@ -18168,11 +17014,11 @@ const ServiceFilterBlobsExceptionHeaders = {
}
}
};
-const ContainerCreateHeaders = {
- serializedName: "Container_createHeaders",
+const ContainerBreakLeaseHeaders = {
+ serializedName: "Container_breakLeaseHeaders",
type: {
name: "Composite",
- className: "ContainerCreateHeaders",
+ className: "ContainerBreakLeaseHeaders",
modelProperties: {
etag: {
serializedName: "etag",
@@ -18188,6 +17034,13 @@ const ContainerCreateHeaders = {
name: "DateTimeRfc1123"
}
},
+ leaseTime: {
+ serializedName: "x-ms-lease-time",
+ xmlName: "x-ms-lease-time",
+ type: {
+ name: "Number"
+ }
+ },
clientRequestId: {
serializedName: "x-ms-client-request-id",
xmlName: "x-ms-client-request-id",
@@ -18215,22 +17068,15 @@ const ContainerCreateHeaders = {
type: {
name: "DateTimeRfc1123"
}
- },
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
- type: {
- name: "String"
- }
}
}
}
};
-const ContainerCreateExceptionHeaders = {
- serializedName: "Container_createExceptionHeaders",
+const ContainerBreakLeaseExceptionHeaders = {
+ serializedName: "Container_breakLeaseExceptionHeaders",
type: {
name: "Composite",
- className: "ContainerCreateExceptionHeaders",
+ className: "ContainerBreakLeaseExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
@@ -18242,21 +17088,12 @@ const ContainerCreateExceptionHeaders = {
}
}
};
-const ContainerGetPropertiesHeaders = {
- serializedName: "Container_getPropertiesHeaders",
+const ContainerChangeLeaseHeaders = {
+ serializedName: "Container_changeLeaseHeaders",
type: {
name: "Composite",
- className: "ContainerGetPropertiesHeaders",
+ className: "ContainerChangeLeaseHeaders",
modelProperties: {
- metadata: {
- serializedName: "x-ms-meta",
- xmlName: "x-ms-meta",
- type: {
- name: "Dictionary",
- value: { type: { name: "String" } }
- },
- headerCollectionPrefix: "x-ms-meta-"
- },
etag: {
serializedName: "etag",
xmlName: "etag",
@@ -18271,34 +17108,11 @@ const ContainerGetPropertiesHeaders = {
name: "DateTimeRfc1123"
}
},
- leaseDuration: {
- serializedName: "x-ms-lease-duration",
- xmlName: "x-ms-lease-duration",
- type: {
- name: "Enum",
- allowedValues: ["infinite", "fixed"]
- }
- },
- leaseState: {
- serializedName: "x-ms-lease-state",
- xmlName: "x-ms-lease-state",
- type: {
- name: "Enum",
- allowedValues: [
- "available",
- "leased",
- "expired",
- "breaking",
- "broken"
- ]
- }
- },
- leaseStatus: {
- serializedName: "x-ms-lease-status",
- xmlName: "x-ms-lease-status",
+ leaseId: {
+ serializedName: "x-ms-lease-id",
+ xmlName: "x-ms-lease-id",
type: {
- name: "Enum",
- allowedValues: ["locked", "unlocked"]
+ name: "String"
}
},
clientRequestId: {
@@ -18328,65 +17142,15 @@ const ContainerGetPropertiesHeaders = {
type: {
name: "DateTimeRfc1123"
}
- },
- blobPublicAccess: {
- serializedName: "x-ms-blob-public-access",
- xmlName: "x-ms-blob-public-access",
- type: {
- name: "Enum",
- allowedValues: ["container", "blob"]
- }
- },
- hasImmutabilityPolicy: {
- serializedName: "x-ms-has-immutability-policy",
- xmlName: "x-ms-has-immutability-policy",
- type: {
- name: "Boolean"
- }
- },
- hasLegalHold: {
- serializedName: "x-ms-has-legal-hold",
- xmlName: "x-ms-has-legal-hold",
- type: {
- name: "Boolean"
- }
- },
- defaultEncryptionScope: {
- serializedName: "x-ms-default-encryption-scope",
- xmlName: "x-ms-default-encryption-scope",
- type: {
- name: "String"
- }
- },
- denyEncryptionScopeOverride: {
- serializedName: "x-ms-deny-encryption-scope-override",
- xmlName: "x-ms-deny-encryption-scope-override",
- type: {
- name: "Boolean"
- }
- },
- isImmutableStorageWithVersioningEnabled: {
- serializedName: "x-ms-immutable-storage-with-versioning-enabled",
- xmlName: "x-ms-immutable-storage-with-versioning-enabled",
- type: {
- name: "Boolean"
- }
- },
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
- type: {
- name: "String"
- }
}
}
}
};
-const ContainerGetPropertiesExceptionHeaders = {
- serializedName: "Container_getPropertiesExceptionHeaders",
+const ContainerChangeLeaseExceptionHeaders = {
+ serializedName: "Container_changeLeaseExceptionHeaders",
type: {
name: "Composite",
- className: "ContainerGetPropertiesExceptionHeaders",
+ className: "ContainerChangeLeaseExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
@@ -18398,12 +17162,19 @@ const ContainerGetPropertiesExceptionHeaders = {
}
}
};
-const ContainerDeleteHeaders = {
- serializedName: "Container_deleteHeaders",
+const ContainerListBlobFlatSegmentHeaders = {
+ serializedName: "Container_listBlobFlatSegmentHeaders",
type: {
name: "Composite",
- className: "ContainerDeleteHeaders",
+ className: "ContainerListBlobFlatSegmentHeaders",
modelProperties: {
+ contentType: {
+ serializedName: "content-type",
+ xmlName: "content-type",
+ type: {
+ name: "String"
+ }
+ },
clientRequestId: {
serializedName: "x-ms-client-request-id",
xmlName: "x-ms-client-request-id",
@@ -18442,11 +17213,11 @@ const ContainerDeleteHeaders = {
}
}
};
-const ContainerDeleteExceptionHeaders = {
- serializedName: "Container_deleteExceptionHeaders",
+const ContainerListBlobFlatSegmentExceptionHeaders = {
+ serializedName: "Container_listBlobFlatSegmentExceptionHeaders",
type: {
name: "Composite",
- className: "ContainerDeleteExceptionHeaders",
+ className: "ContainerListBlobFlatSegmentExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
@@ -18458,26 +17229,19 @@ const ContainerDeleteExceptionHeaders = {
}
}
};
-const ContainerSetMetadataHeaders = {
- serializedName: "Container_setMetadataHeaders",
+const ContainerListBlobHierarchySegmentHeaders = {
+ serializedName: "Container_listBlobHierarchySegmentHeaders",
type: {
name: "Composite",
- className: "ContainerSetMetadataHeaders",
+ className: "ContainerListBlobHierarchySegmentHeaders",
modelProperties: {
- etag: {
- serializedName: "etag",
- xmlName: "etag",
+ contentType: {
+ serializedName: "content-type",
+ xmlName: "content-type",
type: {
name: "String"
}
},
- lastModified: {
- serializedName: "last-modified",
- xmlName: "last-modified",
- type: {
- name: "DateTimeRfc1123"
- }
- },
clientRequestId: {
serializedName: "x-ms-client-request-id",
xmlName: "x-ms-client-request-id",
@@ -18516,11 +17280,11 @@ const ContainerSetMetadataHeaders = {
}
}
};
-const ContainerSetMetadataExceptionHeaders = {
- serializedName: "Container_setMetadataExceptionHeaders",
+const ContainerListBlobHierarchySegmentExceptionHeaders = {
+ serializedName: "Container_listBlobHierarchySegmentExceptionHeaders",
type: {
name: "Composite",
- className: "ContainerSetMetadataExceptionHeaders",
+ className: "ContainerListBlobHierarchySegmentExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
@@ -18532,34 +17296,12 @@ const ContainerSetMetadataExceptionHeaders = {
}
}
};
-const ContainerGetAccessPolicyHeaders = {
- serializedName: "Container_getAccessPolicyHeaders",
+const ContainerGetAccountInfoHeaders = {
+ serializedName: "Container_getAccountInfoHeaders",
type: {
name: "Composite",
- className: "ContainerGetAccessPolicyHeaders",
+ className: "ContainerGetAccountInfoHeaders",
modelProperties: {
- blobPublicAccess: {
- serializedName: "x-ms-blob-public-access",
- xmlName: "x-ms-blob-public-access",
- type: {
- name: "Enum",
- allowedValues: ["container", "blob"]
- }
- },
- etag: {
- serializedName: "etag",
- xmlName: "etag",
- type: {
- name: "String"
- }
- },
- lastModified: {
- serializedName: "last-modified",
- xmlName: "last-modified",
- type: {
- name: "DateTimeRfc1123"
- }
- },
clientRequestId: {
serializedName: "x-ms-client-request-id",
xmlName: "x-ms-client-request-id",
@@ -18588,21 +17330,42 @@ const ContainerGetAccessPolicyHeaders = {
name: "DateTimeRfc1123"
}
},
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
+ skuName: {
+ serializedName: "x-ms-sku-name",
+ xmlName: "x-ms-sku-name",
type: {
- name: "String"
+ name: "Enum",
+ allowedValues: [
+ "Standard_LRS",
+ "Standard_GRS",
+ "Standard_RAGRS",
+ "Standard_ZRS",
+ "Premium_LRS"
+ ]
+ }
+ },
+ accountKind: {
+ serializedName: "x-ms-account-kind",
+ xmlName: "x-ms-account-kind",
+ type: {
+ name: "Enum",
+ allowedValues: [
+ "Storage",
+ "BlobStorage",
+ "StorageV2",
+ "FileStorage",
+ "BlockBlobStorage"
+ ]
}
}
}
}
};
-const ContainerGetAccessPolicyExceptionHeaders = {
- serializedName: "Container_getAccessPolicyExceptionHeaders",
+const ContainerGetAccountInfoExceptionHeaders = {
+ serializedName: "Container_getAccountInfoExceptionHeaders",
type: {
name: "Composite",
- className: "ContainerGetAccessPolicyExceptionHeaders",
+ className: "ContainerGetAccountInfoExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
@@ -18614,12 +17377,72 @@ const ContainerGetAccessPolicyExceptionHeaders = {
}
}
};
-const ContainerSetAccessPolicyHeaders = {
- serializedName: "Container_setAccessPolicyHeaders",
+const BlobDownloadHeaders = {
+ serializedName: "Blob_downloadHeaders",
type: {
name: "Composite",
- className: "ContainerSetAccessPolicyHeaders",
+ className: "BlobDownloadHeaders",
modelProperties: {
+ lastModified: {
+ serializedName: "last-modified",
+ xmlName: "last-modified",
+ type: {
+ name: "DateTimeRfc1123"
+ }
+ },
+ createdOn: {
+ serializedName: "x-ms-creation-time",
+ xmlName: "x-ms-creation-time",
+ type: {
+ name: "DateTimeRfc1123"
+ }
+ },
+ metadata: {
+ serializedName: "x-ms-meta",
+ xmlName: "x-ms-meta",
+ type: {
+ name: "Dictionary",
+ value: { type: { name: "String" } }
+ },
+ headerCollectionPrefix: "x-ms-meta-"
+ },
+ objectReplicationPolicyId: {
+ serializedName: "x-ms-or-policy-id",
+ xmlName: "x-ms-or-policy-id",
+ type: {
+ name: "String"
+ }
+ },
+ objectReplicationRules: {
+ serializedName: "x-ms-or",
+ xmlName: "x-ms-or",
+ type: {
+ name: "Dictionary",
+ value: { type: { name: "String" } }
+ },
+ headerCollectionPrefix: "x-ms-or-"
+ },
+ contentLength: {
+ serializedName: "content-length",
+ xmlName: "content-length",
+ type: {
+ name: "Number"
+ }
+ },
+ contentType: {
+ serializedName: "content-type",
+ xmlName: "content-type",
+ type: {
+ name: "String"
+ }
+ },
+ contentRange: {
+ serializedName: "content-range",
+ xmlName: "content-range",
+ type: {
+ name: "String"
+ }
+ },
etag: {
serializedName: "etag",
xmlName: "etag",
@@ -18627,133 +17450,129 @@ const ContainerSetAccessPolicyHeaders = {
name: "String"
}
},
- lastModified: {
- serializedName: "last-modified",
- xmlName: "last-modified",
+ contentMD5: {
+ serializedName: "content-md5",
+ xmlName: "content-md5",
type: {
- name: "DateTimeRfc1123"
+ name: "ByteArray"
}
},
- clientRequestId: {
- serializedName: "x-ms-client-request-id",
- xmlName: "x-ms-client-request-id",
+ contentEncoding: {
+ serializedName: "content-encoding",
+ xmlName: "content-encoding",
type: {
name: "String"
}
},
- requestId: {
- serializedName: "x-ms-request-id",
- xmlName: "x-ms-request-id",
+ cacheControl: {
+ serializedName: "cache-control",
+ xmlName: "cache-control",
type: {
name: "String"
}
},
- version: {
- serializedName: "x-ms-version",
- xmlName: "x-ms-version",
+ contentDisposition: {
+ serializedName: "content-disposition",
+ xmlName: "content-disposition",
type: {
name: "String"
}
},
- date: {
- serializedName: "date",
- xmlName: "date",
+ contentLanguage: {
+ serializedName: "content-language",
+ xmlName: "content-language",
+ type: {
+ name: "String"
+ }
+ },
+ blobSequenceNumber: {
+ serializedName: "x-ms-blob-sequence-number",
+ xmlName: "x-ms-blob-sequence-number",
+ type: {
+ name: "Number"
+ }
+ },
+ blobType: {
+ serializedName: "x-ms-blob-type",
+ xmlName: "x-ms-blob-type",
+ type: {
+ name: "Enum",
+ allowedValues: ["BlockBlob", "PageBlob", "AppendBlob"]
+ }
+ },
+ copyCompletedOn: {
+ serializedName: "x-ms-copy-completion-time",
+ xmlName: "x-ms-copy-completion-time",
type: {
name: "DateTimeRfc1123"
}
},
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
+ copyStatusDescription: {
+ serializedName: "x-ms-copy-status-description",
+ xmlName: "x-ms-copy-status-description",
type: {
name: "String"
}
- }
- }
- }
-};
-const ContainerSetAccessPolicyExceptionHeaders = {
- serializedName: "Container_setAccessPolicyExceptionHeaders",
- type: {
- name: "Composite",
- className: "ContainerSetAccessPolicyExceptionHeaders",
- modelProperties: {
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
+ },
+ copyId: {
+ serializedName: "x-ms-copy-id",
+ xmlName: "x-ms-copy-id",
type: {
name: "String"
}
- }
- }
- }
-};
-const ContainerRestoreHeaders = {
- serializedName: "Container_restoreHeaders",
- type: {
- name: "Composite",
- className: "ContainerRestoreHeaders",
- modelProperties: {
- clientRequestId: {
- serializedName: "x-ms-client-request-id",
- xmlName: "x-ms-client-request-id",
+ },
+ copyProgress: {
+ serializedName: "x-ms-copy-progress",
+ xmlName: "x-ms-copy-progress",
type: {
name: "String"
}
},
- requestId: {
- serializedName: "x-ms-request-id",
- xmlName: "x-ms-request-id",
+ copySource: {
+ serializedName: "x-ms-copy-source",
+ xmlName: "x-ms-copy-source",
type: {
name: "String"
}
},
- version: {
- serializedName: "x-ms-version",
- xmlName: "x-ms-version",
+ copyStatus: {
+ serializedName: "x-ms-copy-status",
+ xmlName: "x-ms-copy-status",
type: {
- name: "String"
+ name: "Enum",
+ allowedValues: ["pending", "success", "aborted", "failed"]
}
},
- date: {
- serializedName: "date",
- xmlName: "date",
+ leaseDuration: {
+ serializedName: "x-ms-lease-duration",
+ xmlName: "x-ms-lease-duration",
type: {
- name: "DateTimeRfc1123"
+ name: "Enum",
+ allowedValues: ["infinite", "fixed"]
}
},
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
+ leaseState: {
+ serializedName: "x-ms-lease-state",
+ xmlName: "x-ms-lease-state",
type: {
- name: "String"
+ name: "Enum",
+ allowedValues: [
+ "available",
+ "leased",
+ "expired",
+ "breaking",
+ "broken"
+ ]
}
- }
- }
- }
-};
-const ContainerRestoreExceptionHeaders = {
- serializedName: "Container_restoreExceptionHeaders",
- type: {
- name: "Composite",
- className: "ContainerRestoreExceptionHeaders",
- modelProperties: {
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
+ },
+ leaseStatus: {
+ serializedName: "x-ms-lease-status",
+ xmlName: "x-ms-lease-status",
type: {
- name: "String"
+ name: "Enum",
+ allowedValues: ["locked", "unlocked"]
}
- }
- }
- }
-};
-const ContainerRenameHeaders = {
- serializedName: "Container_renameHeaders",
- type: {
- name: "Composite",
- className: "ContainerRenameHeaders",
- modelProperties: {
+ },
clientRequestId: {
serializedName: "x-ms-client-request-id",
xmlName: "x-ms-client-request-id",
@@ -18775,6 +17594,27 @@ const ContainerRenameHeaders = {
name: "String"
}
},
+ versionId: {
+ serializedName: "x-ms-version-id",
+ xmlName: "x-ms-version-id",
+ type: {
+ name: "String"
+ }
+ },
+ isCurrentVersion: {
+ serializedName: "x-ms-is-current-version",
+ xmlName: "x-ms-is-current-version",
+ type: {
+ name: "Boolean"
+ }
+ },
+ acceptRanges: {
+ serializedName: "accept-ranges",
+ xmlName: "accept-ranges",
+ type: {
+ name: "String"
+ }
+ },
date: {
serializedName: "date",
xmlName: "date",
@@ -18782,120 +17622,106 @@ const ContainerRenameHeaders = {
name: "DateTimeRfc1123"
}
},
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
+ blobCommittedBlockCount: {
+ serializedName: "x-ms-blob-committed-block-count",
+ xmlName: "x-ms-blob-committed-block-count",
type: {
- name: "String"
+ name: "Number"
}
- }
- }
- }
-};
-const ContainerRenameExceptionHeaders = {
- serializedName: "Container_renameExceptionHeaders",
- type: {
- name: "Composite",
- className: "ContainerRenameExceptionHeaders",
- modelProperties: {
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
+ },
+ isServerEncrypted: {
+ serializedName: "x-ms-server-encrypted",
+ xmlName: "x-ms-server-encrypted",
type: {
- name: "String"
+ name: "Boolean"
}
- }
- }
- }
-};
-const ContainerSubmitBatchHeaders = {
- serializedName: "Container_submitBatchHeaders",
- type: {
- name: "Composite",
- className: "ContainerSubmitBatchHeaders",
- modelProperties: {
- contentType: {
- serializedName: "content-type",
- xmlName: "content-type",
+ },
+ encryptionKeySha256: {
+ serializedName: "x-ms-encryption-key-sha256",
+ xmlName: "x-ms-encryption-key-sha256",
type: {
name: "String"
}
},
- requestId: {
- serializedName: "x-ms-request-id",
- xmlName: "x-ms-request-id",
+ encryptionScope: {
+ serializedName: "x-ms-encryption-scope",
+ xmlName: "x-ms-encryption-scope",
type: {
name: "String"
}
},
- version: {
- serializedName: "x-ms-version",
- xmlName: "x-ms-version",
+ blobContentMD5: {
+ serializedName: "x-ms-blob-content-md5",
+ xmlName: "x-ms-blob-content-md5",
type: {
- name: "String"
+ name: "ByteArray"
}
- }
- }
- }
-};
-const ContainerSubmitBatchExceptionHeaders = {
- serializedName: "Container_submitBatchExceptionHeaders",
- type: {
- name: "Composite",
- className: "ContainerSubmitBatchExceptionHeaders",
- modelProperties: {
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
+ },
+ tagCount: {
+ serializedName: "x-ms-tag-count",
+ xmlName: "x-ms-tag-count",
type: {
- name: "String"
+ name: "Number"
}
- }
- }
- }
-};
-const ContainerFilterBlobsHeaders = {
- serializedName: "Container_filterBlobsHeaders",
- type: {
- name: "Composite",
- className: "ContainerFilterBlobsHeaders",
- modelProperties: {
- clientRequestId: {
- serializedName: "x-ms-client-request-id",
- xmlName: "x-ms-client-request-id",
+ },
+ isSealed: {
+ serializedName: "x-ms-blob-sealed",
+ xmlName: "x-ms-blob-sealed",
type: {
- name: "String"
+ name: "Boolean"
}
},
- requestId: {
- serializedName: "x-ms-request-id",
- xmlName: "x-ms-request-id",
+ lastAccessed: {
+ serializedName: "x-ms-last-access-time",
+ xmlName: "x-ms-last-access-time",
type: {
- name: "String"
+ name: "DateTimeRfc1123"
}
},
- version: {
- serializedName: "x-ms-version",
- xmlName: "x-ms-version",
+ immutabilityPolicyExpiresOn: {
+ serializedName: "x-ms-immutability-policy-until-date",
+ xmlName: "x-ms-immutability-policy-until-date",
+ type: {
+ name: "DateTimeRfc1123"
+ }
+ },
+ immutabilityPolicyMode: {
+ serializedName: "x-ms-immutability-policy-mode",
+ xmlName: "x-ms-immutability-policy-mode",
+ type: {
+ name: "Enum",
+ allowedValues: ["Mutable", "Unlocked", "Locked"]
+ }
+ },
+ legalHold: {
+ serializedName: "x-ms-legal-hold",
+ xmlName: "x-ms-legal-hold",
+ type: {
+ name: "Boolean"
+ }
+ },
+ errorCode: {
+ serializedName: "x-ms-error-code",
+ xmlName: "x-ms-error-code",
type: {
name: "String"
}
},
- date: {
- serializedName: "date",
- xmlName: "date",
+ contentCrc64: {
+ serializedName: "x-ms-content-crc64",
+ xmlName: "x-ms-content-crc64",
type: {
- name: "DateTimeRfc1123"
+ name: "ByteArray"
}
}
}
}
};
-const ContainerFilterBlobsExceptionHeaders = {
- serializedName: "Container_filterBlobsExceptionHeaders",
+const BlobDownloadExceptionHeaders = {
+ serializedName: "Blob_downloadExceptionHeaders",
type: {
name: "Composite",
- className: "ContainerFilterBlobsExceptionHeaders",
+ className: "BlobDownloadExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
@@ -18907,19 +17733,12 @@ const ContainerFilterBlobsExceptionHeaders = {
}
}
};
-const ContainerAcquireLeaseHeaders = {
- serializedName: "Container_acquireLeaseHeaders",
+const BlobGetPropertiesHeaders = {
+ serializedName: "Blob_getPropertiesHeaders",
type: {
name: "Composite",
- className: "ContainerAcquireLeaseHeaders",
+ className: "BlobGetPropertiesHeaders",
modelProperties: {
- etag: {
- serializedName: "etag",
- xmlName: "etag",
- type: {
- name: "String"
- }
- },
lastModified: {
serializedName: "last-modified",
xmlName: "last-modified",
@@ -18927,66 +17746,147 @@ const ContainerAcquireLeaseHeaders = {
name: "DateTimeRfc1123"
}
},
- leaseId: {
- serializedName: "x-ms-lease-id",
- xmlName: "x-ms-lease-id",
+ createdOn: {
+ serializedName: "x-ms-creation-time",
+ xmlName: "x-ms-creation-time",
type: {
- name: "String"
+ name: "DateTimeRfc1123"
}
},
- clientRequestId: {
- serializedName: "x-ms-client-request-id",
- xmlName: "x-ms-client-request-id",
+ metadata: {
+ serializedName: "x-ms-meta",
+ xmlName: "x-ms-meta",
type: {
- name: "String"
+ name: "Dictionary",
+ value: { type: { name: "String" } }
+ },
+ headerCollectionPrefix: "x-ms-meta-"
+ },
+ objectReplicationPolicyId: {
+ serializedName: "x-ms-or-policy-id",
+ xmlName: "x-ms-or-policy-id",
+ type: {
+ name: "String"
}
},
- requestId: {
- serializedName: "x-ms-request-id",
- xmlName: "x-ms-request-id",
+ objectReplicationRules: {
+ serializedName: "x-ms-or",
+ xmlName: "x-ms-or",
+ type: {
+ name: "Dictionary",
+ value: { type: { name: "String" } }
+ },
+ headerCollectionPrefix: "x-ms-or-"
+ },
+ blobType: {
+ serializedName: "x-ms-blob-type",
+ xmlName: "x-ms-blob-type",
+ type: {
+ name: "Enum",
+ allowedValues: ["BlockBlob", "PageBlob", "AppendBlob"]
+ }
+ },
+ copyCompletedOn: {
+ serializedName: "x-ms-copy-completion-time",
+ xmlName: "x-ms-copy-completion-time",
+ type: {
+ name: "DateTimeRfc1123"
+ }
+ },
+ copyStatusDescription: {
+ serializedName: "x-ms-copy-status-description",
+ xmlName: "x-ms-copy-status-description",
type: {
name: "String"
}
},
- version: {
- serializedName: "x-ms-version",
- xmlName: "x-ms-version",
+ copyId: {
+ serializedName: "x-ms-copy-id",
+ xmlName: "x-ms-copy-id",
type: {
name: "String"
}
},
- date: {
- serializedName: "date",
- xmlName: "date",
+ copyProgress: {
+ serializedName: "x-ms-copy-progress",
+ xmlName: "x-ms-copy-progress",
type: {
- name: "DateTimeRfc1123"
+ name: "String"
}
- }
- }
- }
-};
-const ContainerAcquireLeaseExceptionHeaders = {
- serializedName: "Container_acquireLeaseExceptionHeaders",
- type: {
- name: "Composite",
- className: "ContainerAcquireLeaseExceptionHeaders",
- modelProperties: {
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
+ },
+ copySource: {
+ serializedName: "x-ms-copy-source",
+ xmlName: "x-ms-copy-source",
type: {
name: "String"
}
- }
- }
- }
-};
-const ContainerReleaseLeaseHeaders = {
- serializedName: "Container_releaseLeaseHeaders",
- type: {
- name: "Composite",
- className: "ContainerReleaseLeaseHeaders",
- modelProperties: {
+ },
+ copyStatus: {
+ serializedName: "x-ms-copy-status",
+ xmlName: "x-ms-copy-status",
+ type: {
+ name: "Enum",
+ allowedValues: ["pending", "success", "aborted", "failed"]
+ }
+ },
+ isIncrementalCopy: {
+ serializedName: "x-ms-incremental-copy",
+ xmlName: "x-ms-incremental-copy",
+ type: {
+ name: "Boolean"
+ }
+ },
+ destinationSnapshot: {
+ serializedName: "x-ms-copy-destination-snapshot",
+ xmlName: "x-ms-copy-destination-snapshot",
+ type: {
+ name: "String"
+ }
+ },
+ leaseDuration: {
+ serializedName: "x-ms-lease-duration",
+ xmlName: "x-ms-lease-duration",
+ type: {
+ name: "Enum",
+ allowedValues: ["infinite", "fixed"]
+ }
+ },
+ leaseState: {
+ serializedName: "x-ms-lease-state",
+ xmlName: "x-ms-lease-state",
+ type: {
+ name: "Enum",
+ allowedValues: [
+ "available",
+ "leased",
+ "expired",
+ "breaking",
+ "broken"
+ ]
+ }
+ },
+ leaseStatus: {
+ serializedName: "x-ms-lease-status",
+ xmlName: "x-ms-lease-status",
+ type: {
+ name: "Enum",
+ allowedValues: ["locked", "unlocked"]
+ }
+ },
+ contentLength: {
+ serializedName: "content-length",
+ xmlName: "content-length",
+ type: {
+ name: "Number"
+ }
+ },
+ contentType: {
+ serializedName: "content-type",
+ xmlName: "content-type",
+ type: {
+ name: "String"
+ }
+ },
etag: {
serializedName: "etag",
xmlName: "etag",
@@ -18994,11 +17894,46 @@ const ContainerReleaseLeaseHeaders = {
name: "String"
}
},
- lastModified: {
- serializedName: "last-modified",
- xmlName: "last-modified",
+ contentMD5: {
+ serializedName: "content-md5",
+ xmlName: "content-md5",
type: {
- name: "DateTimeRfc1123"
+ name: "ByteArray"
+ }
+ },
+ contentEncoding: {
+ serializedName: "content-encoding",
+ xmlName: "content-encoding",
+ type: {
+ name: "String"
+ }
+ },
+ contentDisposition: {
+ serializedName: "content-disposition",
+ xmlName: "content-disposition",
+ type: {
+ name: "String"
+ }
+ },
+ contentLanguage: {
+ serializedName: "content-language",
+ xmlName: "content-language",
+ type: {
+ name: "String"
+ }
+ },
+ cacheControl: {
+ serializedName: "cache-control",
+ xmlName: "cache-control",
+ type: {
+ name: "String"
+ }
+ },
+ blobSequenceNumber: {
+ serializedName: "x-ms-blob-sequence-number",
+ xmlName: "x-ms-blob-sequence-number",
+ type: {
+ name: "Number"
}
},
clientRequestId: {
@@ -19028,15 +17963,157 @@ const ContainerReleaseLeaseHeaders = {
type: {
name: "DateTimeRfc1123"
}
+ },
+ acceptRanges: {
+ serializedName: "accept-ranges",
+ xmlName: "accept-ranges",
+ type: {
+ name: "String"
+ }
+ },
+ blobCommittedBlockCount: {
+ serializedName: "x-ms-blob-committed-block-count",
+ xmlName: "x-ms-blob-committed-block-count",
+ type: {
+ name: "Number"
+ }
+ },
+ isServerEncrypted: {
+ serializedName: "x-ms-server-encrypted",
+ xmlName: "x-ms-server-encrypted",
+ type: {
+ name: "Boolean"
+ }
+ },
+ encryptionKeySha256: {
+ serializedName: "x-ms-encryption-key-sha256",
+ xmlName: "x-ms-encryption-key-sha256",
+ type: {
+ name: "String"
+ }
+ },
+ encryptionScope: {
+ serializedName: "x-ms-encryption-scope",
+ xmlName: "x-ms-encryption-scope",
+ type: {
+ name: "String"
+ }
+ },
+ accessTier: {
+ serializedName: "x-ms-access-tier",
+ xmlName: "x-ms-access-tier",
+ type: {
+ name: "String"
+ }
+ },
+ accessTierInferred: {
+ serializedName: "x-ms-access-tier-inferred",
+ xmlName: "x-ms-access-tier-inferred",
+ type: {
+ name: "Boolean"
+ }
+ },
+ archiveStatus: {
+ serializedName: "x-ms-archive-status",
+ xmlName: "x-ms-archive-status",
+ type: {
+ name: "String"
+ }
+ },
+ accessTierChangedOn: {
+ serializedName: "x-ms-access-tier-change-time",
+ xmlName: "x-ms-access-tier-change-time",
+ type: {
+ name: "DateTimeRfc1123"
+ }
+ },
+ versionId: {
+ serializedName: "x-ms-version-id",
+ xmlName: "x-ms-version-id",
+ type: {
+ name: "String"
+ }
+ },
+ isCurrentVersion: {
+ serializedName: "x-ms-is-current-version",
+ xmlName: "x-ms-is-current-version",
+ type: {
+ name: "Boolean"
+ }
+ },
+ tagCount: {
+ serializedName: "x-ms-tag-count",
+ xmlName: "x-ms-tag-count",
+ type: {
+ name: "Number"
+ }
+ },
+ expiresOn: {
+ serializedName: "x-ms-expiry-time",
+ xmlName: "x-ms-expiry-time",
+ type: {
+ name: "DateTimeRfc1123"
+ }
+ },
+ isSealed: {
+ serializedName: "x-ms-blob-sealed",
+ xmlName: "x-ms-blob-sealed",
+ type: {
+ name: "Boolean"
+ }
+ },
+ rehydratePriority: {
+ serializedName: "x-ms-rehydrate-priority",
+ xmlName: "x-ms-rehydrate-priority",
+ type: {
+ name: "Enum",
+ allowedValues: ["High", "Standard"]
+ }
+ },
+ lastAccessed: {
+ serializedName: "x-ms-last-access-time",
+ xmlName: "x-ms-last-access-time",
+ type: {
+ name: "DateTimeRfc1123"
+ }
+ },
+ immutabilityPolicyExpiresOn: {
+ serializedName: "x-ms-immutability-policy-until-date",
+ xmlName: "x-ms-immutability-policy-until-date",
+ type: {
+ name: "DateTimeRfc1123"
+ }
+ },
+ immutabilityPolicyMode: {
+ serializedName: "x-ms-immutability-policy-mode",
+ xmlName: "x-ms-immutability-policy-mode",
+ type: {
+ name: "Enum",
+ allowedValues: ["Mutable", "Unlocked", "Locked"]
+ }
+ },
+ legalHold: {
+ serializedName: "x-ms-legal-hold",
+ xmlName: "x-ms-legal-hold",
+ type: {
+ name: "Boolean"
+ }
+ },
+ errorCode: {
+ serializedName: "x-ms-error-code",
+ xmlName: "x-ms-error-code",
+ type: {
+ name: "String"
+ }
}
}
}
};
-const ContainerReleaseLeaseExceptionHeaders = {
- serializedName: "Container_releaseLeaseExceptionHeaders",
+const BlobGetPropertiesExceptionHeaders = {
+ serializedName: "Blob_getPropertiesExceptionHeaders",
type: {
name: "Composite",
- className: "ContainerReleaseLeaseExceptionHeaders",
+ className: "BlobGetPropertiesExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
@@ -19048,33 +18125,12 @@ const ContainerReleaseLeaseExceptionHeaders = {
}
}
};
-const ContainerRenewLeaseHeaders = {
- serializedName: "Container_renewLeaseHeaders",
+const BlobDeleteHeaders = {
+ serializedName: "Blob_deleteHeaders",
type: {
name: "Composite",
- className: "ContainerRenewLeaseHeaders",
+ className: "BlobDeleteHeaders",
modelProperties: {
- etag: {
- serializedName: "etag",
- xmlName: "etag",
- type: {
- name: "String"
- }
- },
- lastModified: {
- serializedName: "last-modified",
- xmlName: "last-modified",
- type: {
- name: "DateTimeRfc1123"
- }
- },
- leaseId: {
- serializedName: "x-ms-lease-id",
- xmlName: "x-ms-lease-id",
- type: {
- name: "String"
- }
- },
clientRequestId: {
serializedName: "x-ms-client-request-id",
xmlName: "x-ms-client-request-id",
@@ -19102,15 +18158,22 @@ const ContainerRenewLeaseHeaders = {
type: {
name: "DateTimeRfc1123"
}
+ },
+ errorCode: {
+ serializedName: "x-ms-error-code",
+ xmlName: "x-ms-error-code",
+ type: {
+ name: "String"
+ }
}
}
}
};
-const ContainerRenewLeaseExceptionHeaders = {
- serializedName: "Container_renewLeaseExceptionHeaders",
+const BlobDeleteExceptionHeaders = {
+ serializedName: "Blob_deleteExceptionHeaders",
type: {
name: "Composite",
- className: "ContainerRenewLeaseExceptionHeaders",
+ className: "BlobDeleteExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
@@ -19122,33 +18185,12 @@ const ContainerRenewLeaseExceptionHeaders = {
}
}
};
-const ContainerBreakLeaseHeaders = {
- serializedName: "Container_breakLeaseHeaders",
+const BlobUndeleteHeaders = {
+ serializedName: "Blob_undeleteHeaders",
type: {
name: "Composite",
- className: "ContainerBreakLeaseHeaders",
+ className: "BlobUndeleteHeaders",
modelProperties: {
- etag: {
- serializedName: "etag",
- xmlName: "etag",
- type: {
- name: "String"
- }
- },
- lastModified: {
- serializedName: "last-modified",
- xmlName: "last-modified",
- type: {
- name: "DateTimeRfc1123"
- }
- },
- leaseTime: {
- serializedName: "x-ms-lease-time",
- xmlName: "x-ms-lease-time",
- type: {
- name: "Number"
- }
- },
clientRequestId: {
serializedName: "x-ms-client-request-id",
xmlName: "x-ms-client-request-id",
@@ -19176,15 +18218,22 @@ const ContainerBreakLeaseHeaders = {
type: {
name: "DateTimeRfc1123"
}
+ },
+ errorCode: {
+ serializedName: "x-ms-error-code",
+ xmlName: "x-ms-error-code",
+ type: {
+ name: "String"
+ }
}
}
}
};
-const ContainerBreakLeaseExceptionHeaders = {
- serializedName: "Container_breakLeaseExceptionHeaders",
+const BlobUndeleteExceptionHeaders = {
+ serializedName: "Blob_undeleteExceptionHeaders",
type: {
name: "Composite",
- className: "ContainerBreakLeaseExceptionHeaders",
+ className: "BlobUndeleteExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
@@ -19196,11 +18245,11 @@ const ContainerBreakLeaseExceptionHeaders = {
}
}
};
-const ContainerChangeLeaseHeaders = {
- serializedName: "Container_changeLeaseHeaders",
+const BlobSetExpiryHeaders = {
+ serializedName: "Blob_setExpiryHeaders",
type: {
name: "Composite",
- className: "ContainerChangeLeaseHeaders",
+ className: "BlobSetExpiryHeaders",
modelProperties: {
etag: {
serializedName: "etag",
@@ -19216,13 +18265,6 @@ const ContainerChangeLeaseHeaders = {
name: "DateTimeRfc1123"
}
},
- leaseId: {
- serializedName: "x-ms-lease-id",
- xmlName: "x-ms-lease-id",
- type: {
- name: "String"
- }
- },
clientRequestId: {
serializedName: "x-ms-client-request-id",
xmlName: "x-ms-client-request-id",
@@ -19254,11 +18296,11 @@ const ContainerChangeLeaseHeaders = {
}
}
};
-const ContainerChangeLeaseExceptionHeaders = {
- serializedName: "Container_changeLeaseExceptionHeaders",
+const BlobSetExpiryExceptionHeaders = {
+ serializedName: "Blob_setExpiryExceptionHeaders",
type: {
name: "Composite",
- className: "ContainerChangeLeaseExceptionHeaders",
+ className: "BlobSetExpiryExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
@@ -19270,19 +18312,33 @@ const ContainerChangeLeaseExceptionHeaders = {
}
}
};
-const ContainerListBlobFlatSegmentHeaders = {
- serializedName: "Container_listBlobFlatSegmentHeaders",
+const BlobSetHttpHeadersHeaders = {
+ serializedName: "Blob_setHttpHeadersHeaders",
type: {
name: "Composite",
- className: "ContainerListBlobFlatSegmentHeaders",
+ className: "BlobSetHttpHeadersHeaders",
modelProperties: {
- contentType: {
- serializedName: "content-type",
- xmlName: "content-type",
+ etag: {
+ serializedName: "etag",
+ xmlName: "etag",
type: {
name: "String"
}
},
+ lastModified: {
+ serializedName: "last-modified",
+ xmlName: "last-modified",
+ type: {
+ name: "DateTimeRfc1123"
+ }
+ },
+ blobSequenceNumber: {
+ serializedName: "x-ms-blob-sequence-number",
+ xmlName: "x-ms-blob-sequence-number",
+ type: {
+ name: "Number"
+ }
+ },
clientRequestId: {
serializedName: "x-ms-client-request-id",
xmlName: "x-ms-client-request-id",
@@ -19321,11 +18377,11 @@ const ContainerListBlobFlatSegmentHeaders = {
}
}
};
-const ContainerListBlobFlatSegmentExceptionHeaders = {
- serializedName: "Container_listBlobFlatSegmentExceptionHeaders",
+const BlobSetHttpHeadersExceptionHeaders = {
+ serializedName: "Blob_setHttpHeadersExceptionHeaders",
type: {
name: "Composite",
- className: "ContainerListBlobFlatSegmentExceptionHeaders",
+ className: "BlobSetHttpHeadersExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
@@ -19337,19 +18393,12 @@ const ContainerListBlobFlatSegmentExceptionHeaders = {
}
}
};
-const ContainerListBlobHierarchySegmentHeaders = {
- serializedName: "Container_listBlobHierarchySegmentHeaders",
+const BlobSetImmutabilityPolicyHeaders = {
+ serializedName: "Blob_setImmutabilityPolicyHeaders",
type: {
name: "Composite",
- className: "ContainerListBlobHierarchySegmentHeaders",
+ className: "BlobSetImmutabilityPolicyHeaders",
modelProperties: {
- contentType: {
- serializedName: "content-type",
- xmlName: "content-type",
- type: {
- name: "String"
- }
- },
clientRequestId: {
serializedName: "x-ms-client-request-id",
xmlName: "x-ms-client-request-id",
@@ -19378,21 +18427,29 @@ const ContainerListBlobHierarchySegmentHeaders = {
name: "DateTimeRfc1123"
}
},
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
+ immutabilityPolicyExpiry: {
+ serializedName: "x-ms-immutability-policy-until-date",
+ xmlName: "x-ms-immutability-policy-until-date",
type: {
- name: "String"
+ name: "DateTimeRfc1123"
+ }
+ },
+ immutabilityPolicyMode: {
+ serializedName: "x-ms-immutability-policy-mode",
+ xmlName: "x-ms-immutability-policy-mode",
+ type: {
+ name: "Enum",
+ allowedValues: ["Mutable", "Unlocked", "Locked"]
}
}
}
}
};
-const ContainerListBlobHierarchySegmentExceptionHeaders = {
- serializedName: "Container_listBlobHierarchySegmentExceptionHeaders",
+const BlobSetImmutabilityPolicyExceptionHeaders = {
+ serializedName: "Blob_setImmutabilityPolicyExceptionHeaders",
type: {
name: "Composite",
- className: "ContainerListBlobHierarchySegmentExceptionHeaders",
+ className: "BlobSetImmutabilityPolicyExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
@@ -19404,11 +18461,11 @@ const ContainerListBlobHierarchySegmentExceptionHeaders = {
}
}
};
-const ContainerGetAccountInfoHeaders = {
- serializedName: "Container_getAccountInfoHeaders",
+const BlobDeleteImmutabilityPolicyHeaders = {
+ serializedName: "Blob_deleteImmutabilityPolicyHeaders",
type: {
name: "Composite",
- className: "ContainerGetAccountInfoHeaders",
+ className: "BlobDeleteImmutabilityPolicyHeaders",
modelProperties: {
clientRequestId: {
serializedName: "x-ms-client-request-id",
@@ -19437,43 +18494,15 @@ const ContainerGetAccountInfoHeaders = {
type: {
name: "DateTimeRfc1123"
}
- },
- skuName: {
- serializedName: "x-ms-sku-name",
- xmlName: "x-ms-sku-name",
- type: {
- name: "Enum",
- allowedValues: [
- "Standard_LRS",
- "Standard_GRS",
- "Standard_RAGRS",
- "Standard_ZRS",
- "Premium_LRS"
- ]
- }
- },
- accountKind: {
- serializedName: "x-ms-account-kind",
- xmlName: "x-ms-account-kind",
- type: {
- name: "Enum",
- allowedValues: [
- "Storage",
- "BlobStorage",
- "StorageV2",
- "FileStorage",
- "BlockBlobStorage"
- ]
- }
}
}
}
};
-const ContainerGetAccountInfoExceptionHeaders = {
- serializedName: "Container_getAccountInfoExceptionHeaders",
+const BlobDeleteImmutabilityPolicyExceptionHeaders = {
+ serializedName: "Blob_deleteImmutabilityPolicyExceptionHeaders",
type: {
name: "Composite",
- className: "ContainerGetAccountInfoExceptionHeaders",
+ className: "BlobDeleteImmutabilityPolicyExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
@@ -19485,72 +18514,72 @@ const ContainerGetAccountInfoExceptionHeaders = {
}
}
};
-const BlobDownloadHeaders = {
- serializedName: "Blob_downloadHeaders",
+const BlobSetLegalHoldHeaders = {
+ serializedName: "Blob_setLegalHoldHeaders",
type: {
name: "Composite",
- className: "BlobDownloadHeaders",
+ className: "BlobSetLegalHoldHeaders",
modelProperties: {
- lastModified: {
- serializedName: "last-modified",
- xmlName: "last-modified",
+ clientRequestId: {
+ serializedName: "x-ms-client-request-id",
+ xmlName: "x-ms-client-request-id",
type: {
- name: "DateTimeRfc1123"
+ name: "String"
}
},
- createdOn: {
- serializedName: "x-ms-creation-time",
- xmlName: "x-ms-creation-time",
+ requestId: {
+ serializedName: "x-ms-request-id",
+ xmlName: "x-ms-request-id",
type: {
- name: "DateTimeRfc1123"
+ name: "String"
}
},
- metadata: {
- serializedName: "x-ms-meta",
- xmlName: "x-ms-meta",
- type: {
- name: "Dictionary",
- value: { type: { name: "String" } }
- },
- headerCollectionPrefix: "x-ms-meta-"
- },
- objectReplicationPolicyId: {
- serializedName: "x-ms-or-policy-id",
- xmlName: "x-ms-or-policy-id",
+ version: {
+ serializedName: "x-ms-version",
+ xmlName: "x-ms-version",
type: {
name: "String"
}
},
- objectReplicationRules: {
- serializedName: "x-ms-or",
- xmlName: "x-ms-or",
- type: {
- name: "Dictionary",
- value: { type: { name: "String" } }
- },
- headerCollectionPrefix: "x-ms-or-"
- },
- contentLength: {
- serializedName: "content-length",
- xmlName: "content-length",
+ date: {
+ serializedName: "date",
+ xmlName: "date",
type: {
- name: "Number"
+ name: "DateTimeRfc1123"
}
},
- contentType: {
- serializedName: "content-type",
- xmlName: "content-type",
+ legalHold: {
+ serializedName: "x-ms-legal-hold",
+ xmlName: "x-ms-legal-hold",
type: {
- name: "String"
+ name: "Boolean"
}
- },
- contentRange: {
- serializedName: "content-range",
- xmlName: "content-range",
+ }
+ }
+ }
+};
+const BlobSetLegalHoldExceptionHeaders = {
+ serializedName: "Blob_setLegalHoldExceptionHeaders",
+ type: {
+ name: "Composite",
+ className: "BlobSetLegalHoldExceptionHeaders",
+ modelProperties: {
+ errorCode: {
+ serializedName: "x-ms-error-code",
+ xmlName: "x-ms-error-code",
type: {
name: "String"
}
- },
+ }
+ }
+ }
+};
+const BlobSetMetadataHeaders = {
+ serializedName: "Blob_setMetadataHeaders",
+ type: {
+ name: "Composite",
+ className: "BlobSetMetadataHeaders",
+ modelProperties: {
etag: {
serializedName: "etag",
xmlName: "etag",
@@ -19558,127 +18587,120 @@ const BlobDownloadHeaders = {
name: "String"
}
},
- contentMD5: {
- serializedName: "content-md5",
- xmlName: "content-md5",
+ lastModified: {
+ serializedName: "last-modified",
+ xmlName: "last-modified",
type: {
- name: "ByteArray"
+ name: "DateTimeRfc1123"
}
},
- contentEncoding: {
- serializedName: "content-encoding",
- xmlName: "content-encoding",
+ clientRequestId: {
+ serializedName: "x-ms-client-request-id",
+ xmlName: "x-ms-client-request-id",
type: {
name: "String"
}
},
- cacheControl: {
- serializedName: "cache-control",
- xmlName: "cache-control",
+ requestId: {
+ serializedName: "x-ms-request-id",
+ xmlName: "x-ms-request-id",
type: {
name: "String"
}
},
- contentDisposition: {
- serializedName: "content-disposition",
- xmlName: "content-disposition",
+ version: {
+ serializedName: "x-ms-version",
+ xmlName: "x-ms-version",
type: {
name: "String"
}
},
- contentLanguage: {
- serializedName: "content-language",
- xmlName: "content-language",
+ versionId: {
+ serializedName: "x-ms-version-id",
+ xmlName: "x-ms-version-id",
type: {
name: "String"
}
},
- blobSequenceNumber: {
- serializedName: "x-ms-blob-sequence-number",
- xmlName: "x-ms-blob-sequence-number",
- type: {
- name: "Number"
- }
- },
- blobType: {
- serializedName: "x-ms-blob-type",
- xmlName: "x-ms-blob-type",
- type: {
- name: "Enum",
- allowedValues: ["BlockBlob", "PageBlob", "AppendBlob"]
- }
- },
- copyCompletedOn: {
- serializedName: "x-ms-copy-completion-time",
- xmlName: "x-ms-copy-completion-time",
+ date: {
+ serializedName: "date",
+ xmlName: "date",
type: {
name: "DateTimeRfc1123"
}
},
- copyStatusDescription: {
- serializedName: "x-ms-copy-status-description",
- xmlName: "x-ms-copy-status-description",
+ isServerEncrypted: {
+ serializedName: "x-ms-request-server-encrypted",
+ xmlName: "x-ms-request-server-encrypted",
type: {
- name: "String"
+ name: "Boolean"
}
},
- copyId: {
- serializedName: "x-ms-copy-id",
- xmlName: "x-ms-copy-id",
+ encryptionKeySha256: {
+ serializedName: "x-ms-encryption-key-sha256",
+ xmlName: "x-ms-encryption-key-sha256",
type: {
name: "String"
}
},
- copyProgress: {
- serializedName: "x-ms-copy-progress",
- xmlName: "x-ms-copy-progress",
+ encryptionScope: {
+ serializedName: "x-ms-encryption-scope",
+ xmlName: "x-ms-encryption-scope",
type: {
name: "String"
}
},
- copySource: {
- serializedName: "x-ms-copy-source",
- xmlName: "x-ms-copy-source",
+ errorCode: {
+ serializedName: "x-ms-error-code",
+ xmlName: "x-ms-error-code",
type: {
name: "String"
}
- },
- copyStatus: {
- serializedName: "x-ms-copy-status",
- xmlName: "x-ms-copy-status",
+ }
+ }
+ }
+};
+const BlobSetMetadataExceptionHeaders = {
+ serializedName: "Blob_setMetadataExceptionHeaders",
+ type: {
+ name: "Composite",
+ className: "BlobSetMetadataExceptionHeaders",
+ modelProperties: {
+ errorCode: {
+ serializedName: "x-ms-error-code",
+ xmlName: "x-ms-error-code",
type: {
- name: "Enum",
- allowedValues: ["pending", "success", "aborted", "failed"]
+ name: "String"
}
- },
- leaseDuration: {
- serializedName: "x-ms-lease-duration",
- xmlName: "x-ms-lease-duration",
+ }
+ }
+ }
+};
+const BlobAcquireLeaseHeaders = {
+ serializedName: "Blob_acquireLeaseHeaders",
+ type: {
+ name: "Composite",
+ className: "BlobAcquireLeaseHeaders",
+ modelProperties: {
+ etag: {
+ serializedName: "etag",
+ xmlName: "etag",
type: {
- name: "Enum",
- allowedValues: ["infinite", "fixed"]
+ name: "String"
}
},
- leaseState: {
- serializedName: "x-ms-lease-state",
- xmlName: "x-ms-lease-state",
+ lastModified: {
+ serializedName: "last-modified",
+ xmlName: "last-modified",
type: {
- name: "Enum",
- allowedValues: [
- "available",
- "leased",
- "expired",
- "breaking",
- "broken"
- ]
+ name: "DateTimeRfc1123"
}
},
- leaseStatus: {
- serializedName: "x-ms-lease-status",
- xmlName: "x-ms-lease-status",
+ leaseId: {
+ serializedName: "x-ms-lease-id",
+ xmlName: "x-ms-lease-id",
type: {
- name: "Enum",
- allowedValues: ["locked", "unlocked"]
+ name: "String"
}
},
clientRequestId: {
@@ -19702,134 +18724,162 @@ const BlobDownloadHeaders = {
name: "String"
}
},
- versionId: {
- serializedName: "x-ms-version-id",
- xmlName: "x-ms-version-id",
+ date: {
+ serializedName: "date",
+ xmlName: "date",
type: {
- name: "String"
+ name: "DateTimeRfc1123"
}
- },
- isCurrentVersion: {
- serializedName: "x-ms-is-current-version",
- xmlName: "x-ms-is-current-version",
+ }
+ }
+ }
+};
+const BlobAcquireLeaseExceptionHeaders = {
+ serializedName: "Blob_acquireLeaseExceptionHeaders",
+ type: {
+ name: "Composite",
+ className: "BlobAcquireLeaseExceptionHeaders",
+ modelProperties: {
+ errorCode: {
+ serializedName: "x-ms-error-code",
+ xmlName: "x-ms-error-code",
type: {
- name: "Boolean"
+ name: "String"
}
- },
- acceptRanges: {
- serializedName: "accept-ranges",
- xmlName: "accept-ranges",
+ }
+ }
+ }
+};
+const BlobReleaseLeaseHeaders = {
+ serializedName: "Blob_releaseLeaseHeaders",
+ type: {
+ name: "Composite",
+ className: "BlobReleaseLeaseHeaders",
+ modelProperties: {
+ etag: {
+ serializedName: "etag",
+ xmlName: "etag",
type: {
name: "String"
}
},
- date: {
- serializedName: "date",
- xmlName: "date",
+ lastModified: {
+ serializedName: "last-modified",
+ xmlName: "last-modified",
type: {
name: "DateTimeRfc1123"
}
},
- blobCommittedBlockCount: {
- serializedName: "x-ms-blob-committed-block-count",
- xmlName: "x-ms-blob-committed-block-count",
- type: {
- name: "Number"
- }
- },
- isServerEncrypted: {
- serializedName: "x-ms-server-encrypted",
- xmlName: "x-ms-server-encrypted",
+ clientRequestId: {
+ serializedName: "x-ms-client-request-id",
+ xmlName: "x-ms-client-request-id",
type: {
- name: "Boolean"
+ name: "String"
}
},
- encryptionKeySha256: {
- serializedName: "x-ms-encryption-key-sha256",
- xmlName: "x-ms-encryption-key-sha256",
+ requestId: {
+ serializedName: "x-ms-request-id",
+ xmlName: "x-ms-request-id",
type: {
name: "String"
}
},
- encryptionScope: {
- serializedName: "x-ms-encryption-scope",
- xmlName: "x-ms-encryption-scope",
+ version: {
+ serializedName: "x-ms-version",
+ xmlName: "x-ms-version",
type: {
name: "String"
}
},
- blobContentMD5: {
- serializedName: "x-ms-blob-content-md5",
- xmlName: "x-ms-blob-content-md5",
+ date: {
+ serializedName: "date",
+ xmlName: "date",
type: {
- name: "ByteArray"
+ name: "DateTimeRfc1123"
}
- },
- tagCount: {
- serializedName: "x-ms-tag-count",
- xmlName: "x-ms-tag-count",
+ }
+ }
+ }
+};
+const BlobReleaseLeaseExceptionHeaders = {
+ serializedName: "Blob_releaseLeaseExceptionHeaders",
+ type: {
+ name: "Composite",
+ className: "BlobReleaseLeaseExceptionHeaders",
+ modelProperties: {
+ errorCode: {
+ serializedName: "x-ms-error-code",
+ xmlName: "x-ms-error-code",
type: {
- name: "Number"
+ name: "String"
}
- },
- isSealed: {
- serializedName: "x-ms-blob-sealed",
- xmlName: "x-ms-blob-sealed",
+ }
+ }
+ }
+};
+const BlobRenewLeaseHeaders = {
+ serializedName: "Blob_renewLeaseHeaders",
+ type: {
+ name: "Composite",
+ className: "BlobRenewLeaseHeaders",
+ modelProperties: {
+ etag: {
+ serializedName: "etag",
+ xmlName: "etag",
type: {
- name: "Boolean"
+ name: "String"
}
},
- lastAccessed: {
- serializedName: "x-ms-last-access-time",
- xmlName: "x-ms-last-access-time",
+ lastModified: {
+ serializedName: "last-modified",
+ xmlName: "last-modified",
type: {
name: "DateTimeRfc1123"
}
},
- immutabilityPolicyExpiresOn: {
- serializedName: "x-ms-immutability-policy-until-date",
- xmlName: "x-ms-immutability-policy-until-date",
+ leaseId: {
+ serializedName: "x-ms-lease-id",
+ xmlName: "x-ms-lease-id",
type: {
- name: "DateTimeRfc1123"
+ name: "String"
}
},
- immutabilityPolicyMode: {
- serializedName: "x-ms-immutability-policy-mode",
- xmlName: "x-ms-immutability-policy-mode",
+ clientRequestId: {
+ serializedName: "x-ms-client-request-id",
+ xmlName: "x-ms-client-request-id",
type: {
- name: "Enum",
- allowedValues: ["Mutable", "Unlocked", "Locked"]
+ name: "String"
}
},
- legalHold: {
- serializedName: "x-ms-legal-hold",
- xmlName: "x-ms-legal-hold",
+ requestId: {
+ serializedName: "x-ms-request-id",
+ xmlName: "x-ms-request-id",
type: {
- name: "Boolean"
+ name: "String"
}
},
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
+ version: {
+ serializedName: "x-ms-version",
+ xmlName: "x-ms-version",
type: {
name: "String"
}
},
- contentCrc64: {
- serializedName: "x-ms-content-crc64",
- xmlName: "x-ms-content-crc64",
+ date: {
+ serializedName: "date",
+ xmlName: "date",
type: {
- name: "ByteArray"
+ name: "DateTimeRfc1123"
}
}
}
}
};
-const BlobDownloadExceptionHeaders = {
- serializedName: "Blob_downloadExceptionHeaders",
+const BlobRenewLeaseExceptionHeaders = {
+ serializedName: "Blob_renewLeaseExceptionHeaders",
type: {
name: "Composite",
- className: "BlobDownloadExceptionHeaders",
+ className: "BlobRenewLeaseExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
@@ -19841,160 +18891,86 @@ const BlobDownloadExceptionHeaders = {
}
}
};
-const BlobGetPropertiesHeaders = {
- serializedName: "Blob_getPropertiesHeaders",
+const BlobChangeLeaseHeaders = {
+ serializedName: "Blob_changeLeaseHeaders",
type: {
name: "Composite",
- className: "BlobGetPropertiesHeaders",
+ className: "BlobChangeLeaseHeaders",
modelProperties: {
- lastModified: {
- serializedName: "last-modified",
- xmlName: "last-modified",
+ etag: {
+ serializedName: "etag",
+ xmlName: "etag",
type: {
- name: "DateTimeRfc1123"
+ name: "String"
}
},
- createdOn: {
- serializedName: "x-ms-creation-time",
- xmlName: "x-ms-creation-time",
+ lastModified: {
+ serializedName: "last-modified",
+ xmlName: "last-modified",
type: {
name: "DateTimeRfc1123"
}
},
- metadata: {
- serializedName: "x-ms-meta",
- xmlName: "x-ms-meta",
- type: {
- name: "Dictionary",
- value: { type: { name: "String" } }
- },
- headerCollectionPrefix: "x-ms-meta-"
- },
- objectReplicationPolicyId: {
- serializedName: "x-ms-or-policy-id",
- xmlName: "x-ms-or-policy-id",
+ clientRequestId: {
+ serializedName: "x-ms-client-request-id",
+ xmlName: "x-ms-client-request-id",
type: {
name: "String"
}
},
- objectReplicationRules: {
- serializedName: "x-ms-or",
- xmlName: "x-ms-or",
- type: {
- name: "Dictionary",
- value: { type: { name: "String" } }
- },
- headerCollectionPrefix: "x-ms-or-"
- },
- blobType: {
- serializedName: "x-ms-blob-type",
- xmlName: "x-ms-blob-type",
- type: {
- name: "Enum",
- allowedValues: ["BlockBlob", "PageBlob", "AppendBlob"]
- }
- },
- copyCompletedOn: {
- serializedName: "x-ms-copy-completion-time",
- xmlName: "x-ms-copy-completion-time",
+ requestId: {
+ serializedName: "x-ms-request-id",
+ xmlName: "x-ms-request-id",
type: {
- name: "DateTimeRfc1123"
+ name: "String"
}
},
- copyStatusDescription: {
- serializedName: "x-ms-copy-status-description",
- xmlName: "x-ms-copy-status-description",
+ leaseId: {
+ serializedName: "x-ms-lease-id",
+ xmlName: "x-ms-lease-id",
type: {
name: "String"
}
},
- copyId: {
- serializedName: "x-ms-copy-id",
- xmlName: "x-ms-copy-id",
+ version: {
+ serializedName: "x-ms-version",
+ xmlName: "x-ms-version",
type: {
name: "String"
}
},
- copyProgress: {
- serializedName: "x-ms-copy-progress",
- xmlName: "x-ms-copy-progress",
- type: {
- name: "String"
- }
- },
- copySource: {
- serializedName: "x-ms-copy-source",
- xmlName: "x-ms-copy-source",
- type: {
- name: "String"
- }
- },
- copyStatus: {
- serializedName: "x-ms-copy-status",
- xmlName: "x-ms-copy-status",
- type: {
- name: "Enum",
- allowedValues: ["pending", "success", "aborted", "failed"]
- }
- },
- isIncrementalCopy: {
- serializedName: "x-ms-incremental-copy",
- xmlName: "x-ms-incremental-copy",
- type: {
- name: "Boolean"
- }
- },
- destinationSnapshot: {
- serializedName: "x-ms-copy-destination-snapshot",
- xmlName: "x-ms-copy-destination-snapshot",
- type: {
- name: "String"
- }
- },
- leaseDuration: {
- serializedName: "x-ms-lease-duration",
- xmlName: "x-ms-lease-duration",
- type: {
- name: "Enum",
- allowedValues: ["infinite", "fixed"]
- }
- },
- leaseState: {
- serializedName: "x-ms-lease-state",
- xmlName: "x-ms-lease-state",
- type: {
- name: "Enum",
- allowedValues: [
- "available",
- "leased",
- "expired",
- "breaking",
- "broken"
- ]
- }
- },
- leaseStatus: {
- serializedName: "x-ms-lease-status",
- xmlName: "x-ms-lease-status",
- type: {
- name: "Enum",
- allowedValues: ["locked", "unlocked"]
- }
- },
- contentLength: {
- serializedName: "content-length",
- xmlName: "content-length",
+ date: {
+ serializedName: "date",
+ xmlName: "date",
type: {
- name: "Number"
+ name: "DateTimeRfc1123"
}
- },
- contentType: {
- serializedName: "content-type",
- xmlName: "content-type",
+ }
+ }
+ }
+};
+const BlobChangeLeaseExceptionHeaders = {
+ serializedName: "Blob_changeLeaseExceptionHeaders",
+ type: {
+ name: "Composite",
+ className: "BlobChangeLeaseExceptionHeaders",
+ modelProperties: {
+ errorCode: {
+ serializedName: "x-ms-error-code",
+ xmlName: "x-ms-error-code",
type: {
name: "String"
}
- },
+ }
+ }
+ }
+};
+const BlobBreakLeaseHeaders = {
+ serializedName: "Blob_breakLeaseHeaders",
+ type: {
+ name: "Composite",
+ className: "BlobBreakLeaseHeaders",
+ modelProperties: {
etag: {
serializedName: "etag",
xmlName: "etag",
@@ -20002,44 +18978,16 @@ const BlobGetPropertiesHeaders = {
name: "String"
}
},
- contentMD5: {
- serializedName: "content-md5",
- xmlName: "content-md5",
- type: {
- name: "ByteArray"
- }
- },
- contentEncoding: {
- serializedName: "content-encoding",
- xmlName: "content-encoding",
- type: {
- name: "String"
- }
- },
- contentDisposition: {
- serializedName: "content-disposition",
- xmlName: "content-disposition",
- type: {
- name: "String"
- }
- },
- contentLanguage: {
- serializedName: "content-language",
- xmlName: "content-language",
- type: {
- name: "String"
- }
- },
- cacheControl: {
- serializedName: "cache-control",
- xmlName: "cache-control",
+ lastModified: {
+ serializedName: "last-modified",
+ xmlName: "last-modified",
type: {
- name: "String"
+ name: "DateTimeRfc1123"
}
},
- blobSequenceNumber: {
- serializedName: "x-ms-blob-sequence-number",
- xmlName: "x-ms-blob-sequence-number",
+ leaseTime: {
+ serializedName: "x-ms-lease-time",
+ xmlName: "x-ms-lease-time",
type: {
name: "Number"
}
@@ -20071,68 +19019,72 @@ const BlobGetPropertiesHeaders = {
type: {
name: "DateTimeRfc1123"
}
- },
- acceptRanges: {
- serializedName: "accept-ranges",
- xmlName: "accept-ranges",
+ }
+ }
+ }
+};
+const BlobBreakLeaseExceptionHeaders = {
+ serializedName: "Blob_breakLeaseExceptionHeaders",
+ type: {
+ name: "Composite",
+ className: "BlobBreakLeaseExceptionHeaders",
+ modelProperties: {
+ errorCode: {
+ serializedName: "x-ms-error-code",
+ xmlName: "x-ms-error-code",
type: {
name: "String"
}
- },
- blobCommittedBlockCount: {
- serializedName: "x-ms-blob-committed-block-count",
- xmlName: "x-ms-blob-committed-block-count",
- type: {
- name: "Number"
- }
- },
- isServerEncrypted: {
- serializedName: "x-ms-server-encrypted",
- xmlName: "x-ms-server-encrypted",
- type: {
- name: "Boolean"
- }
- },
- encryptionKeySha256: {
- serializedName: "x-ms-encryption-key-sha256",
- xmlName: "x-ms-encryption-key-sha256",
+ }
+ }
+ }
+};
+const BlobCreateSnapshotHeaders = {
+ serializedName: "Blob_createSnapshotHeaders",
+ type: {
+ name: "Composite",
+ className: "BlobCreateSnapshotHeaders",
+ modelProperties: {
+ snapshot: {
+ serializedName: "x-ms-snapshot",
+ xmlName: "x-ms-snapshot",
type: {
name: "String"
}
},
- encryptionScope: {
- serializedName: "x-ms-encryption-scope",
- xmlName: "x-ms-encryption-scope",
+ etag: {
+ serializedName: "etag",
+ xmlName: "etag",
type: {
name: "String"
}
},
- accessTier: {
- serializedName: "x-ms-access-tier",
- xmlName: "x-ms-access-tier",
+ lastModified: {
+ serializedName: "last-modified",
+ xmlName: "last-modified",
type: {
- name: "String"
+ name: "DateTimeRfc1123"
}
},
- accessTierInferred: {
- serializedName: "x-ms-access-tier-inferred",
- xmlName: "x-ms-access-tier-inferred",
+ clientRequestId: {
+ serializedName: "x-ms-client-request-id",
+ xmlName: "x-ms-client-request-id",
type: {
- name: "Boolean"
+ name: "String"
}
},
- archiveStatus: {
- serializedName: "x-ms-archive-status",
- xmlName: "x-ms-archive-status",
+ requestId: {
+ serializedName: "x-ms-request-id",
+ xmlName: "x-ms-request-id",
type: {
name: "String"
}
},
- accessTierChangedOn: {
- serializedName: "x-ms-access-tier-change-time",
- xmlName: "x-ms-access-tier-change-time",
+ version: {
+ serializedName: "x-ms-version",
+ xmlName: "x-ms-version",
type: {
- name: "DateTimeRfc1123"
+ name: "String"
}
},
versionId: {
@@ -20142,67 +19094,16 @@ const BlobGetPropertiesHeaders = {
name: "String"
}
},
- isCurrentVersion: {
- serializedName: "x-ms-is-current-version",
- xmlName: "x-ms-is-current-version",
- type: {
- name: "Boolean"
- }
- },
- tagCount: {
- serializedName: "x-ms-tag-count",
- xmlName: "x-ms-tag-count",
- type: {
- name: "Number"
- }
- },
- expiresOn: {
- serializedName: "x-ms-expiry-time",
- xmlName: "x-ms-expiry-time",
- type: {
- name: "DateTimeRfc1123"
- }
- },
- isSealed: {
- serializedName: "x-ms-blob-sealed",
- xmlName: "x-ms-blob-sealed",
- type: {
- name: "Boolean"
- }
- },
- rehydratePriority: {
- serializedName: "x-ms-rehydrate-priority",
- xmlName: "x-ms-rehydrate-priority",
- type: {
- name: "Enum",
- allowedValues: ["High", "Standard"]
- }
- },
- lastAccessed: {
- serializedName: "x-ms-last-access-time",
- xmlName: "x-ms-last-access-time",
- type: {
- name: "DateTimeRfc1123"
- }
- },
- immutabilityPolicyExpiresOn: {
- serializedName: "x-ms-immutability-policy-until-date",
- xmlName: "x-ms-immutability-policy-until-date",
+ date: {
+ serializedName: "date",
+ xmlName: "date",
type: {
name: "DateTimeRfc1123"
}
},
- immutabilityPolicyMode: {
- serializedName: "x-ms-immutability-policy-mode",
- xmlName: "x-ms-immutability-policy-mode",
- type: {
- name: "Enum",
- allowedValues: ["Mutable", "Unlocked", "Locked"]
- }
- },
- legalHold: {
- serializedName: "x-ms-legal-hold",
- xmlName: "x-ms-legal-hold",
+ isServerEncrypted: {
+ serializedName: "x-ms-request-server-encrypted",
+ xmlName: "x-ms-request-server-encrypted",
type: {
name: "Boolean"
}
@@ -20217,11 +19118,11 @@ const BlobGetPropertiesHeaders = {
}
}
};
-const BlobGetPropertiesExceptionHeaders = {
- serializedName: "Blob_getPropertiesExceptionHeaders",
+const BlobCreateSnapshotExceptionHeaders = {
+ serializedName: "Blob_createSnapshotExceptionHeaders",
type: {
name: "Composite",
- className: "BlobGetPropertiesExceptionHeaders",
+ className: "BlobCreateSnapshotExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
@@ -20233,12 +19134,26 @@ const BlobGetPropertiesExceptionHeaders = {
}
}
};
-const BlobDeleteHeaders = {
- serializedName: "Blob_deleteHeaders",
+const BlobStartCopyFromURLHeaders = {
+ serializedName: "Blob_startCopyFromURLHeaders",
type: {
name: "Composite",
- className: "BlobDeleteHeaders",
+ className: "BlobStartCopyFromURLHeaders",
modelProperties: {
+ etag: {
+ serializedName: "etag",
+ xmlName: "etag",
+ type: {
+ name: "String"
+ }
+ },
+ lastModified: {
+ serializedName: "last-modified",
+ xmlName: "last-modified",
+ type: {
+ name: "DateTimeRfc1123"
+ }
+ },
clientRequestId: {
serializedName: "x-ms-client-request-id",
xmlName: "x-ms-client-request-id",
@@ -20260,6 +19175,13 @@ const BlobDeleteHeaders = {
name: "String"
}
},
+ versionId: {
+ serializedName: "x-ms-version-id",
+ xmlName: "x-ms-version-id",
+ type: {
+ name: "String"
+ }
+ },
date: {
serializedName: "date",
xmlName: "date",
@@ -20267,6 +19189,21 @@ const BlobDeleteHeaders = {
name: "DateTimeRfc1123"
}
},
+ copyId: {
+ serializedName: "x-ms-copy-id",
+ xmlName: "x-ms-copy-id",
+ type: {
+ name: "String"
+ }
+ },
+ copyStatus: {
+ serializedName: "x-ms-copy-status",
+ xmlName: "x-ms-copy-status",
+ type: {
+ name: "Enum",
+ allowedValues: ["pending", "success", "aborted", "failed"]
+ }
+ },
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
@@ -20277,11 +19214,11 @@ const BlobDeleteHeaders = {
}
}
};
-const BlobDeleteExceptionHeaders = {
- serializedName: "Blob_deleteExceptionHeaders",
+const BlobStartCopyFromURLExceptionHeaders = {
+ serializedName: "Blob_startCopyFromURLExceptionHeaders",
type: {
name: "Composite",
- className: "BlobDeleteExceptionHeaders",
+ className: "BlobStartCopyFromURLExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
@@ -20293,12 +19230,26 @@ const BlobDeleteExceptionHeaders = {
}
}
};
-const BlobUndeleteHeaders = {
- serializedName: "Blob_undeleteHeaders",
+const BlobCopyFromURLHeaders = {
+ serializedName: "Blob_copyFromURLHeaders",
type: {
name: "Composite",
- className: "BlobUndeleteHeaders",
+ className: "BlobCopyFromURLHeaders",
modelProperties: {
+ etag: {
+ serializedName: "etag",
+ xmlName: "etag",
+ type: {
+ name: "String"
+ }
+ },
+ lastModified: {
+ serializedName: "last-modified",
+ xmlName: "last-modified",
+ type: {
+ name: "DateTimeRfc1123"
+ }
+ },
clientRequestId: {
serializedName: "x-ms-client-request-id",
xmlName: "x-ms-client-request-id",
@@ -20320,6 +19271,13 @@ const BlobUndeleteHeaders = {
name: "String"
}
},
+ versionId: {
+ serializedName: "x-ms-version-id",
+ xmlName: "x-ms-version-id",
+ type: {
+ name: "String"
+ }
+ },
date: {
serializedName: "date",
xmlName: "date",
@@ -20327,6 +19285,42 @@ const BlobUndeleteHeaders = {
name: "DateTimeRfc1123"
}
},
+ copyId: {
+ serializedName: "x-ms-copy-id",
+ xmlName: "x-ms-copy-id",
+ type: {
+ name: "String"
+ }
+ },
+ copyStatus: {
+ defaultValue: "success",
+ isConstant: true,
+ serializedName: "x-ms-copy-status",
+ type: {
+ name: "String"
+ }
+ },
+ contentMD5: {
+ serializedName: "content-md5",
+ xmlName: "content-md5",
+ type: {
+ name: "ByteArray"
+ }
+ },
+ xMsContentCrc64: {
+ serializedName: "x-ms-content-crc64",
+ xmlName: "x-ms-content-crc64",
+ type: {
+ name: "ByteArray"
+ }
+ },
+ encryptionScope: {
+ serializedName: "x-ms-encryption-scope",
+ xmlName: "x-ms-encryption-scope",
+ type: {
+ name: "String"
+ }
+ },
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
@@ -20337,11 +19331,11 @@ const BlobUndeleteHeaders = {
}
}
};
-const BlobUndeleteExceptionHeaders = {
- serializedName: "Blob_undeleteExceptionHeaders",
+const BlobCopyFromURLExceptionHeaders = {
+ serializedName: "Blob_copyFromURLExceptionHeaders",
type: {
name: "Composite",
- className: "BlobUndeleteExceptionHeaders",
+ className: "BlobCopyFromURLExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
@@ -20353,26 +19347,12 @@ const BlobUndeleteExceptionHeaders = {
}
}
};
-const BlobSetExpiryHeaders = {
- serializedName: "Blob_setExpiryHeaders",
+const BlobAbortCopyFromURLHeaders = {
+ serializedName: "Blob_abortCopyFromURLHeaders",
type: {
name: "Composite",
- className: "BlobSetExpiryHeaders",
+ className: "BlobAbortCopyFromURLHeaders",
modelProperties: {
- etag: {
- serializedName: "etag",
- xmlName: "etag",
- type: {
- name: "String"
- }
- },
- lastModified: {
- serializedName: "last-modified",
- xmlName: "last-modified",
- type: {
- name: "DateTimeRfc1123"
- }
- },
clientRequestId: {
serializedName: "x-ms-client-request-id",
xmlName: "x-ms-client-request-id",
@@ -20400,15 +19380,22 @@ const BlobSetExpiryHeaders = {
type: {
name: "DateTimeRfc1123"
}
+ },
+ errorCode: {
+ serializedName: "x-ms-error-code",
+ xmlName: "x-ms-error-code",
+ type: {
+ name: "String"
+ }
}
}
}
};
-const BlobSetExpiryExceptionHeaders = {
- serializedName: "Blob_setExpiryExceptionHeaders",
+const BlobAbortCopyFromURLExceptionHeaders = {
+ serializedName: "Blob_abortCopyFromURLExceptionHeaders",
type: {
name: "Composite",
- className: "BlobSetExpiryExceptionHeaders",
+ className: "BlobAbortCopyFromURLExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
@@ -20420,33 +19407,12 @@ const BlobSetExpiryExceptionHeaders = {
}
}
};
-const BlobSetHttpHeadersHeaders = {
- serializedName: "Blob_setHttpHeadersHeaders",
+const BlobSetTierHeaders = {
+ serializedName: "Blob_setTierHeaders",
type: {
name: "Composite",
- className: "BlobSetHttpHeadersHeaders",
+ className: "BlobSetTierHeaders",
modelProperties: {
- etag: {
- serializedName: "etag",
- xmlName: "etag",
- type: {
- name: "String"
- }
- },
- lastModified: {
- serializedName: "last-modified",
- xmlName: "last-modified",
- type: {
- name: "DateTimeRfc1123"
- }
- },
- blobSequenceNumber: {
- serializedName: "x-ms-blob-sequence-number",
- xmlName: "x-ms-blob-sequence-number",
- type: {
- name: "Number"
- }
- },
clientRequestId: {
serializedName: "x-ms-client-request-id",
xmlName: "x-ms-client-request-id",
@@ -20468,13 +19434,6 @@ const BlobSetHttpHeadersHeaders = {
name: "String"
}
},
- date: {
- serializedName: "date",
- xmlName: "date",
- type: {
- name: "DateTimeRfc1123"
- }
- },
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
@@ -20485,11 +19444,11 @@ const BlobSetHttpHeadersHeaders = {
}
}
};
-const BlobSetHttpHeadersExceptionHeaders = {
- serializedName: "Blob_setHttpHeadersExceptionHeaders",
+const BlobSetTierExceptionHeaders = {
+ serializedName: "Blob_setTierExceptionHeaders",
type: {
name: "Composite",
- className: "BlobSetHttpHeadersExceptionHeaders",
+ className: "BlobSetTierExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
@@ -20501,11 +19460,11 @@ const BlobSetHttpHeadersExceptionHeaders = {
}
}
};
-const BlobSetImmutabilityPolicyHeaders = {
- serializedName: "Blob_setImmutabilityPolicyHeaders",
+const BlobGetAccountInfoHeaders = {
+ serializedName: "Blob_getAccountInfoHeaders",
type: {
name: "Composite",
- className: "BlobSetImmutabilityPolicyHeaders",
+ className: "BlobGetAccountInfoHeaders",
modelProperties: {
clientRequestId: {
serializedName: "x-ms-client-request-id",
@@ -20535,29 +19494,42 @@ const BlobSetImmutabilityPolicyHeaders = {
name: "DateTimeRfc1123"
}
},
- immutabilityPolicyExpiry: {
- serializedName: "x-ms-immutability-policy-until-date",
- xmlName: "x-ms-immutability-policy-until-date",
+ skuName: {
+ serializedName: "x-ms-sku-name",
+ xmlName: "x-ms-sku-name",
type: {
- name: "DateTimeRfc1123"
+ name: "Enum",
+ allowedValues: [
+ "Standard_LRS",
+ "Standard_GRS",
+ "Standard_RAGRS",
+ "Standard_ZRS",
+ "Premium_LRS"
+ ]
}
},
- immutabilityPolicyMode: {
- serializedName: "x-ms-immutability-policy-mode",
- xmlName: "x-ms-immutability-policy-mode",
- type: {
+ accountKind: {
+ serializedName: "x-ms-account-kind",
+ xmlName: "x-ms-account-kind",
+ type: {
name: "Enum",
- allowedValues: ["Mutable", "Unlocked", "Locked"]
+ allowedValues: [
+ "Storage",
+ "BlobStorage",
+ "StorageV2",
+ "FileStorage",
+ "BlockBlobStorage"
+ ]
}
}
}
}
};
-const BlobSetImmutabilityPolicyExceptionHeaders = {
- serializedName: "Blob_setImmutabilityPolicyExceptionHeaders",
+const BlobGetAccountInfoExceptionHeaders = {
+ serializedName: "Blob_getAccountInfoExceptionHeaders",
type: {
name: "Composite",
- className: "BlobSetImmutabilityPolicyExceptionHeaders",
+ className: "BlobGetAccountInfoExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
@@ -20569,137 +19541,176 @@ const BlobSetImmutabilityPolicyExceptionHeaders = {
}
}
};
-const BlobDeleteImmutabilityPolicyHeaders = {
- serializedName: "Blob_deleteImmutabilityPolicyHeaders",
+const BlobQueryHeaders = {
+ serializedName: "Blob_queryHeaders",
type: {
name: "Composite",
- className: "BlobDeleteImmutabilityPolicyHeaders",
+ className: "BlobQueryHeaders",
modelProperties: {
- clientRequestId: {
- serializedName: "x-ms-client-request-id",
- xmlName: "x-ms-client-request-id",
+ lastModified: {
+ serializedName: "last-modified",
+ xmlName: "last-modified",
+ type: {
+ name: "DateTimeRfc1123"
+ }
+ },
+ metadata: {
+ serializedName: "x-ms-meta",
+ xmlName: "x-ms-meta",
+ type: {
+ name: "Dictionary",
+ value: { type: { name: "String" } }
+ }
+ },
+ contentLength: {
+ serializedName: "content-length",
+ xmlName: "content-length",
+ type: {
+ name: "Number"
+ }
+ },
+ contentType: {
+ serializedName: "content-type",
+ xmlName: "content-type",
type: {
name: "String"
}
},
- requestId: {
- serializedName: "x-ms-request-id",
- xmlName: "x-ms-request-id",
+ contentRange: {
+ serializedName: "content-range",
+ xmlName: "content-range",
type: {
name: "String"
}
},
- version: {
- serializedName: "x-ms-version",
- xmlName: "x-ms-version",
+ etag: {
+ serializedName: "etag",
+ xmlName: "etag",
type: {
name: "String"
}
},
- date: {
- serializedName: "date",
- xmlName: "date",
+ contentMD5: {
+ serializedName: "content-md5",
+ xmlName: "content-md5",
type: {
- name: "DateTimeRfc1123"
+ name: "ByteArray"
}
- }
- }
- }
-};
-const BlobDeleteImmutabilityPolicyExceptionHeaders = {
- serializedName: "Blob_deleteImmutabilityPolicyExceptionHeaders",
- type: {
- name: "Composite",
- className: "BlobDeleteImmutabilityPolicyExceptionHeaders",
- modelProperties: {
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
+ },
+ contentEncoding: {
+ serializedName: "content-encoding",
+ xmlName: "content-encoding",
type: {
name: "String"
}
- }
- }
- }
-};
-const BlobSetLegalHoldHeaders = {
- serializedName: "Blob_setLegalHoldHeaders",
- type: {
- name: "Composite",
- className: "BlobSetLegalHoldHeaders",
- modelProperties: {
- clientRequestId: {
- serializedName: "x-ms-client-request-id",
- xmlName: "x-ms-client-request-id",
+ },
+ cacheControl: {
+ serializedName: "cache-control",
+ xmlName: "cache-control",
type: {
name: "String"
}
},
- requestId: {
- serializedName: "x-ms-request-id",
- xmlName: "x-ms-request-id",
+ contentDisposition: {
+ serializedName: "content-disposition",
+ xmlName: "content-disposition",
type: {
name: "String"
}
},
- version: {
- serializedName: "x-ms-version",
- xmlName: "x-ms-version",
+ contentLanguage: {
+ serializedName: "content-language",
+ xmlName: "content-language",
type: {
name: "String"
}
},
- date: {
- serializedName: "date",
- xmlName: "date",
+ blobSequenceNumber: {
+ serializedName: "x-ms-blob-sequence-number",
+ xmlName: "x-ms-blob-sequence-number",
+ type: {
+ name: "Number"
+ }
+ },
+ blobType: {
+ serializedName: "x-ms-blob-type",
+ xmlName: "x-ms-blob-type",
+ type: {
+ name: "Enum",
+ allowedValues: ["BlockBlob", "PageBlob", "AppendBlob"]
+ }
+ },
+ copyCompletionTime: {
+ serializedName: "x-ms-copy-completion-time",
+ xmlName: "x-ms-copy-completion-time",
type: {
name: "DateTimeRfc1123"
}
},
- legalHold: {
- serializedName: "x-ms-legal-hold",
- xmlName: "x-ms-legal-hold",
+ copyStatusDescription: {
+ serializedName: "x-ms-copy-status-description",
+ xmlName: "x-ms-copy-status-description",
type: {
- name: "Boolean"
+ name: "String"
}
- }
- }
- }
-};
-const BlobSetLegalHoldExceptionHeaders = {
- serializedName: "Blob_setLegalHoldExceptionHeaders",
- type: {
- name: "Composite",
- className: "BlobSetLegalHoldExceptionHeaders",
- modelProperties: {
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
+ },
+ copyId: {
+ serializedName: "x-ms-copy-id",
+ xmlName: "x-ms-copy-id",
type: {
name: "String"
}
- }
- }
- }
-};
-const BlobSetMetadataHeaders = {
- serializedName: "Blob_setMetadataHeaders",
- type: {
- name: "Composite",
- className: "BlobSetMetadataHeaders",
- modelProperties: {
- etag: {
- serializedName: "etag",
- xmlName: "etag",
+ },
+ copyProgress: {
+ serializedName: "x-ms-copy-progress",
+ xmlName: "x-ms-copy-progress",
type: {
name: "String"
}
},
- lastModified: {
- serializedName: "last-modified",
- xmlName: "last-modified",
+ copySource: {
+ serializedName: "x-ms-copy-source",
+ xmlName: "x-ms-copy-source",
type: {
- name: "DateTimeRfc1123"
+ name: "String"
+ }
+ },
+ copyStatus: {
+ serializedName: "x-ms-copy-status",
+ xmlName: "x-ms-copy-status",
+ type: {
+ name: "Enum",
+ allowedValues: ["pending", "success", "aborted", "failed"]
+ }
+ },
+ leaseDuration: {
+ serializedName: "x-ms-lease-duration",
+ xmlName: "x-ms-lease-duration",
+ type: {
+ name: "Enum",
+ allowedValues: ["infinite", "fixed"]
+ }
+ },
+ leaseState: {
+ serializedName: "x-ms-lease-state",
+ xmlName: "x-ms-lease-state",
+ type: {
+ name: "Enum",
+ allowedValues: [
+ "available",
+ "leased",
+ "expired",
+ "breaking",
+ "broken"
+ ]
+ }
+ },
+ leaseStatus: {
+ serializedName: "x-ms-lease-status",
+ xmlName: "x-ms-lease-status",
+ type: {
+ name: "Enum",
+ allowedValues: ["locked", "unlocked"]
}
},
clientRequestId: {
@@ -20723,9 +19734,9 @@ const BlobSetMetadataHeaders = {
name: "String"
}
},
- versionId: {
- serializedName: "x-ms-version-id",
- xmlName: "x-ms-version-id",
+ acceptRanges: {
+ serializedName: "accept-ranges",
+ xmlName: "accept-ranges",
type: {
name: "String"
}
@@ -20737,9 +19748,16 @@ const BlobSetMetadataHeaders = {
name: "DateTimeRfc1123"
}
},
+ blobCommittedBlockCount: {
+ serializedName: "x-ms-blob-committed-block-count",
+ xmlName: "x-ms-blob-committed-block-count",
+ type: {
+ name: "Number"
+ }
+ },
isServerEncrypted: {
- serializedName: "x-ms-request-server-encrypted",
- xmlName: "x-ms-request-server-encrypted",
+ serializedName: "x-ms-server-encrypted",
+ xmlName: "x-ms-server-encrypted",
type: {
name: "Boolean"
}
@@ -20758,21 +19776,35 @@ const BlobSetMetadataHeaders = {
name: "String"
}
},
+ blobContentMD5: {
+ serializedName: "x-ms-blob-content-md5",
+ xmlName: "x-ms-blob-content-md5",
+ type: {
+ name: "ByteArray"
+ }
+ },
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String"
}
+ },
+ contentCrc64: {
+ serializedName: "x-ms-content-crc64",
+ xmlName: "x-ms-content-crc64",
+ type: {
+ name: "ByteArray"
+ }
}
}
}
};
-const BlobSetMetadataExceptionHeaders = {
- serializedName: "Blob_setMetadataExceptionHeaders",
+const BlobQueryExceptionHeaders = {
+ serializedName: "Blob_queryExceptionHeaders",
type: {
name: "Composite",
- className: "BlobSetMetadataExceptionHeaders",
+ className: "BlobQueryExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
@@ -20784,33 +19816,12 @@ const BlobSetMetadataExceptionHeaders = {
}
}
};
-const BlobAcquireLeaseHeaders = {
- serializedName: "Blob_acquireLeaseHeaders",
+const BlobGetTagsHeaders = {
+ serializedName: "Blob_getTagsHeaders",
type: {
name: "Composite",
- className: "BlobAcquireLeaseHeaders",
+ className: "BlobGetTagsHeaders",
modelProperties: {
- etag: {
- serializedName: "etag",
- xmlName: "etag",
- type: {
- name: "String"
- }
- },
- lastModified: {
- serializedName: "last-modified",
- xmlName: "last-modified",
- type: {
- name: "DateTimeRfc1123"
- }
- },
- leaseId: {
- serializedName: "x-ms-lease-id",
- xmlName: "x-ms-lease-id",
- type: {
- name: "String"
- }
- },
clientRequestId: {
serializedName: "x-ms-client-request-id",
xmlName: "x-ms-client-request-id",
@@ -20838,15 +19849,22 @@ const BlobAcquireLeaseHeaders = {
type: {
name: "DateTimeRfc1123"
}
+ },
+ errorCode: {
+ serializedName: "x-ms-error-code",
+ xmlName: "x-ms-error-code",
+ type: {
+ name: "String"
+ }
}
}
}
};
-const BlobAcquireLeaseExceptionHeaders = {
- serializedName: "Blob_acquireLeaseExceptionHeaders",
+const BlobGetTagsExceptionHeaders = {
+ serializedName: "Blob_getTagsExceptionHeaders",
type: {
name: "Composite",
- className: "BlobAcquireLeaseExceptionHeaders",
+ className: "BlobGetTagsExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
@@ -20858,26 +19876,12 @@ const BlobAcquireLeaseExceptionHeaders = {
}
}
};
-const BlobReleaseLeaseHeaders = {
- serializedName: "Blob_releaseLeaseHeaders",
+const BlobSetTagsHeaders = {
+ serializedName: "Blob_setTagsHeaders",
type: {
name: "Composite",
- className: "BlobReleaseLeaseHeaders",
+ className: "BlobSetTagsHeaders",
modelProperties: {
- etag: {
- serializedName: "etag",
- xmlName: "etag",
- type: {
- name: "String"
- }
- },
- lastModified: {
- serializedName: "last-modified",
- xmlName: "last-modified",
- type: {
- name: "DateTimeRfc1123"
- }
- },
clientRequestId: {
serializedName: "x-ms-client-request-id",
xmlName: "x-ms-client-request-id",
@@ -20905,15 +19909,22 @@ const BlobReleaseLeaseHeaders = {
type: {
name: "DateTimeRfc1123"
}
+ },
+ errorCode: {
+ serializedName: "x-ms-error-code",
+ xmlName: "x-ms-error-code",
+ type: {
+ name: "String"
+ }
}
}
}
};
-const BlobReleaseLeaseExceptionHeaders = {
- serializedName: "Blob_releaseLeaseExceptionHeaders",
+const BlobSetTagsExceptionHeaders = {
+ serializedName: "Blob_setTagsExceptionHeaders",
type: {
name: "Composite",
- className: "BlobReleaseLeaseExceptionHeaders",
+ className: "BlobSetTagsExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
@@ -20925,11 +19936,11 @@ const BlobReleaseLeaseExceptionHeaders = {
}
}
};
-const BlobRenewLeaseHeaders = {
- serializedName: "Blob_renewLeaseHeaders",
+const PageBlobCreateHeaders = {
+ serializedName: "PageBlob_createHeaders",
type: {
name: "Composite",
- className: "BlobRenewLeaseHeaders",
+ className: "PageBlobCreateHeaders",
modelProperties: {
etag: {
serializedName: "etag",
@@ -20945,11 +19956,11 @@ const BlobRenewLeaseHeaders = {
name: "DateTimeRfc1123"
}
},
- leaseId: {
- serializedName: "x-ms-lease-id",
- xmlName: "x-ms-lease-id",
+ contentMD5: {
+ serializedName: "content-md5",
+ xmlName: "content-md5",
type: {
- name: "String"
+ name: "ByteArray"
}
},
clientRequestId: {
@@ -20973,21 +19984,56 @@ const BlobRenewLeaseHeaders = {
name: "String"
}
},
+ versionId: {
+ serializedName: "x-ms-version-id",
+ xmlName: "x-ms-version-id",
+ type: {
+ name: "String"
+ }
+ },
date: {
serializedName: "date",
xmlName: "date",
type: {
name: "DateTimeRfc1123"
}
+ },
+ isServerEncrypted: {
+ serializedName: "x-ms-request-server-encrypted",
+ xmlName: "x-ms-request-server-encrypted",
+ type: {
+ name: "Boolean"
+ }
+ },
+ encryptionKeySha256: {
+ serializedName: "x-ms-encryption-key-sha256",
+ xmlName: "x-ms-encryption-key-sha256",
+ type: {
+ name: "String"
+ }
+ },
+ encryptionScope: {
+ serializedName: "x-ms-encryption-scope",
+ xmlName: "x-ms-encryption-scope",
+ type: {
+ name: "String"
+ }
+ },
+ errorCode: {
+ serializedName: "x-ms-error-code",
+ xmlName: "x-ms-error-code",
+ type: {
+ name: "String"
+ }
}
}
}
};
-const BlobRenewLeaseExceptionHeaders = {
- serializedName: "Blob_renewLeaseExceptionHeaders",
+const PageBlobCreateExceptionHeaders = {
+ serializedName: "PageBlob_createExceptionHeaders",
type: {
name: "Composite",
- className: "BlobRenewLeaseExceptionHeaders",
+ className: "PageBlobCreateExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
@@ -20999,11 +20045,11 @@ const BlobRenewLeaseExceptionHeaders = {
}
}
};
-const BlobChangeLeaseHeaders = {
- serializedName: "Blob_changeLeaseHeaders",
+const PageBlobUploadPagesHeaders = {
+ serializedName: "PageBlob_uploadPagesHeaders",
type: {
name: "Composite",
- className: "BlobChangeLeaseHeaders",
+ className: "PageBlobUploadPagesHeaders",
modelProperties: {
etag: {
serializedName: "etag",
@@ -21019,6 +20065,27 @@ const BlobChangeLeaseHeaders = {
name: "DateTimeRfc1123"
}
},
+ contentMD5: {
+ serializedName: "content-md5",
+ xmlName: "content-md5",
+ type: {
+ name: "ByteArray"
+ }
+ },
+ xMsContentCrc64: {
+ serializedName: "x-ms-content-crc64",
+ xmlName: "x-ms-content-crc64",
+ type: {
+ name: "ByteArray"
+ }
+ },
+ blobSequenceNumber: {
+ serializedName: "x-ms-blob-sequence-number",
+ xmlName: "x-ms-blob-sequence-number",
+ type: {
+ name: "Number"
+ }
+ },
clientRequestId: {
serializedName: "x-ms-client-request-id",
xmlName: "x-ms-client-request-id",
@@ -21033,13 +20100,6 @@ const BlobChangeLeaseHeaders = {
name: "String"
}
},
- leaseId: {
- serializedName: "x-ms-lease-id",
- xmlName: "x-ms-lease-id",
- type: {
- name: "String"
- }
- },
version: {
serializedName: "x-ms-version",
xmlName: "x-ms-version",
@@ -21053,15 +20113,43 @@ const BlobChangeLeaseHeaders = {
type: {
name: "DateTimeRfc1123"
}
+ },
+ isServerEncrypted: {
+ serializedName: "x-ms-request-server-encrypted",
+ xmlName: "x-ms-request-server-encrypted",
+ type: {
+ name: "Boolean"
+ }
+ },
+ encryptionKeySha256: {
+ serializedName: "x-ms-encryption-key-sha256",
+ xmlName: "x-ms-encryption-key-sha256",
+ type: {
+ name: "String"
+ }
+ },
+ encryptionScope: {
+ serializedName: "x-ms-encryption-scope",
+ xmlName: "x-ms-encryption-scope",
+ type: {
+ name: "String"
+ }
+ },
+ errorCode: {
+ serializedName: "x-ms-error-code",
+ xmlName: "x-ms-error-code",
+ type: {
+ name: "String"
+ }
}
}
}
};
-const BlobChangeLeaseExceptionHeaders = {
- serializedName: "Blob_changeLeaseExceptionHeaders",
+const PageBlobUploadPagesExceptionHeaders = {
+ serializedName: "PageBlob_uploadPagesExceptionHeaders",
type: {
name: "Composite",
- className: "BlobChangeLeaseExceptionHeaders",
+ className: "PageBlobUploadPagesExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
@@ -21073,11 +20161,11 @@ const BlobChangeLeaseExceptionHeaders = {
}
}
};
-const BlobBreakLeaseHeaders = {
- serializedName: "Blob_breakLeaseHeaders",
+const PageBlobClearPagesHeaders = {
+ serializedName: "PageBlob_clearPagesHeaders",
type: {
name: "Composite",
- className: "BlobBreakLeaseHeaders",
+ className: "PageBlobClearPagesHeaders",
modelProperties: {
etag: {
serializedName: "etag",
@@ -21093,9 +20181,23 @@ const BlobBreakLeaseHeaders = {
name: "DateTimeRfc1123"
}
},
- leaseTime: {
- serializedName: "x-ms-lease-time",
- xmlName: "x-ms-lease-time",
+ contentMD5: {
+ serializedName: "content-md5",
+ xmlName: "content-md5",
+ type: {
+ name: "ByteArray"
+ }
+ },
+ xMsContentCrc64: {
+ serializedName: "x-ms-content-crc64",
+ xmlName: "x-ms-content-crc64",
+ type: {
+ name: "ByteArray"
+ }
+ },
+ blobSequenceNumber: {
+ serializedName: "x-ms-blob-sequence-number",
+ xmlName: "x-ms-blob-sequence-number",
type: {
name: "Number"
}
@@ -21127,15 +20229,22 @@ const BlobBreakLeaseHeaders = {
type: {
name: "DateTimeRfc1123"
}
+ },
+ errorCode: {
+ serializedName: "x-ms-error-code",
+ xmlName: "x-ms-error-code",
+ type: {
+ name: "String"
+ }
}
}
}
};
-const BlobBreakLeaseExceptionHeaders = {
- serializedName: "Blob_breakLeaseExceptionHeaders",
+const PageBlobClearPagesExceptionHeaders = {
+ serializedName: "PageBlob_clearPagesExceptionHeaders",
type: {
name: "Composite",
- className: "BlobBreakLeaseExceptionHeaders",
+ className: "PageBlobClearPagesExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
@@ -21147,19 +20256,12 @@ const BlobBreakLeaseExceptionHeaders = {
}
}
};
-const BlobCreateSnapshotHeaders = {
- serializedName: "Blob_createSnapshotHeaders",
+const PageBlobUploadPagesFromURLHeaders = {
+ serializedName: "PageBlob_uploadPagesFromURLHeaders",
type: {
name: "Composite",
- className: "BlobCreateSnapshotHeaders",
+ className: "PageBlobUploadPagesFromURLHeaders",
modelProperties: {
- snapshot: {
- serializedName: "x-ms-snapshot",
- xmlName: "x-ms-snapshot",
- type: {
- name: "String"
- }
- },
etag: {
serializedName: "etag",
xmlName: "etag",
@@ -21174,11 +20276,25 @@ const BlobCreateSnapshotHeaders = {
name: "DateTimeRfc1123"
}
},
- clientRequestId: {
- serializedName: "x-ms-client-request-id",
- xmlName: "x-ms-client-request-id",
+ contentMD5: {
+ serializedName: "content-md5",
+ xmlName: "content-md5",
type: {
- name: "String"
+ name: "ByteArray"
+ }
+ },
+ xMsContentCrc64: {
+ serializedName: "x-ms-content-crc64",
+ xmlName: "x-ms-content-crc64",
+ type: {
+ name: "ByteArray"
+ }
+ },
+ blobSequenceNumber: {
+ serializedName: "x-ms-blob-sequence-number",
+ xmlName: "x-ms-blob-sequence-number",
+ type: {
+ name: "Number"
}
},
requestId: {
@@ -21195,13 +20311,6 @@ const BlobCreateSnapshotHeaders = {
name: "String"
}
},
- versionId: {
- serializedName: "x-ms-version-id",
- xmlName: "x-ms-version-id",
- type: {
- name: "String"
- }
- },
date: {
serializedName: "date",
xmlName: "date",
@@ -21216,6 +20325,20 @@ const BlobCreateSnapshotHeaders = {
name: "Boolean"
}
},
+ encryptionKeySha256: {
+ serializedName: "x-ms-encryption-key-sha256",
+ xmlName: "x-ms-encryption-key-sha256",
+ type: {
+ name: "String"
+ }
+ },
+ encryptionScope: {
+ serializedName: "x-ms-encryption-scope",
+ xmlName: "x-ms-encryption-scope",
+ type: {
+ name: "String"
+ }
+ },
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
@@ -21226,11 +20349,11 @@ const BlobCreateSnapshotHeaders = {
}
}
};
-const BlobCreateSnapshotExceptionHeaders = {
- serializedName: "Blob_createSnapshotExceptionHeaders",
+const PageBlobUploadPagesFromURLExceptionHeaders = {
+ serializedName: "PageBlob_uploadPagesFromURLExceptionHeaders",
type: {
name: "Composite",
- className: "BlobCreateSnapshotExceptionHeaders",
+ className: "PageBlobUploadPagesFromURLExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
@@ -21242,12 +20365,19 @@ const BlobCreateSnapshotExceptionHeaders = {
}
}
};
-const BlobStartCopyFromURLHeaders = {
- serializedName: "Blob_startCopyFromURLHeaders",
+const PageBlobGetPageRangesHeaders = {
+ serializedName: "PageBlob_getPageRangesHeaders",
type: {
name: "Composite",
- className: "BlobStartCopyFromURLHeaders",
+ className: "PageBlobGetPageRangesHeaders",
modelProperties: {
+ lastModified: {
+ serializedName: "last-modified",
+ xmlName: "last-modified",
+ type: {
+ name: "DateTimeRfc1123"
+ }
+ },
etag: {
serializedName: "etag",
xmlName: "etag",
@@ -21255,11 +20385,11 @@ const BlobStartCopyFromURLHeaders = {
name: "String"
}
},
- lastModified: {
- serializedName: "last-modified",
- xmlName: "last-modified",
+ blobContentLength: {
+ serializedName: "x-ms-blob-content-length",
+ xmlName: "x-ms-blob-content-length",
type: {
- name: "DateTimeRfc1123"
+ name: "Number"
}
},
clientRequestId: {
@@ -21283,13 +20413,6 @@ const BlobStartCopyFromURLHeaders = {
name: "String"
}
},
- versionId: {
- serializedName: "x-ms-version-id",
- xmlName: "x-ms-version-id",
- type: {
- name: "String"
- }
- },
date: {
serializedName: "date",
xmlName: "date",
@@ -21297,21 +20420,6 @@ const BlobStartCopyFromURLHeaders = {
name: "DateTimeRfc1123"
}
},
- copyId: {
- serializedName: "x-ms-copy-id",
- xmlName: "x-ms-copy-id",
- type: {
- name: "String"
- }
- },
- copyStatus: {
- serializedName: "x-ms-copy-status",
- xmlName: "x-ms-copy-status",
- type: {
- name: "Enum",
- allowedValues: ["pending", "success", "aborted", "failed"]
- }
- },
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
@@ -21322,11 +20430,11 @@ const BlobStartCopyFromURLHeaders = {
}
}
};
-const BlobStartCopyFromURLExceptionHeaders = {
- serializedName: "Blob_startCopyFromURLExceptionHeaders",
+const PageBlobGetPageRangesExceptionHeaders = {
+ serializedName: "PageBlob_getPageRangesExceptionHeaders",
type: {
name: "Composite",
- className: "BlobStartCopyFromURLExceptionHeaders",
+ className: "PageBlobGetPageRangesExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
@@ -21338,12 +20446,19 @@ const BlobStartCopyFromURLExceptionHeaders = {
}
}
};
-const BlobCopyFromURLHeaders = {
- serializedName: "Blob_copyFromURLHeaders",
+const PageBlobGetPageRangesDiffHeaders = {
+ serializedName: "PageBlob_getPageRangesDiffHeaders",
type: {
name: "Composite",
- className: "BlobCopyFromURLHeaders",
+ className: "PageBlobGetPageRangesDiffHeaders",
modelProperties: {
+ lastModified: {
+ serializedName: "last-modified",
+ xmlName: "last-modified",
+ type: {
+ name: "DateTimeRfc1123"
+ }
+ },
etag: {
serializedName: "etag",
xmlName: "etag",
@@ -21351,11 +20466,11 @@ const BlobCopyFromURLHeaders = {
name: "String"
}
},
- lastModified: {
- serializedName: "last-modified",
- xmlName: "last-modified",
+ blobContentLength: {
+ serializedName: "x-ms-blob-content-length",
+ xmlName: "x-ms-blob-content-length",
type: {
- name: "DateTimeRfc1123"
+ name: "Number"
}
},
clientRequestId: {
@@ -21379,13 +20494,6 @@ const BlobCopyFromURLHeaders = {
name: "String"
}
},
- versionId: {
- serializedName: "x-ms-version-id",
- xmlName: "x-ms-version-id",
- type: {
- name: "String"
- }
- },
date: {
serializedName: "date",
xmlName: "date",
@@ -21393,42 +20501,6 @@ const BlobCopyFromURLHeaders = {
name: "DateTimeRfc1123"
}
},
- copyId: {
- serializedName: "x-ms-copy-id",
- xmlName: "x-ms-copy-id",
- type: {
- name: "String"
- }
- },
- copyStatus: {
- defaultValue: "success",
- isConstant: true,
- serializedName: "x-ms-copy-status",
- type: {
- name: "String"
- }
- },
- contentMD5: {
- serializedName: "content-md5",
- xmlName: "content-md5",
- type: {
- name: "ByteArray"
- }
- },
- xMsContentCrc64: {
- serializedName: "x-ms-content-crc64",
- xmlName: "x-ms-content-crc64",
- type: {
- name: "ByteArray"
- }
- },
- encryptionScope: {
- serializedName: "x-ms-encryption-scope",
- xmlName: "x-ms-encryption-scope",
- type: {
- name: "String"
- }
- },
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
@@ -21439,11 +20511,11 @@ const BlobCopyFromURLHeaders = {
}
}
};
-const BlobCopyFromURLExceptionHeaders = {
- serializedName: "Blob_copyFromURLExceptionHeaders",
+const PageBlobGetPageRangesDiffExceptionHeaders = {
+ serializedName: "PageBlob_getPageRangesDiffExceptionHeaders",
type: {
name: "Composite",
- className: "BlobCopyFromURLExceptionHeaders",
+ className: "PageBlobGetPageRangesDiffExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
@@ -21455,12 +20527,33 @@ const BlobCopyFromURLExceptionHeaders = {
}
}
};
-const BlobAbortCopyFromURLHeaders = {
- serializedName: "Blob_abortCopyFromURLHeaders",
+const PageBlobResizeHeaders = {
+ serializedName: "PageBlob_resizeHeaders",
type: {
name: "Composite",
- className: "BlobAbortCopyFromURLHeaders",
+ className: "PageBlobResizeHeaders",
modelProperties: {
+ etag: {
+ serializedName: "etag",
+ xmlName: "etag",
+ type: {
+ name: "String"
+ }
+ },
+ lastModified: {
+ serializedName: "last-modified",
+ xmlName: "last-modified",
+ type: {
+ name: "DateTimeRfc1123"
+ }
+ },
+ blobSequenceNumber: {
+ serializedName: "x-ms-blob-sequence-number",
+ xmlName: "x-ms-blob-sequence-number",
+ type: {
+ name: "Number"
+ }
+ },
clientRequestId: {
serializedName: "x-ms-client-request-id",
xmlName: "x-ms-client-request-id",
@@ -21499,11 +20592,11 @@ const BlobAbortCopyFromURLHeaders = {
}
}
};
-const BlobAbortCopyFromURLExceptionHeaders = {
- serializedName: "Blob_abortCopyFromURLExceptionHeaders",
+const PageBlobResizeExceptionHeaders = {
+ serializedName: "PageBlob_resizeExceptionHeaders",
type: {
name: "Composite",
- className: "BlobAbortCopyFromURLExceptionHeaders",
+ className: "PageBlobResizeExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
@@ -21515,12 +20608,33 @@ const BlobAbortCopyFromURLExceptionHeaders = {
}
}
};
-const BlobSetTierHeaders = {
- serializedName: "Blob_setTierHeaders",
+const PageBlobUpdateSequenceNumberHeaders = {
+ serializedName: "PageBlob_updateSequenceNumberHeaders",
type: {
name: "Composite",
- className: "BlobSetTierHeaders",
+ className: "PageBlobUpdateSequenceNumberHeaders",
modelProperties: {
+ etag: {
+ serializedName: "etag",
+ xmlName: "etag",
+ type: {
+ name: "String"
+ }
+ },
+ lastModified: {
+ serializedName: "last-modified",
+ xmlName: "last-modified",
+ type: {
+ name: "DateTimeRfc1123"
+ }
+ },
+ blobSequenceNumber: {
+ serializedName: "x-ms-blob-sequence-number",
+ xmlName: "x-ms-blob-sequence-number",
+ type: {
+ name: "Number"
+ }
+ },
clientRequestId: {
serializedName: "x-ms-client-request-id",
xmlName: "x-ms-client-request-id",
@@ -21542,6 +20656,13 @@ const BlobSetTierHeaders = {
name: "String"
}
},
+ date: {
+ serializedName: "date",
+ xmlName: "date",
+ type: {
+ name: "DateTimeRfc1123"
+ }
+ },
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
@@ -21552,11 +20673,11 @@ const BlobSetTierHeaders = {
}
}
};
-const BlobSetTierExceptionHeaders = {
- serializedName: "Blob_setTierExceptionHeaders",
+const PageBlobUpdateSequenceNumberExceptionHeaders = {
+ serializedName: "PageBlob_updateSequenceNumberExceptionHeaders",
type: {
name: "Composite",
- className: "BlobSetTierExceptionHeaders",
+ className: "PageBlobUpdateSequenceNumberExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
@@ -21568,12 +20689,26 @@ const BlobSetTierExceptionHeaders = {
}
}
};
-const BlobGetAccountInfoHeaders = {
- serializedName: "Blob_getAccountInfoHeaders",
+const PageBlobCopyIncrementalHeaders = {
+ serializedName: "PageBlob_copyIncrementalHeaders",
type: {
name: "Composite",
- className: "BlobGetAccountInfoHeaders",
+ className: "PageBlobCopyIncrementalHeaders",
modelProperties: {
+ etag: {
+ serializedName: "etag",
+ xmlName: "etag",
+ type: {
+ name: "String"
+ }
+ },
+ lastModified: {
+ serializedName: "last-modified",
+ xmlName: "last-modified",
+ type: {
+ name: "DateTimeRfc1123"
+ }
+ },
clientRequestId: {
serializedName: "x-ms-client-request-id",
xmlName: "x-ms-client-request-id",
@@ -21602,42 +20737,36 @@ const BlobGetAccountInfoHeaders = {
name: "DateTimeRfc1123"
}
},
- skuName: {
- serializedName: "x-ms-sku-name",
- xmlName: "x-ms-sku-name",
+ copyId: {
+ serializedName: "x-ms-copy-id",
+ xmlName: "x-ms-copy-id",
type: {
- name: "Enum",
- allowedValues: [
- "Standard_LRS",
- "Standard_GRS",
- "Standard_RAGRS",
- "Standard_ZRS",
- "Premium_LRS"
- ]
+ name: "String"
}
},
- accountKind: {
- serializedName: "x-ms-account-kind",
- xmlName: "x-ms-account-kind",
+ copyStatus: {
+ serializedName: "x-ms-copy-status",
+ xmlName: "x-ms-copy-status",
type: {
name: "Enum",
- allowedValues: [
- "Storage",
- "BlobStorage",
- "StorageV2",
- "FileStorage",
- "BlockBlobStorage"
- ]
+ allowedValues: ["pending", "success", "aborted", "failed"]
+ }
+ },
+ errorCode: {
+ serializedName: "x-ms-error-code",
+ xmlName: "x-ms-error-code",
+ type: {
+ name: "String"
}
}
}
}
};
-const BlobGetAccountInfoExceptionHeaders = {
- serializedName: "Blob_getAccountInfoExceptionHeaders",
+const PageBlobCopyIncrementalExceptionHeaders = {
+ serializedName: "PageBlob_copyIncrementalExceptionHeaders",
type: {
name: "Composite",
- className: "BlobGetAccountInfoExceptionHeaders",
+ className: "PageBlobCopyIncrementalExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
@@ -21649,48 +20778,12 @@ const BlobGetAccountInfoExceptionHeaders = {
}
}
};
-const BlobQueryHeaders = {
- serializedName: "Blob_queryHeaders",
+const AppendBlobCreateHeaders = {
+ serializedName: "AppendBlob_createHeaders",
type: {
name: "Composite",
- className: "BlobQueryHeaders",
+ className: "AppendBlobCreateHeaders",
modelProperties: {
- lastModified: {
- serializedName: "last-modified",
- xmlName: "last-modified",
- type: {
- name: "DateTimeRfc1123"
- }
- },
- metadata: {
- serializedName: "x-ms-meta",
- xmlName: "x-ms-meta",
- type: {
- name: "Dictionary",
- value: { type: { name: "String" } }
- }
- },
- contentLength: {
- serializedName: "content-length",
- xmlName: "content-length",
- type: {
- name: "Number"
- }
- },
- contentType: {
- serializedName: "content-type",
- xmlName: "content-type",
- type: {
- name: "String"
- }
- },
- contentRange: {
- serializedName: "content-range",
- xmlName: "content-range",
- type: {
- name: "String"
- }
- },
etag: {
serializedName: "etag",
xmlName: "etag",
@@ -21698,6 +20791,13 @@ const BlobQueryHeaders = {
name: "String"
}
},
+ lastModified: {
+ serializedName: "last-modified",
+ xmlName: "last-modified",
+ type: {
+ name: "DateTimeRfc1123"
+ }
+ },
contentMD5: {
serializedName: "content-md5",
xmlName: "content-md5",
@@ -21705,120 +20805,120 @@ const BlobQueryHeaders = {
name: "ByteArray"
}
},
- contentEncoding: {
- serializedName: "content-encoding",
- xmlName: "content-encoding",
+ clientRequestId: {
+ serializedName: "x-ms-client-request-id",
+ xmlName: "x-ms-client-request-id",
type: {
name: "String"
}
},
- cacheControl: {
- serializedName: "cache-control",
- xmlName: "cache-control",
+ requestId: {
+ serializedName: "x-ms-request-id",
+ xmlName: "x-ms-request-id",
type: {
name: "String"
}
},
- contentDisposition: {
- serializedName: "content-disposition",
- xmlName: "content-disposition",
+ version: {
+ serializedName: "x-ms-version",
+ xmlName: "x-ms-version",
type: {
name: "String"
}
},
- contentLanguage: {
- serializedName: "content-language",
- xmlName: "content-language",
+ versionId: {
+ serializedName: "x-ms-version-id",
+ xmlName: "x-ms-version-id",
type: {
name: "String"
}
},
- blobSequenceNumber: {
- serializedName: "x-ms-blob-sequence-number",
- xmlName: "x-ms-blob-sequence-number",
- type: {
- name: "Number"
- }
- },
- blobType: {
- serializedName: "x-ms-blob-type",
- xmlName: "x-ms-blob-type",
+ date: {
+ serializedName: "date",
+ xmlName: "date",
type: {
- name: "Enum",
- allowedValues: ["BlockBlob", "PageBlob", "AppendBlob"]
+ name: "DateTimeRfc1123"
}
},
- copyCompletionTime: {
- serializedName: "x-ms-copy-completion-time",
- xmlName: "x-ms-copy-completion-time",
+ isServerEncrypted: {
+ serializedName: "x-ms-request-server-encrypted",
+ xmlName: "x-ms-request-server-encrypted",
type: {
- name: "DateTimeRfc1123"
+ name: "Boolean"
}
},
- copyStatusDescription: {
- serializedName: "x-ms-copy-status-description",
- xmlName: "x-ms-copy-status-description",
+ encryptionKeySha256: {
+ serializedName: "x-ms-encryption-key-sha256",
+ xmlName: "x-ms-encryption-key-sha256",
type: {
name: "String"
}
},
- copyId: {
- serializedName: "x-ms-copy-id",
- xmlName: "x-ms-copy-id",
+ encryptionScope: {
+ serializedName: "x-ms-encryption-scope",
+ xmlName: "x-ms-encryption-scope",
type: {
name: "String"
}
},
- copyProgress: {
- serializedName: "x-ms-copy-progress",
- xmlName: "x-ms-copy-progress",
+ errorCode: {
+ serializedName: "x-ms-error-code",
+ xmlName: "x-ms-error-code",
type: {
name: "String"
}
- },
- copySource: {
- serializedName: "x-ms-copy-source",
- xmlName: "x-ms-copy-source",
+ }
+ }
+ }
+};
+const AppendBlobCreateExceptionHeaders = {
+ serializedName: "AppendBlob_createExceptionHeaders",
+ type: {
+ name: "Composite",
+ className: "AppendBlobCreateExceptionHeaders",
+ modelProperties: {
+ errorCode: {
+ serializedName: "x-ms-error-code",
+ xmlName: "x-ms-error-code",
type: {
name: "String"
}
- },
- copyStatus: {
- serializedName: "x-ms-copy-status",
- xmlName: "x-ms-copy-status",
+ }
+ }
+ }
+};
+const AppendBlobAppendBlockHeaders = {
+ serializedName: "AppendBlob_appendBlockHeaders",
+ type: {
+ name: "Composite",
+ className: "AppendBlobAppendBlockHeaders",
+ modelProperties: {
+ etag: {
+ serializedName: "etag",
+ xmlName: "etag",
type: {
- name: "Enum",
- allowedValues: ["pending", "success", "aborted", "failed"]
+ name: "String"
}
},
- leaseDuration: {
- serializedName: "x-ms-lease-duration",
- xmlName: "x-ms-lease-duration",
+ lastModified: {
+ serializedName: "last-modified",
+ xmlName: "last-modified",
type: {
- name: "Enum",
- allowedValues: ["infinite", "fixed"]
+ name: "DateTimeRfc1123"
}
},
- leaseState: {
- serializedName: "x-ms-lease-state",
- xmlName: "x-ms-lease-state",
+ contentMD5: {
+ serializedName: "content-md5",
+ xmlName: "content-md5",
type: {
- name: "Enum",
- allowedValues: [
- "available",
- "leased",
- "expired",
- "breaking",
- "broken"
- ]
+ name: "ByteArray"
}
},
- leaseStatus: {
- serializedName: "x-ms-lease-status",
- xmlName: "x-ms-lease-status",
+ xMsContentCrc64: {
+ serializedName: "x-ms-content-crc64",
+ xmlName: "x-ms-content-crc64",
type: {
- name: "Enum",
- allowedValues: ["locked", "unlocked"]
+ name: "ByteArray"
}
},
clientRequestId: {
@@ -21842,13 +20942,6 @@ const BlobQueryHeaders = {
name: "String"
}
},
- acceptRanges: {
- serializedName: "accept-ranges",
- xmlName: "accept-ranges",
- type: {
- name: "String"
- }
- },
date: {
serializedName: "date",
xmlName: "date",
@@ -21856,6 +20949,13 @@ const BlobQueryHeaders = {
name: "DateTimeRfc1123"
}
},
+ blobAppendOffset: {
+ serializedName: "x-ms-blob-append-offset",
+ xmlName: "x-ms-blob-append-offset",
+ type: {
+ name: "String"
+ }
+ },
blobCommittedBlockCount: {
serializedName: "x-ms-blob-committed-block-count",
xmlName: "x-ms-blob-committed-block-count",
@@ -21864,8 +20964,8 @@ const BlobQueryHeaders = {
}
},
isServerEncrypted: {
- serializedName: "x-ms-server-encrypted",
- xmlName: "x-ms-server-encrypted",
+ serializedName: "x-ms-request-server-encrypted",
+ xmlName: "x-ms-request-server-encrypted",
type: {
name: "Boolean"
}
@@ -21884,35 +20984,21 @@ const BlobQueryHeaders = {
name: "String"
}
},
- blobContentMD5: {
- serializedName: "x-ms-blob-content-md5",
- xmlName: "x-ms-blob-content-md5",
- type: {
- name: "ByteArray"
- }
- },
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
+ errorCode: {
+ serializedName: "x-ms-error-code",
+ xmlName: "x-ms-error-code",
type: {
name: "String"
}
- },
- contentCrc64: {
- serializedName: "x-ms-content-crc64",
- xmlName: "x-ms-content-crc64",
- type: {
- name: "ByteArray"
- }
}
}
}
};
-const BlobQueryExceptionHeaders = {
- serializedName: "Blob_queryExceptionHeaders",
+const AppendBlobAppendBlockExceptionHeaders = {
+ serializedName: "AppendBlob_appendBlockExceptionHeaders",
type: {
name: "Composite",
- className: "BlobQueryExceptionHeaders",
+ className: "AppendBlobAppendBlockExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
@@ -21924,19 +21010,40 @@ const BlobQueryExceptionHeaders = {
}
}
};
-const BlobGetTagsHeaders = {
- serializedName: "Blob_getTagsHeaders",
+const AppendBlobAppendBlockFromUrlHeaders = {
+ serializedName: "AppendBlob_appendBlockFromUrlHeaders",
type: {
name: "Composite",
- className: "BlobGetTagsHeaders",
+ className: "AppendBlobAppendBlockFromUrlHeaders",
modelProperties: {
- clientRequestId: {
- serializedName: "x-ms-client-request-id",
- xmlName: "x-ms-client-request-id",
+ etag: {
+ serializedName: "etag",
+ xmlName: "etag",
type: {
name: "String"
}
},
+ lastModified: {
+ serializedName: "last-modified",
+ xmlName: "last-modified",
+ type: {
+ name: "DateTimeRfc1123"
+ }
+ },
+ contentMD5: {
+ serializedName: "content-md5",
+ xmlName: "content-md5",
+ type: {
+ name: "ByteArray"
+ }
+ },
+ xMsContentCrc64: {
+ serializedName: "x-ms-content-crc64",
+ xmlName: "x-ms-content-crc64",
+ type: {
+ name: "ByteArray"
+ }
+ },
requestId: {
serializedName: "x-ms-request-id",
xmlName: "x-ms-request-id",
@@ -21958,6 +21065,41 @@ const BlobGetTagsHeaders = {
name: "DateTimeRfc1123"
}
},
+ blobAppendOffset: {
+ serializedName: "x-ms-blob-append-offset",
+ xmlName: "x-ms-blob-append-offset",
+ type: {
+ name: "String"
+ }
+ },
+ blobCommittedBlockCount: {
+ serializedName: "x-ms-blob-committed-block-count",
+ xmlName: "x-ms-blob-committed-block-count",
+ type: {
+ name: "Number"
+ }
+ },
+ encryptionKeySha256: {
+ serializedName: "x-ms-encryption-key-sha256",
+ xmlName: "x-ms-encryption-key-sha256",
+ type: {
+ name: "String"
+ }
+ },
+ encryptionScope: {
+ serializedName: "x-ms-encryption-scope",
+ xmlName: "x-ms-encryption-scope",
+ type: {
+ name: "String"
+ }
+ },
+ isServerEncrypted: {
+ serializedName: "x-ms-request-server-encrypted",
+ xmlName: "x-ms-request-server-encrypted",
+ type: {
+ name: "Boolean"
+ }
+ },
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
@@ -21968,11 +21110,11 @@ const BlobGetTagsHeaders = {
}
}
};
-const BlobGetTagsExceptionHeaders = {
- serializedName: "Blob_getTagsExceptionHeaders",
+const AppendBlobAppendBlockFromUrlExceptionHeaders = {
+ serializedName: "AppendBlob_appendBlockFromUrlExceptionHeaders",
type: {
name: "Composite",
- className: "BlobGetTagsExceptionHeaders",
+ className: "AppendBlobAppendBlockFromUrlExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
@@ -21984,12 +21126,26 @@ const BlobGetTagsExceptionHeaders = {
}
}
};
-const BlobSetTagsHeaders = {
- serializedName: "Blob_setTagsHeaders",
+const AppendBlobSealHeaders = {
+ serializedName: "AppendBlob_sealHeaders",
type: {
name: "Composite",
- className: "BlobSetTagsHeaders",
+ className: "AppendBlobSealHeaders",
modelProperties: {
+ etag: {
+ serializedName: "etag",
+ xmlName: "etag",
+ type: {
+ name: "String"
+ }
+ },
+ lastModified: {
+ serializedName: "last-modified",
+ xmlName: "last-modified",
+ type: {
+ name: "DateTimeRfc1123"
+ }
+ },
clientRequestId: {
serializedName: "x-ms-client-request-id",
xmlName: "x-ms-client-request-id",
@@ -22018,21 +21174,21 @@ const BlobSetTagsHeaders = {
name: "DateTimeRfc1123"
}
},
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
+ isSealed: {
+ serializedName: "x-ms-blob-sealed",
+ xmlName: "x-ms-blob-sealed",
type: {
- name: "String"
+ name: "Boolean"
}
}
}
}
};
-const BlobSetTagsExceptionHeaders = {
- serializedName: "Blob_setTagsExceptionHeaders",
+const AppendBlobSealExceptionHeaders = {
+ serializedName: "AppendBlob_sealExceptionHeaders",
type: {
name: "Composite",
- className: "BlobSetTagsExceptionHeaders",
+ className: "AppendBlobSealExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
@@ -22044,11 +21200,11 @@ const BlobSetTagsExceptionHeaders = {
}
}
};
-const PageBlobCreateHeaders = {
- serializedName: "PageBlob_createHeaders",
+const BlockBlobUploadHeaders = {
+ serializedName: "BlockBlob_uploadHeaders",
type: {
name: "Composite",
- className: "PageBlobCreateHeaders",
+ className: "BlockBlobUploadHeaders",
modelProperties: {
etag: {
serializedName: "etag",
@@ -22137,11 +21293,11 @@ const PageBlobCreateHeaders = {
}
}
};
-const PageBlobCreateExceptionHeaders = {
- serializedName: "PageBlob_createExceptionHeaders",
+const BlockBlobUploadExceptionHeaders = {
+ serializedName: "BlockBlob_uploadExceptionHeaders",
type: {
name: "Composite",
- className: "PageBlobCreateExceptionHeaders",
+ className: "BlockBlobUploadExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
@@ -22153,11 +21309,11 @@ const PageBlobCreateExceptionHeaders = {
}
}
};
-const PageBlobUploadPagesHeaders = {
- serializedName: "PageBlob_uploadPagesHeaders",
+const BlockBlobPutBlobFromUrlHeaders = {
+ serializedName: "BlockBlob_putBlobFromUrlHeaders",
type: {
name: "Composite",
- className: "PageBlobUploadPagesHeaders",
+ className: "BlockBlobPutBlobFromUrlHeaders",
modelProperties: {
etag: {
serializedName: "etag",
@@ -22180,20 +21336,6 @@ const PageBlobUploadPagesHeaders = {
name: "ByteArray"
}
},
- xMsContentCrc64: {
- serializedName: "x-ms-content-crc64",
- xmlName: "x-ms-content-crc64",
- type: {
- name: "ByteArray"
- }
- },
- blobSequenceNumber: {
- serializedName: "x-ms-blob-sequence-number",
- xmlName: "x-ms-blob-sequence-number",
- type: {
- name: "Number"
- }
- },
clientRequestId: {
serializedName: "x-ms-client-request-id",
xmlName: "x-ms-client-request-id",
@@ -22215,6 +21357,13 @@ const PageBlobUploadPagesHeaders = {
name: "String"
}
},
+ versionId: {
+ serializedName: "x-ms-version-id",
+ xmlName: "x-ms-version-id",
+ type: {
+ name: "String"
+ }
+ },
date: {
serializedName: "date",
xmlName: "date",
@@ -22253,11 +21402,11 @@ const PageBlobUploadPagesHeaders = {
}
}
};
-const PageBlobUploadPagesExceptionHeaders = {
- serializedName: "PageBlob_uploadPagesExceptionHeaders",
+const BlockBlobPutBlobFromUrlExceptionHeaders = {
+ serializedName: "BlockBlob_putBlobFromUrlExceptionHeaders",
type: {
name: "Composite",
- className: "PageBlobUploadPagesExceptionHeaders",
+ className: "BlockBlobPutBlobFromUrlExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
@@ -22269,26 +21418,12 @@ const PageBlobUploadPagesExceptionHeaders = {
}
}
};
-const PageBlobClearPagesHeaders = {
- serializedName: "PageBlob_clearPagesHeaders",
+const BlockBlobStageBlockHeaders = {
+ serializedName: "BlockBlob_stageBlockHeaders",
type: {
name: "Composite",
- className: "PageBlobClearPagesHeaders",
+ className: "BlockBlobStageBlockHeaders",
modelProperties: {
- etag: {
- serializedName: "etag",
- xmlName: "etag",
- type: {
- name: "String"
- }
- },
- lastModified: {
- serializedName: "last-modified",
- xmlName: "last-modified",
- type: {
- name: "DateTimeRfc1123"
- }
- },
contentMD5: {
serializedName: "content-md5",
xmlName: "content-md5",
@@ -22296,20 +21431,6 @@ const PageBlobClearPagesHeaders = {
name: "ByteArray"
}
},
- xMsContentCrc64: {
- serializedName: "x-ms-content-crc64",
- xmlName: "x-ms-content-crc64",
- type: {
- name: "ByteArray"
- }
- },
- blobSequenceNumber: {
- serializedName: "x-ms-blob-sequence-number",
- xmlName: "x-ms-blob-sequence-number",
- type: {
- name: "Number"
- }
- },
clientRequestId: {
serializedName: "x-ms-client-request-id",
xmlName: "x-ms-client-request-id",
@@ -22338,6 +21459,34 @@ const PageBlobClearPagesHeaders = {
name: "DateTimeRfc1123"
}
},
+ xMsContentCrc64: {
+ serializedName: "x-ms-content-crc64",
+ xmlName: "x-ms-content-crc64",
+ type: {
+ name: "ByteArray"
+ }
+ },
+ isServerEncrypted: {
+ serializedName: "x-ms-request-server-encrypted",
+ xmlName: "x-ms-request-server-encrypted",
+ type: {
+ name: "Boolean"
+ }
+ },
+ encryptionKeySha256: {
+ serializedName: "x-ms-encryption-key-sha256",
+ xmlName: "x-ms-encryption-key-sha256",
+ type: {
+ name: "String"
+ }
+ },
+ encryptionScope: {
+ serializedName: "x-ms-encryption-scope",
+ xmlName: "x-ms-encryption-scope",
+ type: {
+ name: "String"
+ }
+ },
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
@@ -22348,11 +21497,11 @@ const PageBlobClearPagesHeaders = {
}
}
};
-const PageBlobClearPagesExceptionHeaders = {
- serializedName: "PageBlob_clearPagesExceptionHeaders",
+const BlockBlobStageBlockExceptionHeaders = {
+ serializedName: "BlockBlob_stageBlockExceptionHeaders",
type: {
name: "Composite",
- className: "PageBlobClearPagesExceptionHeaders",
+ className: "BlockBlobStageBlockExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
@@ -22364,26 +21513,12 @@ const PageBlobClearPagesExceptionHeaders = {
}
}
};
-const PageBlobUploadPagesFromURLHeaders = {
- serializedName: "PageBlob_uploadPagesFromURLHeaders",
+const BlockBlobStageBlockFromURLHeaders = {
+ serializedName: "BlockBlob_stageBlockFromURLHeaders",
type: {
name: "Composite",
- className: "PageBlobUploadPagesFromURLHeaders",
+ className: "BlockBlobStageBlockFromURLHeaders",
modelProperties: {
- etag: {
- serializedName: "etag",
- xmlName: "etag",
- type: {
- name: "String"
- }
- },
- lastModified: {
- serializedName: "last-modified",
- xmlName: "last-modified",
- type: {
- name: "DateTimeRfc1123"
- }
- },
contentMD5: {
serializedName: "content-md5",
xmlName: "content-md5",
@@ -22398,11 +21533,11 @@ const PageBlobUploadPagesFromURLHeaders = {
name: "ByteArray"
}
},
- blobSequenceNumber: {
- serializedName: "x-ms-blob-sequence-number",
- xmlName: "x-ms-blob-sequence-number",
+ clientRequestId: {
+ serializedName: "x-ms-client-request-id",
+ xmlName: "x-ms-client-request-id",
type: {
- name: "Number"
+ name: "String"
}
},
requestId: {
@@ -22457,11 +21592,11 @@ const PageBlobUploadPagesFromURLHeaders = {
}
}
};
-const PageBlobUploadPagesFromURLExceptionHeaders = {
- serializedName: "PageBlob_uploadPagesFromURLExceptionHeaders",
+const BlockBlobStageBlockFromURLExceptionHeaders = {
+ serializedName: "BlockBlob_stageBlockFromURLExceptionHeaders",
type: {
name: "Composite",
- className: "PageBlobUploadPagesFromURLExceptionHeaders",
+ className: "BlockBlobStageBlockFromURLExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
@@ -22473,19 +21608,12 @@ const PageBlobUploadPagesFromURLExceptionHeaders = {
}
}
};
-const PageBlobGetPageRangesHeaders = {
- serializedName: "PageBlob_getPageRangesHeaders",
+const BlockBlobCommitBlockListHeaders = {
+ serializedName: "BlockBlob_commitBlockListHeaders",
type: {
name: "Composite",
- className: "PageBlobGetPageRangesHeaders",
+ className: "BlockBlobCommitBlockListHeaders",
modelProperties: {
- lastModified: {
- serializedName: "last-modified",
- xmlName: "last-modified",
- type: {
- name: "DateTimeRfc1123"
- }
- },
etag: {
serializedName: "etag",
xmlName: "etag",
@@ -22493,73 +21621,6 @@ const PageBlobGetPageRangesHeaders = {
name: "String"
}
},
- blobContentLength: {
- serializedName: "x-ms-blob-content-length",
- xmlName: "x-ms-blob-content-length",
- type: {
- name: "Number"
- }
- },
- 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"
- }
- },
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
- type: {
- name: "String"
- }
- }
- }
- }
-};
-const PageBlobGetPageRangesExceptionHeaders = {
- serializedName: "PageBlob_getPageRangesExceptionHeaders",
- type: {
- name: "Composite",
- className: "PageBlobGetPageRangesExceptionHeaders",
- modelProperties: {
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
- type: {
- name: "String"
- }
- }
- }
- }
-};
-const PageBlobGetPageRangesDiffHeaders = {
- serializedName: "PageBlob_getPageRangesDiffHeaders",
- type: {
- name: "Composite",
- className: "PageBlobGetPageRangesDiffHeaders",
- modelProperties: {
lastModified: {
serializedName: "last-modified",
xmlName: "last-modified",
@@ -22567,18 +21628,18 @@ const PageBlobGetPageRangesDiffHeaders = {
name: "DateTimeRfc1123"
}
},
- etag: {
- serializedName: "etag",
- xmlName: "etag",
+ contentMD5: {
+ serializedName: "content-md5",
+ xmlName: "content-md5",
type: {
- name: "String"
+ name: "ByteArray"
}
},
- blobContentLength: {
- serializedName: "x-ms-blob-content-length",
- xmlName: "x-ms-blob-content-length",
+ xMsContentCrc64: {
+ serializedName: "x-ms-content-crc64",
+ xmlName: "x-ms-content-crc64",
type: {
- name: "Number"
+ name: "ByteArray"
}
},
clientRequestId: {
@@ -22602,83 +21663,9 @@ const PageBlobGetPageRangesDiffHeaders = {
name: "String"
}
},
- date: {
- serializedName: "date",
- xmlName: "date",
- type: {
- name: "DateTimeRfc1123"
- }
- },
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
- type: {
- name: "String"
- }
- }
- }
- }
-};
-const PageBlobGetPageRangesDiffExceptionHeaders = {
- serializedName: "PageBlob_getPageRangesDiffExceptionHeaders",
- type: {
- name: "Composite",
- className: "PageBlobGetPageRangesDiffExceptionHeaders",
- modelProperties: {
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
- type: {
- name: "String"
- }
- }
- }
- }
-};
-const PageBlobResizeHeaders = {
- serializedName: "PageBlob_resizeHeaders",
- type: {
- name: "Composite",
- className: "PageBlobResizeHeaders",
- modelProperties: {
- etag: {
- serializedName: "etag",
- xmlName: "etag",
- type: {
- name: "String"
- }
- },
- lastModified: {
- serializedName: "last-modified",
- xmlName: "last-modified",
- type: {
- name: "DateTimeRfc1123"
- }
- },
- blobSequenceNumber: {
- serializedName: "x-ms-blob-sequence-number",
- xmlName: "x-ms-blob-sequence-number",
- type: {
- name: "Number"
- }
- },
- 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",
+ versionId: {
+ serializedName: "x-ms-version-id",
+ xmlName: "x-ms-version-id",
type: {
name: "String"
}
@@ -22690,87 +21677,27 @@ const PageBlobResizeHeaders = {
name: "DateTimeRfc1123"
}
},
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
- type: {
- name: "String"
- }
- }
- }
- }
-};
-const PageBlobResizeExceptionHeaders = {
- serializedName: "PageBlob_resizeExceptionHeaders",
- type: {
- name: "Composite",
- className: "PageBlobResizeExceptionHeaders",
- modelProperties: {
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
- type: {
- name: "String"
- }
- }
- }
- }
-};
-const PageBlobUpdateSequenceNumberHeaders = {
- serializedName: "PageBlob_updateSequenceNumberHeaders",
- type: {
- name: "Composite",
- className: "PageBlobUpdateSequenceNumberHeaders",
- modelProperties: {
- etag: {
- serializedName: "etag",
- xmlName: "etag",
- type: {
- name: "String"
- }
- },
- lastModified: {
- serializedName: "last-modified",
- xmlName: "last-modified",
- type: {
- name: "DateTimeRfc1123"
- }
- },
- blobSequenceNumber: {
- serializedName: "x-ms-blob-sequence-number",
- xmlName: "x-ms-blob-sequence-number",
- type: {
- name: "Number"
- }
- },
- clientRequestId: {
- serializedName: "x-ms-client-request-id",
- xmlName: "x-ms-client-request-id",
+ isServerEncrypted: {
+ serializedName: "x-ms-request-server-encrypted",
+ xmlName: "x-ms-request-server-encrypted",
type: {
- name: "String"
+ name: "Boolean"
}
},
- requestId: {
- serializedName: "x-ms-request-id",
- xmlName: "x-ms-request-id",
+ encryptionKeySha256: {
+ serializedName: "x-ms-encryption-key-sha256",
+ xmlName: "x-ms-encryption-key-sha256",
type: {
name: "String"
}
},
- version: {
- serializedName: "x-ms-version",
- xmlName: "x-ms-version",
+ encryptionScope: {
+ serializedName: "x-ms-encryption-scope",
+ xmlName: "x-ms-encryption-scope",
type: {
name: "String"
}
},
- date: {
- serializedName: "date",
- xmlName: "date",
- type: {
- name: "DateTimeRfc1123"
- }
- },
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
@@ -22781,11 +21708,11 @@ const PageBlobUpdateSequenceNumberHeaders = {
}
}
};
-const PageBlobUpdateSequenceNumberExceptionHeaders = {
- serializedName: "PageBlob_updateSequenceNumberExceptionHeaders",
+const BlockBlobCommitBlockListExceptionHeaders = {
+ serializedName: "BlockBlob_commitBlockListExceptionHeaders",
type: {
name: "Composite",
- className: "PageBlobUpdateSequenceNumberExceptionHeaders",
+ className: "BlockBlobCommitBlockListExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
@@ -22797,19 +21724,12 @@ const PageBlobUpdateSequenceNumberExceptionHeaders = {
}
}
};
-const PageBlobCopyIncrementalHeaders = {
- serializedName: "PageBlob_copyIncrementalHeaders",
+const BlockBlobGetBlockListHeaders = {
+ serializedName: "BlockBlob_getBlockListHeaders",
type: {
name: "Composite",
- className: "PageBlobCopyIncrementalHeaders",
+ className: "BlockBlobGetBlockListHeaders",
modelProperties: {
- etag: {
- serializedName: "etag",
- xmlName: "etag",
- type: {
- name: "String"
- }
- },
lastModified: {
serializedName: "last-modified",
xmlName: "last-modified",
@@ -22817,81 +21737,6 @@ const PageBlobCopyIncrementalHeaders = {
name: "DateTimeRfc1123"
}
},
- 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"
- }
- },
- copyId: {
- serializedName: "x-ms-copy-id",
- xmlName: "x-ms-copy-id",
- type: {
- name: "String"
- }
- },
- copyStatus: {
- serializedName: "x-ms-copy-status",
- xmlName: "x-ms-copy-status",
- type: {
- name: "Enum",
- allowedValues: ["pending", "success", "aborted", "failed"]
- }
- },
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
- type: {
- name: "String"
- }
- }
- }
- }
-};
-const PageBlobCopyIncrementalExceptionHeaders = {
- serializedName: "PageBlob_copyIncrementalExceptionHeaders",
- type: {
- name: "Composite",
- className: "PageBlobCopyIncrementalExceptionHeaders",
- modelProperties: {
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
- type: {
- name: "String"
- }
- }
- }
- }
-};
-const AppendBlobCreateHeaders = {
- serializedName: "AppendBlob_createHeaders",
- type: {
- name: "Composite",
- className: "AppendBlobCreateHeaders",
- modelProperties: {
etag: {
serializedName: "etag",
xmlName: "etag",
@@ -22899,18 +21744,18 @@ const AppendBlobCreateHeaders = {
name: "String"
}
},
- lastModified: {
- serializedName: "last-modified",
- xmlName: "last-modified",
+ contentType: {
+ serializedName: "content-type",
+ xmlName: "content-type",
type: {
- name: "DateTimeRfc1123"
+ name: "String"
}
},
- contentMD5: {
- serializedName: "content-md5",
- xmlName: "content-md5",
+ blobContentLength: {
+ serializedName: "x-ms-blob-content-length",
+ xmlName: "x-ms-blob-content-length",
type: {
- name: "ByteArray"
+ name: "Number"
}
},
clientRequestId: {
@@ -22934,13 +21779,6 @@ const AppendBlobCreateHeaders = {
name: "String"
}
},
- versionId: {
- serializedName: "x-ms-version-id",
- xmlName: "x-ms-version-id",
- type: {
- name: "String"
- }
- },
date: {
serializedName: "date",
xmlName: "date",
@@ -22948,27 +21786,6 @@ const AppendBlobCreateHeaders = {
name: "DateTimeRfc1123"
}
},
- isServerEncrypted: {
- serializedName: "x-ms-request-server-encrypted",
- xmlName: "x-ms-request-server-encrypted",
- type: {
- name: "Boolean"
- }
- },
- encryptionKeySha256: {
- serializedName: "x-ms-encryption-key-sha256",
- xmlName: "x-ms-encryption-key-sha256",
- type: {
- name: "String"
- }
- },
- encryptionScope: {
- serializedName: "x-ms-encryption-scope",
- xmlName: "x-ms-encryption-scope",
- type: {
- name: "String"
- }
- },
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
@@ -22979,11 +21796,11 @@ const AppendBlobCreateHeaders = {
}
}
};
-const AppendBlobCreateExceptionHeaders = {
- serializedName: "AppendBlob_createExceptionHeaders",
+const BlockBlobGetBlockListExceptionHeaders = {
+ serializedName: "BlockBlob_getBlockListExceptionHeaders",
type: {
name: "Composite",
- className: "AppendBlobCreateExceptionHeaders",
+ className: "BlockBlobGetBlockListExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
@@ -22995,1312 +21812,387 @@ const AppendBlobCreateExceptionHeaders = {
}
}
};
-const AppendBlobAppendBlockHeaders = {
- serializedName: "AppendBlob_appendBlockHeaders",
- type: {
- name: "Composite",
- className: "AppendBlobAppendBlockHeaders",
- modelProperties: {
- etag: {
- serializedName: "etag",
- xmlName: "etag",
- type: {
- name: "String"
- }
- },
- lastModified: {
- serializedName: "last-modified",
- xmlName: "last-modified",
- type: {
- name: "DateTimeRfc1123"
- }
- },
- contentMD5: {
- serializedName: "content-md5",
- xmlName: "content-md5",
- type: {
- name: "ByteArray"
- }
- },
- xMsContentCrc64: {
- serializedName: "x-ms-content-crc64",
- xmlName: "x-ms-content-crc64",
- type: {
- name: "ByteArray"
- }
- },
- 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"
- }
- },
- blobAppendOffset: {
- serializedName: "x-ms-blob-append-offset",
- xmlName: "x-ms-blob-append-offset",
- type: {
- name: "String"
- }
- },
- blobCommittedBlockCount: {
- serializedName: "x-ms-blob-committed-block-count",
- xmlName: "x-ms-blob-committed-block-count",
- type: {
- name: "Number"
- }
- },
- isServerEncrypted: {
- serializedName: "x-ms-request-server-encrypted",
- xmlName: "x-ms-request-server-encrypted",
- type: {
- name: "Boolean"
- }
- },
- encryptionKeySha256: {
- serializedName: "x-ms-encryption-key-sha256",
- xmlName: "x-ms-encryption-key-sha256",
- type: {
- name: "String"
- }
- },
- encryptionScope: {
- serializedName: "x-ms-encryption-scope",
- xmlName: "x-ms-encryption-scope",
- type: {
- name: "String"
- }
- },
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
- type: {
- name: "String"
- }
- }
- }
- }
+
+var Mappers = /*#__PURE__*/Object.freeze({
+ __proto__: null,
+ BlobServiceProperties: BlobServiceProperties,
+ Logging: Logging,
+ RetentionPolicy: RetentionPolicy,
+ Metrics: Metrics,
+ CorsRule: CorsRule,
+ StaticWebsite: StaticWebsite,
+ StorageError: StorageError,
+ BlobServiceStatistics: BlobServiceStatistics,
+ GeoReplication: GeoReplication,
+ ListContainersSegmentResponse: ListContainersSegmentResponse,
+ ContainerItem: ContainerItem,
+ ContainerProperties: ContainerProperties,
+ KeyInfo: KeyInfo,
+ UserDelegationKey: UserDelegationKey,
+ FilterBlobSegment: FilterBlobSegment,
+ FilterBlobItem: FilterBlobItem,
+ BlobTags: BlobTags,
+ BlobTag: BlobTag,
+ SignedIdentifier: SignedIdentifier,
+ AccessPolicy: AccessPolicy,
+ ListBlobsFlatSegmentResponse: ListBlobsFlatSegmentResponse,
+ BlobFlatListSegment: BlobFlatListSegment,
+ BlobItemInternal: BlobItemInternal,
+ BlobName: BlobName,
+ BlobPropertiesInternal: BlobPropertiesInternal,
+ ListBlobsHierarchySegmentResponse: ListBlobsHierarchySegmentResponse,
+ BlobHierarchyListSegment: BlobHierarchyListSegment,
+ BlobPrefix: BlobPrefix,
+ BlockLookupList: BlockLookupList,
+ BlockList: BlockList,
+ Block: Block,
+ PageList: PageList,
+ PageRange: PageRange,
+ ClearRange: ClearRange,
+ QueryRequest: QueryRequest,
+ QuerySerialization: QuerySerialization,
+ QueryFormat: QueryFormat,
+ DelimitedTextConfiguration: DelimitedTextConfiguration,
+ JsonTextConfiguration: JsonTextConfiguration,
+ ArrowConfiguration: ArrowConfiguration,
+ ArrowField: ArrowField,
+ ServiceSetPropertiesHeaders: ServiceSetPropertiesHeaders,
+ ServiceSetPropertiesExceptionHeaders: ServiceSetPropertiesExceptionHeaders,
+ ServiceGetPropertiesHeaders: ServiceGetPropertiesHeaders,
+ ServiceGetPropertiesExceptionHeaders: ServiceGetPropertiesExceptionHeaders,
+ ServiceGetStatisticsHeaders: ServiceGetStatisticsHeaders,
+ ServiceGetStatisticsExceptionHeaders: ServiceGetStatisticsExceptionHeaders,
+ ServiceListContainersSegmentHeaders: ServiceListContainersSegmentHeaders,
+ ServiceListContainersSegmentExceptionHeaders: ServiceListContainersSegmentExceptionHeaders,
+ ServiceGetUserDelegationKeyHeaders: ServiceGetUserDelegationKeyHeaders,
+ ServiceGetUserDelegationKeyExceptionHeaders: ServiceGetUserDelegationKeyExceptionHeaders,
+ ServiceGetAccountInfoHeaders: ServiceGetAccountInfoHeaders,
+ ServiceGetAccountInfoExceptionHeaders: ServiceGetAccountInfoExceptionHeaders,
+ ServiceSubmitBatchHeaders: ServiceSubmitBatchHeaders,
+ ServiceSubmitBatchExceptionHeaders: ServiceSubmitBatchExceptionHeaders,
+ ServiceFilterBlobsHeaders: ServiceFilterBlobsHeaders,
+ ServiceFilterBlobsExceptionHeaders: ServiceFilterBlobsExceptionHeaders,
+ ContainerCreateHeaders: ContainerCreateHeaders,
+ ContainerCreateExceptionHeaders: ContainerCreateExceptionHeaders,
+ ContainerGetPropertiesHeaders: ContainerGetPropertiesHeaders,
+ ContainerGetPropertiesExceptionHeaders: ContainerGetPropertiesExceptionHeaders,
+ ContainerDeleteHeaders: ContainerDeleteHeaders,
+ ContainerDeleteExceptionHeaders: ContainerDeleteExceptionHeaders,
+ ContainerSetMetadataHeaders: ContainerSetMetadataHeaders,
+ ContainerSetMetadataExceptionHeaders: ContainerSetMetadataExceptionHeaders,
+ ContainerGetAccessPolicyHeaders: ContainerGetAccessPolicyHeaders,
+ ContainerGetAccessPolicyExceptionHeaders: ContainerGetAccessPolicyExceptionHeaders,
+ ContainerSetAccessPolicyHeaders: ContainerSetAccessPolicyHeaders,
+ ContainerSetAccessPolicyExceptionHeaders: ContainerSetAccessPolicyExceptionHeaders,
+ ContainerRestoreHeaders: ContainerRestoreHeaders,
+ ContainerRestoreExceptionHeaders: ContainerRestoreExceptionHeaders,
+ ContainerRenameHeaders: ContainerRenameHeaders,
+ ContainerRenameExceptionHeaders: ContainerRenameExceptionHeaders,
+ ContainerSubmitBatchHeaders: ContainerSubmitBatchHeaders,
+ ContainerSubmitBatchExceptionHeaders: ContainerSubmitBatchExceptionHeaders,
+ ContainerFilterBlobsHeaders: ContainerFilterBlobsHeaders,
+ ContainerFilterBlobsExceptionHeaders: ContainerFilterBlobsExceptionHeaders,
+ ContainerAcquireLeaseHeaders: ContainerAcquireLeaseHeaders,
+ ContainerAcquireLeaseExceptionHeaders: ContainerAcquireLeaseExceptionHeaders,
+ ContainerReleaseLeaseHeaders: ContainerReleaseLeaseHeaders,
+ ContainerReleaseLeaseExceptionHeaders: ContainerReleaseLeaseExceptionHeaders,
+ ContainerRenewLeaseHeaders: ContainerRenewLeaseHeaders,
+ ContainerRenewLeaseExceptionHeaders: ContainerRenewLeaseExceptionHeaders,
+ ContainerBreakLeaseHeaders: ContainerBreakLeaseHeaders,
+ ContainerBreakLeaseExceptionHeaders: ContainerBreakLeaseExceptionHeaders,
+ ContainerChangeLeaseHeaders: ContainerChangeLeaseHeaders,
+ ContainerChangeLeaseExceptionHeaders: ContainerChangeLeaseExceptionHeaders,
+ ContainerListBlobFlatSegmentHeaders: ContainerListBlobFlatSegmentHeaders,
+ ContainerListBlobFlatSegmentExceptionHeaders: ContainerListBlobFlatSegmentExceptionHeaders,
+ ContainerListBlobHierarchySegmentHeaders: ContainerListBlobHierarchySegmentHeaders,
+ ContainerListBlobHierarchySegmentExceptionHeaders: ContainerListBlobHierarchySegmentExceptionHeaders,
+ ContainerGetAccountInfoHeaders: ContainerGetAccountInfoHeaders,
+ ContainerGetAccountInfoExceptionHeaders: ContainerGetAccountInfoExceptionHeaders,
+ BlobDownloadHeaders: BlobDownloadHeaders,
+ BlobDownloadExceptionHeaders: BlobDownloadExceptionHeaders,
+ BlobGetPropertiesHeaders: BlobGetPropertiesHeaders,
+ BlobGetPropertiesExceptionHeaders: BlobGetPropertiesExceptionHeaders,
+ BlobDeleteHeaders: BlobDeleteHeaders,
+ BlobDeleteExceptionHeaders: BlobDeleteExceptionHeaders,
+ BlobUndeleteHeaders: BlobUndeleteHeaders,
+ BlobUndeleteExceptionHeaders: BlobUndeleteExceptionHeaders,
+ BlobSetExpiryHeaders: BlobSetExpiryHeaders,
+ BlobSetExpiryExceptionHeaders: BlobSetExpiryExceptionHeaders,
+ BlobSetHttpHeadersHeaders: BlobSetHttpHeadersHeaders,
+ BlobSetHttpHeadersExceptionHeaders: BlobSetHttpHeadersExceptionHeaders,
+ BlobSetImmutabilityPolicyHeaders: BlobSetImmutabilityPolicyHeaders,
+ BlobSetImmutabilityPolicyExceptionHeaders: BlobSetImmutabilityPolicyExceptionHeaders,
+ BlobDeleteImmutabilityPolicyHeaders: BlobDeleteImmutabilityPolicyHeaders,
+ BlobDeleteImmutabilityPolicyExceptionHeaders: BlobDeleteImmutabilityPolicyExceptionHeaders,
+ BlobSetLegalHoldHeaders: BlobSetLegalHoldHeaders,
+ BlobSetLegalHoldExceptionHeaders: BlobSetLegalHoldExceptionHeaders,
+ BlobSetMetadataHeaders: BlobSetMetadataHeaders,
+ BlobSetMetadataExceptionHeaders: BlobSetMetadataExceptionHeaders,
+ BlobAcquireLeaseHeaders: BlobAcquireLeaseHeaders,
+ BlobAcquireLeaseExceptionHeaders: BlobAcquireLeaseExceptionHeaders,
+ BlobReleaseLeaseHeaders: BlobReleaseLeaseHeaders,
+ BlobReleaseLeaseExceptionHeaders: BlobReleaseLeaseExceptionHeaders,
+ BlobRenewLeaseHeaders: BlobRenewLeaseHeaders,
+ BlobRenewLeaseExceptionHeaders: BlobRenewLeaseExceptionHeaders,
+ BlobChangeLeaseHeaders: BlobChangeLeaseHeaders,
+ BlobChangeLeaseExceptionHeaders: BlobChangeLeaseExceptionHeaders,
+ BlobBreakLeaseHeaders: BlobBreakLeaseHeaders,
+ BlobBreakLeaseExceptionHeaders: BlobBreakLeaseExceptionHeaders,
+ BlobCreateSnapshotHeaders: BlobCreateSnapshotHeaders,
+ BlobCreateSnapshotExceptionHeaders: BlobCreateSnapshotExceptionHeaders,
+ BlobStartCopyFromURLHeaders: BlobStartCopyFromURLHeaders,
+ BlobStartCopyFromURLExceptionHeaders: BlobStartCopyFromURLExceptionHeaders,
+ BlobCopyFromURLHeaders: BlobCopyFromURLHeaders,
+ BlobCopyFromURLExceptionHeaders: BlobCopyFromURLExceptionHeaders,
+ BlobAbortCopyFromURLHeaders: BlobAbortCopyFromURLHeaders,
+ BlobAbortCopyFromURLExceptionHeaders: BlobAbortCopyFromURLExceptionHeaders,
+ BlobSetTierHeaders: BlobSetTierHeaders,
+ BlobSetTierExceptionHeaders: BlobSetTierExceptionHeaders,
+ BlobGetAccountInfoHeaders: BlobGetAccountInfoHeaders,
+ BlobGetAccountInfoExceptionHeaders: BlobGetAccountInfoExceptionHeaders,
+ BlobQueryHeaders: BlobQueryHeaders,
+ BlobQueryExceptionHeaders: BlobQueryExceptionHeaders,
+ BlobGetTagsHeaders: BlobGetTagsHeaders,
+ BlobGetTagsExceptionHeaders: BlobGetTagsExceptionHeaders,
+ BlobSetTagsHeaders: BlobSetTagsHeaders,
+ BlobSetTagsExceptionHeaders: BlobSetTagsExceptionHeaders,
+ PageBlobCreateHeaders: PageBlobCreateHeaders,
+ PageBlobCreateExceptionHeaders: PageBlobCreateExceptionHeaders,
+ PageBlobUploadPagesHeaders: PageBlobUploadPagesHeaders,
+ PageBlobUploadPagesExceptionHeaders: PageBlobUploadPagesExceptionHeaders,
+ PageBlobClearPagesHeaders: PageBlobClearPagesHeaders,
+ PageBlobClearPagesExceptionHeaders: PageBlobClearPagesExceptionHeaders,
+ PageBlobUploadPagesFromURLHeaders: PageBlobUploadPagesFromURLHeaders,
+ PageBlobUploadPagesFromURLExceptionHeaders: PageBlobUploadPagesFromURLExceptionHeaders,
+ PageBlobGetPageRangesHeaders: PageBlobGetPageRangesHeaders,
+ PageBlobGetPageRangesExceptionHeaders: PageBlobGetPageRangesExceptionHeaders,
+ PageBlobGetPageRangesDiffHeaders: PageBlobGetPageRangesDiffHeaders,
+ PageBlobGetPageRangesDiffExceptionHeaders: PageBlobGetPageRangesDiffExceptionHeaders,
+ PageBlobResizeHeaders: PageBlobResizeHeaders,
+ PageBlobResizeExceptionHeaders: PageBlobResizeExceptionHeaders,
+ PageBlobUpdateSequenceNumberHeaders: PageBlobUpdateSequenceNumberHeaders,
+ PageBlobUpdateSequenceNumberExceptionHeaders: PageBlobUpdateSequenceNumberExceptionHeaders,
+ PageBlobCopyIncrementalHeaders: PageBlobCopyIncrementalHeaders,
+ PageBlobCopyIncrementalExceptionHeaders: PageBlobCopyIncrementalExceptionHeaders,
+ AppendBlobCreateHeaders: AppendBlobCreateHeaders,
+ AppendBlobCreateExceptionHeaders: AppendBlobCreateExceptionHeaders,
+ AppendBlobAppendBlockHeaders: AppendBlobAppendBlockHeaders,
+ AppendBlobAppendBlockExceptionHeaders: AppendBlobAppendBlockExceptionHeaders,
+ AppendBlobAppendBlockFromUrlHeaders: AppendBlobAppendBlockFromUrlHeaders,
+ AppendBlobAppendBlockFromUrlExceptionHeaders: AppendBlobAppendBlockFromUrlExceptionHeaders,
+ AppendBlobSealHeaders: AppendBlobSealHeaders,
+ AppendBlobSealExceptionHeaders: AppendBlobSealExceptionHeaders,
+ BlockBlobUploadHeaders: BlockBlobUploadHeaders,
+ BlockBlobUploadExceptionHeaders: BlockBlobUploadExceptionHeaders,
+ BlockBlobPutBlobFromUrlHeaders: BlockBlobPutBlobFromUrlHeaders,
+ BlockBlobPutBlobFromUrlExceptionHeaders: BlockBlobPutBlobFromUrlExceptionHeaders,
+ BlockBlobStageBlockHeaders: BlockBlobStageBlockHeaders,
+ BlockBlobStageBlockExceptionHeaders: BlockBlobStageBlockExceptionHeaders,
+ BlockBlobStageBlockFromURLHeaders: BlockBlobStageBlockFromURLHeaders,
+ BlockBlobStageBlockFromURLExceptionHeaders: BlockBlobStageBlockFromURLExceptionHeaders,
+ BlockBlobCommitBlockListHeaders: BlockBlobCommitBlockListHeaders,
+ BlockBlobCommitBlockListExceptionHeaders: BlockBlobCommitBlockListExceptionHeaders,
+ BlockBlobGetBlockListHeaders: BlockBlobGetBlockListHeaders,
+ BlockBlobGetBlockListExceptionHeaders: BlockBlobGetBlockListExceptionHeaders
+});
+
+/*
+ * Copyright (c) Microsoft Corporation.
+ * Licensed under the MIT License.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
+ */
+const contentType = {
+ parameterPath: ["options", "contentType"],
+ mapper: {
+ defaultValue: "application/xml",
+ isConstant: true,
+ serializedName: "Content-Type",
+ type: {
+ name: "String"
+ }
+ }
};
-const AppendBlobAppendBlockExceptionHeaders = {
- serializedName: "AppendBlob_appendBlockExceptionHeaders",
- type: {
- name: "Composite",
- className: "AppendBlobAppendBlockExceptionHeaders",
- modelProperties: {
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
- type: {
- name: "String"
- }
- }
+const blobServiceProperties = {
+ parameterPath: "blobServiceProperties",
+ mapper: BlobServiceProperties
+};
+const accept = {
+ parameterPath: "accept",
+ mapper: {
+ defaultValue: "application/xml",
+ isConstant: true,
+ serializedName: "Accept",
+ type: {
+ name: "String"
}
}
};
-const AppendBlobAppendBlockFromUrlHeaders = {
- serializedName: "AppendBlob_appendBlockFromUrlHeaders",
- type: {
- name: "Composite",
- className: "AppendBlobAppendBlockFromUrlHeaders",
- modelProperties: {
- etag: {
- serializedName: "etag",
- xmlName: "etag",
- type: {
- name: "String"
- }
- },
- lastModified: {
- serializedName: "last-modified",
- xmlName: "last-modified",
- type: {
- name: "DateTimeRfc1123"
- }
- },
- contentMD5: {
- serializedName: "content-md5",
- xmlName: "content-md5",
- type: {
- name: "ByteArray"
- }
- },
- xMsContentCrc64: {
- serializedName: "x-ms-content-crc64",
- xmlName: "x-ms-content-crc64",
- type: {
- name: "ByteArray"
- }
- },
- 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"
- }
- },
- blobAppendOffset: {
- serializedName: "x-ms-blob-append-offset",
- xmlName: "x-ms-blob-append-offset",
- type: {
- name: "String"
- }
- },
- blobCommittedBlockCount: {
- serializedName: "x-ms-blob-committed-block-count",
- xmlName: "x-ms-blob-committed-block-count",
- type: {
- name: "Number"
- }
- },
- encryptionKeySha256: {
- serializedName: "x-ms-encryption-key-sha256",
- xmlName: "x-ms-encryption-key-sha256",
- type: {
- name: "String"
- }
- },
- encryptionScope: {
- serializedName: "x-ms-encryption-scope",
- xmlName: "x-ms-encryption-scope",
- type: {
- name: "String"
- }
- },
- isServerEncrypted: {
- serializedName: "x-ms-request-server-encrypted",
- xmlName: "x-ms-request-server-encrypted",
- type: {
- name: "Boolean"
- }
- },
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
- type: {
- name: "String"
- }
- }
+const url = {
+ parameterPath: "url",
+ mapper: {
+ serializedName: "url",
+ required: true,
+ xmlName: "url",
+ type: {
+ name: "String"
+ }
+ },
+ skipEncoding: true
+};
+const restype = {
+ parameterPath: "restype",
+ mapper: {
+ defaultValue: "service",
+ isConstant: true,
+ serializedName: "restype",
+ type: {
+ name: "String"
}
}
};
-const AppendBlobAppendBlockFromUrlExceptionHeaders = {
- serializedName: "AppendBlob_appendBlockFromUrlExceptionHeaders",
- type: {
- name: "Composite",
- className: "AppendBlobAppendBlockFromUrlExceptionHeaders",
- modelProperties: {
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
- type: {
- name: "String"
- }
- }
+const comp = {
+ parameterPath: "comp",
+ mapper: {
+ defaultValue: "properties",
+ isConstant: true,
+ serializedName: "comp",
+ type: {
+ name: "String"
}
}
};
-const AppendBlobSealHeaders = {
- serializedName: "AppendBlob_sealHeaders",
- type: {
- name: "Composite",
- className: "AppendBlobSealHeaders",
- modelProperties: {
- etag: {
- serializedName: "etag",
- xmlName: "etag",
- type: {
- name: "String"
- }
- },
- lastModified: {
- serializedName: "last-modified",
- xmlName: "last-modified",
- type: {
- name: "DateTimeRfc1123"
- }
- },
- 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"
- }
- },
- isSealed: {
- serializedName: "x-ms-blob-sealed",
- xmlName: "x-ms-blob-sealed",
- type: {
- name: "Boolean"
- }
- }
+const timeoutInSeconds = {
+ parameterPath: ["options", "timeoutInSeconds"],
+ mapper: {
+ constraints: {
+ InclusiveMinimum: 0
+ },
+ serializedName: "timeout",
+ xmlName: "timeout",
+ type: {
+ name: "Number"
}
}
};
-const AppendBlobSealExceptionHeaders = {
- serializedName: "AppendBlob_sealExceptionHeaders",
- type: {
- name: "Composite",
- className: "AppendBlobSealExceptionHeaders",
- modelProperties: {
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
- type: {
- name: "String"
- }
- }
+const version = {
+ parameterPath: "version",
+ mapper: {
+ defaultValue: "2023-11-03",
+ isConstant: true,
+ serializedName: "x-ms-version",
+ type: {
+ name: "String"
}
}
};
-const BlockBlobUploadHeaders = {
- serializedName: "BlockBlob_uploadHeaders",
- type: {
- name: "Composite",
- className: "BlockBlobUploadHeaders",
- modelProperties: {
- etag: {
- serializedName: "etag",
- xmlName: "etag",
- type: {
- name: "String"
- }
- },
- lastModified: {
- serializedName: "last-modified",
- xmlName: "last-modified",
- type: {
- name: "DateTimeRfc1123"
- }
- },
- contentMD5: {
- serializedName: "content-md5",
- xmlName: "content-md5",
- type: {
- name: "ByteArray"
- }
- },
- 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"
- }
- },
- versionId: {
- serializedName: "x-ms-version-id",
- xmlName: "x-ms-version-id",
- type: {
- name: "String"
- }
- },
- date: {
- serializedName: "date",
- xmlName: "date",
- type: {
- name: "DateTimeRfc1123"
- }
- },
- isServerEncrypted: {
- serializedName: "x-ms-request-server-encrypted",
- xmlName: "x-ms-request-server-encrypted",
- type: {
- name: "Boolean"
- }
- },
- encryptionKeySha256: {
- serializedName: "x-ms-encryption-key-sha256",
- xmlName: "x-ms-encryption-key-sha256",
- type: {
- name: "String"
- }
- },
- encryptionScope: {
- serializedName: "x-ms-encryption-scope",
- xmlName: "x-ms-encryption-scope",
- type: {
- name: "String"
- }
- },
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
- type: {
- name: "String"
- }
- }
+const requestId = {
+ parameterPath: ["options", "requestId"],
+ mapper: {
+ serializedName: "x-ms-client-request-id",
+ xmlName: "x-ms-client-request-id",
+ type: {
+ name: "String"
}
}
};
-const BlockBlobUploadExceptionHeaders = {
- serializedName: "BlockBlob_uploadExceptionHeaders",
- type: {
- name: "Composite",
- className: "BlockBlobUploadExceptionHeaders",
- modelProperties: {
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
- type: {
- name: "String"
- }
- }
+const accept1 = {
+ parameterPath: "accept",
+ mapper: {
+ defaultValue: "application/xml",
+ isConstant: true,
+ serializedName: "Accept",
+ type: {
+ name: "String"
}
}
};
-const BlockBlobPutBlobFromUrlHeaders = {
- serializedName: "BlockBlob_putBlobFromUrlHeaders",
- type: {
- name: "Composite",
- className: "BlockBlobPutBlobFromUrlHeaders",
- modelProperties: {
- etag: {
- serializedName: "etag",
- xmlName: "etag",
- type: {
- name: "String"
- }
- },
- lastModified: {
- serializedName: "last-modified",
- xmlName: "last-modified",
- type: {
- name: "DateTimeRfc1123"
- }
- },
- contentMD5: {
- serializedName: "content-md5",
- xmlName: "content-md5",
- type: {
- name: "ByteArray"
- }
- },
- 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"
- }
- },
- versionId: {
- serializedName: "x-ms-version-id",
- xmlName: "x-ms-version-id",
- type: {
- name: "String"
- }
- },
- date: {
- serializedName: "date",
- xmlName: "date",
- type: {
- name: "DateTimeRfc1123"
- }
- },
- isServerEncrypted: {
- serializedName: "x-ms-request-server-encrypted",
- xmlName: "x-ms-request-server-encrypted",
- type: {
- name: "Boolean"
- }
- },
- encryptionKeySha256: {
- serializedName: "x-ms-encryption-key-sha256",
- xmlName: "x-ms-encryption-key-sha256",
- type: {
- name: "String"
- }
- },
- encryptionScope: {
- serializedName: "x-ms-encryption-scope",
- xmlName: "x-ms-encryption-scope",
- type: {
- name: "String"
- }
- },
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
- type: {
- name: "String"
- }
- }
+const comp1 = {
+ parameterPath: "comp",
+ mapper: {
+ defaultValue: "stats",
+ isConstant: true,
+ serializedName: "comp",
+ type: {
+ name: "String"
}
}
};
-const BlockBlobPutBlobFromUrlExceptionHeaders = {
- serializedName: "BlockBlob_putBlobFromUrlExceptionHeaders",
- type: {
- name: "Composite",
- className: "BlockBlobPutBlobFromUrlExceptionHeaders",
- modelProperties: {
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
- type: {
- name: "String"
- }
- }
+const comp2 = {
+ parameterPath: "comp",
+ mapper: {
+ defaultValue: "list",
+ isConstant: true,
+ serializedName: "comp",
+ type: {
+ name: "String"
}
}
};
-const BlockBlobStageBlockHeaders = {
- serializedName: "BlockBlob_stageBlockHeaders",
- type: {
- name: "Composite",
- className: "BlockBlobStageBlockHeaders",
- modelProperties: {
- contentMD5: {
- serializedName: "content-md5",
- xmlName: "content-md5",
- type: {
- name: "ByteArray"
- }
- },
- 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"
- }
- },
- xMsContentCrc64: {
- serializedName: "x-ms-content-crc64",
- xmlName: "x-ms-content-crc64",
- type: {
- name: "ByteArray"
- }
- },
- isServerEncrypted: {
- serializedName: "x-ms-request-server-encrypted",
- xmlName: "x-ms-request-server-encrypted",
- type: {
- name: "Boolean"
- }
- },
- encryptionKeySha256: {
- serializedName: "x-ms-encryption-key-sha256",
- xmlName: "x-ms-encryption-key-sha256",
- type: {
- name: "String"
- }
- },
- encryptionScope: {
- serializedName: "x-ms-encryption-scope",
- xmlName: "x-ms-encryption-scope",
- type: {
- name: "String"
- }
- },
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
- type: {
- name: "String"
- }
- }
+const prefix = {
+ parameterPath: ["options", "prefix"],
+ mapper: {
+ serializedName: "prefix",
+ xmlName: "prefix",
+ type: {
+ name: "String"
}
}
};
-const BlockBlobStageBlockExceptionHeaders = {
- serializedName: "BlockBlob_stageBlockExceptionHeaders",
- type: {
- name: "Composite",
- className: "BlockBlobStageBlockExceptionHeaders",
- modelProperties: {
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
- type: {
- name: "String"
- }
- }
+const marker = {
+ parameterPath: ["options", "marker"],
+ mapper: {
+ serializedName: "marker",
+ xmlName: "marker",
+ type: {
+ name: "String"
}
}
};
-const BlockBlobStageBlockFromURLHeaders = {
- serializedName: "BlockBlob_stageBlockFromURLHeaders",
- type: {
- name: "Composite",
- className: "BlockBlobStageBlockFromURLHeaders",
- modelProperties: {
- contentMD5: {
- serializedName: "content-md5",
- xmlName: "content-md5",
- type: {
- name: "ByteArray"
- }
- },
- xMsContentCrc64: {
- serializedName: "x-ms-content-crc64",
- xmlName: "x-ms-content-crc64",
- type: {
- name: "ByteArray"
- }
- },
- 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"
- }
- },
- isServerEncrypted: {
- serializedName: "x-ms-request-server-encrypted",
- xmlName: "x-ms-request-server-encrypted",
- type: {
- name: "Boolean"
- }
- },
- encryptionKeySha256: {
- serializedName: "x-ms-encryption-key-sha256",
- xmlName: "x-ms-encryption-key-sha256",
- type: {
- name: "String"
- }
- },
- encryptionScope: {
- serializedName: "x-ms-encryption-scope",
- xmlName: "x-ms-encryption-scope",
- type: {
- name: "String"
- }
- },
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
- type: {
- name: "String"
- }
- }
+const maxPageSize = {
+ parameterPath: ["options", "maxPageSize"],
+ mapper: {
+ constraints: {
+ InclusiveMinimum: 1
+ },
+ serializedName: "maxresults",
+ xmlName: "maxresults",
+ type: {
+ name: "Number"
}
}
};
-const BlockBlobStageBlockFromURLExceptionHeaders = {
- serializedName: "BlockBlob_stageBlockFromURLExceptionHeaders",
- type: {
- name: "Composite",
- className: "BlockBlobStageBlockFromURLExceptionHeaders",
- modelProperties: {
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
+const include = {
+ parameterPath: ["options", "include"],
+ mapper: {
+ serializedName: "include",
+ xmlName: "include",
+ xmlElementName: "ListContainersIncludeType",
+ type: {
+ name: "Sequence",
+ element: {
type: {
- name: "String"
+ name: "Enum",
+ allowedValues: ["metadata", "deleted", "system"]
}
}
}
- }
+ },
+ collectionFormat: coreHttp.QueryCollectionFormat.Csv
};
-const BlockBlobCommitBlockListHeaders = {
- serializedName: "BlockBlob_commitBlockListHeaders",
- type: {
- name: "Composite",
- className: "BlockBlobCommitBlockListHeaders",
- modelProperties: {
- etag: {
- serializedName: "etag",
- xmlName: "etag",
- type: {
- name: "String"
- }
- },
- lastModified: {
- serializedName: "last-modified",
- xmlName: "last-modified",
- type: {
- name: "DateTimeRfc1123"
- }
- },
- contentMD5: {
- serializedName: "content-md5",
- xmlName: "content-md5",
- type: {
- name: "ByteArray"
- }
- },
- xMsContentCrc64: {
- serializedName: "x-ms-content-crc64",
- xmlName: "x-ms-content-crc64",
- type: {
- name: "ByteArray"
- }
- },
- 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"
- }
- },
- versionId: {
- serializedName: "x-ms-version-id",
- xmlName: "x-ms-version-id",
- type: {
- name: "String"
- }
- },
- date: {
- serializedName: "date",
- xmlName: "date",
- type: {
- name: "DateTimeRfc1123"
- }
- },
- isServerEncrypted: {
- serializedName: "x-ms-request-server-encrypted",
- xmlName: "x-ms-request-server-encrypted",
- type: {
- name: "Boolean"
- }
- },
- encryptionKeySha256: {
- serializedName: "x-ms-encryption-key-sha256",
- xmlName: "x-ms-encryption-key-sha256",
- type: {
- name: "String"
- }
- },
- encryptionScope: {
- serializedName: "x-ms-encryption-scope",
- xmlName: "x-ms-encryption-scope",
- type: {
- name: "String"
- }
- },
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
- type: {
- name: "String"
- }
- }
- }
- }
+const keyInfo = {
+ parameterPath: "keyInfo",
+ mapper: KeyInfo
};
-const BlockBlobCommitBlockListExceptionHeaders = {
- serializedName: "BlockBlob_commitBlockListExceptionHeaders",
- type: {
- name: "Composite",
- className: "BlockBlobCommitBlockListExceptionHeaders",
- modelProperties: {
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
- type: {
- name: "String"
- }
- }
- }
- }
-};
-const BlockBlobGetBlockListHeaders = {
- serializedName: "BlockBlob_getBlockListHeaders",
- type: {
- name: "Composite",
- className: "BlockBlobGetBlockListHeaders",
- modelProperties: {
- lastModified: {
- serializedName: "last-modified",
- xmlName: "last-modified",
- type: {
- name: "DateTimeRfc1123"
- }
- },
- etag: {
- serializedName: "etag",
- xmlName: "etag",
- type: {
- name: "String"
- }
- },
- contentType: {
- serializedName: "content-type",
- xmlName: "content-type",
- type: {
- name: "String"
- }
- },
- blobContentLength: {
- serializedName: "x-ms-blob-content-length",
- xmlName: "x-ms-blob-content-length",
- type: {
- name: "Number"
- }
- },
- 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"
- }
- },
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
- type: {
- name: "String"
- }
- }
- }
- }
-};
-const BlockBlobGetBlockListExceptionHeaders = {
- serializedName: "BlockBlob_getBlockListExceptionHeaders",
- type: {
- name: "Composite",
- className: "BlockBlobGetBlockListExceptionHeaders",
- modelProperties: {
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
- type: {
- name: "String"
- }
- }
- }
- }
-};
-
-var Mappers = /*#__PURE__*/Object.freeze({
- __proto__: null,
- BlobServiceProperties: BlobServiceProperties,
- Logging: Logging,
- RetentionPolicy: RetentionPolicy,
- Metrics: Metrics,
- CorsRule: CorsRule,
- StaticWebsite: StaticWebsite,
- StorageError: StorageError,
- BlobServiceStatistics: BlobServiceStatistics,
- GeoReplication: GeoReplication,
- ListContainersSegmentResponse: ListContainersSegmentResponse,
- ContainerItem: ContainerItem,
- ContainerProperties: ContainerProperties,
- KeyInfo: KeyInfo,
- UserDelegationKey: UserDelegationKey,
- FilterBlobSegment: FilterBlobSegment,
- FilterBlobItem: FilterBlobItem,
- BlobTags: BlobTags,
- BlobTag: BlobTag,
- SignedIdentifier: SignedIdentifier,
- AccessPolicy: AccessPolicy,
- ListBlobsFlatSegmentResponse: ListBlobsFlatSegmentResponse,
- BlobFlatListSegment: BlobFlatListSegment,
- BlobItemInternal: BlobItemInternal,
- BlobName: BlobName,
- BlobPropertiesInternal: BlobPropertiesInternal,
- ListBlobsHierarchySegmentResponse: ListBlobsHierarchySegmentResponse,
- BlobHierarchyListSegment: BlobHierarchyListSegment,
- BlobPrefix: BlobPrefix,
- BlockLookupList: BlockLookupList,
- BlockList: BlockList,
- Block: Block,
- PageList: PageList,
- PageRange: PageRange,
- ClearRange: ClearRange,
- QueryRequest: QueryRequest,
- QuerySerialization: QuerySerialization,
- QueryFormat: QueryFormat,
- DelimitedTextConfiguration: DelimitedTextConfiguration,
- JsonTextConfiguration: JsonTextConfiguration,
- ArrowConfiguration: ArrowConfiguration,
- ArrowField: ArrowField,
- ServiceSetPropertiesHeaders: ServiceSetPropertiesHeaders,
- ServiceSetPropertiesExceptionHeaders: ServiceSetPropertiesExceptionHeaders,
- ServiceGetPropertiesHeaders: ServiceGetPropertiesHeaders,
- ServiceGetPropertiesExceptionHeaders: ServiceGetPropertiesExceptionHeaders,
- ServiceGetStatisticsHeaders: ServiceGetStatisticsHeaders,
- ServiceGetStatisticsExceptionHeaders: ServiceGetStatisticsExceptionHeaders,
- ServiceListContainersSegmentHeaders: ServiceListContainersSegmentHeaders,
- ServiceListContainersSegmentExceptionHeaders: ServiceListContainersSegmentExceptionHeaders,
- ServiceGetUserDelegationKeyHeaders: ServiceGetUserDelegationKeyHeaders,
- ServiceGetUserDelegationKeyExceptionHeaders: ServiceGetUserDelegationKeyExceptionHeaders,
- ServiceGetAccountInfoHeaders: ServiceGetAccountInfoHeaders,
- ServiceGetAccountInfoExceptionHeaders: ServiceGetAccountInfoExceptionHeaders,
- ServiceSubmitBatchHeaders: ServiceSubmitBatchHeaders,
- ServiceSubmitBatchExceptionHeaders: ServiceSubmitBatchExceptionHeaders,
- ServiceFilterBlobsHeaders: ServiceFilterBlobsHeaders,
- ServiceFilterBlobsExceptionHeaders: ServiceFilterBlobsExceptionHeaders,
- ContainerCreateHeaders: ContainerCreateHeaders,
- ContainerCreateExceptionHeaders: ContainerCreateExceptionHeaders,
- ContainerGetPropertiesHeaders: ContainerGetPropertiesHeaders,
- ContainerGetPropertiesExceptionHeaders: ContainerGetPropertiesExceptionHeaders,
- ContainerDeleteHeaders: ContainerDeleteHeaders,
- ContainerDeleteExceptionHeaders: ContainerDeleteExceptionHeaders,
- ContainerSetMetadataHeaders: ContainerSetMetadataHeaders,
- ContainerSetMetadataExceptionHeaders: ContainerSetMetadataExceptionHeaders,
- ContainerGetAccessPolicyHeaders: ContainerGetAccessPolicyHeaders,
- ContainerGetAccessPolicyExceptionHeaders: ContainerGetAccessPolicyExceptionHeaders,
- ContainerSetAccessPolicyHeaders: ContainerSetAccessPolicyHeaders,
- ContainerSetAccessPolicyExceptionHeaders: ContainerSetAccessPolicyExceptionHeaders,
- ContainerRestoreHeaders: ContainerRestoreHeaders,
- ContainerRestoreExceptionHeaders: ContainerRestoreExceptionHeaders,
- ContainerRenameHeaders: ContainerRenameHeaders,
- ContainerRenameExceptionHeaders: ContainerRenameExceptionHeaders,
- ContainerSubmitBatchHeaders: ContainerSubmitBatchHeaders,
- ContainerSubmitBatchExceptionHeaders: ContainerSubmitBatchExceptionHeaders,
- ContainerFilterBlobsHeaders: ContainerFilterBlobsHeaders,
- ContainerFilterBlobsExceptionHeaders: ContainerFilterBlobsExceptionHeaders,
- ContainerAcquireLeaseHeaders: ContainerAcquireLeaseHeaders,
- ContainerAcquireLeaseExceptionHeaders: ContainerAcquireLeaseExceptionHeaders,
- ContainerReleaseLeaseHeaders: ContainerReleaseLeaseHeaders,
- ContainerReleaseLeaseExceptionHeaders: ContainerReleaseLeaseExceptionHeaders,
- ContainerRenewLeaseHeaders: ContainerRenewLeaseHeaders,
- ContainerRenewLeaseExceptionHeaders: ContainerRenewLeaseExceptionHeaders,
- ContainerBreakLeaseHeaders: ContainerBreakLeaseHeaders,
- ContainerBreakLeaseExceptionHeaders: ContainerBreakLeaseExceptionHeaders,
- ContainerChangeLeaseHeaders: ContainerChangeLeaseHeaders,
- ContainerChangeLeaseExceptionHeaders: ContainerChangeLeaseExceptionHeaders,
- ContainerListBlobFlatSegmentHeaders: ContainerListBlobFlatSegmentHeaders,
- ContainerListBlobFlatSegmentExceptionHeaders: ContainerListBlobFlatSegmentExceptionHeaders,
- ContainerListBlobHierarchySegmentHeaders: ContainerListBlobHierarchySegmentHeaders,
- ContainerListBlobHierarchySegmentExceptionHeaders: ContainerListBlobHierarchySegmentExceptionHeaders,
- ContainerGetAccountInfoHeaders: ContainerGetAccountInfoHeaders,
- ContainerGetAccountInfoExceptionHeaders: ContainerGetAccountInfoExceptionHeaders,
- BlobDownloadHeaders: BlobDownloadHeaders,
- BlobDownloadExceptionHeaders: BlobDownloadExceptionHeaders,
- BlobGetPropertiesHeaders: BlobGetPropertiesHeaders,
- BlobGetPropertiesExceptionHeaders: BlobGetPropertiesExceptionHeaders,
- BlobDeleteHeaders: BlobDeleteHeaders,
- BlobDeleteExceptionHeaders: BlobDeleteExceptionHeaders,
- BlobUndeleteHeaders: BlobUndeleteHeaders,
- BlobUndeleteExceptionHeaders: BlobUndeleteExceptionHeaders,
- BlobSetExpiryHeaders: BlobSetExpiryHeaders,
- BlobSetExpiryExceptionHeaders: BlobSetExpiryExceptionHeaders,
- BlobSetHttpHeadersHeaders: BlobSetHttpHeadersHeaders,
- BlobSetHttpHeadersExceptionHeaders: BlobSetHttpHeadersExceptionHeaders,
- BlobSetImmutabilityPolicyHeaders: BlobSetImmutabilityPolicyHeaders,
- BlobSetImmutabilityPolicyExceptionHeaders: BlobSetImmutabilityPolicyExceptionHeaders,
- BlobDeleteImmutabilityPolicyHeaders: BlobDeleteImmutabilityPolicyHeaders,
- BlobDeleteImmutabilityPolicyExceptionHeaders: BlobDeleteImmutabilityPolicyExceptionHeaders,
- BlobSetLegalHoldHeaders: BlobSetLegalHoldHeaders,
- BlobSetLegalHoldExceptionHeaders: BlobSetLegalHoldExceptionHeaders,
- BlobSetMetadataHeaders: BlobSetMetadataHeaders,
- BlobSetMetadataExceptionHeaders: BlobSetMetadataExceptionHeaders,
- BlobAcquireLeaseHeaders: BlobAcquireLeaseHeaders,
- BlobAcquireLeaseExceptionHeaders: BlobAcquireLeaseExceptionHeaders,
- BlobReleaseLeaseHeaders: BlobReleaseLeaseHeaders,
- BlobReleaseLeaseExceptionHeaders: BlobReleaseLeaseExceptionHeaders,
- BlobRenewLeaseHeaders: BlobRenewLeaseHeaders,
- BlobRenewLeaseExceptionHeaders: BlobRenewLeaseExceptionHeaders,
- BlobChangeLeaseHeaders: BlobChangeLeaseHeaders,
- BlobChangeLeaseExceptionHeaders: BlobChangeLeaseExceptionHeaders,
- BlobBreakLeaseHeaders: BlobBreakLeaseHeaders,
- BlobBreakLeaseExceptionHeaders: BlobBreakLeaseExceptionHeaders,
- BlobCreateSnapshotHeaders: BlobCreateSnapshotHeaders,
- BlobCreateSnapshotExceptionHeaders: BlobCreateSnapshotExceptionHeaders,
- BlobStartCopyFromURLHeaders: BlobStartCopyFromURLHeaders,
- BlobStartCopyFromURLExceptionHeaders: BlobStartCopyFromURLExceptionHeaders,
- BlobCopyFromURLHeaders: BlobCopyFromURLHeaders,
- BlobCopyFromURLExceptionHeaders: BlobCopyFromURLExceptionHeaders,
- BlobAbortCopyFromURLHeaders: BlobAbortCopyFromURLHeaders,
- BlobAbortCopyFromURLExceptionHeaders: BlobAbortCopyFromURLExceptionHeaders,
- BlobSetTierHeaders: BlobSetTierHeaders,
- BlobSetTierExceptionHeaders: BlobSetTierExceptionHeaders,
- BlobGetAccountInfoHeaders: BlobGetAccountInfoHeaders,
- BlobGetAccountInfoExceptionHeaders: BlobGetAccountInfoExceptionHeaders,
- BlobQueryHeaders: BlobQueryHeaders,
- BlobQueryExceptionHeaders: BlobQueryExceptionHeaders,
- BlobGetTagsHeaders: BlobGetTagsHeaders,
- BlobGetTagsExceptionHeaders: BlobGetTagsExceptionHeaders,
- BlobSetTagsHeaders: BlobSetTagsHeaders,
- BlobSetTagsExceptionHeaders: BlobSetTagsExceptionHeaders,
- PageBlobCreateHeaders: PageBlobCreateHeaders,
- PageBlobCreateExceptionHeaders: PageBlobCreateExceptionHeaders,
- PageBlobUploadPagesHeaders: PageBlobUploadPagesHeaders,
- PageBlobUploadPagesExceptionHeaders: PageBlobUploadPagesExceptionHeaders,
- PageBlobClearPagesHeaders: PageBlobClearPagesHeaders,
- PageBlobClearPagesExceptionHeaders: PageBlobClearPagesExceptionHeaders,
- PageBlobUploadPagesFromURLHeaders: PageBlobUploadPagesFromURLHeaders,
- PageBlobUploadPagesFromURLExceptionHeaders: PageBlobUploadPagesFromURLExceptionHeaders,
- PageBlobGetPageRangesHeaders: PageBlobGetPageRangesHeaders,
- PageBlobGetPageRangesExceptionHeaders: PageBlobGetPageRangesExceptionHeaders,
- PageBlobGetPageRangesDiffHeaders: PageBlobGetPageRangesDiffHeaders,
- PageBlobGetPageRangesDiffExceptionHeaders: PageBlobGetPageRangesDiffExceptionHeaders,
- PageBlobResizeHeaders: PageBlobResizeHeaders,
- PageBlobResizeExceptionHeaders: PageBlobResizeExceptionHeaders,
- PageBlobUpdateSequenceNumberHeaders: PageBlobUpdateSequenceNumberHeaders,
- PageBlobUpdateSequenceNumberExceptionHeaders: PageBlobUpdateSequenceNumberExceptionHeaders,
- PageBlobCopyIncrementalHeaders: PageBlobCopyIncrementalHeaders,
- PageBlobCopyIncrementalExceptionHeaders: PageBlobCopyIncrementalExceptionHeaders,
- AppendBlobCreateHeaders: AppendBlobCreateHeaders,
- AppendBlobCreateExceptionHeaders: AppendBlobCreateExceptionHeaders,
- AppendBlobAppendBlockHeaders: AppendBlobAppendBlockHeaders,
- AppendBlobAppendBlockExceptionHeaders: AppendBlobAppendBlockExceptionHeaders,
- AppendBlobAppendBlockFromUrlHeaders: AppendBlobAppendBlockFromUrlHeaders,
- AppendBlobAppendBlockFromUrlExceptionHeaders: AppendBlobAppendBlockFromUrlExceptionHeaders,
- AppendBlobSealHeaders: AppendBlobSealHeaders,
- AppendBlobSealExceptionHeaders: AppendBlobSealExceptionHeaders,
- BlockBlobUploadHeaders: BlockBlobUploadHeaders,
- BlockBlobUploadExceptionHeaders: BlockBlobUploadExceptionHeaders,
- BlockBlobPutBlobFromUrlHeaders: BlockBlobPutBlobFromUrlHeaders,
- BlockBlobPutBlobFromUrlExceptionHeaders: BlockBlobPutBlobFromUrlExceptionHeaders,
- BlockBlobStageBlockHeaders: BlockBlobStageBlockHeaders,
- BlockBlobStageBlockExceptionHeaders: BlockBlobStageBlockExceptionHeaders,
- BlockBlobStageBlockFromURLHeaders: BlockBlobStageBlockFromURLHeaders,
- BlockBlobStageBlockFromURLExceptionHeaders: BlockBlobStageBlockFromURLExceptionHeaders,
- BlockBlobCommitBlockListHeaders: BlockBlobCommitBlockListHeaders,
- BlockBlobCommitBlockListExceptionHeaders: BlockBlobCommitBlockListExceptionHeaders,
- BlockBlobGetBlockListHeaders: BlockBlobGetBlockListHeaders,
- BlockBlobGetBlockListExceptionHeaders: BlockBlobGetBlockListExceptionHeaders
-});
-
-/*
- * Copyright (c) Microsoft Corporation.
- * Licensed under the MIT License.
- *
- * Code generated by Microsoft (R) AutoRest Code Generator.
- * Changes may cause incorrect behavior and will be lost if the code is regenerated.
- */
-const contentType = {
- parameterPath: ["options", "contentType"],
- mapper: {
- defaultValue: "application/xml",
- isConstant: true,
- serializedName: "Content-Type",
- type: {
- name: "String"
- }
- }
-};
-const blobServiceProperties = {
- parameterPath: "blobServiceProperties",
- mapper: BlobServiceProperties
-};
-const accept = {
- parameterPath: "accept",
- mapper: {
- defaultValue: "application/xml",
- isConstant: true,
- serializedName: "Accept",
- type: {
- name: "String"
- }
- }
-};
-const url = {
- parameterPath: "url",
- mapper: {
- serializedName: "url",
- required: true,
- xmlName: "url",
- type: {
- name: "String"
- }
- },
- skipEncoding: true
-};
-const restype = {
- parameterPath: "restype",
- mapper: {
- defaultValue: "service",
- isConstant: true,
- serializedName: "restype",
- type: {
- name: "String"
- }
- }
-};
-const comp = {
- parameterPath: "comp",
- mapper: {
- defaultValue: "properties",
- isConstant: true,
- serializedName: "comp",
- type: {
- name: "String"
- }
- }
-};
-const timeoutInSeconds = {
- parameterPath: ["options", "timeoutInSeconds"],
- mapper: {
- constraints: {
- InclusiveMinimum: 0
- },
- serializedName: "timeout",
- xmlName: "timeout",
- type: {
- name: "Number"
- }
- }
-};
-const version = {
- parameterPath: "version",
- mapper: {
- defaultValue: "2023-08-03",
- isConstant: true,
- serializedName: "x-ms-version",
- type: {
- name: "String"
- }
- }
-};
-const requestId = {
- parameterPath: ["options", "requestId"],
- mapper: {
- serializedName: "x-ms-client-request-id",
- xmlName: "x-ms-client-request-id",
- type: {
- name: "String"
- }
- }
-};
-const accept1 = {
- parameterPath: "accept",
- mapper: {
- defaultValue: "application/xml",
- isConstant: true,
- serializedName: "Accept",
- type: {
- name: "String"
- }
- }
-};
-const comp1 = {
- parameterPath: "comp",
- mapper: {
- defaultValue: "stats",
- isConstant: true,
- serializedName: "comp",
- type: {
- name: "String"
- }
- }
-};
-const comp2 = {
- parameterPath: "comp",
- mapper: {
- defaultValue: "list",
- isConstant: true,
- serializedName: "comp",
- type: {
- name: "String"
- }
- }
-};
-const prefix = {
- parameterPath: ["options", "prefix"],
- mapper: {
- serializedName: "prefix",
- xmlName: "prefix",
- type: {
- name: "String"
- }
- }
-};
-const marker = {
- parameterPath: ["options", "marker"],
- mapper: {
- serializedName: "marker",
- xmlName: "marker",
- type: {
- name: "String"
- }
- }
-};
-const maxPageSize = {
- parameterPath: ["options", "maxPageSize"],
- mapper: {
- constraints: {
- InclusiveMinimum: 1
- },
- serializedName: "maxresults",
- xmlName: "maxresults",
- type: {
- name: "Number"
- }
- }
-};
-const include = {
- parameterPath: ["options", "include"],
- mapper: {
- serializedName: "include",
- xmlName: "include",
- xmlElementName: "ListContainersIncludeType",
- type: {
- name: "Sequence",
- element: {
- type: {
- name: "Enum",
- allowedValues: ["metadata", "deleted", "system"]
- }
- }
- }
- },
- collectionFormat: coreHttp.QueryCollectionFormat.Csv
-};
-const keyInfo = {
- parameterPath: "keyInfo",
- mapper: KeyInfo
-};
-const comp3 = {
- parameterPath: "comp",
- mapper: {
- defaultValue: "userdelegationkey",
- isConstant: true,
- serializedName: "comp",
- type: {
- name: "String"
+const comp3 = {
+ parameterPath: "comp",
+ mapper: {
+ defaultValue: "userdelegationkey",
+ isConstant: true,
+ serializedName: "comp",
+ type: {
+ name: "String"
}
}
};
@@ -29018,8 +26910,8 @@ const logger = logger$1.createClientLogger("storage-blob");
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
-const SDK_VERSION = "12.16.0";
-const SERVICE_VERSION = "2023-08-03";
+const SDK_VERSION = "12.17.0";
+const SERVICE_VERSION = "2023-11-03";
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_BLOCKS = 50000;
@@ -30879,7 +28771,7 @@ class StorageSharedKeyCredential extends Credential {
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
const packageName = "azure-storage-blob";
-const packageVersion = "12.16.0";
+const packageVersion = "12.17.0";
class StorageClientContext extends coreHttp__namespace.ServiceClient {
/**
* Initializes a new instance of the StorageClientContext class.
@@ -30905,7 +28797,7 @@ class StorageClientContext extends coreHttp__namespace.ServiceClient {
// Parameter assignments
this.url = url;
// Assigning values to Constant parameters
- this.version = options.version || "2023-08-03";
+ this.version = options.version || "2023-11-03";
}
}
@@ -34086,6 +31978,9 @@ exports.StorageBlobAudience = void 0;
*/
StorageBlobAudience["DiskComputeOAuthScopes"] = "https://disk.compute.azure.com/.default";
})(exports.StorageBlobAudience || (exports.StorageBlobAudience = {}));
+function getBlobServiceAccountAudience(storageAccountName) {
+ return `https://${storageAccountName}.blob.core.windows.net/.default`;
+}
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
@@ -40796,6 +38691,7 @@ exports.StorageSharedKeyCredential = StorageSharedKeyCredential;
exports.StorageSharedKeyCredentialPolicy = StorageSharedKeyCredentialPolicy;
exports.generateAccountSASQueryParameters = generateAccountSASQueryParameters;
exports.generateBlobSASQueryParameters = generateBlobSASQueryParameters;
+exports.getBlobServiceAccountAudience = getBlobServiceAccountAudience;
exports.isPipelineLike = isPipelineLike;
exports.logger = logger;
exports.newPipeline = newPipeline;
@@ -40804,1430 +38700,1424 @@ exports.newPipeline = newPipeline;
/***/ }),
-/***/ 2856:
-/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
+/***/ 7171:
+/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
-
-const WritableStream = (__nccwpck_require__(4492).Writable)
-const inherits = (__nccwpck_require__(7261).inherits)
-
-const StreamSearch = __nccwpck_require__(8534)
-
-const PartStream = __nccwpck_require__(8710)
-const HeaderParser = __nccwpck_require__(333)
-
-const DASH = 45
-const B_ONEDASH = Buffer.from('-')
-const B_CRLF = Buffer.from('\r\n')
-const EMPTY_FN = function () {}
-
-function Dicer (cfg) {
- if (!(this instanceof Dicer)) { return new Dicer(cfg) }
- WritableStream.call(this, cfg)
-
- if (!cfg || (!cfg.headerFirst && typeof cfg.boundary !== 'string')) { throw new TypeError('Boundary required') }
-
- if (typeof cfg.boundary === 'string') { this.setBoundary(cfg.boundary) } else { this._bparser = undefined }
-
- this._headerFirst = cfg.headerFirst
-
- this._dashes = 0
- this._parts = 0
- this._finished = false
- this._realFinish = false
- this._isPreamble = true
- this._justMatched = false
- this._firstWrite = true
- this._inHeader = true
- this._part = undefined
- this._cb = undefined
- this._ignoreData = false
- this._partOpts = { highWaterMark: cfg.partHwm }
- this._pause = false
-
- const self = this
- this._hparser = new HeaderParser(cfg)
- this._hparser.on('header', function (header) {
- self._inHeader = false
- self._part.emit('header', header)
- })
-}
-inherits(Dicer, WritableStream)
-
-Dicer.prototype.emit = function (ev) {
- if (ev === 'finish' && !this._realFinish) {
- if (!this._finished) {
- const self = this
- process.nextTick(function () {
- self.emit('error', new Error('Unexpected end of multipart data'))
- if (self._part && !self._ignoreData) {
- const type = (self._isPreamble ? 'Preamble' : 'Part')
- self._part.emit('error', new Error(type + ' terminated early due to unexpected end of multipart data'))
- self._part.push(null)
- process.nextTick(function () {
- self._realFinish = true
- self.emit('finish')
- self._realFinish = false
- })
- return
+/*
+ * Copyright The OpenTelemetry Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.ContextAPI = void 0;
+const NoopContextManager_1 = __nccwpck_require__(4118);
+const global_utils_1 = __nccwpck_require__(5135);
+const diag_1 = __nccwpck_require__(1877);
+const API_NAME = 'context';
+const NOOP_CONTEXT_MANAGER = new NoopContextManager_1.NoopContextManager();
+/**
+ * Singleton object which represents the entry point to the OpenTelemetry Context API
+ */
+class ContextAPI {
+ /** Empty private constructor prevents end users from constructing a new instance of the API */
+ constructor() { }
+ /** Get the singleton instance of the Context API */
+ static getInstance() {
+ if (!this._instance) {
+ this._instance = new ContextAPI();
}
- self._realFinish = true
- self.emit('finish')
- self._realFinish = false
- })
+ return this._instance;
}
- } else { WritableStream.prototype.emit.apply(this, arguments) }
-}
-
-Dicer.prototype._write = function (data, encoding, cb) {
- // ignore unexpected data (e.g. extra trailer data after finished)
- if (!this._hparser && !this._bparser) { return cb() }
-
- if (this._headerFirst && this._isPreamble) {
- if (!this._part) {
- this._part = new PartStream(this._partOpts)
- if (this._events.preamble) { this.emit('preamble', this._part) } else { this._ignore() }
+ /**
+ * Set the current context manager.
+ *
+ * @returns true if the context manager was successfully registered, else false
+ */
+ setGlobalContextManager(contextManager) {
+ return (0, global_utils_1.registerGlobal)(API_NAME, contextManager, diag_1.DiagAPI.instance());
}
- const r = this._hparser.push(data)
- if (!this._inHeader && r !== undefined && r < data.length) { data = data.slice(r) } else { return cb() }
- }
-
- // allows for "easier" testing
- if (this._firstWrite) {
- this._bparser.push(B_CRLF)
- this._firstWrite = false
- }
-
- this._bparser.push(data)
-
- if (this._pause) { this._cb = cb } else { cb() }
-}
-
-Dicer.prototype.reset = function () {
- this._part = undefined
- this._bparser = undefined
- this._hparser = undefined
-}
-
-Dicer.prototype.setBoundary = function (boundary) {
- const self = this
- this._bparser = new StreamSearch('\r\n--' + boundary)
- this._bparser.on('info', function (isMatch, data, start, end) {
- self._oninfo(isMatch, data, start, end)
- })
-}
-
-Dicer.prototype._ignore = function () {
- if (this._part && !this._ignoreData) {
- this._ignoreData = true
- this._part.on('error', EMPTY_FN)
- // we must perform some kind of read on the stream even though we are
- // ignoring the data, otherwise node's Readable stream will not emit 'end'
- // after pushing null to the stream
- this._part.resume()
- }
-}
-
-Dicer.prototype._oninfo = function (isMatch, data, start, end) {
- let buf; const self = this; let i = 0; let r; let shouldWriteMore = true
-
- if (!this._part && this._justMatched && data) {
- while (this._dashes < 2 && (start + i) < end) {
- if (data[start + i] === DASH) {
- ++i
- ++this._dashes
- } else {
- if (this._dashes) { buf = B_ONEDASH }
- this._dashes = 0
- break
- }
+ /**
+ * Get the currently active context
+ */
+ active() {
+ return this._getContextManager().active();
}
- if (this._dashes === 2) {
- if ((start + i) < end && this._events.trailer) { this.emit('trailer', data.slice(start + i, end)) }
- this.reset()
- this._finished = true
- // no more parts will be added
- if (self._parts === 0) {
- self._realFinish = true
- self.emit('finish')
- self._realFinish = false
- }
+ /**
+ * Execute a function with an active context
+ *
+ * @param context context to be active during function execution
+ * @param fn function to execute in a context
+ * @param thisArg optional receiver to be used for calling fn
+ * @param args optional arguments forwarded to fn
+ */
+ with(context, fn, thisArg, ...args) {
+ return this._getContextManager().with(context, fn, thisArg, ...args);
}
- if (this._dashes) { return }
- }
- if (this._justMatched) { this._justMatched = false }
- if (!this._part) {
- this._part = new PartStream(this._partOpts)
- this._part._read = function (n) {
- self._unpause()
+ /**
+ * Bind a context to a target function or event emitter
+ *
+ * @param context context to bind to the event emitter or function. Defaults to the currently active context
+ * @param target function or event emitter to bind
+ */
+ bind(context, target) {
+ return this._getContextManager().bind(context, target);
}
- if (this._isPreamble && this._events.preamble) { this.emit('preamble', this._part) } else if (this._isPreamble !== true && this._events.part) { this.emit('part', this._part) } else { this._ignore() }
- if (!this._isPreamble) { this._inHeader = true }
- }
- if (data && start < end && !this._ignoreData) {
- if (this._isPreamble || !this._inHeader) {
- if (buf) { shouldWriteMore = this._part.push(buf) }
- shouldWriteMore = this._part.push(data.slice(start, end))
- if (!shouldWriteMore) { this._pause = true }
- } else if (!this._isPreamble && this._inHeader) {
- if (buf) { this._hparser.push(buf) }
- r = this._hparser.push(data.slice(start, end))
- if (!this._inHeader && r !== undefined && r < end) { this._oninfo(false, data, start + r, end) }
+ _getContextManager() {
+ return (0, global_utils_1.getGlobal)(API_NAME) || NOOP_CONTEXT_MANAGER;
}
- }
- if (isMatch) {
- this._hparser.reset()
- if (this._isPreamble) { this._isPreamble = false } else {
- if (start !== end) {
- ++this._parts
- this._part.on('end', function () {
- if (--self._parts === 0) {
- if (self._finished) {
- self._realFinish = true
- self.emit('finish')
- self._realFinish = false
- } else {
- self._unpause()
- }
- }
- })
- }
+ /** Disable and remove the global context manager */
+ disable() {
+ this._getContextManager().disable();
+ (0, global_utils_1.unregisterGlobal)(API_NAME, diag_1.DiagAPI.instance());
}
- this._part.push(null)
- this._part = undefined
- this._ignoreData = false
- this._justMatched = true
- this._dashes = 0
- }
-}
-
-Dicer.prototype._unpause = function () {
- if (!this._pause) { return }
-
- this._pause = false
- if (this._cb) {
- const cb = this._cb
- this._cb = undefined
- cb()
- }
}
-
-module.exports = Dicer
-
+exports.ContextAPI = ContextAPI;
+//# sourceMappingURL=context.js.map
/***/ }),
-/***/ 333:
-/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
+/***/ 1877:
+/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
-
-const EventEmitter = (__nccwpck_require__(5673).EventEmitter)
-const inherits = (__nccwpck_require__(7261).inherits)
-const getLimit = __nccwpck_require__(9692)
-
-const StreamSearch = __nccwpck_require__(8534)
-
-const B_DCRLF = Buffer.from('\r\n\r\n')
-const RE_CRLF = /\r\n/g
-const RE_HDR = /^([^:]+):[ \t]?([\x00-\xFF]+)?$/ // eslint-disable-line no-control-regex
-
-function HeaderParser (cfg) {
- EventEmitter.call(this)
-
- cfg = cfg || {}
- const self = this
- this.nread = 0
- this.maxed = false
- this.npairs = 0
- this.maxHeaderPairs = getLimit(cfg, 'maxHeaderPairs', 2000)
- this.maxHeaderSize = getLimit(cfg, 'maxHeaderSize', 80 * 1024)
- this.buffer = ''
- this.header = {}
- this.finished = false
- this.ss = new StreamSearch(B_DCRLF)
- this.ss.on('info', function (isMatch, data, start, end) {
- if (data && !self.maxed) {
- if (self.nread + end - start >= self.maxHeaderSize) {
- end = self.maxHeaderSize - self.nread + start
- self.nread = self.maxHeaderSize
- self.maxed = true
- } else { self.nread += (end - start) }
-
- self.buffer += data.toString('binary', start, end)
- }
- if (isMatch) { self._finish() }
- })
-}
-inherits(HeaderParser, EventEmitter)
-
-HeaderParser.prototype.push = function (data) {
- const r = this.ss.push(data)
- if (this.finished) { return r }
-}
-
-HeaderParser.prototype.reset = function () {
- this.finished = false
- this.buffer = ''
- this.header = {}
- this.ss.reset()
-}
-
-HeaderParser.prototype._finish = function () {
- if (this.buffer) { this._parseHeader() }
- this.ss.matches = this.ss.maxMatches
- const header = this.header
- this.header = {}
- this.buffer = ''
- this.finished = true
- this.nread = this.npairs = 0
- this.maxed = false
- this.emit('header', header)
-}
-
-HeaderParser.prototype._parseHeader = function () {
- if (this.npairs === this.maxHeaderPairs) { return }
-
- const lines = this.buffer.split(RE_CRLF)
- const len = lines.length
- let m, h
-
- for (var i = 0; i < len; ++i) { // eslint-disable-line no-var
- if (lines[i].length === 0) { continue }
- if (lines[i][0] === '\t' || lines[i][0] === ' ') {
- // folded header content
- // RFC2822 says to just remove the CRLF and not the whitespace following
- // it, so we follow the RFC and include the leading whitespace ...
- if (h) {
- this.header[h][this.header[h].length - 1] += lines[i]
- continue
- }
+/*
+ * Copyright The OpenTelemetry Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.DiagAPI = void 0;
+const ComponentLogger_1 = __nccwpck_require__(7978);
+const logLevelLogger_1 = __nccwpck_require__(9639);
+const types_1 = __nccwpck_require__(8077);
+const global_utils_1 = __nccwpck_require__(5135);
+const API_NAME = 'diag';
+/**
+ * Singleton object which represents the entry point to the OpenTelemetry internal
+ * diagnostic API
+ */
+class DiagAPI {
+ /**
+ * Private internal constructor
+ * @private
+ */
+ constructor() {
+ function _logProxy(funcName) {
+ return function (...args) {
+ const logger = (0, global_utils_1.getGlobal)('diag');
+ // shortcut if logger not set
+ if (!logger)
+ return;
+ return logger[funcName](...args);
+ };
+ }
+ // Using self local variable for minification purposes as 'this' cannot be minified
+ const self = this;
+ // DiagAPI specific functions
+ const setLogger = (logger, optionsOrLogLevel = { logLevel: types_1.DiagLogLevel.INFO }) => {
+ var _a, _b, _c;
+ if (logger === self) {
+ // There isn't much we can do here.
+ // Logging to the console might break the user application.
+ // Try to log to self. If a logger was previously registered it will receive the log.
+ const err = new Error('Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation');
+ self.error((_a = err.stack) !== null && _a !== void 0 ? _a : err.message);
+ return false;
+ }
+ if (typeof optionsOrLogLevel === 'number') {
+ optionsOrLogLevel = {
+ logLevel: optionsOrLogLevel,
+ };
+ }
+ const oldLogger = (0, global_utils_1.getGlobal)('diag');
+ const newLogger = (0, logLevelLogger_1.createLogLevelDiagLogger)((_b = optionsOrLogLevel.logLevel) !== null && _b !== void 0 ? _b : types_1.DiagLogLevel.INFO, logger);
+ // There already is an logger registered. We'll let it know before overwriting it.
+ if (oldLogger && !optionsOrLogLevel.suppressOverrideMessage) {
+ const stack = (_c = new Error().stack) !== null && _c !== void 0 ? _c : '';
+ oldLogger.warn(`Current logger will be overwritten from ${stack}`);
+ newLogger.warn(`Current logger will overwrite one already registered from ${stack}`);
+ }
+ return (0, global_utils_1.registerGlobal)('diag', newLogger, self, true);
+ };
+ self.setLogger = setLogger;
+ self.disable = () => {
+ (0, global_utils_1.unregisterGlobal)(API_NAME, self);
+ };
+ self.createComponentLogger = (options) => {
+ return new ComponentLogger_1.DiagComponentLogger(options);
+ };
+ self.verbose = _logProxy('verbose');
+ self.debug = _logProxy('debug');
+ self.info = _logProxy('info');
+ self.warn = _logProxy('warn');
+ self.error = _logProxy('error');
}
-
- const posColon = lines[i].indexOf(':')
- if (
- posColon === -1 ||
- posColon === 0
- ) {
- return
+ /** Get the singleton instance of the DiagAPI API */
+ static instance() {
+ if (!this._instance) {
+ this._instance = new DiagAPI();
+ }
+ return this._instance;
}
- m = RE_HDR.exec(lines[i])
- h = m[1].toLowerCase()
- this.header[h] = this.header[h] || []
- this.header[h].push((m[2] || ''))
- if (++this.npairs === this.maxHeaderPairs) { break }
- }
-}
-
-module.exports = HeaderParser
-
-
-/***/ }),
-
-/***/ 8710:
-/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
-
-"use strict";
-
-
-const inherits = (__nccwpck_require__(7261).inherits)
-const ReadableStream = (__nccwpck_require__(4492).Readable)
-
-function PartStream (opts) {
- ReadableStream.call(this, opts)
}
-inherits(PartStream, ReadableStream)
-
-PartStream.prototype._read = function (n) {}
-
-module.exports = PartStream
-
+exports.DiagAPI = DiagAPI;
+//# sourceMappingURL=diag.js.map
/***/ }),
-/***/ 8534:
-/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
+/***/ 7696:
+/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
-
-/**
- * Copyright Brian White. All rights reserved.
- *
- * @see https://github.com/mscdex/streamsearch
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
+/*
+ * Copyright The OpenTelemetry Authors
*
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
+ * https://www.apache.org/licenses/LICENSE-2.0
*
- * Based heavily on the Streaming Boyer-Moore-Horspool C++ implementation
- * by Hongli Lai at: https://github.com/FooBarWidget/boyer-moore-horspool
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
-const EventEmitter = (__nccwpck_require__(5673).EventEmitter)
-const inherits = (__nccwpck_require__(7261).inherits)
-
-function SBMH (needle) {
- if (typeof needle === 'string') {
- needle = Buffer.from(needle)
- }
-
- if (!Buffer.isBuffer(needle)) {
- throw new TypeError('The needle has to be a String or a Buffer.')
- }
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.MetricsAPI = void 0;
+const NoopMeterProvider_1 = __nccwpck_require__(2647);
+const global_utils_1 = __nccwpck_require__(5135);
+const diag_1 = __nccwpck_require__(1877);
+const API_NAME = 'metrics';
+/**
+ * Singleton object which represents the entry point to the OpenTelemetry Metrics API
+ */
+class MetricsAPI {
+ /** Empty private constructor prevents end users from constructing a new instance of the API */
+ constructor() { }
+ /** Get the singleton instance of the Metrics API */
+ static getInstance() {
+ if (!this._instance) {
+ this._instance = new MetricsAPI();
+ }
+ return this._instance;
+ }
+ /**
+ * Set the current global meter provider.
+ * Returns true if the meter provider was successfully registered, else false.
+ */
+ setGlobalMeterProvider(provider) {
+ return (0, global_utils_1.registerGlobal)(API_NAME, provider, diag_1.DiagAPI.instance());
+ }
+ /**
+ * Returns the global meter provider.
+ */
+ getMeterProvider() {
+ return (0, global_utils_1.getGlobal)(API_NAME) || NoopMeterProvider_1.NOOP_METER_PROVIDER;
+ }
+ /**
+ * Returns a meter from the global meter provider.
+ */
+ getMeter(name, version, options) {
+ return this.getMeterProvider().getMeter(name, version, options);
+ }
+ /** Remove the global meter provider */
+ disable() {
+ (0, global_utils_1.unregisterGlobal)(API_NAME, diag_1.DiagAPI.instance());
+ }
+}
+exports.MetricsAPI = MetricsAPI;
+//# sourceMappingURL=metrics.js.map
- const needleLength = needle.length
+/***/ }),
- if (needleLength === 0) {
- throw new Error('The needle cannot be an empty String/Buffer.')
- }
+/***/ 9909:
+/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
- if (needleLength > 256) {
- throw new Error('The needle cannot have a length bigger than 256.')
- }
+"use strict";
- this.maxMatches = Infinity
- this.matches = 0
+/*
+ * Copyright The OpenTelemetry Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.PropagationAPI = void 0;
+const global_utils_1 = __nccwpck_require__(5135);
+const NoopTextMapPropagator_1 = __nccwpck_require__(2368);
+const TextMapPropagator_1 = __nccwpck_require__(865);
+const context_helpers_1 = __nccwpck_require__(7682);
+const utils_1 = __nccwpck_require__(8136);
+const diag_1 = __nccwpck_require__(1877);
+const API_NAME = 'propagation';
+const NOOP_TEXT_MAP_PROPAGATOR = new NoopTextMapPropagator_1.NoopTextMapPropagator();
+/**
+ * Singleton object which represents the entry point to the OpenTelemetry Propagation API
+ */
+class PropagationAPI {
+ /** Empty private constructor prevents end users from constructing a new instance of the API */
+ constructor() {
+ this.createBaggage = utils_1.createBaggage;
+ this.getBaggage = context_helpers_1.getBaggage;
+ this.getActiveBaggage = context_helpers_1.getActiveBaggage;
+ this.setBaggage = context_helpers_1.setBaggage;
+ this.deleteBaggage = context_helpers_1.deleteBaggage;
+ }
+ /** Get the singleton instance of the Propagator API */
+ static getInstance() {
+ if (!this._instance) {
+ this._instance = new PropagationAPI();
+ }
+ return this._instance;
+ }
+ /**
+ * Set the current propagator.
+ *
+ * @returns true if the propagator was successfully registered, else false
+ */
+ setGlobalPropagator(propagator) {
+ return (0, global_utils_1.registerGlobal)(API_NAME, propagator, diag_1.DiagAPI.instance());
+ }
+ /**
+ * Inject context into a carrier to be propagated inter-process
+ *
+ * @param context Context carrying tracing data to inject
+ * @param carrier carrier to inject context into
+ * @param setter Function used to set values on the carrier
+ */
+ inject(context, carrier, setter = TextMapPropagator_1.defaultTextMapSetter) {
+ return this._getGlobalPropagator().inject(context, carrier, setter);
+ }
+ /**
+ * Extract context from a carrier
+ *
+ * @param context Context which the newly created context will inherit from
+ * @param carrier Carrier to extract context from
+ * @param getter Function used to extract keys from a carrier
+ */
+ extract(context, carrier, getter = TextMapPropagator_1.defaultTextMapGetter) {
+ return this._getGlobalPropagator().extract(context, carrier, getter);
+ }
+ /**
+ * Return a list of all fields which may be used by the propagator.
+ */
+ fields() {
+ return this._getGlobalPropagator().fields();
+ }
+ /** Remove the global propagator */
+ disable() {
+ (0, global_utils_1.unregisterGlobal)(API_NAME, diag_1.DiagAPI.instance());
+ }
+ _getGlobalPropagator() {
+ return (0, global_utils_1.getGlobal)(API_NAME) || NOOP_TEXT_MAP_PROPAGATOR;
+ }
+}
+exports.PropagationAPI = PropagationAPI;
+//# sourceMappingURL=propagation.js.map
- this._occ = new Array(256)
- .fill(needleLength) // Initialize occurrence table.
- this._lookbehind_size = 0
- this._needle = needle
- this._bufpos = 0
+/***/ }),
- this._lookbehind = Buffer.alloc(needleLength)
+/***/ 1539:
+/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
- // Populate occurrence table with analysis of the needle,
- // ignoring last letter.
- for (var i = 0; i < needleLength - 1; ++i) { // eslint-disable-line no-var
- this._occ[needle[i]] = needleLength - 1 - i
- }
-}
-inherits(SBMH, EventEmitter)
+"use strict";
-SBMH.prototype.reset = function () {
- this._lookbehind_size = 0
- this.matches = 0
- this._bufpos = 0
+/*
+ * Copyright The OpenTelemetry Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.TraceAPI = void 0;
+const global_utils_1 = __nccwpck_require__(5135);
+const ProxyTracerProvider_1 = __nccwpck_require__(2285);
+const spancontext_utils_1 = __nccwpck_require__(9745);
+const context_utils_1 = __nccwpck_require__(3326);
+const diag_1 = __nccwpck_require__(1877);
+const API_NAME = 'trace';
+/**
+ * Singleton object which represents the entry point to the OpenTelemetry Tracing API
+ */
+class TraceAPI {
+ /** Empty private constructor prevents end users from constructing a new instance of the API */
+ constructor() {
+ this._proxyTracerProvider = new ProxyTracerProvider_1.ProxyTracerProvider();
+ this.wrapSpanContext = spancontext_utils_1.wrapSpanContext;
+ this.isSpanContextValid = spancontext_utils_1.isSpanContextValid;
+ this.deleteSpan = context_utils_1.deleteSpan;
+ this.getSpan = context_utils_1.getSpan;
+ this.getActiveSpan = context_utils_1.getActiveSpan;
+ this.getSpanContext = context_utils_1.getSpanContext;
+ this.setSpan = context_utils_1.setSpan;
+ this.setSpanContext = context_utils_1.setSpanContext;
+ }
+ /** Get the singleton instance of the Trace API */
+ static getInstance() {
+ if (!this._instance) {
+ this._instance = new TraceAPI();
+ }
+ return this._instance;
+ }
+ /**
+ * Set the current global tracer.
+ *
+ * @returns true if the tracer provider was successfully registered, else false
+ */
+ setGlobalTracerProvider(provider) {
+ const success = (0, global_utils_1.registerGlobal)(API_NAME, this._proxyTracerProvider, diag_1.DiagAPI.instance());
+ if (success) {
+ this._proxyTracerProvider.setDelegate(provider);
+ }
+ return success;
+ }
+ /**
+ * Returns the global tracer provider.
+ */
+ getTracerProvider() {
+ return (0, global_utils_1.getGlobal)(API_NAME) || this._proxyTracerProvider;
+ }
+ /**
+ * Returns a tracer from the global tracer provider.
+ */
+ getTracer(name, version) {
+ return this.getTracerProvider().getTracer(name, version);
+ }
+ /** Remove the global tracer provider */
+ disable() {
+ (0, global_utils_1.unregisterGlobal)(API_NAME, diag_1.DiagAPI.instance());
+ this._proxyTracerProvider = new ProxyTracerProvider_1.ProxyTracerProvider();
+ }
}
+exports.TraceAPI = TraceAPI;
+//# sourceMappingURL=trace.js.map
-SBMH.prototype.push = function (chunk, pos) {
- if (!Buffer.isBuffer(chunk)) {
- chunk = Buffer.from(chunk, 'binary')
- }
- const chlen = chunk.length
- this._bufpos = pos || 0
- let r
- while (r !== chlen && this.matches < this.maxMatches) { r = this._sbmh_feed(chunk) }
- return r
-}
+/***/ }),
-SBMH.prototype._sbmh_feed = function (data) {
- const len = data.length
- const needle = this._needle
- const needleLength = needle.length
- const lastNeedleChar = needle[needleLength - 1]
+/***/ 7682:
+/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
- // Positive: points to a position in `data`
- // pos == 3 points to data[3]
- // Negative: points to a position in the lookbehind buffer
- // pos == -2 points to lookbehind[lookbehind_size - 2]
- let pos = -this._lookbehind_size
- let ch
+"use strict";
- if (pos < 0) {
- // Lookbehind buffer is not empty. Perform Boyer-Moore-Horspool
- // search with character lookup code that considers both the
- // lookbehind buffer and the current round's haystack data.
- //
- // Loop until
- // there is a match.
- // or until
- // we've moved past the position that requires the
- // lookbehind buffer. In this case we switch to the
- // optimized loop.
- // or until
- // the character to look at lies outside the haystack.
- while (pos < 0 && pos <= len - needleLength) {
- ch = this._sbmh_lookup_char(data, pos + needleLength - 1)
+/*
+ * Copyright The OpenTelemetry Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.deleteBaggage = exports.setBaggage = exports.getActiveBaggage = exports.getBaggage = void 0;
+const context_1 = __nccwpck_require__(7171);
+const context_2 = __nccwpck_require__(8242);
+/**
+ * Baggage key
+ */
+const BAGGAGE_KEY = (0, context_2.createContextKey)('OpenTelemetry Baggage Key');
+/**
+ * Retrieve the current baggage from the given context
+ *
+ * @param {Context} Context that manage all context values
+ * @returns {Baggage} Extracted baggage from the context
+ */
+function getBaggage(context) {
+ return context.getValue(BAGGAGE_KEY) || undefined;
+}
+exports.getBaggage = getBaggage;
+/**
+ * Retrieve the current baggage from the active/current context
+ *
+ * @returns {Baggage} Extracted baggage from the context
+ */
+function getActiveBaggage() {
+ return getBaggage(context_1.ContextAPI.getInstance().active());
+}
+exports.getActiveBaggage = getActiveBaggage;
+/**
+ * Store a baggage in the given context
+ *
+ * @param {Context} Context that manage all context values
+ * @param {Baggage} baggage that will be set in the actual context
+ */
+function setBaggage(context, baggage) {
+ return context.setValue(BAGGAGE_KEY, baggage);
+}
+exports.setBaggage = setBaggage;
+/**
+ * Delete the baggage stored in the given context
+ *
+ * @param {Context} Context that manage all context values
+ */
+function deleteBaggage(context) {
+ return context.deleteValue(BAGGAGE_KEY);
+}
+exports.deleteBaggage = deleteBaggage;
+//# sourceMappingURL=context-helpers.js.map
- if (
- ch === lastNeedleChar &&
- this._sbmh_memcmp(data, pos, needleLength - 1)
- ) {
- this._lookbehind_size = 0
- ++this.matches
- this.emit('info', true)
+/***/ }),
- return (this._bufpos = pos + needleLength)
- }
- pos += this._occ[ch]
- }
+/***/ 4811:
+/***/ ((__unused_webpack_module, exports) => {
- // No match.
+"use strict";
- if (pos < 0) {
- // There's too few data for Boyer-Moore-Horspool to run,
- // so let's use a different algorithm to skip as much as
- // we can.
- // Forward pos until
- // the trailing part of lookbehind + data
- // looks like the beginning of the needle
- // or until
- // pos == 0
- while (pos < 0 && !this._sbmh_memcmp(data, pos, len - pos)) { ++pos }
+/*
+ * Copyright The OpenTelemetry Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.BaggageImpl = void 0;
+class BaggageImpl {
+ constructor(entries) {
+ this._entries = entries ? new Map(entries) : new Map();
+ }
+ getEntry(key) {
+ const entry = this._entries.get(key);
+ if (!entry) {
+ return undefined;
+ }
+ return Object.assign({}, entry);
+ }
+ getAllEntries() {
+ return Array.from(this._entries.entries()).map(([k, v]) => [k, v]);
+ }
+ setEntry(key, entry) {
+ const newBaggage = new BaggageImpl(this._entries);
+ newBaggage._entries.set(key, entry);
+ return newBaggage;
+ }
+ removeEntry(key) {
+ const newBaggage = new BaggageImpl(this._entries);
+ newBaggage._entries.delete(key);
+ return newBaggage;
+ }
+ removeEntries(...keys) {
+ const newBaggage = new BaggageImpl(this._entries);
+ for (const key of keys) {
+ newBaggage._entries.delete(key);
+ }
+ return newBaggage;
+ }
+ clear() {
+ return new BaggageImpl();
}
+}
+exports.BaggageImpl = BaggageImpl;
+//# sourceMappingURL=baggage-impl.js.map
- if (pos >= 0) {
- // Discard lookbehind buffer.
- this.emit('info', false, this._lookbehind, 0, this._lookbehind_size)
- this._lookbehind_size = 0
- } else {
- // Cut off part of the lookbehind buffer that has
- // been processed and append the entire haystack
- // into it.
- const bytesToCutOff = this._lookbehind_size + pos
- if (bytesToCutOff > 0) {
- // The cut off data is guaranteed not to contain the needle.
- this.emit('info', false, this._lookbehind, 0, bytesToCutOff)
- }
+/***/ }),
- this._lookbehind.copy(this._lookbehind, 0, bytesToCutOff,
- this._lookbehind_size - bytesToCutOff)
- this._lookbehind_size -= bytesToCutOff
+/***/ 3542:
+/***/ ((__unused_webpack_module, exports) => {
- data.copy(this._lookbehind, this._lookbehind_size)
- this._lookbehind_size += len
+"use strict";
- this._bufpos = len
- return len
- }
- }
+/*
+ * Copyright The OpenTelemetry Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.baggageEntryMetadataSymbol = void 0;
+/**
+ * Symbol used to make BaggageEntryMetadata an opaque type
+ */
+exports.baggageEntryMetadataSymbol = Symbol('BaggageEntryMetadata');
+//# sourceMappingURL=symbol.js.map
- pos += (pos >= 0) * this._bufpos
+/***/ }),
- // Lookbehind buffer is now empty. We only need to check if the
- // needle is in the haystack.
- if (data.indexOf(needle, pos) !== -1) {
- pos = data.indexOf(needle, pos)
- ++this.matches
- if (pos > 0) { this.emit('info', true, data, this._bufpos, pos) } else { this.emit('info', true) }
+/***/ 8136:
+/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
- return (this._bufpos = pos + needleLength)
- } else {
- pos = len - needleLength
- }
+"use strict";
- // There was no match. If there's trailing haystack data that we cannot
- // match yet using the Boyer-Moore-Horspool algorithm (because the trailing
- // data is less than the needle size) then match using a modified
- // algorithm that starts matching from the beginning instead of the end.
- // Whatever trailing data is left after running this algorithm is added to
- // the lookbehind buffer.
- while (
- pos < len &&
- (
- data[pos] !== needle[0] ||
- (
- (Buffer.compare(
- data.subarray(pos, pos + len - pos),
- needle.subarray(0, len - pos)
- ) !== 0)
- )
- )
- ) {
- ++pos
- }
- if (pos < len) {
- data.copy(this._lookbehind, 0, pos, pos + (len - pos))
- this._lookbehind_size = len - pos
- }
-
- // Everything until pos is guaranteed not to contain needle data.
- if (pos > 0) { this.emit('info', false, data, this._bufpos, pos < len ? pos : len) }
-
- this._bufpos = len
- return len
-}
-
-SBMH.prototype._sbmh_lookup_char = function (data, pos) {
- return (pos < 0)
- ? this._lookbehind[this._lookbehind_size + pos]
- : data[pos]
+/*
+ * Copyright The OpenTelemetry Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.baggageEntryMetadataFromString = exports.createBaggage = void 0;
+const diag_1 = __nccwpck_require__(1877);
+const baggage_impl_1 = __nccwpck_require__(4811);
+const symbol_1 = __nccwpck_require__(3542);
+const diag = diag_1.DiagAPI.instance();
+/**
+ * Create a new Baggage with optional entries
+ *
+ * @param entries An array of baggage entries the new baggage should contain
+ */
+function createBaggage(entries = {}) {
+ return new baggage_impl_1.BaggageImpl(new Map(Object.entries(entries)));
}
-
-SBMH.prototype._sbmh_memcmp = function (data, pos, len) {
- for (var i = 0; i < len; ++i) { // eslint-disable-line no-var
- if (this._sbmh_lookup_char(data, pos + i) !== this._needle[i]) { return false }
- }
- return true
+exports.createBaggage = createBaggage;
+/**
+ * Create a serializable BaggageEntryMetadata object from a string.
+ *
+ * @param str string metadata. Format is currently not defined by the spec and has no special meaning.
+ *
+ */
+function baggageEntryMetadataFromString(str) {
+ if (typeof str !== 'string') {
+ diag.error(`Cannot create baggage metadata from unknown type: ${typeof str}`);
+ str = '';
+ }
+ return {
+ __TYPE__: symbol_1.baggageEntryMetadataSymbol,
+ toString() {
+ return str;
+ },
+ };
}
-
-module.exports = SBMH
-
+exports.baggageEntryMetadataFromString = baggageEntryMetadataFromString;
+//# sourceMappingURL=utils.js.map
/***/ }),
-/***/ 3438:
-/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
+/***/ 7393:
+/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
+/*
+ * Copyright The OpenTelemetry Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.context = void 0;
+// Split module-level variable definition into separate files to allow
+// tree-shaking on each api instance.
+const context_1 = __nccwpck_require__(7171);
+/** Entrypoint for context API */
+exports.context = context_1.ContextAPI.getInstance();
+//# sourceMappingURL=context-api.js.map
-const WritableStream = (__nccwpck_require__(4492).Writable)
-const { inherits } = __nccwpck_require__(7261)
-const Dicer = __nccwpck_require__(2856)
-
-const MultipartParser = __nccwpck_require__(415)
-const UrlencodedParser = __nccwpck_require__(6780)
-const parseParams = __nccwpck_require__(4426)
-
-function Busboy (opts) {
- if (!(this instanceof Busboy)) { return new Busboy(opts) }
-
- if (typeof opts !== 'object') {
- throw new TypeError('Busboy expected an options-Object.')
- }
- if (typeof opts.headers !== 'object') {
- throw new TypeError('Busboy expected an options-Object with headers-attribute.')
- }
- if (typeof opts.headers['content-type'] !== 'string') {
- throw new TypeError('Missing Content-Type-header.')
- }
-
- const {
- headers,
- ...streamOptions
- } = opts
+/***/ }),
- this.opts = {
- autoDestroy: false,
- ...streamOptions
- }
- WritableStream.call(this, this.opts)
+/***/ 4118:
+/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
- this._done = false
- this._parser = this.getParserByHeaders(headers)
- this._finished = false
-}
-inherits(Busboy, WritableStream)
+"use strict";
-Busboy.prototype.emit = function (ev) {
- if (ev === 'finish') {
- if (!this._done) {
- this._parser?.end()
- return
- } else if (this._finished) {
- return
+/*
+ * Copyright The OpenTelemetry Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.NoopContextManager = void 0;
+const context_1 = __nccwpck_require__(8242);
+class NoopContextManager {
+ active() {
+ return context_1.ROOT_CONTEXT;
+ }
+ with(_context, fn, thisArg, ...args) {
+ return fn.call(thisArg, ...args);
+ }
+ bind(_context, target) {
+ return target;
+ }
+ enable() {
+ return this;
+ }
+ disable() {
+ return this;
}
- this._finished = true
- }
- WritableStream.prototype.emit.apply(this, arguments)
}
+exports.NoopContextManager = NoopContextManager;
+//# sourceMappingURL=NoopContextManager.js.map
-Busboy.prototype.getParserByHeaders = function (headers) {
- const parsed = parseParams(headers['content-type'])
+/***/ }),
- const cfg = {
- defCharset: this.opts.defCharset,
- fileHwm: this.opts.fileHwm,
- headers,
- highWaterMark: this.opts.highWaterMark,
- isPartAFile: this.opts.isPartAFile,
- limits: this.opts.limits,
- parsedConType: parsed,
- preservePath: this.opts.preservePath
- }
+/***/ 8242:
+/***/ ((__unused_webpack_module, exports) => {
- if (MultipartParser.detect.test(parsed[0])) {
- return new MultipartParser(this, cfg)
- }
- if (UrlencodedParser.detect.test(parsed[0])) {
- return new UrlencodedParser(this, cfg)
- }
- throw new Error('Unsupported Content-Type.')
-}
+"use strict";
-Busboy.prototype._write = function (chunk, encoding, cb) {
- this._parser.write(chunk, cb)
+/*
+ * Copyright The OpenTelemetry Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.ROOT_CONTEXT = exports.createContextKey = void 0;
+/** Get a key to uniquely identify a context value */
+function createContextKey(description) {
+ // The specification states that for the same input, multiple calls should
+ // return different keys. Due to the nature of the JS dependency management
+ // system, this creates problems where multiple versions of some package
+ // could hold different keys for the same property.
+ //
+ // Therefore, we use Symbol.for which returns the same key for the same input.
+ return Symbol.for(description);
+}
+exports.createContextKey = createContextKey;
+class BaseContext {
+ /**
+ * Construct a new context which inherits values from an optional parent context.
+ *
+ * @param parentContext a context from which to inherit values
+ */
+ constructor(parentContext) {
+ // for minification
+ const self = this;
+ self._currentContext = parentContext ? new Map(parentContext) : new Map();
+ self.getValue = (key) => self._currentContext.get(key);
+ self.setValue = (key, value) => {
+ const context = new BaseContext(self._currentContext);
+ context._currentContext.set(key, value);
+ return context;
+ };
+ self.deleteValue = (key) => {
+ const context = new BaseContext(self._currentContext);
+ context._currentContext.delete(key);
+ return context;
+ };
+ }
}
+/** The root context is used as the default parent context when there is no active context */
+exports.ROOT_CONTEXT = new BaseContext();
+//# sourceMappingURL=context.js.map
-module.exports = Busboy
-module.exports["default"] = Busboy
-module.exports.Busboy = Busboy
+/***/ }),
-module.exports.Dicer = Dicer
+/***/ 9721:
+/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
+"use strict";
+
+/*
+ * Copyright The OpenTelemetry Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.diag = void 0;
+// Split module-level variable definition into separate files to allow
+// tree-shaking on each api instance.
+const diag_1 = __nccwpck_require__(1877);
+/**
+ * Entrypoint for Diag API.
+ * Defines Diagnostic handler used for internal diagnostic logging operations.
+ * The default provides a Noop DiagLogger implementation which may be changed via the
+ * diag.setLogger(logger: DiagLogger) function.
+ */
+exports.diag = diag_1.DiagAPI.instance();
+//# sourceMappingURL=diag-api.js.map
/***/ }),
-/***/ 415:
-/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
+/***/ 7978:
+/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
+/*
+ * Copyright The OpenTelemetry Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.DiagComponentLogger = void 0;
+const global_utils_1 = __nccwpck_require__(5135);
+/**
+ * Component Logger which is meant to be used as part of any component which
+ * will add automatically additional namespace in front of the log message.
+ * It will then forward all message to global diag logger
+ * @example
+ * const cLogger = diag.createComponentLogger({ namespace: '@opentelemetry/instrumentation-http' });
+ * cLogger.debug('test');
+ * // @opentelemetry/instrumentation-http test
+ */
+class DiagComponentLogger {
+ constructor(props) {
+ this._namespace = props.namespace || 'DiagComponentLogger';
+ }
+ debug(...args) {
+ return logProxy('debug', this._namespace, args);
+ }
+ error(...args) {
+ return logProxy('error', this._namespace, args);
+ }
+ info(...args) {
+ return logProxy('info', this._namespace, args);
+ }
+ warn(...args) {
+ return logProxy('warn', this._namespace, args);
+ }
+ verbose(...args) {
+ return logProxy('verbose', this._namespace, args);
+ }
+}
+exports.DiagComponentLogger = DiagComponentLogger;
+function logProxy(funcName, namespace, args) {
+ const logger = (0, global_utils_1.getGlobal)('diag');
+ // shortcut if logger not set
+ if (!logger) {
+ return;
+ }
+ args.unshift(namespace);
+ return logger[funcName](...args);
+}
+//# sourceMappingURL=ComponentLogger.js.map
+
+/***/ }),
-// TODO:
-// * support 1 nested multipart level
-// (see second multipart example here:
-// http://www.w3.org/TR/html401/interact/forms.html#didx-multipartform-data)
-// * support limits.fieldNameSize
-// -- this will require modifications to utils.parseParams
+/***/ 3041:
+/***/ ((__unused_webpack_module, exports) => {
-const { Readable } = __nccwpck_require__(4492)
-const { inherits } = __nccwpck_require__(7261)
+"use strict";
-const Dicer = __nccwpck_require__(2856)
+/*
+ * Copyright The OpenTelemetry Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.DiagConsoleLogger = void 0;
+const consoleMap = [
+ { n: 'error', c: 'error' },
+ { n: 'warn', c: 'warn' },
+ { n: 'info', c: 'info' },
+ { n: 'debug', c: 'debug' },
+ { n: 'verbose', c: 'trace' },
+];
+/**
+ * A simple Immutable Console based diagnostic logger which will output any messages to the Console.
+ * If you want to limit the amount of logging to a specific level or lower use the
+ * {@link createLogLevelDiagLogger}
+ */
+class DiagConsoleLogger {
+ constructor() {
+ function _consoleFunc(funcName) {
+ return function (...args) {
+ if (console) {
+ // Some environments only expose the console when the F12 developer console is open
+ // eslint-disable-next-line no-console
+ let theFunc = console[funcName];
+ if (typeof theFunc !== 'function') {
+ // Not all environments support all functions
+ // eslint-disable-next-line no-console
+ theFunc = console.log;
+ }
+ // One last final check
+ if (typeof theFunc === 'function') {
+ return theFunc.apply(console, args);
+ }
+ }
+ };
+ }
+ for (let i = 0; i < consoleMap.length; i++) {
+ this[consoleMap[i].n] = _consoleFunc(consoleMap[i].c);
+ }
+ }
+}
+exports.DiagConsoleLogger = DiagConsoleLogger;
+//# sourceMappingURL=consoleLogger.js.map
-const parseParams = __nccwpck_require__(4426)
-const decodeText = __nccwpck_require__(9136)
-const basename = __nccwpck_require__(496)
-const getLimit = __nccwpck_require__(9692)
+/***/ }),
-const RE_BOUNDARY = /^boundary$/i
-const RE_FIELD = /^form-data$/i
-const RE_CHARSET = /^charset$/i
-const RE_FILENAME = /^filename$/i
-const RE_NAME = /^name$/i
+/***/ 9639:
+/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
-Multipart.detect = /^multipart\/form-data/i
-function Multipart (boy, cfg) {
- let i
- let len
- const self = this
- let boundary
- const limits = cfg.limits
- const isPartAFile = cfg.isPartAFile || ((fieldName, contentType, fileName) => (contentType === 'application/octet-stream' || fileName !== undefined))
- const parsedConType = cfg.parsedConType || []
- const defCharset = cfg.defCharset || 'utf8'
- const preservePath = cfg.preservePath
- const fileOpts = { highWaterMark: cfg.fileHwm }
+"use strict";
- for (i = 0, len = parsedConType.length; i < len; ++i) {
- if (Array.isArray(parsedConType[i]) &&
- RE_BOUNDARY.test(parsedConType[i][0])) {
- boundary = parsedConType[i][1]
- break
+/*
+ * Copyright The OpenTelemetry Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.createLogLevelDiagLogger = void 0;
+const types_1 = __nccwpck_require__(8077);
+function createLogLevelDiagLogger(maxLevel, logger) {
+ if (maxLevel < types_1.DiagLogLevel.NONE) {
+ maxLevel = types_1.DiagLogLevel.NONE;
}
- }
-
- function checkFinished () {
- if (nends === 0 && finished && !boy._done) {
- finished = false
- self.end()
+ else if (maxLevel > types_1.DiagLogLevel.ALL) {
+ maxLevel = types_1.DiagLogLevel.ALL;
}
- }
+ // In case the logger is null or undefined
+ logger = logger || {};
+ function _filterFunc(funcName, theLevel) {
+ const theFunc = logger[funcName];
+ if (typeof theFunc === 'function' && maxLevel >= theLevel) {
+ return theFunc.bind(logger);
+ }
+ return function () { };
+ }
+ return {
+ error: _filterFunc('error', types_1.DiagLogLevel.ERROR),
+ warn: _filterFunc('warn', types_1.DiagLogLevel.WARN),
+ info: _filterFunc('info', types_1.DiagLogLevel.INFO),
+ debug: _filterFunc('debug', types_1.DiagLogLevel.DEBUG),
+ verbose: _filterFunc('verbose', types_1.DiagLogLevel.VERBOSE),
+ };
+}
+exports.createLogLevelDiagLogger = createLogLevelDiagLogger;
+//# sourceMappingURL=logLevelLogger.js.map
- if (typeof boundary !== 'string') { throw new Error('Multipart: Boundary not found') }
+/***/ }),
- const fieldSizeLimit = getLimit(limits, 'fieldSize', 1 * 1024 * 1024)
- const fileSizeLimit = getLimit(limits, 'fileSize', Infinity)
- const filesLimit = getLimit(limits, 'files', Infinity)
- const fieldsLimit = getLimit(limits, 'fields', Infinity)
- const partsLimit = getLimit(limits, 'parts', Infinity)
- const headerPairsLimit = getLimit(limits, 'headerPairs', 2000)
- const headerSizeLimit = getLimit(limits, 'headerSize', 80 * 1024)
+/***/ 8077:
+/***/ ((__unused_webpack_module, exports) => {
- let nfiles = 0
- let nfields = 0
- let nends = 0
- let curFile
- let curField
- let finished = false
+"use strict";
- this._needDrain = false
- this._pause = false
- this._cb = undefined
- this._nparts = 0
- this._boy = boy
+/*
+ * Copyright The OpenTelemetry Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.DiagLogLevel = void 0;
+/**
+ * Defines the available internal logging levels for the diagnostic logger, the numeric values
+ * of the levels are defined to match the original values from the initial LogLevel to avoid
+ * compatibility/migration issues for any implementation that assume the numeric ordering.
+ */
+var DiagLogLevel;
+(function (DiagLogLevel) {
+ /** Diagnostic Logging level setting to disable all logging (except and forced logs) */
+ DiagLogLevel[DiagLogLevel["NONE"] = 0] = "NONE";
+ /** Identifies an error scenario */
+ DiagLogLevel[DiagLogLevel["ERROR"] = 30] = "ERROR";
+ /** Identifies a warning scenario */
+ DiagLogLevel[DiagLogLevel["WARN"] = 50] = "WARN";
+ /** General informational log message */
+ DiagLogLevel[DiagLogLevel["INFO"] = 60] = "INFO";
+ /** General debug log message */
+ DiagLogLevel[DiagLogLevel["DEBUG"] = 70] = "DEBUG";
+ /**
+ * Detailed trace level logging should only be used for development, should only be set
+ * in a development environment.
+ */
+ DiagLogLevel[DiagLogLevel["VERBOSE"] = 80] = "VERBOSE";
+ /** Used to set the logging level to include all logging */
+ DiagLogLevel[DiagLogLevel["ALL"] = 9999] = "ALL";
+})(DiagLogLevel = exports.DiagLogLevel || (exports.DiagLogLevel = {}));
+//# sourceMappingURL=types.js.map
- const parserCfg = {
- boundary,
- maxHeaderPairs: headerPairsLimit,
- maxHeaderSize: headerSizeLimit,
- partHwm: fileOpts.highWaterMark,
- highWaterMark: cfg.highWaterMark
- }
+/***/ }),
- this.parser = new Dicer(parserCfg)
- this.parser.on('drain', function () {
- self._needDrain = false
- if (self._cb && !self._pause) {
- const cb = self._cb
- self._cb = undefined
- cb()
- }
- }).on('part', function onPart (part) {
- if (++self._nparts > partsLimit) {
- self.parser.removeListener('part', onPart)
- self.parser.on('part', skipPart)
- boy.hitPartsLimit = true
- boy.emit('partsLimit')
- return skipPart(part)
- }
+/***/ 5163:
+/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
- // hack because streams2 _always_ doesn't emit 'end' until nextTick, so let
- // us emit 'end' early since we know the part has ended if we are already
- // seeing the next part
- if (curField) {
- const field = curField
- field.emit('end')
- field.removeAllListeners('end')
- }
+"use strict";
- part.on('header', function (header) {
- let contype
- let fieldname
- let parsed
- let charset
- let encoding
- let filename
- let nsize = 0
+/*
+ * Copyright The OpenTelemetry Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.trace = exports.propagation = exports.metrics = exports.diag = exports.context = exports.INVALID_SPAN_CONTEXT = exports.INVALID_TRACEID = exports.INVALID_SPANID = exports.isValidSpanId = exports.isValidTraceId = exports.isSpanContextValid = exports.createTraceState = exports.TraceFlags = exports.SpanStatusCode = exports.SpanKind = exports.SamplingDecision = exports.ProxyTracerProvider = exports.ProxyTracer = exports.defaultTextMapSetter = exports.defaultTextMapGetter = exports.ValueType = exports.createNoopMeter = exports.DiagLogLevel = exports.DiagConsoleLogger = exports.ROOT_CONTEXT = exports.createContextKey = exports.baggageEntryMetadataFromString = void 0;
+var utils_1 = __nccwpck_require__(8136);
+Object.defineProperty(exports, "baggageEntryMetadataFromString", ({ enumerable: true, get: function () { return utils_1.baggageEntryMetadataFromString; } }));
+// Context APIs
+var context_1 = __nccwpck_require__(8242);
+Object.defineProperty(exports, "createContextKey", ({ enumerable: true, get: function () { return context_1.createContextKey; } }));
+Object.defineProperty(exports, "ROOT_CONTEXT", ({ enumerable: true, get: function () { return context_1.ROOT_CONTEXT; } }));
+// Diag APIs
+var consoleLogger_1 = __nccwpck_require__(3041);
+Object.defineProperty(exports, "DiagConsoleLogger", ({ enumerable: true, get: function () { return consoleLogger_1.DiagConsoleLogger; } }));
+var types_1 = __nccwpck_require__(8077);
+Object.defineProperty(exports, "DiagLogLevel", ({ enumerable: true, get: function () { return types_1.DiagLogLevel; } }));
+// Metrics APIs
+var NoopMeter_1 = __nccwpck_require__(4837);
+Object.defineProperty(exports, "createNoopMeter", ({ enumerable: true, get: function () { return NoopMeter_1.createNoopMeter; } }));
+var Metric_1 = __nccwpck_require__(9999);
+Object.defineProperty(exports, "ValueType", ({ enumerable: true, get: function () { return Metric_1.ValueType; } }));
+// Propagation APIs
+var TextMapPropagator_1 = __nccwpck_require__(865);
+Object.defineProperty(exports, "defaultTextMapGetter", ({ enumerable: true, get: function () { return TextMapPropagator_1.defaultTextMapGetter; } }));
+Object.defineProperty(exports, "defaultTextMapSetter", ({ enumerable: true, get: function () { return TextMapPropagator_1.defaultTextMapSetter; } }));
+var ProxyTracer_1 = __nccwpck_require__(3503);
+Object.defineProperty(exports, "ProxyTracer", ({ enumerable: true, get: function () { return ProxyTracer_1.ProxyTracer; } }));
+var ProxyTracerProvider_1 = __nccwpck_require__(2285);
+Object.defineProperty(exports, "ProxyTracerProvider", ({ enumerable: true, get: function () { return ProxyTracerProvider_1.ProxyTracerProvider; } }));
+var SamplingResult_1 = __nccwpck_require__(3209);
+Object.defineProperty(exports, "SamplingDecision", ({ enumerable: true, get: function () { return SamplingResult_1.SamplingDecision; } }));
+var span_kind_1 = __nccwpck_require__(1424);
+Object.defineProperty(exports, "SpanKind", ({ enumerable: true, get: function () { return span_kind_1.SpanKind; } }));
+var status_1 = __nccwpck_require__(8845);
+Object.defineProperty(exports, "SpanStatusCode", ({ enumerable: true, get: function () { return status_1.SpanStatusCode; } }));
+var trace_flags_1 = __nccwpck_require__(6905);
+Object.defineProperty(exports, "TraceFlags", ({ enumerable: true, get: function () { return trace_flags_1.TraceFlags; } }));
+var utils_2 = __nccwpck_require__(2615);
+Object.defineProperty(exports, "createTraceState", ({ enumerable: true, get: function () { return utils_2.createTraceState; } }));
+var spancontext_utils_1 = __nccwpck_require__(9745);
+Object.defineProperty(exports, "isSpanContextValid", ({ enumerable: true, get: function () { return spancontext_utils_1.isSpanContextValid; } }));
+Object.defineProperty(exports, "isValidTraceId", ({ enumerable: true, get: function () { return spancontext_utils_1.isValidTraceId; } }));
+Object.defineProperty(exports, "isValidSpanId", ({ enumerable: true, get: function () { return spancontext_utils_1.isValidSpanId; } }));
+var invalid_span_constants_1 = __nccwpck_require__(1760);
+Object.defineProperty(exports, "INVALID_SPANID", ({ enumerable: true, get: function () { return invalid_span_constants_1.INVALID_SPANID; } }));
+Object.defineProperty(exports, "INVALID_TRACEID", ({ enumerable: true, get: function () { return invalid_span_constants_1.INVALID_TRACEID; } }));
+Object.defineProperty(exports, "INVALID_SPAN_CONTEXT", ({ enumerable: true, get: function () { return invalid_span_constants_1.INVALID_SPAN_CONTEXT; } }));
+// Split module-level variable definition into separate files to allow
+// tree-shaking on each api instance.
+const context_api_1 = __nccwpck_require__(7393);
+Object.defineProperty(exports, "context", ({ enumerable: true, get: function () { return context_api_1.context; } }));
+const diag_api_1 = __nccwpck_require__(9721);
+Object.defineProperty(exports, "diag", ({ enumerable: true, get: function () { return diag_api_1.diag; } }));
+const metrics_api_1 = __nccwpck_require__(2601);
+Object.defineProperty(exports, "metrics", ({ enumerable: true, get: function () { return metrics_api_1.metrics; } }));
+const propagation_api_1 = __nccwpck_require__(7591);
+Object.defineProperty(exports, "propagation", ({ enumerable: true, get: function () { return propagation_api_1.propagation; } }));
+const trace_api_1 = __nccwpck_require__(8989);
+Object.defineProperty(exports, "trace", ({ enumerable: true, get: function () { return trace_api_1.trace; } }));
+// Default export.
+exports["default"] = {
+ context: context_api_1.context,
+ diag: diag_api_1.diag,
+ metrics: metrics_api_1.metrics,
+ propagation: propagation_api_1.propagation,
+ trace: trace_api_1.trace,
+};
+//# sourceMappingURL=index.js.map
- if (header['content-type']) {
- parsed = parseParams(header['content-type'][0])
- if (parsed[0]) {
- contype = parsed[0].toLowerCase()
- for (i = 0, len = parsed.length; i < len; ++i) {
- if (RE_CHARSET.test(parsed[i][0])) {
- charset = parsed[i][1].toLowerCase()
- break
- }
- }
- }
- }
+/***/ }),
- if (contype === undefined) { contype = 'text/plain' }
- if (charset === undefined) { charset = defCharset }
+/***/ 5135:
+/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
- if (header['content-disposition']) {
- parsed = parseParams(header['content-disposition'][0])
- if (!RE_FIELD.test(parsed[0])) { return skipPart(part) }
- for (i = 0, len = parsed.length; i < len; ++i) {
- if (RE_NAME.test(parsed[i][0])) {
- fieldname = parsed[i][1]
- } else if (RE_FILENAME.test(parsed[i][0])) {
- filename = parsed[i][1]
- if (!preservePath) { filename = basename(filename) }
- }
- }
- } else { return skipPart(part) }
+"use strict";
- if (header['content-transfer-encoding']) { encoding = header['content-transfer-encoding'][0].toLowerCase() } else { encoding = '7bit' }
+/*
+ * Copyright The OpenTelemetry Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.unregisterGlobal = exports.getGlobal = exports.registerGlobal = void 0;
+const platform_1 = __nccwpck_require__(9957);
+const version_1 = __nccwpck_require__(8996);
+const semver_1 = __nccwpck_require__(1522);
+const major = version_1.VERSION.split('.')[0];
+const GLOBAL_OPENTELEMETRY_API_KEY = Symbol.for(`opentelemetry.js.api.${major}`);
+const _global = platform_1._globalThis;
+function registerGlobal(type, instance, diag, allowOverride = false) {
+ var _a;
+ const api = (_global[GLOBAL_OPENTELEMETRY_API_KEY] = (_a = _global[GLOBAL_OPENTELEMETRY_API_KEY]) !== null && _a !== void 0 ? _a : {
+ version: version_1.VERSION,
+ });
+ if (!allowOverride && api[type]) {
+ // already registered an API of this type
+ const err = new Error(`@opentelemetry/api: Attempted duplicate registration of API: ${type}`);
+ diag.error(err.stack || err.message);
+ return false;
+ }
+ if (api.version !== version_1.VERSION) {
+ // All registered APIs must be of the same version exactly
+ const err = new Error(`@opentelemetry/api: Registration of version v${api.version} for ${type} does not match previously registered API v${version_1.VERSION}`);
+ diag.error(err.stack || err.message);
+ return false;
+ }
+ api[type] = instance;
+ diag.debug(`@opentelemetry/api: Registered a global for ${type} v${version_1.VERSION}.`);
+ return true;
+}
+exports.registerGlobal = registerGlobal;
+function getGlobal(type) {
+ var _a, _b;
+ const globalVersion = (_a = _global[GLOBAL_OPENTELEMETRY_API_KEY]) === null || _a === void 0 ? void 0 : _a.version;
+ if (!globalVersion || !(0, semver_1.isCompatible)(globalVersion)) {
+ return;
+ }
+ return (_b = _global[GLOBAL_OPENTELEMETRY_API_KEY]) === null || _b === void 0 ? void 0 : _b[type];
+}
+exports.getGlobal = getGlobal;
+function unregisterGlobal(type, diag) {
+ diag.debug(`@opentelemetry/api: Unregistering a global for ${type} v${version_1.VERSION}.`);
+ const api = _global[GLOBAL_OPENTELEMETRY_API_KEY];
+ if (api) {
+ delete api[type];
+ }
+}
+exports.unregisterGlobal = unregisterGlobal;
+//# sourceMappingURL=global-utils.js.map
- let onData,
- onEnd
+/***/ }),
- if (isPartAFile(fieldname, contype, filename)) {
- // file/binary field
- if (nfiles === filesLimit) {
- if (!boy.hitFilesLimit) {
- boy.hitFilesLimit = true
- boy.emit('filesLimit')
- }
- return skipPart(part)
- }
+/***/ 1522:
+/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
- ++nfiles
+"use strict";
- if (!boy._events.file) {
- self.parser._ignore()
- return
+/*
+ * Copyright The OpenTelemetry Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.isCompatible = exports._makeCompatibilityCheck = void 0;
+const version_1 = __nccwpck_require__(8996);
+const re = /^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;
+/**
+ * Create a function to test an API version to see if it is compatible with the provided ownVersion.
+ *
+ * The returned function has the following semantics:
+ * - Exact match is always compatible
+ * - Major versions must match exactly
+ * - 1.x package cannot use global 2.x package
+ * - 2.x package cannot use global 1.x package
+ * - The minor version of the API module requesting access to the global API must be less than or equal to the minor version of this API
+ * - 1.3 package may use 1.4 global because the later global contains all functions 1.3 expects
+ * - 1.4 package may NOT use 1.3 global because it may try to call functions which don't exist on 1.3
+ * - If the major version is 0, the minor version is treated as the major and the patch is treated as the minor
+ * - Patch and build tag differences are not considered at this time
+ *
+ * @param ownVersion version which should be checked against
+ */
+function _makeCompatibilityCheck(ownVersion) {
+ const acceptedVersions = new Set([ownVersion]);
+ const rejectedVersions = new Set();
+ const myVersionMatch = ownVersion.match(re);
+ if (!myVersionMatch) {
+ // we cannot guarantee compatibility so we always return noop
+ return () => false;
+ }
+ const ownVersionParsed = {
+ major: +myVersionMatch[1],
+ minor: +myVersionMatch[2],
+ patch: +myVersionMatch[3],
+ prerelease: myVersionMatch[4],
+ };
+ // if ownVersion has a prerelease tag, versions must match exactly
+ if (ownVersionParsed.prerelease != null) {
+ return function isExactmatch(globalVersion) {
+ return globalVersion === ownVersion;
+ };
+ }
+ function _reject(v) {
+ rejectedVersions.add(v);
+ return false;
+ }
+ function _accept(v) {
+ acceptedVersions.add(v);
+ return true;
+ }
+ return function isCompatible(globalVersion) {
+ if (acceptedVersions.has(globalVersion)) {
+ return true;
}
-
- ++nends
- const file = new FileStream(fileOpts)
- curFile = file
- file.on('end', function () {
- --nends
- self._pause = false
- checkFinished()
- if (self._cb && !self._needDrain) {
- const cb = self._cb
- self._cb = undefined
- cb()
- }
- })
- file._read = function (n) {
- if (!self._pause) { return }
- self._pause = false
- if (self._cb && !self._needDrain) {
- const cb = self._cb
- self._cb = undefined
- cb()
- }
+ if (rejectedVersions.has(globalVersion)) {
+ return false;
}
- boy.emit('file', fieldname, file, filename, encoding, contype)
-
- onData = function (data) {
- if ((nsize += data.length) > fileSizeLimit) {
- const extralen = fileSizeLimit - nsize + data.length
- if (extralen > 0) { file.push(data.slice(0, extralen)) }
- file.truncated = true
- file.bytesRead = fileSizeLimit
- part.removeAllListeners('data')
- file.emit('limit')
- return
- } else if (!file.push(data)) { self._pause = true }
-
- file.bytesRead = nsize
+ const globalVersionMatch = globalVersion.match(re);
+ if (!globalVersionMatch) {
+ // cannot parse other version
+ // we cannot guarantee compatibility so we always noop
+ return _reject(globalVersion);
}
-
- onEnd = function () {
- curFile = undefined
- file.push(null)
+ const globalVersionParsed = {
+ major: +globalVersionMatch[1],
+ minor: +globalVersionMatch[2],
+ patch: +globalVersionMatch[3],
+ prerelease: globalVersionMatch[4],
+ };
+ // if globalVersion has a prerelease tag, versions must match exactly
+ if (globalVersionParsed.prerelease != null) {
+ return _reject(globalVersion);
}
- } else {
- // non-file field
- if (nfields === fieldsLimit) {
- if (!boy.hitFieldsLimit) {
- boy.hitFieldsLimit = true
- boy.emit('fieldsLimit')
- }
- return skipPart(part)
+ // major versions must match
+ if (ownVersionParsed.major !== globalVersionParsed.major) {
+ return _reject(globalVersion);
}
-
- ++nfields
- ++nends
- let buffer = ''
- let truncated = false
- curField = part
-
- onData = function (data) {
- if ((nsize += data.length) > fieldSizeLimit) {
- const extralen = (fieldSizeLimit - (nsize - data.length))
- buffer += data.toString('binary', 0, extralen)
- truncated = true
- part.removeAllListeners('data')
- } else { buffer += data.toString('binary') }
+ if (ownVersionParsed.major === 0) {
+ if (ownVersionParsed.minor === globalVersionParsed.minor &&
+ ownVersionParsed.patch <= globalVersionParsed.patch) {
+ return _accept(globalVersion);
+ }
+ return _reject(globalVersion);
}
-
- onEnd = function () {
- curField = undefined
- if (buffer.length) { buffer = decodeText(buffer, 'binary', charset) }
- boy.emit('field', fieldname, buffer, false, truncated, encoding, contype)
- --nends
- checkFinished()
+ if (ownVersionParsed.minor <= globalVersionParsed.minor) {
+ return _accept(globalVersion);
}
- }
-
- /* As of node@2efe4ab761666 (v0.10.29+/v0.11.14+), busboy had become
- broken. Streams2/streams3 is a huge black box of confusion, but
- somehow overriding the sync state seems to fix things again (and still
- seems to work for previous node versions).
- */
- part._readableState.sync = false
-
- part.on('data', onData)
- part.on('end', onEnd)
- }).on('error', function (err) {
- if (curFile) { curFile.emit('error', err) }
- })
- }).on('error', function (err) {
- boy.emit('error', err)
- }).on('finish', function () {
- finished = true
- checkFinished()
- })
+ return _reject(globalVersion);
+ };
}
+exports._makeCompatibilityCheck = _makeCompatibilityCheck;
+/**
+ * Test an API version to see if it is compatible with this API.
+ *
+ * - Exact match is always compatible
+ * - Major versions must match exactly
+ * - 1.x package cannot use global 2.x package
+ * - 2.x package cannot use global 1.x package
+ * - The minor version of the API module requesting access to the global API must be less than or equal to the minor version of this API
+ * - 1.3 package may use 1.4 global because the later global contains all functions 1.3 expects
+ * - 1.4 package may NOT use 1.3 global because it may try to call functions which don't exist on 1.3
+ * - If the major version is 0, the minor version is treated as the major and the patch is treated as the minor
+ * - Patch and build tag differences are not considered at this time
+ *
+ * @param version version of the API requesting an instance of the global API
+ */
+exports.isCompatible = _makeCompatibilityCheck(version_1.VERSION);
+//# sourceMappingURL=semver.js.map
-Multipart.prototype.write = function (chunk, cb) {
- const r = this.parser.write(chunk)
- if (r && !this._pause) {
- cb()
- } else {
- this._needDrain = !r
- this._cb = cb
- }
-}
+/***/ }),
-Multipart.prototype.end = function () {
- const self = this
-
- if (self.parser.writable) {
- self.parser.end()
- } else if (!self._boy._done) {
- process.nextTick(function () {
- self._boy._done = true
- self._boy.emit('finish')
- })
- }
-}
-
-function skipPart (part) {
- part.resume()
-}
-
-function FileStream (opts) {
- Readable.call(this, opts)
-
- this.bytesRead = 0
-
- this.truncated = false
-}
-
-inherits(FileStream, Readable)
-
-FileStream.prototype._read = function (n) {}
-
-module.exports = Multipart
-
-
-/***/ }),
-
-/***/ 6780:
-/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
-
-"use strict";
-
-
-const Decoder = __nccwpck_require__(9730)
-const decodeText = __nccwpck_require__(9136)
-const getLimit = __nccwpck_require__(9692)
-
-const RE_CHARSET = /^charset$/i
-
-UrlEncoded.detect = /^application\/x-www-form-urlencoded/i
-function UrlEncoded (boy, cfg) {
- const limits = cfg.limits
- const parsedConType = cfg.parsedConType
- this.boy = boy
-
- this.fieldSizeLimit = getLimit(limits, 'fieldSize', 1 * 1024 * 1024)
- this.fieldNameSizeLimit = getLimit(limits, 'fieldNameSize', 100)
- this.fieldsLimit = getLimit(limits, 'fields', Infinity)
-
- let charset
- for (var i = 0, len = parsedConType.length; i < len; ++i) { // eslint-disable-line no-var
- if (Array.isArray(parsedConType[i]) &&
- RE_CHARSET.test(parsedConType[i][0])) {
- charset = parsedConType[i][1].toLowerCase()
- break
- }
- }
-
- if (charset === undefined) { charset = cfg.defCharset || 'utf8' }
-
- this.decoder = new Decoder()
- this.charset = charset
- this._fields = 0
- this._state = 'key'
- this._checkingBytes = true
- this._bytesKey = 0
- this._bytesVal = 0
- this._key = ''
- this._val = ''
- this._keyTrunc = false
- this._valTrunc = false
- this._hitLimit = false
-}
-
-UrlEncoded.prototype.write = function (data, cb) {
- if (this._fields === this.fieldsLimit) {
- if (!this.boy.hitFieldsLimit) {
- this.boy.hitFieldsLimit = true
- this.boy.emit('fieldsLimit')
- }
- return cb()
- }
-
- let idxeq; let idxamp; let i; let p = 0; const len = data.length
-
- while (p < len) {
- if (this._state === 'key') {
- idxeq = idxamp = undefined
- for (i = p; i < len; ++i) {
- if (!this._checkingBytes) { ++p }
- if (data[i] === 0x3D/* = */) {
- idxeq = i
- break
- } else if (data[i] === 0x26/* & */) {
- idxamp = i
- break
- }
- if (this._checkingBytes && this._bytesKey === this.fieldNameSizeLimit) {
- this._hitLimit = true
- break
- } else if (this._checkingBytes) { ++this._bytesKey }
- }
-
- if (idxeq !== undefined) {
- // key with assignment
- if (idxeq > p) { this._key += this.decoder.write(data.toString('binary', p, idxeq)) }
- this._state = 'val'
-
- this._hitLimit = false
- this._checkingBytes = true
- this._val = ''
- this._bytesVal = 0
- this._valTrunc = false
- this.decoder.reset()
-
- p = idxeq + 1
- } else if (idxamp !== undefined) {
- // key with no assignment
- ++this._fields
- let key; const keyTrunc = this._keyTrunc
- if (idxamp > p) { key = (this._key += this.decoder.write(data.toString('binary', p, idxamp))) } else { key = this._key }
-
- this._hitLimit = false
- this._checkingBytes = true
- this._key = ''
- this._bytesKey = 0
- this._keyTrunc = false
- this.decoder.reset()
-
- if (key.length) {
- this.boy.emit('field', decodeText(key, 'binary', this.charset),
- '',
- keyTrunc,
- false)
- }
-
- p = idxamp + 1
- if (this._fields === this.fieldsLimit) { return cb() }
- } else if (this._hitLimit) {
- // we may not have hit the actual limit if there are encoded bytes...
- if (i > p) { this._key += this.decoder.write(data.toString('binary', p, i)) }
- p = i
- if ((this._bytesKey = this._key.length) === this.fieldNameSizeLimit) {
- // yep, we actually did hit the limit
- this._checkingBytes = false
- this._keyTrunc = true
- }
- } else {
- if (p < len) { this._key += this.decoder.write(data.toString('binary', p)) }
- p = len
- }
- } else {
- idxamp = undefined
- for (i = p; i < len; ++i) {
- if (!this._checkingBytes) { ++p }
- if (data[i] === 0x26/* & */) {
- idxamp = i
- break
- }
- if (this._checkingBytes && this._bytesVal === this.fieldSizeLimit) {
- this._hitLimit = true
- break
- } else if (this._checkingBytes) { ++this._bytesVal }
- }
-
- if (idxamp !== undefined) {
- ++this._fields
- if (idxamp > p) { this._val += this.decoder.write(data.toString('binary', p, idxamp)) }
- this.boy.emit('field', decodeText(this._key, 'binary', this.charset),
- decodeText(this._val, 'binary', this.charset),
- this._keyTrunc,
- this._valTrunc)
- this._state = 'key'
-
- this._hitLimit = false
- this._checkingBytes = true
- this._key = ''
- this._bytesKey = 0
- this._keyTrunc = false
- this.decoder.reset()
-
- p = idxamp + 1
- if (this._fields === this.fieldsLimit) { return cb() }
- } else if (this._hitLimit) {
- // we may not have hit the actual limit if there are encoded bytes...
- if (i > p) { this._val += this.decoder.write(data.toString('binary', p, i)) }
- p = i
- if ((this._val === '' && this.fieldSizeLimit === 0) ||
- (this._bytesVal = this._val.length) === this.fieldSizeLimit) {
- // yep, we actually did hit the limit
- this._checkingBytes = false
- this._valTrunc = true
- }
- } else {
- if (p < len) { this._val += this.decoder.write(data.toString('binary', p)) }
- p = len
- }
- }
- }
- cb()
-}
-
-UrlEncoded.prototype.end = function () {
- if (this.boy._done) { return }
-
- if (this._state === 'key' && this._key.length > 0) {
- this.boy.emit('field', decodeText(this._key, 'binary', this.charset),
- '',
- this._keyTrunc,
- false)
- } else if (this._state === 'val') {
- this.boy.emit('field', decodeText(this._key, 'binary', this.charset),
- decodeText(this._val, 'binary', this.charset),
- this._keyTrunc,
- this._valTrunc)
- }
- this.boy._done = true
- this.boy.emit('finish')
-}
-
-module.exports = UrlEncoded
-
-
-/***/ }),
-
-/***/ 9730:
-/***/ ((module) => {
-
-"use strict";
-
-
-const RE_PLUS = /\+/g
-
-const HEX = [
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0,
- 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
-]
-
-function Decoder () {
- this.buffer = undefined
-}
-Decoder.prototype.write = function (str) {
- // Replace '+' with ' ' before decoding
- str = str.replace(RE_PLUS, ' ')
- let res = ''
- let i = 0; let p = 0; const len = str.length
- for (; i < len; ++i) {
- if (this.buffer !== undefined) {
- if (!HEX[str.charCodeAt(i)]) {
- res += '%' + this.buffer
- this.buffer = undefined
- --i // retry character
- } else {
- this.buffer += str[i]
- ++p
- if (this.buffer.length === 2) {
- res += String.fromCharCode(parseInt(this.buffer, 16))
- this.buffer = undefined
- }
- }
- } else if (str[i] === '%') {
- if (i > p) {
- res += str.substring(p, i)
- p = i
- }
- this.buffer = ''
- ++p
- }
- }
- if (p < len && this.buffer === undefined) { res += str.substring(p) }
- return res
-}
-Decoder.prototype.reset = function () {
- this.buffer = undefined
-}
-
-module.exports = Decoder
-
-
-/***/ }),
-
-/***/ 496:
-/***/ ((module) => {
-
-"use strict";
-
-
-module.exports = function basename (path) {
- if (typeof path !== 'string') { return '' }
- for (var i = path.length - 1; i >= 0; --i) { // eslint-disable-line no-var
- switch (path.charCodeAt(i)) {
- case 0x2F: // '/'
- case 0x5C: // '\'
- path = path.slice(i + 1)
- return (path === '..' || path === '.' ? '' : path)
- }
- }
- return (path === '..' || path === '.' ? '' : path)
-}
-
-
-/***/ }),
-
-/***/ 9136:
-/***/ ((module) => {
-
-"use strict";
-
-
-// Node has always utf-8
-const utf8Decoder = new TextDecoder('utf-8')
-const textDecoders = new Map([
- ['utf-8', utf8Decoder],
- ['utf8', utf8Decoder]
-])
-
-function decodeText (text, textEncoding, destEncoding) {
- if (text) {
- if (textDecoders.has(destEncoding)) {
- try {
- return textDecoders.get(destEncoding).decode(Buffer.from(text, textEncoding))
- } catch (e) { }
- } else {
- try {
- textDecoders.set(destEncoding, new TextDecoder(destEncoding))
- return textDecoders.get(destEncoding).decode(Buffer.from(text, textEncoding))
- } catch (e) { }
- }
- }
- return text
-}
-
-module.exports = decodeText
-
-
-/***/ }),
-
-/***/ 9692:
-/***/ ((module) => {
+/***/ 2601:
+/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
-
-module.exports = function getLimit (limits, name, defaultLimit) {
- if (
- !limits ||
- limits[name] === undefined ||
- limits[name] === null
- ) { return defaultLimit }
-
- if (
- typeof limits[name] !== 'number' ||
- isNaN(limits[name])
- ) { throw new TypeError('Limit ' + name + ' is not a valid number') }
-
- return limits[name]
-}
-
+/*
+ * Copyright The OpenTelemetry Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.metrics = void 0;
+// Split module-level variable definition into separate files to allow
+// tree-shaking on each api instance.
+const metrics_1 = __nccwpck_require__(7696);
+/** Entrypoint for metrics API */
+exports.metrics = metrics_1.MetricsAPI.getInstance();
+//# sourceMappingURL=metrics-api.js.map
/***/ }),
-/***/ 4426:
-/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
+/***/ 9999:
+/***/ ((__unused_webpack_module, exports) => {
"use strict";
-
-const decodeText = __nccwpck_require__(9136)
-
-const RE_ENCODED = /%([a-fA-F0-9]{2})/g
-
-function encodedReplacer (match, byte) {
- return String.fromCharCode(parseInt(byte, 16))
-}
-
-function parseParams (str) {
- const res = []
- let state = 'key'
- let charset = ''
- let inquote = false
- let escaping = false
- let p = 0
- let tmp = ''
-
- for (var i = 0, len = str.length; i < len; ++i) { // eslint-disable-line no-var
- const char = str[i]
- if (char === '\\' && inquote) {
- if (escaping) { escaping = false } else {
- escaping = true
- continue
- }
- } else if (char === '"') {
- if (!escaping) {
- if (inquote) {
- inquote = false
- state = 'key'
- } else { inquote = true }
- continue
- } else { escaping = false }
- } else {
- if (escaping && inquote) { tmp += '\\' }
- escaping = false
- if ((state === 'charset' || state === 'lang') && char === "'") {
- if (state === 'charset') {
- state = 'lang'
- charset = tmp.substring(1)
- } else { state = 'value' }
- tmp = ''
- continue
- } else if (state === 'key' &&
- (char === '*' || char === '=') &&
- res.length) {
- if (char === '*') { state = 'charset' } else { state = 'value' }
- res[p] = [tmp, undefined]
- tmp = ''
- continue
- } else if (!inquote && char === ';') {
- state = 'key'
- if (charset) {
- if (tmp.length) {
- tmp = decodeText(tmp.replace(RE_ENCODED, encodedReplacer),
- 'binary',
- charset)
- }
- charset = ''
- } else if (tmp.length) {
- tmp = decodeText(tmp, 'binary', 'utf8')
- }
- if (res[p] === undefined) { res[p] = tmp } else { res[p][1] = tmp }
- tmp = ''
- ++p
- continue
- } else if (!inquote && (char === ' ' || char === '\t')) { continue }
- }
- tmp += char
- }
- if (charset && tmp.length) {
- tmp = decodeText(tmp.replace(RE_ENCODED, encodedReplacer),
- 'binary',
- charset)
- } else if (tmp) {
- tmp = decodeText(tmp, 'binary', 'utf8')
- }
-
- if (res[p] === undefined) {
- if (tmp) { res[p] = tmp }
- } else { res[p][1] = tmp }
-
- return res
-}
-
-module.exports = parseParams
-
+/*
+ * Copyright The OpenTelemetry Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.ValueType = void 0;
+/** The Type of value. It describes how the data is reported. */
+var ValueType;
+(function (ValueType) {
+ ValueType[ValueType["INT"] = 0] = "INT";
+ ValueType[ValueType["DOUBLE"] = 1] = "DOUBLE";
+})(ValueType = exports.ValueType || (exports.ValueType = {}));
+//# sourceMappingURL=Metric.js.map
/***/ }),
-/***/ 7171:
-/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
+/***/ 4837:
+/***/ ((__unused_webpack_module, exports) => {
"use strict";
@@ -42247,74 +40137,109 @@ module.exports = parseParams
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.ContextAPI = void 0;
-const NoopContextManager_1 = __nccwpck_require__(4118);
-const global_utils_1 = __nccwpck_require__(5135);
-const diag_1 = __nccwpck_require__(1877);
-const API_NAME = 'context';
-const NOOP_CONTEXT_MANAGER = new NoopContextManager_1.NoopContextManager();
+exports.createNoopMeter = exports.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC = exports.NOOP_OBSERVABLE_GAUGE_METRIC = exports.NOOP_OBSERVABLE_COUNTER_METRIC = exports.NOOP_UP_DOWN_COUNTER_METRIC = exports.NOOP_HISTOGRAM_METRIC = exports.NOOP_COUNTER_METRIC = exports.NOOP_METER = exports.NoopObservableUpDownCounterMetric = exports.NoopObservableGaugeMetric = exports.NoopObservableCounterMetric = exports.NoopObservableMetric = exports.NoopHistogramMetric = exports.NoopUpDownCounterMetric = exports.NoopCounterMetric = exports.NoopMetric = exports.NoopMeter = void 0;
/**
- * Singleton object which represents the entry point to the OpenTelemetry Context API
+ * NoopMeter is a noop implementation of the {@link Meter} interface. It reuses
+ * constant NoopMetrics for all of its methods.
*/
-class ContextAPI {
- /** Empty private constructor prevents end users from constructing a new instance of the API */
+class NoopMeter {
constructor() { }
- /** Get the singleton instance of the Context API */
- static getInstance() {
- if (!this._instance) {
- this._instance = new ContextAPI();
- }
- return this._instance;
- }
/**
- * Set the current context manager.
- *
- * @returns true if the context manager was successfully registered, else false
+ * @see {@link Meter.createHistogram}
*/
- setGlobalContextManager(contextManager) {
- return (0, global_utils_1.registerGlobal)(API_NAME, contextManager, diag_1.DiagAPI.instance());
+ createHistogram(_name, _options) {
+ return exports.NOOP_HISTOGRAM_METRIC;
}
/**
- * Get the currently active context
+ * @see {@link Meter.createCounter}
*/
- active() {
- return this._getContextManager().active();
+ createCounter(_name, _options) {
+ return exports.NOOP_COUNTER_METRIC;
}
/**
- * Execute a function with an active context
- *
- * @param context context to be active during function execution
- * @param fn function to execute in a context
- * @param thisArg optional receiver to be used for calling fn
- * @param args optional arguments forwarded to fn
+ * @see {@link Meter.createUpDownCounter}
*/
- with(context, fn, thisArg, ...args) {
- return this._getContextManager().with(context, fn, thisArg, ...args);
+ createUpDownCounter(_name, _options) {
+ return exports.NOOP_UP_DOWN_COUNTER_METRIC;
}
/**
- * Bind a context to a target function or event emitter
- *
- * @param context context to bind to the event emitter or function. Defaults to the currently active context
- * @param target function or event emitter to bind
+ * @see {@link Meter.createObservableGauge}
*/
- bind(context, target) {
- return this._getContextManager().bind(context, target);
+ createObservableGauge(_name, _options) {
+ return exports.NOOP_OBSERVABLE_GAUGE_METRIC;
}
- _getContextManager() {
- return (0, global_utils_1.getGlobal)(API_NAME) || NOOP_CONTEXT_MANAGER;
+ /**
+ * @see {@link Meter.createObservableCounter}
+ */
+ createObservableCounter(_name, _options) {
+ return exports.NOOP_OBSERVABLE_COUNTER_METRIC;
}
- /** Disable and remove the global context manager */
- disable() {
- this._getContextManager().disable();
- (0, global_utils_1.unregisterGlobal)(API_NAME, diag_1.DiagAPI.instance());
+ /**
+ * @see {@link Meter.createObservableUpDownCounter}
+ */
+ createObservableUpDownCounter(_name, _options) {
+ return exports.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC;
}
+ /**
+ * @see {@link Meter.addBatchObservableCallback}
+ */
+ addBatchObservableCallback(_callback, _observables) { }
+ /**
+ * @see {@link Meter.removeBatchObservableCallback}
+ */
+ removeBatchObservableCallback(_callback) { }
}
-exports.ContextAPI = ContextAPI;
-//# sourceMappingURL=context.js.map
+exports.NoopMeter = NoopMeter;
+class NoopMetric {
+}
+exports.NoopMetric = NoopMetric;
+class NoopCounterMetric extends NoopMetric {
+ add(_value, _attributes) { }
+}
+exports.NoopCounterMetric = NoopCounterMetric;
+class NoopUpDownCounterMetric extends NoopMetric {
+ add(_value, _attributes) { }
+}
+exports.NoopUpDownCounterMetric = NoopUpDownCounterMetric;
+class NoopHistogramMetric extends NoopMetric {
+ record(_value, _attributes) { }
+}
+exports.NoopHistogramMetric = NoopHistogramMetric;
+class NoopObservableMetric {
+ addCallback(_callback) { }
+ removeCallback(_callback) { }
+}
+exports.NoopObservableMetric = NoopObservableMetric;
+class NoopObservableCounterMetric extends NoopObservableMetric {
+}
+exports.NoopObservableCounterMetric = NoopObservableCounterMetric;
+class NoopObservableGaugeMetric extends NoopObservableMetric {
+}
+exports.NoopObservableGaugeMetric = NoopObservableGaugeMetric;
+class NoopObservableUpDownCounterMetric extends NoopObservableMetric {
+}
+exports.NoopObservableUpDownCounterMetric = NoopObservableUpDownCounterMetric;
+exports.NOOP_METER = new NoopMeter();
+// Synchronous instruments
+exports.NOOP_COUNTER_METRIC = new NoopCounterMetric();
+exports.NOOP_HISTOGRAM_METRIC = new NoopHistogramMetric();
+exports.NOOP_UP_DOWN_COUNTER_METRIC = new NoopUpDownCounterMetric();
+// Asynchronous instruments
+exports.NOOP_OBSERVABLE_COUNTER_METRIC = new NoopObservableCounterMetric();
+exports.NOOP_OBSERVABLE_GAUGE_METRIC = new NoopObservableGaugeMetric();
+exports.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC = new NoopObservableUpDownCounterMetric();
+/**
+ * Create a no-op Meter
+ */
+function createNoopMeter() {
+ return exports.NOOP_METER;
+}
+exports.createNoopMeter = createNoopMeter;
+//# sourceMappingURL=NoopMeter.js.map
/***/ }),
-/***/ 1877:
+/***/ 2647:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
@@ -42335,87 +40260,25 @@ exports.ContextAPI = ContextAPI;
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.DiagAPI = void 0;
-const ComponentLogger_1 = __nccwpck_require__(7978);
-const logLevelLogger_1 = __nccwpck_require__(9639);
-const types_1 = __nccwpck_require__(8077);
-const global_utils_1 = __nccwpck_require__(5135);
-const API_NAME = 'diag';
+exports.NOOP_METER_PROVIDER = exports.NoopMeterProvider = void 0;
+const NoopMeter_1 = __nccwpck_require__(4837);
/**
- * Singleton object which represents the entry point to the OpenTelemetry internal
- * diagnostic API
+ * An implementation of the {@link MeterProvider} which returns an impotent Meter
+ * for all calls to `getMeter`
*/
-class DiagAPI {
- /**
- * Private internal constructor
- * @private
- */
- constructor() {
- function _logProxy(funcName) {
- return function (...args) {
- const logger = (0, global_utils_1.getGlobal)('diag');
- // shortcut if logger not set
- if (!logger)
- return;
- return logger[funcName](...args);
- };
- }
- // Using self local variable for minification purposes as 'this' cannot be minified
- const self = this;
- // DiagAPI specific functions
- const setLogger = (logger, optionsOrLogLevel = { logLevel: types_1.DiagLogLevel.INFO }) => {
- var _a, _b, _c;
- if (logger === self) {
- // There isn't much we can do here.
- // Logging to the console might break the user application.
- // Try to log to self. If a logger was previously registered it will receive the log.
- const err = new Error('Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation');
- self.error((_a = err.stack) !== null && _a !== void 0 ? _a : err.message);
- return false;
- }
- if (typeof optionsOrLogLevel === 'number') {
- optionsOrLogLevel = {
- logLevel: optionsOrLogLevel,
- };
- }
- const oldLogger = (0, global_utils_1.getGlobal)('diag');
- const newLogger = (0, logLevelLogger_1.createLogLevelDiagLogger)((_b = optionsOrLogLevel.logLevel) !== null && _b !== void 0 ? _b : types_1.DiagLogLevel.INFO, logger);
- // There already is an logger registered. We'll let it know before overwriting it.
- if (oldLogger && !optionsOrLogLevel.suppressOverrideMessage) {
- const stack = (_c = new Error().stack) !== null && _c !== void 0 ? _c : '';
- oldLogger.warn(`Current logger will be overwritten from ${stack}`);
- newLogger.warn(`Current logger will overwrite one already registered from ${stack}`);
- }
- return (0, global_utils_1.registerGlobal)('diag', newLogger, self, true);
- };
- self.setLogger = setLogger;
- self.disable = () => {
- (0, global_utils_1.unregisterGlobal)(API_NAME, self);
- };
- self.createComponentLogger = (options) => {
- return new ComponentLogger_1.DiagComponentLogger(options);
- };
- self.verbose = _logProxy('verbose');
- self.debug = _logProxy('debug');
- self.info = _logProxy('info');
- self.warn = _logProxy('warn');
- self.error = _logProxy('error');
- }
- /** Get the singleton instance of the DiagAPI API */
- static instance() {
- if (!this._instance) {
- this._instance = new DiagAPI();
- }
- return this._instance;
+class NoopMeterProvider {
+ getMeter(_name, _version, _options) {
+ return NoopMeter_1.NOOP_METER;
}
}
-exports.DiagAPI = DiagAPI;
-//# sourceMappingURL=diag.js.map
+exports.NoopMeterProvider = NoopMeterProvider;
+exports.NOOP_METER_PROVIDER = new NoopMeterProvider();
+//# sourceMappingURL=NoopMeterProvider.js.map
/***/ }),
-/***/ 7696:
-/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
+/***/ 9957:
+/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
@@ -42434,56 +40297,24 @@ exports.DiagAPI = DiagAPI;
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __exportStar = (this && this.__exportStar) || function(m, exports) {
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
+};
Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.MetricsAPI = void 0;
-const NoopMeterProvider_1 = __nccwpck_require__(2647);
-const global_utils_1 = __nccwpck_require__(5135);
-const diag_1 = __nccwpck_require__(1877);
-const API_NAME = 'metrics';
-/**
- * Singleton object which represents the entry point to the OpenTelemetry Metrics API
- */
-class MetricsAPI {
- /** Empty private constructor prevents end users from constructing a new instance of the API */
- constructor() { }
- /** Get the singleton instance of the Metrics API */
- static getInstance() {
- if (!this._instance) {
- this._instance = new MetricsAPI();
- }
- return this._instance;
- }
- /**
- * Set the current global meter provider.
- * Returns true if the meter provider was successfully registered, else false.
- */
- setGlobalMeterProvider(provider) {
- return (0, global_utils_1.registerGlobal)(API_NAME, provider, diag_1.DiagAPI.instance());
- }
- /**
- * Returns the global meter provider.
- */
- getMeterProvider() {
- return (0, global_utils_1.getGlobal)(API_NAME) || NoopMeterProvider_1.NOOP_METER_PROVIDER;
- }
- /**
- * Returns a meter from the global meter provider.
- */
- getMeter(name, version, options) {
- return this.getMeterProvider().getMeter(name, version, options);
- }
- /** Remove the global meter provider */
- disable() {
- (0, global_utils_1.unregisterGlobal)(API_NAME, diag_1.DiagAPI.instance());
- }
-}
-exports.MetricsAPI = MetricsAPI;
-//# sourceMappingURL=metrics.js.map
+__exportStar(__nccwpck_require__(7200), exports);
+//# sourceMappingURL=index.js.map
/***/ }),
-/***/ 9909:
-/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
+/***/ 9406:
+/***/ ((__unused_webpack_module, exports) => {
"use strict";
@@ -42503,83 +40334,16 @@ exports.MetricsAPI = MetricsAPI;
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.PropagationAPI = void 0;
-const global_utils_1 = __nccwpck_require__(5135);
-const NoopTextMapPropagator_1 = __nccwpck_require__(2368);
-const TextMapPropagator_1 = __nccwpck_require__(865);
-const context_helpers_1 = __nccwpck_require__(7682);
-const utils_1 = __nccwpck_require__(8136);
-const diag_1 = __nccwpck_require__(1877);
-const API_NAME = 'propagation';
-const NOOP_TEXT_MAP_PROPAGATOR = new NoopTextMapPropagator_1.NoopTextMapPropagator();
-/**
- * Singleton object which represents the entry point to the OpenTelemetry Propagation API
- */
-class PropagationAPI {
- /** Empty private constructor prevents end users from constructing a new instance of the API */
- constructor() {
- this.createBaggage = utils_1.createBaggage;
- this.getBaggage = context_helpers_1.getBaggage;
- this.getActiveBaggage = context_helpers_1.getActiveBaggage;
- this.setBaggage = context_helpers_1.setBaggage;
- this.deleteBaggage = context_helpers_1.deleteBaggage;
- }
- /** Get the singleton instance of the Propagator API */
- static getInstance() {
- if (!this._instance) {
- this._instance = new PropagationAPI();
- }
- return this._instance;
- }
- /**
- * Set the current propagator.
- *
- * @returns true if the propagator was successfully registered, else false
- */
- setGlobalPropagator(propagator) {
- return (0, global_utils_1.registerGlobal)(API_NAME, propagator, diag_1.DiagAPI.instance());
- }
- /**
- * Inject context into a carrier to be propagated inter-process
- *
- * @param context Context carrying tracing data to inject
- * @param carrier carrier to inject context into
- * @param setter Function used to set values on the carrier
- */
- inject(context, carrier, setter = TextMapPropagator_1.defaultTextMapSetter) {
- return this._getGlobalPropagator().inject(context, carrier, setter);
- }
- /**
- * Extract context from a carrier
- *
- * @param context Context which the newly created context will inherit from
- * @param carrier Carrier to extract context from
- * @param getter Function used to extract keys from a carrier
- */
- extract(context, carrier, getter = TextMapPropagator_1.defaultTextMapGetter) {
- return this._getGlobalPropagator().extract(context, carrier, getter);
- }
- /**
- * Return a list of all fields which may be used by the propagator.
- */
- fields() {
- return this._getGlobalPropagator().fields();
- }
- /** Remove the global propagator */
- disable() {
- (0, global_utils_1.unregisterGlobal)(API_NAME, diag_1.DiagAPI.instance());
- }
- _getGlobalPropagator() {
- return (0, global_utils_1.getGlobal)(API_NAME) || NOOP_TEXT_MAP_PROPAGATOR;
- }
-}
-exports.PropagationAPI = PropagationAPI;
-//# sourceMappingURL=propagation.js.map
+exports._globalThis = void 0;
+/** only globals that common to node and browsers are allowed */
+// eslint-disable-next-line node/no-unsupported-features/es-builtins
+exports._globalThis = typeof globalThis === 'object' ? globalThis : global;
+//# sourceMappingURL=globalThis.js.map
/***/ }),
-/***/ 1539:
-/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
+/***/ 7200:
+/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
@@ -42598,73 +40362,23 @@ exports.PropagationAPI = PropagationAPI;
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __exportStar = (this && this.__exportStar) || function(m, exports) {
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
+};
Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.TraceAPI = void 0;
-const global_utils_1 = __nccwpck_require__(5135);
-const ProxyTracerProvider_1 = __nccwpck_require__(2285);
-const spancontext_utils_1 = __nccwpck_require__(9745);
-const context_utils_1 = __nccwpck_require__(3326);
-const diag_1 = __nccwpck_require__(1877);
-const API_NAME = 'trace';
-/**
- * Singleton object which represents the entry point to the OpenTelemetry Tracing API
- */
-class TraceAPI {
- /** Empty private constructor prevents end users from constructing a new instance of the API */
- constructor() {
- this._proxyTracerProvider = new ProxyTracerProvider_1.ProxyTracerProvider();
- this.wrapSpanContext = spancontext_utils_1.wrapSpanContext;
- this.isSpanContextValid = spancontext_utils_1.isSpanContextValid;
- this.deleteSpan = context_utils_1.deleteSpan;
- this.getSpan = context_utils_1.getSpan;
- this.getActiveSpan = context_utils_1.getActiveSpan;
- this.getSpanContext = context_utils_1.getSpanContext;
- this.setSpan = context_utils_1.setSpan;
- this.setSpanContext = context_utils_1.setSpanContext;
- }
- /** Get the singleton instance of the Trace API */
- static getInstance() {
- if (!this._instance) {
- this._instance = new TraceAPI();
- }
- return this._instance;
- }
- /**
- * Set the current global tracer.
- *
- * @returns true if the tracer provider was successfully registered, else false
- */
- setGlobalTracerProvider(provider) {
- const success = (0, global_utils_1.registerGlobal)(API_NAME, this._proxyTracerProvider, diag_1.DiagAPI.instance());
- if (success) {
- this._proxyTracerProvider.setDelegate(provider);
- }
- return success;
- }
- /**
- * Returns the global tracer provider.
- */
- getTracerProvider() {
- return (0, global_utils_1.getGlobal)(API_NAME) || this._proxyTracerProvider;
- }
- /**
- * Returns a tracer from the global tracer provider.
- */
- getTracer(name, version) {
- return this.getTracerProvider().getTracer(name, version);
- }
- /** Remove the global tracer provider */
- disable() {
- (0, global_utils_1.unregisterGlobal)(API_NAME, diag_1.DiagAPI.instance());
- this._proxyTracerProvider = new ProxyTracerProvider_1.ProxyTracerProvider();
- }
-}
-exports.TraceAPI = TraceAPI;
-//# sourceMappingURL=trace.js.map
+__exportStar(__nccwpck_require__(9406), exports);
+//# sourceMappingURL=index.js.map
/***/ }),
-/***/ 7682:
+/***/ 7591:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
@@ -42685,56 +40399,17 @@ exports.TraceAPI = TraceAPI;
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.deleteBaggage = exports.setBaggage = exports.getActiveBaggage = exports.getBaggage = void 0;
-const context_1 = __nccwpck_require__(7171);
-const context_2 = __nccwpck_require__(8242);
-/**
- * Baggage key
- */
-const BAGGAGE_KEY = (0, context_2.createContextKey)('OpenTelemetry Baggage Key');
-/**
- * Retrieve the current baggage from the given context
- *
- * @param {Context} Context that manage all context values
- * @returns {Baggage} Extracted baggage from the context
- */
-function getBaggage(context) {
- return context.getValue(BAGGAGE_KEY) || undefined;
-}
-exports.getBaggage = getBaggage;
-/**
- * Retrieve the current baggage from the active/current context
- *
- * @returns {Baggage} Extracted baggage from the context
- */
-function getActiveBaggage() {
- return getBaggage(context_1.ContextAPI.getInstance().active());
-}
-exports.getActiveBaggage = getActiveBaggage;
-/**
- * Store a baggage in the given context
- *
- * @param {Context} Context that manage all context values
- * @param {Baggage} baggage that will be set in the actual context
- */
-function setBaggage(context, baggage) {
- return context.setValue(BAGGAGE_KEY, baggage);
-}
-exports.setBaggage = setBaggage;
-/**
- * Delete the baggage stored in the given context
- *
- * @param {Context} Context that manage all context values
- */
-function deleteBaggage(context) {
- return context.deleteValue(BAGGAGE_KEY);
-}
-exports.deleteBaggage = deleteBaggage;
-//# sourceMappingURL=context-helpers.js.map
+exports.propagation = void 0;
+// Split module-level variable definition into separate files to allow
+// tree-shaking on each api instance.
+const propagation_1 = __nccwpck_require__(9909);
+/** Entrypoint for propagation API */
+exports.propagation = propagation_1.PropagationAPI.getInstance();
+//# sourceMappingURL=propagation-api.js.map
/***/ }),
-/***/ 4811:
+/***/ 2368:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
@@ -42755,48 +40430,27 @@ exports.deleteBaggage = deleteBaggage;
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.BaggageImpl = void 0;
-class BaggageImpl {
- constructor(entries) {
- this._entries = entries ? new Map(entries) : new Map();
- }
- getEntry(key) {
- const entry = this._entries.get(key);
- if (!entry) {
- return undefined;
- }
- return Object.assign({}, entry);
- }
- getAllEntries() {
- return Array.from(this._entries.entries()).map(([k, v]) => [k, v]);
- }
- setEntry(key, entry) {
- const newBaggage = new BaggageImpl(this._entries);
- newBaggage._entries.set(key, entry);
- return newBaggage;
- }
- removeEntry(key) {
- const newBaggage = new BaggageImpl(this._entries);
- newBaggage._entries.delete(key);
- return newBaggage;
- }
- removeEntries(...keys) {
- const newBaggage = new BaggageImpl(this._entries);
- for (const key of keys) {
- newBaggage._entries.delete(key);
- }
- return newBaggage;
+exports.NoopTextMapPropagator = void 0;
+/**
+ * No-op implementations of {@link TextMapPropagator}.
+ */
+class NoopTextMapPropagator {
+ /** Noop inject function does nothing */
+ inject(_context, _carrier) { }
+ /** Noop extract function does nothing and returns the input context */
+ extract(context, _carrier) {
+ return context;
}
- clear() {
- return new BaggageImpl();
+ fields() {
+ return [];
}
}
-exports.BaggageImpl = BaggageImpl;
-//# sourceMappingURL=baggage-impl.js.map
+exports.NoopTextMapPropagator = NoopTextMapPropagator;
+//# sourceMappingURL=NoopTextMapPropagator.js.map
/***/ }),
-/***/ 3542:
+/***/ 865:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
@@ -42817,74 +40471,34 @@ exports.BaggageImpl = BaggageImpl;
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.baggageEntryMetadataSymbol = void 0;
-/**
- * Symbol used to make BaggageEntryMetadata an opaque type
- */
-exports.baggageEntryMetadataSymbol = Symbol('BaggageEntryMetadata');
-//# sourceMappingURL=symbol.js.map
-
-/***/ }),
-
-/***/ 8136:
-/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
-
-"use strict";
-
-/*
- * Copyright The OpenTelemetry Authors
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.baggageEntryMetadataFromString = exports.createBaggage = void 0;
-const diag_1 = __nccwpck_require__(1877);
-const baggage_impl_1 = __nccwpck_require__(4811);
-const symbol_1 = __nccwpck_require__(3542);
-const diag = diag_1.DiagAPI.instance();
-/**
- * Create a new Baggage with optional entries
- *
- * @param entries An array of baggage entries the new baggage should contain
- */
-function createBaggage(entries = {}) {
- return new baggage_impl_1.BaggageImpl(new Map(Object.entries(entries)));
-}
-exports.createBaggage = createBaggage;
-/**
- * Create a serializable BaggageEntryMetadata object from a string.
- *
- * @param str string metadata. Format is currently not defined by the spec and has no special meaning.
- *
- */
-function baggageEntryMetadataFromString(str) {
- if (typeof str !== 'string') {
- diag.error(`Cannot create baggage metadata from unknown type: ${typeof str}`);
- str = '';
- }
- return {
- __TYPE__: symbol_1.baggageEntryMetadataSymbol,
- toString() {
- return str;
- },
- };
-}
-exports.baggageEntryMetadataFromString = baggageEntryMetadataFromString;
-//# sourceMappingURL=utils.js.map
+exports.defaultTextMapSetter = exports.defaultTextMapGetter = void 0;
+exports.defaultTextMapGetter = {
+ get(carrier, key) {
+ if (carrier == null) {
+ return undefined;
+ }
+ return carrier[key];
+ },
+ keys(carrier) {
+ if (carrier == null) {
+ return [];
+ }
+ return Object.keys(carrier);
+ },
+};
+exports.defaultTextMapSetter = {
+ set(carrier, key, value) {
+ if (carrier == null) {
+ return;
+ }
+ carrier[key] = value;
+ },
+};
+//# sourceMappingURL=TextMapPropagator.js.map
/***/ }),
-/***/ 7393:
+/***/ 8989:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
@@ -42905,17 +40519,17 @@ exports.baggageEntryMetadataFromString = baggageEntryMetadataFromString;
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.context = void 0;
+exports.trace = void 0;
// Split module-level variable definition into separate files to allow
// tree-shaking on each api instance.
-const context_1 = __nccwpck_require__(7171);
-/** Entrypoint for context API */
-exports.context = context_1.ContextAPI.getInstance();
-//# sourceMappingURL=context-api.js.map
+const trace_1 = __nccwpck_require__(1539);
+/** Entrypoint for trace API */
+exports.trace = trace_1.TraceAPI.getInstance();
+//# sourceMappingURL=trace-api.js.map
/***/ }),
-/***/ 4118:
+/***/ 1462:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
@@ -42936,93 +40550,56 @@ exports.context = context_1.ContextAPI.getInstance();
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.NoopContextManager = void 0;
-const context_1 = __nccwpck_require__(8242);
-class NoopContextManager {
- active() {
- return context_1.ROOT_CONTEXT;
+exports.NonRecordingSpan = void 0;
+const invalid_span_constants_1 = __nccwpck_require__(1760);
+/**
+ * The NonRecordingSpan is the default {@link Span} that is used when no Span
+ * implementation is available. All operations are no-op including context
+ * propagation.
+ */
+class NonRecordingSpan {
+ constructor(_spanContext = invalid_span_constants_1.INVALID_SPAN_CONTEXT) {
+ this._spanContext = _spanContext;
}
- with(_context, fn, thisArg, ...args) {
- return fn.call(thisArg, ...args);
+ // Returns a SpanContext.
+ spanContext() {
+ return this._spanContext;
}
- bind(_context, target) {
- return target;
+ // By default does nothing
+ setAttribute(_key, _value) {
+ return this;
}
- enable() {
+ // By default does nothing
+ setAttributes(_attributes) {
return this;
}
- disable() {
+ // By default does nothing
+ addEvent(_name, _attributes) {
return this;
}
-}
-exports.NoopContextManager = NoopContextManager;
-//# sourceMappingURL=NoopContextManager.js.map
-
-/***/ }),
-
-/***/ 8242:
-/***/ ((__unused_webpack_module, exports) => {
-
-"use strict";
-
-/*
- * Copyright The OpenTelemetry Authors
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.ROOT_CONTEXT = exports.createContextKey = void 0;
-/** Get a key to uniquely identify a context value */
-function createContextKey(description) {
- // The specification states that for the same input, multiple calls should
- // return different keys. Due to the nature of the JS dependency management
- // system, this creates problems where multiple versions of some package
- // could hold different keys for the same property.
- //
- // Therefore, we use Symbol.for which returns the same key for the same input.
- return Symbol.for(description);
-}
-exports.createContextKey = createContextKey;
-class BaseContext {
- /**
- * Construct a new context which inherits values from an optional parent context.
- *
- * @param parentContext a context from which to inherit values
- */
- constructor(parentContext) {
- // for minification
- const self = this;
- self._currentContext = parentContext ? new Map(parentContext) : new Map();
- self.getValue = (key) => self._currentContext.get(key);
- self.setValue = (key, value) => {
- const context = new BaseContext(self._currentContext);
- context._currentContext.set(key, value);
- return context;
- };
- self.deleteValue = (key) => {
- const context = new BaseContext(self._currentContext);
- context._currentContext.delete(key);
- return context;
- };
+ // By default does nothing
+ setStatus(_status) {
+ return this;
+ }
+ // By default does nothing
+ updateName(_name) {
+ return this;
}
+ // By default does nothing
+ end(_endTime) { }
+ // isRecording always returns false for NonRecordingSpan.
+ isRecording() {
+ return false;
+ }
+ // By default does nothing
+ recordException(_exception, _time) { }
}
-/** The root context is used as the default parent context when there is no active context */
-exports.ROOT_CONTEXT = new BaseContext();
-//# sourceMappingURL=context.js.map
+exports.NonRecordingSpan = NonRecordingSpan;
+//# sourceMappingURL=NonRecordingSpan.js.map
/***/ }),
-/***/ 9721:
+/***/ 7606:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
@@ -43043,22 +40620,68 @@ exports.ROOT_CONTEXT = new BaseContext();
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.diag = void 0;
-// Split module-level variable definition into separate files to allow
-// tree-shaking on each api instance.
-const diag_1 = __nccwpck_require__(1877);
+exports.NoopTracer = void 0;
+const context_1 = __nccwpck_require__(7171);
+const context_utils_1 = __nccwpck_require__(3326);
+const NonRecordingSpan_1 = __nccwpck_require__(1462);
+const spancontext_utils_1 = __nccwpck_require__(9745);
+const contextApi = context_1.ContextAPI.getInstance();
/**
- * Entrypoint for Diag API.
- * Defines Diagnostic handler used for internal diagnostic logging operations.
- * The default provides a Noop DiagLogger implementation which may be changed via the
- * diag.setLogger(logger: DiagLogger) function.
+ * No-op implementations of {@link Tracer}.
*/
-exports.diag = diag_1.DiagAPI.instance();
-//# sourceMappingURL=diag-api.js.map
+class NoopTracer {
+ // startSpan starts a noop span.
+ startSpan(name, options, context = contextApi.active()) {
+ const root = Boolean(options === null || options === void 0 ? void 0 : options.root);
+ if (root) {
+ return new NonRecordingSpan_1.NonRecordingSpan();
+ }
+ const parentFromContext = context && (0, context_utils_1.getSpanContext)(context);
+ if (isSpanContext(parentFromContext) &&
+ (0, spancontext_utils_1.isSpanContextValid)(parentFromContext)) {
+ return new NonRecordingSpan_1.NonRecordingSpan(parentFromContext);
+ }
+ else {
+ return new NonRecordingSpan_1.NonRecordingSpan();
+ }
+ }
+ startActiveSpan(name, arg2, arg3, arg4) {
+ let opts;
+ let ctx;
+ let fn;
+ if (arguments.length < 2) {
+ return;
+ }
+ else if (arguments.length === 2) {
+ fn = arg2;
+ }
+ else if (arguments.length === 3) {
+ opts = arg2;
+ fn = arg3;
+ }
+ else {
+ opts = arg2;
+ ctx = arg3;
+ fn = arg4;
+ }
+ const parentContext = ctx !== null && ctx !== void 0 ? ctx : contextApi.active();
+ const span = this.startSpan(name, opts, parentContext);
+ const contextWithSpanSet = (0, context_utils_1.setSpan)(parentContext, span);
+ return contextApi.with(contextWithSpanSet, fn, undefined, span);
+ }
+}
+exports.NoopTracer = NoopTracer;
+function isSpanContext(spanContext) {
+ return (typeof spanContext === 'object' &&
+ typeof spanContext['spanId'] === 'string' &&
+ typeof spanContext['traceId'] === 'string' &&
+ typeof spanContext['traceFlags'] === 'number');
+}
+//# sourceMappingURL=NoopTracer.js.map
/***/ }),
-/***/ 7978:
+/***/ 3259:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
@@ -43079,53 +40702,26 @@ exports.diag = diag_1.DiagAPI.instance();
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.DiagComponentLogger = void 0;
-const global_utils_1 = __nccwpck_require__(5135);
+exports.NoopTracerProvider = void 0;
+const NoopTracer_1 = __nccwpck_require__(7606);
/**
- * Component Logger which is meant to be used as part of any component which
- * will add automatically additional namespace in front of the log message.
- * It will then forward all message to global diag logger
- * @example
- * const cLogger = diag.createComponentLogger({ namespace: '@opentelemetry/instrumentation-http' });
- * cLogger.debug('test');
- * // @opentelemetry/instrumentation-http test
+ * An implementation of the {@link TracerProvider} which returns an impotent
+ * Tracer for all calls to `getTracer`.
+ *
+ * All operations are no-op.
*/
-class DiagComponentLogger {
- constructor(props) {
- this._namespace = props.namespace || 'DiagComponentLogger';
- }
- debug(...args) {
- return logProxy('debug', this._namespace, args);
- }
- error(...args) {
- return logProxy('error', this._namespace, args);
- }
- info(...args) {
- return logProxy('info', this._namespace, args);
- }
- warn(...args) {
- return logProxy('warn', this._namespace, args);
- }
- verbose(...args) {
- return logProxy('verbose', this._namespace, args);
- }
-}
-exports.DiagComponentLogger = DiagComponentLogger;
-function logProxy(funcName, namespace, args) {
- const logger = (0, global_utils_1.getGlobal)('diag');
- // shortcut if logger not set
- if (!logger) {
- return;
+class NoopTracerProvider {
+ getTracer(_name, _version, _options) {
+ return new NoopTracer_1.NoopTracer();
}
- args.unshift(namespace);
- return logger[funcName](...args);
}
-//# sourceMappingURL=ComponentLogger.js.map
+exports.NoopTracerProvider = NoopTracerProvider;
+//# sourceMappingURL=NoopTracerProvider.js.map
/***/ }),
-/***/ 3041:
-/***/ ((__unused_webpack_module, exports) => {
+/***/ 3503:
+/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
@@ -43145,50 +40741,48 @@ function logProxy(funcName, namespace, args) {
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.DiagConsoleLogger = void 0;
-const consoleMap = [
- { n: 'error', c: 'error' },
- { n: 'warn', c: 'warn' },
- { n: 'info', c: 'info' },
- { n: 'debug', c: 'debug' },
- { n: 'verbose', c: 'trace' },
-];
+exports.ProxyTracer = void 0;
+const NoopTracer_1 = __nccwpck_require__(7606);
+const NOOP_TRACER = new NoopTracer_1.NoopTracer();
/**
- * A simple Immutable Console based diagnostic logger which will output any messages to the Console.
- * If you want to limit the amount of logging to a specific level or lower use the
- * {@link createLogLevelDiagLogger}
+ * Proxy tracer provided by the proxy tracer provider
*/
-class DiagConsoleLogger {
- constructor() {
- function _consoleFunc(funcName) {
- return function (...args) {
- if (console) {
- // Some environments only expose the console when the F12 developer console is open
- // eslint-disable-next-line no-console
- let theFunc = console[funcName];
- if (typeof theFunc !== 'function') {
- // Not all environments support all functions
- // eslint-disable-next-line no-console
- theFunc = console.log;
- }
- // One last final check
- if (typeof theFunc === 'function') {
- return theFunc.apply(console, args);
- }
- }
- };
+class ProxyTracer {
+ constructor(_provider, name, version, options) {
+ this._provider = _provider;
+ this.name = name;
+ this.version = version;
+ this.options = options;
+ }
+ startSpan(name, options, context) {
+ return this._getTracer().startSpan(name, options, context);
+ }
+ startActiveSpan(_name, _options, _context, _fn) {
+ const tracer = this._getTracer();
+ return Reflect.apply(tracer.startActiveSpan, tracer, arguments);
+ }
+ /**
+ * Try to get a tracer from the proxy tracer provider.
+ * If the proxy tracer provider has no delegate, return a noop tracer.
+ */
+ _getTracer() {
+ if (this._delegate) {
+ return this._delegate;
}
- for (let i = 0; i < consoleMap.length; i++) {
- this[consoleMap[i].n] = _consoleFunc(consoleMap[i].c);
+ const tracer = this._provider.getDelegateTracer(this.name, this.version, this.options);
+ if (!tracer) {
+ return NOOP_TRACER;
}
+ this._delegate = tracer;
+ return this._delegate;
}
}
-exports.DiagConsoleLogger = DiagConsoleLogger;
-//# sourceMappingURL=consoleLogger.js.map
+exports.ProxyTracer = ProxyTracer;
+//# sourceMappingURL=ProxyTracer.js.map
/***/ }),
-/***/ 9639:
+/***/ 2285:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
@@ -43209,38 +40803,47 @@ exports.DiagConsoleLogger = DiagConsoleLogger;
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.createLogLevelDiagLogger = void 0;
-const types_1 = __nccwpck_require__(8077);
-function createLogLevelDiagLogger(maxLevel, logger) {
- if (maxLevel < types_1.DiagLogLevel.NONE) {
- maxLevel = types_1.DiagLogLevel.NONE;
+exports.ProxyTracerProvider = void 0;
+const ProxyTracer_1 = __nccwpck_require__(3503);
+const NoopTracerProvider_1 = __nccwpck_require__(3259);
+const NOOP_TRACER_PROVIDER = new NoopTracerProvider_1.NoopTracerProvider();
+/**
+ * Tracer provider which provides {@link ProxyTracer}s.
+ *
+ * Before a delegate is set, tracers provided are NoOp.
+ * When a delegate is set, traces are provided from the delegate.
+ * When a delegate is set after tracers have already been provided,
+ * all tracers already provided will use the provided delegate implementation.
+ */
+class ProxyTracerProvider {
+ /**
+ * Get a {@link ProxyTracer}
+ */
+ getTracer(name, version, options) {
+ var _a;
+ return ((_a = this.getDelegateTracer(name, version, options)) !== null && _a !== void 0 ? _a : new ProxyTracer_1.ProxyTracer(this, name, version, options));
}
- else if (maxLevel > types_1.DiagLogLevel.ALL) {
- maxLevel = types_1.DiagLogLevel.ALL;
+ getDelegate() {
+ var _a;
+ return (_a = this._delegate) !== null && _a !== void 0 ? _a : NOOP_TRACER_PROVIDER;
}
- // In case the logger is null or undefined
- logger = logger || {};
- function _filterFunc(funcName, theLevel) {
- const theFunc = logger[funcName];
- if (typeof theFunc === 'function' && maxLevel >= theLevel) {
- return theFunc.bind(logger);
- }
- return function () { };
+ /**
+ * Set the delegate tracer provider
+ */
+ setDelegate(delegate) {
+ this._delegate = delegate;
+ }
+ getDelegateTracer(name, version, options) {
+ var _a;
+ return (_a = this._delegate) === null || _a === void 0 ? void 0 : _a.getTracer(name, version, options);
}
- return {
- error: _filterFunc('error', types_1.DiagLogLevel.ERROR),
- warn: _filterFunc('warn', types_1.DiagLogLevel.WARN),
- info: _filterFunc('info', types_1.DiagLogLevel.INFO),
- debug: _filterFunc('debug', types_1.DiagLogLevel.DEBUG),
- verbose: _filterFunc('verbose', types_1.DiagLogLevel.VERBOSE),
- };
}
-exports.createLogLevelDiagLogger = createLogLevelDiagLogger;
-//# sourceMappingURL=logLevelLogger.js.map
+exports.ProxyTracerProvider = ProxyTracerProvider;
+//# sourceMappingURL=ProxyTracerProvider.js.map
/***/ }),
-/***/ 8077:
+/***/ 3209:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
@@ -43261,37 +40864,35 @@ exports.createLogLevelDiagLogger = createLogLevelDiagLogger;
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.DiagLogLevel = void 0;
+exports.SamplingDecision = void 0;
/**
- * Defines the available internal logging levels for the diagnostic logger, the numeric values
- * of the levels are defined to match the original values from the initial LogLevel to avoid
- * compatibility/migration issues for any implementation that assume the numeric ordering.
+ * @deprecated use the one declared in @opentelemetry/sdk-trace-base instead.
+ * A sampling decision that determines how a {@link Span} will be recorded
+ * and collected.
*/
-var DiagLogLevel;
-(function (DiagLogLevel) {
- /** Diagnostic Logging level setting to disable all logging (except and forced logs) */
- DiagLogLevel[DiagLogLevel["NONE"] = 0] = "NONE";
- /** Identifies an error scenario */
- DiagLogLevel[DiagLogLevel["ERROR"] = 30] = "ERROR";
- /** Identifies a warning scenario */
- DiagLogLevel[DiagLogLevel["WARN"] = 50] = "WARN";
- /** General informational log message */
- DiagLogLevel[DiagLogLevel["INFO"] = 60] = "INFO";
- /** General debug log message */
- DiagLogLevel[DiagLogLevel["DEBUG"] = 70] = "DEBUG";
+var SamplingDecision;
+(function (SamplingDecision) {
/**
- * Detailed trace level logging should only be used for development, should only be set
- * in a development environment.
+ * `Span.isRecording() === false`, span will not be recorded and all events
+ * and attributes will be dropped.
*/
- DiagLogLevel[DiagLogLevel["VERBOSE"] = 80] = "VERBOSE";
- /** Used to set the logging level to include all logging */
- DiagLogLevel[DiagLogLevel["ALL"] = 9999] = "ALL";
-})(DiagLogLevel = exports.DiagLogLevel || (exports.DiagLogLevel = {}));
-//# sourceMappingURL=types.js.map
+ SamplingDecision[SamplingDecision["NOT_RECORD"] = 0] = "NOT_RECORD";
+ /**
+ * `Span.isRecording() === true`, but `Sampled` flag in {@link TraceFlags}
+ * MUST NOT be set.
+ */
+ SamplingDecision[SamplingDecision["RECORD"] = 1] = "RECORD";
+ /**
+ * `Span.isRecording() === true` AND `Sampled` flag in {@link TraceFlags}
+ * MUST be set.
+ */
+ SamplingDecision[SamplingDecision["RECORD_AND_SAMPLED"] = 2] = "RECORD_AND_SAMPLED";
+})(SamplingDecision = exports.SamplingDecision || (exports.SamplingDecision = {}));
+//# sourceMappingURL=SamplingResult.js.map
/***/ }),
-/***/ 5163:
+/***/ 3326:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
@@ -43312,74 +40913,75 @@ var DiagLogLevel;
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.trace = exports.propagation = exports.metrics = exports.diag = exports.context = exports.INVALID_SPAN_CONTEXT = exports.INVALID_TRACEID = exports.INVALID_SPANID = exports.isValidSpanId = exports.isValidTraceId = exports.isSpanContextValid = exports.createTraceState = exports.TraceFlags = exports.SpanStatusCode = exports.SpanKind = exports.SamplingDecision = exports.ProxyTracerProvider = exports.ProxyTracer = exports.defaultTextMapSetter = exports.defaultTextMapGetter = exports.ValueType = exports.createNoopMeter = exports.DiagLogLevel = exports.DiagConsoleLogger = exports.ROOT_CONTEXT = exports.createContextKey = exports.baggageEntryMetadataFromString = void 0;
-var utils_1 = __nccwpck_require__(8136);
-Object.defineProperty(exports, "baggageEntryMetadataFromString", ({ enumerable: true, get: function () { return utils_1.baggageEntryMetadataFromString; } }));
-// Context APIs
-var context_1 = __nccwpck_require__(8242);
-Object.defineProperty(exports, "createContextKey", ({ enumerable: true, get: function () { return context_1.createContextKey; } }));
-Object.defineProperty(exports, "ROOT_CONTEXT", ({ enumerable: true, get: function () { return context_1.ROOT_CONTEXT; } }));
-// Diag APIs
-var consoleLogger_1 = __nccwpck_require__(3041);
-Object.defineProperty(exports, "DiagConsoleLogger", ({ enumerable: true, get: function () { return consoleLogger_1.DiagConsoleLogger; } }));
-var types_1 = __nccwpck_require__(8077);
-Object.defineProperty(exports, "DiagLogLevel", ({ enumerable: true, get: function () { return types_1.DiagLogLevel; } }));
-// Metrics APIs
-var NoopMeter_1 = __nccwpck_require__(4837);
-Object.defineProperty(exports, "createNoopMeter", ({ enumerable: true, get: function () { return NoopMeter_1.createNoopMeter; } }));
-var Metric_1 = __nccwpck_require__(9999);
-Object.defineProperty(exports, "ValueType", ({ enumerable: true, get: function () { return Metric_1.ValueType; } }));
-// Propagation APIs
-var TextMapPropagator_1 = __nccwpck_require__(865);
-Object.defineProperty(exports, "defaultTextMapGetter", ({ enumerable: true, get: function () { return TextMapPropagator_1.defaultTextMapGetter; } }));
-Object.defineProperty(exports, "defaultTextMapSetter", ({ enumerable: true, get: function () { return TextMapPropagator_1.defaultTextMapSetter; } }));
-var ProxyTracer_1 = __nccwpck_require__(3503);
-Object.defineProperty(exports, "ProxyTracer", ({ enumerable: true, get: function () { return ProxyTracer_1.ProxyTracer; } }));
-var ProxyTracerProvider_1 = __nccwpck_require__(2285);
-Object.defineProperty(exports, "ProxyTracerProvider", ({ enumerable: true, get: function () { return ProxyTracerProvider_1.ProxyTracerProvider; } }));
-var SamplingResult_1 = __nccwpck_require__(3209);
-Object.defineProperty(exports, "SamplingDecision", ({ enumerable: true, get: function () { return SamplingResult_1.SamplingDecision; } }));
-var span_kind_1 = __nccwpck_require__(1424);
-Object.defineProperty(exports, "SpanKind", ({ enumerable: true, get: function () { return span_kind_1.SpanKind; } }));
-var status_1 = __nccwpck_require__(8845);
-Object.defineProperty(exports, "SpanStatusCode", ({ enumerable: true, get: function () { return status_1.SpanStatusCode; } }));
-var trace_flags_1 = __nccwpck_require__(6905);
-Object.defineProperty(exports, "TraceFlags", ({ enumerable: true, get: function () { return trace_flags_1.TraceFlags; } }));
-var utils_2 = __nccwpck_require__(2615);
-Object.defineProperty(exports, "createTraceState", ({ enumerable: true, get: function () { return utils_2.createTraceState; } }));
-var spancontext_utils_1 = __nccwpck_require__(9745);
-Object.defineProperty(exports, "isSpanContextValid", ({ enumerable: true, get: function () { return spancontext_utils_1.isSpanContextValid; } }));
-Object.defineProperty(exports, "isValidTraceId", ({ enumerable: true, get: function () { return spancontext_utils_1.isValidTraceId; } }));
-Object.defineProperty(exports, "isValidSpanId", ({ enumerable: true, get: function () { return spancontext_utils_1.isValidSpanId; } }));
-var invalid_span_constants_1 = __nccwpck_require__(1760);
-Object.defineProperty(exports, "INVALID_SPANID", ({ enumerable: true, get: function () { return invalid_span_constants_1.INVALID_SPANID; } }));
-Object.defineProperty(exports, "INVALID_TRACEID", ({ enumerable: true, get: function () { return invalid_span_constants_1.INVALID_TRACEID; } }));
-Object.defineProperty(exports, "INVALID_SPAN_CONTEXT", ({ enumerable: true, get: function () { return invalid_span_constants_1.INVALID_SPAN_CONTEXT; } }));
-// Split module-level variable definition into separate files to allow
-// tree-shaking on each api instance.
-const context_api_1 = __nccwpck_require__(7393);
-Object.defineProperty(exports, "context", ({ enumerable: true, get: function () { return context_api_1.context; } }));
-const diag_api_1 = __nccwpck_require__(9721);
-Object.defineProperty(exports, "diag", ({ enumerable: true, get: function () { return diag_api_1.diag; } }));
-const metrics_api_1 = __nccwpck_require__(2601);
-Object.defineProperty(exports, "metrics", ({ enumerable: true, get: function () { return metrics_api_1.metrics; } }));
-const propagation_api_1 = __nccwpck_require__(7591);
-Object.defineProperty(exports, "propagation", ({ enumerable: true, get: function () { return propagation_api_1.propagation; } }));
-const trace_api_1 = __nccwpck_require__(8989);
-Object.defineProperty(exports, "trace", ({ enumerable: true, get: function () { return trace_api_1.trace; } }));
-// Default export.
-exports["default"] = {
- context: context_api_1.context,
- diag: diag_api_1.diag,
- metrics: metrics_api_1.metrics,
- propagation: propagation_api_1.propagation,
- trace: trace_api_1.trace,
-};
-//# sourceMappingURL=index.js.map
+exports.getSpanContext = exports.setSpanContext = exports.deleteSpan = exports.setSpan = exports.getActiveSpan = exports.getSpan = void 0;
+const context_1 = __nccwpck_require__(8242);
+const NonRecordingSpan_1 = __nccwpck_require__(1462);
+const context_2 = __nccwpck_require__(7171);
+/**
+ * span key
+ */
+const SPAN_KEY = (0, context_1.createContextKey)('OpenTelemetry Context Key SPAN');
+/**
+ * Return the span if one exists
+ *
+ * @param context context to get span from
+ */
+function getSpan(context) {
+ return context.getValue(SPAN_KEY) || undefined;
+}
+exports.getSpan = getSpan;
+/**
+ * Gets the span from the current context, if one exists.
+ */
+function getActiveSpan() {
+ return getSpan(context_2.ContextAPI.getInstance().active());
+}
+exports.getActiveSpan = getActiveSpan;
+/**
+ * Set the span on a context
+ *
+ * @param context context to use as parent
+ * @param span span to set active
+ */
+function setSpan(context, span) {
+ return context.setValue(SPAN_KEY, span);
+}
+exports.setSpan = setSpan;
+/**
+ * Remove current span stored in the context
+ *
+ * @param context context to delete span from
+ */
+function deleteSpan(context) {
+ return context.deleteValue(SPAN_KEY);
+}
+exports.deleteSpan = deleteSpan;
+/**
+ * Wrap span context in a NoopSpan and set as span in a new
+ * context
+ *
+ * @param context context to set active span on
+ * @param spanContext span context to be wrapped
+ */
+function setSpanContext(context, spanContext) {
+ return setSpan(context, new NonRecordingSpan_1.NonRecordingSpan(spanContext));
+}
+exports.setSpanContext = setSpanContext;
+/**
+ * Get the span context of the span if it exists.
+ *
+ * @param context context to get values from
+ */
+function getSpanContext(context) {
+ var _a;
+ return (_a = getSpan(context)) === null || _a === void 0 ? void 0 : _a.spanContext();
+}
+exports.getSpanContext = getSpanContext;
+//# sourceMappingURL=context-utils.js.map
/***/ }),
-/***/ 5135:
+/***/ 2110:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
@@ -43400,58 +41002,97 @@ exports["default"] = {
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.unregisterGlobal = exports.getGlobal = exports.registerGlobal = void 0;
-const platform_1 = __nccwpck_require__(9957);
-const version_1 = __nccwpck_require__(8996);
-const semver_1 = __nccwpck_require__(1522);
-const major = version_1.VERSION.split('.')[0];
-const GLOBAL_OPENTELEMETRY_API_KEY = Symbol.for(`opentelemetry.js.api.${major}`);
-const _global = platform_1._globalThis;
-function registerGlobal(type, instance, diag, allowOverride = false) {
- var _a;
- const api = (_global[GLOBAL_OPENTELEMETRY_API_KEY] = (_a = _global[GLOBAL_OPENTELEMETRY_API_KEY]) !== null && _a !== void 0 ? _a : {
- version: version_1.VERSION,
- });
- if (!allowOverride && api[type]) {
- // already registered an API of this type
- const err = new Error(`@opentelemetry/api: Attempted duplicate registration of API: ${type}`);
- diag.error(err.stack || err.message);
- return false;
+exports.TraceStateImpl = void 0;
+const tracestate_validators_1 = __nccwpck_require__(4864);
+const MAX_TRACE_STATE_ITEMS = 32;
+const MAX_TRACE_STATE_LEN = 512;
+const LIST_MEMBERS_SEPARATOR = ',';
+const LIST_MEMBER_KEY_VALUE_SPLITTER = '=';
+/**
+ * TraceState must be a class and not a simple object type because of the spec
+ * requirement (https://www.w3.org/TR/trace-context/#tracestate-field).
+ *
+ * Here is the list of allowed mutations:
+ * - New key-value pair should be added into the beginning of the list
+ * - The value of any key can be updated. Modified keys MUST be moved to the
+ * beginning of the list.
+ */
+class TraceStateImpl {
+ constructor(rawTraceState) {
+ this._internalState = new Map();
+ if (rawTraceState)
+ this._parse(rawTraceState);
}
- if (api.version !== version_1.VERSION) {
- // All registered APIs must be of the same version exactly
- const err = new Error(`@opentelemetry/api: Registration of version v${api.version} for ${type} does not match previously registered API v${version_1.VERSION}`);
- diag.error(err.stack || err.message);
- return false;
+ set(key, value) {
+ // TODO: Benchmark the different approaches(map vs list) and
+ // use the faster one.
+ const traceState = this._clone();
+ if (traceState._internalState.has(key)) {
+ traceState._internalState.delete(key);
+ }
+ traceState._internalState.set(key, value);
+ return traceState;
}
- api[type] = instance;
- diag.debug(`@opentelemetry/api: Registered a global for ${type} v${version_1.VERSION}.`);
- return true;
-}
-exports.registerGlobal = registerGlobal;
-function getGlobal(type) {
- var _a, _b;
- const globalVersion = (_a = _global[GLOBAL_OPENTELEMETRY_API_KEY]) === null || _a === void 0 ? void 0 : _a.version;
- if (!globalVersion || !(0, semver_1.isCompatible)(globalVersion)) {
- return;
+ unset(key) {
+ const traceState = this._clone();
+ traceState._internalState.delete(key);
+ return traceState;
}
- return (_b = _global[GLOBAL_OPENTELEMETRY_API_KEY]) === null || _b === void 0 ? void 0 : _b[type];
-}
-exports.getGlobal = getGlobal;
-function unregisterGlobal(type, diag) {
- diag.debug(`@opentelemetry/api: Unregistering a global for ${type} v${version_1.VERSION}.`);
- const api = _global[GLOBAL_OPENTELEMETRY_API_KEY];
- if (api) {
- delete api[type];
+ get(key) {
+ return this._internalState.get(key);
+ }
+ serialize() {
+ return this._keys()
+ .reduce((agg, key) => {
+ agg.push(key + LIST_MEMBER_KEY_VALUE_SPLITTER + this.get(key));
+ return agg;
+ }, [])
+ .join(LIST_MEMBERS_SEPARATOR);
+ }
+ _parse(rawTraceState) {
+ if (rawTraceState.length > MAX_TRACE_STATE_LEN)
+ return;
+ this._internalState = rawTraceState
+ .split(LIST_MEMBERS_SEPARATOR)
+ .reverse() // Store in reverse so new keys (.set(...)) will be placed at the beginning
+ .reduce((agg, part) => {
+ const listMember = part.trim(); // Optional Whitespace (OWS) handling
+ const i = listMember.indexOf(LIST_MEMBER_KEY_VALUE_SPLITTER);
+ if (i !== -1) {
+ const key = listMember.slice(0, i);
+ const value = listMember.slice(i + 1, part.length);
+ if ((0, tracestate_validators_1.validateKey)(key) && (0, tracestate_validators_1.validateValue)(value)) {
+ agg.set(key, value);
+ }
+ else {
+ // TODO: Consider to add warning log
+ }
+ }
+ return agg;
+ }, new Map());
+ // Because of the reverse() requirement, trunc must be done after map is created
+ if (this._internalState.size > MAX_TRACE_STATE_ITEMS) {
+ this._internalState = new Map(Array.from(this._internalState.entries())
+ .reverse() // Use reverse same as original tracestate parse chain
+ .slice(0, MAX_TRACE_STATE_ITEMS));
+ }
+ }
+ _keys() {
+ return Array.from(this._internalState.keys()).reverse();
+ }
+ _clone() {
+ const traceState = new TraceStateImpl();
+ traceState._internalState = new Map(this._internalState);
+ return traceState;
}
}
-exports.unregisterGlobal = unregisterGlobal;
-//# sourceMappingURL=global-utils.js.map
+exports.TraceStateImpl = TraceStateImpl;
+//# sourceMappingURL=tracestate-impl.js.map
/***/ }),
-/***/ 1522:
-/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
+/***/ 4864:
+/***/ ((__unused_webpack_module, exports) => {
"use strict";
@@ -43471,115 +41112,39 @@ exports.unregisterGlobal = unregisterGlobal;
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.isCompatible = exports._makeCompatibilityCheck = void 0;
-const version_1 = __nccwpck_require__(8996);
-const re = /^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;
+exports.validateValue = exports.validateKey = void 0;
+const VALID_KEY_CHAR_RANGE = '[_0-9a-z-*/]';
+const VALID_KEY = `[a-z]${VALID_KEY_CHAR_RANGE}{0,255}`;
+const VALID_VENDOR_KEY = `[a-z0-9]${VALID_KEY_CHAR_RANGE}{0,240}@[a-z]${VALID_KEY_CHAR_RANGE}{0,13}`;
+const VALID_KEY_REGEX = new RegExp(`^(?:${VALID_KEY}|${VALID_VENDOR_KEY})$`);
+const VALID_VALUE_BASE_REGEX = /^[ -~]{0,255}[!-~]$/;
+const INVALID_VALUE_COMMA_EQUAL_REGEX = /,|=/;
/**
- * Create a function to test an API version to see if it is compatible with the provided ownVersion.
- *
- * The returned function has the following semantics:
- * - Exact match is always compatible
- * - Major versions must match exactly
- * - 1.x package cannot use global 2.x package
- * - 2.x package cannot use global 1.x package
- * - The minor version of the API module requesting access to the global API must be less than or equal to the minor version of this API
- * - 1.3 package may use 1.4 global because the later global contains all functions 1.3 expects
- * - 1.4 package may NOT use 1.3 global because it may try to call functions which don't exist on 1.3
- * - If the major version is 0, the minor version is treated as the major and the patch is treated as the minor
- * - Patch and build tag differences are not considered at this time
- *
- * @param ownVersion version which should be checked against
+ * Key is opaque string up to 256 characters printable. It MUST begin with a
+ * lowercase letter, and can only contain lowercase letters a-z, digits 0-9,
+ * underscores _, dashes -, asterisks *, and forward slashes /.
+ * For multi-tenant vendor scenarios, an at sign (@) can be used to prefix the
+ * vendor name. Vendors SHOULD set the tenant ID at the beginning of the key.
+ * see https://www.w3.org/TR/trace-context/#key
*/
-function _makeCompatibilityCheck(ownVersion) {
- const acceptedVersions = new Set([ownVersion]);
- const rejectedVersions = new Set();
- const myVersionMatch = ownVersion.match(re);
- if (!myVersionMatch) {
- // we cannot guarantee compatibility so we always return noop
- return () => false;
- }
- const ownVersionParsed = {
- major: +myVersionMatch[1],
- minor: +myVersionMatch[2],
- patch: +myVersionMatch[3],
- prerelease: myVersionMatch[4],
- };
- // if ownVersion has a prerelease tag, versions must match exactly
- if (ownVersionParsed.prerelease != null) {
- return function isExactmatch(globalVersion) {
- return globalVersion === ownVersion;
- };
- }
- function _reject(v) {
- rejectedVersions.add(v);
- return false;
- }
- function _accept(v) {
- acceptedVersions.add(v);
- return true;
- }
- return function isCompatible(globalVersion) {
- if (acceptedVersions.has(globalVersion)) {
- return true;
- }
- if (rejectedVersions.has(globalVersion)) {
- return false;
- }
- const globalVersionMatch = globalVersion.match(re);
- if (!globalVersionMatch) {
- // cannot parse other version
- // we cannot guarantee compatibility so we always noop
- return _reject(globalVersion);
- }
- const globalVersionParsed = {
- major: +globalVersionMatch[1],
- minor: +globalVersionMatch[2],
- patch: +globalVersionMatch[3],
- prerelease: globalVersionMatch[4],
- };
- // if globalVersion has a prerelease tag, versions must match exactly
- if (globalVersionParsed.prerelease != null) {
- return _reject(globalVersion);
- }
- // major versions must match
- if (ownVersionParsed.major !== globalVersionParsed.major) {
- return _reject(globalVersion);
- }
- if (ownVersionParsed.major === 0) {
- if (ownVersionParsed.minor === globalVersionParsed.minor &&
- ownVersionParsed.patch <= globalVersionParsed.patch) {
- return _accept(globalVersion);
- }
- return _reject(globalVersion);
- }
- if (ownVersionParsed.minor <= globalVersionParsed.minor) {
- return _accept(globalVersion);
- }
- return _reject(globalVersion);
- };
+function validateKey(key) {
+ return VALID_KEY_REGEX.test(key);
}
-exports._makeCompatibilityCheck = _makeCompatibilityCheck;
+exports.validateKey = validateKey;
/**
- * Test an API version to see if it is compatible with this API.
- *
- * - Exact match is always compatible
- * - Major versions must match exactly
- * - 1.x package cannot use global 2.x package
- * - 2.x package cannot use global 1.x package
- * - The minor version of the API module requesting access to the global API must be less than or equal to the minor version of this API
- * - 1.3 package may use 1.4 global because the later global contains all functions 1.3 expects
- * - 1.4 package may NOT use 1.3 global because it may try to call functions which don't exist on 1.3
- * - If the major version is 0, the minor version is treated as the major and the patch is treated as the minor
- * - Patch and build tag differences are not considered at this time
- *
- * @param version version of the API requesting an instance of the global API
+ * Value is opaque string up to 256 characters printable ASCII RFC0020
+ * characters (i.e., the range 0x20 to 0x7E) except comma , and =.
*/
-exports.isCompatible = _makeCompatibilityCheck(version_1.VERSION);
-//# sourceMappingURL=semver.js.map
+function validateValue(value) {
+ return (VALID_VALUE_BASE_REGEX.test(value) &&
+ !INVALID_VALUE_COMMA_EQUAL_REGEX.test(value));
+}
+exports.validateValue = validateValue;
+//# sourceMappingURL=tracestate-validators.js.map
/***/ }),
-/***/ 2601:
+/***/ 2615:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
@@ -43600,18 +41165,18 @@ exports.isCompatible = _makeCompatibilityCheck(version_1.VERSION);
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.metrics = void 0;
-// Split module-level variable definition into separate files to allow
-// tree-shaking on each api instance.
-const metrics_1 = __nccwpck_require__(7696);
-/** Entrypoint for metrics API */
-exports.metrics = metrics_1.MetricsAPI.getInstance();
-//# sourceMappingURL=metrics-api.js.map
+exports.createTraceState = void 0;
+const tracestate_impl_1 = __nccwpck_require__(2110);
+function createTraceState(rawTraceState) {
+ return new tracestate_impl_1.TraceStateImpl(rawTraceState);
+}
+exports.createTraceState = createTraceState;
+//# sourceMappingURL=utils.js.map
/***/ }),
-/***/ 9999:
-/***/ ((__unused_webpack_module, exports) => {
+/***/ 1760:
+/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
@@ -43631,22 +41196,26 @@ exports.metrics = metrics_1.MetricsAPI.getInstance();
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.ValueType = void 0;
-/** The Type of value. It describes how the data is reported. */
-var ValueType;
-(function (ValueType) {
- ValueType[ValueType["INT"] = 0] = "INT";
- ValueType[ValueType["DOUBLE"] = 1] = "DOUBLE";
-})(ValueType = exports.ValueType || (exports.ValueType = {}));
-//# sourceMappingURL=Metric.js.map
+exports.INVALID_SPAN_CONTEXT = exports.INVALID_TRACEID = exports.INVALID_SPANID = void 0;
+const trace_flags_1 = __nccwpck_require__(6905);
+exports.INVALID_SPANID = '0000000000000000';
+exports.INVALID_TRACEID = '00000000000000000000000000000000';
+exports.INVALID_SPAN_CONTEXT = {
+ traceId: exports.INVALID_TRACEID,
+ spanId: exports.INVALID_SPANID,
+ traceFlags: trace_flags_1.TraceFlags.NONE,
+};
+//# sourceMappingURL=invalid-span-constants.js.map
/***/ }),
-/***/ 4837:
+/***/ 1424:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.SpanKind = void 0;
/*
* Copyright The OpenTelemetry Authors
*
@@ -43662,152 +41231,130 @@ var ValueType;
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.createNoopMeter = exports.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC = exports.NOOP_OBSERVABLE_GAUGE_METRIC = exports.NOOP_OBSERVABLE_COUNTER_METRIC = exports.NOOP_UP_DOWN_COUNTER_METRIC = exports.NOOP_HISTOGRAM_METRIC = exports.NOOP_COUNTER_METRIC = exports.NOOP_METER = exports.NoopObservableUpDownCounterMetric = exports.NoopObservableGaugeMetric = exports.NoopObservableCounterMetric = exports.NoopObservableMetric = exports.NoopHistogramMetric = exports.NoopUpDownCounterMetric = exports.NoopCounterMetric = exports.NoopMetric = exports.NoopMeter = void 0;
-/**
- * NoopMeter is a noop implementation of the {@link Meter} interface. It reuses
- * constant NoopMetrics for all of its methods.
- */
-class NoopMeter {
- constructor() { }
- /**
- * @see {@link Meter.createHistogram}
- */
- createHistogram(_name, _options) {
- return exports.NOOP_HISTOGRAM_METRIC;
- }
- /**
- * @see {@link Meter.createCounter}
- */
- createCounter(_name, _options) {
- return exports.NOOP_COUNTER_METRIC;
- }
- /**
- * @see {@link Meter.createUpDownCounter}
- */
- createUpDownCounter(_name, _options) {
- return exports.NOOP_UP_DOWN_COUNTER_METRIC;
- }
- /**
- * @see {@link Meter.createObservableGauge}
- */
- createObservableGauge(_name, _options) {
- return exports.NOOP_OBSERVABLE_GAUGE_METRIC;
- }
+var SpanKind;
+(function (SpanKind) {
+ /** Default value. Indicates that the span is used internally. */
+ SpanKind[SpanKind["INTERNAL"] = 0] = "INTERNAL";
/**
- * @see {@link Meter.createObservableCounter}
+ * Indicates that the span covers server-side handling of an RPC or other
+ * remote request.
*/
- createObservableCounter(_name, _options) {
- return exports.NOOP_OBSERVABLE_COUNTER_METRIC;
- }
+ SpanKind[SpanKind["SERVER"] = 1] = "SERVER";
/**
- * @see {@link Meter.createObservableUpDownCounter}
+ * Indicates that the span covers the client-side wrapper around an RPC or
+ * other remote request.
*/
- createObservableUpDownCounter(_name, _options) {
- return exports.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC;
- }
+ SpanKind[SpanKind["CLIENT"] = 2] = "CLIENT";
/**
- * @see {@link Meter.addBatchObservableCallback}
+ * Indicates that the span describes producer sending a message to a
+ * broker. Unlike client and server, there is no direct critical path latency
+ * relationship between producer and consumer spans.
*/
- addBatchObservableCallback(_callback, _observables) { }
+ SpanKind[SpanKind["PRODUCER"] = 3] = "PRODUCER";
/**
- * @see {@link Meter.removeBatchObservableCallback}
+ * Indicates that the span describes consumer receiving a message from a
+ * broker. Unlike client and server, there is no direct critical path latency
+ * relationship between producer and consumer spans.
*/
- removeBatchObservableCallback(_callback) { }
-}
-exports.NoopMeter = NoopMeter;
-class NoopMetric {
+ SpanKind[SpanKind["CONSUMER"] = 4] = "CONSUMER";
+})(SpanKind = exports.SpanKind || (exports.SpanKind = {}));
+//# sourceMappingURL=span_kind.js.map
+
+/***/ }),
+
+/***/ 9745:
+/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
+
+"use strict";
+
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.wrapSpanContext = exports.isSpanContextValid = exports.isValidSpanId = exports.isValidTraceId = void 0;
+/*
+ * Copyright The OpenTelemetry Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+const invalid_span_constants_1 = __nccwpck_require__(1760);
+const NonRecordingSpan_1 = __nccwpck_require__(1462);
+const VALID_TRACEID_REGEX = /^([0-9a-f]{32})$/i;
+const VALID_SPANID_REGEX = /^[0-9a-f]{16}$/i;
+function isValidTraceId(traceId) {
+ return VALID_TRACEID_REGEX.test(traceId) && traceId !== invalid_span_constants_1.INVALID_TRACEID;
}
-exports.NoopMetric = NoopMetric;
-class NoopCounterMetric extends NoopMetric {
- add(_value, _attributes) { }
-}
-exports.NoopCounterMetric = NoopCounterMetric;
-class NoopUpDownCounterMetric extends NoopMetric {
- add(_value, _attributes) { }
-}
-exports.NoopUpDownCounterMetric = NoopUpDownCounterMetric;
-class NoopHistogramMetric extends NoopMetric {
- record(_value, _attributes) { }
-}
-exports.NoopHistogramMetric = NoopHistogramMetric;
-class NoopObservableMetric {
- addCallback(_callback) { }
- removeCallback(_callback) { }
-}
-exports.NoopObservableMetric = NoopObservableMetric;
-class NoopObservableCounterMetric extends NoopObservableMetric {
-}
-exports.NoopObservableCounterMetric = NoopObservableCounterMetric;
-class NoopObservableGaugeMetric extends NoopObservableMetric {
+exports.isValidTraceId = isValidTraceId;
+function isValidSpanId(spanId) {
+ return VALID_SPANID_REGEX.test(spanId) && spanId !== invalid_span_constants_1.INVALID_SPANID;
}
-exports.NoopObservableGaugeMetric = NoopObservableGaugeMetric;
-class NoopObservableUpDownCounterMetric extends NoopObservableMetric {
+exports.isValidSpanId = isValidSpanId;
+/**
+ * Returns true if this {@link SpanContext} is valid.
+ * @return true if this {@link SpanContext} is valid.
+ */
+function isSpanContextValid(spanContext) {
+ return (isValidTraceId(spanContext.traceId) && isValidSpanId(spanContext.spanId));
}
-exports.NoopObservableUpDownCounterMetric = NoopObservableUpDownCounterMetric;
-exports.NOOP_METER = new NoopMeter();
-// Synchronous instruments
-exports.NOOP_COUNTER_METRIC = new NoopCounterMetric();
-exports.NOOP_HISTOGRAM_METRIC = new NoopHistogramMetric();
-exports.NOOP_UP_DOWN_COUNTER_METRIC = new NoopUpDownCounterMetric();
-// Asynchronous instruments
-exports.NOOP_OBSERVABLE_COUNTER_METRIC = new NoopObservableCounterMetric();
-exports.NOOP_OBSERVABLE_GAUGE_METRIC = new NoopObservableGaugeMetric();
-exports.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC = new NoopObservableUpDownCounterMetric();
+exports.isSpanContextValid = isSpanContextValid;
/**
- * Create a no-op Meter
+ * Wrap the given {@link SpanContext} in a new non-recording {@link Span}
+ *
+ * @param spanContext span context to be wrapped
+ * @returns a new non-recording {@link Span} with the provided context
*/
-function createNoopMeter() {
- return exports.NOOP_METER;
+function wrapSpanContext(spanContext) {
+ return new NonRecordingSpan_1.NonRecordingSpan(spanContext);
}
-exports.createNoopMeter = createNoopMeter;
-//# sourceMappingURL=NoopMeter.js.map
+exports.wrapSpanContext = wrapSpanContext;
+//# sourceMappingURL=spancontext-utils.js.map
/***/ }),
-/***/ 2647:
-/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
+/***/ 8845:
+/***/ ((__unused_webpack_module, exports) => {
"use strict";
-/*
- * Copyright The OpenTelemetry Authors
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.NOOP_METER_PROVIDER = exports.NoopMeterProvider = void 0;
-const NoopMeter_1 = __nccwpck_require__(4837);
+exports.SpanStatusCode = void 0;
/**
- * An implementation of the {@link MeterProvider} which returns an impotent Meter
- * for all calls to `getMeter`
+ * An enumeration of status codes.
*/
-class NoopMeterProvider {
- getMeter(_name, _version, _options) {
- return NoopMeter_1.NOOP_METER;
- }
-}
-exports.NoopMeterProvider = NoopMeterProvider;
-exports.NOOP_METER_PROVIDER = new NoopMeterProvider();
-//# sourceMappingURL=NoopMeterProvider.js.map
+var SpanStatusCode;
+(function (SpanStatusCode) {
+ /**
+ * The default status.
+ */
+ SpanStatusCode[SpanStatusCode["UNSET"] = 0] = "UNSET";
+ /**
+ * The operation has been validated by an Application developer or
+ * Operator to have completed successfully.
+ */
+ SpanStatusCode[SpanStatusCode["OK"] = 1] = "OK";
+ /**
+ * The operation contains an error.
+ */
+ SpanStatusCode[SpanStatusCode["ERROR"] = 2] = "ERROR";
+})(SpanStatusCode = exports.SpanStatusCode || (exports.SpanStatusCode = {}));
+//# sourceMappingURL=status.js.map
/***/ }),
-/***/ 9957:
-/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
+/***/ 6905:
+/***/ ((__unused_webpack_module, exports) => {
"use strict";
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.TraceFlags = void 0;
/*
* Copyright The OpenTelemetry Authors
*
@@ -43823,23 +41370,18 @@ exports.NOOP_METER_PROVIDER = new NoopMeterProvider();
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
-}) : (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- o[k2] = m[k];
-}));
-var __exportStar = (this && this.__exportStar) || function(m, exports) {
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
-};
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-__exportStar(__nccwpck_require__(7200), exports);
-//# sourceMappingURL=index.js.map
+var TraceFlags;
+(function (TraceFlags) {
+ /** Represents no flag set. */
+ TraceFlags[TraceFlags["NONE"] = 0] = "NONE";
+ /** Bit to represent whether trace is sampled in trace flags. */
+ TraceFlags[TraceFlags["SAMPLED"] = 1] = "SAMPLED";
+})(TraceFlags = exports.TraceFlags || (exports.TraceFlags = {}));
+//# sourceMappingURL=trace_flags.js.map
/***/ }),
-/***/ 9406:
+/***/ 8996:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
@@ -43860,9993 +41402,9713 @@ __exportStar(__nccwpck_require__(7200), exports);
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports._globalThis = void 0;
-/** only globals that common to node and browsers are allowed */
-// eslint-disable-next-line node/no-unsupported-features/es-builtins
-exports._globalThis = typeof globalThis === 'object' ? globalThis : global;
-//# sourceMappingURL=globalThis.js.map
+exports.VERSION = void 0;
+// this is autogenerated file, see scripts/version-update.js
+exports.VERSION = '1.8.0';
+//# sourceMappingURL=version.js.map
/***/ }),
-/***/ 7200:
-/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
-
-"use strict";
+/***/ 6284:
+/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
-/*
- * Copyright The OpenTelemetry Authors
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
-}) : (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- o[k2] = m[k];
-}));
-var __exportStar = (this && this.__exportStar) || function(m, exports) {
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
+module.exports =
+{
+ parallel : __nccwpck_require__(8210),
+ serial : __nccwpck_require__(445),
+ serialOrdered : __nccwpck_require__(3578)
};
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-__exportStar(__nccwpck_require__(9406), exports);
-//# sourceMappingURL=index.js.map
+
/***/ }),
-/***/ 7591:
-/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
+/***/ 1700:
+/***/ ((module) => {
-"use strict";
+// API
+module.exports = abort;
-/*
- * Copyright The OpenTelemetry Authors
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/**
+ * Aborts leftover active jobs
*
- * https://www.apache.org/licenses/LICENSE-2.0
+ * @param {object} state - current state object
+ */
+function abort(state)
+{
+ Object.keys(state.jobs).forEach(clean.bind(state));
+
+ // reset leftover jobs
+ state.jobs = {};
+}
+
+/**
+ * Cleans up leftover job by invoking abort function for the provided job id
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * @this state
+ * @param {string|number} key - job id to abort
*/
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.propagation = void 0;
-// Split module-level variable definition into separate files to allow
-// tree-shaking on each api instance.
-const propagation_1 = __nccwpck_require__(9909);
-/** Entrypoint for propagation API */
-exports.propagation = propagation_1.PropagationAPI.getInstance();
-//# sourceMappingURL=propagation-api.js.map
+function clean(key)
+{
+ if (typeof this.jobs[key] == 'function')
+ {
+ this.jobs[key]();
+ }
+}
+
/***/ }),
-/***/ 2368:
-/***/ ((__unused_webpack_module, exports) => {
+/***/ 2794:
+/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
-"use strict";
+var defer = __nccwpck_require__(5295);
+
+// API
+module.exports = async;
-/*
- * Copyright The OpenTelemetry Authors
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.NoopTextMapPropagator = void 0;
/**
- * No-op implementations of {@link TextMapPropagator}.
+ * Runs provided callback asynchronously
+ * even if callback itself is not
+ *
+ * @param {function} callback - callback to invoke
+ * @returns {function} - augmented callback
*/
-class NoopTextMapPropagator {
- /** Noop inject function does nothing */
- inject(_context, _carrier) { }
- /** Noop extract function does nothing and returns the input context */
- extract(context, _carrier) {
- return context;
+function async(callback)
+{
+ var isAsync = false;
+
+ // check if async happened
+ defer(function() { isAsync = true; });
+
+ return function async_callback(err, result)
+ {
+ if (isAsync)
+ {
+ callback(err, result);
}
- fields() {
- return [];
+ else
+ {
+ defer(function nextTick_callback()
+ {
+ callback(err, result);
+ });
}
+ };
}
-exports.NoopTextMapPropagator = NoopTextMapPropagator;
-//# sourceMappingURL=NoopTextMapPropagator.js.map
+
/***/ }),
-/***/ 865:
-/***/ ((__unused_webpack_module, exports) => {
+/***/ 5295:
+/***/ ((module) => {
-"use strict";
+module.exports = defer;
-/*
- * Copyright The OpenTelemetry Authors
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
+/**
+ * Runs provided function on next iteration of the event loop
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * @param {function} fn - function to run
*/
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.defaultTextMapSetter = exports.defaultTextMapGetter = void 0;
-exports.defaultTextMapGetter = {
- get(carrier, key) {
- if (carrier == null) {
- return undefined;
- }
- return carrier[key];
- },
- keys(carrier) {
- if (carrier == null) {
- return [];
- }
- return Object.keys(carrier);
- },
-};
-exports.defaultTextMapSetter = {
- set(carrier, key, value) {
- if (carrier == null) {
- return;
- }
- carrier[key] = value;
- },
-};
-//# sourceMappingURL=TextMapPropagator.js.map
+function defer(fn)
+{
+ var nextTick = typeof setImmediate == 'function'
+ ? setImmediate
+ : (
+ typeof process == 'object' && typeof process.nextTick == 'function'
+ ? process.nextTick
+ : null
+ );
+
+ if (nextTick)
+ {
+ nextTick(fn);
+ }
+ else
+ {
+ setTimeout(fn, 0);
+ }
+}
+
/***/ }),
-/***/ 8989:
-/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
+/***/ 9023:
+/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
-"use strict";
+var async = __nccwpck_require__(2794)
+ , abort = __nccwpck_require__(1700)
+ ;
-/*
- * Copyright The OpenTelemetry Authors
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
+// API
+module.exports = iterate;
+
+/**
+ * Iterates over each job object
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * @param {array|object} list - array or object (named list) to iterate over
+ * @param {function} iterator - iterator to run
+ * @param {object} state - current job status
+ * @param {function} callback - invoked when all elements processed
*/
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.trace = void 0;
-// Split module-level variable definition into separate files to allow
-// tree-shaking on each api instance.
-const trace_1 = __nccwpck_require__(1539);
-/** Entrypoint for trace API */
-exports.trace = trace_1.TraceAPI.getInstance();
-//# sourceMappingURL=trace-api.js.map
+function iterate(list, iterator, state, callback)
+{
+ // store current index
+ var key = state['keyedList'] ? state['keyedList'][state.index] : state.index;
-/***/ }),
+ state.jobs[key] = runJob(iterator, key, list[key], function(error, output)
+ {
+ // don't repeat yourself
+ // skip secondary callbacks
+ if (!(key in state.jobs))
+ {
+ return;
+ }
-/***/ 1462:
-/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
+ // clean up jobs
+ delete state.jobs[key];
-"use strict";
+ if (error)
+ {
+ // don't process rest of the results
+ // stop still active jobs
+ // and reset the list
+ abort(state);
+ }
+ else
+ {
+ state.results[key] = output;
+ }
-/*
- * Copyright The OpenTelemetry Authors
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
+ // return salvaged results
+ callback(error, state.results);
+ });
+}
+
+/**
+ * Runs iterator over provided job element
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * @param {function} iterator - iterator to invoke
+ * @param {string|number} key - key/index of the element in the list of jobs
+ * @param {mixed} item - job description
+ * @param {function} callback - invoked after iterator is done with the job
+ * @returns {function|mixed} - job abort function or something else
*/
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.NonRecordingSpan = void 0;
-const invalid_span_constants_1 = __nccwpck_require__(1760);
+function runJob(iterator, key, item, callback)
+{
+ var aborter;
+
+ // allow shortcut if iterator expects only two arguments
+ if (iterator.length == 2)
+ {
+ aborter = iterator(item, async(callback));
+ }
+ // otherwise go with full three arguments
+ else
+ {
+ aborter = iterator(item, key, async(callback));
+ }
+
+ return aborter;
+}
+
+
+/***/ }),
+
+/***/ 2474:
+/***/ ((module) => {
+
+// API
+module.exports = state;
+
/**
- * The NonRecordingSpan is the default {@link Span} that is used when no Span
- * implementation is available. All operations are no-op including context
- * propagation.
+ * Creates initial state object
+ * for iteration over list
+ *
+ * @param {array|object} list - list to iterate over
+ * @param {function|null} sortMethod - function to use for keys sort,
+ * or `null` to keep them as is
+ * @returns {object} - initial state object
*/
-class NonRecordingSpan {
- constructor(_spanContext = invalid_span_constants_1.INVALID_SPAN_CONTEXT) {
- this._spanContext = _spanContext;
- }
- // Returns a SpanContext.
- spanContext() {
- return this._spanContext;
+function state(list, sortMethod)
+{
+ var isNamedList = !Array.isArray(list)
+ , initState =
+ {
+ index : 0,
+ keyedList: isNamedList || sortMethod ? Object.keys(list) : null,
+ jobs : {},
+ results : isNamedList ? {} : [],
+ size : isNamedList ? Object.keys(list).length : list.length
}
- // By default does nothing
- setAttribute(_key, _value) {
- return this;
- }
- // By default does nothing
- setAttributes(_attributes) {
- return this;
- }
- // By default does nothing
- addEvent(_name, _attributes) {
- return this;
- }
- // By default does nothing
- setStatus(_status) {
- return this;
- }
- // By default does nothing
- updateName(_name) {
- return this;
- }
- // By default does nothing
- end(_endTime) { }
- // isRecording always returns false for NonRecordingSpan.
- isRecording() {
- return false;
- }
- // By default does nothing
- recordException(_exception, _time) { }
+ ;
+
+ if (sortMethod)
+ {
+ // sort array keys based on it's values
+ // sort object's keys just on own merit
+ initState.keyedList.sort(isNamedList ? sortMethod : function(a, b)
+ {
+ return sortMethod(list[a], list[b]);
+ });
+ }
+
+ return initState;
}
-exports.NonRecordingSpan = NonRecordingSpan;
-//# sourceMappingURL=NonRecordingSpan.js.map
+
/***/ }),
-/***/ 7606:
-/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
+/***/ 7942:
+/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
-"use strict";
+var abort = __nccwpck_require__(1700)
+ , async = __nccwpck_require__(2794)
+ ;
+
+// API
+module.exports = terminator;
-/*
- * Copyright The OpenTelemetry Authors
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.NoopTracer = void 0;
-const context_1 = __nccwpck_require__(7171);
-const context_utils_1 = __nccwpck_require__(3326);
-const NonRecordingSpan_1 = __nccwpck_require__(1462);
-const spancontext_utils_1 = __nccwpck_require__(9745);
-const contextApi = context_1.ContextAPI.getInstance();
/**
- * No-op implementations of {@link Tracer}.
+ * Terminates jobs in the attached state context
+ *
+ * @this AsyncKitState#
+ * @param {function} callback - final callback to invoke after termination
*/
-class NoopTracer {
- // startSpan starts a noop span.
- startSpan(name, options, context = contextApi.active()) {
- const root = Boolean(options === null || options === void 0 ? void 0 : options.root);
- if (root) {
- return new NonRecordingSpan_1.NonRecordingSpan();
- }
- const parentFromContext = context && (0, context_utils_1.getSpanContext)(context);
- if (isSpanContext(parentFromContext) &&
- (0, spancontext_utils_1.isSpanContextValid)(parentFromContext)) {
- return new NonRecordingSpan_1.NonRecordingSpan(parentFromContext);
- }
- else {
- return new NonRecordingSpan_1.NonRecordingSpan();
- }
- }
- startActiveSpan(name, arg2, arg3, arg4) {
- let opts;
- let ctx;
- let fn;
- if (arguments.length < 2) {
- return;
- }
- else if (arguments.length === 2) {
- fn = arg2;
- }
- else if (arguments.length === 3) {
- opts = arg2;
- fn = arg3;
- }
- else {
- opts = arg2;
- ctx = arg3;
- fn = arg4;
- }
- const parentContext = ctx !== null && ctx !== void 0 ? ctx : contextApi.active();
- const span = this.startSpan(name, opts, parentContext);
- const contextWithSpanSet = (0, context_utils_1.setSpan)(parentContext, span);
- return contextApi.with(contextWithSpanSet, fn, undefined, span);
- }
-}
-exports.NoopTracer = NoopTracer;
-function isSpanContext(spanContext) {
- return (typeof spanContext === 'object' &&
- typeof spanContext['spanId'] === 'string' &&
- typeof spanContext['traceId'] === 'string' &&
- typeof spanContext['traceFlags'] === 'number');
+function terminator(callback)
+{
+ if (!Object.keys(this.jobs).length)
+ {
+ return;
+ }
+
+ // fast forward iteration index
+ this.index = this.size;
+
+ // abort jobs
+ abort(this);
+
+ // send back results we have so far
+ async(callback)(null, this.results);
}
-//# sourceMappingURL=NoopTracer.js.map
+
/***/ }),
-/***/ 3259:
-/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
+/***/ 8210:
+/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
-"use strict";
+var iterate = __nccwpck_require__(9023)
+ , initState = __nccwpck_require__(2474)
+ , terminator = __nccwpck_require__(7942)
+ ;
+
+// Public API
+module.exports = parallel;
-/*
- * Copyright The OpenTelemetry Authors
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.NoopTracerProvider = void 0;
-const NoopTracer_1 = __nccwpck_require__(7606);
/**
- * An implementation of the {@link TracerProvider} which returns an impotent
- * Tracer for all calls to `getTracer`.
+ * Runs iterator over provided array elements in parallel
*
- * All operations are no-op.
+ * @param {array|object} list - array or object (named list) to iterate over
+ * @param {function} iterator - iterator to run
+ * @param {function} callback - invoked when all elements processed
+ * @returns {function} - jobs terminator
*/
-class NoopTracerProvider {
- getTracer(_name, _version, _options) {
- return new NoopTracer_1.NoopTracer();
- }
-}
-exports.NoopTracerProvider = NoopTracerProvider;
-//# sourceMappingURL=NoopTracerProvider.js.map
+function parallel(list, iterator, callback)
+{
+ var state = initState(list);
-/***/ }),
+ while (state.index < (state['keyedList'] || list).length)
+ {
+ iterate(list, iterator, state, function(error, result)
+ {
+ if (error)
+ {
+ callback(error, result);
+ return;
+ }
-/***/ 3503:
-/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
+ // looks like it's the last one
+ if (Object.keys(state.jobs).length === 0)
+ {
+ callback(null, state.results);
+ return;
+ }
+ });
-"use strict";
+ state.index++;
+ }
-/*
- * Copyright The OpenTelemetry Authors
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.ProxyTracer = void 0;
-const NoopTracer_1 = __nccwpck_require__(7606);
-const NOOP_TRACER = new NoopTracer_1.NoopTracer();
-/**
- * Proxy tracer provided by the proxy tracer provider
- */
-class ProxyTracer {
- constructor(_provider, name, version, options) {
- this._provider = _provider;
- this.name = name;
- this.version = version;
- this.options = options;
- }
- startSpan(name, options, context) {
- return this._getTracer().startSpan(name, options, context);
- }
- startActiveSpan(_name, _options, _context, _fn) {
- const tracer = this._getTracer();
- return Reflect.apply(tracer.startActiveSpan, tracer, arguments);
- }
- /**
- * Try to get a tracer from the proxy tracer provider.
- * If the proxy tracer provider has no delegate, return a noop tracer.
- */
- _getTracer() {
- if (this._delegate) {
- return this._delegate;
- }
- const tracer = this._provider.getDelegateTracer(this.name, this.version, this.options);
- if (!tracer) {
- return NOOP_TRACER;
- }
- this._delegate = tracer;
- return this._delegate;
- }
+ return terminator.bind(state, callback);
}
-exports.ProxyTracer = ProxyTracer;
-//# sourceMappingURL=ProxyTracer.js.map
+
/***/ }),
-/***/ 2285:
-/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
+/***/ 445:
+/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
-"use strict";
+var serialOrdered = __nccwpck_require__(3578);
+
+// Public API
+module.exports = serial;
-/*
- * Copyright The OpenTelemetry Authors
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.ProxyTracerProvider = void 0;
-const ProxyTracer_1 = __nccwpck_require__(3503);
-const NoopTracerProvider_1 = __nccwpck_require__(3259);
-const NOOP_TRACER_PROVIDER = new NoopTracerProvider_1.NoopTracerProvider();
/**
- * Tracer provider which provides {@link ProxyTracer}s.
+ * Runs iterator over provided array elements in series
*
- * Before a delegate is set, tracers provided are NoOp.
- * When a delegate is set, traces are provided from the delegate.
- * When a delegate is set after tracers have already been provided,
- * all tracers already provided will use the provided delegate implementation.
+ * @param {array|object} list - array or object (named list) to iterate over
+ * @param {function} iterator - iterator to run
+ * @param {function} callback - invoked when all elements processed
+ * @returns {function} - jobs terminator
*/
-class ProxyTracerProvider {
- /**
- * Get a {@link ProxyTracer}
- */
- getTracer(name, version, options) {
- var _a;
- return ((_a = this.getDelegateTracer(name, version, options)) !== null && _a !== void 0 ? _a : new ProxyTracer_1.ProxyTracer(this, name, version, options));
- }
- getDelegate() {
- var _a;
- return (_a = this._delegate) !== null && _a !== void 0 ? _a : NOOP_TRACER_PROVIDER;
- }
- /**
- * Set the delegate tracer provider
- */
- setDelegate(delegate) {
- this._delegate = delegate;
- }
- getDelegateTracer(name, version, options) {
- var _a;
- return (_a = this._delegate) === null || _a === void 0 ? void 0 : _a.getTracer(name, version, options);
- }
+function serial(list, iterator, callback)
+{
+ return serialOrdered(list, iterator, null, callback);
}
-exports.ProxyTracerProvider = ProxyTracerProvider;
-//# sourceMappingURL=ProxyTracerProvider.js.map
+
/***/ }),
-/***/ 3209:
-/***/ ((__unused_webpack_module, exports) => {
+/***/ 3578:
+/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
-"use strict";
+var iterate = __nccwpck_require__(9023)
+ , initState = __nccwpck_require__(2474)
+ , terminator = __nccwpck_require__(7942)
+ ;
+
+// Public API
+module.exports = serialOrdered;
+// sorting helpers
+module.exports.ascending = ascending;
+module.exports.descending = descending;
-/*
- * Copyright The OpenTelemetry Authors
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.SamplingDecision = void 0;
/**
- * @deprecated use the one declared in @opentelemetry/sdk-trace-base instead.
- * A sampling decision that determines how a {@link Span} will be recorded
- * and collected.
+ * Runs iterator over provided sorted array elements in series
+ *
+ * @param {array|object} list - array or object (named list) to iterate over
+ * @param {function} iterator - iterator to run
+ * @param {function} sortMethod - custom sort function
+ * @param {function} callback - invoked when all elements processed
+ * @returns {function} - jobs terminator
*/
-var SamplingDecision;
-(function (SamplingDecision) {
- /**
- * `Span.isRecording() === false`, span will not be recorded and all events
- * and attributes will be dropped.
- */
- SamplingDecision[SamplingDecision["NOT_RECORD"] = 0] = "NOT_RECORD";
- /**
- * `Span.isRecording() === true`, but `Sampled` flag in {@link TraceFlags}
- * MUST NOT be set.
- */
- SamplingDecision[SamplingDecision["RECORD"] = 1] = "RECORD";
- /**
- * `Span.isRecording() === true` AND `Sampled` flag in {@link TraceFlags}
- * MUST be set.
- */
- SamplingDecision[SamplingDecision["RECORD_AND_SAMPLED"] = 2] = "RECORD_AND_SAMPLED";
-})(SamplingDecision = exports.SamplingDecision || (exports.SamplingDecision = {}));
-//# sourceMappingURL=SamplingResult.js.map
+function serialOrdered(list, iterator, sortMethod, callback)
+{
+ var state = initState(list, sortMethod);
-/***/ }),
+ iterate(list, iterator, state, function iteratorHandler(error, result)
+ {
+ if (error)
+ {
+ callback(error, result);
+ return;
+ }
-/***/ 3326:
-/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
+ state.index++;
-"use strict";
+ // are we there yet?
+ if (state.index < (state['keyedList'] || list).length)
+ {
+ iterate(list, iterator, state, iteratorHandler);
+ return;
+ }
-/*
- * Copyright The OpenTelemetry Authors
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.getSpanContext = exports.setSpanContext = exports.deleteSpan = exports.setSpan = exports.getActiveSpan = exports.getSpan = void 0;
-const context_1 = __nccwpck_require__(8242);
-const NonRecordingSpan_1 = __nccwpck_require__(1462);
-const context_2 = __nccwpck_require__(7171);
-/**
- * span key
- */
-const SPAN_KEY = (0, context_1.createContextKey)('OpenTelemetry Context Key SPAN');
-/**
- * Return the span if one exists
- *
- * @param context context to get span from
- */
-function getSpan(context) {
- return context.getValue(SPAN_KEY) || undefined;
-}
-exports.getSpan = getSpan;
-/**
- * Gets the span from the current context, if one exists.
- */
-function getActiveSpan() {
- return getSpan(context_2.ContextAPI.getInstance().active());
-}
-exports.getActiveSpan = getActiveSpan;
-/**
- * Set the span on a context
- *
- * @param context context to use as parent
- * @param span span to set active
- */
-function setSpan(context, span) {
- return context.setValue(SPAN_KEY, span);
+ // done here
+ callback(null, state.results);
+ });
+
+ return terminator.bind(state, callback);
}
-exports.setSpan = setSpan;
-/**
- * Remove current span stored in the context
- *
- * @param context context to delete span from
+
+/*
+ * -- Sort methods
*/
-function deleteSpan(context) {
- return context.deleteValue(SPAN_KEY);
-}
-exports.deleteSpan = deleteSpan;
+
/**
- * Wrap span context in a NoopSpan and set as span in a new
- * context
+ * sort helper to sort array elements in ascending order
*
- * @param context context to set active span on
- * @param spanContext span context to be wrapped
+ * @param {mixed} a - an item to compare
+ * @param {mixed} b - an item to compare
+ * @returns {number} - comparison result
*/
-function setSpanContext(context, spanContext) {
- return setSpan(context, new NonRecordingSpan_1.NonRecordingSpan(spanContext));
+function ascending(a, b)
+{
+ return a < b ? -1 : a > b ? 1 : 0;
}
-exports.setSpanContext = setSpanContext;
+
/**
- * Get the span context of the span if it exists.
+ * sort helper to sort array elements in descending order
*
- * @param context context to get values from
+ * @param {mixed} a - an item to compare
+ * @param {mixed} b - an item to compare
+ * @returns {number} - comparison result
*/
-function getSpanContext(context) {
- var _a;
- return (_a = getSpan(context)) === null || _a === void 0 ? void 0 : _a.spanContext();
+function descending(a, b)
+{
+ return -1 * ascending(a, b);
}
-exports.getSpanContext = getSpanContext;
-//# sourceMappingURL=context-utils.js.map
+
/***/ }),
-/***/ 2110:
-/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
+/***/ 9417:
+/***/ ((module) => {
"use strict";
-/*
- * Copyright The OpenTelemetry Authors
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.TraceStateImpl = void 0;
-const tracestate_validators_1 = __nccwpck_require__(4864);
-const MAX_TRACE_STATE_ITEMS = 32;
-const MAX_TRACE_STATE_LEN = 512;
-const LIST_MEMBERS_SEPARATOR = ',';
-const LIST_MEMBER_KEY_VALUE_SPLITTER = '=';
-/**
- * TraceState must be a class and not a simple object type because of the spec
- * requirement (https://www.w3.org/TR/trace-context/#tracestate-field).
- *
- * Here is the list of allowed mutations:
- * - New key-value pair should be added into the beginning of the list
- * - The value of any key can be updated. Modified keys MUST be moved to the
- * beginning of the list.
- */
-class TraceStateImpl {
- constructor(rawTraceState) {
- this._internalState = new Map();
- if (rawTraceState)
- this._parse(rawTraceState);
- }
- set(key, value) {
- // TODO: Benchmark the different approaches(map vs list) and
- // use the faster one.
- const traceState = this._clone();
- if (traceState._internalState.has(key)) {
- traceState._internalState.delete(key);
- }
- traceState._internalState.set(key, value);
- return traceState;
- }
- unset(key) {
- const traceState = this._clone();
- traceState._internalState.delete(key);
- return traceState;
- }
- get(key) {
- return this._internalState.get(key);
- }
- serialize() {
- return this._keys()
- .reduce((agg, key) => {
- agg.push(key + LIST_MEMBER_KEY_VALUE_SPLITTER + this.get(key));
- return agg;
- }, [])
- .join(LIST_MEMBERS_SEPARATOR);
+module.exports = balanced;
+function balanced(a, b, str) {
+ if (a instanceof RegExp) a = maybeMatch(a, str);
+ if (b instanceof RegExp) b = maybeMatch(b, str);
+
+ var r = range(a, b, str);
+
+ return r && {
+ start: r[0],
+ end: r[1],
+ pre: str.slice(0, r[0]),
+ body: str.slice(r[0] + a.length, r[1]),
+ post: str.slice(r[1] + b.length)
+ };
+}
+
+function maybeMatch(reg, str) {
+ var m = str.match(reg);
+ return m ? m[0] : null;
+}
+
+balanced.range = range;
+function range(a, b, str) {
+ var begs, beg, left, right, result;
+ var ai = str.indexOf(a);
+ var bi = str.indexOf(b, ai + 1);
+ var i = ai;
+
+ if (ai >= 0 && bi > 0) {
+ if(a===b) {
+ return [ai, bi];
}
- _parse(rawTraceState) {
- if (rawTraceState.length > MAX_TRACE_STATE_LEN)
- return;
- this._internalState = rawTraceState
- .split(LIST_MEMBERS_SEPARATOR)
- .reverse() // Store in reverse so new keys (.set(...)) will be placed at the beginning
- .reduce((agg, part) => {
- const listMember = part.trim(); // Optional Whitespace (OWS) handling
- const i = listMember.indexOf(LIST_MEMBER_KEY_VALUE_SPLITTER);
- if (i !== -1) {
- const key = listMember.slice(0, i);
- const value = listMember.slice(i + 1, part.length);
- if ((0, tracestate_validators_1.validateKey)(key) && (0, tracestate_validators_1.validateValue)(value)) {
- agg.set(key, value);
- }
- else {
- // TODO: Consider to add warning log
- }
- }
- return agg;
- }, new Map());
- // Because of the reverse() requirement, trunc must be done after map is created
- if (this._internalState.size > MAX_TRACE_STATE_ITEMS) {
- this._internalState = new Map(Array.from(this._internalState.entries())
- .reverse() // Use reverse same as original tracestate parse chain
- .slice(0, MAX_TRACE_STATE_ITEMS));
+ begs = [];
+ left = str.length;
+
+ while (i >= 0 && !result) {
+ if (i == ai) {
+ begs.push(i);
+ ai = str.indexOf(a, i + 1);
+ } else if (begs.length == 1) {
+ result = [ begs.pop(), bi ];
+ } else {
+ beg = begs.pop();
+ if (beg < left) {
+ left = beg;
+ right = bi;
}
+
+ bi = str.indexOf(b, i + 1);
+ }
+
+ i = ai < bi && ai >= 0 ? ai : bi;
}
- _keys() {
- return Array.from(this._internalState.keys()).reverse();
- }
- _clone() {
- const traceState = new TraceStateImpl();
- traceState._internalState = new Map(this._internalState);
- return traceState;
+
+ if (begs.length) {
+ result = [ left, right ];
}
+ }
+
+ return result;
}
-exports.TraceStateImpl = TraceStateImpl;
-//# sourceMappingURL=tracestate-impl.js.map
+
/***/ }),
-/***/ 4864:
-/***/ ((__unused_webpack_module, exports) => {
+/***/ 3717:
+/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
-"use strict";
+var concatMap = __nccwpck_require__(6891);
+var balanced = __nccwpck_require__(9417);
-/*
- * Copyright The OpenTelemetry Authors
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.validateValue = exports.validateKey = void 0;
-const VALID_KEY_CHAR_RANGE = '[_0-9a-z-*/]';
-const VALID_KEY = `[a-z]${VALID_KEY_CHAR_RANGE}{0,255}`;
-const VALID_VENDOR_KEY = `[a-z0-9]${VALID_KEY_CHAR_RANGE}{0,240}@[a-z]${VALID_KEY_CHAR_RANGE}{0,13}`;
-const VALID_KEY_REGEX = new RegExp(`^(?:${VALID_KEY}|${VALID_VENDOR_KEY})$`);
-const VALID_VALUE_BASE_REGEX = /^[ -~]{0,255}[!-~]$/;
-const INVALID_VALUE_COMMA_EQUAL_REGEX = /,|=/;
-/**
- * Key is opaque string up to 256 characters printable. It MUST begin with a
- * lowercase letter, and can only contain lowercase letters a-z, digits 0-9,
- * underscores _, dashes -, asterisks *, and forward slashes /.
- * For multi-tenant vendor scenarios, an at sign (@) can be used to prefix the
- * vendor name. Vendors SHOULD set the tenant ID at the beginning of the key.
- * see https://www.w3.org/TR/trace-context/#key
- */
-function validateKey(key) {
- return VALID_KEY_REGEX.test(key);
-}
-exports.validateKey = validateKey;
-/**
- * Value is opaque string up to 256 characters printable ASCII RFC0020
- * characters (i.e., the range 0x20 to 0x7E) except comma , and =.
- */
-function validateValue(value) {
- return (VALID_VALUE_BASE_REGEX.test(value) &&
- !INVALID_VALUE_COMMA_EQUAL_REGEX.test(value));
-}
-exports.validateValue = validateValue;
-//# sourceMappingURL=tracestate-validators.js.map
+module.exports = expandTop;
-/***/ }),
+var escSlash = '\0SLASH'+Math.random()+'\0';
+var escOpen = '\0OPEN'+Math.random()+'\0';
+var escClose = '\0CLOSE'+Math.random()+'\0';
+var escComma = '\0COMMA'+Math.random()+'\0';
+var escPeriod = '\0PERIOD'+Math.random()+'\0';
-/***/ 2615:
-/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
+function numeric(str) {
+ return parseInt(str, 10) == str
+ ? parseInt(str, 10)
+ : str.charCodeAt(0);
+}
-"use strict";
+function escapeBraces(str) {
+ return str.split('\\\\').join(escSlash)
+ .split('\\{').join(escOpen)
+ .split('\\}').join(escClose)
+ .split('\\,').join(escComma)
+ .split('\\.').join(escPeriod);
+}
-/*
- * Copyright The OpenTelemetry Authors
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.createTraceState = void 0;
-const tracestate_impl_1 = __nccwpck_require__(2110);
-function createTraceState(rawTraceState) {
- return new tracestate_impl_1.TraceStateImpl(rawTraceState);
+function unescapeBraces(str) {
+ return str.split(escSlash).join('\\')
+ .split(escOpen).join('{')
+ .split(escClose).join('}')
+ .split(escComma).join(',')
+ .split(escPeriod).join('.');
}
-exports.createTraceState = createTraceState;
-//# sourceMappingURL=utils.js.map
-/***/ }),
-/***/ 1760:
-/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
+// Basically just str.split(","), but handling cases
+// where we have nested braced sections, which should be
+// treated as individual members, like {a,{b,c},d}
+function parseCommaParts(str) {
+ if (!str)
+ return [''];
-"use strict";
+ var parts = [];
+ var m = balanced('{', '}', str);
-/*
- * Copyright The OpenTelemetry Authors
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.INVALID_SPAN_CONTEXT = exports.INVALID_TRACEID = exports.INVALID_SPANID = void 0;
-const trace_flags_1 = __nccwpck_require__(6905);
-exports.INVALID_SPANID = '0000000000000000';
-exports.INVALID_TRACEID = '00000000000000000000000000000000';
-exports.INVALID_SPAN_CONTEXT = {
- traceId: exports.INVALID_TRACEID,
- spanId: exports.INVALID_SPANID,
- traceFlags: trace_flags_1.TraceFlags.NONE,
-};
-//# sourceMappingURL=invalid-span-constants.js.map
+ if (!m)
+ return str.split(',');
-/***/ }),
+ var pre = m.pre;
+ var body = m.body;
+ var post = m.post;
+ var p = pre.split(',');
-/***/ 1424:
-/***/ ((__unused_webpack_module, exports) => {
+ p[p.length-1] += '{' + body + '}';
+ var postParts = parseCommaParts(post);
+ if (post.length) {
+ p[p.length-1] += postParts.shift();
+ p.push.apply(p, postParts);
+ }
-"use strict";
+ parts.push.apply(parts, p);
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.SpanKind = void 0;
-/*
- * Copyright The OpenTelemetry Authors
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-var SpanKind;
-(function (SpanKind) {
- /** Default value. Indicates that the span is used internally. */
- SpanKind[SpanKind["INTERNAL"] = 0] = "INTERNAL";
- /**
- * Indicates that the span covers server-side handling of an RPC or other
- * remote request.
- */
- SpanKind[SpanKind["SERVER"] = 1] = "SERVER";
- /**
- * Indicates that the span covers the client-side wrapper around an RPC or
- * other remote request.
- */
- SpanKind[SpanKind["CLIENT"] = 2] = "CLIENT";
- /**
- * Indicates that the span describes producer sending a message to a
- * broker. Unlike client and server, there is no direct critical path latency
- * relationship between producer and consumer spans.
- */
- SpanKind[SpanKind["PRODUCER"] = 3] = "PRODUCER";
- /**
- * Indicates that the span describes consumer receiving a message from a
- * broker. Unlike client and server, there is no direct critical path latency
- * relationship between producer and consumer spans.
- */
- SpanKind[SpanKind["CONSUMER"] = 4] = "CONSUMER";
-})(SpanKind = exports.SpanKind || (exports.SpanKind = {}));
-//# sourceMappingURL=span_kind.js.map
+ return parts;
+}
-/***/ }),
+function expandTop(str) {
+ if (!str)
+ return [];
-/***/ 9745:
-/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
+ // I don't know why Bash 4.3 does this, but it does.
+ // Anything starting with {} will have the first two bytes preserved
+ // but *only* at the top level, so {},a}b will not expand to anything,
+ // but a{},b}c will be expanded to [a}c,abc].
+ // One could argue that this is a bug in Bash, but since the goal of
+ // this module is to match Bash's rules, we escape a leading {}
+ if (str.substr(0, 2) === '{}') {
+ str = '\\{\\}' + str.substr(2);
+ }
-"use strict";
+ return expand(escapeBraces(str), true).map(unescapeBraces);
+}
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.wrapSpanContext = exports.isSpanContextValid = exports.isValidSpanId = exports.isValidTraceId = void 0;
-/*
- * Copyright The OpenTelemetry Authors
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-const invalid_span_constants_1 = __nccwpck_require__(1760);
-const NonRecordingSpan_1 = __nccwpck_require__(1462);
-const VALID_TRACEID_REGEX = /^([0-9a-f]{32})$/i;
-const VALID_SPANID_REGEX = /^[0-9a-f]{16}$/i;
-function isValidTraceId(traceId) {
- return VALID_TRACEID_REGEX.test(traceId) && traceId !== invalid_span_constants_1.INVALID_TRACEID;
+function identity(e) {
+ return e;
}
-exports.isValidTraceId = isValidTraceId;
-function isValidSpanId(spanId) {
- return VALID_SPANID_REGEX.test(spanId) && spanId !== invalid_span_constants_1.INVALID_SPANID;
+
+function embrace(str) {
+ return '{' + str + '}';
}
-exports.isValidSpanId = isValidSpanId;
-/**
- * Returns true if this {@link SpanContext} is valid.
- * @return true if this {@link SpanContext} is valid.
- */
-function isSpanContextValid(spanContext) {
- return (isValidTraceId(spanContext.traceId) && isValidSpanId(spanContext.spanId));
+function isPadded(el) {
+ return /^-?0\d/.test(el);
}
-exports.isSpanContextValid = isSpanContextValid;
-/**
- * Wrap the given {@link SpanContext} in a new non-recording {@link Span}
- *
- * @param spanContext span context to be wrapped
- * @returns a new non-recording {@link Span} with the provided context
- */
-function wrapSpanContext(spanContext) {
- return new NonRecordingSpan_1.NonRecordingSpan(spanContext);
+
+function lte(i, y) {
+ return i <= y;
+}
+function gte(i, y) {
+ return i >= y;
}
-exports.wrapSpanContext = wrapSpanContext;
-//# sourceMappingURL=spancontext-utils.js.map
-/***/ }),
+function expand(str, isTop) {
+ var expansions = [];
-/***/ 8845:
-/***/ ((__unused_webpack_module, exports) => {
+ var m = balanced('{', '}', str);
+ if (!m || /\$$/.test(m.pre)) return [str];
-"use strict";
+ var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body);
+ var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body);
+ var isSequence = isNumericSequence || isAlphaSequence;
+ var isOptions = m.body.indexOf(',') >= 0;
+ if (!isSequence && !isOptions) {
+ // {a},b}
+ if (m.post.match(/,.*\}/)) {
+ str = m.pre + '{' + m.body + escClose + m.post;
+ return expand(str);
+ }
+ return [str];
+ }
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.SpanStatusCode = void 0;
-/**
- * An enumeration of status codes.
- */
-var SpanStatusCode;
-(function (SpanStatusCode) {
- /**
- * The default status.
- */
- SpanStatusCode[SpanStatusCode["UNSET"] = 0] = "UNSET";
- /**
- * The operation has been validated by an Application developer or
- * Operator to have completed successfully.
- */
- SpanStatusCode[SpanStatusCode["OK"] = 1] = "OK";
- /**
- * The operation contains an error.
- */
- SpanStatusCode[SpanStatusCode["ERROR"] = 2] = "ERROR";
-})(SpanStatusCode = exports.SpanStatusCode || (exports.SpanStatusCode = {}));
-//# sourceMappingURL=status.js.map
+ var n;
+ if (isSequence) {
+ n = m.body.split(/\.\./);
+ } else {
+ n = parseCommaParts(m.body);
+ if (n.length === 1) {
+ // x{{a,b}}y ==> x{a}y x{b}y
+ n = expand(n[0], false).map(embrace);
+ if (n.length === 1) {
+ var post = m.post.length
+ ? expand(m.post, false)
+ : [''];
+ return post.map(function(p) {
+ return m.pre + n[0] + p;
+ });
+ }
+ }
+ }
-/***/ }),
+ // at this point, n is the parts, and we know it's not a comma set
+ // with a single entry.
-/***/ 6905:
-/***/ ((__unused_webpack_module, exports) => {
+ // no need to expand pre, since it is guaranteed to be free of brace-sets
+ var pre = m.pre;
+ var post = m.post.length
+ ? expand(m.post, false)
+ : [''];
-"use strict";
+ var N;
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.TraceFlags = void 0;
-/*
- * Copyright The OpenTelemetry Authors
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-var TraceFlags;
-(function (TraceFlags) {
- /** Represents no flag set. */
- TraceFlags[TraceFlags["NONE"] = 0] = "NONE";
- /** Bit to represent whether trace is sampled in trace flags. */
- TraceFlags[TraceFlags["SAMPLED"] = 1] = "SAMPLED";
-})(TraceFlags = exports.TraceFlags || (exports.TraceFlags = {}));
-//# sourceMappingURL=trace_flags.js.map
-
-/***/ }),
-
-/***/ 8996:
-/***/ ((__unused_webpack_module, exports) => {
+ if (isSequence) {
+ var x = numeric(n[0]);
+ var y = numeric(n[1]);
+ var width = Math.max(n[0].length, n[1].length)
+ var incr = n.length == 3
+ ? Math.abs(numeric(n[2]))
+ : 1;
+ var test = lte;
+ var reverse = y < x;
+ if (reverse) {
+ incr *= -1;
+ test = gte;
+ }
+ var pad = n.some(isPadded);
-"use strict";
+ N = [];
-/*
- * Copyright The OpenTelemetry Authors
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.VERSION = void 0;
-// this is autogenerated file, see scripts/version-update.js
-exports.VERSION = '1.6.0';
-//# sourceMappingURL=version.js.map
+ for (var i = x; test(i, y); i += incr) {
+ var c;
+ if (isAlphaSequence) {
+ c = String.fromCharCode(i);
+ if (c === '\\')
+ c = '';
+ } else {
+ c = String(i);
+ if (pad) {
+ var need = width - c.length;
+ if (need > 0) {
+ var z = new Array(need + 1).join('0');
+ if (i < 0)
+ c = '-' + z + c.slice(1);
+ else
+ c = z + c;
+ }
+ }
+ }
+ N.push(c);
+ }
+ } else {
+ N = concatMap(n, function(el) { return expand(el, false) });
+ }
-/***/ }),
+ for (var j = 0; j < N.length; j++) {
+ for (var k = 0; k < post.length; k++) {
+ var expansion = pre + N[j] + post[k];
+ if (!isTop || isSequence || expansion)
+ expansions.push(expansion);
+ }
+ }
-/***/ 4812:
-/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
+ return expansions;
+}
-module.exports =
-{
- parallel : __nccwpck_require__(8210),
- serial : __nccwpck_require__(445),
- serialOrdered : __nccwpck_require__(3578)
-};
/***/ }),
-/***/ 1700:
+/***/ 421:
/***/ ((module) => {
-// API
-module.exports = abort;
+var charenc = {
+ // UTF-8 encoding
+ utf8: {
+ // Convert a string to a byte array
+ stringToBytes: function(str) {
+ return charenc.bin.stringToBytes(unescape(encodeURIComponent(str)));
+ },
-/**
- * Aborts leftover active jobs
- *
- * @param {object} state - current state object
- */
-function abort(state)
-{
- Object.keys(state.jobs).forEach(clean.bind(state));
+ // Convert a byte array to a string
+ bytesToString: function(bytes) {
+ return decodeURIComponent(escape(charenc.bin.bytesToString(bytes)));
+ }
+ },
- // reset leftover jobs
- state.jobs = {};
-}
+ // Binary encoding
+ bin: {
+ // Convert a string to a byte array
+ stringToBytes: function(str) {
+ for (var bytes = [], i = 0; i < str.length; i++)
+ bytes.push(str.charCodeAt(i) & 0xFF);
+ return bytes;
+ },
-/**
- * Cleans up leftover job by invoking abort function for the provided job id
- *
- * @this state
- * @param {string|number} key - job id to abort
- */
-function clean(key)
-{
- if (typeof this.jobs[key] == 'function')
- {
- this.jobs[key]();
+ // Convert a byte array to a string
+ bytesToString: function(bytes) {
+ for (var str = [], i = 0; i < bytes.length; i++)
+ str.push(String.fromCharCode(bytes[i]));
+ return str.join('');
+ }
}
-}
+};
+
+module.exports = charenc;
/***/ }),
-/***/ 2794:
+/***/ 5443:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
-var defer = __nccwpck_require__(5295);
+var util = __nccwpck_require__(3837);
+var Stream = (__nccwpck_require__(2781).Stream);
+var DelayedStream = __nccwpck_require__(8611);
-// API
-module.exports = async;
+module.exports = CombinedStream;
+function CombinedStream() {
+ this.writable = false;
+ this.readable = true;
+ this.dataSize = 0;
+ this.maxDataSize = 2 * 1024 * 1024;
+ this.pauseStreams = true;
-/**
- * Runs provided callback asynchronously
- * even if callback itself is not
- *
- * @param {function} callback - callback to invoke
- * @returns {function} - augmented callback
- */
-function async(callback)
-{
- var isAsync = false;
+ this._released = false;
+ this._streams = [];
+ this._currentStream = null;
+ this._insideLoop = false;
+ this._pendingNext = false;
+}
+util.inherits(CombinedStream, Stream);
- // check if async happened
- defer(function() { isAsync = true; });
+CombinedStream.create = function(options) {
+ var combinedStream = new this();
- return function async_callback(err, result)
- {
- if (isAsync)
- {
- callback(err, result);
- }
- else
- {
- defer(function nextTick_callback()
- {
- callback(err, result);
+ options = options || {};
+ for (var option in options) {
+ combinedStream[option] = options[option];
+ }
+
+ return combinedStream;
+};
+
+CombinedStream.isStreamLike = function(stream) {
+ return (typeof stream !== 'function')
+ && (typeof stream !== 'string')
+ && (typeof stream !== 'boolean')
+ && (typeof stream !== 'number')
+ && (!Buffer.isBuffer(stream));
+};
+
+CombinedStream.prototype.append = function(stream) {
+ var isStreamLike = CombinedStream.isStreamLike(stream);
+
+ if (isStreamLike) {
+ if (!(stream instanceof DelayedStream)) {
+ var newStream = DelayedStream.create(stream, {
+ maxDataSize: Infinity,
+ pauseStream: this.pauseStreams,
});
+ stream.on('data', this._checkDataSize.bind(this));
+ stream = newStream;
}
- };
-}
+ this._handleErrors(stream);
-/***/ }),
+ if (this.pauseStreams) {
+ stream.pause();
+ }
+ }
-/***/ 5295:
-/***/ ((module) => {
+ this._streams.push(stream);
+ return this;
+};
-module.exports = defer;
+CombinedStream.prototype.pipe = function(dest, options) {
+ Stream.prototype.pipe.call(this, dest, options);
+ this.resume();
+ return dest;
+};
-/**
- * Runs provided function on next iteration of the event loop
- *
- * @param {function} fn - function to run
- */
-function defer(fn)
-{
- var nextTick = typeof setImmediate == 'function'
- ? setImmediate
- : (
- typeof process == 'object' && typeof process.nextTick == 'function'
- ? process.nextTick
- : null
- );
+CombinedStream.prototype._getNext = function() {
+ this._currentStream = null;
- if (nextTick)
- {
- nextTick(fn);
+ if (this._insideLoop) {
+ this._pendingNext = true;
+ return; // defer call
}
- else
- {
- setTimeout(fn, 0);
+
+ this._insideLoop = true;
+ try {
+ do {
+ this._pendingNext = false;
+ this._realGetNext();
+ } while (this._pendingNext);
+ } finally {
+ this._insideLoop = false;
}
-}
+};
+CombinedStream.prototype._realGetNext = function() {
+ var stream = this._streams.shift();
-/***/ }),
-/***/ 9023:
-/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
+ if (typeof stream == 'undefined') {
+ this.end();
+ return;
+ }
-var async = __nccwpck_require__(2794)
- , abort = __nccwpck_require__(1700)
- ;
+ if (typeof stream !== 'function') {
+ this._pipeNext(stream);
+ return;
+ }
-// API
-module.exports = iterate;
+ var getStream = stream;
+ getStream(function(stream) {
+ var isStreamLike = CombinedStream.isStreamLike(stream);
+ if (isStreamLike) {
+ stream.on('data', this._checkDataSize.bind(this));
+ this._handleErrors(stream);
+ }
-/**
- * Iterates over each job object
- *
- * @param {array|object} list - array or object (named list) to iterate over
- * @param {function} iterator - iterator to run
- * @param {object} state - current job status
- * @param {function} callback - invoked when all elements processed
- */
-function iterate(list, iterator, state, callback)
-{
- // store current index
- var key = state['keyedList'] ? state['keyedList'][state.index] : state.index;
+ this._pipeNext(stream);
+ }.bind(this));
+};
- state.jobs[key] = runJob(iterator, key, list[key], function(error, output)
- {
- // don't repeat yourself
- // skip secondary callbacks
- if (!(key in state.jobs))
- {
- return;
- }
+CombinedStream.prototype._pipeNext = function(stream) {
+ this._currentStream = stream;
- // clean up jobs
- delete state.jobs[key];
+ var isStreamLike = CombinedStream.isStreamLike(stream);
+ if (isStreamLike) {
+ stream.on('end', this._getNext.bind(this));
+ stream.pipe(this, {end: false});
+ return;
+ }
- if (error)
- {
- // don't process rest of the results
- // stop still active jobs
- // and reset the list
- abort(state);
- }
- else
- {
- state.results[key] = output;
- }
+ var value = stream;
+ this.write(value);
+ this._getNext();
+};
- // return salvaged results
- callback(error, state.results);
+CombinedStream.prototype._handleErrors = function(stream) {
+ var self = this;
+ stream.on('error', function(err) {
+ self._emitError(err);
});
-}
+};
-/**
- * Runs iterator over provided job element
- *
- * @param {function} iterator - iterator to invoke
- * @param {string|number} key - key/index of the element in the list of jobs
- * @param {mixed} item - job description
- * @param {function} callback - invoked after iterator is done with the job
- * @returns {function|mixed} - job abort function or something else
- */
-function runJob(iterator, key, item, callback)
-{
- var aborter;
+CombinedStream.prototype.write = function(data) {
+ this.emit('data', data);
+};
- // allow shortcut if iterator expects only two arguments
- if (iterator.length == 2)
- {
- aborter = iterator(item, async(callback));
+CombinedStream.prototype.pause = function() {
+ if (!this.pauseStreams) {
+ return;
}
- // otherwise go with full three arguments
- else
- {
- aborter = iterator(item, key, async(callback));
+
+ if(this.pauseStreams && this._currentStream && typeof(this._currentStream.pause) == 'function') this._currentStream.pause();
+ this.emit('pause');
+};
+
+CombinedStream.prototype.resume = function() {
+ if (!this._released) {
+ this._released = true;
+ this.writable = true;
+ this._getNext();
}
- return aborter;
-}
+ if(this.pauseStreams && this._currentStream && typeof(this._currentStream.resume) == 'function') this._currentStream.resume();
+ this.emit('resume');
+};
+CombinedStream.prototype.end = function() {
+ this._reset();
+ this.emit('end');
+};
-/***/ }),
+CombinedStream.prototype.destroy = function() {
+ this._reset();
+ this.emit('close');
+};
-/***/ 2474:
-/***/ ((module) => {
+CombinedStream.prototype._reset = function() {
+ this.writable = false;
+ this._streams = [];
+ this._currentStream = null;
+};
-// API
-module.exports = state;
+CombinedStream.prototype._checkDataSize = function() {
+ this._updateDataSize();
+ if (this.dataSize <= this.maxDataSize) {
+ return;
+ }
-/**
- * Creates initial state object
- * for iteration over list
- *
- * @param {array|object} list - list to iterate over
- * @param {function|null} sortMethod - function to use for keys sort,
- * or `null` to keep them as is
- * @returns {object} - initial state object
- */
-function state(list, sortMethod)
-{
- var isNamedList = !Array.isArray(list)
- , initState =
- {
- index : 0,
- keyedList: isNamedList || sortMethod ? Object.keys(list) : null,
- jobs : {},
- results : isNamedList ? {} : [],
- size : isNamedList ? Object.keys(list).length : list.length
+ var message =
+ 'DelayedStream#maxDataSize of ' + this.maxDataSize + ' bytes exceeded.';
+ this._emitError(new Error(message));
+};
+
+CombinedStream.prototype._updateDataSize = function() {
+ this.dataSize = 0;
+
+ var self = this;
+ this._streams.forEach(function(stream) {
+ if (!stream.dataSize) {
+ return;
}
- ;
- if (sortMethod)
- {
- // sort array keys based on it's values
- // sort object's keys just on own merit
- initState.keyedList.sort(isNamedList ? sortMethod : function(a, b)
- {
- return sortMethod(list[a], list[b]);
- });
+ self.dataSize += stream.dataSize;
+ });
+
+ if (this._currentStream && this._currentStream.dataSize) {
+ this.dataSize += this._currentStream.dataSize;
}
+};
- return initState;
-}
+CombinedStream.prototype._emitError = function(err) {
+ this._reset();
+ this.emit('error', err);
+};
/***/ }),
-/***/ 7942:
-/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
+/***/ 6891:
+/***/ ((module) => {
-var abort = __nccwpck_require__(1700)
- , async = __nccwpck_require__(2794)
- ;
+module.exports = function (xs, fn) {
+ var res = [];
+ for (var i = 0; i < xs.length; i++) {
+ var x = fn(xs[i], i);
+ if (isArray(x)) res.push.apply(res, x);
+ else res.push(x);
+ }
+ return res;
+};
-// API
-module.exports = terminator;
-
-/**
- * Terminates jobs in the attached state context
- *
- * @this AsyncKitState#
- * @param {function} callback - final callback to invoke after termination
- */
-function terminator(callback)
-{
- if (!Object.keys(this.jobs).length)
- {
- return;
- }
-
- // fast forward iteration index
- this.index = this.size;
-
- // abort jobs
- abort(this);
-
- // send back results we have so far
- async(callback)(null, this.results);
-}
+var isArray = Array.isArray || function (xs) {
+ return Object.prototype.toString.call(xs) === '[object Array]';
+};
/***/ }),
-/***/ 8210:
-/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
-
-var iterate = __nccwpck_require__(9023)
- , initState = __nccwpck_require__(2474)
- , terminator = __nccwpck_require__(7942)
- ;
+/***/ 7935:
+/***/ ((module) => {
-// Public API
-module.exports = parallel;
+(function() {
+ var base64map
+ = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/',
-/**
- * Runs iterator over provided array elements in parallel
- *
- * @param {array|object} list - array or object (named list) to iterate over
- * @param {function} iterator - iterator to run
- * @param {function} callback - invoked when all elements processed
- * @returns {function} - jobs terminator
- */
-function parallel(list, iterator, callback)
-{
- var state = initState(list);
+ crypt = {
+ // Bit-wise rotation left
+ rotl: function(n, b) {
+ return (n << b) | (n >>> (32 - b));
+ },
- while (state.index < (state['keyedList'] || list).length)
- {
- iterate(list, iterator, state, function(error, result)
- {
- if (error)
- {
- callback(error, result);
- return;
- }
+ // Bit-wise rotation right
+ rotr: function(n, b) {
+ return (n << (32 - b)) | (n >>> b);
+ },
- // looks like it's the last one
- if (Object.keys(state.jobs).length === 0)
- {
- callback(null, state.results);
- return;
+ // Swap big-endian to little-endian and vice versa
+ endian: function(n) {
+ // If number given, swap endian
+ if (n.constructor == Number) {
+ return crypt.rotl(n, 8) & 0x00FF00FF | crypt.rotl(n, 24) & 0xFF00FF00;
}
- });
-
- state.index++;
- }
-
- return terminator.bind(state, callback);
-}
-
-
-/***/ }),
-
-/***/ 445:
-/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
-
-var serialOrdered = __nccwpck_require__(3578);
-
-// Public API
-module.exports = serial;
-
-/**
- * Runs iterator over provided array elements in series
- *
- * @param {array|object} list - array or object (named list) to iterate over
- * @param {function} iterator - iterator to run
- * @param {function} callback - invoked when all elements processed
- * @returns {function} - jobs terminator
- */
-function serial(list, iterator, callback)
-{
- return serialOrdered(list, iterator, null, callback);
-}
+ // Else, assume array and swap all items
+ for (var i = 0; i < n.length; i++)
+ n[i] = crypt.endian(n[i]);
+ return n;
+ },
-/***/ }),
+ // Generate an array of any length of random bytes
+ randomBytes: function(n) {
+ for (var bytes = []; n > 0; n--)
+ bytes.push(Math.floor(Math.random() * 256));
+ return bytes;
+ },
-/***/ 3578:
-/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
+ // Convert a byte array to big-endian 32-bit words
+ bytesToWords: function(bytes) {
+ for (var words = [], i = 0, b = 0; i < bytes.length; i++, b += 8)
+ words[b >>> 5] |= bytes[i] << (24 - b % 32);
+ return words;
+ },
-var iterate = __nccwpck_require__(9023)
- , initState = __nccwpck_require__(2474)
- , terminator = __nccwpck_require__(7942)
- ;
+ // Convert big-endian 32-bit words to a byte array
+ wordsToBytes: function(words) {
+ for (var bytes = [], b = 0; b < words.length * 32; b += 8)
+ bytes.push((words[b >>> 5] >>> (24 - b % 32)) & 0xFF);
+ return bytes;
+ },
-// Public API
-module.exports = serialOrdered;
-// sorting helpers
-module.exports.ascending = ascending;
-module.exports.descending = descending;
+ // Convert a byte array to a hex string
+ bytesToHex: function(bytes) {
+ for (var hex = [], i = 0; i < bytes.length; i++) {
+ hex.push((bytes[i] >>> 4).toString(16));
+ hex.push((bytes[i] & 0xF).toString(16));
+ }
+ return hex.join('');
+ },
-/**
- * Runs iterator over provided sorted array elements in series
- *
- * @param {array|object} list - array or object (named list) to iterate over
- * @param {function} iterator - iterator to run
- * @param {function} sortMethod - custom sort function
- * @param {function} callback - invoked when all elements processed
- * @returns {function} - jobs terminator
- */
-function serialOrdered(list, iterator, sortMethod, callback)
-{
- var state = initState(list, sortMethod);
+ // Convert a hex string to a byte array
+ hexToBytes: function(hex) {
+ for (var bytes = [], c = 0; c < hex.length; c += 2)
+ bytes.push(parseInt(hex.substr(c, 2), 16));
+ return bytes;
+ },
- iterate(list, iterator, state, function iteratorHandler(error, result)
- {
- if (error)
- {
- callback(error, result);
- return;
- }
+ // Convert a byte array to a base-64 string
+ bytesToBase64: function(bytes) {
+ for (var base64 = [], i = 0; i < bytes.length; i += 3) {
+ var triplet = (bytes[i] << 16) | (bytes[i + 1] << 8) | bytes[i + 2];
+ for (var j = 0; j < 4; j++)
+ if (i * 8 + j * 6 <= bytes.length * 8)
+ base64.push(base64map.charAt((triplet >>> 6 * (3 - j)) & 0x3F));
+ else
+ base64.push('=');
+ }
+ return base64.join('');
+ },
- state.index++;
+ // Convert a base-64 string to a byte array
+ base64ToBytes: function(base64) {
+ // Remove non-base-64 characters
+ base64 = base64.replace(/[^A-Z0-9+\/]/ig, '');
- // are we there yet?
- if (state.index < (state['keyedList'] || list).length)
- {
- iterate(list, iterator, state, iteratorHandler);
- return;
+ for (var bytes = [], i = 0, imod4 = 0; i < base64.length;
+ imod4 = ++i % 4) {
+ if (imod4 == 0) continue;
+ bytes.push(((base64map.indexOf(base64.charAt(i - 1))
+ & (Math.pow(2, -2 * imod4 + 8) - 1)) << (imod4 * 2))
+ | (base64map.indexOf(base64.charAt(i)) >>> (6 - imod4 * 2)));
+ }
+ return bytes;
}
+ };
- // done here
- callback(null, state.results);
- });
-
- return terminator.bind(state, callback);
-}
-
-/*
- * -- Sort methods
- */
-
-/**
- * sort helper to sort array elements in ascending order
- *
- * @param {mixed} a - an item to compare
- * @param {mixed} b - an item to compare
- * @returns {number} - comparison result
- */
-function ascending(a, b)
-{
- return a < b ? -1 : a > b ? 1 : 0;
-}
-
-/**
- * sort helper to sort array elements in descending order
- *
- * @param {mixed} a - an item to compare
- * @param {mixed} b - an item to compare
- * @returns {number} - comparison result
- */
-function descending(a, b)
-{
- return -1 * ascending(a, b);
-}
+ module.exports = crypt;
+})();
/***/ }),
-/***/ 9417:
-/***/ ((module) => {
-
-"use strict";
-
-module.exports = balanced;
-function balanced(a, b, str) {
- if (a instanceof RegExp) a = maybeMatch(a, str);
- if (b instanceof RegExp) b = maybeMatch(b, str);
+/***/ 8611:
+/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
- var r = range(a, b, str);
+var Stream = (__nccwpck_require__(2781).Stream);
+var util = __nccwpck_require__(3837);
- return r && {
- start: r[0],
- end: r[1],
- pre: str.slice(0, r[0]),
- body: str.slice(r[0] + a.length, r[1]),
- post: str.slice(r[1] + b.length)
- };
-}
+module.exports = DelayedStream;
+function DelayedStream() {
+ this.source = null;
+ this.dataSize = 0;
+ this.maxDataSize = 1024 * 1024;
+ this.pauseStream = true;
-function maybeMatch(reg, str) {
- var m = str.match(reg);
- return m ? m[0] : null;
+ this._maxDataSizeExceeded = false;
+ this._released = false;
+ this._bufferedEvents = [];
}
+util.inherits(DelayedStream, Stream);
-balanced.range = range;
-function range(a, b, str) {
- var begs, beg, left, right, result;
- var ai = str.indexOf(a);
- var bi = str.indexOf(b, ai + 1);
- var i = ai;
-
- if (ai >= 0 && bi > 0) {
- if(a===b) {
- return [ai, bi];
- }
- begs = [];
- left = str.length;
+DelayedStream.create = function(source, options) {
+ var delayedStream = new this();
- while (i >= 0 && !result) {
- if (i == ai) {
- begs.push(i);
- ai = str.indexOf(a, i + 1);
- } else if (begs.length == 1) {
- result = [ begs.pop(), bi ];
- } else {
- beg = begs.pop();
- if (beg < left) {
- left = beg;
- right = bi;
- }
+ options = options || {};
+ for (var option in options) {
+ delayedStream[option] = options[option];
+ }
- bi = str.indexOf(b, i + 1);
- }
+ delayedStream.source = source;
- i = ai < bi && ai >= 0 ? ai : bi;
- }
+ var realEmit = source.emit;
+ source.emit = function() {
+ delayedStream._handleEmit(arguments);
+ return realEmit.apply(source, arguments);
+ };
- if (begs.length) {
- result = [ left, right ];
- }
+ source.on('error', function() {});
+ if (delayedStream.pauseStream) {
+ source.pause();
}
- return result;
-}
-
-
-/***/ }),
+ return delayedStream;
+};
-/***/ 3717:
-/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
+Object.defineProperty(DelayedStream.prototype, 'readable', {
+ configurable: true,
+ enumerable: true,
+ get: function() {
+ return this.source.readable;
+ }
+});
-var concatMap = __nccwpck_require__(6891);
-var balanced = __nccwpck_require__(9417);
+DelayedStream.prototype.setEncoding = function() {
+ return this.source.setEncoding.apply(this.source, arguments);
+};
-module.exports = expandTop;
+DelayedStream.prototype.resume = function() {
+ if (!this._released) {
+ this.release();
+ }
-var escSlash = '\0SLASH'+Math.random()+'\0';
-var escOpen = '\0OPEN'+Math.random()+'\0';
-var escClose = '\0CLOSE'+Math.random()+'\0';
-var escComma = '\0COMMA'+Math.random()+'\0';
-var escPeriod = '\0PERIOD'+Math.random()+'\0';
+ this.source.resume();
+};
-function numeric(str) {
- return parseInt(str, 10) == str
- ? parseInt(str, 10)
- : str.charCodeAt(0);
-}
+DelayedStream.prototype.pause = function() {
+ this.source.pause();
+};
-function escapeBraces(str) {
- return str.split('\\\\').join(escSlash)
- .split('\\{').join(escOpen)
- .split('\\}').join(escClose)
- .split('\\,').join(escComma)
- .split('\\.').join(escPeriod);
-}
+DelayedStream.prototype.release = function() {
+ this._released = true;
-function unescapeBraces(str) {
- return str.split(escSlash).join('\\')
- .split(escOpen).join('{')
- .split(escClose).join('}')
- .split(escComma).join(',')
- .split(escPeriod).join('.');
-}
+ this._bufferedEvents.forEach(function(args) {
+ this.emit.apply(this, args);
+ }.bind(this));
+ this._bufferedEvents = [];
+};
+DelayedStream.prototype.pipe = function() {
+ var r = Stream.prototype.pipe.apply(this, arguments);
+ this.resume();
+ return r;
+};
-// Basically just str.split(","), but handling cases
-// where we have nested braced sections, which should be
-// treated as individual members, like {a,{b,c},d}
-function parseCommaParts(str) {
- if (!str)
- return [''];
+DelayedStream.prototype._handleEmit = function(args) {
+ if (this._released) {
+ this.emit.apply(this, args);
+ return;
+ }
- var parts = [];
- var m = balanced('{', '}', str);
+ if (args[0] === 'data') {
+ this.dataSize += args[1].length;
+ this._checkIfMaxDataSizeExceeded();
+ }
- if (!m)
- return str.split(',');
+ this._bufferedEvents.push(args);
+};
- var pre = m.pre;
- var body = m.body;
- var post = m.post;
- var p = pre.split(',');
+DelayedStream.prototype._checkIfMaxDataSizeExceeded = function() {
+ if (this._maxDataSizeExceeded) {
+ return;
+ }
- p[p.length-1] += '{' + body + '}';
- var postParts = parseCommaParts(post);
- if (post.length) {
- p[p.length-1] += postParts.shift();
- p.push.apply(p, postParts);
+ if (this.dataSize <= this.maxDataSize) {
+ return;
}
- parts.push.apply(parts, p);
+ this._maxDataSizeExceeded = true;
+ var message =
+ 'DelayedStream#maxDataSize of ' + this.maxDataSize + ' bytes exceeded.'
+ this.emit('error', new Error(message));
+};
- return parts;
-}
-function expandTop(str) {
- if (!str)
- return [];
+/***/ }),
- // I don't know why Bash 4.3 does this, but it does.
- // Anything starting with {} will have the first two bytes preserved
- // but *only* at the top level, so {},a}b will not expand to anything,
- // but a{},b}c will be expanded to [a}c,abc].
- // One could argue that this is a bug in Bash, but since the goal of
- // this module is to match Bash's rules, we escape a leading {}
- if (str.substr(0, 2) === '{}') {
- str = '\\{\\}' + str.substr(2);
- }
+/***/ 5625:
+/***/ ((module) => {
- return expand(escapeBraces(str), true).map(unescapeBraces);
-}
+/*!
+ * Determine if an object is a Buffer
+ *
+ * @author Feross Aboukhadijeh
+ * @license MIT
+ */
-function identity(e) {
- return e;
+// The _isBuffer check is for Safari 5-7 support, because it's missing
+// Object.prototype.constructor. Remove this eventually
+module.exports = function (obj) {
+ return obj != null && (isBuffer(obj) || isSlowBuffer(obj) || !!obj._isBuffer)
}
-function embrace(str) {
- return '{' + str + '}';
-}
-function isPadded(el) {
- return /^-?0\d/.test(el);
+function isBuffer (obj) {
+ return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj)
}
-function lte(i, y) {
- return i <= y;
-}
-function gte(i, y) {
- return i >= y;
+// For Node v0.10 support. Remove this eventually.
+function isSlowBuffer (obj) {
+ return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isBuffer(obj.slice(0, 0))
}
-function expand(str, isTop) {
- var expansions = [];
- var m = balanced('{', '}', str);
- if (!m || /\$$/.test(m.pre)) return [str];
+/***/ }),
- var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body);
- var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body);
- var isSequence = isNumericSequence || isAlphaSequence;
- var isOptions = m.body.indexOf(',') >= 0;
- if (!isSequence && !isOptions) {
- // {a},b}
- if (m.post.match(/,.*\}/)) {
- str = m.pre + '{' + m.body + escClose + m.post;
- return expand(str);
- }
- return [str];
- }
+/***/ 1711:
+/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
- var n;
- if (isSequence) {
- n = m.body.split(/\.\./);
- } else {
- n = parseCommaParts(m.body);
- if (n.length === 1) {
- // x{{a,b}}y ==> x{a}y x{b}y
- n = expand(n[0], false).map(embrace);
- if (n.length === 1) {
- var post = m.post.length
- ? expand(m.post, false)
- : [''];
- return post.map(function(p) {
- return m.pre + n[0] + p;
- });
- }
- }
- }
-
- // at this point, n is the parts, and we know it's not a comma set
- // with a single entry.
-
- // no need to expand pre, since it is guaranteed to be free of brace-sets
- var pre = m.pre;
- var post = m.post.length
- ? expand(m.post, false)
- : [''];
-
- var N;
+(function(){
+ var crypt = __nccwpck_require__(7935),
+ utf8 = (__nccwpck_require__(421).utf8),
+ isBuffer = __nccwpck_require__(5625),
+ bin = (__nccwpck_require__(421).bin),
+
+ // The core
+ md5 = function (message, options) {
+ // Convert to byte array
+ if (message.constructor == String)
+ if (options && options.encoding === 'binary')
+ message = bin.stringToBytes(message);
+ else
+ message = utf8.stringToBytes(message);
+ else if (isBuffer(message))
+ message = Array.prototype.slice.call(message, 0);
+ else if (!Array.isArray(message) && message.constructor !== Uint8Array)
+ message = message.toString();
+ // else, assume byte array already
+
+ var m = crypt.bytesToWords(message),
+ l = message.length * 8,
+ a = 1732584193,
+ b = -271733879,
+ c = -1732584194,
+ d = 271733878;
+
+ // Swap endian
+ for (var i = 0; i < m.length; i++) {
+ m[i] = ((m[i] << 8) | (m[i] >>> 24)) & 0x00FF00FF |
+ ((m[i] << 24) | (m[i] >>> 8)) & 0xFF00FF00;
+ }
+
+ // Padding
+ m[l >>> 5] |= 0x80 << (l % 32);
+ m[(((l + 64) >>> 9) << 4) + 14] = l;
+
+ // Method shortcuts
+ var FF = md5._ff,
+ GG = md5._gg,
+ HH = md5._hh,
+ II = md5._ii;
+
+ for (var i = 0; i < m.length; i += 16) {
+
+ var aa = a,
+ bb = b,
+ cc = c,
+ dd = d;
+
+ a = FF(a, b, c, d, m[i+ 0], 7, -680876936);
+ d = FF(d, a, b, c, m[i+ 1], 12, -389564586);
+ c = FF(c, d, a, b, m[i+ 2], 17, 606105819);
+ b = FF(b, c, d, a, m[i+ 3], 22, -1044525330);
+ a = FF(a, b, c, d, m[i+ 4], 7, -176418897);
+ d = FF(d, a, b, c, m[i+ 5], 12, 1200080426);
+ c = FF(c, d, a, b, m[i+ 6], 17, -1473231341);
+ b = FF(b, c, d, a, m[i+ 7], 22, -45705983);
+ a = FF(a, b, c, d, m[i+ 8], 7, 1770035416);
+ d = FF(d, a, b, c, m[i+ 9], 12, -1958414417);
+ c = FF(c, d, a, b, m[i+10], 17, -42063);
+ b = FF(b, c, d, a, m[i+11], 22, -1990404162);
+ a = FF(a, b, c, d, m[i+12], 7, 1804603682);
+ d = FF(d, a, b, c, m[i+13], 12, -40341101);
+ c = FF(c, d, a, b, m[i+14], 17, -1502002290);
+ b = FF(b, c, d, a, m[i+15], 22, 1236535329);
+
+ a = GG(a, b, c, d, m[i+ 1], 5, -165796510);
+ d = GG(d, a, b, c, m[i+ 6], 9, -1069501632);
+ c = GG(c, d, a, b, m[i+11], 14, 643717713);
+ b = GG(b, c, d, a, m[i+ 0], 20, -373897302);
+ a = GG(a, b, c, d, m[i+ 5], 5, -701558691);
+ d = GG(d, a, b, c, m[i+10], 9, 38016083);
+ c = GG(c, d, a, b, m[i+15], 14, -660478335);
+ b = GG(b, c, d, a, m[i+ 4], 20, -405537848);
+ a = GG(a, b, c, d, m[i+ 9], 5, 568446438);
+ d = GG(d, a, b, c, m[i+14], 9, -1019803690);
+ c = GG(c, d, a, b, m[i+ 3], 14, -187363961);
+ b = GG(b, c, d, a, m[i+ 8], 20, 1163531501);
+ a = GG(a, b, c, d, m[i+13], 5, -1444681467);
+ d = GG(d, a, b, c, m[i+ 2], 9, -51403784);
+ c = GG(c, d, a, b, m[i+ 7], 14, 1735328473);
+ b = GG(b, c, d, a, m[i+12], 20, -1926607734);
+
+ a = HH(a, b, c, d, m[i+ 5], 4, -378558);
+ d = HH(d, a, b, c, m[i+ 8], 11, -2022574463);
+ c = HH(c, d, a, b, m[i+11], 16, 1839030562);
+ b = HH(b, c, d, a, m[i+14], 23, -35309556);
+ a = HH(a, b, c, d, m[i+ 1], 4, -1530992060);
+ d = HH(d, a, b, c, m[i+ 4], 11, 1272893353);
+ c = HH(c, d, a, b, m[i+ 7], 16, -155497632);
+ b = HH(b, c, d, a, m[i+10], 23, -1094730640);
+ a = HH(a, b, c, d, m[i+13], 4, 681279174);
+ d = HH(d, a, b, c, m[i+ 0], 11, -358537222);
+ c = HH(c, d, a, b, m[i+ 3], 16, -722521979);
+ b = HH(b, c, d, a, m[i+ 6], 23, 76029189);
+ a = HH(a, b, c, d, m[i+ 9], 4, -640364487);
+ d = HH(d, a, b, c, m[i+12], 11, -421815835);
+ c = HH(c, d, a, b, m[i+15], 16, 530742520);
+ b = HH(b, c, d, a, m[i+ 2], 23, -995338651);
+
+ a = II(a, b, c, d, m[i+ 0], 6, -198630844);
+ d = II(d, a, b, c, m[i+ 7], 10, 1126891415);
+ c = II(c, d, a, b, m[i+14], 15, -1416354905);
+ b = II(b, c, d, a, m[i+ 5], 21, -57434055);
+ a = II(a, b, c, d, m[i+12], 6, 1700485571);
+ d = II(d, a, b, c, m[i+ 3], 10, -1894986606);
+ c = II(c, d, a, b, m[i+10], 15, -1051523);
+ b = II(b, c, d, a, m[i+ 1], 21, -2054922799);
+ a = II(a, b, c, d, m[i+ 8], 6, 1873313359);
+ d = II(d, a, b, c, m[i+15], 10, -30611744);
+ c = II(c, d, a, b, m[i+ 6], 15, -1560198380);
+ b = II(b, c, d, a, m[i+13], 21, 1309151649);
+ a = II(a, b, c, d, m[i+ 4], 6, -145523070);
+ d = II(d, a, b, c, m[i+11], 10, -1120210379);
+ c = II(c, d, a, b, m[i+ 2], 15, 718787259);
+ b = II(b, c, d, a, m[i+ 9], 21, -343485551);
+
+ a = (a + aa) >>> 0;
+ b = (b + bb) >>> 0;
+ c = (c + cc) >>> 0;
+ d = (d + dd) >>> 0;
+ }
+
+ return crypt.endian([a, b, c, d]);
+ };
+
+ // Auxiliary functions
+ md5._ff = function (a, b, c, d, x, s, t) {
+ var n = a + (b & c | ~b & d) + (x >>> 0) + t;
+ return ((n << s) | (n >>> (32 - s))) + b;
+ };
+ md5._gg = function (a, b, c, d, x, s, t) {
+ var n = a + (b & d | c & ~d) + (x >>> 0) + t;
+ return ((n << s) | (n >>> (32 - s))) + b;
+ };
+ md5._hh = function (a, b, c, d, x, s, t) {
+ var n = a + (b ^ c ^ d) + (x >>> 0) + t;
+ return ((n << s) | (n >>> (32 - s))) + b;
+ };
+ md5._ii = function (a, b, c, d, x, s, t) {
+ var n = a + (c ^ (b | ~d)) + (x >>> 0) + t;
+ return ((n << s) | (n >>> (32 - s))) + b;
+ };
+
+ // Package private blocksize
+ md5._blocksize = 16;
+ md5._digestsize = 16;
+
+ module.exports = function (message, options) {
+ if (message === undefined || message === null)
+ throw new Error('Illegal argument ' + message);
+
+ var digestbytes = crypt.wordsToBytes(md5(message, options));
+ return options && options.asBytes ? digestbytes :
+ options && options.asString ? bin.bytesToString(digestbytes) :
+ crypt.bytesToHex(digestbytes);
+ };
+
+})();
- if (isSequence) {
- var x = numeric(n[0]);
- var y = numeric(n[1]);
- var width = Math.max(n[0].length, n[1].length)
- var incr = n.length == 3
- ? Math.abs(numeric(n[2]))
- : 1;
- var test = lte;
- var reverse = y < x;
- if (reverse) {
- incr *= -1;
- test = gte;
- }
- var pad = n.some(isPadded);
- N = [];
+/***/ }),
- for (var i = x; test(i, y); i += incr) {
- var c;
- if (isAlphaSequence) {
- c = String.fromCharCode(i);
- if (c === '\\')
- c = '';
- } else {
- c = String(i);
- if (pad) {
- var need = width - c.length;
- if (need > 0) {
- var z = new Array(need + 1).join('0');
- if (i < 0)
- c = '-' + z + c.slice(1);
- else
- c = z + c;
- }
- }
- }
- N.push(c);
- }
- } else {
- N = concatMap(n, function(el) { return expand(el, false) });
- }
+/***/ 7426:
+/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
- for (var j = 0; j < N.length; j++) {
- for (var k = 0; k < post.length; k++) {
- var expansion = pre + N[j] + post[k];
- if (!isTop || isSequence || expansion)
- expansions.push(expansion);
- }
- }
+/*!
+ * mime-db
+ * Copyright(c) 2014 Jonathan Ong
+ * Copyright(c) 2015-2022 Douglas Christopher Wilson
+ * MIT Licensed
+ */
- return expansions;
-}
+/**
+ * Module exports.
+ */
+module.exports = __nccwpck_require__(3765)
/***/ }),
-/***/ 421:
-/***/ ((module) => {
-
-var charenc = {
- // UTF-8 encoding
- utf8: {
- // Convert a string to a byte array
- stringToBytes: function(str) {
- return charenc.bin.stringToBytes(unescape(encodeURIComponent(str)));
- },
+/***/ 3583:
+/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
- // Convert a byte array to a string
- bytesToString: function(bytes) {
- return decodeURIComponent(escape(charenc.bin.bytesToString(bytes)));
- }
- },
+"use strict";
+/*!
+ * mime-types
+ * Copyright(c) 2014 Jonathan Ong
+ * Copyright(c) 2015 Douglas Christopher Wilson
+ * MIT Licensed
+ */
- // Binary encoding
- bin: {
- // Convert a string to a byte array
- stringToBytes: function(str) {
- for (var bytes = [], i = 0; i < str.length; i++)
- bytes.push(str.charCodeAt(i) & 0xFF);
- return bytes;
- },
- // Convert a byte array to a string
- bytesToString: function(bytes) {
- for (var str = [], i = 0; i < bytes.length; i++)
- str.push(String.fromCharCode(bytes[i]));
- return str.join('');
- }
- }
-};
-module.exports = charenc;
+/**
+ * Module dependencies.
+ * @private
+ */
+var db = __nccwpck_require__(7426)
+var extname = (__nccwpck_require__(1017).extname)
-/***/ }),
+/**
+ * Module variables.
+ * @private
+ */
-/***/ 5443:
-/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
+var EXTRACT_TYPE_REGEXP = /^\s*([^;\s]*)(?:;|\s|$)/
+var TEXT_TYPE_REGEXP = /^text\//i
-var util = __nccwpck_require__(3837);
-var Stream = (__nccwpck_require__(2781).Stream);
-var DelayedStream = __nccwpck_require__(8611);
+/**
+ * Module exports.
+ * @public
+ */
-module.exports = CombinedStream;
-function CombinedStream() {
- this.writable = false;
- this.readable = true;
- this.dataSize = 0;
- this.maxDataSize = 2 * 1024 * 1024;
- this.pauseStreams = true;
+exports.charset = charset
+exports.charsets = { lookup: charset }
+exports.contentType = contentType
+exports.extension = extension
+exports.extensions = Object.create(null)
+exports.lookup = lookup
+exports.types = Object.create(null)
- this._released = false;
- this._streams = [];
- this._currentStream = null;
- this._insideLoop = false;
- this._pendingNext = false;
-}
-util.inherits(CombinedStream, Stream);
+// Populate the extensions/types maps
+populateMaps(exports.extensions, exports.types)
-CombinedStream.create = function(options) {
- var combinedStream = new this();
+/**
+ * Get the default charset for a MIME type.
+ *
+ * @param {string} type
+ * @return {boolean|string}
+ */
- options = options || {};
- for (var option in options) {
- combinedStream[option] = options[option];
+function charset (type) {
+ if (!type || typeof type !== 'string') {
+ return false
}
- return combinedStream;
-};
+ // TODO: use media-typer
+ var match = EXTRACT_TYPE_REGEXP.exec(type)
+ var mime = match && db[match[1].toLowerCase()]
-CombinedStream.isStreamLike = function(stream) {
- return (typeof stream !== 'function')
- && (typeof stream !== 'string')
- && (typeof stream !== 'boolean')
- && (typeof stream !== 'number')
- && (!Buffer.isBuffer(stream));
-};
+ if (mime && mime.charset) {
+ return mime.charset
+ }
-CombinedStream.prototype.append = function(stream) {
- var isStreamLike = CombinedStream.isStreamLike(stream);
+ // default text/* to utf-8
+ if (match && TEXT_TYPE_REGEXP.test(match[1])) {
+ return 'UTF-8'
+ }
- if (isStreamLike) {
- if (!(stream instanceof DelayedStream)) {
- var newStream = DelayedStream.create(stream, {
- maxDataSize: Infinity,
- pauseStream: this.pauseStreams,
- });
- stream.on('data', this._checkDataSize.bind(this));
- stream = newStream;
- }
+ return false
+}
- this._handleErrors(stream);
+/**
+ * Create a full Content-Type header given a MIME type or extension.
+ *
+ * @param {string} str
+ * @return {boolean|string}
+ */
- if (this.pauseStreams) {
- stream.pause();
- }
+function contentType (str) {
+ // TODO: should this even be in this module?
+ if (!str || typeof str !== 'string') {
+ return false
}
- this._streams.push(stream);
- return this;
-};
-
-CombinedStream.prototype.pipe = function(dest, options) {
- Stream.prototype.pipe.call(this, dest, options);
- this.resume();
- return dest;
-};
-
-CombinedStream.prototype._getNext = function() {
- this._currentStream = null;
+ var mime = str.indexOf('/') === -1
+ ? exports.lookup(str)
+ : str
- if (this._insideLoop) {
- this._pendingNext = true;
- return; // defer call
+ if (!mime) {
+ return false
}
- this._insideLoop = true;
- try {
- do {
- this._pendingNext = false;
- this._realGetNext();
- } while (this._pendingNext);
- } finally {
- this._insideLoop = false;
+ // TODO: use content-type or other module
+ if (mime.indexOf('charset') === -1) {
+ var charset = exports.charset(mime)
+ if (charset) mime += '; charset=' + charset.toLowerCase()
}
-};
-
-CombinedStream.prototype._realGetNext = function() {
- var stream = this._streams.shift();
+ return mime
+}
- if (typeof stream == 'undefined') {
- this.end();
- return;
- }
+/**
+ * Get the default extension for a MIME type.
+ *
+ * @param {string} type
+ * @return {boolean|string}
+ */
- if (typeof stream !== 'function') {
- this._pipeNext(stream);
- return;
+function extension (type) {
+ if (!type || typeof type !== 'string') {
+ return false
}
- var getStream = stream;
- getStream(function(stream) {
- var isStreamLike = CombinedStream.isStreamLike(stream);
- if (isStreamLike) {
- stream.on('data', this._checkDataSize.bind(this));
- this._handleErrors(stream);
- }
-
- this._pipeNext(stream);
- }.bind(this));
-};
+ // TODO: use media-typer
+ var match = EXTRACT_TYPE_REGEXP.exec(type)
-CombinedStream.prototype._pipeNext = function(stream) {
- this._currentStream = stream;
+ // get extensions
+ var exts = match && exports.extensions[match[1].toLowerCase()]
- var isStreamLike = CombinedStream.isStreamLike(stream);
- if (isStreamLike) {
- stream.on('end', this._getNext.bind(this));
- stream.pipe(this, {end: false});
- return;
+ if (!exts || !exts.length) {
+ return false
}
- var value = stream;
- this.write(value);
- this._getNext();
-};
-
-CombinedStream.prototype._handleErrors = function(stream) {
- var self = this;
- stream.on('error', function(err) {
- self._emitError(err);
- });
-};
+ return exts[0]
+}
-CombinedStream.prototype.write = function(data) {
- this.emit('data', data);
-};
+/**
+ * Lookup the MIME type for a file path/extension.
+ *
+ * @param {string} path
+ * @return {boolean|string}
+ */
-CombinedStream.prototype.pause = function() {
- if (!this.pauseStreams) {
- return;
+function lookup (path) {
+ if (!path || typeof path !== 'string') {
+ return false
}
- if(this.pauseStreams && this._currentStream && typeof(this._currentStream.pause) == 'function') this._currentStream.pause();
- this.emit('pause');
-};
+ // get the extension ("ext" or ".ext" or full path)
+ var extension = extname('x.' + path)
+ .toLowerCase()
+ .substr(1)
-CombinedStream.prototype.resume = function() {
- if (!this._released) {
- this._released = true;
- this.writable = true;
- this._getNext();
+ if (!extension) {
+ return false
}
- if(this.pauseStreams && this._currentStream && typeof(this._currentStream.resume) == 'function') this._currentStream.resume();
- this.emit('resume');
-};
+ return exports.types[extension] || false
+}
-CombinedStream.prototype.end = function() {
- this._reset();
- this.emit('end');
-};
+/**
+ * Populate the extensions and types maps.
+ * @private
+ */
-CombinedStream.prototype.destroy = function() {
- this._reset();
- this.emit('close');
-};
+function populateMaps (extensions, types) {
+ // source preference (least -> most)
+ var preference = ['nginx', 'apache', undefined, 'iana']
-CombinedStream.prototype._reset = function() {
- this.writable = false;
- this._streams = [];
- this._currentStream = null;
-};
+ Object.keys(db).forEach(function forEachMimeType (type) {
+ var mime = db[type]
+ var exts = mime.extensions
-CombinedStream.prototype._checkDataSize = function() {
- this._updateDataSize();
- if (this.dataSize <= this.maxDataSize) {
- return;
- }
+ if (!exts || !exts.length) {
+ return
+ }
- var message =
- 'DelayedStream#maxDataSize of ' + this.maxDataSize + ' bytes exceeded.';
- this._emitError(new Error(message));
-};
+ // mime -> extensions
+ extensions[type] = exts
-CombinedStream.prototype._updateDataSize = function() {
- this.dataSize = 0;
+ // extension -> mime
+ for (var i = 0; i < exts.length; i++) {
+ var extension = exts[i]
- var self = this;
- this._streams.forEach(function(stream) {
- if (!stream.dataSize) {
- return;
+ if (types[extension]) {
+ var from = preference.indexOf(db[types[extension]].source)
+ var to = preference.indexOf(mime.source)
+
+ if (types[extension] !== 'application/octet-stream' &&
+ (from > to || (from === to && types[extension].substr(0, 12) === 'application/'))) {
+ // skip the remapping
+ continue
+ }
+ }
+
+ // set the extension -> mime
+ types[extension] = type
}
+ })
+}
- self.dataSize += stream.dataSize;
- });
- if (this._currentStream && this._currentStream.dataSize) {
- this.dataSize += this._currentStream.dataSize;
- }
-};
+/***/ }),
-CombinedStream.prototype._emitError = function(err) {
- this._reset();
- this.emit('error', err);
-};
+/***/ 3973:
+/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
+module.exports = minimatch
+minimatch.Minimatch = Minimatch
-/***/ }),
+var path = (function () { try { return __nccwpck_require__(1017) } catch (e) {}}()) || {
+ sep: '/'
+}
+minimatch.sep = path.sep
-/***/ 6891:
-/***/ ((module) => {
+var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}
+var expand = __nccwpck_require__(3717)
-module.exports = function (xs, fn) {
- var res = [];
- for (var i = 0; i < xs.length; i++) {
- var x = fn(xs[i], i);
- if (isArray(x)) res.push.apply(res, x);
- else res.push(x);
- }
- return res;
-};
+var plTypes = {
+ '!': { open: '(?:(?!(?:', close: '))[^/]*?)'},
+ '?': { open: '(?:', close: ')?' },
+ '+': { open: '(?:', close: ')+' },
+ '*': { open: '(?:', close: ')*' },
+ '@': { open: '(?:', close: ')' }
+}
-var isArray = Array.isArray || function (xs) {
- return Object.prototype.toString.call(xs) === '[object Array]';
-};
+// any single thing other than /
+// don't need to escape / when using new RegExp()
+var qmark = '[^/]'
+// * => any number of characters
+var star = qmark + '*?'
-/***/ }),
+// ** when dots are allowed. Anything goes, except .. and .
+// not (^ or / followed by one or two dots followed by $ or /),
+// followed by anything, any number of times.
+var twoStarDot = '(?:(?!(?:\\\/|^)(?:\\.{1,2})($|\\\/)).)*?'
-/***/ 7935:
-/***/ ((module) => {
+// not a ^ or / followed by a dot,
+// followed by anything, any number of times.
+var twoStarNoDot = '(?:(?!(?:\\\/|^)\\.).)*?'
-(function() {
- var base64map
- = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/',
+// characters that need to be escaped in RegExp.
+var reSpecials = charSet('().*{}+?[]^$\\!')
- crypt = {
- // Bit-wise rotation left
- rotl: function(n, b) {
- return (n << b) | (n >>> (32 - b));
- },
+// "abc" -> { a:true, b:true, c:true }
+function charSet (s) {
+ return s.split('').reduce(function (set, c) {
+ set[c] = true
+ return set
+ }, {})
+}
- // Bit-wise rotation right
- rotr: function(n, b) {
- return (n << (32 - b)) | (n >>> b);
- },
+// normalizes slashes.
+var slashSplit = /\/+/
- // Swap big-endian to little-endian and vice versa
- endian: function(n) {
- // If number given, swap endian
- if (n.constructor == Number) {
- return crypt.rotl(n, 8) & 0x00FF00FF | crypt.rotl(n, 24) & 0xFF00FF00;
- }
+minimatch.filter = filter
+function filter (pattern, options) {
+ options = options || {}
+ return function (p, i, list) {
+ return minimatch(p, pattern, options)
+ }
+}
- // Else, assume array and swap all items
- for (var i = 0; i < n.length; i++)
- n[i] = crypt.endian(n[i]);
- return n;
- },
+function ext (a, b) {
+ b = b || {}
+ var t = {}
+ Object.keys(a).forEach(function (k) {
+ t[k] = a[k]
+ })
+ Object.keys(b).forEach(function (k) {
+ t[k] = b[k]
+ })
+ return t
+}
- // Generate an array of any length of random bytes
- randomBytes: function(n) {
- for (var bytes = []; n > 0; n--)
- bytes.push(Math.floor(Math.random() * 256));
- return bytes;
- },
+minimatch.defaults = function (def) {
+ if (!def || typeof def !== 'object' || !Object.keys(def).length) {
+ return minimatch
+ }
- // Convert a byte array to big-endian 32-bit words
- bytesToWords: function(bytes) {
- for (var words = [], i = 0, b = 0; i < bytes.length; i++, b += 8)
- words[b >>> 5] |= bytes[i] << (24 - b % 32);
- return words;
- },
+ var orig = minimatch
- // Convert big-endian 32-bit words to a byte array
- wordsToBytes: function(words) {
- for (var bytes = [], b = 0; b < words.length * 32; b += 8)
- bytes.push((words[b >>> 5] >>> (24 - b % 32)) & 0xFF);
- return bytes;
- },
+ var m = function minimatch (p, pattern, options) {
+ return orig(p, pattern, ext(def, options))
+ }
- // Convert a byte array to a hex string
- bytesToHex: function(bytes) {
- for (var hex = [], i = 0; i < bytes.length; i++) {
- hex.push((bytes[i] >>> 4).toString(16));
- hex.push((bytes[i] & 0xF).toString(16));
- }
- return hex.join('');
- },
+ m.Minimatch = function Minimatch (pattern, options) {
+ return new orig.Minimatch(pattern, ext(def, options))
+ }
+ m.Minimatch.defaults = function defaults (options) {
+ return orig.defaults(ext(def, options)).Minimatch
+ }
- // Convert a hex string to a byte array
- hexToBytes: function(hex) {
- for (var bytes = [], c = 0; c < hex.length; c += 2)
- bytes.push(parseInt(hex.substr(c, 2), 16));
- return bytes;
- },
+ m.filter = function filter (pattern, options) {
+ return orig.filter(pattern, ext(def, options))
+ }
- // Convert a byte array to a base-64 string
- bytesToBase64: function(bytes) {
- for (var base64 = [], i = 0; i < bytes.length; i += 3) {
- var triplet = (bytes[i] << 16) | (bytes[i + 1] << 8) | bytes[i + 2];
- for (var j = 0; j < 4; j++)
- if (i * 8 + j * 6 <= bytes.length * 8)
- base64.push(base64map.charAt((triplet >>> 6 * (3 - j)) & 0x3F));
- else
- base64.push('=');
- }
- return base64.join('');
- },
+ m.defaults = function defaults (options) {
+ return orig.defaults(ext(def, options))
+ }
- // Convert a base-64 string to a byte array
- base64ToBytes: function(base64) {
- // Remove non-base-64 characters
- base64 = base64.replace(/[^A-Z0-9+\/]/ig, '');
+ m.makeRe = function makeRe (pattern, options) {
+ return orig.makeRe(pattern, ext(def, options))
+ }
- for (var bytes = [], i = 0, imod4 = 0; i < base64.length;
- imod4 = ++i % 4) {
- if (imod4 == 0) continue;
- bytes.push(((base64map.indexOf(base64.charAt(i - 1))
- & (Math.pow(2, -2 * imod4 + 8) - 1)) << (imod4 * 2))
- | (base64map.indexOf(base64.charAt(i)) >>> (6 - imod4 * 2)));
- }
- return bytes;
- }
- };
+ m.braceExpand = function braceExpand (pattern, options) {
+ return orig.braceExpand(pattern, ext(def, options))
+ }
- module.exports = crypt;
-})();
+ m.match = function (list, pattern, options) {
+ return orig.match(list, pattern, ext(def, options))
+ }
+ return m
+}
-/***/ }),
+Minimatch.defaults = function (def) {
+ return minimatch.defaults(def).Minimatch
+}
-/***/ 8611:
-/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
+function minimatch (p, pattern, options) {
+ assertValidPattern(pattern)
-var Stream = (__nccwpck_require__(2781).Stream);
-var util = __nccwpck_require__(3837);
+ if (!options) options = {}
-module.exports = DelayedStream;
-function DelayedStream() {
- this.source = null;
- this.dataSize = 0;
- this.maxDataSize = 1024 * 1024;
- this.pauseStream = true;
+ // shortcut: comments match nothing.
+ if (!options.nocomment && pattern.charAt(0) === '#') {
+ return false
+ }
- this._maxDataSizeExceeded = false;
- this._released = false;
- this._bufferedEvents = [];
+ return new Minimatch(pattern, options).match(p)
}
-util.inherits(DelayedStream, Stream);
-DelayedStream.create = function(source, options) {
- var delayedStream = new this();
-
- options = options || {};
- for (var option in options) {
- delayedStream[option] = options[option];
+function Minimatch (pattern, options) {
+ if (!(this instanceof Minimatch)) {
+ return new Minimatch(pattern, options)
}
- delayedStream.source = source;
+ assertValidPattern(pattern)
- var realEmit = source.emit;
- source.emit = function() {
- delayedStream._handleEmit(arguments);
- return realEmit.apply(source, arguments);
- };
+ if (!options) options = {}
- source.on('error', function() {});
- if (delayedStream.pauseStream) {
- source.pause();
+ pattern = pattern.trim()
+
+ // windows support: need to use /, not \
+ if (!options.allowWindowsEscape && path.sep !== '/') {
+ pattern = pattern.split(path.sep).join('/')
}
- return delayedStream;
-};
+ this.options = options
+ this.set = []
+ this.pattern = pattern
+ this.regexp = null
+ this.negate = false
+ this.comment = false
+ this.empty = false
+ this.partial = !!options.partial
-Object.defineProperty(DelayedStream.prototype, 'readable', {
- configurable: true,
- enumerable: true,
- get: function() {
- return this.source.readable;
- }
-});
+ // make the set of regexps etc.
+ this.make()
+}
-DelayedStream.prototype.setEncoding = function() {
- return this.source.setEncoding.apply(this.source, arguments);
-};
+Minimatch.prototype.debug = function () {}
-DelayedStream.prototype.resume = function() {
- if (!this._released) {
- this.release();
- }
+Minimatch.prototype.make = make
+function make () {
+ var pattern = this.pattern
+ var options = this.options
- this.source.resume();
-};
+ // empty patterns and comments match nothing.
+ if (!options.nocomment && pattern.charAt(0) === '#') {
+ this.comment = true
+ return
+ }
+ if (!pattern) {
+ this.empty = true
+ return
+ }
-DelayedStream.prototype.pause = function() {
- this.source.pause();
-};
+ // step 1: figure out negation, etc.
+ this.parseNegate()
-DelayedStream.prototype.release = function() {
- this._released = true;
+ // step 2: expand braces
+ var set = this.globSet = this.braceExpand()
- this._bufferedEvents.forEach(function(args) {
- this.emit.apply(this, args);
- }.bind(this));
- this._bufferedEvents = [];
-};
+ if (options.debug) this.debug = function debug() { console.error.apply(console, arguments) }
-DelayedStream.prototype.pipe = function() {
- var r = Stream.prototype.pipe.apply(this, arguments);
- this.resume();
- return r;
-};
+ this.debug(this.pattern, set)
-DelayedStream.prototype._handleEmit = function(args) {
- if (this._released) {
- this.emit.apply(this, args);
- return;
- }
+ // step 3: now we have a set, so turn each one into a series of path-portion
+ // matching patterns.
+ // These will be regexps, except in the case of "**", which is
+ // set to the GLOBSTAR object for globstar behavior,
+ // and will not contain any / characters
+ set = this.globParts = set.map(function (s) {
+ return s.split(slashSplit)
+ })
- if (args[0] === 'data') {
- this.dataSize += args[1].length;
- this._checkIfMaxDataSizeExceeded();
- }
+ this.debug(this.pattern, set)
- this._bufferedEvents.push(args);
-};
+ // glob --> regexps
+ set = set.map(function (s, si, set) {
+ return s.map(this.parse, this)
+ }, this)
-DelayedStream.prototype._checkIfMaxDataSizeExceeded = function() {
- if (this._maxDataSizeExceeded) {
- return;
- }
+ this.debug(this.pattern, set)
- if (this.dataSize <= this.maxDataSize) {
- return;
- }
+ // filter out everything that didn't compile properly.
+ set = set.filter(function (s) {
+ return s.indexOf(false) === -1
+ })
- this._maxDataSizeExceeded = true;
- var message =
- 'DelayedStream#maxDataSize of ' + this.maxDataSize + ' bytes exceeded.'
- this.emit('error', new Error(message));
-};
+ this.debug(this.pattern, set)
+ this.set = set
+}
-/***/ }),
+Minimatch.prototype.parseNegate = parseNegate
+function parseNegate () {
+ var pattern = this.pattern
+ var negate = false
+ var options = this.options
+ var negateOffset = 0
-/***/ 5625:
-/***/ ((module) => {
+ if (options.nonegate) return
-/*!
- * Determine if an object is a Buffer
- *
- * @author Feross Aboukhadijeh
- * @license MIT
- */
+ for (var i = 0, l = pattern.length
+ ; i < l && pattern.charAt(i) === '!'
+ ; i++) {
+ negate = !negate
+ negateOffset++
+ }
-// The _isBuffer check is for Safari 5-7 support, because it's missing
-// Object.prototype.constructor. Remove this eventually
-module.exports = function (obj) {
- return obj != null && (isBuffer(obj) || isSlowBuffer(obj) || !!obj._isBuffer)
+ if (negateOffset) this.pattern = pattern.substr(negateOffset)
+ this.negate = negate
}
-function isBuffer (obj) {
- return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj)
+// Brace expansion:
+// a{b,c}d -> abd acd
+// a{b,}c -> abc ac
+// a{0..3}d -> a0d a1d a2d a3d
+// a{b,c{d,e}f}g -> abg acdfg acefg
+// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg
+//
+// Invalid sets are not expanded.
+// a{2..}b -> a{2..}b
+// a{b}c -> a{b}c
+minimatch.braceExpand = function (pattern, options) {
+ return braceExpand(pattern, options)
}
-// For Node v0.10 support. Remove this eventually.
-function isSlowBuffer (obj) {
- return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isBuffer(obj.slice(0, 0))
+Minimatch.prototype.braceExpand = braceExpand
+
+function braceExpand (pattern, options) {
+ if (!options) {
+ if (this instanceof Minimatch) {
+ options = this.options
+ } else {
+ options = {}
+ }
+ }
+
+ pattern = typeof pattern === 'undefined'
+ ? this.pattern : pattern
+
+ assertValidPattern(pattern)
+
+ // Thanks to Yeting Li for
+ // improving this regexp to avoid a ReDOS vulnerability.
+ if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) {
+ // shortcut. no need to expand.
+ return [pattern]
+ }
+
+ return expand(pattern)
}
+var MAX_PATTERN_LENGTH = 1024 * 64
+var assertValidPattern = function (pattern) {
+ if (typeof pattern !== 'string') {
+ throw new TypeError('invalid pattern')
+ }
-/***/ }),
+ if (pattern.length > MAX_PATTERN_LENGTH) {
+ throw new TypeError('pattern is too long')
+ }
+}
-/***/ 1711:
-/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
-
-(function(){
- var crypt = __nccwpck_require__(7935),
- utf8 = (__nccwpck_require__(421).utf8),
- isBuffer = __nccwpck_require__(5625),
- bin = (__nccwpck_require__(421).bin),
-
- // The core
- md5 = function (message, options) {
- // Convert to byte array
- if (message.constructor == String)
- if (options && options.encoding === 'binary')
- message = bin.stringToBytes(message);
- else
- message = utf8.stringToBytes(message);
- else if (isBuffer(message))
- message = Array.prototype.slice.call(message, 0);
- else if (!Array.isArray(message) && message.constructor !== Uint8Array)
- message = message.toString();
- // else, assume byte array already
-
- var m = crypt.bytesToWords(message),
- l = message.length * 8,
- a = 1732584193,
- b = -271733879,
- c = -1732584194,
- d = 271733878;
-
- // Swap endian
- for (var i = 0; i < m.length; i++) {
- m[i] = ((m[i] << 8) | (m[i] >>> 24)) & 0x00FF00FF |
- ((m[i] << 24) | (m[i] >>> 8)) & 0xFF00FF00;
- }
-
- // Padding
- m[l >>> 5] |= 0x80 << (l % 32);
- m[(((l + 64) >>> 9) << 4) + 14] = l;
-
- // Method shortcuts
- var FF = md5._ff,
- GG = md5._gg,
- HH = md5._hh,
- II = md5._ii;
-
- for (var i = 0; i < m.length; i += 16) {
-
- var aa = a,
- bb = b,
- cc = c,
- dd = d;
-
- a = FF(a, b, c, d, m[i+ 0], 7, -680876936);
- d = FF(d, a, b, c, m[i+ 1], 12, -389564586);
- c = FF(c, d, a, b, m[i+ 2], 17, 606105819);
- b = FF(b, c, d, a, m[i+ 3], 22, -1044525330);
- a = FF(a, b, c, d, m[i+ 4], 7, -176418897);
- d = FF(d, a, b, c, m[i+ 5], 12, 1200080426);
- c = FF(c, d, a, b, m[i+ 6], 17, -1473231341);
- b = FF(b, c, d, a, m[i+ 7], 22, -45705983);
- a = FF(a, b, c, d, m[i+ 8], 7, 1770035416);
- d = FF(d, a, b, c, m[i+ 9], 12, -1958414417);
- c = FF(c, d, a, b, m[i+10], 17, -42063);
- b = FF(b, c, d, a, m[i+11], 22, -1990404162);
- a = FF(a, b, c, d, m[i+12], 7, 1804603682);
- d = FF(d, a, b, c, m[i+13], 12, -40341101);
- c = FF(c, d, a, b, m[i+14], 17, -1502002290);
- b = FF(b, c, d, a, m[i+15], 22, 1236535329);
-
- a = GG(a, b, c, d, m[i+ 1], 5, -165796510);
- d = GG(d, a, b, c, m[i+ 6], 9, -1069501632);
- c = GG(c, d, a, b, m[i+11], 14, 643717713);
- b = GG(b, c, d, a, m[i+ 0], 20, -373897302);
- a = GG(a, b, c, d, m[i+ 5], 5, -701558691);
- d = GG(d, a, b, c, m[i+10], 9, 38016083);
- c = GG(c, d, a, b, m[i+15], 14, -660478335);
- b = GG(b, c, d, a, m[i+ 4], 20, -405537848);
- a = GG(a, b, c, d, m[i+ 9], 5, 568446438);
- d = GG(d, a, b, c, m[i+14], 9, -1019803690);
- c = GG(c, d, a, b, m[i+ 3], 14, -187363961);
- b = GG(b, c, d, a, m[i+ 8], 20, 1163531501);
- a = GG(a, b, c, d, m[i+13], 5, -1444681467);
- d = GG(d, a, b, c, m[i+ 2], 9, -51403784);
- c = GG(c, d, a, b, m[i+ 7], 14, 1735328473);
- b = GG(b, c, d, a, m[i+12], 20, -1926607734);
-
- a = HH(a, b, c, d, m[i+ 5], 4, -378558);
- d = HH(d, a, b, c, m[i+ 8], 11, -2022574463);
- c = HH(c, d, a, b, m[i+11], 16, 1839030562);
- b = HH(b, c, d, a, m[i+14], 23, -35309556);
- a = HH(a, b, c, d, m[i+ 1], 4, -1530992060);
- d = HH(d, a, b, c, m[i+ 4], 11, 1272893353);
- c = HH(c, d, a, b, m[i+ 7], 16, -155497632);
- b = HH(b, c, d, a, m[i+10], 23, -1094730640);
- a = HH(a, b, c, d, m[i+13], 4, 681279174);
- d = HH(d, a, b, c, m[i+ 0], 11, -358537222);
- c = HH(c, d, a, b, m[i+ 3], 16, -722521979);
- b = HH(b, c, d, a, m[i+ 6], 23, 76029189);
- a = HH(a, b, c, d, m[i+ 9], 4, -640364487);
- d = HH(d, a, b, c, m[i+12], 11, -421815835);
- c = HH(c, d, a, b, m[i+15], 16, 530742520);
- b = HH(b, c, d, a, m[i+ 2], 23, -995338651);
-
- a = II(a, b, c, d, m[i+ 0], 6, -198630844);
- d = II(d, a, b, c, m[i+ 7], 10, 1126891415);
- c = II(c, d, a, b, m[i+14], 15, -1416354905);
- b = II(b, c, d, a, m[i+ 5], 21, -57434055);
- a = II(a, b, c, d, m[i+12], 6, 1700485571);
- d = II(d, a, b, c, m[i+ 3], 10, -1894986606);
- c = II(c, d, a, b, m[i+10], 15, -1051523);
- b = II(b, c, d, a, m[i+ 1], 21, -2054922799);
- a = II(a, b, c, d, m[i+ 8], 6, 1873313359);
- d = II(d, a, b, c, m[i+15], 10, -30611744);
- c = II(c, d, a, b, m[i+ 6], 15, -1560198380);
- b = II(b, c, d, a, m[i+13], 21, 1309151649);
- a = II(a, b, c, d, m[i+ 4], 6, -145523070);
- d = II(d, a, b, c, m[i+11], 10, -1120210379);
- c = II(c, d, a, b, m[i+ 2], 15, 718787259);
- b = II(b, c, d, a, m[i+ 9], 21, -343485551);
-
- a = (a + aa) >>> 0;
- b = (b + bb) >>> 0;
- c = (c + cc) >>> 0;
- d = (d + dd) >>> 0;
- }
-
- return crypt.endian([a, b, c, d]);
- };
-
- // Auxiliary functions
- md5._ff = function (a, b, c, d, x, s, t) {
- var n = a + (b & c | ~b & d) + (x >>> 0) + t;
- return ((n << s) | (n >>> (32 - s))) + b;
- };
- md5._gg = function (a, b, c, d, x, s, t) {
- var n = a + (b & d | c & ~d) + (x >>> 0) + t;
- return ((n << s) | (n >>> (32 - s))) + b;
- };
- md5._hh = function (a, b, c, d, x, s, t) {
- var n = a + (b ^ c ^ d) + (x >>> 0) + t;
- return ((n << s) | (n >>> (32 - s))) + b;
- };
- md5._ii = function (a, b, c, d, x, s, t) {
- var n = a + (c ^ (b | ~d)) + (x >>> 0) + t;
- return ((n << s) | (n >>> (32 - s))) + b;
- };
-
- // Package private blocksize
- md5._blocksize = 16;
- md5._digestsize = 16;
-
- module.exports = function (message, options) {
- if (message === undefined || message === null)
- throw new Error('Illegal argument ' + message);
-
- var digestbytes = crypt.wordsToBytes(md5(message, options));
- return options && options.asBytes ? digestbytes :
- options && options.asString ? bin.bytesToString(digestbytes) :
- crypt.bytesToHex(digestbytes);
- };
-
-})();
+// parse a component of the expanded set.
+// At this point, no pattern may contain "/" in it
+// so we're going to return a 2d array, where each entry is the full
+// pattern, split on '/', and then turned into a regular expression.
+// A regexp is made at the end which joins each array with an
+// escaped /, and another full one which joins each regexp with |.
+//
+// Following the lead of Bash 4.1, note that "**" only has special meaning
+// when it is the *only* thing in a path portion. Otherwise, any series
+// of * is equivalent to a single *. Globstar behavior is enabled by
+// default, and can be disabled by setting options.noglobstar.
+Minimatch.prototype.parse = parse
+var SUBPARSE = {}
+function parse (pattern, isSub) {
+ assertValidPattern(pattern)
+ var options = this.options
-/***/ }),
+ // shortcuts
+ if (pattern === '**') {
+ if (!options.noglobstar)
+ return GLOBSTAR
+ else
+ pattern = '*'
+ }
+ if (pattern === '') return ''
-/***/ 7426:
-/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
+ var re = ''
+ var hasMagic = !!options.nocase
+ var escaping = false
+ // ? => one single character
+ var patternListStack = []
+ var negativeLists = []
+ var stateChar
+ var inClass = false
+ var reClassStart = -1
+ var classStart = -1
+ // . and .. never match anything that doesn't start with .,
+ // even when options.dot is set.
+ var patternStart = pattern.charAt(0) === '.' ? '' // anything
+ // not (start or / followed by . or .. followed by / or end)
+ : options.dot ? '(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))'
+ : '(?!\\.)'
+ var self = this
-/*!
- * mime-db
- * Copyright(c) 2014 Jonathan Ong
- * Copyright(c) 2015-2022 Douglas Christopher Wilson
- * MIT Licensed
- */
+ function clearStateChar () {
+ if (stateChar) {
+ // we had some state-tracking character
+ // that wasn't consumed by this pass.
+ switch (stateChar) {
+ case '*':
+ re += star
+ hasMagic = true
+ break
+ case '?':
+ re += qmark
+ hasMagic = true
+ break
+ default:
+ re += '\\' + stateChar
+ break
+ }
+ self.debug('clearStateChar %j %j', stateChar, re)
+ stateChar = false
+ }
+ }
-/**
- * Module exports.
- */
+ for (var i = 0, len = pattern.length, c
+ ; (i < len) && (c = pattern.charAt(i))
+ ; i++) {
+ this.debug('%s\t%s %s %j', pattern, i, re, c)
-module.exports = __nccwpck_require__(3765)
+ // skip over any that are escaped.
+ if (escaping && reSpecials[c]) {
+ re += '\\' + c
+ escaping = false
+ continue
+ }
+ switch (c) {
+ /* istanbul ignore next */
+ case '/': {
+ // completely not allowed, even escaped.
+ // Should already be path-split by now.
+ return false
+ }
-/***/ }),
+ case '\\':
+ clearStateChar()
+ escaping = true
+ continue
-/***/ 3583:
-/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
+ // the various stateChar values
+ // for the "extglob" stuff.
+ case '?':
+ case '*':
+ case '+':
+ case '@':
+ case '!':
+ this.debug('%s\t%s %s %j <-- stateChar', pattern, i, re, c)
-"use strict";
-/*!
- * mime-types
- * Copyright(c) 2014 Jonathan Ong
- * Copyright(c) 2015 Douglas Christopher Wilson
- * MIT Licensed
- */
+ // all of those are literals inside a class, except that
+ // the glob [!a] means [^a] in regexp
+ if (inClass) {
+ this.debug(' in class')
+ if (c === '!' && i === classStart + 1) c = '^'
+ re += c
+ continue
+ }
+ // if we already have a stateChar, then it means
+ // that there was something like ** or +? in there.
+ // Handle the stateChar, then proceed with this one.
+ self.debug('call clearStateChar %j', stateChar)
+ clearStateChar()
+ stateChar = c
+ // if extglob is disabled, then +(asdf|foo) isn't a thing.
+ // just clear the statechar *now*, rather than even diving into
+ // the patternList stuff.
+ if (options.noext) clearStateChar()
+ continue
+ case '(':
+ if (inClass) {
+ re += '('
+ continue
+ }
-/**
- * Module dependencies.
- * @private
- */
+ if (!stateChar) {
+ re += '\\('
+ continue
+ }
-var db = __nccwpck_require__(7426)
-var extname = (__nccwpck_require__(1017).extname)
+ patternListStack.push({
+ type: stateChar,
+ start: i - 1,
+ reStart: re.length,
+ open: plTypes[stateChar].open,
+ close: plTypes[stateChar].close
+ })
+ // negation is (?:(?!js)[^/]*)
+ re += stateChar === '!' ? '(?:(?!(?:' : '(?:'
+ this.debug('plType %j %j', stateChar, re)
+ stateChar = false
+ continue
-/**
- * Module variables.
- * @private
- */
+ case ')':
+ if (inClass || !patternListStack.length) {
+ re += '\\)'
+ continue
+ }
-var EXTRACT_TYPE_REGEXP = /^\s*([^;\s]*)(?:;|\s|$)/
-var TEXT_TYPE_REGEXP = /^text\//i
+ clearStateChar()
+ hasMagic = true
+ var pl = patternListStack.pop()
+ // negation is (?:(?!js)[^/]*)
+ // The others are (?:)
+ re += pl.close
+ if (pl.type === '!') {
+ negativeLists.push(pl)
+ }
+ pl.reEnd = re.length
+ continue
-/**
- * Module exports.
- * @public
- */
+ case '|':
+ if (inClass || !patternListStack.length || escaping) {
+ re += '\\|'
+ escaping = false
+ continue
+ }
-exports.charset = charset
-exports.charsets = { lookup: charset }
-exports.contentType = contentType
-exports.extension = extension
-exports.extensions = Object.create(null)
-exports.lookup = lookup
-exports.types = Object.create(null)
+ clearStateChar()
+ re += '|'
+ continue
-// Populate the extensions/types maps
-populateMaps(exports.extensions, exports.types)
+ // these are mostly the same in regexp and glob
+ case '[':
+ // swallow any state-tracking char before the [
+ clearStateChar()
-/**
- * Get the default charset for a MIME type.
- *
- * @param {string} type
- * @return {boolean|string}
- */
+ if (inClass) {
+ re += '\\' + c
+ continue
+ }
-function charset (type) {
- if (!type || typeof type !== 'string') {
- return false
- }
+ inClass = true
+ classStart = i
+ reClassStart = re.length
+ re += c
+ continue
- // TODO: use media-typer
- var match = EXTRACT_TYPE_REGEXP.exec(type)
- var mime = match && db[match[1].toLowerCase()]
+ case ']':
+ // a right bracket shall lose its special
+ // meaning and represent itself in
+ // a bracket expression if it occurs
+ // first in the list. -- POSIX.2 2.8.3.2
+ if (i === classStart + 1 || !inClass) {
+ re += '\\' + c
+ escaping = false
+ continue
+ }
- if (mime && mime.charset) {
- return mime.charset
- }
+ // handle the case where we left a class open.
+ // "[z-a]" is valid, equivalent to "\[z-a\]"
+ // split where the last [ was, make sure we don't have
+ // an invalid re. if so, re-walk the contents of the
+ // would-be class to re-translate any characters that
+ // were passed through as-is
+ // TODO: It would probably be faster to determine this
+ // without a try/catch and a new RegExp, but it's tricky
+ // to do safely. For now, this is safe and works.
+ var cs = pattern.substring(classStart + 1, i)
+ try {
+ RegExp('[' + cs + ']')
+ } catch (er) {
+ // not a valid class!
+ var sp = this.parse(cs, SUBPARSE)
+ re = re.substr(0, reClassStart) + '\\[' + sp[0] + '\\]'
+ hasMagic = hasMagic || sp[1]
+ inClass = false
+ continue
+ }
- // default text/* to utf-8
- if (match && TEXT_TYPE_REGEXP.test(match[1])) {
- return 'UTF-8'
- }
+ // finish up the class.
+ hasMagic = true
+ inClass = false
+ re += c
+ continue
- return false
-}
+ default:
+ // swallow any state char that wasn't consumed
+ clearStateChar()
-/**
- * Create a full Content-Type header given a MIME type or extension.
- *
- * @param {string} str
- * @return {boolean|string}
- */
+ if (escaping) {
+ // no need
+ escaping = false
+ } else if (reSpecials[c]
+ && !(c === '^' && inClass)) {
+ re += '\\'
+ }
-function contentType (str) {
- // TODO: should this even be in this module?
- if (!str || typeof str !== 'string') {
- return false
- }
+ re += c
- var mime = str.indexOf('/') === -1
- ? exports.lookup(str)
- : str
+ } // switch
+ } // for
- if (!mime) {
- return false
+ // handle the case where we left a class open.
+ // "[abc" is valid, equivalent to "\[abc"
+ if (inClass) {
+ // split where the last [ was, and escape it
+ // this is a huge pita. We now have to re-walk
+ // the contents of the would-be class to re-translate
+ // any characters that were passed through as-is
+ cs = pattern.substr(classStart + 1)
+ sp = this.parse(cs, SUBPARSE)
+ re = re.substr(0, reClassStart) + '\\[' + sp[0]
+ hasMagic = hasMagic || sp[1]
}
- // TODO: use content-type or other module
- if (mime.indexOf('charset') === -1) {
- var charset = exports.charset(mime)
- if (charset) mime += '; charset=' + charset.toLowerCase()
- }
+ // handle the case where we had a +( thing at the *end*
+ // of the pattern.
+ // each pattern list stack adds 3 chars, and we need to go through
+ // and escape any | chars that were passed through as-is for the regexp.
+ // Go through and escape them, taking care not to double-escape any
+ // | chars that were already escaped.
+ for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) {
+ var tail = re.slice(pl.reStart + pl.open.length)
+ this.debug('setting tail', re, pl)
+ // maybe some even number of \, then maybe 1 \, followed by a |
+ tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function (_, $1, $2) {
+ if (!$2) {
+ // the | isn't already escaped, so escape it.
+ $2 = '\\'
+ }
- return mime
-}
+ // need to escape all those slashes *again*, without escaping the
+ // one that we need for escaping the | character. As it works out,
+ // escaping an even number of slashes can be done by simply repeating
+ // it exactly after itself. That's why this trick works.
+ //
+ // I am sorry that you have to see this.
+ return $1 + $1 + $2 + '|'
+ })
-/**
- * Get the default extension for a MIME type.
- *
- * @param {string} type
- * @return {boolean|string}
- */
+ this.debug('tail=%j\n %s', tail, tail, pl, re)
+ var t = pl.type === '*' ? star
+ : pl.type === '?' ? qmark
+ : '\\' + pl.type
-function extension (type) {
- if (!type || typeof type !== 'string') {
- return false
+ hasMagic = true
+ re = re.slice(0, pl.reStart) + t + '\\(' + tail
}
- // TODO: use media-typer
- var match = EXTRACT_TYPE_REGEXP.exec(type)
+ // handle trailing things that only matter at the very end.
+ clearStateChar()
+ if (escaping) {
+ // trailing \\
+ re += '\\\\'
+ }
- // get extensions
- var exts = match && exports.extensions[match[1].toLowerCase()]
-
- if (!exts || !exts.length) {
- return false
- }
-
- return exts[0]
-}
-
-/**
- * Lookup the MIME type for a file path/extension.
- *
- * @param {string} path
- * @return {boolean|string}
- */
-
-function lookup (path) {
- if (!path || typeof path !== 'string') {
- return false
- }
-
- // get the extension ("ext" or ".ext" or full path)
- var extension = extname('x.' + path)
- .toLowerCase()
- .substr(1)
-
- if (!extension) {
- return false
+ // only need to apply the nodot start if the re starts with
+ // something that could conceivably capture a dot
+ var addPatternStart = false
+ switch (re.charAt(0)) {
+ case '[': case '.': case '(': addPatternStart = true
}
- return exports.types[extension] || false
-}
-
-/**
- * Populate the extensions and types maps.
- * @private
- */
+ // Hack to work around lack of negative lookbehind in JS
+ // A pattern like: *.!(x).!(y|z) needs to ensure that a name
+ // like 'a.xyz.yz' doesn't match. So, the first negative
+ // lookahead, has to look ALL the way ahead, to the end of
+ // the pattern.
+ for (var n = negativeLists.length - 1; n > -1; n--) {
+ var nl = negativeLists[n]
-function populateMaps (extensions, types) {
- // source preference (least -> most)
- var preference = ['nginx', 'apache', undefined, 'iana']
+ var nlBefore = re.slice(0, nl.reStart)
+ var nlFirst = re.slice(nl.reStart, nl.reEnd - 8)
+ var nlLast = re.slice(nl.reEnd - 8, nl.reEnd)
+ var nlAfter = re.slice(nl.reEnd)
- Object.keys(db).forEach(function forEachMimeType (type) {
- var mime = db[type]
- var exts = mime.extensions
+ nlLast += nlAfter
- if (!exts || !exts.length) {
- return
+ // Handle nested stuff like *(*.js|!(*.json)), where open parens
+ // mean that we should *not* include the ) in the bit that is considered
+ // "after" the negated section.
+ var openParensBefore = nlBefore.split('(').length - 1
+ var cleanAfter = nlAfter
+ for (i = 0; i < openParensBefore; i++) {
+ cleanAfter = cleanAfter.replace(/\)[+*?]?/, '')
}
+ nlAfter = cleanAfter
- // mime -> extensions
- extensions[type] = exts
-
- // extension -> mime
- for (var i = 0; i < exts.length; i++) {
- var extension = exts[i]
-
- if (types[extension]) {
- var from = preference.indexOf(db[types[extension]].source)
- var to = preference.indexOf(mime.source)
+ var dollar = ''
+ if (nlAfter === '' && isSub !== SUBPARSE) {
+ dollar = '$'
+ }
+ var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast
+ re = newRe
+ }
- if (types[extension] !== 'application/octet-stream' &&
- (from > to || (from === to && types[extension].substr(0, 12) === 'application/'))) {
- // skip the remapping
- continue
- }
- }
+ // if the re is not "" at this point, then we need to make sure
+ // it doesn't match against an empty path part.
+ // Otherwise a/* will match a/, which it should not.
+ if (re !== '' && hasMagic) {
+ re = '(?=.)' + re
+ }
- // set the extension -> mime
- types[extension] = type
- }
- })
-}
+ if (addPatternStart) {
+ re = patternStart + re
+ }
+ // parsing just a piece of a larger pattern.
+ if (isSub === SUBPARSE) {
+ return [re, hasMagic]
+ }
-/***/ }),
+ // skip the regexp for non-magical patterns
+ // unescape anything in it, though, so that it'll be
+ // an exact match against a file etc.
+ if (!hasMagic) {
+ return globUnescape(pattern)
+ }
-/***/ 3973:
-/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
+ var flags = options.nocase ? 'i' : ''
+ try {
+ var regExp = new RegExp('^' + re + '$', flags)
+ } catch (er) /* istanbul ignore next - should be impossible */ {
+ // If it was an invalid regular expression, then it can't match
+ // anything. This trick looks for a character after the end of
+ // the string, which is of course impossible, except in multi-line
+ // mode, but it's not a /m regex.
+ return new RegExp('$.')
+ }
-module.exports = minimatch
-minimatch.Minimatch = Minimatch
+ regExp._glob = pattern
+ regExp._src = re
-var path = (function () { try { return __nccwpck_require__(1017) } catch (e) {}}()) || {
- sep: '/'
+ return regExp
}
-minimatch.sep = path.sep
-
-var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}
-var expand = __nccwpck_require__(3717)
-var plTypes = {
- '!': { open: '(?:(?!(?:', close: '))[^/]*?)'},
- '?': { open: '(?:', close: ')?' },
- '+': { open: '(?:', close: ')+' },
- '*': { open: '(?:', close: ')*' },
- '@': { open: '(?:', close: ')' }
+minimatch.makeRe = function (pattern, options) {
+ return new Minimatch(pattern, options || {}).makeRe()
}
-// any single thing other than /
-// don't need to escape / when using new RegExp()
-var qmark = '[^/]'
+Minimatch.prototype.makeRe = makeRe
+function makeRe () {
+ if (this.regexp || this.regexp === false) return this.regexp
-// * => any number of characters
-var star = qmark + '*?'
+ // at this point, this.set is a 2d array of partial
+ // pattern strings, or "**".
+ //
+ // It's better to use .match(). This function shouldn't
+ // be used, really, but it's pretty convenient sometimes,
+ // when you just want to work with a regex.
+ var set = this.set
-// ** when dots are allowed. Anything goes, except .. and .
-// not (^ or / followed by one or two dots followed by $ or /),
-// followed by anything, any number of times.
-var twoStarDot = '(?:(?!(?:\\\/|^)(?:\\.{1,2})($|\\\/)).)*?'
+ if (!set.length) {
+ this.regexp = false
+ return this.regexp
+ }
+ var options = this.options
-// not a ^ or / followed by a dot,
-// followed by anything, any number of times.
-var twoStarNoDot = '(?:(?!(?:\\\/|^)\\.).)*?'
+ var twoStar = options.noglobstar ? star
+ : options.dot ? twoStarDot
+ : twoStarNoDot
+ var flags = options.nocase ? 'i' : ''
-// characters that need to be escaped in RegExp.
-var reSpecials = charSet('().*{}+?[]^$\\!')
+ var re = set.map(function (pattern) {
+ return pattern.map(function (p) {
+ return (p === GLOBSTAR) ? twoStar
+ : (typeof p === 'string') ? regExpEscape(p)
+ : p._src
+ }).join('\\\/')
+ }).join('|')
-// "abc" -> { a:true, b:true, c:true }
-function charSet (s) {
- return s.split('').reduce(function (set, c) {
- set[c] = true
- return set
- }, {})
-}
+ // must match entire pattern
+ // ending in a * or ** will make it less strict.
+ re = '^(?:' + re + ')$'
-// normalizes slashes.
-var slashSplit = /\/+/
+ // can match anything, as long as it's not this.
+ if (this.negate) re = '^(?!' + re + ').*$'
-minimatch.filter = filter
-function filter (pattern, options) {
- options = options || {}
- return function (p, i, list) {
- return minimatch(p, pattern, options)
+ try {
+ this.regexp = new RegExp(re, flags)
+ } catch (ex) /* istanbul ignore next - should be impossible */ {
+ this.regexp = false
}
+ return this.regexp
}
-function ext (a, b) {
- b = b || {}
- var t = {}
- Object.keys(a).forEach(function (k) {
- t[k] = a[k]
- })
- Object.keys(b).forEach(function (k) {
- t[k] = b[k]
+minimatch.match = function (list, pattern, options) {
+ options = options || {}
+ var mm = new Minimatch(pattern, options)
+ list = list.filter(function (f) {
+ return mm.match(f)
})
- return t
+ if (mm.options.nonull && !list.length) {
+ list.push(pattern)
+ }
+ return list
}
-minimatch.defaults = function (def) {
- if (!def || typeof def !== 'object' || !Object.keys(def).length) {
- return minimatch
- }
+Minimatch.prototype.match = function match (f, partial) {
+ if (typeof partial === 'undefined') partial = this.partial
+ this.debug('match', f, this.pattern)
+ // short-circuit in the case of busted things.
+ // comments, etc.
+ if (this.comment) return false
+ if (this.empty) return f === ''
- var orig = minimatch
+ if (f === '/' && partial) return true
- var m = function minimatch (p, pattern, options) {
- return orig(p, pattern, ext(def, options))
- }
+ var options = this.options
- m.Minimatch = function Minimatch (pattern, options) {
- return new orig.Minimatch(pattern, ext(def, options))
- }
- m.Minimatch.defaults = function defaults (options) {
- return orig.defaults(ext(def, options)).Minimatch
+ // windows: need to use /, not \
+ if (path.sep !== '/') {
+ f = f.split(path.sep).join('/')
}
- m.filter = function filter (pattern, options) {
- return orig.filter(pattern, ext(def, options))
- }
+ // treat the test path as a set of pathparts.
+ f = f.split(slashSplit)
+ this.debug(this.pattern, 'split', f)
- m.defaults = function defaults (options) {
- return orig.defaults(ext(def, options))
- }
+ // just ONE of the pattern sets in this.set needs to match
+ // in order for it to be valid. If negating, then just one
+ // match means that we have failed.
+ // Either way, return on the first hit.
- m.makeRe = function makeRe (pattern, options) {
- return orig.makeRe(pattern, ext(def, options))
- }
+ var set = this.set
+ this.debug(this.pattern, 'set', set)
- m.braceExpand = function braceExpand (pattern, options) {
- return orig.braceExpand(pattern, ext(def, options))
+ // Find the basename of the path by looking for the last non-empty segment
+ var filename
+ var i
+ for (i = f.length - 1; i >= 0; i--) {
+ filename = f[i]
+ if (filename) break
}
- m.match = function (list, pattern, options) {
- return orig.match(list, pattern, ext(def, options))
+ for (i = 0; i < set.length; i++) {
+ var pattern = set[i]
+ var file = f
+ if (options.matchBase && pattern.length === 1) {
+ file = [filename]
+ }
+ var hit = this.matchOne(file, pattern, partial)
+ if (hit) {
+ if (options.flipNegate) return true
+ return !this.negate
+ }
}
- return m
+ // didn't get any hits. this is success if it's a negative
+ // pattern, failure otherwise.
+ if (options.flipNegate) return false
+ return this.negate
}
-Minimatch.defaults = function (def) {
- return minimatch.defaults(def).Minimatch
-}
+// set partial to true to test if, for example,
+// "/a/b" matches the start of "/*/b/*/d"
+// Partial means, if you run out of file before you run
+// out of pattern, then that's fine, as long as all
+// the parts match.
+Minimatch.prototype.matchOne = function (file, pattern, partial) {
+ var options = this.options
-function minimatch (p, pattern, options) {
- assertValidPattern(pattern)
+ this.debug('matchOne',
+ { 'this': this, file: file, pattern: pattern })
- if (!options) options = {}
+ this.debug('matchOne', file.length, pattern.length)
- // shortcut: comments match nothing.
- if (!options.nocomment && pattern.charAt(0) === '#') {
- return false
- }
+ for (var fi = 0,
+ pi = 0,
+ fl = file.length,
+ pl = pattern.length
+ ; (fi < fl) && (pi < pl)
+ ; fi++, pi++) {
+ this.debug('matchOne loop')
+ var p = pattern[pi]
+ var f = file[fi]
- return new Minimatch(pattern, options).match(p)
-}
+ this.debug(pattern, p, f)
-function Minimatch (pattern, options) {
- if (!(this instanceof Minimatch)) {
- return new Minimatch(pattern, options)
- }
+ // should be impossible.
+ // some invalid regexp stuff in the set.
+ /* istanbul ignore if */
+ if (p === false) return false
- assertValidPattern(pattern)
+ if (p === GLOBSTAR) {
+ this.debug('GLOBSTAR', [pattern, p, f])
- if (!options) options = {}
+ // "**"
+ // a/**/b/**/c would match the following:
+ // a/b/x/y/z/c
+ // a/x/y/z/b/c
+ // a/b/x/b/x/c
+ // a/b/c
+ // To do this, take the rest of the pattern after
+ // the **, and see if it would match the file remainder.
+ // If so, return success.
+ // If not, the ** "swallows" a segment, and try again.
+ // This is recursively awful.
+ //
+ // a/**/b/**/c matching a/b/x/y/z/c
+ // - a matches a
+ // - doublestar
+ // - matchOne(b/x/y/z/c, b/**/c)
+ // - b matches b
+ // - doublestar
+ // - matchOne(x/y/z/c, c) -> no
+ // - matchOne(y/z/c, c) -> no
+ // - matchOne(z/c, c) -> no
+ // - matchOne(c, c) yes, hit
+ var fr = fi
+ var pr = pi + 1
+ if (pr === pl) {
+ this.debug('** at the end')
+ // a ** at the end will just swallow the rest.
+ // We have found a match.
+ // however, it will not swallow /.x, unless
+ // options.dot is set.
+ // . and .. are *never* matched by **, for explosively
+ // exponential reasons.
+ for (; fi < fl; fi++) {
+ if (file[fi] === '.' || file[fi] === '..' ||
+ (!options.dot && file[fi].charAt(0) === '.')) return false
+ }
+ return true
+ }
- pattern = pattern.trim()
+ // ok, let's see if we can swallow whatever we can.
+ while (fr < fl) {
+ var swallowee = file[fr]
- // windows support: need to use /, not \
- if (!options.allowWindowsEscape && path.sep !== '/') {
- pattern = pattern.split(path.sep).join('/')
- }
+ this.debug('\nglobstar while', file, fr, pattern, pr, swallowee)
- this.options = options
- this.set = []
- this.pattern = pattern
- this.regexp = null
- this.negate = false
- this.comment = false
- this.empty = false
- this.partial = !!options.partial
+ // XXX remove this slice. Just pass the start index.
+ if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {
+ this.debug('globstar found match!', fr, fl, swallowee)
+ // found a match.
+ return true
+ } else {
+ // can't swallow "." or ".." ever.
+ // can only swallow ".foo" when explicitly asked.
+ if (swallowee === '.' || swallowee === '..' ||
+ (!options.dot && swallowee.charAt(0) === '.')) {
+ this.debug('dot detected!', file, fr, pattern, pr)
+ break
+ }
- // make the set of regexps etc.
- this.make()
-}
+ // ** swallows a segment, and continue.
+ this.debug('globstar swallow a segment, and continue')
+ fr++
+ }
+ }
-Minimatch.prototype.debug = function () {}
+ // no match was found.
+ // However, in partial mode, we can't say this is necessarily over.
+ // If there's more *pattern* left, then
+ /* istanbul ignore if */
+ if (partial) {
+ // ran out of file
+ this.debug('\n>>> no match, partial?', file, fr, pattern, pr)
+ if (fr === fl) return true
+ }
+ return false
+ }
-Minimatch.prototype.make = make
-function make () {
- var pattern = this.pattern
- var options = this.options
+ // something other than **
+ // non-magic patterns just have to match exactly
+ // patterns with magic have been turned into regexps.
+ var hit
+ if (typeof p === 'string') {
+ hit = f === p
+ this.debug('string match', p, f, hit)
+ } else {
+ hit = f.match(p)
+ this.debug('pattern match', p, f, hit)
+ }
- // empty patterns and comments match nothing.
- if (!options.nocomment && pattern.charAt(0) === '#') {
- this.comment = true
- return
- }
- if (!pattern) {
- this.empty = true
- return
+ if (!hit) return false
}
- // step 1: figure out negation, etc.
- this.parseNegate()
+ // Note: ending in / means that we'll get a final ""
+ // at the end of the pattern. This can only match a
+ // corresponding "" at the end of the file.
+ // If the file ends in /, then it can only match a
+ // a pattern that ends in /, unless the pattern just
+ // doesn't have any more for it. But, a/b/ should *not*
+ // match "a/b/*", even though "" matches against the
+ // [^/]*? pattern, except in partial mode, where it might
+ // simply not be reached yet.
+ // However, a/b/ should still satisfy a/*
- // step 2: expand braces
- var set = this.globSet = this.braceExpand()
+ // now either we fell off the end of the pattern, or we're done.
+ if (fi === fl && pi === pl) {
+ // ran out of pattern and filename at the same time.
+ // an exact hit!
+ return true
+ } else if (fi === fl) {
+ // ran out of file, but still had pattern left.
+ // this is ok if we're doing the match as part of
+ // a glob fs traversal.
+ return partial
+ } else /* istanbul ignore else */ if (pi === pl) {
+ // ran out of pattern, still have file left.
+ // this is only acceptable if we're on the very last
+ // empty segment of a file with a trailing slash.
+ // a/* should match a/b/
+ return (fi === fl - 1) && (file[fi] === '')
+ }
- if (options.debug) this.debug = function debug() { console.error.apply(console, arguments) }
+ // should be unreachable.
+ /* istanbul ignore next */
+ throw new Error('wtf?')
+}
- this.debug(this.pattern, set)
+// replace stuff like \* with *
+function globUnescape (s) {
+ return s.replace(/\\(.)/g, '$1')
+}
- // step 3: now we have a set, so turn each one into a series of path-portion
- // matching patterns.
- // These will be regexps, except in the case of "**", which is
- // set to the GLOBSTAR object for globstar behavior,
- // and will not contain any / characters
- set = this.globParts = set.map(function (s) {
- return s.split(slashSplit)
- })
+function regExpEscape (s) {
+ return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&')
+}
- this.debug(this.pattern, set)
- // glob --> regexps
- set = set.map(function (s, si, set) {
- return s.map(this.parse, this)
- }, this)
+/***/ }),
- this.debug(this.pattern, set)
+/***/ 467:
+/***/ ((module, exports, __nccwpck_require__) => {
- // filter out everything that didn't compile properly.
- set = set.filter(function (s) {
- return s.indexOf(false) === -1
- })
+"use strict";
- this.debug(this.pattern, set)
- this.set = set
-}
+Object.defineProperty(exports, "__esModule", ({ value: true }));
-Minimatch.prototype.parseNegate = parseNegate
-function parseNegate () {
- var pattern = this.pattern
- var negate = false
- var options = this.options
- var negateOffset = 0
+function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
- if (options.nonegate) return
+var Stream = _interopDefault(__nccwpck_require__(2781));
+var http = _interopDefault(__nccwpck_require__(3685));
+var Url = _interopDefault(__nccwpck_require__(7310));
+var whatwgUrl = _interopDefault(__nccwpck_require__(8665));
+var https = _interopDefault(__nccwpck_require__(5687));
+var zlib = _interopDefault(__nccwpck_require__(9796));
- for (var i = 0, l = pattern.length
- ; i < l && pattern.charAt(i) === '!'
- ; i++) {
- negate = !negate
- negateOffset++
- }
+// Based on https://github.com/tmpvar/jsdom/blob/aa85b2abf07766ff7bf5c1f6daafb3726f2f2db5/lib/jsdom/living/blob.js
- if (negateOffset) this.pattern = pattern.substr(negateOffset)
- this.negate = negate
-}
+// fix for "Readable" isn't a named export issue
+const Readable = Stream.Readable;
-// Brace expansion:
-// a{b,c}d -> abd acd
-// a{b,}c -> abc ac
-// a{0..3}d -> a0d a1d a2d a3d
-// a{b,c{d,e}f}g -> abg acdfg acefg
-// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg
-//
-// Invalid sets are not expanded.
-// a{2..}b -> a{2..}b
-// a{b}c -> a{b}c
-minimatch.braceExpand = function (pattern, options) {
- return braceExpand(pattern, options)
-}
+const BUFFER = Symbol('buffer');
+const TYPE = Symbol('type');
-Minimatch.prototype.braceExpand = braceExpand
+class Blob {
+ constructor() {
+ this[TYPE] = '';
-function braceExpand (pattern, options) {
- if (!options) {
- if (this instanceof Minimatch) {
- options = this.options
- } else {
- options = {}
- }
- }
+ const blobParts = arguments[0];
+ const options = arguments[1];
- pattern = typeof pattern === 'undefined'
- ? this.pattern : pattern
+ const buffers = [];
+ let size = 0;
- assertValidPattern(pattern)
+ if (blobParts) {
+ const a = blobParts;
+ const length = Number(a.length);
+ for (let i = 0; i < length; i++) {
+ const element = a[i];
+ let buffer;
+ if (element instanceof Buffer) {
+ buffer = element;
+ } else if (ArrayBuffer.isView(element)) {
+ buffer = Buffer.from(element.buffer, element.byteOffset, element.byteLength);
+ } else if (element instanceof ArrayBuffer) {
+ buffer = Buffer.from(element);
+ } else if (element instanceof Blob) {
+ buffer = element[BUFFER];
+ } else {
+ buffer = Buffer.from(typeof element === 'string' ? element : String(element));
+ }
+ size += buffer.length;
+ buffers.push(buffer);
+ }
+ }
- // Thanks to Yeting Li for
- // improving this regexp to avoid a ReDOS vulnerability.
- if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) {
- // shortcut. no need to expand.
- return [pattern]
- }
+ this[BUFFER] = Buffer.concat(buffers);
- return expand(pattern)
-}
+ let type = options && options.type !== undefined && String(options.type).toLowerCase();
+ if (type && !/[^\u0020-\u007E]/.test(type)) {
+ this[TYPE] = type;
+ }
+ }
+ get size() {
+ return this[BUFFER].length;
+ }
+ get type() {
+ return this[TYPE];
+ }
+ text() {
+ return Promise.resolve(this[BUFFER].toString());
+ }
+ arrayBuffer() {
+ const buf = this[BUFFER];
+ const ab = buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength);
+ return Promise.resolve(ab);
+ }
+ stream() {
+ const readable = new Readable();
+ readable._read = function () {};
+ readable.push(this[BUFFER]);
+ readable.push(null);
+ return readable;
+ }
+ toString() {
+ return '[object Blob]';
+ }
+ slice() {
+ const size = this.size;
-var MAX_PATTERN_LENGTH = 1024 * 64
-var assertValidPattern = function (pattern) {
- if (typeof pattern !== 'string') {
- throw new TypeError('invalid pattern')
- }
+ const start = arguments[0];
+ const end = arguments[1];
+ let relativeStart, relativeEnd;
+ if (start === undefined) {
+ relativeStart = 0;
+ } else if (start < 0) {
+ relativeStart = Math.max(size + start, 0);
+ } else {
+ relativeStart = Math.min(start, size);
+ }
+ if (end === undefined) {
+ relativeEnd = size;
+ } else if (end < 0) {
+ relativeEnd = Math.max(size + end, 0);
+ } else {
+ relativeEnd = Math.min(end, size);
+ }
+ const span = Math.max(relativeEnd - relativeStart, 0);
- if (pattern.length > MAX_PATTERN_LENGTH) {
- throw new TypeError('pattern is too long')
- }
+ const buffer = this[BUFFER];
+ const slicedBuffer = buffer.slice(relativeStart, relativeStart + span);
+ const blob = new Blob([], { type: arguments[2] });
+ blob[BUFFER] = slicedBuffer;
+ return blob;
+ }
}
-// parse a component of the expanded set.
-// At this point, no pattern may contain "/" in it
-// so we're going to return a 2d array, where each entry is the full
-// pattern, split on '/', and then turned into a regular expression.
-// A regexp is made at the end which joins each array with an
-// escaped /, and another full one which joins each regexp with |.
-//
-// Following the lead of Bash 4.1, note that "**" only has special meaning
-// when it is the *only* thing in a path portion. Otherwise, any series
-// of * is equivalent to a single *. Globstar behavior is enabled by
-// default, and can be disabled by setting options.noglobstar.
-Minimatch.prototype.parse = parse
-var SUBPARSE = {}
-function parse (pattern, isSub) {
- assertValidPattern(pattern)
+Object.defineProperties(Blob.prototype, {
+ size: { enumerable: true },
+ type: { enumerable: true },
+ slice: { enumerable: true }
+});
- var options = this.options
+Object.defineProperty(Blob.prototype, Symbol.toStringTag, {
+ value: 'Blob',
+ writable: false,
+ enumerable: false,
+ configurable: true
+});
- // shortcuts
- if (pattern === '**') {
- if (!options.noglobstar)
- return GLOBSTAR
- else
- pattern = '*'
- }
- if (pattern === '') return ''
+/**
+ * fetch-error.js
+ *
+ * FetchError interface for operational errors
+ */
- var re = ''
- var hasMagic = !!options.nocase
- var escaping = false
- // ? => one single character
- var patternListStack = []
- var negativeLists = []
- var stateChar
- var inClass = false
- var reClassStart = -1
- var classStart = -1
- // . and .. never match anything that doesn't start with .,
- // even when options.dot is set.
- var patternStart = pattern.charAt(0) === '.' ? '' // anything
- // not (start or / followed by . or .. followed by / or end)
- : options.dot ? '(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))'
- : '(?!\\.)'
- var self = this
+/**
+ * Create FetchError instance
+ *
+ * @param String message Error message for human
+ * @param String type Error type for machine
+ * @param String systemError For Node.js system error
+ * @return FetchError
+ */
+function FetchError(message, type, systemError) {
+ Error.call(this, message);
- function clearStateChar () {
- if (stateChar) {
- // we had some state-tracking character
- // that wasn't consumed by this pass.
- switch (stateChar) {
- case '*':
- re += star
- hasMagic = true
- break
- case '?':
- re += qmark
- hasMagic = true
- break
- default:
- re += '\\' + stateChar
- break
- }
- self.debug('clearStateChar %j %j', stateChar, re)
- stateChar = false
- }
+ this.message = message;
+ this.type = type;
+
+ // when err.type is `system`, err.code contains system error code
+ if (systemError) {
+ this.code = this.errno = systemError.code;
}
- for (var i = 0, len = pattern.length, c
- ; (i < len) && (c = pattern.charAt(i))
- ; i++) {
- this.debug('%s\t%s %s %j', pattern, i, re, c)
+ // hide custom error implementation details from end-users
+ Error.captureStackTrace(this, this.constructor);
+}
- // skip over any that are escaped.
- if (escaping && reSpecials[c]) {
- re += '\\' + c
- escaping = false
- continue
- }
+FetchError.prototype = Object.create(Error.prototype);
+FetchError.prototype.constructor = FetchError;
+FetchError.prototype.name = 'FetchError';
- switch (c) {
- /* istanbul ignore next */
- case '/': {
- // completely not allowed, even escaped.
- // Should already be path-split by now.
- return false
- }
+let convert;
+try {
+ convert = (__nccwpck_require__(2877).convert);
+} catch (e) {}
- case '\\':
- clearStateChar()
- escaping = true
- continue
+const INTERNALS = Symbol('Body internals');
- // the various stateChar values
- // for the "extglob" stuff.
- case '?':
- case '*':
- case '+':
- case '@':
- case '!':
- this.debug('%s\t%s %s %j <-- stateChar', pattern, i, re, c)
+// fix an issue where "PassThrough" isn't a named export for node <10
+const PassThrough = Stream.PassThrough;
- // all of those are literals inside a class, except that
- // the glob [!a] means [^a] in regexp
- if (inClass) {
- this.debug(' in class')
- if (c === '!' && i === classStart + 1) c = '^'
- re += c
- continue
- }
+/**
+ * Body mixin
+ *
+ * Ref: https://fetch.spec.whatwg.org/#body
+ *
+ * @param Stream body Readable stream
+ * @param Object opts Response options
+ * @return Void
+ */
+function Body(body) {
+ var _this = this;
- // if we already have a stateChar, then it means
- // that there was something like ** or +? in there.
- // Handle the stateChar, then proceed with this one.
- self.debug('call clearStateChar %j', stateChar)
- clearStateChar()
- stateChar = c
- // if extglob is disabled, then +(asdf|foo) isn't a thing.
- // just clear the statechar *now*, rather than even diving into
- // the patternList stuff.
- if (options.noext) clearStateChar()
- continue
+ var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
+ _ref$size = _ref.size;
- case '(':
- if (inClass) {
- re += '('
- continue
- }
+ let size = _ref$size === undefined ? 0 : _ref$size;
+ var _ref$timeout = _ref.timeout;
+ let timeout = _ref$timeout === undefined ? 0 : _ref$timeout;
- if (!stateChar) {
- re += '\\('
- continue
- }
+ if (body == null) {
+ // body is undefined or null
+ body = null;
+ } else if (isURLSearchParams(body)) {
+ // body is a URLSearchParams
+ body = Buffer.from(body.toString());
+ } else if (isBlob(body)) ; else if (Buffer.isBuffer(body)) ; else if (Object.prototype.toString.call(body) === '[object ArrayBuffer]') {
+ // body is ArrayBuffer
+ body = Buffer.from(body);
+ } else if (ArrayBuffer.isView(body)) {
+ // body is ArrayBufferView
+ body = Buffer.from(body.buffer, body.byteOffset, body.byteLength);
+ } else if (body instanceof Stream) ; else {
+ // none of the above
+ // coerce to string then buffer
+ body = Buffer.from(String(body));
+ }
+ this[INTERNALS] = {
+ body,
+ disturbed: false,
+ error: null
+ };
+ this.size = size;
+ this.timeout = timeout;
- patternListStack.push({
- type: stateChar,
- start: i - 1,
- reStart: re.length,
- open: plTypes[stateChar].open,
- close: plTypes[stateChar].close
- })
- // negation is (?:(?!js)[^/]*)
- re += stateChar === '!' ? '(?:(?!(?:' : '(?:'
- this.debug('plType %j %j', stateChar, re)
- stateChar = false
- continue
+ if (body instanceof Stream) {
+ body.on('error', function (err) {
+ const error = err.name === 'AbortError' ? err : new FetchError(`Invalid response body while trying to fetch ${_this.url}: ${err.message}`, 'system', err);
+ _this[INTERNALS].error = error;
+ });
+ }
+}
- case ')':
- if (inClass || !patternListStack.length) {
- re += '\\)'
- continue
- }
+Body.prototype = {
+ get body() {
+ return this[INTERNALS].body;
+ },
- clearStateChar()
- hasMagic = true
- var pl = patternListStack.pop()
- // negation is (?:(?!js)[^/]*)
- // The others are (?:)
- re += pl.close
- if (pl.type === '!') {
- negativeLists.push(pl)
- }
- pl.reEnd = re.length
- continue
+ get bodyUsed() {
+ return this[INTERNALS].disturbed;
+ },
- case '|':
- if (inClass || !patternListStack.length || escaping) {
- re += '\\|'
- escaping = false
- continue
- }
+ /**
+ * Decode response as ArrayBuffer
+ *
+ * @return Promise
+ */
+ arrayBuffer() {
+ return consumeBody.call(this).then(function (buf) {
+ return buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength);
+ });
+ },
- clearStateChar()
- re += '|'
- continue
+ /**
+ * Return raw response as Blob
+ *
+ * @return Promise
+ */
+ blob() {
+ let ct = this.headers && this.headers.get('content-type') || '';
+ return consumeBody.call(this).then(function (buf) {
+ return Object.assign(
+ // Prevent copying
+ new Blob([], {
+ type: ct.toLowerCase()
+ }), {
+ [BUFFER]: buf
+ });
+ });
+ },
- // these are mostly the same in regexp and glob
- case '[':
- // swallow any state-tracking char before the [
- clearStateChar()
+ /**
+ * Decode response as json
+ *
+ * @return Promise
+ */
+ json() {
+ var _this2 = this;
- if (inClass) {
- re += '\\' + c
- continue
- }
+ return consumeBody.call(this).then(function (buffer) {
+ try {
+ return JSON.parse(buffer.toString());
+ } catch (err) {
+ return Body.Promise.reject(new FetchError(`invalid json response body at ${_this2.url} reason: ${err.message}`, 'invalid-json'));
+ }
+ });
+ },
- inClass = true
- classStart = i
- reClassStart = re.length
- re += c
- continue
+ /**
+ * Decode response as text
+ *
+ * @return Promise
+ */
+ text() {
+ return consumeBody.call(this).then(function (buffer) {
+ return buffer.toString();
+ });
+ },
- case ']':
- // a right bracket shall lose its special
- // meaning and represent itself in
- // a bracket expression if it occurs
- // first in the list. -- POSIX.2 2.8.3.2
- if (i === classStart + 1 || !inClass) {
- re += '\\' + c
- escaping = false
- continue
- }
+ /**
+ * Decode response as buffer (non-spec api)
+ *
+ * @return Promise
+ */
+ buffer() {
+ return consumeBody.call(this);
+ },
- // handle the case where we left a class open.
- // "[z-a]" is valid, equivalent to "\[z-a\]"
- // split where the last [ was, make sure we don't have
- // an invalid re. if so, re-walk the contents of the
- // would-be class to re-translate any characters that
- // were passed through as-is
- // TODO: It would probably be faster to determine this
- // without a try/catch and a new RegExp, but it's tricky
- // to do safely. For now, this is safe and works.
- var cs = pattern.substring(classStart + 1, i)
- try {
- RegExp('[' + cs + ']')
- } catch (er) {
- // not a valid class!
- var sp = this.parse(cs, SUBPARSE)
- re = re.substr(0, reClassStart) + '\\[' + sp[0] + '\\]'
- hasMagic = hasMagic || sp[1]
- inClass = false
- continue
- }
-
- // finish up the class.
- hasMagic = true
- inClass = false
- re += c
- continue
-
- default:
- // swallow any state char that wasn't consumed
- clearStateChar()
+ /**
+ * Decode response as text, while automatically detecting the encoding and
+ * trying to decode to UTF-8 (non-spec api)
+ *
+ * @return Promise
+ */
+ textConverted() {
+ var _this3 = this;
- if (escaping) {
- // no need
- escaping = false
- } else if (reSpecials[c]
- && !(c === '^' && inClass)) {
- re += '\\'
- }
+ return consumeBody.call(this).then(function (buffer) {
+ return convertBody(buffer, _this3.headers);
+ });
+ }
+};
- re += c
+// In browsers, all properties are enumerable.
+Object.defineProperties(Body.prototype, {
+ body: { enumerable: true },
+ bodyUsed: { enumerable: true },
+ arrayBuffer: { enumerable: true },
+ blob: { enumerable: true },
+ json: { enumerable: true },
+ text: { enumerable: true }
+});
- } // switch
- } // for
+Body.mixIn = function (proto) {
+ for (const name of Object.getOwnPropertyNames(Body.prototype)) {
+ // istanbul ignore else: future proof
+ if (!(name in proto)) {
+ const desc = Object.getOwnPropertyDescriptor(Body.prototype, name);
+ Object.defineProperty(proto, name, desc);
+ }
+ }
+};
- // handle the case where we left a class open.
- // "[abc" is valid, equivalent to "\[abc"
- if (inClass) {
- // split where the last [ was, and escape it
- // this is a huge pita. We now have to re-walk
- // the contents of the would-be class to re-translate
- // any characters that were passed through as-is
- cs = pattern.substr(classStart + 1)
- sp = this.parse(cs, SUBPARSE)
- re = re.substr(0, reClassStart) + '\\[' + sp[0]
- hasMagic = hasMagic || sp[1]
- }
+/**
+ * Consume and convert an entire Body to a Buffer.
+ *
+ * Ref: https://fetch.spec.whatwg.org/#concept-body-consume-body
+ *
+ * @return Promise
+ */
+function consumeBody() {
+ var _this4 = this;
- // handle the case where we had a +( thing at the *end*
- // of the pattern.
- // each pattern list stack adds 3 chars, and we need to go through
- // and escape any | chars that were passed through as-is for the regexp.
- // Go through and escape them, taking care not to double-escape any
- // | chars that were already escaped.
- for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) {
- var tail = re.slice(pl.reStart + pl.open.length)
- this.debug('setting tail', re, pl)
- // maybe some even number of \, then maybe 1 \, followed by a |
- tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function (_, $1, $2) {
- if (!$2) {
- // the | isn't already escaped, so escape it.
- $2 = '\\'
- }
+ if (this[INTERNALS].disturbed) {
+ return Body.Promise.reject(new TypeError(`body used already for: ${this.url}`));
+ }
- // need to escape all those slashes *again*, without escaping the
- // one that we need for escaping the | character. As it works out,
- // escaping an even number of slashes can be done by simply repeating
- // it exactly after itself. That's why this trick works.
- //
- // I am sorry that you have to see this.
- return $1 + $1 + $2 + '|'
- })
+ this[INTERNALS].disturbed = true;
- this.debug('tail=%j\n %s', tail, tail, pl, re)
- var t = pl.type === '*' ? star
- : pl.type === '?' ? qmark
- : '\\' + pl.type
+ if (this[INTERNALS].error) {
+ return Body.Promise.reject(this[INTERNALS].error);
+ }
- hasMagic = true
- re = re.slice(0, pl.reStart) + t + '\\(' + tail
- }
+ let body = this.body;
- // handle trailing things that only matter at the very end.
- clearStateChar()
- if (escaping) {
- // trailing \\
- re += '\\\\'
- }
+ // body is null
+ if (body === null) {
+ return Body.Promise.resolve(Buffer.alloc(0));
+ }
- // only need to apply the nodot start if the re starts with
- // something that could conceivably capture a dot
- var addPatternStart = false
- switch (re.charAt(0)) {
- case '[': case '.': case '(': addPatternStart = true
- }
+ // body is blob
+ if (isBlob(body)) {
+ body = body.stream();
+ }
- // Hack to work around lack of negative lookbehind in JS
- // A pattern like: *.!(x).!(y|z) needs to ensure that a name
- // like 'a.xyz.yz' doesn't match. So, the first negative
- // lookahead, has to look ALL the way ahead, to the end of
- // the pattern.
- for (var n = negativeLists.length - 1; n > -1; n--) {
- var nl = negativeLists[n]
+ // body is buffer
+ if (Buffer.isBuffer(body)) {
+ return Body.Promise.resolve(body);
+ }
- var nlBefore = re.slice(0, nl.reStart)
- var nlFirst = re.slice(nl.reStart, nl.reEnd - 8)
- var nlLast = re.slice(nl.reEnd - 8, nl.reEnd)
- var nlAfter = re.slice(nl.reEnd)
+ // istanbul ignore if: should never happen
+ if (!(body instanceof Stream)) {
+ return Body.Promise.resolve(Buffer.alloc(0));
+ }
- nlLast += nlAfter
+ // body is stream
+ // get ready to actually consume the body
+ let accum = [];
+ let accumBytes = 0;
+ let abort = false;
- // Handle nested stuff like *(*.js|!(*.json)), where open parens
- // mean that we should *not* include the ) in the bit that is considered
- // "after" the negated section.
- var openParensBefore = nlBefore.split('(').length - 1
- var cleanAfter = nlAfter
- for (i = 0; i < openParensBefore; i++) {
- cleanAfter = cleanAfter.replace(/\)[+*?]?/, '')
- }
- nlAfter = cleanAfter
+ return new Body.Promise(function (resolve, reject) {
+ let resTimeout;
- var dollar = ''
- if (nlAfter === '' && isSub !== SUBPARSE) {
- dollar = '$'
- }
- var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast
- re = newRe
- }
+ // allow timeout on slow response body
+ if (_this4.timeout) {
+ resTimeout = setTimeout(function () {
+ abort = true;
+ reject(new FetchError(`Response timeout while trying to fetch ${_this4.url} (over ${_this4.timeout}ms)`, 'body-timeout'));
+ }, _this4.timeout);
+ }
- // if the re is not "" at this point, then we need to make sure
- // it doesn't match against an empty path part.
- // Otherwise a/* will match a/, which it should not.
- if (re !== '' && hasMagic) {
- re = '(?=.)' + re
- }
+ // handle stream errors
+ body.on('error', function (err) {
+ if (err.name === 'AbortError') {
+ // if the request was aborted, reject with this Error
+ abort = true;
+ reject(err);
+ } else {
+ // other errors, such as incorrect content-encoding
+ reject(new FetchError(`Invalid response body while trying to fetch ${_this4.url}: ${err.message}`, 'system', err));
+ }
+ });
- if (addPatternStart) {
- re = patternStart + re
- }
+ body.on('data', function (chunk) {
+ if (abort || chunk === null) {
+ return;
+ }
- // parsing just a piece of a larger pattern.
- if (isSub === SUBPARSE) {
- return [re, hasMagic]
- }
+ if (_this4.size && accumBytes + chunk.length > _this4.size) {
+ abort = true;
+ reject(new FetchError(`content size at ${_this4.url} over limit: ${_this4.size}`, 'max-size'));
+ return;
+ }
- // skip the regexp for non-magical patterns
- // unescape anything in it, though, so that it'll be
- // an exact match against a file etc.
- if (!hasMagic) {
- return globUnescape(pattern)
- }
+ accumBytes += chunk.length;
+ accum.push(chunk);
+ });
- var flags = options.nocase ? 'i' : ''
- try {
- var regExp = new RegExp('^' + re + '$', flags)
- } catch (er) /* istanbul ignore next - should be impossible */ {
- // If it was an invalid regular expression, then it can't match
- // anything. This trick looks for a character after the end of
- // the string, which is of course impossible, except in multi-line
- // mode, but it's not a /m regex.
- return new RegExp('$.')
- }
+ body.on('end', function () {
+ if (abort) {
+ return;
+ }
- regExp._glob = pattern
- regExp._src = re
+ clearTimeout(resTimeout);
- return regExp
+ try {
+ resolve(Buffer.concat(accum, accumBytes));
+ } catch (err) {
+ // handle streams that have accumulated too much data (issue #414)
+ reject(new FetchError(`Could not create Buffer from response body for ${_this4.url}: ${err.message}`, 'system', err));
+ }
+ });
+ });
}
-minimatch.makeRe = function (pattern, options) {
- return new Minimatch(pattern, options || {}).makeRe()
-}
+/**
+ * Detect buffer encoding and convert to target encoding
+ * ref: http://www.w3.org/TR/2011/WD-html5-20110113/parsing.html#determining-the-character-encoding
+ *
+ * @param Buffer buffer Incoming buffer
+ * @param String encoding Target encoding
+ * @return String
+ */
+function convertBody(buffer, headers) {
+ if (typeof convert !== 'function') {
+ throw new Error('The package `encoding` must be installed to use the textConverted() function');
+ }
-Minimatch.prototype.makeRe = makeRe
-function makeRe () {
- if (this.regexp || this.regexp === false) return this.regexp
+ const ct = headers.get('content-type');
+ let charset = 'utf-8';
+ let res, str;
- // at this point, this.set is a 2d array of partial
- // pattern strings, or "**".
- //
- // It's better to use .match(). This function shouldn't
- // be used, really, but it's pretty convenient sometimes,
- // when you just want to work with a regex.
- var set = this.set
+ // header
+ if (ct) {
+ res = /charset=([^;]*)/i.exec(ct);
+ }
- if (!set.length) {
- this.regexp = false
- return this.regexp
- }
- var options = this.options
+ // no charset in content type, peek at response body for at most 1024 bytes
+ str = buffer.slice(0, 1024).toString();
- var twoStar = options.noglobstar ? star
- : options.dot ? twoStarDot
- : twoStarNoDot
- var flags = options.nocase ? 'i' : ''
+ // html5
+ if (!res && str) {
+ res = /= 0; i--) {
- filename = f[i]
- if (filename) break
- }
+/**
+ * Performs the operation "extract a `Content-Type` value from |object|" as
+ * specified in the specification:
+ * https://fetch.spec.whatwg.org/#concept-bodyinit-extract
+ *
+ * This function assumes that instance.body is present.
+ *
+ * @param Mixed instance Any options.body input
+ */
+function extractContentType(body) {
+ if (body === null) {
+ // body is null
+ return null;
+ } else if (typeof body === 'string') {
+ // body is string
+ return 'text/plain;charset=UTF-8';
+ } else if (isURLSearchParams(body)) {
+ // body is a URLSearchParams
+ return 'application/x-www-form-urlencoded;charset=UTF-8';
+ } else if (isBlob(body)) {
+ // body is blob
+ return body.type || null;
+ } else if (Buffer.isBuffer(body)) {
+ // body is buffer
+ return null;
+ } else if (Object.prototype.toString.call(body) === '[object ArrayBuffer]') {
+ // body is ArrayBuffer
+ return null;
+ } else if (ArrayBuffer.isView(body)) {
+ // body is ArrayBufferView
+ return null;
+ } else if (typeof body.getBoundary === 'function') {
+ // detect form data input from form-data module
+ return `multipart/form-data;boundary=${body.getBoundary()}`;
+ } else if (body instanceof Stream) {
+ // body is stream
+ // can't really do much about this
+ return null;
+ } else {
+ // Body constructor defaults other things to string
+ return 'text/plain;charset=UTF-8';
+ }
+}
- for (i = 0; i < set.length; i++) {
- var pattern = set[i]
- var file = f
- if (options.matchBase && pattern.length === 1) {
- file = [filename]
- }
- var hit = this.matchOne(file, pattern, partial)
- if (hit) {
- if (options.flipNegate) return true
- return !this.negate
- }
- }
+/**
+ * The Fetch Standard treats this as if "total bytes" is a property on the body.
+ * For us, we have to explicitly get it with a function.
+ *
+ * ref: https://fetch.spec.whatwg.org/#concept-body-total-bytes
+ *
+ * @param Body instance Instance of Body
+ * @return Number? Number of bytes, or null if not possible
+ */
+function getTotalBytes(instance) {
+ const body = instance.body;
- // didn't get any hits. this is success if it's a negative
- // pattern, failure otherwise.
- if (options.flipNegate) return false
- return this.negate
-}
-// set partial to true to test if, for example,
-// "/a/b" matches the start of "/*/b/*/d"
-// Partial means, if you run out of file before you run
-// out of pattern, then that's fine, as long as all
-// the parts match.
-Minimatch.prototype.matchOne = function (file, pattern, partial) {
- var options = this.options
-
- this.debug('matchOne',
- { 'this': this, file: file, pattern: pattern })
-
- this.debug('matchOne', file.length, pattern.length)
-
- for (var fi = 0,
- pi = 0,
- fl = file.length,
- pl = pattern.length
- ; (fi < fl) && (pi < pl)
- ; fi++, pi++) {
- this.debug('matchOne loop')
- var p = pattern[pi]
- var f = file[fi]
-
- this.debug(pattern, p, f)
-
- // should be impossible.
- // some invalid regexp stuff in the set.
- /* istanbul ignore if */
- if (p === false) return false
-
- if (p === GLOBSTAR) {
- this.debug('GLOBSTAR', [pattern, p, f])
-
- // "**"
- // a/**/b/**/c would match the following:
- // a/b/x/y/z/c
- // a/x/y/z/b/c
- // a/b/x/b/x/c
- // a/b/c
- // To do this, take the rest of the pattern after
- // the **, and see if it would match the file remainder.
- // If so, return success.
- // If not, the ** "swallows" a segment, and try again.
- // This is recursively awful.
- //
- // a/**/b/**/c matching a/b/x/y/z/c
- // - a matches a
- // - doublestar
- // - matchOne(b/x/y/z/c, b/**/c)
- // - b matches b
- // - doublestar
- // - matchOne(x/y/z/c, c) -> no
- // - matchOne(y/z/c, c) -> no
- // - matchOne(z/c, c) -> no
- // - matchOne(c, c) yes, hit
- var fr = fi
- var pr = pi + 1
- if (pr === pl) {
- this.debug('** at the end')
- // a ** at the end will just swallow the rest.
- // We have found a match.
- // however, it will not swallow /.x, unless
- // options.dot is set.
- // . and .. are *never* matched by **, for explosively
- // exponential reasons.
- for (; fi < fl; fi++) {
- if (file[fi] === '.' || file[fi] === '..' ||
- (!options.dot && file[fi].charAt(0) === '.')) return false
- }
- return true
- }
-
- // ok, let's see if we can swallow whatever we can.
- while (fr < fl) {
- var swallowee = file[fr]
-
- this.debug('\nglobstar while', file, fr, pattern, pr, swallowee)
-
- // XXX remove this slice. Just pass the start index.
- if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {
- this.debug('globstar found match!', fr, fl, swallowee)
- // found a match.
- return true
- } else {
- // can't swallow "." or ".." ever.
- // can only swallow ".foo" when explicitly asked.
- if (swallowee === '.' || swallowee === '..' ||
- (!options.dot && swallowee.charAt(0) === '.')) {
- this.debug('dot detected!', file, fr, pattern, pr)
- break
- }
+ if (body === null) {
+ // body is null
+ return 0;
+ } else if (isBlob(body)) {
+ return body.size;
+ } else if (Buffer.isBuffer(body)) {
+ // body is buffer
+ return body.length;
+ } else if (body && typeof body.getLengthSync === 'function') {
+ // detect form data input from form-data module
+ if (body._lengthRetrievers && body._lengthRetrievers.length == 0 || // 1.x
+ body.hasKnownLength && body.hasKnownLength()) {
+ // 2.x
+ return body.getLengthSync();
+ }
+ return null;
+ } else {
+ // body is stream
+ return null;
+ }
+}
- // ** swallows a segment, and continue.
- this.debug('globstar swallow a segment, and continue')
- fr++
- }
- }
+/**
+ * Write a Body to a Node.js WritableStream (e.g. http.Request) object.
+ *
+ * @param Body instance Instance of Body
+ * @return Void
+ */
+function writeToStream(dest, instance) {
+ const body = instance.body;
- // no match was found.
- // However, in partial mode, we can't say this is necessarily over.
- // If there's more *pattern* left, then
- /* istanbul ignore if */
- if (partial) {
- // ran out of file
- this.debug('\n>>> no match, partial?', file, fr, pattern, pr)
- if (fr === fl) return true
- }
- return false
- }
- // something other than **
- // non-magic patterns just have to match exactly
- // patterns with magic have been turned into regexps.
- var hit
- if (typeof p === 'string') {
- hit = f === p
- this.debug('string match', p, f, hit)
- } else {
- hit = f.match(p)
- this.debug('pattern match', p, f, hit)
- }
+ if (body === null) {
+ // body is null
+ dest.end();
+ } else if (isBlob(body)) {
+ body.stream().pipe(dest);
+ } else if (Buffer.isBuffer(body)) {
+ // body is buffer
+ dest.write(body);
+ dest.end();
+ } else {
+ // body is stream
+ body.pipe(dest);
+ }
+}
- if (!hit) return false
- }
+// expose Promise
+Body.Promise = global.Promise;
- // Note: ending in / means that we'll get a final ""
- // at the end of the pattern. This can only match a
- // corresponding "" at the end of the file.
- // If the file ends in /, then it can only match a
- // a pattern that ends in /, unless the pattern just
- // doesn't have any more for it. But, a/b/ should *not*
- // match "a/b/*", even though "" matches against the
- // [^/]*? pattern, except in partial mode, where it might
- // simply not be reached yet.
- // However, a/b/ should still satisfy a/*
+/**
+ * headers.js
+ *
+ * Headers class offers convenient helpers
+ */
- // now either we fell off the end of the pattern, or we're done.
- if (fi === fl && pi === pl) {
- // ran out of pattern and filename at the same time.
- // an exact hit!
- return true
- } else if (fi === fl) {
- // ran out of file, but still had pattern left.
- // this is ok if we're doing the match as part of
- // a glob fs traversal.
- return partial
- } else /* istanbul ignore else */ if (pi === pl) {
- // ran out of pattern, still have file left.
- // this is only acceptable if we're on the very last
- // empty segment of a file with a trailing slash.
- // a/* should match a/b/
- return (fi === fl - 1) && (file[fi] === '')
- }
+const invalidTokenRegex = /[^\^_`a-zA-Z\-0-9!#$%&'*+.|~]/;
+const invalidHeaderCharRegex = /[^\t\x20-\x7e\x80-\xff]/;
- // should be unreachable.
- /* istanbul ignore next */
- throw new Error('wtf?')
+function validateName(name) {
+ name = `${name}`;
+ if (invalidTokenRegex.test(name) || name === '') {
+ throw new TypeError(`${name} is not a legal HTTP header name`);
+ }
}
-// replace stuff like \* with *
-function globUnescape (s) {
- return s.replace(/\\(.)/g, '$1')
+function validateValue(value) {
+ value = `${value}`;
+ if (invalidHeaderCharRegex.test(value)) {
+ throw new TypeError(`${value} is not a legal HTTP header value`);
+ }
}
-function regExpEscape (s) {
- return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&')
+/**
+ * Find the key in the map object given a header name.
+ *
+ * Returns undefined if not found.
+ *
+ * @param String name Header name
+ * @return String|Undefined
+ */
+function find(map, name) {
+ name = name.toLowerCase();
+ for (const key in map) {
+ if (key.toLowerCase() === name) {
+ return key;
+ }
+ }
+ return undefined;
}
+const MAP = Symbol('map');
+class Headers {
+ /**
+ * Headers class
+ *
+ * @param Object headers Response headers
+ * @return Void
+ */
+ constructor() {
+ let init = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined;
-/***/ }),
-
-/***/ 467:
-/***/ ((module, exports, __nccwpck_require__) => {
-
-"use strict";
+ this[MAP] = Object.create(null);
+ if (init instanceof Headers) {
+ const rawHeaders = init.raw();
+ const headerNames = Object.keys(rawHeaders);
-Object.defineProperty(exports, "__esModule", ({ value: true }));
+ for (const headerName of headerNames) {
+ for (const value of rawHeaders[headerName]) {
+ this.append(headerName, value);
+ }
+ }
-function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
+ return;
+ }
-var Stream = _interopDefault(__nccwpck_require__(2781));
-var http = _interopDefault(__nccwpck_require__(3685));
-var Url = _interopDefault(__nccwpck_require__(7310));
-var whatwgUrl = _interopDefault(__nccwpck_require__(8665));
-var https = _interopDefault(__nccwpck_require__(5687));
-var zlib = _interopDefault(__nccwpck_require__(9796));
+ // We don't worry about converting prop to ByteString here as append()
+ // will handle it.
+ if (init == null) ; else if (typeof init === 'object') {
+ const method = init[Symbol.iterator];
+ if (method != null) {
+ if (typeof method !== 'function') {
+ throw new TypeError('Header pairs must be iterable');
+ }
-// Based on https://github.com/tmpvar/jsdom/blob/aa85b2abf07766ff7bf5c1f6daafb3726f2f2db5/lib/jsdom/living/blob.js
+ // sequence>
+ // Note: per spec we have to first exhaust the lists then process them
+ const pairs = [];
+ for (const pair of init) {
+ if (typeof pair !== 'object' || typeof pair[Symbol.iterator] !== 'function') {
+ throw new TypeError('Each header pair must be iterable');
+ }
+ pairs.push(Array.from(pair));
+ }
-// fix for "Readable" isn't a named export issue
-const Readable = Stream.Readable;
+ for (const pair of pairs) {
+ if (pair.length !== 2) {
+ throw new TypeError('Each header pair must be a name/value tuple');
+ }
+ this.append(pair[0], pair[1]);
+ }
+ } else {
+ // record
+ for (const key of Object.keys(init)) {
+ const value = init[key];
+ this.append(key, value);
+ }
+ }
+ } else {
+ throw new TypeError('Provided initializer must be an object');
+ }
+ }
-const BUFFER = Symbol('buffer');
-const TYPE = Symbol('type');
+ /**
+ * Return combined header value given name
+ *
+ * @param String name Header name
+ * @return Mixed
+ */
+ get(name) {
+ name = `${name}`;
+ validateName(name);
+ const key = find(this[MAP], name);
+ if (key === undefined) {
+ return null;
+ }
-class Blob {
- constructor() {
- this[TYPE] = '';
+ return this[MAP][key].join(', ');
+ }
- const blobParts = arguments[0];
- const options = arguments[1];
+ /**
+ * Iterate over all headers
+ *
+ * @param Function callback Executed for each item with parameters (value, name, thisArg)
+ * @param Boolean thisArg `this` context for callback function
+ * @return Void
+ */
+ forEach(callback) {
+ let thisArg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined;
- const buffers = [];
- let size = 0;
+ let pairs = getHeaders(this);
+ let i = 0;
+ while (i < pairs.length) {
+ var _pairs$i = pairs[i];
+ const name = _pairs$i[0],
+ value = _pairs$i[1];
- if (blobParts) {
- const a = blobParts;
- const length = Number(a.length);
- for (let i = 0; i < length; i++) {
- const element = a[i];
- let buffer;
- if (element instanceof Buffer) {
- buffer = element;
- } else if (ArrayBuffer.isView(element)) {
- buffer = Buffer.from(element.buffer, element.byteOffset, element.byteLength);
- } else if (element instanceof ArrayBuffer) {
- buffer = Buffer.from(element);
- } else if (element instanceof Blob) {
- buffer = element[BUFFER];
- } else {
- buffer = Buffer.from(typeof element === 'string' ? element : String(element));
- }
- size += buffer.length;
- buffers.push(buffer);
- }
+ callback.call(thisArg, value, name, this);
+ pairs = getHeaders(this);
+ i++;
}
+ }
- this[BUFFER] = Buffer.concat(buffers);
+ /**
+ * Overwrite header values given name
+ *
+ * @param String name Header name
+ * @param String value Header value
+ * @return Void
+ */
+ set(name, value) {
+ name = `${name}`;
+ value = `${value}`;
+ validateName(name);
+ validateValue(value);
+ const key = find(this[MAP], name);
+ this[MAP][key !== undefined ? key : name] = [value];
+ }
- let type = options && options.type !== undefined && String(options.type).toLowerCase();
- if (type && !/[^\u0020-\u007E]/.test(type)) {
- this[TYPE] = type;
+ /**
+ * Append a value onto existing header
+ *
+ * @param String name Header name
+ * @param String value Header value
+ * @return Void
+ */
+ append(name, value) {
+ name = `${name}`;
+ value = `${value}`;
+ validateName(name);
+ validateValue(value);
+ const key = find(this[MAP], name);
+ if (key !== undefined) {
+ this[MAP][key].push(value);
+ } else {
+ this[MAP][name] = [value];
}
}
- get size() {
- return this[BUFFER].length;
- }
- get type() {
- return this[TYPE];
- }
- text() {
- return Promise.resolve(this[BUFFER].toString());
+
+ /**
+ * Check for header name existence
+ *
+ * @param String name Header name
+ * @return Boolean
+ */
+ has(name) {
+ name = `${name}`;
+ validateName(name);
+ return find(this[MAP], name) !== undefined;
}
- arrayBuffer() {
- const buf = this[BUFFER];
- const ab = buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength);
- return Promise.resolve(ab);
+
+ /**
+ * Delete all header values given name
+ *
+ * @param String name Header name
+ * @return Void
+ */
+ delete(name) {
+ name = `${name}`;
+ validateName(name);
+ const key = find(this[MAP], name);
+ if (key !== undefined) {
+ delete this[MAP][key];
+ }
}
- stream() {
- const readable = new Readable();
- readable._read = function () {};
- readable.push(this[BUFFER]);
- readable.push(null);
- return readable;
+
+ /**
+ * Return raw headers (non-spec api)
+ *
+ * @return Object
+ */
+ raw() {
+ return this[MAP];
}
- toString() {
- return '[object Blob]';
+
+ /**
+ * Get an iterator on keys.
+ *
+ * @return Iterator
+ */
+ keys() {
+ return createHeadersIterator(this, 'key');
}
- slice() {
- const size = this.size;
- const start = arguments[0];
- const end = arguments[1];
- let relativeStart, relativeEnd;
- if (start === undefined) {
- relativeStart = 0;
- } else if (start < 0) {
- relativeStart = Math.max(size + start, 0);
- } else {
- relativeStart = Math.min(start, size);
- }
- if (end === undefined) {
- relativeEnd = size;
- } else if (end < 0) {
- relativeEnd = Math.max(size + end, 0);
- } else {
- relativeEnd = Math.min(end, size);
- }
- const span = Math.max(relativeEnd - relativeStart, 0);
+ /**
+ * Get an iterator on values.
+ *
+ * @return Iterator
+ */
+ values() {
+ return createHeadersIterator(this, 'value');
+ }
- const buffer = this[BUFFER];
- const slicedBuffer = buffer.slice(relativeStart, relativeStart + span);
- const blob = new Blob([], { type: arguments[2] });
- blob[BUFFER] = slicedBuffer;
- return blob;
+ /**
+ * Get an iterator on entries.
+ *
+ * This is the default iterator of the Headers object.
+ *
+ * @return Iterator
+ */
+ [Symbol.iterator]() {
+ return createHeadersIterator(this, 'key+value');
}
}
+Headers.prototype.entries = Headers.prototype[Symbol.iterator];
-Object.defineProperties(Blob.prototype, {
- size: { enumerable: true },
- type: { enumerable: true },
- slice: { enumerable: true }
+Object.defineProperty(Headers.prototype, Symbol.toStringTag, {
+ value: 'Headers',
+ writable: false,
+ enumerable: false,
+ configurable: true
});
-Object.defineProperty(Blob.prototype, Symbol.toStringTag, {
- value: 'Blob',
+Object.defineProperties(Headers.prototype, {
+ get: { enumerable: true },
+ forEach: { enumerable: true },
+ set: { enumerable: true },
+ append: { enumerable: true },
+ has: { enumerable: true },
+ delete: { enumerable: true },
+ keys: { enumerable: true },
+ values: { enumerable: true },
+ entries: { enumerable: true }
+});
+
+function getHeaders(headers) {
+ let kind = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'key+value';
+
+ const keys = Object.keys(headers[MAP]).sort();
+ return keys.map(kind === 'key' ? function (k) {
+ return k.toLowerCase();
+ } : kind === 'value' ? function (k) {
+ return headers[MAP][k].join(', ');
+ } : function (k) {
+ return [k.toLowerCase(), headers[MAP][k].join(', ')];
+ });
+}
+
+const INTERNAL = Symbol('internal');
+
+function createHeadersIterator(target, kind) {
+ const iterator = Object.create(HeadersIteratorPrototype);
+ iterator[INTERNAL] = {
+ target,
+ kind,
+ index: 0
+ };
+ return iterator;
+}
+
+const HeadersIteratorPrototype = Object.setPrototypeOf({
+ next() {
+ // istanbul ignore if
+ if (!this || Object.getPrototypeOf(this) !== HeadersIteratorPrototype) {
+ throw new TypeError('Value of `this` is not a HeadersIterator');
+ }
+
+ var _INTERNAL = this[INTERNAL];
+ const target = _INTERNAL.target,
+ kind = _INTERNAL.kind,
+ index = _INTERNAL.index;
+
+ const values = getHeaders(target, kind);
+ const len = values.length;
+ if (index >= len) {
+ return {
+ value: undefined,
+ done: true
+ };
+ }
+
+ this[INTERNAL].index = index + 1;
+
+ return {
+ value: values[index],
+ done: false
+ };
+ }
+}, Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())));
+
+Object.defineProperty(HeadersIteratorPrototype, Symbol.toStringTag, {
+ value: 'HeadersIterator',
writable: false,
enumerable: false,
configurable: true
});
/**
- * fetch-error.js
+ * Export the Headers object in a form that Node.js can consume.
*
- * FetchError interface for operational errors
+ * @param Headers headers
+ * @return Object
*/
+function exportNodeCompatibleHeaders(headers) {
+ const obj = Object.assign({ __proto__: null }, headers[MAP]);
+
+ // http.request() only supports string as Host header. This hack makes
+ // specifying custom Host header possible.
+ const hostHeaderKey = find(headers[MAP], 'Host');
+ if (hostHeaderKey !== undefined) {
+ obj[hostHeaderKey] = obj[hostHeaderKey][0];
+ }
+
+ return obj;
+}
/**
- * Create FetchError instance
+ * Create a Headers object from an object of headers, ignoring those that do
+ * not conform to HTTP grammar productions.
*
- * @param String message Error message for human
- * @param String type Error type for machine
- * @param String systemError For Node.js system error
- * @return FetchError
+ * @param Object obj Object of headers
+ * @return Headers
*/
-function FetchError(message, type, systemError) {
- Error.call(this, message);
-
- this.message = message;
- this.type = type;
-
- // when err.type is `system`, err.code contains system error code
- if (systemError) {
- this.code = this.errno = systemError.code;
- }
-
- // hide custom error implementation details from end-users
- Error.captureStackTrace(this, this.constructor);
+function createHeadersLenient(obj) {
+ const headers = new Headers();
+ for (const name of Object.keys(obj)) {
+ if (invalidTokenRegex.test(name)) {
+ continue;
+ }
+ if (Array.isArray(obj[name])) {
+ for (const val of obj[name]) {
+ if (invalidHeaderCharRegex.test(val)) {
+ continue;
+ }
+ if (headers[MAP][name] === undefined) {
+ headers[MAP][name] = [val];
+ } else {
+ headers[MAP][name].push(val);
+ }
+ }
+ } else if (!invalidHeaderCharRegex.test(obj[name])) {
+ headers[MAP][name] = [obj[name]];
+ }
+ }
+ return headers;
}
-FetchError.prototype = Object.create(Error.prototype);
-FetchError.prototype.constructor = FetchError;
-FetchError.prototype.name = 'FetchError';
-
-let convert;
-try {
- convert = (__nccwpck_require__(2877).convert);
-} catch (e) {}
-
-const INTERNALS = Symbol('Body internals');
+const INTERNALS$1 = Symbol('Response internals');
-// fix an issue where "PassThrough" isn't a named export for node <10
-const PassThrough = Stream.PassThrough;
+// fix an issue where "STATUS_CODES" aren't a named export for node <10
+const STATUS_CODES = http.STATUS_CODES;
/**
- * Body mixin
- *
- * Ref: https://fetch.spec.whatwg.org/#body
+ * Response class
*
* @param Stream body Readable stream
* @param Object opts Response options
* @return Void
*/
-function Body(body) {
- var _this = this;
+class Response {
+ constructor() {
+ let body = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
+ let opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
- var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
- _ref$size = _ref.size;
+ Body.call(this, body, opts);
- let size = _ref$size === undefined ? 0 : _ref$size;
- var _ref$timeout = _ref.timeout;
- let timeout = _ref$timeout === undefined ? 0 : _ref$timeout;
+ const status = opts.status || 200;
+ const headers = new Headers(opts.headers);
- if (body == null) {
- // body is undefined or null
- body = null;
- } else if (isURLSearchParams(body)) {
- // body is a URLSearchParams
- body = Buffer.from(body.toString());
- } else if (isBlob(body)) ; else if (Buffer.isBuffer(body)) ; else if (Object.prototype.toString.call(body) === '[object ArrayBuffer]') {
- // body is ArrayBuffer
- body = Buffer.from(body);
- } else if (ArrayBuffer.isView(body)) {
- // body is ArrayBufferView
- body = Buffer.from(body.buffer, body.byteOffset, body.byteLength);
- } else if (body instanceof Stream) ; else {
- // none of the above
- // coerce to string then buffer
- body = Buffer.from(String(body));
- }
- this[INTERNALS] = {
- body,
- disturbed: false,
- error: null
- };
- this.size = size;
- this.timeout = timeout;
+ if (body != null && !headers.has('Content-Type')) {
+ const contentType = extractContentType(body);
+ if (contentType) {
+ headers.append('Content-Type', contentType);
+ }
+ }
- if (body instanceof Stream) {
- body.on('error', function (err) {
- const error = err.name === 'AbortError' ? err : new FetchError(`Invalid response body while trying to fetch ${_this.url}: ${err.message}`, 'system', err);
- _this[INTERNALS].error = error;
- });
+ this[INTERNALS$1] = {
+ url: opts.url,
+ status,
+ statusText: opts.statusText || STATUS_CODES[status],
+ headers,
+ counter: opts.counter
+ };
}
-}
-Body.prototype = {
- get body() {
- return this[INTERNALS].body;
- },
+ get url() {
+ return this[INTERNALS$1].url || '';
+ }
- get bodyUsed() {
- return this[INTERNALS].disturbed;
- },
+ get status() {
+ return this[INTERNALS$1].status;
+ }
/**
- * Decode response as ArrayBuffer
- *
- * @return Promise
+ * Convenience property representing if the request ended normally
*/
- arrayBuffer() {
- return consumeBody.call(this).then(function (buf) {
- return buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength);
- });
- },
+ get ok() {
+ return this[INTERNALS$1].status >= 200 && this[INTERNALS$1].status < 300;
+ }
- /**
- * Return raw response as Blob
- *
- * @return Promise
- */
- blob() {
- let ct = this.headers && this.headers.get('content-type') || '';
- return consumeBody.call(this).then(function (buf) {
- return Object.assign(
- // Prevent copying
- new Blob([], {
- type: ct.toLowerCase()
- }), {
- [BUFFER]: buf
- });
- });
- },
+ get redirected() {
+ return this[INTERNALS$1].counter > 0;
+ }
- /**
- * Decode response as json
- *
- * @return Promise
- */
- json() {
- var _this2 = this;
+ get statusText() {
+ return this[INTERNALS$1].statusText;
+ }
- return consumeBody.call(this).then(function (buffer) {
- try {
- return JSON.parse(buffer.toString());
- } catch (err) {
- return Body.Promise.reject(new FetchError(`invalid json response body at ${_this2.url} reason: ${err.message}`, 'invalid-json'));
- }
- });
- },
+ get headers() {
+ return this[INTERNALS$1].headers;
+ }
/**
- * Decode response as text
+ * Clone this response
*
- * @return Promise
+ * @return Response
*/
- text() {
- return consumeBody.call(this).then(function (buffer) {
- return buffer.toString();
+ clone() {
+ return new Response(clone(this), {
+ url: this.url,
+ status: this.status,
+ statusText: this.statusText,
+ headers: this.headers,
+ ok: this.ok,
+ redirected: this.redirected
});
- },
-
- /**
- * Decode response as buffer (non-spec api)
- *
- * @return Promise
- */
- buffer() {
- return consumeBody.call(this);
- },
+ }
+}
- /**
- * Decode response as text, while automatically detecting the encoding and
- * trying to decode to UTF-8 (non-spec api)
- *
- * @return Promise
- */
- textConverted() {
- var _this3 = this;
+Body.mixIn(Response.prototype);
- return consumeBody.call(this).then(function (buffer) {
- return convertBody(buffer, _this3.headers);
- });
- }
-};
+Object.defineProperties(Response.prototype, {
+ url: { enumerable: true },
+ status: { enumerable: true },
+ ok: { enumerable: true },
+ redirected: { enumerable: true },
+ statusText: { enumerable: true },
+ headers: { enumerable: true },
+ clone: { enumerable: true }
+});
-// In browsers, all properties are enumerable.
-Object.defineProperties(Body.prototype, {
- body: { enumerable: true },
- bodyUsed: { enumerable: true },
- arrayBuffer: { enumerable: true },
- blob: { enumerable: true },
- json: { enumerable: true },
- text: { enumerable: true }
+Object.defineProperty(Response.prototype, Symbol.toStringTag, {
+ value: 'Response',
+ writable: false,
+ enumerable: false,
+ configurable: true
});
-Body.mixIn = function (proto) {
- for (const name of Object.getOwnPropertyNames(Body.prototype)) {
- // istanbul ignore else: future proof
- if (!(name in proto)) {
- const desc = Object.getOwnPropertyDescriptor(Body.prototype, name);
- Object.defineProperty(proto, name, desc);
- }
- }
-};
+const INTERNALS$2 = Symbol('Request internals');
+const URL = Url.URL || whatwgUrl.URL;
+
+// fix an issue where "format", "parse" aren't a named export for node <10
+const parse_url = Url.parse;
+const format_url = Url.format;
/**
- * Consume and convert an entire Body to a Buffer.
- *
- * Ref: https://fetch.spec.whatwg.org/#concept-body-consume-body
+ * Wrapper around `new URL` to handle arbitrary URLs
*
- * @return Promise
+ * @param {string} urlStr
+ * @return {void}
*/
-function consumeBody() {
- var _this4 = this;
-
- if (this[INTERNALS].disturbed) {
- return Body.Promise.reject(new TypeError(`body used already for: ${this.url}`));
+function parseURL(urlStr) {
+ /*
+ Check whether the URL is absolute or not
+ Scheme: https://tools.ietf.org/html/rfc3986#section-3.1
+ Absolute URL: https://tools.ietf.org/html/rfc3986#section-4.3
+ */
+ if (/^[a-zA-Z][a-zA-Z\d+\-.]*:/.exec(urlStr)) {
+ urlStr = new URL(urlStr).toString();
}
- this[INTERNALS].disturbed = true;
-
- if (this[INTERNALS].error) {
- return Body.Promise.reject(this[INTERNALS].error);
- }
+ // Fallback to old implementation for arbitrary URLs
+ return parse_url(urlStr);
+}
- let body = this.body;
+const streamDestructionSupported = 'destroy' in Stream.Readable.prototype;
- // body is null
- if (body === null) {
- return Body.Promise.resolve(Buffer.alloc(0));
- }
+/**
+ * Check if a value is an instance of Request.
+ *
+ * @param Mixed input
+ * @return Boolean
+ */
+function isRequest(input) {
+ return typeof input === 'object' && typeof input[INTERNALS$2] === 'object';
+}
- // body is blob
- if (isBlob(body)) {
- body = body.stream();
- }
+function isAbortSignal(signal) {
+ const proto = signal && typeof signal === 'object' && Object.getPrototypeOf(signal);
+ return !!(proto && proto.constructor.name === 'AbortSignal');
+}
- // body is buffer
- if (Buffer.isBuffer(body)) {
- return Body.Promise.resolve(body);
- }
+/**
+ * Request class
+ *
+ * @param Mixed input Url or Request instance
+ * @param Object init Custom options
+ * @return Void
+ */
+class Request {
+ constructor(input) {
+ let init = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
- // istanbul ignore if: should never happen
- if (!(body instanceof Stream)) {
- return Body.Promise.resolve(Buffer.alloc(0));
- }
+ let parsedURL;
- // body is stream
- // get ready to actually consume the body
- let accum = [];
- let accumBytes = 0;
- let abort = false;
+ // normalize input
+ if (!isRequest(input)) {
+ if (input && input.href) {
+ // in order to support Node.js' Url objects; though WHATWG's URL objects
+ // will fall into this branch also (since their `toString()` will return
+ // `href` property anyway)
+ parsedURL = parseURL(input.href);
+ } else {
+ // coerce input to a string before attempting to parse
+ parsedURL = parseURL(`${input}`);
+ }
+ input = {};
+ } else {
+ parsedURL = parseURL(input.url);
+ }
- return new Body.Promise(function (resolve, reject) {
- let resTimeout;
+ let method = init.method || input.method || 'GET';
+ method = method.toUpperCase();
- // allow timeout on slow response body
- if (_this4.timeout) {
- resTimeout = setTimeout(function () {
- abort = true;
- reject(new FetchError(`Response timeout while trying to fetch ${_this4.url} (over ${_this4.timeout}ms)`, 'body-timeout'));
- }, _this4.timeout);
+ if ((init.body != null || isRequest(input) && input.body !== null) && (method === 'GET' || method === 'HEAD')) {
+ throw new TypeError('Request with GET/HEAD method cannot have body');
}
- // handle stream errors
- body.on('error', function (err) {
- if (err.name === 'AbortError') {
- // if the request was aborted, reject with this Error
- abort = true;
- reject(err);
- } else {
- // other errors, such as incorrect content-encoding
- reject(new FetchError(`Invalid response body while trying to fetch ${_this4.url}: ${err.message}`, 'system', err));
- }
+ let inputBody = init.body != null ? init.body : isRequest(input) && input.body !== null ? clone(input) : null;
+
+ Body.call(this, inputBody, {
+ timeout: init.timeout || input.timeout || 0,
+ size: init.size || input.size || 0
});
- body.on('data', function (chunk) {
- if (abort || chunk === null) {
- return;
- }
+ const headers = new Headers(init.headers || input.headers || {});
- if (_this4.size && accumBytes + chunk.length > _this4.size) {
- abort = true;
- reject(new FetchError(`content size at ${_this4.url} over limit: ${_this4.size}`, 'max-size'));
- return;
+ if (inputBody != null && !headers.has('Content-Type')) {
+ const contentType = extractContentType(inputBody);
+ if (contentType) {
+ headers.append('Content-Type', contentType);
}
+ }
- accumBytes += chunk.length;
- accum.push(chunk);
- });
+ let signal = isRequest(input) ? input.signal : null;
+ if ('signal' in init) signal = init.signal;
- body.on('end', function () {
- if (abort) {
- return;
- }
+ if (signal != null && !isAbortSignal(signal)) {
+ throw new TypeError('Expected signal to be an instanceof AbortSignal');
+ }
- clearTimeout(resTimeout);
+ this[INTERNALS$2] = {
+ method,
+ redirect: init.redirect || input.redirect || 'follow',
+ headers,
+ parsedURL,
+ signal
+ };
- try {
- resolve(Buffer.concat(accum, accumBytes));
- } catch (err) {
- // handle streams that have accumulated too much data (issue #414)
- reject(new FetchError(`Could not create Buffer from response body for ${_this4.url}: ${err.message}`, 'system', err));
- }
- });
- });
-}
-
-/**
- * Detect buffer encoding and convert to target encoding
- * ref: http://www.w3.org/TR/2011/WD-html5-20110113/parsing.html#determining-the-character-encoding
- *
- * @param Buffer buffer Incoming buffer
- * @param String encoding Target encoding
- * @return String
- */
-function convertBody(buffer, headers) {
- if (typeof convert !== 'function') {
- throw new Error('The package `encoding` must be installed to use the textConverted() function');
+ // node-fetch-only options
+ this.follow = init.follow !== undefined ? init.follow : input.follow !== undefined ? input.follow : 20;
+ this.compress = init.compress !== undefined ? init.compress : input.compress !== undefined ? input.compress : true;
+ this.counter = init.counter || input.counter || 0;
+ this.agent = init.agent || input.agent;
}
- const ct = headers.get('content-type');
- let charset = 'utf-8';
- let res, str;
-
- // header
- if (ct) {
- res = /charset=([^;]*)/i.exec(ct);
+ get method() {
+ return this[INTERNALS$2].method;
}
- // no charset in content type, peek at response body for at most 1024 bytes
- str = buffer.slice(0, 1024).toString();
+ get url() {
+ return format_url(this[INTERNALS$2].parsedURL);
+ }
- // html5
- if (!res && str) {
- res = / 0 && arguments[0] !== undefined ? arguments[0] : undefined;
+ Body.Promise = fetch.Promise;
- this[MAP] = Object.create(null);
+ // wrap http.request into fetch
+ return new fetch.Promise(function (resolve, reject) {
+ // build request object
+ const request = new Request(url, opts);
+ const options = getNodeRequestOptions(request);
- if (init instanceof Headers) {
- const rawHeaders = init.raw();
- const headerNames = Object.keys(rawHeaders);
+ const send = (options.protocol === 'https:' ? https : http).request;
+ const signal = request.signal;
- for (const headerName of headerNames) {
- for (const value of rawHeaders[headerName]) {
- this.append(headerName, value);
- }
+ let response = null;
+
+ const abort = function abort() {
+ let error = new AbortError('The user aborted a request.');
+ reject(error);
+ if (request.body && request.body instanceof Stream.Readable) {
+ destroyStream(request.body, error);
}
+ if (!response || !response.body) return;
+ response.body.emit('error', error);
+ };
+ if (signal && signal.aborted) {
+ abort();
return;
}
- // We don't worry about converting prop to ByteString here as append()
- // will handle it.
- if (init == null) ; else if (typeof init === 'object') {
- const method = init[Symbol.iterator];
- if (method != null) {
- if (typeof method !== 'function') {
- throw new TypeError('Header pairs must be iterable');
- }
+ const abortAndFinalize = function abortAndFinalize() {
+ abort();
+ finalize();
+ };
- // sequence>
- // Note: per spec we have to first exhaust the lists then process them
- const pairs = [];
- for (const pair of init) {
- if (typeof pair !== 'object' || typeof pair[Symbol.iterator] !== 'function') {
- throw new TypeError('Each header pair must be iterable');
- }
- pairs.push(Array.from(pair));
- }
+ // send request
+ const req = send(options);
+ let reqTimeout;
- for (const pair of pairs) {
- if (pair.length !== 2) {
- throw new TypeError('Each header pair must be a name/value tuple');
- }
- this.append(pair[0], pair[1]);
- }
- } else {
- // record
- for (const key of Object.keys(init)) {
- const value = init[key];
- this.append(key, value);
- }
- }
- } else {
- throw new TypeError('Provided initializer must be an object');
+ if (signal) {
+ signal.addEventListener('abort', abortAndFinalize);
}
- }
- /**
- * Return combined header value given name
- *
- * @param String name Header name
- * @return Mixed
- */
- get(name) {
- name = `${name}`;
- validateName(name);
- const key = find(this[MAP], name);
- if (key === undefined) {
- return null;
+ function finalize() {
+ req.abort();
+ if (signal) signal.removeEventListener('abort', abortAndFinalize);
+ clearTimeout(reqTimeout);
}
- return this[MAP][key].join(', ');
- }
+ if (request.timeout) {
+ req.once('socket', function (socket) {
+ reqTimeout = setTimeout(function () {
+ reject(new FetchError(`network timeout at: ${request.url}`, 'request-timeout'));
+ finalize();
+ }, request.timeout);
+ });
+ }
- /**
- * Iterate over all headers
- *
- * @param Function callback Executed for each item with parameters (value, name, thisArg)
- * @param Boolean thisArg `this` context for callback function
- * @return Void
- */
- forEach(callback) {
- let thisArg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined;
+ req.on('error', function (err) {
+ reject(new FetchError(`request to ${request.url} failed, reason: ${err.message}`, 'system', err));
- let pairs = getHeaders(this);
- let i = 0;
- while (i < pairs.length) {
- var _pairs$i = pairs[i];
- const name = _pairs$i[0],
- value = _pairs$i[1];
+ if (response && response.body) {
+ destroyStream(response.body, err);
+ }
- callback.call(thisArg, value, name, this);
- pairs = getHeaders(this);
- i++;
- }
- }
+ finalize();
+ });
- /**
- * Overwrite header values given name
- *
- * @param String name Header name
- * @param String value Header value
- * @return Void
- */
- set(name, value) {
- name = `${name}`;
- value = `${value}`;
- validateName(name);
- validateValue(value);
- const key = find(this[MAP], name);
- this[MAP][key !== undefined ? key : name] = [value];
- }
+ fixResponseChunkedTransferBadEnding(req, function (err) {
+ if (signal && signal.aborted) {
+ return;
+ }
- /**
- * Append a value onto existing header
- *
- * @param String name Header name
- * @param String value Header value
- * @return Void
- */
- append(name, value) {
- name = `${name}`;
- value = `${value}`;
- validateName(name);
- validateValue(value);
- const key = find(this[MAP], name);
- if (key !== undefined) {
- this[MAP][key].push(value);
- } else {
- this[MAP][name] = [value];
- }
- }
+ if (response && response.body) {
+ destroyStream(response.body, err);
+ }
+ });
- /**
- * Check for header name existence
- *
- * @param String name Header name
- * @return Boolean
- */
- has(name) {
- name = `${name}`;
- validateName(name);
- return find(this[MAP], name) !== undefined;
- }
+ /* c8 ignore next 18 */
+ if (parseInt(process.version.substring(1)) < 14) {
+ // Before Node.js 14, pipeline() does not fully support async iterators and does not always
+ // properly handle when the socket close/end events are out of order.
+ req.on('socket', function (s) {
+ s.addListener('close', function (hadError) {
+ // if a data listener is still present we didn't end cleanly
+ const hasDataListener = s.listenerCount('data') > 0;
- /**
- * Delete all header values given name
- *
- * @param String name Header name
- * @return Void
- */
- delete(name) {
- name = `${name}`;
- validateName(name);
- const key = find(this[MAP], name);
- if (key !== undefined) {
- delete this[MAP][key];
+ // if end happened before close but the socket didn't emit an error, do it now
+ if (response && hasDataListener && !hadError && !(signal && signal.aborted)) {
+ const err = new Error('Premature close');
+ err.code = 'ERR_STREAM_PREMATURE_CLOSE';
+ response.body.emit('error', err);
+ }
+ });
+ });
}
- }
- /**
- * Return raw headers (non-spec api)
- *
- * @return Object
- */
- raw() {
- return this[MAP];
- }
+ req.on('response', function (res) {
+ clearTimeout(reqTimeout);
- /**
- * Get an iterator on keys.
- *
- * @return Iterator
- */
- keys() {
- return createHeadersIterator(this, 'key');
- }
+ const headers = createHeadersLenient(res.headers);
- /**
- * Get an iterator on values.
- *
- * @return Iterator
- */
- values() {
- return createHeadersIterator(this, 'value');
- }
+ // HTTP fetch step 5
+ if (fetch.isRedirect(res.statusCode)) {
+ // HTTP fetch step 5.2
+ const location = headers.get('Location');
- /**
- * Get an iterator on entries.
- *
- * This is the default iterator of the Headers object.
- *
- * @return Iterator
- */
- [Symbol.iterator]() {
- return createHeadersIterator(this, 'key+value');
- }
-}
-Headers.prototype.entries = Headers.prototype[Symbol.iterator];
+ // HTTP fetch step 5.3
+ let locationURL = null;
+ try {
+ locationURL = location === null ? null : new URL$1(location, request.url).toString();
+ } catch (err) {
+ // error here can only be invalid URL in Location: header
+ // do not throw when options.redirect == manual
+ // let the user extract the errorneous redirect URL
+ if (request.redirect !== 'manual') {
+ reject(new FetchError(`uri requested responds with an invalid redirect URL: ${location}`, 'invalid-redirect'));
+ finalize();
+ return;
+ }
+ }
-Object.defineProperty(Headers.prototype, Symbol.toStringTag, {
- value: 'Headers',
- writable: false,
- enumerable: false,
- configurable: true
-});
+ // HTTP fetch step 5.5
+ switch (request.redirect) {
+ case 'error':
+ reject(new FetchError(`uri requested responds with a redirect, redirect mode is set to error: ${request.url}`, 'no-redirect'));
+ finalize();
+ return;
+ case 'manual':
+ // node-fetch-specific step: make manual redirect a bit easier to use by setting the Location header value to the resolved URL.
+ if (locationURL !== null) {
+ // handle corrupted header
+ try {
+ headers.set('Location', locationURL);
+ } catch (err) {
+ // istanbul ignore next: nodejs server prevent invalid response headers, we can't test this through normal request
+ reject(err);
+ }
+ }
+ break;
+ case 'follow':
+ // HTTP-redirect fetch step 2
+ if (locationURL === null) {
+ break;
+ }
-Object.defineProperties(Headers.prototype, {
- get: { enumerable: true },
- forEach: { enumerable: true },
- set: { enumerable: true },
- append: { enumerable: true },
- has: { enumerable: true },
- delete: { enumerable: true },
- keys: { enumerable: true },
- values: { enumerable: true },
- entries: { enumerable: true }
-});
+ // HTTP-redirect fetch step 5
+ if (request.counter >= request.follow) {
+ reject(new FetchError(`maximum redirect reached at: ${request.url}`, 'max-redirect'));
+ finalize();
+ return;
+ }
-function getHeaders(headers) {
- let kind = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'key+value';
+ // HTTP-redirect fetch step 6 (counter increment)
+ // Create a new Request object.
+ const requestOpts = {
+ headers: new Headers(request.headers),
+ follow: request.follow,
+ counter: request.counter + 1,
+ agent: request.agent,
+ compress: request.compress,
+ method: request.method,
+ body: request.body,
+ signal: request.signal,
+ timeout: request.timeout,
+ size: request.size
+ };
- const keys = Object.keys(headers[MAP]).sort();
- return keys.map(kind === 'key' ? function (k) {
- return k.toLowerCase();
- } : kind === 'value' ? function (k) {
- return headers[MAP][k].join(', ');
- } : function (k) {
- return [k.toLowerCase(), headers[MAP][k].join(', ')];
- });
-}
+ if (!isDomainOrSubdomain(request.url, locationURL) || !isSameProtocol(request.url, locationURL)) {
+ for (const name of ['authorization', 'www-authenticate', 'cookie', 'cookie2']) {
+ requestOpts.headers.delete(name);
+ }
+ }
-const INTERNAL = Symbol('internal');
+ // HTTP-redirect fetch step 9
+ if (res.statusCode !== 303 && request.body && getTotalBytes(request) === null) {
+ reject(new FetchError('Cannot follow redirect with body being a readable stream', 'unsupported-redirect'));
+ finalize();
+ return;
+ }
-function createHeadersIterator(target, kind) {
- const iterator = Object.create(HeadersIteratorPrototype);
- iterator[INTERNAL] = {
- target,
- kind,
- index: 0
- };
- return iterator;
-}
+ // HTTP-redirect fetch step 11
+ if (res.statusCode === 303 || (res.statusCode === 301 || res.statusCode === 302) && request.method === 'POST') {
+ requestOpts.method = 'GET';
+ requestOpts.body = undefined;
+ requestOpts.headers.delete('content-length');
+ }
-const HeadersIteratorPrototype = Object.setPrototypeOf({
- next() {
- // istanbul ignore if
- if (!this || Object.getPrototypeOf(this) !== HeadersIteratorPrototype) {
- throw new TypeError('Value of `this` is not a HeadersIterator');
- }
+ // HTTP-redirect fetch step 15
+ resolve(fetch(new Request(locationURL, requestOpts)));
+ finalize();
+ return;
+ }
+ }
- var _INTERNAL = this[INTERNAL];
- const target = _INTERNAL.target,
- kind = _INTERNAL.kind,
- index = _INTERNAL.index;
+ // prepare response
+ res.once('end', function () {
+ if (signal) signal.removeEventListener('abort', abortAndFinalize);
+ });
+ let body = res.pipe(new PassThrough$1());
- const values = getHeaders(target, kind);
- const len = values.length;
- if (index >= len) {
- return {
- value: undefined,
- done: true
+ const response_options = {
+ url: request.url,
+ status: res.statusCode,
+ statusText: res.statusMessage,
+ headers: headers,
+ size: request.size,
+ timeout: request.timeout,
+ counter: request.counter
};
- }
- this[INTERNAL].index = index + 1;
+ // HTTP-network fetch step 12.1.1.3
+ const codings = headers.get('Content-Encoding');
- return {
- value: values[index],
- done: false
- };
- }
-}, Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())));
+ // HTTP-network fetch step 12.1.1.4: handle content codings
-Object.defineProperty(HeadersIteratorPrototype, Symbol.toStringTag, {
- value: 'HeadersIterator',
- writable: false,
- enumerable: false,
- configurable: true
-});
+ // in following scenarios we ignore compression support
+ // 1. compression support is disabled
+ // 2. HEAD request
+ // 3. no Content-Encoding header
+ // 4. no content response (204)
+ // 5. content not modified response (304)
+ if (!request.compress || request.method === 'HEAD' || codings === null || res.statusCode === 204 || res.statusCode === 304) {
+ response = new Response(body, response_options);
+ resolve(response);
+ return;
+ }
-/**
- * Export the Headers object in a form that Node.js can consume.
- *
- * @param Headers headers
- * @return Object
- */
-function exportNodeCompatibleHeaders(headers) {
- const obj = Object.assign({ __proto__: null }, headers[MAP]);
+ // For Node v6+
+ // Be less strict when decoding compressed responses, since sometimes
+ // servers send slightly invalid responses that are still accepted
+ // by common browsers.
+ // Always using Z_SYNC_FLUSH is what cURL does.
+ const zlibOptions = {
+ flush: zlib.Z_SYNC_FLUSH,
+ finishFlush: zlib.Z_SYNC_FLUSH
+ };
- // http.request() only supports string as Host header. This hack makes
- // specifying custom Host header possible.
- const hostHeaderKey = find(headers[MAP], 'Host');
- if (hostHeaderKey !== undefined) {
- obj[hostHeaderKey] = obj[hostHeaderKey][0];
- }
+ // for gzip
+ if (codings == 'gzip' || codings == 'x-gzip') {
+ body = body.pipe(zlib.createGunzip(zlibOptions));
+ response = new Response(body, response_options);
+ resolve(response);
+ return;
+ }
- return obj;
-}
+ // for deflate
+ if (codings == 'deflate' || codings == 'x-deflate') {
+ // handle the infamous raw deflate response from old servers
+ // a hack for old IIS and Apache servers
+ const raw = res.pipe(new PassThrough$1());
+ raw.once('data', function (chunk) {
+ // see http://stackoverflow.com/questions/37519828
+ if ((chunk[0] & 0x0F) === 0x08) {
+ body = body.pipe(zlib.createInflate());
+ } else {
+ body = body.pipe(zlib.createInflateRaw());
+ }
+ response = new Response(body, response_options);
+ resolve(response);
+ });
+ raw.on('end', function () {
+ // some old IIS servers return zero-length OK deflate responses, so 'data' is never emitted.
+ if (!response) {
+ response = new Response(body, response_options);
+ resolve(response);
+ }
+ });
+ return;
+ }
-/**
- * Create a Headers object from an object of headers, ignoring those that do
- * not conform to HTTP grammar productions.
- *
- * @param Object obj Object of headers
- * @return Headers
- */
-function createHeadersLenient(obj) {
- const headers = new Headers();
- for (const name of Object.keys(obj)) {
- if (invalidTokenRegex.test(name)) {
- continue;
- }
- if (Array.isArray(obj[name])) {
- for (const val of obj[name]) {
- if (invalidHeaderCharRegex.test(val)) {
- continue;
- }
- if (headers[MAP][name] === undefined) {
- headers[MAP][name] = [val];
- } else {
- headers[MAP][name].push(val);
- }
+ // for br
+ if (codings == 'br' && typeof zlib.createBrotliDecompress === 'function') {
+ body = body.pipe(zlib.createBrotliDecompress());
+ response = new Response(body, response_options);
+ resolve(response);
+ return;
}
- } else if (!invalidHeaderCharRegex.test(obj[name])) {
- headers[MAP][name] = [obj[name]];
- }
- }
- return headers;
-}
-const INTERNALS$1 = Symbol('Response internals');
+ // otherwise, use response as-is
+ response = new Response(body, response_options);
+ resolve(response);
+ });
-// fix an issue where "STATUS_CODES" aren't a named export for node <10
-const STATUS_CODES = http.STATUS_CODES;
+ writeToStream(req, request);
+ });
+}
+function fixResponseChunkedTransferBadEnding(request, errorCallback) {
+ let socket;
-/**
- * Response class
- *
- * @param Stream body Readable stream
- * @param Object opts Response options
- * @return Void
- */
-class Response {
- constructor() {
- let body = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
- let opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
+ request.on('socket', function (s) {
+ socket = s;
+ });
- Body.call(this, body, opts);
+ request.on('response', function (response) {
+ const headers = response.headers;
- const status = opts.status || 200;
- const headers = new Headers(opts.headers);
+ if (headers['transfer-encoding'] === 'chunked' && !headers['content-length']) {
+ response.once('close', function (hadError) {
+ // tests for socket presence, as in some situations the
+ // the 'socket' event is not triggered for the request
+ // (happens in deno), avoids `TypeError`
+ // if a data listener is still present we didn't end cleanly
+ const hasDataListener = socket && socket.listenerCount('data') > 0;
- if (body != null && !headers.has('Content-Type')) {
- const contentType = extractContentType(body);
- if (contentType) {
- headers.append('Content-Type', contentType);
- }
+ if (hasDataListener && !hadError) {
+ const err = new Error('Premature close');
+ err.code = 'ERR_STREAM_PREMATURE_CLOSE';
+ errorCallback(err);
+ }
+ });
}
+ });
+}
- this[INTERNALS$1] = {
- url: opts.url,
- status,
- statusText: opts.statusText || STATUS_CODES[status],
- headers,
- counter: opts.counter
- };
+function destroyStream(stream, err) {
+ if (stream.destroy) {
+ stream.destroy(err);
+ } else {
+ // node < 8
+ stream.emit('error', err);
+ stream.end();
}
+}
- get url() {
- return this[INTERNALS$1].url || '';
- }
+/**
+ * Redirect code matching
+ *
+ * @param Number code Status code
+ * @return Boolean
+ */
+fetch.isRedirect = function (code) {
+ return code === 301 || code === 302 || code === 303 || code === 307 || code === 308;
+};
- get status() {
- return this[INTERNALS$1].status;
- }
+// expose Promise
+fetch.Promise = global.Promise;
- /**
- * Convenience property representing if the request ended normally
- */
- get ok() {
- return this[INTERNALS$1].status >= 200 && this[INTERNALS$1].status < 300;
- }
+module.exports = exports = fetch;
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports["default"] = exports;
+exports.Headers = Headers;
+exports.Request = Request;
+exports.Response = Response;
+exports.FetchError = FetchError;
+exports.AbortError = AbortError;
- get redirected() {
- return this[INTERNALS$1].counter > 0;
- }
- get statusText() {
- return this[INTERNALS$1].statusText;
- }
+/***/ }),
- get headers() {
- return this[INTERNALS$1].headers;
- }
+/***/ 2043:
+/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
- /**
- * Clone this response
- *
- * @return Response
- */
- clone() {
- return new Response(clone(this), {
- url: this.url,
- status: this.status,
- statusText: this.statusText,
- headers: this.headers,
- ok: this.ok,
- redirected: this.redirected
- });
- }
-}
+;(function (sax) { // wrapper for non-node envs
+ sax.parser = function (strict, opt) { return new SAXParser(strict, opt) }
+ sax.SAXParser = SAXParser
+ sax.SAXStream = SAXStream
+ sax.createStream = createStream
-Body.mixIn(Response.prototype);
+ // When we pass the MAX_BUFFER_LENGTH position, start checking for buffer overruns.
+ // When we check, schedule the next check for MAX_BUFFER_LENGTH - (max(buffer lengths)),
+ // since that's the earliest that a buffer overrun could occur. This way, checks are
+ // as rare as required, but as often as necessary to ensure never crossing this bound.
+ // Furthermore, buffers are only tested at most once per write(), so passing a very
+ // large string into write() might have undesirable effects, but this is manageable by
+ // the caller, so it is assumed to be safe. Thus, a call to write() may, in the extreme
+ // edge case, result in creating at most one complete copy of the string passed in.
+ // Set to Infinity to have unlimited buffers.
+ sax.MAX_BUFFER_LENGTH = 64 * 1024
-Object.defineProperties(Response.prototype, {
- url: { enumerable: true },
- status: { enumerable: true },
- ok: { enumerable: true },
- redirected: { enumerable: true },
- statusText: { enumerable: true },
- headers: { enumerable: true },
- clone: { enumerable: true }
-});
-
-Object.defineProperty(Response.prototype, Symbol.toStringTag, {
- value: 'Response',
- writable: false,
- enumerable: false,
- configurable: true
-});
-
-const INTERNALS$2 = Symbol('Request internals');
-const URL = Url.URL || whatwgUrl.URL;
+ var buffers = [
+ 'comment', 'sgmlDecl', 'textNode', 'tagName', 'doctype',
+ 'procInstName', 'procInstBody', 'entity', 'attribName',
+ 'attribValue', 'cdata', 'script'
+ ]
-// fix an issue where "format", "parse" aren't a named export for node <10
-const parse_url = Url.parse;
-const format_url = Url.format;
+ sax.EVENTS = [
+ 'text',
+ 'processinginstruction',
+ 'sgmldeclaration',
+ 'doctype',
+ 'comment',
+ 'opentagstart',
+ 'attribute',
+ 'opentag',
+ 'closetag',
+ 'opencdata',
+ 'cdata',
+ 'closecdata',
+ 'error',
+ 'end',
+ 'ready',
+ 'script',
+ 'opennamespace',
+ 'closenamespace'
+ ]
-/**
- * Wrapper around `new URL` to handle arbitrary URLs
- *
- * @param {string} urlStr
- * @return {void}
- */
-function parseURL(urlStr) {
- /*
- Check whether the URL is absolute or not
- Scheme: https://tools.ietf.org/html/rfc3986#section-3.1
- Absolute URL: https://tools.ietf.org/html/rfc3986#section-4.3
- */
- if (/^[a-zA-Z][a-zA-Z\d+\-.]*:/.exec(urlStr)) {
- urlStr = new URL(urlStr).toString();
- }
+ function SAXParser (strict, opt) {
+ if (!(this instanceof SAXParser)) {
+ return new SAXParser(strict, opt)
+ }
- // Fallback to old implementation for arbitrary URLs
- return parse_url(urlStr);
-}
+ var parser = this
+ clearBuffers(parser)
+ parser.q = parser.c = ''
+ parser.bufferCheckPosition = sax.MAX_BUFFER_LENGTH
+ parser.opt = opt || {}
+ parser.opt.lowercase = parser.opt.lowercase || parser.opt.lowercasetags
+ parser.looseCase = parser.opt.lowercase ? 'toLowerCase' : 'toUpperCase'
+ parser.tags = []
+ parser.closed = parser.closedRoot = parser.sawRoot = false
+ parser.tag = parser.error = null
+ parser.strict = !!strict
+ parser.noscript = !!(strict || parser.opt.noscript)
+ parser.state = S.BEGIN
+ parser.strictEntities = parser.opt.strictEntities
+ parser.ENTITIES = parser.strictEntities ? Object.create(sax.XML_ENTITIES) : Object.create(sax.ENTITIES)
+ parser.attribList = []
-const streamDestructionSupported = 'destroy' in Stream.Readable.prototype;
+ // namespaces form a prototype chain.
+ // it always points at the current tag,
+ // which protos to its parent tag.
+ if (parser.opt.xmlns) {
+ parser.ns = Object.create(rootNS)
+ }
-/**
- * Check if a value is an instance of Request.
- *
- * @param Mixed input
- * @return Boolean
- */
-function isRequest(input) {
- return typeof input === 'object' && typeof input[INTERNALS$2] === 'object';
-}
+ // mostly just for error reporting
+ parser.trackPosition = parser.opt.position !== false
+ if (parser.trackPosition) {
+ parser.position = parser.line = parser.column = 0
+ }
+ emit(parser, 'onready')
+ }
-function isAbortSignal(signal) {
- const proto = signal && typeof signal === 'object' && Object.getPrototypeOf(signal);
- return !!(proto && proto.constructor.name === 'AbortSignal');
-}
+ if (!Object.create) {
+ Object.create = function (o) {
+ function F () {}
+ F.prototype = o
+ var newf = new F()
+ return newf
+ }
+ }
-/**
- * Request class
- *
- * @param Mixed input Url or Request instance
- * @param Object init Custom options
- * @return Void
- */
-class Request {
- constructor(input) {
- let init = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
+ if (!Object.keys) {
+ Object.keys = function (o) {
+ var a = []
+ for (var i in o) if (o.hasOwnProperty(i)) a.push(i)
+ return a
+ }
+ }
- let parsedURL;
+ function checkBufferLength (parser) {
+ var maxAllowed = Math.max(sax.MAX_BUFFER_LENGTH, 10)
+ var maxActual = 0
+ for (var i = 0, l = buffers.length; i < l; i++) {
+ var len = parser[buffers[i]].length
+ if (len > maxAllowed) {
+ // Text/cdata nodes can get big, and since they're buffered,
+ // we can get here under normal conditions.
+ // Avoid issues by emitting the text node now,
+ // so at least it won't get any bigger.
+ switch (buffers[i]) {
+ case 'textNode':
+ closeText(parser)
+ break
- // normalize input
- if (!isRequest(input)) {
- if (input && input.href) {
- // in order to support Node.js' Url objects; though WHATWG's URL objects
- // will fall into this branch also (since their `toString()` will return
- // `href` property anyway)
- parsedURL = parseURL(input.href);
- } else {
- // coerce input to a string before attempting to parse
- parsedURL = parseURL(`${input}`);
- }
- input = {};
- } else {
- parsedURL = parseURL(input.url);
- }
+ case 'cdata':
+ emitNode(parser, 'oncdata', parser.cdata)
+ parser.cdata = ''
+ break
- let method = init.method || input.method || 'GET';
- method = method.toUpperCase();
+ case 'script':
+ emitNode(parser, 'onscript', parser.script)
+ parser.script = ''
+ break
- if ((init.body != null || isRequest(input) && input.body !== null) && (method === 'GET' || method === 'HEAD')) {
- throw new TypeError('Request with GET/HEAD method cannot have body');
- }
+ default:
+ error(parser, 'Max buffer length exceeded: ' + buffers[i])
+ }
+ }
+ maxActual = Math.max(maxActual, len)
+ }
+ // schedule the next check for the earliest possible buffer overrun.
+ var m = sax.MAX_BUFFER_LENGTH - maxActual
+ parser.bufferCheckPosition = m + parser.position
+ }
- let inputBody = init.body != null ? init.body : isRequest(input) && input.body !== null ? clone(input) : null;
+ function clearBuffers (parser) {
+ for (var i = 0, l = buffers.length; i < l; i++) {
+ parser[buffers[i]] = ''
+ }
+ }
- Body.call(this, inputBody, {
- timeout: init.timeout || input.timeout || 0,
- size: init.size || input.size || 0
- });
+ function flushBuffers (parser) {
+ closeText(parser)
+ if (parser.cdata !== '') {
+ emitNode(parser, 'oncdata', parser.cdata)
+ parser.cdata = ''
+ }
+ if (parser.script !== '') {
+ emitNode(parser, 'onscript', parser.script)
+ parser.script = ''
+ }
+ }
- const headers = new Headers(init.headers || input.headers || {});
+ SAXParser.prototype = {
+ end: function () { end(this) },
+ write: write,
+ resume: function () { this.error = null; return this },
+ close: function () { return this.write(null) },
+ flush: function () { flushBuffers(this) }
+ }
- if (inputBody != null && !headers.has('Content-Type')) {
- const contentType = extractContentType(inputBody);
- if (contentType) {
- headers.append('Content-Type', contentType);
- }
- }
+ var Stream
+ try {
+ Stream = (__nccwpck_require__(2781).Stream)
+ } catch (ex) {
+ Stream = function () {}
+ }
+ if (!Stream) Stream = function () {}
- let signal = isRequest(input) ? input.signal : null;
- if ('signal' in init) signal = init.signal;
+ var streamWraps = sax.EVENTS.filter(function (ev) {
+ return ev !== 'error' && ev !== 'end'
+ })
- if (signal != null && !isAbortSignal(signal)) {
- throw new TypeError('Expected signal to be an instanceof AbortSignal');
- }
+ function createStream (strict, opt) {
+ return new SAXStream(strict, opt)
+ }
- this[INTERNALS$2] = {
- method,
- redirect: init.redirect || input.redirect || 'follow',
- headers,
- parsedURL,
- signal
- };
+ function SAXStream (strict, opt) {
+ if (!(this instanceof SAXStream)) {
+ return new SAXStream(strict, opt)
+ }
- // node-fetch-only options
- this.follow = init.follow !== undefined ? init.follow : input.follow !== undefined ? input.follow : 20;
- this.compress = init.compress !== undefined ? init.compress : input.compress !== undefined ? input.compress : true;
- this.counter = init.counter || input.counter || 0;
- this.agent = init.agent || input.agent;
- }
+ Stream.apply(this)
- get method() {
- return this[INTERNALS$2].method;
- }
+ this._parser = new SAXParser(strict, opt)
+ this.writable = true
+ this.readable = true
- get url() {
- return format_url(this[INTERNALS$2].parsedURL);
- }
+ var me = this
- get headers() {
- return this[INTERNALS$2].headers;
- }
+ this._parser.onend = function () {
+ me.emit('end')
+ }
- get redirect() {
- return this[INTERNALS$2].redirect;
- }
+ this._parser.onerror = function (er) {
+ me.emit('error', er)
- get signal() {
- return this[INTERNALS$2].signal;
- }
+ // if didn't throw, then means error was handled.
+ // go ahead and clear error, so we can write again.
+ me._parser.error = null
+ }
- /**
- * Clone this request
- *
- * @return Request
- */
- clone() {
- return new Request(this);
- }
-}
+ this._decoder = null
-Body.mixIn(Request.prototype);
+ streamWraps.forEach(function (ev) {
+ Object.defineProperty(me, 'on' + ev, {
+ get: function () {
+ return me._parser['on' + ev]
+ },
+ set: function (h) {
+ if (!h) {
+ me.removeAllListeners(ev)
+ me._parser['on' + ev] = h
+ return h
+ }
+ me.on(ev, h)
+ },
+ enumerable: true,
+ configurable: false
+ })
+ })
+ }
-Object.defineProperty(Request.prototype, Symbol.toStringTag, {
- value: 'Request',
- writable: false,
- enumerable: false,
- configurable: true
-});
+ SAXStream.prototype = Object.create(Stream.prototype, {
+ constructor: {
+ value: SAXStream
+ }
+ })
-Object.defineProperties(Request.prototype, {
- method: { enumerable: true },
- url: { enumerable: true },
- headers: { enumerable: true },
- redirect: { enumerable: true },
- clone: { enumerable: true },
- signal: { enumerable: true }
-});
+ SAXStream.prototype.write = function (data) {
+ if (typeof Buffer === 'function' &&
+ typeof Buffer.isBuffer === 'function' &&
+ Buffer.isBuffer(data)) {
+ if (!this._decoder) {
+ var SD = (__nccwpck_require__(1576).StringDecoder)
+ this._decoder = new SD('utf8')
+ }
+ data = this._decoder.write(data)
+ }
-/**
- * Convert a Request to Node.js http request options.
- *
- * @param Request A Request instance
- * @return Object The options object to be passed to http.request
- */
-function getNodeRequestOptions(request) {
- const parsedURL = request[INTERNALS$2].parsedURL;
- const headers = new Headers(request[INTERNALS$2].headers);
+ this._parser.write(data.toString())
+ this.emit('data', data)
+ return true
+ }
- // fetch step 1.3
- if (!headers.has('Accept')) {
- headers.set('Accept', '*/*');
- }
+ SAXStream.prototype.end = function (chunk) {
+ if (chunk && chunk.length) {
+ this.write(chunk)
+ }
+ this._parser.end()
+ return true
+ }
- // Basic fetch
- if (!parsedURL.protocol || !parsedURL.hostname) {
- throw new TypeError('Only absolute URLs are supported');
- }
+ SAXStream.prototype.on = function (ev, handler) {
+ var me = this
+ if (!me._parser['on' + ev] && streamWraps.indexOf(ev) !== -1) {
+ me._parser['on' + ev] = function () {
+ var args = arguments.length === 1 ? [arguments[0]] : Array.apply(null, arguments)
+ args.splice(0, 0, ev)
+ me.emit.apply(me, args)
+ }
+ }
- if (!/^https?:$/.test(parsedURL.protocol)) {
- throw new TypeError('Only HTTP(S) protocols are supported');
- }
+ return Stream.prototype.on.call(me, ev, handler)
+ }
- if (request.signal && request.body instanceof Stream.Readable && !streamDestructionSupported) {
- throw new Error('Cancellation of streamed requests with AbortSignal is not supported in node < 8');
- }
+ // this really needs to be replaced with character classes.
+ // XML allows all manner of ridiculous numbers and digits.
+ var CDATA = '[CDATA['
+ var DOCTYPE = 'DOCTYPE'
+ var XML_NAMESPACE = 'http://www.w3.org/XML/1998/namespace'
+ var XMLNS_NAMESPACE = 'http://www.w3.org/2000/xmlns/'
+ var rootNS = { xml: XML_NAMESPACE, xmlns: XMLNS_NAMESPACE }
- // HTTP-network-or-cache fetch steps 2.4-2.7
- let contentLengthValue = null;
- if (request.body == null && /^(POST|PUT)$/i.test(request.method)) {
- contentLengthValue = '0';
- }
- if (request.body != null) {
- const totalBytes = getTotalBytes(request);
- if (typeof totalBytes === 'number') {
- contentLengthValue = String(totalBytes);
- }
- }
- if (contentLengthValue) {
- headers.set('Content-Length', contentLengthValue);
- }
+ // http://www.w3.org/TR/REC-xml/#NT-NameStartChar
+ // This implementation works on strings, a single character at a time
+ // as such, it cannot ever support astral-plane characters (10000-EFFFF)
+ // without a significant breaking change to either this parser, or the
+ // JavaScript language. Implementation of an emoji-capable xml parser
+ // is left as an exercise for the reader.
+ var nameStart = /[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/
- // HTTP-network-or-cache fetch step 2.11
- if (!headers.has('User-Agent')) {
- headers.set('User-Agent', 'node-fetch/1.0 (+https://github.com/bitinn/node-fetch)');
- }
+ var nameBody = /[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/
- // HTTP-network-or-cache fetch step 2.15
- if (request.compress && !headers.has('Accept-Encoding')) {
- headers.set('Accept-Encoding', 'gzip,deflate');
- }
+ var entityStart = /[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/
+ var entityBody = /[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/
- let agent = request.agent;
- if (typeof agent === 'function') {
- agent = agent(parsedURL);
- }
+ function isWhitespace (c) {
+ return c === ' ' || c === '\n' || c === '\r' || c === '\t'
+ }
- // HTTP-network fetch step 4.2
- // chunked encoding is handled by Node.js
+ function isQuote (c) {
+ return c === '"' || c === '\''
+ }
- return Object.assign({}, parsedURL, {
- method: request.method,
- headers: exportNodeCompatibleHeaders(headers),
- agent
- });
-}
+ function isAttribEnd (c) {
+ return c === '>' || isWhitespace(c)
+ }
-/**
- * abort-error.js
- *
- * AbortError interface for cancelled requests
- */
+ function isMatch (regex, c) {
+ return regex.test(c)
+ }
-/**
- * Create AbortError instance
- *
- * @param String message Error message for human
- * @return AbortError
- */
-function AbortError(message) {
- Error.call(this, message);
+ function notMatch (regex, c) {
+ return !isMatch(regex, c)
+ }
- this.type = 'aborted';
- this.message = message;
+ var S = 0
+ sax.STATE = {
+ BEGIN: S++, // leading byte order mark or whitespace
+ BEGIN_WHITESPACE: S++, // leading whitespace
+ TEXT: S++, // general stuff
+ TEXT_ENTITY: S++, // & and such.
+ OPEN_WAKA: S++, // <
+ SGML_DECL: S++, //
+ SCRIPT: S++, //