azure-blob-storage
Advanced tools
Comparing version 3.0.0 to 4.0.0
{ | ||
"name": "azure-blob-storage", | ||
"version": "3.0.0", | ||
"version": "4.0.0", | ||
"author": "Elena Solomon <elenasolomon28@gmail.com>", | ||
"description": "azure-blob-storage", | ||
"scripts": { | ||
"compile": "babel-compile -p taskcluster src:lib test:.test", | ||
"prepublish": "npm run compile", | ||
"lint": "eslint src/*.js test/*.js", | ||
"pretest": "yarn lint && npm run compile", | ||
"test": "mocha --no-timeouts .test/*_test.js", | ||
"pretest": "yarn lint", | ||
"test": "mocha --no-timeouts test/*_test.js", | ||
"lintfix": "eslint --fix src/*.js test/*.js" | ||
}, | ||
"files": [ | ||
"src", | ||
"lib" | ||
"src/" | ||
], | ||
@@ -23,21 +20,15 @@ "repository": { | ||
"devDependencies": { | ||
"assume": "^1.2.5", | ||
"babel-compile": "^2.0.0", | ||
"babel-preset-taskcluster": "^3.0.0", | ||
"eslint": "4.x", | ||
"eslint-config-taskcluster": "^3.0.0", | ||
"lodash": "^4.17.4", | ||
"mocha": "^4.0.1", | ||
"taskcluster-lib-testing": "^2.0.2", | ||
"typed-env-config": "^1.1.0" | ||
"assume": "^2.1.0", | ||
"eslint": "5.15.0", | ||
"eslint-config-taskcluster": "^4.0.0", | ||
"mocha": "^6.0.2" | ||
}, | ||
"dependencies": { | ||
"ajv": "^5.5.0", | ||
"babel-runtime": "^6.20.0", | ||
"debug": "^3.1.0", | ||
"fast-azure-storage": "^2.0.0", | ||
"source-map-support": "^0.5.0", | ||
"uuid": "^3.1.0" | ||
"ajv": "^6.9.2", | ||
"debug": "^4.1.1", | ||
"fast-azure-storage": "^2.3.1", | ||
"lodash": "^4.17.11", | ||
"uuid": "^3.3.2" | ||
}, | ||
"main": "./lib/index" | ||
"main": "./src/index" | ||
} |
@@ -1,7 +0,7 @@ | ||
import assert from 'assert'; | ||
import _debug from 'debug'; | ||
import _ from 'lodash'; | ||
const assert = require('assert'); | ||
const _debug = require('debug'); | ||
const _ = require('lodash'); | ||
const debug = _debug('azure-blob-storage:blob'); | ||
import {CongestionError, SchemaValidationError, BlobSerializationError} from './customerrors'; | ||
import {rethrowDebug, sleep, computeDelay} from './utils'; | ||
const {CongestionError, SchemaValidationError, BlobSerializationError} = require('./customerrors'); | ||
const {rethrowDebug, sleep, computeDelay} = require('./utils'); | ||
@@ -51,5 +51,5 @@ /** | ||
debug(`Failed to validate the blob content against schema with id: | ||
${this.container.schema.id}, errors: ${result.errors}`); | ||
${this.container.schema.$id}, errors: ${result.errors}`); | ||
let error = new SchemaValidationError(`Failed to validate the blob content against schema with id: | ||
${this.container.schema.id}`); | ||
${this.container.schema.$id}`); | ||
error.content = content; | ||
@@ -56,0 +56,0 @@ error.validationErrors = result.errors; |
@@ -1,12 +0,11 @@ | ||
import _ from 'lodash'; | ||
import assert from 'assert'; | ||
import azure from 'fast-azure-storage'; | ||
import taskcluster from 'taskcluster-client'; | ||
import constants from './constants'; | ||
import Ajv from 'ajv'; | ||
import {rethrowDebug} from './utils'; | ||
import _debug from 'debug'; | ||
const _ = require('lodash'); | ||
const assert = require('assert'); | ||
const azure = require('fast-azure-storage'); | ||
const constants = require('./constants'); | ||
const Ajv = require('ajv'); | ||
const {rethrowDebug} = require('./utils'); | ||
const _debug = require('debug'); | ||
const debug = _debug('azure-blob-storage:account'); | ||
import {DataBlockBlob, AppendDataBlob} from './datablob'; | ||
import {SchemaIntegrityCheckError} from './customerrors'; | ||
const {DataBlockBlob, AppendDataBlob} = require('./datablob'); | ||
const {SchemaIntegrityCheckError} = require('./customerrors'); | ||
@@ -74,3 +73,3 @@ /** | ||
this.schemaVersion = options.schemaVersion? options.schemaVersion : 1; | ||
this.schema.id = this._getSchemaId(this.schemaVersion); | ||
this.schema.$id = this._getSchemaId(this.schemaVersion); | ||
@@ -83,2 +82,3 @@ this.validator = Ajv({ | ||
}); | ||
this.validator.addMetaSchema(require('ajv/lib/refs/json-schema-draft-06.json')); | ||
@@ -125,3 +125,3 @@ this.updateRetries = options.updateRetries || 10; | ||
if (error.code !== 'AuthorizationPermissionMismatch') { | ||
rethrowDebug(`Failed to save the json schema '${this.schema.id}' with error: ${error}`, error); | ||
rethrowDebug(`Failed to save the json schema '${this.schema.$id}' with error: ${error}`, error); | ||
} | ||
@@ -147,3 +147,3 @@ } | ||
} | ||
rethrowDebug(`Failed to load the json schema '${this.schema.id}' with error: ${error}`, error); | ||
rethrowDebug(`Failed to load the json schema '${this.schema.$id}' with error: ${error}`, error); | ||
} | ||
@@ -182,6 +182,11 @@ | ||
let schema = JSON.parse(schemaBlob.content); | ||
// upgrade to a v6 schema | ||
if (schema.id && !schema.$id) { | ||
schema.$id = schema.id; | ||
delete schema.id; | ||
} | ||
// cache the ajv validate function | ||
this._validateFunctionMap[schemaVersion] = this.validator.compile(schema); | ||
} catch (error) { | ||
rethrowDebug(`Failed to save the json schema '${this.schema.id}' with error: ${error}`, error); | ||
rethrowDebug(`Failed to save the json schema '${this.schema.$id}' with error: ${error}`, error); | ||
} | ||
@@ -188,0 +193,0 @@ } |
@@ -1,2 +0,2 @@ | ||
import _debug from 'debug'; | ||
const _debug = require('debug'); | ||
const debug = _debug('azure-blob-storage:utils'); | ||
@@ -27,2 +27,2 @@ | ||
return delay; | ||
}; | ||
}; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Copyleft License
License(Experimental) Copyleft license information was found.
Found 1 instance in 1 package
Non-permissive License
License(Experimental) A license not known to be considered permissive was found.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5
4
58803
9
2
70
809
1
+ Addedlodash@^4.17.11
+ Addedajv@6.12.6(transitive)
+ Addedfast-deep-equal@3.1.3(transitive)
+ Addedjson-schema-traverse@0.4.1(transitive)
+ Addedlodash@4.17.21(transitive)
+ Addedpunycode@2.3.1(transitive)
+ Addeduri-js@4.4.1(transitive)
- Removedbabel-runtime@^6.20.0
- Removedsource-map-support@^0.5.0
- Removedajv@5.5.2(transitive)
- Removedbabel-runtime@6.26.0(transitive)
- Removedbuffer-from@1.1.2(transitive)
- Removedco@4.6.0(transitive)
- Removedcore-js@2.6.12(transitive)
- Removedfast-deep-equal@1.1.0(transitive)
- Removedjson-schema-traverse@0.3.1(transitive)
- Removedregenerator-runtime@0.11.1(transitive)
- Removedsource-map@0.6.1(transitive)
- Removedsource-map-support@0.5.21(transitive)
Updatedajv@^6.9.2
Updateddebug@^4.1.1
Updatedfast-azure-storage@^2.3.1
Updateduuid@^3.3.2