snyk 1.1262.0 → 1.1263.0

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.
@@ -1,5 +1,5 @@
1
- exports.id = 503;
2
- exports.ids = [503];
1
+ exports.id = 231;
2
+ exports.ids = [231];
3
3
  exports.modules = {
4
4
 
5
5
  /***/ 42869:
@@ -1610,6 +1610,88 @@ function showThrowWarningFor(doc) {
1610
1610
  }
1611
1611
  //# sourceMappingURL=index.js.map
1612
1612
 
1613
+ /***/ }),
1614
+
1615
+ /***/ 21766:
1616
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
1617
+
1618
+ "use strict";
1619
+
1620
+ const path = __webpack_require__(71017);
1621
+ const os = __webpack_require__(22037);
1622
+
1623
+ const homedir = os.homedir();
1624
+ const tmpdir = os.tmpdir();
1625
+ const {env} = process;
1626
+
1627
+ const macos = name => {
1628
+ const library = path.join(homedir, 'Library');
1629
+
1630
+ return {
1631
+ data: path.join(library, 'Application Support', name),
1632
+ config: path.join(library, 'Preferences', name),
1633
+ cache: path.join(library, 'Caches', name),
1634
+ log: path.join(library, 'Logs', name),
1635
+ temp: path.join(tmpdir, name)
1636
+ };
1637
+ };
1638
+
1639
+ const windows = name => {
1640
+ const appData = env.APPDATA || path.join(homedir, 'AppData', 'Roaming');
1641
+ const localAppData = env.LOCALAPPDATA || path.join(homedir, 'AppData', 'Local');
1642
+
1643
+ return {
1644
+ // Data/config/cache/log are invented by me as Windows isn't opinionated about this
1645
+ data: path.join(localAppData, name, 'Data'),
1646
+ config: path.join(appData, name, 'Config'),
1647
+ cache: path.join(localAppData, name, 'Cache'),
1648
+ log: path.join(localAppData, name, 'Log'),
1649
+ temp: path.join(tmpdir, name)
1650
+ };
1651
+ };
1652
+
1653
+ // https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
1654
+ const linux = name => {
1655
+ const username = path.basename(homedir);
1656
+
1657
+ return {
1658
+ data: path.join(env.XDG_DATA_HOME || path.join(homedir, '.local', 'share'), name),
1659
+ config: path.join(env.XDG_CONFIG_HOME || path.join(homedir, '.config'), name),
1660
+ cache: path.join(env.XDG_CACHE_HOME || path.join(homedir, '.cache'), name),
1661
+ // https://wiki.debian.org/XDGBaseDirectorySpecification#state
1662
+ log: path.join(env.XDG_STATE_HOME || path.join(homedir, '.local', 'state'), name),
1663
+ temp: path.join(tmpdir, username, name)
1664
+ };
1665
+ };
1666
+
1667
+ const envPaths = (name, options) => {
1668
+ if (typeof name !== 'string') {
1669
+ throw new TypeError(`Expected string, got ${typeof name}`);
1670
+ }
1671
+
1672
+ options = Object.assign({suffix: 'nodejs'}, options);
1673
+
1674
+ if (options.suffix) {
1675
+ // Add suffix to prevent possible conflict with native apps
1676
+ name += `-${options.suffix}`;
1677
+ }
1678
+
1679
+ if (process.platform === 'darwin') {
1680
+ return macos(name);
1681
+ }
1682
+
1683
+ if (process.platform === 'win32') {
1684
+ return windows(name);
1685
+ }
1686
+
1687
+ return linux(name);
1688
+ };
1689
+
1690
+ module.exports = envPaths;
1691
+ // TODO: Remove this for the next major release
1692
+ module.exports["default"] = envPaths;
1693
+
1694
+
1613
1695
  /***/ }),
1614
1696
 
1615
1697
  /***/ 51633:
@@ -17442,4 +17524,4 @@ module.exports = __webpack_require__(39026);
17442
17524
 
17443
17525
  };
17444
17526
  ;
17445
- //# sourceMappingURL=503.index.js.map
17527
+ //# sourceMappingURL=231.index.js.map