# @causa/workspace

> Provides the base functionalities for a workspace: configuration loading and registering functions.

Latest version **1.1.0** (published 2026-09-18) · ISC license · 0 weekly downloads

## Install

```sh
npm install @causa/workspace
pnpm add @causa/workspace
yarn add @causa/workspace
bun add @causa/workspace
```

## Health

**Score 75/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; has provenance; recently updated; high maintenance score; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2026-09-18 |
| First published | 2023-05-04 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=22 |
| Dependencies | 9 |
| Unpacked size | 165.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 0 |
| Maintainers | flovouin |

## Links

- npm: https://www.npmjs.com/package/@causa/workspace
- Repository: https://github.com/causa-io/workspace
- Homepage: https://github.com/causa-io/workspace#readme
- Issues: https://github.com/causa-io/workspace/issues
- npm.io page: https://npm.io/package/@causa/workspace

## Dependencies (9)

- [pino](https://npm.io/package/pino.md) ^10.3.1
- [yaml](https://npm.io/package/yaml.md) ^2.9.1
- [globby](https://npm.io/package/globby.md) ^16.2.4
- [semver](https://npm.io/package/semver.md) ^7.8.5
- [lodash-es](https://npm.io/package/lodash-es.md) ^4.18.1
- [@types/lodash](https://npm.io/package/@types/lodash.md) ^4.17.25
- [class-validator](https://npm.io/package/class-validator.md) ^0.15.1
- [class-transformer](https://npm.io/package/class-transformer.md) ^0.5.1
- [resolve-package-path](https://npm.io/package/resolve-package-path.md) ^4.0.3

## Recent versions

- 1.1.0 (latest) — 2026-09-18
- 0.25.0-beta.3 (beta) — 2026-05-18
- 1.0.2 — 2026-06-26
- 1.0.1 — 2026-06-09
- 1.0.0 — 2026-06-09
- 0.25.0-beta.2 — 2026-05-14
- 0.25.0-beta.1 — 2026-05-14
- 0.24.1 — 2026-04-29
- 0.24.0 — 2026-04-20
- 0.23.0 — 2026-04-13
- 0.22.2 — 2026-03-13
- 0.22.1 — 2026-02-10
- 0.22.0 — 2026-02-10
- 0.21.1 — 2026-02-09
- 0.21.0 — 2026-02-09
- … 27 more at https://npm.io/package/@causa/workspace/versions

## README

# 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](https://github.com/causa-io/cli). For more information about CLI features and how to configure a Causa workspace, look at the [CLI documentation](https://github.com/causa-io/cli#readme).

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

## Configuration

The [`configuration`](./src/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`](./src/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`](./src/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`](./src/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`](./src/service-cache/) exposes the simple `ServiceCache`, allowing to register singleton services within a `WorkspaceContext`.

## Testing

The [`testing`](./src/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.

---
_Source: https://npm.io/package/@causa/workspace · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
