Manifest

tcmts.cli.manifests.Manifest · #f6em4hym · type

import type { Role } from "#codebase/tcmts/cli/roles";

export interface Manifest {
  name: string;
  description?: string;
  /** subpath (`.`, `./ui`) → names (relative to the namespace; "" is all of it) whose definitions it exports */
  exports: Record<string, string[]>;
  /** command → the definition it runs (relative) */
  bin: Record<string, string>;
  /** packages the code needs but doesn't import (`@types/node@^24`) */
  with: string[];
  /** files to copy in, relative to the codebase root */
  files: string[];
  /** a JSON file of the codebase (relative to the namespace) whose fields the package's package.json starts from (a VS Code extension's `contributes`, `engines`) */
  packageJson?: string;
  /** command → test files that run it as a program (relative to the codebase root): `tcm test` runs them */
  suites: Record<string, string[]>;
  /** name → an app it ships (relative): `tcm pack` puts each in the package as a codebase of its own, which `tcm start` runs */
  apps: Record<string, string>;
  /**
   * tcm libraries of the codebase (packages with `npm: false`, by name) it ships, each its newest release: `tcm pack`
   * puts them in the package as a codebase of their own, which `tcm lib add tcm <name>` mounts from
   */
  libraries: string[];
  /**
   * false for a tcm library: shared by `tcm lib add` (by its releases' hashes), not published to npm. A package of the
   * codebase that uses it carries its code rather than depending on it from npm, and it isn't packed itself
   */
  npm?: false;
  /** the version of tcm's host protocol its code speaks (`HOST_PROTOCOLS`): an app using it builds only with a tcm serving that */
  host?: number;
  /** name (relative) → its role (`ROLES`): what tcm's analysis and build treat it as, by its hash */
  roles?: Record<string, Role>;
}

uses

used by