-
Notifications
You must be signed in to change notification settings - Fork 319
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
now everything is pretty, but still needs some refactoring
- Loading branch information
Edwin Huber
committed
Aug 30, 2018
1 parent
b1348ad
commit 4524b3b
Showing
179 changed files
with
9,481 additions
and
7,543 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
{ | ||
"esversion": 6, | ||
"bitwise": true, | ||
"curly": false, | ||
"eqeqeq": false, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
{ | ||
"printWidth": 80, | ||
"parser": "typescript", | ||
"parser": "flow", | ||
"arrowParens" : "always", | ||
"tabWidth": 2, | ||
"useTabs":false, | ||
"semi":true, | ||
"singleQuote": false, | ||
"trailingComma": "es5", | ||
"bracketSpacing": true, | ||
"requirePragma": true, | ||
"requirePragma": false, | ||
"insertPragma": true, | ||
"proseWrap": "never" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,59 +1,67 @@ | ||
#!/usr/bin/env node | ||
|
||
'use strict'; | ||
"use strict"; | ||
|
||
const BbPromise = require('bluebird'); | ||
const BbPromise = require("bluebird"); | ||
|
||
process.on('unhandledRejection', (e) => { | ||
console.error('**PANIC** Something unexpected happened! Emulator may be in an inconsistent state!'); | ||
console.error(e); | ||
process.on("unhandledRejection", (e) => { | ||
console.error( | ||
"**PANIC** Something unexpected happened! Emulator may be in an inconsistent state!" | ||
); | ||
console.error(e); | ||
}); | ||
process.noDeprecation = true; | ||
|
||
(() => BbPromise.resolve().then(() => { | ||
// requiring here so that if anything went wrong, | ||
// during require, it will be caught. | ||
const argv = require('minimist')(process.argv.slice(2)), | ||
env = require('./../lib/core/env'), | ||
cli = require('./../lib/core/cli'); | ||
(() => | ||
BbPromise.resolve() | ||
.then(() => { | ||
// requiring here so that if anything went wrong, | ||
// during require, it will be caught. | ||
const argv = require("minimist")(process.argv.slice(2)), | ||
env = require("./../lib/core/env"), | ||
cli = require("./../lib/core/cli"); | ||
|
||
return env.init(argv) | ||
return env | ||
.init(argv) | ||
.then(() => { | ||
if (!env.silent) { | ||
cli.asciiGreeting(); | ||
} | ||
if (!env.silent) { | ||
cli.asciiGreeting(); | ||
} | ||
}) | ||
.then(() => { | ||
// Forking individual modules to spread them across different cores if possible | ||
// and restarting them automatically in case of a crash. | ||
const fork = require('child_process').fork; | ||
|
||
(function forkBlobModule(code, signal) { | ||
const mod = fork(env.blobModulePath, process.argv); | ||
mod.on('exit', forkBlobModule); | ||
})(); | ||
(function forkQueueModule(code, signal) { | ||
const mod = fork(env.queueModulePath, process.argv); | ||
mod.on('exit', forkQueueModule); | ||
})(); | ||
(function forkTableModule(code, signal) { | ||
const mod = fork(env.tableModulePath, process.argv); | ||
mod.on('exit', forkTableModule); | ||
})(); | ||
// Forking individual modules to spread them across different cores if possible | ||
// and restarting them automatically in case of a crash. | ||
const fork = require("child_process").fork; | ||
|
||
(function forkBlobModule(code, signal) { | ||
const mod = fork(env.blobModulePath, process.argv); | ||
mod.on("exit", forkBlobModule); | ||
})(); | ||
(function forkQueueModule(code, signal) { | ||
const mod = fork(env.queueModulePath, process.argv); | ||
mod.on("exit", forkQueueModule); | ||
})(); | ||
(function forkTableModule(code, signal) { | ||
const mod = fork(env.tableModulePath, process.argv); | ||
mod.on("exit", forkTableModule); | ||
})(); | ||
}); | ||
}).catch(e => { | ||
process.exitCode = 1; | ||
console.error(e); | ||
}))(); | ||
}) | ||
.catch((e) => { | ||
process.exitCode = 1; | ||
console.error(e); | ||
}))(); | ||
|
||
// If this is a child process (e.g. forked by NPM through '$ npm start') we are propagating the signals from the | ||
// If this is a child process (e.g. forked by NPM through '$ npm start') we are propagating the signals from the | ||
// parent (i.e. NPM) to exit from this process and its child processes. | ||
process.on('SIGINT', () => { // e.g. STRG+C | ||
process.exitCode = 1; | ||
process.exit(); | ||
process.on("SIGINT", () => { | ||
// e.g. STRG+C | ||
process.exitCode = 1; | ||
process.exit(); | ||
}); | ||
|
||
process.on('SIGTERM', () => { // e.g. end process from taskmanager | ||
process.exitCode = 1; | ||
process.exit(); | ||
}); | ||
process.on("SIGTERM", () => { | ||
// e.g. end process from taskmanager | ||
process.exitCode = 1; | ||
process.exit(); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,28 @@ | ||
#!/usr/bin/env node | ||
|
||
'use strict'; | ||
"use strict"; | ||
|
||
const BbPromise = require('bluebird'); | ||
const BbPromise = require("bluebird"); | ||
|
||
process.on('unhandledRejection', (e) => { | ||
console.error('**PANIC** Something unexpected happened! Blob Storage Emulator may be in an inconsistent state!'); | ||
console.error(e); | ||
process.on("unhandledRejection", (e) => { | ||
console.error( | ||
"**PANIC** Something unexpected happened! Blob Storage Emulator may be in an inconsistent state!" | ||
); | ||
console.error(e); | ||
}); | ||
process.noDeprecation = true; | ||
|
||
(() => BbPromise.resolve().then(() => { | ||
// requiring here so that if anything went wrong, | ||
// during require, it will be caught. | ||
const argv = require('minimist')(process.argv.slice(2)); | ||
const A = require('../lib/AzuriteBlob'), | ||
azurite = new A(); | ||
azurite.init(argv); | ||
}).catch(e => { | ||
process.exitCode = 1; | ||
console.error(e); | ||
}))(); | ||
(() => | ||
BbPromise.resolve() | ||
.then(() => { | ||
// requiring here so that if anything went wrong, | ||
// during require, it will be caught. | ||
const argv = require("minimist")(process.argv.slice(2)); | ||
const A = require("../lib/AzuriteBlob"), | ||
azurite = new A(); | ||
azurite.init(argv); | ||
}) | ||
.catch((e) => { | ||
process.exitCode = 1; | ||
console.error(e); | ||
}))(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,28 @@ | ||
#!/usr/bin/env node | ||
|
||
'use strict'; | ||
"use strict"; | ||
|
||
const BbPromise = require('bluebird'); | ||
const BbPromise = require("bluebird"); | ||
|
||
process.on('unhandledRejection', (e) => { | ||
console.error('**PANIC** Something unexpected happened! Queue Storage Emulator may be in an inconsistent state!'); | ||
console.error(e); | ||
process.on("unhandledRejection", (e) => { | ||
console.error( | ||
"**PANIC** Something unexpected happened! Queue Storage Emulator may be in an inconsistent state!" | ||
); | ||
console.error(e); | ||
}); | ||
process.noDeprecation = true; | ||
|
||
(() => BbPromise.resolve().then(() => { | ||
// requiring here so that if anything went wrong, | ||
// during require, it will be caught. | ||
const argv = require('minimist')(process.argv.slice(2)); | ||
const A = require('../lib/AzuriteQueue'), | ||
azurite = new A(); | ||
azurite.init(argv); | ||
}).catch(e => { | ||
process.exitCode = 1; | ||
console.error(e); | ||
}))(); | ||
(() => | ||
BbPromise.resolve() | ||
.then(() => { | ||
// requiring here so that if anything went wrong, | ||
// during require, it will be caught. | ||
const argv = require("minimist")(process.argv.slice(2)); | ||
const A = require("../lib/AzuriteQueue"), | ||
azurite = new A(); | ||
azurite.init(argv); | ||
}) | ||
.catch((e) => { | ||
process.exitCode = 1; | ||
console.error(e); | ||
}))(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,28 @@ | ||
#!/usr/bin/env node | ||
|
||
'use strict'; | ||
"use strict"; | ||
|
||
const BbPromise = require('bluebird'); | ||
const BbPromise = require("bluebird"); | ||
|
||
process.on('unhandledRejection', (e) => { | ||
console.error('**PANIC** Something unexpected happened! Table Storage Emulator may be in an inconsistent state!'); | ||
console.error(e); | ||
process.on("unhandledRejection", (e) => { | ||
console.error( | ||
"**PANIC** Something unexpected happened! Table Storage Emulator may be in an inconsistent state!" | ||
); | ||
console.error(e); | ||
}); | ||
process.noDeprecation = true; | ||
|
||
(() => BbPromise.resolve().then(() => { | ||
// requiring here so that if anything went wrong, | ||
// during require, it will be caught. | ||
const argv = require('minimist')(process.argv.slice(2)); | ||
const A = require('../lib/AzuriteTable'), | ||
azurite = new A(); | ||
azurite.init(argv); | ||
}).catch(e => { | ||
process.exitCode = 1; | ||
console.error(e); | ||
}))(); | ||
(() => | ||
BbPromise.resolve() | ||
.then(() => { | ||
// requiring here so that if anything went wrong, | ||
// during require, it will be caught. | ||
const argv = require("minimist")(process.argv.slice(2)); | ||
const A = require("../lib/AzuriteTable"), | ||
azurite = new A(); | ||
azurite.init(argv); | ||
}) | ||
.catch((e) => { | ||
process.exitCode = 1; | ||
console.error(e); | ||
}))(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.