@nodescript/core
Advanced tools
Comparing version 0.15.2 to 0.15.3
@@ -47,5 +47,13 @@ import { GraphSchema } from '../schema/index.js'; | ||
async createNode(spec) { | ||
await this.$loader.loadNodeDef(spec.uri); | ||
const def = await this.$loader.loadNodeDef(spec.uri); | ||
const ref = this.getRefForUri(spec.uri); | ||
const node = new Node(this, { ...spec.node, ref }); | ||
const evalMode = def.metadata.evalMode; | ||
const node = new Node(this, { | ||
...spec.node, | ||
ref, | ||
aux: { | ||
evalMode, | ||
...spec.node?.aux, | ||
} | ||
}); | ||
this.addNodeRaw(node); | ||
@@ -52,0 +60,0 @@ this.applyInvariants(); |
@@ -379,3 +379,3 @@ import { isSchemaCompatible } from '../util/index.js'; | ||
isNodeCached(node) { | ||
const cache = node.$def.metadata.cache ?? 'auto'; | ||
const cache = node.$def.metadata.cacheMode ?? 'auto'; | ||
switch (cache) { | ||
@@ -382,0 +382,0 @@ case 'auto': |
@@ -69,3 +69,4 @@ import { Graph } from '../model/graph.js'; | ||
hidden: false, | ||
cache: 'auto', | ||
cacheMode: 'auto', | ||
evalMode: 'auto', | ||
...op.metadata, | ||
@@ -97,3 +98,4 @@ }; | ||
result: { type: 'any' }, | ||
cache: 'auto', | ||
cacheMode: 'auto', | ||
evalMode: 'auto', | ||
}, | ||
@@ -100,0 +102,0 @@ compute() { |
@@ -5,2 +5,3 @@ export * from './data-schema.js'; | ||
export * from './node-def.js'; | ||
export * from './node-eval-mode.js'; | ||
export * from './node-hooks.js'; | ||
@@ -7,0 +8,0 @@ export * from './node-metadata.js'; |
@@ -6,2 +6,3 @@ // This file is auto-generated | ||
export * from './node-def.js'; | ||
export * from './node-eval-mode.js'; | ||
export * from './node-hooks.js'; | ||
@@ -8,0 +9,0 @@ export * from './node-metadata.js'; |
import { Schema } from 'airtight'; | ||
import { DataSchemaSchema } from './data-schema.js'; | ||
import { NodeCacheModeSchema } from './node-cache-mode.js'; | ||
import { NodeEvalModeSchema } from './node-eval-mode.js'; | ||
import { ParamMetadataSchema } from './param-metadata.js'; | ||
@@ -49,5 +50,6 @@ import { VersionSchema } from './version.js'; | ||
}, | ||
cache: NodeCacheModeSchema.schema, | ||
cacheMode: NodeCacheModeSchema.schema, | ||
evalMode: NodeEvalModeSchema.schema, | ||
} | ||
}); | ||
//# sourceMappingURL=node-metadata.js.map |
@@ -9,2 +9,3 @@ export * from './ctx.js'; | ||
export * from './node-def.js'; | ||
export * from './node-eval-mode.js'; | ||
export * from './node-hooks.js'; | ||
@@ -11,0 +12,0 @@ export * from './node-metadata.js'; |
@@ -10,2 +10,3 @@ // This file is auto-generated | ||
export * from './node-def.js'; | ||
export * from './node-eval-mode.js'; | ||
export * from './node-hooks.js'; | ||
@@ -12,0 +13,0 @@ export * from './node-metadata.js'; |
import { DataSchemaSpec } from './data.js'; | ||
import { NodeCacheMode } from './node-cache-mode.js'; | ||
import { NodeEvalMode } from './node-eval-mode.js'; | ||
import { ParamMetadata } from './param-metadata.js'; | ||
@@ -19,3 +20,4 @@ export declare type NodeMetadata = { | ||
labelParam?: string; | ||
cache: NodeCacheMode; | ||
cacheMode: NodeCacheMode; | ||
evalMode: NodeEvalMode; | ||
}; |
{ | ||
"name": "@nodescript/core", | ||
"version": "0.15.2", | ||
"version": "0.15.3", | ||
"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
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
130592
152
2320