- Fix validation to avoid prototype pollution
- Add function to rename events, variable name, and function namespace
- Add feature to delete function, function port, variable, and event
- Add
.stop
property to stop data flow in the instance - Emit
ready
event when function node is initialized - Emit event when creating event and handle environment variable deletion
- Watch function node's port name changes when renaming from other node
- Watch event namespace changes when renaming from other node
- Improve utils for set and delete object property
- Add and improve Bun and Node.js loader
- Add
.ready
function for waiting until firstjson.imported
instance event - Auto trigger
node.update
wheninitUpdate
static class property exist - Improve TypeScript definition file
- Avoid emitting non-object data when emitting event data
- Avoid creating a function node inside of the node itself
- Emit some event and avoid trigger resave on function node
- Fix import error because duplicated event export
- Fix error when renaming port name for function node
- Make sure the event
schema
option is object - Rename environment node inside all function node
- Some modification for remote collaboration
- Stop execution order inside function if root is stopped
- Use default port output value as input value if exist
- Change callable output port type with Trigger type
- Renamed type:
Function
toBlackprint.Types.Trigger
- Renamed type:
- Renamed type:
Blackprint.Port.Route
toBlackprint.Types.Route
- Allow function node to be paused on creation
- Add feature to linking variable between instances
- Fix error when using var node for trigger type port
- Fix function input port that was created 2 times
- Fix cable input's route port for skeleton
- Add input port that have default value for skeleton
- Fix incorrect type for variable's output port
- Fix route check inside function node
- Fix error when triggering function output from variable node
- Fix internal status reset
- Experimental code generation was migrated to other repository
- Fix error for event and function node
- Fix imported instance event
- Add experimental code generation
- Emit
updated
event when the node was updated - Fix error when having private variable on function node
- Optimize code for improving the performance
- Add options to disable cleaning the instance when importing JSON
- Fix incorrect reference that cause error when removing environment node
- Remove internal marker to avoid dynamic port connection on outer function port
- Instance's exported JSON schema was updated, please import and re-export your old exported JSON before v1.0. The old schema will still importable on
engine-js
, but it will show a deprecation notice.
- Fix instance's createEvent call when importing JSON
- Fix node update using default input value when cable was disconnected
- Add custom event nodes
- Add event nodes feature
- Fix removed event listener when sketch container was removed
- Fix dynamic port marker on internal interface
- Fix type assigned on variable node
- Force output port that use union to be Any type
- Move port type re-assigment for output port
- Improve output port's type when using port feature
- Update error message and remove unused event emit
- Validate namespace name
- Handle namespaced variable or nodes
- Add support for branched cable on route cable
- Add
initPorts
for dynamically initializing ports
- Disable port manipulation on locked instance
- Put id as title if doesn't have custom title
- Fix route port call on branched cable
- Avoid calling update on cable connection when the node having input route
- Show cable flow on route cable
- Cast port name to string
v0.8.7 is skipped
- Improve typings to make implementation more easier
- Replace dot settings's internal save name with underscore
- Improve TypeScript definitions
- Improve and fix type definition that not published to NPM
- Fix error when using stepMode
- Improve module exports
- Add Skeleton import feature
- Add experimental
Blackprint.Types.Slot
for ports with lazy type assignment - Improve code for step mode execution
- Fix and improve TypeScript definition file
- Improve import performance when using variable or function node
- Save port configuration and use it for creating function port
Deprecation below may breaking in v0.8.10, the other engine (engine-python
and engine-php
) will not have this breaking changes as it already correctly implemented. This changes was happen because I was forgot to move Route
object reference from Blackprint.Port.Route
to Blackprint.Types.Route
when releasing this engine-js
module, I'm sorry about that 😅.
// Before (You will get deprecation notice on the console if still using this)
Blackprint.Port.Route
// After
Blackprint.Types.Route
- Emit
destroy
event when the instance was destroyed
- Fix VirtualType validation
- Fix error when using VirtualType
- Fix VirtualType and throw error on unrecognized type
- Emit internal event for engine-js
- Add internal destroyed flag
- Add experimental feature to lock the instance
- Improve security for environment variable node by using connection rule
- Emit internal event when function port was renamed
- Fix event to be emitted to root instance
- Fix function node that was not being initialized if created manually at runtime
- Fix route port connection and array input data
- Immediate init interface for single node creation
- Improve performance and fix execution order for with
StructOf
feature - Reset updated cable status when disconnected and minor changes
- Add
waitOnce
for waiting for an event with Promise - Add pausible execution feature and change node execution order (experimental, please expect changes in version 0.8)
- Add VirtualType port feature
- Export cable input order for Sketch instance
- Fix
value
event trigger - Fix execution order for custom function node
- Fix incorrect value when using function port's node
- Fix cable input order
- Fix route and partial update
- Fix incorrect iface id references
- Clear port cache when reusing port
- Avoid re-emitting event on updated cable
- Avoid using ArrayOf port for custom function node
- Remove deprecated function
instance.getNode()
, please useinstance.iface[id]
orinstance.ifaceList[index]
let instance = new Blackprint.Engine();
instance.importJSON('...');
// Get iface by node id
instance.getNode('nodeId'); // Before
instance.iface['nodeId']; // After
// Get iface by node index
instance.getNode(0); // Before
instance.ifaceList[0]; // After
.update
function will no longer receive cable parameter if.partialUpdate
is not set to true
// Before
class extends Blackprint.Node {
update(cable){...}
}
// After
class extends Blackprint.Node {
constructor(){
this.partialUpdate = true;
}
update(cable){...}
}
- Add isRoute flag on route port
- Add
json.importing
event - Update ES6 remote module loader for Node.js
- Remove symbols from var or function id
- Fix route port connection
- Fix port switches initialization
- Fix port value for function node and fix update priority
- Improve TypeScript definition file
- Reset every struct port into null
- Fix port feature that must be already breaking for this version
- Fix error if the portName was a number type
- Fix skipped cache removal for route mode
- Add
isGhost
on interface for standalone port
- Fix index error when creating new function
- Allow module import from
http:
for internal network support (like company network)
- Add feature to allow output resyncronization
- Add
node.instance
property that can be used to access current instance for the node - Add TypeScript definition
- Add feature to split port with structure
- Add feature to use default input with primitive type when the port is not connected
- Add
node.log
for emit logging data to instance - Add callable route port output type
- Add route port to handle data flow
- Dynamically add empty environment variable if not exist
- Add event name as parameter
- Add node for handling environment variables
- Emit event when node id was changed
- Emit event when node will be deleted
- Emit event when creating new variables/function
- Emit event when renaming environment variable
- Finishing function node and the separated I/O node
- Fix import for append mode
- Fix initial value for variable node
- Fix feature for renamine function port
- Fix data request and saved data
- Fix
Port.Trigger
type and addrouteTo
- Fix incorrect port check for function node
- Fix function's input/output node
- Fix variable scope id and route connection
- Fix returned object from
getNode
- Fix route pass for custom function node
- Fix
cable.disconnect
event that not emitted on iface - Fix dynamic port for custom function input/output node
- Fix variable node scope
- Fix bug for environment variable
- Avoid emitting
cable.disconnect
event to instance twice - Restrict connection between dynamic port
- Port's
Any
type is no longer usenull
, please useBlackprint.Types.Any
instead update(port, source, cable)
will now only receive single argumentsupdate(cable)
. Please usecable.input
to obtainport
, andcable.output
to obtainsource
.request(port, sourceIface)
will now only receive single argumentsrequest(cable)
. Please usecable.output
to obtainport
, andcable.input.iface
to obtainsourceIface
.
class MyNode extends Blackprint.Node {
static input = {
// Before
AnyType: null,
// After
AnyType: Blackprint.Types.Any,
}
// Before
update(port, source, cable){}
// After
update(cable){} // port = cable.input, source = cable.output
// Before
request(port, sourceIface){}
// After
request(cable){} // port = cable.output, sourceIface = cable.input.iface
}
- Fix data type validation for any type
- Add used variable nodes's reference list
- Add support for exporting custom function and variable
- Add feature to rename/delete port for custom function node
- Add support to use port feature for custom function node
- Add to do list to prepare for breaking changes
- Add destroy function
- Emit event when JSON was imported
- Finishing custom variable and function node
- Fix for copying custom function node
- Fix callable port for function node
- Fix variable node for callable port
- Fix port type checker for ArrayOf
- Fix type validation
_list
must be not enumerable- Allow connect to union port with similar types
- Improve
value
event listener - Skip module loader if no URL input
- Skip check for
undefined
port but allownull
port - Make some internal properties configurable
- Disallow use of arrow function
- Fix unit test that was using
Blackprint.OutputPort
andBlackprint.InputPort
- Fix undefined value on array port
- Fix and simplify version check
- Fix field name
- Fix node deletion
- Fix undeleted root nodes when deleting module
- Add colors when downloading module
- Put unresolved module conflict into pending list
- Add
onModuleConflict
to handle conflict externally - Add support for remote engine
- Add
Blackprint.Environment.loadFromURL = true
if the environment prefer to use module from URL - Improve ESM module loader
- Fix module version checker
- Add spaces to
BP-Union
class - Make
_event
field writable - Remove unused function and some minor changes
- Fix incorrect field name
- Fix some error when Sketch is being run on Jest environment
- Add port
call
listener (for Trigger port) and fixconnectPort
- Add feature for using newest module and delete nodes by module URL
- Add options to skip some import data
- Throw error when the port type is undefined
- Fix
registerNode
andregisterInterface
to be used for decorator
- Add
Blackprint.OutputPort
andBlackprint.InputPort
for testing or scripting
- Add feature to rename port
- Add utils to help fix minified class name
- Add instance storage for variables, functions
- Creating input/output port dynamically now become:
- After:
node.createPort("input" | "output", name, type)
- Before:
node.input.add(name, type)
- After:
- Deleting input/output port dynamically now become:
- After:
node.deletePort("input" | "output", name)
- Before:
node.input.delete(name)
- After:
- Input/output port name that start with
_
will be ignored - Rename some function and mark it as private
node.input
andnode.output
construction now must be changed to static class variable
Click here to open details
class MyCustomNode extends Blackprint.Node {
// Before
input = { MyInput: Number };
output = { MyOutput: Number };
// After
static input = { MyInput: Number };
static output = { MyOutput: Number };
}
- Fix error when moving nodes from sketch
- Fix
Any
type data when trying to drop cable to the node header - Fix incorrect cable arrangement when the sketch is being reimported
- Fix cable order when being connected from input port
- Fix port value that was not updated because of cache
- Fix default port value
- Skip if the port value was unchanged
- Add
instance.ref
where theinstance
can benew Blackprint.Engine
ornew Blackprint.Sketch
thisref
will have reference toOutput
orInput
port - Add
node.destroy
as an alternative foriface.destroy
, this will be called by the engine and shouldn't be manually called - Add
instance.deleteNode
to delete node manually by using code - Add options for
importJSON
- Reuse port and event listener from an iface that have an ID
iface.const
andnode.const
now changed intoiface.ref
andnode.ref
importJSON
now will clear the instance firstValidator
port type was removed
- Fix error when using sQuery
- Fix error when the node doesn't have input port
- Fix
iface.destroy
that was not being called when the nodes was cleared
- Use cache when obtaining data from input port
- Fix data flow visualization
- Fix cable connection from port with type of array
- Fix
node.update
function that being called when port value haven't been defined
- Fix incorrect default value
- Move
iface.imported
call order nearnode.imported
- Fix incorrect port event data (
target
should beport
) - Fix
*
event that was not being called
Blackprint.Engine
is now usingCustomEvent
- You can now connect cable with script
- Avoid multiple constructor call
- Fix undefined cable value when being connected from input to output from sketch editor
- Add
input
andoutput
properties forCable
- Port
value
event can be retrieved from IFace object withport.value
- You now can use
.emit
for triggering your custom event for IFace/Node/Port
- Port event data will be wrapped with object
// Before
Input.Port.Stuff.on('value', function(target){});
// After
Input.Port.Stuff.on('value', function({ target, cable }){
// cable.value === target.value
// cable.value: is more recommended than using `target.value`
});
- Interfaces now can be accessed from
instance.iface[id]
- Add custom environment data
- Load module from URL (default to disabled)
- Add support for using Decorator when registering node/interface
- Add support for listening to all event with "*"
Because the implementation will be similar with engine-php and engine-go.
This changes is supposed to improve efficiency, and reduce possible future breaking changes.
.outputs, .inputs, .properties
field is changed into.output, .input, .property
fornode
andiface
outputs:[]
field is now changed tooutput:[]
for JSON exportInstance.importJSON()
now returning promise and need to beawait
-ed before using.getNode
or.getNodes
Blackprint.Engine.registerNode()
will now being merged and replaced withBlackprint.registerNode()
- When using class for
Blackprint.registerNode
it must extendsBlackprint.Node
- When constructing Node,
node.interface = '...'
now must be changed tonode.setInterface('...')
before accessing the target interface Blackprint.Addons
was changed toBlackprint.getContext
Blackprint.Node
was changed toBlackprint.Interface
- For sketch (browser only):
Blackprint.registerInterface()
was renamed toBlackprint.Sketch.registerInterface()
- For non-sketch:
Blackprint.Engine.registerInterface()
was renamed toBlackprint.registerInterface()
- When using class for
Blackprint.registerInterface
orBlackprint.Sketch.registerInterface
, the class must extendsBlackprint.Interface
BPAO
must be changed toBPIC
Blackprint.PortArrayOf
now changed toBlackprint.Port.ArrayOf
Blackprint.PortDefault
now changed toBlackprint.Port.Default
Blackprint.PortSwitch
now changed toBlackprint.Port.Switch
Blackprint.PortTrigger
now changed toBlackprint.Port.Trigger
Blackprint.PortUnion
now changed toBlackprint.Port.Union
Blackprint.PortValidator
now changed toBlackprint.Port.Validator
- Events emitted from node/iface/sketch will now only have one object parameter, therefore
._trigger
will only accept(eventName, ?object)
parameter.
Blackprint.Interpreter
is changed intoBlackprint.Engine
- Package on NPM registry was moved to
@blackprint/...
iface.options
now changed toiface.data
, you will need to replaceoptions
from the exported JSON intodata
iface.id
now changed toiface.i
, you will need to replaceid
from the exported JSON intoi
iface.id
now being used for named ID, andiface.i
still being the generated index for the nodes
- Still in development, any contribution welcome
- Please always specify the fixed version when using for your project
- Usually v0.*.0 will have breaking changes, while v0.0.* can have new feature or bug fixes