mirror of https://gitee.com/bigwinds/arangodb
Strict mode all the things.
This commit is contained in:
parent
e8ba1a1332
commit
69e63c2c64
|
@ -4,10 +4,12 @@
|
||||||
"eqeqeq": true,
|
"eqeqeq": true,
|
||||||
"forin": true,
|
"forin": true,
|
||||||
"freeze": true,
|
"freeze": true,
|
||||||
|
"globalstrict": true,
|
||||||
"immed": true,
|
"immed": true,
|
||||||
"laxbreak": true,
|
"laxbreak": true,
|
||||||
"newcap": true,
|
"newcap": true,
|
||||||
"noarg": true,
|
"noarg": true,
|
||||||
|
"node": true,
|
||||||
"noempty": true,
|
"noempty": true,
|
||||||
"nonbsp": true,
|
"nonbsp": true,
|
||||||
"nonew": true,
|
"nonew": true,
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
/*jshint strict: false */
|
/*jshint strict: false */
|
||||||
/*global require */
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief administration actions
|
/// @brief administration actions
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
/*jshint strict: false */
|
/*jshint strict: false */
|
||||||
/*global require */
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief administration actions
|
/// @brief administration actions
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
/*jshint strict: false */
|
/*jshint strict: false */
|
||||||
/*global require */
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief administration actions
|
/// @brief administration actions
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*jshint strict: false */
|
/*jshint strict: false */
|
||||||
/*global require, ArangoServerState */
|
/*global ArangoServerState */
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief administration actions
|
/// @brief administration actions
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
/*jshint strict: false */
|
/*jshint strict: false */
|
||||||
/*global require */
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief administration actions
|
/// @brief administration actions
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
/*jshint strict: false */
|
/*jshint strict: false */
|
||||||
/*global require */
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief querying and managing collections
|
/// @brief querying and managing collections
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
/*jshint strict: false */
|
/*jshint strict: false */
|
||||||
/*global require */
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief foxx administration actions
|
/// @brief foxx administration actions
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
/*jshint strict: false */
|
/*jshint strict: false */
|
||||||
/*global require */
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief user management
|
/// @brief user management
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
/*jshint strict: false */
|
/*jshint strict: false */
|
||||||
/*global require */
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief AQL user functions management
|
/// @brief AQL user functions management
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*jshint strict: false, unused: false */
|
/*jshint strict: false, unused: false */
|
||||||
/*global require, AQL_EXECUTE, SYS_CLUSTER_TEST, UPGRADE_ARGS: true,
|
/*global AQL_EXECUTE, SYS_CLUSTER_TEST, UPGRADE_ARGS: true,
|
||||||
ArangoServerState, ArangoClusterComm, ArangoClusterInfo */
|
ArangoServerState, ArangoClusterComm, ArangoClusterInfo */
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
/*jshint strict: false */
|
/*jshint strict: false */
|
||||||
/*global require */
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief global configuration
|
/// @brief global configuration
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*jshint strict: false */
|
/*jshint strict: false */
|
||||||
/*global require, ArangoAgency */
|
/*global ArangoAgency */
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief database management
|
/// @brief database management
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
/*jshint strict: false */
|
/*jshint strict: false */
|
||||||
/*global require */
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief managing edges
|
/// @brief managing edges
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
/*jshint strict: false */
|
/*jshint strict: false */
|
||||||
/*global require */
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief endpoint management
|
/// @brief endpoint management
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*jshint strict: false */
|
/*jshint strict: false */
|
||||||
/*global require, AQL_EXPLAIN */
|
/*global AQL_EXPLAIN */
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief query explain actions
|
/// @brief query explain actions
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*jshint strict: false */
|
/*jshint strict: false */
|
||||||
/*global require, AQL_EXECUTE */
|
/*global AQL_EXECUTE */
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief graph api
|
/// @brief graph api
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
/*jshint strict: false */
|
/*jshint strict: false */
|
||||||
/*global require */
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief querying and managing indexes
|
/// @brief querying and managing indexes
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
/*jshint strict: false */
|
/*jshint strict: false */
|
||||||
/*global require */
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief open actions
|
/// @brief open actions
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*jshint strict: false */
|
/*jshint strict: false */
|
||||||
/*global require, CREATE_CURSOR */
|
/*global CREATE_CURSOR */
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief simple queries
|
/// @brief simple queries
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
/*jshint strict: false */
|
/*jshint strict: false */
|
||||||
/*global require */
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief querying and managing structures
|
/// @brief querying and managing structures
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
/*jshint strict: false */
|
/*jshint strict: false */
|
||||||
/*global require */
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief administration actions
|
/// @brief administration actions
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
/*jshint strict: false */
|
/*jshint strict: false */
|
||||||
/*global require */
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief querying and managing collections
|
/// @brief querying and managing collections
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*jshint strict: false */
|
/*jshint strict: false */
|
||||||
/*global require, TRANSACTION */
|
/*global TRANSACTION */
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief transaction actions
|
/// @brief transaction actions
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
/*jshint strict: false */
|
/*jshint strict: false */
|
||||||
/*global require */
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief traversal actions
|
/// @brief traversal actions
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*jshint globalstrict: true */
|
/*jshint globalstrict: true */
|
||||||
/*global require, applicationContext*/
|
/*global applicationContext*/
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief A Foxx.Controller to show all Foxx Applications
|
/// @brief A Foxx.Controller to show all Foxx Applications
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/*global require, applicationContext*/
|
/*global applicationContext*/
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief A Foxx.Controller to show all Foxx Applications
|
/// @brief A Foxx.Controller to show all Foxx Applications
|
||||||
|
|
|
@ -602,7 +602,7 @@ return returnVal;
|
||||||
});
|
});
|
||||||
}());
|
}());
|
||||||
|
|
||||||
/*global require, exports, Backbone, window */
|
/*global Backbone, window */
|
||||||
window.ClusterStatisticsCollection = Backbone.Collection.extend({
|
window.ClusterStatisticsCollection = Backbone.Collection.extend({
|
||||||
model: window.Statistics,
|
model: window.Statistics,
|
||||||
|
|
||||||
|
@ -1256,7 +1256,7 @@ window.StatisticsDescription = Backbone.Model.extend({
|
||||||
|
|
||||||
/*jshint browser: true */
|
/*jshint browser: true */
|
||||||
/*jshint unused: false */
|
/*jshint unused: false */
|
||||||
/*global require, exports, Backbone, window */
|
/*global Backbone, window */
|
||||||
window.StatisticsCollection = Backbone.Collection.extend({
|
window.StatisticsCollection = Backbone.Collection.extend({
|
||||||
model: window.Statistics,
|
model: window.Statistics,
|
||||||
url: "/_admin/statistics"
|
url: "/_admin/statistics"
|
||||||
|
@ -1264,7 +1264,7 @@ window.StatisticsCollection = Backbone.Collection.extend({
|
||||||
|
|
||||||
/*jshint browser: true */
|
/*jshint browser: true */
|
||||||
/*jshint unused: false */
|
/*jshint unused: false */
|
||||||
/*global require, exports, window, Backbone, arangoDocumentModel, _, arangoHelper, $*/
|
/*global window, Backbone, arangoDocumentModel, _, arangoHelper, $*/
|
||||||
(function() {
|
(function() {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
|
@ -1727,7 +1727,7 @@ window.StatisticsCollection = Backbone.Collection.extend({
|
||||||
|
|
||||||
/*jshint browser: true */
|
/*jshint browser: true */
|
||||||
/*jshint unused: false */
|
/*jshint unused: false */
|
||||||
/*global require, exports, Backbone, EJS, $, flush, window, arangoHelper, nv, d3, localStorage*/
|
/*global Backbone, EJS, $, flush, window, arangoHelper, nv, d3, localStorage*/
|
||||||
/*global document, console, Dygraph, _,templateEngine */
|
/*global document, console, Dygraph, _,templateEngine */
|
||||||
|
|
||||||
(function () {
|
(function () {
|
||||||
|
@ -2902,7 +2902,7 @@ window.StatisticsCollection = Backbone.Collection.extend({
|
||||||
});
|
});
|
||||||
}());
|
}());
|
||||||
|
|
||||||
/*global require, _, Dygraph, window, document */
|
/*global _, Dygraph, window, document */
|
||||||
|
|
||||||
(function () {
|
(function () {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
@ -3196,7 +3196,7 @@ window.StatisticsCollection = Backbone.Collection.extend({
|
||||||
|
|
||||||
/*jshint browser: true */
|
/*jshint browser: true */
|
||||||
/*jshint strict: false, unused: false */
|
/*jshint strict: false, unused: false */
|
||||||
/*global require, exports, Backbone, window */
|
/*global Backbone, window */
|
||||||
window.StatisticsDescriptionCollection = Backbone.Collection.extend({
|
window.StatisticsDescriptionCollection = Backbone.Collection.extend({
|
||||||
model: window.StatisticsDescription,
|
model: window.StatisticsDescription,
|
||||||
url: "/_admin/statistics-description",
|
url: "/_admin/statistics-description",
|
||||||
|
@ -3383,7 +3383,7 @@ window.StatisticsDescriptionCollection = Backbone.Collection.extend({
|
||||||
});
|
});
|
||||||
}());
|
}());
|
||||||
|
|
||||||
/*global require, exports, Backbone, EJS, $, flush, window, arangoHelper, nv, d3, localStorage*/
|
/*global Backbone, EJS, $, flush, window, arangoHelper, nv, d3, localStorage*/
|
||||||
/*global document, Dygraph, _,templateEngine */
|
/*global document, Dygraph, _,templateEngine */
|
||||||
|
|
||||||
(function() {
|
(function() {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/*global require, exports, Backbone, window */
|
/*global Backbone, window */
|
||||||
window.ClusterStatisticsCollection = Backbone.Collection.extend({
|
window.ClusterStatisticsCollection = Backbone.Collection.extend({
|
||||||
model: window.Statistics,
|
model: window.Statistics,
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/*global require, exports, Backbone, EJS, $, flush, window, arangoHelper, nv, d3, localStorage*/
|
/*global Backbone, EJS, $, flush, window, arangoHelper, nv, d3, localStorage*/
|
||||||
/*global document, Dygraph, _,templateEngine */
|
/*global document, Dygraph, _,templateEngine */
|
||||||
|
|
||||||
(function() {
|
(function() {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/*global require, applicationContext*/
|
/*global applicationContext*/
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief A Foxx.Controller to generate new FoxxApps
|
/// @brief A Foxx.Controller to generate new FoxxApps
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/*global require, applicationContext */
|
/*global applicationContext */
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief A Foxx.Controller to show all Foxx Applications
|
/// @brief A Foxx.Controller to show all Foxx Applications
|
||||||
|
|
|
@ -1,12 +1,11 @@
|
||||||
/*jshint maxlen: 240 */
|
/*jshint maxlen: 240 */
|
||||||
/*global require */
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief auto-generated file generated from errors.dat
|
/// @brief auto-generated file generated from errors.dat
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
(function () {
|
(function () {
|
||||||
"use strict";
|
'use strict';
|
||||||
var internal = require("internal");
|
var internal = require("internal");
|
||||||
|
|
||||||
internal.errors = {
|
internal.errors = {
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
/*jshint -W051: true */
|
/*jshint -W051:true */
|
||||||
/*global require, SYS_GETLINE, SYS_LOG, jqconsole, Symbol */
|
/*global jqconsole, Symbol */
|
||||||
|
'use strict';
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief module "console"
|
/// @brief module "console"
|
||||||
|
@ -28,38 +29,37 @@
|
||||||
/// @author Copyright 2010-2013, triAGENS GmbH, Cologne, Germany
|
/// @author Copyright 2010-2013, triAGENS GmbH, Cologne, Germany
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
(function () {
|
|
||||||
/*jshint strict: false */
|
|
||||||
var exports = require("console");
|
|
||||||
|
|
||||||
var sprintf = require("internal").sprintf;
|
|
||||||
var inspect = require("internal").inspect;
|
|
||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
// --SECTION-- Module "console"
|
// --SECTION-- Module "console"
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
(function () {
|
||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
// --SECTION-- private variables
|
// --SECTION-- private variables
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
var exports = require("console");
|
||||||
|
var sprintf = require("internal").sprintf;
|
||||||
|
var inspect = require("internal").inspect;
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief group level
|
/// @brief group level
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
var groupLevel = "";
|
var groupLevel = "";
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief timers
|
/// @brief timers
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
var timers;
|
var timers;
|
||||||
try {
|
try {
|
||||||
timers = Object.create(null);
|
timers = Object.create(null);
|
||||||
}
|
}
|
||||||
catch (err) {
|
catch (e) {
|
||||||
timers = {};
|
timers = {};
|
||||||
}
|
}
|
||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
// --SECTION-- private functions
|
// --SECTION-- private functions
|
||||||
|
@ -69,69 +69,66 @@
|
||||||
/// @brief internal logging
|
/// @brief internal logging
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
var log;
|
var log;
|
||||||
|
|
||||||
try {
|
if (global.SYS_LOG) {
|
||||||
// this will work when we are in arangod but not in the browser / web interface
|
// this will work when we are in arangod but not in the browser / web interface
|
||||||
log = SYS_LOG;
|
log = global.SYS_LOG;
|
||||||
delete SYS_LOG;
|
delete global.SYS_LOG;
|
||||||
}
|
}
|
||||||
catch (err) {
|
else {
|
||||||
// this will work in the web interface
|
// this will work in the web interface
|
||||||
log = function (level, message) {
|
log = function (level, message) {
|
||||||
if (jqconsole) {
|
if (typeof jqconsole !== 'undefined') {
|
||||||
jqconsole.Write(message + "\n", 'jssuccess');
|
jqconsole.Write(message + "\n", 'jssuccess');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief internal logging with group level
|
/// @brief internal logging with group level
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
function logGroup (level, msg) {
|
function logGroup (level, msg) {
|
||||||
'use strict';
|
log(level, groupLevel + msg);
|
||||||
|
}
|
||||||
log(level, groupLevel + msg);
|
|
||||||
}
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief try to prettify
|
/// @brief try to prettify
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
function prepareArgs (args) {
|
function prepareArgs (args) {
|
||||||
var ShapedJson = require("internal").ShapedJson;
|
var ShapedJson = require("internal").ShapedJson;
|
||||||
var result = [];
|
var result = [];
|
||||||
var i;
|
|
||||||
|
|
||||||
if (0 < args.length && typeof args[0] !== "string") {
|
if (0 < args.length && typeof args[0] !== "string") {
|
||||||
result.push("%s");
|
result.push("%s");
|
||||||
}
|
|
||||||
|
|
||||||
for (i = 0; i < args.length; ++i) {
|
|
||||||
var arg = args[i];
|
|
||||||
|
|
||||||
if (typeof arg === "object") {
|
|
||||||
if (ShapedJson !== undefined && arg instanceof ShapedJson) {
|
|
||||||
arg = inspect(arg, {prettyPrint: false});
|
|
||||||
}
|
|
||||||
else if (arg === null) {
|
|
||||||
arg = "null";
|
|
||||||
}
|
|
||||||
else if (arg instanceof Date || arg instanceof RegExp) {
|
|
||||||
arg = String(arg);
|
|
||||||
}
|
|
||||||
else if (Object.prototype.isPrototypeOf(arg) || Array.isArray(arg)) {
|
|
||||||
arg = inspect(arg, {prettyPrint: false});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
result.push(arg);
|
|
||||||
}
|
|
||||||
|
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (var i = 0; i < args.length; ++i) {
|
||||||
|
var arg = args[i];
|
||||||
|
|
||||||
|
if (typeof arg === "object") {
|
||||||
|
if (ShapedJson !== undefined && arg instanceof ShapedJson) {
|
||||||
|
arg = inspect(arg, {prettyPrint: false});
|
||||||
|
}
|
||||||
|
else if (arg === null) {
|
||||||
|
arg = "null";
|
||||||
|
}
|
||||||
|
else if (arg instanceof Date || arg instanceof RegExp) {
|
||||||
|
arg = String(arg);
|
||||||
|
}
|
||||||
|
else if (Object.prototype.isPrototypeOf(arg) || Array.isArray(arg)) {
|
||||||
|
arg = inspect(arg, {prettyPrint: false});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
result.push(arg);
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
// --SECTION-- public functions
|
// --SECTION-- public functions
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
@ -140,329 +137,297 @@
|
||||||
/// @brief assert
|
/// @brief assert
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
exports.assert = function (condition) {
|
exports.assert = function (condition) {
|
||||||
'use strict';
|
if (condition) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (condition) {
|
var args = Array.prototype.slice.call(arguments, 1);
|
||||||
return;
|
var msg;
|
||||||
}
|
|
||||||
|
|
||||||
var args = Array.prototype.slice.call(arguments, 1);
|
try {
|
||||||
var msg;
|
msg = sprintf.apply(sprintf, prepareArgs(args));
|
||||||
|
}
|
||||||
|
catch (e) {
|
||||||
|
msg = e + ": " + args;
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
logGroup("error", msg);
|
||||||
msg = sprintf.apply(sprintf, prepareArgs(args));
|
|
||||||
}
|
|
||||||
catch (err) {
|
|
||||||
msg = err + ": " + args;
|
|
||||||
}
|
|
||||||
|
|
||||||
logGroup("error", msg);
|
require('assert').ok(condition, msg);
|
||||||
|
};
|
||||||
require('assert').ok(condition, msg);
|
|
||||||
};
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief debug
|
/// @brief debug
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
exports.debug = function () {
|
exports.debug = function () {
|
||||||
'use strict';
|
var msg;
|
||||||
|
|
||||||
var msg;
|
try {
|
||||||
|
msg = sprintf.apply(sprintf, prepareArgs(arguments));
|
||||||
|
}
|
||||||
|
catch (e) {
|
||||||
|
msg = e + ": " + arguments;
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
logGroup("debug", msg);
|
||||||
msg = sprintf.apply(sprintf, prepareArgs(arguments));
|
};
|
||||||
}
|
|
||||||
catch (err) {
|
|
||||||
msg = err + ": " + arguments;
|
|
||||||
}
|
|
||||||
|
|
||||||
logGroup("debug", msg);
|
|
||||||
};
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief debugLines
|
/// @brief debugLines
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
exports.debugLines = function () {
|
exports.debugLines = function () {
|
||||||
'use strict';
|
var msg;
|
||||||
|
|
||||||
var msg;
|
try {
|
||||||
|
msg = sprintf.apply(sprintf, prepareArgs(arguments));
|
||||||
|
}
|
||||||
|
catch (e) {
|
||||||
|
msg = e + ": " + arguments;
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
var a = msg.split("\n");
|
||||||
msg = sprintf.apply(sprintf, prepareArgs(arguments));
|
var i;
|
||||||
}
|
|
||||||
catch (err) {
|
|
||||||
msg = err + ": " + arguments;
|
|
||||||
}
|
|
||||||
|
|
||||||
var a = msg.split("\n");
|
for (i = 0; i < a.length; ++i) {
|
||||||
var i;
|
logGroup("debug", a[i]);
|
||||||
|
}
|
||||||
for (i = 0; i < a.length; ++i) {
|
};
|
||||||
logGroup("debug", a[i]);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief dir
|
/// @brief dir
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
exports.dir = function (object) {
|
exports.dir = function (object) {
|
||||||
'use strict';
|
logGroup("info", inspect(object));
|
||||||
|
};
|
||||||
logGroup("info", inspect(object));
|
|
||||||
};
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief error
|
/// @brief error
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
exports.error = function () {
|
exports.error = function () {
|
||||||
'use strict';
|
var msg;
|
||||||
|
|
||||||
var msg;
|
try {
|
||||||
|
msg = sprintf.apply(sprintf, prepareArgs(arguments));
|
||||||
|
}
|
||||||
|
catch (e) {
|
||||||
|
msg = e + ": " + arguments;
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
logGroup("error", msg);
|
||||||
msg = sprintf.apply(sprintf, prepareArgs(arguments));
|
};
|
||||||
}
|
|
||||||
catch (err) {
|
|
||||||
msg = err + ": " + arguments;
|
|
||||||
}
|
|
||||||
|
|
||||||
logGroup("error", msg);
|
|
||||||
};
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief errorLines
|
/// @brief errorLines
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
exports.errorLines = function () {
|
exports.errorLines = function () {
|
||||||
'use strict';
|
var msg;
|
||||||
|
|
||||||
var msg;
|
try {
|
||||||
|
msg = sprintf.apply(sprintf, prepareArgs(arguments));
|
||||||
|
}
|
||||||
|
catch (e) {
|
||||||
|
msg = e + ": " + arguments;
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
var a = msg.split("\n");
|
||||||
msg = sprintf.apply(sprintf, prepareArgs(arguments));
|
for (var i = 0; i < a.length; ++i) {
|
||||||
}
|
logGroup("error", a[i]);
|
||||||
catch (err) {
|
}
|
||||||
msg = err + ": " + arguments;
|
};
|
||||||
}
|
|
||||||
|
|
||||||
var a = msg.split("\n");
|
|
||||||
var i;
|
|
||||||
|
|
||||||
for (i = 0; i < a.length; ++i) {
|
|
||||||
logGroup("error", a[i]);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief getline
|
/// @brief getline
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
if (typeof SYS_GETLINE !== "undefined") {
|
if (global.SYS_GETLINE) {
|
||||||
exports.getline = SYS_GETLINE;
|
exports.getline = global.SYS_GETLINE;
|
||||||
delete SYS_GETLINE;
|
delete global.SYS_GETLINE;
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief group
|
/// @brief group
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
exports.group = function () {
|
exports.group = function () {
|
||||||
'use strict';
|
var msg;
|
||||||
|
|
||||||
var msg;
|
try {
|
||||||
|
msg = sprintf.apply(sprintf, prepareArgs(arguments));
|
||||||
|
}
|
||||||
|
catch (e) {
|
||||||
|
msg = e + ": " + arguments;
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
groupLevel = groupLevel + " ";
|
||||||
msg = sprintf.apply(sprintf, prepareArgs(arguments));
|
logGroup("info", msg);
|
||||||
}
|
};
|
||||||
catch (err) {
|
|
||||||
msg = err + ": " + arguments;
|
|
||||||
}
|
|
||||||
|
|
||||||
groupLevel = groupLevel + " ";
|
|
||||||
logGroup("info", msg);
|
|
||||||
};
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief groupCollapsed
|
/// @brief groupCollapsed
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
exports.groupCollapsed = function () {
|
exports.groupCollapsed = function () {
|
||||||
'use strict';
|
var msg;
|
||||||
|
|
||||||
var msg;
|
try {
|
||||||
|
msg = sprintf.apply(sprintf, prepareArgs(arguments));
|
||||||
|
}
|
||||||
|
catch (e) {
|
||||||
|
msg = e + ": " + arguments;
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
logGroup("info", msg);
|
||||||
msg = sprintf.apply(sprintf, prepareArgs(arguments));
|
groupLevel = groupLevel + " ";
|
||||||
}
|
};
|
||||||
catch (err) {
|
|
||||||
msg = err + ": " + arguments;
|
|
||||||
}
|
|
||||||
|
|
||||||
logGroup("info", msg);
|
|
||||||
groupLevel = groupLevel + " ";
|
|
||||||
};
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief groupEnd
|
/// @brief groupEnd
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
exports.groupEnd = function () {
|
exports.groupEnd = function () {
|
||||||
'use strict';
|
groupLevel = groupLevel.substr(2);
|
||||||
|
};
|
||||||
groupLevel = groupLevel.substr(2);
|
|
||||||
};
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief info
|
/// @brief info
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
exports.info = function () {
|
exports.info = function () {
|
||||||
'use strict';
|
var msg;
|
||||||
|
|
||||||
var msg;
|
try {
|
||||||
|
msg = sprintf.apply(sprintf, prepareArgs(arguments));
|
||||||
|
}
|
||||||
|
catch (e) {
|
||||||
|
msg = e + ": " + arguments;
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
logGroup("info", msg);
|
||||||
msg = sprintf.apply(sprintf, prepareArgs(arguments));
|
};
|
||||||
}
|
|
||||||
catch (err) {
|
|
||||||
msg = err + ": " + arguments;
|
|
||||||
}
|
|
||||||
|
|
||||||
logGroup("info", msg);
|
|
||||||
};
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief infoLines
|
/// @brief infoLines
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
exports.infoLines = function () {
|
exports.infoLines = function () {
|
||||||
'use strict';
|
var msg;
|
||||||
|
|
||||||
var msg;
|
try {
|
||||||
|
msg = sprintf.apply(sprintf, prepareArgs(arguments));
|
||||||
|
}
|
||||||
|
catch (e) {
|
||||||
|
msg = e + ": " + arguments;
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
var a = msg.split("\n");
|
||||||
msg = sprintf.apply(sprintf, prepareArgs(arguments));
|
var i;
|
||||||
}
|
|
||||||
catch (err) {
|
|
||||||
msg = err + ": " + arguments;
|
|
||||||
}
|
|
||||||
|
|
||||||
var a = msg.split("\n");
|
for (i = 0; i < a.length; ++i) {
|
||||||
var i;
|
logGroup("info", a[i]);
|
||||||
|
}
|
||||||
for (i = 0; i < a.length; ++i) {
|
};
|
||||||
logGroup("info", a[i]);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief log
|
/// @brief log
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
exports.log = exports.info;
|
exports.log = exports.info;
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief logLines
|
/// @brief logLines
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
exports.logLines = exports.infoLines;
|
exports.logLines = exports.infoLines;
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief time
|
/// @brief time
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
exports.time = function (label) {
|
exports.time = function (label) {
|
||||||
'use strict';
|
if (typeof label !== 'string') {
|
||||||
|
throw new Error('label must be a string');
|
||||||
|
}
|
||||||
|
|
||||||
if (typeof label !== 'string') {
|
var symbol = typeof Symbol === 'undefined' ? '%' + label : Symbol.for(label);
|
||||||
throw new Error('label must be a string');
|
|
||||||
}
|
|
||||||
|
|
||||||
var symbol = typeof Symbol === 'undefined' ? '%' + label : Symbol.for(label);
|
timers[symbol] = Date.now();
|
||||||
|
};
|
||||||
timers[symbol] = Date.now();
|
|
||||||
};
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief timeEnd
|
/// @brief timeEnd
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
exports.timeEnd = function(label) {
|
exports.timeEnd = function(label) {
|
||||||
'use strict';
|
var symbol = typeof Symbol === 'undefined' ? '%' + label : Symbol.for(label);
|
||||||
|
var time = timers[symbol];
|
||||||
|
|
||||||
var symbol = typeof Symbol === 'undefined' ? '%' + label : Symbol.for(label);
|
if (! time) {
|
||||||
var time = timers[symbol];
|
throw new Error('No such label: ' + label);
|
||||||
|
}
|
||||||
|
|
||||||
if (! time) {
|
var duration = Date.now() - time;
|
||||||
throw new Error('No such label: ' + label);
|
|
||||||
}
|
|
||||||
|
|
||||||
var duration = Date.now() - time;
|
delete timers[symbol];
|
||||||
|
|
||||||
delete timers[symbol];
|
logGroup("info", sprintf('%s: %dms', label, duration));
|
||||||
|
|
||||||
logGroup("info", sprintf('%s: %dms', label, duration));
|
|
||||||
};
|
};
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief trace
|
/// @brief trace
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
exports.trace = function () {
|
exports.trace = function () {
|
||||||
var err = new Error();
|
var err = new Error();
|
||||||
err.name = 'trace';
|
err.name = 'trace';
|
||||||
err.message = sprintf.apply(sprintf, prepareArgs(arguments));
|
err.message = sprintf.apply(sprintf, prepareArgs(arguments));
|
||||||
Error.captureStackTrace(err, exports.trace);
|
Error.captureStackTrace(err, exports.trace);
|
||||||
logGroup("info", err.stack);
|
logGroup("info", err.stack);
|
||||||
};
|
};
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief warn
|
/// @brief warn
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
exports.warn = function () {
|
exports.warn = function () {
|
||||||
'use strict';
|
var msg;
|
||||||
|
|
||||||
var msg;
|
try {
|
||||||
|
msg = sprintf.apply(sprintf, prepareArgs(arguments));
|
||||||
|
}
|
||||||
|
catch (e) {
|
||||||
|
msg = e + ": " + arguments;
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
logGroup("warning", msg);
|
||||||
msg = sprintf.apply(sprintf, prepareArgs(arguments));
|
};
|
||||||
}
|
|
||||||
catch (err) {
|
|
||||||
msg = err + ": " + arguments;
|
|
||||||
}
|
|
||||||
|
|
||||||
logGroup("warning", msg);
|
|
||||||
};
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief warnLines
|
/// @brief warnLines
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
exports.warnLines = function () {
|
exports.warnLines = function () {
|
||||||
'use strict';
|
var msg;
|
||||||
|
|
||||||
var msg;
|
try {
|
||||||
|
msg = sprintf.apply(sprintf, prepareArgs(arguments));
|
||||||
|
}
|
||||||
|
catch (e) {
|
||||||
|
msg = e + ": " + arguments;
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
var a = msg.split("\n");
|
||||||
msg = sprintf.apply(sprintf, prepareArgs(arguments));
|
var i;
|
||||||
}
|
|
||||||
catch (err) {
|
|
||||||
msg = err + ": " + arguments;
|
|
||||||
}
|
|
||||||
|
|
||||||
var a = msg.split("\n");
|
for (i = 0; i < a.length; ++i) {
|
||||||
var i;
|
logGroup("warning", a[i]);
|
||||||
|
}
|
||||||
for (i = 0; i < a.length; ++i) {
|
};
|
||||||
logGroup("warning", a[i]);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
}());
|
}());
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,4 +1,3 @@
|
||||||
/*jshint globalstrict:true */
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*jshint strict: false, -W051: true */
|
/*jshint -W051:true */
|
||||||
/*global require, ArangoConnection, SYS_ARANGO, window */
|
'use strict';
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief module "internal"
|
/// @brief module "internal"
|
||||||
|
@ -32,26 +32,23 @@
|
||||||
// --SECTION-- Module "internal"
|
// --SECTION-- Module "internal"
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
|
||||||
// --SECTION-- private variables
|
|
||||||
// -----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
(function () {
|
(function () {
|
||||||
var internal = require("internal");
|
|
||||||
|
var exports = require("internal");
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief hide global variables
|
/// @brief hide global variables
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
if (typeof ArangoConnection !== "undefined") {
|
if (global.ArangoConnection) {
|
||||||
internal.ArangoConnection = ArangoConnection;
|
exports.ArangoConnection = global.ArangoConnection;
|
||||||
delete ArangoConnection;
|
delete global.ArangoConnection;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (typeof SYS_ARANGO !== "undefined") {
|
if (global.SYS_ARANGO) {
|
||||||
internal.arango = SYS_ARANGO;
|
exports.arango = global.SYS_ARANGO;
|
||||||
delete SYS_ARANGO;
|
delete global.SYS_ARANGO;
|
||||||
}
|
}
|
||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
// --SECTION-- private functions
|
// --SECTION-- private functions
|
||||||
|
@ -61,212 +58,212 @@
|
||||||
/// @brief write-ahead log functionality
|
/// @brief write-ahead log functionality
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
internal.wal = {
|
exports.wal = {
|
||||||
flush: function (waitForSync, waitForCollector) {
|
flush: function (waitForSync, waitForCollector) {
|
||||||
if (typeof internal.arango !== 'undefined') {
|
if (exports.arango) {
|
||||||
var wfs = waitForSync ? "true" : "false";
|
var wfs = waitForSync ? "true" : "false";
|
||||||
var wfc = waitForCollector ? "true" : "false";
|
var wfc = waitForCollector ? "true" : "false";
|
||||||
internal.arango.PUT("/_admin/wal/flush?waitForSync=" + wfs + "&waitForCollector=" + wfc, "");
|
exports.arango.PUT("/_admin/wal/flush?waitForSync=" + wfs + "&waitForCollector=" + wfc, "");
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
|
|
||||||
throw "not connected";
|
|
||||||
},
|
|
||||||
|
|
||||||
properties: function (value) {
|
|
||||||
if (typeof internal.arango !== 'undefined') {
|
|
||||||
if (value !== undefined) {
|
|
||||||
return internal.arango.PUT("/_admin/wal/properties", JSON.stringify(value));
|
|
||||||
}
|
|
||||||
|
|
||||||
return internal.arango.GET("/_admin/wal/properties", "");
|
|
||||||
}
|
|
||||||
|
|
||||||
throw "not connected";
|
|
||||||
}
|
}
|
||||||
};
|
|
||||||
|
throw "not connected";
|
||||||
|
},
|
||||||
|
|
||||||
|
properties: function (value) {
|
||||||
|
if (exports.arango) {
|
||||||
|
if (value !== undefined) {
|
||||||
|
return exports.arango.PUT("/_admin/wal/properties", JSON.stringify(value));
|
||||||
|
}
|
||||||
|
|
||||||
|
return exports.arango.GET("/_admin/wal/properties", "");
|
||||||
|
}
|
||||||
|
|
||||||
|
throw "not connected";
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief reloads the AQL user functions
|
/// @brief reloads the AQL user functions
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
internal.reloadAqlFunctions = function () {
|
exports.reloadAqlFunctions = function () {
|
||||||
if (typeof internal.arango !== 'undefined') {
|
if (exports.arango) {
|
||||||
internal.arango.POST("/_admin/aql/reload", "");
|
exports.arango.POST("/_admin/aql/reload", "");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
throw "not connected";
|
throw "not connected";
|
||||||
};
|
};
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief rebuilds the routing cache
|
/// @brief rebuilds the routing cache
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
internal.reloadRouting = function () {
|
exports.reloadRouting = function () {
|
||||||
if (typeof internal.arango !== 'undefined') {
|
if (exports.arango) {
|
||||||
internal.arango.POST("/_admin/routing/reload", "");
|
exports.arango.POST("/_admin/routing/reload", "");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
throw "not connected";
|
throw "not connected";
|
||||||
};
|
};
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief rebuilds the routing cache
|
/// @brief rebuilds the routing cache
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
internal.routingCache = function () {
|
exports.routingCache = function () {
|
||||||
if (typeof internal.arango !== 'undefined') {
|
if (exports.arango) {
|
||||||
return internal.arango.GET("/_admin/routing/routes", "");
|
return exports.arango.GET("/_admin/routing/routes", "");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
throw "not connected";
|
throw "not connected";
|
||||||
};
|
};
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief rebuilds the authentication cache
|
/// @brief rebuilds the authentication cache
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
internal.reloadAuth = function () {
|
exports.reloadAuth = function () {
|
||||||
if (typeof internal.arango !== 'undefined') {
|
if (exports.arango) {
|
||||||
internal.arango.POST("/_admin/auth/reload", "");
|
exports.arango.POST("/_admin/auth/reload", "");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
throw "not connected";
|
throw "not connected";
|
||||||
};
|
};
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief execute javascript file on the server
|
/// @brief execute javascript file on the server
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
internal.executeServer = function (body) {
|
exports.executeServer = function (body) {
|
||||||
if (typeof internal.arango !== 'undefined') {
|
if (exports.arango) {
|
||||||
return internal.arango.POST("/_admin/execute", body);
|
return exports.arango.POST("/_admin/execute", body);
|
||||||
}
|
}
|
||||||
|
|
||||||
throw "not connected";
|
throw "not connected";
|
||||||
};
|
};
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief logs a request in curl format
|
/// @brief logs a request in curl format
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
internal.appendCurlRequest = function (appender) {
|
exports.appendCurlRequest = function (appender) {
|
||||||
return function (method, url, body, headers) {
|
return function (method, url, body, headers) {
|
||||||
var response;
|
var response;
|
||||||
var curl;
|
var curl;
|
||||||
var i;
|
var i;
|
||||||
|
|
||||||
if (typeof body !== 'string') {
|
if (typeof body !== 'string') {
|
||||||
body = internal.inspect(body);
|
body = exports.inspect(body);
|
||||||
}
|
}
|
||||||
|
|
||||||
curl = "shell> curl ";
|
curl = "shell> curl ";
|
||||||
|
|
||||||
if (method === 'POST') {
|
if (method === 'POST') {
|
||||||
response = internal.arango.POST_RAW(url, body, headers);
|
response = exports.arango.POST_RAW(url, body, headers);
|
||||||
curl += "-X " + method + " ";
|
curl += "-X " + method + " ";
|
||||||
}
|
}
|
||||||
else if (method === 'PUT') {
|
else if (method === 'PUT') {
|
||||||
response = internal.arango.PUT_RAW(url, body, headers);
|
response = exports.arango.PUT_RAW(url, body, headers);
|
||||||
curl += "-X " + method + " ";
|
curl += "-X " + method + " ";
|
||||||
}
|
}
|
||||||
else if (method === 'GET') {
|
else if (method === 'GET') {
|
||||||
response = internal.arango.GET_RAW(url, headers);
|
response = exports.arango.GET_RAW(url, headers);
|
||||||
}
|
}
|
||||||
else if (method === 'DELETE') {
|
else if (method === 'DELETE') {
|
||||||
response = internal.arango.DELETE_RAW(url, headers);
|
response = exports.arango.DELETE_RAW(url, headers);
|
||||||
curl += "-X " + method + " ";
|
curl += "-X " + method + " ";
|
||||||
}
|
}
|
||||||
else if (method === 'PATCH') {
|
else if (method === 'PATCH') {
|
||||||
response = internal.arango.PATCH_RAW(url, body, headers);
|
response = exports.arango.PATCH_RAW(url, body, headers);
|
||||||
curl += "-X " + method + " ";
|
curl += "-X " + method + " ";
|
||||||
}
|
}
|
||||||
else if (method === 'HEAD') {
|
else if (method === 'HEAD') {
|
||||||
response = internal.arango.HEAD_RAW(url, headers);
|
response = exports.arango.HEAD_RAW(url, headers);
|
||||||
curl += "-X " + method + " ";
|
curl += "-X " + method + " ";
|
||||||
}
|
}
|
||||||
else if (method === 'OPTION') {
|
else if (method === 'OPTION') {
|
||||||
response = internal.arango.OPTION_RAW(url, body, headers);
|
response = exports.arango.OPTION_RAW(url, body, headers);
|
||||||
curl += "-X " + method + " ";
|
curl += "-X " + method + " ";
|
||||||
}
|
}
|
||||||
if (headers !== undefined && headers !== "") {
|
if (headers !== undefined && headers !== "") {
|
||||||
for (i in headers) {
|
for (i in headers) {
|
||||||
if (headers.hasOwnProperty(i)) {
|
if (headers.hasOwnProperty(i)) {
|
||||||
curl += "--header \'" + i + ": " + headers[i] + "\' ";
|
curl += "--header \'" + i + ": " + headers[i] + "\' ";
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (body !== undefined && body !== "") {
|
if (body !== undefined && body !== "") {
|
||||||
curl += "--data-binary @- ";
|
curl += "--data-binary @- ";
|
||||||
}
|
}
|
||||||
|
|
||||||
curl += "--dump - http://localhost:8529" + url;
|
curl += "--dump - http://localhost:8529" + url;
|
||||||
|
|
||||||
appender(curl + "\n");
|
appender(curl + "\n");
|
||||||
|
|
||||||
if (body !== undefined && body !== "" && body !== "undefined") {
|
if (body !== undefined && body !== "" && body) {
|
||||||
appender(body + "\n");
|
appender(body + "\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
appender("\n");
|
appender("\n");
|
||||||
|
|
||||||
return response;
|
return response;
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief logs a raw response
|
/// @brief logs a raw response
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
internal.appendRawResponse = function (appender) {
|
exports.appendRawResponse = function (appender) {
|
||||||
return function (response) {
|
return function (response) {
|
||||||
var key;
|
var key;
|
||||||
var headers = response.headers;
|
var headers = response.headers;
|
||||||
|
|
||||||
// generate header
|
// generate header
|
||||||
appender("HTTP/1.1 " + headers['http/1.1'] + "\n");
|
appender("HTTP/1.1 " + headers['http/1.1'] + "\n");
|
||||||
|
|
||||||
for (key in headers) {
|
for (key in headers) {
|
||||||
if (headers.hasOwnProperty(key)) {
|
if (headers.hasOwnProperty(key)) {
|
||||||
if (key !== 'http/1.1' && key !== 'server' && key !== 'connection'
|
if (key !== 'http/1.1' && key !== 'server' && key !== 'connection'
|
||||||
&& key !== 'content-length') {
|
&& key !== 'content-length') {
|
||||||
appender(key + ": " + headers[key] + "\n");
|
appender(key + ": " + headers[key] + "\n");
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
appender("\n");
|
||||||
|
|
||||||
|
// append body
|
||||||
|
if (response.body !== undefined) {
|
||||||
|
appender(exports.inspect(response.body));
|
||||||
appender("\n");
|
appender("\n");
|
||||||
|
}
|
||||||
// append body
|
|
||||||
if (response.body !== undefined) {
|
|
||||||
appender(internal.inspect(response.body));
|
|
||||||
appender("\n");
|
|
||||||
}
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief logs a response in JSON
|
/// @brief logs a response in JSON
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
internal.appendJsonResponse = function (appender) {
|
exports.appendJsonResponse = function (appender) {
|
||||||
return function (response) {
|
return function (response) {
|
||||||
var rawAppend = internal.appendRawResponse(appender);
|
var rawAppend = exports.appendRawResponse(appender);
|
||||||
|
|
||||||
// copy original body (this is necessary because "response" is passed by reference)
|
// copy original body (this is necessary because "response" is passed by reference)
|
||||||
var copy = response.body;
|
var copy = response.body;
|
||||||
// overwrite body with parsed JSON && append
|
// overwrite body with parsed JSON && append
|
||||||
response.body = JSON.parse(response.body);
|
response.body = JSON.parse(response.body);
|
||||||
rawAppend(response);
|
rawAppend(response);
|
||||||
// restore original body
|
// restore original body
|
||||||
response.body = copy;
|
response.body = copy;
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
// --SECTION-- public functions
|
// --SECTION-- public functions
|
||||||
|
@ -276,40 +273,39 @@
|
||||||
/// @brief log function
|
/// @brief log function
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
internal.log = function (level, msg) {
|
exports.log = function (level, msg) {
|
||||||
internal.output(level, ": ", msg, "\n");
|
exports.output(level, ": ", msg, "\n");
|
||||||
};
|
};
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief sprintf wrapper
|
/// @brief sprintf wrapper
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (window) {
|
if (typeof window !== 'undefined') {
|
||||||
internal.sprintf = function (format) {
|
exports.sprintf = function (format) {
|
||||||
var n = arguments.length;
|
var n = arguments.length;
|
||||||
if (n === 0) {
|
if (n === 0) {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
if (n <= 1) {
|
if (n <= 1) {
|
||||||
return String(format);
|
return String(format);
|
||||||
}
|
}
|
||||||
|
|
||||||
var i;
|
var i;
|
||||||
var args = [ ];
|
var args = [ ];
|
||||||
for (i = 1; i < arguments.length; ++i) {
|
for (i = 1; i < arguments.length; ++i) {
|
||||||
args.push(arguments[i]);
|
args.push(arguments[i]);
|
||||||
}
|
}
|
||||||
i = 0;
|
i = 0;
|
||||||
|
|
||||||
return format.replace(/%[dfs]/, function () {
|
return format.replace(/%[dfs]/, function () {
|
||||||
return String(args[i++]);
|
return String(args[i++]);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (err) {
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
catch (e) {}
|
||||||
|
|
||||||
}());
|
}());
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/*jshint globalstrict:true, -W051:true */
|
/*jshint -W051:true */
|
||||||
/*global global:true, window, require */
|
/*global global:true, window, require */
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*jshint browser: true */
|
/*jshint browser: true */
|
||||||
/*jshint unused: false */
|
/*jshint unused: false */
|
||||||
/*global require, exports, Backbone, window, arangoCollectionModel, $, arangoHelper, data, _ */
|
/*global Backbone, window, arangoCollectionModel, $, arangoHelper, data, _ */
|
||||||
(function() {
|
(function() {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*jshint browser: true */
|
/*jshint browser: true */
|
||||||
/*jshint strict: false, unused: false */
|
/*jshint strict: false, unused: false */
|
||||||
/*global require, exports, Backbone, window, arangoDocument, arangoDocumentModel, $, arangoHelper */
|
/*global Backbone, window, arangoDocument, arangoDocumentModel, $, arangoHelper */
|
||||||
|
|
||||||
window.arangoDocument = Backbone.Collection.extend({
|
window.arangoDocument = Backbone.Collection.extend({
|
||||||
url: '/_api/document/',
|
url: '/_api/document/',
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*jshint browser: true */
|
/*jshint browser: true */
|
||||||
/*jshint unused: false */
|
/*jshint unused: false */
|
||||||
/*global require, exports, window, Backbone, arangoDocumentModel, _, arangoHelper, $*/
|
/*global window, Backbone, arangoDocumentModel, _, arangoHelper, $*/
|
||||||
(function() {
|
(function() {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*jshint browser: true */
|
/*jshint browser: true */
|
||||||
/*jshint unused: false */
|
/*jshint unused: false */
|
||||||
/*global require, exports, Backbone, activeUser, window, ArangoQuery, $, data, _, arangoHelper*/
|
/*global Backbone, activeUser, window, ArangoQuery, $, data, _, arangoHelper*/
|
||||||
(function() {
|
(function() {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*jshint browser: true */
|
/*jshint browser: true */
|
||||||
/*jshint unused: false */
|
/*jshint unused: false */
|
||||||
/*global require, exports, Backbone, window */
|
/*global Backbone, window */
|
||||||
window.StatisticsCollection = Backbone.Collection.extend({
|
window.StatisticsCollection = Backbone.Collection.extend({
|
||||||
model: window.Statistics,
|
model: window.Statistics,
|
||||||
url: "/_admin/statistics"
|
url: "/_admin/statistics"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*jshint browser: true */
|
/*jshint browser: true */
|
||||||
/*jshint strict: false, unused: false */
|
/*jshint strict: false, unused: false */
|
||||||
/*global require, exports, Backbone, window */
|
/*global Backbone, window */
|
||||||
window.StatisticsDescriptionCollection = Backbone.Collection.extend({
|
window.StatisticsDescriptionCollection = Backbone.Collection.extend({
|
||||||
model: window.StatisticsDescription,
|
model: window.StatisticsDescription,
|
||||||
url: "/_admin/statistics-description",
|
url: "/_admin/statistics-description",
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/*global require, _, Dygraph, window, document */
|
/*global _, Dygraph, window, document */
|
||||||
|
|
||||||
(function () {
|
(function () {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*jshint browser: true */
|
/*jshint browser: true */
|
||||||
/*global require, SwaggerUi, $, hljs*/
|
/*global SwaggerUi, $, hljs*/
|
||||||
(function() {
|
(function() {
|
||||||
"use strict";
|
"use strict";
|
||||||
var internal = require("internal");
|
var internal = require("internal");
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
module.define("org/arangodb-common", function(exports, module) {
|
module.define("org/arangodb-common", function(exports, module) {
|
||||||
/*global require, module, exports */
|
'use strict';
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief JavaScript base module
|
/// @brief JavaScript base module
|
||||||
|
@ -46,17 +46,10 @@ var mimetypes = require("org/arangodb/mimetypes").mimeTypes;
|
||||||
/// @brief errors
|
/// @brief errors
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
(function () {
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
var name;
|
Object.keys(internal.errors).forEach(function (key) {
|
||||||
|
exports[key] = internal.errors[key].code;
|
||||||
for (name in internal.errors) {
|
});
|
||||||
if (internal.errors.hasOwnProperty(name)) {
|
|
||||||
exports[name] = internal.errors[name].code;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}());
|
|
||||||
|
|
||||||
exports.errors = internal.errors;
|
exports.errors = internal.errors;
|
||||||
|
|
||||||
|
@ -79,8 +72,6 @@ exports.ArangoError = internal.ArangoError;
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
exports.defineModule = function (path, file) {
|
exports.defineModule = function (path, file) {
|
||||||
'use strict';
|
|
||||||
|
|
||||||
var content;
|
var content;
|
||||||
var m;
|
var m;
|
||||||
var mc;
|
var mc;
|
||||||
|
@ -109,8 +100,6 @@ exports.defineModule = function (path, file) {
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
exports.guessContentType = function (filename, defaultValue) {
|
exports.guessContentType = function (filename, defaultValue) {
|
||||||
'use strict';
|
|
||||||
|
|
||||||
var re = /\.([a-zA-Z0-9]+)$/;
|
var re = /\.([a-zA-Z0-9]+)$/;
|
||||||
var match = re.exec(filename);
|
var match = re.exec(filename);
|
||||||
|
|
||||||
|
@ -149,8 +138,6 @@ exports.guessContentType = function (filename, defaultValue) {
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
exports.normalizeURL = function (path) {
|
exports.normalizeURL = function (path) {
|
||||||
'use strict';
|
|
||||||
|
|
||||||
var i;
|
var i;
|
||||||
var n;
|
var n;
|
||||||
var p;
|
var p;
|
||||||
|
@ -231,8 +218,6 @@ exports.inspect = internal.inspect;
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
exports.output = function () {
|
exports.output = function () {
|
||||||
'use strict';
|
|
||||||
|
|
||||||
internal.output.apply(internal.output, arguments);
|
internal.output.apply(internal.output, arguments);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -265,8 +250,6 @@ exports.printObject = internal.printObject;
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
exports.printTable = function (list, columns, options) {
|
exports.printTable = function (list, columns, options) {
|
||||||
'use strict';
|
|
||||||
|
|
||||||
options = options || { };
|
options = options || { };
|
||||||
if (options.totalString === undefined) {
|
if (options.totalString === undefined) {
|
||||||
options.totalString = "%s document(s)\n";
|
options.totalString = "%s document(s)\n";
|
||||||
|
@ -417,8 +400,6 @@ exports.printTable = function (list, columns, options) {
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
exports.stringPadding = function (str, len, pad, dir) {
|
exports.stringPadding = function (str, len, pad, dir) {
|
||||||
'use strict';
|
|
||||||
|
|
||||||
// yes, this is more code than new Array(length).join(chr), but it makes jslint happy
|
// yes, this is more code than new Array(length).join(chr), but it makes jslint happy
|
||||||
function fill (length, chr) {
|
function fill (length, chr) {
|
||||||
var result = '', i;
|
var result = '', i;
|
||||||
|
@ -465,8 +446,6 @@ exports.stringPadding = function (str, len, pad, dir) {
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
exports.throwDownloadError = function (msg) {
|
exports.throwDownloadError = function (msg) {
|
||||||
'use strict';
|
|
||||||
|
|
||||||
throw new exports.ArangoError({
|
throw new exports.ArangoError({
|
||||||
errorNum: exports.errors.ERROR_APPLICATION_DOWNLOAD_FAILED.code,
|
errorNum: exports.errors.ERROR_APPLICATION_DOWNLOAD_FAILED.code,
|
||||||
errorMessage: exports.errors.ERROR_APPLICATION_DOWNLOAD_FAILED.message + ': ' + String(msg)
|
errorMessage: exports.errors.ERROR_APPLICATION_DOWNLOAD_FAILED.message + ': ' + String(msg)
|
||||||
|
@ -478,8 +457,6 @@ exports.throwDownloadError = function (msg) {
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
exports.throwFileNotFound = function (msg) {
|
exports.throwFileNotFound = function (msg) {
|
||||||
'use strict';
|
|
||||||
|
|
||||||
throw new exports.ArangoError({
|
throw new exports.ArangoError({
|
||||||
errorNum: exports.errors.ERROR_FILE_NOT_FOUND.code,
|
errorNum: exports.errors.ERROR_FILE_NOT_FOUND.code,
|
||||||
errorMessage: exports.errors.ERROR_FILE_NOT_FOUND.message + ': ' + String(msg)
|
errorMessage: exports.errors.ERROR_FILE_NOT_FOUND.message + ': ' + String(msg)
|
||||||
|
@ -491,8 +468,6 @@ exports.throwFileNotFound = function (msg) {
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
exports.throwBadParameter = function (msg) {
|
exports.throwBadParameter = function (msg) {
|
||||||
'use strict';
|
|
||||||
|
|
||||||
throw new exports.ArangoError({
|
throw new exports.ArangoError({
|
||||||
errorNum: exports.errors.ERROR_BAD_PARAMETER.code,
|
errorNum: exports.errors.ERROR_BAD_PARAMETER.code,
|
||||||
errorMessage: exports.errors.ERROR_BAD_PARAMETER.message + ': ' + String(msg)
|
errorMessage: exports.errors.ERROR_BAD_PARAMETER.message + ': ' + String(msg)
|
||||||
|
@ -504,8 +479,6 @@ exports.throwBadParameter = function (msg) {
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
exports.checkParameter = function (usage, descs, vars) {
|
exports.checkParameter = function (usage, descs, vars) {
|
||||||
'use strict';
|
|
||||||
|
|
||||||
var i;
|
var i;
|
||||||
|
|
||||||
for (i = 0; i < descs.length; ++i) {
|
for (i = 0; i < descs.length; ++i) {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
module.define("org/arangodb", function(exports, module) {
|
module.define("org/arangodb", function(exports, module) {
|
||||||
/*global require, exports */
|
'use strict';
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief JavaScript base module
|
/// @brief JavaScript base module
|
||||||
|
@ -31,13 +31,9 @@ module.define("org/arangodb", function(exports, module) {
|
||||||
var internal = require("internal");
|
var internal = require("internal");
|
||||||
var common = require("org/arangodb-common");
|
var common = require("org/arangodb-common");
|
||||||
|
|
||||||
var key;
|
Object.keys(common).forEach(function (key) {
|
||||||
|
exports[key] = common[key];
|
||||||
for (key in common) {
|
});
|
||||||
if (common.hasOwnProperty(key)) {
|
|
||||||
exports[key] = common[key];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
// --SECTION-- MODULE EXPORTS
|
// --SECTION-- MODULE EXPORTS
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
module.define("org/arangodb/aql/explainer", function(exports, module) {
|
module.define("org/arangodb/aql/explainer", function(exports, module) {
|
||||||
/*jshint strict: false, maxlen: 300 */
|
/*jshint strict: false, maxlen: 300 */
|
||||||
/*global require, exports */
|
|
||||||
|
|
||||||
var db = require("org/arangodb").db,
|
var db = require("org/arangodb").db,
|
||||||
internal = require("internal"),
|
internal = require("internal"),
|
||||||
|
@ -14,7 +13,7 @@ if (typeof internal.printBrowser === "function") {
|
||||||
|
|
||||||
/* set colors for output */
|
/* set colors for output */
|
||||||
function setColors (useSystemColors) {
|
function setColors (useSystemColors) {
|
||||||
"use strict";
|
'use strict';
|
||||||
|
|
||||||
[ "COLOR_RESET",
|
[ "COLOR_RESET",
|
||||||
"COLOR_CYAN", "COLOR_BLUE", "COLOR_GREEN", "COLOR_MAGENTA", "COLOR_YELLOW", "COLOR_RED", "COLOR_WHITE",
|
"COLOR_CYAN", "COLOR_BLUE", "COLOR_GREEN", "COLOR_MAGENTA", "COLOR_YELLOW", "COLOR_RED", "COLOR_WHITE",
|
||||||
|
@ -27,27 +26,27 @@ function setColors (useSystemColors) {
|
||||||
/* colorizer and output helper functions */
|
/* colorizer and output helper functions */
|
||||||
|
|
||||||
function passthru (v) {
|
function passthru (v) {
|
||||||
"use strict";
|
'use strict';
|
||||||
return v;
|
return v;
|
||||||
}
|
}
|
||||||
|
|
||||||
function keyword (v) {
|
function keyword (v) {
|
||||||
"use strict";
|
'use strict';
|
||||||
return colors.COLOR_CYAN + v + colors.COLOR_RESET;
|
return colors.COLOR_CYAN + v + colors.COLOR_RESET;
|
||||||
}
|
}
|
||||||
|
|
||||||
function annotation (v) {
|
function annotation (v) {
|
||||||
"use strict";
|
'use strict';
|
||||||
return colors.COLOR_BLUE + v + colors.COLOR_RESET;
|
return colors.COLOR_BLUE + v + colors.COLOR_RESET;
|
||||||
}
|
}
|
||||||
|
|
||||||
function value (v) {
|
function value (v) {
|
||||||
"use strict";
|
'use strict';
|
||||||
return colors.COLOR_GREEN + v + colors.COLOR_RESET;
|
return colors.COLOR_GREEN + v + colors.COLOR_RESET;
|
||||||
}
|
}
|
||||||
|
|
||||||
function variable (v) {
|
function variable (v) {
|
||||||
"use strict";
|
'use strict';
|
||||||
if (v[0] === "#") {
|
if (v[0] === "#") {
|
||||||
return colors.COLOR_MAGENTA + v + colors.COLOR_RESET;
|
return colors.COLOR_MAGENTA + v + colors.COLOR_RESET;
|
||||||
}
|
}
|
||||||
|
@ -55,37 +54,37 @@ function variable (v) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function func (v) {
|
function func (v) {
|
||||||
"use strict";
|
'use strict';
|
||||||
return colors.COLOR_GREEN + v + colors.COLOR_RESET;
|
return colors.COLOR_GREEN + v + colors.COLOR_RESET;
|
||||||
}
|
}
|
||||||
|
|
||||||
function collection (v) {
|
function collection (v) {
|
||||||
"use strict";
|
'use strict';
|
||||||
return colors.COLOR_RED + v + colors.COLOR_RESET;
|
return colors.COLOR_RED + v + colors.COLOR_RESET;
|
||||||
}
|
}
|
||||||
|
|
||||||
function attribute (v) {
|
function attribute (v) {
|
||||||
"use strict";
|
'use strict';
|
||||||
return "`" + colors.COLOR_YELLOW + v + colors.COLOR_RESET + "`";
|
return "`" + colors.COLOR_YELLOW + v + colors.COLOR_RESET + "`";
|
||||||
}
|
}
|
||||||
|
|
||||||
function header (v) {
|
function header (v) {
|
||||||
"use strict";
|
'use strict';
|
||||||
return colors.COLOR_MAGENTA + v + colors.COLOR_RESET;
|
return colors.COLOR_MAGENTA + v + colors.COLOR_RESET;
|
||||||
}
|
}
|
||||||
|
|
||||||
function section (v) {
|
function section (v) {
|
||||||
"use strict";
|
'use strict';
|
||||||
return colors.COLOR_BOLD_BLUE + v + colors.COLOR_RESET;
|
return colors.COLOR_BOLD_BLUE + v + colors.COLOR_RESET;
|
||||||
}
|
}
|
||||||
|
|
||||||
function pad (n) {
|
function pad (n) {
|
||||||
"use strict";
|
'use strict';
|
||||||
return new Array(n).join(" ");
|
return new Array(n).join(" ");
|
||||||
}
|
}
|
||||||
|
|
||||||
function wrap (str, width) {
|
function wrap (str, width) {
|
||||||
"use strict";
|
'use strict';
|
||||||
var re = ".{1," + width + "}(\\s|$)|\\S+?(\\s|$)";
|
var re = ".{1," + width + "}(\\s|$)|\\S+?(\\s|$)";
|
||||||
return str.match(new RegExp(re, "g")).join("\n");
|
return str.match(new RegExp(re, "g")).join("\n");
|
||||||
}
|
}
|
||||||
|
@ -95,7 +94,7 @@ function wrap (str, width) {
|
||||||
|
|
||||||
/* print query string */
|
/* print query string */
|
||||||
function printQuery (query) {
|
function printQuery (query) {
|
||||||
"use strict";
|
'use strict';
|
||||||
print(section("Query string:"));
|
print(section("Query string:"));
|
||||||
print(" " + value(wrap(query, 100).replace(/\n/g, "\n ", query)));
|
print(" " + value(wrap(query, 100).replace(/\n/g, "\n ", query)));
|
||||||
print();
|
print();
|
||||||
|
@ -103,7 +102,7 @@ function printQuery (query) {
|
||||||
|
|
||||||
/* print write query modification flags */
|
/* print write query modification flags */
|
||||||
function printModificationFlags (flags) {
|
function printModificationFlags (flags) {
|
||||||
"use strict";
|
'use strict';
|
||||||
if (flags === undefined) {
|
if (flags === undefined) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -123,7 +122,7 @@ function printModificationFlags (flags) {
|
||||||
|
|
||||||
/* print optimizer rules */
|
/* print optimizer rules */
|
||||||
function printRules (rules) {
|
function printRules (rules) {
|
||||||
"use strict";
|
'use strict';
|
||||||
print(section("Optimization rules applied:"));
|
print(section("Optimization rules applied:"));
|
||||||
if (rules.length === 0) {
|
if (rules.length === 0) {
|
||||||
print(" " + value("none"));
|
print(" " + value("none"));
|
||||||
|
@ -140,7 +139,7 @@ function printRules (rules) {
|
||||||
|
|
||||||
/* print warnings */
|
/* print warnings */
|
||||||
function printWarnings (warnings) {
|
function printWarnings (warnings) {
|
||||||
"use strict";
|
'use strict';
|
||||||
if (! Array.isArray(warnings) || warnings.length === 0) {
|
if (! Array.isArray(warnings) || warnings.length === 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -156,7 +155,7 @@ function printWarnings (warnings) {
|
||||||
|
|
||||||
/* print indexes used */
|
/* print indexes used */
|
||||||
function printIndexes (indexes) {
|
function printIndexes (indexes) {
|
||||||
"use strict";
|
'use strict';
|
||||||
print(section("Indexes used:"));
|
print(section("Indexes used:"));
|
||||||
if (indexes.length === 0) {
|
if (indexes.length === 0) {
|
||||||
print(" " + value("none"));
|
print(" " + value("none"));
|
||||||
|
@ -224,7 +223,7 @@ function printIndexes (indexes) {
|
||||||
|
|
||||||
/* analzye and print execution plan */
|
/* analzye and print execution plan */
|
||||||
function processQuery (query, explain) {
|
function processQuery (query, explain) {
|
||||||
"use strict";
|
'use strict';
|
||||||
var nodes = { },
|
var nodes = { },
|
||||||
parents = { },
|
parents = { },
|
||||||
rootNode = null,
|
rootNode = null,
|
||||||
|
@ -584,7 +583,7 @@ function processQuery (query, explain) {
|
||||||
|
|
||||||
/* the exposed function */
|
/* the exposed function */
|
||||||
function explain (data, options) {
|
function explain (data, options) {
|
||||||
"use strict";
|
'use strict';
|
||||||
if (typeof data === "string") {
|
if (typeof data === "string") {
|
||||||
data = { query: data };
|
data = { query: data };
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
module.define("org/arangodb/aql/functions", function(exports, module) {
|
module.define("org/arangodb/aql/functions", function(exports, module) {
|
||||||
/*jshint strict: false */
|
/*jshint strict: false */
|
||||||
/*global require, exports */
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief AQL user functions management
|
/// @brief AQL user functions management
|
||||||
|
@ -48,7 +47,7 @@ var ArangoError = arangodb.ArangoError;
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
var getStorage = function () {
|
var getStorage = function () {
|
||||||
"use strict";
|
'use strict';
|
||||||
|
|
||||||
var functions = db._collection("_aqlfunctions");
|
var functions = db._collection("_aqlfunctions");
|
||||||
|
|
||||||
|
@ -68,7 +67,7 @@ var getStorage = function () {
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
var getFiltered = function (group) {
|
var getFiltered = function (group) {
|
||||||
"use strict";
|
'use strict';
|
||||||
|
|
||||||
var result = [ ];
|
var result = [ ];
|
||||||
|
|
||||||
|
@ -97,7 +96,7 @@ var getFiltered = function (group) {
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
var validateName = function (name) {
|
var validateName = function (name) {
|
||||||
"use strict";
|
'use strict';
|
||||||
|
|
||||||
if (typeof name !== 'string' ||
|
if (typeof name !== 'string' ||
|
||||||
! name.match(/^[a-zA-Z0-9_]+(::[a-zA-Z0-9_]+)+$/) ||
|
! name.match(/^[a-zA-Z0-9_]+(::[a-zA-Z0-9_]+)+$/) ||
|
||||||
|
@ -115,7 +114,7 @@ var validateName = function (name) {
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
var stringifyFunction = function (code, name) {
|
var stringifyFunction = function (code, name) {
|
||||||
"use strict";
|
'use strict';
|
||||||
|
|
||||||
if (typeof code === 'function') {
|
if (typeof code === 'function') {
|
||||||
code = String(code) + "\n";
|
code = String(code) + "\n";
|
||||||
|
@ -173,7 +172,7 @@ var stringifyFunction = function (code, name) {
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
var unregisterFunction = function (name) {
|
var unregisterFunction = function (name) {
|
||||||
"use strict";
|
'use strict';
|
||||||
|
|
||||||
var func = null;
|
var func = null;
|
||||||
|
|
||||||
|
@ -221,7 +220,7 @@ var unregisterFunction = function (name) {
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
var unregisterFunctionsGroup = function (group) {
|
var unregisterFunctionsGroup = function (group) {
|
||||||
"use strict";
|
'use strict';
|
||||||
|
|
||||||
if (group.length === 0) {
|
if (group.length === 0) {
|
||||||
var err = new ArangoError();
|
var err = new ArangoError();
|
||||||
|
@ -388,7 +387,7 @@ var registerFunction = function (name, code, isDeterministic) {
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
var toArrayFunctions = function (group) {
|
var toArrayFunctions = function (group) {
|
||||||
"use strict";
|
'use strict';
|
||||||
|
|
||||||
var result = [ ];
|
var result = [ ];
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
module.define("org/arangodb/aql/queries", function(exports, module) {
|
module.define("org/arangodb/aql/queries", function(exports, module) {
|
||||||
/*global require, exports */
|
'use strict';
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief AQL query management
|
/// @brief AQL query management
|
||||||
|
@ -40,8 +40,6 @@ var arangosh = require("org/arangodb/arangosh");
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
exports.clearSlow = function () {
|
exports.clearSlow = function () {
|
||||||
'use strict';
|
|
||||||
|
|
||||||
var db = internal.db;
|
var db = internal.db;
|
||||||
|
|
||||||
var requestResult = db._connection.DELETE("/_api/query/slow", "");
|
var requestResult = db._connection.DELETE("/_api/query/slow", "");
|
||||||
|
@ -55,8 +53,6 @@ exports.clearSlow = function () {
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
exports.slow = function () {
|
exports.slow = function () {
|
||||||
'use strict';
|
|
||||||
|
|
||||||
var db = internal.db;
|
var db = internal.db;
|
||||||
|
|
||||||
var requestResult = db._connection.GET("/_api/query/slow", "");
|
var requestResult = db._connection.GET("/_api/query/slow", "");
|
||||||
|
@ -70,8 +66,6 @@ exports.slow = function () {
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
exports.current = function () {
|
exports.current = function () {
|
||||||
'use strict';
|
|
||||||
|
|
||||||
var db = internal.db;
|
var db = internal.db;
|
||||||
|
|
||||||
var requestResult = db._connection.GET("/_api/query/current", "");
|
var requestResult = db._connection.GET("/_api/query/current", "");
|
||||||
|
@ -85,8 +79,6 @@ exports.current = function () {
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
exports.properties = function (config) {
|
exports.properties = function (config) {
|
||||||
'use strict';
|
|
||||||
|
|
||||||
var db = internal.db;
|
var db = internal.db;
|
||||||
|
|
||||||
var requestResult;
|
var requestResult;
|
||||||
|
@ -108,8 +100,6 @@ exports.properties = function (config) {
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
exports.kill = function (id) {
|
exports.kill = function (id) {
|
||||||
'use strict';
|
|
||||||
|
|
||||||
if (typeof id === 'object' &&
|
if (typeof id === 'object' &&
|
||||||
id.hasOwnProperty('id')) {
|
id.hasOwnProperty('id')) {
|
||||||
id = id.id;
|
id = id.id;
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
module.define("org/arangodb/arango-collection-common", function(exports, module) {
|
module.define("org/arangodb/arango-collection-common", function(exports, module) {
|
||||||
/*jshint strict: false, unused: false, maxlen: 200 */
|
/*jshint strict: false, unused: false, maxlen: 200 */
|
||||||
/*global require */
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief ArangoCollection
|
/// @brief ArangoCollection
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
module.define("org/arangodb/arango-collection", function(exports, module) {
|
module.define("org/arangodb/arango-collection", function(exports, module) {
|
||||||
/*jshint strict: false */
|
/*jshint strict: false */
|
||||||
/*global require, exports */
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief ArangoCollection
|
/// @brief ArangoCollection
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
module.define("org/arangodb/arango-database", function(exports, module) {
|
module.define("org/arangodb/arango-database", function(exports, module) {
|
||||||
/*jshint strict: false */
|
/*jshint strict: false */
|
||||||
/*global require, exports */
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief ArangoDatabase
|
/// @brief ArangoDatabase
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
module.define("org/arangodb/arango-query-cursor", function(exports, module) {
|
module.define("org/arangodb/arango-query-cursor", function(exports, module) {
|
||||||
/*jshint strict: false */
|
/*jshint strict: false */
|
||||||
/*global require, exports, more:true */
|
/*global more:true */
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief ArangoQueryCursor
|
/// @brief ArangoQueryCursor
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
module.define("org/arangodb/arango-statement-common", function(exports, module) {
|
module.define("org/arangodb/arango-statement-common", function(exports, module) {
|
||||||
/*jshint strict: false */
|
/*jshint strict: false */
|
||||||
/*global exports */
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief Arango statements
|
/// @brief Arango statements
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
module.define("org/arangodb/arango-statement", function(exports, module) {
|
module.define("org/arangodb/arango-statement", function(exports, module) {
|
||||||
/*jshint strict: false */
|
/*jshint strict: false */
|
||||||
/*global require, exports */
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief ArangoStatement
|
/// @brief ArangoStatement
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
module.define("org/arangodb/arangosh", function(exports, module) {
|
module.define("org/arangodb/arangosh", function(exports, module) {
|
||||||
/*jshint strict: false */
|
/*jshint strict: false */
|
||||||
/*global require, exports */
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief ArangoShell client API
|
/// @brief ArangoShell client API
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
module.define("org/arangodb/general-graph", function(exports, module) {
|
module.define("org/arangodb/general-graph", function(exports, module) {
|
||||||
/*jshint strict: false */
|
/*jshint strict: false */
|
||||||
/*global require, exports, ArangoClusterComm */
|
/*global ArangoClusterComm */
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief Graph functionality
|
/// @brief Graph functionality
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
module.define("org/arangodb/graph-blueprint", function(exports, module) {
|
module.define("org/arangodb/graph-blueprint", function(exports, module) {
|
||||||
/*jshint strict: false */
|
/*jshint strict: false */
|
||||||
/*global require, exports */
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief Graph functionality
|
/// @brief Graph functionality
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
module.define("org/arangodb/graph-common", function(exports, module) {
|
module.define("org/arangodb/graph-common", function(exports, module) {
|
||||||
/*jshint strict: false */
|
/*jshint strict: false */
|
||||||
/*global require, exports */
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief Graph functionality
|
/// @brief Graph functionality
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
module.define("org/arangodb/graph", function(exports, module) {
|
module.define("org/arangodb/graph", function(exports, module) {
|
||||||
/*jshint strict: false */
|
/*jshint strict: false */
|
||||||
/*global require, exports */
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief Graph functionality
|
/// @brief Graph functionality
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
module.define("org/arangodb/graph/traversal", function(exports, module) {
|
module.define("org/arangodb/graph/traversal", function(exports, module) {
|
||||||
/*jshint strict: false, unused: false */
|
/*jshint strict: false, unused: false */
|
||||||
/*global require, exports, ArangoClusterComm, AQL_QUERY_IS_KILLED */
|
/*global ArangoClusterComm, AQL_QUERY_IS_KILLED */
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief Traversal "classes"
|
/// @brief Traversal "classes"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
module.define("org/arangodb/is", function(exports, module) {
|
module.define("org/arangodb/is", function(exports, module) {
|
||||||
/*global exports */
|
'use strict';
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief Check if something is something
|
/// @brief Check if something is something
|
||||||
|
@ -29,28 +29,24 @@ module.define("org/arangodb/is", function(exports, module) {
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
// Check if a value is not undefined or null
|
// Check if a value is not undefined or null
|
||||||
var existy = function (x) {
|
function existy (x) {
|
||||||
"use strict";
|
|
||||||
return x !== null && x !== undefined;
|
return x !== null && x !== undefined;
|
||||||
};
|
}
|
||||||
|
|
||||||
// Check if a value is undefined or null
|
// Check if a value is undefined or null
|
||||||
var notExisty = function (x) {
|
function notExisty (x) {
|
||||||
"use strict";
|
|
||||||
return !existy(x);
|
return !existy(x);
|
||||||
};
|
}
|
||||||
|
|
||||||
// Check if a value is existy and not false
|
// Check if a value is existy and not false
|
||||||
var truthy = function (x) {
|
function truthy (x) {
|
||||||
"use strict";
|
|
||||||
return (x !== false) && existy(x);
|
return (x !== false) && existy(x);
|
||||||
};
|
}
|
||||||
|
|
||||||
// Check if a value is not truthy
|
// Check if a value is not truthy
|
||||||
var falsy = function (x) {
|
function falsy (x) {
|
||||||
"use strict";
|
|
||||||
return !truthy(x);
|
return !truthy(x);
|
||||||
};
|
}
|
||||||
|
|
||||||
// is.object, is.noObject, is.array, is.noArray...
|
// is.object, is.noObject, is.array, is.noArray...
|
||||||
[
|
[
|
||||||
|
@ -63,12 +59,11 @@ var falsy = function (x) {
|
||||||
'String',
|
'String',
|
||||||
'RegExp'
|
'RegExp'
|
||||||
].forEach(function(type) {
|
].forEach(function(type) {
|
||||||
"use strict";
|
exports[type.toLowerCase()] = function (obj) {
|
||||||
exports[type.toLowerCase()] = function(obj) {
|
|
||||||
return Object.prototype.toString.call(obj) === '[object '+type+']';
|
return Object.prototype.toString.call(obj) === '[object '+type+']';
|
||||||
};
|
};
|
||||||
|
|
||||||
exports["no" + type] = function(obj) {
|
exports["no" + type] = function (obj) {
|
||||||
return Object.prototype.toString.call(obj) !== '[object '+type+']';
|
return Object.prototype.toString.call(obj) !== '[object '+type+']';
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
|
@ -6,7 +6,6 @@ module.define("org/arangodb/mimetypes", function(exports, module) {
|
||||||
vars: true,
|
vars: true,
|
||||||
white: true,
|
white: true,
|
||||||
plusplus: true */
|
plusplus: true */
|
||||||
/*global exports */
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief auto-generated file generated from mimetypes.dat
|
/// @brief auto-generated file generated from mimetypes.dat
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
module.define("org/arangodb/replication", function(exports, module) {
|
module.define("org/arangodb/replication", function(exports, module) {
|
||||||
/*global require, exports */
|
'use strict';
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief Replication management
|
/// @brief Replication management
|
||||||
|
@ -47,8 +47,6 @@ var applier = { };
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
logger.state = function () {
|
logger.state = function () {
|
||||||
'use strict';
|
|
||||||
|
|
||||||
var db = internal.db;
|
var db = internal.db;
|
||||||
|
|
||||||
var requestResult = db._connection.GET("/_api/replication/logger-state");
|
var requestResult = db._connection.GET("/_api/replication/logger-state");
|
||||||
|
@ -62,8 +60,6 @@ logger.state = function () {
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
applier.start = function (initialTick) {
|
applier.start = function (initialTick) {
|
||||||
'use strict';
|
|
||||||
|
|
||||||
var db = internal.db;
|
var db = internal.db;
|
||||||
var append = "";
|
var append = "";
|
||||||
|
|
||||||
|
@ -82,8 +78,6 @@ applier.start = function (initialTick) {
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
applier.stop = applier.shutdown = function () {
|
applier.stop = applier.shutdown = function () {
|
||||||
'use strict';
|
|
||||||
|
|
||||||
var db = internal.db;
|
var db = internal.db;
|
||||||
|
|
||||||
var requestResult = db._connection.PUT("/_api/replication/applier-stop", "");
|
var requestResult = db._connection.PUT("/_api/replication/applier-stop", "");
|
||||||
|
@ -97,8 +91,6 @@ applier.stop = applier.shutdown = function () {
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
applier.state = function () {
|
applier.state = function () {
|
||||||
'use strict';
|
|
||||||
|
|
||||||
var db = internal.db;
|
var db = internal.db;
|
||||||
|
|
||||||
var requestResult = db._connection.GET("/_api/replication/applier-state");
|
var requestResult = db._connection.GET("/_api/replication/applier-state");
|
||||||
|
@ -112,8 +104,6 @@ applier.state = function () {
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
applier.forget = function () {
|
applier.forget = function () {
|
||||||
'use strict';
|
|
||||||
|
|
||||||
var db = internal.db;
|
var db = internal.db;
|
||||||
|
|
||||||
var requestResult = db._connection.DELETE("/_api/replication/applier-state");
|
var requestResult = db._connection.DELETE("/_api/replication/applier-state");
|
||||||
|
@ -127,8 +117,6 @@ applier.forget = function () {
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
applier.properties = function (config) {
|
applier.properties = function (config) {
|
||||||
'use strict';
|
|
||||||
|
|
||||||
var db = internal.db;
|
var db = internal.db;
|
||||||
|
|
||||||
var requestResult;
|
var requestResult;
|
||||||
|
@ -154,8 +142,6 @@ applier.properties = function (config) {
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
var sync = function (config) {
|
var sync = function (config) {
|
||||||
'use strict';
|
|
||||||
|
|
||||||
var db = internal.db;
|
var db = internal.db;
|
||||||
|
|
||||||
var body = JSON.stringify(config || { });
|
var body = JSON.stringify(config || { });
|
||||||
|
@ -171,8 +157,6 @@ var sync = function (config) {
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
var serverId = function () {
|
var serverId = function () {
|
||||||
'use strict';
|
|
||||||
|
|
||||||
var db = internal.db;
|
var db = internal.db;
|
||||||
|
|
||||||
var requestResult = db._connection.GET("/_api/replication/server-id");
|
var requestResult = db._connection.GET("/_api/replication/server-id");
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
module.define("org/arangodb/simple-query-common", function(exports, module) {
|
module.define("org/arangodb/simple-query-common", function(exports, module) {
|
||||||
/*jshint strict: false */
|
/*jshint strict: false */
|
||||||
/*global require, exports */
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief Arango Simple Query Language
|
/// @brief Arango Simple Query Language
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
module.define("org/arangodb/simple-query", function(exports, module) {
|
module.define("org/arangodb/simple-query", function(exports, module) {
|
||||||
/*jshint strict: false */
|
/*jshint strict: false */
|
||||||
/*global require, exports */
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief Arango Simple Query Language
|
/// @brief Arango Simple Query Language
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
module.define("org/arangodb/tutorial", function(exports, module) {
|
module.define("org/arangodb/tutorial", function(exports, module) {
|
||||||
/*jshint strict: false */
|
/*jshint strict: false */
|
||||||
/*global require, exports */
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief Shell tutorial
|
/// @brief Shell tutorial
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*jshint strict: false, unused: false */
|
/*jshint node:false, browser:true, strict: false, unused: false */
|
||||||
/*global $, jqconsole, window, document */
|
/*global global:true, $, jqconsole */
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief ArangoDB web browser shell
|
/// @brief ArangoDB web browser shell
|
||||||
|
@ -67,6 +67,10 @@ Module.prototype.moduleCache["/internal"] = new Module("/internal");
|
||||||
// --SECTION-- public variables
|
// --SECTION-- public variables
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
if (typeof global === 'undefined' && typeof window !== 'undefined') {
|
||||||
|
global = window;
|
||||||
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @addtogroup ArangoShell
|
/// @addtogroup ArangoShell
|
||||||
/// @{
|
/// @{
|
||||||
|
@ -76,7 +80,7 @@ Module.prototype.moduleCache["/internal"] = new Module("/internal");
|
||||||
/// @brief module
|
/// @brief module
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
var module = Module.prototype.moduleCache["/"] = new Module("/");
|
global.module = Module.prototype.moduleCache["/"] = new Module("/");
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @}
|
/// @}
|
||||||
|
@ -201,7 +205,7 @@ Module.prototype.require = function (path) {
|
||||||
};
|
};
|
||||||
|
|
||||||
function require (path) {
|
function require (path) {
|
||||||
return module.require(path);
|
return global.module.require(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*jshint browser: true */
|
/*jshint browser: true */
|
||||||
/*jshint unused: false */
|
/*jshint unused: false */
|
||||||
/*global require, exports, Backbone, EJS, $, window, arangoHelper, templateEngine */
|
/*global Backbone, EJS, $, window, arangoHelper, templateEngine */
|
||||||
|
|
||||||
(function() {
|
(function() {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*jshint browser: true */
|
/*jshint browser: true */
|
||||||
/*jshint unused: false */
|
/*jshint unused: false */
|
||||||
/*global require, exports, Backbone, EJS, window, SwaggerUi, hljs, document, $, arango */
|
/*global Backbone, EJS, window, SwaggerUi, hljs, document, $, arango */
|
||||||
/*global templateEngine*/
|
/*global templateEngine*/
|
||||||
|
|
||||||
(function() {
|
(function() {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*jshint browser: true */
|
/*jshint browser: true */
|
||||||
/*jshint unused: false */
|
/*jshint unused: false */
|
||||||
/*global require, window, exports, Backbone, EJS, $, templateEngine, arangoHelper, Joi*/
|
/*global window, exports, Backbone, EJS, $, templateEngine, arangoHelper, Joi*/
|
||||||
|
|
||||||
(function() {
|
(function() {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*jshint browser: true */
|
/*jshint browser: true */
|
||||||
/*jshint unused: false */
|
/*jshint unused: false */
|
||||||
/*global require, exports, Backbone, EJS, $, flush, window, arangoHelper, nv, d3, localStorage*/
|
/*global Backbone, EJS, $, flush, window, arangoHelper, nv, d3, localStorage*/
|
||||||
/*global document, console, Dygraph, _,templateEngine */
|
/*global document, console, Dygraph, _,templateEngine */
|
||||||
|
|
||||||
(function () {
|
(function () {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*jshint browser: true */
|
/*jshint browser: true */
|
||||||
/*jshint unused: false */
|
/*jshint unused: false */
|
||||||
/*global require, exports, Backbone, EJS, $, window, arangoHelper, jsoneditor, templateEngine */
|
/*global Backbone, EJS, $, window, arangoHelper, jsoneditor, templateEngine */
|
||||||
/*global document, _ */
|
/*global document, _ */
|
||||||
|
|
||||||
(function() {
|
(function() {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*jshint browser: true */
|
/*jshint browser: true */
|
||||||
/*jshint unused: false */
|
/*jshint unused: false */
|
||||||
/*global require, arangoHelper, _, $, window, arangoHelper, templateEngine, Joi, btoa */
|
/*global arangoHelper, _, $, window, arangoHelper, templateEngine, Joi, btoa */
|
||||||
|
|
||||||
(function() {
|
(function() {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*jshint browser: true */
|
/*jshint browser: true */
|
||||||
/*global require, $, Joi, _, alert, templateEngine*/
|
/*global $, Joi, _, alert, templateEngine*/
|
||||||
(function() {
|
(function() {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*jshint browser: true */
|
/*jshint browser: true */
|
||||||
/*jshint unused: false */
|
/*jshint unused: false */
|
||||||
/*global require, exports, Backbone, EJS, arangoHelper, window, setTimeout, $, templateEngine*/
|
/*global Backbone, EJS, arangoHelper, window, setTimeout, $, templateEngine*/
|
||||||
|
|
||||||
(function() {
|
(function() {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*jshint browser: true */
|
/*jshint browser: true */
|
||||||
/*jshint unused: false */
|
/*jshint unused: false */
|
||||||
/*global require, exports, Backbone, EJS, $, setTimeout, localStorage, ace, Storage, window, _ */
|
/*global Backbone, EJS, $, setTimeout, localStorage, ace, Storage, window, _ */
|
||||||
/*global _, arangoHelper, templateEngine, jQuery, Joi*/
|
/*global _, arangoHelper, templateEngine, jQuery, Joi*/
|
||||||
|
|
||||||
(function () {
|
(function () {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*jshint browser: true */
|
/*jshint browser: true */
|
||||||
/*jshint unused: false */
|
/*jshint unused: false */
|
||||||
/*global require, exports, Backbone, EJS, $, setTimeout, localStorage, ace, Storage, window, _, console */
|
/*global Backbone, EJS, $, setTimeout, localStorage, ace, Storage, window, _, console */
|
||||||
/*global _, arangoHelper, templateEngine, jQuery, Joi, d3*/
|
/*global _, arangoHelper, templateEngine, jQuery, Joi, d3*/
|
||||||
|
|
||||||
(function () {
|
(function () {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*jshint browser: true, evil: true */
|
/*jshint browser: true, evil: true */
|
||||||
/*jshint unused: false */
|
/*jshint unused: false */
|
||||||
/*global require, exports, Backbone, EJS, $, window, ace, jqconsole, handler, help, location*/
|
/*global Backbone, EJS, $, window, ace, jqconsole, handler, help, location*/
|
||||||
/*global templateEngine*/
|
/*global templateEngine*/
|
||||||
|
|
||||||
(function() {
|
(function() {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/*global exports, appCollection*/
|
/*global appCollection*/
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief The default thumbnail for foxx apps
|
/// @brief The default thumbnail for foxx apps
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/*global exports, appCollection*/
|
/*global appCollection*/
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief A TODO-List Foxx-Application written for ArangoDB
|
/// @brief A TODO-List Foxx-Application written for ArangoDB
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
/*global exports, require*/
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief functionality to expose API documentation for Foxx apps
|
/// @brief functionality to expose API documentation for Foxx apps
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
/*jslint indent: 2, nomen: true, maxlen: 100 */
|
/*jslint indent: 2, nomen: true, maxlen: 100 */
|
||||||
/*global require, exports */
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief A configuration model for foxx templates
|
/// @brief A configuration model for foxx templates
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
/*global require, exports*/
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief A TODO-List Foxx-Application written for ArangoDB
|
/// @brief A TODO-List Foxx-Application written for ArangoDB
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/*global require, applicationContext, ArangoServerState, ArangoClusterInfo, ArangoClusterComm*/
|
/*global applicationContext, ArangoServerState, ArangoClusterInfo, ArangoClusterComm*/
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief A Foxx.Controller to handle the statistics
|
/// @brief A Foxx.Controller to handle the statistics
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*jshint browser: true */
|
/*jshint browser: true */
|
||||||
/*jshint unused: false */
|
/*jshint unused: false */
|
||||||
/*global require, describe, beforeEach, it, expect, exports, Backbone, window, $, arangoLog */
|
/*global describe, beforeEach, it, expect, exports, Backbone, window, $, arangoLog */
|
||||||
/*global runs, waitsFor, spyOn, jasmine */
|
/*global runs, waitsFor, spyOn, jasmine */
|
||||||
(function () {
|
(function () {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/*jshint unused: false */
|
/*jshint globalstrict:false, unused: false */
|
||||||
/*global document, window, d3*/
|
/*global document, window, d3*/
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/*jshint unused: false */
|
/*jshint globalstrict:false, unused: false */
|
||||||
/*global document, window, $*/
|
/*global document, window, $*/
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/*jshint unused: false */
|
/*jshint globalstrict:false, unused: false */
|
||||||
/*global document, window*/
|
/*global document, window*/
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/*jshint unused: false */
|
/*jshint globalstrict:false, unused: false */
|
||||||
/*global _, document, window*/
|
/*global _, document, window*/
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/*jshint unused: false */
|
/*jshint globalstrict:false, unused: false */
|
||||||
/*global expect, _, $ */
|
/*global expect, _, $ */
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/*global require, applicationContext*/
|
/*global applicationContext*/
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief A Foxx.Controller to show all Foxx Applications
|
/// @brief A Foxx.Controller to show all Foxx Applications
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/*global require, applicationContext */
|
/*global applicationContext */
|
||||||
(function () {
|
(function () {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/*global require, applicationContext */
|
/*global applicationContext */
|
||||||
(function () {
|
(function () {
|
||||||
'use strict';
|
'use strict';
|
||||||
var _ = require('underscore'),
|
var _ = require('underscore'),
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
/*jshint globalstrict:true */
|
|
||||||
/*global exports */
|
|
||||||
'use strict';
|
'use strict';
|
||||||
function SessionNotFound(sid) {
|
function SessionNotFound(sid) {
|
||||||
this.message = 'Session with session id ' + sid + ' not found.';
|
this.message = 'Session with session id ' + sid + ' not found.';
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/*global require, applicationContext */
|
/*global applicationContext */
|
||||||
(function () {
|
(function () {
|
||||||
'use strict';
|
'use strict';
|
||||||
var db = require('org/arangodb').db,
|
var db = require('org/arangodb').db,
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/*global require, exports, applicationContext */
|
/*global applicationContext */
|
||||||
(function () {
|
(function () {
|
||||||
'use strict';
|
'use strict';
|
||||||
var _ = require('underscore'),
|
var _ = require('underscore'),
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/*global require, describe, it */
|
/*global describe, it */
|
||||||
(function () {
|
(function () {
|
||||||
'use strict';
|
'use strict';
|
||||||
var expect = require('expect.js'),
|
var expect = require('expect.js'),
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue