physical.NPM_TOKEN_VARIABLEconstno test imports itconst NPM_TOKEN_VARIABLE: "INFRO_NPMJS_TOKEN"The variable that holds the token for npm.
The adapters of the ports of the Logical layer (commons repoctl 0001-repoctl-layers FR-006): the one place where Repoctl runs a program, reads or writes a file, asks the registry of npm or reads the environment for a credential. Each is a record of functions that fills a port; a program that is not installed is a run that ended with 127 and says so, never a throw. The credential is read here and only here, and what is read is held as a Secret, whose text, JSON and inspected form are [redacted].
import { systemWorld } from "@intellectual-frontiers/repoctl/physical";
const world = systemWorld("/path/to/checkout", (name) => process.env[name], { libraries: undefined });
world.repo; // "/path/to/checkout"physical.NPM_TOKEN_VARIABLEconstno test imports itconst NPM_TOKEN_VARIABLE: "INFRO_NPMJS_TOKEN"The variable that holds the token for npm.
physical.systemProcessconstno test imports itconst systemProcess: ProcessPrograms run through the system, with the environment this process has plus what a run adds.
physical.systemFilesconstno test imports itconst systemFiles: FilesFiles on the system's disk.
physical.npmRegistryconstno test imports itconst npmRegistry: RegistryWhat the registry of npm says of a package: its latest version and the versions it lists.
physical.envCredentialsfunctionno test imports itfunction envCredentials(env: (name: string) => string | undefined): CredentialsThe credentials a host holds, read from its environment by name: the token for npm.
physical.manifestLibrariesfunctionno test imports itfunction manifestLibraries(repo: string, configured: boolean): LibrariesThe libraries of the repository, read from their manifests; none where its configuration has no libraries.
physical.DOCS_PACKAGEconstno test imports itconst DOCS_PACKAGE: "@intellectual-frontiers/docs"The package of the documentation generator, which repoctl docs loads where it is installed.
physical.systemDocsconstno test imports itconst systemDocs: DocsPortThe documentation generator: the package found in the node_modules of the repository or above it (an optional peer of this program, never carried by it).
physical.serveFolderfunctionno test imports itfunction serveFolder(folder: string, port: number): Promise<{ readonly url: string; readonly close: () => Promise<void>; }>A folder served on a loopback port (0 asks the system for one): the address and the function that stops it. Nothing leaves the computer: the socket is bound to 127.0.0.1.
physical.systemWorldfunctionno test imports itfunction systemWorld(repo: string, env: (name: string) => string | undefined, config: Pick<Config, "libraries">): WorldThe world of a repository on this system: every port filled.
NPM_TOKEN_VARIABLEconstno test imports itconst NPM_TOKEN_VARIABLE: "INFRO_NPMJS_TOKEN"The variable that holds the token for npm.
systemProcessconstconst systemProcess: ProcessPrograms run through the system, with the environment this process has plus what a run adds.
systemFilesconstconst systemFiles: FilesFiles on the system's disk.
npmRegistryconstno test imports itconst npmRegistry: RegistryWhat the registry of npm says of a package: its latest version and the versions it lists.
envCredentialsfunctionno test imports itfunction envCredentials(env: (name: string) => string | undefined): CredentialsThe credentials a host holds, read from its environment by name: the token for npm.
manifestLibrariesfunctionfunction manifestLibraries(repo: string, configured: boolean): LibrariesThe libraries of the repository, read from their manifests; none where its configuration has no libraries.
DOCS_PACKAGEconstno test imports itconst DOCS_PACKAGE: "@intellectual-frontiers/docs"The package of the documentation generator, which repoctl docs loads where it is installed.
systemDocsconstno test imports itconst systemDocs: DocsPortThe documentation generator: the package found in the node_modules of the repository or above it (an optional peer of this program, never carried by it).
serveFolderfunctionfunction serveFolder(folder: string, port: number): Promise<{ readonly url: string; readonly close: () => Promise<void>; }>A folder served on a loopback port (0 asks the system for one): the address and the function that stops it. Nothing leaves the computer: the socket is bound to 127.0.0.1.
systemWorldfunctionfunction systemWorld(repo: string, env: (name: string) => string | undefined, config: Pick<Config, "libraries">): WorldThe world of a repository on this system: every port filled.