Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@lcap/nasl-concepts

Package Overview
Dependencies
Maintainers
21
Versions
224
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lcap/nasl-concepts - npm Package Compare versions

Comparing version 3.9.0-beta.24 to 3.9.0-beta.25

42

out/concepts/MemberExpression__.js

@@ -38,2 +38,3 @@ "use strict";

const nasl_translator_1 = require("@lcap/nasl-translator");
const store_1 = require("../store");
const Identifier_RE = /^[a-zA-Z_][a-zA-Z0-9_]*$/;

@@ -402,3 +403,42 @@ const decorators_1 = require("../decorators");

newCode += 'new nasl.ui.' + element?.tag.replace(/^\S/, (s) => s.toUpperCase())
.replace(/-(\w)/g, (all, letter) => letter.toUpperCase()) + 'Options()';
.replace(/-(\w)/g, (all, letter) => letter.toUpperCase()) + 'Options';
// 泛型
const config = (0, store_1.getConfig)();
const { tsTypeParams = '', props } = config?.allNodesAPI[element?.tag];
const hasDataSource = props?.findIndex((prop) => ['dataSource', 'data-source'].includes(prop.name)) > -1;
let tsTypes = [];
if (tsTypeParams) {
tsTypes = tsTypeParams?.split(',');
}
else if (hasDataSource) {
tsTypes = ['T'];
}
if (tsTypes.length > 0) {
const T = [];
tsTypes.forEach((item) => {
const reg = /^(\w+)\s?/;
const result = reg.exec(item.trim());
const t = result?.[1];
if (t === 'T') {
T.push(`typeof __elementsRef.${elementName}.__item`);
}
if (t === 'V') {
T.push(`typeof __elementsRef.${elementName}.__V`);
}
if (t === 'P') {
T.push(`typeof __elementsRef.${elementName}.__pageable`);
}
if (t === 'M') {
T.push(`typeof __elementsRef.${elementName}.__multiple`);
}
if (t === 'C') {
T.push(`typeof __elementsRef.${elementName}.__converter`);
}
if (t === 'T1') {
T.push(`typeof __elementsRef.${elementName}.__columnItem`);
}
});
newCode += `<${T.join(', ')}>`;
}
newCode += '()';
newCode += `.${self.property.name}`;

@@ -405,0 +445,0 @@ }

4

out/concepts/ProcessV2__.js

@@ -292,3 +292,3 @@ "use strict";

concept: 'elementLogicRoot',
id: 'elementLogicRoot',
id: `${this.uniqueKey}_elementLogicRoot`,
expanded,

@@ -304,3 +304,3 @@ children: logics,

concept: 'varialbesRoot',
id: 'varialbesRoot',
id: `${this.uniqueKey}varialbesRoot`,
expanded,

@@ -307,0 +307,0 @@ children: this.selectedVersionProcess?.variables,

@@ -416,4 +416,5 @@ import { TranslatorState, TranslatorGenerator } from '@lcap/nasl-translator';

get __name__(): string;
get gatewayName(): string;
}
export default SubLogic;
//# sourceMappingURL=SubLogic__.d.ts.map

@@ -1093,2 +1093,8 @@ "use strict";

}
get gatewayName() {
if (this.processElementV2) {
return `_${this.processElementV2.sourceRef}.${this.name}`;
}
return '';
}
};

@@ -1095,0 +1101,0 @@ exports.SubLogic = SubLogic;

@@ -258,3 +258,3 @@ "use strict";

let elements = getPreviousTask(prefixElement);
elements = elements.filter((item) => item.type === 'ServiceTask');
elements = elements.filter((item) => item.type !== 'ServiceTask');
const prevtasksVar = elements.map((item) => {

@@ -641,19 +641,9 @@ return {

// 系统变量
const systemVariable = {
name: processV2.name,
value: 'processSystem',
concept: 'processV2',
rootName: 'processSystem',
selectable: false,
children: [
// 生成流程变量
...genProcessVariables(['processSystem']),
],
};
const systemVariable = genProcessVariables(['processSystem']);
if (processElem.isTask) {
// 生成当前任务的变量
systemVariable.children.push(genCurNodeVariable(['processSystem']));
systemVariable.push(genCurNodeVariable(['processSystem']));
// 生成上一任务的变量
if (isUniqueTargetRef(processElem)) {
systemVariable.children.push(genPreNodeVariable(['processSystem']));
systemVariable.push(genPreNodeVariable(['processSystem']));
}

@@ -663,3 +653,3 @@ }

if (elements?.length) {
systemVariable.children.push(...(elements.map((us) => {
systemVariable.push(...(elements.map((us) => {
const elementName = us.name;

@@ -683,11 +673,3 @@ const cp = new concepts_1.CompletionProperty({

// 数据变量
const customVariable = {
name: processV2.name,
value: 'custom',
concept: 'processV2',
rootName: 'custom',
selectable: false,
children: [],
};
customVariable.children = [];
const customVariable = [];
properties.forEach((property) => {

@@ -700,3 +682,3 @@ const { name, typeAnnotation } = property;

dataVariable.parentNode = processV2;
customVariable.children.push((0, getProcesses_1.genCompletionProperty)(['custom'])(dataVariable));
customVariable.push((0, getProcesses_1.genCompletionProperty)(['custom'])(dataVariable));
});

@@ -707,14 +689,7 @@ list.push(customVariable);

// 流程自定义变量
const processVariable = {
name: processV2.name,
value: 'custom',
concept: 'processV2',
rootName: 'custom',
selectable: false,
children: [],
};
const processVariable = [];
processVariables.forEach((varible) => {
const newVariable = new concepts_1.Variable({ ...varible });
newVariable.parentNode = processV2;
processVariable.children.push((0, getProcesses_1.genCompletionProperty)(['processVariable'])(newVariable));
processVariable.push((0, getProcesses_1.genCompletionProperty)(['processVariable'])(newVariable));
});

@@ -721,0 +696,0 @@ list.push(processVariable);

{
"name": "@lcap/nasl-concepts",
"description": "NetEase Application Specific Language",
"version": "3.9.0-beta.24",
"version": "3.9.0-beta.25",
"author": "Forrest <rainforest92@126.com>",

@@ -40,6 +40,6 @@ "main": "./out",

"uuid": "8.3.2",
"@lcap/nasl-sentry": "3.9.0-beta.24",
"@lcap/nasl-translator": "3.9.0-beta.24",
"@lcap/nasl-utils": "3.9.0-beta.24",
"@lcap/nasl-types": "3.9.0-beta.24"
"@lcap/nasl-translator": "3.9.0-beta.25",
"@lcap/nasl-sentry": "3.9.0-beta.25",
"@lcap/nasl-types": "3.9.0-beta.25",
"@lcap/nasl-utils": "3.9.0-beta.25"
},

@@ -46,0 +46,0 @@ "devDependencies": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc