@socketsecurity/cli-with-sentry 1.0.78 → 1.0.79

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 +1 @@
1
- {"version":3,"file":"path-resolve.d.mts","sourceRoot":"","sources":["../../../src/utils/path-resolve.mts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAA;AACvD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAA;AAEjE,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,MAAM,GAAG;IACvD,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,GAAG,SAAS,CAAA;IACxB,QAAQ,EAAE,OAAO,CAAA;CAClB,CAqBA;AAED,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CA6CzE;AAED,MAAM,MAAM,0BAA0B,GAAG;IACvC,GAAG,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACxB,MAAM,CAAC,EAAE,SAAS,GAAG,SAAS,CAAA;CAC/B,CAAA;AAED,wBAAsB,sBAAsB,CAC1C,UAAU,EAAE,MAAM,EAAE,EACpB,cAAc,EAAE,sBAAsB,CAAC,yBAAyB,CAAC,CAAC,MAAM,CAAC,EACzE,OAAO,CAAC,EAAE,0BAA0B,GAAG,SAAS,GAC/C,OAAO,CAAC,MAAM,EAAE,CAAC,CAYnB"}
1
+ {"version":3,"file":"path-resolve.d.mts","sourceRoot":"","sources":["../../../src/utils/path-resolve.mts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAA;AACvD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAA;AAEjE,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,MAAM,GAAG;IACvD,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,GAAG,SAAS,CAAA;IACxB,QAAQ,EAAE,OAAO,CAAA;CAClB,CAqBA;AAED,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAmDzE;AAED,MAAM,MAAM,0BAA0B,GAAG;IACvC,GAAG,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACxB,MAAM,CAAC,EAAE,SAAS,GAAG,SAAS,CAAA;CAC/B,CAAA;AAED,wBAAsB,sBAAsB,CAC1C,UAAU,EAAE,MAAM,EAAE,EACpB,cAAc,EAAE,sBAAsB,CAAC,yBAAyB,CAAC,CAAC,MAAM,CAAC,EACzE,OAAO,CAAC,EAAE,0BAA0B,GAAG,SAAS,GAC/C,OAAO,CAAC,MAAM,EAAE,CAAC,CAYnB"}
package/dist/utils.js CHANGED
@@ -2189,6 +2189,8 @@ function findNpmDirPathSync(npmBinPath) {
2189
2189
  isDirectorySync(libNmNpmPath)) {
2190
2190
  thePath = libNmNpmPath;
2191
2191
  }
2192
+ const hasSameLevelNmPath = isDirectorySync(path.join(thePath, 'node_modules'));
2193
+ const hasOneBackNmPath = !hasSameLevelNmPath && isDirectorySync(path.join(thePath, '../node_modules'));
2192
2194
  if (
2193
2195
  // npm bin paths may look like:
2194
2196
  // /usr/local/share/npm/bin/npm
@@ -2200,14 +2202,14 @@ function findNpmDirPathSync(npmBinPath) {
2200
2202
  // In practically all cases the npm path contains a node_modules folder:
2201
2203
  // /usr/local/share/npm/bin/npm/node_modules
2202
2204
  // C:\Program Files\nodejs\node_modules
2203
- (isDirectorySync(path.join(thePath, 'node_modules')) ||
2205
+ (hasSameLevelNmPath ||
2204
2206
  // In some bespoke cases the node_modules folder is one level back.
2205
- isDirectorySync(path.join(thePath, '../node_modules'))) && (
2207
+ hasOneBackNmPath) && (
2206
2208
  // Optimistically look for the default location.
2207
2209
  path.basename(thePath) === 'npm' ||
2208
2210
  // Chocolatey installs npm bins in the same directory as node bins.
2209
2211
  WIN32 && fs.existsSync(path.join(thePath, 'npm.cmd')))) {
2210
- return thePath;
2212
+ return hasOneBackNmPath ? path.dirname(thePath) : thePath;
2211
2213
  }
2212
2214
  const parent = path.dirname(thePath);
2213
2215
  if (parent === thePath) {
@@ -3900,5 +3902,5 @@ exports.tildify = tildify;
3900
3902
  exports.updateConfigValue = updateConfigValue;
3901
3903
  exports.walkNestedMap = walkNestedMap;
3902
3904
  exports.writeSocketJson = writeSocketJson;
3903
- //# debugId=f8fd8421-741b-420c-a69c-9a325ab36f14
3905
+ //# debugId=19689308-c98a-486d-b9ee-6cfdd0348af0
3904
3906
  //# sourceMappingURL=utils.js.map