UNPKG

@mesh-tech/mesh-cli

Version:

CLI for Mesh platform development utilities

25 lines (24 loc) 1.17 kB
export declare const NUM_PORT_BLOCKS = 64; export declare const PORT_BLOCK_BASE = 40000; export declare const PORT_BLOCK_SIZE = 40; export declare const PORT_BLOCK_SERVICE_SUBRANGE = 24; export interface WorktreeIdentity { worktreeRoot: string; isPrimary: boolean; slug: string; hash: string; token: string; portBlock: number; taskQueueSuffix: string; } export declare function sanitizeSlug(name: string): string; export declare function worktreeHash(worktreeRoot: string): string; export declare function portBlockFor(hash: string, isPrimary: boolean): number; export declare function blockBasePort(block: number): number; export declare function withAppScopedPortBlock(wt: WorktreeIdentity, appRoot: string): WorktreeIdentity; export declare const STACK_SLUG_MAX = 16; export declare function worktreeStackName(baseName: string, wt: WorktreeIdentity): string; export declare function stackNeedsWorktreeIsolation(stackName: string, wt: WorktreeIdentity): boolean; type GitRunner = (args: string[], cwd: string) => string; export declare function resolveWorktreeIdentity(cwd?: string, gitRunner?: GitRunner): WorktreeIdentity; export {};