packApp(cb: Codebase, app: string, out: string) => number
Ship an app of the codebase (`app`, a name) in a package: a codebase holding only it and what it uses, everything it runs on pinned as here, the app named `app`, written to `out/codebase.sqlite`. `tcm start app` there runs it (building it the first time), with the recurring jobs (`every(...)`) of its namespace, named as there (the app's `ns.ingest` as `ingest`), so `tcm start` runs them too, and its HTTP routes (`appRoutes`: `ns.http.oauth.client` as `http.oauth.client`), and the manifests giving what it uses a role (the react library's `Stylesheet`), named as here with what they give one, so its build treats them as here. Says how many definitions it holds.
packLibraries(cb: Codebase, libraries: string[], out: string) => number
Ship tcm libraries of the codebase (`libraries`, packages with `npm: false`) in a package: a codebase holding each one's newest release, its namespace named as it was there and the release recorded at it, so its namespace has the same hash, written to `out/codebase.sqlite`. `tcm lib add tcm <name>` mounts one from there. Says how many definitions it holds.
A codebase of its own holding only what `roots` use, everything it runs on pinned as here, named by `name`, written to `out/codebase.sqlite`: what a package ships of the codebase (its apps, its libraries). Says how many definitions it holds.
An app's plain HTTP routes: the functions in its namespace's `http` namespace (`hub.http.oauth.client`), shipped with it as `http.…` (`http.oauth.client`), for `tcm start --http http.oauth=/oauth` to serve. Tests aren't routes.
What a subpath exports: definitions under their last names, namespaces' definitions under theirs. A type and a value can share a name; two of either can't.
Emitted code and declarations, for outside the cache: packages by name rather than the cache's aliases (where that's unambiguous; TypeScript calls an alias's DefinitelyTyped types `@npm/<alias>`), other modules by their `.js` files (declaration emit keeps `.ts`), and no JSX pragmas naming aliases.
Which components the package carries, and what it takes from its sibling packages instead: a definition one of them exports comes from the oldest release of it that exports every such definition used, as it is here. One a sibling keeps to itself (it doesn't export it) is carried, like the package's own code: two packages of one codebase can share code without either publishing it.