This commit is contained in:
jiacfan 2017-08-30 21:26:15 +08:00 коммит произвёл Vincent Jiang (LEI)
Родитель afc3066fc2
Коммит 9055147047
11 изменённых файлов: 1874 добавлений и 1731 удалений

Просмотреть файл

@ -1,6 +1,11 @@
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.
2017.09 Version 2.5.0
FILE
* Added support for File metrics.
2017.08 Version 2.4.0
ALL
@ -88,7 +93,7 @@ ALL
BLOB
* Added support for large block blob.
* Added `publicAccessLevel` to `ContainerResult` for the APIs `listContainersSegmented` and `listContainersSegmentedWithPrefix`.
* When specifiying access condition `If-None-Match: *` for reading, it will always fail.
* When specifying access condition `If-None-Match: *` for reading, it will always fail.
* Returned content MD5 for range gets Blobs.
* Fixed the issue that `useTransactionalMD5` didn't take effect for downloading a big blob.

Просмотреть файл

@ -37,7 +37,7 @@ var Constants = {
* @const
* @type {string}
*/
USER_AGENT_PRODUCT_VERSION: '2.4.0',
USER_AGENT_PRODUCT_VERSION: '2.5.0',
/**
* The number of default concurrent requests for parallel operation.

Просмотреть файл

@ -334,11 +334,11 @@ exports.tableNameIsValid = function (table, callback) {
return fail(new ArgumentError('table', 'Table name must be between 3 and 63 characters long.'));
}
if(table.toLowerCase() == 'tables') {
if(table.toLowerCase() === 'tables') {
return fail(new RangeError('Table name cannot be \'Tables\'.'));
}
if (table.match(/^([A-Za-z][A-Za-z0-9]{2,62})$/) !== null || table === '$MetricsCapacityBlob' || table.match(/^(\$Metrics(HourPrimary|MinutePrimary|HourSecondary|MinuteSecondary)?(Transactions)(Blob|Queue|Table))$/) !== null)
if (table.match(/^([A-Za-z][A-Za-z0-9]{2,62})$/) !== null || table === '$MetricsCapacityBlob' || table.match(/^(\$Metrics(HourPrimary|MinutePrimary|HourSecondary|MinuteSecondary)?(Transactions)(Blob|Queue|Table|File))$/) !== null)
{
callback();
return true;

Просмотреть файл

@ -1264,7 +1264,7 @@ TableService.prototype._doesTableExist = function (table, primaryOnly, optionsOr
};
/**
* Peforms a table operation.
* Performs a table operation.
*
* @this {TableService}
* @param {string} operation The operation to perform.

Просмотреть файл

@ -1,7 +1,7 @@
{
"name": "azure-storage",
"author": "Microsoft Corporation",
"version": "2.4.0",
"version": "2.5.0",
"description": "Microsoft Azure Storage Client Library for Node.js",
"typings": "typings/azure-storage/azure-storage.d.ts",
"tags": [

Просмотреть файл

@ -91,7 +91,7 @@ var getPolicyWithFullPermissions = function(){
function defaultServiceProperties(serviceType){
var serviceProperties = {};
if (serviceType != ServiceTypes.File) {
if (serviceType !== ServiceTypes.File) {
serviceProperties.Logging = {};
serviceProperties.Logging.Version = '1.0';
serviceProperties.Logging.Delete = true;
@ -132,7 +132,7 @@ function defaultServiceProperties(serviceType){
}
return serviceProperties;
};
}
function writeFile(fileName, content) {
fs.writeFileSync(fileName, content);
@ -338,12 +338,12 @@ var runBlobsPermissionTests = function(sharedAccessPolicy, next){
testDeleteBlob(function(){
testDeleteContainer(function(){
next();
})
})
})
})
})
})
});
});
});
});
});
});
});
};
@ -433,7 +433,7 @@ var runTablesPermissionTests = function(sharedAccessPolicy, next){
});
} else {
sharedTableService.setServiceProperties(serviceProperties, function (error) {
assert.notEqual(error, null, 'Setting table service properites should fail with SAS without Write and Service-level permissions.');
assert.notEqual(error, null, 'Setting table service properties should fail with SAS without Write and Service-level permissions.');
tableService.setServiceProperties(serviceProperties, function (error) {
if(error) {

Просмотреть файл

@ -226,15 +226,19 @@ describe('validator-tests', function () {
Validate.tableNameIsValid('$MetricsHourPrimaryTransactionsBlob').should.equal(true);
Validate.tableNameIsValid('$MetricsHourPrimaryTransactionsQueue').should.equal(true);
Validate.tableNameIsValid('$MetricsHourPrimaryTransactionsTable').should.equal(true);
Validate.tableNameIsValid('$MetricsHourPrimaryTransactionsFile').should.equal(true);
Validate.tableNameIsValid('$MetricsMinutePrimaryTransactionsBlob').should.equal(true);
Validate.tableNameIsValid('$MetricsMinutePrimaryTransactionsQueue').should.equal(true);
Validate.tableNameIsValid('$MetricsMinutePrimaryTransactionsTable').should.equal(true);
Validate.tableNameIsValid('$MetricsMinutePrimaryTransactionsFile').should.equal(true);
Validate.tableNameIsValid('$MetricsHourSecondaryTransactionsBlob').should.equal(true);
Validate.tableNameIsValid('$MetricsHourSecondaryTransactionsQueue').should.equal(true);
Validate.tableNameIsValid('$MetricsHourSecondaryTransactionsTable').should.equal(true);
Validate.tableNameIsValid('$MetricsHourSecondaryTransactionsFile').should.equal(true);
Validate.tableNameIsValid('$MetricsMinuteSecondaryTransactionsBlob').should.equal(true);
Validate.tableNameIsValid('$MetricsMinuteSecondaryTransactionsQueue').should.equal(true);
Validate.tableNameIsValid('$MetricsMinuteSecondaryTransactionsTable').should.equal(true);
Validate.tableNameIsValid('$MetricsMinuteSecondaryTransactionsFile').should.equal(true);
assert.throws(
function() {
Validate.tableNameIsValid('');

Просмотреть файл

@ -14,15 +14,20 @@ function q(value) {
exports.setEnvironment = function() {
<% requiredEnvironment.forEach(function (e) {
var value;
if (e.secure && typeof e.secure === 'function') {
value = q(e.secure(process.env[e.name]));
} else if (e.secure) {
value = q('dummy');
} else {
value = q(process.env[e.name]);
}
if (e.optional === false || process.env[e.name] !== undefined)
{
if (e.secure && typeof e.secure === 'function') {
value = q(e.secure(process.env[e.name]));
} else if (e.secure) {
value = q('dummy');
} else {
value = q(process.env[e.name]);
}
%> process.env[<%= q(e.name) %>] = <%= value %>;
<% });
<%
}
});
%>}
exports.scopes = [

Просмотреть файл

@ -265,7 +265,8 @@ _.extend(TestSuite.prototype, {
writeRecordingHeader: function () {
var template = fs.readFileSync(path.join(__dirname, 'preamble.template'), { encoding: 'utf8' });
fs.writeFileSync(this.recordingsFile, _.template(template, {
var compiled = _.template(template);
fs.writeFileSync(this.recordingsFile, compiled({
requiredEnvironment: this.requiredEnvironment
}));
},

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -137,7 +137,7 @@ describe('tableservice-tests', function () {
var service = azure.createTableService(storageAccount, storageAccountKey, 'https://account.table.core.windows.net');
assert.equal(service.host.primaryHost, 'https://account.table.core.windows.net:443/');
var service = azure.createTableService(storageAccount, storageAccountKey, 'https://account.table.core.windows.net:21');
service = azure.createTableService(storageAccount, storageAccountKey, 'https://account.table.core.windows.net:21');
assert.equal(service.host.primaryHost, 'https://account.table.core.windows.net:21/');
service = azure.createTableService(storageAccount, storageAccountKey, 'http://account.table.core.windows.net');
@ -151,15 +151,19 @@ describe('tableservice-tests', function () {
describe('doesTableExist', function () {
it('should work', function (done) {
assert.doesNotThrow(function () {
tableService.doesTableExist('$MetricsMinutePrimaryTransactionsBlob', function () {
assert.doesNotThrow(function () {
tableService.doesTableExist('$MetricsTransactionsTable', function () {
done();
});
});
});
});
assert.doesNotThrow(function () {
tableService.doesTableExist('$MetricsMinutePrimaryTransactionsBlob', function () {
assert.doesNotThrow(function () {
tableService.doesTableExist('$MetricsHourPrimaryTransactionsFile', function () {
assert.doesNotThrow(function () {
tableService.doesTableExist('$MetricsTransactionsTable', function () {
done();
});
});
});
});
});
});
});
});