mirror of https://gitee.com/bigwinds/arangodb
simplifications
This commit is contained in:
parent
391e9b1693
commit
beaf3acbd3
|
@ -609,22 +609,6 @@ Module._extensions['.coffee'] = function(module, filename) {
|
||||||
module._compile(cs.compile(stripBOM(content), {bare: true}), filename);
|
module._compile(cs.compile(stripBOM(content), {bare: true}), filename);
|
||||||
};
|
};
|
||||||
|
|
||||||
// backwards compatibility
|
|
||||||
Module._oldAppPath = function () {
|
|
||||||
if (internal.appPath === undefined) {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
return fs.join(internal.appPath, 'databases', internal.db._name());
|
|
||||||
};
|
|
||||||
|
|
||||||
// backwards compatibility
|
|
||||||
Module._devAppPath = function () {
|
|
||||||
if (internal.devAppPath === undefined) {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
return fs.join(internal.devAppPath, 'databases', internal.db._name());
|
|
||||||
};
|
|
||||||
|
|
||||||
// backwards compatibility
|
// backwards compatibility
|
||||||
Module.Module = Module;
|
Module.Module = Module;
|
||||||
|
|
||||||
|
|
|
@ -39,8 +39,8 @@
|
||||||
var internal = require("internal");
|
var internal = require("internal");
|
||||||
var fs = require("fs");
|
var fs = require("fs");
|
||||||
var console = require("console");
|
var console = require("console");
|
||||||
var Module = require('module');
|
|
||||||
var userManager = require("org/arangodb/users");
|
var userManager = require("org/arangodb/users");
|
||||||
|
var FoxxService = require("org/arangodb/foxx/service");
|
||||||
require("org/arangodb/cluster"); // TODO Is this unused or magic?
|
require("org/arangodb/cluster"); // TODO Is this unused or magic?
|
||||||
var currentVersion = require("org/arangodb/database-version").CURRENT_VERSION;
|
var currentVersion = require("org/arangodb/database-version").CURRENT_VERSION;
|
||||||
var sprintf = internal.sprintf;
|
var sprintf = internal.sprintf;
|
||||||
|
@ -1324,7 +1324,7 @@
|
||||||
var appsToZip = aal.byExample({type: "app", isSystem: false});
|
var appsToZip = aal.byExample({type: "app", isSystem: false});
|
||||||
while (appsToZip.hasNext()) {
|
while (appsToZip.hasNext()) {
|
||||||
tmp = appsToZip.next();
|
tmp = appsToZip.next();
|
||||||
path = fs.join(Module._oldAppPath(), tmp.path);
|
path = fs.join(FoxxService._oldAppPath, tmp.path);
|
||||||
try {
|
try {
|
||||||
mapAppZip[tmp.app] = fmUtils.zipDirectory(path);
|
mapAppZip[tmp.app] = fmUtils.zipDirectory(path);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
@ -1334,7 +1334,7 @@
|
||||||
|
|
||||||
// 2. If development mode, Zip all development APPs and create a map name => zipFile
|
// 2. If development mode, Zip all development APPs and create a map name => zipFile
|
||||||
|
|
||||||
var devPath = Module._devAppPath();
|
var devPath = FoxxService._devAppPath;
|
||||||
var mapDevAppZip = {};
|
var mapDevAppZip = {};
|
||||||
var i;
|
var i;
|
||||||
if (devPath !== undefined) {
|
if (devPath !== undefined) {
|
||||||
|
@ -1354,7 +1354,7 @@
|
||||||
// 3. Remove old appPath
|
// 3. Remove old appPath
|
||||||
|
|
||||||
try {
|
try {
|
||||||
fs.removeDirectoryRecursive(Module._oldAppPath(), true);
|
fs.removeDirectoryRecursive(FoxxService._oldAppPath, true);
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue