Comparing version 16.3.0-beta.7 to 16.3.0-beta.8
@@ -14,4 +14,10 @@ #!/usr/bin/env node | ||
const path_1 = require("path"); | ||
const module_1 = require("module"); | ||
const stripJsonComments = require("strip-json-comments"); | ||
const fs_1 = require("fs"); | ||
// Light client bundle might not be stored in a child directory relative to where | ||
// the `nx-cloud` process is invoked | ||
// Add the directory we are invoking `nx-cloud` from to the require path | ||
// explicitly so we are able to access installed dependencies | ||
addProcessInvocationLocationToNodeRequirePath(); | ||
const command = process.argv[2]; | ||
@@ -121,2 +127,26 @@ const options = JSON.parse(stripJsonComments((0, fs_1.readFileSync)(`nx.json`).toString())).tasksRunnerOptions.default.options; | ||
} | ||
function addProcessInvocationLocationToNodeRequirePath() { | ||
// __dirname will be at [some folder]/node_modules/nx-cloud/bin | ||
// so escape two directory levels to get to node_modules where we have | ||
// invoked from | ||
addToNodePath((0, path_1.join)(__dirname, '../..')); | ||
// Re-initialize the paths into require | ||
module_1.Module._initPaths(); | ||
} | ||
function addToNodePath(dir) { | ||
// NODE_PATH is a delimited list of paths. | ||
// The delimiter is different for windows. | ||
const delimiter = require('path').delimiter; | ||
const paths = process.env.NODE_PATH | ||
? process.env.NODE_PATH.split(delimiter) | ||
: []; | ||
// The path is already in the node path | ||
if (paths.includes(dir)) { | ||
return; | ||
} | ||
// Add the tmp path | ||
paths.push(dir); | ||
// Update the env variable. | ||
process.env.NODE_PATH = paths.join(delimiter); | ||
} | ||
//# sourceMappingURL=nx-cloud.js.map |
{ | ||
"name": "nx-cloud", | ||
"version": "16.3.0-beta.7", | ||
"version": "16.3.0-beta.8", | ||
"description": "Distributed caching and task execution for Lerna and Nx", | ||
@@ -32,4 +32,4 @@ "keywords": [ | ||
"open": "~8.4.0", | ||
"@nrwl/nx-cloud": "16.3.0-beta.7" | ||
"@nrwl/nx-cloud": "16.3.0-beta.8" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Debug access
Supply chain riskUses debug, reflection and dynamic code execution features.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
391050
5209
136
+ Added@nrwl/nx-cloud@16.3.0-beta.8(transitive)
- Removed@nrwl/nx-cloud@16.3.0-beta.7(transitive)
Updated@nrwl/nx-cloud@16.3.0-beta.8