@andersbakken/fisk 3.6.4 → 3.6.6

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.
@@ -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$m = require('path');
9
+ var path$l = 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');
@@ -22,6 +22,7 @@ var require$$0$8 = require('buffer');
22
22
  var require$$1$3 = require('string_decoder');
23
23
  var require$$8 = require('querystring');
24
24
  var require$$1$4 = require('module');
25
+ var posix = require('posix');
25
26
 
26
27
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
27
28
 
@@ -30,7 +31,7 @@ var assert__default = /*#__PURE__*/_interopDefaultLegacy(assert$1);
30
31
  var require$$0__default = /*#__PURE__*/_interopDefaultLegacy(require$$0$3);
31
32
  var require$$0__default$1 = /*#__PURE__*/_interopDefaultLegacy(require$$0$4);
32
33
  var require$$4__default = /*#__PURE__*/_interopDefaultLegacy(require$$4$1);
33
- var path__default = /*#__PURE__*/_interopDefaultLegacy(path$m);
34
+ var path__default = /*#__PURE__*/_interopDefaultLegacy(path$l);
34
35
  var require$$1__default = /*#__PURE__*/_interopDefaultLegacy(require$$1$1);
35
36
  var child_process__default = /*#__PURE__*/_interopDefaultLegacy(child_process);
36
37
  var crypto__default = /*#__PURE__*/_interopDefaultLegacy(crypto$1);
@@ -46,6 +47,7 @@ var require$$0__default$5 = /*#__PURE__*/_interopDefaultLegacy(require$$0$8);
46
47
  var require$$1__default$2 = /*#__PURE__*/_interopDefaultLegacy(require$$1$3);
47
48
  var require$$8__default = /*#__PURE__*/_interopDefaultLegacy(require$$8);
48
49
  var require$$1__default$3 = /*#__PURE__*/_interopDefaultLegacy(require$$1$4);
50
+ var posix__default = /*#__PURE__*/_interopDefaultLegacy(posix);
49
51
 
50
52
  class Database {
51
53
  constructor(path) {
@@ -1318,11 +1320,11 @@ function retry () {
1318
1320
  };
1319
1321
  } (fs$n));
1320
1322
 
1321
- const path$l = path__default["default"];
1323
+ const path$k = path__default["default"];
1322
1324
 
1323
1325
  // get drive on windows
1324
1326
  function getRootPath (p) {
1325
- p = path$l.normalize(path$l.resolve(p)).split(path$l.sep);
1327
+ p = path$k.normalize(path$k.resolve(p)).split(path$k.sep);
1326
1328
  if (p.length > 0) return p[0]
1327
1329
  return null
1328
1330
  }
@@ -1343,7 +1345,7 @@ var win32 = {
1343
1345
  };
1344
1346
 
1345
1347
  const fs$l = gracefulFs;
1346
- const path$k = path__default["default"];
1348
+ const path$j = path__default["default"];
1347
1349
  const invalidWin32Path$1 = win32.invalidWin32Path;
1348
1350
 
1349
1351
  const o777$1 = parseInt('0777', 8);
@@ -1371,7 +1373,7 @@ function mkdirs$2 (p, opts, callback, made) {
1371
1373
  if (!made) made = null;
1372
1374
 
1373
1375
  callback = callback || function () {};
1374
- p = path$k.resolve(p);
1376
+ p = path$j.resolve(p);
1375
1377
 
1376
1378
  xfs.mkdir(p, mode, er => {
1377
1379
  if (!er) {
@@ -1380,8 +1382,8 @@ function mkdirs$2 (p, opts, callback, made) {
1380
1382
  }
1381
1383
  switch (er.code) {
1382
1384
  case 'ENOENT':
1383
- if (path$k.dirname(p) === p) return callback(er)
1384
- mkdirs$2(path$k.dirname(p), opts, (er, made) => {
1385
+ if (path$j.dirname(p) === p) return callback(er)
1386
+ mkdirs$2(path$j.dirname(p), opts, (er, made) => {
1385
1387
  if (er) callback(er, made);
1386
1388
  else mkdirs$2(p, opts, callback, made);
1387
1389
  });
@@ -1405,7 +1407,7 @@ function mkdirs$2 (p, opts, callback, made) {
1405
1407
  var mkdirs_1$1 = mkdirs$2;
1406
1408
 
1407
1409
  const fs$k = gracefulFs;
1408
- const path$j = path__default["default"];
1410
+ const path$i = path__default["default"];
1409
1411
  const invalidWin32Path = win32.invalidWin32Path;
1410
1412
 
1411
1413
  const o777 = parseInt('0777', 8);
@@ -1429,15 +1431,15 @@ function mkdirsSync$2 (p, opts, made) {
1429
1431
  }
1430
1432
  if (!made) made = null;
1431
1433
 
1432
- p = path$j.resolve(p);
1434
+ p = path$i.resolve(p);
1433
1435
 
1434
1436
  try {
1435
1437
  xfs.mkdirSync(p, mode);
1436
1438
  made = made || p;
1437
1439
  } catch (err0) {
1438
1440
  if (err0.code === 'ENOENT') {
1439
- if (path$j.dirname(p) === p) throw err0
1440
- made = mkdirsSync$2(path$j.dirname(p), opts, made);
1441
+ if (path$i.dirname(p) === p) throw err0
1442
+ made = mkdirsSync$2(path$i.dirname(p), opts, made);
1441
1443
  mkdirsSync$2(p, opts, made);
1442
1444
  } else {
1443
1445
  // In the case of any other error, just see if there's a dir there
@@ -1473,12 +1475,12 @@ var mkdirs_1 = {
1473
1475
 
1474
1476
  const fs$j = gracefulFs;
1475
1477
  const os = require$$1__default["default"];
1476
- const path$i = path__default["default"];
1478
+ const path$h = path__default["default"];
1477
1479
 
1478
1480
  // HFS, ext{2,3}, FAT do not, Node.js v0.10 does not
1479
1481
  function hasMillisResSync () {
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
+ let tmpfile = path$h.join('millis-test-sync' + Date.now().toString() + Math.random().toString().slice(2));
1483
+ tmpfile = path$h.join(os.tmpdir(), tmpfile);
1482
1484
 
1483
1485
  // 550 millis past UNIX epoch
1484
1486
  const d = new Date(1435410243862);
@@ -1490,8 +1492,8 @@ function hasMillisResSync () {
1490
1492
  }
1491
1493
 
1492
1494
  function hasMillisRes (callback) {
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
+ let tmpfile = path$h.join('millis-test' + Date.now().toString() + Math.random().toString().slice(2));
1496
+ tmpfile = path$h.join(os.tmpdir(), tmpfile);
1495
1497
 
1496
1498
  // 550 millis past UNIX epoch
1497
1499
  const d = new Date(1435410243862);
@@ -1562,7 +1564,7 @@ var buffer$1 = function (size) {
1562
1564
  };
1563
1565
 
1564
1566
  const fs$i = gracefulFs;
1565
- const path$h = path__default["default"];
1567
+ const path$g = path__default["default"];
1566
1568
  const mkdirpSync$1 = mkdirs_1.mkdirsSync;
1567
1569
  const utimesSync = utimes$1.utimesMillisSync;
1568
1570
 
@@ -1588,7 +1590,7 @@ function copySync$2 (src, dest, opts) {
1588
1590
 
1589
1591
  if (opts.filter && !opts.filter(src, dest)) return
1590
1592
 
1591
- const destParent = path$h.dirname(dest);
1593
+ const destParent = path$g.dirname(dest);
1592
1594
  if (!fs$i.existsSync(destParent)) mkdirpSync$1(destParent);
1593
1595
  return startCopy$1(resolvedDest, src, dest, opts)
1594
1596
  }
@@ -1689,8 +1691,8 @@ function copyDir$1 (src, dest, opts) {
1689
1691
  }
1690
1692
 
1691
1693
  function copyDirItem$1 (item, src, dest, opts) {
1692
- const srcItem = path$h.join(src, item);
1693
- const destItem = path$h.join(dest, item);
1694
+ const srcItem = path$g.join(src, item);
1695
+ const destItem = path$g.join(dest, item);
1694
1696
  const resolvedDest = checkPaths$1(srcItem, destItem);
1695
1697
  return startCopy$1(resolvedDest, srcItem, destItem, opts)
1696
1698
  }
@@ -1699,7 +1701,7 @@ function onLink$1 (resolvedDest, src, dest, opts) {
1699
1701
  let resolvedSrc = fs$i.readlinkSync(src);
1700
1702
 
1701
1703
  if (opts.dereference) {
1702
- resolvedSrc = path$h.resolve(process.cwd(), resolvedSrc);
1704
+ resolvedSrc = path$g.resolve(process.cwd(), resolvedSrc);
1703
1705
  }
1704
1706
 
1705
1707
  if (resolvedDest === notExist$1 || resolvedDest === existsReg$1) {
@@ -1708,7 +1710,7 @@ function onLink$1 (resolvedDest, src, dest, opts) {
1708
1710
  return fs$i.symlinkSync(resolvedSrc, dest)
1709
1711
  } else {
1710
1712
  if (opts.dereference) {
1711
- resolvedDest = path$h.resolve(process.cwd(), resolvedDest);
1713
+ resolvedDest = path$g.resolve(process.cwd(), resolvedDest);
1712
1714
  }
1713
1715
  if (pathsAreIdentical$1(resolvedSrc, resolvedDest)) return
1714
1716
 
@@ -1730,8 +1732,8 @@ function copyLink$1 (resolvedSrc, dest) {
1730
1732
  // return true if dest is a subdir of src, otherwise false.
1731
1733
  // extract dest base dir and check if that is the same as src basename.
1732
1734
  function isSrcSubdir$3 (src, dest) {
1733
- const srcArray = path$h.resolve(src).split(path$h.sep);
1734
- const destArray = path$h.resolve(dest).split(path$h.sep);
1735
+ const srcArray = path$g.resolve(src).split(path$g.sep);
1736
+ const destArray = path$g.resolve(dest).split(path$g.sep);
1735
1737
 
1736
1738
  return srcArray.reduce((acc, current, i) => {
1737
1739
  return acc && destArray[i] === current
@@ -1756,8 +1758,8 @@ function checkDest$1 (dest) {
1756
1758
 
1757
1759
  function pathsAreIdentical$1 (src, dest) {
1758
1760
  const os = process.platform;
1759
- const resolvedSrc = path$h.resolve(src);
1760
- const resolvedDest = path$h.resolve(dest);
1761
+ const resolvedSrc = path$g.resolve(src);
1762
+ const resolvedDest = path$g.resolve(dest);
1761
1763
  // case-insensitive paths
1762
1764
  if (os === 'darwin' || os === 'win32') {
1763
1765
  return resolvedSrc.toLowerCase() === resolvedDest.toLowerCase()
@@ -1796,7 +1798,7 @@ var pathExists_1 = {
1796
1798
  };
1797
1799
 
1798
1800
  const fs$g = gracefulFs;
1799
- const path$g = path__default["default"];
1801
+ const path$f = path__default["default"];
1800
1802
  const mkdirp$1 = mkdirs_1.mkdirs;
1801
1803
  const pathExists$7 = pathExists_1.pathExists;
1802
1804
  const utimes = utimes$1.utimesMillis;
@@ -1832,7 +1834,7 @@ function copy$2 (src, dest, opts, cb) {
1832
1834
  }
1833
1835
 
1834
1836
  function checkParentDir (resolvedDest, src, dest, opts, cb) {
1835
- const destParent = path$g.dirname(dest);
1837
+ const destParent = path$f.dirname(dest);
1836
1838
  pathExists$7(destParent, (err, dirExists) => {
1837
1839
  if (err) return cb(err)
1838
1840
  if (dirExists) return startCopy(resolvedDest, src, dest, opts, cb)
@@ -1967,8 +1969,8 @@ function copyDirItems (items, src, dest, opts, cb) {
1967
1969
  }
1968
1970
 
1969
1971
  function copyDirItem (items, item, src, dest, opts, cb) {
1970
- const srcItem = path$g.join(src, item);
1971
- const destItem = path$g.join(dest, item);
1972
+ const srcItem = path$f.join(src, item);
1973
+ const destItem = path$f.join(dest, item);
1972
1974
  checkPaths(srcItem, destItem, (err, resolvedDest) => {
1973
1975
  if (err) return cb(err)
1974
1976
  startCopy(resolvedDest, srcItem, destItem, opts, err => {
@@ -1983,7 +1985,7 @@ function onLink (resolvedDest, src, dest, opts, cb) {
1983
1985
  if (err) return cb(err)
1984
1986
 
1985
1987
  if (opts.dereference) {
1986
- resolvedSrc = path$g.resolve(process.cwd(), resolvedSrc);
1988
+ resolvedSrc = path$f.resolve(process.cwd(), resolvedSrc);
1987
1989
  }
1988
1990
 
1989
1991
  if (resolvedDest === notExist || resolvedDest === existsReg) {
@@ -1992,7 +1994,7 @@ function onLink (resolvedDest, src, dest, opts, cb) {
1992
1994
  return fs$g.symlink(resolvedSrc, dest, cb)
1993
1995
  } else {
1994
1996
  if (opts.dereference) {
1995
- resolvedDest = path$g.resolve(process.cwd(), resolvedDest);
1997
+ resolvedDest = path$f.resolve(process.cwd(), resolvedDest);
1996
1998
  }
1997
1999
  if (pathsAreIdentical(resolvedSrc, resolvedDest)) return cb()
1998
2000
 
@@ -2020,8 +2022,8 @@ function copyLink (resolvedSrc, dest, cb) {
2020
2022
  // return true if dest is a subdir of src, otherwise false.
2021
2023
  // extract dest base dir and check if that is the same as src basename.
2022
2024
  function isSrcSubdir$2 (src, dest) {
2023
- const srcArray = path$g.resolve(src).split(path$g.sep);
2024
- const destArray = path$g.resolve(dest).split(path$g.sep);
2025
+ const srcArray = path$f.resolve(src).split(path$f.sep);
2026
+ const destArray = path$f.resolve(dest).split(path$f.sep);
2025
2027
 
2026
2028
  return srcArray.reduce((acc, current, i) => {
2027
2029
  return acc && destArray[i] === current
@@ -2045,8 +2047,8 @@ function checkDest (dest, cb) {
2045
2047
 
2046
2048
  function pathsAreIdentical (src, dest) {
2047
2049
  const os = process.platform;
2048
- const resolvedSrc = path$g.resolve(src);
2049
- const resolvedDest = path$g.resolve(dest);
2050
+ const resolvedSrc = path$f.resolve(src);
2051
+ const resolvedDest = path$f.resolve(dest);
2050
2052
  // case-insensitive paths
2051
2053
  if (os === 'darwin' || os === 'win32') {
2052
2054
  return resolvedSrc.toLowerCase() === resolvedDest.toLowerCase()
@@ -2076,7 +2078,7 @@ var copy$1 = {
2076
2078
  };
2077
2079
 
2078
2080
  const fs$f = gracefulFs;
2079
- const path$f = path__default["default"];
2081
+ const path$e = path__default["default"];
2080
2082
  const assert = assert__default["default"];
2081
2083
 
2082
2084
  const isWindows = (process.platform === 'win32');
@@ -2281,7 +2283,7 @@ function rmkids (p, options, cb) {
2281
2283
  if (n === 0) return options.rmdir(p, cb)
2282
2284
 
2283
2285
  files.forEach(f => {
2284
- rimraf$1(path$f.join(p, f), options, er => {
2286
+ rimraf$1(path$e.join(p, f), options, er => {
2285
2287
  if (errState) {
2286
2288
  return
2287
2289
  }
@@ -2363,7 +2365,7 @@ function rmdirSync (p, options, originalEr) {
2363
2365
  function rmkidsSync (p, options) {
2364
2366
  assert(p);
2365
2367
  assert(options);
2366
- options.readdirSync(p).forEach(f => rimrafSync(path$f.join(p, f), options));
2368
+ options.readdirSync(p).forEach(f => rimrafSync(path$e.join(p, f), options));
2367
2369
 
2368
2370
  // We only end up here once we got ENOTEMPTY at least once, and
2369
2371
  // at this point, we are guaranteed to have removed all the kids.
@@ -2398,7 +2400,7 @@ var remove$2 = {
2398
2400
 
2399
2401
  const u$7 = universalify.fromCallback;
2400
2402
  const fs$e = fs__default["default"];
2401
- const path$e = path__default["default"];
2403
+ const path$d = path__default["default"];
2402
2404
  const mkdir$5 = mkdirs_1;
2403
2405
  const remove$1 = remove$2;
2404
2406
 
@@ -2407,7 +2409,7 @@ const emptyDir = u$7(function emptyDir (dir, callback) {
2407
2409
  fs$e.readdir(dir, (err, items) => {
2408
2410
  if (err) return mkdir$5.mkdirs(dir, callback)
2409
2411
 
2410
- items = items.map(item => path$e.join(dir, item));
2412
+ items = items.map(item => path$d.join(dir, item));
2411
2413
 
2412
2414
  deleteItem();
2413
2415
 
@@ -2431,7 +2433,7 @@ function emptyDirSync (dir) {
2431
2433
  }
2432
2434
 
2433
2435
  items.forEach(item => {
2434
- item = path$e.join(dir, item);
2436
+ item = path$d.join(dir, item);
2435
2437
  remove$1.removeSync(item);
2436
2438
  });
2437
2439
  }
@@ -2444,7 +2446,7 @@ var empty = {
2444
2446
  };
2445
2447
 
2446
2448
  const u$6 = universalify.fromCallback;
2447
- const path$d = path__default["default"];
2449
+ const path$c = path__default["default"];
2448
2450
  const fs$d = gracefulFs;
2449
2451
  const mkdir$4 = mkdirs_1;
2450
2452
  const pathExists$6 = pathExists_1.pathExists;
@@ -2459,7 +2461,7 @@ function createFile (file, callback) {
2459
2461
 
2460
2462
  fs$d.stat(file, (err, stats) => { // eslint-disable-line handle-callback-err
2461
2463
  if (!err && stats.isFile()) return callback()
2462
- const dir = path$d.dirname(file);
2464
+ const dir = path$c.dirname(file);
2463
2465
  pathExists$6(dir, (err, dirExists) => {
2464
2466
  if (err) return callback(err)
2465
2467
  if (dirExists) return makeFile()
@@ -2478,7 +2480,7 @@ function createFileSync (file) {
2478
2480
  } catch (e) {}
2479
2481
  if (stats && stats.isFile()) return
2480
2482
 
2481
- const dir = path$d.dirname(file);
2483
+ const dir = path$c.dirname(file);
2482
2484
  if (!fs$d.existsSync(dir)) {
2483
2485
  mkdir$4.mkdirsSync(dir);
2484
2486
  }
@@ -2492,7 +2494,7 @@ var file$2 = {
2492
2494
  };
2493
2495
 
2494
2496
  const u$5 = universalify.fromCallback;
2495
- const path$c = path__default["default"];
2497
+ const path$b = path__default["default"];
2496
2498
  const fs$c = gracefulFs;
2497
2499
  const mkdir$3 = mkdirs_1;
2498
2500
  const pathExists$5 = pathExists_1.pathExists;
@@ -2514,7 +2516,7 @@ function createLink (srcpath, dstpath, callback) {
2514
2516
  return callback(err)
2515
2517
  }
2516
2518
 
2517
- const dir = path$c.dirname(dstpath);
2519
+ const dir = path$b.dirname(dstpath);
2518
2520
  pathExists$5(dir, (err, dirExists) => {
2519
2521
  if (err) return callback(err)
2520
2522
  if (dirExists) return makeLink(srcpath, dstpath)
@@ -2538,7 +2540,7 @@ function createLinkSync (srcpath, dstpath) {
2538
2540
  throw err
2539
2541
  }
2540
2542
 
2541
- const dir = path$c.dirname(dstpath);
2543
+ const dir = path$b.dirname(dstpath);
2542
2544
  const dirExists = fs$c.existsSync(dir);
2543
2545
  if (dirExists) return fs$c.linkSync(srcpath, dstpath)
2544
2546
  mkdir$3.mkdirsSync(dir);
@@ -2551,7 +2553,7 @@ var link$1 = {
2551
2553
  createLinkSync
2552
2554
  };
2553
2555
 
2554
- const path$b = path__default["default"];
2556
+ const path$a = path__default["default"];
2555
2557
  const fs$b = gracefulFs;
2556
2558
  const pathExists$4 = pathExists_1.pathExists;
2557
2559
 
@@ -2578,7 +2580,7 @@ const pathExists$4 = pathExists_1.pathExists;
2578
2580
  */
2579
2581
 
2580
2582
  function symlinkPaths$1 (srcpath, dstpath, callback) {
2581
- if (path$b.isAbsolute(srcpath)) {
2583
+ if (path$a.isAbsolute(srcpath)) {
2582
2584
  return fs$b.lstat(srcpath, (err) => {
2583
2585
  if (err) {
2584
2586
  err.message = err.message.replace('lstat', 'ensureSymlink');
@@ -2590,8 +2592,8 @@ function symlinkPaths$1 (srcpath, dstpath, callback) {
2590
2592
  })
2591
2593
  })
2592
2594
  } else {
2593
- const dstdir = path$b.dirname(dstpath);
2594
- const relativeToDst = path$b.join(dstdir, srcpath);
2595
+ const dstdir = path$a.dirname(dstpath);
2596
+ const relativeToDst = path$a.join(dstdir, srcpath);
2595
2597
  return pathExists$4(relativeToDst, (err, exists) => {
2596
2598
  if (err) return callback(err)
2597
2599
  if (exists) {
@@ -2607,7 +2609,7 @@ function symlinkPaths$1 (srcpath, dstpath, callback) {
2607
2609
  }
2608
2610
  return callback(null, {
2609
2611
  'toCwd': srcpath,
2610
- 'toDst': path$b.relative(dstdir, srcpath)
2612
+ 'toDst': path$a.relative(dstdir, srcpath)
2611
2613
  })
2612
2614
  })
2613
2615
  }
@@ -2617,7 +2619,7 @@ function symlinkPaths$1 (srcpath, dstpath, callback) {
2617
2619
 
2618
2620
  function symlinkPathsSync$1 (srcpath, dstpath) {
2619
2621
  let exists;
2620
- if (path$b.isAbsolute(srcpath)) {
2622
+ if (path$a.isAbsolute(srcpath)) {
2621
2623
  exists = fs$b.existsSync(srcpath);
2622
2624
  if (!exists) throw new Error('absolute srcpath does not exist')
2623
2625
  return {
@@ -2625,8 +2627,8 @@ function symlinkPathsSync$1 (srcpath, dstpath) {
2625
2627
  'toDst': srcpath
2626
2628
  }
2627
2629
  } else {
2628
- const dstdir = path$b.dirname(dstpath);
2629
- const relativeToDst = path$b.join(dstdir, srcpath);
2630
+ const dstdir = path$a.dirname(dstpath);
2631
+ const relativeToDst = path$a.join(dstdir, srcpath);
2630
2632
  exists = fs$b.existsSync(relativeToDst);
2631
2633
  if (exists) {
2632
2634
  return {
@@ -2638,7 +2640,7 @@ function symlinkPathsSync$1 (srcpath, dstpath) {
2638
2640
  if (!exists) throw new Error('relative srcpath does not exist')
2639
2641
  return {
2640
2642
  'toCwd': srcpath,
2641
- 'toDst': path$b.relative(dstdir, srcpath)
2643
+ 'toDst': path$a.relative(dstdir, srcpath)
2642
2644
  }
2643
2645
  }
2644
2646
  }
@@ -2680,7 +2682,7 @@ var symlinkType_1 = {
2680
2682
  };
2681
2683
 
2682
2684
  const u$4 = universalify.fromCallback;
2683
- const path$a = path__default["default"];
2685
+ const path$9 = path__default["default"];
2684
2686
  const fs$9 = gracefulFs;
2685
2687
  const _mkdirs = mkdirs_1;
2686
2688
  const mkdirs = _mkdirs.mkdirs;
@@ -2708,7 +2710,7 @@ function createSymlink (srcpath, dstpath, type, callback) {
2708
2710
  srcpath = relative.toDst;
2709
2711
  symlinkType(relative.toCwd, type, (err, type) => {
2710
2712
  if (err) return callback(err)
2711
- const dir = path$a.dirname(dstpath);
2713
+ const dir = path$9.dirname(dstpath);
2712
2714
  pathExists$3(dir, (err, dirExists) => {
2713
2715
  if (err) return callback(err)
2714
2716
  if (dirExists) return fs$9.symlink(srcpath, dstpath, type, callback)
@@ -2729,7 +2731,7 @@ function createSymlinkSync (srcpath, dstpath, type) {
2729
2731
  const relative = symlinkPathsSync(srcpath, dstpath);
2730
2732
  srcpath = relative.toDst;
2731
2733
  type = symlinkTypeSync(relative.toCwd, type);
2732
- const dir = path$a.dirname(dstpath);
2734
+ const dir = path$9.dirname(dstpath);
2733
2735
  const exists = fs$9.existsSync(dir);
2734
2736
  if (exists) return fs$9.symlinkSync(srcpath, dstpath, type)
2735
2737
  mkdirsSync(dir);
@@ -2909,7 +2911,7 @@ var jsonfile = {
2909
2911
  writeJsonSync: jsonFile$3.writeFileSync
2910
2912
  };
2911
2913
 
2912
- const path$9 = path__default["default"];
2914
+ const path$8 = path__default["default"];
2913
2915
  const mkdir$2 = mkdirs_1;
2914
2916
  const pathExists$2 = pathExists_1.pathExists;
2915
2917
  const jsonFile$2 = jsonfile;
@@ -2920,7 +2922,7 @@ function outputJson (file, data, options, callback) {
2920
2922
  options = {};
2921
2923
  }
2922
2924
 
2923
- const dir = path$9.dirname(file);
2925
+ const dir = path$8.dirname(file);
2924
2926
 
2925
2927
  pathExists$2(dir, (err, itDoes) => {
2926
2928
  if (err) return callback(err)
@@ -2936,12 +2938,12 @@ function outputJson (file, data, options, callback) {
2936
2938
  var outputJson_1 = outputJson;
2937
2939
 
2938
2940
  const fs$8 = gracefulFs;
2939
- const path$8 = path__default["default"];
2941
+ const path$7 = path__default["default"];
2940
2942
  const mkdir$1 = mkdirs_1;
2941
2943
  const jsonFile$1 = jsonfile;
2942
2944
 
2943
2945
  function outputJsonSync (file, data, options) {
2944
- const dir = path$8.dirname(file);
2946
+ const dir = path$7.dirname(file);
2945
2947
 
2946
2948
  if (!fs$8.existsSync(dir)) {
2947
2949
  mkdir$1.mkdirsSync(dir);
@@ -2968,7 +2970,7 @@ jsonFile.readJSONSync = jsonFile.readJsonSync;
2968
2970
  var json = jsonFile;
2969
2971
 
2970
2972
  const fs$7 = gracefulFs;
2971
- const path$7 = path__default["default"];
2973
+ const path$6 = path__default["default"];
2972
2974
  const copySync = copySync$1.copySync;
2973
2975
  const removeSync = remove$2.removeSync;
2974
2976
  const mkdirpSync = mkdirs_1.mkdirsSync;
@@ -2978,14 +2980,14 @@ function moveSync (src, dest, options) {
2978
2980
  options = options || {};
2979
2981
  const overwrite = options.overwrite || options.clobber || false;
2980
2982
 
2981
- src = path$7.resolve(src);
2982
- dest = path$7.resolve(dest);
2983
+ src = path$6.resolve(src);
2984
+ dest = path$6.resolve(dest);
2983
2985
 
2984
2986
  if (src === dest) return fs$7.accessSync(src)
2985
2987
 
2986
2988
  if (isSrcSubdir$1(src, dest)) throw new Error(`Cannot move '${src}' into itself '${dest}'.`)
2987
2989
 
2988
- mkdirpSync(path$7.dirname(dest));
2990
+ mkdirpSync(path$6.dirname(dest));
2989
2991
  tryRenameSync();
2990
2992
 
2991
2993
  function tryRenameSync () {
@@ -3073,7 +3075,7 @@ function isSrcSubdir$1 (src, dest) {
3073
3075
  return fs$7.statSync(src).isDirectory() &&
3074
3076
  src !== dest &&
3075
3077
  dest.indexOf(src) > -1 &&
3076
- dest.split(path$7.dirname(src) + path$7.sep)[1].split(path$7.sep)[0] === path$7.basename(src)
3078
+ dest.split(path$6.dirname(src) + path$6.sep)[1].split(path$6.sep)[0] === path$6.basename(src)
3077
3079
  } catch (e) {
3078
3080
  return false
3079
3081
  }
@@ -3085,7 +3087,7 @@ var moveSync_1 = {
3085
3087
 
3086
3088
  const u$1 = universalify.fromCallback;
3087
3089
  const fs$6 = gracefulFs;
3088
- const path$6 = path__default["default"];
3090
+ const path$5 = path__default["default"];
3089
3091
  const copy = copy$1.copy;
3090
3092
  const remove = remove$2.remove;
3091
3093
  const mkdirp = mkdirs_1.mkdirp;
@@ -3099,8 +3101,8 @@ function move (src, dest, opts, cb) {
3099
3101
 
3100
3102
  const overwrite = opts.overwrite || opts.clobber || false;
3101
3103
 
3102
- src = path$6.resolve(src);
3103
- dest = path$6.resolve(dest);
3104
+ src = path$5.resolve(src);
3105
+ dest = path$5.resolve(dest);
3104
3106
 
3105
3107
  if (src === dest) return fs$6.access(src, cb)
3106
3108
 
@@ -3110,7 +3112,7 @@ function move (src, dest, opts, cb) {
3110
3112
  if (st.isDirectory() && isSrcSubdir(src, dest)) {
3111
3113
  return cb(new Error(`Cannot move '${src}' to a subdirectory of itself, '${dest}'.`))
3112
3114
  }
3113
- mkdirp(path$6.dirname(dest), err => {
3115
+ mkdirp(path$5.dirname(dest), err => {
3114
3116
  if (err) return cb(err)
3115
3117
  return doRename(src, dest, overwrite, cb)
3116
3118
  });
@@ -3152,8 +3154,8 @@ function moveAcrossDevice (src, dest, overwrite, cb) {
3152
3154
  }
3153
3155
 
3154
3156
  function isSrcSubdir (src, dest) {
3155
- const srcArray = src.split(path$6.sep);
3156
- const destArray = dest.split(path$6.sep);
3157
+ const srcArray = src.split(path$5.sep);
3158
+ const destArray = dest.split(path$5.sep);
3157
3159
 
3158
3160
  return srcArray.reduce((acc, current, i) => {
3159
3161
  return acc && destArray[i] === current
@@ -3166,7 +3168,7 @@ var move_1 = {
3166
3168
 
3167
3169
  const u = universalify.fromCallback;
3168
3170
  const fs$5 = gracefulFs;
3169
- const path$5 = path__default["default"];
3171
+ const path$4 = path__default["default"];
3170
3172
  const mkdir = mkdirs_1;
3171
3173
  const pathExists = pathExists_1.pathExists;
3172
3174
 
@@ -3176,7 +3178,7 @@ function outputFile (file, data, encoding, callback) {
3176
3178
  encoding = 'utf8';
3177
3179
  }
3178
3180
 
3179
- const dir = path$5.dirname(file);
3181
+ const dir = path$4.dirname(file);
3180
3182
  pathExists(dir, (err, itDoes) => {
3181
3183
  if (err) return callback(err)
3182
3184
  if (itDoes) return fs$5.writeFile(file, data, encoding, callback)
@@ -3190,7 +3192,7 @@ function outputFile (file, data, encoding, callback) {
3190
3192
  }
3191
3193
 
3192
3194
  function outputFileSync (file, ...args) {
3193
- const dir = path$5.dirname(file);
3195
+ const dir = path$4.dirname(file);
3194
3196
  if (fs$5.existsSync(dir)) {
3195
3197
  return fs$5.writeFileSync(file, ...args)
3196
3198
  }
@@ -4325,10 +4327,6 @@ var nodeGypBuild$1 = {
4325
4327
  set exports(v){ nodeGypBuildExports = v; },
4326
4328
  };
4327
4329
 
4328
- function commonjsRequire(path) {
4329
- throw new Error('Could not dynamically require "' + path + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
4330
- }
4331
-
4332
4330
  var nodeGypBuild;
4333
4331
  var hasRequiredNodeGypBuild$1;
4334
4332
 
@@ -4340,7 +4338,7 @@ function requireNodeGypBuild$1 () {
4340
4338
  var os = require$$1__default["default"];
4341
4339
 
4342
4340
  // Workaround to fix webpack's build warnings: 'the request of a dependency is an expression'
4343
- var runtimeRequire = typeof __webpack_require__ === 'function' ? __non_webpack_require__ : commonjsRequire; // eslint-disable-line
4341
+ var runtimeRequire = typeof __webpack_require__ === 'function' ? __non_webpack_require__ : require; // eslint-disable-line
4344
4342
 
4345
4343
  var vars = (process.config && process.config.variables) || {};
4346
4344
  var prebuildsOnly = !!process.env.PREBUILDS_ONLY;
@@ -39680,7 +39678,7 @@ function requireQuery () {
39680
39678
  */
39681
39679
 
39682
39680
  var debug$1 = srcExports('express:view');
39683
- var path$4 = path__default["default"];
39681
+ var path$3 = path__default["default"];
39684
39682
  var fs$3 = fs__default["default"];
39685
39683
 
39686
39684
  /**
@@ -39688,11 +39686,11 @@ var fs$3 = fs__default["default"];
39688
39686
  * @private
39689
39687
  */
39690
39688
 
39691
- var dirname = path$4.dirname;
39692
- var basename$1 = path$4.basename;
39693
- var extname$2 = path$4.extname;
39694
- var join$1 = path$4.join;
39695
- var resolve$3 = path$4.resolve;
39689
+ var dirname = path$3.dirname;
39690
+ var basename$1 = path$3.basename;
39691
+ var extname$2 = path$3.extname;
39692
+ var join$1 = path$3.join;
39693
+ var resolve$3 = path$3.resolve;
39696
39694
 
39697
39695
  /**
39698
39696
  * Module exports.
@@ -39744,7 +39742,7 @@ function View(name, options) {
39744
39742
  debug$1('require "%s"', mod);
39745
39743
 
39746
39744
  // default engine export
39747
- var fn = commonjsRequire(mod).__express;
39745
+ var fn = require(mod).__express;
39748
39746
 
39749
39747
  if (typeof fn !== 'function') {
39750
39748
  throw new Error('Module "' + mod + '" does not provide a view engine.')
@@ -43876,7 +43874,7 @@ var mime$2 = mime_1;
43876
43874
  var ms = ms$1;
43877
43875
  var onFinished$1 = onFinishedExports;
43878
43876
  var parseRange$1 = rangeParser_1;
43879
- var path$3 = path__default["default"];
43877
+ var path$2 = path__default["default"];
43880
43878
  var statuses$1 = statuses$3;
43881
43879
  var Stream = require$$0__default$1["default"];
43882
43880
  var util = require$$4__default["default"];
@@ -43886,11 +43884,11 @@ var util = require$$4__default["default"];
43886
43884
  * @private
43887
43885
  */
43888
43886
 
43889
- var extname$1 = path$3.extname;
43890
- var join = path$3.join;
43891
- var normalize = path$3.normalize;
43892
- var resolve$2 = path$3.resolve;
43893
- var sep = path$3.sep;
43887
+ var extname$1 = path$2.extname;
43888
+ var join = path$2.join;
43889
+ var normalize = path$2.normalize;
43890
+ var resolve$2 = path$2.resolve;
43891
+ var sep = path$2.sep;
43894
43892
 
43895
43893
  /**
43896
43894
  * Regular expression for identifying a bytes Range header.
@@ -49251,7 +49249,7 @@ var escapeHtml = escapeHtml_1;
49251
49249
  var http = require$$2__default["default"];
49252
49250
  var isAbsolute = utils.isAbsolute;
49253
49251
  var onFinished = onFinishedExports;
49254
- var path$2 = path__default["default"];
49252
+ var path$1 = path__default["default"];
49255
49253
  var statuses = statuses$3;
49256
49254
  var merge = utilsMergeExports;
49257
49255
  var sign = cookieSignature.sign;
@@ -49260,9 +49258,9 @@ var normalizeTypes = utils.normalizeTypes;
49260
49258
  var setCharset = utils.setCharset;
49261
49259
  var cookie = cookie$1;
49262
49260
  var send = sendExports;
49263
- var extname = path$2.extname;
49261
+ var extname = path$1.extname;
49264
49262
  var mime = send.mime;
49265
- var resolve$1 = path$2.resolve;
49263
+ var resolve$1 = path$1.resolve;
49266
49264
  var vary = varyExports;
49267
49265
 
49268
49266
  /**
@@ -51043,7 +51041,7 @@ class Server extends require$$0__default$2["default"] {
51043
51041
  break;
51044
51042
  }
51045
51043
  });
51046
- // console.log("Got dude", envs);
51044
+ // console.log("Got dude", client);
51047
51045
  this.emit("builder", client);
51048
51046
  }
51049
51047
  _handleMonitor(req, client) {
@@ -51986,7 +51984,7 @@ function requireResolve () {
51986
51984
  // If we're in webpack, force it to use the original require() method
51987
51985
  var requireFunction = ("function" === typeof __webpack_require__ || "function" === typeof __non_webpack_require__)
51988
51986
  ? __non_webpack_require__
51989
- : commonjsRequire;
51987
+ : require;
51990
51988
 
51991
51989
  // Resolver
51992
51990
  resolve = function resolve(dirname) {
@@ -52069,7 +52067,7 @@ var appRootPath$1 = function(dirname) {
52069
52067
  },
52070
52068
 
52071
52069
  require: function(pathToModule) {
52072
- return commonjsRequire(publicInterface.resolve(pathToModule));
52070
+ return require(publicInterface.resolve(pathToModule));
52073
52071
  },
52074
52072
 
52075
52073
  toString: function() {
@@ -52383,7 +52381,7 @@ function requireMinimist () {
52383
52381
  /*global require,module,process*/
52384
52382
 
52385
52383
  const fs = fs__default["default"];
52386
- const path$1 = path__default["default"];
52384
+ const path = path__default["default"];
52387
52385
  const appPath = appRootPath;
52388
52386
  const xdg = xdgBasedir;
52389
52387
 
@@ -52464,7 +52462,7 @@ class Options {
52464
52462
  _homedir() {
52465
52463
  let home = process.env.home;
52466
52464
  if (home) {
52467
- return path$1.join(home, ".config");
52465
+ return path.join(home, ".config");
52468
52466
  }
52469
52467
  return undefined;
52470
52468
  }
@@ -52506,11 +52504,11 @@ class Options {
52506
52504
  };
52507
52505
 
52508
52506
  // console.log("about to read file", file, "additionalFiles", this.additionalFiles, "configDirs", this.configDirs, "applicationPath", this.applicationPath, "homedir", this._homedir());
52509
- if (path$1.isAbsolute(file)) {
52507
+ if (path.isAbsolute(file)) {
52510
52508
  read(file);
52511
52509
  } else {
52512
52510
  this.additionalFiles.forEach(file => {
52513
- if (path$1.isAbsolute(file) && read(file) == Failed)
52511
+ if (path.isAbsolute(file) && read(file) == Failed)
52514
52512
  read(file + ".conf");
52515
52513
  });
52516
52514
  ([this.applicationPath, this._homedir()].concat(this.configDirs)).forEach(root => {
@@ -52518,14 +52516,14 @@ class Options {
52518
52516
  if (!root)
52519
52517
  return;
52520
52518
  this.additionalFiles.forEach(additional => {
52521
- if (!path$1.isAbsolute(additional)) {
52522
- let file = path$1.join(root, additional);
52519
+ if (!path.isAbsolute(additional)) {
52520
+ let file = path.join(root, additional);
52523
52521
  if (read(file) == Failed)
52524
52522
  read(file + ".conf");
52525
52523
  }
52526
52524
  });
52527
52525
 
52528
- let filePath = path$1.join(root, file);
52526
+ let filePath = path.join(root, file);
52529
52527
  if (read(filePath) == Failed)
52530
52528
  read(filePath + ".conf");
52531
52529
  });
@@ -52611,168 +52609,6 @@ var options = function(options, argv) {
52611
52609
  return ret;
52612
52610
  };
52613
52611
 
52614
- var posixExports = {};
52615
- var posix$1 = {
52616
- get exports(){ return posixExports; },
52617
- set exports(v){ posixExports = v; },
52618
- };
52619
-
52620
- var path = path__default["default"];
52621
-
52622
-
52623
- var IS_LINUX = require$$1__default["default"].platform() === 'linux';
52624
-
52625
-
52626
- // Attempt to load the bindings module from various possible locations
52627
- function load_extension() {
52628
- var ext_dirs = [
52629
- 'build/bindings', 'build/Release', 'out/Release', 'Release',
52630
- 'build/Debug', 'out/Debug',
52631
- ], i;
52632
- for (i in ext_dirs) {
52633
- try {
52634
- return commonjsRequire(path.join(__dirname, '../../posix', ext_dirs[i],
52635
- 'posix.node'));
52636
-
52637
- } catch (error) {
52638
- if (!/Cannot find module/.test(error.message)) {
52639
- throw error;
52640
- }
52641
- }
52642
- }
52643
- throw new Error("unable to load the node-posix extension module");
52644
- }
52645
-
52646
- var posix = load_extension();
52647
-
52648
- var syslog_constants = {};
52649
- posix.update_syslog_constants(syslog_constants);
52650
-
52651
- function syslog_const(value) {
52652
- if (syslog_constants[value] === undefined) {
52653
- throw new Error("invalid syslog constant value: " + value);
52654
- }
52655
-
52656
- return syslog_constants[value];
52657
- }
52658
-
52659
- function syslog_flags(option, prefix) {
52660
- prefix = prefix || "";
52661
- var opt = 0, key, flag;
52662
- for (key in option) {
52663
- flag = syslog_const(prefix + key); // checks all flags
52664
- opt |= option[key] ? flag : 0;
52665
- }
52666
- return opt;
52667
- }
52668
-
52669
- posix$1.exports = {
52670
- getgid: process.getgid,
52671
- getuid: process.getuid,
52672
- setgid: process.setgid,
52673
- setuid: process.setuid,
52674
-
52675
- chroot: posix.chroot,
52676
- closelog: posix.closelog,
52677
- getegid: posix.getegid,
52678
- geteuid: posix.geteuid,
52679
- getgrnam: posix.getgrnam,
52680
- getpgid: posix.getpgid,
52681
- setpgid: posix.setpgid,
52682
- getppid: posix.getppid,
52683
- getpwnam: posix.getpwnam,
52684
- getrlimit: posix.getrlimit,
52685
- setrlimit: posix.setrlimit,
52686
- setsid: posix.setsid,
52687
-
52688
- openlog: function (ident, option, facility) {
52689
- return posix.openlog(ident, syslog_flags(option),
52690
- syslog_const(facility));
52691
- },
52692
-
52693
- syslog: function (priority, message) {
52694
- return posix.syslog(syslog_const(priority), message);
52695
- },
52696
-
52697
- setlogmask: function (maskpri) {
52698
- var bits = posix.setlogmask(syslog_flags(maskpri, "mask_")), flags = {}, key;
52699
- for (key in syslog_constants) {
52700
- if (key.match("^mask_")) {
52701
- flags[key.substr(5, 10)] = (bits & syslog_constants[key])
52702
- ? true : false;
52703
- }
52704
- }
52705
- return flags;
52706
- },
52707
-
52708
- // http://pubs.opengroup.org/onlinepubs/007904875/functions/getpgrp.html
52709
- getpgrp: function () {
52710
- return posix.getpgid(0);
52711
- },
52712
-
52713
- seteuid: function (euid) {
52714
- euid = (typeof (euid) === 'string') ? posix.getpwnam(euid).uid : euid;
52715
- return posix.seteuid(euid);
52716
- },
52717
-
52718
- setreuid: function (ruid, euid) {
52719
- ruid = (typeof (ruid) === 'string') ? posix.getpwnam(ruid).uid : ruid;
52720
- euid = (typeof (euid) === 'string') ? posix.getpwnam(euid).uid : euid;
52721
- return posix.setreuid(ruid, euid);
52722
- },
52723
-
52724
- setegid: function (egid) {
52725
- egid = (typeof (egid) === 'string') ? posix.getgrnam(egid).gid : egid;
52726
- return posix.setegid(egid);
52727
- },
52728
-
52729
- setregid: function (rgid, egid) {
52730
- rgid = (typeof (rgid) === 'string') ? posix.getgrnam(rgid).gid : rgid;
52731
- egid = (typeof (egid) === 'string') ? posix.getgrnam(egid).gid : egid;
52732
- return posix.setregid(rgid, egid);
52733
- },
52734
-
52735
- gethostname: posix.gethostname,
52736
- sethostname: posix.sethostname,
52737
- };
52738
-
52739
- var swap_constants = {};
52740
-
52741
- function swap_const(value) {
52742
- var constant = swap_constants[value];
52743
- if (constant === undefined) {
52744
- throw "invalid swap constant value: " + value;
52745
- }
52746
-
52747
- return constant;
52748
- }
52749
-
52750
- function swap_flags(option) {
52751
- var opt = 0, key, flag;
52752
- for (key in option) {
52753
- flag = swap_const(key); // checks all flags
52754
- opt |= option[key] ? flag : 0;
52755
- }
52756
- return opt;
52757
- }
52758
-
52759
-
52760
- if (IS_LINUX) {
52761
- posix.update_swap_constants(swap_constants);
52762
- posixExports.swapon = function (path, swapflags) {
52763
- return posix.swapon(path, swap_flags(swapflags));
52764
- };
52765
- posixExports.swapoff = posix.swapoff;
52766
- }
52767
-
52768
- if ('initgroups' in posix) {
52769
- // initgroups is in SVr4 and 4.3BSD, not POSIX
52770
- posixExports.initgroups = function (user, group) {
52771
- var gid = (typeof (group) === 'string') ? posix.getgrnam(group).gid : group;
52772
- return posix.initgroups(user, gid);
52773
- };
52774
- }
52775
-
52776
52612
  const option = options({
52777
52613
  prefix: "fisk/builder",
52778
52614
  noApplicationPath: true,
@@ -52966,7 +52802,7 @@ function builderToMonitorInfo(builder, type) {
52966
52802
  compileSpeed: builder.jobsPerformed / builder.totalCompileSpeed || 0,
52967
52803
  uploadSpeed: builder.jobsPerformed / builder.totalUploadSpeed || 0,
52968
52804
  system: builder.system,
52969
- created: builder.created,
52805
+ created: builder.created.toString(),
52970
52806
  npmVersion: builder.npmVersion,
52971
52807
  environments: builder.environments ? Object.keys(builder.environments) : [],
52972
52808
  labels: builder.labels
@@ -54022,7 +53858,7 @@ Environments.instance
54022
53858
  const limit = option.int("max-file-descriptors");
54023
53859
  if (limit) {
54024
53860
  console.log("setting limit", limit);
54025
- posixExports.setrlimit("nofile", { soft: limit });
53861
+ posix__default["default"].setrlimit("nofile", { soft: limit });
54026
53862
  }
54027
53863
  })
54028
53864
  .then(purgeEnvironmentsToMaxSize)
@@ -54046,3 +53882,4 @@ Environments.instance
54046
53882
  console.error(e);
54047
53883
  process.exit();
54048
53884
  });
53885
+ //# sourceMappingURL=fisk-scheduler.js.map