@buildkitgg/dev-domains 0.0.0-stage → 0.0.1

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.
Files changed (47) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +751 -2
  3. package/dist/cli/command.d.ts +3 -0
  4. package/dist/cli/command.js +17 -0
  5. package/dist/cli/commands.d.ts +125 -0
  6. package/dist/cli/commands.js +98 -0
  7. package/dist/cli/init.d.ts +6 -0
  8. package/dist/cli/init.js +148 -0
  9. package/dist/cli/main.d.ts +2 -0
  10. package/dist/cli/main.js +13 -0
  11. package/dist/cli/terminal.d.ts +11 -0
  12. package/dist/cli/terminal.js +43 -0
  13. package/dist/config/load.d.ts +36 -0
  14. package/dist/config/load.js +68 -0
  15. package/dist/config/read.d.ts +2 -0
  16. package/dist/config/read.js +19 -0
  17. package/dist/config/schema.d.ts +73 -0
  18. package/dist/config/schema.js +71 -0
  19. package/dist/domains/resolve.d.ts +37 -0
  20. package/dist/domains/resolve.js +54 -0
  21. package/dist/node.d.ts +10 -0
  22. package/dist/node.js +16 -0
  23. package/dist/playwright.d.ts +13 -0
  24. package/dist/playwright.js +20 -0
  25. package/dist/project/detect.d.ts +3 -0
  26. package/dist/project/detect.js +101 -0
  27. package/dist/project/discovery.d.ts +6 -0
  28. package/dist/project/discovery.js +70 -0
  29. package/dist/project/identity.d.ts +6 -0
  30. package/dist/project/identity.js +44 -0
  31. package/dist/project/manifest.d.ts +11 -0
  32. package/dist/project/manifest.js +22 -0
  33. package/dist/project/package-manager.d.ts +2 -0
  34. package/dist/project/package-manager.js +28 -0
  35. package/dist/runtime/command.d.ts +4 -0
  36. package/dist/runtime/command.js +75 -0
  37. package/dist/runtime/portless.d.ts +11 -0
  38. package/dist/runtime/portless.js +103 -0
  39. package/dist/runtime/process.d.ts +13 -0
  40. package/dist/runtime/process.js +101 -0
  41. package/dist/runtime/runner.d.ts +1 -0
  42. package/dist/runtime/runner.js +48 -0
  43. package/dist/webhooks/gateway.d.ts +10 -0
  44. package/dist/webhooks/gateway.js +99 -0
  45. package/dist/webhooks/tunnel.d.ts +2 -0
  46. package/dist/webhooks/tunnel.js +27 -0
  47. package/package.json +64 -3
@@ -0,0 +1,75 @@
1
+ import path from "node:path";
2
+ import { resolveCommand } from "package-manager-detector/commands";
3
+ import { interpolate } from "../domains/resolve.js";
4
+ import { readManifest } from "../project/manifest.js";
5
+ export async function serverCommand(endpoint, packageManager, cwd, variables, port) {
6
+ const values = { ...variables, port: String(port) };
7
+ let command;
8
+ if (endpoint.script) {
9
+ const manifest = await readManifest(cwd);
10
+ const source = manifest.scripts[endpoint.script];
11
+ if (!source) {
12
+ throw new Error(`Script ${endpoint.script} does not exist in ${cwd}`);
13
+ }
14
+ if (/\b(dev-domains|portless)\b/.test(source)) {
15
+ throw new Error(`Script ${endpoint.script} wraps a domain CLI. Point to the underlying server script instead.`);
16
+ }
17
+ command = [];
18
+ }
19
+ else {
20
+ command = (endpoint.command ?? []).map((arg) => interpolate(arg, values));
21
+ }
22
+ if (endpoint.framework === "next") {
23
+ command.push("--hostname", "127.0.0.1", "--port", String(port));
24
+ }
25
+ if (endpoint.framework === "vite") {
26
+ command.push("--host", "127.0.0.1", "--port", String(port), "--strictPort");
27
+ }
28
+ if (endpoint.framework === "storybook") {
29
+ command.push("--host", "127.0.0.1", "--port", String(port), "--exact-port", "--no-open", "--ci");
30
+ }
31
+ if (endpoint.script) {
32
+ const resolved = resolveCommand(packageManager, "run", [endpoint.script, ...command]);
33
+ if (!resolved) {
34
+ throw new Error(`Cannot run scripts with ${packageManager}`);
35
+ }
36
+ return [resolved.command, ...resolved.args];
37
+ }
38
+ return command;
39
+ }
40
+ export function serverEnvironment(endpoint, port, inherited) {
41
+ const env = {
42
+ ...inherited,
43
+ ...Object.fromEntries(Object.entries(endpoint.endpoint.env).map(([key, value]) => [
44
+ key,
45
+ interpolate(value, { ...endpoint.variables, port: String(port) })
46
+ ]))
47
+ };
48
+ // Package-local binaries take precedence, followed by workspace ancestors and the current Node runtime.
49
+ const bins = [];
50
+ let directory = endpoint.cwd;
51
+ while (true) {
52
+ bins.push(path.join(directory, "node_modules", ".bin"));
53
+ const parent = path.dirname(directory);
54
+ if (directory === parent) {
55
+ break;
56
+ }
57
+ directory = parent;
58
+ }
59
+ const existingPath = Object.entries(env).find(([key]) => key.toUpperCase() === "PATH")?.[1] || "";
60
+ for (const key of Object.keys(env)) {
61
+ if (key.toUpperCase() === "PATH") {
62
+ delete env[key];
63
+ }
64
+ }
65
+ return {
66
+ ...env,
67
+ PATH: [...bins, path.dirname(process.execPath), existingPath].join(path.delimiter),
68
+ PORT: String(port),
69
+ HOST: "127.0.0.1",
70
+ BUILDKIT_ACTIVE: "1",
71
+ DEV_DOMAINS_ORIGIN: endpoint.origin,
72
+ DEV_DOMAINS_HOSTNAME: endpoint.hostname,
73
+ DEV_DOMAINS_WORKTREE: endpoint.variables.worktree
74
+ };
75
+ }
@@ -0,0 +1,11 @@
1
+ import { RouteStore } from "portless";
2
+ import { type Project, type ResolvedEndpoint } from "../domains/resolve.js";
3
+ export declare function stateDirectory(): string;
4
+ export declare function routeStore(): RouteStore;
5
+ export declare function proxyEnvironment(project: Project): NodeJS.ProcessEnv;
6
+ export declare function proxyCommand(project: Project, action: "setup" | "status" | "doctor", signal?: AbortSignal): Promise<{
7
+ code: number;
8
+ stderr: string;
9
+ pid?: number;
10
+ }>;
11
+ export declare function runEndpoint(project: Project, endpoint: ResolvedEndpoint, signal?: AbortSignal, quiet?: boolean): Promise<number>;
@@ -0,0 +1,103 @@
1
+ import path from "node:path";
2
+ import { fileURLToPath } from "node:url";
3
+ import { RouteStore, resolveUserHome } from "portless";
4
+ import { endpointDirectory } from "../domains/resolve.js";
5
+ import { runProcess } from "./process.js";
6
+ const cli = fileURLToPath(new URL("./cli.js", import.meta.resolve("portless")));
7
+ export function stateDirectory() {
8
+ return process.env.PORTLESS_STATE_DIR || path.join(resolveUserHome(), ".portless");
9
+ }
10
+ export function routeStore() {
11
+ return new RouteStore(stateDirectory());
12
+ }
13
+ export function proxyEnvironment(project) {
14
+ const proxy = project.config.proxy;
15
+ return {
16
+ ...process.env,
17
+ // We invoke our pinned local dependency directly, not through a package
18
+ // downloader. Do not pass the caller's pnpm exec/npx launcher markers.
19
+ npm_command: undefined,
20
+ PNPM_SCRIPT_SRC_DIR: undefined,
21
+ PORTLESS: "1",
22
+ PORTLESS_TLD: (proxy.domains ?? [project.config.domain]).join(","),
23
+ PORTLESS_PORT: String(proxy.port),
24
+ PORTLESS_HTTPS: proxy.https ? "1" : "0",
25
+ PORTLESS_LAN: "0",
26
+ PORTLESS_SYNC_HOSTS: proxy.syncHosts ? "1" : "0",
27
+ PORTLESS_NGROK: "0",
28
+ PORTLESS_TAILSCALE: "0",
29
+ PORTLESS_FUNNEL: "0",
30
+ PORTLESS_APP_PORT: ""
31
+ };
32
+ }
33
+ export async function proxyCommand(project, action, signal) {
34
+ const args = action === "setup"
35
+ ? [
36
+ "proxy",
37
+ "start",
38
+ ...(project.config.proxy.domains ?? [project.config.domain]).flatMap((domain) => ["--tld", domain]),
39
+ "--port",
40
+ String(project.config.proxy.port),
41
+ ...(project.config.proxy.https ? [] : ["--no-tls"])
42
+ ]
43
+ : [action === "status" ? "list" : "doctor"];
44
+ return runProcess([process.execPath, cli, ...args], { cwd: project.root, env: proxyEnvironment(project), signal });
45
+ }
46
+ export async function runEndpoint(project, endpoint, signal, quiet = false) {
47
+ if (process.env.BUILDKIT_ACTIVE) {
48
+ throw new Error("Recursive dev-domains invocation. Configure the underlying server command.");
49
+ }
50
+ await endpointDirectory(project, endpoint);
51
+ const hostnames = (project.config.proxy.domains ?? [project.config.domain]).map((domain) => `${endpoint.name}.${domain}`);
52
+ const conflict = routeStore()
53
+ .loadRoutes()
54
+ .find((route) => hostnames.includes(route.hostname));
55
+ if (conflict) {
56
+ throw new Error(`Domain ${conflict.hostname} is already in use on port ${conflict.port}. Rename the worktree or configure a different endpoint name. The existing server was left running.`);
57
+ }
58
+ const env = proxyEnvironment(project);
59
+ env.BUILDKIT_RUN_CONTEXT = JSON.stringify({
60
+ config: project.config,
61
+ root: project.root,
62
+ worktree: project.worktree,
63
+ service: endpoint.service
64
+ });
65
+ env.BUILDKIT_RUNNER = new URL("./runner.js", import.meta.url).href;
66
+ // Portless 0.15.8 joins Windows arguments through cmd.exe. Keep user input in the
67
+ // environment and pass only a fixed bootstrap expression through that shell.
68
+ const expression = "import(process.env.BUILDKIT_RUNNER)";
69
+ const args = [process.execPath, cli, "--name", endpoint.name, "node", "-e", expression];
70
+ for (let attempt = 0; attempt < 3; attempt++) {
71
+ let owner;
72
+ try {
73
+ const result = await runProcess(args, {
74
+ cwd: endpoint.cwd,
75
+ env,
76
+ signal,
77
+ quiet,
78
+ onSpawn: (pid) => {
79
+ owner = pid;
80
+ }
81
+ });
82
+ if (signal?.aborted ||
83
+ result.code === 0 ||
84
+ !/EADDRINUSE|address already in use/i.test(result.stderr) ||
85
+ attempt === 2) {
86
+ return result.code;
87
+ }
88
+ }
89
+ finally {
90
+ // Windows termination may skip Portless's JS exit handler. Owner checks
91
+ // prevent this cleanup from removing a route acquired by another process.
92
+ if (owner) {
93
+ const store = routeStore();
94
+ for (const route of store.loadRoutesRaw()) {
95
+ if (route.pid === owner) {
96
+ store.removeRoute(route.hostname, owner);
97
+ }
98
+ }
99
+ }
100
+ }
101
+ }
102
+ return 1;
103
+ }
@@ -0,0 +1,13 @@
1
+ /** Own only the process tree we started. Never stop a shared proxy. */
2
+ export declare function runProcess(command: string[], options: {
3
+ cwd: string;
4
+ env?: NodeJS.ProcessEnv;
5
+ signal?: AbortSignal;
6
+ onSpawn?: (pid: number) => void;
7
+ quiet?: boolean;
8
+ }): Promise<{
9
+ code: number;
10
+ stderr: string;
11
+ pid?: number;
12
+ }>;
13
+ export declare function withSignals<T>(operation: (signal: AbortSignal) => Promise<T>): Promise<T>;
@@ -0,0 +1,101 @@
1
+ import { execFile } from "node:child_process";
2
+ import { promisify } from "node:util";
3
+ import spawn from "cross-spawn";
4
+ const exec = promisify(execFile);
5
+ /** Own only the process tree we started. Never stop a shared proxy. */
6
+ export async function runProcess(command, options) {
7
+ const [executable, ...args] = command;
8
+ if (!executable) {
9
+ throw new Error("A command is required");
10
+ }
11
+ options.signal?.throwIfAborted();
12
+ return new Promise((resolve, reject) => {
13
+ const child = spawn(executable, args, {
14
+ cwd: options.cwd,
15
+ env: options.env,
16
+ stdio: ["inherit", "pipe", "pipe"],
17
+ detached: process.platform !== "win32",
18
+ windowsHide: true
19
+ });
20
+ let stderr = "";
21
+ let timer;
22
+ let isDone = false;
23
+ const kill = async (force) => {
24
+ if (!child.pid || isDone) {
25
+ return;
26
+ }
27
+ try {
28
+ if (process.platform === "win32") {
29
+ await exec("taskkill", ["/PID", String(child.pid), "/T", "/F"], { windowsHide: true, timeout: 5000 });
30
+ }
31
+ else {
32
+ process.kill(-child.pid, force ? "SIGKILL" : "SIGTERM");
33
+ }
34
+ }
35
+ catch (error) {
36
+ if (!isDone &&
37
+ child.exitCode === null &&
38
+ !(error instanceof Error && "code" in error && error.code === "ESRCH")) {
39
+ child.kill("SIGKILL");
40
+ }
41
+ }
42
+ };
43
+ const abort = () => {
44
+ void kill(false);
45
+ timer ??= setTimeout(() => {
46
+ void kill(true);
47
+ }, 5000);
48
+ timer.unref();
49
+ };
50
+ const finish = () => {
51
+ isDone = true;
52
+ if (timer) {
53
+ clearTimeout(timer);
54
+ }
55
+ options.signal?.removeEventListener("abort", abort);
56
+ };
57
+ child.stdout?.on("data", (chunk) => {
58
+ if (!options.quiet) {
59
+ process.stdout.write(chunk);
60
+ }
61
+ });
62
+ child.stderr?.on("data", (chunk) => {
63
+ stderr = (stderr + chunk.toString()).slice(-8192);
64
+ if (!options.quiet) {
65
+ process.stderr.write(chunk);
66
+ }
67
+ });
68
+ child.once("spawn", () => {
69
+ if (child.pid) {
70
+ options.onSpawn?.(child.pid);
71
+ }
72
+ });
73
+ child.once("error", (error) => {
74
+ finish();
75
+ reject(new Error(`Cannot start ${executable}: ${error.message}`, { cause: error }));
76
+ });
77
+ child.once("close", (code, signal) => {
78
+ finish();
79
+ resolve({ code: code ?? (signal === "SIGINT" ? 130 : 143), stderr, pid: child.pid });
80
+ });
81
+ options.signal?.addEventListener("abort", abort, { once: true });
82
+ if (options.signal?.aborted) {
83
+ abort();
84
+ }
85
+ });
86
+ }
87
+ export async function withSignals(operation) {
88
+ const controller = new AbortController();
89
+ const abort = () => controller.abort();
90
+ process.on("SIGINT", abort);
91
+ process.on("SIGTERM", abort);
92
+ process.on("SIGHUP", abort);
93
+ try {
94
+ return await operation(controller.signal);
95
+ }
96
+ finally {
97
+ process.off("SIGINT", abort);
98
+ process.off("SIGTERM", abort);
99
+ process.off("SIGHUP", abort);
100
+ }
101
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,48 @@
1
+ import { z } from "zod";
2
+ import { configSchema } from "../config/schema.js";
3
+ import { resolveEndpoints } from "../domains/resolve.js";
4
+ import { serverCommand, serverEnvironment } from "./command.js";
5
+ import { routeStore } from "./portless.js";
6
+ import { runProcess, withSignals } from "./process.js";
7
+ const contextSchema = z.object({
8
+ config: configSchema,
9
+ root: z.string(),
10
+ worktree: z.string().nullable(),
11
+ service: z.string()
12
+ });
13
+ try {
14
+ const context = contextSchema.parse(JSON.parse(process.env.BUILDKIT_RUN_CONTEXT || "null"));
15
+ const endpoint = resolveEndpoints({ ...context, file: undefined }).find((candidate) => candidate.service === context.service);
16
+ if (!endpoint) {
17
+ throw new Error("Endpoint disappeared from the runtime context");
18
+ }
19
+ const actual = new URL(process.env.PORTLESS_URL || "");
20
+ const domains = context.config.proxy.domains ?? [context.config.domain];
21
+ const actualPort = Number(actual.port || (actual.protocol === "https:" ? 443 : 80));
22
+ if (!domains.some((domain) => actual.hostname === `${endpoint.name}.${domain}`) ||
23
+ actualPort !== context.config.proxy.port ||
24
+ actual.protocol !== (context.config.proxy.https ? "https:" : "http:")) {
25
+ throw new Error("The running Portless proxy has different settings. Coordinate its domains, port, and TLS configuration before running this endpoint.");
26
+ }
27
+ const port = z.coerce.number().int().min(1).max(65535).parse(process.env.PORT);
28
+ // Registrations are written in place by Portless. Concurrent writers can
29
+ // briefly produce an empty read; wait for our exact route to settle.
30
+ const deadline = Date.now() + 2000;
31
+ while (!routeStore()
32
+ .loadRoutes()
33
+ .some((route) => route.hostname === endpoint.hostname && route.port === port)) {
34
+ if (Date.now() >= deadline) {
35
+ throw new Error(`The running proxy did not register ${endpoint.hostname}. Align proxy.domains across your projects.`);
36
+ }
37
+ await new Promise((resolve) => setTimeout(resolve, 50));
38
+ }
39
+ const command = await serverCommand(endpoint.endpoint, context.config.packageManager, endpoint.cwd, endpoint.variables, port);
40
+ const env = serverEnvironment(endpoint, port, process.env);
41
+ delete env.BUILDKIT_RUN_CONTEXT;
42
+ delete env.BUILDKIT_RUNNER;
43
+ process.exitCode = (await withSignals((signal) => runProcess(command, { cwd: endpoint.cwd, env, signal }))).code;
44
+ }
45
+ catch (error) {
46
+ process.stderr.write(`${error instanceof Error ? error.message : String(error)}\n`);
47
+ process.exitCode = 1;
48
+ }
@@ -0,0 +1,10 @@
1
+ /** Loopback-only, POST-only gateway. Bodies are opaque and never logged or persisted. */
2
+ export declare function startGateway(options: {
3
+ paths: string[];
4
+ hostname: string;
5
+ target: () => number | undefined;
6
+ maxBytes?: number;
7
+ }): Promise<{
8
+ url: string;
9
+ close: () => Promise<void>;
10
+ }>;
@@ -0,0 +1,99 @@
1
+ import { createServer, request } from "node:http";
2
+ import { pipeline } from "node:stream";
3
+ function headersForUpstream(headers, host) {
4
+ const clean = { ...headers, host };
5
+ const excluded = [
6
+ "connection",
7
+ "keep-alive",
8
+ "proxy-authenticate",
9
+ "proxy-authorization",
10
+ "te",
11
+ "trailer",
12
+ "transfer-encoding",
13
+ "upgrade",
14
+ "forwarded",
15
+ "x-forwarded-for",
16
+ "x-forwarded-host",
17
+ ...(headers.connection?.split(",").map((name) => name.trim().toLowerCase()) ?? [])
18
+ ];
19
+ for (const header of excluded) {
20
+ delete clean[header];
21
+ }
22
+ return clean;
23
+ }
24
+ /** Loopback-only, POST-only gateway. Bodies are opaque and never logged or persisted. */
25
+ export async function startGateway(options) {
26
+ const server = createServer(async (req, res) => {
27
+ const rawPath = req.url?.split("?")[0] || "";
28
+ if (req.method !== "POST" || !options.paths.includes(rawPath)) {
29
+ res.writeHead(404).end();
30
+ return;
31
+ }
32
+ const port = options.target();
33
+ if (!port) {
34
+ res.writeHead(503).end("Start the local endpoint first");
35
+ return;
36
+ }
37
+ const chunks = [];
38
+ let size = 0;
39
+ try {
40
+ for await (const chunk of req) {
41
+ const buffer = Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk);
42
+ size += buffer.length;
43
+ if (size > (options.maxBytes ?? 1048576)) {
44
+ res.writeHead(413).end();
45
+ return;
46
+ }
47
+ chunks.push(buffer);
48
+ }
49
+ const body = Buffer.concat(chunks);
50
+ const upstream = request({
51
+ host: "127.0.0.1",
52
+ port,
53
+ path: req.url,
54
+ method: "POST",
55
+ headers: { ...headersForUpstream(req.headers, options.hostname), "content-length": body.length },
56
+ timeout: 15000
57
+ }, (response) => {
58
+ const headers = headersForUpstream(response.headers, options.hostname);
59
+ delete headers.host;
60
+ res.writeHead(response.statusCode || 502, headers);
61
+ pipeline(response, res, () => {
62
+ upstream.destroy();
63
+ });
64
+ });
65
+ upstream.on("timeout", () => upstream.destroy(new Error("Webhook target timed out")));
66
+ upstream.on("error", () => {
67
+ if (!res.headersSent) {
68
+ res.writeHead(502);
69
+ }
70
+ res.end();
71
+ });
72
+ res.on("close", () => upstream.destroy());
73
+ upstream.end(body);
74
+ }
75
+ catch {
76
+ if (!res.headersSent) {
77
+ res.writeHead(400);
78
+ }
79
+ res.end();
80
+ }
81
+ });
82
+ server.requestTimeout = 15000;
83
+ server.headersTimeout = 10000;
84
+ await new Promise((resolve, reject) => {
85
+ server.once("error", reject);
86
+ server.listen(0, "127.0.0.1", resolve);
87
+ });
88
+ const address = server.address();
89
+ if (!address || typeof address === "string") {
90
+ throw new Error("Cannot resolve webhook gateway address");
91
+ }
92
+ return {
93
+ url: `http://127.0.0.1:${address.port}`,
94
+ close: async () => {
95
+ server.closeAllConnections();
96
+ await new Promise((resolve, reject) => server.close((error) => (error ? reject(error) : resolve())));
97
+ }
98
+ };
99
+ }
@@ -0,0 +1,2 @@
1
+ import { type Project, type ResolvedEndpoint } from "../domains/resolve.js";
2
+ export declare function runTunnel(project: Project, endpoint: ResolvedEndpoint, signal?: AbortSignal): Promise<number>;
@@ -0,0 +1,27 @@
1
+ import { interpolate } from "../domains/resolve.js";
2
+ import { routeStore } from "../runtime/portless.js";
3
+ import { runProcess } from "../runtime/process.js";
4
+ import { startGateway } from "./gateway.js";
5
+ export async function runTunnel(project, endpoint, signal) {
6
+ const tunnel = endpoint.endpoint.tunnel;
7
+ if (!tunnel) {
8
+ throw new Error(`No tunnel configured for ${endpoint.service}. Add an explicit command and allowed paths.`);
9
+ }
10
+ if (!tunnel.command.some((arg) => arg.includes("{url}"))) {
11
+ throw new Error("Tunnel command must use {url} to target the restricted gateway");
12
+ }
13
+ const target = () => routeStore()
14
+ .loadRoutes()
15
+ .find((route) => route.hostname === endpoint.hostname)?.port;
16
+ if (!target()) {
17
+ throw new Error(`Start ${endpoint.service} before opening its tunnel`);
18
+ }
19
+ const gateway = await startGateway({ paths: tunnel.paths, hostname: endpoint.hostname, target });
20
+ try {
21
+ process.stdout.write(`Exposing POST ${tunnel.paths.join(", ")} for ${endpoint.origin}\n${tunnel.publicUrl ? `Public origin: ${tunnel.publicUrl}\n` : "The tunnel provider will print its public URL.\n"}`);
22
+ return (await runProcess(tunnel.command.map((arg) => interpolate(arg, { ...endpoint.variables, url: gateway.url })), { cwd: project.root, signal })).code;
23
+ }
24
+ finally {
25
+ await gateway.close();
26
+ }
27
+ }
package/package.json CHANGED
@@ -1,6 +1,67 @@
1
1
  {
2
2
  "name": "@buildkitgg/dev-domains",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "0.0.1",
4
+ "publishConfig": {
5
+ "access": "public"
6
+ },
7
+ "license": "MIT",
8
+ "description": "Worktree-aware development domains built on Portless",
9
+ "dependencies": {
10
+ "@clack/prompts": "1.8.1",
11
+ "c12": "^3.3.4",
12
+ "citty": "0.2.2",
13
+ "cross-spawn": "^7.0.6",
14
+ "package-manager-detector": "1.9.0",
15
+ "portless": "0.15.8",
16
+ "zod": "4.6.7"
17
+ },
18
+ "devDependencies": {
19
+ "@repo/oxlint-config": "0.0.0",
20
+ "@repo/typescript-config": "0.0.0",
21
+ "@types/cross-spawn": "^6.0.6",
22
+ "@types/node": "24.13.2",
23
+ "@vitest/coverage-v8": "4.1.11",
24
+ "typescript": "7.0.1-rc",
25
+ "vitest": "4.1.11"
26
+ },
27
+ "type": "module",
28
+ "engines": {
29
+ "node": ">=24"
30
+ },
31
+ "bin": {
32
+ "dev-domains": "./dist/cli/main.js"
33
+ },
34
+ "files": [
35
+ "dist/**/*.js",
36
+ "dist/**/*.d.ts",
37
+ "README.md",
38
+ "LICENSE"
39
+ ],
40
+ "exports": {
41
+ ".": {
42
+ "types": "./dist/config/schema.d.ts",
43
+ "import": "./dist/config/schema.js"
44
+ },
45
+ "./node": {
46
+ "types": "./dist/node.d.ts",
47
+ "import": "./dist/node.js"
48
+ },
49
+ "./playwright": {
50
+ "types": "./dist/playwright.d.ts",
51
+ "import": "./dist/playwright.js"
52
+ }
53
+ },
54
+ "repository": {
55
+ "type": "git",
56
+ "url": "https://github.com/AndrewCraswell/buildkit.git",
57
+ "directory": "packages/dev-domains"
58
+ },
59
+ "scripts": {
60
+ "build": "tsc -p tsconfig.build.json",
61
+ "check:types": "pnpm build && tsc --noEmit",
62
+ "lint": "oxlint --max-warnings=0",
63
+ "test": "vitest run",
64
+ "test:coverage": "vitest run --coverage",
65
+ "test:integration": "pnpm build && vitest run --config vitest.integration.config.ts"
66
+ }
6
67
  }