@ardrive/turbo-sdk 1.0.1 → 1.1.0-alpha.1

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.
Files changed (47) hide show
  1. package/README.md +45 -3
  2. package/bundles/web.bundle.min.js +22368 -3347
  3. package/lib/cjs/common/factory.js +10 -0
  4. package/lib/cjs/common/http.js +13 -1
  5. package/lib/cjs/common/logger.js +60 -0
  6. package/lib/cjs/common/payment.js +6 -3
  7. package/lib/cjs/common/upload.js +10 -5
  8. package/lib/cjs/node/factory.js +6 -1
  9. package/lib/cjs/node/signer.js +4 -1
  10. package/lib/cjs/utils/axiosClient.js +8 -4
  11. package/lib/cjs/version.js +1 -1
  12. package/lib/cjs/web/factory.js +6 -1
  13. package/lib/cjs/web/signer.js +4 -1
  14. package/lib/esm/common/factory.js +10 -0
  15. package/lib/esm/common/http.js +13 -1
  16. package/lib/esm/common/logger.js +56 -0
  17. package/lib/esm/common/payment.js +6 -3
  18. package/lib/esm/common/upload.js +9 -4
  19. package/lib/esm/node/factory.js +6 -1
  20. package/lib/esm/node/signer.js +4 -1
  21. package/lib/esm/utils/axiosClient.js +8 -4
  22. package/lib/esm/version.js +1 -1
  23. package/lib/esm/web/factory.js +6 -1
  24. package/lib/esm/web/signer.js +4 -1
  25. package/lib/types/common/factory.d.ts +4 -0
  26. package/lib/types/common/factory.d.ts.map +1 -1
  27. package/lib/types/common/http.d.ts +4 -2
  28. package/lib/types/common/http.d.ts.map +1 -1
  29. package/lib/types/common/logger.d.ts +32 -0
  30. package/lib/types/common/logger.d.ts.map +1 -0
  31. package/lib/types/common/payment.d.ts +4 -3
  32. package/lib/types/common/payment.d.ts.map +1 -1
  33. package/lib/types/common/upload.d.ts +5 -4
  34. package/lib/types/common/upload.d.ts.map +1 -1
  35. package/lib/types/node/factory.d.ts.map +1 -1
  36. package/lib/types/node/signer.d.ts +4 -2
  37. package/lib/types/node/signer.d.ts.map +1 -1
  38. package/lib/types/types.d.ts +9 -2
  39. package/lib/types/types.d.ts.map +1 -1
  40. package/lib/types/utils/axiosClient.d.ts +3 -1
  41. package/lib/types/utils/axiosClient.d.ts.map +1 -1
  42. package/lib/types/version.d.ts +1 -1
  43. package/lib/types/version.d.ts.map +1 -1
  44. package/lib/types/web/factory.d.ts.map +1 -1
  45. package/lib/types/web/signer.d.ts +4 -2
  46. package/lib/types/web/signer.d.ts.map +1 -1
  47. package/package.json +1 -1
package/README.md CHANGED
@@ -19,7 +19,16 @@ Welcome to the `@ardrive/turbo-sdk`! This SDK provides functionality for interac
19
19
  - [TurboUnauthenticatedClient](#turbounauthenticatedclient)
20
20
  - [TurboAuthenticatedClient](#turboauthenticatedclient)
21
21
  - [Examples](./examples)
22
- - [Contributions](#contributions)
22
+ - [CJS](./examples/cjs/index.ts)
23
+ - [ESM](./examples/esm/index.ts)
24
+ - [Web](./examples/web/index.html)
25
+ - [Developers](#developers)
26
+ - [Requirements](#requirements)
27
+ - [Setup & Build](#setup--build)
28
+ - [Testing](#testing)
29
+ - [Linting and Formatting](#linting--formatting)
30
+ - [Architecture](#architecture)
31
+ - [Contributing](./CONTRIBUTING.md)
23
32
 
24
33
  ## Installation
25
34
 
@@ -334,11 +343,44 @@ Types are exported from `./lib/types/[node/web]/index.d.ts` and should be automa
334
343
  });
335
344
  ```
336
345
 
337
- ## Contributions
346
+ ## Developers
338
347
 
339
- If you encounter any issues or have feature requests, please file an issue on our GitHub repository. Contributions, pull requests, and feedback are both welcome and encouraged.
348
+ ### Requirements
349
+
350
+ - `nvm`
351
+ - `node` (>= 18)
352
+ - `yarn`
353
+
354
+ ### Setup & Build
355
+
356
+ - `yarn install` - installs dependencies
357
+ - `yarn build` - builds web/node/bundled outputs
358
+
359
+ ### Testing
360
+
361
+ - `yarn test` - runs integration tests
362
+ - `yarn example:web` - opens up the example web page
363
+ - `yarn example:cjs` - runs example CJS node script
364
+ - `yarn example:mjs` - runs example ESM node script
365
+
366
+ ### Linting & Formatting
367
+
368
+ - `yarn lint:check` - checks for linting errors
369
+ - `yarn lint:fix` - fixes linting errors
370
+ - `yarn format:check` - checks for formatting errors
371
+ - `yarn format:fix` - fixes formatting errors
372
+
373
+ ### Architecture
374
+
375
+ - Code to interfaces.
376
+ - Prefer type safety over runtime safety.
377
+ - Prefer composition over inheritance.
378
+ - Prefer integration tests over unit tests.
379
+
380
+ For more information on how to contribute, please see [CONTRIBUTING.md].
340
381
 
341
382
  [package.json]: ./package.json
342
383
  [examples]: ./examples
343
384
  [TurboAuthenticatedClient]: #turboauthenticatedclient
344
385
  [AbortSignal]: https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal
386
+ [CONTRIBUTING.md]: ./CONTRIBUTING.md