@nasl/cli 0.1.13 → 0.1.14
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.
- package/dist/bin/nasl.mjs +6 -2
- package/dist/bin/nasl.mjs.map +1 -1
- package/dist/bin/naslc.mjs +6 -2
- package/dist/bin/naslc.mjs.map +1 -1
- package/dist/index.mjs +5 -1
- package/dist/index.mjs.map +1 -1
- package/out/services/resolve.d.ts.map +1 -1
- package/out/services/resolve.js +5 -1
- package/out/services/resolve.js.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -13672,7 +13672,11 @@ async function scanEntryFiles(projectRoot, patterns, logger) {
|
|
|
13672
13672
|
*/
|
|
13673
13673
|
function extractDeps(content) {
|
|
13674
13674
|
const deps = new Set();
|
|
13675
|
-
|
|
13675
|
+
// 预处理:移除注释,避免注释影响依赖分析
|
|
13676
|
+
let processedContent = content
|
|
13677
|
+
.replace(/\/\/.*$/gm, '') // 移除单行注释 // ...
|
|
13678
|
+
.replace(/\/\*[\s\S]*?\*\//g, ''); // 移除多行注释 /* ... */
|
|
13679
|
+
const allMatches = processedContent.matchAll(/app\.\w+\.[\w.]+/g); // 起码要2个点
|
|
13676
13680
|
for (const match of allMatches) {
|
|
13677
13681
|
let dep = match[0];
|
|
13678
13682
|
if (/Entity$|Entity\./.test(dep)) {
|