mirror of
https://github.com/badlogic/pi-mono.git
synced 2026-11-05 23:37:25 +00:00
p2 (Pi Mobile on Chord v2) moves from pi-private into pi as one commit. Root scripts that loop all workspaces use --if-present; npm test, ./test.sh and the release script cover packages/* only (p2: cd apps/p2 && npm test); sync-versions also updates apps' workspace pins.
17 lines
755 B
TypeScript
17 lines
755 B
TypeScript
import { bool, int, obj, opt, type Static, str } from "@earendil-works/pi-schema";
|
|
import { literal, record } from "@p2/app/v1";
|
|
|
|
/** Browser-safe configuration shape. No credentials are kept in envs.json. */
|
|
export const ENV_NAME = /^[a-z0-9][a-z0-9_-]{0,31}$/;
|
|
export const EnvConfigSchema = obj({
|
|
type: literal("ssh"),
|
|
host: str({ minLength: 1, maxLength: 255 }),
|
|
user: opt(str({ minLength: 1, maxLength: 255 })),
|
|
port: opt(int({ minimum: 1, maximum: 65535 })),
|
|
identityFile: opt(str({ minLength: 1, maxLength: 4096 })),
|
|
shellPath: opt(str({ minLength: 1, maxLength: 4096 })),
|
|
loginShell: opt(bool()),
|
|
shellEnv: opt(record(str())),
|
|
});
|
|
export type EnvConfig = Static<typeof EnvConfigSchema>;
|
|
export type EnvsConfig = Record<string, EnvConfig>;
|