Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions packages/app/src/core/bootstrap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export interface BootstrapClaim {
readonly projectSlug: string
readonly controlPlaneUrl: string
readonly previewOrigin: string
readonly telegramMiniAppUrl?: string
readonly deviceSecret: string
readonly mcpApiKey: string
readonly localPort: number
Expand Down Expand Up @@ -193,6 +194,7 @@ export const buildGeneratedFiles = (
projectName: context.projectName,
controlPlaneUrl: claim.controlPlaneUrl,
previewOrigin: claim.previewOrigin,
...(claim.telegramMiniAppUrl ? { telegramMiniAppUrl: claim.telegramMiniAppUrl } : {}),
previewPath,
previewHost,
localPort: claim.localPort,
Expand Down
2 changes: 2 additions & 0 deletions packages/app/src/shell/bootstrap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,7 @@ const parseClaimResponse = (
readString(input, "launchUrl") ??
readString(input, "staticAssetsBaseUrl") ??
readString(input, "url")
const telegramMiniAppUrl = readString(input, "telegramMiniAppUrl")
const deviceSecret =
readString(input, "deviceSecret") ??
readString(input, "deviceToken") ??
Expand Down Expand Up @@ -422,6 +423,7 @@ const parseClaimResponse = (
projectSlug,
controlPlaneUrl,
previewOrigin,
...(telegramMiniAppUrl ? { telegramMiniAppUrl } : {}),
deviceSecret,
mcpApiKey,
localPort,
Expand Down
2 changes: 2 additions & 0 deletions packages/app/tests/bootstrap.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ describe("buildGeneratedFiles", () => {
projectSlug: "demo-project",
controlPlaneUrl: "https://api.example.com",
previewOrigin: "https://api.example.com/preview/demo-project",
telegramMiniAppUrl: "https://t.me/TMASpawnerBot/tma?startapp=demo-project",
deviceSecret: "secret_123",
mcpApiKey: "mcp_key_123",
localPort: 3000,
Expand All @@ -108,6 +109,7 @@ describe("buildGeneratedFiles", () => {
expect(fileMap.has(".mcp.json")).toBe(true)
expect(fileMap.get("spawndock.config.json")).toContain("\"mcpServerUrl\": \"https://api.example.com/mcp/sse\"")
expect(fileMap.get("spawndock.config.json")).toContain("\"mcpApiKey\": \"mcp_key_123\"")
expect(fileMap.get("spawndock.config.json")).toContain("\"telegramMiniAppUrl\": \"https://t.me/TMASpawnerBot/tma?startapp=demo-project\"")
expect(fileMap.get("opencode.json")).toContain("./spawndock/mcp.mjs")
expect(fileMap.get(".mcp.json")).toContain("./spawndock/mcp.mjs")
expect(fileMap.get("public/tonconnect-manifest.json")).toContain("\"url\": \"https://api.example.com/preview/demo-project\"")
Expand Down