Registry / web-framework / stonyx

stonyx

JSON →
library0.2.2jsnpmunverified

Stonyx is an early-stage, TypeScript-first framework module designed for building modular applications, emphasizing a structured, object-oriented approach. It provides foundational concepts such as an `Application` class, `Context` management, and decorators like `@Component` and `@Service`, hinting at a dependency injection pattern. The package is currently in a pre-release state, with version 0.2.2 being the latest stable release, but development is active with frequent `0.2.3-beta` versions being published. This rapid iteration indicates that the API is subject to change and may not be stable. Stonyx aims to provide a robust core for larger application ecosystems, though specific use cases (e.g., web server, CLI tool) are not explicitly detailed in its current minimal documentation.

npm install stonyx
INSTALL
IMPORT
SIG · STONYX
S
stonyx
web-frameworkjavascriptv0.2.2
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

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

createApplication
import { createApplication } from 'stonyx';
const { createApplication } = require('stonyx');
Prefer ESM imports for Stonyx given its modern TypeScript tooling. CommonJS `require` might work for `dist/index.js` but is less idiomatic.
Application
import { Application } from 'stonyx';
import Application from 'stonyx';
The `Application` class is a named export, not a default export.
Service
import { Service } from 'stonyx';
import * as Stonyx from 'stonyx'; const MyService = Stonyx.Service;
Import specific decorators/classes directly for better tree-shaking and readability.

This quickstart demonstrates how to initialize a Stonyx application, define a basic component and service using decorators, inject a configuration, and run the service.

import { createApplication, Component, Service } from 'stonyx'; interface MyConfig { message: string; } @Component() class MyComponent { constructor(private config: MyConfig) {} run() { console.log(`Component running with message: ${this.config.message}`); } } @Service() class MyService { constructor(private myComponent: MyComponent) {} start() { console.log('Service starting...'); this.myComponent.run(); } } async function bootstrap() { const app = createApplication({ components: [MyComponent, MyService], providers: [ { provide: 'MyConfig', useValue: { message: 'Hello from Stonyx!' } } ] }); await app.start(); const service = app.resolve(MyService); service.start(); // In a real app, you might listen for termination signals or keep the process alive // app.stop(); // Example of stopping the application } bootstrap().catch(console.error);
Debug
Known issues
breakingStonyx is in a very early pre-release stage (0.2.x with frequent beta updates). APIs are not stable and are subject to frequent breaking changes without major version bumps. Always pin exact versions in `package.json`.
fix
Review the GitHub repository's commit history and `src` directory for the latest API changes before upgrading. Regularly check for new beta releases and test thoroughly.
affects: >=0.2.0
gotchaThe documentation for Stonyx is extremely minimal at this stage. Most functionality and intended usage patterns must be inferred directly from the source code. This increases the learning curve and risk of misinterpreting features.
fix
Explore the `src` directory in the GitHub repository to understand the internal structure and available exports. Pay close attention to `index.ts`, `Application.ts`, `Component.ts`, and `Service.ts` for core patterns.
affects: >=0.2.0
gotchaAs a 'base framework module', Stonyx likely requires other companion `stonyx-*` packages (e.g., for specific server integrations, plugins) to be fully functional in a real-world application. Without these, its utility might be limited to core application structure.
fix
Check the `abofs` GitHub organization for related Stonyx packages that provide integrations or extended functionality. Be prepared to build custom integrations if specific needs are not met by existing modules.
affects: >=0.2.0
Errors
Common errors & fixes
TypeError: app.start is not a function
Attempting to call `start()` on an `Application` instance before it has been properly initialized or if the `createApplication` factory function was not used correctly.
fix
Ensure `createApplication` is used to construct the application instance and that `await app.start()` is called to initialize services and components before attempting to resolve or use them.
Error: Cannot resolve dependency: MyService
A component or service dependency could not be found or instantiated by the dependency injection container. This often happens if the class was not included in the `components` array during application creation or if a provider is missing for a primitive type.
fix
Verify that all `@Component()` or `@Service()` classes are listed in the `components` array passed to `createApplication`. For non-class dependencies (e.g., config objects), ensure a corresponding `provider` is defined.
Upgrade
Version history
0.2.2latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
stonyx — npm install stonyx · libregistry