
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
@apostel/node-canvas-core
Advanced tools
The core implementation of the @apostel/node-canvas framework.
# Using NPM
npm install @apostel/node-canvas-core
# Using Yarn
yarn add @apostel/node-canvas-core
# Using Bun
bun install @apostel/node-canvas-core
Make sure to also install the following packages:
# Using NPM
npm install rxjs zod
# Using Yarn
yarn add rxjs zod
# Using Bun
bun install rxjs zod
Nodes are units that consists of inputs and outputs. They're conceptually very similar to functions, with the difference that outputs may be multiple, compared to a function's single return value.
An Addition Node may for instance have two inputs and a single output, which computes the sum of the inputs.
import { z } from 'zod';
import { Node, Input, Output, schema } from '@apostel/node-canvas-core';
import { combineLatest, map } from 'rxjs';
/** Declare a zod schema for value validation */
const NumberSchema = schema(z.number());
class Addition extends Node {
name = 'Addition';
inputs = {
a: new Input({ name: 'A', type: NumberSchema, defaultValue: 0 }),
b: new Input({ name: 'B', type: NumberSchema, defaultValue: 0 })
};
outputs = {
output: new Output({
name: 'Output',
type: NumberSchema,
observable: combineLatest([this.inputs.a, this.inputs.b]).pipe(
map(inputs => inputs.reduce((sum, value) => sum + value), 0)
)
})
};
}
import { z } from 'zod';
import { Node, Input, Output, schema } from '@apostel/node-canvas-core';
import { combineLatest, map } from 'rxjs';
/** Declare a zod schema for value validation */
const NumberSchema = schema(z.number());
class Addition extends Node {
name = 'Addition';
inputs = {
a: new Input({ name: 'A', type: NumberSchema, defaultValue: 0 }),
b: new Input({ name: 'B', type: NumberSchema, defaultValue: 0 })
};
outputs = {
output: new Output({
name: 'Output',
type: NumberSchema,
observable: combineLatest([this.inputs.a, this.inputs.b]).pipe(
map(inputs => inputs.reduce((sum, value) => sum + value), 0)
)
})
};
}
/** Declare 3 addition nodes */
const additionNode1 = new Addition();
const additionNode2 = new Addition();
const additionNode3 = new Addition();
/** Connect them together */
additionNode1.outputs.output.connect(additionNode3.inputs.a);
additionNode2.outputs.output.connect(additionNode3.inputs.b);
/**
* The output of AdditionNode3 will fire with a new sum
* everytime the inputs of AdditionNode1 and AdditionNode2 changes
*/
additionNode3.outputs.output.subscribe(console.log);
FAQs
Core implementation of the @apostel/node-canvas framework
We found that @apostel/node-canvas-core demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.