@azure/storage-blob
Version:
Microsoft Azure Storage SDK for JavaScript - Blob
71 lines (70 loc) • 2.72 kB
JavaScript
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var StorageClient_exports = {};
__export(StorageClient_exports, {
StorageClient: () => StorageClient
});
module.exports = __toCommonJS(StorageClient_exports);
var import_StorageContextClient = require("./StorageContextClient.js");
var import_Pipeline = require("./Pipeline.js");
var import_utils_common = require("./utils/utils.common.js");
class StorageClient {
/**
* Encoded URL string value.
*/
url;
accountName;
/**
* Request policy pipeline.
*
* @internal
*/
pipeline;
/**
* 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.
*/
credential;
/**
* StorageClient is a reference to protocol layer operations entry, which is
* generated by AutoRest generator.
*/
storageClientContext;
/**
*/
isHttps;
/**
* Creates an instance of StorageClient.
* @param url - url to resource
* @param pipeline - request policy pipeline.
*/
constructor(url, pipeline) {
this.url = (0, import_utils_common.escapeURLPath)(url);
this.accountName = (0, import_utils_common.getAccountNameFromUrl)(url);
this.pipeline = pipeline;
this.storageClientContext = new import_StorageContextClient.StorageContextClient(this.url, (0, import_Pipeline.getCoreClientOptions)(pipeline));
this.isHttps = (0, import_utils_common.iEqual)((0, import_utils_common.getURLScheme)(this.url) || "", "https");
this.credential = (0, import_Pipeline.getCredentialFromPipeline)(pipeline);
const storageClientContext = this.storageClientContext;
storageClientContext.requestContentType = void 0;
}
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
StorageClient
});
//# sourceMappingURL=StorageClient.js.map