Skip to content

Commit 156fd63

Browse files
committed
adjusting dockerfile and config imports
1 parent 0026ccc commit 156fd63

File tree

7 files changed

+14
-7
lines changed

7 files changed

+14
-7
lines changed

Dockerfile

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,23 @@ COPY package.json pnpm-lock.yaml tsconfig.json ./
88
# Copy source code
99
COPY src ./src
1010

11+
# Copy config files
12+
COPY config.d.ts index.d.ts ./
13+
1114
# Install dependencies and build
1215
RUN corepack enable && pnpm install --frozen-lockfile && pnpm build
1316

1417
# ----- Production Stage -----
1518
FROM node:lts-alpine
1619
WORKDIR /app
1720

21+
# Copy package.json and install production dependencies
22+
COPY package.json pnpm-lock.yaml ./
23+
RUN corepack enable && pnpm install --prod --frozen-lockfile --ignore-scripts
24+
1825
# Copy built artifacts and required files
1926
COPY --from=builder /app/dist ./dist
20-
COPY index.js config.d.ts index.d.ts cli.js ./
27+
COPY index.js config.d.ts index.d.ts cli.js ./
2128

2229
# Expose HTTP port
2330
EXPOSE 8080

src/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { Cookie } from "playwright-core";
2-
import type { Config } from "../config.js";
2+
import type { Config } from "../config.d.ts";
33
import { AvailableModelSchema } from "@browserbasehq/stagehand";
44

55
export type ToolCapability = "core" | string;

src/context.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { Stagehand } from "@browserbasehq/stagehand";
22
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
3-
import type { Config } from "../config.js";
3+
import type { Config } from "../config.d.ts";
44
import { CallToolResult } from "@modelcontextprotocol/sdk/types.js";
55
import { listResources, readResource } from "./mcp/resources.js";
66
import { getSession, defaultSessionId } from "./sessionManager.js";

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { z } from "zod";
66
import type { MCPToolsArray } from "./types/types.js";
77

88
import { Context } from "./context.js";
9-
import type { Config } from "../config.js";
9+
import type { Config } from "../config.d.ts";
1010
import { TOOLS } from "./tools/index.js";
1111
import { AvailableModelSchema } from "@browserbasehq/stagehand";
1212
import { PROMPTS, getPrompt } from "./mcp/prompts.js";

src/sessionManager.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Page } from "playwright-core";
22
import { BrowserContext } from "@browserbasehq/stagehand";
3-
import type { Config } from "../config.js";
3+
import type { Config } from "../config.d.ts";
44
import type { Cookie } from "playwright-core";
55
import { createStagehandInstance } from "./stagehandStore.js";
66
import type { BrowserSession } from "./types/types.js";

src/stagehandStore.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { randomUUID } from "crypto";
22
import { Stagehand, AvailableModel } from "@browserbasehq/stagehand";
33
import { Page } from "playwright-core";
44
import { StagehandSession, CreateSessionParams } from "./types/types.js";
5-
import type { Config } from "../config.js";
5+
import type { Config } from "../config.d.ts";
66

77
// Store for all active sessions
88
const store = new Map<string, StagehandSession>();

src/transport.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import crypto from "node:crypto";
55
import { ServerList } from "./server.js";
66
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
77
import { StreamableHTTPServerTransport } from "@modelcontextprotocol/sdk/server/streamableHttp.js";
8-
import type { Config } from "../config.js";
8+
import type { Config } from "../config.d.ts";
99

1010
export async function startStdioTransport(
1111
serverList: ServerList,

0 commit comments

Comments
 (0)