@p0security/cli 0.26.6 → 0.26.8

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,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getExpiredCredentialsMessage = void 0;
3
+ exports.isNetworkError = exports.getExpiredCredentialsMessage = void 0;
4
4
  /** Copyright © 2024-present P0 Security
5
5
 
6
6
  This file is part of @p0security/cli
@@ -14,4 +14,7 @@ You should have received a copy of the GNU General Public License along with @p0
14
14
  const util_1 = require("../util");
15
15
  const getExpiredCredentialsMessage = () => `Your credentials have expired. Please run \`${(0, util_1.getAppName)()} login <organization>\` to refresh your credentials.`;
16
16
  exports.getExpiredCredentialsMessage = getExpiredCredentialsMessage;
17
+ const isNetworkError = (error) => error instanceof TypeError &&
18
+ (error.message === "fetch failed" || error.message === "terminated");
19
+ exports.isNetworkError = isNetworkError;
17
20
  //# sourceMappingURL=util.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"util.js","sourceRoot":"","sources":["../../../src/drivers/util.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;GASG;AACH,kCAAqC;AAE9B,MAAM,4BAA4B,GAAG,GAAG,EAAE,CAC/C,+CAA+C,IAAA,iBAAU,GAAE,sDAAsD,CAAC;AADvG,QAAA,4BAA4B,gCAC2E"}
1
+ {"version":3,"file":"util.js","sourceRoot":"","sources":["../../../src/drivers/util.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;GASG;AACH,kCAAqC;AAE9B,MAAM,4BAA4B,GAAG,GAAG,EAAE,CAC/C,+CAA+C,IAAA,iBAAU,GAAE,sDAAsD,CAAC;AADvG,QAAA,4BAA4B,gCAC2E;AAE7G,MAAM,cAAc,GAAG,CAAC,KAAc,EAAE,EAAE,CAC/C,KAAK,YAAY,SAAS;IAC1B,CAAC,KAAK,CAAC,OAAO,KAAK,cAAc,IAAI,KAAK,CAAC,OAAO,KAAK,YAAY,CAAC,CAAC;AAF1D,QAAA,cAAc,kBAE4C"}