@nasl/cli 0.2.0 → 0.2.1
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 +5 -4
- package/dist/bin/nasl.mjs.map +1 -1
- package/dist/bin/naslc.mjs +2 -2
- package/dist/bin/naslc.mjs.map +1 -1
- package/dist/index.mjs +4 -3
- package/dist/index.mjs.map +1 -1
- package/out/apis/compileApi.d.ts.map +1 -1
- package/out/apis/compileApi.js +3 -2
- package/out/apis/compileApi.js.map +1 -1
- package/out/commands/compile.js +1 -1
- package/out/commands/compile.js.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -34895,9 +34895,10 @@ async function checkApi(fullNaturalTS, options) {
|
|
|
34895
34895
|
});
|
|
34896
34896
|
const result = res.data.result;
|
|
34897
34897
|
const errors = (result.errors || []);
|
|
34898
|
-
|
|
34899
|
-
|
|
34898
|
+
if (errors.length > 0) {
|
|
34899
|
+
result.errorStr = `检查到以下错误(共 ${errors.length} 个):\n` + result.errorStr;
|
|
34900
34900
|
return truncate(result.errorStr, 10000);
|
|
34901
|
+
}
|
|
34901
34902
|
return '';
|
|
34902
34903
|
}
|
|
34903
34904
|
|
|
@@ -34965,7 +34966,7 @@ async function compile(entry, options) {
|
|
|
34965
34966
|
logger.success(`所有文件已输出到: ${outDir}`);
|
|
34966
34967
|
}
|
|
34967
34968
|
catch (error) {
|
|
34968
|
-
logger.error(
|
|
34969
|
+
logger.error(`编译过程发生错误:\n${error.message}`);
|
|
34969
34970
|
logger.exit(1);
|
|
34970
34971
|
}
|
|
34971
34972
|
return { config, outDir };
|