@lightningai/sdk 2026.7.9 → 2026.7.22
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 +6 -1
- package/package.json +41 -40
package/README.md
CHANGED
|
@@ -121,8 +121,13 @@ const pty = await sandbox.process.createPty({
|
|
|
121
121
|
onData: writeToStdout,
|
|
122
122
|
});
|
|
123
123
|
|
|
124
|
+
await pty.waitForConnection();
|
|
124
125
|
await pty.sendInput("python --version\n");
|
|
125
|
-
|
|
126
|
+
|
|
127
|
+
// A PTY is backed by a persistent `screen` session, so `exit` alone leaves the
|
|
128
|
+
// attach socket open and `pty.wait()` would block forever. Detach explicitly
|
|
129
|
+
// (or use `sandbox.process.killPtySession(...)` to also kill the screen session).
|
|
130
|
+
await pty.disconnect();
|
|
126
131
|
await pty.wait();
|
|
127
132
|
|
|
128
133
|
await sandbox.delete();
|
package/package.json
CHANGED
|
@@ -1,43 +1,44 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
17
|
-
},
|
|
18
|
-
"files": [
|
|
19
|
-
"dist"
|
|
20
|
-
],
|
|
21
|
-
"scripts": {
|
|
22
|
-
"clean": "rm -rf dist",
|
|
23
|
-
"build": "tsc",
|
|
24
|
-
"prepublishOnly": "npm run clean && npm run build",
|
|
25
|
-
"test": "node --test --import tsx tests/config.test.ts tests/sandbox.test.ts tests/filesystem.test.ts tests/pty.test.ts tests/persistence.test.ts"
|
|
26
|
-
},
|
|
27
|
-
"dependencies": {
|
|
28
|
-
"axios": "^1.7.0"
|
|
29
|
-
},
|
|
30
|
-
"devDependencies": {
|
|
31
|
-
"@types/node": "^22.19.18",
|
|
32
|
-
"tsx": "^4.0.0",
|
|
33
|
-
"typescript": "^5.4.0"
|
|
34
|
-
},
|
|
35
|
-
"publishConfig": {
|
|
36
|
-
"access": "public"
|
|
37
|
-
},
|
|
38
|
-
"repository": {
|
|
39
|
-
"type": "git",
|
|
40
|
-
"url": "https://github.com/Lightning-AI/sdk.git",
|
|
41
|
-
"directory": "js"
|
|
2
|
+
"name": "@lightningai/sdk",
|
|
3
|
+
"version": "2026.7.22",
|
|
4
|
+
"description": "Lightning AI Sandbox SDK — create and manage sandboxes, run commands, read/write files",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "Apache-2.0",
|
|
7
|
+
"engines": {
|
|
8
|
+
"node": ">=22.0.0"
|
|
9
|
+
},
|
|
10
|
+
"main": "dist/index.js",
|
|
11
|
+
"types": "dist/index.d.ts",
|
|
12
|
+
"exports": {
|
|
13
|
+
".": {
|
|
14
|
+
"types": "./dist/index.d.ts",
|
|
15
|
+
"default": "./dist/index.js"
|
|
42
16
|
}
|
|
17
|
+
},
|
|
18
|
+
"files": [
|
|
19
|
+
"dist"
|
|
20
|
+
],
|
|
21
|
+
"scripts": {
|
|
22
|
+
"clean": "rm -rf dist",
|
|
23
|
+
"build": "tsc",
|
|
24
|
+
"pack:scm": "node scripts/scm-package.mjs",
|
|
25
|
+
"prepublishOnly": "npm run clean && npm run build",
|
|
26
|
+
"test": "node --test --import tsx tests/config.test.ts tests/sandbox.test.ts tests/filesystem.test.ts tests/pty.test.ts tests/persistence.test.ts tests/scm-version.test.ts tests/scm-package.test.ts"
|
|
27
|
+
},
|
|
28
|
+
"dependencies": {
|
|
29
|
+
"axios": "^1.7.0"
|
|
30
|
+
},
|
|
31
|
+
"devDependencies": {
|
|
32
|
+
"@types/node": "^22.19.18",
|
|
33
|
+
"tsx": "^4.0.0",
|
|
34
|
+
"typescript": "^5.4.0"
|
|
35
|
+
},
|
|
36
|
+
"publishConfig": {
|
|
37
|
+
"access": "public"
|
|
38
|
+
},
|
|
39
|
+
"repository": {
|
|
40
|
+
"type": "git",
|
|
41
|
+
"url": "https://github.com/Lightning-AI/sdk.git",
|
|
42
|
+
"directory": "js"
|
|
43
|
+
}
|
|
43
44
|
}
|