Comparing version 1.9.3 to 2.0.0
@@ -73,2 +73,17 @@ { | ||
"type": "node", | ||
"request": "launch", | ||
"protocol": "auto", | ||
"name": "Launch Table only", | ||
"program": "${workspaceRoot}/bin/table", | ||
"cwd": "${workspaceRoot}", | ||
"args": [ | ||
"-l", | ||
"${workspaceRoot}/azurite-testdrive" | ||
], | ||
"skipFiles": [ | ||
"node_modules/**/*.js" | ||
] | ||
}, | ||
{ | ||
"type": "node", | ||
"request": "attach", | ||
@@ -75,0 +90,0 @@ "name": "Attach to Process", |
@@ -33,3 +33,3 @@ 'use strict'; | ||
.then(() => { | ||
return storageManager.init(env.localStoragePath) | ||
return storageManager.init() | ||
}) | ||
@@ -36,0 +36,0 @@ .then(() => { |
@@ -35,5 +35,5 @@ 'use strict'; | ||
init(localStoragePath) { | ||
this.db = BbPromise.promisifyAll(new Loki(env.azuriteDBPath, { autosave: true, autosaveInterval: 5000 })); | ||
return fsn.statAsync(env.azuriteDBPath) | ||
init() { | ||
this.db = BbPromise.promisifyAll(new Loki(env.azuriteDBPathBlob, { autosave: true, autosaveInterval: 5000 })); | ||
return fsn.statAsync(env.azuriteDBPathBlob) | ||
.then((stat) => { | ||
@@ -59,3 +59,3 @@ return this.db.loadDatabaseAsync({}); | ||
// This should never happen! | ||
console.error(`Failed to initialize database at "${env.azuriteDBPath}"`); | ||
console.error(`Failed to initialize database at "${env.azuriteDBPathBlob}"`); | ||
throw e; | ||
@@ -62,0 +62,0 @@ }); |
@@ -30,2 +30,6 @@ 'use strict'; | ||
console.log(chalk.cyan(`Azure Queue Storage Emulator listening on port ${env.queueStoragePort}`)); | ||
} | ||
exports.tableStorageStatus = () => { | ||
console.log(chalk.cyan(`Azure Table Storage Emulator listening on port ${env.tableStoragePort}`)); | ||
} |
@@ -10,2 +10,6 @@ 'use strict'; | ||
const TableStorageTables = { | ||
Tables: 'Tables' | ||
} | ||
const StorageEntityType = { | ||
@@ -103,2 +107,5 @@ Container: 'Container', | ||
GET_QUEUE_ACL: 'GetQueueAcl' | ||
}, | ||
Table: { | ||
CREATE_TABLE: 'CreateTable' | ||
} | ||
@@ -140,2 +147,8 @@ } | ||
const ODataMode = { | ||
NONE: 'nometadata', | ||
MINIMAL: 'minimalmetadata', | ||
FULL: 'fullmetadata' | ||
} | ||
module.exports = { | ||
@@ -151,3 +164,5 @@ StorageTables: StorageTables, | ||
ServiceSAS: ServiceSAS, | ||
Keys: Keys | ||
Keys: Keys, | ||
ODataMode: ODataMode, | ||
TableStorageTables: TableStorageTables | ||
} |
@@ -23,11 +23,15 @@ 'use strict'; | ||
this.silent = options.s || options.silent; | ||
this.dbName = '__azurite_db__.json'; | ||
this.dbNameBlob = '__azurite_db_blob__.json'; | ||
this.dbNameTable = '__azurite_db_table__.json'; | ||
this.localStoragePath = path.join(this.azuriteWorkspacePath, '__blobstorage__'); | ||
this.azuriteDBPath = path.join(this.azuriteWorkspacePath, this.dbName); | ||
this.azuriteDBPathBlob = path.join(this.azuriteWorkspacePath, this.dbNameBlob); | ||
this.azuriteDBPathTable = path.join(this.azuriteWorkspacePath, this.dbNameTable); | ||
this.emulatedStorageAccountName = 'devstoreaccount1'; | ||
this.blobStoragePort = options.p || options.blobPort || 10000; | ||
this.queueStoragePort = options.q || options.queuebPort || 10001; | ||
this.queueStoragePort = options.q || options.queuePort || 10001; | ||
this.tableStoragePort = options.t || options.tablePort || 10002; | ||
this.blobModulePath = path.join(this.azuriteRootPath, 'bin', 'blob'); | ||
this.queueModulePath = path.join(this.azuriteRootPath, 'bin', 'queue'); | ||
return fs.mkdirsAsync(this.localStoragePath) | ||
this.tableModulePath = path.join(this.azuriteRootPath, 'bin', 'table'); | ||
return fs.mkdirsAsync(this.localStoragePath); | ||
} | ||
@@ -34,0 +38,0 @@ |
@@ -69,3 +69,7 @@ 'use strict'; | ||
MessageNotFound: new ErrorCode('MessageNotFound', 404, 'The specified message does not exist.'), | ||
PopReceiptMismatch: new ErrorCode('PopReceiptMismatch', 400, 'The specified pop receipt did not match the pop receipt for a dequeued message.') | ||
PopReceiptMismatch: new ErrorCode('PopReceiptMismatch', 400, 'The specified pop receipt did not match the pop receipt for a dequeued message.'), | ||
// TABLE | ||
AtomXmlNotSupported: new ErrorCode('Atom+XmlNotSupported', 501, 'Atom feed is currently not supported by Azurite.'), | ||
TableAlreadyExists: new ErrorCode('TableAlreadyExists', 409, 'The table specified already exists.') | ||
} |
@@ -74,2 +74,7 @@ 'use strict'; | ||
// Table specific | ||
PREFERENCE_APPLIED: 'preference-applied', | ||
PREFER: 'prefer', | ||
ACCEPT: 'accept', | ||
VERSION: 'x-ms-version', | ||
@@ -76,0 +81,0 @@ DATE: 'date', |
@@ -70,8 +70,7 @@ 'use strict'; | ||
} | ||
let source = this.httpProps[N.COPY_SOURCE]; | ||
if (/http:\/\/(127.0.0.1|localhost):10000\/devstoreaccount1\//.test(source)) { | ||
source = source.replace(/http:\/\/(127.0.0.1|localhost):10000\/devstoreaccount1\//, ''); | ||
} else { // format: /accountName/containerName/blobName | ||
// TODO | ||
const match = /devstoreaccount1\/(.*)/.exec(this.httpProps[N.COPY_SOURCE]); | ||
if (match === null) { | ||
throw new InternalAzuriteError(`Request: x-ms-copy-source was not in the expected format (was "${this.httpProps[N.COPY_SOURCE]}".`); | ||
} | ||
const source = match[1]; | ||
const pathname = url.parse(source).pathname; | ||
@@ -85,5 +84,5 @@ const parts = pathname.split('/'), | ||
const regex = /snapshot=([^&]*)/; | ||
const match = regex.exec(query); | ||
if (match !== null) { | ||
const dateStr = match[1]; | ||
const ssMatch = regex.exec(query); | ||
if (ssMatch !== null) { | ||
const dateStr = ssMatch[1]; | ||
date = new Date(decodeURIComponent(dateStr)).toUTCString(); | ||
@@ -90,0 +89,0 @@ } |
{ | ||
"name": "azurite", | ||
"version": "1.9.3", | ||
"version": "2.0.0", | ||
"description": "A lightweight server clone of Azure Blob Storage that simulates most of the commands supported by it with minimal dependencies.", | ||
@@ -5,0 +5,0 @@ "scripts": { |
@@ -158,1 +158,16 @@ # Azurite | ||
All DONE. | ||
## Table Storage - API Implementation Status | ||
ALL DONE except: | ||
- Delete Table [TODO] | ||
- Insert Entity [TODO] | ||
- Query Entity [TODO] | ||
- Query Tables [TODO] | ||
- Get Table ACL [TODO] | ||
- Set Table ACL [TODO] | ||
- Update Entity [TODO] | ||
- Merge Entity [TODO] | ||
- Delete Entity [TODO] | ||
- Insert or Replace Entity [TODO] | ||
- Insert or Merge Entity [TODO] |
@@ -0,1 +1,7 @@ | ||
# 2.0 | ||
## 2.0.0 | ||
- Initial support for Table Storage: | ||
- technical base work [#141](https://github.com/arafato/azurite/issues/141) | ||
- Support for CreateTable [#129](https://github.com/arafato/azurite/issues/129) | ||
- fixes [#157](https://github.com/arafato/azurite/issues/157): Blob Storage Bugfix in CopyBlob (again) | ||
# 1.0 | ||
@@ -2,0 +8,0 @@ ## 1.9.3 |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
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
364257
167
7110
172
12