oos-mock-runtime
v3.0.0
Published
**Officeless Mock Runtime** is a lightweight simulation environment designed to mimic the execution behavior of the **Officeless Platform** (Low-code/No-code).
Readme
Officeless Mock Runtime
Overview
Officeless Mock Runtime is a lightweight simulation environment designed to mimic the execution behavior of the Officeless Platform (Low-code/No-code).
This tool serves as a scaffolding and testing utility, allowing developers to build, test, and debug workflow logic locally or in isolation without needing a deployment to the live Officeless production environment. It replicates the core event loops, data passing, and state management of the actual platform.
Runtime Runner
The core engine of this mock runtime is the Runner, which handles the lifecycle of a workflow from initiation (Trigger) to execution (Method Callers).
1. Triggers
The runtime supports simulating the following events that initiate a workflow. These triggers mimic the payloads and context found in the live platform.
Integration & Logic Triggers
API: Simulates workflows triggered via external REST/GraphQL calls.Webhook: Simulates incoming webhooks from third-party services.Function: Simulates internal function-to-function calls.Dedicated Job: Simulates background job execution.Scheduler: Simulates cron-based or time-based triggers (defaults to "Instant Run" for simulation purposes).
Form & Record Events
Record Created: Triggered when a new database entry is finalized.Record Updated: Triggered when existing data is modified.Record Deleted: Triggered upon soft or hard deletion of data.
2. Method Callers (Action Blocks)
Once a workflow is triggered, the runtime simulates the execution of the following action blocks. It mocks the inputs, outputs, and latency associated with these operations.
External Integrations
API Call: Mocks outbound HTTP requests.Send Email: Mocks SMTP or transactional email service dispatch.
Internal Logic
Call Function: Invokes another internal logic block or script.Call Dedicated Job: Queues a background task within the mock environment.While Block: Simulates loops and iterative logic processing.
Database Actions
- Read Operations:
Find Record: Retrieve a single entity based on ID or unique constraints.Find Multiple Records: Query lists based on filter criteria.
- Write Operations:
Create Record: Insert a single new entity.Create Multiple Records: Batch insertion of entities.Update Record: Modify specific fields of an existing entity.Delete Record: Remove an entity from the mock database.
Installation
npm install oos-mock-runtime