bdy 1.22.79-stage → 1.22.80-beta
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/distTs/package.json +1 -1
- package/distTs/src/api/client.js +4 -2
- package/package.json +1 -1
package/distTs/package.json
CHANGED
package/distTs/src/api/client.js
CHANGED
|
@@ -564,9 +564,10 @@ class ApiClient {
|
|
|
564
564
|
});
|
|
565
565
|
}
|
|
566
566
|
async sandboxDownloadFile(workspace, sandboxId, remotePath) {
|
|
567
|
+
const encodedRemotePath = remotePath.split('/').map(encodeURIComponent).join('/');
|
|
567
568
|
return await this.request({
|
|
568
569
|
method: 'GET',
|
|
569
|
-
path: `/workspaces/${encodeURIComponent(workspace)}/sandboxes/${encodeURIComponent(sandboxId)}/download${
|
|
570
|
+
path: `/workspaces/${encodeURIComponent(workspace)}/sandboxes/${encodeURIComponent(sandboxId)}/download${encodedRemotePath}`,
|
|
570
571
|
rawResponse: true,
|
|
571
572
|
});
|
|
572
573
|
}
|
|
@@ -578,9 +579,10 @@ class ApiClient {
|
|
|
578
579
|
const formData = new undici_1.FormData();
|
|
579
580
|
const file = await node_fs_1.default.openAsBlob(localPath);
|
|
580
581
|
formData.set('file', file);
|
|
582
|
+
const encodedRemotePath = remotePath.split('/').map(encodeURIComponent).join('/');
|
|
581
583
|
return await this.request({
|
|
582
584
|
method: 'POST',
|
|
583
|
-
path: `/workspaces/${encodeURIComponent(workspace)}/sandboxes/${encodeURIComponent(sandboxId)}/content/upload${
|
|
585
|
+
path: `/workspaces/${encodeURIComponent(workspace)}/sandboxes/${encodeURIComponent(sandboxId)}/content/upload${encodedRemotePath}`,
|
|
584
586
|
body: formData,
|
|
585
587
|
query,
|
|
586
588
|
parseResponseBody: true,
|