@ardrive/turbo-sdk 1.2.0-alpha.1 → 1.2.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 CHANGED
@@ -1,5 +1,7 @@
1
1
  # @ardriveapp/turbo-sdk 🚀
2
2
 
3
+ [![codecov](https://codecov.io/gh/ardriveapp/turbo-sdk/graph/badge.svg?token=CXS48HM8Y8)](https://codecov.io/gh/ardriveapp/turbo-sdk)
4
+
3
5
  Welcome to the `@ardrive/turbo-sdk`! This SDK provides functionality for interacting with the Turbo Upload and Payment Services and is available for both NodeJS and Web environments.
4
6
 
5
7
  ## Table of Contents
@@ -353,7 +355,7 @@ Types are exported from `./lib/types/[node/web]/index.d.ts` and should be automa
353
355
  }
354
356
  ```
355
357
 
356
- - `uploadFile({ fileStreamFactory, fileSizeFactory, signal })` - Signs and uploads a raw file. The provided `fileStreamFactory` should produce a NEW file data stream each time is it invoked. The `fileSizeFactory` is a function that returns the size of the file. The `signal` is an optional [AbortSignal] that can be used to cancel the upload or timeout the request.
358
+ - `uploadFile({ fileStreamFactory, fileSizeFactory, signal, dataItemOpts })` - Signs and uploads a raw file. The provided `fileStreamFactory` should produce a NEW file data stream each time is it invoked. The `fileSizeFactory` is a function that returns the size of the file. The `signal` is an optional [AbortSignal] that can be used to cancel the upload or timeout the request. `dataItemOpts` is an optional object that can be used to configure tags, target, and anchor for the data item upload.
357
359
 
358
360
  ```typescript
359
361
  const filePath = path.join(__dirname, './my-unsigned-file.txt');
@@ -361,7 +363,20 @@ Types are exported from `./lib/types/[node/web]/index.d.ts` and should be automa
361
363
  const uploadResult = await turbo.uploadFile({
362
364
  fileStreamFactory: () => fs.createReadStream(filePath),
363
365
  fileSizeFactory: () => fileSize,
364
- // no timeout or AbortSignal provided
366
+ dataItemOpts: {
367
+ // optional
368
+ tags: [
369
+ {
370
+ name: 'Content-Type',
371
+ value: 'text/plain',
372
+ },
373
+ {
374
+ name: 'My-Custom-Tag',
375
+ value: 'my-custom-value',
376
+ },
377
+ ],
378
+ // no timeout or AbortSignal provided
379
+ },
365
380
  });
366
381
  ```
367
382
 
@@ -124471,7 +124471,7 @@ var import_winston = __toESM(require_winston(), 1);
124471
124471
  init_dirname();
124472
124472
  init_buffer2();
124473
124473
  init_process2();
124474
- var version3 = "1.1.1-alpha.2";
124474
+ var version3 = "1.2.0-alpha.1";
124475
124475
 
124476
124476
  // src/common/logger.ts
124477
124477
  var TurboWinstonLogger = class {
@@ -18,4 +18,4 @@
18
18
  Object.defineProperty(exports, "__esModule", { value: true });
19
19
  exports.version = void 0;
20
20
  // AUTOMATICALLY GENERATED FILE - DO NOT TOUCH
21
- exports.version = '1.2.0-alpha.1';
21
+ exports.version = '1.2.0';
@@ -15,4 +15,4 @@
15
15
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
16
16
  */
17
17
  // AUTOMATICALLY GENERATED FILE - DO NOT TOUCH
18
- export const version = '1.2.0-alpha.1';
18
+ export const version = '1.2.0';
@@ -14,5 +14,5 @@
14
14
  * You should have received a copy of the GNU Affero General Public License
15
15
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
16
16
  */
17
- export declare const version = "1.1.1-alpha.2";
17
+ export declare const version = "1.2.0-alpha.1";
18
18
  //# sourceMappingURL=version.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ardrive/turbo-sdk",
3
- "version": "1.2.0-alpha.1",
3
+ "version": "1.2.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",