@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 CHANGED
@@ -37520,7 +37520,11 @@ async function scanEntryFiles(projectRoot, patterns, logger) {
37520
37520
  */
37521
37521
  function extractDeps(content) {
37522
37522
  const deps = new Set();
37523
- const allMatches = content.matchAll(/app\.\w+\.[\w.]+/g); // 起码要2个点
37523
+ // 预处理:移除注释,避免注释影响依赖分析
37524
+ let processedContent = content
37525
+ .replace(/\/\/.*$/gm, '') // 移除单行注释 // ...
37526
+ .replace(/\/\*[\s\S]*?\*\//g, ''); // 移除多行注释 /* ... */
37527
+ const allMatches = processedContent.matchAll(/app\.\w+\.[\w.]+/g); // 起码要2个点
37524
37528
  for (const match of allMatches) {
37525
37529
  let dep = match[0];
37526
37530
  if (/Entity$|Entity\./.test(dep)) {
@@ -38061,7 +38065,7 @@ async function build(entry, options) {
38061
38065
  await justExecCommandSync(webpackArgs, outDir);
38062
38066
  }
38063
38067
 
38064
- var version = "0.1.13";
38068
+ var version = "0.1.14";
38065
38069
  var pkg = {
38066
38070
  version: version};
38067
38071