@nx/devkit
Advanced tools
+2
-2
| { | ||
| "name": "@nx/devkit", | ||
| "version": "22.6.1", | ||
| "version": "22.6.2", | ||
| "private": false, | ||
@@ -41,3 +41,3 @@ "description": "The Nx Devkit is used to customize Nx for different technologies and use cases. It contains many utility functions for reading and writing files, updating configuration, working with Abstract Syntax Trees(ASTs), and more. Learn more about [extending Nx by leveraging the Nx Devkit](https://nx.dev/extending-nx/intro/getting-started) on our docs.", | ||
| "jest": "^30.0.2", | ||
| "nx": "22.6.1" | ||
| "nx": "22.6.2" | ||
| }, | ||
@@ -44,0 +44,0 @@ "peerDependencies": { |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"parse-target-string.d.ts","sourceRoot":"","sources":["../../../../../packages/devkit/src/executors/parse-target-string.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,YAAY,EAEZ,MAAM,EACP,MAAM,uBAAuB,CAAC;AAG/B;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,CAC/B,YAAY,EAAE,MAAM,EACpB,YAAY,EAAE,YAAY,GACzB,MAAM,CAAC;AACV;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,CAC/B,YAAY,EAAE,MAAM,EACpB,GAAG,EAAE,eAAe,GACnB,MAAM,CAAC;AA2CV;;;;;;;;;;;GAWG;AACH,wBAAgB,oBAAoB,CAAC,EACnC,OAAO,EACP,MAAM,EACN,aAAa,GACd,EAAE,MAAM,GAAG,MAAM,CAIjB"} | ||
| {"version":3,"file":"parse-target-string.d.ts","sourceRoot":"","sources":["../../../../../packages/devkit/src/executors/parse-target-string.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,YAAY,EAEZ,MAAM,EACP,MAAM,uBAAuB,CAAC;AAG/B;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,CAC/B,YAAY,EAAE,MAAM,EACpB,YAAY,EAAE,YAAY,GACzB,MAAM,CAAC;AACV;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,CAC/B,YAAY,EAAE,MAAM,EACpB,GAAG,EAAE,eAAe,GACnB,MAAM,CAAC;AAiDV;;;;;;;;;;;GAWG;AACH,wBAAgB,oBAAoB,CAAC,EACnC,OAAO,EACP,MAAM,EACN,aAAa,GACd,EAAE,MAAM,GAAG,MAAM,CAIjB"} |
@@ -26,3 +26,6 @@ "use strict"; | ||
| } | ||
| const [project, target, configuration] = (0, devkit_internals_1.splitTarget)(targetString, projectGraph); | ||
| const currentProject = projectGraphOrCtx && 'projectName' in projectGraphOrCtx | ||
| ? projectGraphOrCtx.projectName | ||
| : undefined; | ||
| const [project, target, configuration] = (0, devkit_internals_1.splitTarget)(targetString, projectGraph, { currentProject }); | ||
| if (!project || !target) { | ||
@@ -29,0 +32,0 @@ throw new Error(`Invalid Target String: ${targetString}`); |
@@ -7,5 +7,6 @@ import { PackageManager, Tree } from 'nx/src/devkit-exports'; | ||
| * @param tree - the file system tree | ||
| * @param alwaysRun - always run the command even if `package.json` hasn't changed. | ||
| * @param ensureInstall - ensure install runs even if `package.json` hasn't changed, | ||
| * unless install already ran this generator cycle. | ||
| */ | ||
| export declare function installPackagesTask(tree: Tree, alwaysRun?: boolean, cwd?: string, packageManager?: PackageManager): void; | ||
| export declare function installPackagesTask(tree: Tree, ensureInstall?: boolean, cwd?: string, packageManager?: PackageManager): void; | ||
| //# sourceMappingURL=install-packages-task.d.ts.map |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"install-packages-task.d.ts","sourceRoot":"","sources":["../../../../../packages/devkit/src/tasks/install-packages-task.ts"],"names":[],"mappings":"AAGA,OAAO,EAIL,cAAc,EACd,IAAI,EACL,MAAM,uBAAuB,CAAC;AAE/B;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,IAAI,EACV,SAAS,GAAE,OAAe,EAC1B,GAAG,GAAE,MAAW,EAChB,cAAc,GAAE,cAA2D,GAC1E,IAAI,CAoCN"} | ||
| {"version":3,"file":"install-packages-task.d.ts","sourceRoot":"","sources":["../../../../../packages/devkit/src/tasks/install-packages-task.ts"],"names":[],"mappings":"AAGA,OAAO,EAIL,cAAc,EACd,IAAI,EACL,MAAM,uBAAuB,CAAC;AAE/B;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,IAAI,EACV,aAAa,GAAE,OAAe,EAC9B,GAAG,GAAE,MAAW,EAChB,cAAc,GAAE,cAA2D,GAC1E,IAAI,CAmCN"} |
@@ -12,15 +12,18 @@ "use strict"; | ||
| * @param tree - the file system tree | ||
| * @param alwaysRun - always run the command even if `package.json` hasn't changed. | ||
| * @param ensureInstall - ensure install runs even if `package.json` hasn't changed, | ||
| * unless install already ran this generator cycle. | ||
| */ | ||
| function installPackagesTask(tree, alwaysRun = false, cwd = '', packageManager = (0, devkit_exports_1.detectPackageManager)((0, path_1.join)(tree.root, cwd))) { | ||
| if (!tree | ||
| function installPackagesTask(tree, ensureInstall = false, cwd = '', packageManager = (0, devkit_exports_1.detectPackageManager)((0, path_1.join)(tree.root, cwd))) { | ||
| const packageJsonPath = (0, devkit_exports_1.joinPathFragments)(cwd, 'package.json'); | ||
| const packageJsonChanged = tree | ||
| .listChanges() | ||
| .find((f) => f.path === (0, devkit_exports_1.joinPathFragments)(cwd, 'package.json')) && | ||
| !alwaysRun) { | ||
| .some((f) => f.path === packageJsonPath); | ||
| if (!packageJsonChanged && !ensureInstall) { | ||
| return; | ||
| } | ||
| const packageJsonValue = tree.read((0, devkit_exports_1.joinPathFragments)(cwd, 'package.json'), 'utf-8'); | ||
| let storedPackageJsonValue = global['__packageJsonInstallCache__']; | ||
| // Don't install again if install was already executed with package.json | ||
| if (storedPackageJsonValue != packageJsonValue || alwaysRun) { | ||
| const packageJsonValue = tree.read(packageJsonPath, 'utf-8'); | ||
| const storedPackageJsonValue = global['__packageJsonInstallCache__']; | ||
| const installAlreadyRan = storedPackageJsonValue != null; | ||
| const packageJsonDiffers = storedPackageJsonValue != packageJsonValue; | ||
| if (packageJsonDiffers || (ensureInstall && !installAlreadyRan)) { | ||
| global['__packageJsonInstallCache__'] = packageJsonValue; | ||
@@ -27,0 +30,0 @@ const pmc = (0, devkit_exports_1.getPackageManagerCommand)(packageManager); |
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Debug access
Supply chain riskUses debug, reflection and dynamic code execution features.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
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 8 instances in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Debug access
Supply chain riskUses debug, reflection and dynamic code execution features.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
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 8 instances in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
289443
0.14%6189
0.11%