@andersbakken/fisk 3.6.0 → 3.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/VM_runtime.js +422 -548
- package/dist/VM_runtime.js.map +1 -1
- package/dist/fisk-scheduler.js +268 -106
- package/dist/fisk-scheduler.js.map +1 -1
- package/package.json +6 -3
package/dist/fisk-scheduler.js
CHANGED
|
@@ -6,7 +6,7 @@ var assert$1 = require('assert');
|
|
|
6
6
|
var require$$0$3 = require('constants');
|
|
7
7
|
var require$$0$4 = require('stream');
|
|
8
8
|
var require$$4$1 = require('util');
|
|
9
|
-
var path$
|
|
9
|
+
var path$m = require('path');
|
|
10
10
|
var require$$1$1 = require('os');
|
|
11
11
|
var child_process = require('child_process');
|
|
12
12
|
var crypto$1 = require('crypto');
|
|
@@ -30,7 +30,7 @@ var assert__default = /*#__PURE__*/_interopDefaultLegacy(assert$1);
|
|
|
30
30
|
var require$$0__default = /*#__PURE__*/_interopDefaultLegacy(require$$0$3);
|
|
31
31
|
var require$$0__default$1 = /*#__PURE__*/_interopDefaultLegacy(require$$0$4);
|
|
32
32
|
var require$$4__default = /*#__PURE__*/_interopDefaultLegacy(require$$4$1);
|
|
33
|
-
var path__default = /*#__PURE__*/_interopDefaultLegacy(path$
|
|
33
|
+
var path__default = /*#__PURE__*/_interopDefaultLegacy(path$m);
|
|
34
34
|
var require$$1__default = /*#__PURE__*/_interopDefaultLegacy(require$$1$1);
|
|
35
35
|
var child_process__default = /*#__PURE__*/_interopDefaultLegacy(child_process);
|
|
36
36
|
var crypto__default = /*#__PURE__*/_interopDefaultLegacy(crypto$1);
|
|
@@ -1318,11 +1318,11 @@ function retry () {
|
|
|
1318
1318
|
};
|
|
1319
1319
|
} (fs$n));
|
|
1320
1320
|
|
|
1321
|
-
const path$
|
|
1321
|
+
const path$l = path__default["default"];
|
|
1322
1322
|
|
|
1323
1323
|
// get drive on windows
|
|
1324
1324
|
function getRootPath (p) {
|
|
1325
|
-
p = path$
|
|
1325
|
+
p = path$l.normalize(path$l.resolve(p)).split(path$l.sep);
|
|
1326
1326
|
if (p.length > 0) return p[0]
|
|
1327
1327
|
return null
|
|
1328
1328
|
}
|
|
@@ -1343,7 +1343,7 @@ var win32 = {
|
|
|
1343
1343
|
};
|
|
1344
1344
|
|
|
1345
1345
|
const fs$l = gracefulFs;
|
|
1346
|
-
const path$
|
|
1346
|
+
const path$k = path__default["default"];
|
|
1347
1347
|
const invalidWin32Path$1 = win32.invalidWin32Path;
|
|
1348
1348
|
|
|
1349
1349
|
const o777$1 = parseInt('0777', 8);
|
|
@@ -1371,7 +1371,7 @@ function mkdirs$2 (p, opts, callback, made) {
|
|
|
1371
1371
|
if (!made) made = null;
|
|
1372
1372
|
|
|
1373
1373
|
callback = callback || function () {};
|
|
1374
|
-
p = path$
|
|
1374
|
+
p = path$k.resolve(p);
|
|
1375
1375
|
|
|
1376
1376
|
xfs.mkdir(p, mode, er => {
|
|
1377
1377
|
if (!er) {
|
|
@@ -1380,8 +1380,8 @@ function mkdirs$2 (p, opts, callback, made) {
|
|
|
1380
1380
|
}
|
|
1381
1381
|
switch (er.code) {
|
|
1382
1382
|
case 'ENOENT':
|
|
1383
|
-
if (path$
|
|
1384
|
-
mkdirs$2(path$
|
|
1383
|
+
if (path$k.dirname(p) === p) return callback(er)
|
|
1384
|
+
mkdirs$2(path$k.dirname(p), opts, (er, made) => {
|
|
1385
1385
|
if (er) callback(er, made);
|
|
1386
1386
|
else mkdirs$2(p, opts, callback, made);
|
|
1387
1387
|
});
|
|
@@ -1405,7 +1405,7 @@ function mkdirs$2 (p, opts, callback, made) {
|
|
|
1405
1405
|
var mkdirs_1$1 = mkdirs$2;
|
|
1406
1406
|
|
|
1407
1407
|
const fs$k = gracefulFs;
|
|
1408
|
-
const path$
|
|
1408
|
+
const path$j = path__default["default"];
|
|
1409
1409
|
const invalidWin32Path = win32.invalidWin32Path;
|
|
1410
1410
|
|
|
1411
1411
|
const o777 = parseInt('0777', 8);
|
|
@@ -1429,15 +1429,15 @@ function mkdirsSync$2 (p, opts, made) {
|
|
|
1429
1429
|
}
|
|
1430
1430
|
if (!made) made = null;
|
|
1431
1431
|
|
|
1432
|
-
p = path$
|
|
1432
|
+
p = path$j.resolve(p);
|
|
1433
1433
|
|
|
1434
1434
|
try {
|
|
1435
1435
|
xfs.mkdirSync(p, mode);
|
|
1436
1436
|
made = made || p;
|
|
1437
1437
|
} catch (err0) {
|
|
1438
1438
|
if (err0.code === 'ENOENT') {
|
|
1439
|
-
if (path$
|
|
1440
|
-
made = mkdirsSync$2(path$
|
|
1439
|
+
if (path$j.dirname(p) === p) throw err0
|
|
1440
|
+
made = mkdirsSync$2(path$j.dirname(p), opts, made);
|
|
1441
1441
|
mkdirsSync$2(p, opts, made);
|
|
1442
1442
|
} else {
|
|
1443
1443
|
// In the case of any other error, just see if there's a dir there
|
|
@@ -1473,12 +1473,12 @@ var mkdirs_1 = {
|
|
|
1473
1473
|
|
|
1474
1474
|
const fs$j = gracefulFs;
|
|
1475
1475
|
const os = require$$1__default["default"];
|
|
1476
|
-
const path$
|
|
1476
|
+
const path$i = path__default["default"];
|
|
1477
1477
|
|
|
1478
1478
|
// HFS, ext{2,3}, FAT do not, Node.js v0.10 does not
|
|
1479
1479
|
function hasMillisResSync () {
|
|
1480
|
-
let tmpfile = path$
|
|
1481
|
-
tmpfile = path$
|
|
1480
|
+
let tmpfile = path$i.join('millis-test-sync' + Date.now().toString() + Math.random().toString().slice(2));
|
|
1481
|
+
tmpfile = path$i.join(os.tmpdir(), tmpfile);
|
|
1482
1482
|
|
|
1483
1483
|
// 550 millis past UNIX epoch
|
|
1484
1484
|
const d = new Date(1435410243862);
|
|
@@ -1490,8 +1490,8 @@ function hasMillisResSync () {
|
|
|
1490
1490
|
}
|
|
1491
1491
|
|
|
1492
1492
|
function hasMillisRes (callback) {
|
|
1493
|
-
let tmpfile = path$
|
|
1494
|
-
tmpfile = path$
|
|
1493
|
+
let tmpfile = path$i.join('millis-test' + Date.now().toString() + Math.random().toString().slice(2));
|
|
1494
|
+
tmpfile = path$i.join(os.tmpdir(), tmpfile);
|
|
1495
1495
|
|
|
1496
1496
|
// 550 millis past UNIX epoch
|
|
1497
1497
|
const d = new Date(1435410243862);
|
|
@@ -1562,7 +1562,7 @@ var buffer$1 = function (size) {
|
|
|
1562
1562
|
};
|
|
1563
1563
|
|
|
1564
1564
|
const fs$i = gracefulFs;
|
|
1565
|
-
const path$
|
|
1565
|
+
const path$h = path__default["default"];
|
|
1566
1566
|
const mkdirpSync$1 = mkdirs_1.mkdirsSync;
|
|
1567
1567
|
const utimesSync = utimes$1.utimesMillisSync;
|
|
1568
1568
|
|
|
@@ -1588,7 +1588,7 @@ function copySync$2 (src, dest, opts) {
|
|
|
1588
1588
|
|
|
1589
1589
|
if (opts.filter && !opts.filter(src, dest)) return
|
|
1590
1590
|
|
|
1591
|
-
const destParent = path$
|
|
1591
|
+
const destParent = path$h.dirname(dest);
|
|
1592
1592
|
if (!fs$i.existsSync(destParent)) mkdirpSync$1(destParent);
|
|
1593
1593
|
return startCopy$1(resolvedDest, src, dest, opts)
|
|
1594
1594
|
}
|
|
@@ -1689,8 +1689,8 @@ function copyDir$1 (src, dest, opts) {
|
|
|
1689
1689
|
}
|
|
1690
1690
|
|
|
1691
1691
|
function copyDirItem$1 (item, src, dest, opts) {
|
|
1692
|
-
const srcItem = path$
|
|
1693
|
-
const destItem = path$
|
|
1692
|
+
const srcItem = path$h.join(src, item);
|
|
1693
|
+
const destItem = path$h.join(dest, item);
|
|
1694
1694
|
const resolvedDest = checkPaths$1(srcItem, destItem);
|
|
1695
1695
|
return startCopy$1(resolvedDest, srcItem, destItem, opts)
|
|
1696
1696
|
}
|
|
@@ -1699,7 +1699,7 @@ function onLink$1 (resolvedDest, src, dest, opts) {
|
|
|
1699
1699
|
let resolvedSrc = fs$i.readlinkSync(src);
|
|
1700
1700
|
|
|
1701
1701
|
if (opts.dereference) {
|
|
1702
|
-
resolvedSrc = path$
|
|
1702
|
+
resolvedSrc = path$h.resolve(process.cwd(), resolvedSrc);
|
|
1703
1703
|
}
|
|
1704
1704
|
|
|
1705
1705
|
if (resolvedDest === notExist$1 || resolvedDest === existsReg$1) {
|
|
@@ -1708,7 +1708,7 @@ function onLink$1 (resolvedDest, src, dest, opts) {
|
|
|
1708
1708
|
return fs$i.symlinkSync(resolvedSrc, dest)
|
|
1709
1709
|
} else {
|
|
1710
1710
|
if (opts.dereference) {
|
|
1711
|
-
resolvedDest = path$
|
|
1711
|
+
resolvedDest = path$h.resolve(process.cwd(), resolvedDest);
|
|
1712
1712
|
}
|
|
1713
1713
|
if (pathsAreIdentical$1(resolvedSrc, resolvedDest)) return
|
|
1714
1714
|
|
|
@@ -1730,8 +1730,8 @@ function copyLink$1 (resolvedSrc, dest) {
|
|
|
1730
1730
|
// return true if dest is a subdir of src, otherwise false.
|
|
1731
1731
|
// extract dest base dir and check if that is the same as src basename.
|
|
1732
1732
|
function isSrcSubdir$3 (src, dest) {
|
|
1733
|
-
const srcArray = path$
|
|
1734
|
-
const destArray = path$
|
|
1733
|
+
const srcArray = path$h.resolve(src).split(path$h.sep);
|
|
1734
|
+
const destArray = path$h.resolve(dest).split(path$h.sep);
|
|
1735
1735
|
|
|
1736
1736
|
return srcArray.reduce((acc, current, i) => {
|
|
1737
1737
|
return acc && destArray[i] === current
|
|
@@ -1756,8 +1756,8 @@ function checkDest$1 (dest) {
|
|
|
1756
1756
|
|
|
1757
1757
|
function pathsAreIdentical$1 (src, dest) {
|
|
1758
1758
|
const os = process.platform;
|
|
1759
|
-
const resolvedSrc = path$
|
|
1760
|
-
const resolvedDest = path$
|
|
1759
|
+
const resolvedSrc = path$h.resolve(src);
|
|
1760
|
+
const resolvedDest = path$h.resolve(dest);
|
|
1761
1761
|
// case-insensitive paths
|
|
1762
1762
|
if (os === 'darwin' || os === 'win32') {
|
|
1763
1763
|
return resolvedSrc.toLowerCase() === resolvedDest.toLowerCase()
|
|
@@ -1796,7 +1796,7 @@ var pathExists_1 = {
|
|
|
1796
1796
|
};
|
|
1797
1797
|
|
|
1798
1798
|
const fs$g = gracefulFs;
|
|
1799
|
-
const path$
|
|
1799
|
+
const path$g = path__default["default"];
|
|
1800
1800
|
const mkdirp$1 = mkdirs_1.mkdirs;
|
|
1801
1801
|
const pathExists$7 = pathExists_1.pathExists;
|
|
1802
1802
|
const utimes = utimes$1.utimesMillis;
|
|
@@ -1832,7 +1832,7 @@ function copy$2 (src, dest, opts, cb) {
|
|
|
1832
1832
|
}
|
|
1833
1833
|
|
|
1834
1834
|
function checkParentDir (resolvedDest, src, dest, opts, cb) {
|
|
1835
|
-
const destParent = path$
|
|
1835
|
+
const destParent = path$g.dirname(dest);
|
|
1836
1836
|
pathExists$7(destParent, (err, dirExists) => {
|
|
1837
1837
|
if (err) return cb(err)
|
|
1838
1838
|
if (dirExists) return startCopy(resolvedDest, src, dest, opts, cb)
|
|
@@ -1967,8 +1967,8 @@ function copyDirItems (items, src, dest, opts, cb) {
|
|
|
1967
1967
|
}
|
|
1968
1968
|
|
|
1969
1969
|
function copyDirItem (items, item, src, dest, opts, cb) {
|
|
1970
|
-
const srcItem = path$
|
|
1971
|
-
const destItem = path$
|
|
1970
|
+
const srcItem = path$g.join(src, item);
|
|
1971
|
+
const destItem = path$g.join(dest, item);
|
|
1972
1972
|
checkPaths(srcItem, destItem, (err, resolvedDest) => {
|
|
1973
1973
|
if (err) return cb(err)
|
|
1974
1974
|
startCopy(resolvedDest, srcItem, destItem, opts, err => {
|
|
@@ -1983,7 +1983,7 @@ function onLink (resolvedDest, src, dest, opts, cb) {
|
|
|
1983
1983
|
if (err) return cb(err)
|
|
1984
1984
|
|
|
1985
1985
|
if (opts.dereference) {
|
|
1986
|
-
resolvedSrc = path$
|
|
1986
|
+
resolvedSrc = path$g.resolve(process.cwd(), resolvedSrc);
|
|
1987
1987
|
}
|
|
1988
1988
|
|
|
1989
1989
|
if (resolvedDest === notExist || resolvedDest === existsReg) {
|
|
@@ -1992,7 +1992,7 @@ function onLink (resolvedDest, src, dest, opts, cb) {
|
|
|
1992
1992
|
return fs$g.symlink(resolvedSrc, dest, cb)
|
|
1993
1993
|
} else {
|
|
1994
1994
|
if (opts.dereference) {
|
|
1995
|
-
resolvedDest = path$
|
|
1995
|
+
resolvedDest = path$g.resolve(process.cwd(), resolvedDest);
|
|
1996
1996
|
}
|
|
1997
1997
|
if (pathsAreIdentical(resolvedSrc, resolvedDest)) return cb()
|
|
1998
1998
|
|
|
@@ -2020,8 +2020,8 @@ function copyLink (resolvedSrc, dest, cb) {
|
|
|
2020
2020
|
// return true if dest is a subdir of src, otherwise false.
|
|
2021
2021
|
// extract dest base dir and check if that is the same as src basename.
|
|
2022
2022
|
function isSrcSubdir$2 (src, dest) {
|
|
2023
|
-
const srcArray = path$
|
|
2024
|
-
const destArray = path$
|
|
2023
|
+
const srcArray = path$g.resolve(src).split(path$g.sep);
|
|
2024
|
+
const destArray = path$g.resolve(dest).split(path$g.sep);
|
|
2025
2025
|
|
|
2026
2026
|
return srcArray.reduce((acc, current, i) => {
|
|
2027
2027
|
return acc && destArray[i] === current
|
|
@@ -2045,8 +2045,8 @@ function checkDest (dest, cb) {
|
|
|
2045
2045
|
|
|
2046
2046
|
function pathsAreIdentical (src, dest) {
|
|
2047
2047
|
const os = process.platform;
|
|
2048
|
-
const resolvedSrc = path$
|
|
2049
|
-
const resolvedDest = path$
|
|
2048
|
+
const resolvedSrc = path$g.resolve(src);
|
|
2049
|
+
const resolvedDest = path$g.resolve(dest);
|
|
2050
2050
|
// case-insensitive paths
|
|
2051
2051
|
if (os === 'darwin' || os === 'win32') {
|
|
2052
2052
|
return resolvedSrc.toLowerCase() === resolvedDest.toLowerCase()
|
|
@@ -2076,7 +2076,7 @@ var copy$1 = {
|
|
|
2076
2076
|
};
|
|
2077
2077
|
|
|
2078
2078
|
const fs$f = gracefulFs;
|
|
2079
|
-
const path$
|
|
2079
|
+
const path$f = path__default["default"];
|
|
2080
2080
|
const assert = assert__default["default"];
|
|
2081
2081
|
|
|
2082
2082
|
const isWindows = (process.platform === 'win32');
|
|
@@ -2281,7 +2281,7 @@ function rmkids (p, options, cb) {
|
|
|
2281
2281
|
if (n === 0) return options.rmdir(p, cb)
|
|
2282
2282
|
|
|
2283
2283
|
files.forEach(f => {
|
|
2284
|
-
rimraf$1(path$
|
|
2284
|
+
rimraf$1(path$f.join(p, f), options, er => {
|
|
2285
2285
|
if (errState) {
|
|
2286
2286
|
return
|
|
2287
2287
|
}
|
|
@@ -2363,7 +2363,7 @@ function rmdirSync (p, options, originalEr) {
|
|
|
2363
2363
|
function rmkidsSync (p, options) {
|
|
2364
2364
|
assert(p);
|
|
2365
2365
|
assert(options);
|
|
2366
|
-
options.readdirSync(p).forEach(f => rimrafSync(path$
|
|
2366
|
+
options.readdirSync(p).forEach(f => rimrafSync(path$f.join(p, f), options));
|
|
2367
2367
|
|
|
2368
2368
|
// We only end up here once we got ENOTEMPTY at least once, and
|
|
2369
2369
|
// at this point, we are guaranteed to have removed all the kids.
|
|
@@ -2398,7 +2398,7 @@ var remove$2 = {
|
|
|
2398
2398
|
|
|
2399
2399
|
const u$7 = universalify.fromCallback;
|
|
2400
2400
|
const fs$e = fs__default["default"];
|
|
2401
|
-
const path$
|
|
2401
|
+
const path$e = path__default["default"];
|
|
2402
2402
|
const mkdir$5 = mkdirs_1;
|
|
2403
2403
|
const remove$1 = remove$2;
|
|
2404
2404
|
|
|
@@ -2407,7 +2407,7 @@ const emptyDir = u$7(function emptyDir (dir, callback) {
|
|
|
2407
2407
|
fs$e.readdir(dir, (err, items) => {
|
|
2408
2408
|
if (err) return mkdir$5.mkdirs(dir, callback)
|
|
2409
2409
|
|
|
2410
|
-
items = items.map(item => path$
|
|
2410
|
+
items = items.map(item => path$e.join(dir, item));
|
|
2411
2411
|
|
|
2412
2412
|
deleteItem();
|
|
2413
2413
|
|
|
@@ -2431,7 +2431,7 @@ function emptyDirSync (dir) {
|
|
|
2431
2431
|
}
|
|
2432
2432
|
|
|
2433
2433
|
items.forEach(item => {
|
|
2434
|
-
item = path$
|
|
2434
|
+
item = path$e.join(dir, item);
|
|
2435
2435
|
remove$1.removeSync(item);
|
|
2436
2436
|
});
|
|
2437
2437
|
}
|
|
@@ -2444,7 +2444,7 @@ var empty = {
|
|
|
2444
2444
|
};
|
|
2445
2445
|
|
|
2446
2446
|
const u$6 = universalify.fromCallback;
|
|
2447
|
-
const path$
|
|
2447
|
+
const path$d = path__default["default"];
|
|
2448
2448
|
const fs$d = gracefulFs;
|
|
2449
2449
|
const mkdir$4 = mkdirs_1;
|
|
2450
2450
|
const pathExists$6 = pathExists_1.pathExists;
|
|
@@ -2459,7 +2459,7 @@ function createFile (file, callback) {
|
|
|
2459
2459
|
|
|
2460
2460
|
fs$d.stat(file, (err, stats) => { // eslint-disable-line handle-callback-err
|
|
2461
2461
|
if (!err && stats.isFile()) return callback()
|
|
2462
|
-
const dir = path$
|
|
2462
|
+
const dir = path$d.dirname(file);
|
|
2463
2463
|
pathExists$6(dir, (err, dirExists) => {
|
|
2464
2464
|
if (err) return callback(err)
|
|
2465
2465
|
if (dirExists) return makeFile()
|
|
@@ -2478,7 +2478,7 @@ function createFileSync (file) {
|
|
|
2478
2478
|
} catch (e) {}
|
|
2479
2479
|
if (stats && stats.isFile()) return
|
|
2480
2480
|
|
|
2481
|
-
const dir = path$
|
|
2481
|
+
const dir = path$d.dirname(file);
|
|
2482
2482
|
if (!fs$d.existsSync(dir)) {
|
|
2483
2483
|
mkdir$4.mkdirsSync(dir);
|
|
2484
2484
|
}
|
|
@@ -2492,7 +2492,7 @@ var file$2 = {
|
|
|
2492
2492
|
};
|
|
2493
2493
|
|
|
2494
2494
|
const u$5 = universalify.fromCallback;
|
|
2495
|
-
const path$
|
|
2495
|
+
const path$c = path__default["default"];
|
|
2496
2496
|
const fs$c = gracefulFs;
|
|
2497
2497
|
const mkdir$3 = mkdirs_1;
|
|
2498
2498
|
const pathExists$5 = pathExists_1.pathExists;
|
|
@@ -2514,7 +2514,7 @@ function createLink (srcpath, dstpath, callback) {
|
|
|
2514
2514
|
return callback(err)
|
|
2515
2515
|
}
|
|
2516
2516
|
|
|
2517
|
-
const dir = path$
|
|
2517
|
+
const dir = path$c.dirname(dstpath);
|
|
2518
2518
|
pathExists$5(dir, (err, dirExists) => {
|
|
2519
2519
|
if (err) return callback(err)
|
|
2520
2520
|
if (dirExists) return makeLink(srcpath, dstpath)
|
|
@@ -2538,7 +2538,7 @@ function createLinkSync (srcpath, dstpath) {
|
|
|
2538
2538
|
throw err
|
|
2539
2539
|
}
|
|
2540
2540
|
|
|
2541
|
-
const dir = path$
|
|
2541
|
+
const dir = path$c.dirname(dstpath);
|
|
2542
2542
|
const dirExists = fs$c.existsSync(dir);
|
|
2543
2543
|
if (dirExists) return fs$c.linkSync(srcpath, dstpath)
|
|
2544
2544
|
mkdir$3.mkdirsSync(dir);
|
|
@@ -2551,7 +2551,7 @@ var link$1 = {
|
|
|
2551
2551
|
createLinkSync
|
|
2552
2552
|
};
|
|
2553
2553
|
|
|
2554
|
-
const path$
|
|
2554
|
+
const path$b = path__default["default"];
|
|
2555
2555
|
const fs$b = gracefulFs;
|
|
2556
2556
|
const pathExists$4 = pathExists_1.pathExists;
|
|
2557
2557
|
|
|
@@ -2578,7 +2578,7 @@ const pathExists$4 = pathExists_1.pathExists;
|
|
|
2578
2578
|
*/
|
|
2579
2579
|
|
|
2580
2580
|
function symlinkPaths$1 (srcpath, dstpath, callback) {
|
|
2581
|
-
if (path$
|
|
2581
|
+
if (path$b.isAbsolute(srcpath)) {
|
|
2582
2582
|
return fs$b.lstat(srcpath, (err) => {
|
|
2583
2583
|
if (err) {
|
|
2584
2584
|
err.message = err.message.replace('lstat', 'ensureSymlink');
|
|
@@ -2590,8 +2590,8 @@ function symlinkPaths$1 (srcpath, dstpath, callback) {
|
|
|
2590
2590
|
})
|
|
2591
2591
|
})
|
|
2592
2592
|
} else {
|
|
2593
|
-
const dstdir = path$
|
|
2594
|
-
const relativeToDst = path$
|
|
2593
|
+
const dstdir = path$b.dirname(dstpath);
|
|
2594
|
+
const relativeToDst = path$b.join(dstdir, srcpath);
|
|
2595
2595
|
return pathExists$4(relativeToDst, (err, exists) => {
|
|
2596
2596
|
if (err) return callback(err)
|
|
2597
2597
|
if (exists) {
|
|
@@ -2607,7 +2607,7 @@ function symlinkPaths$1 (srcpath, dstpath, callback) {
|
|
|
2607
2607
|
}
|
|
2608
2608
|
return callback(null, {
|
|
2609
2609
|
'toCwd': srcpath,
|
|
2610
|
-
'toDst': path$
|
|
2610
|
+
'toDst': path$b.relative(dstdir, srcpath)
|
|
2611
2611
|
})
|
|
2612
2612
|
})
|
|
2613
2613
|
}
|
|
@@ -2617,7 +2617,7 @@ function symlinkPaths$1 (srcpath, dstpath, callback) {
|
|
|
2617
2617
|
|
|
2618
2618
|
function symlinkPathsSync$1 (srcpath, dstpath) {
|
|
2619
2619
|
let exists;
|
|
2620
|
-
if (path$
|
|
2620
|
+
if (path$b.isAbsolute(srcpath)) {
|
|
2621
2621
|
exists = fs$b.existsSync(srcpath);
|
|
2622
2622
|
if (!exists) throw new Error('absolute srcpath does not exist')
|
|
2623
2623
|
return {
|
|
@@ -2625,8 +2625,8 @@ function symlinkPathsSync$1 (srcpath, dstpath) {
|
|
|
2625
2625
|
'toDst': srcpath
|
|
2626
2626
|
}
|
|
2627
2627
|
} else {
|
|
2628
|
-
const dstdir = path$
|
|
2629
|
-
const relativeToDst = path$
|
|
2628
|
+
const dstdir = path$b.dirname(dstpath);
|
|
2629
|
+
const relativeToDst = path$b.join(dstdir, srcpath);
|
|
2630
2630
|
exists = fs$b.existsSync(relativeToDst);
|
|
2631
2631
|
if (exists) {
|
|
2632
2632
|
return {
|
|
@@ -2638,7 +2638,7 @@ function symlinkPathsSync$1 (srcpath, dstpath) {
|
|
|
2638
2638
|
if (!exists) throw new Error('relative srcpath does not exist')
|
|
2639
2639
|
return {
|
|
2640
2640
|
'toCwd': srcpath,
|
|
2641
|
-
'toDst': path$
|
|
2641
|
+
'toDst': path$b.relative(dstdir, srcpath)
|
|
2642
2642
|
}
|
|
2643
2643
|
}
|
|
2644
2644
|
}
|
|
@@ -2680,7 +2680,7 @@ var symlinkType_1 = {
|
|
|
2680
2680
|
};
|
|
2681
2681
|
|
|
2682
2682
|
const u$4 = universalify.fromCallback;
|
|
2683
|
-
const path$
|
|
2683
|
+
const path$a = path__default["default"];
|
|
2684
2684
|
const fs$9 = gracefulFs;
|
|
2685
2685
|
const _mkdirs = mkdirs_1;
|
|
2686
2686
|
const mkdirs = _mkdirs.mkdirs;
|
|
@@ -2708,7 +2708,7 @@ function createSymlink (srcpath, dstpath, type, callback) {
|
|
|
2708
2708
|
srcpath = relative.toDst;
|
|
2709
2709
|
symlinkType(relative.toCwd, type, (err, type) => {
|
|
2710
2710
|
if (err) return callback(err)
|
|
2711
|
-
const dir = path$
|
|
2711
|
+
const dir = path$a.dirname(dstpath);
|
|
2712
2712
|
pathExists$3(dir, (err, dirExists) => {
|
|
2713
2713
|
if (err) return callback(err)
|
|
2714
2714
|
if (dirExists) return fs$9.symlink(srcpath, dstpath, type, callback)
|
|
@@ -2729,7 +2729,7 @@ function createSymlinkSync (srcpath, dstpath, type) {
|
|
|
2729
2729
|
const relative = symlinkPathsSync(srcpath, dstpath);
|
|
2730
2730
|
srcpath = relative.toDst;
|
|
2731
2731
|
type = symlinkTypeSync(relative.toCwd, type);
|
|
2732
|
-
const dir = path$
|
|
2732
|
+
const dir = path$a.dirname(dstpath);
|
|
2733
2733
|
const exists = fs$9.existsSync(dir);
|
|
2734
2734
|
if (exists) return fs$9.symlinkSync(srcpath, dstpath, type)
|
|
2735
2735
|
mkdirsSync(dir);
|
|
@@ -2909,7 +2909,7 @@ var jsonfile = {
|
|
|
2909
2909
|
writeJsonSync: jsonFile$3.writeFileSync
|
|
2910
2910
|
};
|
|
2911
2911
|
|
|
2912
|
-
const path$
|
|
2912
|
+
const path$9 = path__default["default"];
|
|
2913
2913
|
const mkdir$2 = mkdirs_1;
|
|
2914
2914
|
const pathExists$2 = pathExists_1.pathExists;
|
|
2915
2915
|
const jsonFile$2 = jsonfile;
|
|
@@ -2920,7 +2920,7 @@ function outputJson (file, data, options, callback) {
|
|
|
2920
2920
|
options = {};
|
|
2921
2921
|
}
|
|
2922
2922
|
|
|
2923
|
-
const dir = path$
|
|
2923
|
+
const dir = path$9.dirname(file);
|
|
2924
2924
|
|
|
2925
2925
|
pathExists$2(dir, (err, itDoes) => {
|
|
2926
2926
|
if (err) return callback(err)
|
|
@@ -2936,12 +2936,12 @@ function outputJson (file, data, options, callback) {
|
|
|
2936
2936
|
var outputJson_1 = outputJson;
|
|
2937
2937
|
|
|
2938
2938
|
const fs$8 = gracefulFs;
|
|
2939
|
-
const path$
|
|
2939
|
+
const path$8 = path__default["default"];
|
|
2940
2940
|
const mkdir$1 = mkdirs_1;
|
|
2941
2941
|
const jsonFile$1 = jsonfile;
|
|
2942
2942
|
|
|
2943
2943
|
function outputJsonSync (file, data, options) {
|
|
2944
|
-
const dir = path$
|
|
2944
|
+
const dir = path$8.dirname(file);
|
|
2945
2945
|
|
|
2946
2946
|
if (!fs$8.existsSync(dir)) {
|
|
2947
2947
|
mkdir$1.mkdirsSync(dir);
|
|
@@ -2968,7 +2968,7 @@ jsonFile.readJSONSync = jsonFile.readJsonSync;
|
|
|
2968
2968
|
var json = jsonFile;
|
|
2969
2969
|
|
|
2970
2970
|
const fs$7 = gracefulFs;
|
|
2971
|
-
const path$
|
|
2971
|
+
const path$7 = path__default["default"];
|
|
2972
2972
|
const copySync = copySync$1.copySync;
|
|
2973
2973
|
const removeSync = remove$2.removeSync;
|
|
2974
2974
|
const mkdirpSync = mkdirs_1.mkdirsSync;
|
|
@@ -2978,14 +2978,14 @@ function moveSync (src, dest, options) {
|
|
|
2978
2978
|
options = options || {};
|
|
2979
2979
|
const overwrite = options.overwrite || options.clobber || false;
|
|
2980
2980
|
|
|
2981
|
-
src = path$
|
|
2982
|
-
dest = path$
|
|
2981
|
+
src = path$7.resolve(src);
|
|
2982
|
+
dest = path$7.resolve(dest);
|
|
2983
2983
|
|
|
2984
2984
|
if (src === dest) return fs$7.accessSync(src)
|
|
2985
2985
|
|
|
2986
2986
|
if (isSrcSubdir$1(src, dest)) throw new Error(`Cannot move '${src}' into itself '${dest}'.`)
|
|
2987
2987
|
|
|
2988
|
-
mkdirpSync(path$
|
|
2988
|
+
mkdirpSync(path$7.dirname(dest));
|
|
2989
2989
|
tryRenameSync();
|
|
2990
2990
|
|
|
2991
2991
|
function tryRenameSync () {
|
|
@@ -3073,7 +3073,7 @@ function isSrcSubdir$1 (src, dest) {
|
|
|
3073
3073
|
return fs$7.statSync(src).isDirectory() &&
|
|
3074
3074
|
src !== dest &&
|
|
3075
3075
|
dest.indexOf(src) > -1 &&
|
|
3076
|
-
dest.split(path$
|
|
3076
|
+
dest.split(path$7.dirname(src) + path$7.sep)[1].split(path$7.sep)[0] === path$7.basename(src)
|
|
3077
3077
|
} catch (e) {
|
|
3078
3078
|
return false
|
|
3079
3079
|
}
|
|
@@ -3085,7 +3085,7 @@ var moveSync_1 = {
|
|
|
3085
3085
|
|
|
3086
3086
|
const u$1 = universalify.fromCallback;
|
|
3087
3087
|
const fs$6 = gracefulFs;
|
|
3088
|
-
const path$
|
|
3088
|
+
const path$6 = path__default["default"];
|
|
3089
3089
|
const copy = copy$1.copy;
|
|
3090
3090
|
const remove = remove$2.remove;
|
|
3091
3091
|
const mkdirp = mkdirs_1.mkdirp;
|
|
@@ -3099,8 +3099,8 @@ function move (src, dest, opts, cb) {
|
|
|
3099
3099
|
|
|
3100
3100
|
const overwrite = opts.overwrite || opts.clobber || false;
|
|
3101
3101
|
|
|
3102
|
-
src = path$
|
|
3103
|
-
dest = path$
|
|
3102
|
+
src = path$6.resolve(src);
|
|
3103
|
+
dest = path$6.resolve(dest);
|
|
3104
3104
|
|
|
3105
3105
|
if (src === dest) return fs$6.access(src, cb)
|
|
3106
3106
|
|
|
@@ -3110,7 +3110,7 @@ function move (src, dest, opts, cb) {
|
|
|
3110
3110
|
if (st.isDirectory() && isSrcSubdir(src, dest)) {
|
|
3111
3111
|
return cb(new Error(`Cannot move '${src}' to a subdirectory of itself, '${dest}'.`))
|
|
3112
3112
|
}
|
|
3113
|
-
mkdirp(path$
|
|
3113
|
+
mkdirp(path$6.dirname(dest), err => {
|
|
3114
3114
|
if (err) return cb(err)
|
|
3115
3115
|
return doRename(src, dest, overwrite, cb)
|
|
3116
3116
|
});
|
|
@@ -3152,8 +3152,8 @@ function moveAcrossDevice (src, dest, overwrite, cb) {
|
|
|
3152
3152
|
}
|
|
3153
3153
|
|
|
3154
3154
|
function isSrcSubdir (src, dest) {
|
|
3155
|
-
const srcArray = src.split(path$
|
|
3156
|
-
const destArray = dest.split(path$
|
|
3155
|
+
const srcArray = src.split(path$6.sep);
|
|
3156
|
+
const destArray = dest.split(path$6.sep);
|
|
3157
3157
|
|
|
3158
3158
|
return srcArray.reduce((acc, current, i) => {
|
|
3159
3159
|
return acc && destArray[i] === current
|
|
@@ -3166,7 +3166,7 @@ var move_1 = {
|
|
|
3166
3166
|
|
|
3167
3167
|
const u = universalify.fromCallback;
|
|
3168
3168
|
const fs$5 = gracefulFs;
|
|
3169
|
-
const path$
|
|
3169
|
+
const path$5 = path__default["default"];
|
|
3170
3170
|
const mkdir = mkdirs_1;
|
|
3171
3171
|
const pathExists = pathExists_1.pathExists;
|
|
3172
3172
|
|
|
@@ -3176,7 +3176,7 @@ function outputFile (file, data, encoding, callback) {
|
|
|
3176
3176
|
encoding = 'utf8';
|
|
3177
3177
|
}
|
|
3178
3178
|
|
|
3179
|
-
const dir = path$
|
|
3179
|
+
const dir = path$5.dirname(file);
|
|
3180
3180
|
pathExists(dir, (err, itDoes) => {
|
|
3181
3181
|
if (err) return callback(err)
|
|
3182
3182
|
if (itDoes) return fs$5.writeFile(file, data, encoding, callback)
|
|
@@ -3190,7 +3190,7 @@ function outputFile (file, data, encoding, callback) {
|
|
|
3190
3190
|
}
|
|
3191
3191
|
|
|
3192
3192
|
function outputFileSync (file, ...args) {
|
|
3193
|
-
const dir = path$
|
|
3193
|
+
const dir = path$5.dirname(file);
|
|
3194
3194
|
if (fs$5.existsSync(dir)) {
|
|
3195
3195
|
return fs$5.writeFileSync(file, ...args)
|
|
3196
3196
|
}
|
|
@@ -39676,7 +39676,7 @@ function requireQuery () {
|
|
|
39676
39676
|
*/
|
|
39677
39677
|
|
|
39678
39678
|
var debug$1 = srcExports('express:view');
|
|
39679
|
-
var path$
|
|
39679
|
+
var path$4 = path__default["default"];
|
|
39680
39680
|
var fs$3 = fs__default["default"];
|
|
39681
39681
|
|
|
39682
39682
|
/**
|
|
@@ -39684,11 +39684,11 @@ var fs$3 = fs__default["default"];
|
|
|
39684
39684
|
* @private
|
|
39685
39685
|
*/
|
|
39686
39686
|
|
|
39687
|
-
var dirname = path$
|
|
39688
|
-
var basename$1 = path$
|
|
39689
|
-
var extname$2 = path$
|
|
39690
|
-
var join$1 = path$
|
|
39691
|
-
var resolve$3 = path$
|
|
39687
|
+
var dirname = path$4.dirname;
|
|
39688
|
+
var basename$1 = path$4.basename;
|
|
39689
|
+
var extname$2 = path$4.extname;
|
|
39690
|
+
var join$1 = path$4.join;
|
|
39691
|
+
var resolve$3 = path$4.resolve;
|
|
39692
39692
|
|
|
39693
39693
|
/**
|
|
39694
39694
|
* Module exports.
|
|
@@ -43872,7 +43872,7 @@ var mime$2 = mime_1;
|
|
|
43872
43872
|
var ms = ms$1;
|
|
43873
43873
|
var onFinished$1 = onFinishedExports;
|
|
43874
43874
|
var parseRange$1 = rangeParser_1;
|
|
43875
|
-
var path$
|
|
43875
|
+
var path$3 = path__default["default"];
|
|
43876
43876
|
var statuses$1 = statuses$3;
|
|
43877
43877
|
var Stream = require$$0__default$1["default"];
|
|
43878
43878
|
var util = require$$4__default["default"];
|
|
@@ -43882,11 +43882,11 @@ var util = require$$4__default["default"];
|
|
|
43882
43882
|
* @private
|
|
43883
43883
|
*/
|
|
43884
43884
|
|
|
43885
|
-
var extname$1 = path$
|
|
43886
|
-
var join = path$
|
|
43887
|
-
var normalize = path$
|
|
43888
|
-
var resolve$2 = path$
|
|
43889
|
-
var sep = path$
|
|
43885
|
+
var extname$1 = path$3.extname;
|
|
43886
|
+
var join = path$3.join;
|
|
43887
|
+
var normalize = path$3.normalize;
|
|
43888
|
+
var resolve$2 = path$3.resolve;
|
|
43889
|
+
var sep = path$3.sep;
|
|
43890
43890
|
|
|
43891
43891
|
/**
|
|
43892
43892
|
* Regular expression for identifying a bytes Range header.
|
|
@@ -49247,7 +49247,7 @@ var escapeHtml = escapeHtml_1;
|
|
|
49247
49247
|
var http = require$$2__default["default"];
|
|
49248
49248
|
var isAbsolute = utils.isAbsolute;
|
|
49249
49249
|
var onFinished = onFinishedExports;
|
|
49250
|
-
var path$
|
|
49250
|
+
var path$2 = path__default["default"];
|
|
49251
49251
|
var statuses = statuses$3;
|
|
49252
49252
|
var merge = utilsMergeExports;
|
|
49253
49253
|
var sign = cookieSignature.sign;
|
|
@@ -49256,9 +49256,9 @@ var normalizeTypes = utils.normalizeTypes;
|
|
|
49256
49256
|
var setCharset = utils.setCharset;
|
|
49257
49257
|
var cookie = cookie$1;
|
|
49258
49258
|
var send = sendExports;
|
|
49259
|
-
var extname = path$
|
|
49259
|
+
var extname = path$2.extname;
|
|
49260
49260
|
var mime = send.mime;
|
|
49261
|
-
var resolve$1 = path$
|
|
49261
|
+
var resolve$1 = path$2.resolve;
|
|
49262
49262
|
var vary = varyExports;
|
|
49263
49263
|
|
|
49264
49264
|
/**
|
|
@@ -52379,7 +52379,7 @@ function requireMinimist () {
|
|
|
52379
52379
|
/*global require,module,process*/
|
|
52380
52380
|
|
|
52381
52381
|
const fs = fs__default["default"];
|
|
52382
|
-
const path = path__default["default"];
|
|
52382
|
+
const path$1 = path__default["default"];
|
|
52383
52383
|
const appPath = appRootPath;
|
|
52384
52384
|
const xdg = xdgBasedir;
|
|
52385
52385
|
|
|
@@ -52460,7 +52460,7 @@ class Options {
|
|
|
52460
52460
|
_homedir() {
|
|
52461
52461
|
let home = process.env.home;
|
|
52462
52462
|
if (home) {
|
|
52463
|
-
return path.join(home, ".config");
|
|
52463
|
+
return path$1.join(home, ".config");
|
|
52464
52464
|
}
|
|
52465
52465
|
return undefined;
|
|
52466
52466
|
}
|
|
@@ -52502,11 +52502,11 @@ class Options {
|
|
|
52502
52502
|
};
|
|
52503
52503
|
|
|
52504
52504
|
// console.log("about to read file", file, "additionalFiles", this.additionalFiles, "configDirs", this.configDirs, "applicationPath", this.applicationPath, "homedir", this._homedir());
|
|
52505
|
-
if (path.isAbsolute(file)) {
|
|
52505
|
+
if (path$1.isAbsolute(file)) {
|
|
52506
52506
|
read(file);
|
|
52507
52507
|
} else {
|
|
52508
52508
|
this.additionalFiles.forEach(file => {
|
|
52509
|
-
if (path.isAbsolute(file) && read(file) == Failed)
|
|
52509
|
+
if (path$1.isAbsolute(file) && read(file) == Failed)
|
|
52510
52510
|
read(file + ".conf");
|
|
52511
52511
|
});
|
|
52512
52512
|
([this.applicationPath, this._homedir()].concat(this.configDirs)).forEach(root => {
|
|
@@ -52514,14 +52514,14 @@ class Options {
|
|
|
52514
52514
|
if (!root)
|
|
52515
52515
|
return;
|
|
52516
52516
|
this.additionalFiles.forEach(additional => {
|
|
52517
|
-
if (!path.isAbsolute(additional)) {
|
|
52518
|
-
let file = path.join(root, additional);
|
|
52517
|
+
if (!path$1.isAbsolute(additional)) {
|
|
52518
|
+
let file = path$1.join(root, additional);
|
|
52519
52519
|
if (read(file) == Failed)
|
|
52520
52520
|
read(file + ".conf");
|
|
52521
52521
|
}
|
|
52522
52522
|
});
|
|
52523
52523
|
|
|
52524
|
-
let filePath = path.join(root, file);
|
|
52524
|
+
let filePath = path$1.join(root, file);
|
|
52525
52525
|
if (read(filePath) == Failed)
|
|
52526
52526
|
read(filePath + ".conf");
|
|
52527
52527
|
});
|
|
@@ -52607,6 +52607,168 @@ var options = function(options, argv) {
|
|
|
52607
52607
|
return ret;
|
|
52608
52608
|
};
|
|
52609
52609
|
|
|
52610
|
+
var posixExports = {};
|
|
52611
|
+
var posix$1 = {
|
|
52612
|
+
get exports(){ return posixExports; },
|
|
52613
|
+
set exports(v){ posixExports = v; },
|
|
52614
|
+
};
|
|
52615
|
+
|
|
52616
|
+
var path = path__default["default"];
|
|
52617
|
+
|
|
52618
|
+
|
|
52619
|
+
var IS_LINUX = require$$1__default["default"].platform() === 'linux';
|
|
52620
|
+
|
|
52621
|
+
|
|
52622
|
+
// Attempt to load the bindings module from various possible locations
|
|
52623
|
+
function load_extension() {
|
|
52624
|
+
var ext_dirs = [
|
|
52625
|
+
'build/bindings', 'build/Release', 'out/Release', 'Release',
|
|
52626
|
+
'build/Debug', 'out/Debug',
|
|
52627
|
+
], i;
|
|
52628
|
+
for (i in ext_dirs) {
|
|
52629
|
+
try {
|
|
52630
|
+
return require(path.join(__dirname, '../..', ext_dirs[i],
|
|
52631
|
+
'posix.node'));
|
|
52632
|
+
|
|
52633
|
+
} catch (error) {
|
|
52634
|
+
if (!/Cannot find module/.test(error.message)) {
|
|
52635
|
+
throw error;
|
|
52636
|
+
}
|
|
52637
|
+
}
|
|
52638
|
+
}
|
|
52639
|
+
throw new Error("unable to load the node-posix extension module");
|
|
52640
|
+
}
|
|
52641
|
+
|
|
52642
|
+
var posix = load_extension();
|
|
52643
|
+
|
|
52644
|
+
var syslog_constants = {};
|
|
52645
|
+
posix.update_syslog_constants(syslog_constants);
|
|
52646
|
+
|
|
52647
|
+
function syslog_const(value) {
|
|
52648
|
+
if (syslog_constants[value] === undefined) {
|
|
52649
|
+
throw new Error("invalid syslog constant value: " + value);
|
|
52650
|
+
}
|
|
52651
|
+
|
|
52652
|
+
return syslog_constants[value];
|
|
52653
|
+
}
|
|
52654
|
+
|
|
52655
|
+
function syslog_flags(option, prefix) {
|
|
52656
|
+
prefix = prefix || "";
|
|
52657
|
+
var opt = 0, key, flag;
|
|
52658
|
+
for (key in option) {
|
|
52659
|
+
flag = syslog_const(prefix + key); // checks all flags
|
|
52660
|
+
opt |= option[key] ? flag : 0;
|
|
52661
|
+
}
|
|
52662
|
+
return opt;
|
|
52663
|
+
}
|
|
52664
|
+
|
|
52665
|
+
posix$1.exports = {
|
|
52666
|
+
getgid: process.getgid,
|
|
52667
|
+
getuid: process.getuid,
|
|
52668
|
+
setgid: process.setgid,
|
|
52669
|
+
setuid: process.setuid,
|
|
52670
|
+
|
|
52671
|
+
chroot: posix.chroot,
|
|
52672
|
+
closelog: posix.closelog,
|
|
52673
|
+
getegid: posix.getegid,
|
|
52674
|
+
geteuid: posix.geteuid,
|
|
52675
|
+
getgrnam: posix.getgrnam,
|
|
52676
|
+
getpgid: posix.getpgid,
|
|
52677
|
+
setpgid: posix.setpgid,
|
|
52678
|
+
getppid: posix.getppid,
|
|
52679
|
+
getpwnam: posix.getpwnam,
|
|
52680
|
+
getrlimit: posix.getrlimit,
|
|
52681
|
+
setrlimit: posix.setrlimit,
|
|
52682
|
+
setsid: posix.setsid,
|
|
52683
|
+
|
|
52684
|
+
openlog: function (ident, option, facility) {
|
|
52685
|
+
return posix.openlog(ident, syslog_flags(option),
|
|
52686
|
+
syslog_const(facility));
|
|
52687
|
+
},
|
|
52688
|
+
|
|
52689
|
+
syslog: function (priority, message) {
|
|
52690
|
+
return posix.syslog(syslog_const(priority), message);
|
|
52691
|
+
},
|
|
52692
|
+
|
|
52693
|
+
setlogmask: function (maskpri) {
|
|
52694
|
+
var bits = posix.setlogmask(syslog_flags(maskpri, "mask_")), flags = {}, key;
|
|
52695
|
+
for (key in syslog_constants) {
|
|
52696
|
+
if (key.match("^mask_")) {
|
|
52697
|
+
flags[key.substr(5, 10)] = (bits & syslog_constants[key])
|
|
52698
|
+
? true : false;
|
|
52699
|
+
}
|
|
52700
|
+
}
|
|
52701
|
+
return flags;
|
|
52702
|
+
},
|
|
52703
|
+
|
|
52704
|
+
// http://pubs.opengroup.org/onlinepubs/007904875/functions/getpgrp.html
|
|
52705
|
+
getpgrp: function () {
|
|
52706
|
+
return posix.getpgid(0);
|
|
52707
|
+
},
|
|
52708
|
+
|
|
52709
|
+
seteuid: function (euid) {
|
|
52710
|
+
euid = (typeof (euid) === 'string') ? posix.getpwnam(euid).uid : euid;
|
|
52711
|
+
return posix.seteuid(euid);
|
|
52712
|
+
},
|
|
52713
|
+
|
|
52714
|
+
setreuid: function (ruid, euid) {
|
|
52715
|
+
ruid = (typeof (ruid) === 'string') ? posix.getpwnam(ruid).uid : ruid;
|
|
52716
|
+
euid = (typeof (euid) === 'string') ? posix.getpwnam(euid).uid : euid;
|
|
52717
|
+
return posix.setreuid(ruid, euid);
|
|
52718
|
+
},
|
|
52719
|
+
|
|
52720
|
+
setegid: function (egid) {
|
|
52721
|
+
egid = (typeof (egid) === 'string') ? posix.getgrnam(egid).gid : egid;
|
|
52722
|
+
return posix.setegid(egid);
|
|
52723
|
+
},
|
|
52724
|
+
|
|
52725
|
+
setregid: function (rgid, egid) {
|
|
52726
|
+
rgid = (typeof (rgid) === 'string') ? posix.getgrnam(rgid).gid : rgid;
|
|
52727
|
+
egid = (typeof (egid) === 'string') ? posix.getgrnam(egid).gid : egid;
|
|
52728
|
+
return posix.setregid(rgid, egid);
|
|
52729
|
+
},
|
|
52730
|
+
|
|
52731
|
+
gethostname: posix.gethostname,
|
|
52732
|
+
sethostname: posix.sethostname,
|
|
52733
|
+
};
|
|
52734
|
+
|
|
52735
|
+
var swap_constants = {};
|
|
52736
|
+
|
|
52737
|
+
function swap_const(value) {
|
|
52738
|
+
var constant = swap_constants[value];
|
|
52739
|
+
if (constant === undefined) {
|
|
52740
|
+
throw "invalid swap constant value: " + value;
|
|
52741
|
+
}
|
|
52742
|
+
|
|
52743
|
+
return constant;
|
|
52744
|
+
}
|
|
52745
|
+
|
|
52746
|
+
function swap_flags(option) {
|
|
52747
|
+
var opt = 0, key, flag;
|
|
52748
|
+
for (key in option) {
|
|
52749
|
+
flag = swap_const(key); // checks all flags
|
|
52750
|
+
opt |= option[key] ? flag : 0;
|
|
52751
|
+
}
|
|
52752
|
+
return opt;
|
|
52753
|
+
}
|
|
52754
|
+
|
|
52755
|
+
|
|
52756
|
+
if (IS_LINUX) {
|
|
52757
|
+
posix.update_swap_constants(swap_constants);
|
|
52758
|
+
posixExports.swapon = function (path, swapflags) {
|
|
52759
|
+
return posix.swapon(path, swap_flags(swapflags));
|
|
52760
|
+
};
|
|
52761
|
+
posixExports.swapoff = posix.swapoff;
|
|
52762
|
+
}
|
|
52763
|
+
|
|
52764
|
+
if ('initgroups' in posix) {
|
|
52765
|
+
// initgroups is in SVr4 and 4.3BSD, not POSIX
|
|
52766
|
+
posixExports.initgroups = function (user, group) {
|
|
52767
|
+
var gid = (typeof (group) === 'string') ? posix.getgrnam(group).gid : group;
|
|
52768
|
+
return posix.initgroups(user, gid);
|
|
52769
|
+
};
|
|
52770
|
+
}
|
|
52771
|
+
|
|
52610
52772
|
const option = options({
|
|
52611
52773
|
prefix: "fisk/builder",
|
|
52612
52774
|
noApplicationPath: true,
|
|
@@ -53853,11 +54015,11 @@ server.on("error", (err) => {
|
|
|
53853
54015
|
Environments.instance
|
|
53854
54016
|
.load(db, String(option("env-dir", path__default["default"].join(common.cacheDir(), "environments"))))
|
|
53855
54017
|
.then(() => {
|
|
53856
|
-
|
|
53857
|
-
|
|
53858
|
-
|
|
53859
|
-
|
|
53860
|
-
|
|
54018
|
+
const limit = option.int("max-file-descriptors");
|
|
54019
|
+
if (limit) {
|
|
54020
|
+
console.log("setting limit", limit);
|
|
54021
|
+
posixExports.setrlimit("nofile", { soft: limit });
|
|
54022
|
+
}
|
|
53861
54023
|
})
|
|
53862
54024
|
.then(purgeEnvironmentsToMaxSize)
|
|
53863
54025
|
// .then(() => {
|