Socket
Socket
Sign inDemoInstall

azurite

Package Overview
Dependencies
267
Maintainers
4
Versions
153
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.17.1 to 3.18.0

dist/src/blob/persistence/PageWithDelimiter.js

19

ChangeLog.md

@@ -7,2 +7,21 @@ # Changelog

## 2022.06 Version 3.18.0
General:
- Bump up service API version to 2021-08-06
- Modified the error messge for invalid API version to make it more actionable.
Blob:
- Fixed issue that startCopyFromURL and copyFromURL API not fail, when request container if-none-match="\*" and dest blob already exist.
Table:
- Reject table batch request bodies exceeding 4MB.
- Fix binary table property validation to be 64K bytes not 32K characters.
- Does not error when table created is a substring of another table.
- Correctly responds with status 404 on patch with non-existant entity.
- Fix pagination when no rowkey in continuation token
## 2022.04 Version 3.17.1

@@ -9,0 +28,0 @@

3

dist/src/blob/errors/StorageErrorFactory.js

@@ -212,2 +212,5 @@ "use strict";

}
static getInvalidAPIVersion(contextID = "", apiVersion) {
return new StorageError_1.default(400, "InvalidHeaderValue", `The API version ${apiVersion} is not supported by Azurite. Please upgrade Azurite to latest version and retry. If you are using Azurite in Visual Studio, please check you have installed latest Visual Studio patch. Azurite command line parameter \"--skipApiVersionCheck\" or Visual Studio Code configuration \"Skip Api Version Check\" can skip this error. `, contextID);
}
static getBlobArchived(contextID = "", additionalMessages) {

@@ -214,0 +217,0 @@ if (additionalMessages === undefined) {

27

dist/src/blob/handlers/ContainerHandler.js

@@ -378,3 +378,3 @@ "use strict";

}
const [blobs, nextMarker] = await this.metadataStore.listBlobs(context, accountName, containerName, undefined, options.prefix, options.maxresults, marker, includeSnapshots, includeUncommittedBlobs);
const [blobs, _prefixes, nextMarker] = await this.metadataStore.listBlobs(context, accountName, containerName, undefined, undefined, options.prefix, options.maxresults, marker, includeSnapshots, includeUncommittedBlobs);
const serviceEndpoint = `${request.getEndpoint()}/${accountName}`;

@@ -439,25 +439,3 @@ const response = {

}
const [blobs, nextMarker] = await this.metadataStore.listBlobs(context, accountName, containerName, undefined, options.prefix, options.maxresults, marker, includeSnapshots, includeUncommittedBlobs);
const blobItems = [];
const blobPrefixes = [];
const blobPrefixesSet = new Set();
const prefixLength = options.prefix.length;
for (const blob of blobs) {
const delimiterPosAfterPrefix = blob.name.indexOf(delimiter, prefixLength);
// This is a blob
if (delimiterPosAfterPrefix < 0) {
blob.deleted = blob.deleted !== true ? undefined : true;
blobItems.push(blob);
}
else {
// This is a prefix
const prefix = blob.name.substr(0, delimiterPosAfterPrefix + 1);
blobPrefixesSet.add(prefix);
}
}
const iter = blobPrefixesSet.values();
let val;
while (!(val = iter.next()).done) {
blobPrefixes.push({ name: val.value });
}
const [blobItems, blobPrefixes, nextMarker] = await this.metadataStore.listBlobs(context, accountName, containerName, delimiter, undefined, options.prefix, options.maxresults, marker, includeSnapshots, includeUncommittedBlobs);
const serviceEndpoint = `${request.getEndpoint()}/${accountName}`;

@@ -479,2 +457,3 @@ const response = {

blobItems: blobItems.map(item => {
item.deleted = item.deleted !== true ? undefined : true;
return Object.assign(Object.assign({}, item), { snapshot: item.snapshot || undefined, properties: Object.assign(Object.assign({}, item.properties), { etag: utils_2.removeQuotationFromListBlobEtag(item.properties.etag), accessTierInferred: item.properties.accessTierInferred === true ? true : undefined }) });

@@ -481,0 +460,0 @@ })

@@ -6,4 +6,4 @@ "use strict";

const Models = tslib_1.__importStar(require("../generated/artifacts/models"));
exports.VERSION = "3.17.1";
exports.BLOB_API_VERSION = "2021-06-08";
exports.VERSION = "3.18.0";
exports.BLOB_API_VERSION = "2021-08-06";
exports.DEFAULT_BLOB_SERVER_HOST_NAME = "127.0.0.1"; // Change to 0.0.0.0 when needs external access

@@ -91,2 +91,3 @@ exports.DEFAULT_LIST_BLOBS_MAX_RESULTS = 5000;

exports.ValidAPIVersions = [
"2021-08-06",
"2021-06-08",

@@ -93,0 +94,0 @@ "2021-04-10",

@@ -9,6 +9,3 @@ "use strict";

if (!validApiVersions.includes(inputApiVersion)) {
throw StorageErrorFactory_1.default.getInvalidHeaderValue(requestId, {
HeaderName: "x-ms-version",
HeaderValue: inputApiVersion
});
throw StorageErrorFactory_1.default.getInvalidAPIVersion(requestId, inputApiVersion);
}

@@ -15,0 +12,0 @@ }

@@ -25,2 +25,5 @@ "use strict";

}
static getInvalidAPIVersion(contextID = "", apiVersion) {
return new StorageError_1.default(400, "InvalidHeaderValue", `The API version ${apiVersion} is not supported by Azurite. Please upgrade Azurite to latest version and retry. If you are using Azurite in Visual Studio, please check you have installed latest Visual Studio patch. Azurite command line parameter \"--skipApiVersionCheck\" or Visual Studio Code configuration \"Skip Api Version Check\" can skip this error. `, contextID);
}
static getInvaidXmlDocument(contextID = defaultID) {

@@ -27,0 +30,0 @@ return new StorageError_1.default(400, "InvaidXmlDocument", `XML specified is not syntactically valid.`, contextID);

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.VALID_QUEUE_AUDIENCES = exports.ValidAPIVersions = exports.DEFAULT_QUEUE_PERSISTENCE_ARRAY = exports.QUEUE_STATUSCODE = exports.SECONDARY_SUFFIX = exports.HeaderConstants = exports.MethodConstants = exports.EMPTY_EXTENT_CHUNK = exports.UPDATE_VISIBILITYTIMEOUT_MAX = exports.UPDATE_VISIBILITYTIMEOUT_MIN = exports.DEFUALT_UPDATE_VISIBILITYTIMEOUT = exports.MESSAGETTL_MIN = exports.ENQUEUE_VISIBILITYTIMEOUT_MAX = exports.ENQUEUE_VISIBILITYTIMEOUT_MIN = exports.DEFUALT_MESSAGETTL = exports.MESSAGETEXT_LENGTH_MAX = exports.DEQUEUE_NUMOFMESSAGES_MAX = exports.DEQUEUE_NUMOFMESSAGES_MIN = exports.DEQUEUE_VISIBILITYTIMEOUT_MAX = exports.DEQUEUE_VISIBILITYTIMEOUT_MIN = exports.DEFUALT_DEQUEUE_VISIBILITYTIMEOUT = exports.LIST_QUEUE_MAXRESSULTS_MAX = exports.LIST_QUEUE_MAXRESSULTS_MIN = exports.QUEUE_SERVICE_PERMISSION = exports.NEVER_EXPIRE_DATE = exports.DEFAULT_GC_INTERVAL_MS = exports.LOGGER_CONFIGS = exports.DEFAULT_QUEUE_CONTEXT_PATH = exports.DEFAULT_ENABLE_ACCESS_LOG = exports.DEFAULT_ACCESS_LOG_PATH = exports.DEFAULT_ENABLE_DEBUG_LOG = exports.DEFAULT_DEBUG_LOG_PATH = exports.DEFAULT_QUEUE_PERSISTENCE_PATH = exports.DEFAULT_QUEUE_EXTENT_LOKI_DB_PATH = exports.DEFAULT_QUEUE_LOKI_DB_PATH = exports.IS_PRODUCTION = exports.DEFAULT_QUEUE_LISTENING_PORT = exports.DEFAULT_QUEUE_SERVER_HOST_NAME = exports.QUEUE_API_VERSION = exports.VERSION = void 0;
exports.VERSION = "3.17.1";
exports.QUEUE_API_VERSION = "2021-06-08";
exports.VERSION = "3.18.0";
exports.QUEUE_API_VERSION = "2021-08-06";
exports.DEFAULT_QUEUE_SERVER_HOST_NAME = "127.0.0.1"; // Change to 0.0.0.0 when needs external access

@@ -87,2 +87,3 @@ exports.DEFAULT_QUEUE_LISTENING_PORT = 10001;

exports.ValidAPIVersions = [
"2021-08-06",
"2021-06-08",

@@ -89,0 +90,0 @@ "2021-04-10",

@@ -10,6 +10,3 @@ "use strict";

if (!validApiVersions.includes(inputApiVersion)) {
throw StorageErrorFactory_1.default.getInvalidHeaderValue(requestId, {
HeaderName: "x-ms-version",
HeaderValue: inputApiVersion
});
throw StorageErrorFactory_1.default.getInvalidAPIVersion(requestId, inputApiVersion);
}

@@ -16,0 +13,0 @@ }

@@ -13,2 +13,5 @@ "use strict";

}
static getInvalidAPIVersion(context, apiVersion) {
return new StorageError_1.default(400, "InvalidHeaderValue", `The API version ${apiVersion} is not supported by Azurite. Please upgrade Azurite to latest version and retry. If you are using Azurite in Visual Studio, please check you have installed latest Visual Studio patch. Azurite command line parameter \"--skipApiVersionCheck\" or Visual Studio Code configuration \"Skip Api Version Check\" can skip this error. `, context.contextID || defaultID, undefined, context);
}
static getInvalidInput(context, additionalMessages) {

@@ -15,0 +18,0 @@ if (additionalMessages === undefined) {

@@ -15,2 +15,3 @@ "use strict";

const BaseHandler_1 = tslib_1.__importDefault(require("./BaseHandler"));
const IEdmType_1 = require("../entity/IEdmType");
/**

@@ -493,3 +494,8 @@ * TODO:

const tableCtx = new TableStorageContext_1.default(context);
this.checkBodyLimit(context, (_a = context.request) === null || _a === void 0 ? void 0 : _a.getBody());
if (contentLength && contentLength > constants_1.BODY_SIZE_MAX) {
throw StorageErrorFactory_1.default.getRequestBodyTooLarge(context);
}
else {
this.checkBodyLimit(context, (_a = context.request) === null || _a === void 0 ? void 0 : _a.getBody());
}
const contentTypeResponse = (_c = (_b = tableCtx.request) === null || _b === void 0 ? void 0 : _b.getHeader("content-type")) === null || _c === void 0 ? void 0 : _c.replace("batch", "batchresponse");

@@ -603,6 +609,16 @@ const tableBatchManager = new TableBatchOrchestrator_1.default(tableCtx, this);

if (properties.hasOwnProperty(prop)) {
if (null !== properties[prop] &&
undefined !== properties[prop].length &&
properties[prop].length > 1024 * 32) {
throw StorageErrorFactory_1.default.getPropertyValueTooLargeError(context);
if (null !== properties[prop] && undefined !== properties[prop].length) {
const typeKey = `${prop}${constants_1.ODATA_TYPE}`;
let type;
if (properties[typeKey]) {
type = IEdmType_1.getEdmType(properties[typeKey]);
}
if (type === IEdmType_1.EdmType.Binary) {
if (Buffer.from(properties[prop], 'base64').length > 64 * 1024) {
throw StorageErrorFactory_1.default.getPropertyValueTooLargeError(context);
}
}
else if (properties[prop].length > 32 * 1024) {
throw StorageErrorFactory_1.default.getPropertyValueTooLargeError(context);
}
}

@@ -609,0 +625,0 @@ }

@@ -111,3 +111,3 @@ "use strict";

account: tableModel.account,
table: { $regex: [tableModel.table, "i"] }
table: { $regex: [String.raw `\b${tableModel.table}\b`, "i"] }
});

@@ -291,2 +291,3 @@ // If the metadata exists, we will throw getTableAlreadyExists error

else {
this.failPatchOnMissingEntity(context);
// Insert

@@ -301,2 +302,8 @@ return this.insertTableEntity(context, table, account, entity, batchId);

}
failPatchOnMissingEntity(context) {
if (context.context.request.req !== undefined &&
context.context.request.req.method === "PATCH") {
throw StorageErrorFactory_1.default.ResourceNotFound(context);
}
}
async deleteTableEntity(context, table, account, partitionKey, rowKey, etag, batchId) {

@@ -360,2 +367,7 @@ const tableEntityCollection = this.getEntityCollection(account, table, context);

}
if (decodedNextPartitionKey !== undefined) {
if (data.PartitionKey < decodedNextPartitionKey) {
return false;
}
}
return true;

@@ -362,0 +374,0 @@ })

@@ -18,4 +18,4 @@ "use strict";

exports.DEFAULT_TABLE_CONTEXT_PATH = "azurite_table_context";
exports.TABLE_API_VERSION = "2021-06-08";
exports.VERSION = "3.17.1";
exports.TABLE_API_VERSION = "2021-08-06";
exports.VERSION = "3.18.0";
// Max Body size is 4 MB

@@ -66,2 +66,3 @@ exports.BODY_SIZE_MAX = 1024 * 1024 * 4;

exports.ValidAPIVersions = [
"2021-08-06",
"2021-06-08",

@@ -68,0 +69,0 @@ "2021-04-10",

@@ -121,6 +121,3 @@ "use strict";

if (!validApiVersions.includes(inputApiVersion)) {
throw StorageErrorFactory_1.default.getInvalidHeaderValue(context, {
HeaderName: constants_1.HeaderConstants.X_MS_VERSION,
HeaderValue: inputApiVersion
});
throw StorageErrorFactory_1.default.getInvalidAPIVersion(context, inputApiVersion);
}

@@ -127,0 +124,0 @@ }

@@ -6,3 +6,3 @@ {

"icon": "icon.png",
"version": "3.17.1",
"version": "3.18.0",
"publisher": "Azurite",

@@ -74,4 +74,4 @@ "categories": [

"find-process": "^1.4.4",
"husky": "^7.0.0",
"lint-staged": "^12.0.3",
"husky": "^8.0.1",
"lint-staged": "^13.0.0",
"mocha": "^5.2.0",

@@ -286,4 +286,4 @@ "pkg": "^5.3.0",

"clean:deep": "npm run clean && rimraf debug.log __*",
"validate:npmpack:win": "npm install && npm run build && npm pack && cross-var npm install -g azurite-$npm_package_version.tgz && azurite -v && azurite-blob -v && azurite-queue -v && azurite-table -v",
"validate:npmpack:linux_mac": "npm install && npm run build && npm pack && cross-var sudo npm install -g azurite-$npm_package_version.tgz && azurite -v && azurite-blob -v && azurite-queue -v && azurite-table -v",
"validate:npmpack:win": "npm install --legacy-peer-deps && npm run build && npm pack && cross-var npm install -g azurite-$npm_package_version.tgz && azurite -v && azurite-blob -v && azurite-queue -v && azurite-table -v",
"validate:npmpack:linux_mac": "npm install --legacy-peer-deps && npm run build && npm pack && cross-var sudo npm install -g azurite-$npm_package_version.tgz && azurite -v && azurite-blob -v && azurite-queue -v && azurite-table -v",
"db:migrate:blob:metadata": "sequelize db:migrate --config migrations/blob/metadata/config/config.json --migrations-path migrations/blob/metadata/migrations",

@@ -293,5 +293,2 @@ "db:create:blob:metadata": "sequelize db:create --config migrations/blob/metadata/config/config.json --migrations-path migrations/blob/metadata/migrations"

"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},

@@ -298,0 +295,0 @@ "repository": {

@@ -12,3 +12,3 @@ # Azurite V3

| ------------------------------------------------------------------ | ------------------------- | ------------------------------ | ------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 3.17.1 | 2021-06-08 | Blob, Queue and Table(preview) | Azurite V3 based on TypeScript & New Architecture | [NPM](https://www.npmjs.com/package/azurite) - [Docker](https://hub.docker.com/_/microsoft-azure-storage-azurite) - [Visual Studio Code Extension](https://marketplace.visualstudio.com/items?itemName=Azurite.azurite) |
| 3.18.0 | 2021-08-06 | Blob, Queue and Table(preview) | Azurite V3 based on TypeScript & New Architecture | [NPM](https://www.npmjs.com/package/azurite) - [Docker](https://hub.docker.com/_/microsoft-azure-storage-azurite) - [Visual Studio Code Extension](https://marketplace.visualstudio.com/items?itemName=Azurite.azurite) |
| [Legacy (v2)](https://github.com/Azure/Azurite/tree/legacy-master) | 2016-05-31 | Blob, Queue and Table | Legacy Azurite V2 | [NPM](https://www.npmjs.com/package/azurite) |

@@ -79,3 +79,3 @@

- Blob storage features align with Azure Storage API version 2021-06-08 (Refer to support matrix section below)
- Blob storage features align with Azure Storage API version 2021-08-06 (Refer to support matrix section below)
- SharedKey/Account SAS/Service SAS/Public Access Authentications/OAuth

@@ -86,3 +86,3 @@ - Get/Set Blob Service Properties

- Create/Read/List/Update/Delete Page Blobs
- Queue storage features align with Azure Storage API version 2021-06-08 (Refer to support matrix section below)
- Queue storage features align with Azure Storage API version 2021-08-06 (Refer to support matrix section below)
- SharedKey/Account SAS/Service SAS/OAuth

@@ -93,3 +93,3 @@ - Get/Set Queue Service Properties

- Put/Get/Peek/Updata/Deleta/Clear Messages
- Table storage features align with Azure Storage API version 2021-06-08 (Refer to support matrix section below)
- Table storage features align with Azure Storage API version 2021-08-06 (Refer to support matrix section below)
- SharedKey/Account SAS/Service SAS/OAuth

@@ -891,3 +891,3 @@ - Create/List/Delete Tables

Azurite V3 supports features from Azure Storage API version 2021-06-08, and will maintain parity with the latest API versions, in a more frequent update frequency than legacy Azurite V2.
Azurite V3 supports features from Azure Storage API version 2021-08-06, and will maintain parity with the latest API versions, in a more frequent update frequency than legacy Azurite V2.

@@ -903,3 +903,3 @@ ## TypeScript Server Code Generator

Latest release targets **2021-06-08** API version **blob** service.
Latest release targets **2021-08-06** API version **blob** service.

@@ -964,3 +964,3 @@ Detailed support matrix:

Latest version supports for **2021-06-08** API version **queue** service.
Latest version supports for **2021-08-06** API version **queue** service.
Detailed support matrix:

@@ -995,3 +995,3 @@

Latest version supports for **2021-06-08** API version **table** service (preview).
Latest version supports for **2021-08-06** API version **table** service (preview).
Detailed support matrix:

@@ -998,0 +998,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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

Sorry, the diff of this file is not supported yet

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc