@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/bin/naslc.mjs
CHANGED
|
@@ -37432,7 +37432,11 @@ async function scanEntryFiles(projectRoot, patterns, logger) {
|
|
|
37432
37432
|
*/
|
|
37433
37433
|
function extractDeps(content) {
|
|
37434
37434
|
const deps = new Set();
|
|
37435
|
-
|
|
37435
|
+
// 预处理:移除注释,避免注释影响依赖分析
|
|
37436
|
+
let processedContent = content
|
|
37437
|
+
.replace(/\/\/.*$/gm, '') // 移除单行注释 // ...
|
|
37438
|
+
.replace(/\/\*[\s\S]*?\*\//g, ''); // 移除多行注释 /* ... */
|
|
37439
|
+
const allMatches = processedContent.matchAll(/app\.\w+\.[\w.]+/g); // 起码要2个点
|
|
37436
37440
|
for (const match of allMatches) {
|
|
37437
37441
|
let dep = match[0];
|
|
37438
37442
|
if (/Entity$|Entity\./.test(dep)) {
|
|
@@ -37693,7 +37697,7 @@ async function tryCompile(entry, options) {
|
|
|
37693
37697
|
}
|
|
37694
37698
|
}
|
|
37695
37699
|
|
|
37696
|
-
var version = "0.1.
|
|
37700
|
+
var version = "0.1.14";
|
|
37697
37701
|
var pkg = {
|
|
37698
37702
|
version: version};
|
|
37699
37703
|
|