@ardrive/turbo-sdk 1.4.1 → 1.4.2

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
@@ -119,7 +119,7 @@ const rates = await turbo.getFiatRates();
119
119
  ESM:
120
120
 
121
121
  ```javascript
122
- import { TurboFactory } from '@ardrive/turbo-sdk/web';
122
+ import { TurboFactory } from '@ardrive/turbo-sdk/<node/web>';
123
123
 
124
124
  const turbo = TurboFactory.unauthenticated();
125
125
  const rates = await turbo.getFiatRates();
@@ -140,85 +140,18 @@ const rates = await turbo.getFiatRates();
140
140
 
141
141
  #### CommonJS
142
142
 
143
- Project's `package.json`:
144
-
145
- ```json
146
- {
147
- "type": "commonjs" // or absent
148
- }
149
- ```
150
-
151
- Project's `tsconfig.json`:
152
-
153
- ```json
154
- {
155
- "compilerOptions": {
156
- "module": "CommonJS",
157
- "moduleResolution": "Node",
158
- "skipLibCheck": true
159
- }
160
- }
161
- ```
162
-
163
- Usage (Node & Web):
164
-
165
- ```javascript
166
- const { TurboFactory } = require('@ardrive/turbo-sdk');
167
-
168
- const turbo = TurboFactory.unauthenticated();
169
- const rates = await turbo.getFiatRates();
170
- ```
143
+ Example available in the [examples/typescript/cjs].
171
144
 
172
145
  #### ESM
173
146
 
174
- Project's `package.json`:
175
-
176
- ```json
177
- {
178
- "type": "module"
179
- }
180
- ```
181
-
182
- Project's `tsconfig.json`:
183
-
184
- ```json
185
- {
186
- "compilerOptions": {
187
- "module": "NodeNext",
188
- "moduleResolution": "NodeNext",
189
- "skipLibCheck": true
190
- }
191
- }
192
- ```
193
-
194
- #### Usage
195
-
196
- Node:
197
-
198
- ```javascript
199
- import { TurboFactory } from '@ardrive/turbo-sdk/node';
200
-
201
- const turbo = TurboFactory.unauthenticated();
202
- const rates = await turbo.getFiatRates();
203
- ```
204
-
205
- Web:
206
-
207
- ```javascript
208
- import { TurboFactory } from '@ardrive/turbo-sdk/web';
209
-
210
- const turbo = TurboFactory.unauthenticated();
211
- const rates = await turbo.getFiatRates();
212
- ```
147
+ Example available in the [examples/typescript/esm].
213
148
 
214
149
  ### Typescript
215
150
 
216
151
  The SDK provides TypeScript types. When you import the SDK in a TypeScript project:
217
152
 
218
153
  ```typescript
219
- import { TurboFactory } from '@ardrive/turbo-sdk/web';
220
-
221
- // or '@ardrive/turbo-sdk/node' for Node.js projects
154
+ import { TurboFactory } from '@ardrive/turbo-sdk/<node/web>';
222
155
  ```
223
156
 
224
157
  Types are exported from `./lib/types/[node/web]/index.d.ts` and should be automatically recognized, offering benefits such as type-checking and autocompletion.
@@ -429,6 +362,8 @@ For more information on how to contribute, please see [CONTRIBUTING.md].
429
362
 
430
363
  [package.json]: ./package.json
431
364
  [examples]: ./examples
365
+ [examples/typescript/cjs]: ./examples/typescript/cjs
366
+ [examples/typescript/esm]: ./examples/typescript/esm
432
367
  [TurboAuthenticatedClient]: #turboauthenticatedclient
433
368
  [AbortSignal]: https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal
434
369
  [CONTRIBUTING.md]: ./CONTRIBUTING.md
@@ -130545,7 +130545,7 @@ var import_winston = __toESM(require_winston(), 1);
130545
130545
  init_dirname();
130546
130546
  init_buffer2();
130547
130547
  init_process2();
130548
- var version21 = "1.4.0";
130548
+ var version21 = "1.4.1";
130549
130549
 
130550
130550
  // src/common/logger.ts
130551
130551
  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.4.1';
21
+ exports.version = '1.4.2';
@@ -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.4.1';
18
+ export const version = '1.4.2';
@@ -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.4.0";
17
+ export declare const version = "1.4.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.4.1",
3
+ "version": "1.4.2",
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",
@@ -58,14 +58,16 @@
58
58
  "test": "c8 mocha --config .mocharc --exit",
59
59
  "test:web": "c8 mocha --config .mocharc --exclude tests/**/*.node.test.ts --exit",
60
60
  "test:node": "c8 mocha --config .mocharc --exclude tests/**/*.web.test.ts --exit",
61
- "test:docker": "docker compose up -d ; PAYMENT_SERVICE_URL=http://localhost:4000 UPLOAD_SERVICE_URL=http://localhost:3000 yarn test ; docker compose down -v",
61
+ "test:docker": "docker compose up -d ; PAYMENT_SERVICE_URL=http://localhost:4000 UPLOAD_SERVICE_URL=http://localhost:3000 yarn test",
62
62
  "prepare": "husky install",
63
63
  "example:mjs": "cd examples/mjs && yarn && node index.mjs",
64
64
  "example:cjs": "cd examples/cjs && yarn && node index.cjs",
65
- "example:web": "http-server --port 8080 --host -o examples/web"
65
+ "example:web": "http-server --port 8080 --host -o examples/web",
66
+ "example:ts:esm": "cd examples/typescript/esm && yarn && yarn test",
67
+ "example:ts:cjs": "cd examples/typescript/cjs && yarn && yarn test"
66
68
  },
67
69
  "dependencies": {
68
- "arbundles": "^0.9.9",
70
+ "arbundles": "0.9.9",
69
71
  "arweave": "^1.14.4",
70
72
  "axios": "^1.4.0",
71
73
  "axios-retry": "^3.7.0",