dev-prism 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,11 @@
1
+ import {
2
+ createSession
3
+ } from "../chunk-QSG5CXPX.js";
4
+ import "../chunk-PJKUD2N2.js";
5
+ import "../chunk-GWDGC2OE.js";
6
+ import "../chunk-25WQHUYW.js";
7
+ import "../chunk-VR3QWHHB.js";
8
+ import "../chunk-LEHA65A7.js";
9
+ export {
10
+ createSession
11
+ };
@@ -0,0 +1,6 @@
1
+ interface DestroyOptions {
2
+ all?: boolean;
3
+ }
4
+ declare function destroySession(projectRoot: string, sessionId: string | undefined, options: DestroyOptions): Promise<void>;
5
+
6
+ export { type DestroyOptions, destroySession };
@@ -0,0 +1,9 @@
1
+ import {
2
+ destroySession
3
+ } from "../chunk-XUWQUDLT.js";
4
+ import "../chunk-GWDGC2OE.js";
5
+ import "../chunk-25WQHUYW.js";
6
+ import "../chunk-VR3QWHHB.js";
7
+ export {
8
+ destroySession
9
+ };
@@ -0,0 +1,3 @@
1
+ declare function listSessions(projectRoot: string): Promise<void>;
2
+
3
+ export { listSessions };
@@ -0,0 +1,10 @@
1
+ import {
2
+ listSessions
3
+ } from "../chunk-SMFAL2VP.js";
4
+ import "../chunk-PJKUD2N2.js";
5
+ import "../chunk-GWDGC2OE.js";
6
+ import "../chunk-25WQHUYW.js";
7
+ import "../chunk-VR3QWHHB.js";
8
+ export {
9
+ listSessions
10
+ };
@@ -0,0 +1,6 @@
1
+ export { createSession } from './commands/create.js';
2
+ export { destroySession } from './commands/destroy.js';
3
+ export { listSessions } from './commands/list.js';
4
+ export { SessionConfig, loadConfig } from './lib/config.js';
5
+ export { calculatePorts } from './lib/ports.js';
6
+ export { findNextSessionId, generateDefaultBranchName } from './lib/worktree.js';
package/dist/index.js ADDED
@@ -0,0 +1,30 @@
1
+ import {
2
+ createSession
3
+ } from "./chunk-QSG5CXPX.js";
4
+ import {
5
+ destroySession
6
+ } from "./chunk-XUWQUDLT.js";
7
+ import {
8
+ listSessions
9
+ } from "./chunk-SMFAL2VP.js";
10
+ import {
11
+ calculatePorts
12
+ } from "./chunk-PJKUD2N2.js";
13
+ import {
14
+ findNextSessionId,
15
+ generateDefaultBranchName
16
+ } from "./chunk-GWDGC2OE.js";
17
+ import {
18
+ loadConfig
19
+ } from "./chunk-25WQHUYW.js";
20
+ import "./chunk-VR3QWHHB.js";
21
+ import "./chunk-LEHA65A7.js";
22
+ export {
23
+ calculatePorts,
24
+ createSession,
25
+ destroySession,
26
+ findNextSessionId,
27
+ generateDefaultBranchName,
28
+ listSessions,
29
+ loadConfig
30
+ };
@@ -0,0 +1,14 @@
1
+ interface SessionConfig {
2
+ projectName?: string;
3
+ portBase: number;
4
+ sessionsDir: string;
5
+ ports: Record<string, number>;
6
+ appEnv?: Record<string, Record<string, string>>;
7
+ apps?: string[];
8
+ setup: string[];
9
+ }
10
+ declare function loadConfig(projectRoot: string): Promise<SessionConfig>;
11
+ declare function getSessionsDir(config: SessionConfig, projectRoot: string): string;
12
+ declare function getSessionDir(config: SessionConfig, projectRoot: string, sessionId: string): string;
13
+
14
+ export { type SessionConfig, getSessionDir, getSessionsDir, loadConfig };
@@ -0,0 +1,10 @@
1
+ import {
2
+ getSessionDir,
3
+ getSessionsDir,
4
+ loadConfig
5
+ } from "../chunk-25WQHUYW.js";
6
+ export {
7
+ getSessionDir,
8
+ getSessionsDir,
9
+ loadConfig
10
+ };
@@ -0,0 +1,12 @@
1
+ interface DockerComposeOptions {
2
+ cwd: string;
3
+ profiles?: string[];
4
+ detach?: boolean;
5
+ }
6
+ declare function up(options: DockerComposeOptions): Promise<void>;
7
+ declare function logs(options: DockerComposeOptions): Promise<void>;
8
+ declare function down(options: DockerComposeOptions): Promise<void>;
9
+ declare function ps(options: DockerComposeOptions): Promise<string>;
10
+ declare function isRunning(options: DockerComposeOptions): Promise<boolean>;
11
+
12
+ export { type DockerComposeOptions, down, isRunning, logs, ps, up };
@@ -0,0 +1,14 @@
1
+ import {
2
+ down,
3
+ isRunning,
4
+ logs,
5
+ ps,
6
+ up
7
+ } from "../chunk-VR3QWHHB.js";
8
+ export {
9
+ down,
10
+ isRunning,
11
+ logs,
12
+ ps,
13
+ up
14
+ };
@@ -0,0 +1,7 @@
1
+ import { SessionConfig } from './config.js';
2
+
3
+ declare function generateEnvContent(sessionId: string, ports: Record<string, number>, projectName: string): string;
4
+ declare function writeEnvFile(sessionDir: string, sessionId: string, ports: Record<string, number>, projectName: string): string;
5
+ declare function writeAppEnvFiles(config: SessionConfig, sessionDir: string, sessionId: string, ports: Record<string, number>): string[];
6
+
7
+ export { generateEnvContent, writeAppEnvFiles, writeEnvFile };
@@ -0,0 +1,10 @@
1
+ import {
2
+ generateEnvContent,
3
+ writeAppEnvFiles,
4
+ writeEnvFile
5
+ } from "../chunk-LEHA65A7.js";
6
+ export {
7
+ generateEnvContent,
8
+ writeAppEnvFiles,
9
+ writeEnvFile
10
+ };
@@ -0,0 +1,6 @@
1
+ import { SessionConfig } from './config.js';
2
+
3
+ declare function calculatePorts(config: SessionConfig, sessionId: string): Record<string, number>;
4
+ declare function formatPortsTable(ports: Record<string, number>): string;
5
+
6
+ export { calculatePorts, formatPortsTable };
@@ -0,0 +1,8 @@
1
+ import {
2
+ calculatePorts,
3
+ formatPortsTable
4
+ } from "../chunk-PJKUD2N2.js";
5
+ export {
6
+ calculatePorts,
7
+ formatPortsTable
8
+ };
@@ -0,0 +1,16 @@
1
+ declare function findNextSessionId(projectRoot: string, sessionsDir?: string): Promise<string>;
2
+ declare function generateDefaultBranchName(sessionId: string): string;
3
+ declare function createWorktree(projectRoot: string, sessionDir: string, branchName: string): Promise<void>;
4
+ declare function removeWorktree(projectRoot: string, sessionDir: string, branchName: string): Promise<void>;
5
+ declare function listWorktrees(projectRoot: string): Promise<Array<{
6
+ path: string;
7
+ branch: string;
8
+ commit: string;
9
+ }>>;
10
+ declare function getSessionWorktrees(projectRoot: string): Promise<Array<{
11
+ sessionId: string;
12
+ path: string;
13
+ branch: string;
14
+ }>>;
15
+
16
+ export { createWorktree, findNextSessionId, generateDefaultBranchName, getSessionWorktrees, listWorktrees, removeWorktree };
@@ -0,0 +1,16 @@
1
+ import {
2
+ createWorktree,
3
+ findNextSessionId,
4
+ generateDefaultBranchName,
5
+ getSessionWorktrees,
6
+ listWorktrees,
7
+ removeWorktree
8
+ } from "../chunk-GWDGC2OE.js";
9
+ export {
10
+ createWorktree,
11
+ findNextSessionId,
12
+ generateDefaultBranchName,
13
+ getSessionWorktrees,
14
+ listWorktrees,
15
+ removeWorktree
16
+ };
package/package.json ADDED
@@ -0,0 +1,55 @@
1
+ {
2
+ "name": "dev-prism",
3
+ "version": "0.1.0",
4
+ "description": "Minimal CLI for isolated parallel development sessions using git worktrees and Docker Compose",
5
+ "type": "module",
6
+ "license": "MIT",
7
+ "author": "Emil Bryggare",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "https://github.com/emilbryggare/dev-prism.git"
11
+ },
12
+ "bugs": {
13
+ "url": "https://github.com/emilbryggare/dev-prism/issues"
14
+ },
15
+ "homepage": "https://github.com/emilbryggare/dev-prism#readme",
16
+ "keywords": [
17
+ "development",
18
+ "sessions",
19
+ "git-worktree",
20
+ "docker",
21
+ "docker-compose",
22
+ "isolation",
23
+ "parallel",
24
+ "cli",
25
+ "claude-code",
26
+ "ai-development"
27
+ ],
28
+ "bin": {
29
+ "dev-prism": "./bin/dev-prism.js"
30
+ },
31
+ "main": "./dist/index.js",
32
+ "types": "./dist/index.d.ts",
33
+ "scripts": {
34
+ "build": "tsup src/index.ts src/commands/create.ts src/commands/destroy.ts src/commands/list.ts src/commands/claude.ts src/lib/config.ts src/lib/docker.ts src/lib/env.ts src/lib/ports.ts src/lib/worktree.ts --format esm --dts",
35
+ "dev": "tsup src/index.ts --format esm --dts --watch",
36
+ "typecheck": "tsc --noEmit"
37
+ },
38
+ "dependencies": {
39
+ "chalk": "^5.3.0",
40
+ "commander": "^11.1.0",
41
+ "execa": "^8.0.1"
42
+ },
43
+ "devDependencies": {
44
+ "@types/node": "^20.10.0",
45
+ "tsup": "^8.0.1",
46
+ "typescript": "^5.3.2"
47
+ },
48
+ "engines": {
49
+ "node": ">=18"
50
+ },
51
+ "files": [
52
+ "bin",
53
+ "dist"
54
+ ]
55
+ }