From 74b0a9365baf0bf3928b5239958ca8999d1a0d95 Mon Sep 17 00:00:00 2001 From: Jeremy Meng Date: Tue, 18 Jun 2019 16:34:32 -0700 Subject: [PATCH 1/2] Make pipeline protected --- sdk/storage/storage-blob/src/StorageClient.ts | 14 ++++---- .../test/node/appendblobclient.spec.ts | 6 ++-- .../storage-blob/test/node/blobclient.spec.ts | 6 ++-- .../test/node/blobserviceclient.spec.ts | 6 ++-- .../test/node/blockblobclient.spec.ts | 6 ++-- .../test/node/containerclient.spec.ts | 6 ++-- .../test/node/pageblobclient.spec.ts | 6 ++-- .../storage-blob/test/node/sas.spec.ts | 33 +++++++------------ .../storage-blob/test/retrypolicy.spec.ts | 14 ++++---- .../storage-blob/test/specialnaming.spec.ts | 16 ++++----- sdk/storage/storage-file/src/StorageClient.ts | 14 ++++---- .../test/node/directoryclient.spec.ts | 6 ++-- .../storage-file/test/node/fileclient.spec.ts | 6 ++-- .../test/node/fileserviceclient.spec.ts | 6 ++-- .../storage-file/test/node/sas.spec.ts | 14 ++++---- .../test/node/shareclient.spec.ts | 6 ++-- .../storage-file/test/retrypolicy.spec.ts | 6 ++-- .../storage-file/test/specialnaming.spec.ts | 16 ++++----- .../storage-queue/src/StorageClient.ts | 14 ++++---- .../test/node/messageidclient.spec.ts | 6 ++-- .../test/node/messagesclient.spec.ts | 6 ++-- .../test/node/queueclient.spec.ts | 6 ++-- .../test/node/queueserviceclient.spec.ts | 6 ++-- .../storage-queue/test/node/sas.spec.ts | 14 ++++---- .../storage-queue/test/retrypolicy.spec.ts | 10 ++++-- 25 files changed, 124 insertions(+), 125 deletions(-) diff --git a/sdk/storage/storage-blob/src/StorageClient.ts b/sdk/storage/storage-blob/src/StorageClient.ts index 8f2667b50d51..b0a159705bf0 100644 --- a/sdk/storage/storage-blob/src/StorageClient.ts +++ b/sdk/storage/storage-blob/src/StorageClient.ts @@ -13,21 +13,21 @@ import { escapeURLPath } from "./utils/utils.common"; */ export abstract class StorageClient { /** - * Request policy pipeline. + * Encoded URL string value. * - * @internal - * @type {Pipeline} + * @type {string} * @memberof StorageClient */ - public readonly pipeline: Pipeline; + public readonly url: string; /** - * Encoded URL string value. + * Request policy pipeline. * - * @type {string} + * @internal + * @type {Pipeline} * @memberof StorageClient */ - public readonly url: string; + protected readonly pipeline: Pipeline; /** * StorageClient is a reference to protocol layer operations entry, which is diff --git a/sdk/storage/storage-blob/test/node/appendblobclient.spec.ts b/sdk/storage/storage-blob/test/node/appendblobclient.spec.ts index df01db9b5d0d..acb33e3fbd23 100644 --- a/sdk/storage/storage-blob/test/node/appendblobclient.spec.ts +++ b/sdk/storage/storage-blob/test/node/appendblobclient.spec.ts @@ -25,7 +25,7 @@ describe("AppendBlobClient Node.js only", () => { }); it("can be created with a url and a credential", async () => { - const factories = appendBlobClient.pipeline.factories; + const factories = (appendBlobClient as any).pipeline.factories; const credential = factories[factories.length - 1] as SharedKeyCredential; const newClient = new AppendBlobClient(appendBlobClient.url, credential); @@ -34,7 +34,7 @@ describe("AppendBlobClient Node.js only", () => { }); it("can be created with a url and a credential and an option bag", async () => { - const factories = appendBlobClient.pipeline.factories; + const factories = (appendBlobClient as any).pipeline.factories; const credential = factories[factories.length - 1] as SharedKeyCredential; const newClient = new AppendBlobClient(appendBlobClient.url, credential, { telemetry: { value: "test/1.0" } @@ -45,7 +45,7 @@ describe("AppendBlobClient Node.js only", () => { }); it("can be created with a url and a pipeline", async () => { - const factories = appendBlobClient.pipeline.factories; + const factories = (appendBlobClient as any).pipeline.factories; const credential = factories[factories.length - 1] as SharedKeyCredential; const pipeline = newPipeline(credential); const newClient = new AppendBlobClient(appendBlobClient.url, pipeline); diff --git a/sdk/storage/storage-blob/test/node/blobclient.spec.ts b/sdk/storage/storage-blob/test/node/blobclient.spec.ts index 85fa46e1852f..9b5054a7d0cd 100644 --- a/sdk/storage/storage-blob/test/node/blobclient.spec.ts +++ b/sdk/storage/storage-blob/test/node/blobclient.spec.ts @@ -234,7 +234,7 @@ describe("BlobClient Node.js only", () => { }); it("can be created with a url and a credential", async () => { - const factories = blobClient.pipeline.factories; + const factories = (blobClient as any).pipeline.factories; const credential = factories[factories.length - 1] as SharedKeyCredential; const newClient = new BlobClient(blobClient.url, credential); @@ -248,7 +248,7 @@ describe("BlobClient Node.js only", () => { }); it("can be created with a url and a credential and an option bag", async () => { - const factories = blobClient.pipeline.factories; + const factories = (blobClient as any).pipeline.factories; const credential = factories[factories.length - 1] as SharedKeyCredential; const newClient = new BlobClient(blobClient.url, credential, { retryOptions: { @@ -266,7 +266,7 @@ describe("BlobClient Node.js only", () => { }); it("can be created with a url and a pipeline", async () => { - const factories = blobClient.pipeline.factories; + const factories = (blobClient as any).pipeline.factories; const credential = factories[factories.length - 1] as SharedKeyCredential; const pipeline = newPipeline(credential); const newClient = new BlobClient(blobClient.url, pipeline); diff --git a/sdk/storage/storage-blob/test/node/blobserviceclient.spec.ts b/sdk/storage/storage-blob/test/node/blobserviceclient.spec.ts index 91b25e20e466..dcfeaedb8e86 100644 --- a/sdk/storage/storage-blob/test/node/blobserviceclient.spec.ts +++ b/sdk/storage/storage-blob/test/node/blobserviceclient.spec.ts @@ -8,7 +8,7 @@ dotenv.config({ path: "../.env" }); describe("BlobServiceClient Node.js only", () => { it("can be created with a url and a credential", async () => { const serviceClient = getBSU(); - const factories = serviceClient.pipeline.factories; + const factories = (serviceClient as any).pipeline.factories; const credential = factories[factories.length - 1] as SharedKeyCredential; const newClient = new BlobServiceClient(serviceClient.url, credential); @@ -22,7 +22,7 @@ describe("BlobServiceClient Node.js only", () => { it("can be created with a url and a credential and an option bag", async () => { const serviceClient = getBSU(); - const factories = serviceClient.pipeline.factories; + const factories = (serviceClient as any).pipeline.factories; const credential = factories[factories.length - 1] as SharedKeyCredential; const newClient = new BlobServiceClient(serviceClient.url, credential, { retryOptions: { @@ -40,7 +40,7 @@ describe("BlobServiceClient Node.js only", () => { it("can be created with a url and a pipeline", async () => { const serviceClient = getBSU(); - const factories = serviceClient.pipeline.factories; + const factories = (serviceClient as any).pipeline.factories; const credential = factories[factories.length - 1] as SharedKeyCredential; const pipeline = newPipeline(credential); const newClient = new BlobServiceClient(serviceClient.url, pipeline); diff --git a/sdk/storage/storage-blob/test/node/blockblobclient.spec.ts b/sdk/storage/storage-blob/test/node/blockblobclient.spec.ts index 6eb134338cc1..9d83ec6399ab 100644 --- a/sdk/storage/storage-blob/test/node/blockblobclient.spec.ts +++ b/sdk/storage/storage-blob/test/node/blockblobclient.spec.ts @@ -53,7 +53,7 @@ describe("BlockBlobClient Node.js only", () => { }); it("can be created with a url and a credential", async () => { - const factories = blockBlobClient.pipeline.factories; + const factories = (blockBlobClient as any).pipeline.factories; const credential = factories[factories.length - 1] as SharedKeyCredential; const newClient = new BlockBlobClient(blockBlobClient.url, credential); @@ -64,7 +64,7 @@ describe("BlockBlobClient Node.js only", () => { }); it("can be created with a url and a credential and an option bag", async () => { - const factories = blockBlobClient.pipeline.factories; + const factories = (blockBlobClient as any).pipeline.factories; const credential = factories[factories.length - 1] as SharedKeyCredential; const newClient = new BlockBlobClient(blockBlobClient.url, credential, { retryOptions: { @@ -79,7 +79,7 @@ describe("BlockBlobClient Node.js only", () => { }); it("can be created with a url and a pipeline", async () => { - const factories = blockBlobClient.pipeline.factories; + const factories = (blockBlobClient as any).pipeline.factories; const credential = factories[factories.length - 1] as SharedKeyCredential; const pipeline = newPipeline(credential); const newClient = new BlockBlobClient(blockBlobClient.url, pipeline); diff --git a/sdk/storage/storage-blob/test/node/containerclient.spec.ts b/sdk/storage/storage-blob/test/node/containerclient.spec.ts index 65947fb0c4c3..920f118e8025 100644 --- a/sdk/storage/storage-blob/test/node/containerclient.spec.ts +++ b/sdk/storage/storage-blob/test/node/containerclient.spec.ts @@ -48,7 +48,7 @@ describe("ContainerClient Node.js only", () => { }); it("can be created with a url and a credential", async () => { - const factories = containerClient.pipeline.factories; + const factories = (containerClient as any).pipeline.factories; const credential = factories[factories.length - 1] as SharedKeyCredential; const newClient = new ContainerClient(containerClient.url, credential); @@ -66,7 +66,7 @@ describe("ContainerClient Node.js only", () => { }); it("can be created with a url and a credential and an option bag", async () => { - const factories = containerClient.pipeline.factories; + const factories = (containerClient as any).pipeline.factories; const credential = factories[factories.length - 1] as SharedKeyCredential; const newClient = new ContainerClient(containerClient.url, credential, { retryOptions: { @@ -88,7 +88,7 @@ describe("ContainerClient Node.js only", () => { }); it("can be created with a url and a pipeline", async () => { - const factories = containerClient.pipeline.factories; + const factories = (containerClient as any).pipeline.factories; const credential = factories[factories.length - 1] as SharedKeyCredential; const pipeline = newPipeline(credential); const newClient = new ContainerClient(containerClient.url, pipeline); diff --git a/sdk/storage/storage-blob/test/node/pageblobclient.spec.ts b/sdk/storage/storage-blob/test/node/pageblobclient.spec.ts index b69e800da61f..c6c95aff7040 100644 --- a/sdk/storage/storage-blob/test/node/pageblobclient.spec.ts +++ b/sdk/storage/storage-blob/test/node/pageblobclient.spec.ts @@ -99,7 +99,7 @@ describe("PageBlobClient Node.js only", () => { }); it("can be created with a url and a credential", async () => { - const factories = pageBlobClient.pipeline.factories; + const factories = (pageBlobClient as any).pipeline.factories; const credential = factories[factories.length - 1] as SharedKeyCredential; const newClient = new PageBlobClient(pageBlobClient.url, credential); @@ -109,7 +109,7 @@ describe("PageBlobClient Node.js only", () => { }); it("can be created with a url and a credential and an option bag", async () => { - const factories = pageBlobClient.pipeline.factories; + const factories = (pageBlobClient as any).pipeline.factories; const credential = factories[factories.length - 1] as SharedKeyCredential; const newClient = new PageBlobClient(pageBlobClient.url, credential, { retryOptions: { @@ -123,7 +123,7 @@ describe("PageBlobClient Node.js only", () => { }); it("can be created with a url and a pipeline", async () => { - const factories = pageBlobClient.pipeline.factories; + const factories = (pageBlobClient as any).pipeline.factories; const credential = factories[factories.length - 1] as SharedKeyCredential; const pipeline = newPipeline(credential); const newClient = new PageBlobClient(pageBlobClient.url, pipeline); diff --git a/sdk/storage/storage-blob/test/node/sas.spec.ts b/sdk/storage/storage-blob/test/node/sas.spec.ts index 75bbdde8c880..70b46ac42c2f 100644 --- a/sdk/storage/storage-blob/test/node/sas.spec.ts +++ b/sdk/storage/storage-blob/test/node/sas.spec.ts @@ -13,7 +13,7 @@ import { PageBlobClient, BlobServiceClient, SharedKeyCredential, - newPipeline, + newPipeline } from "../../src"; import { SASProtocol } from "../../src/SASQueryParameters"; import { getBSU, getUniqueName } from "../utils"; @@ -29,7 +29,7 @@ describe("Shared Access Signature (SAS) generation Node.js only", () => { tmr.setDate(tmr.getDate() + 1); // By default, credential is always the last element of pipeline factories - const factories = blobServiceClient.pipeline.factories; + const factories = (blobServiceClient as any).pipeline.factories; const sharedKeyCredential = factories[factories.length - 1]; const sas = generateAccountSASQueryParameters( @@ -60,7 +60,7 @@ describe("Shared Access Signature (SAS) generation Node.js only", () => { tmr.setDate(tmr.getDate() + 1); // By default, credential is always the last element of pipeline factories - const factories = blobServiceClient.pipeline.factories; + const factories = (blobServiceClient as any).pipeline.factories; const sharedKeyCredential = factories[factories.length - 1]; const sas = generateAccountSASQueryParameters( @@ -94,7 +94,7 @@ describe("Shared Access Signature (SAS) generation Node.js only", () => { tmr.setDate(tmr.getDate() + 1); // By default, credential is always the last element of pipeline factories - const factories = blobServiceClient.pipeline.factories; + const factories = (blobServiceClient as any).pipeline.factories; const sharedKeyCredential = factories[factories.length - 1]; const sas = generateAccountSASQueryParameters( @@ -128,7 +128,7 @@ describe("Shared Access Signature (SAS) generation Node.js only", () => { tmr.setDate(tmr.getDate() + 1); // By default, credential is always the last element of pipeline factories - const factories = blobServiceClient.pipeline.factories; + const factories = (blobServiceClient as any).pipeline.factories; const sharedKeyCredential = factories[factories.length - 1]; const sas = generateAccountSASQueryParameters( @@ -168,7 +168,7 @@ describe("Shared Access Signature (SAS) generation Node.js only", () => { tmr.setDate(tmr.getDate() + 1); // By default, credential is always the last element of pipeline factories - const factories = blobServiceClient.pipeline.factories; + const factories = (blobServiceClient as any).pipeline.factories; const sharedKeyCredential = factories[factories.length - 1]; const containerName = getUniqueName("container"); @@ -206,7 +206,7 @@ describe("Shared Access Signature (SAS) generation Node.js only", () => { tmr.setDate(tmr.getDate() + 1); // By default, credential is always the last element of pipeline factories - const factories = blobServiceClient.pipeline.factories; + const factories = (blobServiceClient as any).pipeline.factories; const sharedKeyCredential = factories[factories.length - 1]; const containerName = getUniqueName("container"); @@ -241,10 +241,7 @@ describe("Shared Access Signature (SAS) generation Node.js only", () => { ); const sasClient = `${blobClient.url}?${blobSAS}`; - const blobClientwithSAS = new PageBlobClient( - sasClient, - newPipeline(new AnonymousCredential()) - ); + const blobClientwithSAS = new PageBlobClient(sasClient, newPipeline(new AnonymousCredential())); const properties = await blobClientwithSAS.getProperties(); assert.equal(properties.cacheControl, "cache-control-override"); @@ -264,7 +261,7 @@ describe("Shared Access Signature (SAS) generation Node.js only", () => { tmr.setDate(tmr.getDate() + 1); // By default, credential is always the last element of pipeline factories - const factories = blobServiceClient.pipeline.factories; + const factories = (blobServiceClient as any).pipeline.factories; const sharedKeyCredential = factories[factories.length - 1]; const containerName = getUniqueName("container-with-dash"); @@ -302,10 +299,7 @@ describe("Shared Access Signature (SAS) generation Node.js only", () => { ); const sasClient = `${blobClient.url}?${blobSAS}`; - const blobClientwithSAS = new PageBlobClient( - sasClient, - newPipeline(new AnonymousCredential()) - ); + const blobClientwithSAS = new PageBlobClient(sasClient, newPipeline(new AnonymousCredential())); const properties = await blobClientwithSAS.getProperties(); assert.equal(properties.cacheControl, "cache-control-override"); @@ -325,7 +319,7 @@ describe("Shared Access Signature (SAS) generation Node.js only", () => { tmr.setDate(tmr.getDate() + 1); // By default, credential is always the last element of pipeline factories - const factories = blobServiceClient.pipeline.factories; + const factories = (blobServiceClient as any).pipeline.factories; const sharedKeyCredential = factories[factories.length - 1]; const containerName = getUniqueName("container"); @@ -357,10 +351,7 @@ describe("Shared Access Signature (SAS) generation Node.js only", () => { ); const sasClient = `${blobClient.url}?${blobSAS}`; - const blobClientwithSAS = new PageBlobClient( - sasClient, - newPipeline(new AnonymousCredential()) - ); + const blobClientwithSAS = new PageBlobClient(sasClient, newPipeline(new AnonymousCredential())); await blobClientwithSAS.getProperties(); await containerClient.delete(); diff --git a/sdk/storage/storage-blob/test/retrypolicy.spec.ts b/sdk/storage/storage-blob/test/retrypolicy.spec.ts index 38c2762c5fbc..7a1a75fc9001 100644 --- a/sdk/storage/storage-blob/test/retrypolicy.spec.ts +++ b/sdk/storage/storage-blob/test/retrypolicy.spec.ts @@ -2,7 +2,7 @@ import { URLBuilder } from "@azure/ms-rest-js"; import * as assert from "assert"; import { ContainerClient, RestError } from "../src"; -import { newPipeline, Pipeline } from "../src/Pipeline"; +import { newPipeline, Pipeline } from "../src/Pipeline"; import { getBSU, getUniqueName } from "./utils"; import { InjectorPolicyFactory } from "./utils/InjectorPolicyFactory"; import * as dotenv from "dotenv"; @@ -31,7 +31,7 @@ describe("RetryPolicy", () => { return new RestError("Server Internal Error", "ServerInternalError", 500); } }); - const factories = containerClient.pipeline.factories.slice(); // clone factories array + const factories = (containerClient as any).pipeline.factories.slice(); // clone factories array factories.push(injector); const pipeline = new Pipeline(factories); const injectContainerClient = new ContainerClient(containerClient.url, pipeline); @@ -52,8 +52,9 @@ describe("RetryPolicy", () => { return new RestError("Server Internal Error", "ServerInternalError", 500); }); - const credential = - containerClient.pipeline.factories[containerClient.pipeline.factories.length - 1]; + const credential = (containerClient as any).pipeline.factories[ + (containerClient as any).pipeline.factories.length - 1 + ]; const factories = newPipeline(credential, { retryOptions: { maxTries: 3 } }).factories; @@ -92,8 +93,9 @@ describe("RetryPolicy", () => { hostParts.unshift(secondaryAccount); const secondaryHost = hostParts.join("."); - const credential = - containerClient.pipeline.factories[containerClient.pipeline.factories.length - 1]; + const credential = (containerClient as any).pipeline.factories[ + (containerClient as any).pipeline.factories.length - 1 + ]; const factories = newPipeline(credential, { retryOptions: { maxTries: 2, secondaryHost } }).factories; diff --git a/sdk/storage/storage-blob/test/specialnaming.spec.ts b/sdk/storage/storage-blob/test/specialnaming.spec.ts index 8b1d209391f2..71f9565ae4b7 100644 --- a/sdk/storage/storage-blob/test/specialnaming.spec.ts +++ b/sdk/storage/storage-blob/test/specialnaming.spec.ts @@ -33,7 +33,7 @@ describe("Special Naming Tests", () => { const blobName: string = getUniqueName("blob empty"); const blockBlobClient = new BlockBlobClient( appendToURLPath(containerClient.url, blobName), - containerClient.pipeline + (containerClient as any).pipeline ); await blockBlobClient.upload("A", 1); @@ -59,7 +59,7 @@ describe("Special Naming Tests", () => { const blobName: string = getUniqueName("////blob/empty /another"); const blockBlobClient = new BlockBlobClient( appendToURLPath(containerClient.url, blobName), - containerClient.pipeline + (containerClient as any).pipeline ); await blockBlobClient.upload("A", 1); @@ -86,7 +86,7 @@ describe("Special Naming Tests", () => { const blobName: string = getUniqueName("////Upper/blob/empty /another"); const blockBlobClient = new BlockBlobClient( appendToURLPath(containerClient.url, blobName), - containerClient.pipeline + (containerClient as any).pipeline ); await blockBlobClient.upload("A", 1); @@ -113,7 +113,7 @@ describe("Special Naming Tests", () => { const blobName: string = getUniqueName("////Upper/blob/empty /another 汉字"); const blockBlobClient = new BlockBlobClient( appendToURLPath(containerClient.url, blobName), - containerClient.pipeline + (containerClient as any).pipeline ); await blockBlobClient.upload("A", 1); @@ -148,7 +148,7 @@ describe("Special Naming Tests", () => { // Escape "%" when creating XxxClient object with URL strings // Escape "?" otherwise string after "?" will be treated as URL parameters appendToURLPath(containerClient.url, blobName.replace(/%/g, "%25").replace(/\?/g, "%3F")), - containerClient.pipeline + (containerClient as any).pipeline ); await blockBlobClient.upload("A", 1); @@ -189,7 +189,7 @@ describe("Special Naming Tests", () => { const blobName: string = getUniqueName("ру́сский язы́к"); const blockBlobClient = new BlockBlobClient( appendToURLPath(containerClient.url, blobName), - containerClient.pipeline + (containerClient as any).pipeline ); await blockBlobClient.upload("A", 1); @@ -229,7 +229,7 @@ describe("Special Naming Tests", () => { const blobName: string = getUniqueName("عربي/عربى"); const blockBlobClient = new BlockBlobClient( appendToURLPath(containerClient.url, blobName), - containerClient.pipeline + (containerClient as any).pipeline ); await blockBlobClient.upload("A", 1); @@ -269,7 +269,7 @@ describe("Special Naming Tests", () => { const blobName: string = getUniqueName("にっぽんご/にほんご"); const blockBlobClient = new BlockBlobClient( appendToURLPath(containerClient.url, blobName), - containerClient.pipeline + (containerClient as any).pipeline ); await blockBlobClient.upload("A", 1); diff --git a/sdk/storage/storage-file/src/StorageClient.ts b/sdk/storage/storage-file/src/StorageClient.ts index f17e5532d688..ba3f640c0142 100644 --- a/sdk/storage/storage-file/src/StorageClient.ts +++ b/sdk/storage/storage-file/src/StorageClient.ts @@ -13,21 +13,21 @@ import { escapeURLPath } from "./utils/utils.common"; */ export abstract class StorageClient { /** - * Request policy pipeline. + * URL string value. * - * @internal - * @type {Pipeline} + * @type {string} * @memberof StorageClient */ - public readonly pipeline: Pipeline; + public readonly url: string; /** - * URL string value. + * Request policy pipeline. * - * @type {string} + * @internal + * @type {Pipeline} * @memberof StorageClient */ - public readonly url: string; + protected readonly pipeline: Pipeline; /** * StorageClient is a reference to protocol layer operations entry, which is diff --git a/sdk/storage/storage-file/test/node/directoryclient.spec.ts b/sdk/storage/storage-file/test/node/directoryclient.spec.ts index 3f173ea1a0b8..013d7db8a9fa 100644 --- a/sdk/storage/storage-file/test/node/directoryclient.spec.ts +++ b/sdk/storage/storage-file/test/node/directoryclient.spec.ts @@ -27,7 +27,7 @@ describe("DirectoryClient Node.js only", () => { }); it("can be created with a url and a credential", async () => { - const factories = dirClient.pipeline.factories; + const factories = (dirClient as any).pipeline.factories; const credential = factories[factories.length - 1] as SharedKeyCredential; const newClient = new DirectoryClient(dirClient.url, credential); @@ -41,7 +41,7 @@ describe("DirectoryClient Node.js only", () => { }); it("can be created with a url and a credential and an option bag", async () => { - const factories = dirClient.pipeline.factories; + const factories = (dirClient as any).pipeline.factories; const credential = factories[factories.length - 1] as SharedKeyCredential; const newClient = new DirectoryClient(dirClient.url, credential, { retryOptions: { @@ -59,7 +59,7 @@ describe("DirectoryClient Node.js only", () => { }); it("can be created with a url and a pipeline", async () => { - const factories = dirClient.pipeline.factories; + const factories = (dirClient as any).pipeline.factories; const credential = factories[factories.length - 1] as SharedKeyCredential; const pipeline = newPipeline(credential); const newClient = new DirectoryClient(dirClient.url, pipeline); diff --git a/sdk/storage/storage-file/test/node/fileclient.spec.ts b/sdk/storage/storage-file/test/node/fileclient.spec.ts index 24e11cbbeb0d..b8ce47d688be 100644 --- a/sdk/storage/storage-file/test/node/fileclient.spec.ts +++ b/sdk/storage/storage-file/test/node/fileclient.spec.ts @@ -77,7 +77,7 @@ describe("FileClient Node.js only", () => { }; await fileClient.setMetadata(metadata); - const factories = fileClient.pipeline.factories; + const factories = (fileClient as any).pipeline.factories; const credential = factories[factories.length - 1] as SharedKeyCredential; const newClient = new FileClient(fileClient.url, credential); @@ -98,7 +98,7 @@ describe("FileClient Node.js only", () => { }; await fileClient.setMetadata(metadata); - const factories = fileClient.pipeline.factories; + const factories = (fileClient as any).pipeline.factories; const credential = factories[factories.length - 1] as SharedKeyCredential; const newClient = new FileClient(fileClient.url, credential, { retryOptions: { @@ -123,7 +123,7 @@ describe("FileClient Node.js only", () => { }; await fileClient.setMetadata(metadata); - const factories = fileClient.pipeline.factories; + const factories = (fileClient as any).pipeline.factories; const credential = factories[factories.length - 1] as SharedKeyCredential; const pipeline = newPipeline(credential); const newClient = new FileClient(fileClient.url, pipeline); diff --git a/sdk/storage/storage-file/test/node/fileserviceclient.spec.ts b/sdk/storage/storage-file/test/node/fileserviceclient.spec.ts index 11e2a1693aa5..c5d394200c3b 100644 --- a/sdk/storage/storage-file/test/node/fileserviceclient.spec.ts +++ b/sdk/storage/storage-file/test/node/fileserviceclient.spec.ts @@ -7,7 +7,7 @@ dotenv.config({ path: "../.env" }); describe("FileServiceClient Node.js only", () => { it("can be created with a url and a credential", async () => { const serviceClient = getBSU(); - const factories = serviceClient.pipeline.factories; + const factories = (serviceClient as any).pipeline.factories; const credential = factories[factories.length - 1] as SharedKeyCredential; const newClient = new FileServiceClient(serviceClient.url, credential); @@ -21,7 +21,7 @@ describe("FileServiceClient Node.js only", () => { it("can be created with a url and a credential and an option bag", async () => { const serviceClient = getBSU(); - const factories = serviceClient.pipeline.factories; + const factories = (serviceClient as any).pipeline.factories; const credential = factories[factories.length - 1] as SharedKeyCredential; const newClient = new FileServiceClient(serviceClient.url, credential, { retryOptions: { maxTries: 5 } @@ -37,7 +37,7 @@ describe("FileServiceClient Node.js only", () => { it("can be created with a url and a pipeline", async () => { const serviceClient = getBSU(); - const factories = serviceClient.pipeline.factories; + const factories = (serviceClient as any).pipeline.factories; const credential = factories[factories.length - 1] as SharedKeyCredential; const pipeline = newPipeline(credential); const newClient = new FileServiceClient(serviceClient.url, pipeline); diff --git a/sdk/storage/storage-file/test/node/sas.spec.ts b/sdk/storage/storage-file/test/node/sas.spec.ts index b2b768fccfb9..b3f5de5ed681 100644 --- a/sdk/storage/storage-file/test/node/sas.spec.ts +++ b/sdk/storage/storage-file/test/node/sas.spec.ts @@ -29,7 +29,7 @@ describe("Shared Access Signature (SAS) generation Node.js only", () => { tmr.setDate(tmr.getDate() + 1); // By default, credential is always the last element of pipeline factories - const factories = serviceClient.pipeline.factories; + const factories = (serviceClient as any).pipeline.factories; const sharedKeyCredential = factories[factories.length - 1]; const sas = generateAccountSASQueryParameters( @@ -60,7 +60,7 @@ describe("Shared Access Signature (SAS) generation Node.js only", () => { tmr.setDate(tmr.getDate() + 1); // By default, credential is always the last element of pipeline factories - const factories = serviceClient.pipeline.factories; + const factories = (serviceClient as any).pipeline.factories; const sharedKeyCredential = factories[factories.length - 1]; const sas = generateAccountSASQueryParameters( @@ -94,7 +94,7 @@ describe("Shared Access Signature (SAS) generation Node.js only", () => { tmr.setDate(tmr.getDate() + 1); // By default, credential is always the last element of pipeline factories - const factories = serviceClient.pipeline.factories; + const factories = (serviceClient as any).pipeline.factories; const sharedKeyCredential = factories[factories.length - 1]; const sas = generateAccountSASQueryParameters( @@ -125,7 +125,7 @@ describe("Shared Access Signature (SAS) generation Node.js only", () => { tmr.setDate(tmr.getDate() + 1); // By default, credential is always the last element of pipeline factories - const factories = serviceClient.pipeline.factories; + const factories = (serviceClient as any).pipeline.factories; const sharedKeyCredential = factories[factories.length - 1]; const sas = generateAccountSASQueryParameters( @@ -162,7 +162,7 @@ describe("Shared Access Signature (SAS) generation Node.js only", () => { tmr.setDate(tmr.getDate() + 1); // By default, credential is always the last element of pipeline factories - const factories = serviceClient.pipeline.factories; + const factories = (serviceClient as any).pipeline.factories; const sharedKeyCredential = factories[factories.length - 1]; const shareName = getUniqueName("share"); @@ -199,7 +199,7 @@ describe("Shared Access Signature (SAS) generation Node.js only", () => { tmr.setDate(tmr.getDate() + 1); // By default, credential is always the last element of pipeline factories - const factories = serviceClient.pipeline.factories; + const factories = (serviceClient as any).pipeline.factories; const sharedKeyCredential = factories[factories.length - 1]; const shareName = getUniqueName("share"); @@ -258,7 +258,7 @@ describe("Shared Access Signature (SAS) generation Node.js only", () => { tmr.setDate(tmr.getDate() + 1); // By default, credential is always the last element of pipeline factories - const factories = serviceClient.pipeline.factories; + const factories = (serviceClient as any).pipeline.factories; const sharedKeyCredential = factories[factories.length - 1]; const shareName = getUniqueName("share"); diff --git a/sdk/storage/storage-file/test/node/shareclient.spec.ts b/sdk/storage/storage-file/test/node/shareclient.spec.ts index 702376280772..86255510ab23 100644 --- a/sdk/storage/storage-file/test/node/shareclient.spec.ts +++ b/sdk/storage/storage-file/test/node/shareclient.spec.ts @@ -58,7 +58,7 @@ describe("ShareClient Node.js only", () => { }); it("can be created with a url and a credential", async () => { - const factories = shareClient.pipeline.factories; + const factories = (shareClient as any).pipeline.factories; const credential = factories[factories.length - 1] as SharedKeyCredential; const newClient = new ShareClient(shareClient.url, credential); @@ -72,7 +72,7 @@ describe("ShareClient Node.js only", () => { }); it("can be created with a url and a credential and an option bag", async () => { - const factories = shareClient.pipeline.factories; + const factories = (shareClient as any).pipeline.factories; const credential = factories[factories.length - 1] as SharedKeyCredential; const newClient = new ShareClient(shareClient.url, credential, { retryOptions: { @@ -90,7 +90,7 @@ describe("ShareClient Node.js only", () => { }); it("can be created with a url and a pipeline", async () => { - const factories = shareClient.pipeline.factories; + const factories = (shareClient as any).pipeline.factories; const credential = factories[factories.length - 1] as SharedKeyCredential; const pipeline = newPipeline(credential); const newClient = new ShareClient(shareClient.url, pipeline); diff --git a/sdk/storage/storage-file/test/retrypolicy.spec.ts b/sdk/storage/storage-file/test/retrypolicy.spec.ts index 29660165e364..217557111063 100644 --- a/sdk/storage/storage-file/test/retrypolicy.spec.ts +++ b/sdk/storage/storage-file/test/retrypolicy.spec.ts @@ -29,7 +29,7 @@ describe("RetryPolicy", () => { return new RestError("Server Internal Error", "ServerInternalError", 500); } }); - const factories = shareClient.pipeline.factories.slice(); // clone factories array + const factories = (shareClient as any).pipeline.factories.slice(); // clone factories array factories.push(injector); const pipeline = new Pipeline(factories); const injectShareClient = new ShareClient(shareClient.url, pipeline); @@ -50,7 +50,9 @@ describe("RetryPolicy", () => { return new RestError("Server Internal Error", "ServerInternalError", 500); }); - const credential = shareClient.pipeline.factories[shareClient.pipeline.factories.length - 1]; + const credential = (shareClient as any).pipeline.factories[ + (shareClient as any).pipeline.factories.length - 1 + ]; const factories = newPipeline(credential, { retryOptions: { maxTries: 3 } }).factories; diff --git a/sdk/storage/storage-file/test/specialnaming.spec.ts b/sdk/storage/storage-file/test/specialnaming.spec.ts index 9067d899591c..c1f5846cb959 100644 --- a/sdk/storage/storage-file/test/specialnaming.spec.ts +++ b/sdk/storage/storage-file/test/specialnaming.spec.ts @@ -37,7 +37,7 @@ describe("Special Naming Tests", () => { const fileName: string = getUniqueName("file empty"); const fileClient = new FileClient( appendToURLPath(directoryClient.url, fileName), - directoryClient.pipeline + (directoryClient as any).pipeline ); await fileClient.create(10); @@ -63,7 +63,7 @@ describe("Special Naming Tests", () => { const fileName: string = getUniqueName("Upper file empty another"); const fileClient = new FileClient( appendToURLPath(directoryClient.url, fileName), - directoryClient.pipeline + (directoryClient as any).pipeline ); await fileClient.create(10); @@ -90,7 +90,7 @@ describe("Special Naming Tests", () => { const fileName: string = getUniqueName("Upper file empty another 汉字"); const fileClient = new FileClient( appendToURLPath(directoryClient.url, fileName), - directoryClient.pipeline + (directoryClient as any).pipeline ); await fileClient.create(10); @@ -121,7 +121,7 @@ describe("Special Naming Tests", () => { // Escape "%" when creating XXXURL object with URL strings // Escape "?" otherwise string after "?" will be treated as URL parameters appendToURLPath(directoryClient.url, fileName.replace(/%/g, "%25").replace(/\?/g, "%3F")), - directoryClient.pipeline + (directoryClient as any).pipeline ); await fileClient.create(10); @@ -154,7 +154,7 @@ describe("Special Naming Tests", () => { // Escape "%" when creating XXXURL object with URL strings // Escape "?" otherwise string after "?" will be treated as URL parameters appendToURLPath(shareClient.url, directoryName.replace(/%/g, "%25").replace(/\?/g, "%3F")), - shareClient.pipeline + (shareClient as any).pipeline ); await specialDirectoryClient.create(); @@ -197,7 +197,7 @@ describe("Special Naming Tests", () => { const fileName: string = getUniqueName("ру́сский язы́к"); const fileClient = new FileClient( appendToURLPath(directoryClient.url, fileName), - directoryClient.pipeline + (directoryClient as any).pipeline ); await fileClient.create(10); @@ -237,7 +237,7 @@ describe("Special Naming Tests", () => { const fileName: string = getUniqueName("عربيعربى"); const fileClient = new FileClient( appendToURLPath(directoryClient.url, fileName), - directoryClient.pipeline + (directoryClient as any).pipeline ); await fileClient.create(10); @@ -277,7 +277,7 @@ describe("Special Naming Tests", () => { const fileName: string = getUniqueName("にっぽんごにほんご"); const fileClient = new FileClient( appendToURLPath(directoryClient.url, fileName), - directoryClient.pipeline + (directoryClient as any).pipeline ); await fileClient.create(10); diff --git a/sdk/storage/storage-queue/src/StorageClient.ts b/sdk/storage/storage-queue/src/StorageClient.ts index d20dc398939f..ce831ea2a73d 100644 --- a/sdk/storage/storage-queue/src/StorageClient.ts +++ b/sdk/storage/storage-queue/src/StorageClient.ts @@ -11,21 +11,21 @@ import { Pipeline } from "./Pipeline"; */ export abstract class StorageClient { /** - * Request policy pipeline. + * URL string value. * - * @internal - * @type {Pipeline} + * @type {string} * @memberof StorageClient */ - public readonly pipeline: Pipeline; + public readonly url: string; /** - * URL string value. + * Request policy pipeline. * - * @type {string} + * @internal + * @type {Pipeline} * @memberof StorageClient */ - public readonly url: string; + protected readonly pipeline: Pipeline; /** * StorageClient is a reference to protocol layer operations entry, which is diff --git a/sdk/storage/storage-queue/test/node/messageidclient.spec.ts b/sdk/storage/storage-queue/test/node/messageidclient.spec.ts index 8156bd693bf1..3e4e818fc71c 100644 --- a/sdk/storage/storage-queue/test/node/messageidclient.spec.ts +++ b/sdk/storage/storage-queue/test/node/messageidclient.spec.ts @@ -92,7 +92,7 @@ describe("MessageIdClient Node.js only", () => { it("can be created with a url and a credential", async () => { const messagesClient = queueClient.createMessagesClient(); - const factories = messagesClient.pipeline.factories; + const factories = (messagesClient as any).pipeline.factories; const credential = factories[factories.length - 1] as SharedKeyCredential; const newClient = new MessagesClient(messagesClient.url, credential); @@ -109,7 +109,7 @@ describe("MessageIdClient Node.js only", () => { it("can be created with a url and a credential and an option bag", async () => { const messagesClient = queueClient.createMessagesClient(); - const factories = messagesClient.pipeline.factories; + const factories = (messagesClient as any).pipeline.factories; const credential = factories[factories.length - 1] as SharedKeyCredential; const newClient = new MessagesClient(messagesClient.url, credential, { retryOptions: { @@ -130,7 +130,7 @@ describe("MessageIdClient Node.js only", () => { it("can be created with a url and a pipeline", async () => { const messagesClient = queueClient.createMessagesClient(); - const factories = messagesClient.pipeline.factories; + const factories = (messagesClient as any).pipeline.factories; const credential = factories[factories.length - 1] as SharedKeyCredential; const newClient = new MessagesClient(messagesClient.url, credential); diff --git a/sdk/storage/storage-queue/test/node/messagesclient.spec.ts b/sdk/storage/storage-queue/test/node/messagesclient.spec.ts index a83594b226d1..84b6d792582b 100644 --- a/sdk/storage/storage-queue/test/node/messagesclient.spec.ts +++ b/sdk/storage/storage-queue/test/node/messagesclient.spec.ts @@ -100,7 +100,7 @@ describe("MessagesClient Node.js only", () => { it("can be created with a url and a credential", async () => { const messagesClient = queueClient.createMessagesClient(); - const factories = messagesClient.pipeline.factories; + const factories = (messagesClient as any).pipeline.factories; const credential = factories[factories.length - 1] as SharedKeyCredential; const newClient = new MessagesClient(messagesClient.url, credential); @@ -117,7 +117,7 @@ describe("MessagesClient Node.js only", () => { it("can be created with a url and a credential and an option bag", async () => { const messagesClient = queueClient.createMessagesClient(); - const factories = messagesClient.pipeline.factories; + const factories = (messagesClient as any).pipeline.factories; const credential = factories[factories.length - 1] as SharedKeyCredential; const newClient = new MessagesClient(messagesClient.url, credential, { retryOptions: { @@ -138,7 +138,7 @@ describe("MessagesClient Node.js only", () => { it("can be created with a url and a pipeline", async () => { const messagesClient = queueClient.createMessagesClient(); - const factories = messagesClient.pipeline.factories; + const factories = (messagesClient as any).pipeline.factories; const credential = factories[factories.length - 1] as SharedKeyCredential; const newClient = new MessagesClient(messagesClient.url, credential); diff --git a/sdk/storage/storage-queue/test/node/queueclient.spec.ts b/sdk/storage/storage-queue/test/node/queueclient.spec.ts index 7d835fbaa4d0..74fe8992f743 100644 --- a/sdk/storage/storage-queue/test/node/queueclient.spec.ts +++ b/sdk/storage/storage-queue/test/node/queueclient.spec.ts @@ -47,7 +47,7 @@ describe("QueueClient Node.js only", () => { }); it("can be created with a url and a credential", async () => { - const factories = queueClient.pipeline.factories; + const factories = (queueClient as any).pipeline.factories; const credential = factories[factories.length - 1] as SharedKeyCredential; const newClient = new QueueClient(queueClient.url, credential); @@ -60,7 +60,7 @@ describe("QueueClient Node.js only", () => { }); it("can be created with a url and a credential and an option bag", async () => { - const factories = queueClient.pipeline.factories; + const factories = (queueClient as any).pipeline.factories; const credential = factories[factories.length - 1] as SharedKeyCredential; const newClient = new QueueClient(queueClient.url, credential, { retryOptions: { @@ -77,7 +77,7 @@ describe("QueueClient Node.js only", () => { }); it("can be created with a url and a pipeline", async () => { - const factories = queueClient.pipeline.factories; + const factories = (queueClient as any).pipeline.factories; const credential = factories[factories.length - 1] as SharedKeyCredential; const pipeline = newPipeline(credential); const newClient = new QueueClient(queueClient.url, pipeline); diff --git a/sdk/storage/storage-queue/test/node/queueserviceclient.spec.ts b/sdk/storage/storage-queue/test/node/queueserviceclient.spec.ts index f10771516a54..e517bca12211 100644 --- a/sdk/storage/storage-queue/test/node/queueserviceclient.spec.ts +++ b/sdk/storage/storage-queue/test/node/queueserviceclient.spec.ts @@ -18,7 +18,7 @@ describe("QueueServiceClient Node.js only", () => { it("can be created with a url and a credential", async () => { const queueServiceClient = getQSU(); - const factories = queueServiceClient.pipeline.factories; + const factories = (queueServiceClient as any).pipeline.factories; const credential = factories[factories.length - 1] as SharedKeyCredential; const newClient = new QueueServiceClient(queueServiceClient.url, credential); @@ -32,7 +32,7 @@ describe("QueueServiceClient Node.js only", () => { it("can be created with a url and a credential and an option bag", async () => { const queueServiceClient = getQSU(); - const factories = queueServiceClient.pipeline.factories; + const factories = (queueServiceClient as any).pipeline.factories; const credential = factories[factories.length - 1] as SharedKeyCredential; const newClient = new QueueServiceClient(queueServiceClient.url, credential, { retryOptions: { @@ -50,7 +50,7 @@ describe("QueueServiceClient Node.js only", () => { it("can be created with a url and a pipeline", async () => { const queueServiceClient = getQSU(); - const factories = queueServiceClient.pipeline.factories; + const factories = (queueServiceClient as any).pipeline.factories; const credential = factories[factories.length - 1] as SharedKeyCredential; const pipeline = newPipeline(credential); const newClient = new QueueServiceClient(queueServiceClient.url, pipeline); diff --git a/sdk/storage/storage-queue/test/node/sas.spec.ts b/sdk/storage/storage-queue/test/node/sas.spec.ts index e6347c772192..9cfe00c8e120 100644 --- a/sdk/storage/storage-queue/test/node/sas.spec.ts +++ b/sdk/storage/storage-queue/test/node/sas.spec.ts @@ -40,7 +40,7 @@ describe("Shared Access Signature (SAS) generation Node.js only", () => { tmr.setDate(tmr.getDate() + 1); // By default, credential is always the last element of pipeline factories - const factories = queueServiceClient.pipeline.factories; + const factories = (queueServiceClient as any).pipeline.factories; const sharedKeyCredential = factories[factories.length - 1]; const sas = generateAccountSASQueryParameters( @@ -71,7 +71,7 @@ describe("Shared Access Signature (SAS) generation Node.js only", () => { tmr.setDate(tmr.getDate() + 1); // By default, credential is always the last element of pipeline factories - const factories = queueServiceClient.pipeline.factories; + const factories = (queueServiceClient as any).pipeline.factories; const sharedKeyCredential = factories[factories.length - 1]; const sas = generateAccountSASQueryParameters( @@ -105,7 +105,7 @@ describe("Shared Access Signature (SAS) generation Node.js only", () => { tmr.setDate(tmr.getDate() + 1); // By default, credential is always the last element of pipeline factories - const factories = queueServiceClient.pipeline.factories; + const factories = (queueServiceClient as any).pipeline.factories; const sharedKeyCredential = factories[factories.length - 1]; const sas = generateAccountSASQueryParameters( @@ -139,7 +139,7 @@ describe("Shared Access Signature (SAS) generation Node.js only", () => { tmr.setDate(tmr.getDate() + 1); // By default, credential is always the last element of pipeline factories - const factories = queueServiceClient.pipeline.factories; + const factories = (queueServiceClient as any).pipeline.factories; const sharedKeyCredential = factories[factories.length - 1]; const sas = generateAccountSASQueryParameters( @@ -179,7 +179,7 @@ describe("Shared Access Signature (SAS) generation Node.js only", () => { tmr.setDate(tmr.getDate() + 1); // By default, credential is always the last element of pipeline factories - const factories = queueServiceClient.pipeline.factories; + const factories = (queueServiceClient as any).pipeline.factories; const sharedKeyCredential = factories[factories.length - 1]; const queueName = recorder.getUniqueName("queue"); @@ -214,7 +214,7 @@ describe("Shared Access Signature (SAS) generation Node.js only", () => { tmr.setDate(tmr.getDate() + 1); // By default, credential is always the last element of pipeline factories - const factories = queueServiceClient.pipeline.factories; + const factories = (queueServiceClient as any).pipeline.factories; const sharedKeyCredential = factories[factories.length - 1]; const queueName = recorder.getUniqueName("queue"); @@ -267,7 +267,7 @@ describe("Shared Access Signature (SAS) generation Node.js only", () => { tmr.setDate(tmr.getDate() + 1); // By default, credential is always the last element of pipeline factories - const factories = queueServiceClient.pipeline.factories; + const factories = (queueServiceClient as any).pipeline.factories; const sharedKeyCredential = factories[factories.length - 1]; const queueName = recorder.getUniqueName("queue"); diff --git a/sdk/storage/storage-queue/test/retrypolicy.spec.ts b/sdk/storage/storage-queue/test/retrypolicy.spec.ts index 6658521a40d5..27e5c716f16b 100644 --- a/sdk/storage/storage-queue/test/retrypolicy.spec.ts +++ b/sdk/storage/storage-queue/test/retrypolicy.spec.ts @@ -35,7 +35,7 @@ describe("RetryPolicy", () => { return new RestError("Server Internal Error", "ServerInternalError", 500); } }); - const factories = queueClient.pipeline.factories.slice(); // clone factories array + const factories = (queueClient as any).pipeline.factories.slice(); // clone factories array factories.push(injector); const pipeline = new Pipeline(factories); const injectqueueClient = new QueueClient(queueClient.url, pipeline); @@ -56,7 +56,9 @@ describe("RetryPolicy", () => { return new RestError("Server Internal Error", "ServerInternalError", 500); }); - const credential = queueClient.pipeline.factories[queueClient.pipeline.factories.length - 1]; + const credential = (queueClient as any).pipeline.factories[ + (queueClient as any).pipeline.factories.length - 1 + ]; const factories = newPipeline(credential, { retryOptions: { maxTries: 3 } }).factories; @@ -95,7 +97,9 @@ describe("RetryPolicy", () => { hostParts.unshift(secondaryAccount); const secondaryHost = hostParts.join("."); - const credential = queueClient.pipeline.factories[queueClient.pipeline.factories.length - 1]; + const credential = (queueClient as any).pipeline.factories[ + (queueClient as any).pipeline.factories.length - 1 + ]; const factories = newPipeline(credential, { retryOptions: { maxTries: 2, secondaryHost } }).factories; From 4900336e1ef10f6325e6c2c2acddec17928180d4 Mon Sep 17 00:00:00 2001 From: Jeremy Meng Date: Tue, 18 Jun 2019 20:53:23 -0700 Subject: [PATCH 2/2] Fix build error The only place in lib code where pipeline is used. --- sdk/storage/storage-blob/src/LeaseClient.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/storage/storage-blob/src/LeaseClient.ts b/sdk/storage/storage-blob/src/LeaseClient.ts index c26ff0ca7ea9..d59274721e90 100644 --- a/sdk/storage/storage-blob/src/LeaseClient.ts +++ b/sdk/storage/storage-blob/src/LeaseClient.ts @@ -131,7 +131,7 @@ export class LeaseClient { constructor(client: ContainerClient | BlobClient, leaseId?: string) { const clientContext = new StorageClientContext( client.url, - client.pipeline.toServiceClientOptions() + (client as any).pipeline.toServiceClientOptions() ); this._url = client.url;