371d338a8b
v0.1.0 reached crates.io, PyPI, and the wickra-wasm npm package, but the wickra Node binding never published because the workflow called `napi create-npm-dirs` (plural). The actual napi CLI command is `create-npm-dir` (singular, per target). Changes that make the next tag's release actually finish: - workflow: replace the broken step with a loop that runs `napi create-npm-dir -t <triple>` for each of our four build targets. - workflow: every registry publish step now treats "version already uploaded" as success. That makes re-runs (and partial-failure recoveries) safe instead of failing the whole job. - bindings/node/package.json: trim the napi.triples list to the four platforms we actually build (linux-x64-gnu, darwin-x64, darwin-arm64, win32-x64-msvc). The previous defaults+9-extras configuration would have made napi prepublish expect platform packages we never produced. - bindings/node/index.js: switch from local-only binary lookup to the proper napi loader that tries the local `.node` file first and falls back to the per-platform npm subpackage that's installed as an optional dependency in production. - Versions across all four published packages bumped to 0.1.1 so the Node binding can publish for the first time alongside refreshed cargo/pypi/wasm artefacts.
@wickra/wickra
Node.js bindings for the Wickra streaming-first technical indicators library.
Install
Once published, install per platform via the precompiled native package:
npm install @wickra/wickra
Build from source
cd bindings/node
npm install
npm run build
npm test
The native module is built via napi-rs. The build script
produces a wickra.<platform>-<arch>.node binary in the package root that
index.js loads at runtime.
Usage
import { SMA, RSI, MACD, version } from '@wickra/wickra';
console.log('wickra', version());
// Batch:
const prices = Array.from({ length: 1000 }, (_, i) => 100 + Math.sin(i * 0.1) * 5);
const rsi = new RSI(14).batch(prices);
// Streaming:
const macd = new MACD(12, 26, 9);
for (const p of livePriceStream) {
const v = macd.update(p);
if (v && v.histogram > 0) console.log('bullish crossover candidate');
}
See index.d.ts for the full TypeScript surface.