@magda/docker-utils 3.0.0-alpha.0 → 3.0.0-alpha.1

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.
@@ -1825,9 +1825,40 @@ var require_ensure = __commonJS({
1825
1825
  }
1826
1826
  });
1827
1827
 
1828
- // ../../scripts/node_modules/jsonfile/utils.js
1828
+ // ../../node_modules/jsonfile/node_modules/universalify/index.js
1829
+ var require_universalify2 = __commonJS({
1830
+ "../../node_modules/jsonfile/node_modules/universalify/index.js"(exports) {
1831
+ "use strict";
1832
+ exports.fromCallback = function(fn) {
1833
+ return Object.defineProperty(function(...args) {
1834
+ if (typeof args[args.length - 1] === "function")
1835
+ fn.apply(this, args);
1836
+ else {
1837
+ return new Promise((resolve, reject) => {
1838
+ fn.call(
1839
+ this,
1840
+ ...args,
1841
+ (err, res) => err != null ? reject(err) : resolve(res)
1842
+ );
1843
+ });
1844
+ }
1845
+ }, "name", { value: fn.name });
1846
+ };
1847
+ exports.fromPromise = function(fn) {
1848
+ return Object.defineProperty(function(...args) {
1849
+ const cb = args[args.length - 1];
1850
+ if (typeof cb !== "function")
1851
+ return fn.apply(this, args);
1852
+ else
1853
+ fn.apply(this, args.slice(0, -1)).then((r) => cb(null, r), cb);
1854
+ }, "name", { value: fn.name });
1855
+ };
1856
+ }
1857
+ });
1858
+
1859
+ // ../../node_modules/jsonfile/utils.js
1829
1860
  var require_utils2 = __commonJS({
1830
- "../../scripts/node_modules/jsonfile/utils.js"(exports, module) {
1861
+ "../../node_modules/jsonfile/utils.js"(exports, module) {
1831
1862
  function stringify(obj, { EOL = "\n", finalEOL = true, replacer = null, spaces } = {}) {
1832
1863
  const EOF = finalEOL ? EOL : "";
1833
1864
  const str = JSON.stringify(obj, replacer, spaces);
@@ -1842,16 +1873,16 @@ var require_utils2 = __commonJS({
1842
1873
  }
1843
1874
  });
1844
1875
 
1845
- // ../../scripts/node_modules/jsonfile/index.js
1876
+ // ../../node_modules/jsonfile/index.js
1846
1877
  var require_jsonfile = __commonJS({
1847
- "../../scripts/node_modules/jsonfile/index.js"(exports, module) {
1878
+ "../../node_modules/jsonfile/index.js"(exports, module) {
1848
1879
  var _fs;
1849
1880
  try {
1850
1881
  _fs = require_graceful_fs();
1851
1882
  } catch (_2) {
1852
1883
  _fs = __require("fs");
1853
1884
  }
1854
- var universalify = require_universalify();
1885
+ var universalify = require_universalify2();
1855
1886
  var { stringify, stripBom } = require_utils2();
1856
1887
  async function _readFile(file, options = {}) {
1857
1888
  if (typeof options === "string") {
@@ -3540,9 +3571,9 @@ var require_completion = __commonJS({
3540
3571
  }
3541
3572
  });
3542
3573
 
3543
- // ../../node_modules/yargs/node_modules/ansi-regex/index.js
3574
+ // ../../node_modules/string-width/node_modules/ansi-regex/index.js
3544
3575
  var require_ansi_regex = __commonJS({
3545
- "../../node_modules/yargs/node_modules/ansi-regex/index.js"(exports, module) {
3576
+ "../../node_modules/string-width/node_modules/ansi-regex/index.js"(exports, module) {
3546
3577
  "use strict";
3547
3578
  module.exports = () => {
3548
3579
  const pattern = [
@@ -3554,9 +3585,9 @@ var require_ansi_regex = __commonJS({
3554
3585
  }
3555
3586
  });
3556
3587
 
3557
- // ../../node_modules/yargs/node_modules/strip-ansi/index.js
3588
+ // ../../node_modules/string-width/node_modules/strip-ansi/index.js
3558
3589
  var require_strip_ansi = __commonJS({
3559
- "../../node_modules/yargs/node_modules/strip-ansi/index.js"(exports, module) {
3590
+ "../../node_modules/string-width/node_modules/strip-ansi/index.js"(exports, module) {
3560
3591
  "use strict";
3561
3592
  var ansiRegex = require_ansi_regex();
3562
3593
  module.exports = (input) => typeof input === "string" ? input.replace(ansiRegex(), "") : input;
@@ -3594,9 +3625,9 @@ var require_is_fullwidth_code_point = __commonJS({
3594
3625
  }
3595
3626
  });
3596
3627
 
3597
- // ../../node_modules/yargs/node_modules/string-width/index.js
3628
+ // ../../node_modules/string-width/index.js
3598
3629
  var require_string_width = __commonJS({
3599
- "../../node_modules/yargs/node_modules/string-width/index.js"(exports, module) {
3630
+ "../../node_modules/string-width/index.js"(exports, module) {
3600
3631
  "use strict";
3601
3632
  var stripAnsi = require_strip_ansi();
3602
3633
  var isFullwidthCodePoint = require_is_fullwidth_code_point();
@@ -3677,36 +3708,6 @@ var require_strip_ansi2 = __commonJS({
3677
3708
  }
3678
3709
  });
3679
3710
 
3680
- // ../../node_modules/cliui/node_modules/string-width/index.js
3681
- var require_string_width2 = __commonJS({
3682
- "../../node_modules/cliui/node_modules/string-width/index.js"(exports, module) {
3683
- "use strict";
3684
- var stripAnsi = require_strip_ansi2();
3685
- var isFullwidthCodePoint = require_is_fullwidth_code_point();
3686
- module.exports = (str) => {
3687
- if (typeof str !== "string" || str.length === 0) {
3688
- return 0;
3689
- }
3690
- str = stripAnsi(str);
3691
- let width = 0;
3692
- for (let i = 0; i < str.length; i++) {
3693
- const code = str.codePointAt(i);
3694
- if (code <= 31 || code >= 127 && code <= 159) {
3695
- continue;
3696
- }
3697
- if (code >= 768 && code <= 879) {
3698
- continue;
3699
- }
3700
- if (code > 65535) {
3701
- i++;
3702
- }
3703
- width += isFullwidthCodePoint(code) ? 2 : 1;
3704
- }
3705
- return width;
3706
- };
3707
- }
3708
- });
3709
-
3710
3711
  // ../../node_modules/cliui/node_modules/wrap-ansi/node_modules/ansi-regex/index.js
3711
3712
  var require_ansi_regex3 = __commonJS({
3712
3713
  "../../node_modules/cliui/node_modules/wrap-ansi/node_modules/ansi-regex/index.js"(exports, module) {
@@ -3767,9 +3768,9 @@ var require_number_is_nan = __commonJS({
3767
3768
  }
3768
3769
  });
3769
3770
 
3770
- // ../../node_modules/cliui/node_modules/wrap-ansi/node_modules/is-fullwidth-code-point/index.js
3771
+ // ../../node_modules/cliui/node_modules/is-fullwidth-code-point/index.js
3771
3772
  var require_is_fullwidth_code_point2 = __commonJS({
3772
- "../../node_modules/cliui/node_modules/wrap-ansi/node_modules/is-fullwidth-code-point/index.js"(exports, module) {
3773
+ "../../node_modules/cliui/node_modules/is-fullwidth-code-point/index.js"(exports, module) {
3773
3774
  "use strict";
3774
3775
  var numberIsNan = require_number_is_nan();
3775
3776
  module.exports = function(x) {
@@ -3800,7 +3801,7 @@ var require_is_fullwidth_code_point2 = __commonJS({
3800
3801
  });
3801
3802
 
3802
3803
  // ../../node_modules/cliui/node_modules/wrap-ansi/node_modules/string-width/index.js
3803
- var require_string_width3 = __commonJS({
3804
+ var require_string_width2 = __commonJS({
3804
3805
  "../../node_modules/cliui/node_modules/wrap-ansi/node_modules/string-width/index.js"(exports, module) {
3805
3806
  "use strict";
3806
3807
  var stripAnsi = require_strip_ansi3();
@@ -3835,7 +3836,7 @@ var require_string_width3 = __commonJS({
3835
3836
  var require_wrap_ansi = __commonJS({
3836
3837
  "../../node_modules/cliui/node_modules/wrap-ansi/index.js"(exports, module) {
3837
3838
  "use strict";
3838
- var stringWidth = require_string_width3();
3839
+ var stringWidth = require_string_width2();
3839
3840
  var stripAnsi = require_strip_ansi3();
3840
3841
  var ESCAPES = [
3841
3842
  "\x1B",
@@ -3963,7 +3964,7 @@ var require_wrap_ansi = __commonJS({
3963
3964
  // ../../node_modules/cliui/index.js
3964
3965
  var require_cliui = __commonJS({
3965
3966
  "../../node_modules/cliui/index.js"(exports, module) {
3966
- var stringWidth = require_string_width2();
3967
+ var stringWidth = require_string_width();
3967
3968
  var stripAnsi = require_strip_ansi2();
3968
3969
  var wrap = require_wrap_ansi();
3969
3970
  var align = {
@@ -5425,9 +5426,9 @@ var require_find_up = __commonJS({
5425
5426
  }
5426
5427
  });
5427
5428
 
5428
- // ../../node_modules/yargs/node_modules/require-main-filename/index.js
5429
+ // ../../node_modules/require-main-filename/index.js
5429
5430
  var require_require_main_filename = __commonJS({
5430
- "../../node_modules/yargs/node_modules/require-main-filename/index.js"(exports, module) {
5431
+ "../../node_modules/require-main-filename/index.js"(exports, module) {
5431
5432
  module.exports = function(_require) {
5432
5433
  _require = _require || __require;
5433
5434
  var main = _require.main;
@@ -1424,9 +1424,9 @@ var require_completion = __commonJS({
1424
1424
  }
1425
1425
  });
1426
1426
 
1427
- // ../../node_modules/yargs/node_modules/ansi-regex/index.js
1427
+ // ../../node_modules/string-width/node_modules/ansi-regex/index.js
1428
1428
  var require_ansi_regex = __commonJS({
1429
- "../../node_modules/yargs/node_modules/ansi-regex/index.js"(exports, module) {
1429
+ "../../node_modules/string-width/node_modules/ansi-regex/index.js"(exports, module) {
1430
1430
  "use strict";
1431
1431
  module.exports = () => {
1432
1432
  const pattern = [
@@ -1438,9 +1438,9 @@ var require_ansi_regex = __commonJS({
1438
1438
  }
1439
1439
  });
1440
1440
 
1441
- // ../../node_modules/yargs/node_modules/strip-ansi/index.js
1441
+ // ../../node_modules/string-width/node_modules/strip-ansi/index.js
1442
1442
  var require_strip_ansi = __commonJS({
1443
- "../../node_modules/yargs/node_modules/strip-ansi/index.js"(exports, module) {
1443
+ "../../node_modules/string-width/node_modules/strip-ansi/index.js"(exports, module) {
1444
1444
  "use strict";
1445
1445
  var ansiRegex = require_ansi_regex();
1446
1446
  module.exports = (input) => typeof input === "string" ? input.replace(ansiRegex(), "") : input;
@@ -1478,9 +1478,9 @@ var require_is_fullwidth_code_point = __commonJS({
1478
1478
  }
1479
1479
  });
1480
1480
 
1481
- // ../../node_modules/yargs/node_modules/string-width/index.js
1481
+ // ../../node_modules/string-width/index.js
1482
1482
  var require_string_width = __commonJS({
1483
- "../../node_modules/yargs/node_modules/string-width/index.js"(exports, module) {
1483
+ "../../node_modules/string-width/index.js"(exports, module) {
1484
1484
  "use strict";
1485
1485
  var stripAnsi = require_strip_ansi();
1486
1486
  var isFullwidthCodePoint = require_is_fullwidth_code_point();
@@ -1561,36 +1561,6 @@ var require_strip_ansi2 = __commonJS({
1561
1561
  }
1562
1562
  });
1563
1563
 
1564
- // ../../node_modules/cliui/node_modules/string-width/index.js
1565
- var require_string_width2 = __commonJS({
1566
- "../../node_modules/cliui/node_modules/string-width/index.js"(exports, module) {
1567
- "use strict";
1568
- var stripAnsi = require_strip_ansi2();
1569
- var isFullwidthCodePoint = require_is_fullwidth_code_point();
1570
- module.exports = (str) => {
1571
- if (typeof str !== "string" || str.length === 0) {
1572
- return 0;
1573
- }
1574
- str = stripAnsi(str);
1575
- let width = 0;
1576
- for (let i = 0; i < str.length; i++) {
1577
- const code = str.codePointAt(i);
1578
- if (code <= 31 || code >= 127 && code <= 159) {
1579
- continue;
1580
- }
1581
- if (code >= 768 && code <= 879) {
1582
- continue;
1583
- }
1584
- if (code > 65535) {
1585
- i++;
1586
- }
1587
- width += isFullwidthCodePoint(code) ? 2 : 1;
1588
- }
1589
- return width;
1590
- };
1591
- }
1592
- });
1593
-
1594
1564
  // ../../node_modules/cliui/node_modules/wrap-ansi/node_modules/ansi-regex/index.js
1595
1565
  var require_ansi_regex3 = __commonJS({
1596
1566
  "../../node_modules/cliui/node_modules/wrap-ansi/node_modules/ansi-regex/index.js"(exports, module) {
@@ -1651,9 +1621,9 @@ var require_number_is_nan = __commonJS({
1651
1621
  }
1652
1622
  });
1653
1623
 
1654
- // ../../node_modules/cliui/node_modules/wrap-ansi/node_modules/is-fullwidth-code-point/index.js
1624
+ // ../../node_modules/cliui/node_modules/is-fullwidth-code-point/index.js
1655
1625
  var require_is_fullwidth_code_point2 = __commonJS({
1656
- "../../node_modules/cliui/node_modules/wrap-ansi/node_modules/is-fullwidth-code-point/index.js"(exports, module) {
1626
+ "../../node_modules/cliui/node_modules/is-fullwidth-code-point/index.js"(exports, module) {
1657
1627
  "use strict";
1658
1628
  var numberIsNan = require_number_is_nan();
1659
1629
  module.exports = function(x) {
@@ -1684,7 +1654,7 @@ var require_is_fullwidth_code_point2 = __commonJS({
1684
1654
  });
1685
1655
 
1686
1656
  // ../../node_modules/cliui/node_modules/wrap-ansi/node_modules/string-width/index.js
1687
- var require_string_width3 = __commonJS({
1657
+ var require_string_width2 = __commonJS({
1688
1658
  "../../node_modules/cliui/node_modules/wrap-ansi/node_modules/string-width/index.js"(exports, module) {
1689
1659
  "use strict";
1690
1660
  var stripAnsi = require_strip_ansi3();
@@ -1719,7 +1689,7 @@ var require_string_width3 = __commonJS({
1719
1689
  var require_wrap_ansi = __commonJS({
1720
1690
  "../../node_modules/cliui/node_modules/wrap-ansi/index.js"(exports, module) {
1721
1691
  "use strict";
1722
- var stringWidth = require_string_width3();
1692
+ var stringWidth = require_string_width2();
1723
1693
  var stripAnsi = require_strip_ansi3();
1724
1694
  var ESCAPES = [
1725
1695
  "\x1B",
@@ -1847,7 +1817,7 @@ var require_wrap_ansi = __commonJS({
1847
1817
  // ../../node_modules/cliui/index.js
1848
1818
  var require_cliui = __commonJS({
1849
1819
  "../../node_modules/cliui/index.js"(exports, module) {
1850
- var stringWidth = require_string_width2();
1820
+ var stringWidth = require_string_width();
1851
1821
  var stripAnsi = require_strip_ansi2();
1852
1822
  var wrap = require_wrap_ansi();
1853
1823
  var align = {
@@ -3309,9 +3279,9 @@ var require_find_up = __commonJS({
3309
3279
  }
3310
3280
  });
3311
3281
 
3312
- // ../../node_modules/yargs/node_modules/require-main-filename/index.js
3282
+ // ../../node_modules/require-main-filename/index.js
3313
3283
  var require_require_main_filename = __commonJS({
3314
- "../../node_modules/yargs/node_modules/require-main-filename/index.js"(exports, module) {
3284
+ "../../node_modules/require-main-filename/index.js"(exports, module) {
3315
3285
  module.exports = function(_require) {
3316
3286
  _require = _require || __require;
3317
3287
  var main = _require.main;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@magda/docker-utils",
3
3
  "description": "MAGDA Docker Utilities",
4
- "version": "3.0.0-alpha.0",
4
+ "version": "3.0.0-alpha.1",
5
5
  "type": "module",
6
6
  "exports": {
7
7
  ".": "./dist/docker-util.js",
@@ -23,7 +23,7 @@
23
23
  "author": "",
24
24
  "license": "Apache-2.0",
25
25
  "devDependencies": {
26
- "@magda/scripts": "^3.0.0-alpha.0"
26
+ "@magda/scripts": "^3.0.0-alpha.1"
27
27
  },
28
28
  "dependencies": {
29
29
  "fs-extra": "^11.2.0",