0.12.1 • Published 6 months ago

@causa/workspace v0.12.1

Weekly downloads
-
License
ISC
Repository
github
Last release
6 months ago

Causa Workspace package

This is the repository for the @causa/workspace npm package. The main way to access Causa workspace functionalities is through the Causa CLI. For more information about CLI features and how to configure a Causa workspace, look at the CLI documentation.

This document is addressed to Causa module developers, who need more information about the internals of the Causa workspace API.

Configuration

The configuration folder exposes the ConfigurationReader, which implements a generic way of loading a YAML / JSON configuration from several files. It also provides a rendering API, to format configuration values from other configuration values and using custom functions.

Workspace context

The context folder exposes the main part of the workspace API, namely the WorkspaceContext. It is the entrypoint for most workspace operations, as it initializes the configuration and function registry, and loads the Causa modules.

Function registry

The function-registry folder exposes the FunctionRegistry, which is how function definitions and implementations are registered, as well as called. The FunctionRegistry is parameterized with a context object, which for WorkspaceContext.functionRegistry is the WorkspaceContext itself.

Initialization

The initialization folder exposes utilities to initialize an existing workspace, i.e. install the required modules in the Causa folder (.causa).

Service cache

The service-cache exposes the simple ServiceCache, allowing to register singleton services within a WorkspaceContext.

Testing

The testing folder exposes testing utilities.

The createContext function allows creating a WorkspaceContext without loading a configuration from the disk. This is useful when "mocking" a context to test a workspace function.

The registerMockFunction registers a mock implementation of the given workspace function definition, returning a spy that can be used to assert calls made to the function.

0.11.0

10 months ago

0.12.0

10 months ago

0.12.1

6 months ago

0.10.0

11 months ago

0.9.0

11 months ago

0.8.0

11 months ago

0.7.0

12 months ago

0.6.0

12 months ago

0.5.0

12 months ago

0.4.0

12 months ago

0.3.0

12 months ago

0.2.1

1 year ago

0.2.0

1 year ago

0.1.1

1 year ago

0.1.0

1 year ago