Skip to content

Commit 75d1512

Browse files
first version
1 parent a4bca66 commit 75d1512

File tree

8 files changed

+242
-298
lines changed

8 files changed

+242
-298
lines changed

esbuild.cjs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,7 @@ Promise.all([
9797
js: `#!/usr/bin/env node\n\n`,
9898
},
9999
// ORA is an ESM module so we have to include it in the build
100-
external: [...nodeExternals, "@codesandbox/sdk"].filter(
101-
(mod) => mod !== "ora"
102-
),
100+
external: [...nodeExternals, "@codesandbox/sdk", "isbinaryfile"],
103101
}),
104102
]).catch(() => {
105103
process.exit(1);

package-lock.json

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@
7878
"crypto-browserify": "^3.12.1",
7979
"esbuild": "^0.25.0",
8080
"ignore": "^6.0.2",
81-
"isbinaryfile": "^5.0.4",
8281
"os-browserify": "^0.3.0",
8382
"path-browserify": "^1.0.1",
8483
"prettier": "^2.2.1",
@@ -92,6 +91,7 @@
9291
"dependencies": {
9392
"@inkjs/ui": "^2.0.0",
9493
"@tanstack/react-query": "^5.76.1",
94+
"isbinaryfile": "^5.0.4",
9595
"ink": "^5.2.1",
9696
"react": "^18.3.1",
9797
"@codesandbox/pitcher-protocol": "0.360.4",

src/bin/main.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,20 @@ import { buildCommand } from "./commands/build";
66
import { sandboxesCommand } from "./commands/sandbox";
77
import { previewHostsCommand } from "./commands/previewHosts";
88
import { hostTokensCommand } from "./commands/hostTokens";
9-
import { CodeSandbox } from "@codesandbox/sdk";
109
import { Dashboard } from "./ui/Dashboard";
1110
import React from "react";
1211
import { SDKProvider } from "./ui/sdkContext";
1312
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
1413

1514
if (process.argv.length === 2) {
1615
// Clear the screen before rendering the dashboard
17-
process.stdout.write('\x1Bc');
18-
19-
const sdk = new CodeSandbox();
16+
process.stdout.write("\x1Bc");
17+
2018
const queryClient = new QueryClient();
19+
2120
render(
2221
<QueryClientProvider client={queryClient}>
23-
<SDKProvider value={sdk}>
22+
<SDKProvider>
2423
<Dashboard />
2524
</SDKProvider>
2625
</QueryClientProvider>,

0 commit comments

Comments
 (0)