AppPlan

tcmts.cli.placement.AppPlan · #ds5elmyg · type

import type { AppState } from "#codebase/tcmts/cli/placement";
import type { ExtRef } from "#codebase/tcmts/core/types";

export interface AppPlan {
  /** definitions shipped to the browser */
  browser: Set<string>;
  /** server components the browser renders by fetching their rendered tree (they're among `endpoints`) */
  components: Set<string>;
  /** browser components server components render: sent as references, by hash */
  clientRefs: Set<string>;
  /** for each server component, the browser components its tree can contain */
  refsOf: Map<string, Set<string>>;
  /** for each server component, the npm packages' browser components its tree can contain (`NpmFacts.client`), by
   * `packageRefKey`: sent as references to them, which the browser has */
  packageRefsOf: Map<string, Map<string, ExtRef>>;
  /** for each module of the server's (by its component's hash), the packages' browser components it renders, by
   * `packageRefKey`: on the server, references, not the package's code */
  packageImports: Map<string, Set<string>>;
  /** server functions the browser calls by hash: exactly the endpoints the app exposes */
  endpoints: Set<string>;
  /** server functions server components give browser components (`onDelete={deleteNote}`): sent as references, by
   * hash, and among `endpoints` */
  serverRefs: Set<string>;
  /** components the browser receives as stubs instead of code */
  stubbed: Set<string>;
  /** endpoints that are async generators, streamed chunk by chunk */
  streaming: Set<string>;
  errors: string[];
  /** worth knowing, but it runs: the same package at two ranges in the browser, say */
  warnings: string[];
  state: AppState;
}

uses

used by