@daytonaio/sdk 0.175.0 → 0.178.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/cjs/CodeInterpreter.d.ts +3 -2
- package/cjs/CodeInterpreter.js.map +1 -1
- package/cjs/ComputerUse.d.ts +104 -2
- package/cjs/ComputerUse.js +851 -763
- package/cjs/ComputerUse.js.map +1 -1
- package/cjs/Daytona.d.ts +4 -3
- package/cjs/Daytona.js +429 -443
- package/cjs/Daytona.js.map +1 -1
- package/cjs/FileSystem.d.ts +2 -2
- package/cjs/FileSystem.js +491 -521
- package/cjs/FileSystem.js.map +1 -1
- package/cjs/Git.d.ts +2 -1
- package/cjs/Git.js +287 -310
- package/cjs/Git.js.map +1 -1
- package/cjs/LspServer.d.ts +2 -1
- package/cjs/LspServer.js +209 -226
- package/cjs/LspServer.js.map +1 -1
- package/cjs/ObjectStorage.js +170 -166
- package/cjs/ObjectStorage.js.map +1 -1
- package/cjs/Process.d.ts +4 -3
- package/cjs/Process.js +562 -600
- package/cjs/Process.js.map +1 -1
- package/cjs/PtyHandle.d.ts +2 -2
- package/cjs/PtyHandle.js +327 -338
- package/cjs/PtyHandle.js.map +1 -1
- package/cjs/Sandbox.d.ts +4 -3
- package/cjs/Sandbox.js +756 -821
- package/cjs/Sandbox.js.map +1 -1
- package/cjs/Snapshot.d.ts +3 -2
- package/cjs/Snapshot.js +203 -213
- package/cjs/Snapshot.js.map +1 -1
- package/cjs/Volume.d.ts +2 -1
- package/cjs/Volume.js +90 -92
- package/cjs/Volume.js.map +1 -1
- package/cjs/errors/DaytonaError.d.ts +2 -1
- package/cjs/errors/DaytonaError.js.map +1 -1
- package/cjs/index.d.ts +2 -2
- package/cjs/index.js +2 -1
- package/cjs/index.js.map +1 -1
- package/cjs/types/CodeInterpreter.d.ts +1 -1
- package/cjs/utils/Binary.js +14 -2
- package/cjs/utils/Binary.js.map +1 -1
- package/cjs/utils/otel.decorator.d.ts +7 -8
- package/cjs/utils/otel.decorator.js +24 -30
- package/cjs/utils/otel.decorator.js.map +1 -1
- package/esm/CodeInterpreter.d.ts +3 -2
- package/esm/CodeInterpreter.js.map +1 -1
- package/esm/ComputerUse.d.ts +104 -2
- package/esm/ComputerUse.js +857 -763
- package/esm/ComputerUse.js.map +1 -1
- package/esm/Daytona.d.ts +4 -3
- package/esm/Daytona.js +431 -444
- package/esm/Daytona.js.map +1 -1
- package/esm/FileSystem.d.ts +2 -2
- package/esm/FileSystem.js +493 -522
- package/esm/FileSystem.js.map +1 -1
- package/esm/Git.d.ts +2 -1
- package/esm/Git.js +289 -311
- package/esm/Git.js.map +1 -1
- package/esm/LspServer.d.ts +2 -1
- package/esm/LspServer.js +211 -227
- package/esm/LspServer.js.map +1 -1
- package/esm/ObjectStorage.js +172 -167
- package/esm/ObjectStorage.js.map +1 -1
- package/esm/Process.d.ts +4 -3
- package/esm/Process.js +564 -601
- package/esm/Process.js.map +1 -1
- package/esm/PtyHandle.d.ts +2 -2
- package/esm/PtyHandle.js +329 -339
- package/esm/PtyHandle.js.map +1 -1
- package/esm/Sandbox.d.ts +4 -3
- package/esm/Sandbox.js +759 -823
- package/esm/Sandbox.js.map +1 -1
- package/esm/Snapshot.d.ts +3 -2
- package/esm/Snapshot.js +206 -215
- package/esm/Snapshot.js.map +1 -1
- package/esm/Volume.d.ts +2 -1
- package/esm/Volume.js +92 -93
- package/esm/Volume.js.map +1 -1
- package/esm/errors/DaytonaError.d.ts +2 -1
- package/esm/errors/DaytonaError.js.map +1 -1
- package/esm/index.d.ts +2 -2
- package/esm/index.js +1 -1
- package/esm/index.js.map +1 -1
- package/esm/types/CodeInterpreter.d.ts +1 -1
- package/esm/utils/Binary.js +14 -2
- package/esm/utils/Binary.js.map +1 -1
- package/esm/utils/otel.decorator.d.ts +7 -8
- package/esm/utils/otel.decorator.js +26 -32
- package/esm/utils/otel.decorator.js.map +1 -1
- package/package.json +3 -3
package/cjs/ObjectStorage.js
CHANGED
|
@@ -19,181 +19,185 @@ const otel_decorator_1 = require("./utils/otel.decorator");
|
|
|
19
19
|
* @class
|
|
20
20
|
* @param {ObjectStorageConfig} config - The configuration for the object storage service.
|
|
21
21
|
*/
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
accessKeyId: config.accessKeyId,
|
|
32
|
-
secretAccessKey: config.secretAccessKey,
|
|
33
|
-
sessionToken: config.sessionToken,
|
|
34
|
-
},
|
|
35
|
-
forcePathStyle: true,
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* Upload a file or directory to object storage.
|
|
40
|
-
*
|
|
41
|
-
* @param {string} path - The path to the file or directory to upload.
|
|
42
|
-
* @param {string} organizationId - The organization ID to use for the upload.
|
|
43
|
-
* @param {string} archiveBasePath - The base path to use for the archive.
|
|
44
|
-
* @returns {Promise<string>} The hash of the uploaded file or directory.
|
|
45
|
-
*/
|
|
46
|
-
async upload(path, organizationId, archiveBasePath) {
|
|
47
|
-
const fs = await (0, Import_1.dynamicImport)('fs', '"upload" is not supported: ');
|
|
48
|
-
if (!fs.existsSync(path)) {
|
|
49
|
-
const errMsg = `Path does not exist: ${path}`;
|
|
50
|
-
throw new DaytonaError_1.DaytonaNotFoundError(errMsg);
|
|
22
|
+
let ObjectStorage = (() => {
|
|
23
|
+
let _instanceExtraInitializers = [];
|
|
24
|
+
let _upload_decorators;
|
|
25
|
+
return class ObjectStorage {
|
|
26
|
+
static {
|
|
27
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
|
|
28
|
+
_upload_decorators = [(0, otel_decorator_1.WithInstrumentation)()];
|
|
29
|
+
tslib_1.__esDecorate(this, null, _upload_decorators, { kind: "method", name: "upload", static: false, private: false, access: { has: obj => "upload" in obj, get: obj => obj.upload }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
30
|
+
if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
51
31
|
}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
32
|
+
bucketName = tslib_1.__runInitializers(this, _instanceExtraInitializers);
|
|
33
|
+
s3Client;
|
|
34
|
+
constructor(config) {
|
|
35
|
+
this.bucketName = config.bucketName || 'daytona-volume-builds';
|
|
36
|
+
this.s3Client = new client_s3_1.S3Client({
|
|
37
|
+
region: this.extractAwsRegion(config.endpointUrl) || 'us-east-1',
|
|
38
|
+
endpoint: config.endpointUrl,
|
|
39
|
+
credentials: {
|
|
40
|
+
accessKeyId: config.accessKeyId,
|
|
41
|
+
secretAccessKey: config.secretAccessKey,
|
|
42
|
+
sessionToken: config.sessionToken,
|
|
43
|
+
},
|
|
44
|
+
forcePathStyle: true,
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Upload a file or directory to object storage.
|
|
49
|
+
*
|
|
50
|
+
* @param {string} path - The path to the file or directory to upload.
|
|
51
|
+
* @param {string} organizationId - The organization ID to use for the upload.
|
|
52
|
+
* @param {string} archiveBasePath - The base path to use for the archive.
|
|
53
|
+
* @returns {Promise<string>} The hash of the uploaded file or directory.
|
|
54
|
+
*/
|
|
55
|
+
async upload(path, organizationId, archiveBasePath) {
|
|
56
|
+
const fs = await (0, Import_1.dynamicImport)('fs', '"upload" is not supported: ');
|
|
57
|
+
if (!fs.existsSync(path)) {
|
|
58
|
+
const errMsg = `Path does not exist: ${path}`;
|
|
59
|
+
throw new DaytonaError_1.DaytonaNotFoundError(errMsg);
|
|
60
|
+
}
|
|
61
|
+
// Compute hash for the path
|
|
62
|
+
const pathHash = await this.computeHashForPathMd5(path, archiveBasePath);
|
|
63
|
+
// Define the S3 prefix
|
|
64
|
+
const prefix = `${organizationId}/${pathHash}/`;
|
|
65
|
+
const s3Key = `${prefix}context.tar`;
|
|
66
|
+
// Check if it already exists in S3
|
|
67
|
+
if (await this.folderExistsInS3(prefix)) {
|
|
68
|
+
return pathHash;
|
|
69
|
+
}
|
|
70
|
+
// Upload to S3
|
|
71
|
+
await this.uploadAsTar(s3Key, path, archiveBasePath);
|
|
59
72
|
return pathHash;
|
|
60
73
|
}
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
74
|
+
/**
|
|
75
|
+
* Compute a hash for a file or directory.
|
|
76
|
+
*
|
|
77
|
+
* @param {string} pathStr - The path to the file or directory to hash.
|
|
78
|
+
* @param {string} archiveBasePath - The base path to use for the archive.
|
|
79
|
+
* @returns {Promise<string>} The hash of the file or directory.
|
|
80
|
+
*/
|
|
81
|
+
async computeHashForPathMd5(pathStr, archiveBasePath) {
|
|
82
|
+
const fs = await (0, Import_1.dynamicImport)('fs', '"computeHashForPathMd5" is not supported: ');
|
|
83
|
+
const md5Hasher = crypto.createHash('md5');
|
|
84
|
+
const absPathStr = pathe.resolve(pathStr);
|
|
85
|
+
md5Hasher.update(archiveBasePath);
|
|
86
|
+
if (fs.statSync(absPathStr).isFile()) {
|
|
87
|
+
// For files, hash the content
|
|
88
|
+
await this.hashFile(absPathStr, md5Hasher);
|
|
89
|
+
}
|
|
90
|
+
else {
|
|
91
|
+
// For directories, recursively hash all files and their paths
|
|
92
|
+
await this.hashDirectory(absPathStr, pathStr, md5Hasher);
|
|
93
|
+
}
|
|
94
|
+
return md5Hasher.digest('hex');
|
|
80
95
|
}
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
96
|
+
/**
|
|
97
|
+
* Recursively hash a directory and its contents.
|
|
98
|
+
*
|
|
99
|
+
* @param {string} dirPath - The path to the directory to hash.
|
|
100
|
+
* @param {string} basePath - The base path to use for the hash.
|
|
101
|
+
* @param {crypto.Hash} hasher - The hasher to use for the hash.
|
|
102
|
+
* @returns {Promise<void>} A promise that resolves when the directory has been hashed.
|
|
103
|
+
*/
|
|
104
|
+
async hashDirectory(dirPath, basePath, hasher) {
|
|
105
|
+
const fs = await (0, Import_1.dynamicImport)('fs', '"hashDirectory" is not supported: ');
|
|
106
|
+
const entries = fs.readdirSync(dirPath, { withFileTypes: true });
|
|
107
|
+
const hasSubdirs = entries.some((e) => e.isDirectory());
|
|
108
|
+
const hasFiles = entries.some((e) => e.isFile());
|
|
109
|
+
if (!hasSubdirs && !hasFiles) {
|
|
110
|
+
// Empty directory
|
|
111
|
+
const relDir = pathe.relative(basePath, dirPath);
|
|
112
|
+
hasher.update(relDir);
|
|
113
|
+
}
|
|
114
|
+
for (const entry of entries) {
|
|
115
|
+
const fullPath = pathe.join(dirPath, entry.name);
|
|
116
|
+
if (entry.isDirectory()) {
|
|
117
|
+
await this.hashDirectory(fullPath, basePath, hasher);
|
|
118
|
+
}
|
|
119
|
+
else if (entry.isFile()) {
|
|
120
|
+
const relPath = pathe.relative(basePath, fullPath);
|
|
121
|
+
hasher.update(relPath);
|
|
122
|
+
await this.hashFile(fullPath, hasher);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Hash a file.
|
|
128
|
+
*
|
|
129
|
+
* @param {string} filePath - The path to the file to hash.
|
|
130
|
+
* @param {crypto.Hash} hasher - The hasher to use for the hash.
|
|
131
|
+
* @returns {Promise<void>} A promise that resolves when the file has been hashed.
|
|
132
|
+
*/
|
|
133
|
+
async hashFile(filePath, hasher) {
|
|
134
|
+
const fs = await (0, Import_1.dynamicImport)('fs', '"hashFile" is not supported: ');
|
|
135
|
+
await new Promise((resolve, reject) => {
|
|
136
|
+
const stream = fs.createReadStream(filePath, { highWaterMark: 8192 });
|
|
137
|
+
stream.on('data', (chunk) => hasher.update(chunk));
|
|
138
|
+
stream.on('end', resolve);
|
|
139
|
+
stream.on('error', reject);
|
|
140
|
+
});
|
|
84
141
|
}
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
const hasSubdirs = entries.some((e) => e.isDirectory());
|
|
99
|
-
const hasFiles = entries.some((e) => e.isFile());
|
|
100
|
-
if (!hasSubdirs && !hasFiles) {
|
|
101
|
-
// Empty directory
|
|
102
|
-
const relDir = pathe.relative(basePath, dirPath);
|
|
103
|
-
hasher.update(relDir);
|
|
142
|
+
/**
|
|
143
|
+
* Check if a prefix (folder) exists in S3.
|
|
144
|
+
*
|
|
145
|
+
* @param {string} prefix - The prefix to check.
|
|
146
|
+
* @returns {Promise<boolean>} True if the prefix exists, false otherwise.
|
|
147
|
+
*/
|
|
148
|
+
async folderExistsInS3(prefix) {
|
|
149
|
+
const response = await this.s3Client.send(new client_s3_1.ListObjectsV2Command({
|
|
150
|
+
Bucket: this.bucketName,
|
|
151
|
+
Prefix: prefix,
|
|
152
|
+
MaxKeys: 1,
|
|
153
|
+
}));
|
|
154
|
+
return !!response.Contents && response.Contents.length > 0;
|
|
104
155
|
}
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
156
|
+
/**
|
|
157
|
+
* Create a tar archive of the specified path and upload it to S3.
|
|
158
|
+
*
|
|
159
|
+
* @param {string} s3Key - The key to use for the uploaded file.
|
|
160
|
+
* @param {string} sourcePath - The path to the file or directory to upload.
|
|
161
|
+
* @param {string} archiveBasePath - The base path to use for the archive.
|
|
162
|
+
*/
|
|
163
|
+
async uploadAsTar(s3Key, sourcePath, archiveBasePath) {
|
|
164
|
+
const importErrorPrefix = '"uploadAsTar" is not supported: ';
|
|
165
|
+
const tar = await (0, Import_1.dynamicImport)('tar', importErrorPrefix);
|
|
166
|
+
const stream = await (0, Import_1.dynamicImport)('stream', importErrorPrefix);
|
|
167
|
+
sourcePath = pathe.resolve(sourcePath);
|
|
168
|
+
const normalizedSourcePath = pathe.normalize(sourcePath);
|
|
169
|
+
const normalizedArchiveBasePath = pathe.normalize(archiveBasePath);
|
|
170
|
+
let basePrefix;
|
|
171
|
+
if (normalizedArchiveBasePath === '.') {
|
|
172
|
+
// When archiveBasePath is empty (normalized to '.'), use the normalizedSourcePath as cwd and the '.' as target
|
|
173
|
+
basePrefix = normalizedSourcePath;
|
|
109
174
|
}
|
|
110
|
-
else
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
await this.hashFile(fullPath, hasher);
|
|
175
|
+
else {
|
|
176
|
+
// Normal case: extract the base prefix by removing archiveBasePath from the end
|
|
177
|
+
basePrefix = normalizedSourcePath.slice(0, normalizedSourcePath.length - normalizedArchiveBasePath.length);
|
|
114
178
|
}
|
|
179
|
+
const tarStream = tar.create({
|
|
180
|
+
cwd: basePrefix,
|
|
181
|
+
portable: true,
|
|
182
|
+
gzip: false,
|
|
183
|
+
}, [normalizedArchiveBasePath]);
|
|
184
|
+
const pass = new stream.PassThrough();
|
|
185
|
+
tarStream.pipe(pass);
|
|
186
|
+
const uploader = new lib_storage_1.Upload({
|
|
187
|
+
client: this.s3Client,
|
|
188
|
+
params: {
|
|
189
|
+
Bucket: this.bucketName,
|
|
190
|
+
Key: s3Key,
|
|
191
|
+
Body: pass,
|
|
192
|
+
},
|
|
193
|
+
});
|
|
194
|
+
await uploader.done();
|
|
115
195
|
}
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
*
|
|
120
|
-
* @param {string} filePath - The path to the file to hash.
|
|
121
|
-
* @param {crypto.Hash} hasher - The hasher to use for the hash.
|
|
122
|
-
* @returns {Promise<void>} A promise that resolves when the file has been hashed.
|
|
123
|
-
*/
|
|
124
|
-
async hashFile(filePath, hasher) {
|
|
125
|
-
const fs = await (0, Import_1.dynamicImport)('fs', '"hashFile" is not supported: ');
|
|
126
|
-
await new Promise((resolve, reject) => {
|
|
127
|
-
const stream = fs.createReadStream(filePath, { highWaterMark: 8192 });
|
|
128
|
-
stream.on('data', (chunk) => hasher.update(chunk));
|
|
129
|
-
stream.on('end', resolve);
|
|
130
|
-
stream.on('error', reject);
|
|
131
|
-
});
|
|
132
|
-
}
|
|
133
|
-
/**
|
|
134
|
-
* Check if a prefix (folder) exists in S3.
|
|
135
|
-
*
|
|
136
|
-
* @param {string} prefix - The prefix to check.
|
|
137
|
-
* @returns {Promise<boolean>} True if the prefix exists, false otherwise.
|
|
138
|
-
*/
|
|
139
|
-
async folderExistsInS3(prefix) {
|
|
140
|
-
const response = await this.s3Client.send(new client_s3_1.ListObjectsV2Command({
|
|
141
|
-
Bucket: this.bucketName,
|
|
142
|
-
Prefix: prefix,
|
|
143
|
-
MaxKeys: 1,
|
|
144
|
-
}));
|
|
145
|
-
return !!response.Contents && response.Contents.length > 0;
|
|
146
|
-
}
|
|
147
|
-
/**
|
|
148
|
-
* Create a tar archive of the specified path and upload it to S3.
|
|
149
|
-
*
|
|
150
|
-
* @param {string} s3Key - The key to use for the uploaded file.
|
|
151
|
-
* @param {string} sourcePath - The path to the file or directory to upload.
|
|
152
|
-
* @param {string} archiveBasePath - The base path to use for the archive.
|
|
153
|
-
*/
|
|
154
|
-
async uploadAsTar(s3Key, sourcePath, archiveBasePath) {
|
|
155
|
-
const importErrorPrefix = '"uploadAsTar" is not supported: ';
|
|
156
|
-
const tar = await (0, Import_1.dynamicImport)('tar', importErrorPrefix);
|
|
157
|
-
const stream = await (0, Import_1.dynamicImport)('stream', importErrorPrefix);
|
|
158
|
-
sourcePath = pathe.resolve(sourcePath);
|
|
159
|
-
const normalizedSourcePath = pathe.normalize(sourcePath);
|
|
160
|
-
const normalizedArchiveBasePath = pathe.normalize(archiveBasePath);
|
|
161
|
-
let basePrefix;
|
|
162
|
-
if (normalizedArchiveBasePath === '.') {
|
|
163
|
-
// When archiveBasePath is empty (normalized to '.'), use the normalizedSourcePath as cwd and the '.' as target
|
|
164
|
-
basePrefix = normalizedSourcePath;
|
|
196
|
+
extractAwsRegion(endpoint) {
|
|
197
|
+
const match = endpoint.match(/s3[.-]([a-z0-9-]+)\.amazonaws\.com/);
|
|
198
|
+
return match?.[1];
|
|
165
199
|
}
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
basePrefix = normalizedSourcePath.slice(0, normalizedSourcePath.length - normalizedArchiveBasePath.length);
|
|
169
|
-
}
|
|
170
|
-
const tarStream = tar.create({
|
|
171
|
-
cwd: basePrefix,
|
|
172
|
-
portable: true,
|
|
173
|
-
gzip: false,
|
|
174
|
-
}, [normalizedArchiveBasePath]);
|
|
175
|
-
const pass = new stream.PassThrough();
|
|
176
|
-
tarStream.pipe(pass);
|
|
177
|
-
const uploader = new lib_storage_1.Upload({
|
|
178
|
-
client: this.s3Client,
|
|
179
|
-
params: {
|
|
180
|
-
Bucket: this.bucketName,
|
|
181
|
-
Key: s3Key,
|
|
182
|
-
Body: pass,
|
|
183
|
-
},
|
|
184
|
-
});
|
|
185
|
-
await uploader.done();
|
|
186
|
-
}
|
|
187
|
-
extractAwsRegion(endpoint) {
|
|
188
|
-
const match = endpoint.match(/s3[.-]([a-z0-9-]+)\.amazonaws\.com/);
|
|
189
|
-
return match?.[1];
|
|
190
|
-
}
|
|
191
|
-
}
|
|
200
|
+
};
|
|
201
|
+
})();
|
|
192
202
|
exports.ObjectStorage = ObjectStorage;
|
|
193
|
-
tslib_1.__decorate([
|
|
194
|
-
(0, otel_decorator_1.WithInstrumentation)(),
|
|
195
|
-
tslib_1.__metadata("design:type", Function),
|
|
196
|
-
tslib_1.__metadata("design:paramtypes", [String, String, String]),
|
|
197
|
-
tslib_1.__metadata("design:returntype", Promise)
|
|
198
|
-
], ObjectStorage.prototype, "upload", null);
|
|
199
203
|
//# sourceMappingURL=ObjectStorage.js.map
|
package/cjs/ObjectStorage.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ObjectStorage.js","sourceRoot":"","sources":["../../../../../libs/sdk-typescript/src/ObjectStorage.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;AAEH,kDAAmE;AACnE,sDAA6C;AAC7C,uDAAgC;AAChC,qDAA8B;AAC9B,wDAA4D;AAC5D,2CAA8C;AAC9C,2DAA4D;AAoB5D;;;;;GAKG;
|
|
1
|
+
{"version":3,"file":"ObjectStorage.js","sourceRoot":"","sources":["../../../../../libs/sdk-typescript/src/ObjectStorage.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;AAEH,kDAAmE;AACnE,sDAA6C;AAC7C,uDAAgC;AAChC,qDAA8B;AAC9B,wDAA4D;AAC5D,2CAA8C;AAC9C,2DAA4D;AAoB5D;;;;;GAKG;IACU,aAAa;;;iBAAb,aAAa;;;kCA0BvB,IAAA,oCAAmB,GAAE;YACtB,6KAAM,MAAM,6DAwBX;;;QAlDO,UAAU,GADP,2DAAa,CACE;QAClB,QAAQ,CAAU;QAE1B,YAAY,MAA2B;YACrC,IAAI,CAAC,UAAU,GAAG,MAAM,CAAC,UAAU,IAAI,uBAAuB,CAAA;YAC9D,IAAI,CAAC,QAAQ,GAAG,IAAI,oBAAQ,CAAC;gBAC3B,MAAM,EAAE,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,WAAW;gBAChE,QAAQ,EAAE,MAAM,CAAC,WAAW;gBAC5B,WAAW,EAAE;oBACX,WAAW,EAAE,MAAM,CAAC,WAAW;oBAC/B,eAAe,EAAE,MAAM,CAAC,eAAe;oBACvC,YAAY,EAAE,MAAM,CAAC,YAAY;iBAClC;gBACD,cAAc,EAAE,IAAI;aACrB,CAAC,CAAA;QACJ,CAAC;QAED;;;;;;;WAOG;QAEH,KAAK,CAAC,MAAM,CAAC,IAAY,EAAE,cAAsB,EAAE,eAAuB;YACxE,MAAM,EAAE,GAAG,MAAM,IAAA,sBA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AM,QAAQ,CAAC,IAAI,EAAE,CAAA;QACvB,CAAC;QAEO,gBAAgB,CAAC,QAAgB;YACvC,MAAM,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC,oCAAoC,CAAC,CAAA;YAClE,OAAO,KAAK,EAAE,CAAC,CAAC,CAAC,CAAA;QACnB,CAAC;;;AA3MU,sCAAa"}
|
package/cjs/Process.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { Configuration, ProcessApi
|
|
2
|
-
import {
|
|
1
|
+
import { Configuration, ProcessApi } from '@daytona/toolbox-api-client';
|
|
2
|
+
import type { Command, Session, SessionExecuteRequest, SessionExecuteResponse as ApiSessionExecuteResponse, PtySessionInfo } from '@daytona/toolbox-api-client';
|
|
3
|
+
import type { ExecuteResponse } from './types/ExecuteResponse';
|
|
3
4
|
import { PtyHandle } from './PtyHandle';
|
|
4
|
-
import { PtyCreateOptions, PtyConnectOptions } from './types/Pty';
|
|
5
|
+
import type { PtyCreateOptions, PtyConnectOptions } from './types/Pty';
|
|
5
6
|
export declare const STDOUT_PREFIX_BYTES: Uint8Array<ArrayBuffer>;
|
|
6
7
|
export declare const STDERR_PREFIX_BYTES: Uint8Array<ArrayBuffer>;
|
|
7
8
|
export declare const MAX_PREFIX_LEN: number;
|