@daytonaio/sdk 0.170.0 → 0.171.0-alpha.3
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/LICENSE +190 -0
- package/cjs/CodeInterpreter.d.ts +95 -0
- package/cjs/CodeInterpreter.d.ts.map +1 -0
- package/cjs/CodeInterpreter.js +297 -0
- package/cjs/CodeInterpreter.js.map +1 -0
- package/cjs/ComputerUse.d.ts +539 -0
- package/cjs/ComputerUse.d.ts.map +1 -0
- package/cjs/ComputerUse.js +808 -0
- package/cjs/ComputerUse.js.map +1 -0
- package/cjs/Daytona.d.ts +355 -0
- package/cjs/Daytona.d.ts.map +1 -0
- package/cjs/Daytona.js +527 -0
- package/cjs/Daytona.js.map +1 -0
- package/cjs/FileSystem.d.ts +371 -0
- package/cjs/FileSystem.d.ts.map +1 -0
- package/cjs/FileSystem.js +489 -0
- package/cjs/FileSystem.js.map +1 -0
- package/cjs/Git.d.ts +203 -0
- package/cjs/Git.d.ts.map +1 -0
- package/cjs/Git.js +326 -0
- package/cjs/Git.js.map +1 -0
- package/cjs/Image.d.ts +265 -0
- package/cjs/Image.d.ts.map +1 -0
- package/cjs/Image.js +586 -0
- package/cjs/Image.js.map +1 -0
- package/cjs/LspServer.d.ts +172 -0
- package/cjs/LspServer.d.ts.map +1 -0
- package/cjs/LspServer.js +259 -0
- package/cjs/LspServer.js.map +1 -0
- package/cjs/ObjectStorage.d.ts +79 -0
- package/cjs/ObjectStorage.d.ts.map +1 -0
- package/cjs/ObjectStorage.js +199 -0
- package/cjs/ObjectStorage.js.map +1 -0
- package/cjs/Process.d.ts +490 -0
- package/cjs/Process.d.ts.map +1 -0
- package/cjs/Process.js +647 -0
- package/cjs/Process.js.map +1 -0
- package/cjs/PtyHandle.d.ts +155 -0
- package/cjs/PtyHandle.d.ts.map +1 -0
- package/cjs/PtyHandle.js +416 -0
- package/cjs/PtyHandle.js.map +1 -0
- package/cjs/README.md +180 -0
- package/cjs/Sandbox.d.ts +476 -0
- package/cjs/Sandbox.d.ts.map +1 -0
- package/cjs/Sandbox.js +905 -0
- package/cjs/Sandbox.js.map +1 -0
- package/cjs/Snapshot.d.ts +140 -0
- package/cjs/Snapshot.d.ts.map +1 -0
- package/cjs/Snapshot.js +248 -0
- package/cjs/Snapshot.js.map +1 -0
- package/cjs/Volume.d.ts +84 -0
- package/cjs/Volume.d.ts.map +1 -0
- package/cjs/Volume.js +119 -0
- package/cjs/Volume.js.map +1 -0
- package/cjs/__tests__/helpers.d.ts +6 -0
- package/cjs/__tests__/helpers.d.ts.map +1 -0
- package/cjs/__tests__/helpers.js +26 -0
- package/cjs/__tests__/helpers.js.map +1 -0
- package/cjs/errors/DaytonaError.d.ts +171 -0
- package/cjs/errors/DaytonaError.d.ts.map +1 -0
- package/cjs/errors/DaytonaError.js +258 -0
- package/cjs/errors/DaytonaError.js.map +1 -0
- package/cjs/index.d.ts +22 -0
- package/cjs/index.d.ts.map +1 -0
- package/cjs/index.js +49 -0
- package/cjs/index.js.map +1 -0
- package/cjs/package.json +3 -0
- package/cjs/types/Charts.d.ts +38 -0
- package/cjs/types/Charts.d.ts.map +1 -0
- package/cjs/types/Charts.js +37 -0
- package/cjs/types/Charts.js.map +1 -0
- package/cjs/types/CodeInterpreter.d.ts +77 -0
- package/cjs/types/CodeInterpreter.d.ts.map +1 -0
- package/cjs/types/CodeInterpreter.js +7 -0
- package/cjs/types/CodeInterpreter.js.map +1 -0
- package/cjs/types/ExecuteResponse.d.ts +26 -0
- package/cjs/types/ExecuteResponse.d.ts.map +1 -0
- package/cjs/types/ExecuteResponse.js +7 -0
- package/cjs/types/ExecuteResponse.js.map +1 -0
- package/cjs/types/Pty.d.ts +48 -0
- package/cjs/types/Pty.d.ts.map +1 -0
- package/cjs/types/Pty.js +7 -0
- package/cjs/types/Pty.js.map +1 -0
- package/cjs/utils/Binary.d.ts +39 -0
- package/cjs/utils/Binary.d.ts.map +1 -0
- package/cjs/utils/Binary.js +168 -0
- package/cjs/utils/Binary.js.map +1 -0
- package/cjs/utils/FileTransfer.d.ts +15 -0
- package/cjs/utils/FileTransfer.d.ts.map +1 -0
- package/cjs/utils/FileTransfer.js +261 -0
- package/cjs/utils/FileTransfer.js.map +1 -0
- package/cjs/utils/Import.d.ts +125 -0
- package/cjs/utils/Import.d.ts.map +1 -0
- package/cjs/utils/Import.js +112 -0
- package/cjs/utils/Import.js.map +1 -0
- package/cjs/utils/Multipart.d.ts +29 -0
- package/cjs/utils/Multipart.d.ts.map +1 -0
- package/cjs/utils/Multipart.js +115 -0
- package/cjs/utils/Multipart.js.map +1 -0
- package/cjs/utils/Runtime.d.ts +44 -0
- package/cjs/utils/Runtime.d.ts.map +1 -0
- package/cjs/utils/Runtime.js +95 -0
- package/cjs/utils/Runtime.js.map +1 -0
- package/cjs/utils/Stream.d.ts +20 -0
- package/cjs/utils/Stream.d.ts.map +1 -0
- package/cjs/utils/Stream.js +364 -0
- package/cjs/utils/Stream.js.map +1 -0
- package/cjs/utils/WebSocket.d.ts +10 -0
- package/cjs/utils/WebSocket.d.ts.map +1 -0
- package/cjs/utils/WebSocket.js +26 -0
- package/cjs/utils/WebSocket.js.map +1 -0
- package/cjs/utils/otel.decorator.d.ts +83 -0
- package/cjs/utils/otel.decorator.d.ts.map +1 -0
- package/cjs/utils/otel.decorator.js +141 -0
- package/cjs/utils/otel.decorator.js.map +1 -0
- package/esm/CodeInterpreter.d.ts +95 -0
- package/esm/CodeInterpreter.d.ts.map +1 -0
- package/esm/CodeInterpreter.js +292 -0
- package/esm/CodeInterpreter.js.map +1 -0
- package/esm/ComputerUse.d.ts +539 -0
- package/esm/ComputerUse.d.ts.map +1 -0
- package/esm/ComputerUse.js +799 -0
- package/esm/ComputerUse.js.map +1 -0
- package/esm/Daytona.d.ts +355 -0
- package/esm/Daytona.d.ts.map +1 -0
- package/esm/Daytona.js +523 -0
- package/esm/Daytona.js.map +1 -0
- package/esm/FileSystem.d.ts +371 -0
- package/esm/FileSystem.d.ts.map +1 -0
- package/esm/FileSystem.js +485 -0
- package/esm/FileSystem.js.map +1 -0
- package/esm/Git.d.ts +203 -0
- package/esm/Git.d.ts.map +1 -0
- package/esm/Git.js +322 -0
- package/esm/Git.js.map +1 -0
- package/esm/Image.d.ts +265 -0
- package/esm/Image.d.ts.map +1 -0
- package/esm/Image.js +581 -0
- package/esm/Image.js.map +1 -0
- package/esm/LspServer.d.ts +172 -0
- package/esm/LspServer.d.ts.map +1 -0
- package/esm/LspServer.js +255 -0
- package/esm/LspServer.js.map +1 -0
- package/esm/ObjectStorage.d.ts +79 -0
- package/esm/ObjectStorage.d.ts.map +1 -0
- package/esm/ObjectStorage.js +195 -0
- package/esm/ObjectStorage.js.map +1 -0
- package/esm/Process.d.ts +490 -0
- package/esm/Process.d.ts.map +1 -0
- package/esm/Process.js +642 -0
- package/esm/Process.js.map +1 -0
- package/esm/PtyHandle.d.ts +155 -0
- package/esm/PtyHandle.d.ts.map +1 -0
- package/esm/PtyHandle.js +412 -0
- package/esm/PtyHandle.js.map +1 -0
- package/esm/README.md +180 -0
- package/esm/Sandbox.d.ts +476 -0
- package/esm/Sandbox.d.ts.map +1 -0
- package/esm/Sandbox.js +901 -0
- package/esm/Sandbox.js.map +1 -0
- package/esm/Snapshot.d.ts +140 -0
- package/esm/Snapshot.d.ts.map +1 -0
- package/esm/Snapshot.js +244 -0
- package/esm/Snapshot.js.map +1 -0
- package/esm/Volume.d.ts +84 -0
- package/esm/Volume.d.ts.map +1 -0
- package/esm/Volume.js +115 -0
- package/esm/Volume.js.map +1 -0
- package/esm/__tests__/helpers.d.ts +6 -0
- package/esm/__tests__/helpers.d.ts.map +1 -0
- package/esm/__tests__/helpers.js +20 -0
- package/esm/__tests__/helpers.js.map +1 -0
- package/esm/errors/DaytonaError.d.ts +171 -0
- package/esm/errors/DaytonaError.d.ts.map +1 -0
- package/esm/errors/DaytonaError.js +243 -0
- package/esm/errors/DaytonaError.js.map +1 -0
- package/esm/index.d.ts +22 -0
- package/esm/index.d.ts.map +1 -0
- package/esm/index.js +21 -0
- package/esm/index.js.map +1 -0
- package/esm/package.json +3 -0
- package/esm/types/Charts.d.ts +38 -0
- package/esm/types/Charts.d.ts.map +1 -0
- package/esm/types/Charts.js +33 -0
- package/esm/types/Charts.js.map +1 -0
- package/esm/types/CodeInterpreter.d.ts +77 -0
- package/esm/types/CodeInterpreter.d.ts.map +1 -0
- package/esm/types/CodeInterpreter.js +6 -0
- package/esm/types/CodeInterpreter.js.map +1 -0
- package/esm/types/ExecuteResponse.d.ts +26 -0
- package/esm/types/ExecuteResponse.d.ts.map +1 -0
- package/esm/types/ExecuteResponse.js +6 -0
- package/esm/types/ExecuteResponse.js.map +1 -0
- package/esm/types/Pty.d.ts +48 -0
- package/esm/types/Pty.d.ts.map +1 -0
- package/esm/types/Pty.js +6 -0
- package/esm/types/Pty.js.map +1 -0
- package/esm/utils/Binary.d.ts +39 -0
- package/esm/utils/Binary.d.ts.map +1 -0
- package/esm/utils/Binary.js +157 -0
- package/esm/utils/Binary.js.map +1 -0
- package/esm/utils/FileTransfer.d.ts +15 -0
- package/esm/utils/FileTransfer.d.ts.map +1 -0
- package/esm/utils/FileTransfer.js +254 -0
- package/esm/utils/FileTransfer.js.map +1 -0
- package/esm/utils/Import.d.ts +95 -0
- package/esm/utils/Import.d.ts.map +1 -0
- package/esm/utils/Import.js +77 -0
- package/esm/utils/Import.js.map +1 -0
- package/esm/utils/Multipart.d.ts +29 -0
- package/esm/utils/Multipart.d.ts.map +1 -0
- package/esm/utils/Multipart.js +109 -0
- package/esm/utils/Multipart.js.map +1 -0
- package/esm/utils/Runtime.d.ts +44 -0
- package/esm/utils/Runtime.d.ts.map +1 -0
- package/esm/utils/Runtime.js +89 -0
- package/esm/utils/Runtime.js.map +1 -0
- package/esm/utils/Stream.d.ts +20 -0
- package/esm/utils/Stream.d.ts.map +1 -0
- package/esm/utils/Stream.js +360 -0
- package/esm/utils/Stream.js.map +1 -0
- package/esm/utils/WebSocket.d.ts +10 -0
- package/esm/utils/WebSocket.d.ts.map +1 -0
- package/esm/utils/WebSocket.js +22 -0
- package/esm/utils/WebSocket.js.map +1 -0
- package/esm/utils/otel.decorator.d.ts +83 -0
- package/esm/utils/otel.decorator.d.ts.map +1 -0
- package/esm/utils/otel.decorator.js +136 -0
- package/esm/utils/otel.decorator.js.map +1 -0
- package/package.json +20 -8
- package/src/ComputerUse.d.ts +4 -4
- package/src/ComputerUse.js +4 -4
- package/src/Sandbox.d.ts +1 -18
- package/src/Sandbox.js +0 -29
- package/src/Sandbox.js.map +1 -1
- package/src/__tests__/helpers.js +0 -2
- package/src/__tests__/helpers.js.map +1 -1
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2025 Daytona Platforms Inc.
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/
|
|
5
|
+
import { __decorate, __metadata } from "tslib";
|
|
6
|
+
import { ListObjectsV2Command, S3Client } from '@aws-sdk/client-s3';
|
|
7
|
+
import { Upload } from '@aws-sdk/lib-storage';
|
|
8
|
+
import * as crypto from 'crypto';
|
|
9
|
+
import * as pathe from 'pathe';
|
|
10
|
+
import { DaytonaNotFoundError } from './errors/DaytonaError.js';
|
|
11
|
+
import { dynamicImport } from './utils/Import.js';
|
|
12
|
+
import { WithInstrumentation } from './utils/otel.decorator.js';
|
|
13
|
+
/**
|
|
14
|
+
* ObjectStorage class for interacting with object storage services.
|
|
15
|
+
*
|
|
16
|
+
* @class
|
|
17
|
+
* @param {ObjectStorageConfig} config - The configuration for the object storage service.
|
|
18
|
+
*/
|
|
19
|
+
export class ObjectStorage {
|
|
20
|
+
bucketName;
|
|
21
|
+
s3Client;
|
|
22
|
+
constructor(config) {
|
|
23
|
+
this.bucketName = config.bucketName || 'daytona-volume-builds';
|
|
24
|
+
this.s3Client = new S3Client({
|
|
25
|
+
region: this.extractAwsRegion(config.endpointUrl) || 'us-east-1',
|
|
26
|
+
endpoint: config.endpointUrl,
|
|
27
|
+
credentials: {
|
|
28
|
+
accessKeyId: config.accessKeyId,
|
|
29
|
+
secretAccessKey: config.secretAccessKey,
|
|
30
|
+
sessionToken: config.sessionToken,
|
|
31
|
+
},
|
|
32
|
+
forcePathStyle: true,
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Upload a file or directory to object storage.
|
|
37
|
+
*
|
|
38
|
+
* @param {string} path - The path to the file or directory to upload.
|
|
39
|
+
* @param {string} organizationId - The organization ID to use for the upload.
|
|
40
|
+
* @param {string} archiveBasePath - The base path to use for the archive.
|
|
41
|
+
* @returns {Promise<string>} The hash of the uploaded file or directory.
|
|
42
|
+
*/
|
|
43
|
+
async upload(path, organizationId, archiveBasePath) {
|
|
44
|
+
const fs = await dynamicImport('fs', '"upload" is not supported: ');
|
|
45
|
+
if (!fs.existsSync(path)) {
|
|
46
|
+
const errMsg = `Path does not exist: ${path}`;
|
|
47
|
+
throw new DaytonaNotFoundError(errMsg);
|
|
48
|
+
}
|
|
49
|
+
// Compute hash for the path
|
|
50
|
+
const pathHash = await this.computeHashForPathMd5(path, archiveBasePath);
|
|
51
|
+
// Define the S3 prefix
|
|
52
|
+
const prefix = `${organizationId}/${pathHash}/`;
|
|
53
|
+
const s3Key = `${prefix}context.tar`;
|
|
54
|
+
// Check if it already exists in S3
|
|
55
|
+
if (await this.folderExistsInS3(prefix)) {
|
|
56
|
+
return pathHash;
|
|
57
|
+
}
|
|
58
|
+
// Upload to S3
|
|
59
|
+
await this.uploadAsTar(s3Key, path, archiveBasePath);
|
|
60
|
+
return pathHash;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Compute a hash for a file or directory.
|
|
64
|
+
*
|
|
65
|
+
* @param {string} pathStr - The path to the file or directory to hash.
|
|
66
|
+
* @param {string} archiveBasePath - The base path to use for the archive.
|
|
67
|
+
* @returns {Promise<string>} The hash of the file or directory.
|
|
68
|
+
*/
|
|
69
|
+
async computeHashForPathMd5(pathStr, archiveBasePath) {
|
|
70
|
+
const fs = await dynamicImport('fs', '"computeHashForPathMd5" is not supported: ');
|
|
71
|
+
const md5Hasher = crypto.createHash('md5');
|
|
72
|
+
const absPathStr = pathe.resolve(pathStr);
|
|
73
|
+
md5Hasher.update(archiveBasePath);
|
|
74
|
+
if (fs.statSync(absPathStr).isFile()) {
|
|
75
|
+
// For files, hash the content
|
|
76
|
+
await this.hashFile(absPathStr, md5Hasher);
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
// For directories, recursively hash all files and their paths
|
|
80
|
+
await this.hashDirectory(absPathStr, pathStr, md5Hasher);
|
|
81
|
+
}
|
|
82
|
+
return md5Hasher.digest('hex');
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Recursively hash a directory and its contents.
|
|
86
|
+
*
|
|
87
|
+
* @param {string} dirPath - The path to the directory to hash.
|
|
88
|
+
* @param {string} basePath - The base path to use for the hash.
|
|
89
|
+
* @param {crypto.Hash} hasher - The hasher to use for the hash.
|
|
90
|
+
* @returns {Promise<void>} A promise that resolves when the directory has been hashed.
|
|
91
|
+
*/
|
|
92
|
+
async hashDirectory(dirPath, basePath, hasher) {
|
|
93
|
+
const fs = await dynamicImport('fs', '"hashDirectory" is not supported: ');
|
|
94
|
+
const entries = fs.readdirSync(dirPath, { withFileTypes: true });
|
|
95
|
+
const hasSubdirs = entries.some((e) => e.isDirectory());
|
|
96
|
+
const hasFiles = entries.some((e) => e.isFile());
|
|
97
|
+
if (!hasSubdirs && !hasFiles) {
|
|
98
|
+
// Empty directory
|
|
99
|
+
const relDir = pathe.relative(basePath, dirPath);
|
|
100
|
+
hasher.update(relDir);
|
|
101
|
+
}
|
|
102
|
+
for (const entry of entries) {
|
|
103
|
+
const fullPath = pathe.join(dirPath, entry.name);
|
|
104
|
+
if (entry.isDirectory()) {
|
|
105
|
+
await this.hashDirectory(fullPath, basePath, hasher);
|
|
106
|
+
}
|
|
107
|
+
else if (entry.isFile()) {
|
|
108
|
+
const relPath = pathe.relative(basePath, fullPath);
|
|
109
|
+
hasher.update(relPath);
|
|
110
|
+
await this.hashFile(fullPath, hasher);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Hash a file.
|
|
116
|
+
*
|
|
117
|
+
* @param {string} filePath - The path to the file to hash.
|
|
118
|
+
* @param {crypto.Hash} hasher - The hasher to use for the hash.
|
|
119
|
+
* @returns {Promise<void>} A promise that resolves when the file has been hashed.
|
|
120
|
+
*/
|
|
121
|
+
async hashFile(filePath, hasher) {
|
|
122
|
+
const fs = await dynamicImport('fs', '"hashFile" is not supported: ');
|
|
123
|
+
await new Promise((resolve, reject) => {
|
|
124
|
+
const stream = fs.createReadStream(filePath, { highWaterMark: 8192 });
|
|
125
|
+
stream.on('data', (chunk) => hasher.update(chunk));
|
|
126
|
+
stream.on('end', resolve);
|
|
127
|
+
stream.on('error', reject);
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Check if a prefix (folder) exists in S3.
|
|
132
|
+
*
|
|
133
|
+
* @param {string} prefix - The prefix to check.
|
|
134
|
+
* @returns {Promise<boolean>} True if the prefix exists, false otherwise.
|
|
135
|
+
*/
|
|
136
|
+
async folderExistsInS3(prefix) {
|
|
137
|
+
const response = await this.s3Client.send(new ListObjectsV2Command({
|
|
138
|
+
Bucket: this.bucketName,
|
|
139
|
+
Prefix: prefix,
|
|
140
|
+
MaxKeys: 1,
|
|
141
|
+
}));
|
|
142
|
+
return !!response.Contents && response.Contents.length > 0;
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Create a tar archive of the specified path and upload it to S3.
|
|
146
|
+
*
|
|
147
|
+
* @param {string} s3Key - The key to use for the uploaded file.
|
|
148
|
+
* @param {string} sourcePath - The path to the file or directory to upload.
|
|
149
|
+
* @param {string} archiveBasePath - The base path to use for the archive.
|
|
150
|
+
*/
|
|
151
|
+
async uploadAsTar(s3Key, sourcePath, archiveBasePath) {
|
|
152
|
+
const importErrorPrefix = '"uploadAsTar" is not supported: ';
|
|
153
|
+
const tar = await dynamicImport('tar', importErrorPrefix);
|
|
154
|
+
const stream = await dynamicImport('stream', importErrorPrefix);
|
|
155
|
+
sourcePath = pathe.resolve(sourcePath);
|
|
156
|
+
const normalizedSourcePath = pathe.normalize(sourcePath);
|
|
157
|
+
const normalizedArchiveBasePath = pathe.normalize(archiveBasePath);
|
|
158
|
+
let basePrefix;
|
|
159
|
+
if (normalizedArchiveBasePath === '.') {
|
|
160
|
+
// When archiveBasePath is empty (normalized to '.'), use the normalizedSourcePath as cwd and the '.' as target
|
|
161
|
+
basePrefix = normalizedSourcePath;
|
|
162
|
+
}
|
|
163
|
+
else {
|
|
164
|
+
// Normal case: extract the base prefix by removing archiveBasePath from the end
|
|
165
|
+
basePrefix = normalizedSourcePath.slice(0, normalizedSourcePath.length - normalizedArchiveBasePath.length);
|
|
166
|
+
}
|
|
167
|
+
const tarStream = tar.create({
|
|
168
|
+
cwd: basePrefix,
|
|
169
|
+
portable: true,
|
|
170
|
+
gzip: false,
|
|
171
|
+
}, [normalizedArchiveBasePath]);
|
|
172
|
+
const pass = new stream.PassThrough();
|
|
173
|
+
tarStream.pipe(pass);
|
|
174
|
+
const uploader = new Upload({
|
|
175
|
+
client: this.s3Client,
|
|
176
|
+
params: {
|
|
177
|
+
Bucket: this.bucketName,
|
|
178
|
+
Key: s3Key,
|
|
179
|
+
Body: pass,
|
|
180
|
+
},
|
|
181
|
+
});
|
|
182
|
+
await uploader.done();
|
|
183
|
+
}
|
|
184
|
+
extractAwsRegion(endpoint) {
|
|
185
|
+
const match = endpoint.match(/s3[.-]([a-z0-9-]+)\.amazonaws\.com/);
|
|
186
|
+
return match?.[1];
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
__decorate([
|
|
190
|
+
WithInstrumentation(),
|
|
191
|
+
__metadata("design:type", Function),
|
|
192
|
+
__metadata("design:paramtypes", [String, String, String]),
|
|
193
|
+
__metadata("design:returntype", Promise)
|
|
194
|
+
], ObjectStorage.prototype, "upload", null);
|
|
195
|
+
//# sourceMappingURL=ObjectStorage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ObjectStorage.js","sourceRoot":"","sources":["../../../../../libs/sdk-typescript/src/ObjectStorage.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAEH,OAAO,EAAE,oBAAoB,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAA;AACnE,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAC7C,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAA;AAChC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAA;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;AAC9C,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAA;AAoB5D;;;;;GAKG;AACH,MAAM,OAAO,aAAa;IAChB,UAAU,CAAQ;IAClB,QAAQ,CAAU;IAE1B,YAAY,MAA2B;QACrC,IAAI,CAAC,UAAU,GAAG,MAAM,CAAC,UAAU,IAAI,uBAAuB,CAAA;QAC9D,IAAI,CAAC,QAAQ,GAAG,IAAI,QAAQ,CAAC;YAC3B,MAAM,EAAE,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,WAAW;YAChE,QAAQ,EAAE,MAAM,CAAC,WAAW;YAC5B,WAAW,EAAE;gBACX,WAAW,EAAE,MAAM,CAAC,WAAW;gBAC/B,eAAe,EAAE,MAAM,CAAC,eAAe;gBACvC,YAAY,EAAE,MAAM,CAAC,YAAY;aAClC;YACD,cAAc,EAAE,IAAI;SACrB,CAAC,CAAA;IACJ,CAAC;IAED;;;;;;;OAOG;IAEG,AAAN,KAAK,CAAC,MAAM,CAAC,IAAY,EAAE,cAAsB,EAAE,eAAuB;QACxE,MAAM,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