@saikrishnaambeti/docker-sandbox 1.0.0 → 1.2.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.
- package/README.md +8 -17
- package/dist/cli/index.js +3077 -868
- package/dist/{index-rff3tvyv.js → index-pyanjjwn.js} +2 -2
- package/dist/index.js +1 -2
- package/dist/sdk/index.js +1 -2
- package/dist/server/index.d.ts +1 -1
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js +3068 -860
- package/package.json +8 -5
package/README.md
CHANGED
|
@@ -16,29 +16,20 @@ A Docker-based sandbox for running isolated code execution environments. Start a
|
|
|
16
16
|
|
|
17
17
|
```bash
|
|
18
18
|
# Using npx (no installation required)
|
|
19
|
-
npx docker-sandbox
|
|
20
|
-
|
|
19
|
+
npx @saikrishnaambeti/docker-sandbox
|
|
21
20
|
# Or with a custom port
|
|
22
|
-
npx docker-sandbox --port 8080
|
|
21
|
+
npx @saikrishnaambeti/docker-sandbox --port 8080
|
|
23
22
|
```
|
|
24
23
|
|
|
25
24
|
### Install the SDK
|
|
26
25
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
npm install docker-sandbox
|
|
30
|
-
|
|
31
|
-
# Using bun
|
|
32
|
-
bun add docker-sandbox
|
|
33
|
-
|
|
34
|
-
# Using yarn
|
|
35
|
-
yarn add docker-sandbox
|
|
36
|
-
```
|
|
26
|
+
````bash
|
|
27
|
+
bun add @saikrishnaambeti/docker-sandbox```
|
|
37
28
|
|
|
38
29
|
### Use the SDK
|
|
39
30
|
|
|
40
31
|
```typescript
|
|
41
|
-
import { Sandbox, createLogStream } from "docker-sandbox";
|
|
32
|
+
import { Sandbox, createLogStream } from "@saikrishnaambeti/docker-sandbox";
|
|
42
33
|
|
|
43
34
|
async function main() {
|
|
44
35
|
// Create a sandbox
|
|
@@ -75,13 +66,13 @@ async function main() {
|
|
|
75
66
|
}
|
|
76
67
|
|
|
77
68
|
main();
|
|
78
|
-
|
|
69
|
+
````
|
|
79
70
|
|
|
80
71
|
## CLI Options
|
|
81
72
|
|
|
82
73
|
```
|
|
83
74
|
Usage:
|
|
84
|
-
docker-sandbox [options]
|
|
75
|
+
@saikrishnaambeti/docker-sandbox [options]
|
|
85
76
|
|
|
86
77
|
Options:
|
|
87
78
|
-p, --port <port> Port to run the server on (default: 4000)
|
|
@@ -143,7 +134,7 @@ Stop and remove the sandbox container.
|
|
|
143
134
|
Helper to create a `WritableStream` from Node.js `stdout`/`stderr`.
|
|
144
135
|
|
|
145
136
|
```typescript
|
|
146
|
-
import { createLogStream } from "docker-sandbox";
|
|
137
|
+
import { createLogStream } from "@saikrishnaambeti/docker-sandbox";
|
|
147
138
|
|
|
148
139
|
await sandbox.runCommand({
|
|
149
140
|
cmd: "echo",
|