Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
]).then(results => {
const [statusRes, res] = results;
const stardogVersion = statusRes.body['dbms.version'].value;
expect(res.status).toBe(200);
expect(res.body).toHaveProperty('data');
expect(res.body.data).toEqual({
sparql:
'SELECT *\nFROM \n{\n?0 rdf:type :Character .\n?0 :name ?1 .\n}\n',
fields: { '0': { '1': 'name' } },
// > 6.1.3 captures snapshot versions of 6.1.4
plan: semver.gt(stardogVersion, '6.1.3')
? {
dataset: { from: 'all' },
plan: jsonPlan,
prefixes: { '': 'http://api.stardog.com/' },
}
: textPlan,
});
}));
// DB
require('dbms').init(CONF.database, null, ERROR('DBMS'));
// Constants
const Fs = require('fs');
const DB_ONLINE = { online: true };
const DB_OFFLINE = { online: false };
const DB_LOGGED = { online: true };
const DDOS_MAX_ATTEMPS = 10;
var OTP = {};
var OTPCOUNT = 0;
var SIMPLECACHE = {};
var DDOS = {};
MAIN.id = 0; // Current ID of OpenPlatform
MAIN.version = 4400; // Current version of OpenPlatform
// MAIN.guest // Contains a guest user instance
require('dbms').init(CONF.database, null, ERROR('DBMS'));
const Fs = require('fs');
FUNC.apps = {};
FUNC.users = {};
FUNC.settings = {};
FUNC.notifications = {};
FUNC.files = {};
FUNC.badges = {};
FUNC.configs = {};
// ====================================
// Users
// ====================================
var MODEL_FAVORITE = {};
const Fs = require('fs');
require('dbms').init(CONF.database);
FUNC.apps = {};
FUNC.users = {};
FUNC.sessions = {};
FUNC.common = {};
FUNC.settings = {};
FUNC.notifications = {};
FUNC.files = {};
FUNC.badges = {};
FUNC.configs = {};
// ====================================
// Users
// ====================================
FUNC.users.set = function(user, fields, callback, app) {
require('dbms').init(CONF.database, ERROR('DBMS'));
export const getActiveDbName = state =>
((state[NAME] || {}).settings || {})['dbms.active_database']
/**