#1812

feat(monorepo): allow excluding workspace apps via monorepo.exclude and enabled: false

OpenYK-03wants to merge intofrom

Summary

Fixes #1758

Currently, monorepo detection scans all workspace packages and creates a sub-app for each package found. In repositories with non-deployable packages (e.g. mobile applications, CLI tools, internal documentation), there was no way to prevent openship from treating them as deployable services.

This PR adds two complementary mechanisms in openship.json:

  1. monorepo.exclude: string[]: A list of root directory paths to omit from detected workspace packages.
  2. monorepo.apps[].enabled: false: Disables a specific workspace sub-app by root directory. When enabled: false, name is optional.

Changes

  • Core schema & parsing (packages/core):
    • Added exclude?: string[] to OpenshipMonorepo.
    • Added enabled?: boolean to OpenshipMonorepoApp (allowing name to be omitted if disabled).
    • Validated monorepo.exclude as an array of path strings and monorepo.apps[].enabled as boolean.
  • Engine overlay & filtering (packages/platform):
    • In mergeMonorepoApps, filtered out detected apps configured with enabled === false.
    • In applyOpenshipOverlay, filtered out apps matching paths in monorepo.exclude.
    • Added public diagnostics warning when any path in monorepo.exclude does not match any detected workspace sub-app (matching monorepo.apps behavior).
  • Docs & Schema (apps/web):
    • Updated openship.schema.json with monorepo.exclude and monorepo.apps[].enabled.
    • Updated apps/web/content/docs/reference/openship-json.mdx documentation.
  • Tests:
    • Unit tests in packages/core/src/openship-config/parse.test.ts.
    • End-to-end deployment prepare service tests in apps/api/test/modules/deployments/prepare.service.test.ts.

Verification

  • bun test packages/core/src/openship-config/parse.test.ts (101 tests passed)
  • bunx vitest run test/modules/deployments/prepare.service.test.ts (58 tests passed)