Registry / devops / bali-component-framework

bali-component-framework

JSON →
library2.86.0jsnpmunverified

A JavaScript implementation of the Bali Nebula™ Component Framework, version 2.86.0, providing a structured approach to building component-based applications using Bali Document Notation (BDN). Includes primitive types, collection classes, document parser, and component formatter. Actively maintained with regular releases on npm. Differentiates by enforcing a specific component architecture and providing a unified API for document parsing and formatting, making it suitable for projects following the Bali Nebula standard.

npm install bali-component-framework
INSTALL
IMPORT
SIG · BALI-COMPONENT-FRA
B
bali-component-framework
devopsjavascriptv2.86.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

api
const bali = require('bali-component-framework').api(debug);
const bali = require('bali-component-framework');
The default export is not an object; you must call .api(debug) to get the framework instance.
BaliComponentFactory
const { BaliComponentFactory } = require('bali-component-framework').api(debug);
const { BaliComponentFactory } = require('bali-component-framework');
Classes are accessed via .api(debug); destructuring directly from the package returns undefined.
Component
const { Component } = require('bali-component-framework').api(debug);
import { Component } from 'bali-component-framework';
The package does not support ES modules; use CommonJS require().

Shows basic usage: create a Bali document, set properties, serialize to BDN, and parse back.

const debug = 1; const bali = require('bali-component-framework').api(debug); // Create a simple document using Bali Document Notation const doc = bali.newDocument('MyApp', '1.0.0'); doc.setProperty('name', 'example'); doc.addItem('data', { value: 42 }); // Serialize to BDN format const bdn = bali.formatDocument(doc); console.log(bdn); // Parse back const parsed = bali.parseDocument(bdn); console.log(parsed.getProperty('name')); // 'example'
Debug
Known issues
breakingAPI version mismatch: calling .api(debug) without debug argument or with wrong type will fail.
fix
Always pass a number (0-3) as the debug parameter when calling .api().
affects: >=2.0.0
deprecatedSome methods like 'formatDocument' may be replaced by 'toBDN' in future versions.
fix
Check release notes for migration; use 'toBDN' if available.
affects: >=2.80.0
gotchaAll framework classes are accessed through the api instance; direct require returns an object with api() only.
fix
Always use require('bali-component-framework').api(debug) to get access to classes.
affects: >=2.0.0
gotchaDebug level affects logging verbosity; level 0 silences all output, levels 2-3 may produce excessive logs.
fix
Set debug = 0 in production, debug = 1 for normal debugging, higher levels for detailed tracing.
affects: >=2.0.0
Errors
Common errors & fixes
TypeError: bali.newDocument is not a function
Calling require('bali-component-framework') without .api(debug) returns the container object, not the api instance.
fix
const bali = require('bali-component-framework').api(0);
Error: Cannot find module 'bali-component-framework'
Package not installed or not in node_modules.
fix
Run 'npm install bali-component-framework' in your project directory.
TypeError: Cannot read properties of undefined (reading 'Component')
Destructuring directly from require('bali-component-framework') without .api() provides no classes.
fix
const { Component } = require('bali-component-framework').api(0);
Upgrade
Version history
2.86.0latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
7 hits · last 30 days
node
6
Resources
bali-component-framework — npm install bali-component-framework · libregistry