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

@lcap/nasl-types

Package Overview
Dependencies
Maintainers
20
Versions
229
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lcap/nasl-types - npm Package Compare versions

Comparing version 3.9.0-beta.4 to 3.9.0-beta.5

5

out/concept.d.ts

@@ -0,1 +1,3 @@

import * as Embedded from './embedded';
import * as Translator from './translator';
export type EventListener = (...args: Array<any>) => any;

@@ -47,4 +49,7 @@ export interface Params {

readonly parentKey?: string;
sourceMap: Translator.SourceMap;
__isCorrectTypeAnnotation: boolean;
tsErrorDetail: any;
toEmbeddedTSFile(): Embedded.TSFileGenerator<BaseNode>;
toEmbeddedDeclarationTSFile(): Embedded.DeclarationTSFileResult;
}

@@ -51,0 +56,0 @@ export interface NodePathOption {

89

out/module.d.ts

@@ -10,23 +10,33 @@ import { Symbol } from './symbol';

/**
* 模块根节点子树的节点数量
*/
readonly count: number;
/**
* 模块名称
*
* @description 对应 Nasl 节点路径
*/
readonly name: string;
/**
* 模块最后编辑时间
* 模块签名
*
* @description 取当前子树中所有节点的最新时间
* @description 作为对外的标识符
*/
lastModifyTime: number;
readonly signature: string;
/** 签名是否是最新的 */
readonly isLastSignature: boolean;
/**
* 模块生成签名时间
* 模块最后编辑时间
*
* @description 最新的签名,其时间应该和修改时间相同
* @description 取当前子树中所有节点的最新时间
*/
lastSignatureTime: number;
readonly lastModifyTime: number;
/**
* 模块签名
* 更新节点
*
* @description 作为对外的标识符
* @description 有时候 App 会对节点做修改操作,所以这里需要沿着 nodePath 更新模块对应的节点
*/
signature: string;
updateNode(node: BaseNode): void;
/** 更新签名 */
updateSignature(signature: string): void;
/** 输出模块纯数据 */

@@ -48,8 +58,32 @@ toData(): ModuleData;

}
/** 模块在拓扑排序中的状态 */
export declare enum ModuleStatusInTopologicalSort {
/** 未访问 */
NotVisit = 0,
/** 已访问且修改 */
VisitedWithModify = 1,
/** 已访问且未修改 */
VisitedWithNoModify = 2
}
/** 查询模块状态 */
export type GetModuleStatus = (module: Module) => ModuleStatusInTopologicalSort;
/** 拓扑排序上下文 */
export interface TopologicalSortContext {
/**
* 获取模块签名值
*
* @param {Module[]} modules 待标注的模块
* @param {GetModuleStatus} isModuleSignatureUpdated 查询模块是否更新了签名
* @return {Module[]} 签名变更的模块
*/
getModulesSignature(modules: Module[], getModuleStatus: GetModuleStatus): Promise<Module[]>;
}
/** 模块图 */
export interface ModuleGraph {
/** 当前 Nasl 根节点 */
readonly app: BaseNode;
/** 生成时间 */
readonly createTime: number;
/**
* 从节点创建模块
* 从节点获取模块
*

@@ -60,2 +94,8 @@ * @description 会向上迭代上级节点,直到找到模块节点

/**
* 从节点路径获取模块
*
* @description 会向上迭代上级节点,直到找到模块节点
*/
getModuleByNodePath(nodePath: string): Module | undefined;
/**
* 从符号遍历创建模块

@@ -66,11 +106,10 @@ *

getModuleMapBySymbol(symbol: Symbol): void;
/** 获取所有模块 */
getModules(): Module[];
/**
* 对比两个模块图
* 按照拓扑排序执行操作
*
* @description 输出有更新以及依赖其更新的所有模块
* @description 当前模块图为新
* @returns 返回更新模块
*/
diffByModuleGraph(old: ModuleGraph): Module[];
topologicalSort(context: TopologicalSortContext): Promise<Module[]>;
/** 获取所有模块 */
getModules(): Module[];
/** 生成模块图数据 */

@@ -80,5 +119,6 @@ toData(): ModuleGraphData;

/** 模块数据 */
export interface ModuleData extends Pick<Module, 'lastModifyTime' | 'lastSignatureTime' | 'signature'> {
export interface ModuleData extends Pick<Module, 'lastModifyTime' | 'isLastSignature' | 'signature'> {
node: string;
imported: string[];
count: number;
dependency: string[];
}

@@ -90,13 +130,2 @@ /** 模块依赖数据 */

}
/** 模块签名数据 */
export interface ModuleSignature {
/**
* 函数签名
*
* @description 初始化未完成时为`'uninitialized'`
*/
signature: string;
/** 更新时间 */
updateTime: number;
}
/** 模块图数据 */

@@ -108,4 +137,2 @@ export interface ModuleGraphData {

}
/** 模块签名表 */
export type ModuleSignatureMap = Record<string, ModuleSignature>;
//# sourceMappingURL=module.d.ts.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ModuleStatusInTopologicalSort = void 0;
/** 模块在拓扑排序中的状态 */
var ModuleStatusInTopologicalSort;
(function (ModuleStatusInTopologicalSort) {
/** 未访问 */
ModuleStatusInTopologicalSort[ModuleStatusInTopologicalSort["NotVisit"] = 0] = "NotVisit";
/** 已访问且修改 */
ModuleStatusInTopologicalSort[ModuleStatusInTopologicalSort["VisitedWithModify"] = 1] = "VisitedWithModify";
/** 已访问且未修改 */
ModuleStatusInTopologicalSort[ModuleStatusInTopologicalSort["VisitedWithNoModify"] = 2] = "VisitedWithNoModify";
})(ModuleStatusInTopologicalSort || (exports.ModuleStatusInTopologicalSort = ModuleStatusInTopologicalSort = {}));
//# sourceMappingURL=module.js.map
{
"name": "@lcap/nasl-types",
"description": "NetEase Application Specific Language",
"version": "3.9.0-beta.4",
"version": "3.9.0-beta.5",
"main": "./out",

@@ -6,0 +6,0 @@ "types": "./out",

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