Permalink
Browse files

Fixed all code style errors (jscs).

  • Loading branch information...
marcominetti committed Oct 14, 2015
1 parent 1eb43e0 commit 272946bc84d93d5ba5ad148a1b66cf2c8e3f3c11
Showing with 3,982 additions and 3,644 deletions.
  1. +13 −13 core/accounts/init.server.js
  2. +104 −76 core/bootstrap.server.js
  3. +19 −19 core/cluster/_protocols.snippet.server.js
  4. +128 −98 core/cluster/bootstrap.server.js
  5. +57 −26 core/cluster/cluster.server.js
  6. +146 −124 core/cluster/events/remote.server.js
  7. +154 −144 core/cluster/ipc.server.js
  8. +78 −76 core/cluster/kernel/kernel.server.js
  9. +20 −14 core/cluster/kernel/preprocess.server.js
  10. +22 −18 core/cluster/protocols.server.js
  11. +68 −68 core/cluster/runtime/protocol.server.js
  12. +87 −87 core/cluster/runtime/runtime.server.js
  13. +33 −33 core/cluster/statistics/stat.server.js
  14. +7 −7 core/cluster/system/cpu.server.js
  15. +15 −14 core/cluster/system/memory.server.js
  16. +7 −7 core/cluster/system/uv.server.js
  17. +1 −1 core/config/accounts.server.js
  18. +1 −1 core/config/app.server.js
  19. +1 −1 core/config/bootstrap/cluster.server.js
  20. +1 −1 core/config/bootstrap/core.server.js
  21. +1 −1 core/config/cache.server.js
  22. +1 −1 core/config/cluster.server.js
  23. +1 −1 core/config/debug.server.js
  24. +1 −1 core/config/development.server.js
  25. +49 −7 core/config/http.server.js
  26. +1 −1 core/config/kernel.server.js
  27. +1 −1 core/config/mail.server.js
  28. +1 −1 core/config/module.server.js
  29. +2 −2 core/config/system.server.js
  30. +13 −12 core/database/database.server.js
  31. +20 −16 core/development/ide.server.js
  32. +36 −30 core/development/inspector.server.js
  33. +25 −22 core/development/live.server.js
  34. +33 −26 core/development/terminal.server.js
  35. +2 −2 core/environment/startup.server.js
  36. +98 −85 core/events/event.server.js
  37. +10 −6 core/exec.server.js
  38. +48 −47 core/http/context.server.js
  39. +26 −21 core/http/engine.server.js
  40. +5 −5 core/http/engine/auth.server.js
  41. +7 −5 core/http/engine/send.server.js
  42. +119 −96 core/http/http.server.js
  43. +4 −4 core/http/parsers/form.server.js
  44. +8 −8 core/http/parsers/html.server.js
  45. +4 −4 core/http/parsers/json.server.js
  46. +5 −5 core/http/parsers/multipart.server.js
  47. +4 −4 core/http/parsers/plain.server.js
  48. +7 −7 core/http/parsers/xml.server.js
  49. +104 −99 core/io/backend/disk.server.js
  50. +158 −155 core/io/cache.server.js
  51. +211 −205 core/io/io.server.js
  52. +33 −23 core/io/store.server.js
  53. +235 −225 core/kernel/array.server.js
  54. +17 −15 core/kernel/classes.server.js
  55. +47 −44 core/kernel/kernel.server.js
  56. +40 −36 core/kernel/object.server.js
  57. +28 −20 core/kernel/preprocess.server.js
  58. +19 −5 core/kernel/preprocessors/_empty.server.js
  59. +11 −6 core/kernel/preprocessors/code.breakpoint.server.js
  60. +32 −18 core/kernel/preprocessors/code.leveling.server.js
  61. +67 −62 core/kernel/preprocessors/code.profiling.server.js
  62. +2 −2 core/kernel/preprocessors/code_leveling/runlevel.define.code.js
  63. +2 −2 core/kernel/preprocessors/code_leveling/runlevel.init.code.js
  64. +360 −357 core/kernel/preprocessors/exception.dump.server.js
  65. +11 −6 core/kernel/preprocessors/function.logging.server.js
  66. +15 −11 core/kernel/preprocessors/function.reflection.server.js
  67. +4 −4 core/kernel/preprocessors/node.naming.server.js
  68. +16 −9 core/kernel/preprocessors/runtime.define.server.js
  69. +20 −12 core/kernel/preprocessors/runtime.lock.server.js
  70. +27 −31 core/main.server.js
  71. +7 −7 core/main/_.build.cluster.server.js
  72. +8 −9 core/main/_.build.core.server.js
  73. +10 −10 core/main/_.clean.server.js
  74. +5 −3 core/main/_.coverage.server.js
  75. +54 −53 core/main/_.dist.cluster.server.js
  76. +20 −20 core/main/_.dist.core.server.js
  77. +11 −9 core/main/_.test.server.js
  78. +27 −26 core/main/create.server.js
  79. +13 −10 core/main/help.server.js
  80. +22 −21 core/main/install.server.js
  81. +23 −20 core/main/legal.server.js
  82. +7 −5 core/main/logo.server.js
  83. +44 −41 core/main/run.cluster.server.js
  84. +49 −46 core/main/run.core.server.js
  85. +24 −134 core/main/update.server.js
  86. +12 −11 core/main/version.server.js
  87. +37 −34 core/messaging/mail/mail.server.js
  88. +167 −151 core/native.server.js
  89. +79 −69 core/parser/js.server.js
  90. +28 −19 core/polyfill.server.js
  91. +9 −9 core/resume.server.js
  92. +89 −86 core/runtime/runtime.server.js
  93. +1 −1 core/skel/default/app/main.server.js
  94. +1 −2 core/skel/default/config/app.server.js
  95. +34 −36 core/statistics/stat.server.js
  96. +26 −21 core/system/cpu.server.js
  97. +31 −22 core/system/memory.server.js
  98. +34 −37 core/system/npm.server.js
  99. +14 −12 core/system/uv.server.js
  100. +9 −8 core/utility/function.server.js
  101. +41 −31 core/utility/hash.server.js
  102. +48 −46 core/utility/json.server.js
  103. +11 −11 core/utility/recursive.server.js
  104. +12 −11 gruntfile.js
  105. +1 −1 main.readme.js
  106. +13 −8 main.server.js
  107. +5 −5 test/bootstrap.js
  108. +3 −3 test/coverage.js
@@ -20,41 +20,41 @@
platform.accounts = platform.accounts || {};
platform.accounts._init = async function(){
platform.accounts._init = async function() {
var database = platform.database.get('accounts');
database.createModel('Users', {
'uid': { 'type': Number, 'generated': true, 'id': true },
'uid': {'type': Number, 'generated': true, 'id': true},
'name': String,
'hashpassword': String,
'httppassword': String,
'enable': { 'type': Boolean, 'default': true }
'enable': {'type': Boolean, 'default': true}
});
await database.autoupdate('Users');
database.createModel('Groups', {
'gid': { 'type': Number, 'generated': true, 'id': true },
'gid': {'type': Number, 'generated': true, 'id': true},
'name': String,
'priority': Number,
'enable': { 'type': Boolean, 'default': true }
'enable': {'type': Boolean, 'default': true}
});
await database.autoupdate('Groups');
database.createModel('Identities', {
'iid': { 'type': Number, 'generated': true, 'id': true },
'iid': {'type': Number, 'generated': true, 'id': true},
'type': String,
'tid': Number
});
await database.autoupdate('Identities');
var defaultGroups = [ 'everyone', 'anonymous', 'services', 'developers', 'administrators', 'sudoers' ];
var defaultGroupsPriorities = [ 1, 2, 1001, 1002, 1003, 1004 ];
await defaultGroups.forEachAwaitSeries(async function(group, index){
var defaultGroups = ['everyone', 'anonymous', 'services', 'developers', 'administrators', 'sudoers'];
var defaultGroupsPriorities = [1, 2, 1001, 1002, 1003, 1004];
await defaultGroups.forEachAwaitSeries(async function(group, index) {
await database.models.Groups.findOrCreate({
'where': { 'name': group }
},{
'where': {'name': group}
}, {
'name': group,
'priority': defaultGroupsPriorities[index]
});
});
};
platform.events.attach('core.ready','accounts.init', async function() {
platform.events.attach('core.ready', 'accounts.init', async function() {
await platform.accounts._init();
});
});
View

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -1,21 +1,21 @@
platform.x = function(destinations,optional,callback){
platform.x = function(destinations, optional, callback) {
// normalizing arguments
if (callback == null && typeof optional === 'function'){
if (callback == null && typeof optional === 'function') {
callback = optional;
optional = null;
}
callback = native.util.makeHybridCallbackPromise(callback);
//TODO: serialize args?
platform.cluster.ipc.sendAwait(destinations,'protocol.x',{
platform.cluster.ipc.sendAwait(destinations, 'protocol.x', {
'x': optional
}).then(callback.resolve,callback.reject);
}).then(callback.resolve, callback.reject);
return callback.promise;
};
platform.cluster.ipc.protocols.register('protocol.x',function(client,data,callback){
platform.cluster.ipc.protocols.register('protocol.x', function(client, data, callback) {
// packet specification
// {}.x: optional value
@@ -25,40 +25,40 @@ platform.cluster.ipc.protocols.register('protocol.x',function(client,data,callba
} else {
//TODO: we're in broadcast mode
}
} catch(error) {
} catch (error) {
if (callback != null) {
callback(err);
} else {
throw error
throw error;
}
}
},true);
}, true);
platform.cluster.ipc.protocols.register('protocol.sync', function(client,data){
platform.cluster.ipc.protocols.register('protocol.sync', function(client, data) {
// packet specification
// {}.x: optional value
//throw new Error();
//do();
},true);
}, true);
platform.cluster.ipc.protocols.register('protocol.promise', function(client,data){
platform.cluster.ipc.protocols.register('protocol.promise', function(client, data) {
// packet specification
// {}.x: optional value
//throw new Error();
//do();
return new Promise(function(resolve,reject){
return new Promise(function(resolve, reject) {
});
},true);
}, true);
platform.cluster.ipc.protocols.register('protocol.async', async function(client,data){
platform.cluster.ipc.protocols.register('protocol.async', async function(client, data) {
// packet specification
// {}.x: optional value
@@ -68,9 +68,9 @@ platform.cluster.ipc.protocols.register('protocol.async', async function(client,
//await do();
},true);
}, true);
platform.cluster.ipc.protocols.register('protocol.duplex',function(client,data,callback){
platform.cluster.ipc.protocols.register('protocol.duplex', function(client, data, callback) {
// packet specification
// {}.x: optional value
@@ -80,11 +80,11 @@ platform.cluster.ipc.protocols.register('protocol.duplex',function(client,data,c
} else {
//TODO: we're in broadcast mode
}
} catch(error) {
} catch (error) {
if (callback != null) {
callback(err);
} else {
throw error
throw error;
}
}
},true);
}, true);
Oops, something went wrong.

0 comments on commit 272946b

Please sign in to comment.