@ardrive/turbo-sdk 1.35.0 → 1.36.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 +1 -1
- package/bundles/web.bundle.min.js +2 -2
- package/lib/cjs/cli/commands/uploadFile.js +25 -8
- package/lib/cjs/cli/commands/uploadFolder.js +9 -1
- package/lib/cjs/cli/options.js +6 -0
- package/lib/cjs/cli/progress.js +284 -0
- package/lib/cjs/utils/common.js +1 -1
- package/lib/cjs/version.js +1 -1
- package/lib/esm/cli/commands/uploadFile.js +25 -8
- package/lib/esm/cli/commands/uploadFolder.js +9 -1
- package/lib/esm/cli/options.js +6 -0
- package/lib/esm/cli/progress.js +276 -0
- package/lib/esm/utils/common.js +1 -1
- package/lib/esm/version.js +1 -1
- package/lib/types/cli/commands/uploadFile.d.ts.map +1 -1
- package/lib/types/cli/commands/uploadFolder.d.ts.map +1 -1
- package/lib/types/cli/options.d.ts +17 -0
- package/lib/types/cli/options.d.ts.map +1 -1
- package/lib/types/cli/progress.d.ts +92 -0
- package/lib/types/cli/progress.d.ts.map +1 -0
- package/lib/types/cli/types.d.ts +1 -0
- package/lib/types/cli/types.d.ts.map +1 -1
- package/lib/types/version.d.ts +1 -1
- package/package.json +7 -4
package/README.md
CHANGED
|
@@ -344,7 +344,7 @@ const turbo = TurboFactory.authenticated({
|
|
|
344
344
|
const turbo = TurboFactory.authenticated({
|
|
345
345
|
privateKey: process.env.SEPOLIA_PRIVATE_KEY,
|
|
346
346
|
token: 'ethereum',
|
|
347
|
-
gatewayUrl: 'https://
|
|
347
|
+
gatewayUrl: 'https://sepolia.gateway.tenderly.co',
|
|
348
348
|
paymentServiceConfig: {
|
|
349
349
|
url: 'https://payment.ardrive.dev',
|
|
350
350
|
},
|
|
@@ -222435,7 +222435,7 @@ var import_winston = __toESM(require_winston(), 1);
|
|
|
222435
222435
|
init_dirname();
|
|
222436
222436
|
init_buffer2();
|
|
222437
222437
|
init_process2();
|
|
222438
|
-
var version21 = "1.
|
|
222438
|
+
var version21 = "1.36.0-alpha.1";
|
|
222439
222439
|
|
|
222440
222440
|
// src/common/logger.ts
|
|
222441
222441
|
var TurboWinstonLogger = class _TurboWinstonLogger {
|
|
@@ -259266,7 +259266,7 @@ var wordlists2 = {
|
|
|
259266
259266
|
function sleep2(ms2) {
|
|
259267
259267
|
return new Promise((resolve3) => setTimeout(resolve3, ms2));
|
|
259268
259268
|
}
|
|
259269
|
-
var ethTestnetRpc = "https://
|
|
259269
|
+
var ethTestnetRpc = "https://sepolia.gateway.tenderly.co";
|
|
259270
259270
|
var baseTestnetRpc = "https://sepolia.base.org";
|
|
259271
259271
|
var polygonTestnetRpc = "https://rpc-amoy.polygon.technology";
|
|
259272
259272
|
var tokenToDevGatewayMap = {
|
|
@@ -17,7 +17,9 @@ exports.uploadFile = uploadFile;
|
|
|
17
17
|
* limitations under the License.
|
|
18
18
|
*/
|
|
19
19
|
const fs_1 = require("fs");
|
|
20
|
+
const path_1 = require("path");
|
|
20
21
|
const constants_js_1 = require("../constants.js");
|
|
22
|
+
const progress_js_1 = require("../progress.js");
|
|
21
23
|
const utils_js_1 = require("../utils.js");
|
|
22
24
|
async function uploadFile(options) {
|
|
23
25
|
const { filePath } = options;
|
|
@@ -28,12 +30,27 @@ async function uploadFile(options) {
|
|
|
28
30
|
const paidBy = await (0, utils_js_1.paidByFromOptions)(options, turbo);
|
|
29
31
|
const customTags = (0, utils_js_1.getTagsFromOptions)(options);
|
|
30
32
|
const fileSize = (0, fs_1.statSync)(filePath).size;
|
|
31
|
-
const
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
33
|
+
const fileName = (0, path_1.basename)(filePath);
|
|
34
|
+
const showProgress = options.showProgress;
|
|
35
|
+
// Create progress tracker
|
|
36
|
+
const progress = new progress_js_1.FileUploadProgress(showProgress);
|
|
37
|
+
progress.start(fileSize, fileName);
|
|
38
|
+
try {
|
|
39
|
+
const result = await turbo.uploadFile({
|
|
40
|
+
fileStreamFactory: () => (0, fs_1.createReadStream)(filePath),
|
|
41
|
+
fileSizeFactory: () => fileSize,
|
|
42
|
+
dataItemOpts: { tags: [...constants_js_1.turboCliTags, ...customTags], paidBy },
|
|
43
|
+
...(0, utils_js_1.getChunkingOptions)(options),
|
|
44
|
+
...(0, utils_js_1.onDemandOptionsFromOptions)(options),
|
|
45
|
+
events: progress.events,
|
|
46
|
+
});
|
|
47
|
+
progress.stop();
|
|
48
|
+
// Add newline before output only if progress was shown
|
|
49
|
+
const prefix = showProgress ? '\n' : '';
|
|
50
|
+
console.log(`${prefix}Uploaded file:`, JSON.stringify(result, null, 2));
|
|
51
|
+
}
|
|
52
|
+
catch (error) {
|
|
53
|
+
progress.stop();
|
|
54
|
+
throw error;
|
|
55
|
+
}
|
|
39
56
|
}
|
|
@@ -17,12 +17,16 @@ exports.uploadFolder = uploadFolder;
|
|
|
17
17
|
* limitations under the License.
|
|
18
18
|
*/
|
|
19
19
|
const constants_js_1 = require("../constants.js");
|
|
20
|
+
const progress_js_1 = require("../progress.js");
|
|
20
21
|
const utils_js_1 = require("../utils.js");
|
|
21
22
|
async function uploadFolder(options) {
|
|
22
23
|
const turbo = await (0, utils_js_1.turboFromOptions)(options);
|
|
23
24
|
const paidBy = await (0, utils_js_1.paidByFromOptions)(options, turbo);
|
|
25
|
+
const showProgress = options.showProgress;
|
|
24
26
|
const { disableManifest, fallbackFile, folderPath, indexFile, maxConcurrentUploads, chunkByteCount, chunkingMode, maxChunkConcurrency, maxFinalizeMs, } = (0, utils_js_1.getUploadFolderOptions)(options);
|
|
25
27
|
const customTags = (0, utils_js_1.getTagsFromOptions)(options);
|
|
28
|
+
// Create progress tracker
|
|
29
|
+
const progress = new progress_js_1.FolderUploadProgress(showProgress);
|
|
26
30
|
const result = await turbo.uploadFolder({
|
|
27
31
|
folderPath: folderPath,
|
|
28
32
|
dataItemOpts: { tags: [...constants_js_1.turboCliTags, ...customTags], paidBy },
|
|
@@ -37,6 +41,10 @@ async function uploadFolder(options) {
|
|
|
37
41
|
maxChunkConcurrency,
|
|
38
42
|
maxFinalizeMs,
|
|
39
43
|
...(0, utils_js_1.onDemandOptionsFromOptions)(options),
|
|
44
|
+
events: progress.events,
|
|
40
45
|
});
|
|
41
|
-
|
|
46
|
+
progress.stop();
|
|
47
|
+
// Add newline before output only if progress was shown
|
|
48
|
+
const prefix = showProgress ? '\n' : '';
|
|
49
|
+
console.log(`${prefix}Uploaded folder:`, JSON.stringify(result, null, 2));
|
|
42
50
|
}
|
package/lib/cjs/cli/options.js
CHANGED
|
@@ -106,6 +106,11 @@ exports.optionMap = {
|
|
|
106
106
|
description: 'Disable logging',
|
|
107
107
|
default: false,
|
|
108
108
|
},
|
|
109
|
+
showProgress: {
|
|
110
|
+
alias: '--show-progress',
|
|
111
|
+
description: 'Display progress bars during upload operations',
|
|
112
|
+
default: false,
|
|
113
|
+
},
|
|
109
114
|
skipConfirmation: {
|
|
110
115
|
alias: '--skip-confirmation',
|
|
111
116
|
description: 'Skip all confirmation prompts',
|
|
@@ -221,6 +226,7 @@ exports.uploadOptions = [
|
|
|
221
226
|
exports.optionMap.maxFinalizeMs,
|
|
222
227
|
exports.optionMap.chunkByteCount,
|
|
223
228
|
exports.optionMap.chunkingMode,
|
|
229
|
+
exports.optionMap.showProgress,
|
|
224
230
|
...onDemandOptions,
|
|
225
231
|
];
|
|
226
232
|
exports.uploadFolderOptions = [
|
|
@@ -0,0 +1,284 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.FileUploadProgress = exports.FolderUploadProgress = void 0;
|
|
7
|
+
/**
|
|
8
|
+
* Copyright (C) 2022-2024 Permanent Data Solutions, Inc.
|
|
9
|
+
*
|
|
10
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
11
|
+
* you may not use this file except in compliance with the License.
|
|
12
|
+
* You may obtain a copy of the License at
|
|
13
|
+
*
|
|
14
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
15
|
+
*
|
|
16
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
17
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
18
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
19
|
+
* See the License for the specific language governing permissions and
|
|
20
|
+
* limitations under the License.
|
|
21
|
+
*/
|
|
22
|
+
const cli_progress_1 = __importDefault(require("cli-progress"));
|
|
23
|
+
/**
|
|
24
|
+
* Formats bytes to human-readable format (KiB, MiB, GiB)
|
|
25
|
+
*/
|
|
26
|
+
function formatBytes(bytes) {
|
|
27
|
+
if (bytes === 0)
|
|
28
|
+
return '0 B';
|
|
29
|
+
const k = 1024;
|
|
30
|
+
const sizes = ['B', 'KiB', 'MiB', 'GiB'];
|
|
31
|
+
const i = Math.floor(Math.log(bytes) / Math.log(k));
|
|
32
|
+
return `${(bytes / Math.pow(k, i)).toFixed(2)} ${sizes[i]}`;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Progress bar manager for folder uploads in CLI
|
|
36
|
+
*/
|
|
37
|
+
class FolderUploadProgress {
|
|
38
|
+
constructor(enabled = true) {
|
|
39
|
+
this.totalFiles = 0;
|
|
40
|
+
this.totalBytes = 0;
|
|
41
|
+
this.enabled = enabled;
|
|
42
|
+
this.isTTY = process.stdout.isTTY ?? false;
|
|
43
|
+
// Initialize event handlers
|
|
44
|
+
this.events = {
|
|
45
|
+
onFileStart: this.onFileStart.bind(this),
|
|
46
|
+
onFileProgress: this.onFileProgress.bind(this),
|
|
47
|
+
onFileComplete: this.onFileComplete.bind(this),
|
|
48
|
+
onFileError: this.onFileError.bind(this),
|
|
49
|
+
onFolderProgress: this.onFolderProgress.bind(this),
|
|
50
|
+
onFolderError: this.onFolderError.bind(this),
|
|
51
|
+
onFolderSuccess: this.onFolderSuccess.bind(this),
|
|
52
|
+
};
|
|
53
|
+
// Only create progress bars if enabled and we have a TTY
|
|
54
|
+
if (this.enabled && this.isTTY) {
|
|
55
|
+
this.multibar = new cli_progress_1.default.MultiBar({
|
|
56
|
+
clearOnComplete: false,
|
|
57
|
+
hideCursor: true,
|
|
58
|
+
format: '{bar} | {percentage}% | {status}',
|
|
59
|
+
barCompleteChar: '\u2588',
|
|
60
|
+
barIncompleteChar: '\u2591',
|
|
61
|
+
stopOnComplete: true,
|
|
62
|
+
}, cli_progress_1.default.Presets.shades_classic);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Handle file upload start event
|
|
67
|
+
*/
|
|
68
|
+
onFileStart(event) {
|
|
69
|
+
const { fileName, fileSize, fileIndex, totalFiles } = event;
|
|
70
|
+
if (!this.enabled || !this.isTTY || !this.multibar) {
|
|
71
|
+
// Fallback to simple console output
|
|
72
|
+
if (this.enabled) {
|
|
73
|
+
console.log(`[${fileIndex + 1}/${totalFiles}] Uploading: ${fileName} (${formatBytes(fileSize)})`);
|
|
74
|
+
}
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
// Create or update file progress bar
|
|
78
|
+
if (!this.fileBar) {
|
|
79
|
+
this.fileBar = this.multibar.create(fileSize, 0, {
|
|
80
|
+
status: `File: ${fileName}`,
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
else {
|
|
84
|
+
this.fileBar.setTotal(fileSize);
|
|
85
|
+
this.fileBar.update(0, {
|
|
86
|
+
status: `File: ${fileName}`,
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Handle file upload progress event
|
|
92
|
+
*/
|
|
93
|
+
onFileProgress(event) {
|
|
94
|
+
const { fileProcessedBytes } = event;
|
|
95
|
+
if (!this.enabled || !this.isTTY || !this.fileBar) {
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
this.fileBar.update(fileProcessedBytes);
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Handle file upload complete event
|
|
102
|
+
*/
|
|
103
|
+
onFileComplete(event) {
|
|
104
|
+
const { fileName, fileIndex, totalFiles } = event;
|
|
105
|
+
if (!this.enabled || !this.isTTY || !this.fileBar) {
|
|
106
|
+
// Fallback to simple console output
|
|
107
|
+
if (this.enabled) {
|
|
108
|
+
console.log(`✓ [${fileIndex + 1}/${totalFiles}] Completed: ${fileName}`);
|
|
109
|
+
}
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
// Get the current total and complete the file bar
|
|
113
|
+
const currentTotal = this.fileBar.getTotal();
|
|
114
|
+
this.fileBar.update(currentTotal, {
|
|
115
|
+
status: `✓ ${fileName}`,
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Handle file upload error event
|
|
120
|
+
*/
|
|
121
|
+
onFileError(event) {
|
|
122
|
+
const { fileName, error } = event;
|
|
123
|
+
if (!this.enabled || !this.isTTY) {
|
|
124
|
+
if (this.enabled) {
|
|
125
|
+
console.error(`✗ Failed: ${fileName} - ${error.message}`);
|
|
126
|
+
}
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
129
|
+
// Stop the file bar and show error
|
|
130
|
+
if (this.fileBar) {
|
|
131
|
+
this.fileBar.stop();
|
|
132
|
+
}
|
|
133
|
+
console.error(`✗ Failed: ${fileName} - ${error.message}`);
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* Handle folder progress event
|
|
137
|
+
*/
|
|
138
|
+
onFolderProgress(event) {
|
|
139
|
+
const { processedFiles, totalFiles, processedBytes, totalBytes } = event;
|
|
140
|
+
this.totalFiles = totalFiles;
|
|
141
|
+
this.totalBytes = totalBytes;
|
|
142
|
+
if (!this.enabled || !this.isTTY || !this.multibar) {
|
|
143
|
+
return;
|
|
144
|
+
}
|
|
145
|
+
// Create folder progress bar on first call
|
|
146
|
+
if (!this.folderBar) {
|
|
147
|
+
this.folderBar = this.multibar.create(totalFiles, processedFiles, {
|
|
148
|
+
status: `Overall: ${processedFiles}/${totalFiles} files (${formatBytes(processedBytes)}/${formatBytes(totalBytes)})`,
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
else {
|
|
152
|
+
this.folderBar.update(processedFiles, {
|
|
153
|
+
status: `Overall: ${processedFiles}/${totalFiles} files (${formatBytes(processedBytes)}/${formatBytes(totalBytes)})`,
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* Handle folder error event
|
|
159
|
+
*/
|
|
160
|
+
onFolderError(error) {
|
|
161
|
+
if (!this.enabled) {
|
|
162
|
+
return;
|
|
163
|
+
}
|
|
164
|
+
this.stop();
|
|
165
|
+
console.error(`\n✗ Folder upload failed: ${error.message}`);
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* Handle folder success event
|
|
169
|
+
*/
|
|
170
|
+
onFolderSuccess() {
|
|
171
|
+
if (!this.enabled || !this.isTTY) {
|
|
172
|
+
if (this.enabled) {
|
|
173
|
+
console.log(`\n✓ Folder upload complete! (${this.totalFiles} files, ${formatBytes(this.totalBytes)})`);
|
|
174
|
+
}
|
|
175
|
+
return;
|
|
176
|
+
}
|
|
177
|
+
// Complete all progress bars
|
|
178
|
+
if (this.folderBar) {
|
|
179
|
+
this.folderBar.update(this.totalFiles, {
|
|
180
|
+
status: `✓ Complete: ${this.totalFiles} files (${formatBytes(this.totalBytes)})`,
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* Stop and clean up progress bars
|
|
186
|
+
*/
|
|
187
|
+
stop() {
|
|
188
|
+
if (this.multibar) {
|
|
189
|
+
this.multibar.stop();
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
exports.FolderUploadProgress = FolderUploadProgress;
|
|
194
|
+
/**
|
|
195
|
+
* Progress bar manager for file uploads in CLI
|
|
196
|
+
*/
|
|
197
|
+
class FileUploadProgress {
|
|
198
|
+
constructor(enabled = true) {
|
|
199
|
+
this.totalBytes = 0;
|
|
200
|
+
this.enabled = enabled;
|
|
201
|
+
this.isTTY = process.stdout.isTTY ?? false;
|
|
202
|
+
// Initialize event handlers
|
|
203
|
+
this.events = {
|
|
204
|
+
onProgress: ({ processedBytes }) => {
|
|
205
|
+
this.update(processedBytes);
|
|
206
|
+
},
|
|
207
|
+
onSuccess: () => {
|
|
208
|
+
this.complete();
|
|
209
|
+
},
|
|
210
|
+
onError: (error) => {
|
|
211
|
+
this.error(error);
|
|
212
|
+
},
|
|
213
|
+
};
|
|
214
|
+
}
|
|
215
|
+
/**
|
|
216
|
+
* Initialize progress bar with total size
|
|
217
|
+
*/
|
|
218
|
+
start(totalBytes, fileName) {
|
|
219
|
+
this.totalBytes = totalBytes;
|
|
220
|
+
if (!this.enabled || !this.isTTY) {
|
|
221
|
+
if (this.enabled && fileName !== undefined && fileName !== '') {
|
|
222
|
+
console.log(`Uploading: ${fileName} (${formatBytes(totalBytes)})`);
|
|
223
|
+
}
|
|
224
|
+
return;
|
|
225
|
+
}
|
|
226
|
+
this.bar = new cli_progress_1.default.SingleBar({
|
|
227
|
+
format: '{bar} | {percentage}% | {status}',
|
|
228
|
+
barCompleteChar: '\u2588',
|
|
229
|
+
barIncompleteChar: '\u2591',
|
|
230
|
+
hideCursor: true,
|
|
231
|
+
}, cli_progress_1.default.Presets.shades_classic);
|
|
232
|
+
this.bar.start(totalBytes, 0, {
|
|
233
|
+
status: fileName !== undefined && fileName !== ''
|
|
234
|
+
? `Uploading: ${fileName} (${formatBytes(totalBytes)})`
|
|
235
|
+
: `Uploading (${formatBytes(totalBytes)})`,
|
|
236
|
+
});
|
|
237
|
+
}
|
|
238
|
+
/**
|
|
239
|
+
* Update progress
|
|
240
|
+
*/
|
|
241
|
+
update(processedBytes) {
|
|
242
|
+
if (!this.enabled || !this.isTTY || !this.bar) {
|
|
243
|
+
return;
|
|
244
|
+
}
|
|
245
|
+
this.bar.update(processedBytes, {
|
|
246
|
+
status: `${formatBytes(processedBytes)}/${formatBytes(this.totalBytes)}`,
|
|
247
|
+
});
|
|
248
|
+
}
|
|
249
|
+
/**
|
|
250
|
+
* Mark as complete
|
|
251
|
+
*/
|
|
252
|
+
complete() {
|
|
253
|
+
if (!this.enabled || !this.isTTY || !this.bar) {
|
|
254
|
+
if (this.enabled) {
|
|
255
|
+
console.log(`✓ Upload complete (${formatBytes(this.totalBytes)})`);
|
|
256
|
+
}
|
|
257
|
+
return;
|
|
258
|
+
}
|
|
259
|
+
this.bar.update(this.totalBytes, {
|
|
260
|
+
status: `✓ Complete (${formatBytes(this.totalBytes)})`,
|
|
261
|
+
});
|
|
262
|
+
this.bar.stop();
|
|
263
|
+
}
|
|
264
|
+
/**
|
|
265
|
+
* Handle error
|
|
266
|
+
*/
|
|
267
|
+
error(error) {
|
|
268
|
+
if (this.bar) {
|
|
269
|
+
this.bar.stop();
|
|
270
|
+
}
|
|
271
|
+
if (this.enabled) {
|
|
272
|
+
console.error(`✗ Upload failed: ${error.message}`);
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
/**
|
|
276
|
+
* Stop progress bar
|
|
277
|
+
*/
|
|
278
|
+
stop() {
|
|
279
|
+
if (this.bar) {
|
|
280
|
+
this.bar.stop();
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
exports.FileUploadProgress = FileUploadProgress;
|
package/lib/cjs/utils/common.js
CHANGED
|
@@ -43,7 +43,7 @@ function sleep(ms) {
|
|
|
43
43
|
function isWeb() {
|
|
44
44
|
return typeof window !== 'undefined';
|
|
45
45
|
}
|
|
46
|
-
const ethTestnetRpc = 'https://
|
|
46
|
+
const ethTestnetRpc = 'https://sepolia.gateway.tenderly.co';
|
|
47
47
|
const baseTestnetRpc = 'https://sepolia.base.org';
|
|
48
48
|
const polygonTestnetRpc = 'https://rpc-amoy.polygon.technology';
|
|
49
49
|
exports.tokenToDevGatewayMap = {
|
package/lib/cjs/version.js
CHANGED
|
@@ -14,7 +14,9 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import { createReadStream, statSync } from 'fs';
|
|
17
|
+
import { basename } from 'path';
|
|
17
18
|
import { turboCliTags } from '../constants.js';
|
|
19
|
+
import { FileUploadProgress } from '../progress.js';
|
|
18
20
|
import { getChunkingOptions, getTagsFromOptions, onDemandOptionsFromOptions, paidByFromOptions, turboFromOptions, } from '../utils.js';
|
|
19
21
|
export async function uploadFile(options) {
|
|
20
22
|
const { filePath } = options;
|
|
@@ -25,12 +27,27 @@ export async function uploadFile(options) {
|
|
|
25
27
|
const paidBy = await paidByFromOptions(options, turbo);
|
|
26
28
|
const customTags = getTagsFromOptions(options);
|
|
27
29
|
const fileSize = statSync(filePath).size;
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
30
|
+
const fileName = basename(filePath);
|
|
31
|
+
const showProgress = options.showProgress;
|
|
32
|
+
// Create progress tracker
|
|
33
|
+
const progress = new FileUploadProgress(showProgress);
|
|
34
|
+
progress.start(fileSize, fileName);
|
|
35
|
+
try {
|
|
36
|
+
const result = await turbo.uploadFile({
|
|
37
|
+
fileStreamFactory: () => createReadStream(filePath),
|
|
38
|
+
fileSizeFactory: () => fileSize,
|
|
39
|
+
dataItemOpts: { tags: [...turboCliTags, ...customTags], paidBy },
|
|
40
|
+
...getChunkingOptions(options),
|
|
41
|
+
...onDemandOptionsFromOptions(options),
|
|
42
|
+
events: progress.events,
|
|
43
|
+
});
|
|
44
|
+
progress.stop();
|
|
45
|
+
// Add newline before output only if progress was shown
|
|
46
|
+
const prefix = showProgress ? '\n' : '';
|
|
47
|
+
console.log(`${prefix}Uploaded file:`, JSON.stringify(result, null, 2));
|
|
48
|
+
}
|
|
49
|
+
catch (error) {
|
|
50
|
+
progress.stop();
|
|
51
|
+
throw error;
|
|
52
|
+
}
|
|
36
53
|
}
|
|
@@ -14,12 +14,16 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import { turboCliTags } from '../constants.js';
|
|
17
|
+
import { FolderUploadProgress } from '../progress.js';
|
|
17
18
|
import { getTagsFromOptions, getUploadFolderOptions, onDemandOptionsFromOptions, paidByFromOptions, turboFromOptions, } from '../utils.js';
|
|
18
19
|
export async function uploadFolder(options) {
|
|
19
20
|
const turbo = await turboFromOptions(options);
|
|
20
21
|
const paidBy = await paidByFromOptions(options, turbo);
|
|
22
|
+
const showProgress = options.showProgress;
|
|
21
23
|
const { disableManifest, fallbackFile, folderPath, indexFile, maxConcurrentUploads, chunkByteCount, chunkingMode, maxChunkConcurrency, maxFinalizeMs, } = getUploadFolderOptions(options);
|
|
22
24
|
const customTags = getTagsFromOptions(options);
|
|
25
|
+
// Create progress tracker
|
|
26
|
+
const progress = new FolderUploadProgress(showProgress);
|
|
23
27
|
const result = await turbo.uploadFolder({
|
|
24
28
|
folderPath: folderPath,
|
|
25
29
|
dataItemOpts: { tags: [...turboCliTags, ...customTags], paidBy },
|
|
@@ -34,6 +38,10 @@ export async function uploadFolder(options) {
|
|
|
34
38
|
maxChunkConcurrency,
|
|
35
39
|
maxFinalizeMs,
|
|
36
40
|
...onDemandOptionsFromOptions(options),
|
|
41
|
+
events: progress.events,
|
|
37
42
|
});
|
|
38
|
-
|
|
43
|
+
progress.stop();
|
|
44
|
+
// Add newline before output only if progress was shown
|
|
45
|
+
const prefix = showProgress ? '\n' : '';
|
|
46
|
+
console.log(`${prefix}Uploaded folder:`, JSON.stringify(result, null, 2));
|
|
39
47
|
}
|
package/lib/esm/cli/options.js
CHANGED
|
@@ -103,6 +103,11 @@ export const optionMap = {
|
|
|
103
103
|
description: 'Disable logging',
|
|
104
104
|
default: false,
|
|
105
105
|
},
|
|
106
|
+
showProgress: {
|
|
107
|
+
alias: '--show-progress',
|
|
108
|
+
description: 'Display progress bars during upload operations',
|
|
109
|
+
default: false,
|
|
110
|
+
},
|
|
106
111
|
skipConfirmation: {
|
|
107
112
|
alias: '--skip-confirmation',
|
|
108
113
|
description: 'Skip all confirmation prompts',
|
|
@@ -218,6 +223,7 @@ export const uploadOptions = [
|
|
|
218
223
|
optionMap.maxFinalizeMs,
|
|
219
224
|
optionMap.chunkByteCount,
|
|
220
225
|
optionMap.chunkingMode,
|
|
226
|
+
optionMap.showProgress,
|
|
221
227
|
...onDemandOptions,
|
|
222
228
|
];
|
|
223
229
|
export const uploadFolderOptions = [
|
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (C) 2022-2024 Permanent Data Solutions, Inc.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import cliProgress from 'cli-progress';
|
|
17
|
+
/**
|
|
18
|
+
* Formats bytes to human-readable format (KiB, MiB, GiB)
|
|
19
|
+
*/
|
|
20
|
+
function formatBytes(bytes) {
|
|
21
|
+
if (bytes === 0)
|
|
22
|
+
return '0 B';
|
|
23
|
+
const k = 1024;
|
|
24
|
+
const sizes = ['B', 'KiB', 'MiB', 'GiB'];
|
|
25
|
+
const i = Math.floor(Math.log(bytes) / Math.log(k));
|
|
26
|
+
return `${(bytes / Math.pow(k, i)).toFixed(2)} ${sizes[i]}`;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Progress bar manager for folder uploads in CLI
|
|
30
|
+
*/
|
|
31
|
+
export class FolderUploadProgress {
|
|
32
|
+
constructor(enabled = true) {
|
|
33
|
+
this.totalFiles = 0;
|
|
34
|
+
this.totalBytes = 0;
|
|
35
|
+
this.enabled = enabled;
|
|
36
|
+
this.isTTY = process.stdout.isTTY ?? false;
|
|
37
|
+
// Initialize event handlers
|
|
38
|
+
this.events = {
|
|
39
|
+
onFileStart: this.onFileStart.bind(this),
|
|
40
|
+
onFileProgress: this.onFileProgress.bind(this),
|
|
41
|
+
onFileComplete: this.onFileComplete.bind(this),
|
|
42
|
+
onFileError: this.onFileError.bind(this),
|
|
43
|
+
onFolderProgress: this.onFolderProgress.bind(this),
|
|
44
|
+
onFolderError: this.onFolderError.bind(this),
|
|
45
|
+
onFolderSuccess: this.onFolderSuccess.bind(this),
|
|
46
|
+
};
|
|
47
|
+
// Only create progress bars if enabled and we have a TTY
|
|
48
|
+
if (this.enabled && this.isTTY) {
|
|
49
|
+
this.multibar = new cliProgress.MultiBar({
|
|
50
|
+
clearOnComplete: false,
|
|
51
|
+
hideCursor: true,
|
|
52
|
+
format: '{bar} | {percentage}% | {status}',
|
|
53
|
+
barCompleteChar: '\u2588',
|
|
54
|
+
barIncompleteChar: '\u2591',
|
|
55
|
+
stopOnComplete: true,
|
|
56
|
+
}, cliProgress.Presets.shades_classic);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Handle file upload start event
|
|
61
|
+
*/
|
|
62
|
+
onFileStart(event) {
|
|
63
|
+
const { fileName, fileSize, fileIndex, totalFiles } = event;
|
|
64
|
+
if (!this.enabled || !this.isTTY || !this.multibar) {
|
|
65
|
+
// Fallback to simple console output
|
|
66
|
+
if (this.enabled) {
|
|
67
|
+
console.log(`[${fileIndex + 1}/${totalFiles}] Uploading: ${fileName} (${formatBytes(fileSize)})`);
|
|
68
|
+
}
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
// Create or update file progress bar
|
|
72
|
+
if (!this.fileBar) {
|
|
73
|
+
this.fileBar = this.multibar.create(fileSize, 0, {
|
|
74
|
+
status: `File: ${fileName}`,
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
else {
|
|
78
|
+
this.fileBar.setTotal(fileSize);
|
|
79
|
+
this.fileBar.update(0, {
|
|
80
|
+
status: `File: ${fileName}`,
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Handle file upload progress event
|
|
86
|
+
*/
|
|
87
|
+
onFileProgress(event) {
|
|
88
|
+
const { fileProcessedBytes } = event;
|
|
89
|
+
if (!this.enabled || !this.isTTY || !this.fileBar) {
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
this.fileBar.update(fileProcessedBytes);
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Handle file upload complete event
|
|
96
|
+
*/
|
|
97
|
+
onFileComplete(event) {
|
|
98
|
+
const { fileName, fileIndex, totalFiles } = event;
|
|
99
|
+
if (!this.enabled || !this.isTTY || !this.fileBar) {
|
|
100
|
+
// Fallback to simple console output
|
|
101
|
+
if (this.enabled) {
|
|
102
|
+
console.log(`✓ [${fileIndex + 1}/${totalFiles}] Completed: ${fileName}`);
|
|
103
|
+
}
|
|
104
|
+
return;
|
|
105
|
+
}
|
|
106
|
+
// Get the current total and complete the file bar
|
|
107
|
+
const currentTotal = this.fileBar.getTotal();
|
|
108
|
+
this.fileBar.update(currentTotal, {
|
|
109
|
+
status: `✓ ${fileName}`,
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Handle file upload error event
|
|
114
|
+
*/
|
|
115
|
+
onFileError(event) {
|
|
116
|
+
const { fileName, error } = event;
|
|
117
|
+
if (!this.enabled || !this.isTTY) {
|
|
118
|
+
if (this.enabled) {
|
|
119
|
+
console.error(`✗ Failed: ${fileName} - ${error.message}`);
|
|
120
|
+
}
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
// Stop the file bar and show error
|
|
124
|
+
if (this.fileBar) {
|
|
125
|
+
this.fileBar.stop();
|
|
126
|
+
}
|
|
127
|
+
console.error(`✗ Failed: ${fileName} - ${error.message}`);
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Handle folder progress event
|
|
131
|
+
*/
|
|
132
|
+
onFolderProgress(event) {
|
|
133
|
+
const { processedFiles, totalFiles, processedBytes, totalBytes } = event;
|
|
134
|
+
this.totalFiles = totalFiles;
|
|
135
|
+
this.totalBytes = totalBytes;
|
|
136
|
+
if (!this.enabled || !this.isTTY || !this.multibar) {
|
|
137
|
+
return;
|
|
138
|
+
}
|
|
139
|
+
// Create folder progress bar on first call
|
|
140
|
+
if (!this.folderBar) {
|
|
141
|
+
this.folderBar = this.multibar.create(totalFiles, processedFiles, {
|
|
142
|
+
status: `Overall: ${processedFiles}/${totalFiles} files (${formatBytes(processedBytes)}/${formatBytes(totalBytes)})`,
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
else {
|
|
146
|
+
this.folderBar.update(processedFiles, {
|
|
147
|
+
status: `Overall: ${processedFiles}/${totalFiles} files (${formatBytes(processedBytes)}/${formatBytes(totalBytes)})`,
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Handle folder error event
|
|
153
|
+
*/
|
|
154
|
+
onFolderError(error) {
|
|
155
|
+
if (!this.enabled) {
|
|
156
|
+
return;
|
|
157
|
+
}
|
|
158
|
+
this.stop();
|
|
159
|
+
console.error(`\n✗ Folder upload failed: ${error.message}`);
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* Handle folder success event
|
|
163
|
+
*/
|
|
164
|
+
onFolderSuccess() {
|
|
165
|
+
if (!this.enabled || !this.isTTY) {
|
|
166
|
+
if (this.enabled) {
|
|
167
|
+
console.log(`\n✓ Folder upload complete! (${this.totalFiles} files, ${formatBytes(this.totalBytes)})`);
|
|
168
|
+
}
|
|
169
|
+
return;
|
|
170
|
+
}
|
|
171
|
+
// Complete all progress bars
|
|
172
|
+
if (this.folderBar) {
|
|
173
|
+
this.folderBar.update(this.totalFiles, {
|
|
174
|
+
status: `✓ Complete: ${this.totalFiles} files (${formatBytes(this.totalBytes)})`,
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* Stop and clean up progress bars
|
|
180
|
+
*/
|
|
181
|
+
stop() {
|
|
182
|
+
if (this.multibar) {
|
|
183
|
+
this.multibar.stop();
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* Progress bar manager for file uploads in CLI
|
|
189
|
+
*/
|
|
190
|
+
export class FileUploadProgress {
|
|
191
|
+
constructor(enabled = true) {
|
|
192
|
+
this.totalBytes = 0;
|
|
193
|
+
this.enabled = enabled;
|
|
194
|
+
this.isTTY = process.stdout.isTTY ?? false;
|
|
195
|
+
// Initialize event handlers
|
|
196
|
+
this.events = {
|
|
197
|
+
onProgress: ({ processedBytes }) => {
|
|
198
|
+
this.update(processedBytes);
|
|
199
|
+
},
|
|
200
|
+
onSuccess: () => {
|
|
201
|
+
this.complete();
|
|
202
|
+
},
|
|
203
|
+
onError: (error) => {
|
|
204
|
+
this.error(error);
|
|
205
|
+
},
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
/**
|
|
209
|
+
* Initialize progress bar with total size
|
|
210
|
+
*/
|
|
211
|
+
start(totalBytes, fileName) {
|
|
212
|
+
this.totalBytes = totalBytes;
|
|
213
|
+
if (!this.enabled || !this.isTTY) {
|
|
214
|
+
if (this.enabled && fileName !== undefined && fileName !== '') {
|
|
215
|
+
console.log(`Uploading: ${fileName} (${formatBytes(totalBytes)})`);
|
|
216
|
+
}
|
|
217
|
+
return;
|
|
218
|
+
}
|
|
219
|
+
this.bar = new cliProgress.SingleBar({
|
|
220
|
+
format: '{bar} | {percentage}% | {status}',
|
|
221
|
+
barCompleteChar: '\u2588',
|
|
222
|
+
barIncompleteChar: '\u2591',
|
|
223
|
+
hideCursor: true,
|
|
224
|
+
}, cliProgress.Presets.shades_classic);
|
|
225
|
+
this.bar.start(totalBytes, 0, {
|
|
226
|
+
status: fileName !== undefined && fileName !== ''
|
|
227
|
+
? `Uploading: ${fileName} (${formatBytes(totalBytes)})`
|
|
228
|
+
: `Uploading (${formatBytes(totalBytes)})`,
|
|
229
|
+
});
|
|
230
|
+
}
|
|
231
|
+
/**
|
|
232
|
+
* Update progress
|
|
233
|
+
*/
|
|
234
|
+
update(processedBytes) {
|
|
235
|
+
if (!this.enabled || !this.isTTY || !this.bar) {
|
|
236
|
+
return;
|
|
237
|
+
}
|
|
238
|
+
this.bar.update(processedBytes, {
|
|
239
|
+
status: `${formatBytes(processedBytes)}/${formatBytes(this.totalBytes)}`,
|
|
240
|
+
});
|
|
241
|
+
}
|
|
242
|
+
/**
|
|
243
|
+
* Mark as complete
|
|
244
|
+
*/
|
|
245
|
+
complete() {
|
|
246
|
+
if (!this.enabled || !this.isTTY || !this.bar) {
|
|
247
|
+
if (this.enabled) {
|
|
248
|
+
console.log(`✓ Upload complete (${formatBytes(this.totalBytes)})`);
|
|
249
|
+
}
|
|
250
|
+
return;
|
|
251
|
+
}
|
|
252
|
+
this.bar.update(this.totalBytes, {
|
|
253
|
+
status: `✓ Complete (${formatBytes(this.totalBytes)})`,
|
|
254
|
+
});
|
|
255
|
+
this.bar.stop();
|
|
256
|
+
}
|
|
257
|
+
/**
|
|
258
|
+
* Handle error
|
|
259
|
+
*/
|
|
260
|
+
error(error) {
|
|
261
|
+
if (this.bar) {
|
|
262
|
+
this.bar.stop();
|
|
263
|
+
}
|
|
264
|
+
if (this.enabled) {
|
|
265
|
+
console.error(`✗ Upload failed: ${error.message}`);
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
/**
|
|
269
|
+
* Stop progress bar
|
|
270
|
+
*/
|
|
271
|
+
stop() {
|
|
272
|
+
if (this.bar) {
|
|
273
|
+
this.bar.stop();
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
}
|
package/lib/esm/utils/common.js
CHANGED
|
@@ -28,7 +28,7 @@ export function sleep(ms) {
|
|
|
28
28
|
export function isWeb() {
|
|
29
29
|
return typeof window !== 'undefined';
|
|
30
30
|
}
|
|
31
|
-
const ethTestnetRpc = 'https://
|
|
31
|
+
const ethTestnetRpc = 'https://sepolia.gateway.tenderly.co';
|
|
32
32
|
const baseTestnetRpc = 'https://sepolia.base.org';
|
|
33
33
|
const polygonTestnetRpc = 'https://rpc-amoy.polygon.technology';
|
|
34
34
|
export const tokenToDevGatewayMap = {
|
package/lib/esm/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uploadFile.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/uploadFile.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"uploadFile.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/uploadFile.ts"],"names":[],"mappings":"AAoBA,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAShD,wBAAsB,UAAU,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,CAoC1E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uploadFolder.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/uploadFolder.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"uploadFolder.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/uploadFolder.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AASlD,wBAAsB,YAAY,CAChC,OAAO,EAAE,mBAAmB,GAC3B,OAAO,CAAC,IAAI,CAAC,CA4Cf"}
|
|
@@ -103,6 +103,11 @@ export declare const optionMap: {
|
|
|
103
103
|
readonly description: "Disable logging";
|
|
104
104
|
readonly default: false;
|
|
105
105
|
};
|
|
106
|
+
readonly showProgress: {
|
|
107
|
+
readonly alias: "--show-progress";
|
|
108
|
+
readonly description: "Display progress bars during upload operations";
|
|
109
|
+
readonly default: false;
|
|
110
|
+
};
|
|
106
111
|
readonly skipConfirmation: {
|
|
107
112
|
readonly alias: "--skip-confirmation";
|
|
108
113
|
readonly description: "Skip all confirmation prompts";
|
|
@@ -247,6 +252,10 @@ export declare const uploadOptions: ({
|
|
|
247
252
|
} | {
|
|
248
253
|
readonly alias: "-p, --private-key <key>";
|
|
249
254
|
readonly description: "Private key to use with the action";
|
|
255
|
+
} | {
|
|
256
|
+
readonly alias: "--show-progress";
|
|
257
|
+
readonly description: "Display progress bars during upload operations";
|
|
258
|
+
readonly default: false;
|
|
250
259
|
} | {
|
|
251
260
|
readonly alias: "--paid-by <paidBy...>";
|
|
252
261
|
readonly description: "Address to pay for the upload";
|
|
@@ -296,6 +305,10 @@ export declare const uploadFolderOptions: ({
|
|
|
296
305
|
} | {
|
|
297
306
|
readonly alias: "-p, --private-key <key>";
|
|
298
307
|
readonly description: "Private key to use with the action";
|
|
308
|
+
} | {
|
|
309
|
+
readonly alias: "--show-progress";
|
|
310
|
+
readonly description: "Display progress bars during upload operations";
|
|
311
|
+
readonly default: false;
|
|
299
312
|
} | {
|
|
300
313
|
readonly alias: "-f, --folder-path <folderPath>";
|
|
301
314
|
readonly description: "Directory to upload";
|
|
@@ -361,6 +374,10 @@ export declare const uploadFileOptions: ({
|
|
|
361
374
|
} | {
|
|
362
375
|
readonly alias: "-p, --private-key <key>";
|
|
363
376
|
readonly description: "Private key to use with the action";
|
|
377
|
+
} | {
|
|
378
|
+
readonly alias: "--show-progress";
|
|
379
|
+
readonly description: "Display progress bars during upload operations";
|
|
380
|
+
readonly default: false;
|
|
364
381
|
} | {
|
|
365
382
|
readonly alias: "-f, --file-path <filePath>";
|
|
366
383
|
readonly description: "File to upload";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../../src/cli/options.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,eAAO,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../../src/cli/options.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8LZ,CAAC;AAEX,eAAO,MAAM,aAAa;;;;;;;;;IAIzB,CAAC;AAEF,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAUzB,CAAC;AAQF,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAYzB,CAAC;AAEF,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAO/B,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAAyC,CAAC;AAExE,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;IAK/B,CAAC;AAEF,eAAO,MAAM,oBAAoB;;;;;;;;;;;;IAAwC,CAAC;AAE1E,eAAO,MAAM,iBAAiB;;;;;;;;;;;;IAAuB,CAAC"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { TurboFolderUploadEmitterEventArgs, TurboFolderUploadEventsAndPayloads } from '../types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Progress bar manager for folder uploads in CLI
|
|
4
|
+
*/
|
|
5
|
+
export declare class FolderUploadProgress {
|
|
6
|
+
private multibar?;
|
|
7
|
+
private folderBar?;
|
|
8
|
+
private fileBar?;
|
|
9
|
+
private readonly enabled;
|
|
10
|
+
private readonly isTTY;
|
|
11
|
+
private totalFiles;
|
|
12
|
+
private totalBytes;
|
|
13
|
+
/**
|
|
14
|
+
* Event handlers that can be passed directly to uploadFolder
|
|
15
|
+
*/
|
|
16
|
+
readonly events: Required<TurboFolderUploadEmitterEventArgs>;
|
|
17
|
+
constructor(enabled?: boolean);
|
|
18
|
+
/**
|
|
19
|
+
* Handle file upload start event
|
|
20
|
+
*/
|
|
21
|
+
onFileStart(event: TurboFolderUploadEventsAndPayloads['file-upload-start']): void;
|
|
22
|
+
/**
|
|
23
|
+
* Handle file upload progress event
|
|
24
|
+
*/
|
|
25
|
+
onFileProgress(event: TurboFolderUploadEventsAndPayloads['file-upload-progress']): void;
|
|
26
|
+
/**
|
|
27
|
+
* Handle file upload complete event
|
|
28
|
+
*/
|
|
29
|
+
onFileComplete(event: TurboFolderUploadEventsAndPayloads['file-upload-complete']): void;
|
|
30
|
+
/**
|
|
31
|
+
* Handle file upload error event
|
|
32
|
+
*/
|
|
33
|
+
onFileError(event: TurboFolderUploadEventsAndPayloads['file-upload-error']): void;
|
|
34
|
+
/**
|
|
35
|
+
* Handle folder progress event
|
|
36
|
+
*/
|
|
37
|
+
onFolderProgress(event: TurboFolderUploadEventsAndPayloads['folder-progress']): void;
|
|
38
|
+
/**
|
|
39
|
+
* Handle folder error event
|
|
40
|
+
*/
|
|
41
|
+
onFolderError(error: TurboFolderUploadEventsAndPayloads['folder-error']): void;
|
|
42
|
+
/**
|
|
43
|
+
* Handle folder success event
|
|
44
|
+
*/
|
|
45
|
+
onFolderSuccess(): void;
|
|
46
|
+
/**
|
|
47
|
+
* Stop and clean up progress bars
|
|
48
|
+
*/
|
|
49
|
+
stop(): void;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Progress bar manager for file uploads in CLI
|
|
53
|
+
*/
|
|
54
|
+
export declare class FileUploadProgress {
|
|
55
|
+
private bar?;
|
|
56
|
+
private readonly enabled;
|
|
57
|
+
private readonly isTTY;
|
|
58
|
+
private totalBytes;
|
|
59
|
+
/**
|
|
60
|
+
* Event handlers that can be passed directly to uploadFile
|
|
61
|
+
*/
|
|
62
|
+
readonly events: {
|
|
63
|
+
onProgress: (event: {
|
|
64
|
+
totalBytes: number;
|
|
65
|
+
processedBytes: number;
|
|
66
|
+
}) => void;
|
|
67
|
+
onSuccess: () => void;
|
|
68
|
+
onError: (error: Error) => void;
|
|
69
|
+
};
|
|
70
|
+
constructor(enabled?: boolean);
|
|
71
|
+
/**
|
|
72
|
+
* Initialize progress bar with total size
|
|
73
|
+
*/
|
|
74
|
+
start(totalBytes: number, fileName?: string): void;
|
|
75
|
+
/**
|
|
76
|
+
* Update progress
|
|
77
|
+
*/
|
|
78
|
+
update(processedBytes: number): void;
|
|
79
|
+
/**
|
|
80
|
+
* Mark as complete
|
|
81
|
+
*/
|
|
82
|
+
complete(): void;
|
|
83
|
+
/**
|
|
84
|
+
* Handle error
|
|
85
|
+
*/
|
|
86
|
+
error(error: Error): void;
|
|
87
|
+
/**
|
|
88
|
+
* Stop progress bar
|
|
89
|
+
*/
|
|
90
|
+
stop(): void;
|
|
91
|
+
}
|
|
92
|
+
//# sourceMappingURL=progress.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"progress.d.ts","sourceRoot":"","sources":["../../../src/cli/progress.ts"],"names":[],"mappings":"AAiBA,OAAO,EACL,iCAAiC,EACjC,kCAAkC,EACnC,MAAM,aAAa,CAAC;AAarB;;GAEG;AACH,qBAAa,oBAAoB;IAC/B,OAAO,CAAC,QAAQ,CAAC,CAAuB;IACxC,OAAO,CAAC,SAAS,CAAC,CAAwB;IAC1C,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AAC;QACtB,OAAO,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;KACjC,CAAC;gBAEU,OAAO,UAAO;IAkB1B;;OAEG;IACH,KAAK,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI;IA4BlD;;OAEG;IACH,MAAM,CAAC,cAAc,EAAE,MAAM,GAAG,IAAI;IAUpC;;OAEG;IACH,QAAQ,IAAI,IAAI;IAchB;;OAEG;IACH,KAAK,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI;IASzB;;OAEG;IACH,IAAI,IAAI,IAAI;CAKb"}
|
package/lib/types/cli/types.d.ts
CHANGED
|
@@ -48,6 +48,7 @@ export type UploadOptions = WalletOptions & {
|
|
|
48
48
|
maxFinalizeMs: string | undefined;
|
|
49
49
|
chunkByteCount: string | undefined;
|
|
50
50
|
chunkingMode: TurboChunkingMode | undefined;
|
|
51
|
+
showProgress: boolean;
|
|
51
52
|
onDemand: boolean;
|
|
52
53
|
maxCryptoTopUpValue: string | undefined;
|
|
53
54
|
topUpBufferMultiplier: number | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/cli/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEhD,MAAM,MAAM,aAAa,GAAG;IAC1B,GAAG,EAAE,OAAO,CAAC;IACb,KAAK,EAAE,OAAO,CAAC;IACf,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,KAAK,EAAE,OAAO,CAAC;IACf,KAAK,EAAE,OAAO,CAAC;IACf,gBAAgB,EAAE,OAAO,CAAC;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,SAAS,EAAE,MAAM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AG,SAAS,CAAC;CAC7B,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG,aAAa,GAAG;IAChD,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,gBAAgB,EAAE,MAAM,GAAG,SAAS,CAAC;CACtC,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG,aAAa,GAAG;IACjD,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;CAC7B,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG,oBAAoB,CAAC"}
|
package/lib/types/version.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ardrive/turbo-sdk",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.36.0",
|
|
4
4
|
"main": "./lib/cjs/node/index.js",
|
|
5
5
|
"types": "./lib/types/node/index.d.ts",
|
|
6
6
|
"module": "./lib/esm/node/index.js",
|
|
@@ -90,6 +90,7 @@
|
|
|
90
90
|
"axios": "^1.9.0",
|
|
91
91
|
"bignumber.js": "^9.1.2",
|
|
92
92
|
"bs58": "^5.0.0",
|
|
93
|
+
"cli-progress": "^3.12.0",
|
|
93
94
|
"commander": "^12.1.0",
|
|
94
95
|
"ethers": "^6.12.0",
|
|
95
96
|
"eventemitter3": "^5.0.1",
|
|
@@ -105,10 +106,11 @@
|
|
|
105
106
|
"@commitlint/config-conventional": "^17.1.0",
|
|
106
107
|
"@esbuild-plugins/node-modules-polyfill": "^0.2.2",
|
|
107
108
|
"@semantic-release/changelog": "^6.0.3",
|
|
108
|
-
"@semantic-release/exec": "^
|
|
109
|
+
"@semantic-release/exec": "^7.1.0",
|
|
109
110
|
"@semantic-release/git": "^10.0.1",
|
|
110
111
|
"@trivago/prettier-plugin-sort-imports": "^4.2.0",
|
|
111
112
|
"@types/chai": "^4.3.5",
|
|
113
|
+
"@types/cli-progress": "^3.11.6",
|
|
112
114
|
"@types/eventemitter3": "^2.0.4",
|
|
113
115
|
"@types/mime-types": "^2.1.4",
|
|
114
116
|
"@types/mocha": "^10.0.1",
|
|
@@ -137,9 +139,10 @@
|
|
|
137
139
|
"node-fetch": "^3.3.2",
|
|
138
140
|
"prettier": "^3.0.2",
|
|
139
141
|
"rimraf": "^5.0.1",
|
|
140
|
-
"semantic-release": "^
|
|
142
|
+
"semantic-release": "^25.0.1",
|
|
141
143
|
"sinon": "^15.2.0",
|
|
142
144
|
"ts-node": "^10.9.1",
|
|
143
145
|
"typescript": "^5.5.4"
|
|
144
|
-
}
|
|
146
|
+
},
|
|
147
|
+
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
|
|
145
148
|
}
|