🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

@nodescript/core

Package Overview
Dependencies
Maintainers
3
Versions
271
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nodescript/core - npm Package Compare versions

Comparing version

to
7.15.0

out/main/system/EvalTemplate.d.ts

1

out/main/compiler/CompilerScope.d.ts

@@ -34,2 +34,3 @@ import { GraphView, NodeView } from '../runtime/index.js';

private emitEvalJson;
private emitEvalTemplate;
private emitGenericCompute;

@@ -36,0 +37,0 @@ private getSubgraphExpr;

@@ -251,2 +251,4 @@ import { convertAuto, isSchemaCompatible } from '../util/index.js';

return this.emitEvalJson(node, resSym);
case '@system/EvalTemplate':
return this.emitEvalTemplate(node, resSym);
default:

@@ -320,2 +322,19 @@ return this.emitGenericCompute(node, resSym);

}
emitEvalTemplate(node, resSym) {
const template = (node.getProp('template')?.value ?? '')
.replace(/`/g, '\\`')
.replace(/\\\\`/g, '\\\\\\`');
this.code.block(`const $p = {`, `}`, () => {
const prop = node.getProp('args');
if (prop) {
this.emitProp(prop);
}
});
const args = node.getProp('args')?.getEntries() ?? [];
const argList = args.map(_ => _.key).join(',');
const argVals = args.map(_ => `$p.args[${JSON.stringify(_.key)}]`).join(',');
this.code.block(`${resSym} = ((${argList}) => {`, `})(${argVals})`, () => {
this.code.line(`return \`${template}\``);
});
}
emitGenericCompute(node, resSym) {

@@ -322,0 +341,0 @@ const computeSym = this.symbols.getComputeSym(node.ref);

@@ -15,2 +15,3 @@ import { ModuleSpecSchema } from '../schema/ModuleSpec.js';

this.addModule('@system/EvalJson', systemNodes.EvalJson);
this.addModule('@system/EvalTemplate', systemNodes.EvalTemplate);
}

@@ -17,0 +18,0 @@ resolveModule(ref) {

@@ -5,2 +5,3 @@ export * from './Comment.js';

export * from './EvalSync.js';
export * from './EvalTemplate.js';
export * from './Frame.js';

@@ -7,0 +8,0 @@ export * from './Input.js';

@@ -6,2 +6,3 @@ // This file is auto-generated

export * from './EvalSync.js';
export * from './EvalTemplate.js';
export * from './Frame.js';

@@ -8,0 +9,0 @@ export * from './Input.js';

2

package.json
{
"name": "@nodescript/core",
"version": "7.14.5",
"version": "7.15.0",
"type": "module",

@@ -5,0 +5,0 @@ "description": "Visual programming language for Browser and Node",

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