Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

azure-storage

Package Overview
Dependencies
Maintainers
1
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

azure-storage - npm Package Compare versions

Comparing version 2.9.0-preview to 2.10.0

.npmignore

16

browser/ChangeLog.md
Note: This is the change log file for Azure Storage JavaScript Client Library.
2018.06 Version 2.10.100
ALL
* Generated browser compatible JavaScript files based on Microsoft Azure Storage SDK for Node.js 2.10.0.
* Updated storage service version to 2018-03-28.
BLOB
* Fixed a bug that `DeleteRetentionPolicy.Days` should be `number` instead of `string` when calling `getServiceProperties`.
* Added a method `getAccountProperties` to `blobService`.
* Added a method `createBlockFromURL` to `blobService`.
* Added support for static website service properties (in preview).
2018.05 Version 2.9.100-preview

@@ -14,3 +26,3 @@

* Added support for '$web' as a valid blob container name for static website.
* Added support for write-once read-many containers.
* Added support for write-once read-many containers (in preview).
* The `Get Container Properties` and `List Containers` APIs now return two new properties indicating whether the container has an immutability policy or a legal hold.

@@ -22,3 +34,3 @@ * The `Get Blob Properties` and `List Blobs` APIs now return the creation time of the blob as a property.

2018.04 Version 2.8.100+2.8.2
2018.04 Version 2.8.100

@@ -25,0 +37,0 @@ * Fixed a bug that retry policy will not retry for XHR error in browsers.

Note: This is an Azure Storage only package. The all up Azure node sdk still has the old storage bits in there. In a future release, those storage bits will be removed and an npm dependency to this storage node sdk will
be taken. This is a GA release and the changes described below indicate the changes from the Azure node SDK 0.9.8 available here - https://github.com/Azure/azure-sdk-for-node.
2018.06 Version 2.10.0
ALL
* Updated storage service version to 2018-03-28.
BLOB
* Fixed a bug that `DeleteRetentionPolicy.Days` should be `number` instead of `string` when calling `getServiceProperties`.
* Added a method `getAccountProperties` to `blobService`.
* Added a method `createBlockFromURL` to `blobService`.
* Added support for static website service properties (in preview).
2018.05 Version 2.9.0-preview

@@ -14,3 +25,3 @@

* Added support for '$web' as a valid blob container name for static website.
* Added support for write-once read-many containers.
* Added support for write-once read-many containers (in preview).
* The `Get Container Properties` and `List Containers` APIs now return two new properties indicating whether the container has an immutability policy or a legal hold.

@@ -17,0 +28,0 @@ * The `Get Blob Properties` and `List Blobs` APIs now return the creation time of the blob as a property.

@@ -318,2 +318,29 @@ //

/**
* The properties of a storage account.
* @typedef {object} AccountProperties
* @property {string} SkuName The header that specifies storage SKU, also known as account type.
* @property {string} AccountKind The header that describes the flavour of the storage account, also known as account kind.
*/
/**
* The properties of a blob storage service, including properties of Storage Analytics, CORS (Cross-Origin Resource Sharing) rules and Static Webiste configurations.
* @typedef {object} BlobServiceProperties
* @property {string} DefaultServiceVersion The default version of Storage Analytics currently in use.
* @property {LoggingProperties} Logging The Logging settings.
* @property {MetricsProperties} HourMetrics The HourMetrics settings provide a summary of request statistics grouped by API in hourly aggregates.
* @property {MetricsProperties} MinuteMetrics The HourMetrics settings provide request statistics grouped by API for each minute.
* @property {StaticWebsiteProperties} StaticWebsite The Azure Static Website settings.
* @property {object} Cors Groups all CORS rules.
* @property {CorsRule[]} Cors.CorsRules Groups settings for a `[CORS rule]{@link CorsRule}`.
*/
/**
* The Azure Static Website settings.
* @typedef {object} StaticWebsiteProperties
* @property {boolean} Enabled Whether feature of Static Website is enabled.
* @property {string} IndexDocument Indicates index document page path.
* @property {string} ErrorDocument404Path Indicates 404 document page path.
*/
/**
* The Azure Analytics logging settings.

@@ -320,0 +347,0 @@ * @typedef {object} LoggingProperties

@@ -87,2 +87,34 @@ //

function serializeStaticWebsite(doc, staticWebsite) {
if (staticWebsite !== null) {
if (typeof staticWebsite === 'undefined') {
staticWebsite = {};
}
if (typeof staticWebsite.Enabled !== 'undefined') {
doc = doc.ele(ServicePropertiesConstants.ENABLED_ELEMENT)
.txt(staticWebsite.Enabled)
.up();
} else {
doc = doc.ele(ServicePropertiesConstants.ENABLED_ELEMENT)
.txt(false)
.up();
}
if (typeof staticWebsite.IndexDocument !== 'undefined') {
doc = doc.ele(ServicePropertiesConstants.DEFAULT_INDEX_DOCUMENT_ELEMENT)
.txt(staticWebsite.IndexDocument)
.up();
}
if (typeof staticWebsite.ErrorDocument404Path !== 'undefined') {
doc = doc.ele(ServicePropertiesConstants.DEFAULT_ERROR_DOCUMENT_404_PATH_ELEMENT)
.txt(staticWebsite.ErrorDocument404Path)
.up();
}
doc = doc.up();
}
}
function serializeLogging(doc, logging) {

@@ -261,2 +293,8 @@ if (typeof logging.Version !== 'undefined') {

if (servicePropertiesJs.StaticWebsite) {
doc = doc.ele(ServicePropertiesConstants.DEFAULT_STATIC_WEBSITE_ELEMENT);
serializeStaticWebsite(doc, servicePropertiesJs.StaticWebsite);
doc = doc.up();
}
return doc.doc().toString();

@@ -395,3 +433,3 @@ };

if (typeof deleteRetentionPolicyXml.Days !== 'undefined') {
deleteRetentionPolicy.Days = deleteRetentionPolicyXml.Days;
deleteRetentionPolicy.Days = parseInt(deleteRetentionPolicyXml.Days);
}

@@ -402,2 +440,20 @@

function parseStaticWebsite(staticWebsiteXml) {
var staticWebsite = {};
if (typeof staticWebsiteXml.Enabled !== 'undefined') {
staticWebsite.Enabled = staticWebsiteXml.Enabled === 'true';
}
if (typeof staticWebsiteXml.IndexDocument !== 'undefined') {
staticWebsite.IndexDocument = staticWebsiteXml.IndexDocument;
}
if (typeof staticWebsiteXml.ErrorDocument404Path !== 'undefined') {
staticWebsite.ErrorDocument404Path = staticWebsiteXml.ErrorDocument404Path;
}
return staticWebsite;
}
exports.parse = function (servicePropertiesXml) {

@@ -430,3 +486,7 @@ var serviceProperties = {};

if (typeof servicePropertiesXml.StaticWebsite !== 'undefined') {
serviceProperties.StaticWebsite = parseStaticWebsite(servicePropertiesXml.StaticWebsite);
}
return serviceProperties;
};

@@ -40,3 +40,3 @@ //

*/
USER_AGENT_PRODUCT_VERSION: '2.9.0-preview',
USER_AGENT_PRODUCT_VERSION: '2.10.0',

@@ -474,3 +474,27 @@ /**

*/
DEFAULT_DELETE_RETENTION_POLICY_ELEMENT: 'DeleteRetentionPolicy'
DEFAULT_DELETE_RETENTION_POLICY_ELEMENT: 'DeleteRetentionPolicy',
/**
* XML element for StaticWebsite.
*
* @const
* @type {string}
*/
DEFAULT_STATIC_WEBSITE_ELEMENT: 'StaticWebsite',
/**
* XML element for StaticWebsite/IndexDocument.
*
* @const
* @type {string}
*/
DEFAULT_INDEX_DOCUMENT_ELEMENT: 'IndexDocument',
/**
* XML element for StaticWebsite/ErrorDocument404Path.
*
* @const
* @type {string}
*/
DEFAULT_ERROR_DOCUMENT_404_PATH_ELEMENT: 'ErrorDocument404Path'
},

@@ -1431,4 +1455,19 @@

/**
* The header that specifies storage SKU, also known as account type.
*
* @const
* @type {string}
*/
SKU_NAME: 'x-ms-sku-name',
/**
* The header that describes the flavour of the storage account, also known as account kind.
*
* @const
* @type {string}
*/
ACCOUNT_KIND: 'x-ms-account-kind',
/**
* The header that specifies lease ID.

@@ -1570,2 +1609,10 @@ *

/**
* The Source Range header.
*
* @const
* @type {string}
*/
SOURCE_RANGE: 'x-ms-source-range',
/**
* The header that specifies if the request will populate the ContentMD5 header for range gets.

@@ -1712,3 +1759,3 @@ *

*/
TARGET_STORAGE_VERSION: '2017-11-09',
TARGET_STORAGE_VERSION: '2018-03-28',

@@ -1715,0 +1762,0 @@ /**

6

lib/common/util/validate.js

@@ -82,3 +82,3 @@ //

exports.isValidUri = function (uri) {
if (!check.isURL(uri)){
if (!check.isURL(uri, { 'require_tld': false })){
throw new URIError('The provided URI "' + uri + '" is invalid.');

@@ -101,3 +101,3 @@ }

storageHost.primaryHost = _.isString(host) ? host : host.primaryHost;
if (storageHost.primaryHost && !check.isURL(storageHost.primaryHost)){
if (storageHost.primaryHost && !check.isURL(storageHost.primaryHost, { 'require_tld': false })){
throw new URIError('The provided URI "' + storageHost.primaryHost + '" is invalid.');

@@ -107,3 +107,3 @@ }

storageHost.secondaryHost = _.isString(host) ? undefined : host.secondaryHost;
if (storageHost.secondaryHost && !check.isURL(storageHost.secondaryHost)){
if (storageHost.secondaryHost && !check.isURL(storageHost.secondaryHost, { 'require_tld': false })){
throw new URIError('The provided URI "' + storageHost.secondaryHost + '" is invalid.');

@@ -110,0 +110,0 @@ }

@@ -249,2 +249,13 @@ //

// Source Range
if (!azureutil.objectIsNull(blob.sourceRangeStart)) {
var sourceRange = 'bytes=' + blob.sourceRangeStart + '-';
if (!azureutil.objectIsNull(blob.sourceRangeEnd)) {
sourceRange += blob.sourceRangeEnd;
}
webResource.withHeader(HeaderConstants.SOURCE_RANGE, sourceRange);
}
// Blob Type

@@ -251,0 +262,0 @@ setHeaderPropertyFromBlob(HeaderConstants.BLOB_TYPE, 'blobType');

{
"name": "azure-storage",
"author": "Microsoft Corporation",
"version": "2.9.0-preview",
"version": "2.10.0",
"description": "Microsoft Azure Storage Client Library for Node.js",

@@ -6,0 +6,0 @@ "typings": "typings/azure-storage/azure-storage.d.ts",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc