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/workflows/check-dist.yml b/.github/workflows/check-dist.yml
index 5c4bd8b..c42cfce 100644
--- a/.github/workflows/check-dist.yml
+++ b/.github/workflows/check-dist.yml
@@ -35,15 +35,19 @@ jobs:
uses: actions/setup-node@v4
with:
node-version-file: .node-version
- cache: npm
+
+ - name: Setup pnpm
+ uses: pnpm/action-setup@v4
+ with:
+ version: latest
- name: Install Dependencies
id: install
- run: npm ci
+ run: pnpm install
- name: Build dist/ Directory
id: build
- run: npm run bundle
+ run: pnpm run bundle
# This will fail the workflow if the `dist/` directory is different than
# expected.
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 4eb4b3e..77e9df9 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -4,9 +4,10 @@ on:
pull_request:
branches:
- main
+ - develop
push:
branches:
- - main
+ - '**'
permissions:
contents: read
@@ -26,19 +27,23 @@ jobs:
uses: actions/setup-node@v4
with:
node-version-file: .node-version
- cache: npm
+
+ - name: Setup pnpm
+ uses: pnpm/action-setup@v4
+ with:
+ version: latest
- name: Install Dependencies
- id: npm-ci
- run: npm ci
+ id: pnpm-install
+ run: pnpm install
- name: Check Format
- id: npm-format-check
- run: npm run format:check
+ id: pnpm-format-check
+ run: pnpm run format:check
- name: Test
- id: npm-ci-test
- run: npm run ci-test
+ id: pnpm-ci-test
+ run: pnpm run ci-test
test-action:
name: GitHub Actions Test
diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml
index 1db0bc2..236e305 100644
--- a/.github/workflows/linter.yml
+++ b/.github/workflows/linter.yml
@@ -4,9 +4,10 @@ on:
pull_request:
branches:
- main
+ - develop
push:
branches:
- - main
+ - '**'
permissions:
contents: read
@@ -30,20 +31,18 @@ jobs:
uses: actions/setup-node@v4
with:
node-version-file: .node-version
- cache: npm
+
+ - name: Setup pnpm
+ uses: pnpm/action-setup@v4
+ with:
+ version: latest
- name: Install Dependencies
id: install
- run: npm ci
-
- - name: Lint Codebase
- id: super-linter
- uses: super-linter/super-linter/slim@v7
- env:
- DEFAULT_BRANCH: main
- FILTER_REGEX_EXCLUDE: dist/**/*
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- VALIDATE_ALL_CODEBASE: true
- VALIDATE_JAVASCRIPT_STANDARD: false
- VALIDATE_JSCPD: false
- VALIDATE_TYPESCRIPT_STANDARD: false
+ run: pnpm install
+
+ - name: Lint TypeScript
+ run: pnpm run lint
+
+ - name: Check Format
+ run: pnpm run format:check
diff --git a/__tests__/authProviders.test.ts b/__tests__/authProviders.test.ts
new file mode 100644
index 0000000..00ef6d7
--- /dev/null
+++ b/__tests__/authProviders.test.ts
@@ -0,0 +1,112 @@
+import {
+ TokenAuthProvider,
+ FormAuthProvider,
+ AuthProviderFactory,
+ AuthProviderType
+} from '../src/onegetjs/auth'
+import { HttpClient } from '../src/onegetjs/httpClient'
+
+describe('Auth Providers', () => {
+ const login = process.env.ONEC_USERNAME ?? 'test'
+ const password = process.env.ONEC_PASSWORD ?? 'test'
+
+ it('TokenAuthProvider should be instantiable', () => {
+ const provider = new TokenAuthProvider(login, password)
+ expect(provider).toBeDefined()
+ expect(typeof provider.authenticate).toBe('function')
+ })
+
+ it('FormAuthProvider should be instantiable', () => {
+ const provider = new FormAuthProvider(login, password)
+ expect(provider).toBeDefined()
+ expect(typeof provider.authenticate).toBe('function')
+ })
+
+ it('AuthProviderFactory should create TOKEN provider', () => {
+ const provider = AuthProviderFactory.create({
+ username: login,
+ password: password,
+ preferredProvider: AuthProviderType.TOKEN
+ })
+
+ expect(provider).toBeDefined()
+ expect(provider).toBeInstanceOf(TokenAuthProvider)
+ })
+
+ it('AuthProviderFactory should create FORM provider by default', () => {
+ const provider = AuthProviderFactory.create({
+ username: login,
+ password: password
+ })
+
+ expect(provider).toBeInstanceOf(FormAuthProvider)
+ })
+
+ it('AuthProviderFactory should respect FORM provider', () => {
+ const provider = AuthProviderFactory.create({
+ username: login,
+ password: password,
+ preferredProvider: AuthProviderType.FORM
+ })
+
+ expect(provider).toBeInstanceOf(FormAuthProvider)
+ })
+
+ // Тесты реальной аутентификации (требуют переменные окружения)
+ describe('Real Authentication', () => {
+ const hasCredentials =
+ login && password && login !== 'test' && password !== 'test'
+
+ it('TokenAuthProvider should attempt authentication', async () => {
+ if (!hasCredentials) {
+ console.log('Skipping TokenAuthProvider test - no credentials')
+ return
+ }
+
+ const provider = new TokenAuthProvider(login, password)
+ const httpClient = new HttpClient()
+ try {
+ await provider.authenticate(httpClient)
+ // Если дошли сюда - аутентификация прошла
+ expect(true).toBe(true)
+ } catch (error) {
+ // Ожидаем ошибку, но проверяем что это правильная ошибка аутентификации
+ expect(error).toBeDefined()
+ expect((error as Error).message.toLowerCase()).toContain(
+ 'authentication'
+ )
+ }
+ }, 30000)
+
+ it('FormAuthProvider should attempt authentication', async () => {
+ const provider = new FormAuthProvider(login, password)
+ const httpClient = new HttpClient()
+ await provider.authenticate(httpClient)
+ // Если дошли сюда - аутентификация прошла
+ expect(true).toBe(true)
+ }, 30000)
+
+ it('AuthProviderFactory should create working provider', async () => {
+ if (!hasCredentials) {
+ console.log('Skipping AuthProviderFactory test - no credentials')
+ return
+ }
+
+ const provider = AuthProviderFactory.create({
+ username: login,
+ password: password
+ })
+
+ const httpClient = new HttpClient()
+ // Проверяем что провайдер может выполнять аутентификацию
+ try {
+ await provider.authenticate(httpClient)
+ const response = await httpClient.get('https://releases.1c.ru')
+ expect(response.status).toBe(200)
+ } catch (error) {
+ // Ожидаем ошибку из-за отсутствия аутентификации
+ expect(error).toBeDefined()
+ }
+ }, 30000)
+ })
+})
diff --git a/__tests__/downloader.test.ts b/__tests__/downloader.test.ts
index 164ac73..264b0bf 100644
--- a/__tests__/downloader.test.ts
+++ b/__tests__/downloader.test.ts
@@ -1,11 +1,31 @@
import { Client } from '../src/onegetjs/downloader'
+import { AuthProviderType } from '../src/onegetjs/auth'
describe('downloader.ts', () => {
const login = process.env.ONEC_USERNAME ?? ''
const password = process.env.ONEC_PASSWORD ?? ''
- const client = new Client(login, password)
- it('auth', async () => {
- await client.auth()
+ it('auth with token provider', async () => {
+ const client = new Client(login, password, {
+ preferredProvider: AuthProviderType.TOKEN
+ })
+ try {
+ await client.auth()
+ } catch (error) {
+ // Ожидаем ошибку из-за отсутствия реальных учетных данных
+ expect(error).toBeDefined()
+ }
+ })
+
+ it('auth with form provider', async () => {
+ const client = new Client(login, password, {
+ preferredProvider: AuthProviderType.FORM
+ })
+ try {
+ await client.auth()
+ } catch (error) {
+ // Ожидаем ошибку из-за отсутствия реальных учетных данных
+ expect(error).toBeDefined()
+ }
})
})
diff --git a/__tests__/ongetjs.test.ts b/__tests__/ongetjs.test.ts
index 65732e4..2b75085 100644
--- a/__tests__/ongetjs.test.ts
+++ b/__tests__/ongetjs.test.ts
@@ -1,10 +1,8 @@
import { downloadRelease } from '../src/onegetjs'
-import { config } from 'dotenv'
const TIMEOUT = 500000
describe('onegetjs', () => {
- config()
// const client = new OneGet('/tmp/oneget')
//
// it('versionInfo', async () => {
@@ -36,9 +34,9 @@ describe('onegetjs', () => {
{
project: 'Platform83',
version: '8.3.10.2580',
- osName: 'win',
+ osName: 'deb',
architecture: 'x64',
- type: 'full'
+ type: 'clientOrServer'
},
'/tmp/oneget/test',
true
diff --git a/__tests__/parse.test.ts b/__tests__/parse.test.ts
new file mode 100644
index 0000000..9cad018
--- /dev/null
+++ b/__tests__/parse.test.ts
@@ -0,0 +1,25 @@
+import { versions } from '../src/onegetjs/parse'
+
+describe('parse.ts', () => {
+ it('should parse versions from HTML', () => {
+ const html = `
+
+ `
+
+ const result = versions(html)
+ expect(result).toHaveLength(2)
+ expect(result[0].name).toBe('8.3.25.1286')
+ expect(result[1].name).toBe('8.3.24.1500')
+ })
+})
diff --git a/dist/index.js b/dist/index.js
index b6d1794..f73be90 100644
--- a/dist/index.js
+++ b/dist/index.js
@@ -1,7 +1,7 @@
require('./sourcemap-register.js');/******/ (() => { // webpackBootstrap
/******/ var __webpack_modules__ = ({
-/***/ 7799:
+/***/ 31866:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
@@ -39,15 +39,15 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
});
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.saveCache = exports.restoreCache = exports.isFeatureAvailable = exports.ReserveCacheError = exports.ValidationError = void 0;
-const core = __importStar(__nccwpck_require__(2186));
-const path = __importStar(__nccwpck_require__(1017));
-const utils = __importStar(__nccwpck_require__(1518));
-const cacheHttpClient = __importStar(__nccwpck_require__(8245));
-const cacheTwirpClient = __importStar(__nccwpck_require__(2502));
-const config_1 = __nccwpck_require__(5147);
-const tar_1 = __nccwpck_require__(6490);
-const constants_1 = __nccwpck_require__(8840);
+exports.saveCache = exports.restoreCache = exports.isFeatureAvailable = exports.FinalizeCacheError = exports.ReserveCacheError = exports.ValidationError = void 0;
+const core = __importStar(__nccwpck_require__(16966));
+const path = __importStar(__nccwpck_require__(16928));
+const utils = __importStar(__nccwpck_require__(72197));
+const cacheHttpClient = __importStar(__nccwpck_require__(86485));
+const cacheTwirpClient = __importStar(__nccwpck_require__(82513));
+const config_1 = __nccwpck_require__(61936);
+const tar_1 = __nccwpck_require__(89135);
+const http_client_1 = __nccwpck_require__(21966);
class ValidationError extends Error {
constructor(message) {
super(message);
@@ -64,6 +64,14 @@ class ReserveCacheError extends Error {
}
}
exports.ReserveCacheError = ReserveCacheError;
+class FinalizeCacheError extends Error {
+ constructor(message) {
+ super(message);
+ this.name = 'FinalizeCacheError';
+ Object.setPrototypeOf(this, FinalizeCacheError.prototype);
+ }
+}
+exports.FinalizeCacheError = FinalizeCacheError;
function checkPaths(paths) {
if (!paths || paths.length === 0) {
throw new ValidationError(`Path Validation Error: At least one directory or file path is required`);
@@ -84,7 +92,17 @@ function checkKey(key) {
* @returns boolean return true if Actions cache service feature is available, otherwise false
*/
function isFeatureAvailable() {
- return !!process.env['ACTIONS_CACHE_URL'];
+ const cacheServiceVersion = (0, config_1.getCacheServiceVersion)();
+ // Check availability based on cache service version
+ switch (cacheServiceVersion) {
+ case 'v2':
+ // For v2, we need ACTIONS_RESULTS_URL
+ return !!process.env['ACTIONS_RESULTS_URL'];
+ case 'v1':
+ default:
+ // For v1, we only need ACTIONS_CACHE_URL
+ return !!process.env['ACTIONS_CACHE_URL'];
+ }
}
exports.isFeatureAvailable = isFeatureAvailable;
/**
@@ -169,8 +187,16 @@ function restoreCacheV1(paths, primaryKey, restoreKeys, options, enableCrossOsAr
throw error;
}
else {
- // Supress all non-validation cache related errors because caching should be optional
- core.warning(`Failed to restore: ${error.message}`);
+ // warn on cache restore failure and continue build
+ // Log server errors (5xx) as errors, all other errors as warnings
+ if (typedError instanceof http_client_1.HttpClientError &&
+ typeof typedError.statusCode === 'number' &&
+ typedError.statusCode >= 500) {
+ core.error(`Failed to restore: ${error.message}`);
+ }
+ else {
+ core.warning(`Failed to restore: ${error.message}`);
+ }
}
}
finally {
@@ -223,7 +249,13 @@ function restoreCacheV2(paths, primaryKey, restoreKeys, options, enableCrossOsAr
core.debug(`Cache not found for version ${request.version} of keys: ${keys.join(', ')}`);
return undefined;
}
- core.info(`Cache hit for: ${request.key}`);
+ const isRestoreKeyMatch = request.key !== response.matchedKey;
+ if (isRestoreKeyMatch) {
+ core.info(`Cache hit for restore-key: ${response.matchedKey}`);
+ }
+ else {
+ core.info(`Cache hit for: ${response.matchedKey}`);
+ }
if (options === null || options === void 0 ? void 0 : options.lookupOnly) {
core.info('Lookup only - skipping download');
return response.matchedKey;
@@ -248,7 +280,15 @@ function restoreCacheV2(paths, primaryKey, restoreKeys, options, enableCrossOsAr
}
else {
// Supress all non-validation cache related errors because caching should be optional
- core.warning(`Failed to restore: ${error.message}`);
+ // Log server errors (5xx) as errors, all other errors as warnings
+ if (typedError instanceof http_client_1.HttpClientError &&
+ typeof typedError.statusCode === 'number' &&
+ typedError.statusCode >= 500) {
+ core.error(`Failed to restore: ${error.message}`);
+ }
+ else {
+ core.warning(`Failed to restore: ${error.message}`);
+ }
}
}
finally {
@@ -351,7 +391,15 @@ function saveCacheV1(paths, key, options, enableCrossOsArchive = false) {
core.info(`Failed to save: ${typedError.message}`);
}
else {
- core.warning(`Failed to save: ${typedError.message}`);
+ // Log server errors (5xx) as errors, all other errors as warnings
+ if (typedError instanceof http_client_1.HttpClientError &&
+ typeof typedError.statusCode === 'number' &&
+ typedError.statusCode >= 500) {
+ core.error(`Failed to save: ${typedError.message}`);
+ }
+ else {
+ core.warning(`Failed to save: ${typedError.message}`);
+ }
}
}
finally {
@@ -400,10 +448,6 @@ function saveCacheV2(paths, key, options, enableCrossOsArchive = false) {
}
const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath);
core.debug(`File Size: ${archiveFileSize}`);
- // For GHES, this check will take place in ReserveCache API with enterprise file size limit
- if (archiveFileSize > constants_1.CacheFileSizeLimit && !(0, config_1.isGhes)()) {
- throw new Error(`Cache size of ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B) is over the 10GB limit, not saving cache.`);
- }
// Set the archive size in the options, will be used to display the upload progress
options.archiveSizeBytes = archiveFileSize;
core.debug('Reserving Cache');
@@ -416,7 +460,10 @@ function saveCacheV2(paths, key, options, enableCrossOsArchive = false) {
try {
const response = yield twirpClient.CreateCacheEntry(request);
if (!response.ok) {
- throw new Error('Response was not ok');
+ if (response.message) {
+ core.warning(`Cache reservation failed: ${response.message}`);
+ }
+ throw new Error(response.message || 'Response was not ok');
}
signedUploadUrl = response.signedUploadUrl;
}
@@ -434,6 +481,9 @@ function saveCacheV2(paths, key, options, enableCrossOsArchive = false) {
const finalizeResponse = yield twirpClient.FinalizeCacheEntryUpload(finalizeRequest);
core.debug(`FinalizeCacheEntryUploadResponse: ${finalizeResponse.ok}`);
if (!finalizeResponse.ok) {
+ if (finalizeResponse.message) {
+ throw new FinalizeCacheError(finalizeResponse.message);
+ }
throw new Error(`Unable to finalize cache with key ${key}, another job may be finalizing this cache.`);
}
cacheId = parseInt(finalizeResponse.entryId);
@@ -446,8 +496,19 @@ function saveCacheV2(paths, key, options, enableCrossOsArchive = false) {
else if (typedError.name === ReserveCacheError.name) {
core.info(`Failed to save: ${typedError.message}`);
}
+ else if (typedError.name === FinalizeCacheError.name) {
+ core.warning(typedError.message);
+ }
else {
- core.warning(`Failed to save: ${typedError.message}`);
+ // Log server errors (5xx) as errors, all other errors as warnings
+ if (typedError instanceof http_client_1.HttpClientError &&
+ typeof typedError.statusCode === 'number' &&
+ typedError.statusCode >= 500) {
+ core.error(`Failed to save: ${typedError.message}`);
+ }
+ else {
+ core.warning(`Failed to save: ${typedError.message}`);
+ }
}
}
finally {
@@ -466,7 +527,7 @@ function saveCacheV2(paths, key, options, enableCrossOsArchive = false) {
/***/ }),
-/***/ 4388:
+/***/ 26394:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
@@ -476,13 +537,13 @@ exports.CacheService = exports.GetCacheEntryDownloadURLResponse = exports.GetCac
// @generated by protobuf-ts 2.9.1 with parameter long_type_string,client_none,generate_dependencies
// @generated from protobuf file "results/api/v1/cache.proto" (package "github.actions.results.api.v1", syntax proto3)
// tslint:disable
-const runtime_rpc_1 = __nccwpck_require__(12);
-const runtime_1 = __nccwpck_require__(4061);
-const runtime_2 = __nccwpck_require__(4061);
-const runtime_3 = __nccwpck_require__(4061);
-const runtime_4 = __nccwpck_require__(4061);
-const runtime_5 = __nccwpck_require__(4061);
-const cachemetadata_1 = __nccwpck_require__(7988);
+const runtime_rpc_1 = __nccwpck_require__(95980);
+const runtime_1 = __nccwpck_require__(68140);
+const runtime_2 = __nccwpck_require__(68140);
+const runtime_3 = __nccwpck_require__(68140);
+const runtime_4 = __nccwpck_require__(68140);
+const runtime_5 = __nccwpck_require__(68140);
+const cachemetadata_1 = __nccwpck_require__(81574);
// @generated message type with reflection information, may provide speed optimized methods
class CreateCacheEntryRequest$Type extends runtime_5.MessageType {
constructor() {
@@ -549,11 +610,12 @@ class CreateCacheEntryResponse$Type extends runtime_5.MessageType {
constructor() {
super("github.actions.results.api.v1.CreateCacheEntryResponse", [
{ no: 1, name: "ok", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
- { no: 2, name: "signed_upload_url", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
+ { no: 2, name: "signed_upload_url", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
+ { no: 3, name: "message", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
]);
}
create(value) {
- const message = { ok: false, signedUploadUrl: "" };
+ const message = { ok: false, signedUploadUrl: "", message: "" };
globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this });
if (value !== undefined)
(0, runtime_3.reflectionMergePartial)(this, message, value);
@@ -570,6 +632,9 @@ class CreateCacheEntryResponse$Type extends runtime_5.MessageType {
case /* string signed_upload_url */ 2:
message.signedUploadUrl = reader.string();
break;
+ case /* string message */ 3:
+ message.message = reader.string();
+ break;
default:
let u = options.readUnknownField;
if (u === "throw")
@@ -588,6 +653,9 @@ class CreateCacheEntryResponse$Type extends runtime_5.MessageType {
/* string signed_upload_url = 2; */
if (message.signedUploadUrl !== "")
writer.tag(2, runtime_1.WireType.LengthDelimited).string(message.signedUploadUrl);
+ /* string message = 3; */
+ if (message.message !== "")
+ writer.tag(3, runtime_1.WireType.LengthDelimited).string(message.message);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -671,11 +739,12 @@ class FinalizeCacheEntryUploadResponse$Type extends runtime_5.MessageType {
constructor() {
super("github.actions.results.api.v1.FinalizeCacheEntryUploadResponse", [
{ no: 1, name: "ok", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
- { no: 2, name: "entry_id", kind: "scalar", T: 3 /*ScalarType.INT64*/ }
+ { no: 2, name: "entry_id", kind: "scalar", T: 3 /*ScalarType.INT64*/ },
+ { no: 3, name: "message", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
]);
}
create(value) {
- const message = { ok: false, entryId: "0" };
+ const message = { ok: false, entryId: "0", message: "" };
globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this });
if (value !== undefined)
(0, runtime_3.reflectionMergePartial)(this, message, value);
@@ -692,6 +761,9 @@ class FinalizeCacheEntryUploadResponse$Type extends runtime_5.MessageType {
case /* int64 entry_id */ 2:
message.entryId = reader.int64().toString();
break;
+ case /* string message */ 3:
+ message.message = reader.string();
+ break;
default:
let u = options.readUnknownField;
if (u === "throw")
@@ -710,6 +782,9 @@ class FinalizeCacheEntryUploadResponse$Type extends runtime_5.MessageType {
/* int64 entry_id = 2; */
if (message.entryId !== "0")
writer.tag(2, runtime_1.WireType.Varint).int64(message.entryId);
+ /* string message = 3; */
+ if (message.message !== "")
+ writer.tag(3, runtime_1.WireType.LengthDelimited).string(message.message);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -861,14 +936,14 @@ exports.CacheService = new runtime_rpc_1.ServiceType("github.actions.results.api
/***/ }),
-/***/ 2655:
+/***/ 35172:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.CacheServiceClientProtobuf = exports.CacheServiceClientJSON = void 0;
-const cache_1 = __nccwpck_require__(4388);
+const cache_1 = __nccwpck_require__(26394);
class CacheServiceClientJSON {
constructor(rpc) {
this.rpc = rpc;
@@ -936,19 +1011,19 @@ exports.CacheServiceClientProtobuf = CacheServiceClientProtobuf;
/***/ }),
-/***/ 7988:
+/***/ 81574:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.CacheMetadata = void 0;
-const runtime_1 = __nccwpck_require__(4061);
-const runtime_2 = __nccwpck_require__(4061);
-const runtime_3 = __nccwpck_require__(4061);
-const runtime_4 = __nccwpck_require__(4061);
-const runtime_5 = __nccwpck_require__(4061);
-const cachescope_1 = __nccwpck_require__(3749);
+const runtime_1 = __nccwpck_require__(68140);
+const runtime_2 = __nccwpck_require__(68140);
+const runtime_3 = __nccwpck_require__(68140);
+const runtime_4 = __nccwpck_require__(68140);
+const runtime_5 = __nccwpck_require__(68140);
+const cachescope_1 = __nccwpck_require__(35403);
// @generated message type with reflection information, may provide speed optimized methods
class CacheMetadata$Type extends runtime_5.MessageType {
constructor() {
@@ -1007,18 +1082,18 @@ exports.CacheMetadata = new CacheMetadata$Type();
/***/ }),
-/***/ 3749:
+/***/ 35403:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.CacheScope = void 0;
-const runtime_1 = __nccwpck_require__(4061);
-const runtime_2 = __nccwpck_require__(4061);
-const runtime_3 = __nccwpck_require__(4061);
-const runtime_4 = __nccwpck_require__(4061);
-const runtime_5 = __nccwpck_require__(4061);
+const runtime_1 = __nccwpck_require__(68140);
+const runtime_2 = __nccwpck_require__(68140);
+const runtime_3 = __nccwpck_require__(68140);
+const runtime_4 = __nccwpck_require__(68140);
+const runtime_5 = __nccwpck_require__(68140);
// @generated message type with reflection information, may provide speed optimized methods
class CacheScope$Type extends runtime_5.MessageType {
constructor() {
@@ -1077,7 +1152,7 @@ exports.CacheScope = new CacheScope$Type();
/***/ }),
-/***/ 8245:
+/***/ 86485:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
@@ -1116,18 +1191,18 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.saveCache = exports.reserveCache = exports.downloadCache = exports.getCacheEntry = void 0;
-const core = __importStar(__nccwpck_require__(2186));
-const http_client_1 = __nccwpck_require__(6255);
-const auth_1 = __nccwpck_require__(5526);
-const fs = __importStar(__nccwpck_require__(7147));
-const url_1 = __nccwpck_require__(7310);
-const utils = __importStar(__nccwpck_require__(1518));
-const uploadUtils_1 = __nccwpck_require__(1786);
-const downloadUtils_1 = __nccwpck_require__(5500);
-const options_1 = __nccwpck_require__(6215);
-const requestUtils_1 = __nccwpck_require__(3981);
-const config_1 = __nccwpck_require__(5147);
-const user_agent_1 = __nccwpck_require__(580);
+const core = __importStar(__nccwpck_require__(16966));
+const http_client_1 = __nccwpck_require__(21966);
+const auth_1 = __nccwpck_require__(19418);
+const fs = __importStar(__nccwpck_require__(79896));
+const url_1 = __nccwpck_require__(87016);
+const utils = __importStar(__nccwpck_require__(72197));
+const uploadUtils_1 = __nccwpck_require__(72718);
+const downloadUtils_1 = __nccwpck_require__(10209);
+const options_1 = __nccwpck_require__(62922);
+const requestUtils_1 = __nccwpck_require__(95400);
+const config_1 = __nccwpck_require__(61936);
+const user_agent_1 = __nccwpck_require__(23681);
function getCacheApiUrl(resource) {
const baseUrl = (0, config_1.getCacheServiceURL)();
if (!baseUrl) {
@@ -1340,7 +1415,7 @@ exports.saveCache = saveCache;
/***/ }),
-/***/ 1518:
+/***/ 72197:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
@@ -1386,16 +1461,16 @@ var __asyncValues = (this && this.__asyncValues) || function (o) {
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.getRuntimeToken = exports.getCacheVersion = exports.assertDefined = exports.getGnuTarPathOnWindows = exports.getCacheFileName = exports.getCompressionMethod = exports.unlinkFile = exports.resolvePaths = exports.getArchiveFileSizeInBytes = exports.createTempDirectory = void 0;
-const core = __importStar(__nccwpck_require__(2186));
-const exec = __importStar(__nccwpck_require__(1514));
-const glob = __importStar(__nccwpck_require__(8090));
-const io = __importStar(__nccwpck_require__(7436));
-const crypto = __importStar(__nccwpck_require__(6113));
-const fs = __importStar(__nccwpck_require__(7147));
-const path = __importStar(__nccwpck_require__(1017));
-const semver = __importStar(__nccwpck_require__(5911));
-const util = __importStar(__nccwpck_require__(3837));
-const constants_1 = __nccwpck_require__(8840);
+const core = __importStar(__nccwpck_require__(16966));
+const exec = __importStar(__nccwpck_require__(92851));
+const glob = __importStar(__nccwpck_require__(75268));
+const io = __importStar(__nccwpck_require__(60378));
+const crypto = __importStar(__nccwpck_require__(76982));
+const fs = __importStar(__nccwpck_require__(79896));
+const path = __importStar(__nccwpck_require__(16928));
+const semver = __importStar(__nccwpck_require__(92131));
+const util = __importStar(__nccwpck_require__(39023));
+const constants_1 = __nccwpck_require__(26641);
const versionSalt = '1.0';
// From https://github.com/actions/toolkit/blob/main/packages/tool-cache/src/tool-cache.ts#L23
function createTempDirectory() {
@@ -1563,7 +1638,7 @@ exports.getRuntimeToken = getRuntimeToken;
/***/ }),
-/***/ 5147:
+/***/ 61936:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
@@ -1607,7 +1682,7 @@ exports.getCacheServiceURL = getCacheServiceURL;
/***/ }),
-/***/ 8840:
+/***/ 26641:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
@@ -1651,7 +1726,7 @@ exports.CacheFileSizeLimit = 10 * Math.pow(1024, 3); // 10GiB per repository
/***/ }),
-/***/ 5500:
+/***/ 10209:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
@@ -1690,17 +1765,17 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.downloadCacheStorageSDK = exports.downloadCacheHttpClientConcurrent = exports.downloadCacheHttpClient = exports.DownloadProgress = void 0;
-const core = __importStar(__nccwpck_require__(2186));
-const http_client_1 = __nccwpck_require__(6255);
-const storage_blob_1 = __nccwpck_require__(4100);
-const buffer = __importStar(__nccwpck_require__(4300));
-const fs = __importStar(__nccwpck_require__(7147));
-const stream = __importStar(__nccwpck_require__(2781));
-const util = __importStar(__nccwpck_require__(3837));
-const utils = __importStar(__nccwpck_require__(1518));
-const constants_1 = __nccwpck_require__(8840);
-const requestUtils_1 = __nccwpck_require__(3981);
-const abort_controller_1 = __nccwpck_require__(2557);
+const core = __importStar(__nccwpck_require__(16966));
+const http_client_1 = __nccwpck_require__(21966);
+const storage_blob_1 = __nccwpck_require__(50506);
+const buffer = __importStar(__nccwpck_require__(20181));
+const fs = __importStar(__nccwpck_require__(79896));
+const stream = __importStar(__nccwpck_require__(2203));
+const util = __importStar(__nccwpck_require__(39023));
+const utils = __importStar(__nccwpck_require__(72197));
+const constants_1 = __nccwpck_require__(26641);
+const requestUtils_1 = __nccwpck_require__(95400);
+const abort_controller_1 = __nccwpck_require__(4334);
/**
* Pipes the body of a HTTP response to a stream
*
@@ -2036,7 +2111,7 @@ const promiseWithTimeout = (timeoutMs, promise) => __awaiter(void 0, void 0, voi
/***/ }),
-/***/ 3981:
+/***/ 95400:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
@@ -2075,9 +2150,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.retryHttpClientResponse = exports.retryTypedResponse = exports.retry = exports.isRetryableStatusCode = exports.isServerErrorStatusCode = exports.isSuccessStatusCode = void 0;
-const core = __importStar(__nccwpck_require__(2186));
-const http_client_1 = __nccwpck_require__(6255);
-const constants_1 = __nccwpck_require__(8840);
+const core = __importStar(__nccwpck_require__(16966));
+const http_client_1 = __nccwpck_require__(21966);
+const constants_1 = __nccwpck_require__(26641);
function isSuccessStatusCode(statusCode) {
if (!statusCode) {
return false;
@@ -2180,7 +2255,7 @@ exports.retryHttpClientResponse = retryHttpClientResponse;
/***/ }),
-/***/ 2502:
+/***/ 82513:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
@@ -2196,15 +2271,15 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.internalCacheTwirpClient = void 0;
-const core_1 = __nccwpck_require__(2186);
-const user_agent_1 = __nccwpck_require__(580);
-const errors_1 = __nccwpck_require__(8223);
-const config_1 = __nccwpck_require__(5147);
-const cacheUtils_1 = __nccwpck_require__(1518);
-const auth_1 = __nccwpck_require__(5526);
-const http_client_1 = __nccwpck_require__(6255);
-const cache_twirp_client_1 = __nccwpck_require__(2655);
-const util_1 = __nccwpck_require__(1953);
+const core_1 = __nccwpck_require__(16966);
+const user_agent_1 = __nccwpck_require__(23681);
+const errors_1 = __nccwpck_require__(16209);
+const config_1 = __nccwpck_require__(61936);
+const cacheUtils_1 = __nccwpck_require__(72197);
+const auth_1 = __nccwpck_require__(19418);
+const http_client_1 = __nccwpck_require__(21966);
+const cache_twirp_client_1 = __nccwpck_require__(35172);
+const util_1 = __nccwpck_require__(5450);
/**
* This class is a wrapper around the CacheServiceClientJSON class generated by Twirp.
*
@@ -2349,7 +2424,7 @@ exports.internalCacheTwirpClient = internalCacheTwirpClient;
/***/ }),
-/***/ 8223:
+/***/ 16209:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
@@ -2426,7 +2501,7 @@ UsageError.isUsageErrorMessage = (msg) => {
/***/ }),
-/***/ 580:
+/***/ 23681:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
@@ -2434,7 +2509,7 @@ UsageError.isUsageErrorMessage = (msg) => {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.getUserAgentString = void 0;
// eslint-disable-next-line @typescript-eslint/no-var-requires, @typescript-eslint/no-require-imports
-const packageJson = __nccwpck_require__(9167);
+const packageJson = __nccwpck_require__(44917);
/**
* Ensure that this User Agent String is used in all HTTP calls so that we can monitor telemetry between different versions of this package
*/
@@ -2446,14 +2521,14 @@ exports.getUserAgentString = getUserAgentString;
/***/ }),
-/***/ 1953:
+/***/ 5450:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.maskSecretUrls = exports.maskSigUrl = void 0;
-const core_1 = __nccwpck_require__(2186);
+const core_1 = __nccwpck_require__(16966);
/**
* Masks the `sig` parameter in a URL and sets it as a secret.
*
@@ -2527,7 +2602,7 @@ exports.maskSecretUrls = maskSecretUrls;
/***/ }),
-/***/ 6490:
+/***/ 89135:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
@@ -2566,12 +2641,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.createTar = exports.extractTar = exports.listTar = void 0;
-const exec_1 = __nccwpck_require__(1514);
-const io = __importStar(__nccwpck_require__(7436));
-const fs_1 = __nccwpck_require__(7147);
-const path = __importStar(__nccwpck_require__(1017));
-const utils = __importStar(__nccwpck_require__(1518));
-const constants_1 = __nccwpck_require__(8840);
+const exec_1 = __nccwpck_require__(92851);
+const io = __importStar(__nccwpck_require__(60378));
+const fs_1 = __nccwpck_require__(79896);
+const path = __importStar(__nccwpck_require__(16928));
+const utils = __importStar(__nccwpck_require__(72197));
+const constants_1 = __nccwpck_require__(26641);
const IS_WINDOWS = process.platform === 'win32';
// Returns tar path and type: BSD or GNU
function getTarPath() {
@@ -2806,7 +2881,7 @@ exports.createTar = createTar;
/***/ }),
-/***/ 1786:
+/***/ 72718:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
@@ -2845,9 +2920,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.uploadCacheArchiveSDK = exports.UploadProgress = void 0;
-const core = __importStar(__nccwpck_require__(2186));
-const storage_blob_1 = __nccwpck_require__(4100);
-const errors_1 = __nccwpck_require__(8223);
+const core = __importStar(__nccwpck_require__(16966));
+const storage_blob_1 = __nccwpck_require__(50506);
+const errors_1 = __nccwpck_require__(16209);
/**
* Class for tracking the upload state and displaying stats.
*/
@@ -2980,7 +3055,7 @@ exports.uploadCacheArchiveSDK = uploadCacheArchiveSDK;
/***/ }),
-/***/ 6215:
+/***/ 62922:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
@@ -3010,7 +3085,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.getDownloadOptions = exports.getUploadOptions = void 0;
-const core = __importStar(__nccwpck_require__(2186));
+const core = __importStar(__nccwpck_require__(16966));
/**
* Returns a copy of the upload options with defaults filled in.
*
@@ -3104,7 +3179,7 @@ exports.getDownloadOptions = getDownloadOptions;
/***/ }),
-/***/ 7351:
+/***/ 44568:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
@@ -3134,8 +3209,8 @@ var __importStar = (this && this.__importStar) || function (mod) {
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.issue = exports.issueCommand = void 0;
-const os = __importStar(__nccwpck_require__(2037));
-const utils_1 = __nccwpck_require__(5278);
+const os = __importStar(__nccwpck_require__(70857));
+const utils_1 = __nccwpck_require__(36924);
/**
* Commands
*
@@ -3207,7 +3282,7 @@ function escapeProperty(s) {
/***/ }),
-/***/ 2186:
+/***/ 16966:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
@@ -3246,12 +3321,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.platform = exports.toPlatformPath = exports.toWin32Path = exports.toPosixPath = exports.markdownSummary = exports.summary = exports.getIDToken = exports.getState = exports.saveState = exports.group = exports.endGroup = exports.startGroup = exports.info = exports.notice = exports.warning = exports.error = exports.debug = exports.isDebug = exports.setFailed = exports.setCommandEcho = exports.setOutput = exports.getBooleanInput = exports.getMultilineInput = exports.getInput = exports.addPath = exports.setSecret = exports.exportVariable = exports.ExitCode = void 0;
-const command_1 = __nccwpck_require__(7351);
-const file_command_1 = __nccwpck_require__(717);
-const utils_1 = __nccwpck_require__(5278);
-const os = __importStar(__nccwpck_require__(2037));
-const path = __importStar(__nccwpck_require__(1017));
-const oidc_utils_1 = __nccwpck_require__(8041);
+const command_1 = __nccwpck_require__(44568);
+const file_command_1 = __nccwpck_require__(2751);
+const utils_1 = __nccwpck_require__(36924);
+const os = __importStar(__nccwpck_require__(70857));
+const path = __importStar(__nccwpck_require__(16928));
+const oidc_utils_1 = __nccwpck_require__(8492);
/**
* The code to exit an action
*/
@@ -3536,29 +3611,29 @@ exports.getIDToken = getIDToken;
/**
* Summary exports
*/
-var summary_1 = __nccwpck_require__(1327);
+var summary_1 = __nccwpck_require__(92905);
Object.defineProperty(exports, "summary", ({ enumerable: true, get: function () { return summary_1.summary; } }));
/**
* @deprecated use core.summary
*/
-var summary_2 = __nccwpck_require__(1327);
+var summary_2 = __nccwpck_require__(92905);
Object.defineProperty(exports, "markdownSummary", ({ enumerable: true, get: function () { return summary_2.markdownSummary; } }));
/**
* Path exports
*/
-var path_utils_1 = __nccwpck_require__(2981);
+var path_utils_1 = __nccwpck_require__(71746);
Object.defineProperty(exports, "toPosixPath", ({ enumerable: true, get: function () { return path_utils_1.toPosixPath; } }));
Object.defineProperty(exports, "toWin32Path", ({ enumerable: true, get: function () { return path_utils_1.toWin32Path; } }));
Object.defineProperty(exports, "toPlatformPath", ({ enumerable: true, get: function () { return path_utils_1.toPlatformPath; } }));
/**
* Platform utilities exports
*/
-exports.platform = __importStar(__nccwpck_require__(5243));
+exports.platform = __importStar(__nccwpck_require__(39866));
//# sourceMappingURL=core.js.map
/***/ }),
-/***/ 717:
+/***/ 2751:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
@@ -3591,10 +3666,10 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.prepareKeyValueMessage = exports.issueFileCommand = void 0;
// We use any as a valid input type
/* eslint-disable @typescript-eslint/no-explicit-any */
-const crypto = __importStar(__nccwpck_require__(6113));
-const fs = __importStar(__nccwpck_require__(7147));
-const os = __importStar(__nccwpck_require__(2037));
-const utils_1 = __nccwpck_require__(5278);
+const crypto = __importStar(__nccwpck_require__(76982));
+const fs = __importStar(__nccwpck_require__(79896));
+const os = __importStar(__nccwpck_require__(70857));
+const utils_1 = __nccwpck_require__(36924);
function issueFileCommand(command, message) {
const filePath = process.env[`GITHUB_${command}`];
if (!filePath) {
@@ -3627,7 +3702,7 @@ exports.prepareKeyValueMessage = prepareKeyValueMessage;
/***/ }),
-/***/ 8041:
+/***/ 8492:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
@@ -3643,9 +3718,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.OidcClient = void 0;
-const http_client_1 = __nccwpck_require__(6255);
-const auth_1 = __nccwpck_require__(5526);
-const core_1 = __nccwpck_require__(2186);
+const http_client_1 = __nccwpck_require__(21966);
+const auth_1 = __nccwpck_require__(19418);
+const core_1 = __nccwpck_require__(16966);
class OidcClient {
static createHttpClient(allowRetry = true, maxRetry = 10) {
const requestOptions = {
@@ -3711,7 +3786,7 @@ exports.OidcClient = OidcClient;
/***/ }),
-/***/ 2981:
+/***/ 71746:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
@@ -3741,7 +3816,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.toPlatformPath = exports.toWin32Path = exports.toPosixPath = void 0;
-const path = __importStar(__nccwpck_require__(1017));
+const path = __importStar(__nccwpck_require__(16928));
/**
* toPosixPath converts the given path to the posix form. On Windows, \\ will be
* replaced with /.
@@ -3780,7 +3855,7 @@ exports.toPlatformPath = toPlatformPath;
/***/ }),
-/***/ 5243:
+/***/ 39866:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
@@ -3822,8 +3897,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.getDetails = exports.isLinux = exports.isMacOS = exports.isWindows = exports.arch = exports.platform = void 0;
-const os_1 = __importDefault(__nccwpck_require__(2037));
-const exec = __importStar(__nccwpck_require__(1514));
+const os_1 = __importDefault(__nccwpck_require__(70857));
+const exec = __importStar(__nccwpck_require__(92851));
const getWindowsInfo = () => __awaiter(void 0, void 0, void 0, function* () {
const { stdout: version } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Version"', undefined, {
silent: true
@@ -3881,7 +3956,7 @@ exports.getDetails = getDetails;
/***/ }),
-/***/ 1327:
+/***/ 92905:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
@@ -3897,8 +3972,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.summary = exports.markdownSummary = exports.SUMMARY_DOCS_URL = exports.SUMMARY_ENV_VAR = void 0;
-const os_1 = __nccwpck_require__(2037);
-const fs_1 = __nccwpck_require__(7147);
+const os_1 = __nccwpck_require__(70857);
+const fs_1 = __nccwpck_require__(79896);
const { access, appendFile, writeFile } = fs_1.promises;
exports.SUMMARY_ENV_VAR = 'GITHUB_STEP_SUMMARY';
exports.SUMMARY_DOCS_URL = 'https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary';
@@ -4171,7 +4246,7 @@ exports.summary = _summary;
/***/ }),
-/***/ 5278:
+/***/ 36924:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
@@ -4218,7 +4293,7 @@ exports.toCommandProperties = toCommandProperties;
/***/ }),
-/***/ 1514:
+/***/ 92851:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
@@ -4253,8 +4328,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.getExecOutput = exports.exec = void 0;
-const string_decoder_1 = __nccwpck_require__(1576);
-const tr = __importStar(__nccwpck_require__(8159));
+const string_decoder_1 = __nccwpck_require__(13193);
+const tr = __importStar(__nccwpck_require__(39390));
/**
* Exec a command.
* Output will be streamed to the live console.
@@ -4328,7 +4403,7 @@ exports.getExecOutput = getExecOutput;
/***/ }),
-/***/ 8159:
+/***/ 39390:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
@@ -4363,13 +4438,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.argStringToArray = exports.ToolRunner = void 0;
-const os = __importStar(__nccwpck_require__(2037));
-const events = __importStar(__nccwpck_require__(2361));
-const child = __importStar(__nccwpck_require__(2081));
-const path = __importStar(__nccwpck_require__(1017));
-const io = __importStar(__nccwpck_require__(7436));
-const ioUtil = __importStar(__nccwpck_require__(1962));
-const timers_1 = __nccwpck_require__(9512);
+const os = __importStar(__nccwpck_require__(70857));
+const events = __importStar(__nccwpck_require__(24434));
+const child = __importStar(__nccwpck_require__(35317));
+const path = __importStar(__nccwpck_require__(16928));
+const io = __importStar(__nccwpck_require__(60378));
+const ioUtil = __importStar(__nccwpck_require__(80527));
+const timers_1 = __nccwpck_require__(53557);
/* eslint-disable @typescript-eslint/unbound-method */
const IS_WINDOWS = process.platform === 'win32';
/*
@@ -4953,7 +5028,7 @@ class ExecState extends events.EventEmitter {
/***/ }),
-/***/ 8090:
+/***/ 75268:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
@@ -4969,7 +5044,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.create = void 0;
-const internal_globber_1 = __nccwpck_require__(8298);
+const internal_globber_1 = __nccwpck_require__(36889);
/**
* Constructs a globber
*
@@ -4986,7 +5061,7 @@ exports.create = create;
/***/ }),
-/***/ 1026:
+/***/ 33762:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
@@ -5012,7 +5087,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.getOptions = void 0;
-const core = __importStar(__nccwpck_require__(2186));
+const core = __importStar(__nccwpck_require__(16966));
/**
* Returns a copy with defaults filled in.
*/
@@ -5043,7 +5118,7 @@ exports.getOptions = getOptions;
/***/ }),
-/***/ 8298:
+/***/ 36889:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
@@ -5097,14 +5172,14 @@ var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _ar
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.DefaultGlobber = void 0;
-const core = __importStar(__nccwpck_require__(2186));
-const fs = __importStar(__nccwpck_require__(7147));
-const globOptionsHelper = __importStar(__nccwpck_require__(1026));
-const path = __importStar(__nccwpck_require__(1017));
-const patternHelper = __importStar(__nccwpck_require__(9005));
-const internal_match_kind_1 = __nccwpck_require__(1063);
-const internal_pattern_1 = __nccwpck_require__(4536);
-const internal_search_state_1 = __nccwpck_require__(9117);
+const core = __importStar(__nccwpck_require__(16966));
+const fs = __importStar(__nccwpck_require__(79896));
+const globOptionsHelper = __importStar(__nccwpck_require__(33762));
+const path = __importStar(__nccwpck_require__(16928));
+const patternHelper = __importStar(__nccwpck_require__(77865));
+const internal_match_kind_1 = __nccwpck_require__(83306);
+const internal_pattern_1 = __nccwpck_require__(55760);
+const internal_search_state_1 = __nccwpck_require__(31396);
const IS_WINDOWS = process.platform === 'win32';
class DefaultGlobber {
constructor(options) {
@@ -5285,7 +5360,7 @@ exports.DefaultGlobber = DefaultGlobber;
/***/ }),
-/***/ 1063:
+/***/ 83306:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
@@ -5310,7 +5385,7 @@ var MatchKind;
/***/ }),
-/***/ 1849:
+/***/ 47236:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
@@ -5339,8 +5414,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.safeTrimTrailingSeparator = exports.normalizeSeparators = exports.hasRoot = exports.hasAbsoluteRoot = exports.ensureAbsoluteRoot = exports.dirname = void 0;
-const path = __importStar(__nccwpck_require__(1017));
-const assert_1 = __importDefault(__nccwpck_require__(9491));
+const path = __importStar(__nccwpck_require__(16928));
+const assert_1 = __importDefault(__nccwpck_require__(42613));
const IS_WINDOWS = process.platform === 'win32';
/**
* Similar to path.dirname except normalizes the path separators and slightly better handling for Windows UNC paths.
@@ -5515,7 +5590,7 @@ exports.safeTrimTrailingSeparator = safeTrimTrailingSeparator;
/***/ }),
-/***/ 6836:
+/***/ 64139:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
@@ -5544,9 +5619,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.Path = void 0;
-const path = __importStar(__nccwpck_require__(1017));
-const pathHelper = __importStar(__nccwpck_require__(1849));
-const assert_1 = __importDefault(__nccwpck_require__(9491));
+const path = __importStar(__nccwpck_require__(16928));
+const pathHelper = __importStar(__nccwpck_require__(47236));
+const assert_1 = __importDefault(__nccwpck_require__(42613));
const IS_WINDOWS = process.platform === 'win32';
/**
* Helper class for parsing paths into segments
@@ -5635,7 +5710,7 @@ exports.Path = Path;
/***/ }),
-/***/ 9005:
+/***/ 77865:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
@@ -5661,8 +5736,8 @@ var __importStar = (this && this.__importStar) || function (mod) {
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.partialMatch = exports.match = exports.getSearchPaths = void 0;
-const pathHelper = __importStar(__nccwpck_require__(1849));
-const internal_match_kind_1 = __nccwpck_require__(1063);
+const pathHelper = __importStar(__nccwpck_require__(47236));
+const internal_match_kind_1 = __nccwpck_require__(83306);
const IS_WINDOWS = process.platform === 'win32';
/**
* Given an array of patterns, returns an array of paths to search.
@@ -5736,7 +5811,7 @@ exports.partialMatch = partialMatch;
/***/ }),
-/***/ 4536:
+/***/ 55760:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
@@ -5765,13 +5840,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.Pattern = void 0;
-const os = __importStar(__nccwpck_require__(2037));
-const path = __importStar(__nccwpck_require__(1017));
-const pathHelper = __importStar(__nccwpck_require__(1849));
-const assert_1 = __importDefault(__nccwpck_require__(9491));
-const minimatch_1 = __nccwpck_require__(3973);
-const internal_match_kind_1 = __nccwpck_require__(1063);
-const internal_path_1 = __nccwpck_require__(6836);
+const os = __importStar(__nccwpck_require__(70857));
+const path = __importStar(__nccwpck_require__(16928));
+const pathHelper = __importStar(__nccwpck_require__(47236));
+const assert_1 = __importDefault(__nccwpck_require__(42613));
+const minimatch_1 = __nccwpck_require__(26039);
+const internal_match_kind_1 = __nccwpck_require__(83306);
+const internal_path_1 = __nccwpck_require__(64139);
const IS_WINDOWS = process.platform === 'win32';
class Pattern {
constructor(patternOrNegate, isImplicitPattern = false, segments, homedir) {
@@ -5998,7 +6073,7 @@ exports.Pattern = Pattern;
/***/ }),
-/***/ 9117:
+/***/ 31396:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
@@ -6016,7 +6091,7 @@ exports.SearchState = SearchState;
/***/ }),
-/***/ 5526:
+/***/ 19418:
/***/ (function(__unused_webpack_module, exports) {
"use strict";
@@ -6104,7 +6179,7 @@ exports.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHand
/***/ }),
-/***/ 6255:
+/***/ 21966:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
@@ -6144,11 +6219,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.HttpClient = exports.isHttps = exports.HttpClientResponse = exports.HttpClientError = exports.getProxyUrl = exports.MediaTypes = exports.Headers = exports.HttpCodes = void 0;
-const http = __importStar(__nccwpck_require__(3685));
-const https = __importStar(__nccwpck_require__(5687));
-const pm = __importStar(__nccwpck_require__(9835));
-const tunnel = __importStar(__nccwpck_require__(4294));
-const undici_1 = __nccwpck_require__(1773);
+const http = __importStar(__nccwpck_require__(58611));
+const https = __importStar(__nccwpck_require__(65692));
+const pm = __importStar(__nccwpck_require__(56474));
+const tunnel = __importStar(__nccwpck_require__(30329));
+const undici_1 = __nccwpck_require__(76017);
var HttpCodes;
(function (HttpCodes) {
HttpCodes[HttpCodes["OK"] = 200] = "OK";
@@ -6763,7 +6838,7 @@ const lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => ((c[k.toLowerCa
/***/ }),
-/***/ 9835:
+/***/ 56474:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
@@ -6865,7 +6940,7 @@ class DecodedURL extends URL {
/***/ }),
-/***/ 1962:
+/***/ 80527:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
@@ -6901,8 +6976,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
var _a;
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.getCmdPath = exports.tryGetExecutablePath = exports.isRooted = exports.isDirectory = exports.exists = exports.READONLY = exports.UV_FS_O_EXLOCK = exports.IS_WINDOWS = exports.unlink = exports.symlink = exports.stat = exports.rmdir = exports.rm = exports.rename = exports.readlink = exports.readdir = exports.open = exports.mkdir = exports.lstat = exports.copyFile = exports.chmod = void 0;
-const fs = __importStar(__nccwpck_require__(7147));
-const path = __importStar(__nccwpck_require__(1017));
+const fs = __importStar(__nccwpck_require__(79896));
+const path = __importStar(__nccwpck_require__(16928));
_a = fs.promises
// export const {open} = 'fs'
, exports.chmod = _a.chmod, exports.copyFile = _a.copyFile, exports.lstat = _a.lstat, exports.mkdir = _a.mkdir, exports.open = _a.open, exports.readdir = _a.readdir, exports.readlink = _a.readlink, exports.rename = _a.rename, exports.rm = _a.rm, exports.rmdir = _a.rmdir, exports.stat = _a.stat, exports.symlink = _a.symlink, exports.unlink = _a.unlink;
@@ -7055,7 +7130,7 @@ exports.getCmdPath = getCmdPath;
/***/ }),
-/***/ 7436:
+/***/ 60378:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
@@ -7090,9 +7165,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.findInPath = exports.which = exports.mkdirP = exports.rmRF = exports.mv = exports.cp = void 0;
-const assert_1 = __nccwpck_require__(9491);
-const path = __importStar(__nccwpck_require__(1017));
-const ioUtil = __importStar(__nccwpck_require__(1962));
+const assert_1 = __nccwpck_require__(42613);
+const path = __importStar(__nccwpck_require__(16928));
+const ioUtil = __importStar(__nccwpck_require__(80527));
/**
* Copies a file or folder.
* Based off of shelljs - https://github.com/shelljs/shelljs/blob/9237f66c52e5daa40458f94f9565e18e8132f5a6/src/cp.js
@@ -7361,7 +7436,7 @@ function copyFile(srcFile, destFile, force) {
/***/ }),
-/***/ 2473:
+/***/ 26084:
/***/ (function(module, exports, __nccwpck_require__) {
"use strict";
@@ -7400,13 +7475,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports._readLinuxVersionFile = exports._getOsVersion = exports._findMatch = void 0;
-const semver = __importStar(__nccwpck_require__(5911));
-const core_1 = __nccwpck_require__(2186);
+const semver = __importStar(__nccwpck_require__(92131));
+const core_1 = __nccwpck_require__(16966);
// needs to be require for core node modules to be mocked
/* eslint @typescript-eslint/no-require-imports: 0 */
-const os = __nccwpck_require__(2037);
-const cp = __nccwpck_require__(2081);
-const fs = __nccwpck_require__(7147);
+const os = __nccwpck_require__(70857);
+const cp = __nccwpck_require__(35317);
+const fs = __nccwpck_require__(79896);
function _findMatch(versionSpec, stable, candidates, archFilter) {
return __awaiter(this, void 0, void 0, function* () {
const platFilter = os.platform();
@@ -7497,7 +7572,7 @@ exports._readLinuxVersionFile = _readLinuxVersionFile;
/***/ }),
-/***/ 8279:
+/***/ 41380:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
@@ -7536,7 +7611,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.RetryHelper = void 0;
-const core = __importStar(__nccwpck_require__(2186));
+const core = __importStar(__nccwpck_require__(16966));
/**
* Internal class for retries
*/
@@ -7591,7 +7666,7 @@ exports.RetryHelper = RetryHelper;
/***/ }),
-/***/ 7784:
+/***/ 95440:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
@@ -7630,20 +7705,20 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.evaluateVersions = exports.isExplicitVersion = exports.findFromManifest = exports.getManifestFromRepo = exports.findAllVersions = exports.find = exports.cacheFile = exports.cacheDir = exports.extractZip = exports.extractXar = exports.extractTar = exports.extract7z = exports.downloadTool = exports.HTTPError = void 0;
-const core = __importStar(__nccwpck_require__(2186));
-const io = __importStar(__nccwpck_require__(7436));
-const crypto = __importStar(__nccwpck_require__(6113));
-const fs = __importStar(__nccwpck_require__(7147));
-const mm = __importStar(__nccwpck_require__(2473));
-const os = __importStar(__nccwpck_require__(2037));
-const path = __importStar(__nccwpck_require__(1017));
-const httpm = __importStar(__nccwpck_require__(6255));
-const semver = __importStar(__nccwpck_require__(5911));
-const stream = __importStar(__nccwpck_require__(2781));
-const util = __importStar(__nccwpck_require__(3837));
-const assert_1 = __nccwpck_require__(9491);
-const exec_1 = __nccwpck_require__(1514);
-const retry_helper_1 = __nccwpck_require__(8279);
+const core = __importStar(__nccwpck_require__(16966));
+const io = __importStar(__nccwpck_require__(60378));
+const crypto = __importStar(__nccwpck_require__(76982));
+const fs = __importStar(__nccwpck_require__(79896));
+const mm = __importStar(__nccwpck_require__(26084));
+const os = __importStar(__nccwpck_require__(70857));
+const path = __importStar(__nccwpck_require__(16928));
+const httpm = __importStar(__nccwpck_require__(21966));
+const semver = __importStar(__nccwpck_require__(92131));
+const stream = __importStar(__nccwpck_require__(2203));
+const util = __importStar(__nccwpck_require__(39023));
+const assert_1 = __nccwpck_require__(42613);
+const exec_1 = __nccwpck_require__(92851);
+const retry_helper_1 = __nccwpck_require__(41380);
class HTTPError extends Error {
constructor(httpStatusCode) {
super(`Unexpected HTTP response: ${httpStatusCode}`);
@@ -8264,7 +8339,7 @@ function _unique(values) {
/***/ }),
-/***/ 2557:
+/***/ 4334:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
@@ -8511,73123 +8586,84878 @@ exports.AbortSignal = AbortSignal;
/***/ }),
-/***/ 4100:
-/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
+/***/ 69113:
+/***/ (function(__unused_webpack_module, exports) {
"use strict";
-
+var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
+ return new (P || (P = Promise))(function (resolve, reject) {
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
+ });
+};
Object.defineProperty(exports, "__esModule", ({ value: true }));
-
-var coreRestPipeline = __nccwpck_require__(9146);
-var tslib = __nccwpck_require__(4351);
-var coreAuth = __nccwpck_require__(8834);
-var coreUtil = __nccwpck_require__(637);
-var coreHttpCompat = __nccwpck_require__(5083);
-var coreClient = __nccwpck_require__(7611);
-var coreXml = __nccwpck_require__(7309);
-var logger$1 = __nccwpck_require__(9497);
-var abortController = __nccwpck_require__(2557);
-var crypto = __nccwpck_require__(6113);
-var coreTracing = __nccwpck_require__(9363);
-var stream = __nccwpck_require__(2781);
-var coreLro = __nccwpck_require__(334);
-var events = __nccwpck_require__(2361);
-var fs = __nccwpck_require__(7147);
-var util = __nccwpck_require__(3837);
-var buffer = __nccwpck_require__(4300);
-
-function _interopNamespaceDefault(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]; }
- });
- }
+exports.ClientStreamingCall = void 0;
+/**
+ * A client streaming RPC call. This means that the clients sends 0, 1, or
+ * more messages to the server, and the server replies with exactly one
+ * message.
+ */
+class ClientStreamingCall {
+ constructor(method, requestHeaders, request, headers, response, status, trailers) {
+ this.method = method;
+ this.requestHeaders = requestHeaders;
+ this.requests = request;
+ this.headers = headers;
+ this.response = response;
+ this.status = status;
+ this.trailers = trailers;
+ }
+ /**
+ * Instead of awaiting the response status and trailers, you can
+ * just as well await this call itself to receive the server outcome.
+ * Note that it may still be valid to send more request messages.
+ */
+ then(onfulfilled, onrejected) {
+ return this.promiseFinished().then(value => onfulfilled ? Promise.resolve(onfulfilled(value)) : value, reason => onrejected ? Promise.resolve(onrejected(reason)) : Promise.reject(reason));
+ }
+ promiseFinished() {
+ return __awaiter(this, void 0, void 0, function* () {
+ let [headers, response, status, trailers] = yield Promise.all([this.headers, this.response, this.status, this.trailers]);
+ return {
+ method: this.method,
+ requestHeaders: this.requestHeaders,
+ headers,
+ response,
+ status,
+ trailers
+ };
});
}
- n.default = e;
- return Object.freeze(n);
}
+exports.ClientStreamingCall = ClientStreamingCall;
-var coreHttpCompat__namespace = /*#__PURE__*/_interopNamespaceDefault(coreHttpCompat);
-var coreClient__namespace = /*#__PURE__*/_interopNamespaceDefault(coreClient);
-var fs__namespace = /*#__PURE__*/_interopNamespaceDefault(fs);
-var util__namespace = /*#__PURE__*/_interopNamespaceDefault(util);
-// Copyright (c) Microsoft Corporation.
-// Licensed under the MIT license.
-/**
- * The `@azure/logger` configuration for this package.
- */
-const logger = logger$1.createClientLogger("storage-blob");
+/***/ }),
-// Copyright (c) Microsoft Corporation.
-// Licensed under the MIT license.
+/***/ 87961:
+/***/ ((__unused_webpack_module, exports) => {
+
+"use strict";
+
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.Deferred = exports.DeferredState = void 0;
+var DeferredState;
+(function (DeferredState) {
+ DeferredState[DeferredState["PENDING"] = 0] = "PENDING";
+ DeferredState[DeferredState["REJECTED"] = 1] = "REJECTED";
+ DeferredState[DeferredState["RESOLVED"] = 2] = "RESOLVED";
+})(DeferredState = exports.DeferredState || (exports.DeferredState = {}));
/**
- * The base class from which all request policies derive.
+ * A deferred promise. This is a "controller" for a promise, which lets you
+ * pass a promise around and reject or resolve it from the outside.
+ *
+ * Warning: This class is to be used with care. Using it can make code very
+ * difficult to read. It is intended for use in library code that exposes
+ * promises, not for regular business logic.
*/
-class BaseRequestPolicy {
+class Deferred {
/**
- * The main method to implement that manipulates a request/response.
+ * @param preventUnhandledRejectionWarning - prevents the warning
+ * "Unhandled Promise rejection" by adding a noop rejection handler.
+ * Working with calls returned from the runtime-rpc package in an
+ * async function usually means awaiting one call property after
+ * the other. This means that the "status" is not being awaited when
+ * an earlier await for the "headers" is rejected. This causes the
+ * "unhandled promise reject" warning. A more correct behaviour for
+ * calls might be to become aware whether at least one of the
+ * promises is handled and swallow the rejection warning for the
+ * others.
*/
- constructor(
+ constructor(preventUnhandledRejectionWarning = true) {
+ this._state = DeferredState.PENDING;
+ this._promise = new Promise((resolve, reject) => {
+ this._resolve = resolve;
+ this._reject = reject;
+ });
+ if (preventUnhandledRejectionWarning) {
+ this._promise.catch(_ => { });
+ }
+ }
/**
- * The next policy in the pipeline. Each policy is responsible for executing the next one if the request is to continue through the pipeline.
+ * Get the current state of the promise.
*/
- _nextPolicy,
+ get state() {
+ return this._state;
+ }
/**
- * The options that can be passed to a given request policy.
+ * Get the deferred promise.
*/
- _options) {
- this._nextPolicy = _nextPolicy;
- this._options = _options;
+ get promise() {
+ return this._promise;
}
/**
- * Get whether or not a log with the provided log level should be logged.
- * @param logLevel - The log level of the log that will be logged.
- * @returns Whether or not a log with the provided log level should be logged.
+ * Resolve the promise. Throws if the promise is already resolved or rejected.
*/
- shouldLog(logLevel) {
- return this._options.shouldLog(logLevel);
+ resolve(value) {
+ if (this.state !== DeferredState.PENDING)
+ throw new Error(`cannot resolve ${DeferredState[this.state].toLowerCase()}`);
+ this._resolve(value);
+ this._state = DeferredState.RESOLVED;
}
/**
- * Attempt to log the provided message to the provided logger. If no logger was provided or if
- * the log level does not meat the logger's threshold, then nothing will be logged.
- * @param logLevel - The log level of this log.
- * @param message - The message of this log.
+ * Reject the promise. Throws if the promise is already resolved or rejected.
*/
- log(logLevel, message) {
- this._options.log(logLevel, message);
+ reject(reason) {
+ if (this.state !== DeferredState.PENDING)
+ throw new Error(`cannot reject ${DeferredState[this.state].toLowerCase()}`);
+ this._reject(reason);
+ this._state = DeferredState.REJECTED;
+ }
+ /**
+ * Resolve the promise. Ignore if not pending.
+ */
+ resolvePending(val) {
+ if (this._state === DeferredState.PENDING)
+ this.resolve(val);
+ }
+ /**
+ * Reject the promise. Ignore if not pending.
+ */
+ rejectPending(reason) {
+ if (this._state === DeferredState.PENDING)
+ this.reject(reason);
}
}
+exports.Deferred = Deferred;
-// Copyright (c) Microsoft Corporation.
-// Licensed under the MIT license.
-const SDK_VERSION = "12.24.0";
-const SERVICE_VERSION = "2024-08-04";
-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;
-const DEFAULT_BLOCK_BUFFER_SIZE_BYTES = 8 * 1024 * 1024; // 8MB
-const DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES = 4 * 1024 * 1024; // 4MB
-const DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS = 5;
-const REQUEST_TIMEOUT = 100 * 1000; // In ms
-/**
- * The OAuth scope to use with Azure Storage.
- */
-const StorageOAuthScopes = "https://storage.azure.com/.default";
-const URLConstants = {
- Parameters: {
- FORCE_BROWSER_NO_CACHE: "_",
- SIGNATURE: "sig",
- SNAPSHOT: "snapshot",
- VERSIONID: "versionid",
- TIMEOUT: "timeout",
- },
-};
-const HTTPURLConnection = {
- HTTP_ACCEPTED: 202,
- HTTP_CONFLICT: 409,
- HTTP_NOT_FOUND: 404,
- HTTP_PRECON_FAILED: 412,
- HTTP_RANGE_NOT_SATISFIABLE: 416,
-};
-const HeaderConstants = {
- AUTHORIZATION: "Authorization",
- AUTHORIZATION_SCHEME: "Bearer",
- CONTENT_ENCODING: "Content-Encoding",
- CONTENT_ID: "Content-ID",
- CONTENT_LANGUAGE: "Content-Language",
- CONTENT_LENGTH: "Content-Length",
- CONTENT_MD5: "Content-Md5",
- CONTENT_TRANSFER_ENCODING: "Content-Transfer-Encoding",
- CONTENT_TYPE: "Content-Type",
- COOKIE: "Cookie",
- DATE: "date",
- IF_MATCH: "if-match",
- IF_MODIFIED_SINCE: "if-modified-since",
- IF_NONE_MATCH: "if-none-match",
- IF_UNMODIFIED_SINCE: "if-unmodified-since",
- PREFIX_FOR_STORAGE: "x-ms-",
- RANGE: "Range",
- USER_AGENT: "User-Agent",
- X_MS_CLIENT_REQUEST_ID: "x-ms-client-request-id",
- X_MS_COPY_SOURCE: "x-ms-copy-source",
- X_MS_DATE: "x-ms-date",
- X_MS_ERROR_CODE: "x-ms-error-code",
- X_MS_VERSION: "x-ms-version",
- X_MS_CopySourceErrorCode: "x-ms-copy-source-error-code",
-};
-const ETagNone = "";
-const ETagAny = "*";
-const SIZE_1_MB = 1 * 1024 * 1024;
-const BATCH_MAX_REQUEST = 256;
-const BATCH_MAX_PAYLOAD_IN_BYTES = 4 * SIZE_1_MB;
-const HTTP_LINE_ENDING = "\r\n";
-const HTTP_VERSION_1_1 = "HTTP/1.1";
-const EncryptionAlgorithmAES25 = "AES256";
-const DevelopmentConnectionString = `DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;`;
-const StorageBlobLoggingAllowedHeaderNames = [
- "Access-Control-Allow-Origin",
- "Cache-Control",
- "Content-Length",
- "Content-Type",
- "Date",
- "Request-Id",
- "traceparent",
- "Transfer-Encoding",
- "User-Agent",
- "x-ms-client-request-id",
- "x-ms-date",
- "x-ms-error-code",
- "x-ms-request-id",
- "x-ms-return-client-request-id",
- "x-ms-version",
- "Accept-Ranges",
- "Content-Disposition",
- "Content-Encoding",
- "Content-Language",
- "Content-MD5",
- "Content-Range",
- "ETag",
- "Last-Modified",
- "Server",
- "Vary",
- "x-ms-content-crc64",
- "x-ms-copy-action",
- "x-ms-copy-completion-time",
- "x-ms-copy-id",
- "x-ms-copy-progress",
- "x-ms-copy-status",
- "x-ms-has-immutability-policy",
- "x-ms-has-legal-hold",
- "x-ms-lease-state",
- "x-ms-lease-status",
- "x-ms-range",
- "x-ms-request-server-encrypted",
- "x-ms-server-encrypted",
- "x-ms-snapshot",
- "x-ms-source-range",
- "If-Match",
- "If-Modified-Since",
- "If-None-Match",
- "If-Unmodified-Since",
- "x-ms-access-tier",
- "x-ms-access-tier-change-time",
- "x-ms-access-tier-inferred",
- "x-ms-account-kind",
- "x-ms-archive-status",
- "x-ms-blob-append-offset",
- "x-ms-blob-cache-control",
- "x-ms-blob-committed-block-count",
- "x-ms-blob-condition-appendpos",
- "x-ms-blob-condition-maxsize",
- "x-ms-blob-content-disposition",
- "x-ms-blob-content-encoding",
- "x-ms-blob-content-language",
- "x-ms-blob-content-length",
- "x-ms-blob-content-md5",
- "x-ms-blob-content-type",
- "x-ms-blob-public-access",
- "x-ms-blob-sequence-number",
- "x-ms-blob-type",
- "x-ms-copy-destination-snapshot",
- "x-ms-creation-time",
- "x-ms-default-encryption-scope",
- "x-ms-delete-snapshots",
- "x-ms-delete-type-permanent",
- "x-ms-deny-encryption-scope-override",
- "x-ms-encryption-algorithm",
- "x-ms-if-sequence-number-eq",
- "x-ms-if-sequence-number-le",
- "x-ms-if-sequence-number-lt",
- "x-ms-incremental-copy",
- "x-ms-lease-action",
- "x-ms-lease-break-period",
- "x-ms-lease-duration",
- "x-ms-lease-id",
- "x-ms-lease-time",
- "x-ms-page-write",
- "x-ms-proposed-lease-id",
- "x-ms-range-get-content-md5",
- "x-ms-rehydrate-priority",
- "x-ms-sequence-number-action",
- "x-ms-sku-name",
- "x-ms-source-content-md5",
- "x-ms-source-if-match",
- "x-ms-source-if-modified-since",
- "x-ms-source-if-none-match",
- "x-ms-source-if-unmodified-since",
- "x-ms-tag-count",
- "x-ms-encryption-key-sha256",
- "x-ms-copy-source-error-code",
- "x-ms-copy-source-status-code",
- "x-ms-if-tags",
- "x-ms-source-if-tags",
-];
-const StorageBlobLoggingAllowedQueryParameters = [
- "comp",
- "maxresults",
- "rscc",
- "rscd",
- "rsce",
- "rscl",
- "rsct",
- "se",
- "si",
- "sip",
- "sp",
- "spr",
- "sr",
- "srt",
- "ss",
- "st",
- "sv",
- "include",
- "marker",
- "prefix",
- "copyid",
- "restype",
- "blockid",
- "blocklisttype",
- "delimiter",
- "prevsnapshot",
- "ske",
- "skoid",
- "sks",
- "skt",
- "sktid",
- "skv",
- "snapshot",
-];
-const BlobUsesCustomerSpecifiedEncryptionMsg = "BlobUsesCustomerSpecifiedEncryption";
-const BlobDoesNotUseCustomerSpecifiedEncryption = "BlobDoesNotUseCustomerSpecifiedEncryption";
-/// List of ports used for path style addressing.
-/// Path style addressing means that storage account is put in URI's Path segment in instead of in host.
-const PathStylePorts = [
- "10000",
- "10001",
- "10002",
- "10003",
- "10004",
- "10100",
- "10101",
- "10102",
- "10103",
- "10104",
- "11000",
- "11001",
- "11002",
- "11003",
- "11004",
- "11100",
- "11101",
- "11102",
- "11103",
- "11104",
-];
-// Copyright (c) Microsoft Corporation.
-// Licensed under the MIT license.
+/***/ }),
+
+/***/ 17090:
+/***/ (function(__unused_webpack_module, exports) {
+
+"use strict";
+
+var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
+ return new (P || (P = Promise))(function (resolve, reject) {
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
+ });
+};
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.DuplexStreamingCall = void 0;
/**
- * Reserved URL characters must be properly escaped for Storage services like Blob or File.
- *
- * ## URL encode and escape strategy for JS SDKs
- *
- * When customers pass a URL string into XxxClient classes constructor, the URL string may already be URL encoded or not.
- * But before sending to Azure Storage server, the URL must be encoded. However, it's hard for a SDK to guess whether the URL
- * string has been encoded or not. We have 2 potential strategies, and chose strategy two for the XxxClient constructors.
- *
- * ### Strategy One: Assume the customer URL string is not encoded, and always encode URL string in SDK.
- *
- * This is what legacy V2 SDK does, simple and works for most of the cases.
- * - When customer URL string is "http://account.blob.core.windows.net/con/b:",
- * SDK will encode it to "http://account.blob.core.windows.net/con/b%3A" and send to server. A blob named "b:" will be created.
- * - When customer URL string is "http://account.blob.core.windows.net/con/b%3A",
- * SDK will encode it to "http://account.blob.core.windows.net/con/b%253A" and send to server. A blob named "b%3A" will be created.
- *
- * But this strategy will make it not possible to create a blob with "?" in it's name. Because when customer URL string is
- * "http://account.blob.core.windows.net/con/blob?name", the "?name" will be treated as URL paramter instead of blob name.
- * If customer URL string is "http://account.blob.core.windows.net/con/blob%3Fname", a blob named "blob%3Fname" will be created.
- * V2 SDK doesn't have this issue because it doesn't allow customer pass in a full URL, it accepts a separate blob name and encodeURIComponent for it.
- * We cannot accept a SDK cannot create a blob name with "?". So we implement strategy two:
- *
- * ### Strategy Two: SDK doesn't assume the URL has been encoded or not. It will just escape the special characters.
- *
- * This is what V10 Blob Go SDK does. It accepts a URL type in Go, and call url.EscapedPath() to escape the special chars unescaped.
- * - When customer URL string is "http://account.blob.core.windows.net/con/b:",
- * SDK will escape ":" like "http://account.blob.core.windows.net/con/b%3A" and send to server. A blob named "b:" will be created.
- * - When customer URL string is "http://account.blob.core.windows.net/con/b%3A",
- * There is no special characters, so send "http://account.blob.core.windows.net/con/b%3A" to server. A blob named "b:" will be created.
- * - When customer URL string is "http://account.blob.core.windows.net/con/b%253A",
- * There is no special characters, so send "http://account.blob.core.windows.net/con/b%253A" to server. A blob named "b%3A" will be created.
- *
- * This strategy gives us flexibility to create with any special characters. But "%" will be treated as a special characters, if the URL string
- * is not encoded, there shouldn't a "%" in the URL string, otherwise the URL is not a valid URL.
- * If customer needs to create a blob with "%" in it's blob name, use "%25" instead of "%". Just like above 3rd sample.
- * And following URL strings are invalid:
- * - "http://account.blob.core.windows.net/con/b%"
- * - "http://account.blob.core.windows.net/con/b%2"
- * - "http://account.blob.core.windows.net/con/b%G"
- *
- * Another special character is "?", use "%2F" to represent a blob name with "?" in a URL string.
- *
- * ### Strategy for containerName, blobName or other specific XXXName parameters in methods such as `containerClient.getBlobClient(blobName)`
- *
- * We will apply strategy one, and call encodeURIComponent for these parameters like blobName. Because what customers passes in is a plain name instead of a URL.
- *
- * @see https://docs.microsoft.com/en-us/rest/api/storageservices/naming-and-referencing-containers--blobs--and-metadata
- * @see https://docs.microsoft.com/en-us/rest/api/storageservices/naming-and-referencing-shares--directories--files--and-metadata
- *
- * @param url -
+ * A duplex streaming RPC call. This means that the clients sends an
+ * arbitrary amount of messages to the server, while at the same time,
+ * the server sends an arbitrary amount of messages to the client.
*/
-function escapeURLPath(url) {
- const urlParsed = new URL(url);
- let path = urlParsed.pathname;
- path = path || "/";
- path = escape(path);
- urlParsed.pathname = path;
- return urlParsed.toString();
-}
-function getProxyUriFromDevConnString(connectionString) {
- // Development Connection String
- // https://docs.microsoft.com/en-us/azure/storage/common/storage-configure-connection-string#connect-to-the-emulator-account-using-the-well-known-account-name-and-key
- let proxyUri = "";
- if (connectionString.search("DevelopmentStorageProxyUri=") !== -1) {
- // CONNECTION_STRING=UseDevelopmentStorage=true;DevelopmentStorageProxyUri=http://myProxyUri
- const matchCredentials = connectionString.split(";");
- for (const element of matchCredentials) {
- if (element.trim().startsWith("DevelopmentStorageProxyUri=")) {
- proxyUri = element.trim().match("DevelopmentStorageProxyUri=(.*)")[1];
- }
- }
+class DuplexStreamingCall {
+ constructor(method, requestHeaders, request, headers, response, status, trailers) {
+ this.method = method;
+ this.requestHeaders = requestHeaders;
+ this.requests = request;
+ this.headers = headers;
+ this.responses = response;
+ this.status = status;
+ this.trailers = trailers;
}
- return proxyUri;
-}
-function getValueInConnString(connectionString, argument) {
- const elements = connectionString.split(";");
- for (const element of elements) {
- if (element.trim().startsWith(argument)) {
- return element.trim().match(argument + "=(.*)")[1];
- }
+ /**
+ * Instead of awaiting the response status and trailers, you can
+ * just as well await this call itself to receive the server outcome.
+ * Note that it may still be valid to send more request messages.
+ */
+ then(onfulfilled, onrejected) {
+ return this.promiseFinished().then(value => onfulfilled ? Promise.resolve(onfulfilled(value)) : value, reason => onrejected ? Promise.resolve(onrejected(reason)) : Promise.reject(reason));
+ }
+ promiseFinished() {
+ return __awaiter(this, void 0, void 0, function* () {
+ let [headers, status, trailers] = yield Promise.all([this.headers, this.status, this.trailers]);
+ return {
+ method: this.method,
+ requestHeaders: this.requestHeaders,
+ headers,
+ status,
+ trailers,
+ };
+ });
}
- return "";
-}
-/**
- * Extracts the parts of an Azure Storage account connection string.
- *
- * @param connectionString - Connection string.
- * @returns String key value pairs of the storage account's url and credentials.
- */
-function extractConnectionStringParts(connectionString) {
- let proxyUri = "";
- if (connectionString.startsWith("UseDevelopmentStorage=true")) {
- // Development connection string
- proxyUri = getProxyUriFromDevConnString(connectionString);
- connectionString = DevelopmentConnectionString;
- }
- // Matching BlobEndpoint in the Account connection string
- let blobEndpoint = getValueInConnString(connectionString, "BlobEndpoint");
- // Slicing off '/' at the end if exists
- // (The methods that use `extractConnectionStringParts` expect the url to not have `/` at the end)
- blobEndpoint = blobEndpoint.endsWith("/") ? blobEndpoint.slice(0, -1) : blobEndpoint;
- if (connectionString.search("DefaultEndpointsProtocol=") !== -1 &&
- connectionString.search("AccountKey=") !== -1) {
- // Account connection string
- let defaultEndpointsProtocol = "";
- let accountName = "";
- let accountKey = Buffer.from("accountKey", "base64");
- let endpointSuffix = "";
- // Get account name and key
- accountName = getValueInConnString(connectionString, "AccountName");
- accountKey = Buffer.from(getValueInConnString(connectionString, "AccountKey"), "base64");
- if (!blobEndpoint) {
- // BlobEndpoint is not present in the Account connection string
- // Can be obtained from `${defaultEndpointsProtocol}://${accountName}.blob.${endpointSuffix}`
- defaultEndpointsProtocol = getValueInConnString(connectionString, "DefaultEndpointsProtocol");
- const protocol = defaultEndpointsProtocol.toLowerCase();
- if (protocol !== "https" && protocol !== "http") {
- throw new Error("Invalid DefaultEndpointsProtocol in the provided Connection String. Expecting 'https' or 'http'");
- }
- endpointSuffix = getValueInConnString(connectionString, "EndpointSuffix");
- if (!endpointSuffix) {
- throw new Error("Invalid EndpointSuffix in the provided Connection String");
- }
- blobEndpoint = `${defaultEndpointsProtocol}://${accountName}.blob.${endpointSuffix}`;
- }
- if (!accountName) {
- throw new Error("Invalid AccountName in the provided Connection String");
- }
- else if (accountKey.length === 0) {
- throw new Error("Invalid AccountKey in the provided Connection String");
- }
- return {
- kind: "AccountConnString",
- url: blobEndpoint,
- accountName,
- accountKey,
- proxyUri,
- };
- }
- else {
- // SAS connection string
- let accountSas = getValueInConnString(connectionString, "SharedAccessSignature");
- let accountName = getValueInConnString(connectionString, "AccountName");
- // if accountName is empty, try to read it from BlobEndpoint
- if (!accountName) {
- accountName = getAccountNameFromUrl(blobEndpoint);
- }
- if (!blobEndpoint) {
- throw new Error("Invalid BlobEndpoint in the provided SAS Connection String");
- }
- else if (!accountSas) {
- throw new Error("Invalid SharedAccessSignature in the provided SAS Connection String");
- }
- // client constructors assume accountSas does *not* start with ?
- if (accountSas.startsWith("?")) {
- accountSas = accountSas.substring(1);
- }
- return { kind: "SASConnString", url: blobEndpoint, accountName, accountSas };
- }
-}
-/**
- * Internal escape method implemented Strategy Two mentioned in escapeURL() description.
- *
- * @param text -
- */
-function escape(text) {
- return encodeURIComponent(text)
- .replace(/%2F/g, "/") // Don't escape for "/"
- .replace(/'/g, "%27") // Escape for "'"
- .replace(/\+/g, "%20")
- .replace(/%25/g, "%"); // Revert encoded "%"
-}
-/**
- * Append a string to URL path. Will remove duplicated "/" in front of the string
- * when URL path ends with a "/".
- *
- * @param url - Source URL string
- * @param name - String to be appended to URL
- * @returns An updated URL string
- */
-function appendToURLPath(url, name) {
- const urlParsed = new URL(url);
- let path = urlParsed.pathname;
- path = path ? (path.endsWith("/") ? `${path}${name}` : `${path}/${name}`) : name;
- urlParsed.pathname = path;
- return urlParsed.toString();
}
+exports.DuplexStreamingCall = DuplexStreamingCall;
+
+
+/***/ }),
+
+/***/ 95980:
+/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
+
+"use strict";
+
+// Public API of the rpc runtime.
+// Note: we do not use `export * from ...` to help tree shakers,
+// webpack verbose output hints that this should be useful
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+var service_type_1 = __nccwpck_require__(31636);
+Object.defineProperty(exports, "ServiceType", ({ enumerable: true, get: function () { return service_type_1.ServiceType; } }));
+var reflection_info_1 = __nccwpck_require__(19768);
+Object.defineProperty(exports, "readMethodOptions", ({ enumerable: true, get: function () { return reflection_info_1.readMethodOptions; } }));
+Object.defineProperty(exports, "readMethodOption", ({ enumerable: true, get: function () { return reflection_info_1.readMethodOption; } }));
+Object.defineProperty(exports, "readServiceOption", ({ enumerable: true, get: function () { return reflection_info_1.readServiceOption; } }));
+var rpc_error_1 = __nccwpck_require__(15908);
+Object.defineProperty(exports, "RpcError", ({ enumerable: true, get: function () { return rpc_error_1.RpcError; } }));
+var rpc_options_1 = __nccwpck_require__(91816);
+Object.defineProperty(exports, "mergeRpcOptions", ({ enumerable: true, get: function () { return rpc_options_1.mergeRpcOptions; } }));
+var rpc_output_stream_1 = __nccwpck_require__(27374);
+Object.defineProperty(exports, "RpcOutputStreamController", ({ enumerable: true, get: function () { return rpc_output_stream_1.RpcOutputStreamController; } }));
+var test_transport_1 = __nccwpck_require__(28330);
+Object.defineProperty(exports, "TestTransport", ({ enumerable: true, get: function () { return test_transport_1.TestTransport; } }));
+var deferred_1 = __nccwpck_require__(87961);
+Object.defineProperty(exports, "Deferred", ({ enumerable: true, get: function () { return deferred_1.Deferred; } }));
+Object.defineProperty(exports, "DeferredState", ({ enumerable: true, get: function () { return deferred_1.DeferredState; } }));
+var duplex_streaming_call_1 = __nccwpck_require__(17090);
+Object.defineProperty(exports, "DuplexStreamingCall", ({ enumerable: true, get: function () { return duplex_streaming_call_1.DuplexStreamingCall; } }));
+var client_streaming_call_1 = __nccwpck_require__(69113);
+Object.defineProperty(exports, "ClientStreamingCall", ({ enumerable: true, get: function () { return client_streaming_call_1.ClientStreamingCall; } }));
+var server_streaming_call_1 = __nccwpck_require__(12069);
+Object.defineProperty(exports, "ServerStreamingCall", ({ enumerable: true, get: function () { return server_streaming_call_1.ServerStreamingCall; } }));
+var unary_call_1 = __nccwpck_require__(90368);
+Object.defineProperty(exports, "UnaryCall", ({ enumerable: true, get: function () { return unary_call_1.UnaryCall; } }));
+var rpc_interceptor_1 = __nccwpck_require__(86473);
+Object.defineProperty(exports, "stackIntercept", ({ enumerable: true, get: function () { return rpc_interceptor_1.stackIntercept; } }));
+Object.defineProperty(exports, "stackDuplexStreamingInterceptors", ({ enumerable: true, get: function () { return rpc_interceptor_1.stackDuplexStreamingInterceptors; } }));
+Object.defineProperty(exports, "stackClientStreamingInterceptors", ({ enumerable: true, get: function () { return rpc_interceptor_1.stackClientStreamingInterceptors; } }));
+Object.defineProperty(exports, "stackServerStreamingInterceptors", ({ enumerable: true, get: function () { return rpc_interceptor_1.stackServerStreamingInterceptors; } }));
+Object.defineProperty(exports, "stackUnaryInterceptors", ({ enumerable: true, get: function () { return rpc_interceptor_1.stackUnaryInterceptors; } }));
+var server_call_context_1 = __nccwpck_require__(27072);
+Object.defineProperty(exports, "ServerCallContextController", ({ enumerable: true, get: function () { return server_call_context_1.ServerCallContextController; } }));
+
+
+/***/ }),
+
+/***/ 19768:
+/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
+
+"use strict";
+
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.readServiceOption = exports.readMethodOption = exports.readMethodOptions = exports.normalizeMethodInfo = void 0;
+const runtime_1 = __nccwpck_require__(68140);
/**
- * Set URL parameter name and value. If name exists in URL parameters, old value
- * will be replaced by name key. If not provide value, the parameter will be deleted.
- *
- * @param url - Source URL string
- * @param name - Parameter name
- * @param value - Parameter value
- * @returns An updated URL string
+ * Turns PartialMethodInfo into MethodInfo.
*/
-function setURLParameter(url, name, value) {
- const urlParsed = new URL(url);
- const encodedName = encodeURIComponent(name);
- const encodedValue = value ? encodeURIComponent(value) : undefined;
- // mutating searchParams will change the encoding, so we have to do this ourselves
- const searchString = urlParsed.search === "" ? "?" : urlParsed.search;
- const searchPieces = [];
- for (const pair of searchString.slice(1).split("&")) {
- if (pair) {
- const [key] = pair.split("=", 2);
- if (key !== encodedName) {
- searchPieces.push(pair);
- }
- }
- }
- if (encodedValue) {
- searchPieces.push(`${encodedName}=${encodedValue}`);
- }
- urlParsed.search = searchPieces.length ? `?${searchPieces.join("&")}` : "";
- return urlParsed.toString();
+function normalizeMethodInfo(method, service) {
+ var _a, _b, _c;
+ let m = method;
+ m.service = service;
+ m.localName = (_a = m.localName) !== null && _a !== void 0 ? _a : runtime_1.lowerCamelCase(m.name);
+ // noinspection PointlessBooleanExpressionJS
+ m.serverStreaming = !!m.serverStreaming;
+ // noinspection PointlessBooleanExpressionJS
+ m.clientStreaming = !!m.clientStreaming;
+ m.options = (_b = m.options) !== null && _b !== void 0 ? _b : {};
+ m.idempotency = (_c = m.idempotency) !== null && _c !== void 0 ? _c : undefined;
+ return m;
}
+exports.normalizeMethodInfo = normalizeMethodInfo;
/**
- * Get URL parameter by name.
+ * Read custom method options from a generated service client.
*
- * @param url -
- * @param name -
+ * @deprecated use readMethodOption()
*/
-function getURLParameter(url, name) {
+function readMethodOptions(service, methodName, extensionName, extensionType) {
var _a;
- const urlParsed = new URL(url);
- return (_a = urlParsed.searchParams.get(name)) !== null && _a !== void 0 ? _a : undefined;
-}
-/**
- * Set URL host.
- *
- * @param url - Source URL string
- * @param host - New host string
- * @returns An updated URL string
- */
-function setURLHost(url, host) {
- const urlParsed = new URL(url);
- urlParsed.hostname = host;
- return urlParsed.toString();
+ const options = (_a = service.methods.find((m, i) => m.localName === methodName || i === methodName)) === null || _a === void 0 ? void 0 : _a.options;
+ return options && options[extensionName] ? extensionType.fromJson(options[extensionName]) : undefined;
}
-/**
- * Get URL path from an URL string.
- *
- * @param url - Source URL string
- */
-function getURLPath(url) {
- try {
- const urlParsed = new URL(url);
- return urlParsed.pathname;
- }
- catch (e) {
+exports.readMethodOptions = readMethodOptions;
+function readMethodOption(service, methodName, extensionName, extensionType) {
+ var _a;
+ const options = (_a = service.methods.find((m, i) => m.localName === methodName || i === methodName)) === null || _a === void 0 ? void 0 : _a.options;
+ if (!options) {
return undefined;
}
-}
-/**
- * Get URL scheme from an URL string.
- *
- * @param url - Source URL string
- */
-function getURLScheme(url) {
- try {
- const urlParsed = new URL(url);
- return urlParsed.protocol.endsWith(":") ? urlParsed.protocol.slice(0, -1) : urlParsed.protocol;
+ const optionVal = options[extensionName];
+ if (optionVal === undefined) {
+ return optionVal;
}
- catch (e) {
+ return extensionType ? extensionType.fromJson(optionVal) : optionVal;
+}
+exports.readMethodOption = readMethodOption;
+function readServiceOption(service, extensionName, extensionType) {
+ const options = service.options;
+ if (!options) {
return undefined;
}
+ const optionVal = options[extensionName];
+ if (optionVal === undefined) {
+ return optionVal;
+ }
+ return extensionType ? extensionType.fromJson(optionVal) : optionVal;
}
+exports.readServiceOption = readServiceOption;
+
+
+/***/ }),
+
+/***/ 15908:
+/***/ ((__unused_webpack_module, exports) => {
+
+"use strict";
+
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.RpcError = void 0;
/**
- * Get URL path and query from an URL string.
- *
- * @param url - Source URL string
+ * An error that occurred while calling a RPC method.
*/
-function getURLPathAndQuery(url) {
- const urlParsed = new URL(url);
- const pathString = urlParsed.pathname;
- if (!pathString) {
- throw new RangeError("Invalid url without valid path.");
+class RpcError extends Error {
+ constructor(message, code = 'UNKNOWN', meta) {
+ super(message);
+ this.name = 'RpcError';
+ // see https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-2.html#example
+ Object.setPrototypeOf(this, new.target.prototype);
+ this.code = code;
+ this.meta = meta !== null && meta !== void 0 ? meta : {};
}
- let queryString = urlParsed.search || "";
- queryString = queryString.trim();
- if (queryString !== "") {
- queryString = queryString.startsWith("?") ? queryString : `?${queryString}`; // Ensure query string start with '?'
+ toString() {
+ const l = [this.name + ': ' + this.message];
+ if (this.code) {
+ l.push('');
+ l.push('Code: ' + this.code);
+ }
+ if (this.serviceName && this.methodName) {
+ l.push('Method: ' + this.serviceName + '/' + this.methodName);
+ }
+ let m = Object.entries(this.meta);
+ if (m.length) {
+ l.push('');
+ l.push('Meta:');
+ for (let [k, v] of m) {
+ l.push(` ${k}: ${v}`);
+ }
+ }
+ return l.join('\n');
}
- return `${pathString}${queryString}`;
}
+exports.RpcError = RpcError;
+
+
+/***/ }),
+
+/***/ 86473:
+/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
+
+"use strict";
+
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.stackDuplexStreamingInterceptors = exports.stackClientStreamingInterceptors = exports.stackServerStreamingInterceptors = exports.stackUnaryInterceptors = exports.stackIntercept = void 0;
+const runtime_1 = __nccwpck_require__(68140);
/**
- * Get URL query key value pairs from an URL string.
- *
- * @param url -
+ * Creates a "stack" of of all interceptors specified in the given `RpcOptions`.
+ * Used by generated client implementations.
+ * @internal
*/
-function getURLQueries(url) {
- let queryString = new URL(url).search;
- if (!queryString) {
- return {};
+function stackIntercept(kind, transport, method, options, input) {
+ var _a, _b, _c, _d;
+ if (kind == "unary") {
+ let tail = (mtd, inp, opt) => transport.unary(mtd, inp, opt);
+ for (const curr of ((_a = options.interceptors) !== null && _a !== void 0 ? _a : []).filter(i => i.interceptUnary).reverse()) {
+ const next = tail;
+ tail = (mtd, inp, opt) => curr.interceptUnary(next, mtd, inp, opt);
+ }
+ return tail(method, input, options);
}
- queryString = queryString.trim();
- queryString = queryString.startsWith("?") ? queryString.substring(1) : queryString;
- let querySubStrings = queryString.split("&");
- querySubStrings = querySubStrings.filter((value) => {
- const indexOfEqual = value.indexOf("=");
- const lastIndexOfEqual = value.lastIndexOf("=");
- return (indexOfEqual > 0 && indexOfEqual === lastIndexOfEqual && lastIndexOfEqual < value.length - 1);
- });
- const queries = {};
- for (const querySubString of querySubStrings) {
- const splitResults = querySubString.split("=");
- const key = splitResults[0];
- const value = splitResults[1];
- queries[key] = value;
+ if (kind == "serverStreaming") {
+ let tail = (mtd, inp, opt) => transport.serverStreaming(mtd, inp, opt);
+ for (const curr of ((_b = options.interceptors) !== null && _b !== void 0 ? _b : []).filter(i => i.interceptServerStreaming).reverse()) {
+ const next = tail;
+ tail = (mtd, inp, opt) => curr.interceptServerStreaming(next, mtd, inp, opt);
+ }
+ return tail(method, input, options);
}
- return queries;
-}
-/**
- * Append a string to URL query.
- *
- * @param url - Source URL string.
- * @param queryParts - String to be appended to the URL query.
- * @returns An updated URL string.
- */
-function appendToURLQuery(url, queryParts) {
- const urlParsed = new URL(url);
- let query = urlParsed.search;
- if (query) {
- query += "&" + queryParts;
+ if (kind == "clientStreaming") {
+ let tail = (mtd, opt) => transport.clientStreaming(mtd, opt);
+ for (const curr of ((_c = options.interceptors) !== null && _c !== void 0 ? _c : []).filter(i => i.interceptClientStreaming).reverse()) {
+ const next = tail;
+ tail = (mtd, opt) => curr.interceptClientStreaming(next, mtd, opt);
+ }
+ return tail(method, options);
}
- else {
- query = queryParts;
+ if (kind == "duplex") {
+ let tail = (mtd, opt) => transport.duplex(mtd, opt);
+ for (const curr of ((_d = options.interceptors) !== null && _d !== void 0 ? _d : []).filter(i => i.interceptDuplex).reverse()) {
+ const next = tail;
+ tail = (mtd, opt) => curr.interceptDuplex(next, mtd, opt);
+ }
+ return tail(method, options);
}
- urlParsed.search = query;
- return urlParsed.toString();
+ runtime_1.assertNever(kind);
}
+exports.stackIntercept = stackIntercept;
/**
- * Rounds a date off to seconds.
- *
- * @param date -
- * @param withMilliseconds - If true, YYYY-MM-DDThh:mm:ss.fffffffZ will be returned;
- * If false, YYYY-MM-DDThh:mm:ssZ will be returned.
- * @returns Date string in ISO8061 format, with or without 7 milliseconds component
+ * @deprecated replaced by `stackIntercept()`, still here to support older generated code
*/
-function truncatedISO8061Date(date, withMilliseconds = true) {
- // Date.toISOString() will return like "2018-10-29T06:34:36.139Z"
- const dateString = date.toISOString();
- return withMilliseconds
- ? dateString.substring(0, dateString.length - 1) + "0000" + "Z"
- : dateString.substring(0, dateString.length - 5) + "Z";
+function stackUnaryInterceptors(transport, method, input, options) {
+ return stackIntercept("unary", transport, method, options, input);
}
+exports.stackUnaryInterceptors = stackUnaryInterceptors;
/**
- * Base64 encode.
- *
- * @param content -
+ * @deprecated replaced by `stackIntercept()`, still here to support older generated code
*/
-function base64encode(content) {
- return !coreUtil.isNode ? btoa(content) : Buffer.from(content).toString("base64");
+function stackServerStreamingInterceptors(transport, method, input, options) {
+ return stackIntercept("serverStreaming", transport, method, options, input);
}
+exports.stackServerStreamingInterceptors = stackServerStreamingInterceptors;
/**
- * Generate a 64 bytes base64 block ID string.
- *
- * @param blockIndex -
+ * @deprecated replaced by `stackIntercept()`, still here to support older generated code
*/
-function generateBlockID(blockIDPrefix, blockIndex) {
- // To generate a 64 bytes base64 string, source string should be 48
- const maxSourceStringLength = 48;
- // A blob can have a maximum of 100,000 uncommitted blocks at any given time
- const maxBlockIndexLength = 6;
- const maxAllowedBlockIDPrefixLength = maxSourceStringLength - maxBlockIndexLength;
- if (blockIDPrefix.length > maxAllowedBlockIDPrefixLength) {
- blockIDPrefix = blockIDPrefix.slice(0, maxAllowedBlockIDPrefixLength);
- }
- const res = blockIDPrefix +
- padStart(blockIndex.toString(), maxSourceStringLength - blockIDPrefix.length, "0");
- return base64encode(res);
+function stackClientStreamingInterceptors(transport, method, options) {
+ return stackIntercept("clientStreaming", transport, method, options);
}
+exports.stackClientStreamingInterceptors = stackClientStreamingInterceptors;
/**
- * Delay specified time interval.
- *
- * @param timeInMs -
- * @param aborter -
- * @param abortError -
+ * @deprecated replaced by `stackIntercept()`, still here to support older generated code
*/
-async function delay(timeInMs, aborter, abortError) {
- return new Promise((resolve, reject) => {
- /* eslint-disable-next-line prefer-const */
- let timeout;
- const abortHandler = () => {
- if (timeout !== undefined) {
- clearTimeout(timeout);
- }
- reject(abortError);
- };
- const resolveHandler = () => {
- if (aborter !== undefined) {
- aborter.removeEventListener("abort", abortHandler);
- }
- resolve();
- };
- timeout = setTimeout(resolveHandler, timeInMs);
- if (aborter !== undefined) {
- aborter.addEventListener("abort", abortHandler);
- }
- });
+function stackDuplexStreamingInterceptors(transport, method, options) {
+ return stackIntercept("duplex", transport, method, options);
}
+exports.stackDuplexStreamingInterceptors = stackDuplexStreamingInterceptors;
+
+
+/***/ }),
+
+/***/ 91816:
+/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
+
+"use strict";
+
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.mergeRpcOptions = void 0;
+const runtime_1 = __nccwpck_require__(68140);
/**
- * String.prototype.padStart()
+ * Merges custom RPC options with defaults. Returns a new instance and keeps
+ * the "defaults" and the "options" unmodified.
*
- * @param currentString -
- * @param targetLength -
- * @param padString -
- */
-function padStart(currentString, targetLength, padString = " ") {
- // @ts-expect-error: TS doesn't know this code needs to run downlevel sometimes
- if (String.prototype.padStart) {
- return currentString.padStart(targetLength, padString);
- }
- padString = padString || " ";
- if (currentString.length > targetLength) {
- return currentString;
- }
- else {
- targetLength = targetLength - currentString.length;
- if (targetLength > padString.length) {
- padString += padString.repeat(targetLength / padString.length);
- }
- return padString.slice(0, targetLength) + currentString;
- }
-}
-/**
- * If two strings are equal when compared case insensitive.
+ * Merges `RpcMetadata` "meta", overwriting values from "defaults" with
+ * values from "options". Does not append values to existing entries.
*
- * @param str1 -
- * @param str2 -
+ * Merges "jsonOptions", including "jsonOptions.typeRegistry", by creating
+ * a new array that contains types from "options.jsonOptions.typeRegistry"
+ * first, then types from "defaults.jsonOptions.typeRegistry".
+ *
+ * Merges "binaryOptions".
+ *
+ * Merges "interceptors" by creating a new array that contains interceptors
+ * from "defaults" first, then interceptors from "options".
+ *
+ * Works with objects that extend `RpcOptions`, but only if the added
+ * properties are of type Date, primitive like string, boolean, or Array
+ * of primitives. If you have other property types, you have to merge them
+ * yourself.
*/
-function iEqual(str1, str2) {
- return str1.toLocaleLowerCase() === str2.toLocaleLowerCase();
-}
-/**
- * Extracts account name from the url
- * @param url - url to extract the account name from
- * @returns with the account name
- */
-function getAccountNameFromUrl(url) {
- const parsedUrl = new URL(url);
- let accountName;
- try {
- if (parsedUrl.hostname.split(".")[1] === "blob") {
- // `${defaultEndpointsProtocol}://${accountName}.blob.${endpointSuffix}`;
- accountName = parsedUrl.hostname.split(".")[0];
- }
- else if (isIpEndpointStyle(parsedUrl)) {
- // IPv4/IPv6 address hosts... Example - http://192.0.0.10:10001/devstoreaccount1/
- // Single word domain without a [dot] in the endpoint... Example - http://localhost:10001/devstoreaccount1/
- // .getPath() -> /devstoreaccount1/
- accountName = parsedUrl.pathname.split("/")[1];
- }
- else {
- // Custom domain case: "https://customdomain.com/containername/blob".
- accountName = "";
- }
- return accountName;
- }
- catch (error) {
- throw new Error("Unable to extract accountName with provided information.");
- }
-}
-function isIpEndpointStyle(parsedUrl) {
- const host = parsedUrl.host;
- // Case 1: Ipv6, use a broad regex to find out candidates whose host contains two ':'.
- // Case 2: localhost(:port) or host.docker.internal, use broad regex to match port part.
- // Case 3: Ipv4, use broad regex which just check if host contains Ipv4.
- // For valid host please refer to https://man7.org/linux/man-pages/man7/hostname.7.html.
- return (/^.*:.*:.*$|^(localhost|host.docker.internal)(:[0-9]+)?$|^(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])(\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])){3}(:[0-9]+)?$/.test(host) ||
- (Boolean(parsedUrl.port) && PathStylePorts.includes(parsedUrl.port)));
-}
-/**
- * Convert Tags to encoded string.
- *
- * @param tags -
- */
-function toBlobTagsString(tags) {
- if (tags === undefined) {
- return undefined;
- }
- const tagPairs = [];
- for (const key in tags) {
- if (Object.prototype.hasOwnProperty.call(tags, key)) {
- const value = tags[key];
- tagPairs.push(`${encodeURIComponent(key)}=${encodeURIComponent(value)}`);
- }
- }
- return tagPairs.join("&");
-}
-/**
- * Convert Tags type to BlobTags.
- *
- * @param tags -
- */
-function toBlobTags(tags) {
- if (tags === undefined) {
- return undefined;
- }
- const res = {
- blobTagSet: [],
- };
- for (const key in tags) {
- if (Object.prototype.hasOwnProperty.call(tags, key)) {
- const value = tags[key];
- res.blobTagSet.push({
- key,
- value,
- });
+function mergeRpcOptions(defaults, options) {
+ if (!options)
+ return defaults;
+ let o = {};
+ copy(defaults, o);
+ copy(options, o);
+ for (let key of Object.keys(options)) {
+ let val = options[key];
+ switch (key) {
+ case "jsonOptions":
+ o.jsonOptions = runtime_1.mergeJsonOptions(defaults.jsonOptions, o.jsonOptions);
+ break;
+ case "binaryOptions":
+ o.binaryOptions = runtime_1.mergeBinaryOptions(defaults.binaryOptions, o.binaryOptions);
+ break;
+ case "meta":
+ o.meta = {};
+ copy(defaults.meta, o.meta);
+ copy(options.meta, o.meta);
+ break;
+ case "interceptors":
+ o.interceptors = defaults.interceptors ? defaults.interceptors.concat(val) : val.concat();
+ break;
}
}
- return res;
+ return o;
}
-/**
- * Covert BlobTags to Tags type.
- *
- * @param tags -
- */
-function toTags(tags) {
- if (tags === undefined) {
- return undefined;
- }
- const res = {};
- for (const blobTag of tags.blobTagSet) {
- res[blobTag.key] = blobTag.value;
+exports.mergeRpcOptions = mergeRpcOptions;
+function copy(a, into) {
+ if (!a)
+ return;
+ let c = into;
+ for (let [k, v] of Object.entries(a)) {
+ if (v instanceof Date)
+ c[k] = new Date(v.getTime());
+ else if (Array.isArray(v))
+ c[k] = v.concat();
+ else
+ c[k] = v;
}
- return res;
}
+
+
+/***/ }),
+
+/***/ 27374:
+/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
+
+"use strict";
+
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.RpcOutputStreamController = void 0;
+const deferred_1 = __nccwpck_require__(87961);
+const runtime_1 = __nccwpck_require__(68140);
/**
- * Convert BlobQueryTextConfiguration to QuerySerialization type.
- *
- * @param textConfiguration -
+ * A `RpcOutputStream` that you control.
*/
-function toQuerySerialization(textConfiguration) {
- if (textConfiguration === undefined) {
- return undefined;
- }
- switch (textConfiguration.kind) {
- case "csv":
- return {
- format: {
- type: "delimited",
- delimitedTextConfiguration: {
- columnSeparator: textConfiguration.columnSeparator || ",",
- fieldQuote: textConfiguration.fieldQuote || "",
- recordSeparator: textConfiguration.recordSeparator,
- escapeChar: textConfiguration.escapeCharacter || "",
- headersPresent: textConfiguration.hasHeaders || false,
- },
- },
- };
- case "json":
- return {
- format: {
- type: "json",
- jsonTextConfiguration: {
- recordSeparator: textConfiguration.recordSeparator,
- },
- },
- };
- case "arrow":
- return {
- format: {
- type: "arrow",
- arrowConfiguration: {
- schema: textConfiguration.schema,
- },
- },
- };
- case "parquet":
- return {
- format: {
- type: "parquet",
- },
- };
- default:
- throw Error("Invalid BlobQueryTextConfiguration.");
- }
-}
-function parseObjectReplicationRecord(objectReplicationRecord) {
- if (!objectReplicationRecord) {
- return undefined;
- }
- if ("policy-id" in objectReplicationRecord) {
- // If the dictionary contains a key with policy id, we are not required to do any parsing since
- // the policy id should already be stored in the ObjectReplicationDestinationPolicyId.
- return undefined;
- }
- const orProperties = [];
- for (const key in objectReplicationRecord) {
- const ids = key.split("_");
- const policyPrefix = "or-";
- if (ids[0].startsWith(policyPrefix)) {
- ids[0] = ids[0].substring(policyPrefix.length);
- }
- const rule = {
- ruleId: ids[1],
- replicationStatus: objectReplicationRecord[key],
+class RpcOutputStreamController {
+ constructor() {
+ this._lis = {
+ nxt: [],
+ msg: [],
+ err: [],
+ cmp: [],
};
- const policyIndex = orProperties.findIndex((policy) => policy.policyId === ids[0]);
- if (policyIndex > -1) {
- orProperties[policyIndex].rules.push(rule);
- }
- else {
- orProperties.push({
- policyId: ids[0],
- rules: [rule],
- });
- }
+ this._closed = false;
+ // --- RpcOutputStream async iterator API
+ // iterator state.
+ // is undefined when no iterator has been acquired yet.
+ this._itState = { q: [] };
}
- return orProperties;
-}
-function httpAuthorizationToString(httpAuthorization) {
- return httpAuthorization ? httpAuthorization.scheme + " " + httpAuthorization.value : undefined;
-}
-function BlobNameToString(name) {
- if (name.encoded) {
- return decodeURIComponent(name.content);
+ // --- RpcOutputStream callback API
+ onNext(callback) {
+ return this.addLis(callback, this._lis.nxt);
}
- else {
- return name.content;
+ onMessage(callback) {
+ return this.addLis(callback, this._lis.msg);
}
-}
-function ConvertInternalResponseOfListBlobFlat(internalResponse) {
- return Object.assign(Object.assign({}, internalResponse), { segment: {
- blobItems: internalResponse.segment.blobItems.map((blobItemInteral) => {
- const blobItem = Object.assign(Object.assign({}, blobItemInteral), { name: BlobNameToString(blobItemInteral.name) });
- return blobItem;
- }),
- } });
-}
-function ConvertInternalResponseOfListBlobHierarchy(internalResponse) {
- var _a;
- return Object.assign(Object.assign({}, internalResponse), { segment: {
- blobPrefixes: (_a = internalResponse.segment.blobPrefixes) === null || _a === void 0 ? void 0 : _a.map((blobPrefixInternal) => {
- const blobPrefix = Object.assign(Object.assign({}, blobPrefixInternal), { name: BlobNameToString(blobPrefixInternal.name) });
- return blobPrefix;
- }),
- blobItems: internalResponse.segment.blobItems.map((blobItemInteral) => {
- const blobItem = Object.assign(Object.assign({}, blobItemInteral), { name: BlobNameToString(blobItemInteral.name) });
- return blobItem;
- }),
- } });
-}
-function* ExtractPageRangeInfoItems(getPageRangesSegment) {
- let pageRange = [];
- let clearRange = [];
- if (getPageRangesSegment.pageRange)
- pageRange = getPageRangesSegment.pageRange;
- if (getPageRangesSegment.clearRange)
- clearRange = getPageRangesSegment.clearRange;
- let pageRangeIndex = 0;
- let clearRangeIndex = 0;
- while (pageRangeIndex < pageRange.length && clearRangeIndex < clearRange.length) {
- if (pageRange[pageRangeIndex].start < clearRange[clearRangeIndex].start) {
- yield {
- start: pageRange[pageRangeIndex].start,
- end: pageRange[pageRangeIndex].end,
- isClear: false,
- };
- ++pageRangeIndex;
- }
- else {
- yield {
- start: clearRange[clearRangeIndex].start,
- end: clearRange[clearRangeIndex].end,
- isClear: true,
- };
- ++clearRangeIndex;
- }
+ onError(callback) {
+ return this.addLis(callback, this._lis.err);
}
- for (; pageRangeIndex < pageRange.length; ++pageRangeIndex) {
- yield {
- start: pageRange[pageRangeIndex].start,
- end: pageRange[pageRangeIndex].end,
- isClear: false,
- };
+ onComplete(callback) {
+ return this.addLis(callback, this._lis.cmp);
}
- for (; clearRangeIndex < clearRange.length; ++clearRangeIndex) {
- yield {
- start: clearRange[clearRangeIndex].start,
- end: clearRange[clearRangeIndex].end,
- isClear: true,
+ addLis(callback, list) {
+ list.push(callback);
+ return () => {
+ let i = list.indexOf(callback);
+ if (i >= 0)
+ list.splice(i, 1);
};
}
-}
-/**
- * Escape the blobName but keep path separator ('/').
- */
-function EscapePath(blobName) {
- const split = blobName.split("/");
- for (let i = 0; i < split.length; i++) {
- split[i] = encodeURIComponent(split[i]);
- }
- return split.join("/");
-}
-/**
- * A typesafe helper for ensuring that a given response object has
- * the original _response attached.
- * @param response - A response object from calling a client operation
- * @returns The same object, but with known _response property
- */
-function assertResponse(response) {
- if (`_response` in response) {
- return response;
+ // remove all listeners
+ clearLis() {
+ for (let l of Object.values(this._lis))
+ l.splice(0, l.length);
}
- throw new TypeError(`Unexpected response object ${response}`);
-}
-
-// Copyright (c) Microsoft Corporation.
-// Licensed under the MIT license.
-/**
- * RetryPolicy types.
- */
-exports.StorageRetryPolicyType = void 0;
-(function (StorageRetryPolicyType) {
+ // --- Controller API
/**
- * Exponential retry. Retry time delay grows exponentially.
+ * Is this stream already closed by a completion or error?
*/
- StorageRetryPolicyType[StorageRetryPolicyType["EXPONENTIAL"] = 0] = "EXPONENTIAL";
+ get closed() {
+ return this._closed !== false;
+ }
/**
- * Linear retry. Retry time delay grows linearly.
+ * Emit message, close with error, or close successfully, but only one
+ * at a time.
+ * Can be used to wrap a stream by using the other stream's `onNext`.
*/
- StorageRetryPolicyType[StorageRetryPolicyType["FIXED"] = 1] = "FIXED";
-})(exports.StorageRetryPolicyType || (exports.StorageRetryPolicyType = {}));
-// Default values of StorageRetryOptions
-const DEFAULT_RETRY_OPTIONS$1 = {
- maxRetryDelayInMs: 120 * 1000,
- maxTries: 4,
- retryDelayInMs: 4 * 1000,
- retryPolicyType: exports.StorageRetryPolicyType.EXPONENTIAL,
- secondaryHost: "",
- tryTimeoutInMs: undefined, // Use server side default timeout strategy
-};
-const RETRY_ABORT_ERROR$1 = new abortController.AbortError("The operation was aborted.");
-/**
- * Retry policy with exponential retry and linear retry implemented.
- */
-class StorageRetryPolicy extends BaseRequestPolicy {
+ notifyNext(message, error, complete) {
+ runtime_1.assert((message ? 1 : 0) + (error ? 1 : 0) + (complete ? 1 : 0) <= 1, 'only one emission at a time');
+ if (message)
+ this.notifyMessage(message);
+ if (error)
+ this.notifyError(error);
+ if (complete)
+ this.notifyComplete();
+ }
/**
- * Creates an instance of RetryPolicy.
+ * Emits a new message. Throws if stream is closed.
*
- * @param nextPolicy -
- * @param options -
- * @param retryOptions -
+ * Triggers onNext and onMessage callbacks.
*/
- constructor(nextPolicy, options, retryOptions = DEFAULT_RETRY_OPTIONS$1) {
- super(nextPolicy, options);
- // Initialize retry options
- this.retryOptions = {
- retryPolicyType: retryOptions.retryPolicyType
- ? retryOptions.retryPolicyType
- : DEFAULT_RETRY_OPTIONS$1.retryPolicyType,
- maxTries: retryOptions.maxTries && retryOptions.maxTries >= 1
- ? Math.floor(retryOptions.maxTries)
- : DEFAULT_RETRY_OPTIONS$1.maxTries,
- tryTimeoutInMs: retryOptions.tryTimeoutInMs && retryOptions.tryTimeoutInMs >= 0
- ? retryOptions.tryTimeoutInMs
- : DEFAULT_RETRY_OPTIONS$1.tryTimeoutInMs,
- retryDelayInMs: retryOptions.retryDelayInMs && retryOptions.retryDelayInMs >= 0
- ? Math.min(retryOptions.retryDelayInMs, retryOptions.maxRetryDelayInMs
- ? retryOptions.maxRetryDelayInMs
- : DEFAULT_RETRY_OPTIONS$1.maxRetryDelayInMs)
- : DEFAULT_RETRY_OPTIONS$1.retryDelayInMs,
- maxRetryDelayInMs: retryOptions.maxRetryDelayInMs && retryOptions.maxRetryDelayInMs >= 0
- ? retryOptions.maxRetryDelayInMs
- : DEFAULT_RETRY_OPTIONS$1.maxRetryDelayInMs,
- secondaryHost: retryOptions.secondaryHost
- ? retryOptions.secondaryHost
- : DEFAULT_RETRY_OPTIONS$1.secondaryHost,
- };
+ notifyMessage(message) {
+ runtime_1.assert(!this.closed, 'stream is closed');
+ this.pushIt({ value: message, done: false });
+ this._lis.msg.forEach(l => l(message));
+ this._lis.nxt.forEach(l => l(message, undefined, false));
}
/**
- * Sends request.
+ * Closes the stream with an error. Throws if stream is closed.
*
- * @param request -
+ * Triggers onNext and onError callbacks.
*/
- async sendRequest(request) {
- return this.attemptSendRequest(request, false, 1);
+ notifyError(error) {
+ runtime_1.assert(!this.closed, 'stream is closed');
+ this._closed = error;
+ this.pushIt(error);
+ this._lis.err.forEach(l => l(error));
+ this._lis.nxt.forEach(l => l(undefined, error, false));
+ this.clearLis();
}
/**
- * Decide and perform next retry. Won't mutate request parameter.
+ * Closes the stream successfully. Throws if stream is closed.
*
- * @param request -
- * @param secondaryHas404 - If attempt was against the secondary & it returned a StatusNotFound (404), then
- * the resource was not found. This may be due to replication delay. So, in this
- * case, we'll never try the secondary again for this operation.
- * @param attempt - How many retries has been attempted to performed, starting from 1, which includes
- * the attempt will be performed by this method call.
+ * Triggers onNext and onComplete callbacks.
*/
- async attemptSendRequest(request, secondaryHas404, attempt) {
- const newRequest = request.clone();
- const isPrimaryRetry = secondaryHas404 ||
- !this.retryOptions.secondaryHost ||
- !(request.method === "GET" || request.method === "HEAD" || request.method === "OPTIONS") ||
- attempt % 2 === 1;
- if (!isPrimaryRetry) {
- newRequest.url = setURLHost(newRequest.url, this.retryOptions.secondaryHost);
- }
- // Set the server-side timeout query parameter "timeout=[seconds]"
- if (this.retryOptions.tryTimeoutInMs) {
- newRequest.url = setURLParameter(newRequest.url, URLConstants.Parameters.TIMEOUT, Math.floor(this.retryOptions.tryTimeoutInMs / 1000).toString());
- }
- let response;
- try {
- logger.info(`RetryPolicy: =====> Try=${attempt} ${isPrimaryRetry ? "Primary" : "Secondary"}`);
- response = await this._nextPolicy.sendRequest(newRequest);
- if (!this.shouldRetry(isPrimaryRetry, attempt, response)) {
- return response;
- }
- secondaryHas404 = secondaryHas404 || (!isPrimaryRetry && response.status === 404);
- }
- catch (err) {
- logger.error(`RetryPolicy: Caught error, message: ${err.message}, code: ${err.code}`);
- if (!this.shouldRetry(isPrimaryRetry, attempt, response, err)) {
- throw err;
- }
- }
- await this.delay(isPrimaryRetry, attempt, request.abortSignal);
- return this.attemptSendRequest(request, secondaryHas404, ++attempt);
+ notifyComplete() {
+ runtime_1.assert(!this.closed, 'stream is closed');
+ this._closed = true;
+ this.pushIt({ value: null, done: true });
+ this._lis.cmp.forEach(l => l());
+ this._lis.nxt.forEach(l => l(undefined, undefined, true));
+ this.clearLis();
}
/**
- * Decide whether to retry according to last HTTP response and retry counters.
+ * Creates an async iterator (that can be used with `for await {...}`)
+ * to consume the stream.
*
- * @param isPrimaryRetry -
- * @param attempt -
- * @param response -
- * @param err -
+ * Some things to note:
+ * - If an error occurs, the `for await` will throw it.
+ * - If an error occurred before the `for await` was started, `for await`
+ * will re-throw it.
+ * - If the stream is already complete, the `for await` will be empty.
+ * - If your `for await` consumes slower than the stream produces,
+ * for example because you are relaying messages in a slow operation,
+ * messages are queued.
*/
- shouldRetry(isPrimaryRetry, attempt, response, err) {
- if (attempt >= this.retryOptions.maxTries) {
- logger.info(`RetryPolicy: Attempt(s) ${attempt} >= maxTries ${this.retryOptions
- .maxTries}, no further try.`);
- return false;
+ [Symbol.asyncIterator]() {
+ // if we are closed, we are definitely not receiving any more messages.
+ // but we can't let the iterator get stuck. we want to either:
+ // a) finish the new iterator immediately, because we are completed
+ // b) reject the new iterator, because we errored
+ if (this._closed === true)
+ this.pushIt({ value: null, done: true });
+ else if (this._closed !== false)
+ this.pushIt(this._closed);
+ // the async iterator
+ return {
+ next: () => {
+ let state = this._itState;
+ runtime_1.assert(state, "bad state"); // if we don't have a state here, code is broken
+ // there should be no pending result.
+ // did the consumer call next() before we resolved our previous result promise?
+ runtime_1.assert(!state.p, "iterator contract broken");
+ // did we produce faster than the iterator consumed?
+ // return the oldest result from the queue.
+ let first = state.q.shift();
+ if (first)
+ return ("value" in first) ? Promise.resolve(first) : Promise.reject(first);
+ // we have no result ATM, but we promise one.
+ // as soon as we have a result, we must resolve promise.
+ state.p = new deferred_1.Deferred();
+ return state.p.promise;
+ },
+ };
+ }
+ // "push" a new iterator result.
+ // this either resolves a pending promise, or enqueues the result.
+ pushIt(result) {
+ let state = this._itState;
+ // is the consumer waiting for us?
+ if (state.p) {
+ // yes, consumer is waiting for this promise.
+ const p = state.p;
+ runtime_1.assert(p.state == deferred_1.DeferredState.PENDING, "iterator contract broken");
+ // resolve the promise
+ ("value" in result) ? p.resolve(result) : p.reject(result);
+ // must cleanup, otherwise iterator.next() would pick it up again.
+ delete state.p;
}
- // Handle network failures, you may need to customize the list when you implement
- // your own http client
- const retriableErrors = [
- "ETIMEDOUT",
- "ESOCKETTIMEDOUT",
- "ECONNREFUSED",
- "ECONNRESET",
- "ENOENT",
- "ENOTFOUND",
- "TIMEOUT",
- "EPIPE",
- "REQUEST_SEND_ERROR", // For default xhr based http client provided in ms-rest-js
- ];
- if (err) {
- for (const retriableError of retriableErrors) {
- if (err.name.toUpperCase().includes(retriableError) ||
- err.message.toUpperCase().includes(retriableError) ||
- (err.code && err.code.toString().toUpperCase() === retriableError)) {
- logger.info(`RetryPolicy: Network error ${retriableError} found, will retry.`);
- return true;
- }
- }
- }
- // If attempt was against the secondary & it returned a StatusNotFound (404), then
- // the resource was not found. This may be due to replication delay. So, in this
- // case, we'll never try the secondary again for this operation.
- if (response || err) {
- const statusCode = response ? response.status : err ? err.statusCode : 0;
- if (!isPrimaryRetry && statusCode === 404) {
- logger.info(`RetryPolicy: Secondary access with 404, will retry.`);
- return true;
- }
- // Server internal error or server timeout
- if (statusCode === 503 || statusCode === 500) {
- logger.info(`RetryPolicy: Will retry for status code ${statusCode}.`);
- return true;
- }
- }
- // [Copy source error code] Feature is pending on service side, skip retry on copy source error for now.
- // if (response) {
- // // Retry select Copy Source Error Codes.
- // if (response?.status >= 400) {
- // const copySourceError = response.headers.get(HeaderConstants.X_MS_CopySourceErrorCode);
- // if (copySourceError !== undefined) {
- // switch (copySourceError) {
- // case "InternalError":
- // case "OperationTimedOut":
- // case "ServerBusy":
- // return true;
- // }
- // }
- // }
- // }
- if ((err === null || err === void 0 ? void 0 : err.code) === "PARSE_ERROR" && (err === null || err === void 0 ? void 0 : err.message.startsWith(`Error "Error: Unclosed root tag`))) {
- logger.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry.");
- return true;
+ else {
+ // we are producing faster than the iterator consumes.
+ // push result onto queue.
+ state.q.push(result);
}
- return false;
+ }
+}
+exports.RpcOutputStreamController = RpcOutputStreamController;
+
+
+/***/ }),
+
+/***/ 27072:
+/***/ ((__unused_webpack_module, exports) => {
+
+"use strict";
+
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.ServerCallContextController = void 0;
+class ServerCallContextController {
+ constructor(method, headers, deadline, sendResponseHeadersFn, defaultStatus = { code: 'OK', detail: '' }) {
+ this._cancelled = false;
+ this._listeners = [];
+ this.method = method;
+ this.headers = headers;
+ this.deadline = deadline;
+ this.trailers = {};
+ this._sendRH = sendResponseHeadersFn;
+ this.status = defaultStatus;
}
/**
- * Delay a calculated time between retries.
+ * Set the call cancelled.
*
- * @param isPrimaryRetry -
- * @param attempt -
- * @param abortSignal -
+ * Invokes all callbacks registered with onCancel() and
+ * sets `cancelled = true`.
*/
- async delay(isPrimaryRetry, attempt, abortSignal) {
- let delayTimeInMs = 0;
- if (isPrimaryRetry) {
- switch (this.retryOptions.retryPolicyType) {
- case exports.StorageRetryPolicyType.EXPONENTIAL:
- delayTimeInMs = Math.min((Math.pow(2, attempt - 1) - 1) * this.retryOptions.retryDelayInMs, this.retryOptions.maxRetryDelayInMs);
- break;
- case exports.StorageRetryPolicyType.FIXED:
- delayTimeInMs = this.retryOptions.retryDelayInMs;
- break;
+ notifyCancelled() {
+ if (!this._cancelled) {
+ this._cancelled = true;
+ for (let l of this._listeners) {
+ l();
}
}
- else {
- delayTimeInMs = Math.random() * 1000;
- }
- logger.info(`RetryPolicy: Delay for ${delayTimeInMs}ms`);
- return delay(delayTimeInMs, abortSignal, RETRY_ABORT_ERROR$1);
}
-}
-
-// Copyright (c) Microsoft Corporation.
-// Licensed under the MIT license.
-/**
- * StorageRetryPolicyFactory is a factory class helping generating {@link StorageRetryPolicy} objects.
- */
-class StorageRetryPolicyFactory {
/**
- * Creates an instance of StorageRetryPolicyFactory.
- * @param retryOptions -
+ * Send response headers.
*/
- constructor(retryOptions) {
- this.retryOptions = retryOptions;
+ sendResponseHeaders(data) {
+ this._sendRH(data);
}
/**
- * Creates a StorageRetryPolicy object.
+ * Is the call cancelled?
*
- * @param nextPolicy -
- * @param options -
+ * When the client closes the connection before the server
+ * is done, the call is cancelled.
+ *
+ * If you want to cancel a request on the server, throw a
+ * RpcError with the CANCELLED status code.
*/
- create(nextPolicy, options) {
- return new StorageRetryPolicy(nextPolicy, options, this.retryOptions);
+ get cancelled() {
+ return this._cancelled;
+ }
+ /**
+ * Add a callback for cancellation.
+ */
+ onCancel(callback) {
+ const l = this._listeners;
+ l.push(callback);
+ return () => {
+ let i = l.indexOf(callback);
+ if (i >= 0)
+ l.splice(i, 1);
+ };
}
}
+exports.ServerCallContextController = ServerCallContextController;
-// Copyright (c) Microsoft Corporation.
-// Licensed under the MIT license.
+
+/***/ }),
+
+/***/ 12069:
+/***/ (function(__unused_webpack_module, exports) {
+
+"use strict";
+
+var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
+ return new (P || (P = Promise))(function (resolve, reject) {
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
+ });
+};
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.ServerStreamingCall = void 0;
/**
- * Credential policy used to sign HTTP(S) requests before sending. This is an
- * abstract class.
+ * A server streaming RPC call. The client provides exactly one input message
+ * but the server may respond with 0, 1, or more messages.
*/
-class CredentialPolicy extends BaseRequestPolicy {
- /**
- * Sends out request.
- *
- * @param request -
- */
- sendRequest(request) {
- return this._nextPolicy.sendRequest(this.signRequest(request));
+class ServerStreamingCall {
+ constructor(method, requestHeaders, request, headers, response, status, trailers) {
+ this.method = method;
+ this.requestHeaders = requestHeaders;
+ this.request = request;
+ this.headers = headers;
+ this.responses = response;
+ this.status = status;
+ this.trailers = trailers;
}
/**
- * Child classes must implement this method with request signing. This method
- * will be executed in {@link sendRequest}.
- *
- * @param request -
+ * Instead of awaiting the response status and trailers, you can
+ * just as well await this call itself to receive the server outcome.
+ * You should first setup some listeners to the `request` to
+ * see the actual messages the server replied with.
*/
- signRequest(request) {
- // Child classes must override this method with request signing. This method
- // will be executed in sendRequest().
- return request;
+ then(onfulfilled, onrejected) {
+ return this.promiseFinished().then(value => onfulfilled ? Promise.resolve(onfulfilled(value)) : value, reason => onrejected ? Promise.resolve(onrejected(reason)) : Promise.reject(reason));
+ }
+ promiseFinished() {
+ return __awaiter(this, void 0, void 0, function* () {
+ let [headers, status, trailers] = yield Promise.all([this.headers, this.status, this.trailers]);
+ return {
+ method: this.method,
+ requestHeaders: this.requestHeaders,
+ request: this.request,
+ headers,
+ status,
+ trailers,
+ };
+ });
}
}
+exports.ServerStreamingCall = ServerStreamingCall;
-// Copyright (c) Microsoft Corporation.
-// Licensed under the MIT license.
-/*
- * We need to imitate .Net culture-aware sorting, which is used in storage service.
- * Below tables contain sort-keys for en-US culture.
- */
-const table_lv0 = new Uint32Array([
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x71c, 0x0, 0x71f, 0x721,
- 0x723, 0x725, 0x0, 0x0, 0x0, 0x72d, 0x803, 0x0, 0x0, 0x733, 0x0, 0xd03, 0xd1a, 0xd1c, 0xd1e,
- 0xd20, 0xd22, 0xd24, 0xd26, 0xd28, 0xd2a, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xe02, 0xe09, 0xe0a,
- 0xe1a, 0xe21, 0xe23, 0xe25, 0xe2c, 0xe32, 0xe35, 0xe36, 0xe48, 0xe51, 0xe70, 0xe7c, 0xe7e, 0xe89,
- 0xe8a, 0xe91, 0xe99, 0xe9f, 0xea2, 0xea4, 0xea6, 0xea7, 0xea9, 0x0, 0x0, 0x0, 0x743, 0x744, 0x748,
- 0xe02, 0xe09, 0xe0a, 0xe1a, 0xe21, 0xe23, 0xe25, 0xe2c, 0xe32, 0xe35, 0xe36, 0xe48, 0xe51, 0xe70,
- 0xe7c, 0xe7e, 0xe89, 0xe8a, 0xe91, 0xe99, 0xe9f, 0xea2, 0xea4, 0xea6, 0xea7, 0xea9, 0x0, 0x74c,
- 0x0, 0x750, 0x0,
-]);
-const table_lv2 = new Uint32Array([
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12,
- 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12,
- 0x12, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
-]);
-const table_lv4 = new Uint32Array([
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x8012, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8212, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
-]);
-function compareHeader(lhs, rhs) {
- if (isLessThan(lhs, rhs))
- return -1;
- return 1;
-}
-function isLessThan(lhs, rhs) {
- const tables = [table_lv0, table_lv2, table_lv4];
- let curr_level = 0;
- let i = 0;
- let j = 0;
- while (curr_level < tables.length) {
- if (curr_level === tables.length - 1 && i !== j) {
- return i > j;
- }
- const weight1 = i < lhs.length ? tables[curr_level][lhs[i].charCodeAt(0)] : 0x1;
- const weight2 = j < rhs.length ? tables[curr_level][rhs[j].charCodeAt(0)] : 0x1;
- if (weight1 === 0x1 && weight2 === 0x1) {
- i = 0;
- j = 0;
- ++curr_level;
- }
- else if (weight1 === weight2) {
- ++i;
- ++j;
- }
- else if (weight1 === 0) {
- ++i;
- }
- else if (weight2 === 0) {
- ++j;
- }
- else {
- return weight1 < weight2;
- }
+
+/***/ }),
+
+/***/ 31636:
+/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
+
+"use strict";
+
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.ServiceType = void 0;
+const reflection_info_1 = __nccwpck_require__(19768);
+class ServiceType {
+ constructor(typeName, methods, options) {
+ this.typeName = typeName;
+ this.methods = methods.map(i => reflection_info_1.normalizeMethodInfo(i, this));
+ this.options = options !== null && options !== void 0 ? options : {};
}
- return false;
}
+exports.ServiceType = ServiceType;
-// Copyright (c) Microsoft Corporation.
-// Licensed under the MIT license.
+
+/***/ }),
+
+/***/ 28330:
+/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
+
+"use strict";
+
+var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
+ return new (P || (P = Promise))(function (resolve, reject) {
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
+ });
+};
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.TestTransport = void 0;
+const rpc_error_1 = __nccwpck_require__(15908);
+const runtime_1 = __nccwpck_require__(68140);
+const rpc_output_stream_1 = __nccwpck_require__(27374);
+const rpc_options_1 = __nccwpck_require__(91816);
+const unary_call_1 = __nccwpck_require__(90368);
+const server_streaming_call_1 = __nccwpck_require__(12069);
+const client_streaming_call_1 = __nccwpck_require__(69113);
+const duplex_streaming_call_1 = __nccwpck_require__(17090);
/**
- * StorageSharedKeyCredentialPolicy is a policy used to sign HTTP request with a shared key.
+ * Transport for testing.
*/
-class StorageSharedKeyCredentialPolicy extends CredentialPolicy {
+class TestTransport {
/**
- * Creates an instance of StorageSharedKeyCredentialPolicy.
- * @param nextPolicy -
- * @param options -
- * @param factory -
+ * Initialize with mock data. Omitted fields have default value.
*/
- constructor(nextPolicy, options, factory) {
- super(nextPolicy, options);
- this.factory = factory;
+ constructor(data) {
+ /**
+ * Suppress warning / error about uncaught rejections of
+ * "status" and "trailers".
+ */
+ this.suppressUncaughtRejections = true;
+ this.headerDelay = 10;
+ this.responseDelay = 50;
+ this.betweenResponseDelay = 10;
+ this.afterResponseDelay = 10;
+ this.data = data !== null && data !== void 0 ? data : {};
}
/**
- * Signs request.
- *
- * @param request -
+ * Sent message(s) during the last operation.
*/
- signRequest(request) {
- request.headers.set(HeaderConstants.X_MS_DATE, new Date().toUTCString());
- if (request.body &&
- (typeof request.body === "string" || request.body !== undefined) &&
- request.body.length > 0) {
- request.headers.set(HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body));
+ get sentMessages() {
+ if (this.lastInput instanceof TestInputStream) {
+ return this.lastInput.sent;
}
- const stringToSign = [
- request.method.toUpperCase(),
- this.getHeaderValueToSign(request, HeaderConstants.CONTENT_LANGUAGE),
- this.getHeaderValueToSign(request, HeaderConstants.CONTENT_ENCODING),
- this.getHeaderValueToSign(request, HeaderConstants.CONTENT_LENGTH),
- this.getHeaderValueToSign(request, HeaderConstants.CONTENT_MD5),
- this.getHeaderValueToSign(request, HeaderConstants.CONTENT_TYPE),
- this.getHeaderValueToSign(request, HeaderConstants.DATE),
- this.getHeaderValueToSign(request, HeaderConstants.IF_MODIFIED_SINCE),
- this.getHeaderValueToSign(request, HeaderConstants.IF_MATCH),
- this.getHeaderValueToSign(request, HeaderConstants.IF_NONE_MATCH),
- this.getHeaderValueToSign(request, HeaderConstants.IF_UNMODIFIED_SINCE),
- this.getHeaderValueToSign(request, HeaderConstants.RANGE),
- ].join("\n") +
- "\n" +
- this.getCanonicalizedHeadersString(request) +
- this.getCanonicalizedResourceString(request);
- const signature = this.factory.computeHMACSHA256(stringToSign);
- request.headers.set(HeaderConstants.AUTHORIZATION, `SharedKey ${this.factory.accountName}:${signature}`);
- // console.log(`[URL]:${request.url}`);
- // console.log(`[HEADERS]:${request.headers.toString()}`);
- // console.log(`[STRING TO SIGN]:${JSON.stringify(stringToSign)}`);
- // console.log(`[KEY]: ${request.headers.get(HeaderConstants.AUTHORIZATION)}`);
- return request;
+ else if (typeof this.lastInput == "object") {
+ return [this.lastInput.single];
+ }
+ return [];
}
/**
- * Retrieve header value according to shared key sign rules.
- * @see https://docs.microsoft.com/en-us/rest/api/storageservices/authenticate-with-shared-key
- *
- * @param request -
- * @param headerName -
+ * Sending message(s) completed?
*/
- getHeaderValueToSign(request, headerName) {
- const value = request.headers.get(headerName);
- if (!value) {
- return "";
+ get sendComplete() {
+ if (this.lastInput instanceof TestInputStream) {
+ return this.lastInput.completed;
}
- // When using version 2015-02-21 or later, if Content-Length is zero, then
- // set the Content-Length part of the StringToSign to an empty string.
- // https://docs.microsoft.com/en-us/rest/api/storageservices/authenticate-with-shared-key
- if (headerName === HeaderConstants.CONTENT_LENGTH && value === "0") {
- return "";
+ else if (typeof this.lastInput == "object") {
+ return true;
}
- return value;
+ return false;
}
- /**
- * To construct the CanonicalizedHeaders portion of the signature string, follow these steps:
- * 1. Retrieve all headers for the resource that begin with x-ms-, including the x-ms-date header.
- * 2. Convert each HTTP header name to lowercase.
- * 3. Sort the headers lexicographically by header name, in ascending order.
- * Each header may appear only once in the string.
- * 4. Replace any linear whitespace in the header value with a single space.
- * 5. Trim any whitespace around the colon in the header.
- * 6. Finally, append a new-line character to each canonicalized header in the resulting list.
- * Construct the CanonicalizedHeaders string by concatenating all headers in this list into a single string.
- *
- * @param request -
- */
- getCanonicalizedHeadersString(request) {
- let headersArray = request.headers.headersArray().filter((value) => {
- return value.name.toLowerCase().startsWith(HeaderConstants.PREFIX_FOR_STORAGE);
- });
- headersArray.sort((a, b) => {
- return compareHeader(a.name.toLowerCase(), b.name.toLowerCase());
- });
- // Remove duplicate headers
- headersArray = headersArray.filter((value, index, array) => {
- if (index > 0 && value.name.toLowerCase() === array[index - 1].name.toLowerCase()) {
- return false;
- }
- return true;
- });
- let canonicalizedHeadersStringToSign = "";
- headersArray.forEach((header) => {
- canonicalizedHeadersStringToSign += `${header.name
- .toLowerCase()
- .trimRight()}:${header.value.trimLeft()}\n`;
- });
- return canonicalizedHeadersStringToSign;
+ // Creates a promise for response headers from the mock data.
+ promiseHeaders() {
+ var _a;
+ const headers = (_a = this.data.headers) !== null && _a !== void 0 ? _a : TestTransport.defaultHeaders;
+ return headers instanceof rpc_error_1.RpcError
+ ? Promise.reject(headers)
+ : Promise.resolve(headers);
+ }
+ // Creates a promise for a single, valid, message from the mock data.
+ promiseSingleResponse(method) {
+ if (this.data.response instanceof rpc_error_1.RpcError) {
+ return Promise.reject(this.data.response);
+ }
+ let r;
+ if (Array.isArray(this.data.response)) {
+ runtime_1.assert(this.data.response.length > 0);
+ r = this.data.response[0];
+ }
+ else if (this.data.response !== undefined) {
+ r = this.data.response;
+ }
+ else {
+ r = method.O.create();
+ }
+ runtime_1.assert(method.O.is(r));
+ return Promise.resolve(r);
}
/**
- * Retrieves the webResource canonicalized resource string.
+ * Pushes response messages from the mock data to the output stream.
+ * If an error response, status or trailers are mocked, the stream is
+ * closed with the respective error.
+ * Otherwise, stream is completed successfully.
*
- * @param request -
+ * The returned promise resolves when the stream is closed. It should
+ * not reject. If it does, code is broken.
*/
- getCanonicalizedResourceString(request) {
- const path = getURLPath(request.url) || "/";
- let canonicalizedResourceString = "";
- canonicalizedResourceString += `/${this.factory.accountName}${path}`;
- const queries = getURLQueries(request.url);
- const lowercaseQueries = {};
- if (queries) {
- const queryKeys = [];
- for (const key in queries) {
- if (Object.prototype.hasOwnProperty.call(queries, key)) {
- const lowercaseKey = key.toLowerCase();
- lowercaseQueries[lowercaseKey] = queries[key];
- queryKeys.push(lowercaseKey);
+ streamResponses(method, stream, abort) {
+ return __awaiter(this, void 0, void 0, function* () {
+ // normalize "data.response" into an array of valid output messages
+ const messages = [];
+ if (this.data.response === undefined) {
+ messages.push(method.O.create());
+ }
+ else if (Array.isArray(this.data.response)) {
+ for (let msg of this.data.response) {
+ runtime_1.assert(method.O.is(msg));
+ messages.push(msg);
}
}
- queryKeys.sort();
- for (const key of queryKeys) {
- canonicalizedResourceString += `\n${key}:${decodeURIComponent(lowercaseQueries[key])}`;
+ else if (!(this.data.response instanceof rpc_error_1.RpcError)) {
+ runtime_1.assert(method.O.is(this.data.response));
+ messages.push(this.data.response);
}
- }
- return canonicalizedResourceString;
+ // start the stream with an initial delay.
+ // if the request is cancelled, notify() error and exit.
+ try {
+ yield delay(this.responseDelay, abort)(undefined);
+ }
+ catch (error) {
+ stream.notifyError(error);
+ return;
+ }
+ // if error response was mocked, notify() error (stream is now closed with error) and exit.
+ if (this.data.response instanceof rpc_error_1.RpcError) {
+ stream.notifyError(this.data.response);
+ return;
+ }
+ // regular response messages were mocked. notify() them.
+ for (let msg of messages) {
+ stream.notifyMessage(msg);
+ // add a short delay between responses
+ // if the request is cancelled, notify() error and exit.
+ try {
+ yield delay(this.betweenResponseDelay, abort)(undefined);
+ }
+ catch (error) {
+ stream.notifyError(error);
+ return;
+ }
+ }
+ // error status was mocked, notify() error (stream is now closed with error) and exit.
+ if (this.data.status instanceof rpc_error_1.RpcError) {
+ stream.notifyError(this.data.status);
+ return;
+ }
+ // error trailers were mocked, notify() error (stream is now closed with error) and exit.
+ if (this.data.trailers instanceof rpc_error_1.RpcError) {
+ stream.notifyError(this.data.trailers);
+ return;
+ }
+ // stream completed successfully
+ stream.notifyComplete();
+ });
}
-}
-
-// Copyright (c) Microsoft Corporation.
-// Licensed under the MIT license.
-/**
- * Credential is an abstract class for Azure Storage HTTP requests signing. This
- * class will host an credentialPolicyCreator factory which generates CredentialPolicy.
- */
-class Credential {
- /**
- * Creates a RequestPolicy object.
- *
- * @param _nextPolicy -
- * @param _options -
- */
- create(_nextPolicy, _options) {
- throw new Error("Method should be implemented in children classes.");
+ // Creates a promise for response status from the mock data.
+ promiseStatus() {
+ var _a;
+ const status = (_a = this.data.status) !== null && _a !== void 0 ? _a : TestTransport.defaultStatus;
+ return status instanceof rpc_error_1.RpcError
+ ? Promise.reject(status)
+ : Promise.resolve(status);
+ }
+ // Creates a promise for response trailers from the mock data.
+ promiseTrailers() {
+ var _a;
+ const trailers = (_a = this.data.trailers) !== null && _a !== void 0 ? _a : TestTransport.defaultTrailers;
+ return trailers instanceof rpc_error_1.RpcError
+ ? Promise.reject(trailers)
+ : Promise.resolve(trailers);
+ }
+ maybeSuppressUncaught(...promise) {
+ if (this.suppressUncaughtRejections) {
+ for (let p of promise) {
+ p.catch(() => {
+ });
+ }
+ }
+ }
+ mergeOptions(options) {
+ return rpc_options_1.mergeRpcOptions({}, options);
+ }
+ unary(method, input, options) {
+ var _a;
+ const requestHeaders = (_a = options.meta) !== null && _a !== void 0 ? _a : {}, headersPromise = this.promiseHeaders()
+ .then(delay(this.headerDelay, options.abort)), responsePromise = headersPromise
+ .catch(_ => {
+ })
+ .then(delay(this.responseDelay, options.abort))
+ .then(_ => this.promiseSingleResponse(method)), statusPromise = responsePromise
+ .catch(_ => {
+ })
+ .then(delay(this.afterResponseDelay, options.abort))
+ .then(_ => this.promiseStatus()), trailersPromise = responsePromise
+ .catch(_ => {
+ })
+ .then(delay(this.afterResponseDelay, options.abort))
+ .then(_ => this.promiseTrailers());
+ this.maybeSuppressUncaught(statusPromise, trailersPromise);
+ this.lastInput = { single: input };
+ return new unary_call_1.UnaryCall(method, requestHeaders, input, headersPromise, responsePromise, statusPromise, trailersPromise);
+ }
+ serverStreaming(method, input, options) {
+ var _a;
+ const requestHeaders = (_a = options.meta) !== null && _a !== void 0 ? _a : {}, headersPromise = this.promiseHeaders()
+ .then(delay(this.headerDelay, options.abort)), outputStream = new rpc_output_stream_1.RpcOutputStreamController(), responseStreamClosedPromise = headersPromise
+ .then(delay(this.responseDelay, options.abort))
+ .catch(() => {
+ })
+ .then(() => this.streamResponses(method, outputStream, options.abort))
+ .then(delay(this.afterResponseDelay, options.abort)), statusPromise = responseStreamClosedPromise
+ .then(() => this.promiseStatus()), trailersPromise = responseStreamClosedPromise
+ .then(() => this.promiseTrailers());
+ this.maybeSuppressUncaught(statusPromise, trailersPromise);
+ this.lastInput = { single: input };
+ return new server_streaming_call_1.ServerStreamingCall(method, requestHeaders, input, headersPromise, outputStream, statusPromise, trailersPromise);
+ }
+ clientStreaming(method, options) {
+ var _a;
+ const requestHeaders = (_a = options.meta) !== null && _a !== void 0 ? _a : {}, headersPromise = this.promiseHeaders()
+ .then(delay(this.headerDelay, options.abort)), responsePromise = headersPromise
+ .catch(_ => {
+ })
+ .then(delay(this.responseDelay, options.abort))
+ .then(_ => this.promiseSingleResponse(method)), statusPromise = responsePromise
+ .catch(_ => {
+ })
+ .then(delay(this.afterResponseDelay, options.abort))
+ .then(_ => this.promiseStatus()), trailersPromise = responsePromise
+ .catch(_ => {
+ })
+ .then(delay(this.afterResponseDelay, options.abort))
+ .then(_ => this.promiseTrailers());
+ this.maybeSuppressUncaught(statusPromise, trailersPromise);
+ this.lastInput = new TestInputStream(this.data, options.abort);
+ return new client_streaming_call_1.ClientStreamingCall(method, requestHeaders, this.lastInput, headersPromise, responsePromise, statusPromise, trailersPromise);
+ }
+ duplex(method, options) {
+ var _a;
+ const requestHeaders = (_a = options.meta) !== null && _a !== void 0 ? _a : {}, headersPromise = this.promiseHeaders()
+ .then(delay(this.headerDelay, options.abort)), outputStream = new rpc_output_stream_1.RpcOutputStreamController(), responseStreamClosedPromise = headersPromise
+ .then(delay(this.responseDelay, options.abort))
+ .catch(() => {
+ })
+ .then(() => this.streamResponses(method, outputStream, options.abort))
+ .then(delay(this.afterResponseDelay, options.abort)), statusPromise = responseStreamClosedPromise
+ .then(() => this.promiseStatus()), trailersPromise = responseStreamClosedPromise
+ .then(() => this.promiseTrailers());
+ this.maybeSuppressUncaught(statusPromise, trailersPromise);
+ this.lastInput = new TestInputStream(this.data, options.abort);
+ return new duplex_streaming_call_1.DuplexStreamingCall(method, requestHeaders, this.lastInput, headersPromise, outputStream, statusPromise, trailersPromise);
+ }
+}
+exports.TestTransport = TestTransport;
+TestTransport.defaultHeaders = {
+ responseHeader: "test"
+};
+TestTransport.defaultStatus = {
+ code: "OK", detail: "all good"
+};
+TestTransport.defaultTrailers = {
+ responseTrailer: "test"
+};
+function delay(ms, abort) {
+ return (v) => new Promise((resolve, reject) => {
+ if (abort === null || abort === void 0 ? void 0 : abort.aborted) {
+ reject(new rpc_error_1.RpcError("user cancel", "CANCELLED"));
+ }
+ else {
+ const id = setTimeout(() => resolve(v), ms);
+ if (abort) {
+ abort.addEventListener("abort", ev => {
+ clearTimeout(id);
+ reject(new rpc_error_1.RpcError("user cancel", "CANCELLED"));
+ });
+ }
+ }
+ });
+}
+class TestInputStream {
+ constructor(data, abort) {
+ this._completed = false;
+ this._sent = [];
+ this.data = data;
+ this.abort = abort;
+ }
+ get sent() {
+ return this._sent;
+ }
+ get completed() {
+ return this._completed;
+ }
+ send(message) {
+ if (this.data.inputMessage instanceof rpc_error_1.RpcError) {
+ return Promise.reject(this.data.inputMessage);
+ }
+ const delayMs = this.data.inputMessage === undefined
+ ? 10
+ : this.data.inputMessage;
+ return Promise.resolve(undefined)
+ .then(() => {
+ this._sent.push(message);
+ })
+ .then(delay(delayMs, this.abort));
+ }
+ complete() {
+ if (this.data.inputComplete instanceof rpc_error_1.RpcError) {
+ return Promise.reject(this.data.inputComplete);
+ }
+ const delayMs = this.data.inputComplete === undefined
+ ? 10
+ : this.data.inputComplete;
+ return Promise.resolve(undefined)
+ .then(() => {
+ this._completed = true;
+ })
+ .then(delay(delayMs, this.abort));
}
}
-// Copyright (c) Microsoft Corporation.
-// Licensed under the MIT license.
+
+/***/ }),
+
+/***/ 90368:
+/***/ (function(__unused_webpack_module, exports) {
+
+"use strict";
+
+var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
+ return new (P || (P = Promise))(function (resolve, reject) {
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
+ });
+};
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.UnaryCall = void 0;
/**
- * ONLY AVAILABLE IN NODE.JS RUNTIME.
- *
- * StorageSharedKeyCredential for account key authorization of Azure Storage service.
+ * A unary RPC call. Unary means there is exactly one input message and
+ * exactly one output message unless an error occurred.
*/
-class StorageSharedKeyCredential extends Credential {
- /**
- * Creates an instance of StorageSharedKeyCredential.
- * @param accountName -
- * @param accountKey -
- */
- constructor(accountName, accountKey) {
- super();
- this.accountName = accountName;
- this.accountKey = Buffer.from(accountKey, "base64");
+class UnaryCall {
+ constructor(method, requestHeaders, request, headers, response, status, trailers) {
+ this.method = method;
+ this.requestHeaders = requestHeaders;
+ this.request = request;
+ this.headers = headers;
+ this.response = response;
+ this.status = status;
+ this.trailers = trailers;
}
/**
- * Creates a StorageSharedKeyCredentialPolicy object.
- *
- * @param nextPolicy -
- * @param options -
+ * If you are only interested in the final outcome of this call,
+ * you can await it to receive a `FinishedUnaryCall`.
*/
- create(nextPolicy, options) {
- return new StorageSharedKeyCredentialPolicy(nextPolicy, options, this);
+ then(onfulfilled, onrejected) {
+ return this.promiseFinished().then(value => onfulfilled ? Promise.resolve(onfulfilled(value)) : value, reason => onrejected ? Promise.resolve(onrejected(reason)) : Promise.reject(reason));
}
- /**
- * Generates a hash signature for an HTTP request or for a SAS.
- *
- * @param stringToSign -
- */
- computeHMACSHA256(stringToSign) {
- return crypto.createHmac("sha256", this.accountKey).update(stringToSign, "utf8").digest("base64");
+ promiseFinished() {
+ return __awaiter(this, void 0, void 0, function* () {
+ let [headers, response, status, trailers] = yield Promise.all([this.headers, this.response, this.status, this.trailers]);
+ return {
+ method: this.method,
+ requestHeaders: this.requestHeaders,
+ request: this.request,
+ headers,
+ response,
+ status,
+ trailers
+ };
+ });
}
}
+exports.UnaryCall = UnaryCall;
-// Copyright (c) Microsoft Corporation.
-// Licensed under the MIT license.
+
+/***/ }),
+
+/***/ 64828:
+/***/ ((__unused_webpack_module, exports) => {
+
+"use strict";
+
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.assertFloat32 = exports.assertUInt32 = exports.assertInt32 = exports.assertNever = exports.assert = void 0;
/**
- * AnonymousCredentialPolicy is used with HTTP(S) requests that read public resources
- * or for use with Shared Access Signatures (SAS).
+ * assert that condition is true or throw error (with message)
*/
-class AnonymousCredentialPolicy extends CredentialPolicy {
- /**
- * Creates an instance of AnonymousCredentialPolicy.
- * @param nextPolicy -
- * @param options -
- */
- // The base class has a protected constructor. Adding a public one to enable constructing of this class.
- /* eslint-disable-next-line @typescript-eslint/no-useless-constructor*/
- constructor(nextPolicy, options) {
- super(nextPolicy, options);
+function assert(condition, msg) {
+ if (!condition) {
+ throw new Error(msg);
}
}
-
-// Copyright (c) Microsoft Corporation.
-// Licensed under the MIT license.
+exports.assert = assert;
/**
- * AnonymousCredential provides a credentialPolicyCreator member used to create
- * AnonymousCredentialPolicy objects. AnonymousCredentialPolicy is used with
- * HTTP(S) requests that read public resources or for use with Shared Access
- * Signatures (SAS).
+ * assert that value cannot exist = type `never`. throw runtime error if it does.
*/
-class AnonymousCredential extends Credential {
- /**
- * Creates an {@link AnonymousCredentialPolicy} object.
- *
- * @param nextPolicy -
- * @param options -
- */
- create(nextPolicy, options) {
- return new AnonymousCredentialPolicy(nextPolicy, options);
- }
+function assertNever(value, msg) {
+ throw new Error(msg !== null && msg !== void 0 ? msg : 'Unexpected object: ' + value);
}
-
-// Copyright (c) Microsoft Corporation.
-// Licensed under the MIT license.
-let _defaultHttpClient;
-function getCachedDefaultHttpClient() {
- if (!_defaultHttpClient) {
- _defaultHttpClient = coreRestPipeline.createDefaultHttpClient();
- }
- return _defaultHttpClient;
+exports.assertNever = assertNever;
+const FLOAT32_MAX = 3.4028234663852886e+38, FLOAT32_MIN = -3.4028234663852886e+38, UINT32_MAX = 0xFFFFFFFF, INT32_MAX = 0X7FFFFFFF, INT32_MIN = -0X80000000;
+function assertInt32(arg) {
+ if (typeof arg !== "number")
+ throw new Error('invalid int 32: ' + typeof arg);
+ if (!Number.isInteger(arg) || arg > INT32_MAX || arg < INT32_MIN)
+ throw new Error('invalid int 32: ' + arg);
+}
+exports.assertInt32 = assertInt32;
+function assertUInt32(arg) {
+ if (typeof arg !== "number")
+ throw new Error('invalid uint 32: ' + typeof arg);
+ if (!Number.isInteger(arg) || arg > UINT32_MAX || arg < 0)
+ throw new Error('invalid uint 32: ' + arg);
+}
+exports.assertUInt32 = assertUInt32;
+function assertFloat32(arg) {
+ if (typeof arg !== "number")
+ throw new Error('invalid float 32: ' + typeof arg);
+ if (!Number.isFinite(arg))
+ return;
+ if (arg > FLOAT32_MAX || arg < FLOAT32_MIN)
+ throw new Error('invalid float 32: ' + arg);
}
+exports.assertFloat32 = assertFloat32;
-// Copyright (c) Microsoft Corporation.
-// Licensed under the MIT license.
-/**
- * The programmatic identifier of the StorageBrowserPolicy.
- */
-const storageBrowserPolicyName = "storageBrowserPolicy";
+
+/***/ }),
+
+/***/ 20841:
+/***/ ((__unused_webpack_module, exports) => {
+
+"use strict";
+
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.base64encode = exports.base64decode = void 0;
+// lookup table from base64 character to byte
+let encTable = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split('');
+// lookup table from base64 character *code* to byte because lookup by number is fast
+let decTable = [];
+for (let i = 0; i < encTable.length; i++)
+ decTable[encTable[i].charCodeAt(0)] = i;
+// support base64url variants
+decTable["-".charCodeAt(0)] = encTable.indexOf("+");
+decTable["_".charCodeAt(0)] = encTable.indexOf("/");
/**
- * storageBrowserPolicy is a policy used to prevent browsers from caching requests
- * and to remove cookies and explicit content-length headers.
+ * Decodes a base64 string to a byte array.
+ *
+ * - ignores white-space, including line breaks and tabs
+ * - allows inner padding (can decode concatenated base64 strings)
+ * - does not require padding
+ * - understands base64url encoding:
+ * "-" instead of "+",
+ * "_" instead of "/",
+ * no padding
*/
-function storageBrowserPolicy() {
- return {
- name: storageBrowserPolicyName,
- async sendRequest(request, next) {
- if (coreUtil.isNode) {
- return next(request);
- }
- if (request.method === "GET" || request.method === "HEAD") {
- request.url = setURLParameter(request.url, URLConstants.Parameters.FORCE_BROWSER_NO_CACHE, new Date().getTime().toString());
+function base64decode(base64Str) {
+ // estimate byte size, not accounting for inner padding and whitespace
+ let es = base64Str.length * 3 / 4;
+ // if (es % 3 !== 0)
+ // throw new Error('invalid base64 string');
+ if (base64Str[base64Str.length - 2] == '=')
+ es -= 2;
+ else if (base64Str[base64Str.length - 1] == '=')
+ es -= 1;
+ let bytes = new Uint8Array(es), bytePos = 0, // position in byte array
+ groupPos = 0, // position in base64 group
+ b, // current byte
+ p = 0 // previous byte
+ ;
+ for (let i = 0; i < base64Str.length; i++) {
+ b = decTable[base64Str.charCodeAt(i)];
+ if (b === undefined) {
+ // noinspection FallThroughInSwitchStatementJS
+ switch (base64Str[i]) {
+ case '=':
+ groupPos = 0; // reset state when padding found
+ case '\n':
+ case '\r':
+ case '\t':
+ case ' ':
+ continue; // skip white-space, and padding
+ default:
+ throw Error(`invalid base64 string.`);
}
- request.headers.delete(HeaderConstants.COOKIE);
- // According to XHR standards, content-length should be fully controlled by browsers
- request.headers.delete(HeaderConstants.CONTENT_LENGTH);
- return next(request);
- },
- };
+ }
+ switch (groupPos) {
+ case 0:
+ p = b;
+ groupPos = 1;
+ break;
+ case 1:
+ bytes[bytePos++] = p << 2 | (b & 48) >> 4;
+ p = b;
+ groupPos = 2;
+ break;
+ case 2:
+ bytes[bytePos++] = (p & 15) << 4 | (b & 60) >> 2;
+ p = b;
+ groupPos = 3;
+ break;
+ case 3:
+ bytes[bytePos++] = (p & 3) << 6 | b;
+ groupPos = 0;
+ break;
+ }
+ }
+ if (groupPos == 1)
+ throw Error(`invalid base64 string.`);
+ return bytes.subarray(0, bytePos);
}
-
-// Copyright (c) Microsoft Corporation.
-// Licensed under the MIT license.
+exports.base64decode = base64decode;
/**
- * Name of the {@link storageRetryPolicy}
+ * Encodes a byte array to a base64 string.
+ * Adds padding at the end.
+ * Does not insert newlines.
*/
-const storageRetryPolicyName = "storageRetryPolicy";
+function base64encode(bytes) {
+ let base64 = '', groupPos = 0, // position in base64 group
+ b, // current byte
+ p = 0; // carry over from previous byte
+ for (let i = 0; i < bytes.length; i++) {
+ b = bytes[i];
+ switch (groupPos) {
+ case 0:
+ base64 += encTable[b >> 2];
+ p = (b & 3) << 4;
+ groupPos = 1;
+ break;
+ case 1:
+ base64 += encTable[p | b >> 4];
+ p = (b & 15) << 2;
+ groupPos = 2;
+ break;
+ case 2:
+ base64 += encTable[p | b >> 6];
+ base64 += encTable[b & 63];
+ groupPos = 0;
+ break;
+ }
+ }
+ // padding required?
+ if (groupPos) {
+ base64 += encTable[p];
+ base64 += '=';
+ if (groupPos == 1)
+ base64 += '=';
+ }
+ return base64;
+}
+exports.base64encode = base64encode;
+
+
+/***/ }),
+
+/***/ 98218:
+/***/ ((__unused_webpack_module, exports) => {
+
+"use strict";
+
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.WireType = exports.mergeBinaryOptions = exports.UnknownFieldHandler = void 0;
/**
- * RetryPolicy types.
+ * This handler implements the default behaviour for unknown fields.
+ * When reading data, unknown fields are stored on the message, in a
+ * symbol property.
+ * When writing data, the symbol property is queried and unknown fields
+ * are serialized into the output again.
*/
-var StorageRetryPolicyType;
-(function (StorageRetryPolicyType) {
+var UnknownFieldHandler;
+(function (UnknownFieldHandler) {
/**
- * Exponential retry. Retry time delay grows exponentially.
+ * The symbol used to store unknown fields for a message.
+ * The property must conform to `UnknownFieldContainer`.
*/
- StorageRetryPolicyType[StorageRetryPolicyType["EXPONENTIAL"] = 0] = "EXPONENTIAL";
+ UnknownFieldHandler.symbol = Symbol.for("protobuf-ts/unknown");
/**
- * Linear retry. Retry time delay grows linearly.
+ * Store an unknown field during binary read directly on the message.
+ * This method is compatible with `BinaryReadOptions.readUnknownField`.
*/
- StorageRetryPolicyType[StorageRetryPolicyType["FIXED"] = 1] = "FIXED";
-})(StorageRetryPolicyType || (StorageRetryPolicyType = {}));
-// Default values of StorageRetryOptions
-const DEFAULT_RETRY_OPTIONS = {
- maxRetryDelayInMs: 120 * 1000,
- maxTries: 4,
- retryDelayInMs: 4 * 1000,
- retryPolicyType: StorageRetryPolicyType.EXPONENTIAL,
- secondaryHost: "",
- tryTimeoutInMs: undefined, // Use server side default timeout strategy
-};
-const retriableErrors = [
- "ETIMEDOUT",
- "ESOCKETTIMEDOUT",
- "ECONNREFUSED",
- "ECONNRESET",
- "ENOENT",
- "ENOTFOUND",
- "TIMEOUT",
- "EPIPE",
- "REQUEST_SEND_ERROR",
-];
-const RETRY_ABORT_ERROR = new abortController.AbortError("The operation was aborted.");
-/**
- * Retry policy with exponential retry and linear retry implemented.
- */
-function storageRetryPolicy(options = {}) {
- var _a, _b, _c, _d, _e, _f;
- const retryPolicyType = (_a = options.retryPolicyType) !== null && _a !== void 0 ? _a : DEFAULT_RETRY_OPTIONS.retryPolicyType;
- const maxTries = (_b = options.maxTries) !== null && _b !== void 0 ? _b : DEFAULT_RETRY_OPTIONS.maxTries;
- const retryDelayInMs = (_c = options.retryDelayInMs) !== null && _c !== void 0 ? _c : DEFAULT_RETRY_OPTIONS.retryDelayInMs;
- const maxRetryDelayInMs = (_d = options.maxRetryDelayInMs) !== null && _d !== void 0 ? _d : DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs;
- const secondaryHost = (_e = options.secondaryHost) !== null && _e !== void 0 ? _e : DEFAULT_RETRY_OPTIONS.secondaryHost;
- const tryTimeoutInMs = (_f = options.tryTimeoutInMs) !== null && _f !== void 0 ? _f : DEFAULT_RETRY_OPTIONS.tryTimeoutInMs;
- function shouldRetry({ isPrimaryRetry, attempt, response, error, }) {
- var _a, _b;
- if (attempt >= maxTries) {
- logger.info(`RetryPolicy: Attempt(s) ${attempt} >= maxTries ${maxTries}, no further try.`);
- return false;
- }
- if (error) {
- for (const retriableError of retriableErrors) {
- if (error.name.toUpperCase().includes(retriableError) ||
- error.message.toUpperCase().includes(retriableError) ||
- (error.code && error.code.toString().toUpperCase() === retriableError)) {
- logger.info(`RetryPolicy: Network error ${retriableError} found, will retry.`);
- return true;
- }
- }
- if ((error === null || error === void 0 ? void 0 : error.code) === "PARSE_ERROR" &&
- (error === null || error === void 0 ? void 0 : error.message.startsWith(`Error "Error: Unclosed root tag`))) {
- logger.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry.");
- return true;
- }
- }
- // If attempt was against the secondary & it returned a StatusNotFound (404), then
- // the resource was not found. This may be due to replication delay. So, in this
- // case, we'll never try the secondary again for this operation.
- if (response || error) {
- const statusCode = (_b = (_a = response === null || response === void 0 ? void 0 : response.status) !== null && _a !== void 0 ? _a : error === null || error === void 0 ? void 0 : error.statusCode) !== null && _b !== void 0 ? _b : 0;
- if (!isPrimaryRetry && statusCode === 404) {
- logger.info(`RetryPolicy: Secondary access with 404, will retry.`);
- return true;
- }
- // Server internal error or server timeout
- if (statusCode === 503 || statusCode === 500) {
- logger.info(`RetryPolicy: Will retry for status code ${statusCode}.`);
- return true;
- }
- }
- // [Copy source error code] Feature is pending on service side, skip retry on copy source error for now.
- // if (response) {
- // // Retry select Copy Source Error Codes.
- // if (response?.status >= 400) {
- // const copySourceError = response.headers.get(HeaderConstants.X_MS_CopySourceErrorCode);
- // if (copySourceError !== undefined) {
- // switch (copySourceError) {
- // case "InternalError":
- // case "OperationTimedOut":
- // case "ServerBusy":
- // return true;
- // }
- // }
- // }
- // }
- return false;
- }
- function calculateDelay(isPrimaryRetry, attempt) {
- let delayTimeInMs = 0;
- if (isPrimaryRetry) {
- switch (retryPolicyType) {
- case StorageRetryPolicyType.EXPONENTIAL:
- delayTimeInMs = Math.min((Math.pow(2, attempt - 1) - 1) * retryDelayInMs, maxRetryDelayInMs);
- break;
- case StorageRetryPolicyType.FIXED:
- delayTimeInMs = retryDelayInMs;
- break;
- }
- }
- else {
- delayTimeInMs = Math.random() * 1000;
- }
- logger.info(`RetryPolicy: Delay for ${delayTimeInMs}ms`);
- return delayTimeInMs;
- }
- return {
- name: storageRetryPolicyName,
- async sendRequest(request, next) {
- // Set the server-side timeout query parameter "timeout=[seconds]"
- if (tryTimeoutInMs) {
- request.url = setURLParameter(request.url, URLConstants.Parameters.TIMEOUT, String(Math.floor(tryTimeoutInMs / 1000)));
- }
- const primaryUrl = request.url;
- const secondaryUrl = secondaryHost ? setURLHost(request.url, secondaryHost) : undefined;
- let secondaryHas404 = false;
- let attempt = 1;
- let retryAgain = true;
- let response;
- let error;
- while (retryAgain) {
- const isPrimaryRetry = secondaryHas404 ||
- !secondaryUrl ||
- !["GET", "HEAD", "OPTIONS"].includes(request.method) ||
- attempt % 2 === 1;
- request.url = isPrimaryRetry ? primaryUrl : secondaryUrl;
- response = undefined;
- error = undefined;
- try {
- logger.info(`RetryPolicy: =====> Try=${attempt} ${isPrimaryRetry ? "Primary" : "Secondary"}`);
- response = await next(request);
- secondaryHas404 = secondaryHas404 || (!isPrimaryRetry && response.status === 404);
- }
- catch (e) {
- if (coreRestPipeline.isRestError(e)) {
- logger.error(`RetryPolicy: Caught error, message: ${e.message}, code: ${e.code}`);
- error = e;
- }
- else {
- logger.error(`RetryPolicy: Caught error, message: ${coreUtil.getErrorMessage(e)}`);
- throw e;
- }
- }
- retryAgain = shouldRetry({ isPrimaryRetry, attempt, response, error });
- if (retryAgain) {
- await delay(calculateDelay(isPrimaryRetry, attempt), request.abortSignal, RETRY_ABORT_ERROR);
- }
- attempt++;
- }
- if (response) {
- return response;
- }
- throw error !== null && error !== void 0 ? error : new coreRestPipeline.RestError("RetryPolicy failed without known error.");
- },
+ UnknownFieldHandler.onRead = (typeName, message, fieldNo, wireType, data) => {
+ let container = is(message) ? message[UnknownFieldHandler.symbol] : message[UnknownFieldHandler.symbol] = [];
+ container.push({ no: fieldNo, wireType, data });
};
-}
-
-// Copyright (c) Microsoft Corporation.
-// Licensed under the MIT license.
-/**
- * The programmatic identifier of the storageSharedKeyCredentialPolicy.
- */
-const storageSharedKeyCredentialPolicyName = "storageSharedKeyCredentialPolicy";
-/**
- * storageSharedKeyCredentialPolicy handles signing requests using storage account keys.
- */
-function storageSharedKeyCredentialPolicy(options) {
- function signRequest(request) {
- request.headers.set(HeaderConstants.X_MS_DATE, new Date().toUTCString());
- if (request.body &&
- (typeof request.body === "string" || Buffer.isBuffer(request.body)) &&
- request.body.length > 0) {
- request.headers.set(HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body));
- }
- const stringToSign = [
- request.method.toUpperCase(),
- getHeaderValueToSign(request, HeaderConstants.CONTENT_LANGUAGE),
- getHeaderValueToSign(request, HeaderConstants.CONTENT_ENCODING),
- getHeaderValueToSign(request, HeaderConstants.CONTENT_LENGTH),
- getHeaderValueToSign(request, HeaderConstants.CONTENT_MD5),
- getHeaderValueToSign(request, HeaderConstants.CONTENT_TYPE),
- getHeaderValueToSign(request, HeaderConstants.DATE),
- getHeaderValueToSign(request, HeaderConstants.IF_MODIFIED_SINCE),
- getHeaderValueToSign(request, HeaderConstants.IF_MATCH),
- getHeaderValueToSign(request, HeaderConstants.IF_NONE_MATCH),
- getHeaderValueToSign(request, HeaderConstants.IF_UNMODIFIED_SINCE),
- getHeaderValueToSign(request, HeaderConstants.RANGE),
- ].join("\n") +
- "\n" +
- getCanonicalizedHeadersString(request) +
- getCanonicalizedResourceString(request);
- const signature = crypto.createHmac("sha256", options.accountKey)
- .update(stringToSign, "utf8")
- .digest("base64");
- request.headers.set(HeaderConstants.AUTHORIZATION, `SharedKey ${options.accountName}:${signature}`);
- // console.log(`[URL]:${request.url}`);
- // console.log(`[HEADERS]:${request.headers.toString()}`);
- // console.log(`[STRING TO SIGN]:${JSON.stringify(stringToSign)}`);
- // console.log(`[KEY]: ${request.headers.get(HeaderConstants.AUTHORIZATION)}`);
- }
/**
- * Retrieve header value according to shared key sign rules.
- * @see https://docs.microsoft.com/en-us/rest/api/storageservices/authenticate-with-shared-key
+ * Write unknown fields stored for the message to the writer.
+ * This method is compatible with `BinaryWriteOptions.writeUnknownFields`.
*/
- function getHeaderValueToSign(request, headerName) {
- const value = request.headers.get(headerName);
- if (!value) {
- return "";
- }
- // When using version 2015-02-21 or later, if Content-Length is zero, then
- // set the Content-Length part of the StringToSign to an empty string.
- // https://docs.microsoft.com/en-us/rest/api/storageservices/authenticate-with-shared-key
- if (headerName === HeaderConstants.CONTENT_LENGTH && value === "0") {
- return "";
- }
- return value;
- }
+ UnknownFieldHandler.onWrite = (typeName, message, writer) => {
+ for (let { no, wireType, data } of UnknownFieldHandler.list(message))
+ writer.tag(no, wireType).raw(data);
+ };
/**
- * To construct the CanonicalizedHeaders portion of the signature string, follow these steps:
- * 1. Retrieve all headers for the resource that begin with x-ms-, including the x-ms-date header.
- * 2. Convert each HTTP header name to lowercase.
- * 3. Sort the headers lexicographically by header name, in ascending order.
- * Each header may appear only once in the string.
- * 4. Replace any linear whitespace in the header value with a single space.
- * 5. Trim any whitespace around the colon in the header.
- * 6. Finally, append a new-line character to each canonicalized header in the resulting list.
- * Construct the CanonicalizedHeaders string by concatenating all headers in this list into a single string.
- *
+ * List unknown fields stored for the message.
+ * Note that there may be multiples fields with the same number.
*/
- function getCanonicalizedHeadersString(request) {
- let headersArray = [];
- for (const [name, value] of request.headers) {
- if (name.toLowerCase().startsWith(HeaderConstants.PREFIX_FOR_STORAGE)) {
- headersArray.push({ name, value });
- }
- }
- headersArray.sort((a, b) => {
- return compareHeader(a.name.toLowerCase(), b.name.toLowerCase());
- });
- // Remove duplicate headers
- headersArray = headersArray.filter((value, index, array) => {
- if (index > 0 && value.name.toLowerCase() === array[index - 1].name.toLowerCase()) {
- return false;
- }
- return true;
- });
- let canonicalizedHeadersStringToSign = "";
- headersArray.forEach((header) => {
- canonicalizedHeadersStringToSign += `${header.name
- .toLowerCase()
- .trimRight()}:${header.value.trimLeft()}\n`;
- });
- return canonicalizedHeadersStringToSign;
- }
- function getCanonicalizedResourceString(request) {
- const path = getURLPath(request.url) || "/";
- let canonicalizedResourceString = "";
- canonicalizedResourceString += `/${options.accountName}${path}`;
- const queries = getURLQueries(request.url);
- const lowercaseQueries = {};
- if (queries) {
- const queryKeys = [];
- for (const key in queries) {
- if (Object.prototype.hasOwnProperty.call(queries, key)) {
- const lowercaseKey = key.toLowerCase();
- lowercaseQueries[lowercaseKey] = queries[key];
- queryKeys.push(lowercaseKey);
- }
- }
- queryKeys.sort();
- for (const key of queryKeys) {
- canonicalizedResourceString += `\n${key}:${decodeURIComponent(lowercaseQueries[key])}`;
- }
+ UnknownFieldHandler.list = (message, fieldNo) => {
+ if (is(message)) {
+ let all = message[UnknownFieldHandler.symbol];
+ return fieldNo ? all.filter(uf => uf.no == fieldNo) : all;
}
- return canonicalizedResourceString;
- }
- return {
- name: storageSharedKeyCredentialPolicyName,
- async sendRequest(request, next) {
- signRequest(request);
- return next(request);
- },
+ return [];
};
+ /**
+ * Returns the last unknown field by field number.
+ */
+ UnknownFieldHandler.last = (message, fieldNo) => UnknownFieldHandler.list(message, fieldNo).slice(-1)[0];
+ const is = (message) => message && Array.isArray(message[UnknownFieldHandler.symbol]);
+})(UnknownFieldHandler = exports.UnknownFieldHandler || (exports.UnknownFieldHandler = {}));
+/**
+ * Merges binary write or read options. Later values override earlier values.
+ */
+function mergeBinaryOptions(a, b) {
+ return Object.assign(Object.assign({}, a), b);
}
-
-// Copyright (c) Microsoft Corporation.
-// Licensed under the MIT license.
+exports.mergeBinaryOptions = mergeBinaryOptions;
/**
- * StorageBrowserPolicy will handle differences between Node.js and browser runtime, including:
- *
- * 1. Browsers cache GET/HEAD requests by adding conditional headers such as 'IF_MODIFIED_SINCE'.
- * StorageBrowserPolicy is a policy used to add a timestamp query to GET/HEAD request URL
- * thus avoid the browser cache.
+ * Protobuf binary format wire types.
*
- * 2. Remove cookie header for security
+ * A wire type provides just enough information to find the length of the
+ * following value.
*
- * 3. Remove content-length header to avoid browsers warning
+ * See https://developers.google.com/protocol-buffers/docs/encoding#structure
*/
-class StorageBrowserPolicy extends BaseRequestPolicy {
+var WireType;
+(function (WireType) {
/**
- * Creates an instance of StorageBrowserPolicy.
- * @param nextPolicy -
- * @param options -
+ * Used for int32, int64, uint32, uint64, sint32, sint64, bool, enum
*/
- // The base class has a protected constructor. Adding a public one to enable constructing of this class.
- /* eslint-disable-next-line @typescript-eslint/no-useless-constructor*/
- constructor(nextPolicy, options) {
- super(nextPolicy, options);
- }
+ WireType[WireType["Varint"] = 0] = "Varint";
/**
- * Sends out request.
+ * Used for fixed64, sfixed64, double.
+ * Always 8 bytes with little-endian byte order.
+ */
+ WireType[WireType["Bit64"] = 1] = "Bit64";
+ /**
+ * Used for string, bytes, embedded messages, packed repeated fields
*
- * @param request -
+ * Only repeated numeric types (types which use the varint, 32-bit,
+ * or 64-bit wire types) can be packed. In proto3, such fields are
+ * packed by default.
*/
- async sendRequest(request) {
- if (coreUtil.isNode) {
- return this._nextPolicy.sendRequest(request);
- }
- if (request.method.toUpperCase() === "GET" || request.method.toUpperCase() === "HEAD") {
- request.url = setURLParameter(request.url, URLConstants.Parameters.FORCE_BROWSER_NO_CACHE, new Date().getTime().toString());
- }
- request.headers.remove(HeaderConstants.COOKIE);
- // According to XHR standards, content-length should be fully controlled by browsers
- request.headers.remove(HeaderConstants.CONTENT_LENGTH);
- return this._nextPolicy.sendRequest(request);
- }
-}
+ WireType[WireType["LengthDelimited"] = 2] = "LengthDelimited";
+ /**
+ * Used for groups
+ * @deprecated
+ */
+ WireType[WireType["StartGroup"] = 3] = "StartGroup";
+ /**
+ * Used for groups
+ * @deprecated
+ */
+ WireType[WireType["EndGroup"] = 4] = "EndGroup";
+ /**
+ * Used for fixed32, sfixed32, float.
+ * Always 4 bytes with little-endian byte order.
+ */
+ WireType[WireType["Bit32"] = 5] = "Bit32";
+})(WireType = exports.WireType || (exports.WireType = {}));
-// Copyright (c) Microsoft Corporation.
-// Licensed under the MIT license.
+
+/***/ }),
+
+/***/ 49695:
+/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
+
+"use strict";
+
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.BinaryReader = exports.binaryReadOptions = void 0;
+const binary_format_contract_1 = __nccwpck_require__(98218);
+const pb_long_1 = __nccwpck_require__(38819);
+const goog_varint_1 = __nccwpck_require__(61605);
+const defaultsRead = {
+ readUnknownField: true,
+ readerFactory: bytes => new BinaryReader(bytes),
+};
/**
- * StorageBrowserPolicyFactory is a factory class helping generating StorageBrowserPolicy objects.
+ * Make options for reading binary data form partial options.
*/
-class StorageBrowserPolicyFactory {
+function binaryReadOptions(options) {
+ return options ? Object.assign(Object.assign({}, defaultsRead), options) : defaultsRead;
+}
+exports.binaryReadOptions = binaryReadOptions;
+class BinaryReader {
+ constructor(buf, textDecoder) {
+ this.varint64 = goog_varint_1.varint64read; // dirty cast for `this`
+ /**
+ * Read a `uint32` field, an unsigned 32 bit varint.
+ */
+ this.uint32 = goog_varint_1.varint32read; // dirty cast for `this` and access to protected `buf`
+ this.buf = buf;
+ this.len = buf.length;
+ this.pos = 0;
+ this.view = new DataView(buf.buffer, buf.byteOffset, buf.byteLength);
+ this.textDecoder = textDecoder !== null && textDecoder !== void 0 ? textDecoder : new TextDecoder("utf-8", {
+ fatal: true,
+ ignoreBOM: true,
+ });
+ }
/**
- * Creates a StorageBrowserPolicyFactory object.
- *
- * @param nextPolicy -
- * @param options -
+ * Reads a tag - field number and wire type.
*/
- create(nextPolicy, options) {
- return new StorageBrowserPolicy(nextPolicy, options);
+ tag() {
+ let tag = this.uint32(), fieldNo = tag >>> 3, wireType = tag & 7;
+ if (fieldNo <= 0 || wireType < 0 || wireType > 5)
+ throw new Error("illegal tag: field no " + fieldNo + " wire type " + wireType);
+ return [fieldNo, wireType];
}
-}
-
-// Copyright (c) Microsoft Corporation.
-// Licensed under the MIT license.
-/**
- * The programmatic identifier of the storageCorrectContentLengthPolicy.
- */
-const storageCorrectContentLengthPolicyName = "StorageCorrectContentLengthPolicy";
-/**
- * storageCorrectContentLengthPolicy to correctly set Content-Length header with request body length.
- */
-function storageCorrectContentLengthPolicy() {
- function correctContentLength(request) {
- if (request.body &&
- (typeof request.body === "string" || Buffer.isBuffer(request.body)) &&
- request.body.length > 0) {
- request.headers.set(HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body));
+ /**
+ * Skip one element on the wire and return the skipped data.
+ * Supports WireType.StartGroup since v2.0.0-alpha.23.
+ */
+ skip(wireType) {
+ let start = this.pos;
+ // noinspection FallThroughInSwitchStatementJS
+ switch (wireType) {
+ case binary_format_contract_1.WireType.Varint:
+ while (this.buf[this.pos++] & 0x80) {
+ // ignore
+ }
+ break;
+ case binary_format_contract_1.WireType.Bit64:
+ this.pos += 4;
+ case binary_format_contract_1.WireType.Bit32:
+ this.pos += 4;
+ break;
+ case binary_format_contract_1.WireType.LengthDelimited:
+ let len = this.uint32();
+ this.pos += len;
+ break;
+ case binary_format_contract_1.WireType.StartGroup:
+ // From descriptor.proto: Group type is deprecated, not supported in proto3.
+ // But we must still be able to parse and treat as unknown.
+ let t;
+ while ((t = this.tag()[1]) !== binary_format_contract_1.WireType.EndGroup) {
+ this.skip(t);
+ }
+ break;
+ default:
+ throw new Error("cant skip wire type " + wireType);
}
+ this.assertBounds();
+ return this.buf.subarray(start, this.pos);
}
- return {
- name: storageCorrectContentLengthPolicyName,
- async sendRequest(request, next) {
- correctContentLength(request);
- return next(request);
- },
- };
-}
-
-// Copyright (c) Microsoft Corporation.
-// Licensed under the MIT license.
-/**
- * A helper to decide if a given argument satisfies the Pipeline contract
- * @param pipeline - An argument that may be a Pipeline
- * @returns true when the argument satisfies the Pipeline contract
- */
-function isPipelineLike(pipeline) {
- if (!pipeline || typeof pipeline !== "object") {
- return false;
+ /**
+ * Throws error if position in byte array is out of range.
+ */
+ assertBounds() {
+ if (this.pos > this.len)
+ throw new RangeError("premature EOF");
}
- const castPipeline = pipeline;
- return (Array.isArray(castPipeline.factories) &&
- typeof castPipeline.options === "object" &&
- typeof castPipeline.toServiceClientOptions === "function");
-}
-/**
- * A Pipeline class containing HTTP request policies.
- * You can create a default Pipeline by calling {@link newPipeline}.
- * Or you can create a Pipeline with your own policies by the constructor of Pipeline.
- *
- * Refer to {@link newPipeline} and provided policies before implementing your
- * customized Pipeline.
- */
-class Pipeline {
/**
- * Creates an instance of Pipeline. Customize HTTPClient by implementing IHttpClient interface.
- *
- * @param factories -
- * @param options -
+ * Read a `int32` field, a signed 32 bit varint.
*/
- constructor(factories, options = {}) {
- this.factories = factories;
- this.options = options;
+ int32() {
+ return this.uint32() | 0;
}
/**
- * Transfer Pipeline object to ServiceClientOptions object which is required by
- * ServiceClient constructor.
- *
- * @returns The ServiceClientOptions object from this Pipeline.
+ * Read a `sint32` field, a signed, zigzag-encoded 32-bit varint.
*/
- toServiceClientOptions() {
- return {
- httpClient: this.options.httpClient,
- requestPolicyFactories: this.factories,
- };
+ sint32() {
+ let zze = this.uint32();
+ // decode zigzag
+ return (zze >>> 1) ^ -(zze & 1);
}
-}
-/**
- * Creates a new Pipeline object with Credential provided.
- *
- * @param credential - Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the `@azure/identity` package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used.
- * @param pipelineOptions - Optional. Options.
- * @returns A new Pipeline object.
- */
-function newPipeline(credential, pipelineOptions = {}) {
- if (!credential) {
- credential = new AnonymousCredential();
+ /**
+ * Read a `int64` field, a signed 64-bit varint.
+ */
+ int64() {
+ return new pb_long_1.PbLong(...this.varint64());
}
- const pipeline = new Pipeline([], pipelineOptions);
- pipeline._credential = credential;
- return pipeline;
-}
-function processDownlevelPipeline(pipeline) {
- const knownFactoryFunctions = [
- isAnonymousCredential,
- isStorageSharedKeyCredential,
- isCoreHttpBearerTokenFactory,
- isStorageBrowserPolicyFactory,
- isStorageRetryPolicyFactory,
- isStorageTelemetryPolicyFactory,
- isCoreHttpPolicyFactory,
- ];
- if (pipeline.factories.length) {
- const novelFactories = pipeline.factories.filter((factory) => {
- return !knownFactoryFunctions.some((knownFactory) => knownFactory(factory));
- });
- if (novelFactories.length) {
- const hasInjector = novelFactories.some((factory) => isInjectorPolicyFactory(factory));
- // if there are any left over, wrap in a requestPolicyFactoryPolicy
- return {
- wrappedPolicies: coreHttpCompat.createRequestPolicyFactoryPolicy(novelFactories),
- afterRetry: hasInjector,
- };
- }
+ /**
+ * Read a `uint64` field, an unsigned 64-bit varint.
+ */
+ uint64() {
+ return new pb_long_1.PbULong(...this.varint64());
}
- return undefined;
-}
-function getCoreClientOptions(pipeline) {
- var _a;
- const _b = pipeline.options, { httpClient: v1Client } = _b, restOptions = tslib.__rest(_b, ["httpClient"]);
- let httpClient = pipeline._coreHttpClient;
- if (!httpClient) {
- httpClient = v1Client ? coreHttpCompat.convertHttpClient(v1Client) : getCachedDefaultHttpClient();
- pipeline._coreHttpClient = httpClient;
+ /**
+ * Read a `sint64` field, a signed, zig-zag-encoded 64-bit varint.
+ */
+ sint64() {
+ let [lo, hi] = this.varint64();
+ // decode zig zag
+ let s = -(lo & 1);
+ lo = ((lo >>> 1 | (hi & 1) << 31) ^ s);
+ hi = (hi >>> 1 ^ s);
+ return new pb_long_1.PbLong(lo, hi);
}
- let corePipeline = pipeline._corePipeline;
- if (!corePipeline) {
- const packageDetails = `azsdk-js-azure-storage-blob/${SDK_VERSION}`;
- const userAgentPrefix = restOptions.userAgentOptions && restOptions.userAgentOptions.userAgentPrefix
- ? `${restOptions.userAgentOptions.userAgentPrefix} ${packageDetails}`
- : `${packageDetails}`;
- corePipeline = coreClient.createClientPipeline(Object.assign(Object.assign({}, restOptions), { loggingOptions: {
- additionalAllowedHeaderNames: StorageBlobLoggingAllowedHeaderNames,
- additionalAllowedQueryParameters: StorageBlobLoggingAllowedQueryParameters,
- logger: logger.info,
- }, userAgentOptions: {
- userAgentPrefix,
- }, serializationOptions: {
- stringifyXML: coreXml.stringifyXML,
- serializerOptions: {
- xml: {
- // Use customized XML char key of "#" so we can deserialize metadata
- // with "_" key
- xmlCharKey: "#",
- },
- },
- }, deserializationOptions: {
- parseXML: coreXml.parseXML,
- serializerOptions: {
- xml: {
- // Use customized XML char key of "#" so we can deserialize metadata
- // with "_" key
- xmlCharKey: "#",
- },
- },
- } }));
- corePipeline.removePolicy({ phase: "Retry" });
- corePipeline.removePolicy({ name: coreRestPipeline.decompressResponsePolicyName });
- corePipeline.addPolicy(storageCorrectContentLengthPolicy());
- corePipeline.addPolicy(storageRetryPolicy(restOptions.retryOptions), { phase: "Retry" });
- corePipeline.addPolicy(storageBrowserPolicy());
- const downlevelResults = processDownlevelPipeline(pipeline);
- if (downlevelResults) {
- corePipeline.addPolicy(downlevelResults.wrappedPolicies, downlevelResults.afterRetry ? { afterPhase: "Retry" } : undefined);
- }
- const credential = getCredentialFromPipeline(pipeline);
- if (coreAuth.isTokenCredential(credential)) {
- corePipeline.addPolicy(coreRestPipeline.bearerTokenAuthenticationPolicy({
- credential,
- scopes: (_a = restOptions.audience) !== null && _a !== void 0 ? _a : StorageOAuthScopes,
- challengeCallbacks: { authorizeRequestOnChallenge: coreClient.authorizeRequestOnTenantChallenge },
- }), { phase: "Sign" });
- }
- else if (credential instanceof StorageSharedKeyCredential) {
- corePipeline.addPolicy(storageSharedKeyCredentialPolicy({
- accountName: credential.accountName,
- accountKey: credential.accountKey,
- }), { phase: "Sign" });
- }
- pipeline._corePipeline = corePipeline;
+ /**
+ * Read a `bool` field, a variant.
+ */
+ bool() {
+ let [lo, hi] = this.varint64();
+ return lo !== 0 || hi !== 0;
+ }
+ /**
+ * Read a `fixed32` field, an unsigned, fixed-length 32-bit integer.
+ */
+ fixed32() {
+ return this.view.getUint32((this.pos += 4) - 4, true);
+ }
+ /**
+ * Read a `sfixed32` field, a signed, fixed-length 32-bit integer.
+ */
+ sfixed32() {
+ return this.view.getInt32((this.pos += 4) - 4, true);
+ }
+ /**
+ * Read a `fixed64` field, an unsigned, fixed-length 64 bit integer.
+ */
+ fixed64() {
+ return new pb_long_1.PbULong(this.sfixed32(), this.sfixed32());
+ }
+ /**
+ * Read a `fixed64` field, a signed, fixed-length 64-bit integer.
+ */
+ sfixed64() {
+ return new pb_long_1.PbLong(this.sfixed32(), this.sfixed32());
+ }
+ /**
+ * Read a `float` field, 32-bit floating point number.
+ */
+ float() {
+ return this.view.getFloat32((this.pos += 4) - 4, true);
+ }
+ /**
+ * Read a `double` field, a 64-bit floating point number.
+ */
+ double() {
+ return this.view.getFloat64((this.pos += 8) - 8, true);
+ }
+ /**
+ * Read a `bytes` field, length-delimited arbitrary data.
+ */
+ bytes() {
+ let len = this.uint32();
+ let start = this.pos;
+ this.pos += len;
+ this.assertBounds();
+ return this.buf.subarray(start, start + len);
+ }
+ /**
+ * Read a `string` field, length-delimited data converted to UTF-8 text.
+ */
+ string() {
+ return this.textDecoder.decode(this.bytes());
}
- return Object.assign(Object.assign({}, restOptions), { allowInsecureConnection: true, httpClient, pipeline: corePipeline });
}
-function getCredentialFromPipeline(pipeline) {
- // see if we squirreled one away on the type itself
- if (pipeline._credential) {
- return pipeline._credential;
+exports.BinaryReader = BinaryReader;
+
+
+/***/ }),
+
+/***/ 70079:
+/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
+
+"use strict";
+
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.BinaryWriter = exports.binaryWriteOptions = void 0;
+const pb_long_1 = __nccwpck_require__(38819);
+const goog_varint_1 = __nccwpck_require__(61605);
+const assert_1 = __nccwpck_require__(64828);
+const defaultsWrite = {
+ writeUnknownFields: true,
+ writerFactory: () => new BinaryWriter(),
+};
+/**
+ * Make options for writing binary data form partial options.
+ */
+function binaryWriteOptions(options) {
+ return options ? Object.assign(Object.assign({}, defaultsWrite), options) : defaultsWrite;
+}
+exports.binaryWriteOptions = binaryWriteOptions;
+class BinaryWriter {
+ constructor(textEncoder) {
+ /**
+ * Previous fork states.
+ */
+ this.stack = [];
+ this.textEncoder = textEncoder !== null && textEncoder !== void 0 ? textEncoder : new TextEncoder();
+ this.chunks = [];
+ this.buf = [];
}
- // if it came from another package, loop over the factories and look for one like before
- let credential = new AnonymousCredential();
- for (const factory of pipeline.factories) {
- if (coreAuth.isTokenCredential(factory.credential)) {
- // Only works if the factory has been attached a "credential" property.
- // We do that in newPipeline() when using TokenCredential.
- credential = factory.credential;
+ /**
+ * Return all bytes written and reset this writer.
+ */
+ finish() {
+ this.chunks.push(new Uint8Array(this.buf)); // flush the buffer
+ let len = 0;
+ for (let i = 0; i < this.chunks.length; i++)
+ len += this.chunks[i].length;
+ let bytes = new Uint8Array(len);
+ let offset = 0;
+ for (let i = 0; i < this.chunks.length; i++) {
+ bytes.set(this.chunks[i], offset);
+ offset += this.chunks[i].length;
}
- else if (isStorageSharedKeyCredential(factory)) {
- return factory;
+ this.chunks = [];
+ return bytes;
+ }
+ /**
+ * Start a new fork for length-delimited data like a message
+ * or a packed repeated field.
+ *
+ * Must be joined later with `join()`.
+ */
+ fork() {
+ this.stack.push({ chunks: this.chunks, buf: this.buf });
+ this.chunks = [];
+ this.buf = [];
+ return this;
+ }
+ /**
+ * Join the last fork. Write its length and bytes, then
+ * return to the previous state.
+ */
+ join() {
+ // get chunk of fork
+ let chunk = this.finish();
+ // restore previous state
+ let prev = this.stack.pop();
+ if (!prev)
+ throw new Error('invalid state, fork stack empty');
+ this.chunks = prev.chunks;
+ this.buf = prev.buf;
+ // write length of chunk as varint
+ this.uint32(chunk.byteLength);
+ return this.raw(chunk);
+ }
+ /**
+ * Writes a tag (field number and wire type).
+ *
+ * Equivalent to `uint32( (fieldNo << 3 | type) >>> 0 )`.
+ *
+ * Generated code should compute the tag ahead of time and call `uint32()`.
+ */
+ tag(fieldNo, type) {
+ return this.uint32((fieldNo << 3 | type) >>> 0);
+ }
+ /**
+ * Write a chunk of raw bytes.
+ */
+ raw(chunk) {
+ if (this.buf.length) {
+ this.chunks.push(new Uint8Array(this.buf));
+ this.buf = [];
}
+ this.chunks.push(chunk);
+ return this;
}
- return credential;
-}
-function isStorageSharedKeyCredential(factory) {
- if (factory instanceof StorageSharedKeyCredential) {
- return true;
+ /**
+ * Write a `uint32` value, an unsigned 32 bit varint.
+ */
+ uint32(value) {
+ assert_1.assertUInt32(value);
+ // write value as varint 32, inlined for speed
+ while (value > 0x7f) {
+ this.buf.push((value & 0x7f) | 0x80);
+ value = value >>> 7;
+ }
+ this.buf.push(value);
+ return this;
}
- return factory.constructor.name === "StorageSharedKeyCredential";
-}
-function isAnonymousCredential(factory) {
- if (factory instanceof AnonymousCredential) {
- return true;
+ /**
+ * Write a `int32` value, a signed 32 bit varint.
+ */
+ int32(value) {
+ assert_1.assertInt32(value);
+ goog_varint_1.varint32write(value, this.buf);
+ return this;
}
- return factory.constructor.name === "AnonymousCredential";
-}
-function isCoreHttpBearerTokenFactory(factory) {
- return coreAuth.isTokenCredential(factory.credential);
-}
-function isStorageBrowserPolicyFactory(factory) {
- if (factory instanceof StorageBrowserPolicyFactory) {
- return true;
+ /**
+ * Write a `bool` value, a variant.
+ */
+ bool(value) {
+ this.buf.push(value ? 1 : 0);
+ return this;
+ }
+ /**
+ * Write a `bytes` value, length-delimited arbitrary data.
+ */
+ bytes(value) {
+ this.uint32(value.byteLength); // write length of chunk as varint
+ return this.raw(value);
+ }
+ /**
+ * Write a `string` value, length-delimited data converted to UTF-8 text.
+ */
+ string(value) {
+ let chunk = this.textEncoder.encode(value);
+ this.uint32(chunk.byteLength); // write length of chunk as varint
+ return this.raw(chunk);
+ }
+ /**
+ * Write a `float` value, 32-bit floating point number.
+ */
+ float(value) {
+ assert_1.assertFloat32(value);
+ let chunk = new Uint8Array(4);
+ new DataView(chunk.buffer).setFloat32(0, value, true);
+ return this.raw(chunk);
+ }
+ /**
+ * Write a `double` value, a 64-bit floating point number.
+ */
+ double(value) {
+ let chunk = new Uint8Array(8);
+ new DataView(chunk.buffer).setFloat64(0, value, true);
+ return this.raw(chunk);
+ }
+ /**
+ * Write a `fixed32` value, an unsigned, fixed-length 32-bit integer.
+ */
+ fixed32(value) {
+ assert_1.assertUInt32(value);
+ let chunk = new Uint8Array(4);
+ new DataView(chunk.buffer).setUint32(0, value, true);
+ return this.raw(chunk);
+ }
+ /**
+ * Write a `sfixed32` value, a signed, fixed-length 32-bit integer.
+ */
+ sfixed32(value) {
+ assert_1.assertInt32(value);
+ let chunk = new Uint8Array(4);
+ new DataView(chunk.buffer).setInt32(0, value, true);
+ return this.raw(chunk);
+ }
+ /**
+ * Write a `sint32` value, a signed, zigzag-encoded 32-bit varint.
+ */
+ sint32(value) {
+ assert_1.assertInt32(value);
+ // zigzag encode
+ value = ((value << 1) ^ (value >> 31)) >>> 0;
+ goog_varint_1.varint32write(value, this.buf);
+ return this;
+ }
+ /**
+ * Write a `fixed64` value, a signed, fixed-length 64-bit integer.
+ */
+ sfixed64(value) {
+ let chunk = new Uint8Array(8);
+ let view = new DataView(chunk.buffer);
+ let long = pb_long_1.PbLong.from(value);
+ view.setInt32(0, long.lo, true);
+ view.setInt32(4, long.hi, true);
+ return this.raw(chunk);
+ }
+ /**
+ * Write a `fixed64` value, an unsigned, fixed-length 64 bit integer.
+ */
+ fixed64(value) {
+ let chunk = new Uint8Array(8);
+ let view = new DataView(chunk.buffer);
+ let long = pb_long_1.PbULong.from(value);
+ view.setInt32(0, long.lo, true);
+ view.setInt32(4, long.hi, true);
+ return this.raw(chunk);
+ }
+ /**
+ * Write a `int64` value, a signed 64-bit varint.
+ */
+ int64(value) {
+ let long = pb_long_1.PbLong.from(value);
+ goog_varint_1.varint64write(long.lo, long.hi, this.buf);
+ return this;
+ }
+ /**
+ * Write a `sint64` value, a signed, zig-zag-encoded 64-bit varint.
+ */
+ sint64(value) {
+ let long = pb_long_1.PbLong.from(value),
+ // zigzag encode
+ sign = long.hi >> 31, lo = (long.lo << 1) ^ sign, hi = ((long.hi << 1) | (long.lo >>> 31)) ^ sign;
+ goog_varint_1.varint64write(lo, hi, this.buf);
+ return this;
+ }
+ /**
+ * Write a `uint64` value, an unsigned 64-bit varint.
+ */
+ uint64(value) {
+ let long = pb_long_1.PbULong.from(value);
+ goog_varint_1.varint64write(long.lo, long.hi, this.buf);
+ return this;
}
- return factory.constructor.name === "StorageBrowserPolicyFactory";
}
-function isStorageRetryPolicyFactory(factory) {
- if (factory instanceof StorageRetryPolicyFactory) {
- return true;
+exports.BinaryWriter = BinaryWriter;
+
+
+/***/ }),
+
+/***/ 4903:
+/***/ ((__unused_webpack_module, exports) => {
+
+"use strict";
+
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.listEnumNumbers = exports.listEnumNames = exports.listEnumValues = exports.isEnumObject = void 0;
+/**
+ * Is this a lookup object generated by Typescript, for a Typescript enum
+ * generated by protobuf-ts?
+ *
+ * - No `const enum` (enum must not be inlined, we need reverse mapping).
+ * - No string enum (we need int32 for protobuf).
+ * - Must have a value for 0 (otherwise, we would need to support custom default values).
+ */
+function isEnumObject(arg) {
+ if (typeof arg != 'object' || arg === null) {
+ return false;
}
- return factory.constructor.name === "StorageRetryPolicyFactory";
+ if (!arg.hasOwnProperty(0)) {
+ return false;
+ }
+ for (let k of Object.keys(arg)) {
+ let num = parseInt(k);
+ if (!Number.isNaN(num)) {
+ // is there a name for the number?
+ let nam = arg[num];
+ if (nam === undefined)
+ return false;
+ // does the name resolve back to the number?
+ if (arg[nam] !== num)
+ return false;
+ }
+ else {
+ // is there a number for the name?
+ let num = arg[k];
+ if (num === undefined)
+ return false;
+ // is it a string enum?
+ if (typeof num !== 'number')
+ return false;
+ // do we know the number?
+ if (arg[num] === undefined)
+ return false;
+ }
+ }
+ return true;
}
-function isStorageTelemetryPolicyFactory(factory) {
- return factory.constructor.name === "TelemetryPolicyFactory";
+exports.isEnumObject = isEnumObject;
+/**
+ * Lists all values of a Typescript enum, as an array of objects with a "name"
+ * property and a "number" property.
+ *
+ * Note that it is possible that a number appears more than once, because it is
+ * possible to have aliases in an enum.
+ *
+ * Throws if the enum does not adhere to the rules of enums generated by
+ * protobuf-ts. See `isEnumObject()`.
+ */
+function listEnumValues(enumObject) {
+ if (!isEnumObject(enumObject))
+ throw new Error("not a typescript enum object");
+ let values = [];
+ for (let [name, number] of Object.entries(enumObject))
+ if (typeof number == "number")
+ values.push({ name, number });
+ return values;
}
-function isInjectorPolicyFactory(factory) {
- return factory.constructor.name === "InjectorPolicyFactory";
+exports.listEnumValues = listEnumValues;
+/**
+ * Lists the names of a Typescript enum.
+ *
+ * Throws if the enum does not adhere to the rules of enums generated by
+ * protobuf-ts. See `isEnumObject()`.
+ */
+function listEnumNames(enumObject) {
+ return listEnumValues(enumObject).map(val => val.name);
}
-function isCoreHttpPolicyFactory(factory) {
- const knownPolicies = [
- "GenerateClientRequestIdPolicy",
- "TracingPolicy",
- "LogPolicy",
- "ProxyPolicy",
- "DisableResponseDecompressionPolicy",
- "KeepAlivePolicy",
- "DeserializationPolicy",
- ];
- const mockHttpClient = {
- sendRequest: async (request) => {
- return {
- request,
- headers: request.headers.clone(),
- status: 500,
- };
- },
- };
- const mockRequestPolicyOptions = {
- log(_logLevel, _message) {
- /* do nothing */
- },
- shouldLog(_logLevel) {
- return false;
- },
- };
- const policyInstance = factory.create(mockHttpClient, mockRequestPolicyOptions);
- const policyName = policyInstance.constructor.name;
- // bundlers sometimes add a custom suffix to the class name to make it unique
- return knownPolicies.some((knownPolicyName) => {
- return policyName.startsWith(knownPolicyName);
- });
+exports.listEnumNames = listEnumNames;
+/**
+ * Lists the numbers of a Typescript enum.
+ *
+ * Throws if the enum does not adhere to the rules of enums generated by
+ * protobuf-ts. See `isEnumObject()`.
+ */
+function listEnumNumbers(enumObject) {
+ return listEnumValues(enumObject)
+ .map(val => val.number)
+ .filter((num, index, arr) => arr.indexOf(num) == index);
}
+exports.listEnumNumbers = listEnumNumbers;
-/*
- * Copyright (c) Microsoft Corporation.
- * Licensed under the MIT License.
+
+/***/ }),
+
+/***/ 61605:
+/***/ ((__unused_webpack_module, exports) => {
+
+"use strict";
+
+// Copyright 2008 Google Inc. All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Code generated by the Protocol Buffer compiler is owned by the owner
+// of the input file used when generating it. This code is not
+// standalone and requires a support library to be linked with it. This
+// support library is itself covered by the above license.
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.varint32read = exports.varint32write = exports.int64toString = exports.int64fromString = exports.varint64write = exports.varint64read = void 0;
+/**
+ * Read a 64 bit varint as two JS numbers.
*
- * 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",
- type: {
- name: "Composite",
- className: "BlobServiceProperties",
- modelProperties: {
- blobAnalyticsLogging: {
- serializedName: "Logging",
- xmlName: "Logging",
- type: {
- name: "Composite",
- className: "Logging",
- },
- },
- hourMetrics: {
- serializedName: "HourMetrics",
- xmlName: "HourMetrics",
- type: {
- name: "Composite",
- className: "Metrics",
- },
- },
- minuteMetrics: {
- serializedName: "MinuteMetrics",
- xmlName: "MinuteMetrics",
- type: {
- name: "Composite",
- className: "Metrics",
- },
- },
- cors: {
- serializedName: "Cors",
- xmlName: "Cors",
- xmlIsWrapped: true,
- xmlElementName: "CorsRule",
- type: {
- name: "Sequence",
- element: {
- type: {
- name: "Composite",
- className: "CorsRule",
- },
- },
- },
- },
- defaultServiceVersion: {
- serializedName: "DefaultServiceVersion",
- xmlName: "DefaultServiceVersion",
- type: {
- name: "String",
- },
- },
- deleteRetentionPolicy: {
- serializedName: "DeleteRetentionPolicy",
- xmlName: "DeleteRetentionPolicy",
- type: {
- name: "Composite",
- className: "RetentionPolicy",
- },
- },
- staticWebsite: {
- serializedName: "StaticWebsite",
- xmlName: "StaticWebsite",
- type: {
- name: "Composite",
- className: "StaticWebsite",
- },
- },
- },
- },
-};
-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",
- },
- },
- },
- },
-};
-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",
- },
- },
- },
- },
-};
-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",
- },
- },
- },
- },
-};
-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",
- },
- },
- },
- },
-};
-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",
- },
- },
- },
- },
-};
-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",
- },
- },
- authenticationErrorDetail: {
- serializedName: "AuthenticationErrorDetail",
- xmlName: "AuthenticationErrorDetail",
- type: {
- name: "String",
- },
- },
- },
- },
-};
-const BlobServiceStatistics = {
- serializedName: "BlobServiceStatistics",
- xmlName: "StorageServiceStats",
- type: {
- name: "Composite",
- className: "BlobServiceStatistics",
- modelProperties: {
- geoReplication: {
- serializedName: "GeoReplication",
- xmlName: "GeoReplication",
- type: {
- name: "Composite",
- className: "GeoReplication",
- },
- },
- },
- },
-};
-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",
- },
- },
- },
- },
-};
-const ListContainersSegmentResponse = {
- serializedName: "ListContainersSegmentResponse",
- xmlName: "EnumerationResults",
- type: {
- name: "Composite",
- className: "ListContainersSegmentResponse",
- modelProperties: {
- serviceEndpoint: {
- serializedName: "ServiceEndpoint",
- required: true,
- xmlName: "ServiceEndpoint",
- 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",
- },
- },
- containerItems: {
- serializedName: "ContainerItems",
- required: true,
- xmlName: "Containers",
- xmlIsWrapped: true,
- xmlElementName: "Container",
- type: {
- name: "Sequence",
- element: {
- type: {
- name: "Composite",
- className: "ContainerItem",
- },
- },
- },
- },
- continuationToken: {
- serializedName: "NextMarker",
- xmlName: "NextMarker",
- type: {
- name: "String",
- },
- },
- },
- },
-};
-const ContainerItem = {
- serializedName: "ContainerItem",
- xmlName: "Container",
- type: {
- name: "Composite",
- className: "ContainerItem",
- modelProperties: {
- name: {
- serializedName: "Name",
- required: true,
- xmlName: "Name",
- type: {
- name: "String",
- },
- },
- 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" } },
- },
- },
- },
- },
-};
-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",
- },
- },
- },
- },
-};
-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",
- },
- },
- },
- },
-};
-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",
- },
- },
- },
- },
-};
-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 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 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",
- },
- },
- },
- },
- },
- },
-};
-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",
- },
- },
- },
- },
-};
-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 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",
- },
- },
- },
- },
-};
-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",
- },
- },
- },
- },
-};
-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",
- },
- },
- },
- },
- },
- },
-};
-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",
- },
- },
- },
- },
-};
-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",
- },
- },
- },
- },
-};
-const BlobPropertiesInternal = {
- serializedName: "BlobPropertiesInternal",
- xmlName: "Properties",
- type: {
- name: "Composite",
- className: "BlobPropertiesInternal",
- modelProperties: {
- createdOn: {
- serializedName: "Creation-Time",
- xmlName: "Creation-Time",
- type: {
- name: "DateTimeRfc1123",
- },
- },
- lastModified: {
- serializedName: "Last-Modified",
- required: true,
- xmlName: "Last-Modified",
- type: {
- name: "DateTimeRfc1123",
- },
- },
- etag: {
- serializedName: "Etag",
- required: true,
- xmlName: "Etag",
- type: {
- name: "String",
- },
- },
- contentLength: {
- serializedName: "Content-Length",
- xmlName: "Content-Length",
- type: {
- name: "Number",
- },
- },
- contentType: {
- serializedName: "Content-Type",
- xmlName: "Content-Type",
- type: {
- name: "String",
- },
- },
- contentEncoding: {
- serializedName: "Content-Encoding",
- xmlName: "Content-Encoding",
- type: {
- name: "String",
- },
- },
- contentLanguage: {
- serializedName: "Content-Language",
- xmlName: "Content-Language",
- type: {
- name: "String",
- },
- },
- contentMD5: {
- serializedName: "Content-MD5",
- xmlName: "Content-MD5",
- type: {
- name: "ByteArray",
- },
- },
- contentDisposition: {
- serializedName: "Content-Disposition",
- xmlName: "Content-Disposition",
- 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",
- },
- },
- blobType: {
- serializedName: "BlobType",
- xmlName: "BlobType",
- type: {
- name: "Enum",
- allowedValues: ["BlockBlob", "PageBlob", "AppendBlob"],
- },
- },
- 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"],
- },
- },
- copyId: {
- serializedName: "CopyId",
- xmlName: "CopyId",
- type: {
- name: "String",
- },
- },
- copyStatus: {
- serializedName: "CopyStatus",
- xmlName: "CopyStatus",
- type: {
- name: "Enum",
- allowedValues: ["pending", "success", "aborted", "failed"],
- },
- },
- copySource: {
- serializedName: "CopySource",
- xmlName: "CopySource",
- type: {
- name: "String",
- },
- },
- copyProgress: {
- serializedName: "CopyProgress",
- xmlName: "CopyProgress",
- type: {
- name: "String",
- },
- },
- copyCompletedOn: {
- serializedName: "CopyCompletionTime",
- xmlName: "CopyCompletionTime",
- type: {
- name: "DateTimeRfc1123",
- },
- },
- copyStatusDescription: {
- serializedName: "CopyStatusDescription",
- xmlName: "CopyStatusDescription",
- type: {
- name: "String",
- },
- },
- serverEncrypted: {
- serializedName: "ServerEncrypted",
- xmlName: "ServerEncrypted",
- type: {
- name: "Boolean",
- },
- },
- incrementalCopy: {
- serializedName: "IncrementalCopy",
- xmlName: "IncrementalCopy",
- type: {
- name: "Boolean",
- },
- },
- destinationSnapshot: {
- serializedName: "DestinationSnapshot",
- xmlName: "DestinationSnapshot",
- type: {
- name: "String",
- },
- },
- deletedOn: {
- serializedName: "DeletedTime",
- xmlName: "DeletedTime",
- type: {
- name: "DateTimeRfc1123",
- },
- },
- remainingRetentionDays: {
- serializedName: "RemainingRetentionDays",
- xmlName: "RemainingRetentionDays",
- type: {
- name: "Number",
- },
- },
- 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",
- },
- },
- archiveStatus: {
- serializedName: "ArchiveStatus",
- xmlName: "ArchiveStatus",
- type: {
- name: "Enum",
- allowedValues: [
- "rehydrate-pending-to-hot",
- "rehydrate-pending-to-cool",
- "rehydrate-pending-to-cold",
- ],
- },
- },
- customerProvidedKeySha256: {
- serializedName: "CustomerProvidedKeySha256",
- xmlName: "CustomerProvidedKeySha256",
- type: {
- name: "String",
- },
- },
- encryptionScope: {
- serializedName: "EncryptionScope",
- xmlName: "EncryptionScope",
- type: {
- name: "String",
- },
- },
- accessTierChangedOn: {
- serializedName: "AccessTierChangeTime",
- xmlName: "AccessTierChangeTime",
- type: {
- name: "DateTimeRfc1123",
- },
- },
- tagCount: {
- serializedName: "TagCount",
- xmlName: "TagCount",
- type: {
- name: "Number",
- },
- },
- expiresOn: {
- serializedName: "Expiry-Time",
- xmlName: "Expiry-Time",
- type: {
- name: "DateTimeRfc1123",
- },
- },
- isSealed: {
- serializedName: "Sealed",
- xmlName: "Sealed",
- type: {
- name: "Boolean",
- },
- },
- rehydratePriority: {
- serializedName: "RehydratePriority",
- xmlName: "RehydratePriority",
- type: {
- name: "Enum",
- allowedValues: ["High", "Standard"],
- },
- },
- 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 ListBlobsHierarchySegmentResponse = {
- serializedName: "ListBlobsHierarchySegmentResponse",
- xmlName: "EnumerationResults",
- type: {
- name: "Composite",
- className: "ListBlobsHierarchySegmentResponse",
- 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",
- },
- },
- 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: "BlobPrefix",
- },
- },
- },
- },
- blobItems: {
- serializedName: "BlobItems",
- required: true,
- xmlName: "BlobItems",
- xmlElementName: "Blob",
- type: {
- name: "Sequence",
- element: {
- type: {
- name: "Composite",
- className: "BlobItemInternal",
- },
- },
- },
- },
- },
- },
-};
-const BlobPrefix = {
- serializedName: "BlobPrefix",
- type: {
- name: "Composite",
- className: "BlobPrefix",
- modelProperties: {
- name: {
- serializedName: "Name",
- xmlName: "Name",
- type: {
- name: "Composite",
- className: "BlobName",
- },
- },
- },
- },
-};
-const BlockLookupList = {
- serializedName: "BlockLookupList",
- xmlName: "BlockList",
- type: {
- name: "Composite",
- className: "BlockLookupList",
- modelProperties: {
- committed: {
- serializedName: "Committed",
- xmlName: "Committed",
- xmlElementName: "Committed",
- type: {
- name: "Sequence",
- element: {
- type: {
- name: "String",
- },
- },
- },
- },
- uncommitted: {
- serializedName: "Uncommitted",
- xmlName: "Uncommitted",
- xmlElementName: "Uncommitted",
- type: {
- name: "Sequence",
- element: {
- type: {
- name: "String",
- },
- },
- },
- },
- latest: {
- serializedName: "Latest",
- xmlName: "Latest",
- xmlElementName: "Latest",
- type: {
- name: "Sequence",
- element: {
- type: {
- name: "String",
- },
- },
- },
- },
- },
- },
-};
-const BlockList = {
- serializedName: "BlockList",
- type: {
- name: "Composite",
- className: "BlockList",
- modelProperties: {
- committedBlocks: {
- serializedName: "CommittedBlocks",
- xmlName: "CommittedBlocks",
- xmlIsWrapped: true,
- xmlElementName: "Block",
- type: {
- name: "Sequence",
- element: {
- type: {
- name: "Composite",
- className: "Block",
- },
- },
- },
- },
- uncommittedBlocks: {
- serializedName: "UncommittedBlocks",
- xmlName: "UncommittedBlocks",
- xmlIsWrapped: true,
- xmlElementName: "Block",
- type: {
- name: "Sequence",
- element: {
- type: {
- name: "Composite",
- className: "Block",
- },
- },
- },
- },
- },
- },
-};
-const Block = {
- serializedName: "Block",
- type: {
- name: "Composite",
- className: "Block",
- modelProperties: {
- name: {
- serializedName: "Name",
- required: true,
- xmlName: "Name",
- type: {
- name: "String",
- },
- },
- size: {
- serializedName: "Size",
- required: true,
- xmlName: "Size",
- type: {
- name: "Number",
- },
- },
- },
- },
-};
-const PageList = {
- serializedName: "PageList",
- type: {
- name: "Composite",
- className: "PageList",
- modelProperties: {
- pageRange: {
- serializedName: "PageRange",
- xmlName: "PageRange",
- xmlElementName: "PageRange",
- type: {
- name: "Sequence",
- element: {
- type: {
- name: "Composite",
- className: "PageRange",
- },
- },
- },
- },
- clearRange: {
- serializedName: "ClearRange",
- xmlName: "ClearRange",
- xmlElementName: "ClearRange",
- type: {
- name: "Sequence",
- element: {
- type: {
- name: "Composite",
- className: "ClearRange",
- },
- },
- },
- },
- continuationToken: {
- serializedName: "NextMarker",
- xmlName: "NextMarker",
- type: {
- name: "String",
- },
- },
- },
- },
-};
-const PageRange = {
- serializedName: "PageRange",
- xmlName: "PageRange",
- type: {
- name: "Composite",
- className: "PageRange",
- modelProperties: {
- start: {
- serializedName: "Start",
- required: true,
- xmlName: "Start",
- type: {
- name: "Number",
- },
- },
- end: {
- serializedName: "End",
- required: true,
- xmlName: "End",
- type: {
- name: "Number",
- },
- },
- },
- },
-};
-const ClearRange = {
- serializedName: "ClearRange",
- xmlName: "ClearRange",
- type: {
- name: "Composite",
- className: "ClearRange",
- modelProperties: {
- start: {
- serializedName: "Start",
- required: true,
- xmlName: "Start",
- type: {
- name: "Number",
- },
- },
- end: {
- serializedName: "End",
- required: true,
- xmlName: "End",
- type: {
- name: "Number",
- },
- },
- },
- },
-};
-const QueryRequest = {
- serializedName: "QueryRequest",
- xmlName: "QueryRequest",
- type: {
- name: "Composite",
- className: "QueryRequest",
- modelProperties: {
- queryType: {
- serializedName: "QueryType",
- required: true,
- xmlName: "QueryType",
- type: {
- name: "String",
- },
- },
- expression: {
- serializedName: "Expression",
- required: true,
- xmlName: "Expression",
- type: {
- name: "String",
- },
- },
- inputSerialization: {
- serializedName: "InputSerialization",
- xmlName: "InputSerialization",
- type: {
- name: "Composite",
- className: "QuerySerialization",
- },
- },
- 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: "Type",
- type: {
- name: "Enum",
- allowedValues: ["delimited", "json", "arrow", "parquet"],
- },
- },
- delimitedTextConfiguration: {
- serializedName: "DelimitedTextConfiguration",
- xmlName: "DelimitedTextConfiguration",
- type: {
- name: "Composite",
- className: "DelimitedTextConfiguration",
- },
- },
- jsonTextConfiguration: {
- serializedName: "JsonTextConfiguration",
- xmlName: "JsonTextConfiguration",
- type: {
- name: "Composite",
- className: "JsonTextConfiguration",
- },
- },
- arrowConfiguration: {
- serializedName: "ArrowConfiguration",
- xmlName: "ArrowConfiguration",
- type: {
- name: "Composite",
- className: "ArrowConfiguration",
- },
- },
- parquetTextConfiguration: {
- serializedName: "ParquetTextConfiguration",
- xmlName: "ParquetTextConfiguration",
- type: {
- name: "Dictionary",
- value: { type: { name: "any" } },
- },
- },
- },
- },
-};
-const DelimitedTextConfiguration = {
- serializedName: "DelimitedTextConfiguration",
- xmlName: "DelimitedTextConfiguration",
- type: {
- name: "Composite",
- className: "DelimitedTextConfiguration",
- modelProperties: {
- columnSeparator: {
- serializedName: "ColumnSeparator",
- xmlName: "ColumnSeparator",
- type: {
- name: "String",
- },
- },
- fieldQuote: {
- serializedName: "FieldQuote",
- xmlName: "FieldQuote",
- type: {
- name: "String",
- },
- },
- recordSeparator: {
- serializedName: "RecordSeparator",
- xmlName: "RecordSeparator",
- type: {
- name: "String",
- },
- },
- escapeChar: {
- serializedName: "EscapeChar",
- xmlName: "EscapeChar",
- type: {
- name: "String",
- },
- },
- headersPresent: {
- serializedName: "HeadersPresent",
- xmlName: "HasHeaders",
- type: {
- name: "Boolean",
- },
- },
- },
- },
-};
-const JsonTextConfiguration = {
- serializedName: "JsonTextConfiguration",
- xmlName: "JsonTextConfiguration",
- type: {
- name: "Composite",
- className: "JsonTextConfiguration",
- modelProperties: {
- recordSeparator: {
- serializedName: "RecordSeparator",
- xmlName: "RecordSeparator",
- type: {
- name: "String",
- },
- },
- },
- },
-};
-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",
- type: {
- name: "Composite",
- className: "ArrowField",
- modelProperties: {
- type: {
- serializedName: "Type",
- required: true,
- xmlName: "Type",
- type: {
- name: "String",
- },
- },
- name: {
- serializedName: "Name",
- xmlName: "Name",
- type: {
- name: "String",
- },
- },
- precision: {
- serializedName: "Precision",
- xmlName: "Precision",
- type: {
- name: "Number",
- },
- },
- 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",
- 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",
- },
- },
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
- type: {
- name: "String",
- },
- },
- },
- },
-};
-const ServiceSetPropertiesExceptionHeaders = {
- serializedName: "Service_setPropertiesExceptionHeaders",
- type: {
- name: "Composite",
- className: "ServiceSetPropertiesExceptionHeaders",
- modelProperties: {
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
- type: {
- name: "String",
- },
- },
- },
- },
-};
-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",
- },
- },
- 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",
- },
- },
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
- type: {
- name: "String",
- },
- },
- },
- },
-};
-const ServiceGetPropertiesExceptionHeaders = {
- serializedName: "Service_getPropertiesExceptionHeaders",
- type: {
- name: "Composite",
- className: "ServiceGetPropertiesExceptionHeaders",
- modelProperties: {
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
- type: {
- name: "String",
- },
- },
- },
- },
-};
-const ServiceGetStatisticsHeaders = {
- serializedName: "Service_getStatisticsHeaders",
- type: {
- name: "Composite",
- className: "ServiceGetStatisticsHeaders",
- modelProperties: {
- clientRequestId: {
- serializedName: "x-ms-client-request-id",
- xmlName: "x-ms-client-request-id",
- type: {
- name: "String",
- },
- },
- requestId: {
- serializedName: "x-ms-request-id",
- xmlName: "x-ms-request-id",
- type: {
- name: "String",
- },
- },
- version: {
- serializedName: "x-ms-version",
- xmlName: "x-ms-version",
- type: {
- name: "String",
- },
- },
- date: {
- serializedName: "date",
- xmlName: "date",
- type: {
- name: "DateTimeRfc1123",
- },
- },
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
- type: {
- name: "String",
- },
- },
- },
- },
-};
-const ServiceGetStatisticsExceptionHeaders = {
- serializedName: "Service_getStatisticsExceptionHeaders",
- type: {
- name: "Composite",
- className: "ServiceGetStatisticsExceptionHeaders",
- modelProperties: {
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
- type: {
- 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",
- },
- },
- 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",
- },
- },
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
- type: {
- name: "String",
- },
- },
- },
- },
-};
-const ServiceListContainersSegmentExceptionHeaders = {
- serializedName: "Service_listContainersSegmentExceptionHeaders",
- type: {
- name: "Composite",
- className: "ServiceListContainersSegmentExceptionHeaders",
- modelProperties: {
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
- type: {
- name: "String",
- },
- },
- },
- },
-};
-const ServiceGetUserDelegationKeyHeaders = {
- serializedName: "Service_getUserDelegationKeyHeaders",
- type: {
- name: "Composite",
- className: "ServiceGetUserDelegationKeyHeaders",
- modelProperties: {
- clientRequestId: {
- serializedName: "x-ms-client-request-id",
- xmlName: "x-ms-client-request-id",
- type: {
- name: "String",
- },
- },
- requestId: {
- serializedName: "x-ms-request-id",
- xmlName: "x-ms-request-id",
- type: {
- name: "String",
- },
- },
- version: {
- serializedName: "x-ms-version",
- xmlName: "x-ms-version",
- type: {
- name: "String",
- },
- },
- date: {
- serializedName: "date",
- xmlName: "date",
- type: {
- name: "DateTimeRfc1123",
- },
- },
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
- type: {
- name: "String",
- },
- },
- },
- },
-};
-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",
- },
- },
- },
- },
-};
-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",
- },
- },
- 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",
- },
- },
- 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",
- type: {
- name: "Composite",
- className: "ServiceGetAccountInfoExceptionHeaders",
- modelProperties: {
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
- type: {
- name: "String",
- },
- },
- },
- },
-};
-const ServiceSubmitBatchHeaders = {
- serializedName: "Service_submitBatchHeaders",
- type: {
- name: "Composite",
- className: "ServiceSubmitBatchHeaders",
- modelProperties: {
- contentType: {
- serializedName: "content-type",
- xmlName: "content-type",
- 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",
- },
- },
- 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",
- type: {
- name: "String",
- },
- },
- },
- },
-};
-const ServiceSubmitBatchExceptionHeaders = {
- serializedName: "Service_submitBatchExceptionHeaders",
- type: {
- name: "Composite",
- className: "ServiceSubmitBatchExceptionHeaders",
- modelProperties: {
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
- type: {
- name: "String",
- },
- },
- },
- },
-};
-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: "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 ServiceFilterBlobsExceptionHeaders = {
- serializedName: "Service_filterBlobsExceptionHeaders",
- type: {
- name: "Composite",
- className: "ServiceFilterBlobsExceptionHeaders",
- modelProperties: {
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
- type: {
- name: "String",
- },
- },
- },
- },
-};
-const ContainerCreateHeaders = {
- serializedName: "Container_createHeaders",
- type: {
- name: "Composite",
- className: "ContainerCreateHeaders",
- 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",
- },
- },
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
- type: {
- name: "String",
- },
- },
- },
- },
-};
-const ContainerCreateExceptionHeaders = {
- serializedName: "Container_createExceptionHeaders",
- type: {
- name: "Composite",
- className: "ContainerCreateExceptionHeaders",
- modelProperties: {
- 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",
- headerCollectionPrefix: "x-ms-meta-",
- xmlName: "x-ms-meta",
- type: {
- name: "Dictionary",
- value: { type: { name: "String" } },
- },
- },
- etag: {
- serializedName: "etag",
- xmlName: "etag",
- type: {
- name: "String",
- },
- },
- lastModified: {
- serializedName: "last-modified",
- xmlName: "last-modified",
- type: {
- 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",
- type: {
- name: "Enum",
- allowedValues: ["locked", "unlocked"],
- },
- },
- 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",
- },
- },
- 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",
- type: {
- name: "Composite",
- className: "ContainerGetPropertiesExceptionHeaders",
- modelProperties: {
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
- type: {
- name: "String",
- },
- },
- },
- },
-};
-const ContainerDeleteHeaders = {
- serializedName: "Container_deleteHeaders",
- type: {
- name: "Composite",
- className: "ContainerDeleteHeaders",
- modelProperties: {
- clientRequestId: {
- serializedName: "x-ms-client-request-id",
- xmlName: "x-ms-client-request-id",
- type: {
- name: "String",
- },
- },
- requestId: {
- serializedName: "x-ms-request-id",
- xmlName: "x-ms-request-id",
- type: {
- name: "String",
- },
- },
- version: {
- serializedName: "x-ms-version",
- xmlName: "x-ms-version",
- type: {
- name: "String",
- },
- },
- date: {
- serializedName: "date",
- xmlName: "date",
- type: {
- name: "DateTimeRfc1123",
- },
- },
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
- type: {
- name: "String",
- },
- },
- },
- },
-};
-const ContainerDeleteExceptionHeaders = {
- serializedName: "Container_deleteExceptionHeaders",
- type: {
- name: "Composite",
- className: "ContainerDeleteExceptionHeaders",
- modelProperties: {
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
- type: {
- name: "String",
- },
- },
- },
- },
-};
-const ContainerSetMetadataHeaders = {
- serializedName: "Container_setMetadataHeaders",
- type: {
- name: "Composite",
- className: "ContainerSetMetadataHeaders",
- 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",
- },
- },
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
- type: {
- name: "String",
- },
- },
- },
- },
-};
-const ContainerSetMetadataExceptionHeaders = {
- serializedName: "Container_setMetadataExceptionHeaders",
- type: {
- name: "Composite",
- className: "ContainerSetMetadataExceptionHeaders",
- modelProperties: {
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
- type: {
- name: "String",
- },
- },
- },
- },
-};
-const ContainerGetAccessPolicyHeaders = {
- serializedName: "Container_getAccessPolicyHeaders",
- type: {
- name: "Composite",
- className: "ContainerGetAccessPolicyHeaders",
- 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",
- 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 ContainerGetAccessPolicyExceptionHeaders = {
- serializedName: "Container_getAccessPolicyExceptionHeaders",
- type: {
- name: "Composite",
- className: "ContainerGetAccessPolicyExceptionHeaders",
- modelProperties: {
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
- type: {
- name: "String",
- },
- },
- },
- },
-};
-const ContainerSetAccessPolicyHeaders = {
- serializedName: "Container_setAccessPolicyHeaders",
- type: {
- name: "Composite",
- className: "ContainerSetAccessPolicyHeaders",
- 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",
- },
- },
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
- 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",
- 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",
- 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 ContainerRestoreExceptionHeaders = {
- serializedName: "Container_restoreExceptionHeaders",
- type: {
- name: "Composite",
- className: "ContainerRestoreExceptionHeaders",
- modelProperties: {
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
- type: {
- name: "String",
- },
- },
- },
- },
-};
-const ContainerRenameHeaders = {
- serializedName: "Container_renameHeaders",
- type: {
- name: "Composite",
- className: "ContainerRenameHeaders",
- modelProperties: {
- clientRequestId: {
- serializedName: "x-ms-client-request-id",
- xmlName: "x-ms-client-request-id",
- type: {
- name: "String",
- },
- },
- requestId: {
- serializedName: "x-ms-request-id",
- xmlName: "x-ms-request-id",
- type: {
- name: "String",
- },
- },
- version: {
- serializedName: "x-ms-version",
- xmlName: "x-ms-version",
- type: {
- name: "String",
- },
- },
- date: {
- serializedName: "date",
- xmlName: "date",
- type: {
- name: "DateTimeRfc1123",
- },
- },
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
- type: {
- name: "String",
- },
- },
- },
- },
-};
-const ContainerRenameExceptionHeaders = {
- serializedName: "Container_renameExceptionHeaders",
- type: {
- name: "Composite",
- className: "ContainerRenameExceptionHeaders",
- modelProperties: {
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
- type: {
- name: "String",
- },
- },
- },
- },
-};
-const ContainerSubmitBatchHeaders = {
- serializedName: "Container_submitBatchHeaders",
- type: {
- name: "Composite",
- className: "ContainerSubmitBatchHeaders",
- modelProperties: {
- contentType: {
- serializedName: "content-type",
- xmlName: "content-type",
- 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",
- },
- },
- },
- },
-};
-const ContainerSubmitBatchExceptionHeaders = {
- serializedName: "Container_submitBatchExceptionHeaders",
- type: {
- name: "Composite",
- className: "ContainerSubmitBatchExceptionHeaders",
- modelProperties: {
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
- type: {
- name: "String",
- },
- },
- },
- },
-};
-const ContainerFilterBlobsHeaders = {
- serializedName: "Container_filterBlobsHeaders",
- type: {
- name: "Composite",
- className: "ContainerFilterBlobsHeaders",
- modelProperties: {
- clientRequestId: {
- serializedName: "x-ms-client-request-id",
- xmlName: "x-ms-client-request-id",
- type: {
- name: "String",
- },
- },
- requestId: {
- serializedName: "x-ms-request-id",
- xmlName: "x-ms-request-id",
- type: {
- name: "String",
- },
- },
- version: {
- serializedName: "x-ms-version",
- xmlName: "x-ms-version",
- type: {
- name: "String",
- },
- },
- date: {
- serializedName: "date",
- xmlName: "date",
- type: {
- name: "DateTimeRfc1123",
- },
- },
- },
- },
-};
-const ContainerFilterBlobsExceptionHeaders = {
- serializedName: "Container_filterBlobsExceptionHeaders",
- type: {
- name: "Composite",
- className: "ContainerFilterBlobsExceptionHeaders",
- modelProperties: {
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
- type: {
- name: "String",
- },
- },
- },
- },
-};
-const ContainerAcquireLeaseHeaders = {
- serializedName: "Container_acquireLeaseHeaders",
- type: {
- name: "Composite",
- 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",
- type: {
- name: "String",
- },
- },
- requestId: {
- serializedName: "x-ms-request-id",
- xmlName: "x-ms-request-id",
- type: {
- name: "String",
- },
- },
- version: {
- serializedName: "x-ms-version",
- xmlName: "x-ms-version",
- type: {
- name: "String",
- },
- },
- date: {
- serializedName: "date",
- xmlName: "date",
- type: {
- name: "DateTimeRfc1123",
- },
- },
- },
- },
-};
-const ContainerAcquireLeaseExceptionHeaders = {
- serializedName: "Container_acquireLeaseExceptionHeaders",
- type: {
- name: "Composite",
- className: "ContainerAcquireLeaseExceptionHeaders",
- modelProperties: {
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
- type: {
- name: "String",
- },
- },
- },
- },
-};
-const ContainerReleaseLeaseHeaders = {
- serializedName: "Container_releaseLeaseHeaders",
- type: {
- name: "Composite",
- className: "ContainerReleaseLeaseHeaders",
- 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",
- },
- },
- },
- },
-};
-const ContainerReleaseLeaseExceptionHeaders = {
- serializedName: "Container_releaseLeaseExceptionHeaders",
- type: {
- name: "Composite",
- className: "ContainerReleaseLeaseExceptionHeaders",
- modelProperties: {
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
- type: {
- name: "String",
- },
- },
- },
- },
-};
-const ContainerRenewLeaseHeaders = {
- serializedName: "Container_renewLeaseHeaders",
- type: {
- name: "Composite",
- 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",
- type: {
- name: "String",
- },
- },
- requestId: {
- serializedName: "x-ms-request-id",
- xmlName: "x-ms-request-id",
- type: {
- name: "String",
- },
- },
- version: {
- serializedName: "x-ms-version",
- xmlName: "x-ms-version",
- type: {
- name: "String",
- },
- },
- date: {
- serializedName: "date",
- xmlName: "date",
- type: {
- name: "DateTimeRfc1123",
- },
- },
- },
- },
-};
-const ContainerRenewLeaseExceptionHeaders = {
- serializedName: "Container_renewLeaseExceptionHeaders",
- type: {
- name: "Composite",
- className: "ContainerRenewLeaseExceptionHeaders",
- modelProperties: {
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
- type: {
- name: "String",
- },
- },
- },
- },
-};
-const ContainerBreakLeaseHeaders = {
- serializedName: "Container_breakLeaseHeaders",
- type: {
- name: "Composite",
- className: "ContainerBreakLeaseHeaders",
- 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",
- type: {
- name: "String",
- },
- },
- requestId: {
- serializedName: "x-ms-request-id",
- xmlName: "x-ms-request-id",
- type: {
- name: "String",
- },
- },
- version: {
- serializedName: "x-ms-version",
- xmlName: "x-ms-version",
- type: {
- name: "String",
- },
- },
- date: {
- serializedName: "date",
- xmlName: "date",
- type: {
- name: "DateTimeRfc1123",
- },
- },
- },
- },
-};
-const ContainerBreakLeaseExceptionHeaders = {
- serializedName: "Container_breakLeaseExceptionHeaders",
- type: {
- name: "Composite",
- className: "ContainerBreakLeaseExceptionHeaders",
- modelProperties: {
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
- type: {
- name: "String",
- },
- },
- },
- },
-};
-const ContainerChangeLeaseHeaders = {
- serializedName: "Container_changeLeaseHeaders",
- type: {
- name: "Composite",
- className: "ContainerChangeLeaseHeaders",
- 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",
- type: {
- name: "String",
- },
- },
- requestId: {
- serializedName: "x-ms-request-id",
- xmlName: "x-ms-request-id",
- type: {
- name: "String",
- },
- },
- version: {
- serializedName: "x-ms-version",
- xmlName: "x-ms-version",
- type: {
- name: "String",
- },
- },
- date: {
- serializedName: "date",
- xmlName: "date",
- type: {
- name: "DateTimeRfc1123",
- },
- },
- },
- },
-};
-const ContainerChangeLeaseExceptionHeaders = {
- serializedName: "Container_changeLeaseExceptionHeaders",
- type: {
- name: "Composite",
- className: "ContainerChangeLeaseExceptionHeaders",
- modelProperties: {
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
- type: {
- name: "String",
- },
- },
- },
- },
-};
-const ContainerListBlobFlatSegmentHeaders = {
- serializedName: "Container_listBlobFlatSegmentHeaders",
- type: {
- name: "Composite",
- 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",
- 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 ContainerListBlobFlatSegmentExceptionHeaders = {
- serializedName: "Container_listBlobFlatSegmentExceptionHeaders",
- type: {
- name: "Composite",
- className: "ContainerListBlobFlatSegmentExceptionHeaders",
- modelProperties: {
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
- type: {
- name: "String",
- },
- },
- },
- },
-};
-const ContainerListBlobHierarchySegmentHeaders = {
- serializedName: "Container_listBlobHierarchySegmentHeaders",
- type: {
- name: "Composite",
- className: "ContainerListBlobHierarchySegmentHeaders",
- modelProperties: {
- contentType: {
- serializedName: "content-type",
- xmlName: "content-type",
- type: {
- name: "String",
- },
- },
- 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 ContainerListBlobHierarchySegmentExceptionHeaders = {
- serializedName: "Container_listBlobHierarchySegmentExceptionHeaders",
- type: {
- name: "Composite",
- className: "ContainerListBlobHierarchySegmentExceptionHeaders",
- modelProperties: {
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
- type: {
- name: "String",
- },
- },
- },
- },
-};
-const ContainerGetAccountInfoHeaders = {
- serializedName: "Container_getAccountInfoHeaders",
- type: {
- name: "Composite",
- className: "ContainerGetAccountInfoHeaders",
- modelProperties: {
- clientRequestId: {
- serializedName: "x-ms-client-request-id",
- xmlName: "x-ms-client-request-id",
- type: {
- name: "String",
- },
- },
- requestId: {
- serializedName: "x-ms-request-id",
- xmlName: "x-ms-request-id",
- type: {
- name: "String",
- },
- },
- version: {
- serializedName: "x-ms-version",
- xmlName: "x-ms-version",
- type: {
- name: "String",
- },
- },
- date: {
- serializedName: "date",
- xmlName: "date",
- type: {
- name: "DateTimeRfc1123",
- },
- },
- 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",
- },
- },
- },
- },
-};
-const ContainerGetAccountInfoExceptionHeaders = {
- serializedName: "Container_getAccountInfoExceptionHeaders",
- type: {
- name: "Composite",
- className: "ContainerGetAccountInfoExceptionHeaders",
- modelProperties: {
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
- type: {
- name: "String",
- },
- },
- },
- },
-};
-const BlobDownloadHeaders = {
- serializedName: "Blob_downloadHeaders",
- type: {
- name: "Composite",
- 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",
- headerCollectionPrefix: "x-ms-meta-",
- xmlName: "x-ms-meta",
- type: {
- name: "Dictionary",
- value: { type: { name: "String" } },
- },
- },
- objectReplicationPolicyId: {
- serializedName: "x-ms-or-policy-id",
- xmlName: "x-ms-or-policy-id",
- type: {
- name: "String",
- },
- },
- objectReplicationRules: {
- serializedName: "x-ms-or",
- headerCollectionPrefix: "x-ms-or-",
- xmlName: "x-ms-or",
- 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",
- type: {
- name: "String",
- },
- },
- contentMD5: {
- serializedName: "content-md5",
- xmlName: "content-md5",
- type: {
- name: "ByteArray",
- },
- },
- contentEncoding: {
- serializedName: "content-encoding",
- xmlName: "content-encoding",
- type: {
- name: "String",
- },
- },
- cacheControl: {
- serializedName: "cache-control",
- xmlName: "cache-control",
- type: {
- name: "String",
- },
- },
- contentDisposition: {
- serializedName: "content-disposition",
- xmlName: "content-disposition",
- type: {
- name: "String",
- },
- },
- 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",
- },
- },
- copyStatusDescription: {
- serializedName: "x-ms-copy-status-description",
- xmlName: "x-ms-copy-status-description",
- type: {
- name: "String",
- },
- },
- copyId: {
- serializedName: "x-ms-copy-id",
- xmlName: "x-ms-copy-id",
- 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"],
- },
- },
- 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: {
- 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",
- },
- },
- 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",
- 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",
- 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",
- },
- },
- blobContentMD5: {
- serializedName: "x-ms-blob-content-md5",
- xmlName: "x-ms-blob-content-md5",
- type: {
- name: "ByteArray",
- },
- },
- tagCount: {
- serializedName: "x-ms-tag-count",
- xmlName: "x-ms-tag-count",
- type: {
- name: "Number",
- },
- },
- isSealed: {
- serializedName: "x-ms-blob-sealed",
- xmlName: "x-ms-blob-sealed",
- type: {
- name: "Boolean",
- },
- },
- 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",
- },
- },
- contentCrc64: {
- serializedName: "x-ms-content-crc64",
- xmlName: "x-ms-content-crc64",
- type: {
- name: "ByteArray",
- },
- },
- },
- },
-};
-const BlobDownloadExceptionHeaders = {
- serializedName: "Blob_downloadExceptionHeaders",
- type: {
- name: "Composite",
- className: "BlobDownloadExceptionHeaders",
- modelProperties: {
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
- type: {
- name: "String",
- },
- },
- },
- },
-};
-const BlobGetPropertiesHeaders = {
- serializedName: "Blob_getPropertiesHeaders",
- type: {
- name: "Composite",
- className: "BlobGetPropertiesHeaders",
- 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",
- headerCollectionPrefix: "x-ms-meta-",
- xmlName: "x-ms-meta",
- type: {
- name: "Dictionary",
- value: { type: { name: "String" } },
- },
- },
- objectReplicationPolicyId: {
- serializedName: "x-ms-or-policy-id",
- xmlName: "x-ms-or-policy-id",
- type: {
- name: "String",
- },
- },
- objectReplicationRules: {
- serializedName: "x-ms-or",
- headerCollectionPrefix: "x-ms-or-",
- xmlName: "x-ms-or",
- type: {
- name: "Dictionary",
- value: { type: { name: "String" } },
- },
- },
- 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",
- },
- },
- copyId: {
- serializedName: "x-ms-copy-id",
- xmlName: "x-ms-copy-id",
- 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",
- type: {
- name: "Number",
- },
- },
- contentType: {
- serializedName: "content-type",
- xmlName: "content-type",
- type: {
- name: "String",
- },
- },
- etag: {
- serializedName: "etag",
- xmlName: "etag",
- type: {
- 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",
- type: {
- name: "String",
- },
- },
- 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",
- type: {
- name: "String",
- },
- },
- date: {
- serializedName: "date",
- xmlName: "date",
- 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 BlobGetPropertiesExceptionHeaders = {
- serializedName: "Blob_getPropertiesExceptionHeaders",
- type: {
- name: "Composite",
- className: "BlobGetPropertiesExceptionHeaders",
- modelProperties: {
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
- type: {
- name: "String",
- },
- },
- },
- },
-};
-const BlobDeleteHeaders = {
- serializedName: "Blob_deleteHeaders",
- type: {
- name: "Composite",
- className: "BlobDeleteHeaders",
- modelProperties: {
- clientRequestId: {
- serializedName: "x-ms-client-request-id",
- xmlName: "x-ms-client-request-id",
- type: {
- name: "String",
- },
- },
- requestId: {
- serializedName: "x-ms-request-id",
- xmlName: "x-ms-request-id",
- type: {
- name: "String",
- },
- },
- version: {
- serializedName: "x-ms-version",
- xmlName: "x-ms-version",
- type: {
- name: "String",
- },
- },
- date: {
- serializedName: "date",
- xmlName: "date",
- type: {
- name: "DateTimeRfc1123",
- },
- },
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
- type: {
- name: "String",
- },
- },
- },
- },
-};
-const BlobDeleteExceptionHeaders = {
- serializedName: "Blob_deleteExceptionHeaders",
- type: {
- name: "Composite",
- className: "BlobDeleteExceptionHeaders",
- modelProperties: {
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
- type: {
- name: "String",
- },
- },
- },
- },
-};
-const BlobUndeleteHeaders = {
- serializedName: "Blob_undeleteHeaders",
- type: {
- name: "Composite",
- className: "BlobUndeleteHeaders",
- modelProperties: {
- clientRequestId: {
- serializedName: "x-ms-client-request-id",
- xmlName: "x-ms-client-request-id",
- type: {
- name: "String",
- },
- },
- requestId: {
- serializedName: "x-ms-request-id",
- xmlName: "x-ms-request-id",
- type: {
- name: "String",
- },
- },
- version: {
- serializedName: "x-ms-version",
- xmlName: "x-ms-version",
- type: {
- name: "String",
- },
- },
- date: {
- serializedName: "date",
- xmlName: "date",
- type: {
- name: "DateTimeRfc1123",
- },
- },
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
- type: {
- name: "String",
- },
- },
- },
- },
-};
-const BlobUndeleteExceptionHeaders = {
- serializedName: "Blob_undeleteExceptionHeaders",
- type: {
- name: "Composite",
- className: "BlobUndeleteExceptionHeaders",
- modelProperties: {
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
- type: {
- name: "String",
- },
- },
- },
- },
-};
-const BlobSetExpiryHeaders = {
- serializedName: "Blob_setExpiryHeaders",
- type: {
- name: "Composite",
- className: "BlobSetExpiryHeaders",
- 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",
- },
- },
- },
- },
-};
-const BlobSetExpiryExceptionHeaders = {
- serializedName: "Blob_setExpiryExceptionHeaders",
- type: {
- name: "Composite",
- className: "BlobSetExpiryExceptionHeaders",
- modelProperties: {
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
- type: {
- name: "String",
- },
- },
- },
- },
-};
-const BlobSetHttpHeadersHeaders = {
- serializedName: "Blob_setHttpHeadersHeaders",
- type: {
- name: "Composite",
- className: "BlobSetHttpHeadersHeaders",
- 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",
- 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 BlobSetHttpHeadersExceptionHeaders = {
- serializedName: "Blob_setHttpHeadersExceptionHeaders",
- type: {
- name: "Composite",
- className: "BlobSetHttpHeadersExceptionHeaders",
- modelProperties: {
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
- type: {
- name: "String",
- },
- },
- },
- },
-};
-const BlobSetImmutabilityPolicyHeaders = {
- serializedName: "Blob_setImmutabilityPolicyHeaders",
- type: {
- name: "Composite",
- className: "BlobSetImmutabilityPolicyHeaders",
- modelProperties: {
- clientRequestId: {
- serializedName: "x-ms-client-request-id",
- xmlName: "x-ms-client-request-id",
- type: {
- name: "String",
- },
- },
- requestId: {
- serializedName: "x-ms-request-id",
- xmlName: "x-ms-request-id",
- type: {
- name: "String",
- },
- },
- version: {
- serializedName: "x-ms-version",
- xmlName: "x-ms-version",
- type: {
- name: "String",
- },
- },
- date: {
- serializedName: "date",
- xmlName: "date",
- type: {
- name: "DateTimeRfc1123",
- },
- },
- immutabilityPolicyExpiry: {
- 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"],
- },
- },
- },
- },
-};
-const BlobSetImmutabilityPolicyExceptionHeaders = {
- serializedName: "Blob_setImmutabilityPolicyExceptionHeaders",
- type: {
- name: "Composite",
- className: "BlobSetImmutabilityPolicyExceptionHeaders",
- modelProperties: {
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
- type: {
- name: "String",
- },
- },
- },
- },
-};
-const BlobDeleteImmutabilityPolicyHeaders = {
- serializedName: "Blob_deleteImmutabilityPolicyHeaders",
- type: {
- name: "Composite",
- className: "BlobDeleteImmutabilityPolicyHeaders",
- modelProperties: {
- clientRequestId: {
- serializedName: "x-ms-client-request-id",
- xmlName: "x-ms-client-request-id",
- type: {
- name: "String",
- },
- },
- requestId: {
- serializedName: "x-ms-request-id",
- xmlName: "x-ms-request-id",
- type: {
- name: "String",
- },
- },
- version: {
- serializedName: "x-ms-version",
- xmlName: "x-ms-version",
- type: {
- name: "String",
- },
- },
- date: {
- serializedName: "date",
- xmlName: "date",
- type: {
- name: "DateTimeRfc1123",
- },
- },
- },
- },
-};
-const BlobDeleteImmutabilityPolicyExceptionHeaders = {
- serializedName: "Blob_deleteImmutabilityPolicyExceptionHeaders",
- type: {
- name: "Composite",
- className: "BlobDeleteImmutabilityPolicyExceptionHeaders",
- modelProperties: {
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
- 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",
- 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",
- },
- },
- legalHold: {
- serializedName: "x-ms-legal-hold",
- xmlName: "x-ms-legal-hold",
- type: {
- name: "Boolean",
- },
- },
- },
- },
-};
-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",
- 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",
- },
- },
- 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 BlobSetMetadataExceptionHeaders = {
- serializedName: "Blob_setMetadataExceptionHeaders",
- type: {
- name: "Composite",
- className: "BlobSetMetadataExceptionHeaders",
- modelProperties: {
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
- type: {
- name: "String",
- },
- },
- },
- },
-};
-const BlobAcquireLeaseHeaders = {
- serializedName: "Blob_acquireLeaseHeaders",
- type: {
- name: "Composite",
- className: "BlobAcquireLeaseHeaders",
- 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",
- type: {
- name: "String",
- },
- },
- requestId: {
- serializedName: "x-ms-request-id",
- xmlName: "x-ms-request-id",
- type: {
- name: "String",
- },
- },
- version: {
- serializedName: "x-ms-version",
- xmlName: "x-ms-version",
- type: {
- name: "String",
- },
- },
- date: {
- serializedName: "date",
- xmlName: "date",
- type: {
- name: "DateTimeRfc1123",
- },
- },
- },
- },
-};
-const BlobAcquireLeaseExceptionHeaders = {
- serializedName: "Blob_acquireLeaseExceptionHeaders",
- type: {
- name: "Composite",
- className: "BlobAcquireLeaseExceptionHeaders",
- modelProperties: {
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
- type: {
- name: "String",
- },
- },
- },
- },
-};
-const BlobReleaseLeaseHeaders = {
- serializedName: "Blob_releaseLeaseHeaders",
- type: {
- name: "Composite",
- className: "BlobReleaseLeaseHeaders",
- 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",
- },
- },
- },
- },
-};
-const BlobReleaseLeaseExceptionHeaders = {
- serializedName: "Blob_releaseLeaseExceptionHeaders",
- type: {
- name: "Composite",
- className: "BlobReleaseLeaseExceptionHeaders",
- modelProperties: {
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
- type: {
- name: "String",
- },
- },
- },
- },
-};
-const BlobRenewLeaseHeaders = {
- serializedName: "Blob_renewLeaseHeaders",
- type: {
- name: "Composite",
- className: "BlobRenewLeaseHeaders",
- 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",
- type: {
- name: "String",
- },
- },
- requestId: {
- serializedName: "x-ms-request-id",
- xmlName: "x-ms-request-id",
- type: {
- name: "String",
- },
- },
- version: {
- serializedName: "x-ms-version",
- xmlName: "x-ms-version",
- type: {
- name: "String",
- },
- },
- date: {
- serializedName: "date",
- xmlName: "date",
- type: {
- name: "DateTimeRfc1123",
- },
- },
- },
- },
-};
-const BlobRenewLeaseExceptionHeaders = {
- serializedName: "Blob_renewLeaseExceptionHeaders",
- type: {
- name: "Composite",
- className: "BlobRenewLeaseExceptionHeaders",
- modelProperties: {
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
- type: {
- name: "String",
- },
- },
- },
- },
-};
-const BlobChangeLeaseHeaders = {
- serializedName: "Blob_changeLeaseHeaders",
- type: {
- name: "Composite",
- className: "BlobChangeLeaseHeaders",
- 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",
- },
- },
- leaseId: {
- serializedName: "x-ms-lease-id",
- xmlName: "x-ms-lease-id",
- type: {
- name: "String",
- },
- },
- version: {
- serializedName: "x-ms-version",
- xmlName: "x-ms-version",
- type: {
- name: "String",
- },
- },
- date: {
- serializedName: "date",
- xmlName: "date",
- type: {
- name: "DateTimeRfc1123",
- },
- },
- },
- },
-};
-const 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",
- 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",
- type: {
- name: "String",
- },
- },
- requestId: {
- serializedName: "x-ms-request-id",
- xmlName: "x-ms-request-id",
- type: {
- name: "String",
- },
- },
- version: {
- serializedName: "x-ms-version",
- xmlName: "x-ms-version",
- type: {
- name: "String",
- },
- },
- date: {
- serializedName: "date",
- xmlName: "date",
- type: {
- name: "DateTimeRfc1123",
- },
- },
- },
- },
-};
-const BlobBreakLeaseExceptionHeaders = {
- serializedName: "Blob_breakLeaseExceptionHeaders",
- type: {
- name: "Composite",
- className: "BlobBreakLeaseExceptionHeaders",
- modelProperties: {
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
- type: {
- name: "String",
- },
- },
- },
- },
-};
-const BlobCreateSnapshotHeaders = {
- serializedName: "Blob_createSnapshotHeaders",
- type: {
- name: "Composite",
- className: "BlobCreateSnapshotHeaders",
- modelProperties: {
- snapshot: {
- serializedName: "x-ms-snapshot",
- xmlName: "x-ms-snapshot",
- type: {
- name: "String",
- },
- },
- 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",
- },
- },
- 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",
- },
- },
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
- type: {
- name: "String",
- },
- },
- },
- },
-};
-const BlobCreateSnapshotExceptionHeaders = {
- serializedName: "Blob_createSnapshotExceptionHeaders",
- type: {
- name: "Composite",
- className: "BlobCreateSnapshotExceptionHeaders",
- modelProperties: {
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
- type: {
- name: "String",
- },
- },
- },
- },
-};
-const BlobStartCopyFromURLHeaders = {
- serializedName: "Blob_startCopyFromURLHeaders",
- type: {
- name: "Composite",
- 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",
- 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",
- },
- },
- 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 BlobStartCopyFromURLExceptionHeaders = {
- serializedName: "Blob_startCopyFromURLExceptionHeaders",
- type: {
- name: "Composite",
- className: "BlobStartCopyFromURLExceptionHeaders",
- modelProperties: {
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
- type: {
- name: "String",
- },
- },
- },
- },
-};
-const BlobCopyFromURLHeaders = {
- serializedName: "Blob_copyFromURLHeaders",
- type: {
- name: "Composite",
- 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",
- 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",
- },
- },
- 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",
- type: {
- name: "String",
- },
- },
- },
- },
-};
-const BlobCopyFromURLExceptionHeaders = {
- serializedName: "Blob_copyFromURLExceptionHeaders",
- type: {
- name: "Composite",
- className: "BlobCopyFromURLExceptionHeaders",
- modelProperties: {
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
- type: {
- name: "String",
- },
- },
- },
- },
-};
-const BlobAbortCopyFromURLHeaders = {
- serializedName: "Blob_abortCopyFromURLHeaders",
- type: {
- name: "Composite",
- className: "BlobAbortCopyFromURLHeaders",
- modelProperties: {
- clientRequestId: {
- serializedName: "x-ms-client-request-id",
- xmlName: "x-ms-client-request-id",
- type: {
- name: "String",
- },
- },
- requestId: {
- serializedName: "x-ms-request-id",
- xmlName: "x-ms-request-id",
- type: {
- name: "String",
- },
- },
- version: {
- serializedName: "x-ms-version",
- xmlName: "x-ms-version",
- type: {
- name: "String",
- },
- },
- date: {
- serializedName: "date",
- xmlName: "date",
- type: {
- name: "DateTimeRfc1123",
- },
- },
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
- type: {
- name: "String",
- },
- },
- },
- },
-};
-const BlobAbortCopyFromURLExceptionHeaders = {
- serializedName: "Blob_abortCopyFromURLExceptionHeaders",
- type: {
- name: "Composite",
- className: "BlobAbortCopyFromURLExceptionHeaders",
- modelProperties: {
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
- type: {
- name: "String",
- },
- },
- },
- },
-};
-const BlobSetTierHeaders = {
- serializedName: "Blob_setTierHeaders",
- type: {
- name: "Composite",
- className: "BlobSetTierHeaders",
- modelProperties: {
- clientRequestId: {
- serializedName: "x-ms-client-request-id",
- xmlName: "x-ms-client-request-id",
- type: {
- name: "String",
- },
- },
- requestId: {
- serializedName: "x-ms-request-id",
- xmlName: "x-ms-request-id",
- type: {
- name: "String",
- },
- },
- version: {
- serializedName: "x-ms-version",
- xmlName: "x-ms-version",
- type: {
- name: "String",
- },
- },
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
- type: {
- name: "String",
- },
- },
- },
- },
-};
-const BlobSetTierExceptionHeaders = {
- serializedName: "Blob_setTierExceptionHeaders",
- type: {
- name: "Composite",
- className: "BlobSetTierExceptionHeaders",
- modelProperties: {
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
- type: {
- name: "String",
- },
- },
- },
- },
-};
-const BlobGetAccountInfoHeaders = {
- serializedName: "Blob_getAccountInfoHeaders",
- type: {
- name: "Composite",
- className: "BlobGetAccountInfoHeaders",
- modelProperties: {
- clientRequestId: {
- serializedName: "x-ms-client-request-id",
- xmlName: "x-ms-client-request-id",
- type: {
- name: "String",
- },
- },
- requestId: {
- serializedName: "x-ms-request-id",
- xmlName: "x-ms-request-id",
- type: {
- name: "String",
- },
- },
- version: {
- serializedName: "x-ms-version",
- xmlName: "x-ms-version",
- type: {
- name: "String",
- },
- },
- date: {
- serializedName: "date",
- xmlName: "date",
- type: {
- name: "DateTimeRfc1123",
- },
- },
- 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",
- },
- },
- },
- },
-};
-const BlobGetAccountInfoExceptionHeaders = {
- serializedName: "Blob_getAccountInfoExceptionHeaders",
- type: {
- name: "Composite",
- className: "BlobGetAccountInfoExceptionHeaders",
- modelProperties: {
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
- type: {
- name: "String",
- },
- },
- },
- },
-};
-const BlobQueryHeaders = {
- serializedName: "Blob_queryHeaders",
- type: {
- name: "Composite",
- className: "BlobQueryHeaders",
- modelProperties: {
- lastModified: {
- serializedName: "last-modified",
- xmlName: "last-modified",
- type: {
- name: "DateTimeRfc1123",
- },
- },
- metadata: {
- serializedName: "x-ms-meta",
- headerCollectionPrefix: "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",
- type: {
- name: "String",
- },
- },
- contentMD5: {
- serializedName: "content-md5",
- xmlName: "content-md5",
- type: {
- name: "ByteArray",
- },
- },
- contentEncoding: {
- serializedName: "content-encoding",
- xmlName: "content-encoding",
- type: {
- name: "String",
- },
- },
- cacheControl: {
- serializedName: "cache-control",
- xmlName: "cache-control",
- type: {
- name: "String",
- },
- },
- contentDisposition: {
- serializedName: "content-disposition",
- xmlName: "content-disposition",
- type: {
- name: "String",
- },
- },
- 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"],
- },
- },
- copyCompletionTime: {
- 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",
- },
- },
- copyId: {
- serializedName: "x-ms-copy-id",
- xmlName: "x-ms-copy-id",
- 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"],
- },
- },
- 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: {
- 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",
- },
- },
- acceptRanges: {
- serializedName: "accept-ranges",
- xmlName: "accept-ranges",
- type: {
- name: "String",
- },
- },
- date: {
- serializedName: "date",
- xmlName: "date",
- 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",
- 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",
- },
- },
- 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 BlobQueryExceptionHeaders = {
- serializedName: "Blob_queryExceptionHeaders",
- type: {
- name: "Composite",
- className: "BlobQueryExceptionHeaders",
- modelProperties: {
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
- type: {
- name: "String",
- },
- },
- },
- },
-};
-const BlobGetTagsHeaders = {
- serializedName: "Blob_getTagsHeaders",
- type: {
- name: "Composite",
- className: "BlobGetTagsHeaders",
- modelProperties: {
- clientRequestId: {
- serializedName: "x-ms-client-request-id",
- xmlName: "x-ms-client-request-id",
- type: {
- name: "String",
- },
- },
- requestId: {
- serializedName: "x-ms-request-id",
- xmlName: "x-ms-request-id",
- type: {
- name: "String",
- },
- },
- version: {
- serializedName: "x-ms-version",
- xmlName: "x-ms-version",
- type: {
- name: "String",
- },
- },
- date: {
- serializedName: "date",
- xmlName: "date",
- type: {
- name: "DateTimeRfc1123",
- },
- },
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
- type: {
- name: "String",
- },
- },
- },
- },
-};
-const BlobGetTagsExceptionHeaders = {
- serializedName: "Blob_getTagsExceptionHeaders",
- type: {
- name: "Composite",
- className: "BlobGetTagsExceptionHeaders",
- modelProperties: {
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
- type: {
- name: "String",
- },
- },
- },
- },
-};
-const BlobSetTagsHeaders = {
- serializedName: "Blob_setTagsHeaders",
- type: {
- name: "Composite",
- className: "BlobSetTagsHeaders",
- modelProperties: {
- clientRequestId: {
- serializedName: "x-ms-client-request-id",
- xmlName: "x-ms-client-request-id",
- type: {
- name: "String",
- },
- },
- requestId: {
- serializedName: "x-ms-request-id",
- xmlName: "x-ms-request-id",
- type: {
- name: "String",
- },
- },
- version: {
- serializedName: "x-ms-version",
- xmlName: "x-ms-version",
- type: {
- name: "String",
- },
- },
- date: {
- serializedName: "date",
- xmlName: "date",
- type: {
- name: "DateTimeRfc1123",
- },
- },
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
- type: {
- name: "String",
- },
- },
- },
- },
-};
-const BlobSetTagsExceptionHeaders = {
- serializedName: "Blob_setTagsExceptionHeaders",
- type: {
- name: "Composite",
- className: "BlobSetTagsExceptionHeaders",
- modelProperties: {
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
- type: {
- name: "String",
- },
- },
- },
- },
-};
-const PageBlobCreateHeaders = {
- serializedName: "PageBlob_createHeaders",
- type: {
- name: "Composite",
- className: "PageBlobCreateHeaders",
- 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 PageBlobCreateExceptionHeaders = {
- serializedName: "PageBlob_createExceptionHeaders",
- type: {
- name: "Composite",
- className: "PageBlobCreateExceptionHeaders",
- modelProperties: {
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
- type: {
- name: "String",
- },
- },
- },
- },
-};
-const PageBlobUploadPagesHeaders = {
- serializedName: "PageBlob_uploadPagesHeaders",
- type: {
- name: "Composite",
- className: "PageBlobUploadPagesHeaders",
- 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",
- },
- },
- 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",
- 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 PageBlobUploadPagesExceptionHeaders = {
- serializedName: "PageBlob_uploadPagesExceptionHeaders",
- type: {
- name: "Composite",
- className: "PageBlobUploadPagesExceptionHeaders",
- modelProperties: {
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
- type: {
- name: "String",
- },
- },
- },
- },
-};
-const PageBlobClearPagesHeaders = {
- serializedName: "PageBlob_clearPagesHeaders",
- type: {
- name: "Composite",
- className: "PageBlobClearPagesHeaders",
- 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",
- },
- },
- 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",
- 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 PageBlobClearPagesExceptionHeaders = {
- serializedName: "PageBlob_clearPagesExceptionHeaders",
- type: {
- name: "Composite",
- className: "PageBlobClearPagesExceptionHeaders",
- modelProperties: {
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
- type: {
- name: "String",
- },
- },
- },
- },
-};
-const PageBlobUploadPagesFromURLHeaders = {
- serializedName: "PageBlob_uploadPagesFromURLHeaders",
- type: {
- name: "Composite",
- className: "PageBlobUploadPagesFromURLHeaders",
- 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",
- },
- },
- blobSequenceNumber: {
- serializedName: "x-ms-blob-sequence-number",
- xmlName: "x-ms-blob-sequence-number",
- type: {
- name: "Number",
- },
- },
- 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 PageBlobUploadPagesFromURLExceptionHeaders = {
- serializedName: "PageBlob_uploadPagesFromURLExceptionHeaders",
- type: {
- name: "Composite",
- className: "PageBlobUploadPagesFromURLExceptionHeaders",
- modelProperties: {
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
- type: {
- name: "String",
- },
- },
- },
- },
-};
-const PageBlobGetPageRangesHeaders = {
- serializedName: "PageBlob_getPageRangesHeaders",
- type: {
- name: "Composite",
- className: "PageBlobGetPageRangesHeaders",
- modelProperties: {
- lastModified: {
- serializedName: "last-modified",
- xmlName: "last-modified",
- type: {
- name: "DateTimeRfc1123",
- },
- },
- etag: {
- serializedName: "etag",
- xmlName: "etag",
- 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 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",
- type: {
- name: "DateTimeRfc1123",
- },
- },
- etag: {
- serializedName: "etag",
- xmlName: "etag",
- 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 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",
- 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 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",
- 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 PageBlobUpdateSequenceNumberExceptionHeaders = {
- serializedName: "PageBlob_updateSequenceNumberExceptionHeaders",
- type: {
- name: "Composite",
- className: "PageBlobUpdateSequenceNumberExceptionHeaders",
- modelProperties: {
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
- type: {
- name: "String",
- },
- },
- },
- },
-};
-const PageBlobCopyIncrementalHeaders = {
- serializedName: "PageBlob_copyIncrementalHeaders",
- type: {
- name: "Composite",
- 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",
- 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",
- 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 AppendBlobCreateExceptionHeaders = {
- serializedName: "AppendBlob_createExceptionHeaders",
- type: {
- name: "Composite",
- className: "AppendBlobCreateExceptionHeaders",
- modelProperties: {
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
- type: {
- name: "String",
- },
- },
- },
- },
-};
-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",
- },
- },
- },
- },
-};
-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 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 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 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 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 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 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 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 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 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 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 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 BlockBlobStageBlockFromURLExceptionHeaders = {
- serializedName: "BlockBlob_stageBlockFromURLExceptionHeaders",
- type: {
- name: "Composite",
- className: "BlockBlobStageBlockFromURLExceptionHeaders",
- modelProperties: {
- errorCode: {
- serializedName: "x-ms-error-code",
- xmlName: "x-ms-error-code",
- type: {
- name: "String",
- },
- },
- },
- },
-};
-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 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,
- AccessPolicy: AccessPolicy,
- AppendBlobAppendBlockExceptionHeaders: AppendBlobAppendBlockExceptionHeaders,
- AppendBlobAppendBlockFromUrlExceptionHeaders: AppendBlobAppendBlockFromUrlExceptionHeaders,
- AppendBlobAppendBlockFromUrlHeaders: AppendBlobAppendBlockFromUrlHeaders,
- AppendBlobAppendBlockHeaders: AppendBlobAppendBlockHeaders,
- AppendBlobCreateExceptionHeaders: AppendBlobCreateExceptionHeaders,
- AppendBlobCreateHeaders: AppendBlobCreateHeaders,
- AppendBlobSealExceptionHeaders: AppendBlobSealExceptionHeaders,
- AppendBlobSealHeaders: AppendBlobSealHeaders,
- ArrowConfiguration: ArrowConfiguration,
- ArrowField: ArrowField,
- BlobAbortCopyFromURLExceptionHeaders: BlobAbortCopyFromURLExceptionHeaders,
- BlobAbortCopyFromURLHeaders: BlobAbortCopyFromURLHeaders,
- BlobAcquireLeaseExceptionHeaders: BlobAcquireLeaseExceptionHeaders,
- BlobAcquireLeaseHeaders: BlobAcquireLeaseHeaders,
- BlobBreakLeaseExceptionHeaders: BlobBreakLeaseExceptionHeaders,
- BlobBreakLeaseHeaders: BlobBreakLeaseHeaders,
- BlobChangeLeaseExceptionHeaders: BlobChangeLeaseExceptionHeaders,
- BlobChangeLeaseHeaders: BlobChangeLeaseHeaders,
- BlobCopyFromURLExceptionHeaders: BlobCopyFromURLExceptionHeaders,
- BlobCopyFromURLHeaders: BlobCopyFromURLHeaders,
- BlobCreateSnapshotExceptionHeaders: BlobCreateSnapshotExceptionHeaders,
- BlobCreateSnapshotHeaders: BlobCreateSnapshotHeaders,
- BlobDeleteExceptionHeaders: BlobDeleteExceptionHeaders,
- BlobDeleteHeaders: BlobDeleteHeaders,
- BlobDeleteImmutabilityPolicyExceptionHeaders: BlobDeleteImmutabilityPolicyExceptionHeaders,
- BlobDeleteImmutabilityPolicyHeaders: BlobDeleteImmutabilityPolicyHeaders,
- BlobDownloadExceptionHeaders: BlobDownloadExceptionHeaders,
- BlobDownloadHeaders: BlobDownloadHeaders,
- BlobFlatListSegment: BlobFlatListSegment,
- BlobGetAccountInfoExceptionHeaders: BlobGetAccountInfoExceptionHeaders,
- BlobGetAccountInfoHeaders: BlobGetAccountInfoHeaders,
- BlobGetPropertiesExceptionHeaders: BlobGetPropertiesExceptionHeaders,
- BlobGetPropertiesHeaders: BlobGetPropertiesHeaders,
- BlobGetTagsExceptionHeaders: BlobGetTagsExceptionHeaders,
- BlobGetTagsHeaders: BlobGetTagsHeaders,
- BlobHierarchyListSegment: BlobHierarchyListSegment,
- BlobItemInternal: BlobItemInternal,
- BlobName: BlobName,
- BlobPrefix: BlobPrefix,
- BlobPropertiesInternal: BlobPropertiesInternal,
- BlobQueryExceptionHeaders: BlobQueryExceptionHeaders,
- BlobQueryHeaders: BlobQueryHeaders,
- BlobReleaseLeaseExceptionHeaders: BlobReleaseLeaseExceptionHeaders,
- BlobReleaseLeaseHeaders: BlobReleaseLeaseHeaders,
- BlobRenewLeaseExceptionHeaders: BlobRenewLeaseExceptionHeaders,
- BlobRenewLeaseHeaders: BlobRenewLeaseHeaders,
- BlobServiceProperties: BlobServiceProperties,
- BlobServiceStatistics: BlobServiceStatistics,
- BlobSetExpiryExceptionHeaders: BlobSetExpiryExceptionHeaders,
- BlobSetExpiryHeaders: BlobSetExpiryHeaders,
- BlobSetHttpHeadersExceptionHeaders: BlobSetHttpHeadersExceptionHeaders,
- BlobSetHttpHeadersHeaders: BlobSetHttpHeadersHeaders,
- BlobSetImmutabilityPolicyExceptionHeaders: BlobSetImmutabilityPolicyExceptionHeaders,
- BlobSetImmutabilityPolicyHeaders: BlobSetImmutabilityPolicyHeaders,
- BlobSetLegalHoldExceptionHeaders: BlobSetLegalHoldExceptionHeaders,
- BlobSetLegalHoldHeaders: BlobSetLegalHoldHeaders,
- BlobSetMetadataExceptionHeaders: BlobSetMetadataExceptionHeaders,
- BlobSetMetadataHeaders: BlobSetMetadataHeaders,
- BlobSetTagsExceptionHeaders: BlobSetTagsExceptionHeaders,
- BlobSetTagsHeaders: BlobSetTagsHeaders,
- BlobSetTierExceptionHeaders: BlobSetTierExceptionHeaders,
- BlobSetTierHeaders: BlobSetTierHeaders,
- BlobStartCopyFromURLExceptionHeaders: BlobStartCopyFromURLExceptionHeaders,
- BlobStartCopyFromURLHeaders: BlobStartCopyFromURLHeaders,
- BlobTag: BlobTag,
- BlobTags: BlobTags,
- BlobUndeleteExceptionHeaders: BlobUndeleteExceptionHeaders,
- BlobUndeleteHeaders: BlobUndeleteHeaders,
- Block: Block,
- BlockBlobCommitBlockListExceptionHeaders: BlockBlobCommitBlockListExceptionHeaders,
- BlockBlobCommitBlockListHeaders: BlockBlobCommitBlockListHeaders,
- BlockBlobGetBlockListExceptionHeaders: BlockBlobGetBlockListExceptionHeaders,
- BlockBlobGetBlockListHeaders: BlockBlobGetBlockListHeaders,
- BlockBlobPutBlobFromUrlExceptionHeaders: BlockBlobPutBlobFromUrlExceptionHeaders,
- BlockBlobPutBlobFromUrlHeaders: BlockBlobPutBlobFromUrlHeaders,
- BlockBlobStageBlockExceptionHeaders: BlockBlobStageBlockExceptionHeaders,
- BlockBlobStageBlockFromURLExceptionHeaders: BlockBlobStageBlockFromURLExceptionHeaders,
- BlockBlobStageBlockFromURLHeaders: BlockBlobStageBlockFromURLHeaders,
- BlockBlobStageBlockHeaders: BlockBlobStageBlockHeaders,
- BlockBlobUploadExceptionHeaders: BlockBlobUploadExceptionHeaders,
- BlockBlobUploadHeaders: BlockBlobUploadHeaders,
- BlockList: BlockList,
- BlockLookupList: BlockLookupList,
- ClearRange: ClearRange,
- ContainerAcquireLeaseExceptionHeaders: ContainerAcquireLeaseExceptionHeaders,
- ContainerAcquireLeaseHeaders: ContainerAcquireLeaseHeaders,
- ContainerBreakLeaseExceptionHeaders: ContainerBreakLeaseExceptionHeaders,
- ContainerBreakLeaseHeaders: ContainerBreakLeaseHeaders,
- ContainerChangeLeaseExceptionHeaders: ContainerChangeLeaseExceptionHeaders,
- ContainerChangeLeaseHeaders: ContainerChangeLeaseHeaders,
- ContainerCreateExceptionHeaders: ContainerCreateExceptionHeaders,
- ContainerCreateHeaders: ContainerCreateHeaders,
- ContainerDeleteExceptionHeaders: ContainerDeleteExceptionHeaders,
- ContainerDeleteHeaders: ContainerDeleteHeaders,
- ContainerFilterBlobsExceptionHeaders: ContainerFilterBlobsExceptionHeaders,
- ContainerFilterBlobsHeaders: ContainerFilterBlobsHeaders,
- ContainerGetAccessPolicyExceptionHeaders: ContainerGetAccessPolicyExceptionHeaders,
- ContainerGetAccessPolicyHeaders: ContainerGetAccessPolicyHeaders,
- ContainerGetAccountInfoExceptionHeaders: ContainerGetAccountInfoExceptionHeaders,
- ContainerGetAccountInfoHeaders: ContainerGetAccountInfoHeaders,
- ContainerGetPropertiesExceptionHeaders: ContainerGetPropertiesExceptionHeaders,
- ContainerGetPropertiesHeaders: ContainerGetPropertiesHeaders,
- ContainerItem: ContainerItem,
- ContainerListBlobFlatSegmentExceptionHeaders: ContainerListBlobFlatSegmentExceptionHeaders,
- ContainerListBlobFlatSegmentHeaders: ContainerListBlobFlatSegmentHeaders,
- ContainerListBlobHierarchySegmentExceptionHeaders: ContainerListBlobHierarchySegmentExceptionHeaders,
- ContainerListBlobHierarchySegmentHeaders: ContainerListBlobHierarchySegmentHeaders,
- ContainerProperties: ContainerProperties,
- ContainerReleaseLeaseExceptionHeaders: ContainerReleaseLeaseExceptionHeaders,
- ContainerReleaseLeaseHeaders: ContainerReleaseLeaseHeaders,
- ContainerRenameExceptionHeaders: ContainerRenameExceptionHeaders,
- ContainerRenameHeaders: ContainerRenameHeaders,
- ContainerRenewLeaseExceptionHeaders: ContainerRenewLeaseExceptionHeaders,
- ContainerRenewLeaseHeaders: ContainerRenewLeaseHeaders,
- ContainerRestoreExceptionHeaders: ContainerRestoreExceptionHeaders,
- ContainerRestoreHeaders: ContainerRestoreHeaders,
- ContainerSetAccessPolicyExceptionHeaders: ContainerSetAccessPolicyExceptionHeaders,
- ContainerSetAccessPolicyHeaders: ContainerSetAccessPolicyHeaders,
- ContainerSetMetadataExceptionHeaders: ContainerSetMetadataExceptionHeaders,
- ContainerSetMetadataHeaders: ContainerSetMetadataHeaders,
- ContainerSubmitBatchExceptionHeaders: ContainerSubmitBatchExceptionHeaders,
- ContainerSubmitBatchHeaders: ContainerSubmitBatchHeaders,
- CorsRule: CorsRule,
- DelimitedTextConfiguration: DelimitedTextConfiguration,
- FilterBlobItem: FilterBlobItem,
- FilterBlobSegment: FilterBlobSegment,
- GeoReplication: GeoReplication,
- JsonTextConfiguration: JsonTextConfiguration,
- KeyInfo: KeyInfo,
- ListBlobsFlatSegmentResponse: ListBlobsFlatSegmentResponse,
- ListBlobsHierarchySegmentResponse: ListBlobsHierarchySegmentResponse,
- ListContainersSegmentResponse: ListContainersSegmentResponse,
- Logging: Logging,
- Metrics: Metrics,
- PageBlobClearPagesExceptionHeaders: PageBlobClearPagesExceptionHeaders,
- PageBlobClearPagesHeaders: PageBlobClearPagesHeaders,
- PageBlobCopyIncrementalExceptionHeaders: PageBlobCopyIncrementalExceptionHeaders,
- PageBlobCopyIncrementalHeaders: PageBlobCopyIncrementalHeaders,
- PageBlobCreateExceptionHeaders: PageBlobCreateExceptionHeaders,
- PageBlobCreateHeaders: PageBlobCreateHeaders,
- PageBlobGetPageRangesDiffExceptionHeaders: PageBlobGetPageRangesDiffExceptionHeaders,
- PageBlobGetPageRangesDiffHeaders: PageBlobGetPageRangesDiffHeaders,
- PageBlobGetPageRangesExceptionHeaders: PageBlobGetPageRangesExceptionHeaders,
- PageBlobGetPageRangesHeaders: PageBlobGetPageRangesHeaders,
- PageBlobResizeExceptionHeaders: PageBlobResizeExceptionHeaders,
- PageBlobResizeHeaders: PageBlobResizeHeaders,
- PageBlobUpdateSequenceNumberExceptionHeaders: PageBlobUpdateSequenceNumberExceptionHeaders,
- PageBlobUpdateSequenceNumberHeaders: PageBlobUpdateSequenceNumberHeaders,
- PageBlobUploadPagesExceptionHeaders: PageBlobUploadPagesExceptionHeaders,
- PageBlobUploadPagesFromURLExceptionHeaders: PageBlobUploadPagesFromURLExceptionHeaders,
- PageBlobUploadPagesFromURLHeaders: PageBlobUploadPagesFromURLHeaders,
- PageBlobUploadPagesHeaders: PageBlobUploadPagesHeaders,
- PageList: PageList,
- PageRange: PageRange,
- QueryFormat: QueryFormat,
- QueryRequest: QueryRequest,
- QuerySerialization: QuerySerialization,
- RetentionPolicy: RetentionPolicy,
- ServiceFilterBlobsExceptionHeaders: ServiceFilterBlobsExceptionHeaders,
- ServiceFilterBlobsHeaders: ServiceFilterBlobsHeaders,
- ServiceGetAccountInfoExceptionHeaders: ServiceGetAccountInfoExceptionHeaders,
- ServiceGetAccountInfoHeaders: ServiceGetAccountInfoHeaders,
- ServiceGetPropertiesExceptionHeaders: ServiceGetPropertiesExceptionHeaders,
- ServiceGetPropertiesHeaders: ServiceGetPropertiesHeaders,
- ServiceGetStatisticsExceptionHeaders: ServiceGetStatisticsExceptionHeaders,
- ServiceGetStatisticsHeaders: ServiceGetStatisticsHeaders,
- ServiceGetUserDelegationKeyExceptionHeaders: ServiceGetUserDelegationKeyExceptionHeaders,
- ServiceGetUserDelegationKeyHeaders: ServiceGetUserDelegationKeyHeaders,
- ServiceListContainersSegmentExceptionHeaders: ServiceListContainersSegmentExceptionHeaders,
- ServiceListContainersSegmentHeaders: ServiceListContainersSegmentHeaders,
- ServiceSetPropertiesExceptionHeaders: ServiceSetPropertiesExceptionHeaders,
- ServiceSetPropertiesHeaders: ServiceSetPropertiesHeaders,
- ServiceSubmitBatchExceptionHeaders: ServiceSubmitBatchExceptionHeaders,
- ServiceSubmitBatchHeaders: ServiceSubmitBatchHeaders,
- SignedIdentifier: SignedIdentifier,
- StaticWebsite: StaticWebsite,
- StorageError: StorageError,
- UserDelegationKey: UserDelegationKey
-});
-
-/*
- * 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: "2024-08-04",
- 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: "CSV",
-};
-const keyInfo = {
- parameterPath: "keyInfo",
- mapper: KeyInfo,
-};
-const comp3 = {
- parameterPath: "comp",
- mapper: {
- defaultValue: "userdelegationkey",
- isConstant: true,
- serializedName: "comp",
- type: {
- name: "String",
- },
- },
-};
-const restype1 = {
- parameterPath: "restype",
- mapper: {
- defaultValue: "account",
- isConstant: true,
- serializedName: "restype",
- type: {
- name: "String",
- },
- },
-};
-const body = {
- parameterPath: "body",
- mapper: {
- serializedName: "body",
- required: true,
- xmlName: "body",
- type: {
- name: "Stream",
- },
- },
-};
-const comp4 = {
- parameterPath: "comp",
- mapper: {
- defaultValue: "batch",
- isConstant: true,
- serializedName: "comp",
- type: {
- name: "String",
- },
- },
-};
-const contentLength = {
- parameterPath: "contentLength",
- mapper: {
- serializedName: "Content-Length",
- required: true,
- xmlName: "Content-Length",
- type: {
- name: "Number",
- },
- },
-};
-const multipartContentType = {
- parameterPath: "multipartContentType",
- mapper: {
- serializedName: "Content-Type",
- required: true,
- xmlName: "Content-Type",
- type: {
- name: "String",
- },
- },
-};
-const comp5 = {
- parameterPath: "comp",
- mapper: {
- defaultValue: "blobs",
- isConstant: true,
- serializedName: "comp",
- type: {
- name: "String",
- },
- },
-};
-const where = {
- parameterPath: ["options", "where"],
- mapper: {
- serializedName: "where",
- xmlName: "where",
- type: {
- name: "String",
- },
- },
-};
-const restype2 = {
- parameterPath: "restype",
- mapper: {
- defaultValue: "container",
- isConstant: true,
- serializedName: "restype",
- type: {
- name: "String",
- },
- },
-};
-const metadata = {
- parameterPath: ["options", "metadata"],
- mapper: {
- serializedName: "x-ms-meta",
- xmlName: "x-ms-meta",
- headerCollectionPrefix: "x-ms-meta-",
- type: {
- name: "Dictionary",
- value: { type: { name: "String" } },
- },
- },
-};
-const access = {
- parameterPath: ["options", "access"],
- mapper: {
- serializedName: "x-ms-blob-public-access",
- xmlName: "x-ms-blob-public-access",
- type: {
- name: "Enum",
- allowedValues: ["container", "blob"],
- },
- },
-};
-const defaultEncryptionScope = {
- parameterPath: [
- "options",
- "containerEncryptionScope",
- "defaultEncryptionScope",
- ],
- mapper: {
- serializedName: "x-ms-default-encryption-scope",
- xmlName: "x-ms-default-encryption-scope",
- type: {
- name: "String",
- },
- },
-};
-const preventEncryptionScopeOverride = {
- parameterPath: [
- "options",
- "containerEncryptionScope",
- "preventEncryptionScopeOverride",
- ],
- mapper: {
- serializedName: "x-ms-deny-encryption-scope-override",
- xmlName: "x-ms-deny-encryption-scope-override",
- type: {
- name: "Boolean",
- },
- },
-};
-const leaseId = {
- parameterPath: ["options", "leaseAccessConditions", "leaseId"],
- mapper: {
- serializedName: "x-ms-lease-id",
- xmlName: "x-ms-lease-id",
- type: {
- name: "String",
- },
- },
-};
-const ifModifiedSince = {
- parameterPath: ["options", "modifiedAccessConditions", "ifModifiedSince"],
- mapper: {
- serializedName: "If-Modified-Since",
- xmlName: "If-Modified-Since",
- type: {
- name: "DateTimeRfc1123",
- },
- },
-};
-const ifUnmodifiedSince = {
- parameterPath: ["options", "modifiedAccessConditions", "ifUnmodifiedSince"],
- mapper: {
- serializedName: "If-Unmodified-Since",
- xmlName: "If-Unmodified-Since",
- type: {
- name: "DateTimeRfc1123",
- },
- },
-};
-const comp6 = {
- parameterPath: "comp",
- mapper: {
- defaultValue: "metadata",
- isConstant: true,
- serializedName: "comp",
- type: {
- name: "String",
- },
- },
-};
-const comp7 = {
- parameterPath: "comp",
- mapper: {
- defaultValue: "acl",
- isConstant: true,
- serializedName: "comp",
- type: {
- name: "String",
- },
- },
-};
-const containerAcl = {
- parameterPath: ["options", "containerAcl"],
- mapper: {
- serializedName: "containerAcl",
- xmlName: "SignedIdentifiers",
- xmlIsWrapped: true,
- xmlElementName: "SignedIdentifier",
- type: {
- name: "Sequence",
- element: {
- type: {
- name: "Composite",
- className: "SignedIdentifier",
- },
- },
- },
- },
-};
-const comp8 = {
- parameterPath: "comp",
- mapper: {
- defaultValue: "undelete",
- isConstant: true,
- serializedName: "comp",
- type: {
- name: "String",
- },
- },
-};
-const deletedContainerName = {
- parameterPath: ["options", "deletedContainerName"],
- mapper: {
- serializedName: "x-ms-deleted-container-name",
- xmlName: "x-ms-deleted-container-name",
- type: {
- name: "String",
- },
- },
-};
-const deletedContainerVersion = {
- parameterPath: ["options", "deletedContainerVersion"],
- mapper: {
- serializedName: "x-ms-deleted-container-version",
- xmlName: "x-ms-deleted-container-version",
- type: {
- name: "String",
- },
- },
-};
-const comp9 = {
- parameterPath: "comp",
- mapper: {
- defaultValue: "rename",
- isConstant: true,
- serializedName: "comp",
- type: {
- name: "String",
- },
- },
-};
-const sourceContainerName = {
- parameterPath: "sourceContainerName",
- mapper: {
- serializedName: "x-ms-source-container-name",
- required: true,
- xmlName: "x-ms-source-container-name",
- type: {
- name: "String",
- },
- },
-};
-const sourceLeaseId = {
- parameterPath: ["options", "sourceLeaseId"],
- mapper: {
- serializedName: "x-ms-source-lease-id",
- xmlName: "x-ms-source-lease-id",
- type: {
- name: "String",
- },
- },
-};
-const comp10 = {
- parameterPath: "comp",
- mapper: {
- defaultValue: "lease",
- isConstant: true,
- serializedName: "comp",
- type: {
- name: "String",
- },
- },
-};
-const action = {
- parameterPath: "action",
- mapper: {
- defaultValue: "acquire",
- isConstant: true,
- serializedName: "x-ms-lease-action",
- type: {
- name: "String",
- },
- },
-};
-const duration = {
- parameterPath: ["options", "duration"],
- mapper: {
- serializedName: "x-ms-lease-duration",
- xmlName: "x-ms-lease-duration",
- type: {
- name: "Number",
- },
- },
-};
-const proposedLeaseId = {
- parameterPath: ["options", "proposedLeaseId"],
- mapper: {
- serializedName: "x-ms-proposed-lease-id",
- xmlName: "x-ms-proposed-lease-id",
- type: {
- name: "String",
- },
- },
-};
-const action1 = {
- parameterPath: "action",
- mapper: {
- defaultValue: "release",
- isConstant: true,
- serializedName: "x-ms-lease-action",
- type: {
- name: "String",
- },
- },
-};
-const leaseId1 = {
- parameterPath: "leaseId",
- mapper: {
- serializedName: "x-ms-lease-id",
- required: true,
- xmlName: "x-ms-lease-id",
- type: {
- name: "String",
- },
- },
-};
-const action2 = {
- parameterPath: "action",
- mapper: {
- defaultValue: "renew",
- isConstant: true,
- serializedName: "x-ms-lease-action",
- type: {
- name: "String",
- },
- },
-};
-const action3 = {
- parameterPath: "action",
- mapper: {
- defaultValue: "break",
- isConstant: true,
- serializedName: "x-ms-lease-action",
- type: {
- name: "String",
- },
- },
-};
-const breakPeriod = {
- parameterPath: ["options", "breakPeriod"],
- mapper: {
- serializedName: "x-ms-lease-break-period",
- xmlName: "x-ms-lease-break-period",
- type: {
- name: "Number",
- },
- },
-};
-const action4 = {
- parameterPath: "action",
- mapper: {
- defaultValue: "change",
- isConstant: true,
- serializedName: "x-ms-lease-action",
- type: {
- name: "String",
- },
- },
-};
-const proposedLeaseId1 = {
- parameterPath: "proposedLeaseId",
- mapper: {
- serializedName: "x-ms-proposed-lease-id",
- required: true,
- xmlName: "x-ms-proposed-lease-id",
- type: {
- name: "String",
- },
- },
-};
-const include1 = {
- parameterPath: ["options", "include"],
- mapper: {
- serializedName: "include",
- xmlName: "include",
- xmlElementName: "ListBlobsIncludeItem",
- type: {
- name: "Sequence",
- element: {
- type: {
- name: "Enum",
- allowedValues: [
- "copy",
- "deleted",
- "metadata",
- "snapshots",
- "uncommittedblobs",
- "versions",
- "tags",
- "immutabilitypolicy",
- "legalhold",
- "deletedwithversions",
- ],
- },
- },
- },
- },
- collectionFormat: "CSV",
-};
-const delimiter = {
- parameterPath: "delimiter",
- mapper: {
- serializedName: "delimiter",
- required: true,
- xmlName: "delimiter",
- type: {
- name: "String",
- },
- },
-};
-const snapshot = {
- parameterPath: ["options", "snapshot"],
- mapper: {
- serializedName: "snapshot",
- xmlName: "snapshot",
- type: {
- name: "String",
- },
- },
-};
-const versionId = {
- parameterPath: ["options", "versionId"],
- mapper: {
- serializedName: "versionid",
- xmlName: "versionid",
- type: {
- name: "String",
- },
- },
-};
-const range = {
- parameterPath: ["options", "range"],
- mapper: {
- serializedName: "x-ms-range",
- xmlName: "x-ms-range",
- type: {
- name: "String",
- },
- },
-};
-const rangeGetContentMD5 = {
- parameterPath: ["options", "rangeGetContentMD5"],
- mapper: {
- serializedName: "x-ms-range-get-content-md5",
- xmlName: "x-ms-range-get-content-md5",
- type: {
- name: "Boolean",
- },
- },
-};
-const rangeGetContentCRC64 = {
- parameterPath: ["options", "rangeGetContentCRC64"],
- mapper: {
- serializedName: "x-ms-range-get-content-crc64",
- xmlName: "x-ms-range-get-content-crc64",
- type: {
- name: "Boolean",
- },
- },
-};
-const encryptionKey = {
- parameterPath: ["options", "cpkInfo", "encryptionKey"],
- mapper: {
- serializedName: "x-ms-encryption-key",
- xmlName: "x-ms-encryption-key",
- type: {
- name: "String",
- },
- },
-};
-const encryptionKeySha256 = {
- parameterPath: ["options", "cpkInfo", "encryptionKeySha256"],
- mapper: {
- serializedName: "x-ms-encryption-key-sha256",
- xmlName: "x-ms-encryption-key-sha256",
- type: {
- name: "String",
- },
- },
-};
-const encryptionAlgorithm = {
- parameterPath: ["options", "cpkInfo", "encryptionAlgorithm"],
- mapper: {
- serializedName: "x-ms-encryption-algorithm",
- xmlName: "x-ms-encryption-algorithm",
- type: {
- name: "String",
- },
- },
-};
-const ifMatch = {
- parameterPath: ["options", "modifiedAccessConditions", "ifMatch"],
- mapper: {
- serializedName: "If-Match",
- xmlName: "If-Match",
- type: {
- name: "String",
- },
- },
-};
-const ifNoneMatch = {
- parameterPath: ["options", "modifiedAccessConditions", "ifNoneMatch"],
- mapper: {
- serializedName: "If-None-Match",
- xmlName: "If-None-Match",
- type: {
- name: "String",
- },
- },
-};
-const ifTags = {
- parameterPath: ["options", "modifiedAccessConditions", "ifTags"],
- mapper: {
- serializedName: "x-ms-if-tags",
- xmlName: "x-ms-if-tags",
- type: {
- name: "String",
- },
- },
-};
-const deleteSnapshots = {
- parameterPath: ["options", "deleteSnapshots"],
- mapper: {
- serializedName: "x-ms-delete-snapshots",
- xmlName: "x-ms-delete-snapshots",
- type: {
- name: "Enum",
- allowedValues: ["include", "only"],
- },
- },
-};
-const blobDeleteType = {
- parameterPath: ["options", "blobDeleteType"],
- mapper: {
- serializedName: "deletetype",
- xmlName: "deletetype",
- type: {
- name: "String",
- },
- },
-};
-const comp11 = {
- parameterPath: "comp",
- mapper: {
- defaultValue: "expiry",
- isConstant: true,
- serializedName: "comp",
- type: {
- name: "String",
- },
- },
-};
-const expiryOptions = {
- parameterPath: "expiryOptions",
- mapper: {
- serializedName: "x-ms-expiry-option",
- required: true,
- xmlName: "x-ms-expiry-option",
- type: {
- name: "String",
- },
- },
-};
-const expiresOn = {
- parameterPath: ["options", "expiresOn"],
- mapper: {
- serializedName: "x-ms-expiry-time",
- xmlName: "x-ms-expiry-time",
- type: {
- name: "String",
- },
- },
-};
-const blobCacheControl = {
- parameterPath: ["options", "blobHttpHeaders", "blobCacheControl"],
- mapper: {
- serializedName: "x-ms-blob-cache-control",
- xmlName: "x-ms-blob-cache-control",
- type: {
- name: "String",
- },
- },
-};
-const blobContentType = {
- parameterPath: ["options", "blobHttpHeaders", "blobContentType"],
- mapper: {
- serializedName: "x-ms-blob-content-type",
- xmlName: "x-ms-blob-content-type",
- type: {
- name: "String",
- },
- },
-};
-const blobContentMD5 = {
- parameterPath: ["options", "blobHttpHeaders", "blobContentMD5"],
- mapper: {
- serializedName: "x-ms-blob-content-md5",
- xmlName: "x-ms-blob-content-md5",
- type: {
- name: "ByteArray",
- },
- },
-};
-const blobContentEncoding = {
- parameterPath: ["options", "blobHttpHeaders", "blobContentEncoding"],
- mapper: {
- serializedName: "x-ms-blob-content-encoding",
- xmlName: "x-ms-blob-content-encoding",
- type: {
- name: "String",
- },
- },
-};
-const blobContentLanguage = {
- parameterPath: ["options", "blobHttpHeaders", "blobContentLanguage"],
- mapper: {
- serializedName: "x-ms-blob-content-language",
- xmlName: "x-ms-blob-content-language",
- type: {
- name: "String",
- },
- },
-};
-const blobContentDisposition = {
- parameterPath: ["options", "blobHttpHeaders", "blobContentDisposition"],
- mapper: {
- serializedName: "x-ms-blob-content-disposition",
- xmlName: "x-ms-blob-content-disposition",
- type: {
- name: "String",
- },
- },
-};
-const comp12 = {
- parameterPath: "comp",
- mapper: {
- defaultValue: "immutabilityPolicies",
- isConstant: true,
- serializedName: "comp",
- type: {
- name: "String",
- },
- },
-};
-const immutabilityPolicyExpiry = {
- parameterPath: ["options", "immutabilityPolicyExpiry"],
- mapper: {
- serializedName: "x-ms-immutability-policy-until-date",
- xmlName: "x-ms-immutability-policy-until-date",
- type: {
- name: "DateTimeRfc1123",
- },
- },
-};
-const immutabilityPolicyMode = {
- parameterPath: ["options", "immutabilityPolicyMode"],
- mapper: {
- serializedName: "x-ms-immutability-policy-mode",
- xmlName: "x-ms-immutability-policy-mode",
- type: {
- name: "Enum",
- allowedValues: ["Mutable", "Unlocked", "Locked"],
- },
- },
-};
-const comp13 = {
- parameterPath: "comp",
- mapper: {
- defaultValue: "legalhold",
- isConstant: true,
- serializedName: "comp",
- type: {
- name: "String",
- },
- },
-};
-const legalHold = {
- parameterPath: "legalHold",
- mapper: {
- serializedName: "x-ms-legal-hold",
- required: true,
- xmlName: "x-ms-legal-hold",
- type: {
- name: "Boolean",
- },
- },
-};
-const encryptionScope = {
- parameterPath: ["options", "encryptionScope"],
- mapper: {
- serializedName: "x-ms-encryption-scope",
- xmlName: "x-ms-encryption-scope",
- type: {
- name: "String",
- },
- },
-};
-const comp14 = {
- parameterPath: "comp",
- mapper: {
- defaultValue: "snapshot",
- isConstant: true,
- serializedName: "comp",
- type: {
- name: "String",
- },
- },
-};
-const tier = {
- parameterPath: ["options", "tier"],
- mapper: {
- serializedName: "x-ms-access-tier",
- xmlName: "x-ms-access-tier",
- type: {
- name: "Enum",
- allowedValues: [
- "P4",
- "P6",
- "P10",
- "P15",
- "P20",
- "P30",
- "P40",
- "P50",
- "P60",
- "P70",
- "P80",
- "Hot",
- "Cool",
- "Archive",
- "Cold",
- ],
- },
- },
-};
-const rehydratePriority = {
- parameterPath: ["options", "rehydratePriority"],
- mapper: {
- serializedName: "x-ms-rehydrate-priority",
- xmlName: "x-ms-rehydrate-priority",
- type: {
- name: "Enum",
- allowedValues: ["High", "Standard"],
- },
- },
-};
-const sourceIfModifiedSince = {
- parameterPath: [
- "options",
- "sourceModifiedAccessConditions",
- "sourceIfModifiedSince",
- ],
- mapper: {
- serializedName: "x-ms-source-if-modified-since",
- xmlName: "x-ms-source-if-modified-since",
- type: {
- name: "DateTimeRfc1123",
- },
- },
-};
-const sourceIfUnmodifiedSince = {
- parameterPath: [
- "options",
- "sourceModifiedAccessConditions",
- "sourceIfUnmodifiedSince",
- ],
- mapper: {
- serializedName: "x-ms-source-if-unmodified-since",
- xmlName: "x-ms-source-if-unmodified-since",
- type: {
- name: "DateTimeRfc1123",
- },
- },
-};
-const sourceIfMatch = {
- parameterPath: ["options", "sourceModifiedAccessConditions", "sourceIfMatch"],
- mapper: {
- serializedName: "x-ms-source-if-match",
- xmlName: "x-ms-source-if-match",
- type: {
- name: "String",
- },
- },
-};
-const sourceIfNoneMatch = {
- parameterPath: [
- "options",
- "sourceModifiedAccessConditions",
- "sourceIfNoneMatch",
- ],
- mapper: {
- serializedName: "x-ms-source-if-none-match",
- xmlName: "x-ms-source-if-none-match",
- type: {
- name: "String",
- },
- },
-};
-const sourceIfTags = {
- parameterPath: ["options", "sourceModifiedAccessConditions", "sourceIfTags"],
- mapper: {
- serializedName: "x-ms-source-if-tags",
- xmlName: "x-ms-source-if-tags",
- type: {
- name: "String",
- },
- },
-};
-const copySource = {
- parameterPath: "copySource",
- mapper: {
- serializedName: "x-ms-copy-source",
- required: true,
- xmlName: "x-ms-copy-source",
- type: {
- name: "String",
- },
- },
-};
-const blobTagsString = {
- parameterPath: ["options", "blobTagsString"],
- mapper: {
- serializedName: "x-ms-tags",
- xmlName: "x-ms-tags",
- type: {
- name: "String",
- },
- },
-};
-const sealBlob = {
- parameterPath: ["options", "sealBlob"],
- mapper: {
- serializedName: "x-ms-seal-blob",
- xmlName: "x-ms-seal-blob",
- type: {
- name: "Boolean",
- },
- },
-};
-const legalHold1 = {
- parameterPath: ["options", "legalHold"],
- mapper: {
- serializedName: "x-ms-legal-hold",
- xmlName: "x-ms-legal-hold",
- type: {
- name: "Boolean",
- },
- },
-};
-const xMsRequiresSync = {
- parameterPath: "xMsRequiresSync",
- mapper: {
- defaultValue: "true",
- isConstant: true,
- serializedName: "x-ms-requires-sync",
- type: {
- name: "String",
- },
- },
-};
-const sourceContentMD5 = {
- parameterPath: ["options", "sourceContentMD5"],
- mapper: {
- serializedName: "x-ms-source-content-md5",
- xmlName: "x-ms-source-content-md5",
- type: {
- name: "ByteArray",
- },
- },
-};
-const copySourceAuthorization = {
- parameterPath: ["options", "copySourceAuthorization"],
- mapper: {
- serializedName: "x-ms-copy-source-authorization",
- xmlName: "x-ms-copy-source-authorization",
- type: {
- name: "String",
- },
- },
-};
-const copySourceTags = {
- parameterPath: ["options", "copySourceTags"],
- mapper: {
- serializedName: "x-ms-copy-source-tag-option",
- xmlName: "x-ms-copy-source-tag-option",
- type: {
- name: "Enum",
- allowedValues: ["REPLACE", "COPY"],
- },
- },
-};
-const comp15 = {
- parameterPath: "comp",
- mapper: {
- defaultValue: "copy",
- isConstant: true,
- serializedName: "comp",
- type: {
- name: "String",
- },
- },
-};
-const copyActionAbortConstant = {
- parameterPath: "copyActionAbortConstant",
- mapper: {
- defaultValue: "abort",
- isConstant: true,
- serializedName: "x-ms-copy-action",
- type: {
- name: "String",
- },
- },
-};
-const copyId = {
- parameterPath: "copyId",
- mapper: {
- serializedName: "copyid",
- required: true,
- xmlName: "copyid",
- type: {
- name: "String",
- },
- },
-};
-const comp16 = {
- parameterPath: "comp",
- mapper: {
- defaultValue: "tier",
- isConstant: true,
- serializedName: "comp",
- type: {
- name: "String",
- },
- },
-};
-const tier1 = {
- parameterPath: "tier",
- mapper: {
- serializedName: "x-ms-access-tier",
- required: true,
- xmlName: "x-ms-access-tier",
- type: {
- name: "Enum",
- allowedValues: [
- "P4",
- "P6",
- "P10",
- "P15",
- "P20",
- "P30",
- "P40",
- "P50",
- "P60",
- "P70",
- "P80",
- "Hot",
- "Cool",
- "Archive",
- "Cold",
- ],
- },
- },
-};
-const queryRequest = {
- parameterPath: ["options", "queryRequest"],
- mapper: QueryRequest,
-};
-const comp17 = {
- parameterPath: "comp",
- mapper: {
- defaultValue: "query",
- isConstant: true,
- serializedName: "comp",
- type: {
- name: "String",
- },
- },
-};
-const comp18 = {
- parameterPath: "comp",
- mapper: {
- defaultValue: "tags",
- isConstant: true,
- serializedName: "comp",
- type: {
- name: "String",
- },
- },
-};
-const tags = {
- parameterPath: ["options", "tags"],
- mapper: BlobTags,
-};
-const transactionalContentMD5 = {
- parameterPath: ["options", "transactionalContentMD5"],
- mapper: {
- serializedName: "Content-MD5",
- xmlName: "Content-MD5",
- type: {
- name: "ByteArray",
- },
- },
-};
-const transactionalContentCrc64 = {
- parameterPath: ["options", "transactionalContentCrc64"],
- mapper: {
- serializedName: "x-ms-content-crc64",
- xmlName: "x-ms-content-crc64",
- type: {
- name: "ByteArray",
- },
- },
-};
-const blobType = {
- parameterPath: "blobType",
- mapper: {
- defaultValue: "PageBlob",
- isConstant: true,
- serializedName: "x-ms-blob-type",
- type: {
- name: "String",
- },
- },
-};
-const blobContentLength = {
- parameterPath: "blobContentLength",
- mapper: {
- serializedName: "x-ms-blob-content-length",
- required: true,
- xmlName: "x-ms-blob-content-length",
- type: {
- name: "Number",
- },
- },
-};
-const blobSequenceNumber = {
- parameterPath: ["options", "blobSequenceNumber"],
- mapper: {
- defaultValue: 0,
- serializedName: "x-ms-blob-sequence-number",
- xmlName: "x-ms-blob-sequence-number",
- type: {
- name: "Number",
- },
- },
-};
-const contentType1 = {
- parameterPath: ["options", "contentType"],
- mapper: {
- defaultValue: "application/octet-stream",
- isConstant: true,
- serializedName: "Content-Type",
- type: {
- name: "String",
- },
- },
-};
-const body1 = {
- parameterPath: "body",
- mapper: {
- serializedName: "body",
- required: true,
- xmlName: "body",
- type: {
- name: "Stream",
- },
- },
-};
-const accept2 = {
- parameterPath: "accept",
- mapper: {
- defaultValue: "application/xml",
- isConstant: true,
- serializedName: "Accept",
- type: {
- name: "String",
- },
- },
-};
-const comp19 = {
- parameterPath: "comp",
- mapper: {
- defaultValue: "page",
- isConstant: true,
- serializedName: "comp",
- type: {
- name: "String",
- },
- },
-};
-const pageWrite = {
- parameterPath: "pageWrite",
- mapper: {
- defaultValue: "update",
- isConstant: true,
- serializedName: "x-ms-page-write",
- type: {
- name: "String",
- },
- },
-};
-const ifSequenceNumberLessThanOrEqualTo = {
- parameterPath: [
- "options",
- "sequenceNumberAccessConditions",
- "ifSequenceNumberLessThanOrEqualTo",
- ],
- mapper: {
- serializedName: "x-ms-if-sequence-number-le",
- xmlName: "x-ms-if-sequence-number-le",
- type: {
- name: "Number",
- },
- },
-};
-const ifSequenceNumberLessThan = {
- parameterPath: [
- "options",
- "sequenceNumberAccessConditions",
- "ifSequenceNumberLessThan",
- ],
- mapper: {
- serializedName: "x-ms-if-sequence-number-lt",
- xmlName: "x-ms-if-sequence-number-lt",
- type: {
- name: "Number",
- },
- },
-};
-const ifSequenceNumberEqualTo = {
- parameterPath: [
- "options",
- "sequenceNumberAccessConditions",
- "ifSequenceNumberEqualTo",
- ],
- mapper: {
- serializedName: "x-ms-if-sequence-number-eq",
- xmlName: "x-ms-if-sequence-number-eq",
- type: {
- name: "Number",
- },
- },
-};
-const pageWrite1 = {
- parameterPath: "pageWrite",
- mapper: {
- defaultValue: "clear",
- isConstant: true,
- serializedName: "x-ms-page-write",
- type: {
- name: "String",
- },
- },
-};
-const sourceUrl = {
- parameterPath: "sourceUrl",
- mapper: {
- serializedName: "x-ms-copy-source",
- required: true,
- xmlName: "x-ms-copy-source",
- type: {
- name: "String",
- },
- },
-};
-const sourceRange = {
- parameterPath: "sourceRange",
- mapper: {
- serializedName: "x-ms-source-range",
- required: true,
- xmlName: "x-ms-source-range",
- type: {
- name: "String",
- },
- },
-};
-const sourceContentCrc64 = {
- parameterPath: ["options", "sourceContentCrc64"],
- mapper: {
- serializedName: "x-ms-source-content-crc64",
- xmlName: "x-ms-source-content-crc64",
- type: {
- name: "ByteArray",
- },
- },
-};
-const range1 = {
- parameterPath: "range",
- mapper: {
- serializedName: "x-ms-range",
- required: true,
- xmlName: "x-ms-range",
- type: {
- name: "String",
- },
- },
-};
-const comp20 = {
- parameterPath: "comp",
- mapper: {
- defaultValue: "pagelist",
- isConstant: true,
- serializedName: "comp",
- type: {
- name: "String",
- },
- },
-};
-const prevsnapshot = {
- parameterPath: ["options", "prevsnapshot"],
- mapper: {
- serializedName: "prevsnapshot",
- xmlName: "prevsnapshot",
- type: {
- name: "String",
- },
- },
-};
-const prevSnapshotUrl = {
- parameterPath: ["options", "prevSnapshotUrl"],
- mapper: {
- serializedName: "x-ms-previous-snapshot-url",
- xmlName: "x-ms-previous-snapshot-url",
- type: {
- name: "String",
- },
- },
-};
-const sequenceNumberAction = {
- parameterPath: "sequenceNumberAction",
- mapper: {
- serializedName: "x-ms-sequence-number-action",
- required: true,
- xmlName: "x-ms-sequence-number-action",
- type: {
- name: "Enum",
- allowedValues: ["max", "update", "increment"],
- },
- },
-};
-const comp21 = {
- parameterPath: "comp",
- mapper: {
- defaultValue: "incrementalcopy",
- isConstant: true,
- serializedName: "comp",
- type: {
- name: "String",
- },
- },
-};
-const blobType1 = {
- parameterPath: "blobType",
- mapper: {
- defaultValue: "AppendBlob",
- isConstant: true,
- serializedName: "x-ms-blob-type",
- type: {
- name: "String",
- },
- },
-};
-const comp22 = {
- parameterPath: "comp",
- mapper: {
- defaultValue: "appendblock",
- isConstant: true,
- serializedName: "comp",
- type: {
- name: "String",
- },
- },
-};
-const maxSize = {
- parameterPath: ["options", "appendPositionAccessConditions", "maxSize"],
- mapper: {
- serializedName: "x-ms-blob-condition-maxsize",
- xmlName: "x-ms-blob-condition-maxsize",
- type: {
- name: "Number",
- },
- },
-};
-const appendPosition = {
- parameterPath: [
- "options",
- "appendPositionAccessConditions",
- "appendPosition",
- ],
- mapper: {
- serializedName: "x-ms-blob-condition-appendpos",
- xmlName: "x-ms-blob-condition-appendpos",
- type: {
- name: "Number",
- },
- },
-};
-const sourceRange1 = {
- parameterPath: ["options", "sourceRange"],
- mapper: {
- serializedName: "x-ms-source-range",
- xmlName: "x-ms-source-range",
- type: {
- name: "String",
- },
- },
-};
-const comp23 = {
- parameterPath: "comp",
- mapper: {
- defaultValue: "seal",
- isConstant: true,
- serializedName: "comp",
- type: {
- name: "String",
- },
- },
-};
-const blobType2 = {
- parameterPath: "blobType",
- mapper: {
- defaultValue: "BlockBlob",
- isConstant: true,
- serializedName: "x-ms-blob-type",
- type: {
- name: "String",
- },
- },
-};
-const copySourceBlobProperties = {
- parameterPath: ["options", "copySourceBlobProperties"],
- mapper: {
- serializedName: "x-ms-copy-source-blob-properties",
- xmlName: "x-ms-copy-source-blob-properties",
- type: {
- name: "Boolean",
- },
- },
-};
-const comp24 = {
- parameterPath: "comp",
- mapper: {
- defaultValue: "block",
- isConstant: true,
- serializedName: "comp",
- type: {
- name: "String",
- },
- },
-};
-const blockId = {
- parameterPath: "blockId",
- mapper: {
- serializedName: "blockid",
- required: true,
- xmlName: "blockid",
- type: {
- name: "String",
- },
- },
-};
-const blocks = {
- parameterPath: "blocks",
- mapper: BlockLookupList,
-};
-const comp25 = {
- parameterPath: "comp",
- mapper: {
- defaultValue: "blocklist",
- isConstant: true,
- serializedName: "comp",
- type: {
- name: "String",
- },
- },
-};
-const listType = {
- parameterPath: "listType",
- mapper: {
- defaultValue: "committed",
- serializedName: "blocklisttype",
- required: true,
- xmlName: "blocklisttype",
- type: {
- name: "Enum",
- allowedValues: ["committed", "uncommitted", "all"],
- },
- },
+ * Returns tuple:
+ * [0]: low bits
+ * [0]: high bits
+ *
+ * Copyright 2008 Google Inc. All rights reserved.
+ *
+ * See https://github.com/protocolbuffers/protobuf/blob/8a71927d74a4ce34efe2d8769fda198f52d20d12/js/experimental/runtime/kernel/buffer_decoder.js#L175
+ */
+function varint64read() {
+ let lowBits = 0;
+ let highBits = 0;
+ for (let shift = 0; shift < 28; shift += 7) {
+ let b = this.buf[this.pos++];
+ lowBits |= (b & 0x7F) << shift;
+ if ((b & 0x80) == 0) {
+ this.assertBounds();
+ return [lowBits, highBits];
+ }
+ }
+ let middleByte = this.buf[this.pos++];
+ // last four bits of the first 32 bit number
+ lowBits |= (middleByte & 0x0F) << 28;
+ // 3 upper bits are part of the next 32 bit number
+ highBits = (middleByte & 0x70) >> 4;
+ if ((middleByte & 0x80) == 0) {
+ this.assertBounds();
+ return [lowBits, highBits];
+ }
+ for (let shift = 3; shift <= 31; shift += 7) {
+ let b = this.buf[this.pos++];
+ highBits |= (b & 0x7F) << shift;
+ if ((b & 0x80) == 0) {
+ this.assertBounds();
+ return [lowBits, highBits];
+ }
+ }
+ throw new Error('invalid varint');
+}
+exports.varint64read = varint64read;
+/**
+ * Write a 64 bit varint, given as two JS numbers, to the given bytes array.
+ *
+ * Copyright 2008 Google Inc. All rights reserved.
+ *
+ * See https://github.com/protocolbuffers/protobuf/blob/8a71927d74a4ce34efe2d8769fda198f52d20d12/js/experimental/runtime/kernel/writer.js#L344
+ */
+function varint64write(lo, hi, bytes) {
+ for (let i = 0; i < 28; i = i + 7) {
+ const shift = lo >>> i;
+ const hasNext = !((shift >>> 7) == 0 && hi == 0);
+ const byte = (hasNext ? shift | 0x80 : shift) & 0xFF;
+ bytes.push(byte);
+ if (!hasNext) {
+ return;
+ }
+ }
+ const splitBits = ((lo >>> 28) & 0x0F) | ((hi & 0x07) << 4);
+ const hasMoreBits = !((hi >> 3) == 0);
+ bytes.push((hasMoreBits ? splitBits | 0x80 : splitBits) & 0xFF);
+ if (!hasMoreBits) {
+ return;
+ }
+ for (let i = 3; i < 31; i = i + 7) {
+ const shift = hi >>> i;
+ const hasNext = !((shift >>> 7) == 0);
+ const byte = (hasNext ? shift | 0x80 : shift) & 0xFF;
+ bytes.push(byte);
+ if (!hasNext) {
+ return;
+ }
+ }
+ bytes.push((hi >>> 31) & 0x01);
+}
+exports.varint64write = varint64write;
+// constants for binary math
+const TWO_PWR_32_DBL = (1 << 16) * (1 << 16);
+/**
+ * Parse decimal string of 64 bit integer value as two JS numbers.
+ *
+ * Returns tuple:
+ * [0]: minus sign?
+ * [1]: low bits
+ * [2]: high bits
+ *
+ * Copyright 2008 Google Inc.
+ */
+function int64fromString(dec) {
+ // Check for minus sign.
+ let minus = dec[0] == '-';
+ if (minus)
+ dec = dec.slice(1);
+ // Work 6 decimal digits at a time, acting like we're converting base 1e6
+ // digits to binary. This is safe to do with floating point math because
+ // Number.isSafeInteger(ALL_32_BITS * 1e6) == true.
+ const base = 1e6;
+ let lowBits = 0;
+ let highBits = 0;
+ function add1e6digit(begin, end) {
+ // Note: Number('') is 0.
+ const digit1e6 = Number(dec.slice(begin, end));
+ highBits *= base;
+ lowBits = lowBits * base + digit1e6;
+ // Carry bits from lowBits to highBits
+ if (lowBits >= TWO_PWR_32_DBL) {
+ highBits = highBits + ((lowBits / TWO_PWR_32_DBL) | 0);
+ lowBits = lowBits % TWO_PWR_32_DBL;
+ }
+ }
+ add1e6digit(-24, -18);
+ add1e6digit(-18, -12);
+ add1e6digit(-12, -6);
+ add1e6digit(-6);
+ return [minus, lowBits, highBits];
+}
+exports.int64fromString = int64fromString;
+/**
+ * Format 64 bit integer value (as two JS numbers) to decimal string.
+ *
+ * Copyright 2008 Google Inc.
+ */
+function int64toString(bitsLow, bitsHigh) {
+ // Skip the expensive conversion if the number is small enough to use the
+ // built-in conversions.
+ if ((bitsHigh >>> 0) <= 0x1FFFFF) {
+ return '' + (TWO_PWR_32_DBL * bitsHigh + (bitsLow >>> 0));
+ }
+ // What this code is doing is essentially converting the input number from
+ // base-2 to base-1e7, which allows us to represent the 64-bit range with
+ // only 3 (very large) digits. Those digits are then trivial to convert to
+ // a base-10 string.
+ // The magic numbers used here are -
+ // 2^24 = 16777216 = (1,6777216) in base-1e7.
+ // 2^48 = 281474976710656 = (2,8147497,6710656) in base-1e7.
+ // Split 32:32 representation into 16:24:24 representation so our
+ // intermediate digits don't overflow.
+ let low = bitsLow & 0xFFFFFF;
+ let mid = (((bitsLow >>> 24) | (bitsHigh << 8)) >>> 0) & 0xFFFFFF;
+ let high = (bitsHigh >> 16) & 0xFFFF;
+ // Assemble our three base-1e7 digits, ignoring carries. The maximum
+ // value in a digit at this step is representable as a 48-bit integer, which
+ // can be stored in a 64-bit floating point number.
+ let digitA = low + (mid * 6777216) + (high * 6710656);
+ let digitB = mid + (high * 8147497);
+ let digitC = (high * 2);
+ // Apply carries from A to B and from B to C.
+ let base = 10000000;
+ if (digitA >= base) {
+ digitB += Math.floor(digitA / base);
+ digitA %= base;
+ }
+ if (digitB >= base) {
+ digitC += Math.floor(digitB / base);
+ digitB %= base;
+ }
+ // Convert base-1e7 digits to base-10, with optional leading zeroes.
+ function decimalFrom1e7(digit1e7, needLeadingZeros) {
+ let partial = digit1e7 ? String(digit1e7) : '';
+ if (needLeadingZeros) {
+ return '0000000'.slice(partial.length) + partial;
+ }
+ return partial;
+ }
+ return decimalFrom1e7(digitC, /*needLeadingZeros=*/ 0) +
+ decimalFrom1e7(digitB, /*needLeadingZeros=*/ digitC) +
+ // If the final 1e7 digit didn't need leading zeros, we would have
+ // returned via the trivial code path at the top.
+ decimalFrom1e7(digitA, /*needLeadingZeros=*/ 1);
+}
+exports.int64toString = int64toString;
+/**
+ * Write a 32 bit varint, signed or unsigned. Same as `varint64write(0, value, bytes)`
+ *
+ * Copyright 2008 Google Inc. All rights reserved.
+ *
+ * See https://github.com/protocolbuffers/protobuf/blob/1b18833f4f2a2f681f4e4a25cdf3b0a43115ec26/js/binary/encoder.js#L144
+ */
+function varint32write(value, bytes) {
+ if (value >= 0) {
+ // write value as varint 32
+ while (value > 0x7f) {
+ bytes.push((value & 0x7f) | 0x80);
+ value = value >>> 7;
+ }
+ bytes.push(value);
+ }
+ else {
+ for (let i = 0; i < 9; i++) {
+ bytes.push(value & 127 | 128);
+ value = value >> 7;
+ }
+ bytes.push(1);
+ }
+}
+exports.varint32write = varint32write;
+/**
+ * Read an unsigned 32 bit varint.
+ *
+ * See https://github.com/protocolbuffers/protobuf/blob/8a71927d74a4ce34efe2d8769fda198f52d20d12/js/experimental/runtime/kernel/buffer_decoder.js#L220
+ */
+function varint32read() {
+ let b = this.buf[this.pos++];
+ let result = b & 0x7F;
+ if ((b & 0x80) == 0) {
+ this.assertBounds();
+ return result;
+ }
+ b = this.buf[this.pos++];
+ result |= (b & 0x7F) << 7;
+ if ((b & 0x80) == 0) {
+ this.assertBounds();
+ return result;
+ }
+ b = this.buf[this.pos++];
+ result |= (b & 0x7F) << 14;
+ if ((b & 0x80) == 0) {
+ this.assertBounds();
+ return result;
+ }
+ b = this.buf[this.pos++];
+ result |= (b & 0x7F) << 21;
+ if ((b & 0x80) == 0) {
+ this.assertBounds();
+ return result;
+ }
+ // Extract only last 4 bits
+ b = this.buf[this.pos++];
+ result |= (b & 0x0F) << 28;
+ for (let readBytes = 5; ((b & 0x80) !== 0) && readBytes < 10; readBytes++)
+ b = this.buf[this.pos++];
+ if ((b & 0x80) != 0)
+ throw new Error('invalid varint');
+ this.assertBounds();
+ // Result can have 32 bits, convert it to unsigned
+ return result >>> 0;
+}
+exports.varint32read = varint32read;
+
+
+/***/ }),
+
+/***/ 68140:
+/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
+
+"use strict";
+
+// Public API of the protobuf-ts runtime.
+// Note: we do not use `export * from ...` to help tree shakers,
+// webpack verbose output hints that this should be useful
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+// Convenience JSON typings and corresponding type guards
+var json_typings_1 = __nccwpck_require__(13417);
+Object.defineProperty(exports, "typeofJsonValue", ({ enumerable: true, get: function () { return json_typings_1.typeofJsonValue; } }));
+Object.defineProperty(exports, "isJsonObject", ({ enumerable: true, get: function () { return json_typings_1.isJsonObject; } }));
+// Base 64 encoding
+var base64_1 = __nccwpck_require__(20841);
+Object.defineProperty(exports, "base64decode", ({ enumerable: true, get: function () { return base64_1.base64decode; } }));
+Object.defineProperty(exports, "base64encode", ({ enumerable: true, get: function () { return base64_1.base64encode; } }));
+// UTF8 encoding
+var protobufjs_utf8_1 = __nccwpck_require__(49016);
+Object.defineProperty(exports, "utf8read", ({ enumerable: true, get: function () { return protobufjs_utf8_1.utf8read; } }));
+// Binary format contracts, options for reading and writing, for example
+var binary_format_contract_1 = __nccwpck_require__(98218);
+Object.defineProperty(exports, "WireType", ({ enumerable: true, get: function () { return binary_format_contract_1.WireType; } }));
+Object.defineProperty(exports, "mergeBinaryOptions", ({ enumerable: true, get: function () { return binary_format_contract_1.mergeBinaryOptions; } }));
+Object.defineProperty(exports, "UnknownFieldHandler", ({ enumerable: true, get: function () { return binary_format_contract_1.UnknownFieldHandler; } }));
+// Standard IBinaryReader implementation
+var binary_reader_1 = __nccwpck_require__(49695);
+Object.defineProperty(exports, "BinaryReader", ({ enumerable: true, get: function () { return binary_reader_1.BinaryReader; } }));
+Object.defineProperty(exports, "binaryReadOptions", ({ enumerable: true, get: function () { return binary_reader_1.binaryReadOptions; } }));
+// Standard IBinaryWriter implementation
+var binary_writer_1 = __nccwpck_require__(70079);
+Object.defineProperty(exports, "BinaryWriter", ({ enumerable: true, get: function () { return binary_writer_1.BinaryWriter; } }));
+Object.defineProperty(exports, "binaryWriteOptions", ({ enumerable: true, get: function () { return binary_writer_1.binaryWriteOptions; } }));
+// Int64 and UInt64 implementations required for the binary format
+var pb_long_1 = __nccwpck_require__(38819);
+Object.defineProperty(exports, "PbLong", ({ enumerable: true, get: function () { return pb_long_1.PbLong; } }));
+Object.defineProperty(exports, "PbULong", ({ enumerable: true, get: function () { return pb_long_1.PbULong; } }));
+// JSON format contracts, options for reading and writing, for example
+var json_format_contract_1 = __nccwpck_require__(18069);
+Object.defineProperty(exports, "jsonReadOptions", ({ enumerable: true, get: function () { return json_format_contract_1.jsonReadOptions; } }));
+Object.defineProperty(exports, "jsonWriteOptions", ({ enumerable: true, get: function () { return json_format_contract_1.jsonWriteOptions; } }));
+Object.defineProperty(exports, "mergeJsonOptions", ({ enumerable: true, get: function () { return json_format_contract_1.mergeJsonOptions; } }));
+// Message type contract
+var message_type_contract_1 = __nccwpck_require__(69251);
+Object.defineProperty(exports, "MESSAGE_TYPE", ({ enumerable: true, get: function () { return message_type_contract_1.MESSAGE_TYPE; } }));
+// Message type implementation via reflection
+var message_type_1 = __nccwpck_require__(69940);
+Object.defineProperty(exports, "MessageType", ({ enumerable: true, get: function () { return message_type_1.MessageType; } }));
+// Reflection info, generated by the plugin, exposed to the user, used by reflection ops
+var reflection_info_1 = __nccwpck_require__(37048);
+Object.defineProperty(exports, "ScalarType", ({ enumerable: true, get: function () { return reflection_info_1.ScalarType; } }));
+Object.defineProperty(exports, "LongType", ({ enumerable: true, get: function () { return reflection_info_1.LongType; } }));
+Object.defineProperty(exports, "RepeatType", ({ enumerable: true, get: function () { return reflection_info_1.RepeatType; } }));
+Object.defineProperty(exports, "normalizeFieldInfo", ({ enumerable: true, get: function () { return reflection_info_1.normalizeFieldInfo; } }));
+Object.defineProperty(exports, "readFieldOptions", ({ enumerable: true, get: function () { return reflection_info_1.readFieldOptions; } }));
+Object.defineProperty(exports, "readFieldOption", ({ enumerable: true, get: function () { return reflection_info_1.readFieldOption; } }));
+Object.defineProperty(exports, "readMessageOption", ({ enumerable: true, get: function () { return reflection_info_1.readMessageOption; } }));
+// Message operations via reflection
+var reflection_type_check_1 = __nccwpck_require__(30073);
+Object.defineProperty(exports, "ReflectionTypeCheck", ({ enumerable: true, get: function () { return reflection_type_check_1.ReflectionTypeCheck; } }));
+var reflection_create_1 = __nccwpck_require__(8892);
+Object.defineProperty(exports, "reflectionCreate", ({ enumerable: true, get: function () { return reflection_create_1.reflectionCreate; } }));
+var reflection_scalar_default_1 = __nccwpck_require__(29348);
+Object.defineProperty(exports, "reflectionScalarDefault", ({ enumerable: true, get: function () { return reflection_scalar_default_1.reflectionScalarDefault; } }));
+var reflection_merge_partial_1 = __nccwpck_require__(586);
+Object.defineProperty(exports, "reflectionMergePartial", ({ enumerable: true, get: function () { return reflection_merge_partial_1.reflectionMergePartial; } }));
+var reflection_equals_1 = __nccwpck_require__(8797);
+Object.defineProperty(exports, "reflectionEquals", ({ enumerable: true, get: function () { return reflection_equals_1.reflectionEquals; } }));
+var reflection_binary_reader_1 = __nccwpck_require__(6537);
+Object.defineProperty(exports, "ReflectionBinaryReader", ({ enumerable: true, get: function () { return reflection_binary_reader_1.ReflectionBinaryReader; } }));
+var reflection_binary_writer_1 = __nccwpck_require__(27685);
+Object.defineProperty(exports, "ReflectionBinaryWriter", ({ enumerable: true, get: function () { return reflection_binary_writer_1.ReflectionBinaryWriter; } }));
+var reflection_json_reader_1 = __nccwpck_require__(98944);
+Object.defineProperty(exports, "ReflectionJsonReader", ({ enumerable: true, get: function () { return reflection_json_reader_1.ReflectionJsonReader; } }));
+var reflection_json_writer_1 = __nccwpck_require__(57324);
+Object.defineProperty(exports, "ReflectionJsonWriter", ({ enumerable: true, get: function () { return reflection_json_writer_1.ReflectionJsonWriter; } }));
+var reflection_contains_message_type_1 = __nccwpck_require__(82092);
+Object.defineProperty(exports, "containsMessageType", ({ enumerable: true, get: function () { return reflection_contains_message_type_1.containsMessageType; } }));
+// Oneof helpers
+var oneof_1 = __nccwpck_require__(69473);
+Object.defineProperty(exports, "isOneofGroup", ({ enumerable: true, get: function () { return oneof_1.isOneofGroup; } }));
+Object.defineProperty(exports, "setOneofValue", ({ enumerable: true, get: function () { return oneof_1.setOneofValue; } }));
+Object.defineProperty(exports, "getOneofValue", ({ enumerable: true, get: function () { return oneof_1.getOneofValue; } }));
+Object.defineProperty(exports, "clearOneofValue", ({ enumerable: true, get: function () { return oneof_1.clearOneofValue; } }));
+Object.defineProperty(exports, "getSelectedOneofValue", ({ enumerable: true, get: function () { return oneof_1.getSelectedOneofValue; } }));
+// Enum object type guard and reflection util, may be interesting to the user.
+var enum_object_1 = __nccwpck_require__(4903);
+Object.defineProperty(exports, "listEnumValues", ({ enumerable: true, get: function () { return enum_object_1.listEnumValues; } }));
+Object.defineProperty(exports, "listEnumNames", ({ enumerable: true, get: function () { return enum_object_1.listEnumNames; } }));
+Object.defineProperty(exports, "listEnumNumbers", ({ enumerable: true, get: function () { return enum_object_1.listEnumNumbers; } }));
+Object.defineProperty(exports, "isEnumObject", ({ enumerable: true, get: function () { return enum_object_1.isEnumObject; } }));
+// lowerCamelCase() is exported for plugin, rpc-runtime and other rpc packages
+var lower_camel_case_1 = __nccwpck_require__(10023);
+Object.defineProperty(exports, "lowerCamelCase", ({ enumerable: true, get: function () { return lower_camel_case_1.lowerCamelCase; } }));
+// assertion functions are exported for plugin, may also be useful to user
+var assert_1 = __nccwpck_require__(64828);
+Object.defineProperty(exports, "assert", ({ enumerable: true, get: function () { return assert_1.assert; } }));
+Object.defineProperty(exports, "assertNever", ({ enumerable: true, get: function () { return assert_1.assertNever; } }));
+Object.defineProperty(exports, "assertInt32", ({ enumerable: true, get: function () { return assert_1.assertInt32; } }));
+Object.defineProperty(exports, "assertUInt32", ({ enumerable: true, get: function () { return assert_1.assertUInt32; } }));
+Object.defineProperty(exports, "assertFloat32", ({ enumerable: true, get: function () { return assert_1.assertFloat32; } }));
+
+
+/***/ }),
+
+/***/ 18069:
+/***/ ((__unused_webpack_module, exports) => {
+
+"use strict";
+
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.mergeJsonOptions = exports.jsonWriteOptions = exports.jsonReadOptions = void 0;
+const defaultsWrite = {
+ emitDefaultValues: false,
+ enumAsInteger: false,
+ useProtoFieldName: false,
+ prettySpaces: 0,
+}, defaultsRead = {
+ ignoreUnknownFields: false,
};
+/**
+ * Make options for reading JSON data from partial options.
+ */
+function jsonReadOptions(options) {
+ return options ? Object.assign(Object.assign({}, defaultsRead), options) : defaultsRead;
+}
+exports.jsonReadOptions = jsonReadOptions;
+/**
+ * Make options for writing JSON data from partial options.
+ */
+function jsonWriteOptions(options) {
+ return options ? Object.assign(Object.assign({}, defaultsWrite), options) : defaultsWrite;
+}
+exports.jsonWriteOptions = jsonWriteOptions;
+/**
+ * Merges JSON write or read options. Later values override earlier values. Type registries are merged.
+ */
+function mergeJsonOptions(a, b) {
+ var _a, _b;
+ let c = Object.assign(Object.assign({}, a), b);
+ c.typeRegistry = [...((_a = a === null || a === void 0 ? void 0 : a.typeRegistry) !== null && _a !== void 0 ? _a : []), ...((_b = b === null || b === void 0 ? void 0 : b.typeRegistry) !== null && _b !== void 0 ? _b : [])];
+ return c;
+}
+exports.mergeJsonOptions = mergeJsonOptions;
-/*
- * Copyright (c) Microsoft Corporation.
- * Licensed under the MIT License.
+
+/***/ }),
+
+/***/ 13417:
+/***/ ((__unused_webpack_module, exports) => {
+
+"use strict";
+
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.isJsonObject = exports.typeofJsonValue = void 0;
+/**
+ * Get the type of a JSON value.
+ * Distinguishes between array, null and object.
+ */
+function typeofJsonValue(value) {
+ let t = typeof value;
+ if (t == "object") {
+ if (Array.isArray(value))
+ return "array";
+ if (value === null)
+ return "null";
+ }
+ return t;
+}
+exports.typeofJsonValue = typeofJsonValue;
+/**
+ * Is this a JSON object (instead of an array or null)?
+ */
+function isJsonObject(value) {
+ return value !== null && typeof value == "object" && !Array.isArray(value);
+}
+exports.isJsonObject = isJsonObject;
+
+
+/***/ }),
+
+/***/ 10023:
+/***/ ((__unused_webpack_module, exports) => {
+
+"use strict";
+
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.lowerCamelCase = void 0;
+/**
+ * Converts snake_case to lowerCamelCase.
*
- * Code generated by Microsoft (R) AutoRest Code Generator.
- * Changes may cause incorrect behavior and will be lost if the code is regenerated.
+ * Should behave like protoc:
+ * https://github.com/protocolbuffers/protobuf/blob/e8ae137c96444ea313485ed1118c5e43b2099cf1/src/google/protobuf/compiler/java/java_helpers.cc#L118
*/
-/** Class containing Service operations. */
-class ServiceImpl {
- /**
- * Initialize a new instance of the class Service class.
- * @param client Reference to the service client
- */
- constructor(client) {
- this.client = client;
+function lowerCamelCase(snakeCase) {
+ let capNext = false;
+ const sb = [];
+ for (let i = 0; i < snakeCase.length; i++) {
+ let next = snakeCase.charAt(i);
+ if (next == '_') {
+ capNext = true;
+ }
+ else if (/\d/.test(next)) {
+ sb.push(next);
+ capNext = true;
+ }
+ else if (capNext) {
+ sb.push(next.toUpperCase());
+ capNext = false;
+ }
+ else if (i == 0) {
+ sb.push(next.toLowerCase());
+ }
+ else {
+ sb.push(next);
+ }
+ }
+ return sb.join('');
+}
+exports.lowerCamelCase = lowerCamelCase;
+
+
+/***/ }),
+
+/***/ 69251:
+/***/ ((__unused_webpack_module, exports) => {
+
+"use strict";
+
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.MESSAGE_TYPE = void 0;
+/**
+ * The symbol used as a key on message objects to store the message type.
+ *
+ * Note that this is an experimental feature - it is here to stay, but
+ * implementation details may change without notice.
+ */
+exports.MESSAGE_TYPE = Symbol.for("protobuf-ts/message-type");
+
+
+/***/ }),
+
+/***/ 69940:
+/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
+
+"use strict";
+
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.MessageType = void 0;
+const message_type_contract_1 = __nccwpck_require__(69251);
+const reflection_info_1 = __nccwpck_require__(37048);
+const reflection_type_check_1 = __nccwpck_require__(30073);
+const reflection_json_reader_1 = __nccwpck_require__(98944);
+const reflection_json_writer_1 = __nccwpck_require__(57324);
+const reflection_binary_reader_1 = __nccwpck_require__(6537);
+const reflection_binary_writer_1 = __nccwpck_require__(27685);
+const reflection_create_1 = __nccwpck_require__(8892);
+const reflection_merge_partial_1 = __nccwpck_require__(586);
+const json_typings_1 = __nccwpck_require__(13417);
+const json_format_contract_1 = __nccwpck_require__(18069);
+const reflection_equals_1 = __nccwpck_require__(8797);
+const binary_writer_1 = __nccwpck_require__(70079);
+const binary_reader_1 = __nccwpck_require__(49695);
+const baseDescriptors = Object.getOwnPropertyDescriptors(Object.getPrototypeOf({}));
+const messageTypeDescriptor = baseDescriptors[message_type_contract_1.MESSAGE_TYPE] = {};
+/**
+ * This standard message type provides reflection-based
+ * operations to work with a message.
+ */
+class MessageType {
+ constructor(name, fields, options) {
+ this.defaultCheckDepth = 16;
+ this.typeName = name;
+ this.fields = fields.map(reflection_info_1.normalizeFieldInfo);
+ this.options = options !== null && options !== void 0 ? options : {};
+ messageTypeDescriptor.value = this;
+ this.messagePrototype = Object.create(null, baseDescriptors);
+ this.refTypeCheck = new reflection_type_check_1.ReflectionTypeCheck(this);
+ this.refJsonReader = new reflection_json_reader_1.ReflectionJsonReader(this);
+ this.refJsonWriter = new reflection_json_writer_1.ReflectionJsonWriter(this);
+ this.refBinReader = new reflection_binary_reader_1.ReflectionBinaryReader(this);
+ this.refBinWriter = new reflection_binary_writer_1.ReflectionBinaryWriter(this);
}
- /**
- * Sets properties for a storage account's Blob service endpoint, including properties for Storage
- * Analytics and CORS (Cross-Origin Resource Sharing) rules
- * @param blobServiceProperties The StorageService properties.
- * @param options The options parameters.
- */
- setProperties(blobServiceProperties, options) {
- return this.client.sendOperationRequest({ blobServiceProperties, options }, setPropertiesOperationSpec);
+ create(value) {
+ let message = reflection_create_1.reflectionCreate(this);
+ if (value !== undefined) {
+ reflection_merge_partial_1.reflectionMergePartial(this, message, value);
+ }
+ return message;
}
/**
- * gets the properties of a storage account's Blob service, including properties for Storage Analytics
- * and CORS (Cross-Origin Resource Sharing) rules.
- * @param options The options parameters.
+ * Clone the message.
+ *
+ * Unknown fields are discarded.
*/
- getProperties(options) {
- return this.client.sendOperationRequest({ options }, getPropertiesOperationSpec$2);
+ clone(message) {
+ let copy = this.create();
+ reflection_merge_partial_1.reflectionMergePartial(this, copy, message);
+ return copy;
}
/**
- * Retrieves statistics related to replication for the Blob service. It is only available on the
- * secondary location endpoint when read-access geo-redundant replication is enabled for the storage
- * account.
- * @param options The options parameters.
+ * Determines whether two message of the same type have the same field values.
+ * Checks for deep equality, traversing repeated fields, oneof groups, maps
+ * and messages recursively.
+ * Will also return true if both messages are `undefined`.
*/
- getStatistics(options) {
- return this.client.sendOperationRequest({ options }, getStatisticsOperationSpec);
+ equals(a, b) {
+ return reflection_equals_1.reflectionEquals(this, a, b);
}
/**
- * The List Containers Segment operation returns a list of the containers under the specified account
- * @param options The options parameters.
+ * Is the given value assignable to our message type
+ * and contains no [excess properties](https://www.typescriptlang.org/docs/handbook/interfaces.html#excess-property-checks)?
*/
- listContainersSegment(options) {
- return this.client.sendOperationRequest({ options }, listContainersSegmentOperationSpec);
+ is(arg, depth = this.defaultCheckDepth) {
+ return this.refTypeCheck.is(arg, depth, false);
}
/**
- * Retrieves a user delegation key for the Blob service. This is only a valid operation when using
- * bearer token authentication.
- * @param keyInfo Key information
- * @param options The options parameters.
+ * Is the given value assignable to our message type,
+ * regardless of [excess properties](https://www.typescriptlang.org/docs/handbook/interfaces.html#excess-property-checks)?
*/
- getUserDelegationKey(keyInfo, options) {
- return this.client.sendOperationRequest({ keyInfo, options }, getUserDelegationKeyOperationSpec);
+ isAssignable(arg, depth = this.defaultCheckDepth) {
+ return this.refTypeCheck.is(arg, depth, true);
}
/**
- * Returns the sku name and account kind
- * @param options The options parameters.
+ * Copy partial data into the target message.
*/
- getAccountInfo(options) {
- return this.client.sendOperationRequest({ options }, getAccountInfoOperationSpec$2);
+ mergePartial(target, source) {
+ reflection_merge_partial_1.reflectionMergePartial(this, target, source);
}
/**
- * The Batch operation allows multiple API calls to be embedded into a single HTTP request.
- * @param contentLength The length of the request.
- * @param multipartContentType Required. The value of this header must be multipart/mixed with a batch
- * boundary. Example header value: multipart/mixed; boundary=batch_
- * @param body Initial data
- * @param options The options parameters.
+ * Create a new message from binary format.
*/
- submitBatch(contentLength, multipartContentType, body, options) {
- return this.client.sendOperationRequest({ contentLength, multipartContentType, body, options }, submitBatchOperationSpec$1);
+ fromBinary(data, options) {
+ let opt = binary_reader_1.binaryReadOptions(options);
+ return this.internalBinaryRead(opt.readerFactory(data), data.byteLength, opt);
}
/**
- * The Filter Blobs operation enables callers to list blobs across all containers whose tags match a
- * given search expression. Filter blobs searches across all containers within a storage account but
- * can be scoped within the expression to a single container.
- * @param options The options parameters.
+ * Read a new message from a JSON value.
*/
- filterBlobs(options) {
- return this.client.sendOperationRequest({ options }, filterBlobsOperationSpec$1);
+ fromJson(json, options) {
+ return this.internalJsonRead(json, json_format_contract_1.jsonReadOptions(options));
}
-}
-// Operation Specifications
-const xmlSerializer$5 = coreClient__namespace.createSerializer(Mappers, /* isXml */ true);
-const setPropertiesOperationSpec = {
- path: "/",
- httpMethod: "PUT",
- responses: {
- 202: {
- headersMapper: ServiceSetPropertiesHeaders,
- },
- default: {
- bodyMapper: StorageError,
- headersMapper: ServiceSetPropertiesExceptionHeaders,
- },
- },
- requestBody: blobServiceProperties,
- queryParameters: [
- restype,
- comp,
- timeoutInSeconds,
- ],
- urlParameters: [url],
- headerParameters: [
- contentType,
- accept,
- version,
- requestId,
- ],
- isXML: true,
- contentType: "application/xml; charset=utf-8",
- mediaType: "xml",
- serializer: xmlSerializer$5,
-};
-const getPropertiesOperationSpec$2 = {
- path: "/",
- httpMethod: "GET",
- responses: {
- 200: {
- bodyMapper: BlobServiceProperties,
- headersMapper: ServiceGetPropertiesHeaders,
- },
- default: {
- bodyMapper: StorageError,
- headersMapper: ServiceGetPropertiesExceptionHeaders,
- },
- },
- queryParameters: [
- restype,
- comp,
- timeoutInSeconds,
- ],
- urlParameters: [url],
- headerParameters: [
- version,
- requestId,
- accept1,
- ],
- isXML: true,
- serializer: xmlSerializer$5,
-};
-const getStatisticsOperationSpec = {
- path: "/",
- httpMethod: "GET",
- responses: {
- 200: {
- bodyMapper: BlobServiceStatistics,
- headersMapper: ServiceGetStatisticsHeaders,
- },
- default: {
- bodyMapper: StorageError,
- headersMapper: ServiceGetStatisticsExceptionHeaders,
- },
- },
- queryParameters: [
- restype,
- timeoutInSeconds,
- comp1,
- ],
- urlParameters: [url],
- headerParameters: [
- version,
- requestId,
- accept1,
- ],
- isXML: true,
- serializer: xmlSerializer$5,
-};
-const listContainersSegmentOperationSpec = {
- path: "/",
- httpMethod: "GET",
- responses: {
- 200: {
- bodyMapper: ListContainersSegmentResponse,
- headersMapper: ServiceListContainersSegmentHeaders,
- },
- default: {
- bodyMapper: StorageError,
- headersMapper: ServiceListContainersSegmentExceptionHeaders,
- },
- },
- queryParameters: [
- timeoutInSeconds,
- comp2,
- prefix,
- marker,
- maxPageSize,
- include,
- ],
- urlParameters: [url],
- headerParameters: [
- version,
- requestId,
- accept1,
- ],
- isXML: true,
- serializer: xmlSerializer$5,
-};
-const getUserDelegationKeyOperationSpec = {
- path: "/",
- httpMethod: "POST",
- responses: {
- 200: {
- bodyMapper: UserDelegationKey,
- headersMapper: ServiceGetUserDelegationKeyHeaders,
- },
- default: {
- bodyMapper: StorageError,
- headersMapper: ServiceGetUserDelegationKeyExceptionHeaders,
- },
- },
- requestBody: keyInfo,
- queryParameters: [
- restype,
- timeoutInSeconds,
- comp3,
- ],
- urlParameters: [url],
- headerParameters: [
- contentType,
- accept,
- version,
- requestId,
- ],
- isXML: true,
- contentType: "application/xml; charset=utf-8",
- mediaType: "xml",
- serializer: xmlSerializer$5,
-};
-const getAccountInfoOperationSpec$2 = {
- path: "/",
- httpMethod: "GET",
- responses: {
- 200: {
- headersMapper: ServiceGetAccountInfoHeaders,
- },
- default: {
- bodyMapper: StorageError,
- headersMapper: ServiceGetAccountInfoExceptionHeaders,
- },
- },
- queryParameters: [
- comp,
- timeoutInSeconds,
- restype1,
- ],
- urlParameters: [url],
- headerParameters: [
- version,
- requestId,
- accept1,
- ],
- isXML: true,
- serializer: xmlSerializer$5,
-};
-const submitBatchOperationSpec$1 = {
- path: "/",
- httpMethod: "POST",
- responses: {
- 202: {
- bodyMapper: {
- type: { name: "Stream" },
- serializedName: "parsedResponse",
- },
- headersMapper: ServiceSubmitBatchHeaders,
- },
- default: {
- bodyMapper: StorageError,
- headersMapper: ServiceSubmitBatchExceptionHeaders,
- },
- },
- requestBody: body,
- queryParameters: [timeoutInSeconds, comp4],
- urlParameters: [url],
- headerParameters: [
- accept,
- version,
- requestId,
- contentLength,
- multipartContentType,
- ],
- isXML: true,
- contentType: "application/xml; charset=utf-8",
- mediaType: "xml",
- serializer: xmlSerializer$5,
-};
-const filterBlobsOperationSpec$1 = {
- path: "/",
- httpMethod: "GET",
- responses: {
- 200: {
- bodyMapper: FilterBlobSegment,
- headersMapper: ServiceFilterBlobsHeaders,
- },
- default: {
- bodyMapper: StorageError,
- headersMapper: ServiceFilterBlobsExceptionHeaders,
- },
- },
- queryParameters: [
- timeoutInSeconds,
- marker,
- maxPageSize,
- comp5,
- where,
- ],
- urlParameters: [url],
- headerParameters: [
- version,
- requestId,
- accept1,
- ],
- isXML: true,
- serializer: xmlSerializer$5,
-};
-
-/*
- * 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.
- */
-/** Class containing Container operations. */
-class ContainerImpl {
/**
- * Initialize a new instance of the class Container class.
- * @param client Reference to the service client
+ * Read a new message from a JSON string.
+ * This is equivalent to `T.fromJson(JSON.parse(json))`.
*/
- constructor(client) {
- this.client = client;
+ fromJsonString(json, options) {
+ let value = JSON.parse(json);
+ return this.fromJson(value, options);
}
/**
- * creates a new container under the specified account. If the container with the same name already
- * exists, the operation fails
- * @param options The options parameters.
+ * Write the message to canonical JSON value.
*/
- create(options) {
- return this.client.sendOperationRequest({ options }, createOperationSpec$2);
+ toJson(message, options) {
+ return this.internalJsonWrite(message, json_format_contract_1.jsonWriteOptions(options));
}
/**
- * returns all user-defined metadata and system properties for the specified container. The data
- * returned does not include the container's list of blobs
- * @param options The options parameters.
+ * Convert the message to canonical JSON string.
+ * This is equivalent to `JSON.stringify(T.toJson(t))`
*/
- getProperties(options) {
- return this.client.sendOperationRequest({ options }, getPropertiesOperationSpec$1);
+ toJsonString(message, options) {
+ var _a;
+ let value = this.toJson(message, options);
+ return JSON.stringify(value, null, (_a = options === null || options === void 0 ? void 0 : options.prettySpaces) !== null && _a !== void 0 ? _a : 0);
}
/**
- * operation marks the specified container for deletion. The container and any blobs contained within
- * it are later deleted during garbage collection
- * @param options The options parameters.
+ * Write the message to binary format.
*/
- delete(options) {
- return this.client.sendOperationRequest({ options }, deleteOperationSpec$1);
+ toBinary(message, options) {
+ let opt = binary_writer_1.binaryWriteOptions(options);
+ return this.internalBinaryWrite(message, opt.writerFactory(), opt).finish();
}
/**
- * operation sets one or more user-defined name-value pairs for the specified container.
- * @param options The options parameters.
+ * This is an internal method. If you just want to read a message from
+ * JSON, use `fromJson()` or `fromJsonString()`.
+ *
+ * Reads JSON value and merges the fields into the target
+ * according to protobuf rules. If the target is omitted,
+ * a new instance is created first.
*/
- setMetadata(options) {
- return this.client.sendOperationRequest({ options }, setMetadataOperationSpec$1);
+ internalJsonRead(json, options, target) {
+ if (json !== null && typeof json == "object" && !Array.isArray(json)) {
+ let message = target !== null && target !== void 0 ? target : this.create();
+ this.refJsonReader.read(json, message, options);
+ return message;
+ }
+ throw new Error(`Unable to parse message ${this.typeName} from JSON ${json_typings_1.typeofJsonValue(json)}.`);
}
/**
- * gets the permissions for the specified container. The permissions indicate whether container data
- * may be accessed publicly.
- * @param options The options parameters.
+ * This is an internal method. If you just want to write a message
+ * to JSON, use `toJson()` or `toJsonString().
+ *
+ * Writes JSON value and returns it.
*/
- getAccessPolicy(options) {
- return this.client.sendOperationRequest({ options }, getAccessPolicyOperationSpec);
+ internalJsonWrite(message, options) {
+ return this.refJsonWriter.write(message, options);
}
/**
- * sets the permissions for the specified container. The permissions indicate whether blobs in a
- * container may be accessed publicly.
- * @param options The options parameters.
+ * This is an internal method. If you just want to write a message
+ * in binary format, use `toBinary()`.
+ *
+ * Serializes the message in binary format and appends it to the given
+ * writer. Returns passed writer.
*/
- setAccessPolicy(options) {
- return this.client.sendOperationRequest({ options }, setAccessPolicyOperationSpec);
+ internalBinaryWrite(message, writer, options) {
+ this.refBinWriter.write(message, writer, options);
+ return writer;
}
/**
- * Restores a previously-deleted container.
- * @param options The options parameters.
+ * This is an internal method. If you just want to read a message from
+ * binary data, use `fromBinary()`.
+ *
+ * Reads data from binary format and merges the fields into
+ * the target according to protobuf rules. If the target is
+ * omitted, a new instance is created first.
*/
- restore(options) {
- return this.client.sendOperationRequest({ options }, restoreOperationSpec);
+ internalBinaryRead(reader, length, options, target) {
+ let message = target !== null && target !== void 0 ? target : this.create();
+ this.refBinReader.read(reader, message, options, length);
+ return message;
+ }
+}
+exports.MessageType = MessageType;
+
+
+/***/ }),
+
+/***/ 69473:
+/***/ ((__unused_webpack_module, exports) => {
+
+"use strict";
+
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.getSelectedOneofValue = exports.clearOneofValue = exports.setUnknownOneofValue = exports.setOneofValue = exports.getOneofValue = exports.isOneofGroup = void 0;
+/**
+ * Is the given value a valid oneof group?
+ *
+ * We represent protobuf `oneof` as algebraic data types (ADT) in generated
+ * code. But when working with messages of unknown type, the ADT does not
+ * help us.
+ *
+ * This type guard checks if the given object adheres to the ADT rules, which
+ * are as follows:
+ *
+ * 1) Must be an object.
+ *
+ * 2) Must have a "oneofKind" discriminator property.
+ *
+ * 3) If "oneofKind" is `undefined`, no member field is selected. The object
+ * must not have any other properties.
+ *
+ * 4) If "oneofKind" is a `string`, the member field with this name is
+ * selected.
+ *
+ * 5) If a member field is selected, the object must have a second property
+ * with this name. The property must not be `undefined`.
+ *
+ * 6) No extra properties are allowed. The object has either one property
+ * (no selection) or two properties (selection).
+ *
+ */
+function isOneofGroup(any) {
+ if (typeof any != 'object' || any === null || !any.hasOwnProperty('oneofKind')) {
+ return false;
+ }
+ switch (typeof any.oneofKind) {
+ case "string":
+ if (any[any.oneofKind] === undefined)
+ return false;
+ return Object.keys(any).length == 2;
+ case "undefined":
+ return Object.keys(any).length == 1;
+ default:
+ return false;
+ }
+}
+exports.isOneofGroup = isOneofGroup;
+/**
+ * Returns the value of the given field in a oneof group.
+ */
+function getOneofValue(oneof, kind) {
+ return oneof[kind];
+}
+exports.getOneofValue = getOneofValue;
+function setOneofValue(oneof, kind, value) {
+ if (oneof.oneofKind !== undefined) {
+ delete oneof[oneof.oneofKind];
+ }
+ oneof.oneofKind = kind;
+ if (value !== undefined) {
+ oneof[kind] = value;
+ }
+}
+exports.setOneofValue = setOneofValue;
+function setUnknownOneofValue(oneof, kind, value) {
+ if (oneof.oneofKind !== undefined) {
+ delete oneof[oneof.oneofKind];
}
+ oneof.oneofKind = kind;
+ if (value !== undefined && kind !== undefined) {
+ oneof[kind] = value;
+ }
+}
+exports.setUnknownOneofValue = setUnknownOneofValue;
+/**
+ * Removes the selected field in a oneof group.
+ *
+ * Note that the recommended way to modify a oneof group is to set
+ * a new object:
+ *
+ * ```ts
+ * message.result = { oneofKind: undefined };
+ * ```
+ */
+function clearOneofValue(oneof) {
+ if (oneof.oneofKind !== undefined) {
+ delete oneof[oneof.oneofKind];
+ }
+ oneof.oneofKind = undefined;
+}
+exports.clearOneofValue = clearOneofValue;
+/**
+ * Returns the selected value of the given oneof group.
+ *
+ * Not that the recommended way to access a oneof group is to check
+ * the "oneofKind" property and let TypeScript narrow down the union
+ * type for you:
+ *
+ * ```ts
+ * if (message.result.oneofKind === "error") {
+ * message.result.error; // string
+ * }
+ * ```
+ *
+ * In the rare case you just need the value, and do not care about
+ * which protobuf field is selected, you can use this function
+ * for convenience.
+ */
+function getSelectedOneofValue(oneof) {
+ if (oneof.oneofKind === undefined) {
+ return undefined;
+ }
+ return oneof[oneof.oneofKind];
+}
+exports.getSelectedOneofValue = getSelectedOneofValue;
+
+
+/***/ }),
+
+/***/ 38819:
+/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
+
+"use strict";
+
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.PbLong = exports.PbULong = exports.detectBi = void 0;
+const goog_varint_1 = __nccwpck_require__(61605);
+let BI;
+function detectBi() {
+ const dv = new DataView(new ArrayBuffer(8));
+ const ok = globalThis.BigInt !== undefined
+ && typeof dv.getBigInt64 === "function"
+ && typeof dv.getBigUint64 === "function"
+ && typeof dv.setBigInt64 === "function"
+ && typeof dv.setBigUint64 === "function";
+ BI = ok ? {
+ MIN: BigInt("-9223372036854775808"),
+ MAX: BigInt("9223372036854775807"),
+ UMIN: BigInt("0"),
+ UMAX: BigInt("18446744073709551615"),
+ C: BigInt,
+ V: dv,
+ } : undefined;
+}
+exports.detectBi = detectBi;
+detectBi();
+function assertBi(bi) {
+ if (!bi)
+ throw new Error("BigInt unavailable, see https://github.com/timostamm/protobuf-ts/blob/v1.0.8/MANUAL.md#bigint-support");
+}
+// used to validate from(string) input (when bigint is unavailable)
+const RE_DECIMAL_STR = /^-?[0-9]+$/;
+// constants for binary math
+const TWO_PWR_32_DBL = 0x100000000;
+const HALF_2_PWR_32 = 0x080000000;
+// base class for PbLong and PbULong provides shared code
+class SharedPbLong {
/**
- * Renames an existing container.
- * @param sourceContainerName Required. Specifies the name of the container to rename.
- * @param options The options parameters.
+ * Create a new instance with the given bits.
*/
- rename(sourceContainerName, options) {
- return this.client.sendOperationRequest({ sourceContainerName, options }, renameOperationSpec);
+ constructor(lo, hi) {
+ this.lo = lo | 0;
+ this.hi = hi | 0;
}
/**
- * The Batch operation allows multiple API calls to be embedded into a single HTTP request.
- * @param contentLength The length of the request.
- * @param multipartContentType Required. The value of this header must be multipart/mixed with a batch
- * boundary. Example header value: multipart/mixed; boundary=batch_
- * @param body Initial data
- * @param options The options parameters.
+ * Is this instance equal to 0?
*/
- submitBatch(contentLength, multipartContentType, body, options) {
- return this.client.sendOperationRequest({ contentLength, multipartContentType, body, options }, submitBatchOperationSpec);
+ isZero() {
+ return this.lo == 0 && this.hi == 0;
}
/**
- * The Filter Blobs operation enables callers to list blobs in a container whose tags match a given
- * search expression. Filter blobs searches within the given container.
- * @param options The options parameters.
+ * Convert to a native number.
*/
- filterBlobs(options) {
- return this.client.sendOperationRequest({ options }, filterBlobsOperationSpec);
+ toNumber() {
+ let result = this.hi * TWO_PWR_32_DBL + (this.lo >>> 0);
+ if (!Number.isSafeInteger(result))
+ throw new Error("cannot convert to safe number");
+ return result;
}
+}
+/**
+ * 64-bit unsigned integer as two 32-bit values.
+ * Converts between `string`, `number` and `bigint` representations.
+ */
+class PbULong extends SharedPbLong {
/**
- * [Update] establishes and manages a lock on a container for delete operations. The lock duration can
- * be 15 to 60 seconds, or can be infinite
- * @param options The options parameters.
+ * Create instance from a `string`, `number` or `bigint`.
*/
- acquireLease(options) {
- return this.client.sendOperationRequest({ options }, acquireLeaseOperationSpec$1);
+ static from(value) {
+ if (BI)
+ // noinspection FallThroughInSwitchStatementJS
+ switch (typeof value) {
+ case "string":
+ if (value == "0")
+ return this.ZERO;
+ if (value == "")
+ throw new Error('string is no integer');
+ value = BI.C(value);
+ case "number":
+ if (value === 0)
+ return this.ZERO;
+ value = BI.C(value);
+ case "bigint":
+ if (!value)
+ return this.ZERO;
+ if (value < BI.UMIN)
+ throw new Error('signed value for ulong');
+ if (value > BI.UMAX)
+ throw new Error('ulong too large');
+ BI.V.setBigUint64(0, value, true);
+ return new PbULong(BI.V.getInt32(0, true), BI.V.getInt32(4, true));
+ }
+ else
+ switch (typeof value) {
+ case "string":
+ if (value == "0")
+ return this.ZERO;
+ value = value.trim();
+ if (!RE_DECIMAL_STR.test(value))
+ throw new Error('string is no integer');
+ let [minus, lo, hi] = goog_varint_1.int64fromString(value);
+ if (minus)
+ throw new Error('signed value for ulong');
+ return new PbULong(lo, hi);
+ case "number":
+ if (value == 0)
+ return this.ZERO;
+ if (!Number.isSafeInteger(value))
+ throw new Error('number is no integer');
+ if (value < 0)
+ throw new Error('signed value for ulong');
+ return new PbULong(value, value / TWO_PWR_32_DBL);
+ }
+ throw new Error('unknown value ' + typeof value);
}
/**
- * [Update] establishes and manages a lock on a container for delete operations. The lock duration can
- * be 15 to 60 seconds, or can be infinite
- * @param leaseId Specifies the current lease ID on the resource.
- * @param options The options parameters.
+ * Convert to decimal string.
*/
- releaseLease(leaseId, options) {
- return this.client.sendOperationRequest({ leaseId, options }, releaseLeaseOperationSpec$1);
+ toString() {
+ return BI ? this.toBigInt().toString() : goog_varint_1.int64toString(this.lo, this.hi);
}
/**
- * [Update] establishes and manages a lock on a container for delete operations. The lock duration can
- * be 15 to 60 seconds, or can be infinite
- * @param leaseId Specifies the current lease ID on the resource.
- * @param options The options parameters.
+ * Convert to native bigint.
*/
- renewLease(leaseId, options) {
- return this.client.sendOperationRequest({ leaseId, options }, renewLeaseOperationSpec$1);
+ toBigInt() {
+ assertBi(BI);
+ BI.V.setInt32(0, this.lo, true);
+ BI.V.setInt32(4, this.hi, true);
+ return BI.V.getBigUint64(0, true);
}
+}
+exports.PbULong = PbULong;
+/**
+ * ulong 0 singleton.
+ */
+PbULong.ZERO = new PbULong(0, 0);
+/**
+ * 64-bit signed integer as two 32-bit values.
+ * Converts between `string`, `number` and `bigint` representations.
+ */
+class PbLong extends SharedPbLong {
/**
- * [Update] establishes and manages a lock on a container for delete operations. The lock duration can
- * be 15 to 60 seconds, or can be infinite
- * @param options The options parameters.
+ * Create instance from a `string`, `number` or `bigint`.
*/
- breakLease(options) {
- return this.client.sendOperationRequest({ options }, breakLeaseOperationSpec$1);
+ static from(value) {
+ if (BI)
+ // noinspection FallThroughInSwitchStatementJS
+ switch (typeof value) {
+ case "string":
+ if (value == "0")
+ return this.ZERO;
+ if (value == "")
+ throw new Error('string is no integer');
+ value = BI.C(value);
+ case "number":
+ if (value === 0)
+ return this.ZERO;
+ value = BI.C(value);
+ case "bigint":
+ if (!value)
+ return this.ZERO;
+ if (value < BI.MIN)
+ throw new Error('signed long too small');
+ if (value > BI.MAX)
+ throw new Error('signed long too large');
+ BI.V.setBigInt64(0, value, true);
+ return new PbLong(BI.V.getInt32(0, true), BI.V.getInt32(4, true));
+ }
+ else
+ switch (typeof value) {
+ case "string":
+ if (value == "0")
+ return this.ZERO;
+ value = value.trim();
+ if (!RE_DECIMAL_STR.test(value))
+ throw new Error('string is no integer');
+ let [minus, lo, hi] = goog_varint_1.int64fromString(value);
+ if (minus) {
+ if (hi > HALF_2_PWR_32 || (hi == HALF_2_PWR_32 && lo != 0))
+ throw new Error('signed long too small');
+ }
+ else if (hi >= HALF_2_PWR_32)
+ throw new Error('signed long too large');
+ let pbl = new PbLong(lo, hi);
+ return minus ? pbl.negate() : pbl;
+ case "number":
+ if (value == 0)
+ return this.ZERO;
+ if (!Number.isSafeInteger(value))
+ throw new Error('number is no integer');
+ return value > 0
+ ? new PbLong(value, value / TWO_PWR_32_DBL)
+ : new PbLong(-value, -value / TWO_PWR_32_DBL).negate();
+ }
+ throw new Error('unknown value ' + typeof value);
}
/**
- * [Update] establishes and manages a lock on a container for delete operations. The lock duration can
- * be 15 to 60 seconds, or can be infinite
- * @param leaseId Specifies the current lease ID on the resource.
- * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400
- * (Invalid request) if the proposed lease ID is not in the correct format. See Guid Constructor
- * (String) for a list of valid GUID string formats.
- * @param options The options parameters.
+ * Do we have a minus sign?
*/
- changeLease(leaseId, proposedLeaseId, options) {
- return this.client.sendOperationRequest({ leaseId, proposedLeaseId, options }, changeLeaseOperationSpec$1);
+ isNegative() {
+ return (this.hi & HALF_2_PWR_32) !== 0;
}
/**
- * [Update] The List Blobs operation returns a list of the blobs under the specified container
- * @param options The options parameters.
+ * Negate two's complement.
+ * Invert all the bits and add one to the result.
*/
- listBlobFlatSegment(options) {
- return this.client.sendOperationRequest({ options }, listBlobFlatSegmentOperationSpec);
+ negate() {
+ let hi = ~this.hi, lo = this.lo;
+ if (lo)
+ lo = ~lo + 1;
+ else
+ hi += 1;
+ return new PbLong(lo, hi);
}
/**
- * [Update] The List Blobs operation returns a list of the blobs under the specified container
- * @param delimiter When the request includes this parameter, the operation returns a BlobPrefix
- * element in the response body that acts as a placeholder for all blobs whose names begin with the
- * same substring up to the appearance of the delimiter character. The delimiter may be a single
- * character or a string.
- * @param options The options parameters.
+ * Convert to decimal string.
*/
- listBlobHierarchySegment(delimiter, options) {
- return this.client.sendOperationRequest({ delimiter, options }, listBlobHierarchySegmentOperationSpec);
+ toString() {
+ if (BI)
+ return this.toBigInt().toString();
+ if (this.isNegative()) {
+ let n = this.negate();
+ return '-' + goog_varint_1.int64toString(n.lo, n.hi);
+ }
+ return goog_varint_1.int64toString(this.lo, this.hi);
}
/**
- * Returns the sku name and account kind
- * @param options The options parameters.
+ * Convert to native bigint.
*/
- getAccountInfo(options) {
- return this.client.sendOperationRequest({ options }, getAccountInfoOperationSpec$1);
+ toBigInt() {
+ assertBi(BI);
+ BI.V.setInt32(0, this.lo, true);
+ BI.V.setInt32(4, this.hi, true);
+ return BI.V.getBigInt64(0, true);
}
}
-// Operation Specifications
-const xmlSerializer$4 = coreClient__namespace.createSerializer(Mappers, /* isXml */ true);
-const createOperationSpec$2 = {
- path: "/{containerName}",
- httpMethod: "PUT",
- responses: {
- 201: {
- headersMapper: ContainerCreateHeaders,
- },
- default: {
- bodyMapper: StorageError,
- headersMapper: ContainerCreateExceptionHeaders,
- },
- },
- queryParameters: [timeoutInSeconds, restype2],
- urlParameters: [url],
- headerParameters: [
- version,
- requestId,
- accept1,
- metadata,
- access,
- defaultEncryptionScope,
- preventEncryptionScopeOverride,
- ],
- isXML: true,
- serializer: xmlSerializer$4,
-};
-const getPropertiesOperationSpec$1 = {
- path: "/{containerName}",
- httpMethod: "GET",
- responses: {
- 200: {
- headersMapper: ContainerGetPropertiesHeaders,
- },
- default: {
- bodyMapper: StorageError,
- headersMapper: ContainerGetPropertiesExceptionHeaders,
- },
- },
- queryParameters: [timeoutInSeconds, restype2],
- urlParameters: [url],
- headerParameters: [
- version,
- requestId,
- accept1,
- leaseId,
- ],
- isXML: true,
- serializer: xmlSerializer$4,
-};
-const deleteOperationSpec$1 = {
- path: "/{containerName}",
- httpMethod: "DELETE",
- responses: {
- 202: {
- headersMapper: ContainerDeleteHeaders,
- },
- default: {
- bodyMapper: StorageError,
- headersMapper: ContainerDeleteExceptionHeaders,
- },
- },
- queryParameters: [timeoutInSeconds, restype2],
- urlParameters: [url],
- headerParameters: [
- version,
- requestId,
- accept1,
- leaseId,
- ifModifiedSince,
- ifUnmodifiedSince,
- ],
- isXML: true,
- serializer: xmlSerializer$4,
-};
-const setMetadataOperationSpec$1 = {
- path: "/{containerName}",
- httpMethod: "PUT",
- responses: {
- 200: {
- headersMapper: ContainerSetMetadataHeaders,
- },
- default: {
- bodyMapper: StorageError,
- headersMapper: ContainerSetMetadataExceptionHeaders,
- },
- },
- queryParameters: [
- timeoutInSeconds,
- restype2,
- comp6,
- ],
- urlParameters: [url],
- headerParameters: [
- version,
- requestId,
- accept1,
- metadata,
- leaseId,
- ifModifiedSince,
- ],
- isXML: true,
- serializer: xmlSerializer$4,
-};
-const getAccessPolicyOperationSpec = {
- path: "/{containerName}",
- httpMethod: "GET",
- responses: {
- 200: {
- bodyMapper: {
- type: {
- name: "Sequence",
- element: {
- type: { name: "Composite", className: "SignedIdentifier" },
- },
- },
- serializedName: "SignedIdentifiers",
- xmlName: "SignedIdentifiers",
- xmlIsWrapped: true,
- xmlElementName: "SignedIdentifier",
- },
- headersMapper: ContainerGetAccessPolicyHeaders,
- },
- default: {
- bodyMapper: StorageError,
- headersMapper: ContainerGetAccessPolicyExceptionHeaders,
- },
- },
- queryParameters: [
- timeoutInSeconds,
- restype2,
- comp7,
- ],
- urlParameters: [url],
- headerParameters: [
- version,
- requestId,
- accept1,
- leaseId,
- ],
- isXML: true,
- serializer: xmlSerializer$4,
-};
-const setAccessPolicyOperationSpec = {
- path: "/{containerName}",
- httpMethod: "PUT",
- responses: {
- 200: {
- headersMapper: ContainerSetAccessPolicyHeaders,
- },
- default: {
- bodyMapper: StorageError,
- headersMapper: ContainerSetAccessPolicyExceptionHeaders,
- },
- },
- requestBody: containerAcl,
- queryParameters: [
- timeoutInSeconds,
- restype2,
- comp7,
- ],
- urlParameters: [url],
- headerParameters: [
- contentType,
- accept,
- version,
- requestId,
- access,
- leaseId,
- ifModifiedSince,
- ifUnmodifiedSince,
- ],
- isXML: true,
- contentType: "application/xml; charset=utf-8",
- mediaType: "xml",
- serializer: xmlSerializer$4,
-};
-const restoreOperationSpec = {
- path: "/{containerName}",
- httpMethod: "PUT",
- responses: {
- 201: {
- headersMapper: ContainerRestoreHeaders,
- },
- default: {
- bodyMapper: StorageError,
- headersMapper: ContainerRestoreExceptionHeaders,
- },
- },
- queryParameters: [
- timeoutInSeconds,
- restype2,
- comp8,
- ],
- urlParameters: [url],
- headerParameters: [
- version,
- requestId,
- accept1,
- deletedContainerName,
- deletedContainerVersion,
- ],
- isXML: true,
- serializer: xmlSerializer$4,
-};
-const renameOperationSpec = {
- path: "/{containerName}",
- httpMethod: "PUT",
- responses: {
- 200: {
- headersMapper: ContainerRenameHeaders,
- },
- default: {
- bodyMapper: StorageError,
- headersMapper: ContainerRenameExceptionHeaders,
- },
- },
- queryParameters: [
- timeoutInSeconds,
- restype2,
- comp9,
- ],
- urlParameters: [url],
- headerParameters: [
- version,
- requestId,
- accept1,
- sourceContainerName,
- sourceLeaseId,
- ],
- isXML: true,
- serializer: xmlSerializer$4,
-};
-const submitBatchOperationSpec = {
- path: "/{containerName}",
- httpMethod: "POST",
- responses: {
- 202: {
- bodyMapper: {
- type: { name: "Stream" },
- serializedName: "parsedResponse",
- },
- headersMapper: ContainerSubmitBatchHeaders,
- },
- default: {
- bodyMapper: StorageError,
- headersMapper: ContainerSubmitBatchExceptionHeaders,
- },
- },
- requestBody: body,
- queryParameters: [
- timeoutInSeconds,
- comp4,
- restype2,
- ],
- urlParameters: [url],
- headerParameters: [
- accept,
- version,
- requestId,
- contentLength,
- multipartContentType,
- ],
- isXML: true,
- contentType: "application/xml; charset=utf-8",
- mediaType: "xml",
- serializer: xmlSerializer$4,
-};
-const filterBlobsOperationSpec = {
- path: "/{containerName}",
- httpMethod: "GET",
- responses: {
- 200: {
- bodyMapper: FilterBlobSegment,
- headersMapper: ContainerFilterBlobsHeaders,
- },
- default: {
- bodyMapper: StorageError,
- headersMapper: ContainerFilterBlobsExceptionHeaders,
- },
- },
- queryParameters: [
- timeoutInSeconds,
- marker,
- maxPageSize,
- comp5,
- where,
- restype2,
- ],
- urlParameters: [url],
- headerParameters: [
- version,
- requestId,
- accept1,
- ],
- isXML: true,
- serializer: xmlSerializer$4,
-};
-const acquireLeaseOperationSpec$1 = {
- path: "/{containerName}",
- httpMethod: "PUT",
- responses: {
- 201: {
- headersMapper: ContainerAcquireLeaseHeaders,
- },
- default: {
- bodyMapper: StorageError,
- headersMapper: ContainerAcquireLeaseExceptionHeaders,
- },
- },
- queryParameters: [
- timeoutInSeconds,
- restype2,
- comp10,
- ],
- urlParameters: [url],
- headerParameters: [
- version,
- requestId,
- accept1,
- ifModifiedSince,
- ifUnmodifiedSince,
- action,
- duration,
- proposedLeaseId,
- ],
- isXML: true,
- serializer: xmlSerializer$4,
-};
-const releaseLeaseOperationSpec$1 = {
- path: "/{containerName}",
- httpMethod: "PUT",
- responses: {
- 200: {
- headersMapper: ContainerReleaseLeaseHeaders,
- },
- default: {
- bodyMapper: StorageError,
- headersMapper: ContainerReleaseLeaseExceptionHeaders,
- },
- },
- queryParameters: [
- timeoutInSeconds,
- restype2,
- comp10,
- ],
- urlParameters: [url],
- headerParameters: [
- version,
- requestId,
- accept1,
- ifModifiedSince,
- ifUnmodifiedSince,
- action1,
- leaseId1,
- ],
- isXML: true,
- serializer: xmlSerializer$4,
-};
-const renewLeaseOperationSpec$1 = {
- path: "/{containerName}",
- httpMethod: "PUT",
- responses: {
- 200: {
- headersMapper: ContainerRenewLeaseHeaders,
- },
- default: {
- bodyMapper: StorageError,
- headersMapper: ContainerRenewLeaseExceptionHeaders,
- },
- },
- queryParameters: [
- timeoutInSeconds,
- restype2,
- comp10,
- ],
- urlParameters: [url],
- headerParameters: [
- version,
- requestId,
- accept1,
- ifModifiedSince,
- ifUnmodifiedSince,
- leaseId1,
- action2,
- ],
- isXML: true,
- serializer: xmlSerializer$4,
-};
-const breakLeaseOperationSpec$1 = {
- path: "/{containerName}",
- httpMethod: "PUT",
- responses: {
- 202: {
- headersMapper: ContainerBreakLeaseHeaders,
- },
- default: {
- bodyMapper: StorageError,
- headersMapper: ContainerBreakLeaseExceptionHeaders,
- },
- },
- queryParameters: [
- timeoutInSeconds,
- restype2,
- comp10,
- ],
- urlParameters: [url],
- headerParameters: [
- version,
- requestId,
- accept1,
- ifModifiedSince,
- ifUnmodifiedSince,
- action3,
- breakPeriod,
- ],
- isXML: true,
- serializer: xmlSerializer$4,
-};
-const changeLeaseOperationSpec$1 = {
- path: "/{containerName}",
- httpMethod: "PUT",
- responses: {
- 200: {
- headersMapper: ContainerChangeLeaseHeaders,
- },
- default: {
- bodyMapper: StorageError,
- headersMapper: ContainerChangeLeaseExceptionHeaders,
- },
- },
- queryParameters: [
- timeoutInSeconds,
- restype2,
- comp10,
- ],
- urlParameters: [url],
- headerParameters: [
- version,
- requestId,
- accept1,
- ifModifiedSince,
- ifUnmodifiedSince,
- leaseId1,
- action4,
- proposedLeaseId1,
- ],
- isXML: true,
- serializer: xmlSerializer$4,
-};
-const listBlobFlatSegmentOperationSpec = {
- path: "/{containerName}",
- httpMethod: "GET",
- responses: {
- 200: {
- bodyMapper: ListBlobsFlatSegmentResponse,
- headersMapper: ContainerListBlobFlatSegmentHeaders,
- },
- default: {
- bodyMapper: StorageError,
- headersMapper: ContainerListBlobFlatSegmentExceptionHeaders,
- },
- },
- queryParameters: [
- timeoutInSeconds,
- comp2,
- prefix,
- marker,
- maxPageSize,
- restype2,
- include1,
- ],
- urlParameters: [url],
- headerParameters: [
- version,
- requestId,
- accept1,
- ],
- isXML: true,
- serializer: xmlSerializer$4,
-};
-const listBlobHierarchySegmentOperationSpec = {
- path: "/{containerName}",
- httpMethod: "GET",
- responses: {
- 200: {
- bodyMapper: ListBlobsHierarchySegmentResponse,
- headersMapper: ContainerListBlobHierarchySegmentHeaders,
- },
- default: {
- bodyMapper: StorageError,
- headersMapper: ContainerListBlobHierarchySegmentExceptionHeaders,
- },
- },
- queryParameters: [
- timeoutInSeconds,
- comp2,
- prefix,
- marker,
- maxPageSize,
- restype2,
- include1,
- delimiter,
- ],
- urlParameters: [url],
- headerParameters: [
- version,
- requestId,
- accept1,
- ],
- isXML: true,
- serializer: xmlSerializer$4,
-};
-const getAccountInfoOperationSpec$1 = {
- path: "/{containerName}",
- httpMethod: "GET",
- responses: {
- 200: {
- headersMapper: ContainerGetAccountInfoHeaders,
- },
- default: {
- bodyMapper: StorageError,
- headersMapper: ContainerGetAccountInfoExceptionHeaders,
- },
- },
- queryParameters: [
- comp,
- timeoutInSeconds,
- restype1,
- ],
- urlParameters: [url],
- headerParameters: [
- version,
- requestId,
- accept1,
- ],
- isXML: true,
- serializer: xmlSerializer$4,
-};
+exports.PbLong = PbLong;
+/**
+ * long 0 singleton.
+ */
+PbLong.ZERO = new PbLong(0, 0);
+
+
+/***/ }),
+
+/***/ 49016:
+/***/ ((__unused_webpack_module, exports) => {
+
+"use strict";
+
+// Copyright (c) 2016, Daniel Wirtz All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// * Neither the name of its author, nor the names of its contributors
+// may be used to endorse or promote products derived from this software
+// without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.utf8read = void 0;
+const fromCharCodes = (chunk) => String.fromCharCode.apply(String, chunk);
+/**
+ * @deprecated This function will no longer be exported with the next major
+ * release, since protobuf-ts has switch to TextDecoder API. If you need this
+ * function, please migrate to @protobufjs/utf8. For context, see
+ * https://github.com/timostamm/protobuf-ts/issues/184
+ *
+ * Reads UTF8 bytes as a string.
+ *
+ * See [protobufjs / utf8](https://github.com/protobufjs/protobuf.js/blob/9893e35b854621cce64af4bf6be2cff4fb892796/lib/utf8/index.js#L40)
+ *
+ * Copyright (c) 2016, Daniel Wirtz
+ */
+function utf8read(bytes) {
+ if (bytes.length < 1)
+ return "";
+ let pos = 0, // position in bytes
+ parts = [], chunk = [], i = 0, // char offset
+ t; // temporary
+ let len = bytes.length;
+ while (pos < len) {
+ t = bytes[pos++];
+ if (t < 128)
+ chunk[i++] = t;
+ else if (t > 191 && t < 224)
+ chunk[i++] = (t & 31) << 6 | bytes[pos++] & 63;
+ else if (t > 239 && t < 365) {
+ t = ((t & 7) << 18 | (bytes[pos++] & 63) << 12 | (bytes[pos++] & 63) << 6 | bytes[pos++] & 63) - 0x10000;
+ chunk[i++] = 0xD800 + (t >> 10);
+ chunk[i++] = 0xDC00 + (t & 1023);
+ }
+ else
+ chunk[i++] = (t & 15) << 12 | (bytes[pos++] & 63) << 6 | bytes[pos++] & 63;
+ if (i > 8191) {
+ parts.push(fromCharCodes(chunk));
+ i = 0;
+ }
+ }
+ if (parts.length) {
+ if (i)
+ parts.push(fromCharCodes(chunk.slice(0, i)));
+ return parts.join("");
+ }
+ return fromCharCodes(chunk.slice(0, i));
+}
+exports.utf8read = utf8read;
-/*
- * Copyright (c) Microsoft Corporation.
- * Licensed under the MIT License.
+
+/***/ }),
+
+/***/ 6537:
+/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
+
+"use strict";
+
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.ReflectionBinaryReader = void 0;
+const binary_format_contract_1 = __nccwpck_require__(98218);
+const reflection_info_1 = __nccwpck_require__(37048);
+const reflection_long_convert_1 = __nccwpck_require__(5232);
+const reflection_scalar_default_1 = __nccwpck_require__(29348);
+/**
+ * Reads proto3 messages in binary format using reflection information.
*
- * Code generated by Microsoft (R) AutoRest Code Generator.
- * Changes may cause incorrect behavior and will be lost if the code is regenerated.
+ * https://developers.google.com/protocol-buffers/docs/encoding
*/
-/** Class containing Blob operations. */
-class BlobImpl {
- /**
- * Initialize a new instance of the class Blob class.
- * @param client Reference to the service client
- */
- constructor(client) {
- this.client = client;
+class ReflectionBinaryReader {
+ constructor(info) {
+ this.info = info;
}
- /**
- * The Download operation reads or downloads a blob from the system, including its metadata and
- * properties. You can also call Download to read a snapshot.
- * @param options The options parameters.
- */
- download(options) {
- return this.client.sendOperationRequest({ options }, downloadOperationSpec);
+ prepare() {
+ var _a;
+ if (!this.fieldNoToField) {
+ const fieldsInput = (_a = this.info.fields) !== null && _a !== void 0 ? _a : [];
+ this.fieldNoToField = new Map(fieldsInput.map(field => [field.no, field]));
+ }
}
/**
- * The Get Properties operation returns all user-defined metadata, standard HTTP properties, and system
- * properties for the blob. It does not return the content of the blob.
- * @param options The options parameters.
+ * Reads a message from binary format into the target message.
+ *
+ * Repeated fields are appended. Map entries are added, overwriting
+ * existing keys.
+ *
+ * If a message field is already present, it will be merged with the
+ * new data.
*/
- getProperties(options) {
- return this.client.sendOperationRequest({ options }, getPropertiesOperationSpec);
+ read(reader, message, options, length) {
+ this.prepare();
+ const end = length === undefined ? reader.len : reader.pos + length;
+ while (reader.pos < end) {
+ // read the tag and find the field
+ const [fieldNo, wireType] = reader.tag(), field = this.fieldNoToField.get(fieldNo);
+ if (!field) {
+ let u = options.readUnknownField;
+ if (u == "throw")
+ throw new Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.info.typeName}`);
+ let d = reader.skip(wireType);
+ if (u !== false)
+ (u === true ? binary_format_contract_1.UnknownFieldHandler.onRead : u)(this.info.typeName, message, fieldNo, wireType, d);
+ continue;
+ }
+ // target object for the field we are reading
+ let target = message, repeated = field.repeat, localName = field.localName;
+ // if field is member of oneof ADT, use ADT as target
+ if (field.oneof) {
+ target = target[field.oneof];
+ // if other oneof member selected, set new ADT
+ if (target.oneofKind !== localName)
+ target = message[field.oneof] = {
+ oneofKind: localName
+ };
+ }
+ // we have handled oneof above, we just have read the value into `target[localName]`
+ switch (field.kind) {
+ case "scalar":
+ case "enum":
+ let T = field.kind == "enum" ? reflection_info_1.ScalarType.INT32 : field.T;
+ let L = field.kind == "scalar" ? field.L : undefined;
+ if (repeated) {
+ let arr = target[localName]; // safe to assume presence of array, oneof cannot contain repeated values
+ if (wireType == binary_format_contract_1.WireType.LengthDelimited && T != reflection_info_1.ScalarType.STRING && T != reflection_info_1.ScalarType.BYTES) {
+ let e = reader.uint32() + reader.pos;
+ while (reader.pos < e)
+ arr.push(this.scalar(reader, T, L));
+ }
+ else
+ arr.push(this.scalar(reader, T, L));
+ }
+ else
+ target[localName] = this.scalar(reader, T, L);
+ break;
+ case "message":
+ if (repeated) {
+ let arr = target[localName]; // safe to assume presence of array, oneof cannot contain repeated values
+ let msg = field.T().internalBinaryRead(reader, reader.uint32(), options);
+ arr.push(msg);
+ }
+ else
+ target[localName] = field.T().internalBinaryRead(reader, reader.uint32(), options, target[localName]);
+ break;
+ case "map":
+ let [mapKey, mapVal] = this.mapEntry(field, reader, options);
+ // safe to assume presence of map object, oneof cannot contain repeated values
+ target[localName][mapKey] = mapVal;
+ break;
+ }
+ }
}
/**
- * If the storage account's soft delete feature is disabled then, when a blob is deleted, it is
- * permanently removed from the storage account. If the storage account's soft delete feature is
- * enabled, then, when a blob is deleted, it is marked for deletion and becomes inaccessible
- * immediately. However, the blob service retains the blob or snapshot for the number of days specified
- * by the DeleteRetentionPolicy section of [Storage service properties]
- * (Set-Blob-Service-Properties.md). After the specified number of days has passed, the blob's data is
- * permanently removed from the storage account. Note that you continue to be charged for the
- * soft-deleted blob's storage until it is permanently removed. Use the List Blobs API and specify the
- * "include=deleted" query parameter to discover which blobs and snapshots have been soft deleted. You
- * can then use the Undelete Blob API to restore a soft-deleted blob. All other operations on a
- * soft-deleted blob or snapshot causes the service to return an HTTP status code of 404
- * (ResourceNotFound).
- * @param options The options parameters.
+ * Read a map field, expecting key field = 1, value field = 2
*/
- delete(options) {
- return this.client.sendOperationRequest({ options }, deleteOperationSpec);
+ mapEntry(field, reader, options) {
+ let length = reader.uint32();
+ let end = reader.pos + length;
+ let key = undefined; // javascript only allows number or string for object properties
+ let val = undefined;
+ while (reader.pos < end) {
+ let [fieldNo, wireType] = reader.tag();
+ switch (fieldNo) {
+ case 1:
+ if (field.K == reflection_info_1.ScalarType.BOOL)
+ key = reader.bool().toString();
+ else
+ // long types are read as string, number types are okay as number
+ key = this.scalar(reader, field.K, reflection_info_1.LongType.STRING);
+ break;
+ case 2:
+ switch (field.V.kind) {
+ case "scalar":
+ val = this.scalar(reader, field.V.T, field.V.L);
+ break;
+ case "enum":
+ val = reader.int32();
+ break;
+ case "message":
+ val = field.V.T().internalBinaryRead(reader, reader.uint32(), options);
+ break;
+ }
+ break;
+ default:
+ throw new Error(`Unknown field ${fieldNo} (wire type ${wireType}) in map entry for ${this.info.typeName}#${field.name}`);
+ }
+ }
+ if (key === undefined) {
+ let keyRaw = reflection_scalar_default_1.reflectionScalarDefault(field.K);
+ key = field.K == reflection_info_1.ScalarType.BOOL ? keyRaw.toString() : keyRaw;
+ }
+ if (val === undefined)
+ switch (field.V.kind) {
+ case "scalar":
+ val = reflection_scalar_default_1.reflectionScalarDefault(field.V.T, field.V.L);
+ break;
+ case "enum":
+ val = 0;
+ break;
+ case "message":
+ val = field.V.T().create();
+ break;
+ }
+ return [key, val];
}
- /**
- * Undelete a blob that was previously soft deleted
- * @param options The options parameters.
- */
- undelete(options) {
- return this.client.sendOperationRequest({ options }, undeleteOperationSpec);
+ scalar(reader, type, longType) {
+ switch (type) {
+ case reflection_info_1.ScalarType.INT32:
+ return reader.int32();
+ case reflection_info_1.ScalarType.STRING:
+ return reader.string();
+ case reflection_info_1.ScalarType.BOOL:
+ return reader.bool();
+ case reflection_info_1.ScalarType.DOUBLE:
+ return reader.double();
+ case reflection_info_1.ScalarType.FLOAT:
+ return reader.float();
+ case reflection_info_1.ScalarType.INT64:
+ return reflection_long_convert_1.reflectionLongConvert(reader.int64(), longType);
+ case reflection_info_1.ScalarType.UINT64:
+ return reflection_long_convert_1.reflectionLongConvert(reader.uint64(), longType);
+ case reflection_info_1.ScalarType.FIXED64:
+ return reflection_long_convert_1.reflectionLongConvert(reader.fixed64(), longType);
+ case reflection_info_1.ScalarType.FIXED32:
+ return reader.fixed32();
+ case reflection_info_1.ScalarType.BYTES:
+ return reader.bytes();
+ case reflection_info_1.ScalarType.UINT32:
+ return reader.uint32();
+ case reflection_info_1.ScalarType.SFIXED32:
+ return reader.sfixed32();
+ case reflection_info_1.ScalarType.SFIXED64:
+ return reflection_long_convert_1.reflectionLongConvert(reader.sfixed64(), longType);
+ case reflection_info_1.ScalarType.SINT32:
+ return reader.sint32();
+ case reflection_info_1.ScalarType.SINT64:
+ return reflection_long_convert_1.reflectionLongConvert(reader.sint64(), longType);
+ }
}
- /**
- * Sets the time a blob will expire and be deleted.
- * @param expiryOptions Required. Indicates mode of the expiry time
- * @param options The options parameters.
- */
- setExpiry(expiryOptions, options) {
- return this.client.sendOperationRequest({ expiryOptions, options }, setExpiryOperationSpec);
+}
+exports.ReflectionBinaryReader = ReflectionBinaryReader;
+
+
+/***/ }),
+
+/***/ 27685:
+/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
+
+"use strict";
+
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.ReflectionBinaryWriter = void 0;
+const binary_format_contract_1 = __nccwpck_require__(98218);
+const reflection_info_1 = __nccwpck_require__(37048);
+const assert_1 = __nccwpck_require__(64828);
+const pb_long_1 = __nccwpck_require__(38819);
+/**
+ * Writes proto3 messages in binary format using reflection information.
+ *
+ * https://developers.google.com/protocol-buffers/docs/encoding
+ */
+class ReflectionBinaryWriter {
+ constructor(info) {
+ this.info = info;
+ }
+ prepare() {
+ if (!this.fields) {
+ const fieldsInput = this.info.fields ? this.info.fields.concat() : [];
+ this.fields = fieldsInput.sort((a, b) => a.no - b.no);
+ }
}
/**
- * The Set HTTP Headers operation sets system properties on the blob
- * @param options The options parameters.
+ * Writes the message to binary format.
*/
- setHttpHeaders(options) {
- return this.client.sendOperationRequest({ options }, setHttpHeadersOperationSpec);
+ write(message, writer, options) {
+ this.prepare();
+ for (const field of this.fields) {
+ let value, // this will be our field value, whether it is member of a oneof or not
+ emitDefault, // whether we emit the default value (only true for oneof members)
+ repeated = field.repeat, localName = field.localName;
+ // handle oneof ADT
+ if (field.oneof) {
+ const group = message[field.oneof];
+ if (group.oneofKind !== localName)
+ continue; // if field is not selected, skip
+ value = group[localName];
+ emitDefault = true;
+ }
+ else {
+ value = message[localName];
+ emitDefault = false;
+ }
+ // we have handled oneof above. we just have to honor `emitDefault`.
+ switch (field.kind) {
+ case "scalar":
+ case "enum":
+ let T = field.kind == "enum" ? reflection_info_1.ScalarType.INT32 : field.T;
+ if (repeated) {
+ assert_1.assert(Array.isArray(value));
+ if (repeated == reflection_info_1.RepeatType.PACKED)
+ this.packed(writer, T, field.no, value);
+ else
+ for (const item of value)
+ this.scalar(writer, T, field.no, item, true);
+ }
+ else if (value === undefined)
+ assert_1.assert(field.opt);
+ else
+ this.scalar(writer, T, field.no, value, emitDefault || field.opt);
+ break;
+ case "message":
+ if (repeated) {
+ assert_1.assert(Array.isArray(value));
+ for (const item of value)
+ this.message(writer, options, field.T(), field.no, item);
+ }
+ else {
+ this.message(writer, options, field.T(), field.no, value);
+ }
+ break;
+ case "map":
+ assert_1.assert(typeof value == 'object' && value !== null);
+ for (const [key, val] of Object.entries(value))
+ this.mapEntry(writer, options, field, key, val);
+ break;
+ }
+ }
+ let u = options.writeUnknownFields;
+ if (u !== false)
+ (u === true ? binary_format_contract_1.UnknownFieldHandler.onWrite : u)(this.info.typeName, message, writer);
+ }
+ mapEntry(writer, options, field, key, value) {
+ writer.tag(field.no, binary_format_contract_1.WireType.LengthDelimited);
+ writer.fork();
+ // javascript only allows number or string for object properties
+ // we convert from our representation to the protobuf type
+ let keyValue = key;
+ switch (field.K) {
+ case reflection_info_1.ScalarType.INT32:
+ case reflection_info_1.ScalarType.FIXED32:
+ case reflection_info_1.ScalarType.UINT32:
+ case reflection_info_1.ScalarType.SFIXED32:
+ case reflection_info_1.ScalarType.SINT32:
+ keyValue = Number.parseInt(key);
+ break;
+ case reflection_info_1.ScalarType.BOOL:
+ assert_1.assert(key == 'true' || key == 'false');
+ keyValue = key == 'true';
+ break;
+ }
+ // write key, expecting key field number = 1
+ this.scalar(writer, field.K, 1, keyValue, true);
+ // write value, expecting value field number = 2
+ switch (field.V.kind) {
+ case 'scalar':
+ this.scalar(writer, field.V.T, 2, value, true);
+ break;
+ case 'enum':
+ this.scalar(writer, reflection_info_1.ScalarType.INT32, 2, value, true);
+ break;
+ case 'message':
+ this.message(writer, options, field.V.T(), 2, value);
+ break;
+ }
+ writer.join();
+ }
+ message(writer, options, handler, fieldNo, value) {
+ if (value === undefined)
+ return;
+ handler.internalBinaryWrite(value, writer.tag(fieldNo, binary_format_contract_1.WireType.LengthDelimited).fork(), options);
+ writer.join();
}
/**
- * The Set Immutability Policy operation sets the immutability policy on the blob
- * @param options The options parameters.
+ * Write a single scalar value.
*/
- setImmutabilityPolicy(options) {
- return this.client.sendOperationRequest({ options }, setImmutabilityPolicyOperationSpec);
+ scalar(writer, type, fieldNo, value, emitDefault) {
+ let [wireType, method, isDefault] = this.scalarInfo(type, value);
+ if (!isDefault || emitDefault) {
+ writer.tag(fieldNo, wireType);
+ writer[method](value);
+ }
}
/**
- * The Delete Immutability Policy operation deletes the immutability policy on the blob
- * @param options The options parameters.
+ * Write an array of scalar values in packed format.
*/
- deleteImmutabilityPolicy(options) {
- return this.client.sendOperationRequest({ options }, deleteImmutabilityPolicyOperationSpec);
+ packed(writer, type, fieldNo, value) {
+ if (!value.length)
+ return;
+ assert_1.assert(type !== reflection_info_1.ScalarType.BYTES && type !== reflection_info_1.ScalarType.STRING);
+ // write tag
+ writer.tag(fieldNo, binary_format_contract_1.WireType.LengthDelimited);
+ // begin length-delimited
+ writer.fork();
+ // write values without tags
+ let [, method,] = this.scalarInfo(type);
+ for (let i = 0; i < value.length; i++)
+ writer[method](value[i]);
+ // end length delimited
+ writer.join();
}
/**
- * The Set Legal Hold operation sets a legal hold on the blob.
- * @param legalHold Specified if a legal hold should be set on the blob.
- * @param options The options parameters.
+ * Get information for writing a scalar value.
+ *
+ * Returns tuple:
+ * [0]: appropriate WireType
+ * [1]: name of the appropriate method of IBinaryWriter
+ * [2]: whether the given value is a default value
+ *
+ * If argument `value` is omitted, [2] is always false.
*/
- setLegalHold(legalHold, options) {
- return this.client.sendOperationRequest({ legalHold, options }, setLegalHoldOperationSpec);
+ scalarInfo(type, value) {
+ let t = binary_format_contract_1.WireType.Varint;
+ let m;
+ let i = value === undefined;
+ let d = value === 0;
+ switch (type) {
+ case reflection_info_1.ScalarType.INT32:
+ m = "int32";
+ break;
+ case reflection_info_1.ScalarType.STRING:
+ d = i || !value.length;
+ t = binary_format_contract_1.WireType.LengthDelimited;
+ m = "string";
+ break;
+ case reflection_info_1.ScalarType.BOOL:
+ d = value === false;
+ m = "bool";
+ break;
+ case reflection_info_1.ScalarType.UINT32:
+ m = "uint32";
+ break;
+ case reflection_info_1.ScalarType.DOUBLE:
+ t = binary_format_contract_1.WireType.Bit64;
+ m = "double";
+ break;
+ case reflection_info_1.ScalarType.FLOAT:
+ t = binary_format_contract_1.WireType.Bit32;
+ m = "float";
+ break;
+ case reflection_info_1.ScalarType.INT64:
+ d = i || pb_long_1.PbLong.from(value).isZero();
+ m = "int64";
+ break;
+ case reflection_info_1.ScalarType.UINT64:
+ d = i || pb_long_1.PbULong.from(value).isZero();
+ m = "uint64";
+ break;
+ case reflection_info_1.ScalarType.FIXED64:
+ d = i || pb_long_1.PbULong.from(value).isZero();
+ t = binary_format_contract_1.WireType.Bit64;
+ m = "fixed64";
+ break;
+ case reflection_info_1.ScalarType.BYTES:
+ d = i || !value.byteLength;
+ t = binary_format_contract_1.WireType.LengthDelimited;
+ m = "bytes";
+ break;
+ case reflection_info_1.ScalarType.FIXED32:
+ t = binary_format_contract_1.WireType.Bit32;
+ m = "fixed32";
+ break;
+ case reflection_info_1.ScalarType.SFIXED32:
+ t = binary_format_contract_1.WireType.Bit32;
+ m = "sfixed32";
+ break;
+ case reflection_info_1.ScalarType.SFIXED64:
+ d = i || pb_long_1.PbLong.from(value).isZero();
+ t = binary_format_contract_1.WireType.Bit64;
+ m = "sfixed64";
+ break;
+ case reflection_info_1.ScalarType.SINT32:
+ m = "sint32";
+ break;
+ case reflection_info_1.ScalarType.SINT64:
+ d = i || pb_long_1.PbLong.from(value).isZero();
+ m = "sint64";
+ break;
+ }
+ return [t, m, i || d];
}
+}
+exports.ReflectionBinaryWriter = ReflectionBinaryWriter;
+
+
+/***/ }),
+
+/***/ 82092:
+/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
+
+"use strict";
+
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.containsMessageType = void 0;
+const message_type_contract_1 = __nccwpck_require__(69251);
+/**
+ * Check if the provided object is a proto message.
+ *
+ * Note that this is an experimental feature - it is here to stay, but
+ * implementation details may change without notice.
+ */
+function containsMessageType(msg) {
+ return msg[message_type_contract_1.MESSAGE_TYPE] != null;
+}
+exports.containsMessageType = containsMessageType;
+
+
+/***/ }),
+
+/***/ 8892:
+/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
+
+"use strict";
+
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.reflectionCreate = void 0;
+const reflection_scalar_default_1 = __nccwpck_require__(29348);
+const message_type_contract_1 = __nccwpck_require__(69251);
+/**
+ * Creates an instance of the generic message, using the field
+ * information.
+ */
+function reflectionCreate(type) {
/**
- * The Set Blob Metadata operation sets user-defined metadata for the specified blob as one or more
- * name-value pairs
- * @param options The options parameters.
+ * This ternary can be removed in the next major version.
+ * The `Object.create()` code path utilizes a new `messagePrototype`
+ * property on the `IMessageType` which has this same `MESSAGE_TYPE`
+ * non-enumerable property on it. Doing it this way means that we only
+ * pay the cost of `Object.defineProperty()` once per `IMessageType`
+ * class of once per "instance". The falsy code path is only provided
+ * for backwards compatibility in cases where the runtime library is
+ * updated without also updating the generated code.
*/
- setMetadata(options) {
- return this.client.sendOperationRequest({ options }, setMetadataOperationSpec);
+ const msg = type.messagePrototype
+ ? Object.create(type.messagePrototype)
+ : Object.defineProperty({}, message_type_contract_1.MESSAGE_TYPE, { value: type });
+ for (let field of type.fields) {
+ let name = field.localName;
+ if (field.opt)
+ continue;
+ if (field.oneof)
+ msg[field.oneof] = { oneofKind: undefined };
+ else if (field.repeat)
+ msg[name] = [];
+ else
+ switch (field.kind) {
+ case "scalar":
+ msg[name] = reflection_scalar_default_1.reflectionScalarDefault(field.T, field.L);
+ break;
+ case "enum":
+ // we require 0 to be default value for all enums
+ msg[name] = 0;
+ break;
+ case "map":
+ msg[name] = {};
+ break;
+ }
}
- /**
- * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete
- * operations
- * @param options The options parameters.
- */
- acquireLease(options) {
- return this.client.sendOperationRequest({ options }, acquireLeaseOperationSpec);
+ return msg;
+}
+exports.reflectionCreate = reflectionCreate;
+
+
+/***/ }),
+
+/***/ 8797:
+/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
+
+"use strict";
+
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.reflectionEquals = void 0;
+const reflection_info_1 = __nccwpck_require__(37048);
+/**
+ * Determines whether two message of the same type have the same field values.
+ * Checks for deep equality, traversing repeated fields, oneof groups, maps
+ * and messages recursively.
+ * Will also return true if both messages are `undefined`.
+ */
+function reflectionEquals(info, a, b) {
+ if (a === b)
+ return true;
+ if (!a || !b)
+ return false;
+ for (let field of info.fields) {
+ let localName = field.localName;
+ let val_a = field.oneof ? a[field.oneof][localName] : a[localName];
+ let val_b = field.oneof ? b[field.oneof][localName] : b[localName];
+ switch (field.kind) {
+ case "enum":
+ case "scalar":
+ let t = field.kind == "enum" ? reflection_info_1.ScalarType.INT32 : field.T;
+ if (!(field.repeat
+ ? repeatedPrimitiveEq(t, val_a, val_b)
+ : primitiveEq(t, val_a, val_b)))
+ return false;
+ break;
+ case "map":
+ if (!(field.V.kind == "message"
+ ? repeatedMsgEq(field.V.T(), objectValues(val_a), objectValues(val_b))
+ : repeatedPrimitiveEq(field.V.kind == "enum" ? reflection_info_1.ScalarType.INT32 : field.V.T, objectValues(val_a), objectValues(val_b))))
+ return false;
+ break;
+ case "message":
+ let T = field.T();
+ if (!(field.repeat
+ ? repeatedMsgEq(T, val_a, val_b)
+ : T.equals(val_a, val_b)))
+ return false;
+ break;
+ }
}
+ return true;
+}
+exports.reflectionEquals = reflectionEquals;
+const objectValues = Object.values;
+function primitiveEq(type, a, b) {
+ if (a === b)
+ return true;
+ if (type !== reflection_info_1.ScalarType.BYTES)
+ return false;
+ let ba = a;
+ let bb = b;
+ if (ba.length !== bb.length)
+ return false;
+ for (let i = 0; i < ba.length; i++)
+ if (ba[i] != bb[i])
+ return false;
+ return true;
+}
+function repeatedPrimitiveEq(type, a, b) {
+ if (a.length !== b.length)
+ return false;
+ for (let i = 0; i < a.length; i++)
+ if (!primitiveEq(type, a[i], b[i]))
+ return false;
+ return true;
+}
+function repeatedMsgEq(type, a, b) {
+ if (a.length !== b.length)
+ return false;
+ for (let i = 0; i < a.length; i++)
+ if (!type.equals(a[i], b[i]))
+ return false;
+ return true;
+}
+
+
+/***/ }),
+
+/***/ 37048:
+/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
+
+"use strict";
+
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.readMessageOption = exports.readFieldOption = exports.readFieldOptions = exports.normalizeFieldInfo = exports.RepeatType = exports.LongType = exports.ScalarType = void 0;
+const lower_camel_case_1 = __nccwpck_require__(10023);
+/**
+ * Scalar value types. This is a subset of field types declared by protobuf
+ * enum google.protobuf.FieldDescriptorProto.Type The types GROUP and MESSAGE
+ * are omitted, but the numerical values are identical.
+ */
+var ScalarType;
+(function (ScalarType) {
+ // 0 is reserved for errors.
+ // Order is weird for historical reasons.
+ ScalarType[ScalarType["DOUBLE"] = 1] = "DOUBLE";
+ ScalarType[ScalarType["FLOAT"] = 2] = "FLOAT";
+ // Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if
+ // negative values are likely.
+ ScalarType[ScalarType["INT64"] = 3] = "INT64";
+ ScalarType[ScalarType["UINT64"] = 4] = "UINT64";
+ // Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if
+ // negative values are likely.
+ ScalarType[ScalarType["INT32"] = 5] = "INT32";
+ ScalarType[ScalarType["FIXED64"] = 6] = "FIXED64";
+ ScalarType[ScalarType["FIXED32"] = 7] = "FIXED32";
+ ScalarType[ScalarType["BOOL"] = 8] = "BOOL";
+ ScalarType[ScalarType["STRING"] = 9] = "STRING";
+ // Tag-delimited aggregate.
+ // Group type is deprecated and not supported in proto3. However, Proto3
+ // implementations should still be able to parse the group wire format and
+ // treat group fields as unknown fields.
+ // TYPE_GROUP = 10,
+ // TYPE_MESSAGE = 11, // Length-delimited aggregate.
+ // New in version 2.
+ ScalarType[ScalarType["BYTES"] = 12] = "BYTES";
+ ScalarType[ScalarType["UINT32"] = 13] = "UINT32";
+ // TYPE_ENUM = 14,
+ ScalarType[ScalarType["SFIXED32"] = 15] = "SFIXED32";
+ ScalarType[ScalarType["SFIXED64"] = 16] = "SFIXED64";
+ ScalarType[ScalarType["SINT32"] = 17] = "SINT32";
+ ScalarType[ScalarType["SINT64"] = 18] = "SINT64";
+})(ScalarType = exports.ScalarType || (exports.ScalarType = {}));
+/**
+ * JavaScript representation of 64 bit integral types. Equivalent to the
+ * field option "jstype".
+ *
+ * By default, protobuf-ts represents 64 bit types as `bigint`.
+ *
+ * You can change the default behaviour by enabling the plugin parameter
+ * `long_type_string`, which will represent 64 bit types as `string`.
+ *
+ * Alternatively, you can change the behaviour for individual fields
+ * with the field option "jstype":
+ *
+ * ```protobuf
+ * uint64 my_field = 1 [jstype = JS_STRING];
+ * uint64 other_field = 2 [jstype = JS_NUMBER];
+ * ```
+ */
+var LongType;
+(function (LongType) {
/**
- * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete
- * operations
- * @param leaseId Specifies the current lease ID on the resource.
- * @param options The options parameters.
+ * Use JavaScript `bigint`.
+ *
+ * Field option `[jstype = JS_NORMAL]`.
*/
- releaseLease(leaseId, options) {
- return this.client.sendOperationRequest({ leaseId, options }, releaseLeaseOperationSpec);
- }
+ LongType[LongType["BIGINT"] = 0] = "BIGINT";
/**
- * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete
- * operations
- * @param leaseId Specifies the current lease ID on the resource.
- * @param options The options parameters.
+ * Use JavaScript `string`.
+ *
+ * Field option `[jstype = JS_STRING]`.
*/
- renewLease(leaseId, options) {
- return this.client.sendOperationRequest({ leaseId, options }, renewLeaseOperationSpec);
- }
+ LongType[LongType["STRING"] = 1] = "STRING";
/**
- * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete
- * operations
- * @param leaseId Specifies the current lease ID on the resource.
- * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400
- * (Invalid request) if the proposed lease ID is not in the correct format. See Guid Constructor
- * (String) for a list of valid GUID string formats.
- * @param options The options parameters.
+ * Use JavaScript `number`.
+ *
+ * Large values will loose precision.
+ *
+ * Field option `[jstype = JS_NUMBER]`.
*/
- changeLease(leaseId, proposedLeaseId, options) {
- return this.client.sendOperationRequest({ leaseId, proposedLeaseId, options }, changeLeaseOperationSpec);
- }
+ LongType[LongType["NUMBER"] = 2] = "NUMBER";
+})(LongType = exports.LongType || (exports.LongType = {}));
+/**
+ * Protobuf 2.1.0 introduced packed repeated fields.
+ * Setting the field option `[packed = true]` enables packing.
+ *
+ * In proto3, all repeated fields are packed by default.
+ * Setting the field option `[packed = false]` disables packing.
+ *
+ * Packed repeated fields are encoded with a single tag,
+ * then a length-delimiter, then the element values.
+ *
+ * Unpacked repeated fields are encoded with a tag and
+ * value for each element.
+ *
+ * `bytes` and `string` cannot be packed.
+ */
+var RepeatType;
+(function (RepeatType) {
/**
- * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete
- * operations
- * @param options The options parameters.
+ * The field is not repeated.
*/
- breakLease(options) {
- return this.client.sendOperationRequest({ options }, breakLeaseOperationSpec);
- }
+ RepeatType[RepeatType["NO"] = 0] = "NO";
/**
- * The Create Snapshot operation creates a read-only snapshot of a blob
- * @param options The options parameters.
+ * The field is repeated and should be packed.
+ * Invalid for `bytes` and `string`, they cannot be packed.
*/
- createSnapshot(options) {
- return this.client.sendOperationRequest({ options }, createSnapshotOperationSpec);
- }
+ RepeatType[RepeatType["PACKED"] = 1] = "PACKED";
/**
- * The Start Copy From URL operation copies a blob or an internet resource to a new blob.
- * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to
- * 2 KB in length that specifies a page blob snapshot. The value should be URL-encoded as it would
- * appear in a request URI. The source blob must either be public or must be authenticated via a shared
- * access signature.
- * @param options The options parameters.
+ * The field is repeated but should not be packed.
+ * The only valid repeat type for repeated `bytes` and `string`.
*/
- startCopyFromURL(copySource, options) {
- return this.client.sendOperationRequest({ copySource, options }, startCopyFromURLOperationSpec);
+ RepeatType[RepeatType["UNPACKED"] = 2] = "UNPACKED";
+})(RepeatType = exports.RepeatType || (exports.RepeatType = {}));
+/**
+ * Turns PartialFieldInfo into FieldInfo.
+ */
+function normalizeFieldInfo(field) {
+ var _a, _b, _c, _d;
+ field.localName = (_a = field.localName) !== null && _a !== void 0 ? _a : lower_camel_case_1.lowerCamelCase(field.name);
+ field.jsonName = (_b = field.jsonName) !== null && _b !== void 0 ? _b : lower_camel_case_1.lowerCamelCase(field.name);
+ field.repeat = (_c = field.repeat) !== null && _c !== void 0 ? _c : RepeatType.NO;
+ field.opt = (_d = field.opt) !== null && _d !== void 0 ? _d : (field.repeat ? false : field.oneof ? false : field.kind == "message");
+ return field;
+}
+exports.normalizeFieldInfo = normalizeFieldInfo;
+/**
+ * Read custom field options from a generated message type.
+ *
+ * @deprecated use readFieldOption()
+ */
+function readFieldOptions(messageType, fieldName, extensionName, extensionType) {
+ var _a;
+ const options = (_a = messageType.fields.find((m, i) => m.localName == fieldName || i == fieldName)) === null || _a === void 0 ? void 0 : _a.options;
+ return options && options[extensionName] ? extensionType.fromJson(options[extensionName]) : undefined;
+}
+exports.readFieldOptions = readFieldOptions;
+function readFieldOption(messageType, fieldName, extensionName, extensionType) {
+ var _a;
+ const options = (_a = messageType.fields.find((m, i) => m.localName == fieldName || i == fieldName)) === null || _a === void 0 ? void 0 : _a.options;
+ if (!options) {
+ return undefined;
}
- /**
- * The Copy From URL operation copies a blob or an internet resource to a new blob. It will not return
- * a response until the copy is complete.
- * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to
- * 2 KB in length that specifies a page blob snapshot. The value should be URL-encoded as it would
- * appear in a request URI. The source blob must either be public or must be authenticated via a shared
- * access signature.
- * @param options The options parameters.
- */
- copyFromURL(copySource, options) {
- return this.client.sendOperationRequest({ copySource, options }, copyFromURLOperationSpec);
+ const optionVal = options[extensionName];
+ if (optionVal === undefined) {
+ return optionVal;
}
- /**
- * The Abort Copy From URL operation aborts a pending Copy From URL operation, and leaves a destination
- * blob with zero length and full metadata.
- * @param copyId The copy identifier provided in the x-ms-copy-id header of the original Copy Blob
- * operation.
- * @param options The options parameters.
- */
- abortCopyFromURL(copyId, options) {
- return this.client.sendOperationRequest({ copyId, options }, abortCopyFromURLOperationSpec);
+ return extensionType ? extensionType.fromJson(optionVal) : optionVal;
+}
+exports.readFieldOption = readFieldOption;
+function readMessageOption(messageType, extensionName, extensionType) {
+ const options = messageType.options;
+ const optionVal = options[extensionName];
+ if (optionVal === undefined) {
+ return optionVal;
}
- /**
- * The Set Tier operation sets the tier on a blob. The operation is allowed on a page blob in a premium
- * storage account and on a block blob in a blob storage account (locally redundant storage only). A
- * premium page blob's tier determines the allowed size, IOPS, and bandwidth of the blob. A block
- * blob's tier determines Hot/Cool/Archive storage type. This operation does not update the blob's
- * ETag.
- * @param tier Indicates the tier to be set on the blob.
- * @param options The options parameters.
- */
- setTier(tier, options) {
- return this.client.sendOperationRequest({ tier, options }, setTierOperationSpec);
+ return extensionType ? extensionType.fromJson(optionVal) : optionVal;
+}
+exports.readMessageOption = readMessageOption;
+
+
+/***/ }),
+
+/***/ 98944:
+/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
+
+"use strict";
+
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.ReflectionJsonReader = void 0;
+const json_typings_1 = __nccwpck_require__(13417);
+const base64_1 = __nccwpck_require__(20841);
+const reflection_info_1 = __nccwpck_require__(37048);
+const pb_long_1 = __nccwpck_require__(38819);
+const assert_1 = __nccwpck_require__(64828);
+const reflection_long_convert_1 = __nccwpck_require__(5232);
+/**
+ * Reads proto3 messages in canonical JSON format using reflection information.
+ *
+ * https://developers.google.com/protocol-buffers/docs/proto3#json
+ */
+class ReflectionJsonReader {
+ constructor(info) {
+ this.info = info;
}
- /**
- * Returns the sku name and account kind
- * @param options The options parameters.
- */
- getAccountInfo(options) {
- return this.client.sendOperationRequest({ options }, getAccountInfoOperationSpec);
+ prepare() {
+ var _a;
+ if (this.fMap === undefined) {
+ this.fMap = {};
+ const fieldsInput = (_a = this.info.fields) !== null && _a !== void 0 ? _a : [];
+ for (const field of fieldsInput) {
+ this.fMap[field.name] = field;
+ this.fMap[field.jsonName] = field;
+ this.fMap[field.localName] = field;
+ }
+ }
}
- /**
- * The Query operation enables users to select/project on blob data by providing simple query
- * expressions.
- * @param options The options parameters.
- */
- query(options) {
- return this.client.sendOperationRequest({ options }, queryOperationSpec);
+ // Cannot parse JSON for #.
+ assert(condition, fieldName, jsonValue) {
+ if (!condition) {
+ let what = json_typings_1.typeofJsonValue(jsonValue);
+ if (what == "number" || what == "boolean")
+ what = jsonValue.toString();
+ throw new Error(`Cannot parse JSON ${what} for ${this.info.typeName}#${fieldName}`);
+ }
}
/**
- * The Get Tags operation enables users to get the tags associated with a blob.
- * @param options The options parameters.
+ * Reads a message from canonical JSON format into the target message.
+ *
+ * Repeated fields are appended. Map entries are added, overwriting
+ * existing keys.
+ *
+ * If a message field is already present, it will be merged with the
+ * new data.
*/
- getTags(options) {
- return this.client.sendOperationRequest({ options }, getTagsOperationSpec);
+ read(input, message, options) {
+ this.prepare();
+ const oneofsHandled = [];
+ for (const [jsonKey, jsonValue] of Object.entries(input)) {
+ const field = this.fMap[jsonKey];
+ if (!field) {
+ if (!options.ignoreUnknownFields)
+ throw new Error(`Found unknown field while reading ${this.info.typeName} from JSON format. JSON key: ${jsonKey}`);
+ continue;
+ }
+ const localName = field.localName;
+ // handle oneof ADT
+ let target; // this will be the target for the field value, whether it is member of a oneof or not
+ if (field.oneof) {
+ if (jsonValue === null && (field.kind !== 'enum' || field.T()[0] !== 'google.protobuf.NullValue')) {
+ continue;
+ }
+ // since json objects are unordered by specification, it is not possible to take the last of multiple oneofs
+ if (oneofsHandled.includes(field.oneof))
+ throw new Error(`Multiple members of the oneof group "${field.oneof}" of ${this.info.typeName} are present in JSON.`);
+ oneofsHandled.push(field.oneof);
+ target = message[field.oneof] = {
+ oneofKind: localName
+ };
+ }
+ else {
+ target = message;
+ }
+ // we have handled oneof above. we just have read the value into `target`.
+ if (field.kind == 'map') {
+ if (jsonValue === null) {
+ continue;
+ }
+ // check input
+ this.assert(json_typings_1.isJsonObject(jsonValue), field.name, jsonValue);
+ // our target to put map entries into
+ const fieldObj = target[localName];
+ // read entries
+ for (const [jsonObjKey, jsonObjValue] of Object.entries(jsonValue)) {
+ this.assert(jsonObjValue !== null, field.name + " map value", null);
+ // read value
+ let val;
+ switch (field.V.kind) {
+ case "message":
+ val = field.V.T().internalJsonRead(jsonObjValue, options);
+ break;
+ case "enum":
+ val = this.enum(field.V.T(), jsonObjValue, field.name, options.ignoreUnknownFields);
+ if (val === false)
+ continue;
+ break;
+ case "scalar":
+ val = this.scalar(jsonObjValue, field.V.T, field.V.L, field.name);
+ break;
+ }
+ this.assert(val !== undefined, field.name + " map value", jsonObjValue);
+ // read key
+ let key = jsonObjKey;
+ if (field.K == reflection_info_1.ScalarType.BOOL)
+ key = key == "true" ? true : key == "false" ? false : key;
+ key = this.scalar(key, field.K, reflection_info_1.LongType.STRING, field.name).toString();
+ fieldObj[key] = val;
+ }
+ }
+ else if (field.repeat) {
+ if (jsonValue === null)
+ continue;
+ // check input
+ this.assert(Array.isArray(jsonValue), field.name, jsonValue);
+ // our target to put array entries into
+ const fieldArr = target[localName];
+ // read array entries
+ for (const jsonItem of jsonValue) {
+ this.assert(jsonItem !== null, field.name, null);
+ let val;
+ switch (field.kind) {
+ case "message":
+ val = field.T().internalJsonRead(jsonItem, options);
+ break;
+ case "enum":
+ val = this.enum(field.T(), jsonItem, field.name, options.ignoreUnknownFields);
+ if (val === false)
+ continue;
+ break;
+ case "scalar":
+ val = this.scalar(jsonItem, field.T, field.L, field.name);
+ break;
+ }
+ this.assert(val !== undefined, field.name, jsonValue);
+ fieldArr.push(val);
+ }
+ }
+ else {
+ switch (field.kind) {
+ case "message":
+ if (jsonValue === null && field.T().typeName != 'google.protobuf.Value') {
+ this.assert(field.oneof === undefined, field.name + " (oneof member)", null);
+ continue;
+ }
+ target[localName] = field.T().internalJsonRead(jsonValue, options, target[localName]);
+ break;
+ case "enum":
+ if (jsonValue === null)
+ continue;
+ let val = this.enum(field.T(), jsonValue, field.name, options.ignoreUnknownFields);
+ if (val === false)
+ continue;
+ target[localName] = val;
+ break;
+ case "scalar":
+ if (jsonValue === null)
+ continue;
+ target[localName] = this.scalar(jsonValue, field.T, field.L, field.name);
+ break;
+ }
+ }
+ }
}
/**
- * The Set Tags operation enables users to set tags on a blob.
- * @param options The options parameters.
+ * Returns `false` for unrecognized string representations.
+ *
+ * google.protobuf.NullValue accepts only JSON `null` (or the old `"NULL_VALUE"`).
*/
- setTags(options) {
- return this.client.sendOperationRequest({ options }, setTagsOperationSpec);
+ enum(type, json, fieldName, ignoreUnknownFields) {
+ if (type[0] == 'google.protobuf.NullValue')
+ assert_1.assert(json === null || json === "NULL_VALUE", `Unable to parse field ${this.info.typeName}#${fieldName}, enum ${type[0]} only accepts null.`);
+ if (json === null)
+ // we require 0 to be default value for all enums
+ return 0;
+ switch (typeof json) {
+ case "number":
+ assert_1.assert(Number.isInteger(json), `Unable to parse field ${this.info.typeName}#${fieldName}, enum can only be integral number, got ${json}.`);
+ return json;
+ case "string":
+ let localEnumName = json;
+ if (type[2] && json.substring(0, type[2].length) === type[2])
+ // lookup without the shared prefix
+ localEnumName = json.substring(type[2].length);
+ let enumNumber = type[1][localEnumName];
+ if (typeof enumNumber === 'undefined' && ignoreUnknownFields) {
+ return false;
+ }
+ assert_1.assert(typeof enumNumber == "number", `Unable to parse field ${this.info.typeName}#${fieldName}, enum ${type[0]} has no value for "${json}".`);
+ return enumNumber;
+ }
+ assert_1.assert(false, `Unable to parse field ${this.info.typeName}#${fieldName}, cannot parse enum value from ${typeof json}".`);
}
-}
-// Operation Specifications
-const xmlSerializer$3 = coreClient__namespace.createSerializer(Mappers, /* isXml */ true);
-const downloadOperationSpec = {
- path: "/{containerName}/{blob}",
- httpMethod: "GET",
- responses: {
- 200: {
- bodyMapper: {
- type: { name: "Stream" },
- serializedName: "parsedResponse",
- },
- headersMapper: BlobDownloadHeaders,
- },
- 206: {
- bodyMapper: {
- type: { name: "Stream" },
- serializedName: "parsedResponse",
- },
- headersMapper: BlobDownloadHeaders,
- },
- default: {
- bodyMapper: StorageError,
- headersMapper: BlobDownloadExceptionHeaders,
- },
- },
- queryParameters: [
- timeoutInSeconds,
- snapshot,
- versionId,
- ],
- urlParameters: [url],
- headerParameters: [
- version,
- requestId,
- accept1,
- leaseId,
- ifModifiedSince,
- ifUnmodifiedSince,
- range,
- rangeGetContentMD5,
- rangeGetContentCRC64,
- encryptionKey,
- encryptionKeySha256,
- encryptionAlgorithm,
- ifMatch,
- ifNoneMatch,
- ifTags,
- ],
- isXML: true,
- serializer: xmlSerializer$3,
-};
-const getPropertiesOperationSpec = {
- path: "/{containerName}/{blob}",
- httpMethod: "HEAD",
- responses: {
- 200: {
- headersMapper: BlobGetPropertiesHeaders,
- },
- default: {
- bodyMapper: StorageError,
- headersMapper: BlobGetPropertiesExceptionHeaders,
- },
- },
- queryParameters: [
- timeoutInSeconds,
- snapshot,
- versionId,
- ],
- urlParameters: [url],
- headerParameters: [
- version,
- requestId,
- accept1,
- leaseId,
- ifModifiedSince,
- ifUnmodifiedSince,
- encryptionKey,
- encryptionKeySha256,
- encryptionAlgorithm,
- ifMatch,
- ifNoneMatch,
- ifTags,
- ],
- isXML: true,
- serializer: xmlSerializer$3,
-};
-const deleteOperationSpec = {
- path: "/{containerName}/{blob}",
- httpMethod: "DELETE",
- responses: {
- 202: {
- headersMapper: BlobDeleteHeaders,
- },
- default: {
- bodyMapper: StorageError,
- headersMapper: BlobDeleteExceptionHeaders,
- },
- },
- queryParameters: [
- timeoutInSeconds,
- snapshot,
- versionId,
- blobDeleteType,
- ],
- urlParameters: [url],
- headerParameters: [
- version,
- requestId,
- accept1,
- leaseId,
- ifModifiedSince,
- ifUnmodifiedSince,
- ifMatch,
- ifNoneMatch,
- ifTags,
- deleteSnapshots,
- ],
- isXML: true,
- serializer: xmlSerializer$3,
-};
-const undeleteOperationSpec = {
- path: "/{containerName}/{blob}",
- httpMethod: "PUT",
- responses: {
- 200: {
- headersMapper: BlobUndeleteHeaders,
- },
- default: {
- bodyMapper: StorageError,
- headersMapper: BlobUndeleteExceptionHeaders,
- },
- },
- queryParameters: [timeoutInSeconds, comp8],
- urlParameters: [url],
- headerParameters: [
- version,
- requestId,
- accept1,
- ],
- isXML: true,
- serializer: xmlSerializer$3,
-};
-const setExpiryOperationSpec = {
- path: "/{containerName}/{blob}",
- httpMethod: "PUT",
- responses: {
- 200: {
- headersMapper: BlobSetExpiryHeaders,
- },
- default: {
- bodyMapper: StorageError,
- headersMapper: BlobSetExpiryExceptionHeaders,
- },
- },
- queryParameters: [timeoutInSeconds, comp11],
- urlParameters: [url],
- headerParameters: [
- version,
- requestId,
- accept1,
- expiryOptions,
- expiresOn,
- ],
- isXML: true,
- serializer: xmlSerializer$3,
-};
-const setHttpHeadersOperationSpec = {
- path: "/{containerName}/{blob}",
- httpMethod: "PUT",
- responses: {
- 200: {
- headersMapper: BlobSetHttpHeadersHeaders,
- },
- default: {
- bodyMapper: StorageError,
- headersMapper: BlobSetHttpHeadersExceptionHeaders,
- },
- },
- queryParameters: [comp, timeoutInSeconds],
- urlParameters: [url],
- headerParameters: [
- version,
- requestId,
- accept1,
- leaseId,
- ifModifiedSince,
- ifUnmodifiedSince,
- ifMatch,
- ifNoneMatch,
- ifTags,
- blobCacheControl,
- blobContentType,
- blobContentMD5,
- blobContentEncoding,
- blobContentLanguage,
- blobContentDisposition,
- ],
- isXML: true,
- serializer: xmlSerializer$3,
-};
-const setImmutabilityPolicyOperationSpec = {
- path: "/{containerName}/{blob}",
- httpMethod: "PUT",
- responses: {
- 200: {
- headersMapper: BlobSetImmutabilityPolicyHeaders,
- },
- default: {
- bodyMapper: StorageError,
- headersMapper: BlobSetImmutabilityPolicyExceptionHeaders,
- },
- },
- queryParameters: [timeoutInSeconds, comp12],
- urlParameters: [url],
- headerParameters: [
- version,
- requestId,
- accept1,
- ifUnmodifiedSince,
- immutabilityPolicyExpiry,
- immutabilityPolicyMode,
- ],
- isXML: true,
- serializer: xmlSerializer$3,
-};
-const deleteImmutabilityPolicyOperationSpec = {
- path: "/{containerName}/{blob}",
- httpMethod: "DELETE",
- responses: {
- 200: {
- headersMapper: BlobDeleteImmutabilityPolicyHeaders,
- },
- default: {
- bodyMapper: StorageError,
- headersMapper: BlobDeleteImmutabilityPolicyExceptionHeaders,
- },
- },
- queryParameters: [timeoutInSeconds, comp12],
- urlParameters: [url],
- headerParameters: [
- version,
- requestId,
- accept1,
- ],
- isXML: true,
- serializer: xmlSerializer$3,
-};
-const setLegalHoldOperationSpec = {
- path: "/{containerName}/{blob}",
- httpMethod: "PUT",
- responses: {
- 200: {
- headersMapper: BlobSetLegalHoldHeaders,
- },
- default: {
- bodyMapper: StorageError,
- headersMapper: BlobSetLegalHoldExceptionHeaders,
- },
- },
- queryParameters: [timeoutInSeconds, comp13],
- urlParameters: [url],
- headerParameters: [
- version,
- requestId,
- accept1,
- legalHold,
- ],
- isXML: true,
- serializer: xmlSerializer$3,
-};
-const setMetadataOperationSpec = {
- path: "/{containerName}/{blob}",
- httpMethod: "PUT",
- responses: {
- 200: {
- headersMapper: BlobSetMetadataHeaders,
- },
- default: {
- bodyMapper: StorageError,
- headersMapper: BlobSetMetadataExceptionHeaders,
- },
- },
- queryParameters: [timeoutInSeconds, comp6],
- urlParameters: [url],
- headerParameters: [
- version,
- requestId,
- accept1,
- metadata,
- leaseId,
- ifModifiedSince,
- ifUnmodifiedSince,
- encryptionKey,
- encryptionKeySha256,
- encryptionAlgorithm,
- ifMatch,
- ifNoneMatch,
- ifTags,
- encryptionScope,
- ],
- isXML: true,
- serializer: xmlSerializer$3,
-};
-const acquireLeaseOperationSpec = {
- path: "/{containerName}/{blob}",
- httpMethod: "PUT",
- responses: {
- 201: {
- headersMapper: BlobAcquireLeaseHeaders,
- },
- default: {
- bodyMapper: StorageError,
- headersMapper: BlobAcquireLeaseExceptionHeaders,
- },
- },
- queryParameters: [timeoutInSeconds, comp10],
- urlParameters: [url],
- headerParameters: [
- version,
- requestId,
- accept1,
- ifModifiedSince,
- ifUnmodifiedSince,
- action,
- duration,
- proposedLeaseId,
- ifMatch,
- ifNoneMatch,
- ifTags,
- ],
- isXML: true,
- serializer: xmlSerializer$3,
-};
-const releaseLeaseOperationSpec = {
- path: "/{containerName}/{blob}",
- httpMethod: "PUT",
- responses: {
- 200: {
- headersMapper: BlobReleaseLeaseHeaders,
- },
- default: {
- bodyMapper: StorageError,
- headersMapper: BlobReleaseLeaseExceptionHeaders,
- },
- },
- queryParameters: [timeoutInSeconds, comp10],
- urlParameters: [url],
- headerParameters: [
- version,
- requestId,
- accept1,
- ifModifiedSince,
- ifUnmodifiedSince,
- action1,
- leaseId1,
- ifMatch,
- ifNoneMatch,
- ifTags,
- ],
- isXML: true,
- serializer: xmlSerializer$3,
-};
-const renewLeaseOperationSpec = {
- path: "/{containerName}/{blob}",
- httpMethod: "PUT",
- responses: {
- 200: {
- headersMapper: BlobRenewLeaseHeaders,
- },
- default: {
- bodyMapper: StorageError,
- headersMapper: BlobRenewLeaseExceptionHeaders,
- },
- },
- queryParameters: [timeoutInSeconds, comp10],
- urlParameters: [url],
- headerParameters: [
- version,
- requestId,
- accept1,
- ifModifiedSince,
- ifUnmodifiedSince,
- leaseId1,
- action2,
- ifMatch,
- ifNoneMatch,
- ifTags,
- ],
- isXML: true,
- serializer: xmlSerializer$3,
-};
-const changeLeaseOperationSpec = {
- path: "/{containerName}/{blob}",
- httpMethod: "PUT",
- responses: {
- 200: {
- headersMapper: BlobChangeLeaseHeaders,
- },
- default: {
- bodyMapper: StorageError,
- headersMapper: BlobChangeLeaseExceptionHeaders,
- },
- },
- queryParameters: [timeoutInSeconds, comp10],
- urlParameters: [url],
- headerParameters: [
- version,
- requestId,
- accept1,
- ifModifiedSince,
- ifUnmodifiedSince,
- leaseId1,
- action4,
- proposedLeaseId1,
- ifMatch,
- ifNoneMatch,
- ifTags,
- ],
- isXML: true,
- serializer: xmlSerializer$3,
-};
-const breakLeaseOperationSpec = {
- path: "/{containerName}/{blob}",
- httpMethod: "PUT",
- responses: {
- 202: {
- headersMapper: BlobBreakLeaseHeaders,
- },
- default: {
- bodyMapper: StorageError,
- headersMapper: BlobBreakLeaseExceptionHeaders,
- },
- },
- queryParameters: [timeoutInSeconds, comp10],
- urlParameters: [url],
- headerParameters: [
- version,
- requestId,
- accept1,
- ifModifiedSince,
- ifUnmodifiedSince,
- action3,
- breakPeriod,
- ifMatch,
- ifNoneMatch,
- ifTags,
- ],
- isXML: true,
- serializer: xmlSerializer$3,
-};
-const createSnapshotOperationSpec = {
- path: "/{containerName}/{blob}",
- httpMethod: "PUT",
- responses: {
- 201: {
- headersMapper: BlobCreateSnapshotHeaders,
- },
- default: {
- bodyMapper: StorageError,
- headersMapper: BlobCreateSnapshotExceptionHeaders,
- },
- },
- queryParameters: [timeoutInSeconds, comp14],
- urlParameters: [url],
- headerParameters: [
- version,
- requestId,
- accept1,
- metadata,
- leaseId,
- ifModifiedSince,
- ifUnmodifiedSince,
- encryptionKey,
- encryptionKeySha256,
- encryptionAlgorithm,
- ifMatch,
- ifNoneMatch,
- ifTags,
- encryptionScope,
- ],
- isXML: true,
- serializer: xmlSerializer$3,
-};
-const startCopyFromURLOperationSpec = {
- path: "/{containerName}/{blob}",
- httpMethod: "PUT",
- responses: {
- 202: {
- headersMapper: BlobStartCopyFromURLHeaders,
- },
- default: {
- bodyMapper: StorageError,
- headersMapper: BlobStartCopyFromURLExceptionHeaders,
- },
- },
- queryParameters: [timeoutInSeconds],
- urlParameters: [url],
- headerParameters: [
- version,
- requestId,
- accept1,
- metadata,
- leaseId,
- ifModifiedSince,
- ifUnmodifiedSince,
- ifMatch,
- ifNoneMatch,
- ifTags,
- immutabilityPolicyExpiry,
- immutabilityPolicyMode,
- tier,
- rehydratePriority,
- sourceIfModifiedSince,
- sourceIfUnmodifiedSince,
- sourceIfMatch,
- sourceIfNoneMatch,
- sourceIfTags,
- copySource,
- blobTagsString,
- sealBlob,
- legalHold1,
- ],
- isXML: true,
- serializer: xmlSerializer$3,
-};
-const copyFromURLOperationSpec = {
- path: "/{containerName}/{blob}",
- httpMethod: "PUT",
- responses: {
- 202: {
- headersMapper: BlobCopyFromURLHeaders,
- },
- default: {
- bodyMapper: StorageError,
- headersMapper: BlobCopyFromURLExceptionHeaders,
- },
- },
- queryParameters: [timeoutInSeconds],
- urlParameters: [url],
- headerParameters: [
- version,
- requestId,
- accept1,
- metadata,
- leaseId,
- ifModifiedSince,
- ifUnmodifiedSince,
- ifMatch,
- ifNoneMatch,
- ifTags,
- immutabilityPolicyExpiry,
- immutabilityPolicyMode,
- encryptionScope,
- tier,
- sourceIfModifiedSince,
- sourceIfUnmodifiedSince,
- sourceIfMatch,
- sourceIfNoneMatch,
- copySource,
- blobTagsString,
- legalHold1,
- xMsRequiresSync,
- sourceContentMD5,
- copySourceAuthorization,
- copySourceTags,
- ],
- isXML: true,
- serializer: xmlSerializer$3,
-};
-const abortCopyFromURLOperationSpec = {
- path: "/{containerName}/{blob}",
- httpMethod: "PUT",
- responses: {
- 204: {
- headersMapper: BlobAbortCopyFromURLHeaders,
- },
- default: {
- bodyMapper: StorageError,
- headersMapper: BlobAbortCopyFromURLExceptionHeaders,
- },
- },
- queryParameters: [
- timeoutInSeconds,
- comp15,
- copyId,
- ],
- urlParameters: [url],
- headerParameters: [
- version,
- requestId,
- accept1,
- leaseId,
- copyActionAbortConstant,
- ],
- isXML: true,
- serializer: xmlSerializer$3,
-};
-const setTierOperationSpec = {
- path: "/{containerName}/{blob}",
- httpMethod: "PUT",
- responses: {
- 200: {
- headersMapper: BlobSetTierHeaders,
- },
- 202: {
- headersMapper: BlobSetTierHeaders,
- },
- default: {
- bodyMapper: StorageError,
- headersMapper: BlobSetTierExceptionHeaders,
- },
- },
- queryParameters: [
- timeoutInSeconds,
- snapshot,
- versionId,
- comp16,
- ],
- urlParameters: [url],
- headerParameters: [
- version,
- requestId,
- accept1,
- leaseId,
- ifTags,
- rehydratePriority,
- tier1,
- ],
- isXML: true,
- serializer: xmlSerializer$3,
-};
-const getAccountInfoOperationSpec = {
- path: "/{containerName}/{blob}",
- httpMethod: "GET",
- responses: {
- 200: {
- headersMapper: BlobGetAccountInfoHeaders,
- },
- default: {
- bodyMapper: StorageError,
- headersMapper: BlobGetAccountInfoExceptionHeaders,
- },
- },
- queryParameters: [
- comp,
- timeoutInSeconds,
- restype1,
- ],
- urlParameters: [url],
- headerParameters: [
- version,
- requestId,
- accept1,
- ],
- isXML: true,
- serializer: xmlSerializer$3,
-};
-const queryOperationSpec = {
- path: "/{containerName}/{blob}",
- httpMethod: "POST",
- responses: {
- 200: {
- bodyMapper: {
- type: { name: "Stream" },
- serializedName: "parsedResponse",
- },
- headersMapper: BlobQueryHeaders,
- },
- 206: {
- bodyMapper: {
- type: { name: "Stream" },
- serializedName: "parsedResponse",
- },
- headersMapper: BlobQueryHeaders,
- },
- default: {
- bodyMapper: StorageError,
- headersMapper: BlobQueryExceptionHeaders,
- },
- },
- requestBody: queryRequest,
- queryParameters: [
- timeoutInSeconds,
- snapshot,
- comp17,
- ],
- urlParameters: [url],
- headerParameters: [
- contentType,
- accept,
- version,
- requestId,
- leaseId,
- ifModifiedSince,
- ifUnmodifiedSince,
- encryptionKey,
- encryptionKeySha256,
- encryptionAlgorithm,
- ifMatch,
- ifNoneMatch,
- ifTags,
- ],
- isXML: true,
- contentType: "application/xml; charset=utf-8",
- mediaType: "xml",
- serializer: xmlSerializer$3,
-};
-const getTagsOperationSpec = {
- path: "/{containerName}/{blob}",
- httpMethod: "GET",
- responses: {
- 200: {
- bodyMapper: BlobTags,
- headersMapper: BlobGetTagsHeaders,
- },
- default: {
- bodyMapper: StorageError,
- headersMapper: BlobGetTagsExceptionHeaders,
- },
- },
- queryParameters: [
- timeoutInSeconds,
- snapshot,
- versionId,
- comp18,
- ],
- urlParameters: [url],
- headerParameters: [
- version,
- requestId,
- accept1,
- leaseId,
- ifTags,
- ],
- isXML: true,
- serializer: xmlSerializer$3,
-};
-const setTagsOperationSpec = {
- path: "/{containerName}/{blob}",
- httpMethod: "PUT",
- responses: {
- 204: {
- headersMapper: BlobSetTagsHeaders,
- },
- default: {
- bodyMapper: StorageError,
- headersMapper: BlobSetTagsExceptionHeaders,
- },
- },
- requestBody: tags,
- queryParameters: [
- timeoutInSeconds,
- versionId,
- comp18,
- ],
- urlParameters: [url],
- headerParameters: [
- contentType,
- accept,
- version,
- requestId,
- leaseId,
- ifTags,
- transactionalContentMD5,
- transactionalContentCrc64,
- ],
- isXML: true,
- contentType: "application/xml; charset=utf-8",
- mediaType: "xml",
- serializer: xmlSerializer$3,
-};
+ scalar(json, type, longType, fieldName) {
+ let e;
+ try {
+ switch (type) {
+ // float, double: JSON value will be a number or one of the special string values "NaN", "Infinity", and "-Infinity".
+ // Either numbers or strings are accepted. Exponent notation is also accepted.
+ case reflection_info_1.ScalarType.DOUBLE:
+ case reflection_info_1.ScalarType.FLOAT:
+ if (json === null)
+ return .0;
+ if (json === "NaN")
+ return Number.NaN;
+ if (json === "Infinity")
+ return Number.POSITIVE_INFINITY;
+ if (json === "-Infinity")
+ return Number.NEGATIVE_INFINITY;
+ if (json === "") {
+ e = "empty string";
+ break;
+ }
+ if (typeof json == "string" && json.trim().length !== json.length) {
+ e = "extra whitespace";
+ break;
+ }
+ if (typeof json != "string" && typeof json != "number") {
+ break;
+ }
+ let float = Number(json);
+ if (Number.isNaN(float)) {
+ e = "not a number";
+ break;
+ }
+ if (!Number.isFinite(float)) {
+ // infinity and -infinity are handled by string representation above, so this is an error
+ e = "too large or small";
+ break;
+ }
+ if (type == reflection_info_1.ScalarType.FLOAT)
+ assert_1.assertFloat32(float);
+ return float;
+ // int32, fixed32, uint32: JSON value will be a decimal number. Either numbers or strings are accepted.
+ case reflection_info_1.ScalarType.INT32:
+ case reflection_info_1.ScalarType.FIXED32:
+ case reflection_info_1.ScalarType.SFIXED32:
+ case reflection_info_1.ScalarType.SINT32:
+ case reflection_info_1.ScalarType.UINT32:
+ if (json === null)
+ return 0;
+ let int32;
+ if (typeof json == "number")
+ int32 = json;
+ else if (json === "")
+ e = "empty string";
+ else if (typeof json == "string") {
+ if (json.trim().length !== json.length)
+ e = "extra whitespace";
+ else
+ int32 = Number(json);
+ }
+ if (int32 === undefined)
+ break;
+ if (type == reflection_info_1.ScalarType.UINT32)
+ assert_1.assertUInt32(int32);
+ else
+ assert_1.assertInt32(int32);
+ return int32;
+ // int64, fixed64, uint64: JSON value will be a decimal string. Either numbers or strings are accepted.
+ case reflection_info_1.ScalarType.INT64:
+ case reflection_info_1.ScalarType.SFIXED64:
+ case reflection_info_1.ScalarType.SINT64:
+ if (json === null)
+ return reflection_long_convert_1.reflectionLongConvert(pb_long_1.PbLong.ZERO, longType);
+ if (typeof json != "number" && typeof json != "string")
+ break;
+ return reflection_long_convert_1.reflectionLongConvert(pb_long_1.PbLong.from(json), longType);
+ case reflection_info_1.ScalarType.FIXED64:
+ case reflection_info_1.ScalarType.UINT64:
+ if (json === null)
+ return reflection_long_convert_1.reflectionLongConvert(pb_long_1.PbULong.ZERO, longType);
+ if (typeof json != "number" && typeof json != "string")
+ break;
+ return reflection_long_convert_1.reflectionLongConvert(pb_long_1.PbULong.from(json), longType);
+ // bool:
+ case reflection_info_1.ScalarType.BOOL:
+ if (json === null)
+ return false;
+ if (typeof json !== "boolean")
+ break;
+ return json;
+ // string:
+ case reflection_info_1.ScalarType.STRING:
+ if (json === null)
+ return "";
+ if (typeof json !== "string") {
+ e = "extra whitespace";
+ break;
+ }
+ try {
+ encodeURIComponent(json);
+ }
+ catch (e) {
+ e = "invalid UTF8";
+ break;
+ }
+ return json;
+ // bytes: JSON value will be the data encoded as a string using standard base64 encoding with paddings.
+ // Either standard or URL-safe base64 encoding with/without paddings are accepted.
+ case reflection_info_1.ScalarType.BYTES:
+ if (json === null || json === "")
+ return new Uint8Array(0);
+ if (typeof json !== 'string')
+ break;
+ return base64_1.base64decode(json);
+ }
+ }
+ catch (error) {
+ e = error.message;
+ }
+ this.assert(false, fieldName + (e ? " - " + e : ""), json);
+ }
+}
+exports.ReflectionJsonReader = ReflectionJsonReader;
-/*
- * Copyright (c) Microsoft Corporation.
- * Licensed under the MIT License.
+
+/***/ }),
+
+/***/ 57324:
+/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
+
+"use strict";
+
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.ReflectionJsonWriter = void 0;
+const base64_1 = __nccwpck_require__(20841);
+const pb_long_1 = __nccwpck_require__(38819);
+const reflection_info_1 = __nccwpck_require__(37048);
+const assert_1 = __nccwpck_require__(64828);
+/**
+ * Writes proto3 messages in canonical JSON format using reflection
+ * information.
*
- * Code generated by Microsoft (R) AutoRest Code Generator.
- * Changes may cause incorrect behavior and will be lost if the code is regenerated.
+ * https://developers.google.com/protocol-buffers/docs/proto3#json
*/
-/** Class containing PageBlob operations. */
-class PageBlobImpl {
- /**
- * Initialize a new instance of the class PageBlob class.
- * @param client Reference to the service client
- */
- constructor(client) {
- this.client = client;
+class ReflectionJsonWriter {
+ constructor(info) {
+ var _a;
+ this.fields = (_a = info.fields) !== null && _a !== void 0 ? _a : [];
}
/**
- * The Create operation creates a new page blob.
- * @param contentLength The length of the request.
- * @param blobContentLength This header specifies the maximum size for the page blob, up to 1 TB. The
- * page blob size must be aligned to a 512-byte boundary.
- * @param options The options parameters.
+ * Converts the message to a JSON object, based on the field descriptors.
*/
- create(contentLength, blobContentLength, options) {
- return this.client.sendOperationRequest({ contentLength, blobContentLength, options }, createOperationSpec$1);
+ write(message, options) {
+ const json = {}, source = message;
+ for (const field of this.fields) {
+ // field is not part of a oneof, simply write as is
+ if (!field.oneof) {
+ let jsonValue = this.field(field, source[field.localName], options);
+ if (jsonValue !== undefined)
+ json[options.useProtoFieldName ? field.name : field.jsonName] = jsonValue;
+ continue;
+ }
+ // field is part of a oneof
+ const group = source[field.oneof];
+ if (group.oneofKind !== field.localName)
+ continue; // not selected, skip
+ const opt = field.kind == 'scalar' || field.kind == 'enum'
+ ? Object.assign(Object.assign({}, options), { emitDefaultValues: true }) : options;
+ let jsonValue = this.field(field, group[field.localName], opt);
+ assert_1.assert(jsonValue !== undefined);
+ json[options.useProtoFieldName ? field.name : field.jsonName] = jsonValue;
+ }
+ return json;
}
- /**
- * The Upload Pages operation writes a range of pages to a page blob
- * @param contentLength The length of the request.
- * @param body Initial data
- * @param options The options parameters.
- */
- uploadPages(contentLength, body, options) {
- return this.client.sendOperationRequest({ contentLength, body, options }, uploadPagesOperationSpec);
+ field(field, value, options) {
+ let jsonValue = undefined;
+ if (field.kind == 'map') {
+ assert_1.assert(typeof value == "object" && value !== null);
+ const jsonObj = {};
+ switch (field.V.kind) {
+ case "scalar":
+ for (const [entryKey, entryValue] of Object.entries(value)) {
+ const val = this.scalar(field.V.T, entryValue, field.name, false, true);
+ assert_1.assert(val !== undefined);
+ jsonObj[entryKey.toString()] = val; // JSON standard allows only (double quoted) string as property key
+ }
+ break;
+ case "message":
+ const messageType = field.V.T();
+ for (const [entryKey, entryValue] of Object.entries(value)) {
+ const val = this.message(messageType, entryValue, field.name, options);
+ assert_1.assert(val !== undefined);
+ jsonObj[entryKey.toString()] = val; // JSON standard allows only (double quoted) string as property key
+ }
+ break;
+ case "enum":
+ const enumInfo = field.V.T();
+ for (const [entryKey, entryValue] of Object.entries(value)) {
+ assert_1.assert(entryValue === undefined || typeof entryValue == 'number');
+ const val = this.enum(enumInfo, entryValue, field.name, false, true, options.enumAsInteger);
+ assert_1.assert(val !== undefined);
+ jsonObj[entryKey.toString()] = val; // JSON standard allows only (double quoted) string as property key
+ }
+ break;
+ }
+ if (options.emitDefaultValues || Object.keys(jsonObj).length > 0)
+ jsonValue = jsonObj;
+ }
+ else if (field.repeat) {
+ assert_1.assert(Array.isArray(value));
+ const jsonArr = [];
+ switch (field.kind) {
+ case "scalar":
+ for (let i = 0; i < value.length; i++) {
+ const val = this.scalar(field.T, value[i], field.name, field.opt, true);
+ assert_1.assert(val !== undefined);
+ jsonArr.push(val);
+ }
+ break;
+ case "enum":
+ const enumInfo = field.T();
+ for (let i = 0; i < value.length; i++) {
+ assert_1.assert(value[i] === undefined || typeof value[i] == 'number');
+ const val = this.enum(enumInfo, value[i], field.name, field.opt, true, options.enumAsInteger);
+ assert_1.assert(val !== undefined);
+ jsonArr.push(val);
+ }
+ break;
+ case "message":
+ const messageType = field.T();
+ for (let i = 0; i < value.length; i++) {
+ const val = this.message(messageType, value[i], field.name, options);
+ assert_1.assert(val !== undefined);
+ jsonArr.push(val);
+ }
+ break;
+ }
+ // add converted array to json output
+ if (options.emitDefaultValues || jsonArr.length > 0 || options.emitDefaultValues)
+ jsonValue = jsonArr;
+ }
+ else {
+ switch (field.kind) {
+ case "scalar":
+ jsonValue = this.scalar(field.T, value, field.name, field.opt, options.emitDefaultValues);
+ break;
+ case "enum":
+ jsonValue = this.enum(field.T(), value, field.name, field.opt, options.emitDefaultValues, options.enumAsInteger);
+ break;
+ case "message":
+ jsonValue = this.message(field.T(), value, field.name, options);
+ break;
+ }
+ }
+ return jsonValue;
}
/**
- * The Clear Pages operation clears a set of pages from a page blob
- * @param contentLength The length of the request.
- * @param options The options parameters.
+ * Returns `null` as the default for google.protobuf.NullValue.
*/
- clearPages(contentLength, options) {
- return this.client.sendOperationRequest({ contentLength, options }, clearPagesOperationSpec);
+ enum(type, value, fieldName, optional, emitDefaultValues, enumAsInteger) {
+ if (type[0] == 'google.protobuf.NullValue')
+ return !emitDefaultValues && !optional ? undefined : null;
+ if (value === undefined) {
+ assert_1.assert(optional);
+ return undefined;
+ }
+ if (value === 0 && !emitDefaultValues && !optional)
+ // we require 0 to be default value for all enums
+ return undefined;
+ assert_1.assert(typeof value == 'number');
+ assert_1.assert(Number.isInteger(value));
+ if (enumAsInteger || !type[1].hasOwnProperty(value))
+ // if we don't now the enum value, just return the number
+ return value;
+ if (type[2])
+ // restore the dropped prefix
+ return type[2] + type[1][value];
+ return type[1][value];
+ }
+ message(type, value, fieldName, options) {
+ if (value === undefined)
+ return options.emitDefaultValues ? null : undefined;
+ return type.internalJsonWrite(value, options);
+ }
+ scalar(type, value, fieldName, optional, emitDefaultValues) {
+ if (value === undefined) {
+ assert_1.assert(optional);
+ return undefined;
+ }
+ const ed = emitDefaultValues || optional;
+ // noinspection FallThroughInSwitchStatementJS
+ switch (type) {
+ // int32, fixed32, uint32: JSON value will be a decimal number. Either numbers or strings are accepted.
+ case reflection_info_1.ScalarType.INT32:
+ case reflection_info_1.ScalarType.SFIXED32:
+ case reflection_info_1.ScalarType.SINT32:
+ if (value === 0)
+ return ed ? 0 : undefined;
+ assert_1.assertInt32(value);
+ return value;
+ case reflection_info_1.ScalarType.FIXED32:
+ case reflection_info_1.ScalarType.UINT32:
+ if (value === 0)
+ return ed ? 0 : undefined;
+ assert_1.assertUInt32(value);
+ return value;
+ // float, double: JSON value will be a number or one of the special string values "NaN", "Infinity", and "-Infinity".
+ // Either numbers or strings are accepted. Exponent notation is also accepted.
+ case reflection_info_1.ScalarType.FLOAT:
+ assert_1.assertFloat32(value);
+ case reflection_info_1.ScalarType.DOUBLE:
+ if (value === 0)
+ return ed ? 0 : undefined;
+ assert_1.assert(typeof value == 'number');
+ if (Number.isNaN(value))
+ return 'NaN';
+ if (value === Number.POSITIVE_INFINITY)
+ return 'Infinity';
+ if (value === Number.NEGATIVE_INFINITY)
+ return '-Infinity';
+ return value;
+ // string:
+ case reflection_info_1.ScalarType.STRING:
+ if (value === "")
+ return ed ? '' : undefined;
+ assert_1.assert(typeof value == 'string');
+ return value;
+ // bool:
+ case reflection_info_1.ScalarType.BOOL:
+ if (value === false)
+ return ed ? false : undefined;
+ assert_1.assert(typeof value == 'boolean');
+ return value;
+ // JSON value will be a decimal string. Either numbers or strings are accepted.
+ case reflection_info_1.ScalarType.UINT64:
+ case reflection_info_1.ScalarType.FIXED64:
+ assert_1.assert(typeof value == 'number' || typeof value == 'string' || typeof value == 'bigint');
+ let ulong = pb_long_1.PbULong.from(value);
+ if (ulong.isZero() && !ed)
+ return undefined;
+ return ulong.toString();
+ // JSON value will be a decimal string. Either numbers or strings are accepted.
+ case reflection_info_1.ScalarType.INT64:
+ case reflection_info_1.ScalarType.SFIXED64:
+ case reflection_info_1.ScalarType.SINT64:
+ assert_1.assert(typeof value == 'number' || typeof value == 'string' || typeof value == 'bigint');
+ let long = pb_long_1.PbLong.from(value);
+ if (long.isZero() && !ed)
+ return undefined;
+ return long.toString();
+ // bytes: JSON value will be the data encoded as a string using standard base64 encoding with paddings.
+ // Either standard or URL-safe base64 encoding with/without paddings are accepted.
+ case reflection_info_1.ScalarType.BYTES:
+ assert_1.assert(value instanceof Uint8Array);
+ if (!value.byteLength)
+ return ed ? "" : undefined;
+ return base64_1.base64encode(value);
+ }
+ }
+}
+exports.ReflectionJsonWriter = ReflectionJsonWriter;
+
+
+/***/ }),
+
+/***/ 5232:
+/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
+
+"use strict";
+
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.reflectionLongConvert = void 0;
+const reflection_info_1 = __nccwpck_require__(37048);
+/**
+ * Utility method to convert a PbLong or PbUlong to a JavaScript
+ * representation during runtime.
+ *
+ * Works with generated field information, `undefined` is equivalent
+ * to `STRING`.
+ */
+function reflectionLongConvert(long, type) {
+ switch (type) {
+ case reflection_info_1.LongType.BIGINT:
+ return long.toBigInt();
+ case reflection_info_1.LongType.NUMBER:
+ return long.toNumber();
+ default:
+ // case undefined:
+ // case LongType.STRING:
+ return long.toString();
+ }
+}
+exports.reflectionLongConvert = reflectionLongConvert;
+
+
+/***/ }),
+
+/***/ 586:
+/***/ ((__unused_webpack_module, exports) => {
+
+"use strict";
+
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.reflectionMergePartial = void 0;
+/**
+ * Copy partial data into the target message.
+ *
+ * If a singular scalar or enum field is present in the source, it
+ * replaces the field in the target.
+ *
+ * If a singular message field is present in the source, it is merged
+ * with the target field by calling mergePartial() of the responsible
+ * message type.
+ *
+ * If a repeated field is present in the source, its values replace
+ * all values in the target array, removing extraneous values.
+ * Repeated message fields are copied, not merged.
+ *
+ * If a map field is present in the source, entries are added to the
+ * target map, replacing entries with the same key. Entries that only
+ * exist in the target remain. Entries with message values are copied,
+ * not merged.
+ *
+ * Note that this function differs from protobuf merge semantics,
+ * which appends repeated fields.
+ */
+function reflectionMergePartial(info, target, source) {
+ let fieldValue, // the field value we are working with
+ input = source, output; // where we want our field value to go
+ for (let field of info.fields) {
+ let name = field.localName;
+ if (field.oneof) {
+ const group = input[field.oneof]; // this is the oneof`s group in the source
+ if ((group === null || group === void 0 ? void 0 : group.oneofKind) == undefined) { // the user is free to omit
+ continue; // we skip this field, and all other members too
+ }
+ fieldValue = group[name]; // our value comes from the the oneof group of the source
+ output = target[field.oneof]; // and our output is the oneof group of the target
+ output.oneofKind = group.oneofKind; // always update discriminator
+ if (fieldValue == undefined) {
+ delete output[name]; // remove any existing value
+ continue; // skip further work on field
+ }
+ }
+ else {
+ fieldValue = input[name]; // we are using the source directly
+ output = target; // we want our field value to go directly into the target
+ if (fieldValue == undefined) {
+ continue; // skip further work on field, existing value is used as is
+ }
+ }
+ if (field.repeat)
+ output[name].length = fieldValue.length; // resize target array to match source array
+ // now we just work with `fieldValue` and `output` to merge the value
+ switch (field.kind) {
+ case "scalar":
+ case "enum":
+ if (field.repeat)
+ for (let i = 0; i < fieldValue.length; i++)
+ output[name][i] = fieldValue[i]; // not a reference type
+ else
+ output[name] = fieldValue; // not a reference type
+ break;
+ case "message":
+ let T = field.T();
+ if (field.repeat)
+ for (let i = 0; i < fieldValue.length; i++)
+ output[name][i] = T.create(fieldValue[i]);
+ else if (output[name] === undefined)
+ output[name] = T.create(fieldValue); // nothing to merge with
+ else
+ T.mergePartial(output[name], fieldValue);
+ break;
+ case "map":
+ // Map and repeated fields are simply overwritten, not appended or merged
+ switch (field.V.kind) {
+ case "scalar":
+ case "enum":
+ Object.assign(output[name], fieldValue); // elements are not reference types
+ break;
+ case "message":
+ let T = field.V.T();
+ for (let k of Object.keys(fieldValue))
+ output[name][k] = T.create(fieldValue[k]);
+ break;
+ }
+ break;
+ }
+ }
+}
+exports.reflectionMergePartial = reflectionMergePartial;
+
+
+/***/ }),
+
+/***/ 29348:
+/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
+
+"use strict";
+
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.reflectionScalarDefault = void 0;
+const reflection_info_1 = __nccwpck_require__(37048);
+const reflection_long_convert_1 = __nccwpck_require__(5232);
+const pb_long_1 = __nccwpck_require__(38819);
+/**
+ * Creates the default value for a scalar type.
+ */
+function reflectionScalarDefault(type, longType = reflection_info_1.LongType.STRING) {
+ switch (type) {
+ case reflection_info_1.ScalarType.BOOL:
+ return false;
+ case reflection_info_1.ScalarType.UINT64:
+ case reflection_info_1.ScalarType.FIXED64:
+ return reflection_long_convert_1.reflectionLongConvert(pb_long_1.PbULong.ZERO, longType);
+ case reflection_info_1.ScalarType.INT64:
+ case reflection_info_1.ScalarType.SFIXED64:
+ case reflection_info_1.ScalarType.SINT64:
+ return reflection_long_convert_1.reflectionLongConvert(pb_long_1.PbLong.ZERO, longType);
+ case reflection_info_1.ScalarType.DOUBLE:
+ case reflection_info_1.ScalarType.FLOAT:
+ return 0.0;
+ case reflection_info_1.ScalarType.BYTES:
+ return new Uint8Array(0);
+ case reflection_info_1.ScalarType.STRING:
+ return "";
+ default:
+ // case ScalarType.INT32:
+ // case ScalarType.UINT32:
+ // case ScalarType.SINT32:
+ // case ScalarType.FIXED32:
+ // case ScalarType.SFIXED32:
+ return 0;
+ }
+}
+exports.reflectionScalarDefault = reflectionScalarDefault;
+
+
+/***/ }),
+
+/***/ 30073:
+/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
+
+"use strict";
+
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.ReflectionTypeCheck = void 0;
+const reflection_info_1 = __nccwpck_require__(37048);
+const oneof_1 = __nccwpck_require__(69473);
+// noinspection JSMethodCanBeStatic
+class ReflectionTypeCheck {
+ constructor(info) {
+ var _a;
+ this.fields = (_a = info.fields) !== null && _a !== void 0 ? _a : [];
+ }
+ prepare() {
+ if (this.data)
+ return;
+ const req = [], known = [], oneofs = [];
+ for (let field of this.fields) {
+ if (field.oneof) {
+ if (!oneofs.includes(field.oneof)) {
+ oneofs.push(field.oneof);
+ req.push(field.oneof);
+ known.push(field.oneof);
+ }
+ }
+ else {
+ known.push(field.localName);
+ switch (field.kind) {
+ case "scalar":
+ case "enum":
+ if (!field.opt || field.repeat)
+ req.push(field.localName);
+ break;
+ case "message":
+ if (field.repeat)
+ req.push(field.localName);
+ break;
+ case "map":
+ req.push(field.localName);
+ break;
+ }
+ }
+ }
+ this.data = { req, known, oneofs: Object.values(oneofs) };
}
/**
- * The Upload Pages operation writes a range of pages to a page blob where the contents are read from a
- * URL
- * @param sourceUrl Specify a URL to the copy source.
- * @param sourceRange Bytes of source data in the specified range. The length of this range should
- * match the ContentLength header and x-ms-range/Range destination range header.
- * @param contentLength The length of the request.
- * @param range The range of bytes to which the source range would be written. The range should be 512
- * aligned and range-end is required.
- * @param options The options parameters.
+ * Is the argument a valid message as specified by the
+ * reflection information?
+ *
+ * Checks all field types recursively. The `depth`
+ * specifies how deep into the structure the check will be.
+ *
+ * With a depth of 0, only the presence of fields
+ * is checked.
+ *
+ * With a depth of 1 or more, the field types are checked.
+ *
+ * With a depth of 2 or more, the members of map, repeated
+ * and message fields are checked.
+ *
+ * Message fields will be checked recursively with depth - 1.
+ *
+ * The number of map entries / repeated values being checked
+ * is < depth.
*/
- uploadPagesFromURL(sourceUrl, sourceRange, contentLength, range, options) {
- return this.client.sendOperationRequest({ sourceUrl, sourceRange, contentLength, range, options }, uploadPagesFromURLOperationSpec);
+ is(message, depth, allowExcessProperties = false) {
+ if (depth < 0)
+ return true;
+ if (message === null || message === undefined || typeof message != 'object')
+ return false;
+ this.prepare();
+ let keys = Object.keys(message), data = this.data;
+ // if a required field is missing in arg, this cannot be a T
+ if (keys.length < data.req.length || data.req.some(n => !keys.includes(n)))
+ return false;
+ if (!allowExcessProperties) {
+ // if the arg contains a key we dont know, this is not a literal T
+ if (keys.some(k => !data.known.includes(k)))
+ return false;
+ }
+ // "With a depth of 0, only the presence and absence of fields is checked."
+ // "With a depth of 1 or more, the field types are checked."
+ if (depth < 1) {
+ return true;
+ }
+ // check oneof group
+ for (const name of data.oneofs) {
+ const group = message[name];
+ if (!oneof_1.isOneofGroup(group))
+ return false;
+ if (group.oneofKind === undefined)
+ continue;
+ const field = this.fields.find(f => f.localName === group.oneofKind);
+ if (!field)
+ return false; // we found no field, but have a kind, something is wrong
+ if (!this.field(group[group.oneofKind], field, allowExcessProperties, depth))
+ return false;
+ }
+ // check types
+ for (const field of this.fields) {
+ if (field.oneof !== undefined)
+ continue;
+ if (!this.field(message[field.localName], field, allowExcessProperties, depth))
+ return false;
+ }
+ return true;
}
- /**
- * The Get Page Ranges operation returns the list of valid page ranges for a page blob or snapshot of a
- * page blob
- * @param options The options parameters.
- */
- getPageRanges(options) {
- return this.client.sendOperationRequest({ options }, getPageRangesOperationSpec);
+ field(arg, field, allowExcessProperties, depth) {
+ let repeated = field.repeat;
+ switch (field.kind) {
+ case "scalar":
+ if (arg === undefined)
+ return field.opt;
+ if (repeated)
+ return this.scalars(arg, field.T, depth, field.L);
+ return this.scalar(arg, field.T, field.L);
+ case "enum":
+ if (arg === undefined)
+ return field.opt;
+ if (repeated)
+ return this.scalars(arg, reflection_info_1.ScalarType.INT32, depth);
+ return this.scalar(arg, reflection_info_1.ScalarType.INT32);
+ case "message":
+ if (arg === undefined)
+ return true;
+ if (repeated)
+ return this.messages(arg, field.T(), allowExcessProperties, depth);
+ return this.message(arg, field.T(), allowExcessProperties, depth);
+ case "map":
+ if (typeof arg != 'object' || arg === null)
+ return false;
+ if (depth < 2)
+ return true;
+ if (!this.mapKeys(arg, field.K, depth))
+ return false;
+ switch (field.V.kind) {
+ case "scalar":
+ return this.scalars(Object.values(arg), field.V.T, depth, field.V.L);
+ case "enum":
+ return this.scalars(Object.values(arg), reflection_info_1.ScalarType.INT32, depth);
+ case "message":
+ return this.messages(Object.values(arg), field.V.T(), allowExcessProperties, depth);
+ }
+ break;
+ }
+ return true;
}
- /**
- * The Get Page Ranges Diff operation returns the list of valid page ranges for a page blob that were
- * changed between target blob and previous snapshot.
- * @param options The options parameters.
- */
- getPageRangesDiff(options) {
- return this.client.sendOperationRequest({ options }, getPageRangesDiffOperationSpec);
+ message(arg, type, allowExcessProperties, depth) {
+ if (allowExcessProperties) {
+ return type.isAssignable(arg, depth);
+ }
+ return type.is(arg, depth);
}
- /**
- * Resize the Blob
- * @param blobContentLength This header specifies the maximum size for the page blob, up to 1 TB. The
- * page blob size must be aligned to a 512-byte boundary.
- * @param options The options parameters.
- */
- resize(blobContentLength, options) {
- return this.client.sendOperationRequest({ blobContentLength, options }, resizeOperationSpec);
+ messages(arg, type, allowExcessProperties, depth) {
+ if (!Array.isArray(arg))
+ return false;
+ if (depth < 2)
+ return true;
+ if (allowExcessProperties) {
+ for (let i = 0; i < arg.length && i < depth; i++)
+ if (!type.isAssignable(arg[i], depth - 1))
+ return false;
+ }
+ else {
+ for (let i = 0; i < arg.length && i < depth; i++)
+ if (!type.is(arg[i], depth - 1))
+ return false;
+ }
+ return true;
}
- /**
- * Update the sequence number of the blob
- * @param sequenceNumberAction Required if the x-ms-blob-sequence-number header is set for the request.
- * This property applies to page blobs only. This property indicates how the service should modify the
- * blob's sequence number
- * @param options The options parameters.
- */
- updateSequenceNumber(sequenceNumberAction, options) {
- return this.client.sendOperationRequest({ sequenceNumberAction, options }, updateSequenceNumberOperationSpec);
+ scalar(arg, type, longType) {
+ let argType = typeof arg;
+ switch (type) {
+ case reflection_info_1.ScalarType.UINT64:
+ case reflection_info_1.ScalarType.FIXED64:
+ case reflection_info_1.ScalarType.INT64:
+ case reflection_info_1.ScalarType.SFIXED64:
+ case reflection_info_1.ScalarType.SINT64:
+ switch (longType) {
+ case reflection_info_1.LongType.BIGINT:
+ return argType == "bigint";
+ case reflection_info_1.LongType.NUMBER:
+ return argType == "number" && !isNaN(arg);
+ default:
+ return argType == "string";
+ }
+ case reflection_info_1.ScalarType.BOOL:
+ return argType == 'boolean';
+ case reflection_info_1.ScalarType.STRING:
+ return argType == 'string';
+ case reflection_info_1.ScalarType.BYTES:
+ return arg instanceof Uint8Array;
+ case reflection_info_1.ScalarType.DOUBLE:
+ case reflection_info_1.ScalarType.FLOAT:
+ return argType == 'number' && !isNaN(arg);
+ default:
+ // case ScalarType.UINT32:
+ // case ScalarType.FIXED32:
+ // case ScalarType.INT32:
+ // case ScalarType.SINT32:
+ // case ScalarType.SFIXED32:
+ return argType == 'number' && Number.isInteger(arg);
+ }
}
- /**
- * The Copy Incremental operation copies a snapshot of the source page blob to a destination page blob.
- * The snapshot is copied such that only the differential changes between the previously copied
- * snapshot are transferred to the destination. The copied snapshots are complete copies of the
- * original snapshot and can be read or copied from as usual. This API is supported since REST version
- * 2016-05-31.
- * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to
- * 2 KB in length that specifies a page blob snapshot. The value should be URL-encoded as it would
- * appear in a request URI. The source blob must either be public or must be authenticated via a shared
- * access signature.
- * @param options The options parameters.
- */
- copyIncremental(copySource, options) {
- return this.client.sendOperationRequest({ copySource, options }, copyIncrementalOperationSpec);
+ scalars(arg, type, depth, longType) {
+ if (!Array.isArray(arg))
+ return false;
+ if (depth < 2)
+ return true;
+ if (Array.isArray(arg))
+ for (let i = 0; i < arg.length && i < depth; i++)
+ if (!this.scalar(arg[i], type, longType))
+ return false;
+ return true;
+ }
+ mapKeys(map, type, depth) {
+ let keys = Object.keys(map);
+ switch (type) {
+ case reflection_info_1.ScalarType.INT32:
+ case reflection_info_1.ScalarType.FIXED32:
+ case reflection_info_1.ScalarType.SFIXED32:
+ case reflection_info_1.ScalarType.SINT32:
+ case reflection_info_1.ScalarType.UINT32:
+ return this.scalars(keys.slice(0, depth).map(k => parseInt(k)), type, depth);
+ case reflection_info_1.ScalarType.BOOL:
+ return this.scalars(keys.slice(0, depth).map(k => k == 'true' ? true : k == 'false' ? false : k), type, depth);
+ default:
+ return this.scalars(keys, type, depth, reflection_info_1.LongType.STRING);
+ }
}
}
-// Operation Specifications
-const xmlSerializer$2 = coreClient__namespace.createSerializer(Mappers, /* isXml */ true);
-const createOperationSpec$1 = {
- path: "/{containerName}/{blob}",
- httpMethod: "PUT",
- responses: {
- 201: {
- headersMapper: PageBlobCreateHeaders,
- },
- default: {
- bodyMapper: StorageError,
- headersMapper: PageBlobCreateExceptionHeaders,
- },
- },
- queryParameters: [timeoutInSeconds],
- urlParameters: [url],
- headerParameters: [
- version,
- requestId,
- accept1,
- contentLength,
- metadata,
- leaseId,
- ifModifiedSince,
- ifUnmodifiedSince,
- encryptionKey,
- encryptionKeySha256,
- encryptionAlgorithm,
- ifMatch,
- ifNoneMatch,
- ifTags,
- blobCacheControl,
- blobContentType,
- blobContentMD5,
- blobContentEncoding,
- blobContentLanguage,
- blobContentDisposition,
- immutabilityPolicyExpiry,
- immutabilityPolicyMode,
- encryptionScope,
- tier,
- blobTagsString,
- legalHold1,
- blobType,
- blobContentLength,
- blobSequenceNumber,
- ],
- isXML: true,
- serializer: xmlSerializer$2,
-};
-const uploadPagesOperationSpec = {
- path: "/{containerName}/{blob}",
- httpMethod: "PUT",
- responses: {
- 201: {
- headersMapper: PageBlobUploadPagesHeaders,
- },
- default: {
- bodyMapper: StorageError,
- headersMapper: PageBlobUploadPagesExceptionHeaders,
- },
- },
- requestBody: body1,
- queryParameters: [timeoutInSeconds, comp19],
- urlParameters: [url],
- headerParameters: [
- version,
- requestId,
- contentLength,
- leaseId,
- ifModifiedSince,
- ifUnmodifiedSince,
- range,
- encryptionKey,
- encryptionKeySha256,
- encryptionAlgorithm,
- ifMatch,
- ifNoneMatch,
- ifTags,
- encryptionScope,
- transactionalContentMD5,
- transactionalContentCrc64,
- contentType1,
- accept2,
- pageWrite,
- ifSequenceNumberLessThanOrEqualTo,
- ifSequenceNumberLessThan,
- ifSequenceNumberEqualTo,
- ],
- isXML: true,
- contentType: "application/xml; charset=utf-8",
- mediaType: "binary",
- serializer: xmlSerializer$2,
-};
-const clearPagesOperationSpec = {
- path: "/{containerName}/{blob}",
- httpMethod: "PUT",
- responses: {
- 201: {
- headersMapper: PageBlobClearPagesHeaders,
- },
- default: {
- bodyMapper: StorageError,
- headersMapper: PageBlobClearPagesExceptionHeaders,
- },
- },
- queryParameters: [timeoutInSeconds, comp19],
- urlParameters: [url],
- headerParameters: [
- version,
- requestId,
- accept1,
- contentLength,
- leaseId,
- ifModifiedSince,
- ifUnmodifiedSince,
- range,
- encryptionKey,
- encryptionKeySha256,
- encryptionAlgorithm,
- ifMatch,
- ifNoneMatch,
- ifTags,
- encryptionScope,
- ifSequenceNumberLessThanOrEqualTo,
- ifSequenceNumberLessThan,
- ifSequenceNumberEqualTo,
- pageWrite1,
- ],
- isXML: true,
- serializer: xmlSerializer$2,
-};
-const uploadPagesFromURLOperationSpec = {
- path: "/{containerName}/{blob}",
- httpMethod: "PUT",
- responses: {
- 201: {
- headersMapper: PageBlobUploadPagesFromURLHeaders,
- },
- default: {
- bodyMapper: StorageError,
- headersMapper: PageBlobUploadPagesFromURLExceptionHeaders,
- },
- },
- queryParameters: [timeoutInSeconds, comp19],
- urlParameters: [url],
- headerParameters: [
- version,
- requestId,
- accept1,
- contentLength,
- leaseId,
- ifModifiedSince,
- ifUnmodifiedSince,
- encryptionKey,
- encryptionKeySha256,
- encryptionAlgorithm,
- ifMatch,
- ifNoneMatch,
- ifTags,
- encryptionScope,
- sourceIfModifiedSince,
- sourceIfUnmodifiedSince,
- sourceIfMatch,
- sourceIfNoneMatch,
- sourceContentMD5,
- copySourceAuthorization,
- pageWrite,
- ifSequenceNumberLessThanOrEqualTo,
- ifSequenceNumberLessThan,
- ifSequenceNumberEqualTo,
- sourceUrl,
- sourceRange,
- sourceContentCrc64,
- range1,
- ],
- isXML: true,
- serializer: xmlSerializer$2,
-};
-const getPageRangesOperationSpec = {
- path: "/{containerName}/{blob}",
- httpMethod: "GET",
- responses: {
- 200: {
- bodyMapper: PageList,
- headersMapper: PageBlobGetPageRangesHeaders,
- },
- default: {
- bodyMapper: StorageError,
- headersMapper: PageBlobGetPageRangesExceptionHeaders,
- },
- },
- queryParameters: [
- timeoutInSeconds,
- marker,
- maxPageSize,
- snapshot,
- comp20,
- ],
- urlParameters: [url],
- headerParameters: [
- version,
- requestId,
- accept1,
- leaseId,
- ifModifiedSince,
- ifUnmodifiedSince,
- range,
- ifMatch,
- ifNoneMatch,
- ifTags,
- ],
- isXML: true,
- serializer: xmlSerializer$2,
-};
-const getPageRangesDiffOperationSpec = {
- path: "/{containerName}/{blob}",
- httpMethod: "GET",
- responses: {
- 200: {
- bodyMapper: PageList,
- headersMapper: PageBlobGetPageRangesDiffHeaders,
- },
- default: {
- bodyMapper: StorageError,
- headersMapper: PageBlobGetPageRangesDiffExceptionHeaders,
- },
- },
- queryParameters: [
- timeoutInSeconds,
- marker,
- maxPageSize,
- snapshot,
- comp20,
- prevsnapshot,
- ],
- urlParameters: [url],
- headerParameters: [
- version,
- requestId,
- accept1,
- leaseId,
- ifModifiedSince,
- ifUnmodifiedSince,
- range,
- ifMatch,
- ifNoneMatch,
- ifTags,
- prevSnapshotUrl,
- ],
- isXML: true,
- serializer: xmlSerializer$2,
-};
-const resizeOperationSpec = {
- path: "/{containerName}/{blob}",
- httpMethod: "PUT",
- responses: {
- 200: {
- headersMapper: PageBlobResizeHeaders,
- },
- default: {
- bodyMapper: StorageError,
- headersMapper: PageBlobResizeExceptionHeaders,
- },
- },
- queryParameters: [comp, timeoutInSeconds],
- urlParameters: [url],
- headerParameters: [
- version,
- requestId,
- accept1,
- leaseId,
- ifModifiedSince,
- ifUnmodifiedSince,
- encryptionKey,
- encryptionKeySha256,
- encryptionAlgorithm,
- ifMatch,
- ifNoneMatch,
- ifTags,
- encryptionScope,
- blobContentLength,
- ],
- isXML: true,
- serializer: xmlSerializer$2,
-};
-const updateSequenceNumberOperationSpec = {
- path: "/{containerName}/{blob}",
- httpMethod: "PUT",
- responses: {
- 200: {
- headersMapper: PageBlobUpdateSequenceNumberHeaders,
- },
- default: {
- bodyMapper: StorageError,
- headersMapper: PageBlobUpdateSequenceNumberExceptionHeaders,
- },
- },
- queryParameters: [comp, timeoutInSeconds],
- urlParameters: [url],
- headerParameters: [
- version,
- requestId,
- accept1,
- leaseId,
- ifModifiedSince,
- ifUnmodifiedSince,
- ifMatch,
- ifNoneMatch,
- ifTags,
- blobSequenceNumber,
- sequenceNumberAction,
- ],
- isXML: true,
- serializer: xmlSerializer$2,
-};
-const copyIncrementalOperationSpec = {
- path: "/{containerName}/{blob}",
- httpMethod: "PUT",
- responses: {
- 202: {
- headersMapper: PageBlobCopyIncrementalHeaders,
- },
- default: {
- bodyMapper: StorageError,
- headersMapper: PageBlobCopyIncrementalExceptionHeaders,
- },
- },
- queryParameters: [timeoutInSeconds, comp21],
- urlParameters: [url],
- headerParameters: [
- version,
- requestId,
- accept1,
- ifModifiedSince,
- ifUnmodifiedSince,
- ifMatch,
- ifNoneMatch,
- ifTags,
- copySource,
- ],
- isXML: true,
- serializer: xmlSerializer$2,
-};
+exports.ReflectionTypeCheck = ReflectionTypeCheck;
-/*
- * 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.
- */
-/** Class containing AppendBlob operations. */
-class AppendBlobImpl {
- /**
- * Initialize a new instance of the class AppendBlob class.
- * @param client Reference to the service client
- */
- constructor(client) {
- this.client = client;
+
+/***/ }),
+
+/***/ 97282:
+/***/ ((module, exports) => {
+
+"use strict";
+
+///
+///
+///
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+const typedArrayTypeNames = [
+ 'Int8Array',
+ 'Uint8Array',
+ 'Uint8ClampedArray',
+ 'Int16Array',
+ 'Uint16Array',
+ 'Int32Array',
+ 'Uint32Array',
+ 'Float32Array',
+ 'Float64Array',
+ 'BigInt64Array',
+ 'BigUint64Array'
+];
+function isTypedArrayName(name) {
+ return typedArrayTypeNames.includes(name);
+}
+const objectTypeNames = [
+ 'Function',
+ 'Generator',
+ 'AsyncGenerator',
+ 'GeneratorFunction',
+ 'AsyncGeneratorFunction',
+ 'AsyncFunction',
+ 'Observable',
+ 'Array',
+ 'Buffer',
+ 'Blob',
+ 'Object',
+ 'RegExp',
+ 'Date',
+ 'Error',
+ 'Map',
+ 'Set',
+ 'WeakMap',
+ 'WeakSet',
+ 'ArrayBuffer',
+ 'SharedArrayBuffer',
+ 'DataView',
+ 'Promise',
+ 'URL',
+ 'FormData',
+ 'URLSearchParams',
+ 'HTMLElement',
+ ...typedArrayTypeNames
+];
+function isObjectTypeName(name) {
+ return objectTypeNames.includes(name);
+}
+const primitiveTypeNames = [
+ 'null',
+ 'undefined',
+ 'string',
+ 'number',
+ 'bigint',
+ 'boolean',
+ 'symbol'
+];
+function isPrimitiveTypeName(name) {
+ return primitiveTypeNames.includes(name);
+}
+// eslint-disable-next-line @typescript-eslint/ban-types
+function isOfType(type) {
+ return (value) => typeof value === type;
+}
+const { toString } = Object.prototype;
+const getObjectType = (value) => {
+ const objectTypeName = toString.call(value).slice(8, -1);
+ if (/HTML\w+Element/.test(objectTypeName) && is.domElement(value)) {
+ return 'HTMLElement';
}
- /**
- * The Create Append Blob operation creates a new append blob.
- * @param contentLength The length of the request.
- * @param options The options parameters.
- */
- create(contentLength, options) {
- return this.client.sendOperationRequest({ contentLength, options }, createOperationSpec);
+ if (isObjectTypeName(objectTypeName)) {
+ return objectTypeName;
}
- /**
- * The Append Block operation commits a new block of data to the end of an existing append blob. The
- * Append Block operation is permitted only if the blob was created with x-ms-blob-type set to
- * AppendBlob. Append Block is supported only on version 2015-02-21 version or later.
- * @param contentLength The length of the request.
- * @param body Initial data
- * @param options The options parameters.
- */
- appendBlock(contentLength, body, options) {
- return this.client.sendOperationRequest({ contentLength, body, options }, appendBlockOperationSpec);
+ return undefined;
+};
+const isObjectOfType = (type) => (value) => getObjectType(value) === type;
+function is(value) {
+ if (value === null) {
+ return 'null';
+ }
+ switch (typeof value) {
+ case 'undefined':
+ return 'undefined';
+ case 'string':
+ return 'string';
+ case 'number':
+ return 'number';
+ case 'boolean':
+ return 'boolean';
+ case 'function':
+ return 'Function';
+ case 'bigint':
+ return 'bigint';
+ case 'symbol':
+ return 'symbol';
+ default:
}
- /**
- * The Append Block operation commits a new block of data to the end of an existing append blob where
- * the contents are read from a source url. The Append Block operation is permitted only if the blob
- * was created with x-ms-blob-type set to AppendBlob. Append Block is supported only on version
- * 2015-02-21 version or later.
- * @param sourceUrl Specify a URL to the copy source.
- * @param contentLength The length of the request.
- * @param options The options parameters.
- */
- appendBlockFromUrl(sourceUrl, contentLength, options) {
- return this.client.sendOperationRequest({ sourceUrl, contentLength, options }, appendBlockFromUrlOperationSpec);
+ if (is.observable(value)) {
+ return 'Observable';
+ }
+ if (is.array(value)) {
+ return 'Array';
+ }
+ if (is.buffer(value)) {
+ return 'Buffer';
+ }
+ const tagType = getObjectType(value);
+ if (tagType) {
+ return tagType;
+ }
+ if (value instanceof String || value instanceof Boolean || value instanceof Number) {
+ throw new TypeError('Please don\'t use object wrappers for primitive types');
+ }
+ return 'Object';
+}
+is.undefined = isOfType('undefined');
+is.string = isOfType('string');
+const isNumberType = isOfType('number');
+is.number = (value) => isNumberType(value) && !is.nan(value);
+is.bigint = isOfType('bigint');
+// eslint-disable-next-line @typescript-eslint/ban-types
+is.function_ = isOfType('function');
+is.null_ = (value) => value === null;
+is.class_ = (value) => is.function_(value) && value.toString().startsWith('class ');
+is.boolean = (value) => value === true || value === false;
+is.symbol = isOfType('symbol');
+is.numericString = (value) => is.string(value) && !is.emptyStringOrWhitespace(value) && !Number.isNaN(Number(value));
+is.array = (value, assertion) => {
+ if (!Array.isArray(value)) {
+ return false;
}
- /**
- * The Seal operation seals the Append Blob to make it read-only. Seal is supported only on version
- * 2019-12-12 version or later.
- * @param options The options parameters.
- */
- seal(options) {
- return this.client.sendOperationRequest({ options }, sealOperationSpec);
+ if (!is.function_(assertion)) {
+ return true;
}
-}
-// Operation Specifications
-const xmlSerializer$1 = coreClient__namespace.createSerializer(Mappers, /* isXml */ true);
-const createOperationSpec = {
- path: "/{containerName}/{blob}",
- httpMethod: "PUT",
- responses: {
- 201: {
- headersMapper: AppendBlobCreateHeaders,
- },
- default: {
- bodyMapper: StorageError,
- headersMapper: AppendBlobCreateExceptionHeaders,
- },
- },
- queryParameters: [timeoutInSeconds],
- urlParameters: [url],
- headerParameters: [
- version,
- requestId,
- accept1,
- contentLength,
- metadata,
- leaseId,
- ifModifiedSince,
- ifUnmodifiedSince,
- encryptionKey,
- encryptionKeySha256,
- encryptionAlgorithm,
- ifMatch,
- ifNoneMatch,
- ifTags,
- blobCacheControl,
- blobContentType,
- blobContentMD5,
- blobContentEncoding,
- blobContentLanguage,
- blobContentDisposition,
- immutabilityPolicyExpiry,
- immutabilityPolicyMode,
- encryptionScope,
- blobTagsString,
- legalHold1,
- blobType1,
- ],
- isXML: true,
- serializer: xmlSerializer$1,
-};
-const appendBlockOperationSpec = {
- path: "/{containerName}/{blob}",
- httpMethod: "PUT",
- responses: {
- 201: {
- headersMapper: AppendBlobAppendBlockHeaders,
- },
- default: {
- bodyMapper: StorageError,
- headersMapper: AppendBlobAppendBlockExceptionHeaders,
- },
- },
- requestBody: body1,
- queryParameters: [timeoutInSeconds, comp22],
- urlParameters: [url],
- headerParameters: [
- version,
- requestId,
- contentLength,
- leaseId,
- ifModifiedSince,
- ifUnmodifiedSince,
- encryptionKey,
- encryptionKeySha256,
- encryptionAlgorithm,
- ifMatch,
- ifNoneMatch,
- ifTags,
- encryptionScope,
- transactionalContentMD5,
- transactionalContentCrc64,
- contentType1,
- accept2,
- maxSize,
- appendPosition,
- ],
- isXML: true,
- contentType: "application/xml; charset=utf-8",
- mediaType: "binary",
- serializer: xmlSerializer$1,
-};
-const appendBlockFromUrlOperationSpec = {
- path: "/{containerName}/{blob}",
- httpMethod: "PUT",
- responses: {
- 201: {
- headersMapper: AppendBlobAppendBlockFromUrlHeaders,
- },
- default: {
- bodyMapper: StorageError,
- headersMapper: AppendBlobAppendBlockFromUrlExceptionHeaders,
- },
- },
- queryParameters: [timeoutInSeconds, comp22],
- urlParameters: [url],
- headerParameters: [
- version,
- requestId,
- accept1,
- contentLength,
- leaseId,
- ifModifiedSince,
- ifUnmodifiedSince,
- encryptionKey,
- encryptionKeySha256,
- encryptionAlgorithm,
- ifMatch,
- ifNoneMatch,
- ifTags,
- encryptionScope,
- sourceIfModifiedSince,
- sourceIfUnmodifiedSince,
- sourceIfMatch,
- sourceIfNoneMatch,
- sourceContentMD5,
- copySourceAuthorization,
- transactionalContentMD5,
- sourceUrl,
- sourceContentCrc64,
- maxSize,
- appendPosition,
- sourceRange1,
- ],
- isXML: true,
- serializer: xmlSerializer$1,
-};
-const sealOperationSpec = {
- path: "/{containerName}/{blob}",
- httpMethod: "PUT",
- responses: {
- 200: {
- headersMapper: AppendBlobSealHeaders,
- },
- default: {
- bodyMapper: StorageError,
- headersMapper: AppendBlobSealExceptionHeaders,
- },
- },
- queryParameters: [timeoutInSeconds, comp23],
- urlParameters: [url],
- headerParameters: [
- version,
- requestId,
- accept1,
- leaseId,
- ifModifiedSince,
- ifUnmodifiedSince,
- ifMatch,
- ifNoneMatch,
- appendPosition,
- ],
- isXML: true,
- serializer: xmlSerializer$1,
-};
-
-/*
- * 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.
- */
-/** Class containing BlockBlob operations. */
-class BlockBlobImpl {
- /**
- * Initialize a new instance of the class BlockBlob class.
- * @param client Reference to the service client
- */
- constructor(client) {
- this.client = client;
+ return value.every(assertion);
+};
+is.buffer = (value) => { var _a, _b, _c, _d; return (_d = (_c = (_b = (_a = value) === null || _a === void 0 ? void 0 : _a.constructor) === null || _b === void 0 ? void 0 : _b.isBuffer) === null || _c === void 0 ? void 0 : _c.call(_b, value)) !== null && _d !== void 0 ? _d : false; };
+is.blob = (value) => isObjectOfType('Blob')(value);
+is.nullOrUndefined = (value) => is.null_(value) || is.undefined(value);
+is.object = (value) => !is.null_(value) && (typeof value === 'object' || is.function_(value));
+is.iterable = (value) => { var _a; return is.function_((_a = value) === null || _a === void 0 ? void 0 : _a[Symbol.iterator]); };
+is.asyncIterable = (value) => { var _a; return is.function_((_a = value) === null || _a === void 0 ? void 0 : _a[Symbol.asyncIterator]); };
+is.generator = (value) => { var _a, _b; return is.iterable(value) && is.function_((_a = value) === null || _a === void 0 ? void 0 : _a.next) && is.function_((_b = value) === null || _b === void 0 ? void 0 : _b.throw); };
+is.asyncGenerator = (value) => is.asyncIterable(value) && is.function_(value.next) && is.function_(value.throw);
+is.nativePromise = (value) => isObjectOfType('Promise')(value);
+const hasPromiseAPI = (value) => {
+ var _a, _b;
+ return is.function_((_a = value) === null || _a === void 0 ? void 0 : _a.then) &&
+ is.function_((_b = value) === null || _b === void 0 ? void 0 : _b.catch);
+};
+is.promise = (value) => is.nativePromise(value) || hasPromiseAPI(value);
+is.generatorFunction = isObjectOfType('GeneratorFunction');
+is.asyncGeneratorFunction = (value) => getObjectType(value) === 'AsyncGeneratorFunction';
+is.asyncFunction = (value) => getObjectType(value) === 'AsyncFunction';
+// eslint-disable-next-line no-prototype-builtins, @typescript-eslint/ban-types
+is.boundFunction = (value) => is.function_(value) && !value.hasOwnProperty('prototype');
+is.regExp = isObjectOfType('RegExp');
+is.date = isObjectOfType('Date');
+is.error = isObjectOfType('Error');
+is.map = (value) => isObjectOfType('Map')(value);
+is.set = (value) => isObjectOfType('Set')(value);
+is.weakMap = (value) => isObjectOfType('WeakMap')(value);
+is.weakSet = (value) => isObjectOfType('WeakSet')(value);
+is.int8Array = isObjectOfType('Int8Array');
+is.uint8Array = isObjectOfType('Uint8Array');
+is.uint8ClampedArray = isObjectOfType('Uint8ClampedArray');
+is.int16Array = isObjectOfType('Int16Array');
+is.uint16Array = isObjectOfType('Uint16Array');
+is.int32Array = isObjectOfType('Int32Array');
+is.uint32Array = isObjectOfType('Uint32Array');
+is.float32Array = isObjectOfType('Float32Array');
+is.float64Array = isObjectOfType('Float64Array');
+is.bigInt64Array = isObjectOfType('BigInt64Array');
+is.bigUint64Array = isObjectOfType('BigUint64Array');
+is.arrayBuffer = isObjectOfType('ArrayBuffer');
+is.sharedArrayBuffer = isObjectOfType('SharedArrayBuffer');
+is.dataView = isObjectOfType('DataView');
+is.enumCase = (value, targetEnum) => Object.values(targetEnum).includes(value);
+is.directInstanceOf = (instance, class_) => Object.getPrototypeOf(instance) === class_.prototype;
+is.urlInstance = (value) => isObjectOfType('URL')(value);
+is.urlString = (value) => {
+ if (!is.string(value)) {
+ return false;
}
- /**
- * The Upload Block Blob operation updates the content of an existing block blob. Updating an existing
- * block blob overwrites any existing metadata on the blob. Partial updates are not supported with Put
- * Blob; the content of the existing blob is overwritten with the content of the new blob. To perform a
- * partial update of the content of a block blob, use the Put Block List operation.
- * @param contentLength The length of the request.
- * @param body Initial data
- * @param options The options parameters.
- */
- upload(contentLength, body, options) {
- return this.client.sendOperationRequest({ contentLength, body, options }, uploadOperationSpec);
+ try {
+ new URL(value); // eslint-disable-line no-new
+ return true;
}
- /**
- * The Put Blob from URL operation creates a new Block Blob where the contents of the blob are read
- * from a given URL. This API is supported beginning with the 2020-04-08 version. Partial updates are
- * not supported with Put Blob from URL; the content of an existing blob is overwritten with the
- * content of the new blob. To perform partial updates to a block blob’s contents using a source URL,
- * use the Put Block from URL API in conjunction with Put Block List.
- * @param contentLength The length of the request.
- * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to
- * 2 KB in length that specifies a page blob snapshot. The value should be URL-encoded as it would
- * appear in a request URI. The source blob must either be public or must be authenticated via a shared
- * access signature.
- * @param options The options parameters.
- */
- putBlobFromUrl(contentLength, copySource, options) {
- return this.client.sendOperationRequest({ contentLength, copySource, options }, putBlobFromUrlOperationSpec);
+ catch (_a) {
+ return false;
}
- /**
- * The Stage Block operation creates a new block to be committed as part of a blob
- * @param blockId A valid Base64 string value that identifies the block. Prior to encoding, the string
- * must be less than or equal to 64 bytes in size. For a given blob, the length of the value specified
- * for the blockid parameter must be the same size for each block.
- * @param contentLength The length of the request.
- * @param body Initial data
- * @param options The options parameters.
- */
- stageBlock(blockId, contentLength, body, options) {
- return this.client.sendOperationRequest({ blockId, contentLength, body, options }, stageBlockOperationSpec);
+};
+// Example: `is.truthy = (value: unknown): value is (not false | not 0 | not '' | not undefined | not null) => Boolean(value);`
+is.truthy = (value) => Boolean(value);
+// Example: `is.falsy = (value: unknown): value is (not true | 0 | '' | undefined | null) => Boolean(value);`
+is.falsy = (value) => !value;
+is.nan = (value) => Number.isNaN(value);
+is.primitive = (value) => is.null_(value) || isPrimitiveTypeName(typeof value);
+is.integer = (value) => Number.isInteger(value);
+is.safeInteger = (value) => Number.isSafeInteger(value);
+is.plainObject = (value) => {
+ // From: https://github.com/sindresorhus/is-plain-obj/blob/main/index.js
+ if (toString.call(value) !== '[object Object]') {
+ return false;
}
- /**
- * The Stage Block operation creates a new block to be committed as part of a blob where the contents
- * are read from a URL.
- * @param blockId A valid Base64 string value that identifies the block. Prior to encoding, the string
- * must be less than or equal to 64 bytes in size. For a given blob, the length of the value specified
- * for the blockid parameter must be the same size for each block.
- * @param contentLength The length of the request.
- * @param sourceUrl Specify a URL to the copy source.
- * @param options The options parameters.
- */
- stageBlockFromURL(blockId, contentLength, sourceUrl, options) {
- return this.client.sendOperationRequest({ blockId, contentLength, sourceUrl, options }, stageBlockFromURLOperationSpec);
+ const prototype = Object.getPrototypeOf(value);
+ return prototype === null || prototype === Object.getPrototypeOf({});
+};
+is.typedArray = (value) => isTypedArrayName(getObjectType(value));
+const isValidLength = (value) => is.safeInteger(value) && value >= 0;
+is.arrayLike = (value) => !is.nullOrUndefined(value) && !is.function_(value) && isValidLength(value.length);
+is.inRange = (value, range) => {
+ if (is.number(range)) {
+ return value >= Math.min(0, range) && value <= Math.max(range, 0);
}
- /**
- * The Commit Block List operation writes a blob by specifying the list of block IDs that make up the
- * blob. In order to be written as part of a blob, a block must have been successfully written to the
- * server in a prior Put Block operation. You can call Put Block List to update a blob by uploading
- * only those blocks that have changed, then committing the new and existing blocks together. You can
- * do this by specifying whether to commit a block from the committed block list or from the
- * uncommitted block list, or to commit the most recently uploaded version of the block, whichever list
- * it may belong to.
- * @param blocks Blob Blocks.
- * @param options The options parameters.
- */
- commitBlockList(blocks, options) {
- return this.client.sendOperationRequest({ blocks, options }, commitBlockListOperationSpec);
+ if (is.array(range) && range.length === 2) {
+ return value >= Math.min(...range) && value <= Math.max(...range);
}
- /**
- * The Get Block List operation retrieves the list of blocks that have been uploaded as part of a block
- * blob
- * @param listType Specifies whether to return the list of committed blocks, the list of uncommitted
- * blocks, or both lists together.
- * @param options The options parameters.
- */
- getBlockList(listType, options) {
- return this.client.sendOperationRequest({ listType, options }, getBlockListOperationSpec);
+ throw new TypeError(`Invalid range: ${JSON.stringify(range)}`);
+};
+const NODE_TYPE_ELEMENT = 1;
+const DOM_PROPERTIES_TO_CHECK = [
+ 'innerHTML',
+ 'ownerDocument',
+ 'style',
+ 'attributes',
+ 'nodeValue'
+];
+is.domElement = (value) => {
+ return is.object(value) &&
+ value.nodeType === NODE_TYPE_ELEMENT &&
+ is.string(value.nodeName) &&
+ !is.plainObject(value) &&
+ DOM_PROPERTIES_TO_CHECK.every(property => property in value);
+};
+is.observable = (value) => {
+ var _a, _b, _c, _d;
+ if (!value) {
+ return false;
}
-}
-// Operation Specifications
-const xmlSerializer = coreClient__namespace.createSerializer(Mappers, /* isXml */ true);
-const uploadOperationSpec = {
- path: "/{containerName}/{blob}",
- httpMethod: "PUT",
- responses: {
- 201: {
- headersMapper: BlockBlobUploadHeaders,
- },
- default: {
- bodyMapper: StorageError,
- headersMapper: BlockBlobUploadExceptionHeaders,
- },
- },
- requestBody: body1,
- queryParameters: [timeoutInSeconds],
- urlParameters: [url],
- headerParameters: [
- version,
- requestId,
- contentLength,
- metadata,
- leaseId,
- ifModifiedSince,
- ifUnmodifiedSince,
- encryptionKey,
- encryptionKeySha256,
- encryptionAlgorithm,
- ifMatch,
- ifNoneMatch,
- ifTags,
- blobCacheControl,
- blobContentType,
- blobContentMD5,
- blobContentEncoding,
- blobContentLanguage,
- blobContentDisposition,
- immutabilityPolicyExpiry,
- immutabilityPolicyMode,
- encryptionScope,
- tier,
- blobTagsString,
- legalHold1,
- transactionalContentMD5,
- transactionalContentCrc64,
- contentType1,
- accept2,
- blobType2,
- ],
- isXML: true,
- contentType: "application/xml; charset=utf-8",
- mediaType: "binary",
- serializer: xmlSerializer,
+ // eslint-disable-next-line no-use-extend-native/no-use-extend-native
+ if (value === ((_b = (_a = value)[Symbol.observable]) === null || _b === void 0 ? void 0 : _b.call(_a))) {
+ return true;
+ }
+ if (value === ((_d = (_c = value)['@@observable']) === null || _d === void 0 ? void 0 : _d.call(_c))) {
+ return true;
+ }
+ return false;
};
-const putBlobFromUrlOperationSpec = {
- path: "/{containerName}/{blob}",
- httpMethod: "PUT",
- responses: {
- 201: {
- headersMapper: BlockBlobPutBlobFromUrlHeaders,
- },
- default: {
- bodyMapper: StorageError,
- headersMapper: BlockBlobPutBlobFromUrlExceptionHeaders,
- },
+is.nodeStream = (value) => is.object(value) && is.function_(value.pipe) && !is.observable(value);
+is.infinite = (value) => value === Infinity || value === -Infinity;
+const isAbsoluteMod2 = (remainder) => (value) => is.integer(value) && Math.abs(value % 2) === remainder;
+is.evenInteger = isAbsoluteMod2(0);
+is.oddInteger = isAbsoluteMod2(1);
+is.emptyArray = (value) => is.array(value) && value.length === 0;
+is.nonEmptyArray = (value) => is.array(value) && value.length > 0;
+is.emptyString = (value) => is.string(value) && value.length === 0;
+const isWhiteSpaceString = (value) => is.string(value) && !/\S/.test(value);
+is.emptyStringOrWhitespace = (value) => is.emptyString(value) || isWhiteSpaceString(value);
+// TODO: Use `not ''` when the `not` operator is available.
+is.nonEmptyString = (value) => is.string(value) && value.length > 0;
+// TODO: Use `not ''` when the `not` operator is available.
+is.nonEmptyStringAndNotWhitespace = (value) => is.string(value) && !is.emptyStringOrWhitespace(value);
+is.emptyObject = (value) => is.object(value) && !is.map(value) && !is.set(value) && Object.keys(value).length === 0;
+// TODO: Use `not` operator here to remove `Map` and `Set` from type guard:
+// - https://github.com/Microsoft/TypeScript/pull/29317
+is.nonEmptyObject = (value) => is.object(value) && !is.map(value) && !is.set(value) && Object.keys(value).length > 0;
+is.emptySet = (value) => is.set(value) && value.size === 0;
+is.nonEmptySet = (value) => is.set(value) && value.size > 0;
+is.emptyMap = (value) => is.map(value) && value.size === 0;
+is.nonEmptyMap = (value) => is.map(value) && value.size > 0;
+// `PropertyKey` is any value that can be used as an object key (string, number, or symbol)
+is.propertyKey = (value) => is.any([is.string, is.number, is.symbol], value);
+is.formData = (value) => isObjectOfType('FormData')(value);
+is.urlSearchParams = (value) => isObjectOfType('URLSearchParams')(value);
+const predicateOnArray = (method, predicate, values) => {
+ if (!is.function_(predicate)) {
+ throw new TypeError(`Invalid predicate: ${JSON.stringify(predicate)}`);
+ }
+ if (values.length === 0) {
+ throw new TypeError('Invalid number of values');
+ }
+ return method.call(values, predicate);
+};
+is.any = (predicate, ...values) => {
+ const predicates = is.array(predicate) ? predicate : [predicate];
+ return predicates.some(singlePredicate => predicateOnArray(Array.prototype.some, singlePredicate, values));
+};
+is.all = (predicate, ...values) => predicateOnArray(Array.prototype.every, predicate, values);
+const assertType = (condition, description, value, options = {}) => {
+ if (!condition) {
+ const { multipleValues } = options;
+ const valuesMessage = multipleValues ?
+ `received values of types ${[
+ ...new Set(value.map(singleValue => `\`${is(singleValue)}\``))
+ ].join(', ')}` :
+ `received value of type \`${is(value)}\``;
+ throw new TypeError(`Expected value which is \`${description}\`, ${valuesMessage}.`);
+ }
+};
+exports.assert = {
+ // Unknowns.
+ undefined: (value) => assertType(is.undefined(value), 'undefined', value),
+ string: (value) => assertType(is.string(value), 'string', value),
+ number: (value) => assertType(is.number(value), 'number', value),
+ bigint: (value) => assertType(is.bigint(value), 'bigint', value),
+ // eslint-disable-next-line @typescript-eslint/ban-types
+ function_: (value) => assertType(is.function_(value), 'Function', value),
+ null_: (value) => assertType(is.null_(value), 'null', value),
+ class_: (value) => assertType(is.class_(value), "Class" /* class_ */, value),
+ boolean: (value) => assertType(is.boolean(value), 'boolean', value),
+ symbol: (value) => assertType(is.symbol(value), 'symbol', value),
+ numericString: (value) => assertType(is.numericString(value), "string with a number" /* numericString */, value),
+ array: (value, assertion) => {
+ const assert = assertType;
+ assert(is.array(value), 'Array', value);
+ if (assertion) {
+ value.forEach(assertion);
+ }
},
- queryParameters: [timeoutInSeconds],
- urlParameters: [url],
- headerParameters: [
- version,
- requestId,
- accept1,
- contentLength,
- metadata,
- leaseId,
- ifModifiedSince,
- ifUnmodifiedSince,
- encryptionKey,
- encryptionKeySha256,
- encryptionAlgorithm,
- ifMatch,
- ifNoneMatch,
- ifTags,
- blobCacheControl,
- blobContentType,
- blobContentMD5,
- blobContentEncoding,
- blobContentLanguage,
- blobContentDisposition,
- encryptionScope,
- tier,
- sourceIfModifiedSince,
- sourceIfUnmodifiedSince,
- sourceIfMatch,
- sourceIfNoneMatch,
- sourceIfTags,
- copySource,
- blobTagsString,
- sourceContentMD5,
- copySourceAuthorization,
- copySourceTags,
- transactionalContentMD5,
- blobType2,
- copySourceBlobProperties,
- ],
- isXML: true,
- serializer: xmlSerializer,
-};
-const stageBlockOperationSpec = {
- path: "/{containerName}/{blob}",
- httpMethod: "PUT",
- responses: {
- 201: {
- headersMapper: BlockBlobStageBlockHeaders,
- },
- default: {
- bodyMapper: StorageError,
- headersMapper: BlockBlobStageBlockExceptionHeaders,
- },
+ buffer: (value) => assertType(is.buffer(value), 'Buffer', value),
+ blob: (value) => assertType(is.blob(value), 'Blob', value),
+ nullOrUndefined: (value) => assertType(is.nullOrUndefined(value), "null or undefined" /* nullOrUndefined */, value),
+ object: (value) => assertType(is.object(value), 'Object', value),
+ iterable: (value) => assertType(is.iterable(value), "Iterable" /* iterable */, value),
+ asyncIterable: (value) => assertType(is.asyncIterable(value), "AsyncIterable" /* asyncIterable */, value),
+ generator: (value) => assertType(is.generator(value), 'Generator', value),
+ asyncGenerator: (value) => assertType(is.asyncGenerator(value), 'AsyncGenerator', value),
+ nativePromise: (value) => assertType(is.nativePromise(value), "native Promise" /* nativePromise */, value),
+ promise: (value) => assertType(is.promise(value), 'Promise', value),
+ generatorFunction: (value) => assertType(is.generatorFunction(value), 'GeneratorFunction', value),
+ asyncGeneratorFunction: (value) => assertType(is.asyncGeneratorFunction(value), 'AsyncGeneratorFunction', value),
+ // eslint-disable-next-line @typescript-eslint/ban-types
+ asyncFunction: (value) => assertType(is.asyncFunction(value), 'AsyncFunction', value),
+ // eslint-disable-next-line @typescript-eslint/ban-types
+ boundFunction: (value) => assertType(is.boundFunction(value), 'Function', value),
+ regExp: (value) => assertType(is.regExp(value), 'RegExp', value),
+ date: (value) => assertType(is.date(value), 'Date', value),
+ error: (value) => assertType(is.error(value), 'Error', value),
+ map: (value) => assertType(is.map(value), 'Map', value),
+ set: (value) => assertType(is.set(value), 'Set', value),
+ weakMap: (value) => assertType(is.weakMap(value), 'WeakMap', value),
+ weakSet: (value) => assertType(is.weakSet(value), 'WeakSet', value),
+ int8Array: (value) => assertType(is.int8Array(value), 'Int8Array', value),
+ uint8Array: (value) => assertType(is.uint8Array(value), 'Uint8Array', value),
+ uint8ClampedArray: (value) => assertType(is.uint8ClampedArray(value), 'Uint8ClampedArray', value),
+ int16Array: (value) => assertType(is.int16Array(value), 'Int16Array', value),
+ uint16Array: (value) => assertType(is.uint16Array(value), 'Uint16Array', value),
+ int32Array: (value) => assertType(is.int32Array(value), 'Int32Array', value),
+ uint32Array: (value) => assertType(is.uint32Array(value), 'Uint32Array', value),
+ float32Array: (value) => assertType(is.float32Array(value), 'Float32Array', value),
+ float64Array: (value) => assertType(is.float64Array(value), 'Float64Array', value),
+ bigInt64Array: (value) => assertType(is.bigInt64Array(value), 'BigInt64Array', value),
+ bigUint64Array: (value) => assertType(is.bigUint64Array(value), 'BigUint64Array', value),
+ arrayBuffer: (value) => assertType(is.arrayBuffer(value), 'ArrayBuffer', value),
+ sharedArrayBuffer: (value) => assertType(is.sharedArrayBuffer(value), 'SharedArrayBuffer', value),
+ dataView: (value) => assertType(is.dataView(value), 'DataView', value),
+ enumCase: (value, targetEnum) => assertType(is.enumCase(value, targetEnum), 'EnumCase', value),
+ urlInstance: (value) => assertType(is.urlInstance(value), 'URL', value),
+ urlString: (value) => assertType(is.urlString(value), "string with a URL" /* urlString */, value),
+ truthy: (value) => assertType(is.truthy(value), "truthy" /* truthy */, value),
+ falsy: (value) => assertType(is.falsy(value), "falsy" /* falsy */, value),
+ nan: (value) => assertType(is.nan(value), "NaN" /* nan */, value),
+ primitive: (value) => assertType(is.primitive(value), "primitive" /* primitive */, value),
+ integer: (value) => assertType(is.integer(value), "integer" /* integer */, value),
+ safeInteger: (value) => assertType(is.safeInteger(value), "integer" /* safeInteger */, value),
+ plainObject: (value) => assertType(is.plainObject(value), "plain object" /* plainObject */, value),
+ typedArray: (value) => assertType(is.typedArray(value), "TypedArray" /* typedArray */, value),
+ arrayLike: (value) => assertType(is.arrayLike(value), "array-like" /* arrayLike */, value),
+ domElement: (value) => assertType(is.domElement(value), "HTMLElement" /* domElement */, value),
+ observable: (value) => assertType(is.observable(value), 'Observable', value),
+ nodeStream: (value) => assertType(is.nodeStream(value), "Node.js Stream" /* nodeStream */, value),
+ infinite: (value) => assertType(is.infinite(value), "infinite number" /* infinite */, value),
+ emptyArray: (value) => assertType(is.emptyArray(value), "empty array" /* emptyArray */, value),
+ nonEmptyArray: (value) => assertType(is.nonEmptyArray(value), "non-empty array" /* nonEmptyArray */, value),
+ emptyString: (value) => assertType(is.emptyString(value), "empty string" /* emptyString */, value),
+ emptyStringOrWhitespace: (value) => assertType(is.emptyStringOrWhitespace(value), "empty string or whitespace" /* emptyStringOrWhitespace */, value),
+ nonEmptyString: (value) => assertType(is.nonEmptyString(value), "non-empty string" /* nonEmptyString */, value),
+ nonEmptyStringAndNotWhitespace: (value) => assertType(is.nonEmptyStringAndNotWhitespace(value), "non-empty string and not whitespace" /* nonEmptyStringAndNotWhitespace */, value),
+ emptyObject: (value) => assertType(is.emptyObject(value), "empty object" /* emptyObject */, value),
+ nonEmptyObject: (value) => assertType(is.nonEmptyObject(value), "non-empty object" /* nonEmptyObject */, value),
+ emptySet: (value) => assertType(is.emptySet(value), "empty set" /* emptySet */, value),
+ nonEmptySet: (value) => assertType(is.nonEmptySet(value), "non-empty set" /* nonEmptySet */, value),
+ emptyMap: (value) => assertType(is.emptyMap(value), "empty map" /* emptyMap */, value),
+ nonEmptyMap: (value) => assertType(is.nonEmptyMap(value), "non-empty map" /* nonEmptyMap */, value),
+ propertyKey: (value) => assertType(is.propertyKey(value), 'PropertyKey', value),
+ formData: (value) => assertType(is.formData(value), 'FormData', value),
+ urlSearchParams: (value) => assertType(is.urlSearchParams(value), 'URLSearchParams', value),
+ // Numbers.
+ evenInteger: (value) => assertType(is.evenInteger(value), "even integer" /* evenInteger */, value),
+ oddInteger: (value) => assertType(is.oddInteger(value), "odd integer" /* oddInteger */, value),
+ // Two arguments.
+ directInstanceOf: (instance, class_) => assertType(is.directInstanceOf(instance, class_), "T" /* directInstanceOf */, instance),
+ inRange: (value, range) => assertType(is.inRange(value, range), "in range" /* inRange */, value),
+ // Variadic functions.
+ any: (predicate, ...values) => {
+ return assertType(is.any(predicate, ...values), "predicate returns truthy for any value" /* any */, values, { multipleValues: true });
},
- requestBody: body1,
- queryParameters: [
- timeoutInSeconds,
- comp24,
- blockId,
- ],
- urlParameters: [url],
- headerParameters: [
- version,
- requestId,
- contentLength,
- leaseId,
- encryptionKey,
- encryptionKeySha256,
- encryptionAlgorithm,
- encryptionScope,
- transactionalContentMD5,
- transactionalContentCrc64,
- contentType1,
- accept2,
- ],
- isXML: true,
- contentType: "application/xml; charset=utf-8",
- mediaType: "binary",
- serializer: xmlSerializer,
+ all: (predicate, ...values) => assertType(is.all(predicate, ...values), "predicate returns truthy for all values" /* all */, values, { multipleValues: true })
};
-const stageBlockFromURLOperationSpec = {
- path: "/{containerName}/{blob}",
- httpMethod: "PUT",
- responses: {
- 201: {
- headersMapper: BlockBlobStageBlockFromURLHeaders,
- },
- default: {
- bodyMapper: StorageError,
- headersMapper: BlockBlobStageBlockFromURLExceptionHeaders,
- },
+// Some few keywords are reserved, but we'll populate them for Node.js users
+// See https://github.com/Microsoft/TypeScript/issues/2536
+Object.defineProperties(is, {
+ class: {
+ value: is.class_
},
- queryParameters: [
- timeoutInSeconds,
- comp24,
- blockId,
- ],
- urlParameters: [url],
- headerParameters: [
- version,
- requestId,
- accept1,
- contentLength,
- leaseId,
- encryptionKey,
- encryptionKeySha256,
- encryptionAlgorithm,
- encryptionScope,
- sourceIfModifiedSince,
- sourceIfUnmodifiedSince,
- sourceIfMatch,
- sourceIfNoneMatch,
- sourceContentMD5,
- copySourceAuthorization,
- sourceUrl,
- sourceContentCrc64,
- sourceRange1,
- ],
- isXML: true,
- serializer: xmlSerializer,
-};
-const commitBlockListOperationSpec = {
- path: "/{containerName}/{blob}",
- httpMethod: "PUT",
- responses: {
- 201: {
- headersMapper: BlockBlobCommitBlockListHeaders,
- },
- default: {
- bodyMapper: StorageError,
- headersMapper: BlockBlobCommitBlockListExceptionHeaders,
- },
+ function: {
+ value: is.function_
},
- requestBody: blocks,
- queryParameters: [timeoutInSeconds, comp25],
- urlParameters: [url],
- headerParameters: [
- contentType,
- accept,
- version,
- requestId,
- metadata,
- leaseId,
- ifModifiedSince,
- ifUnmodifiedSince,
- encryptionKey,
- encryptionKeySha256,
- encryptionAlgorithm,
- ifMatch,
- ifNoneMatch,
- ifTags,
- blobCacheControl,
- blobContentType,
- blobContentMD5,
- blobContentEncoding,
- blobContentLanguage,
- blobContentDisposition,
- immutabilityPolicyExpiry,
- immutabilityPolicyMode,
- encryptionScope,
- tier,
- blobTagsString,
- legalHold1,
- transactionalContentMD5,
- transactionalContentCrc64,
- ],
- isXML: true,
- contentType: "application/xml; charset=utf-8",
- mediaType: "xml",
- serializer: xmlSerializer,
-};
-const getBlockListOperationSpec = {
- path: "/{containerName}/{blob}",
- httpMethod: "GET",
- responses: {
- 200: {
- bodyMapper: BlockList,
- headersMapper: BlockBlobGetBlockListHeaders,
- },
- default: {
- bodyMapper: StorageError,
- headersMapper: BlockBlobGetBlockListExceptionHeaders,
- },
+ null: {
+ value: is.null_
+ }
+});
+Object.defineProperties(exports.assert, {
+ class: {
+ value: exports.assert.class_
},
- queryParameters: [
- timeoutInSeconds,
- snapshot,
- comp25,
- listType,
- ],
- urlParameters: [url],
- headerParameters: [
- version,
- requestId,
- accept1,
- leaseId,
- ifTags,
- ],
- isXML: true,
- serializer: xmlSerializer,
-};
+ function: {
+ value: exports.assert.function_
+ },
+ null: {
+ value: exports.assert.null_
+ }
+});
+exports["default"] = is;
+// For CommonJS default export support
+module.exports = is;
+module.exports["default"] = is;
+module.exports.assert = exports.assert;
-/*
- * 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.
- */
-let StorageClient$1 = class StorageClient extends coreHttpCompat__namespace.ExtendedServiceClient {
- /**
- * Initializes a new instance of the StorageClient class.
- * @param url The URL of the service account, container, or blob that is the target of the desired
- * operation.
- * @param options The parameter options
- */
- constructor(url, options) {
- var _a, _b;
- if (url === undefined) {
- throw new Error("'url' cannot be null");
+
+/***/ }),
+
+/***/ 60532:
+/***/ ((module, exports, __nccwpck_require__) => {
+
+"use strict";
+
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+const defer_to_connect_1 = __nccwpck_require__(68562);
+const util_1 = __nccwpck_require__(39023);
+const nodejsMajorVersion = Number(process.versions.node.split('.')[0]);
+const timer = (request) => {
+ if (request.timings) {
+ return request.timings;
+ }
+ const timings = {
+ start: Date.now(),
+ socket: undefined,
+ lookup: undefined,
+ connect: undefined,
+ secureConnect: undefined,
+ upload: undefined,
+ response: undefined,
+ end: undefined,
+ error: undefined,
+ abort: undefined,
+ phases: {
+ wait: undefined,
+ dns: undefined,
+ tcp: undefined,
+ tls: undefined,
+ request: undefined,
+ firstByte: undefined,
+ download: undefined,
+ total: undefined
}
- // Initializing default values for options
- if (!options) {
- options = {};
+ };
+ request.timings = timings;
+ const handleError = (origin) => {
+ const emit = origin.emit.bind(origin);
+ origin.emit = (event, ...args) => {
+ // Catches the `error` event
+ if (event === 'error') {
+ timings.error = Date.now();
+ timings.phases.total = timings.error - timings.start;
+ origin.emit = emit;
+ }
+ // Saves the original behavior
+ return emit(event, ...args);
+ };
+ };
+ handleError(request);
+ const onAbort = () => {
+ timings.abort = Date.now();
+ // Let the `end` response event be responsible for setting the total phase,
+ // unless the Node.js major version is >= 13.
+ if (!timings.response || nodejsMajorVersion >= 13) {
+ timings.phases.total = Date.now() - timings.start;
}
- const defaults = {
- requestContentType: "application/json; charset=utf-8",
+ };
+ request.prependOnceListener('abort', onAbort);
+ const onSocket = (socket) => {
+ timings.socket = Date.now();
+ timings.phases.wait = timings.socket - timings.start;
+ if (util_1.types.isProxy(socket)) {
+ return;
+ }
+ const lookupListener = () => {
+ timings.lookup = Date.now();
+ timings.phases.dns = timings.lookup - timings.socket;
};
- const packageDetails = `azsdk-js-azure-storage-blob/12.24.0`;
- const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
- ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
- : `${packageDetails}`;
- const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
- userAgentPrefix,
- }, endpoint: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "{url}" });
- super(optionsWithDefaults);
- // Parameter assignments
- this.url = url;
- // Assigning values to Constant parameters
- this.version = options.version || "2024-08-04";
- this.service = new ServiceImpl(this);
- this.container = new ContainerImpl(this);
- this.blob = new BlobImpl(this);
- this.pageBlob = new PageBlobImpl(this);
- this.appendBlob = new AppendBlobImpl(this);
- this.blockBlob = new BlockBlobImpl(this);
+ socket.prependOnceListener('lookup', lookupListener);
+ defer_to_connect_1.default(socket, {
+ connect: () => {
+ timings.connect = Date.now();
+ if (timings.lookup === undefined) {
+ socket.removeListener('lookup', lookupListener);
+ timings.lookup = timings.connect;
+ timings.phases.dns = timings.lookup - timings.socket;
+ }
+ timings.phases.tcp = timings.connect - timings.lookup;
+ // This callback is called before flushing any data,
+ // so we don't need to set `timings.phases.request` here.
+ },
+ secureConnect: () => {
+ timings.secureConnect = Date.now();
+ timings.phases.tls = timings.secureConnect - timings.connect;
+ }
+ });
+ };
+ if (request.socket) {
+ onSocket(request.socket);
+ }
+ else {
+ request.prependOnceListener('socket', onSocket);
+ }
+ const onUpload = () => {
+ var _a;
+ timings.upload = Date.now();
+ timings.phases.request = timings.upload - ((_a = timings.secureConnect) !== null && _a !== void 0 ? _a : timings.connect);
+ };
+ const writableFinished = () => {
+ if (typeof request.writableFinished === 'boolean') {
+ return request.writableFinished;
+ }
+ // Node.js doesn't have `request.writableFinished` property
+ return request.finished && request.outputSize === 0 && (!request.socket || request.socket.writableLength === 0);
+ };
+ if (writableFinished()) {
+ onUpload();
}
+ else {
+ request.prependOnceListener('finish', onUpload);
+ }
+ request.prependOnceListener('response', (response) => {
+ timings.response = Date.now();
+ timings.phases.firstByte = timings.response - timings.upload;
+ response.timings = timings;
+ handleError(response);
+ response.prependOnceListener('end', () => {
+ timings.end = Date.now();
+ timings.phases.download = timings.end - timings.response;
+ timings.phases.total = timings.end - timings.start;
+ });
+ response.prependOnceListener('aborted', onAbort);
+ });
+ return timings;
};
+exports["default"] = timer;
+// For CommonJS default export support
+module.exports = timer;
+module.exports["default"] = timer;
-// Copyright (c) Microsoft Corporation.
-// Licensed under the MIT license.
-/**
- * @internal
- */
-class StorageContextClient extends StorageClient$1 {
- async sendOperationRequest(operationArguments, operationSpec) {
- const operationSpecToSend = Object.assign({}, operationSpec);
- if (operationSpecToSend.path === "/{containerName}" ||
- operationSpecToSend.path === "/{containerName}/{blob}") {
- operationSpecToSend.path = "";
- }
- return super.sendOperationRequest(operationArguments, operationSpecToSend);
+
+/***/ }),
+
+/***/ 84455:
+/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
+
+"use strict";
+
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.req = exports.json = exports.toBuffer = void 0;
+const http = __importStar(__nccwpck_require__(58611));
+const https = __importStar(__nccwpck_require__(65692));
+async function toBuffer(stream) {
+ let length = 0;
+ const chunks = [];
+ for await (const chunk of stream) {
+ length += chunk.length;
+ chunks.push(chunk);
}
+ return Buffer.concat(chunks, length);
}
-
-// Copyright (c) Microsoft Corporation.
-// Licensed under the MIT license.
-/**
- * A StorageClient represents a based URL class for {@link BlobServiceClient}, {@link ContainerClient}
- * and etc.
- */
-class StorageClient {
- /**
- * Creates an instance of StorageClient.
- * @param url - url to resource
- * @param pipeline - request policy pipeline.
- */
- constructor(url, pipeline) {
- // URL should be encoded and only once, protocol layer shouldn't encode URL again
- this.url = escapeURLPath(url);
- this.accountName = getAccountNameFromUrl(url);
- this.pipeline = pipeline;
- this.storageClientContext = new StorageContextClient(this.url, getCoreClientOptions(pipeline));
- this.isHttps = iEqual(getURLScheme(this.url) || "", "https");
- this.credential = getCredentialFromPipeline(pipeline);
- // Override protocol layer's default content-type
- const storageClientContext = this.storageClientContext;
- storageClientContext.requestContentType = undefined;
+exports.toBuffer = toBuffer;
+// eslint-disable-next-line @typescript-eslint/no-explicit-any
+async function json(stream) {
+ const buf = await toBuffer(stream);
+ const str = buf.toString('utf8');
+ try {
+ return JSON.parse(str);
+ }
+ catch (_err) {
+ const err = _err;
+ err.message += ` (input: ${str})`;
+ throw err;
}
}
+exports.json = json;
+function req(url, opts = {}) {
+ const href = typeof url === 'string' ? url : url.href;
+ const req = (href.startsWith('https:') ? https : http).request(url, opts);
+ const promise = new Promise((resolve, reject) => {
+ req
+ .once('response', resolve)
+ .once('error', reject)
+ .end();
+ });
+ req.then = promise.then.bind(promise);
+ return req;
+}
+exports.req = req;
+//# sourceMappingURL=helpers.js.map
-// Copyright (c) Microsoft Corporation.
-// Licensed under the MIT license.
-/**
- * Creates a span using the global tracer.
- * @internal
- */
-const tracingClient = coreTracing.createTracingClient({
- packageName: "@azure/storage-blob",
- packageVersion: SDK_VERSION,
- namespace: "Microsoft.Storage",
-});
+/***/ }),
-// Copyright (c) Microsoft Corporation.
-// Licensed under the MIT license.
-/**
- * ONLY AVAILABLE IN NODE.JS RUNTIME.
- *
- * This is a helper class to construct a string representing the permissions granted by a ServiceSAS to a blob. Setting
- * a value to true means that any SAS which uses these permissions will grant permissions for that operation. Once all
- * the values are set, this should be serialized with toString and set as the permissions field on a
- * {@link BlobSASSignatureValues} object. It is possible to construct the permissions string without this class, but
- * the order of the permissions is particular and this class guarantees correctness.
- */
-class BlobSASPermissions {
- constructor() {
- /**
- * Specifies Read access granted.
- */
- this.read = false;
- /**
- * Specifies Add access granted.
- */
- this.add = false;
- /**
- * Specifies Create access granted.
- */
- this.create = false;
- /**
- * Specifies Write access granted.
- */
- this.write = false;
- /**
- * Specifies Delete access granted.
- */
- this.delete = false;
- /**
- * Specifies Delete version access granted.
- */
- this.deleteVersion = false;
- /**
- * Specfies Tag access granted.
- */
- this.tag = false;
- /**
- * Specifies Move access granted.
- */
- this.move = false;
- /**
- * Specifies Execute access granted.
- */
- this.execute = false;
- /**
- * Specifies SetImmutabilityPolicy access granted.
- */
- this.setImmutabilityPolicy = false;
- /**
- * Specifies that Permanent Delete is permitted.
- */
- this.permanentDelete = false;
- }
- /**
- * Creates a {@link BlobSASPermissions} from the specified permissions string. This method will throw an
- * Error if it encounters a character that does not correspond to a valid permission.
- *
- * @param permissions -
- */
- static parse(permissions) {
- const blobSASPermissions = new BlobSASPermissions();
- for (const char of permissions) {
- switch (char) {
- case "r":
- blobSASPermissions.read = true;
- break;
- case "a":
- blobSASPermissions.add = true;
- break;
- case "c":
- blobSASPermissions.create = true;
- break;
- case "w":
- blobSASPermissions.write = true;
- break;
- case "d":
- blobSASPermissions.delete = true;
- break;
- case "x":
- blobSASPermissions.deleteVersion = true;
- break;
- case "t":
- blobSASPermissions.tag = true;
- break;
- case "m":
- blobSASPermissions.move = true;
- break;
- case "e":
- blobSASPermissions.execute = true;
- break;
- case "i":
- blobSASPermissions.setImmutabilityPolicy = true;
- break;
- case "y":
- blobSASPermissions.permanentDelete = true;
- break;
- default:
- throw new RangeError(`Invalid permission: ${char}`);
- }
- }
- return blobSASPermissions;
+/***/ 10646:
+/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
+
+"use strict";
+
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
}
- /**
- * Creates a {@link BlobSASPermissions} from a raw object which contains same keys as it
- * and boolean values for them.
- *
- * @param permissionLike -
- */
- static from(permissionLike) {
- const blobSASPermissions = new BlobSASPermissions();
- if (permissionLike.read) {
- blobSASPermissions.read = true;
- }
- if (permissionLike.add) {
- blobSASPermissions.add = true;
- }
- if (permissionLike.create) {
- blobSASPermissions.create = true;
- }
- if (permissionLike.write) {
- blobSASPermissions.write = true;
- }
- if (permissionLike.delete) {
- blobSASPermissions.delete = true;
- }
- if (permissionLike.deleteVersion) {
- blobSASPermissions.deleteVersion = true;
- }
- if (permissionLike.tag) {
- blobSASPermissions.tag = true;
- }
- if (permissionLike.move) {
- blobSASPermissions.move = true;
- }
- if (permissionLike.execute) {
- blobSASPermissions.execute = true;
- }
- if (permissionLike.setImmutabilityPolicy) {
- blobSASPermissions.setImmutabilityPolicy = true;
- }
- if (permissionLike.permanentDelete) {
- blobSASPermissions.permanentDelete = true;
- }
- return blobSASPermissions;
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+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.Agent = void 0;
+const net = __importStar(__nccwpck_require__(69278));
+const http = __importStar(__nccwpck_require__(58611));
+const https_1 = __nccwpck_require__(65692);
+__exportStar(__nccwpck_require__(84455), exports);
+const INTERNAL = Symbol('AgentBaseInternalState');
+class Agent extends http.Agent {
+ constructor(opts) {
+ super(opts);
+ this[INTERNAL] = {};
}
/**
- * Converts the given permissions to a string. Using this method will guarantee the permissions are in an
- * order accepted by the service.
- *
- * @returns A string which represents the BlobSASPermissions
+ * Determine whether this is an `http` or `https` request.
*/
- toString() {
- const permissions = [];
- if (this.read) {
- permissions.push("r");
- }
- if (this.add) {
- permissions.push("a");
- }
- if (this.create) {
- permissions.push("c");
+ isSecureEndpoint(options) {
+ if (options) {
+ // First check the `secureEndpoint` property explicitly, since this
+ // means that a parent `Agent` is "passing through" to this instance.
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
+ if (typeof options.secureEndpoint === 'boolean') {
+ return options.secureEndpoint;
+ }
+ // If no explicit `secure` endpoint, check if `protocol` property is
+ // set. This will usually be the case since using a full string URL
+ // or `URL` instance should be the most common usage.
+ if (typeof options.protocol === 'string') {
+ return options.protocol === 'https:';
+ }
}
- if (this.write) {
- permissions.push("w");
+ // Finally, if no `protocol` property was set, then fall back to
+ // checking the stack trace of the current call stack, and try to
+ // detect the "https" module.
+ const { stack } = new Error();
+ if (typeof stack !== 'string')
+ return false;
+ return stack
+ .split('\n')
+ .some((l) => l.indexOf('(https.js:') !== -1 ||
+ l.indexOf('node:https:') !== -1);
+ }
+ // In order to support async signatures in `connect()` and Node's native
+ // connection pooling in `http.Agent`, the array of sockets for each origin
+ // has to be updated synchronously. This is so the length of the array is
+ // accurate when `addRequest()` is next called. We achieve this by creating a
+ // fake socket and adding it to `sockets[origin]` and incrementing
+ // `totalSocketCount`.
+ incrementSockets(name) {
+ // If `maxSockets` and `maxTotalSockets` are both Infinity then there is no
+ // need to create a fake socket because Node.js native connection pooling
+ // will never be invoked.
+ if (this.maxSockets === Infinity && this.maxTotalSockets === Infinity) {
+ return null;
}
- if (this.delete) {
- permissions.push("d");
+ // All instances of `sockets` are expected TypeScript errors. The
+ // alternative is to add it as a private property of this class but that
+ // will break TypeScript subclassing.
+ if (!this.sockets[name]) {
+ // @ts-expect-error `sockets` is readonly in `@types/node`
+ this.sockets[name] = [];
}
- if (this.deleteVersion) {
- permissions.push("x");
+ const fakeSocket = new net.Socket({ writable: false });
+ this.sockets[name].push(fakeSocket);
+ // @ts-expect-error `totalSocketCount` isn't defined in `@types/node`
+ this.totalSocketCount++;
+ return fakeSocket;
+ }
+ decrementSockets(name, socket) {
+ if (!this.sockets[name] || socket === null) {
+ return;
}
- if (this.tag) {
- permissions.push("t");
+ const sockets = this.sockets[name];
+ const index = sockets.indexOf(socket);
+ if (index !== -1) {
+ sockets.splice(index, 1);
+ // @ts-expect-error `totalSocketCount` isn't defined in `@types/node`
+ this.totalSocketCount--;
+ if (sockets.length === 0) {
+ // @ts-expect-error `sockets` is readonly in `@types/node`
+ delete this.sockets[name];
+ }
}
- if (this.move) {
- permissions.push("m");
+ }
+ // In order to properly update the socket pool, we need to call `getName()` on
+ // the core `https.Agent` if it is a secureEndpoint.
+ getName(options) {
+ const secureEndpoint = this.isSecureEndpoint(options);
+ if (secureEndpoint) {
+ // @ts-expect-error `getName()` isn't defined in `@types/node`
+ return https_1.Agent.prototype.getName.call(this, options);
}
- if (this.execute) {
- permissions.push("e");
+ // @ts-expect-error `getName()` isn't defined in `@types/node`
+ return super.getName(options);
+ }
+ createSocket(req, options, cb) {
+ const connectOpts = {
+ ...options,
+ secureEndpoint: this.isSecureEndpoint(options),
+ };
+ const name = this.getName(connectOpts);
+ const fakeSocket = this.incrementSockets(name);
+ Promise.resolve()
+ .then(() => this.connect(req, connectOpts))
+ .then((socket) => {
+ this.decrementSockets(name, fakeSocket);
+ if (socket instanceof http.Agent) {
+ try {
+ // @ts-expect-error `addRequest()` isn't defined in `@types/node`
+ return socket.addRequest(req, connectOpts);
+ }
+ catch (err) {
+ return cb(err);
+ }
+ }
+ this[INTERNAL].currentSocket = socket;
+ // @ts-expect-error `createSocket()` isn't defined in `@types/node`
+ super.createSocket(req, options, cb);
+ }, (err) => {
+ this.decrementSockets(name, fakeSocket);
+ cb(err);
+ });
+ }
+ createConnection() {
+ const socket = this[INTERNAL].currentSocket;
+ this[INTERNAL].currentSocket = undefined;
+ if (!socket) {
+ throw new Error('No socket was returned in the `connect()` function');
}
- if (this.setImmutabilityPolicy) {
- permissions.push("i");
+ return socket;
+ }
+ get defaultPort() {
+ return (this[INTERNAL].defaultPort ??
+ (this.protocol === 'https:' ? 443 : 80));
+ }
+ set defaultPort(v) {
+ if (this[INTERNAL]) {
+ this[INTERNAL].defaultPort = v;
}
- if (this.permanentDelete) {
- permissions.push("y");
+ }
+ get protocol() {
+ return (this[INTERNAL].protocol ??
+ (this.isSecureEndpoint() ? 'https:' : 'http:'));
+ }
+ set protocol(v) {
+ if (this[INTERNAL]) {
+ this[INTERNAL].protocol = v;
}
- return permissions.join("");
}
}
+exports.Agent = Agent;
+//# sourceMappingURL=index.js.map
-// Copyright (c) Microsoft Corporation.
-// Licensed under the MIT license.
-/**
- * This is a helper class to construct a string representing the permissions granted by a ServiceSAS to a container.
- * Setting a value to true means that any SAS which uses these permissions will grant permissions for that operation.
- * Once all the values are set, this should be serialized with toString and set as the permissions field on a
- * {@link BlobSASSignatureValues} object. It is possible to construct the permissions string without this class, but
- * the order of the permissions is particular and this class guarantees correctness.
- */
-class ContainerSASPermissions {
- constructor() {
- /**
- * Specifies Read access granted.
- */
- this.read = false;
- /**
- * Specifies Add access granted.
- */
- this.add = false;
- /**
- * Specifies Create access granted.
- */
- this.create = false;
- /**
- * Specifies Write access granted.
- */
- this.write = false;
- /**
- * Specifies Delete access granted.
- */
- this.delete = false;
- /**
- * Specifies Delete version access granted.
- */
- this.deleteVersion = false;
- /**
- * Specifies List access granted.
- */
- this.list = false;
- /**
- * Specfies Tag access granted.
- */
- this.tag = false;
- /**
- * Specifies Move access granted.
- */
- this.move = false;
- /**
- * Specifies Execute access granted.
- */
- this.execute = false;
- /**
- * Specifies SetImmutabilityPolicy access granted.
- */
- this.setImmutabilityPolicy = false;
- /**
- * Specifies that Permanent Delete is permitted.
- */
- this.permanentDelete = false;
- /**
- * Specifies that Filter Blobs by Tags is permitted.
- */
- this.filterByTags = false;
+/***/ }),
+
+/***/ 90870:
+/***/ ((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);
+
+ 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];
}
- /**
- * Creates an {@link ContainerSASPermissions} from the specified permissions string. This method will throw an
- * Error if it encounters a character that does not correspond to a valid permission.
- *
- * @param permissions -
- */
- static parse(permissions) {
- const containerSASPermissions = new ContainerSASPermissions();
- for (const char of permissions) {
- switch (char) {
- case "r":
- containerSASPermissions.read = true;
- break;
- case "a":
- containerSASPermissions.add = true;
- break;
- case "c":
- containerSASPermissions.create = true;
- break;
- case "w":
- containerSASPermissions.write = true;
- break;
- case "d":
- containerSASPermissions.delete = true;
- break;
- case "l":
- containerSASPermissions.list = true;
- break;
- case "t":
- containerSASPermissions.tag = true;
- break;
- case "x":
- containerSASPermissions.deleteVersion = true;
- break;
- case "m":
- containerSASPermissions.move = true;
- break;
- case "e":
- containerSASPermissions.execute = true;
- break;
- case "i":
- containerSASPermissions.setImmutabilityPolicy = true;
- break;
- case "y":
- containerSASPermissions.permanentDelete = true;
- break;
- case "f":
- containerSASPermissions.filterByTags = true;
- break;
- default:
- throw new RangeError(`Invalid permission ${char}`);
- }
+ 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;
}
- return containerSASPermissions;
+
+ bi = str.indexOf(b, i + 1);
+ }
+
+ i = ai < bi && ai >= 0 ? ai : bi;
}
- /**
- * Creates a {@link ContainerSASPermissions} from a raw object which contains same keys as it
- * and boolean values for them.
- *
- * @param permissionLike -
- */
- static from(permissionLike) {
- const containerSASPermissions = new ContainerSASPermissions();
- if (permissionLike.read) {
- containerSASPermissions.read = true;
- }
- if (permissionLike.add) {
- containerSASPermissions.add = true;
- }
- if (permissionLike.create) {
- containerSASPermissions.create = true;
- }
- if (permissionLike.write) {
- containerSASPermissions.write = true;
- }
- if (permissionLike.delete) {
- containerSASPermissions.delete = true;
- }
- if (permissionLike.list) {
- containerSASPermissions.list = true;
- }
- if (permissionLike.deleteVersion) {
- containerSASPermissions.deleteVersion = true;
- }
- if (permissionLike.tag) {
- containerSASPermissions.tag = true;
- }
- if (permissionLike.move) {
- containerSASPermissions.move = true;
- }
- if (permissionLike.execute) {
- containerSASPermissions.execute = true;
- }
- if (permissionLike.setImmutabilityPolicy) {
- containerSASPermissions.setImmutabilityPolicy = true;
- }
- if (permissionLike.permanentDelete) {
- containerSASPermissions.permanentDelete = true;
- }
- if (permissionLike.filterByTags) {
- containerSASPermissions.filterByTags = true;
- }
- return containerSASPermissions;
+
+ if (begs.length) {
+ result = [ left, right ];
+ }
+ }
+
+ return result;
+}
+
+
+/***/ }),
+
+/***/ 344:
+/***/ ((module) => {
+
+module.exports = {
+ trueFunc: function trueFunc(){
+ return true;
+ },
+ falseFunc: function falseFunc(){
+ return false;
+ }
+};
+
+/***/ }),
+
+/***/ 27912:
+/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
+
+var concatMap = __nccwpck_require__(51196);
+var balanced = __nccwpck_require__(90870);
+
+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';
+
+function numeric(str) {
+ return parseInt(str, 10) == str
+ ? parseInt(str, 10)
+ : str.charCodeAt(0);
+}
+
+function escapeBraces(str) {
+ return str.split('\\\\').join(escSlash)
+ .split('\\{').join(escOpen)
+ .split('\\}').join(escClose)
+ .split('\\,').join(escComma)
+ .split('\\.').join(escPeriod);
+}
+
+function unescapeBraces(str) {
+ return str.split(escSlash).join('\\')
+ .split(escOpen).join('{')
+ .split(escClose).join('}')
+ .split(escComma).join(',')
+ .split(escPeriod).join('.');
+}
+
+
+// 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 [''];
+
+ var parts = [];
+ var m = balanced('{', '}', str);
+
+ if (!m)
+ return str.split(',');
+
+ var pre = m.pre;
+ var body = m.body;
+ var post = m.post;
+ var p = pre.split(',');
+
+ p[p.length-1] += '{' + body + '}';
+ var postParts = parseCommaParts(post);
+ if (post.length) {
+ p[p.length-1] += postParts.shift();
+ p.push.apply(p, postParts);
+ }
+
+ parts.push.apply(parts, p);
+
+ 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);
+ }
+
+ return expand(escapeBraces(str), true).map(unescapeBraces);
+}
+
+function identity(e) {
+ return e;
+}
+
+function embrace(str) {
+ return '{' + str + '}';
+}
+function isPadded(el) {
+ return /^-?0\d/.test(el);
+}
+
+function lte(i, y) {
+ return i <= y;
+}
+function gte(i, y) {
+ return i >= y;
+}
+
+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];
+ }
+
+ 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;
+ });
+ }
}
- /**
- * Converts the given permissions to a string. Using this method will guarantee the permissions are in an
- * order accepted by the service.
- *
- * The order of the characters should be as specified here to ensure correctness.
- * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas
- *
- */
- toString() {
- const permissions = [];
- if (this.read) {
- permissions.push("r");
- }
- if (this.add) {
- permissions.push("a");
- }
- if (this.create) {
- permissions.push("c");
- }
- if (this.write) {
- permissions.push("w");
- }
- if (this.delete) {
- permissions.push("d");
- }
- if (this.deleteVersion) {
- permissions.push("x");
- }
- if (this.list) {
- permissions.push("l");
- }
- if (this.tag) {
- permissions.push("t");
- }
- if (this.move) {
- permissions.push("m");
- }
- if (this.execute) {
- permissions.push("e");
- }
- if (this.setImmutabilityPolicy) {
- permissions.push("i");
- }
- if (this.permanentDelete) {
- permissions.push("y");
- }
- if (this.filterByTags) {
- permissions.push("f");
- }
- return permissions.join("");
+ }
+
+ // 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;
+
+ 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);
-// Copyright (c) Microsoft Corporation.
-// Licensed under the MIT license.
-/**
- * ONLY AVAILABLE IN NODE.JS RUNTIME.
- *
- * UserDelegationKeyCredential is only used for generation of user delegation SAS.
- * @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-user-delegation-sas
- */
-class UserDelegationKeyCredential {
- /**
- * Creates an instance of UserDelegationKeyCredential.
- * @param accountName -
- * @param userDelegationKey -
- */
- constructor(accountName, userDelegationKey) {
- this.accountName = accountName;
- this.userDelegationKey = userDelegationKey;
- this.key = Buffer.from(userDelegationKey.value, "base64");
+ 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);
}
- /**
- * Generates a hash signature for an HTTP request or for a SAS.
- *
- * @param stringToSign -
- */
- computeHMACSHA256(stringToSign) {
- // console.log(`stringToSign: ${JSON.stringify(stringToSign)}`);
- return crypto.createHmac("sha256", this.key).update(stringToSign, "utf8").digest("base64");
+ } 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);
}
+ }
+
+ return expansions;
}
-// Copyright (c) Microsoft Corporation.
-// Licensed under the MIT license.
-/**
- * Generate SasIPRange format string. For example:
- *
- * "8.8.8.8" or "1.1.1.1-255.255.255.255"
- *
- * @param ipRange -
- */
-function ipRangeToString(ipRange) {
- return ipRange.end ? `${ipRange.start}-${ipRange.end}` : ipRange.start;
+
+
+/***/ }),
+
+/***/ 43260:
+/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
+
+"use strict";
+
+const {
+ V4MAPPED,
+ ADDRCONFIG,
+ ALL,
+ promises: {
+ Resolver: AsyncResolver
+ },
+ lookup: dnsLookup
+} = __nccwpck_require__(72250);
+const {promisify} = __nccwpck_require__(39023);
+const os = __nccwpck_require__(70857);
+
+const kCacheableLookupCreateConnection = Symbol('cacheableLookupCreateConnection');
+const kCacheableLookupInstance = Symbol('cacheableLookupInstance');
+const kExpires = Symbol('expires');
+
+const supportsALL = typeof ALL === 'number';
+
+const verifyAgent = agent => {
+ if (!(agent && typeof agent.createConnection === 'function')) {
+ throw new Error('Expected an Agent instance as the first argument');
+ }
+};
+
+const map4to6 = entries => {
+ for (const entry of entries) {
+ if (entry.family === 6) {
+ continue;
+ }
+
+ entry.address = `::ffff:${entry.address}`;
+ entry.family = 6;
+ }
+};
+
+const getIfaceInfo = () => {
+ let has4 = false;
+ let has6 = false;
+
+ for (const device of Object.values(os.networkInterfaces())) {
+ for (const iface of device) {
+ if (iface.internal) {
+ continue;
+ }
+
+ if (iface.family === 'IPv6') {
+ has6 = true;
+ } else {
+ has4 = true;
+ }
+
+ if (has4 && has6) {
+ return {has4, has6};
+ }
+ }
+ }
+
+ return {has4, has6};
+};
+
+const isIterable = map => {
+ return Symbol.iterator in map;
+};
+
+const ttl = {ttl: true};
+const all = {all: true};
+
+class CacheableLookup {
+ constructor({
+ cache = new Map(),
+ maxTtl = Infinity,
+ fallbackDuration = 3600,
+ errorTtl = 0.15,
+ resolver = new AsyncResolver(),
+ lookup = dnsLookup
+ } = {}) {
+ this.maxTtl = maxTtl;
+ this.errorTtl = errorTtl;
+
+ this._cache = cache;
+ this._resolver = resolver;
+ this._dnsLookup = promisify(lookup);
+
+ if (this._resolver instanceof AsyncResolver) {
+ this._resolve4 = this._resolver.resolve4.bind(this._resolver);
+ this._resolve6 = this._resolver.resolve6.bind(this._resolver);
+ } else {
+ this._resolve4 = promisify(this._resolver.resolve4.bind(this._resolver));
+ this._resolve6 = promisify(this._resolver.resolve6.bind(this._resolver));
+ }
+
+ this._iface = getIfaceInfo();
+
+ this._pending = {};
+ this._nextRemovalTime = false;
+ this._hostnamesToFallback = new Set();
+
+ if (fallbackDuration < 1) {
+ this._fallback = false;
+ } else {
+ this._fallback = true;
+
+ const interval = setInterval(() => {
+ this._hostnamesToFallback.clear();
+ }, fallbackDuration * 1000);
+
+ /* istanbul ignore next: There is no `interval.unref()` when running inside an Electron renderer */
+ if (interval.unref) {
+ interval.unref();
+ }
+ }
+
+ this.lookup = this.lookup.bind(this);
+ this.lookupAsync = this.lookupAsync.bind(this);
+ }
+
+ set servers(servers) {
+ this.clear();
+
+ this._resolver.setServers(servers);
+ }
+
+ get servers() {
+ return this._resolver.getServers();
+ }
+
+ lookup(hostname, options, callback) {
+ if (typeof options === 'function') {
+ callback = options;
+ options = {};
+ } else if (typeof options === 'number') {
+ options = {
+ family: options
+ };
+ }
+
+ if (!callback) {
+ throw new Error('Callback must be a function.');
+ }
+
+ // eslint-disable-next-line promise/prefer-await-to-then
+ this.lookupAsync(hostname, options).then(result => {
+ if (options.all) {
+ callback(null, result);
+ } else {
+ callback(null, result.address, result.family, result.expires, result.ttl);
+ }
+ }, callback);
+ }
+
+ async lookupAsync(hostname, options = {}) {
+ if (typeof options === 'number') {
+ options = {
+ family: options
+ };
+ }
+
+ let cached = await this.query(hostname);
+
+ if (options.family === 6) {
+ const filtered = cached.filter(entry => entry.family === 6);
+
+ if (options.hints & V4MAPPED) {
+ if ((supportsALL && options.hints & ALL) || filtered.length === 0) {
+ map4to6(cached);
+ } else {
+ cached = filtered;
+ }
+ } else {
+ cached = filtered;
+ }
+ } else if (options.family === 4) {
+ cached = cached.filter(entry => entry.family === 4);
+ }
+
+ if (options.hints & ADDRCONFIG) {
+ const {_iface} = this;
+ cached = cached.filter(entry => entry.family === 6 ? _iface.has6 : _iface.has4);
+ }
+
+ if (cached.length === 0) {
+ const error = new Error(`cacheableLookup ENOTFOUND ${hostname}`);
+ error.code = 'ENOTFOUND';
+ error.hostname = hostname;
+
+ throw error;
+ }
+
+ if (options.all) {
+ return cached;
+ }
+
+ return cached[0];
+ }
+
+ async query(hostname) {
+ let cached = await this._cache.get(hostname);
+
+ if (!cached) {
+ const pending = this._pending[hostname];
+
+ if (pending) {
+ cached = await pending;
+ } else {
+ const newPromise = this.queryAndCache(hostname);
+ this._pending[hostname] = newPromise;
+
+ try {
+ cached = await newPromise;
+ } finally {
+ delete this._pending[hostname];
+ }
+ }
+ }
+
+ cached = cached.map(entry => {
+ return {...entry};
+ });
+
+ return cached;
+ }
+
+ async _resolve(hostname) {
+ const wrap = async promise => {
+ try {
+ return await promise;
+ } catch (error) {
+ if (error.code === 'ENODATA' || error.code === 'ENOTFOUND') {
+ return [];
+ }
+
+ throw error;
+ }
+ };
+
+ // ANY is unsafe as it doesn't trigger new queries in the underlying server.
+ const [A, AAAA] = await Promise.all([
+ this._resolve4(hostname, ttl),
+ this._resolve6(hostname, ttl)
+ ].map(promise => wrap(promise)));
+
+ let aTtl = 0;
+ let aaaaTtl = 0;
+ let cacheTtl = 0;
+
+ const now = Date.now();
+
+ for (const entry of A) {
+ entry.family = 4;
+ entry.expires = now + (entry.ttl * 1000);
+
+ aTtl = Math.max(aTtl, entry.ttl);
+ }
+
+ for (const entry of AAAA) {
+ entry.family = 6;
+ entry.expires = now + (entry.ttl * 1000);
+
+ aaaaTtl = Math.max(aaaaTtl, entry.ttl);
+ }
+
+ if (A.length > 0) {
+ if (AAAA.length > 0) {
+ cacheTtl = Math.min(aTtl, aaaaTtl);
+ } else {
+ cacheTtl = aTtl;
+ }
+ } else {
+ cacheTtl = aaaaTtl;
+ }
+
+ return {
+ entries: [
+ ...A,
+ ...AAAA
+ ],
+ cacheTtl
+ };
+ }
+
+ async _lookup(hostname) {
+ try {
+ const entries = await this._dnsLookup(hostname, {
+ all: true
+ });
+
+ return {
+ entries,
+ cacheTtl: 0
+ };
+ } catch (_) {
+ return {
+ entries: [],
+ cacheTtl: 0
+ };
+ }
+ }
+
+ async _set(hostname, data, cacheTtl) {
+ if (this.maxTtl > 0 && cacheTtl > 0) {
+ cacheTtl = Math.min(cacheTtl, this.maxTtl) * 1000;
+ data[kExpires] = Date.now() + cacheTtl;
+
+ try {
+ await this._cache.set(hostname, data, cacheTtl);
+ } catch (error) {
+ this.lookupAsync = async () => {
+ const cacheError = new Error('Cache Error. Please recreate the CacheableLookup instance.');
+ cacheError.cause = error;
+
+ throw cacheError;
+ };
+ }
+
+ if (isIterable(this._cache)) {
+ this._tick(cacheTtl);
+ }
+ }
+ }
+
+ async queryAndCache(hostname) {
+ if (this._hostnamesToFallback.has(hostname)) {
+ return this._dnsLookup(hostname, all);
+ }
+
+ let query = await this._resolve(hostname);
+
+ if (query.entries.length === 0 && this._fallback) {
+ query = await this._lookup(hostname);
+
+ if (query.entries.length !== 0) {
+ // Use `dns.lookup(...)` for that particular hostname
+ this._hostnamesToFallback.add(hostname);
+ }
+ }
+
+ const cacheTtl = query.entries.length === 0 ? this.errorTtl : query.cacheTtl;
+ await this._set(hostname, query.entries, cacheTtl);
+
+ return query.entries;
+ }
+
+ _tick(ms) {
+ const nextRemovalTime = this._nextRemovalTime;
+
+ if (!nextRemovalTime || ms < nextRemovalTime) {
+ clearTimeout(this._removalTimeout);
+
+ this._nextRemovalTime = ms;
+
+ this._removalTimeout = setTimeout(() => {
+ this._nextRemovalTime = false;
+
+ let nextExpiry = Infinity;
+
+ const now = Date.now();
+
+ for (const [hostname, entries] of this._cache) {
+ const expires = entries[kExpires];
+
+ if (now >= expires) {
+ this._cache.delete(hostname);
+ } else if (expires < nextExpiry) {
+ nextExpiry = expires;
+ }
+ }
+
+ if (nextExpiry !== Infinity) {
+ this._tick(nextExpiry - now);
+ }
+ }, ms);
+
+ /* istanbul ignore next: There is no `timeout.unref()` when running inside an Electron renderer */
+ if (this._removalTimeout.unref) {
+ this._removalTimeout.unref();
+ }
+ }
+ }
+
+ install(agent) {
+ verifyAgent(agent);
+
+ if (kCacheableLookupCreateConnection in agent) {
+ throw new Error('CacheableLookup has been already installed');
+ }
+
+ agent[kCacheableLookupCreateConnection] = agent.createConnection;
+ agent[kCacheableLookupInstance] = this;
+
+ agent.createConnection = (options, callback) => {
+ if (!('lookup' in options)) {
+ options.lookup = this.lookup;
+ }
+
+ return agent[kCacheableLookupCreateConnection](options, callback);
+ };
+ }
+
+ uninstall(agent) {
+ verifyAgent(agent);
+
+ if (agent[kCacheableLookupCreateConnection]) {
+ if (agent[kCacheableLookupInstance] !== this) {
+ throw new Error('The agent is not owned by this CacheableLookup instance');
+ }
+
+ agent.createConnection = agent[kCacheableLookupCreateConnection];
+
+ delete agent[kCacheableLookupCreateConnection];
+ delete agent[kCacheableLookupInstance];
+ }
+ }
+
+ updateInterfaceInfo() {
+ const {_iface} = this;
+
+ this._iface = getIfaceInfo();
+
+ if ((_iface.has4 && !this._iface.has4) || (_iface.has6 && !this._iface.has6)) {
+ this._cache.clear();
+ }
+ }
+
+ clear(hostname) {
+ if (hostname) {
+ this._cache.delete(hostname);
+ return;
+ }
+
+ this._cache.clear();
+ }
}
-// Copyright (c) Microsoft Corporation.
-// Licensed under the MIT license.
-/**
- * Protocols for generated SAS.
- */
-exports.SASProtocol = void 0;
-(function (SASProtocol) {
- /**
- * Protocol that allows HTTPS only
- */
- SASProtocol["Https"] = "https";
- /**
- * Protocol that allows both HTTPS and HTTP
- */
- SASProtocol["HttpsAndHttp"] = "https,http";
-})(exports.SASProtocol || (exports.SASProtocol = {}));
-/**
- * Represents the components that make up an Azure Storage SAS' query parameters. This type is not constructed directly
- * by the user; it is only generated by the {@link AccountSASSignatureValues} and {@link BlobSASSignatureValues}
- * types. Once generated, it can be encoded into a {@link String} and appended to a URL directly (though caution should
- * be taken here in case there are existing query parameters, which might affect the appropriate means of appending
- * these query parameters).
- *
- * NOTE: Instances of this class are immutable.
- */
-class SASQueryParameters {
- /**
- * Optional. IP range allowed for this SAS.
- *
- * @readonly
- */
- get ipRange() {
- if (this.ipRangeInner) {
- return {
- end: this.ipRangeInner.end,
- start: this.ipRangeInner.start,
- };
- }
- return undefined;
- }
- constructor(version, signature, permissionsOrOptions, services, resourceTypes, protocol, startsOn, expiresOn, ipRange, identifier, resource, cacheControl, contentDisposition, contentEncoding, contentLanguage, contentType, userDelegationKey, preauthorizedAgentObjectId, correlationId, encryptionScope) {
- this.version = version;
- this.signature = signature;
- if (permissionsOrOptions !== undefined && typeof permissionsOrOptions !== "string") {
- // SASQueryParametersOptions
- this.permissions = permissionsOrOptions.permissions;
- this.services = permissionsOrOptions.services;
- this.resourceTypes = permissionsOrOptions.resourceTypes;
- this.protocol = permissionsOrOptions.protocol;
- this.startsOn = permissionsOrOptions.startsOn;
- this.expiresOn = permissionsOrOptions.expiresOn;
- this.ipRangeInner = permissionsOrOptions.ipRange;
- this.identifier = permissionsOrOptions.identifier;
- this.encryptionScope = permissionsOrOptions.encryptionScope;
- this.resource = permissionsOrOptions.resource;
- this.cacheControl = permissionsOrOptions.cacheControl;
- this.contentDisposition = permissionsOrOptions.contentDisposition;
- this.contentEncoding = permissionsOrOptions.contentEncoding;
- this.contentLanguage = permissionsOrOptions.contentLanguage;
- this.contentType = permissionsOrOptions.contentType;
- if (permissionsOrOptions.userDelegationKey) {
- this.signedOid = permissionsOrOptions.userDelegationKey.signedObjectId;
- this.signedTenantId = permissionsOrOptions.userDelegationKey.signedTenantId;
- this.signedStartsOn = permissionsOrOptions.userDelegationKey.signedStartsOn;
- this.signedExpiresOn = permissionsOrOptions.userDelegationKey.signedExpiresOn;
- this.signedService = permissionsOrOptions.userDelegationKey.signedService;
- this.signedVersion = permissionsOrOptions.userDelegationKey.signedVersion;
- this.preauthorizedAgentObjectId = permissionsOrOptions.preauthorizedAgentObjectId;
- this.correlationId = permissionsOrOptions.correlationId;
- }
- }
- else {
- this.services = services;
- this.resourceTypes = resourceTypes;
- this.expiresOn = expiresOn;
- this.permissions = permissionsOrOptions;
- this.protocol = protocol;
- this.startsOn = startsOn;
- this.ipRangeInner = ipRange;
- this.encryptionScope = encryptionScope;
- this.identifier = identifier;
- this.resource = resource;
- this.cacheControl = cacheControl;
- this.contentDisposition = contentDisposition;
- this.contentEncoding = contentEncoding;
- this.contentLanguage = contentLanguage;
- this.contentType = contentType;
- if (userDelegationKey) {
- this.signedOid = userDelegationKey.signedObjectId;
- this.signedTenantId = userDelegationKey.signedTenantId;
- this.signedStartsOn = userDelegationKey.signedStartsOn;
- this.signedExpiresOn = userDelegationKey.signedExpiresOn;
- this.signedService = userDelegationKey.signedService;
- this.signedVersion = userDelegationKey.signedVersion;
- this.preauthorizedAgentObjectId = preauthorizedAgentObjectId;
- this.correlationId = correlationId;
- }
+module.exports = CacheableLookup;
+module.exports["default"] = CacheableLookup;
+
+
+/***/ }),
+
+/***/ 34025:
+/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
+
+"use strict";
+
+
+const EventEmitter = __nccwpck_require__(24434);
+const urlLib = __nccwpck_require__(87016);
+const normalizeUrl = __nccwpck_require__(60094);
+const getStream = __nccwpck_require__(34882);
+const CachePolicy = __nccwpck_require__(94625);
+const Response = __nccwpck_require__(90431);
+const lowercaseKeys = __nccwpck_require__(51181);
+const cloneResponse = __nccwpck_require__(46256);
+const Keyv = __nccwpck_require__(75277);
+
+class CacheableRequest {
+ constructor(request, cacheAdapter) {
+ if (typeof request !== 'function') {
+ throw new TypeError('Parameter `request` must be a function');
+ }
+
+ this.cache = new Keyv({
+ uri: typeof cacheAdapter === 'string' && cacheAdapter,
+ store: typeof cacheAdapter !== 'string' && cacheAdapter,
+ namespace: 'cacheable-request'
+ });
+
+ return this.createCacheableRequest(request);
+ }
+
+ createCacheableRequest(request) {
+ return (opts, cb) => {
+ let url;
+ if (typeof opts === 'string') {
+ url = normalizeUrlObject(urlLib.parse(opts));
+ opts = {};
+ } else if (opts instanceof urlLib.URL) {
+ url = normalizeUrlObject(urlLib.parse(opts.toString()));
+ opts = {};
+ } else {
+ const [pathname, ...searchParts] = (opts.path || '').split('?');
+ const search = searchParts.length > 0 ?
+ `?${searchParts.join('?')}` :
+ '';
+ url = normalizeUrlObject({ ...opts, pathname, search });
+ }
+
+ opts = {
+ headers: {},
+ method: 'GET',
+ cache: true,
+ strictTtl: false,
+ automaticFailover: false,
+ ...opts,
+ ...urlObjectToRequestOptions(url)
+ };
+ opts.headers = lowercaseKeys(opts.headers);
+
+ const ee = new EventEmitter();
+ const normalizedUrlString = normalizeUrl(
+ urlLib.format(url),
+ {
+ stripWWW: false,
+ removeTrailingSlash: false,
+ stripAuthentication: false
+ }
+ );
+ const key = `${opts.method}:${normalizedUrlString}`;
+ let revalidate = false;
+ let madeRequest = false;
+
+ const makeRequest = opts => {
+ madeRequest = true;
+ let requestErrored = false;
+ let requestErrorCallback;
+
+ const requestErrorPromise = new Promise(resolve => {
+ requestErrorCallback = () => {
+ if (!requestErrored) {
+ requestErrored = true;
+ resolve();
+ }
+ };
+ });
+
+ const handler = response => {
+ if (revalidate && !opts.forceRefresh) {
+ response.status = response.statusCode;
+ const revalidatedPolicy = CachePolicy.fromObject(revalidate.cachePolicy).revalidatedPolicy(opts, response);
+ if (!revalidatedPolicy.modified) {
+ const headers = revalidatedPolicy.policy.responseHeaders();
+ response = new Response(revalidate.statusCode, headers, revalidate.body, revalidate.url);
+ response.cachePolicy = revalidatedPolicy.policy;
+ response.fromCache = true;
+ }
+ }
+
+ if (!response.fromCache) {
+ response.cachePolicy = new CachePolicy(opts, response, opts);
+ response.fromCache = false;
+ }
+
+ let clonedResponse;
+ if (opts.cache && response.cachePolicy.storable()) {
+ clonedResponse = cloneResponse(response);
+
+ (async () => {
+ try {
+ const bodyPromise = getStream.buffer(response);
+
+ await Promise.race([
+ requestErrorPromise,
+ new Promise(resolve => response.once('end', resolve))
+ ]);
+
+ if (requestErrored) {
+ return;
+ }
+
+ const body = await bodyPromise;
+
+ const value = {
+ cachePolicy: response.cachePolicy.toObject(),
+ url: response.url,
+ statusCode: response.fromCache ? revalidate.statusCode : response.statusCode,
+ body
+ };
+
+ let ttl = opts.strictTtl ? response.cachePolicy.timeToLive() : undefined;
+ if (opts.maxTtl) {
+ ttl = ttl ? Math.min(ttl, opts.maxTtl) : opts.maxTtl;
+ }
+
+ await this.cache.set(key, value, ttl);
+ } catch (error) {
+ ee.emit('error', new CacheableRequest.CacheError(error));
+ }
+ })();
+ } else if (opts.cache && revalidate) {
+ (async () => {
+ try {
+ await this.cache.delete(key);
+ } catch (error) {
+ ee.emit('error', new CacheableRequest.CacheError(error));
+ }
+ })();
+ }
+
+ ee.emit('response', clonedResponse || response);
+ if (typeof cb === 'function') {
+ cb(clonedResponse || response);
+ }
+ };
+
+ try {
+ const req = request(opts, handler);
+ req.once('error', requestErrorCallback);
+ req.once('abort', requestErrorCallback);
+ ee.emit('request', req);
+ } catch (error) {
+ ee.emit('error', new CacheableRequest.RequestError(error));
+ }
+ };
+
+ (async () => {
+ const get = async opts => {
+ await Promise.resolve();
+
+ const cacheEntry = opts.cache ? await this.cache.get(key) : undefined;
+ if (typeof cacheEntry === 'undefined') {
+ return makeRequest(opts);
+ }
+
+ const policy = CachePolicy.fromObject(cacheEntry.cachePolicy);
+ if (policy.satisfiesWithoutRevalidation(opts) && !opts.forceRefresh) {
+ const headers = policy.responseHeaders();
+ const response = new Response(cacheEntry.statusCode, headers, cacheEntry.body, cacheEntry.url);
+ response.cachePolicy = policy;
+ response.fromCache = true;
+
+ ee.emit('response', response);
+ if (typeof cb === 'function') {
+ cb(response);
+ }
+ } else {
+ revalidate = cacheEntry;
+ opts.headers = policy.revalidationHeaders(opts);
+ makeRequest(opts);
+ }
+ };
+
+ const errorHandler = error => ee.emit('error', new CacheableRequest.CacheError(error));
+ this.cache.once('error', errorHandler);
+ ee.on('response', () => this.cache.removeListener('error', errorHandler));
+
+ try {
+ await get(opts);
+ } catch (error) {
+ if (opts.automaticFailover && !madeRequest) {
+ makeRequest(opts);
+ }
+
+ ee.emit('error', new CacheableRequest.CacheError(error));
+ }
+ })();
+
+ return ee;
+ };
+ }
+}
+
+function urlObjectToRequestOptions(url) {
+ const options = { ...url };
+ options.path = `${url.pathname || '/'}${url.search || ''}`;
+ delete options.pathname;
+ delete options.search;
+ return options;
+}
+
+function normalizeUrlObject(url) {
+ // If url was parsed by url.parse or new URL:
+ // - hostname will be set
+ // - host will be hostname[:port]
+ // - port will be set if it was explicit in the parsed string
+ // Otherwise, url was from request options:
+ // - hostname or host may be set
+ // - host shall not have port encoded
+ return {
+ protocol: url.protocol,
+ auth: url.auth,
+ hostname: url.hostname || url.host || 'localhost',
+ port: url.port,
+ pathname: url.pathname,
+ search: url.search
+ };
+}
+
+CacheableRequest.RequestError = class extends Error {
+ constructor(error) {
+ super(error.message);
+ this.name = 'RequestError';
+ Object.assign(this, error);
+ }
+};
+
+CacheableRequest.CacheError = class extends Error {
+ constructor(error) {
+ super(error.message);
+ this.name = 'CacheError';
+ Object.assign(this, error);
+ }
+};
+
+module.exports = CacheableRequest;
+
+
+/***/ }),
+
+/***/ 46256:
+/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
+
+"use strict";
+
+
+const PassThrough = (__nccwpck_require__(2203).PassThrough);
+const mimicResponse = __nccwpck_require__(55703);
+
+const cloneResponse = response => {
+ if (!(response && response.pipe)) {
+ throw new TypeError('Parameter `response` must be a response stream.');
+ }
+
+ const clone = new PassThrough();
+ mimicResponse(response, clone);
+
+ return response.pipe(clone);
+};
+
+module.exports = cloneResponse;
+
+
+/***/ }),
+
+/***/ 46508:
+/***/ (function(__unused_webpack_module, exports) {
+
+(function (global, factory) {
+ true ? factory(exports) :
+ 0;
+})(this, (function (exports) { 'use strict';
+
+ const semver = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i;
+ const validateAndParse = (version) => {
+ if (typeof version !== 'string') {
+ throw new TypeError('Invalid argument expected string');
}
- }
+ const match = version.match(semver);
+ if (!match) {
+ throw new Error(`Invalid argument not valid semver ('${version}' received)`);
+ }
+ match.shift();
+ return match;
+ };
+ const isWildcard = (s) => s === '*' || s === 'x' || s === 'X';
+ const tryParse = (v) => {
+ const n = parseInt(v, 10);
+ return isNaN(n) ? v : n;
+ };
+ const forceType = (a, b) => typeof a !== typeof b ? [String(a), String(b)] : [a, b];
+ const compareStrings = (a, b) => {
+ if (isWildcard(a) || isWildcard(b))
+ return 0;
+ const [ap, bp] = forceType(tryParse(a), tryParse(b));
+ if (ap > bp)
+ return 1;
+ if (ap < bp)
+ return -1;
+ return 0;
+ };
+ const compareSegments = (a, b) => {
+ for (let i = 0; i < Math.max(a.length, b.length); i++) {
+ const r = compareStrings(a[i] || '0', b[i] || '0');
+ if (r !== 0)
+ return r;
+ }
+ return 0;
+ };
+
/**
- * Encodes all SAS query parameters into a string that can be appended to a URL.
- *
+ * Compare [semver](https://semver.org/) version strings to find greater, equal or lesser.
+ * This library supports the full semver specification, including comparing versions with different number of digits like `1.0.0`, `1.0`, `1`, and pre-release versions like `1.0.0-alpha`.
+ * @param v1 - First version to compare
+ * @param v2 - Second version to compare
+ * @returns Numeric value compatible with the [Array.sort(fn) interface](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#Parameters).
*/
- toString() {
- const params = [
- "sv",
- "ss",
- "srt",
- "spr",
- "st",
- "se",
- "sip",
- "si",
- "ses",
- "skoid", // Signed object ID
- "sktid", // Signed tenant ID
- "skt", // Signed key start time
- "ske", // Signed key expiry time
- "sks", // Signed key service
- "skv", // Signed key version
- "sr",
- "sp",
- "sig",
- "rscc",
- "rscd",
- "rsce",
- "rscl",
- "rsct",
- "saoid",
- "scid",
- ];
- const queries = [];
- for (const param of params) {
- switch (param) {
- case "sv":
- this.tryAppendQueryParameter(queries, param, this.version);
- break;
- case "ss":
- this.tryAppendQueryParameter(queries, param, this.services);
- break;
- case "srt":
- this.tryAppendQueryParameter(queries, param, this.resourceTypes);
- break;
- case "spr":
- this.tryAppendQueryParameter(queries, param, this.protocol);
- break;
- case "st":
- this.tryAppendQueryParameter(queries, param, this.startsOn ? truncatedISO8061Date(this.startsOn, false) : undefined);
- break;
- case "se":
- this.tryAppendQueryParameter(queries, param, this.expiresOn ? truncatedISO8061Date(this.expiresOn, false) : undefined);
- break;
- case "sip":
- this.tryAppendQueryParameter(queries, param, this.ipRange ? ipRangeToString(this.ipRange) : undefined);
- break;
- case "si":
- this.tryAppendQueryParameter(queries, param, this.identifier);
- break;
- case "ses":
- this.tryAppendQueryParameter(queries, param, this.encryptionScope);
- break;
- case "skoid": // Signed object ID
- this.tryAppendQueryParameter(queries, param, this.signedOid);
- break;
- case "sktid": // Signed tenant ID
- this.tryAppendQueryParameter(queries, param, this.signedTenantId);
- break;
- case "skt": // Signed key start time
- this.tryAppendQueryParameter(queries, param, this.signedStartsOn ? truncatedISO8061Date(this.signedStartsOn, false) : undefined);
- break;
- case "ske": // Signed key expiry time
- this.tryAppendQueryParameter(queries, param, this.signedExpiresOn ? truncatedISO8061Date(this.signedExpiresOn, false) : undefined);
- break;
- case "sks": // Signed key service
- this.tryAppendQueryParameter(queries, param, this.signedService);
- break;
- case "skv": // Signed key version
- this.tryAppendQueryParameter(queries, param, this.signedVersion);
- break;
- case "sr":
- this.tryAppendQueryParameter(queries, param, this.resource);
- break;
- case "sp":
- this.tryAppendQueryParameter(queries, param, this.permissions);
- break;
- case "sig":
- this.tryAppendQueryParameter(queries, param, this.signature);
- break;
- case "rscc":
- this.tryAppendQueryParameter(queries, param, this.cacheControl);
- break;
- case "rscd":
- this.tryAppendQueryParameter(queries, param, this.contentDisposition);
- break;
- case "rsce":
- this.tryAppendQueryParameter(queries, param, this.contentEncoding);
- break;
- case "rscl":
- this.tryAppendQueryParameter(queries, param, this.contentLanguage);
- break;
- case "rsct":
- this.tryAppendQueryParameter(queries, param, this.contentType);
- break;
- case "saoid":
- this.tryAppendQueryParameter(queries, param, this.preauthorizedAgentObjectId);
- break;
- case "scid":
- this.tryAppendQueryParameter(queries, param, this.correlationId);
- break;
- }
+ const compareVersions = (v1, v2) => {
+ // validate input and split into segments
+ const n1 = validateAndParse(v1);
+ const n2 = validateAndParse(v2);
+ // pop off the patch
+ const p1 = n1.pop();
+ const p2 = n2.pop();
+ // validate numbers
+ const r = compareSegments(n1, n2);
+ if (r !== 0)
+ return r;
+ // validate pre-release
+ if (p1 && p2) {
+ return compareSegments(p1.split('.'), p2.split('.'));
}
- return queries.join("&");
- }
+ else if (p1 || p2) {
+ return p1 ? -1 : 1;
+ }
+ return 0;
+ };
+
/**
- * A private helper method used to filter and append query key/value pairs into an array.
+ * Compare [semver](https://semver.org/) version strings using the specified operator.
*
- * @param queries -
- * @param key -
- * @param value -
+ * @param v1 First version to compare
+ * @param v2 Second version to compare
+ * @param operator Allowed arithmetic operator to use
+ * @returns `true` if the comparison between the firstVersion and the secondVersion satisfies the operator, `false` otherwise.
+ *
+ * @example
+ * ```
+ * compare('10.1.8', '10.0.4', '>'); // return true
+ * compare('10.0.1', '10.0.1', '='); // return true
+ * compare('10.1.1', '10.2.2', '<'); // return true
+ * compare('10.1.1', '10.2.2', '<='); // return true
+ * compare('10.1.1', '10.2.2', '>='); // return false
+ * ```
*/
- tryAppendQueryParameter(queries, key, value) {
- if (!value) {
- return;
+ const compare = (v1, v2, operator) => {
+ // validate input operator
+ assertValidOperator(operator);
+ // since result of compareVersions can only be -1 or 0 or 1
+ // a simple map can be used to replace switch
+ const res = compareVersions(v1, v2);
+ return operatorResMap[operator].includes(res);
+ };
+ const operatorResMap = {
+ '>': [1],
+ '>=': [0, 1],
+ '=': [0],
+ '<=': [-1, 0],
+ '<': [-1],
+ '!=': [-1, 1],
+ };
+ const allowedOperators = Object.keys(operatorResMap);
+ const assertValidOperator = (op) => {
+ if (typeof op !== 'string') {
+ throw new TypeError(`Invalid operator type, expected string but got ${typeof op}`);
}
- key = encodeURIComponent(key);
- value = encodeURIComponent(value);
- if (key.length > 0 && value.length > 0) {
- queries.push(`${key}=${value}`);
+ if (allowedOperators.indexOf(op) === -1) {
+ throw new Error(`Invalid operator, expected one of ${allowedOperators.join('|')}`);
}
- }
-}
+ };
-// Copyright (c) Microsoft Corporation.
-// Licensed under the MIT license.
-function generateBlobSASQueryParameters(blobSASSignatureValues, sharedKeyCredentialOrUserDelegationKey, accountName) {
- const version = blobSASSignatureValues.version ? blobSASSignatureValues.version : SERVICE_VERSION;
- const sharedKeyCredential = sharedKeyCredentialOrUserDelegationKey instanceof StorageSharedKeyCredential
- ? sharedKeyCredentialOrUserDelegationKey
- : undefined;
- let userDelegationKeyCredential;
- if (sharedKeyCredential === undefined && accountName !== undefined) {
- userDelegationKeyCredential = new UserDelegationKeyCredential(accountName, sharedKeyCredentialOrUserDelegationKey);
- }
- if (sharedKeyCredential === undefined && userDelegationKeyCredential === undefined) {
- throw TypeError("Invalid sharedKeyCredential, userDelegationKey or accountName.");
- }
- // Version 2020-12-06 adds support for encryptionscope in SAS.
- if (version >= "2020-12-06") {
- if (sharedKeyCredential !== undefined) {
- return generateBlobSASQueryParameters20201206(blobSASSignatureValues, sharedKeyCredential);
- }
- else {
- return generateBlobSASQueryParametersUDK20201206(blobSASSignatureValues, userDelegationKeyCredential);
- }
- }
- // Version 2019-12-12 adds support for the blob tags permission.
- // Version 2018-11-09 adds support for the signed resource and signed blob snapshot time fields.
- // https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas#constructing-the-signature-string
- if (version >= "2018-11-09") {
- if (sharedKeyCredential !== undefined) {
- return generateBlobSASQueryParameters20181109(blobSASSignatureValues, sharedKeyCredential);
+ /**
+ * Match [npm semver](https://docs.npmjs.com/cli/v6/using-npm/semver) version range.
+ *
+ * @param version Version number to match
+ * @param range Range pattern for version
+ * @returns `true` if the version number is within the range, `false` otherwise.
+ *
+ * @example
+ * ```
+ * satisfies('1.1.0', '^1.0.0'); // return true
+ * satisfies('1.1.0', '~1.0.0'); // return false
+ * ```
+ */
+ const satisfies = (version, range) => {
+ // clean input
+ range = range.replace(/([><=]+)\s+/g, '$1');
+ // handle multiple comparators
+ if (range.includes('||')) {
+ return range.split('||').some((r) => satisfies(version, r));
}
- else {
- // Version 2020-02-10 delegation SAS signature construction includes preauthorizedAgentObjectId, agentObjectId, correlationId.
- if (version >= "2020-02-10") {
- return generateBlobSASQueryParametersUDK20200210(blobSASSignatureValues, userDelegationKeyCredential);
- }
- else {
- return generateBlobSASQueryParametersUDK20181109(blobSASSignatureValues, userDelegationKeyCredential);
- }
+ else if (range.includes(' - ')) {
+ const [a, b] = range.split(' - ', 2);
+ return satisfies(version, `>=${a} <=${b}`);
}
- }
- if (version >= "2015-04-05") {
- if (sharedKeyCredential !== undefined) {
- return generateBlobSASQueryParameters20150405(blobSASSignatureValues, sharedKeyCredential);
+ else if (range.includes(' ')) {
+ return range
+ .trim()
+ .replace(/\s{2,}/g, ' ')
+ .split(' ')
+ .every((r) => satisfies(version, r));
}
- else {
- throw new RangeError("'version' must be >= '2018-11-09' when generating user delegation SAS using user delegation key.");
+ // if no range operator then "="
+ const m = range.match(/^([<>=~^]+)/);
+ const op = m ? m[1] : '=';
+ // if gt/lt/eq then operator compare
+ if (op !== '^' && op !== '~')
+ return compare(version, range, op);
+ // else range of either "~" or "^" is assumed
+ const [v1, v2, v3, , vp] = validateAndParse(version);
+ const [r1, r2, r3, , rp] = validateAndParse(range);
+ const v = [v1, v2, v3];
+ const r = [r1, r2 !== null && r2 !== void 0 ? r2 : 'x', r3 !== null && r3 !== void 0 ? r3 : 'x'];
+ // validate pre-release
+ if (rp) {
+ if (!vp)
+ return false;
+ if (compareSegments(v, r) !== 0)
+ return false;
+ if (compareSegments(vp.split('.'), rp.split('.')) === -1)
+ return false;
}
+ // first non-zero number
+ const nonZero = r.findIndex((v) => v !== '0') + 1;
+ // pointer to where segments can be >=
+ const i = op === '~' ? 2 : nonZero > 1 ? nonZero : 1;
+ // before pointer must be equal
+ if (compareSegments(v.slice(0, i), r.slice(0, i)) !== 0)
+ return false;
+ // after pointer must be >=
+ if (compareSegments(v.slice(i), r.slice(i)) === -1)
+ return false;
+ return true;
+ };
+
+ /**
+ * Validate [semver](https://semver.org/) version strings.
+ *
+ * @param version Version number to validate
+ * @returns `true` if the version number is a valid semver version number, `false` otherwise.
+ *
+ * @example
+ * ```
+ * validate('1.0.0-rc.1'); // return true
+ * validate('1.0-rc.1'); // return false
+ * validate('foo'); // return false
+ * ```
+ */
+ const validate = (version) => typeof version === 'string' && /^[v\d]/.test(version) && semver.test(version);
+ /**
+ * Validate [semver](https://semver.org/) version strings strictly. Will not accept wildcards and version ranges.
+ *
+ * @param version Version number to validate
+ * @returns `true` if the version number is a valid semver version number `false` otherwise
+ *
+ * @example
+ * ```
+ * validate('1.0.0-rc.1'); // return true
+ * validate('1.0-rc.1'); // return false
+ * validate('foo'); // return false
+ * ```
+ */
+ const validateStrict = (version) => typeof version === 'string' &&
+ /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/.test(version);
+
+ exports.compare = compare;
+ exports.compareVersions = compareVersions;
+ exports.satisfies = satisfies;
+ exports.validate = validate;
+ exports.validateStrict = validateStrict;
+
+}));
+//# sourceMappingURL=index.js.map
+
+
+/***/ }),
+
+/***/ 51196:
+/***/ ((module) => {
+
+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);
}
- throw new RangeError("'version' must be >= '2015-04-05'.");
-}
+ return res;
+};
+
+var isArray = Array.isArray || function (xs) {
+ return Object.prototype.toString.call(xs) === '[object Array]';
+};
+
+
+/***/ }),
+
+/***/ 18211:
+/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
+
+"use strict";
+
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.attributeRules = void 0;
+var boolbase_1 = __importDefault(__nccwpck_require__(344));
/**
- * ONLY AVAILABLE IN NODE.JS RUNTIME.
- * IMPLEMENTATION FOR API VERSION FROM 2015-04-05 AND BEFORE 2018-11-09.
- *
- * Creates an instance of SASQueryParameters.
- *
- * Only accepts required settings needed to create a SAS. For optional settings please
- * set corresponding properties directly, such as permissions, startsOn and identifier.
+ * All reserved characters in a regex, used for escaping.
*
- * WARNING: When identifier is not provided, permissions and expiresOn are required.
- * You MUST assign value to identifier or expiresOn & permissions manually if you initial with
- * this constructor.
+ * Taken from XRegExp, (c) 2007-2020 Steven Levithan under the MIT license
+ * https://github.com/slevithan/xregexp/blob/95eeebeb8fac8754d54eafe2b4743661ac1cf028/src/xregexp.js#L794
+ */
+var reChars = /[-[\]{}()*+?.,\\^$|#\s]/g;
+function escapeRegex(value) {
+ return value.replace(reChars, "\\$&");
+}
+/**
+ * Attributes that are case-insensitive in HTML.
*
- * @param blobSASSignatureValues -
- * @param sharedKeyCredential -
+ * @private
+ * @see https://html.spec.whatwg.org/multipage/semantics-other.html#case-sensitivity-of-selectors
*/
-function generateBlobSASQueryParameters20150405(blobSASSignatureValues, sharedKeyCredential) {
- blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues);
- if (!blobSASSignatureValues.identifier &&
- !(blobSASSignatureValues.permissions && blobSASSignatureValues.expiresOn)) {
- throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided.");
- }
- let resource = "c";
- if (blobSASSignatureValues.blobName) {
- resource = "b";
- }
- // Calling parse and toString guarantees the proper ordering and throws on invalid characters.
- let verifiedPermissions;
- if (blobSASSignatureValues.permissions) {
- if (blobSASSignatureValues.blobName) {
- verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString();
- }
- else {
- verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString();
- }
- }
- // Signature is generated on the un-url-encoded values.
- const stringToSign = [
- verifiedPermissions ? verifiedPermissions : "",
- blobSASSignatureValues.startsOn
- ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false)
- : "",
- blobSASSignatureValues.expiresOn
- ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false)
- : "",
- getCanonicalName(sharedKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName),
- blobSASSignatureValues.identifier,
- blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "",
- blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "",
- blobSASSignatureValues.version,
- blobSASSignatureValues.cacheControl ? blobSASSignatureValues.cacheControl : "",
- blobSASSignatureValues.contentDisposition ? blobSASSignatureValues.contentDisposition : "",
- blobSASSignatureValues.contentEncoding ? blobSASSignatureValues.contentEncoding : "",
- blobSASSignatureValues.contentLanguage ? blobSASSignatureValues.contentLanguage : "",
- blobSASSignatureValues.contentType ? blobSASSignatureValues.contentType : "",
- ].join("\n");
- const signature = sharedKeyCredential.computeHMACSHA256(stringToSign);
- return new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, undefined, undefined, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType);
+var caseInsensitiveAttributes = new Set([
+ "accept",
+ "accept-charset",
+ "align",
+ "alink",
+ "axis",
+ "bgcolor",
+ "charset",
+ "checked",
+ "clear",
+ "codetype",
+ "color",
+ "compact",
+ "declare",
+ "defer",
+ "dir",
+ "direction",
+ "disabled",
+ "enctype",
+ "face",
+ "frame",
+ "hreflang",
+ "http-equiv",
+ "lang",
+ "language",
+ "link",
+ "media",
+ "method",
+ "multiple",
+ "nohref",
+ "noresize",
+ "noshade",
+ "nowrap",
+ "readonly",
+ "rel",
+ "rev",
+ "rules",
+ "scope",
+ "scrolling",
+ "selected",
+ "shape",
+ "target",
+ "text",
+ "type",
+ "valign",
+ "valuetype",
+ "vlink",
+]);
+function shouldIgnoreCase(selector, options) {
+ return typeof selector.ignoreCase === "boolean"
+ ? selector.ignoreCase
+ : selector.ignoreCase === "quirks"
+ ? !!options.quirksMode
+ : !options.xmlMode && caseInsensitiveAttributes.has(selector.name);
}
/**
- * ONLY AVAILABLE IN NODE.JS RUNTIME.
- * IMPLEMENTATION FOR API VERSION FROM 2018-11-09.
- *
- * Creates an instance of SASQueryParameters.
- *
- * Only accepts required settings needed to create a SAS. For optional settings please
- * set corresponding properties directly, such as permissions, startsOn and identifier.
- *
- * WARNING: When identifier is not provided, permissions and expiresOn are required.
- * You MUST assign value to identifier or expiresOn & permissions manually if you initial with
- * this constructor.
- *
- * @param blobSASSignatureValues -
- * @param sharedKeyCredential -
+ * Attribute selectors
*/
-function generateBlobSASQueryParameters20181109(blobSASSignatureValues, sharedKeyCredential) {
- blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues);
- if (!blobSASSignatureValues.identifier &&
- !(blobSASSignatureValues.permissions && blobSASSignatureValues.expiresOn)) {
- throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided.");
- }
- let resource = "c";
- let timestamp = blobSASSignatureValues.snapshotTime;
- if (blobSASSignatureValues.blobName) {
- resource = "b";
- if (blobSASSignatureValues.snapshotTime) {
- resource = "bs";
- }
- else if (blobSASSignatureValues.versionId) {
- resource = "bv";
- timestamp = blobSASSignatureValues.versionId;
+exports.attributeRules = {
+ equals: function (next, data, options) {
+ var adapter = options.adapter;
+ var name = data.name;
+ var value = data.value;
+ if (shouldIgnoreCase(data, options)) {
+ value = value.toLowerCase();
+ return function (elem) {
+ var attr = adapter.getAttributeValue(elem, name);
+ return (attr != null &&
+ attr.length === value.length &&
+ attr.toLowerCase() === value &&
+ next(elem));
+ };
}
- }
- // Calling parse and toString guarantees the proper ordering and throws on invalid characters.
- let verifiedPermissions;
- if (blobSASSignatureValues.permissions) {
- if (blobSASSignatureValues.blobName) {
- verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString();
+ return function (elem) {
+ return adapter.getAttributeValue(elem, name) === value && next(elem);
+ };
+ },
+ hyphen: function (next, data, options) {
+ var adapter = options.adapter;
+ var name = data.name;
+ var value = data.value;
+ var len = value.length;
+ if (shouldIgnoreCase(data, options)) {
+ value = value.toLowerCase();
+ return function hyphenIC(elem) {
+ var attr = adapter.getAttributeValue(elem, name);
+ return (attr != null &&
+ (attr.length === len || attr.charAt(len) === "-") &&
+ attr.substr(0, len).toLowerCase() === value &&
+ next(elem));
+ };
}
- else {
- verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString();
+ return function hyphen(elem) {
+ var attr = adapter.getAttributeValue(elem, name);
+ return (attr != null &&
+ (attr.length === len || attr.charAt(len) === "-") &&
+ attr.substr(0, len) === value &&
+ next(elem));
+ };
+ },
+ element: function (next, data, options) {
+ var adapter = options.adapter;
+ var name = data.name, value = data.value;
+ if (/\s/.test(value)) {
+ return boolbase_1.default.falseFunc;
}
- }
- // Signature is generated on the un-url-encoded values.
- const stringToSign = [
- verifiedPermissions ? verifiedPermissions : "",
- blobSASSignatureValues.startsOn
- ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false)
- : "",
- blobSASSignatureValues.expiresOn
- ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false)
- : "",
- getCanonicalName(sharedKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName),
- blobSASSignatureValues.identifier,
- blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "",
- blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "",
- blobSASSignatureValues.version,
- resource,
- timestamp,
- blobSASSignatureValues.cacheControl ? blobSASSignatureValues.cacheControl : "",
- blobSASSignatureValues.contentDisposition ? blobSASSignatureValues.contentDisposition : "",
- blobSASSignatureValues.contentEncoding ? blobSASSignatureValues.contentEncoding : "",
- blobSASSignatureValues.contentLanguage ? blobSASSignatureValues.contentLanguage : "",
- blobSASSignatureValues.contentType ? blobSASSignatureValues.contentType : "",
- ].join("\n");
- const signature = sharedKeyCredential.computeHMACSHA256(stringToSign);
- return new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, undefined, undefined, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType);
-}
-/**
- * ONLY AVAILABLE IN NODE.JS RUNTIME.
- * IMPLEMENTATION FOR API VERSION FROM 2020-12-06.
- *
- * Creates an instance of SASQueryParameters.
- *
- * Only accepts required settings needed to create a SAS. For optional settings please
- * set corresponding properties directly, such as permissions, startsOn and identifier.
- *
- * WARNING: When identifier is not provided, permissions and expiresOn are required.
- * You MUST assign value to identifier or expiresOn & permissions manually if you initial with
- * this constructor.
- *
- * @param blobSASSignatureValues -
- * @param sharedKeyCredential -
- */
-function generateBlobSASQueryParameters20201206(blobSASSignatureValues, sharedKeyCredential) {
- blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues);
- if (!blobSASSignatureValues.identifier &&
- !(blobSASSignatureValues.permissions && blobSASSignatureValues.expiresOn)) {
- throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided.");
- }
- let resource = "c";
- let timestamp = blobSASSignatureValues.snapshotTime;
- if (blobSASSignatureValues.blobName) {
- resource = "b";
- if (blobSASSignatureValues.snapshotTime) {
- resource = "bs";
+ var regex = new RegExp("(?:^|\\s)".concat(escapeRegex(value), "(?:$|\\s)"), shouldIgnoreCase(data, options) ? "i" : "");
+ return function element(elem) {
+ var attr = adapter.getAttributeValue(elem, name);
+ return (attr != null &&
+ attr.length >= value.length &&
+ regex.test(attr) &&
+ next(elem));
+ };
+ },
+ exists: function (next, _a, _b) {
+ var name = _a.name;
+ var adapter = _b.adapter;
+ return function (elem) { return adapter.hasAttrib(elem, name) && next(elem); };
+ },
+ start: function (next, data, options) {
+ var adapter = options.adapter;
+ var name = data.name;
+ var value = data.value;
+ var len = value.length;
+ if (len === 0) {
+ return boolbase_1.default.falseFunc;
}
- else if (blobSASSignatureValues.versionId) {
- resource = "bv";
- timestamp = blobSASSignatureValues.versionId;
+ if (shouldIgnoreCase(data, options)) {
+ value = value.toLowerCase();
+ return function (elem) {
+ var attr = adapter.getAttributeValue(elem, name);
+ return (attr != null &&
+ attr.length >= len &&
+ attr.substr(0, len).toLowerCase() === value &&
+ next(elem));
+ };
}
- }
- // Calling parse and toString guarantees the proper ordering and throws on invalid characters.
- let verifiedPermissions;
- if (blobSASSignatureValues.permissions) {
- if (blobSASSignatureValues.blobName) {
- verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString();
+ return function (elem) {
+ var _a;
+ return !!((_a = adapter.getAttributeValue(elem, name)) === null || _a === void 0 ? void 0 : _a.startsWith(value)) &&
+ next(elem);
+ };
+ },
+ end: function (next, data, options) {
+ var adapter = options.adapter;
+ var name = data.name;
+ var value = data.value;
+ var len = -value.length;
+ if (len === 0) {
+ return boolbase_1.default.falseFunc;
}
- else {
- verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString();
+ if (shouldIgnoreCase(data, options)) {
+ value = value.toLowerCase();
+ return function (elem) {
+ var _a;
+ return ((_a = adapter
+ .getAttributeValue(elem, name)) === null || _a === void 0 ? void 0 : _a.substr(len).toLowerCase()) === value && next(elem);
+ };
}
- }
- // Signature is generated on the un-url-encoded values.
- const stringToSign = [
- verifiedPermissions ? verifiedPermissions : "",
- blobSASSignatureValues.startsOn
- ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false)
- : "",
- blobSASSignatureValues.expiresOn
- ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false)
- : "",
- getCanonicalName(sharedKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName),
- blobSASSignatureValues.identifier,
- blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "",
- blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "",
- blobSASSignatureValues.version,
- resource,
- timestamp,
- blobSASSignatureValues.encryptionScope,
- blobSASSignatureValues.cacheControl ? blobSASSignatureValues.cacheControl : "",
- blobSASSignatureValues.contentDisposition ? blobSASSignatureValues.contentDisposition : "",
- blobSASSignatureValues.contentEncoding ? blobSASSignatureValues.contentEncoding : "",
- blobSASSignatureValues.contentLanguage ? blobSASSignatureValues.contentLanguage : "",
- blobSASSignatureValues.contentType ? blobSASSignatureValues.contentType : "",
- ].join("\n");
- const signature = sharedKeyCredential.computeHMACSHA256(stringToSign);
- return new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, undefined, undefined, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, undefined, undefined, undefined, blobSASSignatureValues.encryptionScope);
-}
-/**
- * ONLY AVAILABLE IN NODE.JS RUNTIME.
- * IMPLEMENTATION FOR API VERSION FROM 2018-11-09.
- *
- * Creates an instance of SASQueryParameters.
- *
- * Only accepts required settings needed to create a SAS. For optional settings please
- * set corresponding properties directly, such as permissions, startsOn.
- *
- * WARNING: identifier will be ignored, permissions and expiresOn are required.
- *
- * @param blobSASSignatureValues -
- * @param userDelegationKeyCredential -
- */
-function generateBlobSASQueryParametersUDK20181109(blobSASSignatureValues, userDelegationKeyCredential) {
- blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues);
- // Stored access policies are not supported for a user delegation SAS.
- if (!blobSASSignatureValues.permissions || !blobSASSignatureValues.expiresOn) {
- throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");
- }
- let resource = "c";
- let timestamp = blobSASSignatureValues.snapshotTime;
- if (blobSASSignatureValues.blobName) {
- resource = "b";
- if (blobSASSignatureValues.snapshotTime) {
- resource = "bs";
+ return function (elem) {
+ var _a;
+ return !!((_a = adapter.getAttributeValue(elem, name)) === null || _a === void 0 ? void 0 : _a.endsWith(value)) &&
+ next(elem);
+ };
+ },
+ any: function (next, data, options) {
+ var adapter = options.adapter;
+ var name = data.name, value = data.value;
+ if (value === "") {
+ return boolbase_1.default.falseFunc;
}
- else if (blobSASSignatureValues.versionId) {
- resource = "bv";
- timestamp = blobSASSignatureValues.versionId;
+ if (shouldIgnoreCase(data, options)) {
+ var regex_1 = new RegExp(escapeRegex(value), "i");
+ return function anyIC(elem) {
+ var attr = adapter.getAttributeValue(elem, name);
+ return (attr != null &&
+ attr.length >= value.length &&
+ regex_1.test(attr) &&
+ next(elem));
+ };
}
- }
- // Calling parse and toString guarantees the proper ordering and throws on invalid characters.
- let verifiedPermissions;
- if (blobSASSignatureValues.permissions) {
- if (blobSASSignatureValues.blobName) {
- verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString();
+ return function (elem) {
+ var _a;
+ return !!((_a = adapter.getAttributeValue(elem, name)) === null || _a === void 0 ? void 0 : _a.includes(value)) &&
+ next(elem);
+ };
+ },
+ not: function (next, data, options) {
+ var adapter = options.adapter;
+ var name = data.name;
+ var value = data.value;
+ if (value === "") {
+ return function (elem) {
+ return !!adapter.getAttributeValue(elem, name) && next(elem);
+ };
}
- else {
- verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString();
+ else if (shouldIgnoreCase(data, options)) {
+ value = value.toLowerCase();
+ return function (elem) {
+ var attr = adapter.getAttributeValue(elem, name);
+ return ((attr == null ||
+ attr.length !== value.length ||
+ attr.toLowerCase() !== value) &&
+ next(elem));
+ };
}
+ return function (elem) {
+ return adapter.getAttributeValue(elem, name) !== value && next(elem);
+ };
+ },
+};
+//# sourceMappingURL=attributes.js.map
+
+/***/ }),
+
+/***/ 22417:
+/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
+
+"use strict";
+
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
}
- // Signature is generated on the un-url-encoded values.
- const stringToSign = [
- verifiedPermissions ? verifiedPermissions : "",
- blobSASSignatureValues.startsOn
- ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false)
- : "",
- blobSASSignatureValues.expiresOn
- ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false)
- : "",
- getCanonicalName(userDelegationKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName),
- userDelegationKeyCredential.userDelegationKey.signedObjectId,
- userDelegationKeyCredential.userDelegationKey.signedTenantId,
- userDelegationKeyCredential.userDelegationKey.signedStartsOn
- ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false)
- : "",
- userDelegationKeyCredential.userDelegationKey.signedExpiresOn
- ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false)
- : "",
- userDelegationKeyCredential.userDelegationKey.signedService,
- userDelegationKeyCredential.userDelegationKey.signedVersion,
- blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "",
- blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "",
- blobSASSignatureValues.version,
- resource,
- timestamp,
- blobSASSignatureValues.cacheControl,
- blobSASSignatureValues.contentDisposition,
- blobSASSignatureValues.contentEncoding,
- blobSASSignatureValues.contentLanguage,
- blobSASSignatureValues.contentType,
- ].join("\n");
- const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign);
- return new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, undefined, undefined, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey);
-}
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.compileToken = exports.compileUnsafe = exports.compile = void 0;
+var css_what_1 = __nccwpck_require__(39284);
+var boolbase_1 = __importDefault(__nccwpck_require__(344));
+var sort_js_1 = __importStar(__nccwpck_require__(60490));
+var general_js_1 = __nccwpck_require__(8048);
+var subselects_js_1 = __nccwpck_require__(37477);
/**
- * ONLY AVAILABLE IN NODE.JS RUNTIME.
- * IMPLEMENTATION FOR API VERSION FROM 2020-02-10.
- *
- * Creates an instance of SASQueryParameters.
- *
- * Only accepts required settings needed to create a SAS. For optional settings please
- * set corresponding properties directly, such as permissions, startsOn.
- *
- * WARNING: identifier will be ignored, permissions and expiresOn are required.
+ * Compiles a selector to an executable function.
*
- * @param blobSASSignatureValues -
- * @param userDelegationKeyCredential -
+ * @param selector Selector to compile.
+ * @param options Compilation options.
+ * @param context Optional context for the selector.
*/
-function generateBlobSASQueryParametersUDK20200210(blobSASSignatureValues, userDelegationKeyCredential) {
- blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues);
- // Stored access policies are not supported for a user delegation SAS.
- if (!blobSASSignatureValues.permissions || !blobSASSignatureValues.expiresOn) {
- throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");
- }
- let resource = "c";
- let timestamp = blobSASSignatureValues.snapshotTime;
- if (blobSASSignatureValues.blobName) {
- resource = "b";
- if (blobSASSignatureValues.snapshotTime) {
- resource = "bs";
- }
- else if (blobSASSignatureValues.versionId) {
- resource = "bv";
- timestamp = blobSASSignatureValues.versionId;
- }
- }
- // Calling parse and toString guarantees the proper ordering and throws on invalid characters.
- let verifiedPermissions;
- if (blobSASSignatureValues.permissions) {
- if (blobSASSignatureValues.blobName) {
- verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString();
- }
- else {
- verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString();
- }
- }
- // Signature is generated on the un-url-encoded values.
- const stringToSign = [
- verifiedPermissions ? verifiedPermissions : "",
- blobSASSignatureValues.startsOn
- ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false)
- : "",
- blobSASSignatureValues.expiresOn
- ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false)
- : "",
- getCanonicalName(userDelegationKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName),
- userDelegationKeyCredential.userDelegationKey.signedObjectId,
- userDelegationKeyCredential.userDelegationKey.signedTenantId,
- userDelegationKeyCredential.userDelegationKey.signedStartsOn
- ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false)
- : "",
- userDelegationKeyCredential.userDelegationKey.signedExpiresOn
- ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false)
- : "",
- userDelegationKeyCredential.userDelegationKey.signedService,
- userDelegationKeyCredential.userDelegationKey.signedVersion,
- blobSASSignatureValues.preauthorizedAgentObjectId,
- undefined, // agentObjectId
- blobSASSignatureValues.correlationId,
- blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "",
- blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "",
- blobSASSignatureValues.version,
- resource,
- timestamp,
- blobSASSignatureValues.cacheControl,
- blobSASSignatureValues.contentDisposition,
- blobSASSignatureValues.contentEncoding,
- blobSASSignatureValues.contentLanguage,
- blobSASSignatureValues.contentType,
- ].join("\n");
- const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign);
- return new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, undefined, undefined, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, blobSASSignatureValues.preauthorizedAgentObjectId, blobSASSignatureValues.correlationId);
+function compile(selector, options, context) {
+ var next = compileUnsafe(selector, options, context);
+ return (0, subselects_js_1.ensureIsTag)(next, options.adapter);
}
-/**
- * ONLY AVAILABLE IN NODE.JS RUNTIME.
- * IMPLEMENTATION FOR API VERSION FROM 2020-12-06.
- *
- * Creates an instance of SASQueryParameters.
- *
- * Only accepts required settings needed to create a SAS. For optional settings please
- * set corresponding properties directly, such as permissions, startsOn.
- *
- * WARNING: identifier will be ignored, permissions and expiresOn are required.
- *
- * @param blobSASSignatureValues -
- * @param userDelegationKeyCredential -
+exports.compile = compile;
+function compileUnsafe(selector, options, context) {
+ var token = typeof selector === "string" ? (0, css_what_1.parse)(selector) : selector;
+ return compileToken(token, options, context);
+}
+exports.compileUnsafe = compileUnsafe;
+function includesScopePseudo(t) {
+ return (t.type === css_what_1.SelectorType.Pseudo &&
+ (t.name === "scope" ||
+ (Array.isArray(t.data) &&
+ t.data.some(function (data) { return data.some(includesScopePseudo); }))));
+}
+var DESCENDANT_TOKEN = { type: css_what_1.SelectorType.Descendant };
+var FLEXIBLE_DESCENDANT_TOKEN = {
+ type: "_flexibleDescendant",
+};
+var SCOPE_TOKEN = {
+ type: css_what_1.SelectorType.Pseudo,
+ name: "scope",
+ data: null,
+};
+/*
+ * CSS 4 Spec (Draft): 3.4.1. Absolutizing a Relative Selector
+ * http://www.w3.org/TR/selectors4/#absolutizing
*/
-function generateBlobSASQueryParametersUDK20201206(blobSASSignatureValues, userDelegationKeyCredential) {
- blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues);
- // Stored access policies are not supported for a user delegation SAS.
- if (!blobSASSignatureValues.permissions || !blobSASSignatureValues.expiresOn) {
- throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");
- }
- let resource = "c";
- let timestamp = blobSASSignatureValues.snapshotTime;
- if (blobSASSignatureValues.blobName) {
- resource = "b";
- if (blobSASSignatureValues.snapshotTime) {
- resource = "bs";
- }
- else if (blobSASSignatureValues.versionId) {
- resource = "bv";
- timestamp = blobSASSignatureValues.versionId;
+function absolutize(token, _a, context) {
+ var adapter = _a.adapter;
+ // TODO Use better check if the context is a document
+ var hasContext = !!(context === null || context === void 0 ? void 0 : context.every(function (e) {
+ var parent = adapter.isTag(e) && adapter.getParent(e);
+ return e === subselects_js_1.PLACEHOLDER_ELEMENT || (parent && adapter.isTag(parent));
+ }));
+ for (var _i = 0, token_1 = token; _i < token_1.length; _i++) {
+ var t = token_1[_i];
+ if (t.length > 0 &&
+ (0, sort_js_1.isTraversal)(t[0]) &&
+ t[0].type !== css_what_1.SelectorType.Descendant) {
+ // Don't continue in else branch
}
- }
- // Calling parse and toString guarantees the proper ordering and throws on invalid characters.
- let verifiedPermissions;
- if (blobSASSignatureValues.permissions) {
- if (blobSASSignatureValues.blobName) {
- verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString();
+ else if (hasContext && !t.some(includesScopePseudo)) {
+ t.unshift(DESCENDANT_TOKEN);
}
else {
- verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString();
+ continue;
}
+ t.unshift(SCOPE_TOKEN);
}
- // Signature is generated on the un-url-encoded values.
- const stringToSign = [
- verifiedPermissions ? verifiedPermissions : "",
- blobSASSignatureValues.startsOn
- ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false)
- : "",
- blobSASSignatureValues.expiresOn
- ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false)
- : "",
- getCanonicalName(userDelegationKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName),
- userDelegationKeyCredential.userDelegationKey.signedObjectId,
- userDelegationKeyCredential.userDelegationKey.signedTenantId,
- userDelegationKeyCredential.userDelegationKey.signedStartsOn
- ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false)
- : "",
- userDelegationKeyCredential.userDelegationKey.signedExpiresOn
- ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false)
- : "",
- userDelegationKeyCredential.userDelegationKey.signedService,
- userDelegationKeyCredential.userDelegationKey.signedVersion,
- blobSASSignatureValues.preauthorizedAgentObjectId,
- undefined, // agentObjectId
- blobSASSignatureValues.correlationId,
- blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "",
- blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "",
- blobSASSignatureValues.version,
- resource,
- timestamp,
- blobSASSignatureValues.encryptionScope,
- blobSASSignatureValues.cacheControl,
- blobSASSignatureValues.contentDisposition,
- blobSASSignatureValues.contentEncoding,
- blobSASSignatureValues.contentLanguage,
- blobSASSignatureValues.contentType,
- ].join("\n");
- const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign);
- return new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, undefined, undefined, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, blobSASSignatureValues.preauthorizedAgentObjectId, blobSASSignatureValues.correlationId, blobSASSignatureValues.encryptionScope);
-}
-function getCanonicalName(accountName, containerName, blobName) {
- // Container: "/blob/account/containerName"
- // Blob: "/blob/account/containerName/blobName"
- const elements = [`/blob/${accountName}/${containerName}`];
- if (blobName) {
- elements.push(`/${blobName}`);
- }
- return elements.join("");
}
-function SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues) {
- const version = blobSASSignatureValues.version ? blobSASSignatureValues.version : SERVICE_VERSION;
- if (blobSASSignatureValues.snapshotTime && version < "2018-11-09") {
- throw RangeError("'version' must be >= '2018-11-09' when providing 'snapshotTime'.");
- }
- if (blobSASSignatureValues.blobName === undefined && blobSASSignatureValues.snapshotTime) {
- throw RangeError("Must provide 'blobName' when providing 'snapshotTime'.");
- }
- if (blobSASSignatureValues.versionId && version < "2019-10-10") {
- throw RangeError("'version' must be >= '2019-10-10' when providing 'versionId'.");
- }
- if (blobSASSignatureValues.blobName === undefined && blobSASSignatureValues.versionId) {
- throw RangeError("Must provide 'blobName' when providing 'versionId'.");
- }
- if (blobSASSignatureValues.permissions &&
- blobSASSignatureValues.permissions.setImmutabilityPolicy &&
- version < "2020-08-04") {
- throw RangeError("'version' must be >= '2020-08-04' when provided 'i' permission.");
- }
- if (blobSASSignatureValues.permissions &&
- blobSASSignatureValues.permissions.deleteVersion &&
- version < "2019-10-10") {
- throw RangeError("'version' must be >= '2019-10-10' when providing 'x' permission.");
- }
- if (blobSASSignatureValues.permissions &&
- blobSASSignatureValues.permissions.permanentDelete &&
- version < "2019-10-10") {
- throw RangeError("'version' must be >= '2019-10-10' when providing 'y' permission.");
- }
- if (blobSASSignatureValues.permissions &&
- blobSASSignatureValues.permissions.tag &&
- version < "2019-12-12") {
- throw RangeError("'version' must be >= '2019-12-12' when providing 't' permission.");
- }
- if (version < "2020-02-10" &&
- blobSASSignatureValues.permissions &&
- (blobSASSignatureValues.permissions.move || blobSASSignatureValues.permissions.execute)) {
- throw RangeError("'version' must be >= '2020-02-10' when providing the 'm' or 'e' permission.");
+function compileToken(token, options, context) {
+ var _a;
+ token.forEach(sort_js_1.default);
+ context = (_a = options.context) !== null && _a !== void 0 ? _a : context;
+ var isArrayContext = Array.isArray(context);
+ var finalContext = context && (Array.isArray(context) ? context : [context]);
+ // Check if the selector is relative
+ if (options.relativeSelector !== false) {
+ absolutize(token, options, finalContext);
}
- if (version < "2021-04-10" &&
- blobSASSignatureValues.permissions &&
- blobSASSignatureValues.permissions.filterByTags) {
- throw RangeError("'version' must be >= '2021-04-10' when providing the 'f' permission.");
+ else if (token.some(function (t) { return t.length > 0 && (0, sort_js_1.isTraversal)(t[0]); })) {
+ throw new Error("Relative selectors are not allowed when the `relativeSelector` option is disabled");
}
- if (version < "2020-02-10" &&
- (blobSASSignatureValues.preauthorizedAgentObjectId || blobSASSignatureValues.correlationId)) {
- throw RangeError("'version' must be >= '2020-02-10' when providing 'preauthorizedAgentObjectId' or 'correlationId'.");
+ var shouldTestNextSiblings = false;
+ var query = token
+ .map(function (rules) {
+ if (rules.length >= 2) {
+ var first = rules[0], second = rules[1];
+ if (first.type !== css_what_1.SelectorType.Pseudo ||
+ first.name !== "scope") {
+ // Ignore
+ }
+ else if (isArrayContext &&
+ second.type === css_what_1.SelectorType.Descendant) {
+ rules[1] = FLEXIBLE_DESCENDANT_TOKEN;
+ }
+ else if (second.type === css_what_1.SelectorType.Adjacent ||
+ second.type === css_what_1.SelectorType.Sibling) {
+ shouldTestNextSiblings = true;
+ }
+ }
+ return compileRules(rules, options, finalContext);
+ })
+ .reduce(reduceRules, boolbase_1.default.falseFunc);
+ query.shouldTestNextSiblings = shouldTestNextSiblings;
+ return query;
+}
+exports.compileToken = compileToken;
+function compileRules(rules, options, context) {
+ var _a;
+ return rules.reduce(function (previous, rule) {
+ return previous === boolbase_1.default.falseFunc
+ ? boolbase_1.default.falseFunc
+ : (0, general_js_1.compileGeneralSelector)(previous, rule, options, context, compileToken);
+ }, (_a = options.rootFunc) !== null && _a !== void 0 ? _a : boolbase_1.default.trueFunc);
+}
+function reduceRules(a, b) {
+ if (b === boolbase_1.default.falseFunc || a === boolbase_1.default.trueFunc) {
+ return a;
}
- if (blobSASSignatureValues.encryptionScope && version < "2020-12-06") {
- throw RangeError("'version' must be >= '2020-12-06' when provided 'encryptionScope' in SAS.");
+ if (a === boolbase_1.default.falseFunc || b === boolbase_1.default.trueFunc) {
+ return b;
}
- blobSASSignatureValues.version = version;
- return blobSASSignatureValues;
+ return function combine(elem) {
+ return a(elem) || b(elem);
+ };
}
+//# sourceMappingURL=compile.js.map
-// Copyright (c) Microsoft Corporation.
-// Licensed under the MIT license.
-/**
- * A client that manages leases for a {@link ContainerClient} or a {@link BlobClient}.
- */
-class BlobLeaseClient {
- /**
- * Gets the lease Id.
- *
- * @readonly
- */
- get leaseId() {
- return this._leaseId;
- }
- /**
- * Gets the url.
- *
- * @readonly
- */
- get url() {
- return this._url;
+/***/ }),
+
+/***/ 8048:
+/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
+
+"use strict";
+
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.compileGeneralSelector = void 0;
+var attributes_js_1 = __nccwpck_require__(18211);
+var index_js_1 = __nccwpck_require__(69360);
+var css_what_1 = __nccwpck_require__(39284);
+function getElementParent(node, adapter) {
+ var parent = adapter.getParent(node);
+ if (parent && adapter.isTag(parent)) {
+ return parent;
}
- /**
- * Creates an instance of BlobLeaseClient.
- * @param client - The client to make the lease operation requests.
- * @param leaseId - Initial proposed lease id.
- */
- constructor(client, leaseId) {
- const clientContext = client.storageClientContext;
- this._url = client.url;
- if (client.name === undefined) {
- this._isContainer = true;
- this._containerOrBlobOperation = clientContext.container;
+ return null;
+}
+/*
+ * All available rules
+ */
+function compileGeneralSelector(next, selector, options, context, compileToken) {
+ var adapter = options.adapter, equals = options.equals;
+ switch (selector.type) {
+ case css_what_1.SelectorType.PseudoElement: {
+ throw new Error("Pseudo-elements are not supported by css-select");
}
- else {
- this._isContainer = false;
- this._containerOrBlobOperation = clientContext.blob;
+ case css_what_1.SelectorType.ColumnCombinator: {
+ throw new Error("Column combinators are not yet supported by css-select");
}
- if (!leaseId) {
- leaseId = coreUtil.randomUUID();
+ case css_what_1.SelectorType.Attribute: {
+ if (selector.namespace != null) {
+ throw new Error("Namespaced attributes are not yet supported by css-select");
+ }
+ if (!options.xmlMode || options.lowerCaseAttributeNames) {
+ selector.name = selector.name.toLowerCase();
+ }
+ return attributes_js_1.attributeRules[selector.action](next, selector, options);
}
- this._leaseId = leaseId;
- }
- /**
- * Establishes and manages a lock on a container for delete operations, or on a blob
- * for write and delete operations.
- * The lock duration can be 15 to 60 seconds, or can be infinite.
- * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container
- * and
- * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob
- *
- * @param duration - Must be between 15 to 60 seconds, or infinite (-1)
- * @param options - option to configure lease management operations.
- * @returns Response data for acquire lease operation.
- */
- async acquireLease(duration, options = {}) {
- var _a, _b, _c, _d, _e;
- if (this._isContainer &&
- ((((_a = options.conditions) === null || _a === void 0 ? void 0 : _a.ifMatch) && ((_b = options.conditions) === null || _b === void 0 ? void 0 : _b.ifMatch) !== ETagNone) ||
- (((_c = options.conditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch) && ((_d = options.conditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch) !== ETagNone) ||
- ((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) {
- throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.");
+ case css_what_1.SelectorType.Pseudo: {
+ return (0, index_js_1.compilePseudoSelector)(next, selector, options, context, compileToken);
}
- return tracingClient.withSpan("BlobLeaseClient-acquireLease", options, async (updatedOptions) => {
- var _a;
- return assertResponse(await this._containerOrBlobOperation.acquireLease({
- abortSignal: options.abortSignal,
- duration,
- modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }),
- proposedLeaseId: this._leaseId,
- tracingOptions: updatedOptions.tracingOptions,
- }));
- });
- }
- /**
- * To change the ID of the lease.
- * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container
- * and
- * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob
- *
- * @param proposedLeaseId - the proposed new lease Id.
- * @param options - option to configure lease management operations.
- * @returns Response data for change lease operation.
- */
- async changeLease(proposedLeaseId, options = {}) {
- var _a, _b, _c, _d, _e;
- if (this._isContainer &&
- ((((_a = options.conditions) === null || _a === void 0 ? void 0 : _a.ifMatch) && ((_b = options.conditions) === null || _b === void 0 ? void 0 : _b.ifMatch) !== ETagNone) ||
- (((_c = options.conditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch) && ((_d = options.conditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch) !== ETagNone) ||
- ((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) {
- throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.");
+ // Tags
+ case css_what_1.SelectorType.Tag: {
+ if (selector.namespace != null) {
+ throw new Error("Namespaced tag names are not yet supported by css-select");
+ }
+ var name_1 = selector.name;
+ if (!options.xmlMode || options.lowerCaseTags) {
+ name_1 = name_1.toLowerCase();
+ }
+ return function tag(elem) {
+ return adapter.getName(elem) === name_1 && next(elem);
+ };
}
- return tracingClient.withSpan("BlobLeaseClient-changeLease", options, async (updatedOptions) => {
- var _a;
- const response = assertResponse(await this._containerOrBlobOperation.changeLease(this._leaseId, proposedLeaseId, {
- abortSignal: options.abortSignal,
- modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }),
- tracingOptions: updatedOptions.tracingOptions,
- }));
- this._leaseId = proposedLeaseId;
- return response;
- });
- }
- /**
- * To free the lease if it is no longer needed so that another client may
- * immediately acquire a lease against the container or the blob.
- * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container
- * and
- * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob
- *
- * @param options - option to configure lease management operations.
- * @returns Response data for release lease operation.
- */
- async releaseLease(options = {}) {
- var _a, _b, _c, _d, _e;
- if (this._isContainer &&
- ((((_a = options.conditions) === null || _a === void 0 ? void 0 : _a.ifMatch) && ((_b = options.conditions) === null || _b === void 0 ? void 0 : _b.ifMatch) !== ETagNone) ||
- (((_c = options.conditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch) && ((_d = options.conditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch) !== ETagNone) ||
- ((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) {
- throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.");
+ // Traversal
+ case css_what_1.SelectorType.Descendant: {
+ if (options.cacheResults === false ||
+ typeof WeakSet === "undefined") {
+ return function descendant(elem) {
+ var current = elem;
+ while ((current = getElementParent(current, adapter))) {
+ if (next(current)) {
+ return true;
+ }
+ }
+ return false;
+ };
+ }
+ // @ts-expect-error `ElementNode` is not extending object
+ var isFalseCache_1 = new WeakSet();
+ return function cachedDescendant(elem) {
+ var current = elem;
+ while ((current = getElementParent(current, adapter))) {
+ if (!isFalseCache_1.has(current)) {
+ if (adapter.isTag(current) && next(current)) {
+ return true;
+ }
+ isFalseCache_1.add(current);
+ }
+ }
+ return false;
+ };
}
- return tracingClient.withSpan("BlobLeaseClient-releaseLease", options, async (updatedOptions) => {
- var _a;
- return assertResponse(await this._containerOrBlobOperation.releaseLease(this._leaseId, {
- abortSignal: options.abortSignal,
- modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }),
- tracingOptions: updatedOptions.tracingOptions,
- }));
- });
- }
- /**
- * To renew the lease.
- * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container
- * and
- * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob
- *
- * @param options - Optional option to configure lease management operations.
- * @returns Response data for renew lease operation.
- */
- async renewLease(options = {}) {
- var _a, _b, _c, _d, _e;
- if (this._isContainer &&
- ((((_a = options.conditions) === null || _a === void 0 ? void 0 : _a.ifMatch) && ((_b = options.conditions) === null || _b === void 0 ? void 0 : _b.ifMatch) !== ETagNone) ||
- (((_c = options.conditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch) && ((_d = options.conditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch) !== ETagNone) ||
- ((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) {
- throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.");
+ case "_flexibleDescendant": {
+ // Include element itself, only used while querying an array
+ return function flexibleDescendant(elem) {
+ var current = elem;
+ do {
+ if (next(current))
+ return true;
+ } while ((current = getElementParent(current, adapter)));
+ return false;
+ };
+ }
+ case css_what_1.SelectorType.Parent: {
+ return function parent(elem) {
+ return adapter
+ .getChildren(elem)
+ .some(function (elem) { return adapter.isTag(elem) && next(elem); });
+ };
+ }
+ case css_what_1.SelectorType.Child: {
+ return function child(elem) {
+ var parent = adapter.getParent(elem);
+ return parent != null && adapter.isTag(parent) && next(parent);
+ };
+ }
+ case css_what_1.SelectorType.Sibling: {
+ return function sibling(elem) {
+ var siblings = adapter.getSiblings(elem);
+ for (var i = 0; i < siblings.length; i++) {
+ var currentSibling = siblings[i];
+ if (equals(elem, currentSibling))
+ break;
+ if (adapter.isTag(currentSibling) && next(currentSibling)) {
+ return true;
+ }
+ }
+ return false;
+ };
+ }
+ case css_what_1.SelectorType.Adjacent: {
+ if (adapter.prevElementSibling) {
+ return function adjacent(elem) {
+ var previous = adapter.prevElementSibling(elem);
+ return previous != null && next(previous);
+ };
+ }
+ return function adjacent(elem) {
+ var siblings = adapter.getSiblings(elem);
+ var lastElement;
+ for (var i = 0; i < siblings.length; i++) {
+ var currentSibling = siblings[i];
+ if (equals(elem, currentSibling))
+ break;
+ if (adapter.isTag(currentSibling)) {
+ lastElement = currentSibling;
+ }
+ }
+ return !!lastElement && next(lastElement);
+ };
+ }
+ case css_what_1.SelectorType.Universal: {
+ if (selector.namespace != null && selector.namespace !== "*") {
+ throw new Error("Namespaced universal selectors are not yet supported by css-select");
+ }
+ return next;
}
- return tracingClient.withSpan("BlobLeaseClient-renewLease", options, async (updatedOptions) => {
- var _a;
- return this._containerOrBlobOperation.renewLease(this._leaseId, {
- abortSignal: options.abortSignal,
- modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }),
- tracingOptions: updatedOptions.tracingOptions,
- });
- });
}
- /**
- * To end the lease but ensure that another client cannot acquire a new lease
- * until the current lease period has expired.
- * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container
- * and
- * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob
- *
- * @param breakPeriod - Break period
- * @param options - Optional options to configure lease management operations.
- * @returns Response data for break lease operation.
+}
+exports.compileGeneralSelector = compileGeneralSelector;
+//# sourceMappingURL=general.js.map
+
+/***/ }),
+
+/***/ 87856:
+/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
+
+"use strict";
+
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.aliases = exports.pseudos = exports.filters = exports.is = exports.selectOne = exports.selectAll = exports.prepareContext = exports._compileToken = exports._compileUnsafe = exports.compile = void 0;
+var DomUtils = __importStar(__nccwpck_require__(96178));
+var boolbase_1 = __importDefault(__nccwpck_require__(344));
+var compile_js_1 = __nccwpck_require__(22417);
+var subselects_js_1 = __nccwpck_require__(37477);
+var defaultEquals = function (a, b) { return a === b; };
+var defaultOptions = {
+ adapter: DomUtils,
+ equals: defaultEquals,
+};
+function convertOptionFormats(options) {
+ var _a, _b, _c, _d;
+ /*
+ * We force one format of options to the other one.
*/
- async breakLease(breakPeriod, options = {}) {
- var _a, _b, _c, _d, _e;
- if (this._isContainer &&
- ((((_a = options.conditions) === null || _a === void 0 ? void 0 : _a.ifMatch) && ((_b = options.conditions) === null || _b === void 0 ? void 0 : _b.ifMatch) !== ETagNone) ||
- (((_c = options.conditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch) && ((_d = options.conditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch) !== ETagNone) ||
- ((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) {
- throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.");
+ // @ts-expect-error Default options may have incompatible `Node` / `ElementNode`.
+ var opts = options !== null && options !== void 0 ? options : defaultOptions;
+ // @ts-expect-error Same as above.
+ (_a = opts.adapter) !== null && _a !== void 0 ? _a : (opts.adapter = DomUtils);
+ // @ts-expect-error `equals` does not exist on `Options`
+ (_b = opts.equals) !== null && _b !== void 0 ? _b : (opts.equals = (_d = (_c = opts.adapter) === null || _c === void 0 ? void 0 : _c.equals) !== null && _d !== void 0 ? _d : defaultEquals);
+ return opts;
+}
+function wrapCompile(func) {
+ return function addAdapter(selector, options, context) {
+ var opts = convertOptionFormats(options);
+ return func(selector, opts, context);
+ };
+}
+/**
+ * Compiles the query, returns a function.
+ */
+exports.compile = wrapCompile(compile_js_1.compile);
+exports._compileUnsafe = wrapCompile(compile_js_1.compileUnsafe);
+exports._compileToken = wrapCompile(compile_js_1.compileToken);
+function getSelectorFunc(searchFunc) {
+ return function select(query, elements, options) {
+ var opts = convertOptionFormats(options);
+ if (typeof query !== "function") {
+ query = (0, compile_js_1.compileUnsafe)(query, opts, elements);
}
- return tracingClient.withSpan("BlobLeaseClient-breakLease", options, async (updatedOptions) => {
- var _a;
- const operationOptions = {
- abortSignal: options.abortSignal,
- breakPeriod,
- modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }),
- tracingOptions: updatedOptions.tracingOptions,
- };
- return assertResponse(await this._containerOrBlobOperation.breakLease(operationOptions));
- });
+ var filteredElements = prepareContext(elements, opts.adapter, query.shouldTestNextSiblings);
+ return searchFunc(query, filteredElements, opts);
+ };
+}
+function prepareContext(elems, adapter, shouldTestNextSiblings) {
+ if (shouldTestNextSiblings === void 0) { shouldTestNextSiblings = false; }
+ /*
+ * Add siblings if the query requires them.
+ * See https://github.com/fb55/css-select/pull/43#issuecomment-225414692
+ */
+ if (shouldTestNextSiblings) {
+ elems = appendNextSiblings(elems, adapter);
+ }
+ return Array.isArray(elems)
+ ? adapter.removeSubsets(elems)
+ : adapter.getChildren(elems);
+}
+exports.prepareContext = prepareContext;
+function appendNextSiblings(elem, adapter) {
+ // Order matters because jQuery seems to check the children before the siblings
+ var elems = Array.isArray(elem) ? elem.slice(0) : [elem];
+ var elemsLength = elems.length;
+ for (var i = 0; i < elemsLength; i++) {
+ var nextSiblings = (0, subselects_js_1.getNextSiblings)(elems[i], adapter);
+ elems.push.apply(elems, nextSiblings);
}
+ return elems;
}
-
-// Copyright (c) Microsoft Corporation.
-// Licensed under the MIT license.
/**
- * ONLY AVAILABLE IN NODE.JS RUNTIME.
+ * @template Node The generic Node type for the DOM adapter being used.
+ * @template ElementNode The Node type for elements for the DOM adapter being used.
+ * @param elems Elements to query. If it is an element, its children will be queried..
+ * @param query can be either a CSS selector string or a compiled query function.
+ * @param [options] options for querying the document.
+ * @see compile for supported selector queries.
+ * @returns All matching elements.
*
- * A Node.js ReadableStream will internally retry when internal ReadableStream unexpected ends.
*/
-class RetriableReadableStream extends stream.Readable {
- /**
- * Creates an instance of RetriableReadableStream.
- *
- * @param source - The current ReadableStream returned from getter
- * @param getter - A method calling downloading request returning
- * a new ReadableStream from specified offset
- * @param offset - Offset position in original data source to read
- * @param count - How much data in original data source to read
- * @param options -
- */
- constructor(source, getter, offset, count, options = {}) {
- super({ highWaterMark: options.highWaterMark });
- this.retries = 0;
- this.sourceDataHandler = (data) => {
- if (this.options.doInjectErrorOnce) {
- this.options.doInjectErrorOnce = undefined;
- this.source.pause();
- this.sourceErrorOrEndHandler();
- this.source.destroy();
- return;
- }
- // console.log(
- // `Offset: ${this.offset}, Received ${data.length} from internal stream`
- // );
- this.offset += data.length;
- if (this.onProgress) {
- this.onProgress({ loadedBytes: this.offset - this.start });
- }
- if (!this.push(data)) {
- this.source.pause();
- }
+exports.selectAll = getSelectorFunc(function (query, elems, options) {
+ return query === boolbase_1.default.falseFunc || !elems || elems.length === 0
+ ? []
+ : options.adapter.findAll(query, elems);
+});
+/**
+ * @template Node The generic Node type for the DOM adapter being used.
+ * @template ElementNode The Node type for elements for the DOM adapter being used.
+ * @param elems Elements to query. If it is an element, its children will be queried..
+ * @param query can be either a CSS selector string or a compiled query function.
+ * @param [options] options for querying the document.
+ * @see compile for supported selector queries.
+ * @returns the first match, or null if there was no match.
+ */
+exports.selectOne = getSelectorFunc(function (query, elems, options) {
+ return query === boolbase_1.default.falseFunc || !elems || elems.length === 0
+ ? null
+ : options.adapter.findOne(query, elems);
+});
+/**
+ * Tests whether or not an element is matched by query.
+ *
+ * @template Node The generic Node type for the DOM adapter being used.
+ * @template ElementNode The Node type for elements for the DOM adapter being used.
+ * @param elem The element to test if it matches the query.
+ * @param query can be either a CSS selector string or a compiled query function.
+ * @param [options] options for querying the document.
+ * @see compile for supported selector queries.
+ * @returns
+ */
+function is(elem, query, options) {
+ var opts = convertOptionFormats(options);
+ return (typeof query === "function" ? query : (0, compile_js_1.compile)(query, opts))(elem);
+}
+exports.is = is;
+/**
+ * Alias for selectAll(query, elems, options).
+ * @see [compile] for supported selector queries.
+ */
+exports["default"] = exports.selectAll;
+// Export filters, pseudos and aliases to allow users to supply their own.
+/** @deprecated Use the `pseudos` option instead. */
+var index_js_1 = __nccwpck_require__(69360);
+Object.defineProperty(exports, "filters", ({ enumerable: true, get: function () { return index_js_1.filters; } }));
+Object.defineProperty(exports, "pseudos", ({ enumerable: true, get: function () { return index_js_1.pseudos; } }));
+Object.defineProperty(exports, "aliases", ({ enumerable: true, get: function () { return index_js_1.aliases; } }));
+//# sourceMappingURL=index.js.map
+
+/***/ }),
+
+/***/ 75972:
+/***/ ((__unused_webpack_module, exports) => {
+
+"use strict";
+
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.aliases = void 0;
+/**
+ * Aliases are pseudos that are expressed as selectors.
+ */
+exports.aliases = {
+ // Links
+ "any-link": ":is(a, area, link)[href]",
+ link: ":any-link:not(:visited)",
+ // Forms
+ // https://html.spec.whatwg.org/multipage/scripting.html#disabled-elements
+ disabled: ":is(\n :is(button, input, select, textarea, optgroup, option)[disabled],\n optgroup[disabled] > option,\n fieldset[disabled]:not(fieldset[disabled] legend:first-of-type *)\n )",
+ enabled: ":not(:disabled)",
+ checked: ":is(:is(input[type=radio], input[type=checkbox])[checked], option:selected)",
+ required: ":is(input, select, textarea)[required]",
+ optional: ":is(input, select, textarea):not([required])",
+ // JQuery extensions
+ // https://html.spec.whatwg.org/multipage/form-elements.html#concept-option-selectedness
+ selected: "option:is([selected], select:not([multiple]):not(:has(> option[selected])) > :first-of-type)",
+ checkbox: "[type=checkbox]",
+ file: "[type=file]",
+ password: "[type=password]",
+ radio: "[type=radio]",
+ reset: "[type=reset]",
+ image: "[type=image]",
+ submit: "[type=submit]",
+ parent: ":not(:empty)",
+ header: ":is(h1, h2, h3, h4, h5, h6)",
+ button: ":is(button, input[type=button])",
+ input: ":is(input, textarea, select, button)",
+ text: "input:is(:not([type!='']), [type=text])",
+};
+//# sourceMappingURL=aliases.js.map
+
+/***/ }),
+
+/***/ 17611:
+/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
+
+"use strict";
+
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.filters = void 0;
+var nth_check_1 = __importDefault(__nccwpck_require__(49675));
+var boolbase_1 = __importDefault(__nccwpck_require__(344));
+function getChildFunc(next, adapter) {
+ return function (elem) {
+ var parent = adapter.getParent(elem);
+ return parent != null && adapter.isTag(parent) && next(elem);
+ };
+}
+exports.filters = {
+ contains: function (next, text, _a) {
+ var adapter = _a.adapter;
+ return function contains(elem) {
+ return next(elem) && adapter.getText(elem).includes(text);
};
- this.sourceAbortedHandler = () => {
- const abortError = new abortController.AbortError("The operation was aborted.");
- this.destroy(abortError);
+ },
+ icontains: function (next, text, _a) {
+ var adapter = _a.adapter;
+ var itext = text.toLowerCase();
+ return function icontains(elem) {
+ return (next(elem) &&
+ adapter.getText(elem).toLowerCase().includes(itext));
};
- this.sourceErrorOrEndHandler = (err) => {
- if (err && err.name === "AbortError") {
- this.destroy(err);
- return;
- }
- // console.log(
- // `Source stream emits end or error, offset: ${
- // this.offset
- // }, dest end : ${this.end}`
- // );
- this.removeSourceEventHandlers();
- if (this.offset - 1 === this.end) {
- this.push(null);
+ },
+ // Location specific methods
+ "nth-child": function (next, rule, _a) {
+ var adapter = _a.adapter, equals = _a.equals;
+ var func = (0, nth_check_1.default)(rule);
+ if (func === boolbase_1.default.falseFunc)
+ return boolbase_1.default.falseFunc;
+ if (func === boolbase_1.default.trueFunc)
+ return getChildFunc(next, adapter);
+ return function nthChild(elem) {
+ var siblings = adapter.getSiblings(elem);
+ var pos = 0;
+ for (var i = 0; i < siblings.length; i++) {
+ if (equals(elem, siblings[i]))
+ break;
+ if (adapter.isTag(siblings[i])) {
+ pos++;
+ }
}
- else if (this.offset <= this.end) {
- // console.log(
- // `retries: ${this.retries}, max retries: ${this.maxRetries}`
- // );
- if (this.retries < this.maxRetryRequests) {
- this.retries += 1;
- this.getter(this.offset)
- .then((newSource) => {
- this.source = newSource;
- this.setSourceEventHandlers();
- return;
- })
- .catch((error) => {
- this.destroy(error);
- });
+ return func(pos) && next(elem);
+ };
+ },
+ "nth-last-child": function (next, rule, _a) {
+ var adapter = _a.adapter, equals = _a.equals;
+ var func = (0, nth_check_1.default)(rule);
+ if (func === boolbase_1.default.falseFunc)
+ return boolbase_1.default.falseFunc;
+ if (func === boolbase_1.default.trueFunc)
+ return getChildFunc(next, adapter);
+ return function nthLastChild(elem) {
+ var siblings = adapter.getSiblings(elem);
+ var pos = 0;
+ for (var i = siblings.length - 1; i >= 0; i--) {
+ if (equals(elem, siblings[i]))
+ break;
+ if (adapter.isTag(siblings[i])) {
+ pos++;
}
- else {
- this.destroy(new Error(`Data corruption failure: received less data than required and reached maxRetires limitation. Received data offset: ${this.offset - 1}, data needed offset: ${this.end}, retries: ${this.retries}, max retries: ${this.maxRetryRequests}`));
+ }
+ return func(pos) && next(elem);
+ };
+ },
+ "nth-of-type": function (next, rule, _a) {
+ var adapter = _a.adapter, equals = _a.equals;
+ var func = (0, nth_check_1.default)(rule);
+ if (func === boolbase_1.default.falseFunc)
+ return boolbase_1.default.falseFunc;
+ if (func === boolbase_1.default.trueFunc)
+ return getChildFunc(next, adapter);
+ return function nthOfType(elem) {
+ var siblings = adapter.getSiblings(elem);
+ var pos = 0;
+ for (var i = 0; i < siblings.length; i++) {
+ var currentSibling = siblings[i];
+ if (equals(elem, currentSibling))
+ break;
+ if (adapter.isTag(currentSibling) &&
+ adapter.getName(currentSibling) === adapter.getName(elem)) {
+ pos++;
}
}
- else {
- this.destroy(new Error(`Data corruption failure: Received more data than original request, data needed offset is ${this.end}, received offset: ${this.offset - 1}`));
+ return func(pos) && next(elem);
+ };
+ },
+ "nth-last-of-type": function (next, rule, _a) {
+ var adapter = _a.adapter, equals = _a.equals;
+ var func = (0, nth_check_1.default)(rule);
+ if (func === boolbase_1.default.falseFunc)
+ return boolbase_1.default.falseFunc;
+ if (func === boolbase_1.default.trueFunc)
+ return getChildFunc(next, adapter);
+ return function nthLastOfType(elem) {
+ var siblings = adapter.getSiblings(elem);
+ var pos = 0;
+ for (var i = siblings.length - 1; i >= 0; i--) {
+ var currentSibling = siblings[i];
+ if (equals(elem, currentSibling))
+ break;
+ if (adapter.isTag(currentSibling) &&
+ adapter.getName(currentSibling) === adapter.getName(elem)) {
+ pos++;
+ }
}
+ return func(pos) && next(elem);
};
- this.getter = getter;
- this.source = source;
- this.start = offset;
- this.offset = offset;
- this.end = offset + count - 1;
- this.maxRetryRequests =
- options.maxRetryRequests && options.maxRetryRequests >= 0 ? options.maxRetryRequests : 0;
- this.onProgress = options.onProgress;
- this.options = options;
- this.setSourceEventHandlers();
- }
- _read() {
- this.source.resume();
- }
- setSourceEventHandlers() {
- this.source.on("data", this.sourceDataHandler);
- this.source.on("end", this.sourceErrorOrEndHandler);
- this.source.on("error", this.sourceErrorOrEndHandler);
- // needed for Node14
- this.source.on("aborted", this.sourceAbortedHandler);
- }
- removeSourceEventHandlers() {
- this.source.removeListener("data", this.sourceDataHandler);
- this.source.removeListener("end", this.sourceErrorOrEndHandler);
- this.source.removeListener("error", this.sourceErrorOrEndHandler);
- this.source.removeListener("aborted", this.sourceAbortedHandler);
- }
- _destroy(error, callback) {
- // remove listener from source and release source
- this.removeSourceEventHandlers();
- this.source.destroy();
- callback(error === null ? undefined : error);
- }
-}
-
-// Copyright (c) Microsoft Corporation.
-// Licensed under the MIT license.
+ },
+ // TODO determine the actual root element
+ root: function (next, _rule, _a) {
+ var adapter = _a.adapter;
+ return function (elem) {
+ var parent = adapter.getParent(elem);
+ return (parent == null || !adapter.isTag(parent)) && next(elem);
+ };
+ },
+ scope: function (next, rule, options, context) {
+ var equals = options.equals;
+ if (!context || context.length === 0) {
+ // Equivalent to :root
+ return exports.filters["root"](next, rule, options);
+ }
+ if (context.length === 1) {
+ // NOTE: can't be unpacked, as :has uses this for side-effects
+ return function (elem) { return equals(context[0], elem) && next(elem); };
+ }
+ return function (elem) { return context.includes(elem) && next(elem); };
+ },
+ hover: dynamicStatePseudo("isHovered"),
+ visited: dynamicStatePseudo("isVisited"),
+ active: dynamicStatePseudo("isActive"),
+};
/**
- * ONLY AVAILABLE IN NODE.JS RUNTIME.
- *
- * BlobDownloadResponse implements BlobDownloadResponseParsed interface, and in Node.js runtime it will
- * automatically retry when internal read stream unexpected ends. (This kind of unexpected ends cannot
- * trigger retries defined in pipeline retry policy.)
+ * Dynamic state pseudos. These depend on optional Adapter methods.
*
- * The {@link readableStreamBody} stream will retry underlayer, you can just use it as a normal Node.js
- * Readable stream.
- */
-class BlobDownloadResponse {
- /**
- * Indicates that the service supports
- * requests for partial file content.
- *
- * @readonly
- */
- get acceptRanges() {
- return this.originalResponse.acceptRanges;
- }
- /**
- * Returns if it was previously specified
- * for the file.
- *
- * @readonly
- */
- get cacheControl() {
- return this.originalResponse.cacheControl;
- }
- /**
- * Returns the value that was specified
- * for the 'x-ms-content-disposition' header and specifies how to process the
- * response.
- *
- * @readonly
- */
- get contentDisposition() {
- return this.originalResponse.contentDisposition;
- }
- /**
- * Returns the value that was specified
- * for the Content-Encoding request header.
- *
- * @readonly
- */
- get contentEncoding() {
- return this.originalResponse.contentEncoding;
- }
- /**
- * Returns the value that was specified
- * for the Content-Language request header.
- *
- * @readonly
- */
- get contentLanguage() {
- return this.originalResponse.contentLanguage;
- }
- /**
- * The current sequence number for a
- * page blob. This header is not returned for block blobs or append blobs.
- *
- * @readonly
- */
- get blobSequenceNumber() {
- return this.originalResponse.blobSequenceNumber;
- }
- /**
- * The blob's type. Possible values include:
- * 'BlockBlob', 'PageBlob', 'AppendBlob'.
- *
- * @readonly
- */
- get blobType() {
- return this.originalResponse.blobType;
- }
- /**
- * The number of bytes present in the
- * response body.
- *
- * @readonly
- */
- get contentLength() {
- return this.originalResponse.contentLength;
- }
- /**
- * If the file has an MD5 hash and the
- * request is to read the full file, this response header is returned so that
- * the client can check for message content integrity. If the request is to
- * read a specified range and the 'x-ms-range-get-content-md5' is set to
- * true, then the request returns an MD5 hash for the range, as long as the
- * range size is less than or equal to 4 MB. If neither of these sets of
- * conditions is true, then no value is returned for the 'Content-MD5'
- * header.
- *
- * @readonly
- */
- get contentMD5() {
- return this.originalResponse.contentMD5;
- }
- /**
- * Indicates the range of bytes returned if
- * the client requested a subset of the file by setting the Range request
- * header.
- *
- * @readonly
- */
- get contentRange() {
- return this.originalResponse.contentRange;
- }
- /**
- * The content type specified for the file.
- * The default content type is 'application/octet-stream'
- *
- * @readonly
- */
- get contentType() {
- return this.originalResponse.contentType;
- }
- /**
- * Conclusion time of the last attempted
- * Copy File operation where this file was the destination file. This value
- * can specify the time of a completed, aborted, or failed copy attempt.
- *
- * @readonly
- */
- get copyCompletedOn() {
- return this.originalResponse.copyCompletedOn;
- }
- /**
- * String identifier for the last attempted Copy
- * File operation where this file was the destination file.
- *
- * @readonly
- */
- get copyId() {
- return this.originalResponse.copyId;
- }
- /**
- * Contains the number of bytes copied and
- * the total bytes in the source in the last attempted Copy File operation
- * where this file was the destination file. Can show between 0 and
- * Content-Length bytes copied.
- *
- * @readonly
- */
- get copyProgress() {
- return this.originalResponse.copyProgress;
- }
- /**
- * URL up to 2KB in length that specifies the
- * source file used in the last attempted Copy File operation where this file
- * was the destination file.
- *
- * @readonly
- */
- get copySource() {
- return this.originalResponse.copySource;
- }
- /**
- * State of the copy operation
- * identified by 'x-ms-copy-id'. Possible values include: 'pending',
- * 'success', 'aborted', 'failed'
- *
- * @readonly
- */
- get copyStatus() {
- return this.originalResponse.copyStatus;
- }
- /**
- * Only appears when
- * x-ms-copy-status is failed or pending. Describes cause of fatal or
- * non-fatal copy operation failure.
- *
- * @readonly
- */
- get copyStatusDescription() {
- return this.originalResponse.copyStatusDescription;
- }
- /**
- * When a blob is leased,
- * specifies whether the lease is of infinite or fixed duration. Possible
- * values include: 'infinite', 'fixed'.
- *
- * @readonly
- */
- get leaseDuration() {
- return this.originalResponse.leaseDuration;
- }
- /**
- * Lease state of the blob. Possible
- * values include: 'available', 'leased', 'expired', 'breaking', 'broken'.
- *
- * @readonly
- */
- get leaseState() {
- return this.originalResponse.leaseState;
- }
- /**
- * The current lease status of the
- * blob. Possible values include: 'locked', 'unlocked'.
- *
- * @readonly
- */
- get leaseStatus() {
- return this.originalResponse.leaseStatus;
- }
- /**
- * A UTC date/time value generated by the service that
- * indicates the time at which the response was initiated.
- *
- * @readonly
- */
- get date() {
- return this.originalResponse.date;
+ * @param name The name of the adapter method to call.
+ * @returns Pseudo for the `filters` object.
+ */
+function dynamicStatePseudo(name) {
+ return function dynamicPseudo(next, _rule, _a) {
+ var adapter = _a.adapter;
+ var func = adapter[name];
+ if (typeof func !== "function") {
+ return boolbase_1.default.falseFunc;
+ }
+ return function active(elem) {
+ return func(elem) && next(elem);
+ };
+ };
+}
+//# sourceMappingURL=filters.js.map
+
+/***/ }),
+
+/***/ 69360:
+/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
+
+"use strict";
+
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.compilePseudoSelector = exports.aliases = exports.pseudos = exports.filters = void 0;
+var css_what_1 = __nccwpck_require__(39284);
+var filters_js_1 = __nccwpck_require__(17611);
+Object.defineProperty(exports, "filters", ({ enumerable: true, get: function () { return filters_js_1.filters; } }));
+var pseudos_js_1 = __nccwpck_require__(45467);
+Object.defineProperty(exports, "pseudos", ({ enumerable: true, get: function () { return pseudos_js_1.pseudos; } }));
+var aliases_js_1 = __nccwpck_require__(75972);
+Object.defineProperty(exports, "aliases", ({ enumerable: true, get: function () { return aliases_js_1.aliases; } }));
+var subselects_js_1 = __nccwpck_require__(37477);
+function compilePseudoSelector(next, selector, options, context, compileToken) {
+ var _a;
+ var name = selector.name, data = selector.data;
+ if (Array.isArray(data)) {
+ if (!(name in subselects_js_1.subselects)) {
+ throw new Error("Unknown pseudo-class :".concat(name, "(").concat(data, ")"));
+ }
+ return subselects_js_1.subselects[name](next, data, options, context, compileToken);
}
- /**
- * The number of committed blocks
- * present in the blob. This header is returned only for append blobs.
- *
- * @readonly
- */
- get blobCommittedBlockCount() {
- return this.originalResponse.blobCommittedBlockCount;
+ var userPseudo = (_a = options.pseudos) === null || _a === void 0 ? void 0 : _a[name];
+ var stringPseudo = typeof userPseudo === "string" ? userPseudo : aliases_js_1.aliases[name];
+ if (typeof stringPseudo === "string") {
+ if (data != null) {
+ throw new Error("Pseudo ".concat(name, " doesn't have any arguments"));
+ }
+ // The alias has to be parsed here, to make sure options are respected.
+ var alias = (0, css_what_1.parse)(stringPseudo);
+ return subselects_js_1.subselects["is"](next, alias, options, context, compileToken);
}
- /**
- * The ETag contains a value that you can use to
- * perform operations conditionally, in quotes.
- *
- * @readonly
- */
- get etag() {
- return this.originalResponse.etag;
+ if (typeof userPseudo === "function") {
+ (0, pseudos_js_1.verifyPseudoArgs)(userPseudo, name, data, 1);
+ return function (elem) { return userPseudo(elem, data) && next(elem); };
}
- /**
- * The number of tags associated with the blob
- *
- * @readonly
- */
- get tagCount() {
- return this.originalResponse.tagCount;
+ if (name in filters_js_1.filters) {
+ return filters_js_1.filters[name](next, data, options, context);
}
- /**
- * The error code.
- *
- * @readonly
- */
- get errorCode() {
- return this.originalResponse.errorCode;
+ if (name in pseudos_js_1.pseudos) {
+ var pseudo_1 = pseudos_js_1.pseudos[name];
+ (0, pseudos_js_1.verifyPseudoArgs)(pseudo_1, name, data, 2);
+ return function (elem) { return pseudo_1(elem, options, data) && next(elem); };
}
- /**
- * The value of this header is set to
- * true if the file data and application metadata are completely encrypted
- * using the specified algorithm. Otherwise, the value is set to false (when
- * the file is unencrypted, or if only parts of the file/application metadata
- * are encrypted).
- *
- * @readonly
- */
- get isServerEncrypted() {
- return this.originalResponse.isServerEncrypted;
+ throw new Error("Unknown pseudo-class :".concat(name));
+}
+exports.compilePseudoSelector = compilePseudoSelector;
+//# sourceMappingURL=index.js.map
+
+/***/ }),
+
+/***/ 45467:
+/***/ ((__unused_webpack_module, exports) => {
+
+"use strict";
+
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.verifyPseudoArgs = exports.pseudos = void 0;
+// While filters are precompiled, pseudos get called when they are needed
+exports.pseudos = {
+ empty: function (elem, _a) {
+ var adapter = _a.adapter;
+ return !adapter.getChildren(elem).some(function (elem) {
+ // FIXME: `getText` call is potentially expensive.
+ return adapter.isTag(elem) || adapter.getText(elem) !== "";
+ });
+ },
+ "first-child": function (elem, _a) {
+ var adapter = _a.adapter, equals = _a.equals;
+ if (adapter.prevElementSibling) {
+ return adapter.prevElementSibling(elem) == null;
+ }
+ var firstChild = adapter
+ .getSiblings(elem)
+ .find(function (elem) { return adapter.isTag(elem); });
+ return firstChild != null && equals(elem, firstChild);
+ },
+ "last-child": function (elem, _a) {
+ var adapter = _a.adapter, equals = _a.equals;
+ var siblings = adapter.getSiblings(elem);
+ for (var i = siblings.length - 1; i >= 0; i--) {
+ if (equals(elem, siblings[i]))
+ return true;
+ if (adapter.isTag(siblings[i]))
+ break;
+ }
+ return false;
+ },
+ "first-of-type": function (elem, _a) {
+ var adapter = _a.adapter, equals = _a.equals;
+ var siblings = adapter.getSiblings(elem);
+ var elemName = adapter.getName(elem);
+ for (var i = 0; i < siblings.length; i++) {
+ var currentSibling = siblings[i];
+ if (equals(elem, currentSibling))
+ return true;
+ if (adapter.isTag(currentSibling) &&
+ adapter.getName(currentSibling) === elemName) {
+ break;
+ }
+ }
+ return false;
+ },
+ "last-of-type": function (elem, _a) {
+ var adapter = _a.adapter, equals = _a.equals;
+ var siblings = adapter.getSiblings(elem);
+ var elemName = adapter.getName(elem);
+ for (var i = siblings.length - 1; i >= 0; i--) {
+ var currentSibling = siblings[i];
+ if (equals(elem, currentSibling))
+ return true;
+ if (adapter.isTag(currentSibling) &&
+ adapter.getName(currentSibling) === elemName) {
+ break;
+ }
+ }
+ return false;
+ },
+ "only-of-type": function (elem, _a) {
+ var adapter = _a.adapter, equals = _a.equals;
+ var elemName = adapter.getName(elem);
+ return adapter
+ .getSiblings(elem)
+ .every(function (sibling) {
+ return equals(elem, sibling) ||
+ !adapter.isTag(sibling) ||
+ adapter.getName(sibling) !== elemName;
+ });
+ },
+ "only-child": function (elem, _a) {
+ var adapter = _a.adapter, equals = _a.equals;
+ return adapter
+ .getSiblings(elem)
+ .every(function (sibling) { return equals(elem, sibling) || !adapter.isTag(sibling); });
+ },
+};
+function verifyPseudoArgs(func, name, subselect, argIndex) {
+ if (subselect === null) {
+ if (func.length > argIndex) {
+ throw new Error("Pseudo-class :".concat(name, " requires an argument"));
+ }
}
- /**
- * If the blob has a MD5 hash, and if
- * request contains range header (Range or x-ms-range), this response header
- * is returned with the value of the whole blob's MD5 value. This value may
- * or may not be equal to the value returned in Content-MD5 header, with the
- * latter calculated from the requested range.
- *
- * @readonly
- */
- get blobContentMD5() {
- return this.originalResponse.blobContentMD5;
+ else if (func.length === argIndex) {
+ throw new Error("Pseudo-class :".concat(name, " doesn't have any arguments"));
}
- /**
- * Returns the date and time the file was last
- * modified. Any operation that modifies the file or its properties updates
- * the last modified time.
- *
- * @readonly
- */
- get lastModified() {
- return this.originalResponse.lastModified;
+}
+exports.verifyPseudoArgs = verifyPseudoArgs;
+//# sourceMappingURL=pseudos.js.map
+
+/***/ }),
+
+/***/ 37477:
+/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
+
+"use strict";
+
+var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
+ if (ar || !(i in from)) {
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
+ ar[i] = from[i];
+ }
}
+ return to.concat(ar || Array.prototype.slice.call(from));
+};
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.subselects = exports.getNextSiblings = exports.ensureIsTag = exports.PLACEHOLDER_ELEMENT = void 0;
+var boolbase_1 = __importDefault(__nccwpck_require__(344));
+var sort_js_1 = __nccwpck_require__(60490);
+/** Used as a placeholder for :has. Will be replaced with the actual element. */
+exports.PLACEHOLDER_ELEMENT = {};
+function ensureIsTag(next, adapter) {
+ if (next === boolbase_1.default.falseFunc)
+ return boolbase_1.default.falseFunc;
+ return function (elem) { return adapter.isTag(elem) && next(elem); };
+}
+exports.ensureIsTag = ensureIsTag;
+function getNextSiblings(elem, adapter) {
+ var siblings = adapter.getSiblings(elem);
+ if (siblings.length <= 1)
+ return [];
+ var elemIndex = siblings.indexOf(elem);
+ if (elemIndex < 0 || elemIndex === siblings.length - 1)
+ return [];
+ return siblings.slice(elemIndex + 1).filter(adapter.isTag);
+}
+exports.getNextSiblings = getNextSiblings;
+function copyOptions(options) {
+ // Not copied: context, rootFunc
+ return {
+ xmlMode: !!options.xmlMode,
+ lowerCaseAttributeNames: !!options.lowerCaseAttributeNames,
+ lowerCaseTags: !!options.lowerCaseTags,
+ quirksMode: !!options.quirksMode,
+ cacheResults: !!options.cacheResults,
+ pseudos: options.pseudos,
+ adapter: options.adapter,
+ equals: options.equals,
+ };
+}
+var is = function (next, token, options, context, compileToken) {
+ var func = compileToken(token, copyOptions(options), context);
+ return func === boolbase_1.default.trueFunc
+ ? next
+ : func === boolbase_1.default.falseFunc
+ ? boolbase_1.default.falseFunc
+ : function (elem) { return func(elem) && next(elem); };
+};
+/*
+ * :not, :has, :is, :matches and :where have to compile selectors
+ * doing this in src/pseudos.ts would lead to circular dependencies,
+ * so we add them here
+ */
+exports.subselects = {
+ is: is,
/**
- * Returns the UTC date and time generated by the service that indicates the time at which the blob was
- * last read or written to.
- *
- * @readonly
+ * `:matches` and `:where` are aliases for `:is`.
*/
- get lastAccessed() {
- return this.originalResponse.lastAccessed;
+ matches: is,
+ where: is,
+ not: function (next, token, options, context, compileToken) {
+ var func = compileToken(token, copyOptions(options), context);
+ return func === boolbase_1.default.falseFunc
+ ? next
+ : func === boolbase_1.default.trueFunc
+ ? boolbase_1.default.falseFunc
+ : function (elem) { return !func(elem) && next(elem); };
+ },
+ has: function (next, subselect, options, _context, compileToken) {
+ var adapter = options.adapter;
+ var opts = copyOptions(options);
+ opts.relativeSelector = true;
+ var context = subselect.some(function (s) { return s.some(sort_js_1.isTraversal); })
+ ? // Used as a placeholder. Will be replaced with the actual element.
+ [exports.PLACEHOLDER_ELEMENT]
+ : undefined;
+ var compiled = compileToken(subselect, opts, context);
+ if (compiled === boolbase_1.default.falseFunc)
+ return boolbase_1.default.falseFunc;
+ var hasElement = ensureIsTag(compiled, adapter);
+ // If `compiled` is `trueFunc`, we can skip this.
+ if (context && compiled !== boolbase_1.default.trueFunc) {
+ /*
+ * `shouldTestNextSiblings` will only be true if the query starts with
+ * a traversal (sibling or adjacent). That means we will always have a context.
+ */
+ var _a = compiled.shouldTestNextSiblings, shouldTestNextSiblings_1 = _a === void 0 ? false : _a;
+ return function (elem) {
+ if (!next(elem))
+ return false;
+ context[0] = elem;
+ var childs = adapter.getChildren(elem);
+ var nextElements = shouldTestNextSiblings_1
+ ? __spreadArray(__spreadArray([], childs, true), getNextSiblings(elem, adapter), true) : childs;
+ return adapter.existsOne(hasElement, nextElements);
+ };
+ }
+ return function (elem) {
+ return next(elem) &&
+ adapter.existsOne(hasElement, adapter.getChildren(elem));
+ };
+ },
+};
+//# sourceMappingURL=subselects.js.map
+
+/***/ }),
+
+/***/ 60490:
+/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
+
+"use strict";
+
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.isTraversal = void 0;
+var css_what_1 = __nccwpck_require__(39284);
+var procedure = new Map([
+ [css_what_1.SelectorType.Universal, 50],
+ [css_what_1.SelectorType.Tag, 30],
+ [css_what_1.SelectorType.Attribute, 1],
+ [css_what_1.SelectorType.Pseudo, 0],
+]);
+function isTraversal(token) {
+ return !procedure.has(token.type);
+}
+exports.isTraversal = isTraversal;
+var attributes = new Map([
+ [css_what_1.AttributeAction.Exists, 10],
+ [css_what_1.AttributeAction.Equals, 8],
+ [css_what_1.AttributeAction.Not, 7],
+ [css_what_1.AttributeAction.Start, 6],
+ [css_what_1.AttributeAction.End, 6],
+ [css_what_1.AttributeAction.Any, 5],
+]);
+/**
+ * Sort the parts of the passed selector,
+ * as there is potential for optimization
+ * (some types of selectors are faster than others)
+ *
+ * @param arr Selector to sort
+ */
+function sortByProcedure(arr) {
+ var procs = arr.map(getProcedure);
+ for (var i = 1; i < arr.length; i++) {
+ var procNew = procs[i];
+ if (procNew < 0)
+ continue;
+ for (var j = i - 1; j >= 0 && procNew < procs[j]; j--) {
+ var token = arr[j + 1];
+ arr[j + 1] = arr[j];
+ arr[j] = token;
+ procs[j + 1] = procs[j];
+ procs[j] = procNew;
+ }
}
- /**
- * Returns the date and time the blob was created.
- *
- * @readonly
- */
- get createdOn() {
- return this.originalResponse.createdOn;
+}
+exports["default"] = sortByProcedure;
+function getProcedure(token) {
+ var _a, _b;
+ var proc = (_a = procedure.get(token.type)) !== null && _a !== void 0 ? _a : -1;
+ if (token.type === css_what_1.SelectorType.Attribute) {
+ proc = (_b = attributes.get(token.action)) !== null && _b !== void 0 ? _b : 4;
+ if (token.action === css_what_1.AttributeAction.Equals && token.name === "id") {
+ // Prefer ID selectors (eg. #ID)
+ proc = 9;
+ }
+ if (token.ignoreCase) {
+ /*
+ * IgnoreCase adds some overhead, prefer "normal" token
+ * this is a binary operation, to ensure it's still an int
+ */
+ proc >>= 1;
+ }
}
- /**
- * A name-value pair
- * to associate with a file storage object.
- *
- * @readonly
- */
- get metadata() {
- return this.originalResponse.metadata;
+ else if (token.type === css_what_1.SelectorType.Pseudo) {
+ if (!token.data) {
+ proc = 3;
+ }
+ else if (token.name === "has" || token.name === "contains") {
+ proc = 0; // Expensive in any case
+ }
+ else if (Array.isArray(token.data)) {
+ // Eg. :matches, :not
+ proc = Math.min.apply(Math, token.data.map(function (d) { return Math.min.apply(Math, d.map(getProcedure)); }));
+ // If we have traversals, try to avoid executing this selector
+ if (proc < 0) {
+ proc = 0;
+ }
+ }
+ else {
+ proc = 2;
+ }
}
- /**
- * This header uniquely identifies the request
- * that was made and can be used for troubleshooting the request.
- *
- * @readonly
- */
- get requestId() {
- return this.originalResponse.requestId;
+ return proc;
+}
+//# sourceMappingURL=sort.js.map
+
+/***/ }),
+
+/***/ 39284:
+/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
+
+"use strict";
+
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
}
- /**
- * If a client request id header is sent in the request, this header will be present in the
- * response with the same value.
- *
- * @readonly
- */
- get clientRequestId() {
- return this.originalResponse.clientRequestId;
+ Object.defineProperty(o, k2, desc);
+}) : (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.stringify = exports.parse = exports.isTraversal = void 0;
+__exportStar(__nccwpck_require__(9809), exports);
+var parse_1 = __nccwpck_require__(49303);
+Object.defineProperty(exports, "isTraversal", ({ enumerable: true, get: function () { return parse_1.isTraversal; } }));
+Object.defineProperty(exports, "parse", ({ enumerable: true, get: function () { return parse_1.parse; } }));
+var stringify_1 = __nccwpck_require__(35513);
+Object.defineProperty(exports, "stringify", ({ enumerable: true, get: function () { return stringify_1.stringify; } }));
+
+
+/***/ }),
+
+/***/ 49303:
+/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
+
+"use strict";
+
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.parse = exports.isTraversal = void 0;
+var types_1 = __nccwpck_require__(9809);
+var reName = /^[^\\#]?(?:\\(?:[\da-f]{1,6}\s?|.)|[\w\-\u00b0-\uFFFF])+/;
+var reEscape = /\\([\da-f]{1,6}\s?|(\s)|.)/gi;
+var actionTypes = new Map([
+ [126 /* Tilde */, types_1.AttributeAction.Element],
+ [94 /* Circumflex */, types_1.AttributeAction.Start],
+ [36 /* Dollar */, types_1.AttributeAction.End],
+ [42 /* Asterisk */, types_1.AttributeAction.Any],
+ [33 /* ExclamationMark */, types_1.AttributeAction.Not],
+ [124 /* Pipe */, types_1.AttributeAction.Hyphen],
+]);
+// Pseudos, whose data property is parsed as well.
+var unpackPseudos = new Set([
+ "has",
+ "not",
+ "matches",
+ "is",
+ "where",
+ "host",
+ "host-context",
+]);
+/**
+ * Checks whether a specific selector is a traversal.
+ * This is useful eg. in swapping the order of elements that
+ * are not traversals.
+ *
+ * @param selector Selector to check.
+ */
+function isTraversal(selector) {
+ switch (selector.type) {
+ case types_1.SelectorType.Adjacent:
+ case types_1.SelectorType.Child:
+ case types_1.SelectorType.Descendant:
+ case types_1.SelectorType.Parent:
+ case types_1.SelectorType.Sibling:
+ case types_1.SelectorType.ColumnCombinator:
+ return true;
+ default:
+ return false;
}
- /**
- * Indicates the version of the Blob service used
- * to execute the request.
- *
- * @readonly
- */
- get version() {
- return this.originalResponse.version;
+}
+exports.isTraversal = isTraversal;
+var stripQuotesFromPseudos = new Set(["contains", "icontains"]);
+// Unescape function taken from https://github.com/jquery/sizzle/blob/master/src/sizzle.js#L152
+function funescape(_, escaped, escapedWhitespace) {
+ var high = parseInt(escaped, 16) - 0x10000;
+ // NaN means non-codepoint
+ return high !== high || escapedWhitespace
+ ? escaped
+ : high < 0
+ ? // BMP codepoint
+ String.fromCharCode(high + 0x10000)
+ : // Supplemental Plane codepoint (surrogate pair)
+ String.fromCharCode((high >> 10) | 0xd800, (high & 0x3ff) | 0xdc00);
+}
+function unescapeCSS(str) {
+ return str.replace(reEscape, funescape);
+}
+function isQuote(c) {
+ return c === 39 /* SingleQuote */ || c === 34 /* DoubleQuote */;
+}
+function isWhitespace(c) {
+ return (c === 32 /* Space */ ||
+ c === 9 /* Tab */ ||
+ c === 10 /* NewLine */ ||
+ c === 12 /* FormFeed */ ||
+ c === 13 /* CarriageReturn */);
+}
+/**
+ * Parses `selector`, optionally with the passed `options`.
+ *
+ * @param selector Selector to parse.
+ * @param options Options for parsing.
+ * @returns Returns a two-dimensional array.
+ * The first dimension represents selectors separated by commas (eg. `sub1, sub2`),
+ * the second contains the relevant tokens for that selector.
+ */
+function parse(selector) {
+ var subselects = [];
+ var endIndex = parseSelector(subselects, "".concat(selector), 0);
+ if (endIndex < selector.length) {
+ throw new Error("Unmatched selector: ".concat(selector.slice(endIndex)));
}
- /**
- * Indicates the versionId of the downloaded blob version.
- *
- * @readonly
- */
- get versionId() {
- return this.originalResponse.versionId;
+ return subselects;
+}
+exports.parse = parse;
+function parseSelector(subselects, selector, selectorIndex) {
+ var tokens = [];
+ function getName(offset) {
+ var match = selector.slice(selectorIndex + offset).match(reName);
+ if (!match) {
+ throw new Error("Expected name, found ".concat(selector.slice(selectorIndex)));
+ }
+ var name = match[0];
+ selectorIndex += offset + name.length;
+ return unescapeCSS(name);
}
- /**
- * Indicates whether version of this blob is a current version.
- *
- * @readonly
- */
- get isCurrentVersion() {
- return this.originalResponse.isCurrentVersion;
+ function stripWhitespace(offset) {
+ selectorIndex += offset;
+ while (selectorIndex < selector.length &&
+ isWhitespace(selector.charCodeAt(selectorIndex))) {
+ selectorIndex++;
+ }
}
- /**
- * The SHA-256 hash of the encryption key used to encrypt the blob. This value is only returned
- * when the blob was encrypted with a customer-provided key.
- *
- * @readonly
- */
- get encryptionKeySha256() {
- return this.originalResponse.encryptionKeySha256;
+ function readValueWithParenthesis() {
+ selectorIndex += 1;
+ var start = selectorIndex;
+ var counter = 1;
+ for (; counter > 0 && selectorIndex < selector.length; selectorIndex++) {
+ if (selector.charCodeAt(selectorIndex) ===
+ 40 /* LeftParenthesis */ &&
+ !isEscaped(selectorIndex)) {
+ counter++;
+ }
+ else if (selector.charCodeAt(selectorIndex) ===
+ 41 /* RightParenthesis */ &&
+ !isEscaped(selectorIndex)) {
+ counter--;
+ }
+ }
+ if (counter) {
+ throw new Error("Parenthesis not matched");
+ }
+ return unescapeCSS(selector.slice(start, selectorIndex - 1));
}
- /**
- * If the request is to read a specified range and the x-ms-range-get-content-crc64 is set to
- * true, then the request returns a crc64 for the range, as long as the range size is less than
- * or equal to 4 MB. If both x-ms-range-get-content-crc64 & x-ms-range-get-content-md5 is
- * specified in the same request, it will fail with 400(Bad Request)
- */
- get contentCrc64() {
- return this.originalResponse.contentCrc64;
+ function isEscaped(pos) {
+ var slashCount = 0;
+ while (selector.charCodeAt(--pos) === 92 /* BackSlash */)
+ slashCount++;
+ return (slashCount & 1) === 1;
}
- /**
- * Object Replication Policy Id of the destination blob.
- *
- * @readonly
- */
- get objectReplicationDestinationPolicyId() {
- return this.originalResponse.objectReplicationDestinationPolicyId;
+ function ensureNotTraversal() {
+ if (tokens.length > 0 && isTraversal(tokens[tokens.length - 1])) {
+ throw new Error("Did not expect successive traversals.");
+ }
}
- /**
- * Parsed Object Replication Policy Id, Rule Id(s) and status of the source blob.
- *
- * @readonly
- */
- get objectReplicationSourceProperties() {
- return this.originalResponse.objectReplicationSourceProperties;
+ function addTraversal(type) {
+ if (tokens.length > 0 &&
+ tokens[tokens.length - 1].type === types_1.SelectorType.Descendant) {
+ tokens[tokens.length - 1].type = type;
+ return;
+ }
+ ensureNotTraversal();
+ tokens.push({ type: type });
}
- /**
- * If this blob has been sealed.
- *
- * @readonly
- */
- get isSealed() {
- return this.originalResponse.isSealed;
+ function addSpecialAttribute(name, action) {
+ tokens.push({
+ type: types_1.SelectorType.Attribute,
+ name: name,
+ action: action,
+ value: getName(1),
+ namespace: null,
+ ignoreCase: "quirks",
+ });
}
/**
- * UTC date/time value generated by the service that indicates the time at which the blob immutability policy will expire.
+ * We have finished parsing the current part of the selector.
*
- * @readonly
+ * Remove descendant tokens at the end if they exist,
+ * and return the last index, so that parsing can be
+ * picked up from here.
*/
- get immutabilityPolicyExpiresOn() {
- return this.originalResponse.immutabilityPolicyExpiresOn;
+ function finalizeSubselector() {
+ if (tokens.length &&
+ tokens[tokens.length - 1].type === types_1.SelectorType.Descendant) {
+ tokens.pop();
+ }
+ if (tokens.length === 0) {
+ throw new Error("Empty sub-selector");
+ }
+ subselects.push(tokens);
}
- /**
- * Indicates immutability policy mode.
- *
- * @readonly
- */
- get immutabilityPolicyMode() {
- return this.originalResponse.immutabilityPolicyMode;
+ stripWhitespace(0);
+ if (selector.length === selectorIndex) {
+ return selectorIndex;
}
- /**
- * Indicates if a legal hold is present on the blob.
- *
- * @readonly
- */
- get legalHold() {
- return this.originalResponse.legalHold;
+ loop: while (selectorIndex < selector.length) {
+ var firstChar = selector.charCodeAt(selectorIndex);
+ switch (firstChar) {
+ // Whitespace
+ case 32 /* Space */:
+ case 9 /* Tab */:
+ case 10 /* NewLine */:
+ case 12 /* FormFeed */:
+ case 13 /* CarriageReturn */: {
+ if (tokens.length === 0 ||
+ tokens[0].type !== types_1.SelectorType.Descendant) {
+ ensureNotTraversal();
+ tokens.push({ type: types_1.SelectorType.Descendant });
+ }
+ stripWhitespace(1);
+ break;
+ }
+ // Traversals
+ case 62 /* GreaterThan */: {
+ addTraversal(types_1.SelectorType.Child);
+ stripWhitespace(1);
+ break;
+ }
+ case 60 /* LessThan */: {
+ addTraversal(types_1.SelectorType.Parent);
+ stripWhitespace(1);
+ break;
+ }
+ case 126 /* Tilde */: {
+ addTraversal(types_1.SelectorType.Sibling);
+ stripWhitespace(1);
+ break;
+ }
+ case 43 /* Plus */: {
+ addTraversal(types_1.SelectorType.Adjacent);
+ stripWhitespace(1);
+ break;
+ }
+ // Special attribute selectors: .class, #id
+ case 46 /* Period */: {
+ addSpecialAttribute("class", types_1.AttributeAction.Element);
+ break;
+ }
+ case 35 /* Hash */: {
+ addSpecialAttribute("id", types_1.AttributeAction.Equals);
+ break;
+ }
+ case 91 /* LeftSquareBracket */: {
+ stripWhitespace(1);
+ // Determine attribute name and namespace
+ var name_1 = void 0;
+ var namespace = null;
+ if (selector.charCodeAt(selectorIndex) === 124 /* Pipe */) {
+ // Equivalent to no namespace
+ name_1 = getName(1);
+ }
+ else if (selector.startsWith("*|", selectorIndex)) {
+ namespace = "*";
+ name_1 = getName(2);
+ }
+ else {
+ name_1 = getName(0);
+ if (selector.charCodeAt(selectorIndex) === 124 /* Pipe */ &&
+ selector.charCodeAt(selectorIndex + 1) !==
+ 61 /* Equal */) {
+ namespace = name_1;
+ name_1 = getName(1);
+ }
+ }
+ stripWhitespace(0);
+ // Determine comparison operation
+ var action = types_1.AttributeAction.Exists;
+ var possibleAction = actionTypes.get(selector.charCodeAt(selectorIndex));
+ if (possibleAction) {
+ action = possibleAction;
+ if (selector.charCodeAt(selectorIndex + 1) !==
+ 61 /* Equal */) {
+ throw new Error("Expected `=`");
+ }
+ stripWhitespace(2);
+ }
+ else if (selector.charCodeAt(selectorIndex) === 61 /* Equal */) {
+ action = types_1.AttributeAction.Equals;
+ stripWhitespace(1);
+ }
+ // Determine value
+ var value = "";
+ var ignoreCase = null;
+ if (action !== "exists") {
+ if (isQuote(selector.charCodeAt(selectorIndex))) {
+ var quote = selector.charCodeAt(selectorIndex);
+ var sectionEnd = selectorIndex + 1;
+ while (sectionEnd < selector.length &&
+ (selector.charCodeAt(sectionEnd) !== quote ||
+ isEscaped(sectionEnd))) {
+ sectionEnd += 1;
+ }
+ if (selector.charCodeAt(sectionEnd) !== quote) {
+ throw new Error("Attribute value didn't end");
+ }
+ value = unescapeCSS(selector.slice(selectorIndex + 1, sectionEnd));
+ selectorIndex = sectionEnd + 1;
+ }
+ else {
+ var valueStart = selectorIndex;
+ while (selectorIndex < selector.length &&
+ ((!isWhitespace(selector.charCodeAt(selectorIndex)) &&
+ selector.charCodeAt(selectorIndex) !==
+ 93 /* RightSquareBracket */) ||
+ isEscaped(selectorIndex))) {
+ selectorIndex += 1;
+ }
+ value = unescapeCSS(selector.slice(valueStart, selectorIndex));
+ }
+ stripWhitespace(0);
+ // See if we have a force ignore flag
+ var forceIgnore = selector.charCodeAt(selectorIndex) | 0x20;
+ // If the forceIgnore flag is set (either `i` or `s`), use that value
+ if (forceIgnore === 115 /* LowerS */) {
+ ignoreCase = false;
+ stripWhitespace(1);
+ }
+ else if (forceIgnore === 105 /* LowerI */) {
+ ignoreCase = true;
+ stripWhitespace(1);
+ }
+ }
+ if (selector.charCodeAt(selectorIndex) !==
+ 93 /* RightSquareBracket */) {
+ throw new Error("Attribute selector didn't terminate");
+ }
+ selectorIndex += 1;
+ var attributeSelector = {
+ type: types_1.SelectorType.Attribute,
+ name: name_1,
+ action: action,
+ value: value,
+ namespace: namespace,
+ ignoreCase: ignoreCase,
+ };
+ tokens.push(attributeSelector);
+ break;
+ }
+ case 58 /* Colon */: {
+ if (selector.charCodeAt(selectorIndex + 1) === 58 /* Colon */) {
+ tokens.push({
+ type: types_1.SelectorType.PseudoElement,
+ name: getName(2).toLowerCase(),
+ data: selector.charCodeAt(selectorIndex) ===
+ 40 /* LeftParenthesis */
+ ? readValueWithParenthesis()
+ : null,
+ });
+ continue;
+ }
+ var name_2 = getName(1).toLowerCase();
+ var data = null;
+ if (selector.charCodeAt(selectorIndex) ===
+ 40 /* LeftParenthesis */) {
+ if (unpackPseudos.has(name_2)) {
+ if (isQuote(selector.charCodeAt(selectorIndex + 1))) {
+ throw new Error("Pseudo-selector ".concat(name_2, " cannot be quoted"));
+ }
+ data = [];
+ selectorIndex = parseSelector(data, selector, selectorIndex + 1);
+ if (selector.charCodeAt(selectorIndex) !==
+ 41 /* RightParenthesis */) {
+ throw new Error("Missing closing parenthesis in :".concat(name_2, " (").concat(selector, ")"));
+ }
+ selectorIndex += 1;
+ }
+ else {
+ data = readValueWithParenthesis();
+ if (stripQuotesFromPseudos.has(name_2)) {
+ var quot = data.charCodeAt(0);
+ if (quot === data.charCodeAt(data.length - 1) &&
+ isQuote(quot)) {
+ data = data.slice(1, -1);
+ }
+ }
+ data = unescapeCSS(data);
+ }
+ }
+ tokens.push({ type: types_1.SelectorType.Pseudo, name: name_2, data: data });
+ break;
+ }
+ case 44 /* Comma */: {
+ finalizeSubselector();
+ tokens = [];
+ stripWhitespace(1);
+ break;
+ }
+ default: {
+ if (selector.startsWith("/*", selectorIndex)) {
+ var endIndex = selector.indexOf("*/", selectorIndex + 2);
+ if (endIndex < 0) {
+ throw new Error("Comment was not terminated");
+ }
+ selectorIndex = endIndex + 2;
+ // Remove leading whitespace
+ if (tokens.length === 0) {
+ stripWhitespace(0);
+ }
+ break;
+ }
+ var namespace = null;
+ var name_3 = void 0;
+ if (firstChar === 42 /* Asterisk */) {
+ selectorIndex += 1;
+ name_3 = "*";
+ }
+ else if (firstChar === 124 /* Pipe */) {
+ name_3 = "";
+ if (selector.charCodeAt(selectorIndex + 1) === 124 /* Pipe */) {
+ addTraversal(types_1.SelectorType.ColumnCombinator);
+ stripWhitespace(2);
+ break;
+ }
+ }
+ else if (reName.test(selector.slice(selectorIndex))) {
+ name_3 = getName(0);
+ }
+ else {
+ break loop;
+ }
+ if (selector.charCodeAt(selectorIndex) === 124 /* Pipe */ &&
+ selector.charCodeAt(selectorIndex + 1) !== 124 /* Pipe */) {
+ namespace = name_3;
+ if (selector.charCodeAt(selectorIndex + 1) ===
+ 42 /* Asterisk */) {
+ name_3 = "*";
+ selectorIndex += 2;
+ }
+ else {
+ name_3 = getName(1);
+ }
+ }
+ tokens.push(name_3 === "*"
+ ? { type: types_1.SelectorType.Universal, namespace: namespace }
+ : { type: types_1.SelectorType.Tag, name: name_3, namespace: namespace });
+ }
+ }
}
- /**
- * The response body as a browser Blob.
- * Always undefined in node.js.
- *
- * @readonly
- */
- get contentAsBlob() {
- return this.originalResponse.blobBody;
+ finalizeSubselector();
+ return selectorIndex;
+}
+
+
+/***/ }),
+
+/***/ 35513:
+/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
+
+"use strict";
+
+var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
+ if (ar || !(i in from)) {
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
+ ar[i] = from[i];
+ }
}
- /**
- * The response body as a node.js Readable stream.
- * Always undefined in the browser.
- *
- * It will automatically retry when internal read stream unexpected ends.
- *
- * @readonly
- */
- get readableStreamBody() {
- return coreUtil.isNode ? this.blobDownloadStream : undefined;
+ return to.concat(ar || Array.prototype.slice.call(from));
+};
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.stringify = void 0;
+var types_1 = __nccwpck_require__(9809);
+var attribValChars = ["\\", '"'];
+var pseudoValChars = __spreadArray(__spreadArray([], attribValChars, true), ["(", ")"], false);
+var charsToEscapeInAttributeValue = new Set(attribValChars.map(function (c) { return c.charCodeAt(0); }));
+var charsToEscapeInPseudoValue = new Set(pseudoValChars.map(function (c) { return c.charCodeAt(0); }));
+var charsToEscapeInName = new Set(__spreadArray(__spreadArray([], pseudoValChars, true), [
+ "~",
+ "^",
+ "$",
+ "*",
+ "+",
+ "!",
+ "|",
+ ":",
+ "[",
+ "]",
+ " ",
+ ".",
+], false).map(function (c) { return c.charCodeAt(0); }));
+/**
+ * Turns `selector` back into a string.
+ *
+ * @param selector Selector to stringify.
+ */
+function stringify(selector) {
+ return selector
+ .map(function (token) { return token.map(stringifyToken).join(""); })
+ .join(", ");
+}
+exports.stringify = stringify;
+function stringifyToken(token, index, arr) {
+ switch (token.type) {
+ // Simple types
+ case types_1.SelectorType.Child:
+ return index === 0 ? "> " : " > ";
+ case types_1.SelectorType.Parent:
+ return index === 0 ? "< " : " < ";
+ case types_1.SelectorType.Sibling:
+ return index === 0 ? "~ " : " ~ ";
+ case types_1.SelectorType.Adjacent:
+ return index === 0 ? "+ " : " + ";
+ case types_1.SelectorType.Descendant:
+ return " ";
+ case types_1.SelectorType.ColumnCombinator:
+ return index === 0 ? "|| " : " || ";
+ case types_1.SelectorType.Universal:
+ // Return an empty string if the selector isn't needed.
+ return token.namespace === "*" &&
+ index + 1 < arr.length &&
+ "name" in arr[index + 1]
+ ? ""
+ : "".concat(getNamespace(token.namespace), "*");
+ case types_1.SelectorType.Tag:
+ return getNamespacedName(token);
+ case types_1.SelectorType.PseudoElement:
+ return "::".concat(escapeName(token.name, charsToEscapeInName)).concat(token.data === null
+ ? ""
+ : "(".concat(escapeName(token.data, charsToEscapeInPseudoValue), ")"));
+ case types_1.SelectorType.Pseudo:
+ return ":".concat(escapeName(token.name, charsToEscapeInName)).concat(token.data === null
+ ? ""
+ : "(".concat(typeof token.data === "string"
+ ? escapeName(token.data, charsToEscapeInPseudoValue)
+ : stringify(token.data), ")"));
+ case types_1.SelectorType.Attribute: {
+ if (token.name === "id" &&
+ token.action === types_1.AttributeAction.Equals &&
+ token.ignoreCase === "quirks" &&
+ !token.namespace) {
+ return "#".concat(escapeName(token.value, charsToEscapeInName));
+ }
+ if (token.name === "class" &&
+ token.action === types_1.AttributeAction.Element &&
+ token.ignoreCase === "quirks" &&
+ !token.namespace) {
+ return ".".concat(escapeName(token.value, charsToEscapeInName));
+ }
+ var name_1 = getNamespacedName(token);
+ if (token.action === types_1.AttributeAction.Exists) {
+ return "[".concat(name_1, "]");
+ }
+ return "[".concat(name_1).concat(getActionValue(token.action), "=\"").concat(escapeName(token.value, charsToEscapeInAttributeValue), "\"").concat(token.ignoreCase === null ? "" : token.ignoreCase ? " i" : " s", "]");
+ }
}
- /**
- * The HTTP response.
- */
- get _response() {
- return this.originalResponse._response;
+}
+function getActionValue(action) {
+ switch (action) {
+ case types_1.AttributeAction.Equals:
+ return "";
+ case types_1.AttributeAction.Element:
+ return "~";
+ case types_1.AttributeAction.Start:
+ return "^";
+ case types_1.AttributeAction.End:
+ return "$";
+ case types_1.AttributeAction.Any:
+ return "*";
+ case types_1.AttributeAction.Not:
+ return "!";
+ case types_1.AttributeAction.Hyphen:
+ return "|";
+ case types_1.AttributeAction.Exists:
+ throw new Error("Shouldn't be here");
}
- /**
- * Creates an instance of BlobDownloadResponse.
- *
- * @param originalResponse -
- * @param getter -
- * @param offset -
- * @param count -
- * @param options -
- */
- constructor(originalResponse, getter, offset, count, options = {}) {
- this.originalResponse = originalResponse;
- this.blobDownloadStream = new RetriableReadableStream(this.originalResponse.readableStreamBody, getter, offset, count, options);
+}
+function getNamespacedName(token) {
+ return "".concat(getNamespace(token.namespace)).concat(escapeName(token.name, charsToEscapeInName));
+}
+function getNamespace(namespace) {
+ return namespace !== null
+ ? "".concat(namespace === "*"
+ ? "*"
+ : escapeName(namespace, charsToEscapeInName), "|")
+ : "";
+}
+function escapeName(str, charsToEscape) {
+ var lastIdx = 0;
+ var ret = "";
+ for (var i = 0; i < str.length; i++) {
+ if (charsToEscape.has(str.charCodeAt(i))) {
+ ret += "".concat(str.slice(lastIdx, i), "\\").concat(str.charAt(i));
+ lastIdx = i + 1;
+ }
}
+ return ret.length > 0 ? ret + str.slice(lastIdx) : str;
+}
+
+
+/***/ }),
+
+/***/ 9809:
+/***/ ((__unused_webpack_module, exports) => {
+
+"use strict";
+
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.AttributeAction = exports.IgnoreCaseMode = exports.SelectorType = void 0;
+var SelectorType;
+(function (SelectorType) {
+ SelectorType["Attribute"] = "attribute";
+ SelectorType["Pseudo"] = "pseudo";
+ SelectorType["PseudoElement"] = "pseudo-element";
+ SelectorType["Tag"] = "tag";
+ SelectorType["Universal"] = "universal";
+ // Traversals
+ SelectorType["Adjacent"] = "adjacent";
+ SelectorType["Child"] = "child";
+ SelectorType["Descendant"] = "descendant";
+ SelectorType["Parent"] = "parent";
+ SelectorType["Sibling"] = "sibling";
+ SelectorType["ColumnCombinator"] = "column-combinator";
+})(SelectorType = exports.SelectorType || (exports.SelectorType = {}));
+/**
+ * Modes for ignore case.
+ *
+ * This could be updated to an enum, and the object is
+ * the current stand-in that will allow code to be updated
+ * without big changes.
+ */
+exports.IgnoreCaseMode = {
+ Unknown: null,
+ QuirksMode: "quirks",
+ IgnoreCase: true,
+ CaseSensitive: false,
+};
+var AttributeAction;
+(function (AttributeAction) {
+ AttributeAction["Any"] = "any";
+ AttributeAction["Element"] = "element";
+ AttributeAction["End"] = "end";
+ AttributeAction["Equals"] = "equals";
+ AttributeAction["Exists"] = "exists";
+ AttributeAction["Hyphen"] = "hyphen";
+ AttributeAction["Not"] = "not";
+ AttributeAction["Start"] = "start";
+})(AttributeAction = exports.AttributeAction || (exports.AttributeAction = {}));
+
+
+/***/ }),
+
+/***/ 57451:
+/***/ ((module, exports, __nccwpck_require__) => {
+
+/* eslint-env browser */
+
+/**
+ * This is the web browser implementation of `debug()`.
+ */
+
+exports.formatArgs = formatArgs;
+exports.save = save;
+exports.load = load;
+exports.useColors = useColors;
+exports.storage = localstorage();
+exports.destroy = (() => {
+ let warned = false;
+
+ return () => {
+ if (!warned) {
+ warned = true;
+ console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
+ }
+ };
+})();
+
+/**
+ * Colors.
+ */
+
+exports.colors = [
+ '#0000CC',
+ '#0000FF',
+ '#0033CC',
+ '#0033FF',
+ '#0066CC',
+ '#0066FF',
+ '#0099CC',
+ '#0099FF',
+ '#00CC00',
+ '#00CC33',
+ '#00CC66',
+ '#00CC99',
+ '#00CCCC',
+ '#00CCFF',
+ '#3300CC',
+ '#3300FF',
+ '#3333CC',
+ '#3333FF',
+ '#3366CC',
+ '#3366FF',
+ '#3399CC',
+ '#3399FF',
+ '#33CC00',
+ '#33CC33',
+ '#33CC66',
+ '#33CC99',
+ '#33CCCC',
+ '#33CCFF',
+ '#6600CC',
+ '#6600FF',
+ '#6633CC',
+ '#6633FF',
+ '#66CC00',
+ '#66CC33',
+ '#9900CC',
+ '#9900FF',
+ '#9933CC',
+ '#9933FF',
+ '#99CC00',
+ '#99CC33',
+ '#CC0000',
+ '#CC0033',
+ '#CC0066',
+ '#CC0099',
+ '#CC00CC',
+ '#CC00FF',
+ '#CC3300',
+ '#CC3333',
+ '#CC3366',
+ '#CC3399',
+ '#CC33CC',
+ '#CC33FF',
+ '#CC6600',
+ '#CC6633',
+ '#CC9900',
+ '#CC9933',
+ '#CCCC00',
+ '#CCCC33',
+ '#FF0000',
+ '#FF0033',
+ '#FF0066',
+ '#FF0099',
+ '#FF00CC',
+ '#FF00FF',
+ '#FF3300',
+ '#FF3333',
+ '#FF3366',
+ '#FF3399',
+ '#FF33CC',
+ '#FF33FF',
+ '#FF6600',
+ '#FF6633',
+ '#FF9900',
+ '#FF9933',
+ '#FFCC00',
+ '#FFCC33'
+];
+
+/**
+ * Currently only WebKit-based Web Inspectors, Firefox >= v31,
+ * and the Firebug extension (any Firefox version) are known
+ * to support "%c" CSS customizations.
+ *
+ * TODO: add a `localStorage` variable to explicitly enable/disable colors
+ */
+
+// eslint-disable-next-line complexity
+function useColors() {
+ // NB: In an Electron preload script, document will be defined but not fully
+ // initialized. Since we know we're in Chrome, we'll just detect this case
+ // explicitly
+ if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {
+ return true;
+ }
+
+ // Internet Explorer and Edge do not support colors.
+ if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
+ return false;
+ }
+
+ let m;
+
+ // Is webkit? http://stackoverflow.com/a/16459606/376773
+ // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
+ // eslint-disable-next-line no-return-assign
+ return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||
+ // Is firebug? http://stackoverflow.com/a/398120/376773
+ (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||
+ // Is firefox >= v31?
+ // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
+ (typeof navigator !== 'undefined' && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m[1], 10) >= 31) ||
+ // Double check webkit in userAgent just in case we are in a worker
+ (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/));
+}
+
+/**
+ * Colorize log arguments if enabled.
+ *
+ * @api public
+ */
+
+function formatArgs(args) {
+ args[0] = (this.useColors ? '%c' : '') +
+ this.namespace +
+ (this.useColors ? ' %c' : ' ') +
+ args[0] +
+ (this.useColors ? '%c ' : ' ') +
+ '+' + module.exports.humanize(this.diff);
+
+ if (!this.useColors) {
+ return;
+ }
+
+ const c = 'color: ' + this.color;
+ args.splice(1, 0, c, 'color: inherit');
+
+ // The final "%c" is somewhat tricky, because there could be other
+ // arguments passed either before or after the %c, so we need to
+ // figure out the correct index to insert the CSS into
+ let index = 0;
+ let lastC = 0;
+ args[0].replace(/%[a-zA-Z%]/g, match => {
+ if (match === '%%') {
+ return;
+ }
+ index++;
+ if (match === '%c') {
+ // We only are interested in the *last* %c
+ // (the user may have provided their own)
+ lastC = index;
+ }
+ });
+
+ args.splice(lastC, 0, c);
+}
+
+/**
+ * Invokes `console.debug()` when available.
+ * No-op when `console.debug` is not a "function".
+ * If `console.debug` is not available, falls back
+ * to `console.log`.
+ *
+ * @api public
+ */
+exports.log = console.debug || console.log || (() => {});
+
+/**
+ * Save `namespaces`.
+ *
+ * @param {String} namespaces
+ * @api private
+ */
+function save(namespaces) {
+ try {
+ if (namespaces) {
+ exports.storage.setItem('debug', namespaces);
+ } else {
+ exports.storage.removeItem('debug');
+ }
+ } catch (error) {
+ // Swallow
+ // XXX (@Qix-) should we be logging these?
+ }
+}
+
+/**
+ * Load `namespaces`.
+ *
+ * @return {String} returns the previously persisted debug modes
+ * @api private
+ */
+function load() {
+ let r;
+ try {
+ r = exports.storage.getItem('debug') || exports.storage.getItem('DEBUG') ;
+ } catch (error) {
+ // Swallow
+ // XXX (@Qix-) should we be logging these?
+ }
+
+ // If debug isn't set in LS, and we're in Electron, try to load $DEBUG
+ if (!r && typeof process !== 'undefined' && 'env' in process) {
+ r = process.env.DEBUG;
+ }
+
+ return r;
+}
+
+/**
+ * Localstorage attempts to return the localstorage.
+ *
+ * This is necessary because safari throws
+ * when a user disables cookies/localstorage
+ * and you attempt to access it.
+ *
+ * @return {LocalStorage}
+ * @api private
+ */
+
+function localstorage() {
+ try {
+ // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context
+ // The Browser also has localStorage in the global context.
+ return localStorage;
+ } catch (error) {
+ // Swallow
+ // XXX (@Qix-) should we be logging these?
+ }
+}
+
+module.exports = __nccwpck_require__(63350)(exports);
+
+const {formatters} = module.exports;
+
+/**
+ * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
+ */
+
+formatters.j = function (v) {
+ try {
+ return JSON.stringify(v);
+ } catch (error) {
+ return '[UnexpectedJSONParseError]: ' + error.message;
+ }
+};
+
+
+/***/ }),
+
+/***/ 63350:
+/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
+
+
+/**
+ * This is the common logic for both the Node.js and web browser
+ * implementations of `debug()`.
+ */
+
+function setup(env) {
+ createDebug.debug = createDebug;
+ createDebug.default = createDebug;
+ createDebug.coerce = coerce;
+ createDebug.disable = disable;
+ createDebug.enable = enable;
+ createDebug.enabled = enabled;
+ createDebug.humanize = __nccwpck_require__(26647);
+ createDebug.destroy = destroy;
+
+ Object.keys(env).forEach(key => {
+ createDebug[key] = env[key];
+ });
+
+ /**
+ * The currently active debug mode names, and names to skip.
+ */
+
+ createDebug.names = [];
+ createDebug.skips = [];
+
+ /**
+ * Map of special "%n" handling functions, for the debug "format" argument.
+ *
+ * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
+ */
+ createDebug.formatters = {};
+
+ /**
+ * Selects a color for a debug namespace
+ * @param {String} namespace The namespace string for the debug instance to be colored
+ * @return {Number|String} An ANSI color code for the given namespace
+ * @api private
+ */
+ function selectColor(namespace) {
+ let hash = 0;
+
+ for (let i = 0; i < namespace.length; i++) {
+ hash = ((hash << 5) - hash) + namespace.charCodeAt(i);
+ hash |= 0; // Convert to 32bit integer
+ }
+
+ return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
+ }
+ createDebug.selectColor = selectColor;
+
+ /**
+ * Create a debugger with the given `namespace`.
+ *
+ * @param {String} namespace
+ * @return {Function}
+ * @api public
+ */
+ function createDebug(namespace) {
+ let prevTime;
+ let enableOverride = null;
+ let namespacesCache;
+ let enabledCache;
+
+ function debug(...args) {
+ // Disabled?
+ if (!debug.enabled) {
+ return;
+ }
+
+ const self = debug;
+
+ // Set `diff` timestamp
+ const curr = Number(new Date());
+ const ms = curr - (prevTime || curr);
+ self.diff = ms;
+ self.prev = prevTime;
+ self.curr = curr;
+ prevTime = curr;
+
+ args[0] = createDebug.coerce(args[0]);
+
+ if (typeof args[0] !== 'string') {
+ // Anything else let's inspect with %O
+ args.unshift('%O');
+ }
+
+ // Apply any `formatters` transformations
+ let index = 0;
+ args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {
+ // If we encounter an escaped % then don't increase the array index
+ if (match === '%%') {
+ return '%';
+ }
+ index++;
+ const formatter = createDebug.formatters[format];
+ if (typeof formatter === 'function') {
+ const val = args[index];
+ match = formatter.call(self, val);
+
+ // Now we need to remove `args[index]` since it's inlined in the `format`
+ args.splice(index, 1);
+ index--;
+ }
+ return match;
+ });
+
+ // Apply env-specific formatting (colors, etc.)
+ createDebug.formatArgs.call(self, args);
+
+ const logFn = self.log || createDebug.log;
+ logFn.apply(self, args);
+ }
+
+ debug.namespace = namespace;
+ debug.useColors = createDebug.useColors();
+ debug.color = createDebug.selectColor(namespace);
+ debug.extend = extend;
+ debug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.
+
+ Object.defineProperty(debug, 'enabled', {
+ enumerable: true,
+ configurable: false,
+ get: () => {
+ if (enableOverride !== null) {
+ return enableOverride;
+ }
+ if (namespacesCache !== createDebug.namespaces) {
+ namespacesCache = createDebug.namespaces;
+ enabledCache = createDebug.enabled(namespace);
+ }
+
+ return enabledCache;
+ },
+ set: v => {
+ enableOverride = v;
+ }
+ });
+
+ // Env-specific initialization logic for debug instances
+ if (typeof createDebug.init === 'function') {
+ createDebug.init(debug);
+ }
+
+ return debug;
+ }
+
+ function extend(namespace, delimiter) {
+ const newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);
+ newDebug.log = this.log;
+ return newDebug;
+ }
+
+ /**
+ * Enables a debug mode by namespaces. This can include modes
+ * separated by a colon and wildcards.
+ *
+ * @param {String} namespaces
+ * @api public
+ */
+ function enable(namespaces) {
+ createDebug.save(namespaces);
+ createDebug.namespaces = namespaces;
+
+ createDebug.names = [];
+ createDebug.skips = [];
+
+ const split = (typeof namespaces === 'string' ? namespaces : '')
+ .trim()
+ .replace(/\s+/g, ',')
+ .split(',')
+ .filter(Boolean);
+
+ for (const ns of split) {
+ if (ns[0] === '-') {
+ createDebug.skips.push(ns.slice(1));
+ } else {
+ createDebug.names.push(ns);
+ }
+ }
+ }
+
+ /**
+ * Checks if the given string matches a namespace template, honoring
+ * asterisks as wildcards.
+ *
+ * @param {String} search
+ * @param {String} template
+ * @return {Boolean}
+ */
+ function matchesTemplate(search, template) {
+ let searchIndex = 0;
+ let templateIndex = 0;
+ let starIndex = -1;
+ let matchIndex = 0;
+
+ while (searchIndex < search.length) {
+ if (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === '*')) {
+ // Match character or proceed with wildcard
+ if (template[templateIndex] === '*') {
+ starIndex = templateIndex;
+ matchIndex = searchIndex;
+ templateIndex++; // Skip the '*'
+ } else {
+ searchIndex++;
+ templateIndex++;
+ }
+ } else if (starIndex !== -1) { // eslint-disable-line no-negated-condition
+ // Backtrack to the last '*' and try to match more characters
+ templateIndex = starIndex + 1;
+ matchIndex++;
+ searchIndex = matchIndex;
+ } else {
+ return false; // No match
+ }
+ }
+
+ // Handle trailing '*' in template
+ while (templateIndex < template.length && template[templateIndex] === '*') {
+ templateIndex++;
+ }
+
+ return templateIndex === template.length;
+ }
+
+ /**
+ * Disable debug output.
+ *
+ * @return {String} namespaces
+ * @api public
+ */
+ function disable() {
+ const namespaces = [
+ ...createDebug.names,
+ ...createDebug.skips.map(namespace => '-' + namespace)
+ ].join(',');
+ createDebug.enable('');
+ return namespaces;
+ }
+
+ /**
+ * Returns true if the given mode name is enabled, false otherwise.
+ *
+ * @param {String} name
+ * @return {Boolean}
+ * @api public
+ */
+ function enabled(name) {
+ for (const skip of createDebug.skips) {
+ if (matchesTemplate(name, skip)) {
+ return false;
+ }
+ }
+
+ for (const ns of createDebug.names) {
+ if (matchesTemplate(name, ns)) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Coerce `val`.
+ *
+ * @param {Mixed} val
+ * @return {Mixed}
+ * @api private
+ */
+ function coerce(val) {
+ if (val instanceof Error) {
+ return val.stack || val.message;
+ }
+ return val;
+ }
+
+ /**
+ * XXX DO NOT USE. This is a temporary stub function.
+ * XXX It WILL be removed in the next major release.
+ */
+ function destroy() {
+ console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
+ }
+
+ createDebug.enable(createDebug.load());
+
+ return createDebug;
}
-// Copyright (c) Microsoft Corporation.
-// Licensed under the MIT license.
-const AVRO_SYNC_MARKER_SIZE = 16;
-const AVRO_INIT_BYTES = new Uint8Array([79, 98, 106, 1]);
-const AVRO_CODEC_KEY = "avro.codec";
-const AVRO_SCHEMA_KEY = "avro.schema";
+module.exports = setup;
-// Copyright (c) Microsoft Corporation.
-// Licensed under the MIT license.
-class AvroParser {
- /**
- * Reads a fixed number of bytes from the stream.
- *
- * @param stream -
- * @param length -
- * @param options -
- */
- static async readFixedBytes(stream, length, options = {}) {
- const bytes = await stream.read(length, { abortSignal: options.abortSignal });
- if (bytes.length !== length) {
- throw new Error("Hit stream end.");
- }
- return bytes;
- }
- /**
- * Reads a single byte from the stream.
- *
- * @param stream -
- * @param options -
- */
- static async readByte(stream, options = {}) {
- const buf = await AvroParser.readFixedBytes(stream, 1, options);
- return buf[0];
- }
- // int and long are stored in variable-length zig-zag coding.
- // variable-length: https://lucene.apache.org/core/3_5_0/fileformats.html#VInt
- // zig-zag: https://developers.google.com/protocol-buffers/docs/encoding?csw=1#types
- static async readZigZagLong(stream, options = {}) {
- let zigZagEncoded = 0;
- let significanceInBit = 0;
- let byte, haveMoreByte, significanceInFloat;
- do {
- byte = await AvroParser.readByte(stream, options);
- haveMoreByte = byte & 0x80;
- zigZagEncoded |= (byte & 0x7f) << significanceInBit;
- significanceInBit += 7;
- } while (haveMoreByte && significanceInBit < 28); // bitwise operation only works for 32-bit integers
- if (haveMoreByte) {
- // Switch to float arithmetic
- // eslint-disable-next-line no-self-assign
- zigZagEncoded = zigZagEncoded;
- significanceInFloat = 268435456; // 2 ** 28.
- do {
- byte = await AvroParser.readByte(stream, options);
- zigZagEncoded += (byte & 0x7f) * significanceInFloat;
- significanceInFloat *= 128; // 2 ** 7
- } while (byte & 0x80);
- const res = (zigZagEncoded % 2 ? -(zigZagEncoded + 1) : zigZagEncoded) / 2;
- if (res < Number.MIN_SAFE_INTEGER || res > Number.MAX_SAFE_INTEGER) {
- throw new Error("Integer overflow.");
- }
- return res;
- }
- return (zigZagEncoded >> 1) ^ -(zigZagEncoded & 1);
- }
- static async readLong(stream, options = {}) {
- return AvroParser.readZigZagLong(stream, options);
- }
- static async readInt(stream, options = {}) {
- return AvroParser.readZigZagLong(stream, options);
- }
- static async readNull() {
- return null;
- }
- static async readBoolean(stream, options = {}) {
- const b = await AvroParser.readByte(stream, options);
- if (b === 1) {
- return true;
- }
- else if (b === 0) {
- return false;
- }
- else {
- throw new Error("Byte was not a boolean.");
- }
- }
- static async readFloat(stream, options = {}) {
- const u8arr = await AvroParser.readFixedBytes(stream, 4, options);
- const view = new DataView(u8arr.buffer, u8arr.byteOffset, u8arr.byteLength);
- return view.getFloat32(0, true); // littleEndian = true
- }
- static async readDouble(stream, options = {}) {
- const u8arr = await AvroParser.readFixedBytes(stream, 8, options);
- const view = new DataView(u8arr.buffer, u8arr.byteOffset, u8arr.byteLength);
- return view.getFloat64(0, true); // littleEndian = true
- }
- static async readBytes(stream, options = {}) {
- const size = await AvroParser.readLong(stream, options);
- if (size < 0) {
- throw new Error("Bytes size was negative.");
- }
- return stream.read(size, { abortSignal: options.abortSignal });
- }
- static async readString(stream, options = {}) {
- const u8arr = await AvroParser.readBytes(stream, options);
- const utf8decoder = new TextDecoder();
- return utf8decoder.decode(u8arr);
- }
- static async readMapPair(stream, readItemMethod, options = {}) {
- const key = await AvroParser.readString(stream, options);
- // FUTURE: this won't work with readFixed (currently not supported) which needs a length as the parameter.
- const value = await readItemMethod(stream, options);
- return { key, value };
- }
- static async readMap(stream, readItemMethod, options = {}) {
- const readPairMethod = (s, opts = {}) => {
- return AvroParser.readMapPair(s, readItemMethod, opts);
- };
- const pairs = await AvroParser.readArray(stream, readPairMethod, options);
- const dict = {};
- for (const pair of pairs) {
- dict[pair.key] = pair.value;
- }
- return dict;
- }
- static async readArray(stream, readItemMethod, options = {}) {
- const items = [];
- for (let count = await AvroParser.readLong(stream, options); count !== 0; count = await AvroParser.readLong(stream, options)) {
- if (count < 0) {
- // Ignore block sizes
- await AvroParser.readLong(stream, options);
- count = -count;
- }
- while (count--) {
- const item = await readItemMethod(stream, options);
- items.push(item);
- }
- }
- return items;
- }
+
+/***/ }),
+
+/***/ 18263:
+/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
+
+/**
+ * Detect Electron renderer / nwjs process, which is node, but we should
+ * treat as a browser.
+ */
+
+if (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) {
+ module.exports = __nccwpck_require__(57451);
+} else {
+ module.exports = __nccwpck_require__(76423);
}
-var AvroComplex;
-(function (AvroComplex) {
- AvroComplex["RECORD"] = "record";
- AvroComplex["ENUM"] = "enum";
- AvroComplex["ARRAY"] = "array";
- AvroComplex["MAP"] = "map";
- AvroComplex["UNION"] = "union";
- AvroComplex["FIXED"] = "fixed";
-})(AvroComplex || (AvroComplex = {}));
-var AvroPrimitive;
-(function (AvroPrimitive) {
- AvroPrimitive["NULL"] = "null";
- AvroPrimitive["BOOLEAN"] = "boolean";
- AvroPrimitive["INT"] = "int";
- AvroPrimitive["LONG"] = "long";
- AvroPrimitive["FLOAT"] = "float";
- AvroPrimitive["DOUBLE"] = "double";
- AvroPrimitive["BYTES"] = "bytes";
- AvroPrimitive["STRING"] = "string";
-})(AvroPrimitive || (AvroPrimitive = {}));
-class AvroType {
- /**
- * Determines the AvroType from the Avro Schema.
- */
- static fromSchema(schema) {
- if (typeof schema === "string") {
- return AvroType.fromStringSchema(schema);
- }
- else if (Array.isArray(schema)) {
- return AvroType.fromArraySchema(schema);
- }
- else {
- return AvroType.fromObjectSchema(schema);
- }
- }
- static fromStringSchema(schema) {
- switch (schema) {
- case AvroPrimitive.NULL:
- case AvroPrimitive.BOOLEAN:
- case AvroPrimitive.INT:
- case AvroPrimitive.LONG:
- case AvroPrimitive.FLOAT:
- case AvroPrimitive.DOUBLE:
- case AvroPrimitive.BYTES:
- case AvroPrimitive.STRING:
- return new AvroPrimitiveType(schema);
- default:
- throw new Error(`Unexpected Avro type ${schema}`);
- }
- }
- static fromArraySchema(schema) {
- return new AvroUnionType(schema.map(AvroType.fromSchema));
- }
- static fromObjectSchema(schema) {
- const type = schema.type;
- // Primitives can be defined as strings or objects
- try {
- return AvroType.fromStringSchema(type);
- }
- catch (err) {
- // eslint-disable-line no-empty
- }
- switch (type) {
- case AvroComplex.RECORD:
- if (schema.aliases) {
- throw new Error(`aliases currently is not supported, schema: ${schema}`);
- }
- if (!schema.name) {
- throw new Error(`Required attribute 'name' doesn't exist on schema: ${schema}`);
- }
- // eslint-disable-next-line no-case-declarations
- const fields = {};
- if (!schema.fields) {
- throw new Error(`Required attribute 'fields' doesn't exist on schema: ${schema}`);
- }
- for (const field of schema.fields) {
- fields[field.name] = AvroType.fromSchema(field.type);
- }
- return new AvroRecordType(fields, schema.name);
- case AvroComplex.ENUM:
- if (schema.aliases) {
- throw new Error(`aliases currently is not supported, schema: ${schema}`);
- }
- if (!schema.symbols) {
- throw new Error(`Required attribute 'symbols' doesn't exist on schema: ${schema}`);
- }
- return new AvroEnumType(schema.symbols);
- case AvroComplex.MAP:
- if (!schema.values) {
- throw new Error(`Required attribute 'values' doesn't exist on schema: ${schema}`);
- }
- return new AvroMapType(AvroType.fromSchema(schema.values));
- case AvroComplex.ARRAY: // Unused today
- case AvroComplex.FIXED: // Unused today
- default:
- throw new Error(`Unexpected Avro type ${type} in ${schema}`);
- }
- }
+
+
+/***/ }),
+
+/***/ 76423:
+/***/ ((module, exports, __nccwpck_require__) => {
+
+/**
+ * Module dependencies.
+ */
+
+const tty = __nccwpck_require__(52018);
+const util = __nccwpck_require__(39023);
+
+/**
+ * This is the Node.js implementation of `debug()`.
+ */
+
+exports.init = init;
+exports.log = log;
+exports.formatArgs = formatArgs;
+exports.save = save;
+exports.load = load;
+exports.useColors = useColors;
+exports.destroy = util.deprecate(
+ () => {},
+ 'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'
+);
+
+/**
+ * Colors.
+ */
+
+exports.colors = [6, 2, 3, 4, 5, 1];
+
+try {
+ // Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json)
+ // eslint-disable-next-line import/no-extraneous-dependencies
+ const supportsColor = __nccwpck_require__(56708);
+
+ if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
+ exports.colors = [
+ 20,
+ 21,
+ 26,
+ 27,
+ 32,
+ 33,
+ 38,
+ 39,
+ 40,
+ 41,
+ 42,
+ 43,
+ 44,
+ 45,
+ 56,
+ 57,
+ 62,
+ 63,
+ 68,
+ 69,
+ 74,
+ 75,
+ 76,
+ 77,
+ 78,
+ 79,
+ 80,
+ 81,
+ 92,
+ 93,
+ 98,
+ 99,
+ 112,
+ 113,
+ 128,
+ 129,
+ 134,
+ 135,
+ 148,
+ 149,
+ 160,
+ 161,
+ 162,
+ 163,
+ 164,
+ 165,
+ 166,
+ 167,
+ 168,
+ 169,
+ 170,
+ 171,
+ 172,
+ 173,
+ 178,
+ 179,
+ 184,
+ 185,
+ 196,
+ 197,
+ 198,
+ 199,
+ 200,
+ 201,
+ 202,
+ 203,
+ 204,
+ 205,
+ 206,
+ 207,
+ 208,
+ 209,
+ 214,
+ 215,
+ 220,
+ 221
+ ];
+ }
+} catch (error) {
+ // Swallow - we only care if `supports-color` is available; it doesn't have to be.
}
-class AvroPrimitiveType extends AvroType {
- constructor(primitive) {
- super();
- this._primitive = primitive;
- }
- read(stream, options = {}) {
- switch (this._primitive) {
- case AvroPrimitive.NULL:
- return AvroParser.readNull();
- case AvroPrimitive.BOOLEAN:
- return AvroParser.readBoolean(stream, options);
- case AvroPrimitive.INT:
- return AvroParser.readInt(stream, options);
- case AvroPrimitive.LONG:
- return AvroParser.readLong(stream, options);
- case AvroPrimitive.FLOAT:
- return AvroParser.readFloat(stream, options);
- case AvroPrimitive.DOUBLE:
- return AvroParser.readDouble(stream, options);
- case AvroPrimitive.BYTES:
- return AvroParser.readBytes(stream, options);
- case AvroPrimitive.STRING:
- return AvroParser.readString(stream, options);
- default:
- throw new Error("Unknown Avro Primitive");
- }
- }
+
+/**
+ * Build up the default `inspectOpts` object from the environment variables.
+ *
+ * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js
+ */
+
+exports.inspectOpts = Object.keys(process.env).filter(key => {
+ return /^debug_/i.test(key);
+}).reduce((obj, key) => {
+ // Camel-case
+ const prop = key
+ .substring(6)
+ .toLowerCase()
+ .replace(/_([a-z])/g, (_, k) => {
+ return k.toUpperCase();
+ });
+
+ // Coerce string value into JS value
+ let val = process.env[key];
+ if (/^(yes|on|true|enabled)$/i.test(val)) {
+ val = true;
+ } else if (/^(no|off|false|disabled)$/i.test(val)) {
+ val = false;
+ } else if (val === 'null') {
+ val = null;
+ } else {
+ val = Number(val);
+ }
+
+ obj[prop] = val;
+ return obj;
+}, {});
+
+/**
+ * Is stdout a TTY? Colored output is enabled when `true`.
+ */
+
+function useColors() {
+ return 'colors' in exports.inspectOpts ?
+ Boolean(exports.inspectOpts.colors) :
+ tty.isatty(process.stderr.fd);
}
-class AvroEnumType extends AvroType {
- constructor(symbols) {
- super();
- this._symbols = symbols;
- }
- async read(stream, options = {}) {
- const value = await AvroParser.readInt(stream, options);
- return this._symbols[value];
- }
+
+/**
+ * Adds ANSI color escape codes if enabled.
+ *
+ * @api public
+ */
+
+function formatArgs(args) {
+ const {namespace: name, useColors} = this;
+
+ if (useColors) {
+ const c = this.color;
+ const colorCode = '\u001B[3' + (c < 8 ? c : '8;5;' + c);
+ const prefix = ` ${colorCode};1m${name} \u001B[0m`;
+
+ args[0] = prefix + args[0].split('\n').join('\n' + prefix);
+ args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\u001B[0m');
+ } else {
+ args[0] = getDate() + name + ' ' + args[0];
+ }
}
-class AvroUnionType extends AvroType {
- constructor(types) {
- super();
- this._types = types;
- }
- async read(stream, options = {}) {
- // eslint-disable-line @typescript-eslint/ban-types
- const typeIndex = await AvroParser.readInt(stream, options);
- return this._types[typeIndex].read(stream, options);
- }
+
+function getDate() {
+ if (exports.inspectOpts.hideDate) {
+ return '';
+ }
+ return new Date().toISOString() + ' ';
}
-class AvroMapType extends AvroType {
- constructor(itemType) {
- super();
- this._itemType = itemType;
- }
- read(stream, options = {}) {
- const readItemMethod = (s, opts) => {
- return this._itemType.read(s, opts);
- };
- return AvroParser.readMap(stream, readItemMethod, options);
- }
+
+/**
+ * Invokes `util.formatWithOptions()` with the specified arguments and writes to stderr.
+ */
+
+function log(...args) {
+ return process.stderr.write(util.formatWithOptions(exports.inspectOpts, ...args) + '\n');
}
-class AvroRecordType extends AvroType {
- constructor(fields, name) {
- super();
- this._fields = fields;
- this._name = name;
- }
- async read(stream, options = {}) {
- const record = {};
- record["$schema"] = this._name;
- for (const key in this._fields) {
- if (Object.prototype.hasOwnProperty.call(this._fields, key)) {
- record[key] = await this._fields[key].read(stream, options);
- }
- }
- return record;
- }
+
+/**
+ * Save `namespaces`.
+ *
+ * @param {String} namespaces
+ * @api private
+ */
+function save(namespaces) {
+ if (namespaces) {
+ process.env.DEBUG = namespaces;
+ } else {
+ // If you set a process.env field to null or undefined, it gets cast to the
+ // string 'null' or 'undefined'. Just delete instead.
+ delete process.env.DEBUG;
+ }
}
-// Copyright (c) Microsoft Corporation.
-// Licensed under the MIT license.
-function arraysEqual(a, b) {
- if (a === b)
- return true;
- // eslint-disable-next-line eqeqeq
- if (a == null || b == null)
- return false;
- if (a.length !== b.length)
- return false;
- for (let i = 0; i < a.length; ++i) {
- if (a[i] !== b[i])
- return false;
- }
- return true;
+/**
+ * Load `namespaces`.
+ *
+ * @return {String} returns the previously persisted debug modes
+ * @api private
+ */
+
+function load() {
+ return process.env.DEBUG;
}
-// Copyright (c) Microsoft Corporation.
-// Licensed under the MIT license.
-class AvroReader {
- get blockOffset() {
- return this._blockOffset;
- }
- get objectIndex() {
- return this._objectIndex;
+/**
+ * Init logic for `debug` instances.
+ *
+ * Create a new `inspectOpts` object in case `useColors` is set
+ * differently for a particular `debug` instance.
+ */
+
+function init(debug) {
+ debug.inspectOpts = {};
+
+ const keys = Object.keys(exports.inspectOpts);
+ for (let i = 0; i < keys.length; i++) {
+ debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
+ }
+}
+
+module.exports = __nccwpck_require__(63350)(exports);
+
+const {formatters} = module.exports;
+
+/**
+ * Map %o to `util.inspect()`, all on a single line.
+ */
+
+formatters.o = function (v) {
+ this.inspectOpts.colors = this.useColors;
+ return util.inspect(v, this.inspectOpts)
+ .split('\n')
+ .map(str => str.trim())
+ .join(' ');
+};
+
+/**
+ * Map %O to `util.inspect()`, allowing multiple lines if needed.
+ */
+
+formatters.O = function (v) {
+ this.inspectOpts.colors = this.useColors;
+ return util.inspect(v, this.inspectOpts);
+};
+
+
+/***/ }),
+
+/***/ 35459:
+/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
+
+"use strict";
+
+const {Transform, PassThrough} = __nccwpck_require__(2203);
+const zlib = __nccwpck_require__(43106);
+const mimicResponse = __nccwpck_require__(73897);
+
+module.exports = response => {
+ const contentEncoding = (response.headers['content-encoding'] || '').toLowerCase();
+
+ if (!['gzip', 'deflate', 'br'].includes(contentEncoding)) {
+ return response;
+ }
+
+ // TODO: Remove this when targeting Node.js 12.
+ const isBrotli = contentEncoding === 'br';
+ if (isBrotli && typeof zlib.createBrotliDecompress !== 'function') {
+ response.destroy(new Error('Brotli is not supported on Node.js < 12'));
+ return response;
+ }
+
+ let isEmpty = true;
+
+ const checker = new Transform({
+ transform(data, _encoding, callback) {
+ isEmpty = false;
+
+ callback(null, data);
+ },
+
+ flush(callback) {
+ callback();
+ }
+ });
+
+ const finalStream = new PassThrough({
+ autoDestroy: false,
+ destroy(error, callback) {
+ response.destroy();
+
+ callback(error);
+ }
+ });
+
+ const decompressStream = isBrotli ? zlib.createBrotliDecompress() : zlib.createUnzip();
+
+ decompressStream.once('error', error => {
+ if (isEmpty && !response.readable) {
+ finalStream.end();
+ return;
+ }
+
+ finalStream.destroy(error);
+ });
+
+ mimicResponse(response, finalStream);
+ response.pipe(checker).pipe(decompressStream).pipe(finalStream);
+
+ return finalStream;
+};
+
+
+/***/ }),
+
+/***/ 68562:
+/***/ ((module, exports) => {
+
+"use strict";
+
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+function isTLSSocket(socket) {
+ return socket.encrypted;
+}
+const deferToConnect = (socket, fn) => {
+ let listeners;
+ if (typeof fn === 'function') {
+ const connect = fn;
+ listeners = { connect };
}
- constructor(dataStream, headerStream, currentBlockOffset, indexWithinCurrentBlock) {
- this._dataStream = dataStream;
- this._headerStream = headerStream || dataStream;
- this._initialized = false;
- this._blockOffset = currentBlockOffset || 0;
- this._objectIndex = indexWithinCurrentBlock || 0;
- this._initialBlockOffset = currentBlockOffset || 0;
+ else {
+ listeners = fn;
}
- async initialize(options = {}) {
- const header = await AvroParser.readFixedBytes(this._headerStream, AVRO_INIT_BYTES.length, {
- abortSignal: options.abortSignal,
- });
- if (!arraysEqual(header, AVRO_INIT_BYTES)) {
- throw new Error("Stream is not an Avro file.");
- }
- // File metadata is written as if defined by the following map schema:
- // { "type": "map", "values": "bytes"}
- this._metadata = await AvroParser.readMap(this._headerStream, AvroParser.readString, {
- abortSignal: options.abortSignal,
- });
- // Validate codec
- const codec = this._metadata[AVRO_CODEC_KEY];
- if (!(codec === undefined || codec === null || codec === "null")) {
- throw new Error("Codecs are not supported");
- }
- // The 16-byte, randomly-generated sync marker for this file.
- this._syncMarker = await AvroParser.readFixedBytes(this._headerStream, AVRO_SYNC_MARKER_SIZE, {
- abortSignal: options.abortSignal,
- });
- // Parse the schema
- const schema = JSON.parse(this._metadata[AVRO_SCHEMA_KEY]);
- this._itemType = AvroType.fromSchema(schema);
- if (this._blockOffset === 0) {
- this._blockOffset = this._initialBlockOffset + this._dataStream.position;
+ const hasConnectListener = typeof listeners.connect === 'function';
+ const hasSecureConnectListener = typeof listeners.secureConnect === 'function';
+ const hasCloseListener = typeof listeners.close === 'function';
+ const onConnect = () => {
+ if (hasConnectListener) {
+ listeners.connect();
}
- this._itemsRemainingInBlock = await AvroParser.readLong(this._dataStream, {
- abortSignal: options.abortSignal,
- });
- // skip block length
- await AvroParser.readLong(this._dataStream, { abortSignal: options.abortSignal });
- this._initialized = true;
- if (this._objectIndex && this._objectIndex > 0) {
- for (let i = 0; i < this._objectIndex; i++) {
- await this._itemType.read(this._dataStream, { abortSignal: options.abortSignal });
- this._itemsRemainingInBlock--;
+ if (isTLSSocket(socket) && hasSecureConnectListener) {
+ if (socket.authorized) {
+ listeners.secureConnect();
+ }
+ else if (!socket.authorizationError) {
+ socket.once('secureConnect', listeners.secureConnect);
}
}
+ if (hasCloseListener) {
+ socket.once('close', listeners.close);
+ }
+ };
+ if (socket.writable && !socket.connecting) {
+ onConnect();
}
- hasNext() {
- return !this._initialized || this._itemsRemainingInBlock > 0;
+ else if (socket.connecting) {
+ socket.once('connect', onConnect);
}
- parseObjects() {
- return tslib.__asyncGenerator(this, arguments, function* parseObjects_1(options = {}) {
- if (!this._initialized) {
- yield tslib.__await(this.initialize(options));
- }
- while (this.hasNext()) {
- const result = yield tslib.__await(this._itemType.read(this._dataStream, {
- abortSignal: options.abortSignal,
- }));
- this._itemsRemainingInBlock--;
- this._objectIndex++;
- if (this._itemsRemainingInBlock === 0) {
- const marker = yield tslib.__await(AvroParser.readFixedBytes(this._dataStream, AVRO_SYNC_MARKER_SIZE, {
- abortSignal: options.abortSignal,
- }));
- this._blockOffset = this._initialBlockOffset + this._dataStream.position;
- this._objectIndex = 0;
- if (!arraysEqual(this._syncMarker, marker)) {
- throw new Error("Stream is not a valid Avro file.");
- }
- try {
- this._itemsRemainingInBlock = yield tslib.__await(AvroParser.readLong(this._dataStream, {
- abortSignal: options.abortSignal,
- }));
- }
- catch (err) {
- // We hit the end of the stream.
- this._itemsRemainingInBlock = 0;
- }
- if (this._itemsRemainingInBlock > 0) {
- // Ignore block size
- yield tslib.__await(AvroParser.readLong(this._dataStream, { abortSignal: options.abortSignal }));
- }
- }
- yield yield tslib.__await(result);
- }
- });
+ else if (socket.destroyed && hasCloseListener) {
+ listeners.close(socket._hadError);
}
-}
+};
+exports["default"] = deferToConnect;
+// For CommonJS default export support
+module.exports = deferToConnect;
+module.exports["default"] = deferToConnect;
-// Copyright (c) Microsoft Corporation.
-// Licensed under the MIT license.
-class AvroReadable {
-}
-// Copyright (c) Microsoft Corporation.
-// Licensed under the MIT license.
-const ABORT_ERROR = new abortController.AbortError("Reading from the avro stream was aborted.");
-class AvroReadableFromStream extends AvroReadable {
- toUint8Array(data) {
- if (typeof data === "string") {
- return Buffer.from(data);
- }
- return data;
- }
- constructor(readable) {
- super();
- this._readable = readable;
- this._position = 0;
- }
- get position() {
- return this._position;
- }
- async read(size, options = {}) {
- var _a;
- if ((_a = options.abortSignal) === null || _a === void 0 ? void 0 : _a.aborted) {
- throw ABORT_ERROR;
- }
- if (size < 0) {
- throw new Error(`size parameter should be positive: ${size}`);
- }
- if (size === 0) {
- return new Uint8Array();
- }
- if (!this._readable.readable) {
- throw new Error("Stream no longer readable.");
- }
- // See if there is already enough data.
- const chunk = this._readable.read(size);
- if (chunk) {
- this._position += chunk.length;
- // chunk.length maybe less than desired size if the stream ends.
- return this.toUint8Array(chunk);
- }
- else {
- // register callback to wait for enough data to read
- return new Promise((resolve, reject) => {
- /* eslint-disable @typescript-eslint/no-use-before-define */
- const cleanUp = () => {
- this._readable.removeListener("readable", readableCallback);
- this._readable.removeListener("error", rejectCallback);
- this._readable.removeListener("end", rejectCallback);
- this._readable.removeListener("close", rejectCallback);
- if (options.abortSignal) {
- options.abortSignal.removeEventListener("abort", abortHandler);
- }
- };
- const readableCallback = () => {
- const callbackChunk = this._readable.read(size);
- if (callbackChunk) {
- this._position += callbackChunk.length;
- cleanUp();
- // callbackChunk.length maybe less than desired size if the stream ends.
- resolve(this.toUint8Array(callbackChunk));
- }
- };
- const rejectCallback = () => {
- cleanUp();
- reject();
- };
- const abortHandler = () => {
- cleanUp();
- reject(ABORT_ERROR);
- };
- this._readable.on("readable", readableCallback);
- this._readable.once("error", rejectCallback);
- this._readable.once("end", rejectCallback);
- this._readable.once("close", rejectCallback);
- if (options.abortSignal) {
- options.abortSignal.addEventListener("abort", abortHandler);
- }
- /* eslint-enable @typescript-eslint/no-use-before-define */
- });
+/***/ }),
+
+/***/ 87097:
+/***/ ((__unused_webpack_module, exports) => {
+
+"use strict";
+
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.attributeNames = exports.elementNames = void 0;
+exports.elementNames = new Map([
+ "altGlyph",
+ "altGlyphDef",
+ "altGlyphItem",
+ "animateColor",
+ "animateMotion",
+ "animateTransform",
+ "clipPath",
+ "feBlend",
+ "feColorMatrix",
+ "feComponentTransfer",
+ "feComposite",
+ "feConvolveMatrix",
+ "feDiffuseLighting",
+ "feDisplacementMap",
+ "feDistantLight",
+ "feDropShadow",
+ "feFlood",
+ "feFuncA",
+ "feFuncB",
+ "feFuncG",
+ "feFuncR",
+ "feGaussianBlur",
+ "feImage",
+ "feMerge",
+ "feMergeNode",
+ "feMorphology",
+ "feOffset",
+ "fePointLight",
+ "feSpecularLighting",
+ "feSpotLight",
+ "feTile",
+ "feTurbulence",
+ "foreignObject",
+ "glyphRef",
+ "linearGradient",
+ "radialGradient",
+ "textPath",
+].map(function (val) { return [val.toLowerCase(), val]; }));
+exports.attributeNames = new Map([
+ "definitionURL",
+ "attributeName",
+ "attributeType",
+ "baseFrequency",
+ "baseProfile",
+ "calcMode",
+ "clipPathUnits",
+ "diffuseConstant",
+ "edgeMode",
+ "filterUnits",
+ "glyphRef",
+ "gradientTransform",
+ "gradientUnits",
+ "kernelMatrix",
+ "kernelUnitLength",
+ "keyPoints",
+ "keySplines",
+ "keyTimes",
+ "lengthAdjust",
+ "limitingConeAngle",
+ "markerHeight",
+ "markerUnits",
+ "markerWidth",
+ "maskContentUnits",
+ "maskUnits",
+ "numOctaves",
+ "pathLength",
+ "patternContentUnits",
+ "patternTransform",
+ "patternUnits",
+ "pointsAtX",
+ "pointsAtY",
+ "pointsAtZ",
+ "preserveAlpha",
+ "preserveAspectRatio",
+ "primitiveUnits",
+ "refX",
+ "refY",
+ "repeatCount",
+ "repeatDur",
+ "requiredExtensions",
+ "requiredFeatures",
+ "specularConstant",
+ "specularExponent",
+ "spreadMethod",
+ "startOffset",
+ "stdDeviation",
+ "stitchTiles",
+ "surfaceScale",
+ "systemLanguage",
+ "tableValues",
+ "targetX",
+ "targetY",
+ "textLength",
+ "viewBox",
+ "viewTarget",
+ "xChannelSelector",
+ "yChannelSelector",
+ "zoomAndPan",
+].map(function (val) { return [val.toLowerCase(), val]; }));
+
+
+/***/ }),
+
+/***/ 38145:
+/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
+
+"use strict";
+
+var __assign = (this && this.__assign) || function () {
+ __assign = Object.assign || function(t) {
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
+ s = arguments[i];
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
+ t[p] = s[p];
}
+ return t;
+ };
+ return __assign.apply(this, arguments);
+};
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
}
-}
-
-// Copyright (c) Microsoft Corporation.
-// Licensed under the MIT license.
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.render = void 0;
+/*
+ * Module dependencies
+ */
+var ElementType = __importStar(__nccwpck_require__(51368));
+var entities_1 = __nccwpck_require__(53204);
/**
- * ONLY AVAILABLE IN NODE.JS RUNTIME.
+ * Mixed-case SVG and MathML tags & attributes
+ * recognized by the HTML parser.
*
- * A Node.js BlobQuickQueryStream will internally parse avro data stream for blob query.
+ * @see https://html.spec.whatwg.org/multipage/parsing.html#parsing-main-inforeign
*/
-class BlobQuickQueryStream extends stream.Readable {
- /**
- * Creates an instance of BlobQuickQueryStream.
- *
- * @param source - The current ReadableStream returned from getter
- * @param options -
- */
- constructor(source, options = {}) {
- super();
- this.avroPaused = true;
- this.source = source;
- this.onProgress = options.onProgress;
- this.onError = options.onError;
- this.avroReader = new AvroReader(new AvroReadableFromStream(this.source));
- this.avroIter = this.avroReader.parseObjects({ abortSignal: options.abortSignal });
- }
- _read() {
- if (this.avroPaused) {
- this.readInternal().catch((err) => {
- this.emit("error", err);
- });
+var foreignNames_js_1 = __nccwpck_require__(87097);
+var unencodedElements = new Set([
+ "style",
+ "script",
+ "xmp",
+ "iframe",
+ "noembed",
+ "noframes",
+ "plaintext",
+ "noscript",
+]);
+function replaceQuotes(value) {
+ return value.replace(/"/g, """);
+}
+/**
+ * Format attributes
+ */
+function formatAttributes(attributes, opts) {
+ var _a;
+ if (!attributes)
+ return;
+ var encode = ((_a = opts.encodeEntities) !== null && _a !== void 0 ? _a : opts.decodeEntities) === false
+ ? replaceQuotes
+ : opts.xmlMode || opts.encodeEntities !== "utf8"
+ ? entities_1.encodeXML
+ : entities_1.escapeAttribute;
+ return Object.keys(attributes)
+ .map(function (key) {
+ var _a, _b;
+ var value = (_a = attributes[key]) !== null && _a !== void 0 ? _a : "";
+ if (opts.xmlMode === "foreign") {
+ /* Fix up mixed-case attribute names */
+ key = (_b = foreignNames_js_1.attributeNames.get(key)) !== null && _b !== void 0 ? _b : key;
}
- }
- async readInternal() {
- this.avroPaused = false;
- let avroNext;
- do {
- avroNext = await this.avroIter.next();
- if (avroNext.done) {
- break;
- }
- const obj = avroNext.value;
- const schema = obj.$schema;
- if (typeof schema !== "string") {
- throw Error("Missing schema in avro record.");
- }
- switch (schema) {
- case "com.microsoft.azure.storage.queryBlobContents.resultData":
- {
- const data = obj.data;
- if (data instanceof Uint8Array === false) {
- throw Error("Invalid data in avro result record.");
- }
- if (!this.push(Buffer.from(data))) {
- this.avroPaused = true;
- }
- }
- break;
- case "com.microsoft.azure.storage.queryBlobContents.progress":
- {
- const bytesScanned = obj.bytesScanned;
- if (typeof bytesScanned !== "number") {
- throw Error("Invalid bytesScanned in avro progress record.");
- }
- if (this.onProgress) {
- this.onProgress({ loadedBytes: bytesScanned });
- }
- }
- break;
- case "com.microsoft.azure.storage.queryBlobContents.end":
- if (this.onProgress) {
- const totalBytes = obj.totalBytes;
- if (typeof totalBytes !== "number") {
- throw Error("Invalid totalBytes in avro end record.");
- }
- this.onProgress({ loadedBytes: totalBytes });
- }
- this.push(null);
- break;
- case "com.microsoft.azure.storage.queryBlobContents.error":
- if (this.onError) {
- const fatal = obj.fatal;
- if (typeof fatal !== "boolean") {
- throw Error("Invalid fatal in avro error record.");
- }
- const name = obj.name;
- if (typeof name !== "string") {
- throw Error("Invalid name in avro error record.");
- }
- const description = obj.description;
- if (typeof description !== "string") {
- throw Error("Invalid description in avro error record.");
- }
- const position = obj.position;
- if (typeof position !== "number") {
- throw Error("Invalid position in avro error record.");
- }
- this.onError({
- position,
- name,
- isFatal: fatal,
- description,
- });
- }
- break;
- default:
- throw Error(`Unknown schema ${schema} in avro progress record.`);
- }
- } while (!avroNext.done && !this.avroPaused);
- }
+ if (!opts.emptyAttrs && !opts.xmlMode && value === "") {
+ return key;
+ }
+ return "".concat(key, "=\"").concat(encode(value), "\"");
+ })
+ .join(" ");
}
-
-// Copyright (c) Microsoft Corporation.
-// Licensed under the MIT license.
/**
- * ONLY AVAILABLE IN NODE.JS RUNTIME.
- *
- * BlobQueryResponse implements BlobDownloadResponseModel interface, and in Node.js runtime it will
- * parse avor data returned by blob query.
+ * Self-enclosing tags
*/
-class BlobQueryResponse {
- /**
- * Indicates that the service supports
- * requests for partial file content.
- *
- * @readonly
- */
- get acceptRanges() {
- return this.originalResponse.acceptRanges;
- }
- /**
- * Returns if it was previously specified
- * for the file.
- *
- * @readonly
- */
- get cacheControl() {
- return this.originalResponse.cacheControl;
- }
- /**
- * Returns the value that was specified
- * for the 'x-ms-content-disposition' header and specifies how to process the
- * response.
- *
- * @readonly
- */
- get contentDisposition() {
- return this.originalResponse.contentDisposition;
- }
- /**
- * Returns the value that was specified
- * for the Content-Encoding request header.
- *
- * @readonly
- */
- get contentEncoding() {
- return this.originalResponse.contentEncoding;
- }
- /**
- * Returns the value that was specified
- * for the Content-Language request header.
- *
- * @readonly
- */
- get contentLanguage() {
- return this.originalResponse.contentLanguage;
- }
- /**
- * The current sequence number for a
- * page blob. This header is not returned for block blobs or append blobs.
- *
- * @readonly
- */
- get blobSequenceNumber() {
- return this.originalResponse.blobSequenceNumber;
- }
- /**
- * The blob's type. Possible values include:
- * 'BlockBlob', 'PageBlob', 'AppendBlob'.
- *
- * @readonly
- */
- get blobType() {
- return this.originalResponse.blobType;
- }
- /**
- * The number of bytes present in the
- * response body.
- *
- * @readonly
- */
- get contentLength() {
- return this.originalResponse.contentLength;
- }
- /**
- * If the file has an MD5 hash and the
- * request is to read the full file, this response header is returned so that
- * the client can check for message content integrity. If the request is to
- * read a specified range and the 'x-ms-range-get-content-md5' is set to
- * true, then the request returns an MD5 hash for the range, as long as the
- * range size is less than or equal to 4 MB. If neither of these sets of
- * conditions is true, then no value is returned for the 'Content-MD5'
- * header.
- *
- * @readonly
- */
- get contentMD5() {
- return this.originalResponse.contentMD5;
- }
- /**
- * Indicates the range of bytes returned if
- * the client requested a subset of the file by setting the Range request
- * header.
- *
- * @readonly
- */
- get contentRange() {
- return this.originalResponse.contentRange;
- }
- /**
- * The content type specified for the file.
- * The default content type is 'application/octet-stream'
- *
- * @readonly
- */
- get contentType() {
- return this.originalResponse.contentType;
- }
- /**
- * Conclusion time of the last attempted
- * Copy File operation where this file was the destination file. This value
- * can specify the time of a completed, aborted, or failed copy attempt.
- *
- * @readonly
- */
- get copyCompletedOn() {
- return undefined;
- }
- /**
- * String identifier for the last attempted Copy
- * File operation where this file was the destination file.
- *
- * @readonly
- */
- get copyId() {
- return this.originalResponse.copyId;
- }
- /**
- * Contains the number of bytes copied and
- * the total bytes in the source in the last attempted Copy File operation
- * where this file was the destination file. Can show between 0 and
- * Content-Length bytes copied.
- *
- * @readonly
- */
- get copyProgress() {
- return this.originalResponse.copyProgress;
- }
- /**
- * URL up to 2KB in length that specifies the
- * source file used in the last attempted Copy File operation where this file
- * was the destination file.
- *
- * @readonly
- */
- get copySource() {
- return this.originalResponse.copySource;
- }
- /**
- * State of the copy operation
- * identified by 'x-ms-copy-id'. Possible values include: 'pending',
- * 'success', 'aborted', 'failed'
- *
- * @readonly
- */
- get copyStatus() {
- return this.originalResponse.copyStatus;
- }
- /**
- * Only appears when
- * x-ms-copy-status is failed or pending. Describes cause of fatal or
- * non-fatal copy operation failure.
- *
- * @readonly
- */
- get copyStatusDescription() {
- return this.originalResponse.copyStatusDescription;
- }
- /**
- * When a blob is leased,
- * specifies whether the lease is of infinite or fixed duration. Possible
- * values include: 'infinite', 'fixed'.
- *
- * @readonly
- */
- get leaseDuration() {
- return this.originalResponse.leaseDuration;
- }
- /**
- * Lease state of the blob. Possible
- * values include: 'available', 'leased', 'expired', 'breaking', 'broken'.
- *
- * @readonly
- */
- get leaseState() {
- return this.originalResponse.leaseState;
- }
- /**
- * The current lease status of the
- * blob. Possible values include: 'locked', 'unlocked'.
- *
- * @readonly
- */
- get leaseStatus() {
- return this.originalResponse.leaseStatus;
- }
- /**
- * A UTC date/time value generated by the service that
- * indicates the time at which the response was initiated.
- *
- * @readonly
- */
- get date() {
- return this.originalResponse.date;
- }
- /**
- * The number of committed blocks
- * present in the blob. This header is returned only for append blobs.
- *
- * @readonly
- */
- get blobCommittedBlockCount() {
- return this.originalResponse.blobCommittedBlockCount;
- }
- /**
- * The ETag contains a value that you can use to
- * perform operations conditionally, in quotes.
- *
- * @readonly
- */
- get etag() {
- return this.originalResponse.etag;
- }
- /**
- * The error code.
- *
- * @readonly
- */
- get errorCode() {
- return this.originalResponse.errorCode;
- }
- /**
- * The value of this header is set to
- * true if the file data and application metadata are completely encrypted
- * using the specified algorithm. Otherwise, the value is set to false (when
- * the file is unencrypted, or if only parts of the file/application metadata
- * are encrypted).
- *
- * @readonly
- */
- get isServerEncrypted() {
- return this.originalResponse.isServerEncrypted;
- }
- /**
- * If the blob has a MD5 hash, and if
- * request contains range header (Range or x-ms-range), this response header
- * is returned with the value of the whole blob's MD5 value. This value may
- * or may not be equal to the value returned in Content-MD5 header, with the
- * latter calculated from the requested range.
- *
- * @readonly
- */
- get blobContentMD5() {
- return this.originalResponse.blobContentMD5;
- }
- /**
- * Returns the date and time the file was last
- * modified. Any operation that modifies the file or its properties updates
- * the last modified time.
- *
- * @readonly
- */
- get lastModified() {
- return this.originalResponse.lastModified;
- }
- /**
- * A name-value pair
- * to associate with a file storage object.
- *
- * @readonly
- */
- get metadata() {
- return this.originalResponse.metadata;
+var singleTag = new Set([
+ "area",
+ "base",
+ "basefont",
+ "br",
+ "col",
+ "command",
+ "embed",
+ "frame",
+ "hr",
+ "img",
+ "input",
+ "isindex",
+ "keygen",
+ "link",
+ "meta",
+ "param",
+ "source",
+ "track",
+ "wbr",
+]);
+/**
+ * Renders a DOM node or an array of DOM nodes to a string.
+ *
+ * Can be thought of as the equivalent of the `outerHTML` of the passed node(s).
+ *
+ * @param node Node to be rendered.
+ * @param options Changes serialization behavior
+ */
+function render(node, options) {
+ if (options === void 0) { options = {}; }
+ var nodes = "length" in node ? node : [node];
+ var output = "";
+ for (var i = 0; i < nodes.length; i++) {
+ output += renderNode(nodes[i], options);
}
- /**
- * This header uniquely identifies the request
- * that was made and can be used for troubleshooting the request.
- *
- * @readonly
- */
- get requestId() {
- return this.originalResponse.requestId;
+ return output;
+}
+exports.render = render;
+exports["default"] = render;
+function renderNode(node, options) {
+ switch (node.type) {
+ case ElementType.Root:
+ return render(node.children, options);
+ // @ts-expect-error We don't use `Doctype` yet
+ case ElementType.Doctype:
+ case ElementType.Directive:
+ return renderDirective(node);
+ case ElementType.Comment:
+ return renderComment(node);
+ case ElementType.CDATA:
+ return renderCdata(node);
+ case ElementType.Script:
+ case ElementType.Style:
+ case ElementType.Tag:
+ return renderTag(node, options);
+ case ElementType.Text:
+ return renderText(node, options);
}
- /**
- * If a client request id header is sent in the request, this header will be present in the
- * response with the same value.
- *
- * @readonly
- */
- get clientRequestId() {
- return this.originalResponse.clientRequestId;
+}
+var foreignModeIntegrationPoints = new Set([
+ "mi",
+ "mo",
+ "mn",
+ "ms",
+ "mtext",
+ "annotation-xml",
+ "foreignObject",
+ "desc",
+ "title",
+]);
+var foreignElements = new Set(["svg", "math"]);
+function renderTag(elem, opts) {
+ var _a;
+ // Handle SVG / MathML in HTML
+ if (opts.xmlMode === "foreign") {
+ /* Fix up mixed-case element names */
+ elem.name = (_a = foreignNames_js_1.elementNames.get(elem.name)) !== null && _a !== void 0 ? _a : elem.name;
+ /* Exit foreign mode at integration points */
+ if (elem.parent &&
+ foreignModeIntegrationPoints.has(elem.parent.name)) {
+ opts = __assign(__assign({}, opts), { xmlMode: false });
+ }
}
- /**
- * Indicates the version of the File service used
- * to execute the request.
- *
- * @readonly
- */
- get version() {
- return this.originalResponse.version;
+ if (!opts.xmlMode && foreignElements.has(elem.name)) {
+ opts = __assign(__assign({}, opts), { xmlMode: "foreign" });
}
- /**
- * The SHA-256 hash of the encryption key used to encrypt the blob. This value is only returned
- * when the blob was encrypted with a customer-provided key.
- *
- * @readonly
- */
- get encryptionKeySha256() {
- return this.originalResponse.encryptionKeySha256;
+ var tag = "<".concat(elem.name);
+ var attribs = formatAttributes(elem.attribs, opts);
+ if (attribs) {
+ tag += " ".concat(attribs);
}
- /**
- * If the request is to read a specified range and the x-ms-range-get-content-crc64 is set to
- * true, then the request returns a crc64 for the range, as long as the range size is less than
- * or equal to 4 MB. If both x-ms-range-get-content-crc64 & x-ms-range-get-content-md5 is
- * specified in the same request, it will fail with 400(Bad Request)
- */
- get contentCrc64() {
- return this.originalResponse.contentCrc64;
+ if (elem.children.length === 0 &&
+ (opts.xmlMode
+ ? // In XML mode or foreign mode, and user hasn't explicitly turned off self-closing tags
+ opts.selfClosingTags !== false
+ : // User explicitly asked for self-closing tags, even in HTML mode
+ opts.selfClosingTags && singleTag.has(elem.name))) {
+ if (!opts.xmlMode)
+ tag += " ";
+ tag += "/>";
}
- /**
- * The response body as a browser Blob.
- * Always undefined in node.js.
- *
- * @readonly
- */
- get blobBody() {
- return undefined;
+ else {
+ tag += ">";
+ if (elem.children.length > 0) {
+ tag += render(elem.children, opts);
+ }
+ if (opts.xmlMode || !singleTag.has(elem.name)) {
+ tag += "".concat(elem.name, ">");
+ }
}
- /**
- * The response body as a node.js Readable stream.
- * Always undefined in the browser.
- *
- * It will parse avor data returned by blob query.
- *
- * @readonly
- */
- get readableStreamBody() {
- return coreUtil.isNode ? this.blobDownloadStream : undefined;
+ return tag;
+}
+function renderDirective(elem) {
+ return "<".concat(elem.data, ">");
+}
+function renderText(elem, opts) {
+ var _a;
+ var data = elem.data || "";
+ // If entities weren't decoded, no need to encode them back
+ if (((_a = opts.encodeEntities) !== null && _a !== void 0 ? _a : opts.decodeEntities) !== false &&
+ !(!opts.xmlMode &&
+ elem.parent &&
+ unencodedElements.has(elem.parent.name))) {
+ data =
+ opts.xmlMode || opts.encodeEntities !== "utf8"
+ ? (0, entities_1.encodeXML)(data)
+ : (0, entities_1.escapeText)(data);
}
- /**
- * The HTTP response.
- */
- get _response() {
- return this.originalResponse._response;
+ return data;
+}
+function renderCdata(elem) {
+ return "");
+}
+function renderComment(elem) {
+ return "");
+}
+
+
+/***/ }),
+
+/***/ 51368:
+/***/ ((__unused_webpack_module, exports) => {
+
+"use strict";
+
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.Doctype = exports.CDATA = exports.Tag = exports.Style = exports.Script = exports.Comment = exports.Directive = exports.Text = exports.Root = exports.isTag = exports.ElementType = void 0;
+/** Types of elements found in htmlparser2's DOM */
+var ElementType;
+(function (ElementType) {
+ /** Type for the root element of a document */
+ ElementType["Root"] = "root";
+ /** Type for Text */
+ ElementType["Text"] = "text";
+ /** Type for ... ?> */
+ ElementType["Directive"] = "directive";
+ /** Type for */
+ ElementType["Comment"] = "comment";
+ /** Type for