Skip to content

Compose a Workspace

Select exact Product releases in a Workspace declaration and check the local plan before requesting an install.

Compose a Workspace from exact Product releases.

Select releases

Start with a Workspace repository. Find a Product key and version in local source or the Marketplace. A display name or latest does not identify an immutable release.

Declare the installs

The generated Workspace declaration under src/workspaces/ starts with installs: []. Add a Product key, version, and namespace. This example selects a local Product that must exist in the repository before the plan can compile.

import { defineWorkspace } from '@merulan/cdk/workspace';

export const workspace = defineWorkspace({
  workspaceKey: 'example-workspace',
  installs: [
    { namespace: 'context', product: { key: 'customer-context', version: '1.0.0' } },
  ],
});

The namespace identifies the Product install within the Workspace. The release's installation profile defines any required configuration and Connections.

Check the plan

Run the repository checks:

merulan workspace lint --dir .
merulan workspace plan --dir .

Check the Product keys, versions, namespaces, dependencies, and hash in the plan. A change to the declaration or release catalog requires a new plan. Check a Workspace plan explains what the plan proves before installation. The CDK reference gives its exact type.