@ar.io/sdk 3.22.0-alpha.4 → 3.22.0-alpha.6
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 +0 -47
- package/bundles/web.bundle.min.js +70 -75
- package/lib/cjs/common/hyperbeam/hb.js +2 -2
- package/lib/cjs/common/io.js +64 -0
- package/lib/cjs/common/turbo.js +24 -14
- package/lib/cjs/utils/processes.js +8 -9
- package/lib/cjs/version.js +1 -1
- package/lib/esm/common/hyperbeam/hb.js +2 -2
- package/lib/esm/common/io.js +64 -0
- package/lib/esm/common/turbo.js +23 -13
- package/lib/esm/utils/processes.js +8 -9
- package/lib/esm/version.js +1 -1
- package/lib/types/common/turbo.d.ts +5 -7
- package/lib/types/utils/processes.d.ts +4 -3
- package/lib/types/version.d.ts +1 -1
- package/package.json +4 -16
- package/lib/cjs/common/http.js +0 -40
- package/lib/cjs/utils/http-client.js +0 -48
- package/lib/esm/common/http.js +0 -36
- package/lib/esm/utils/http-client.js +0 -41
- package/lib/types/common/http.d.ts +0 -17
- package/lib/types/utils/http-client.d.ts +0 -24
package/README.md
CHANGED
|
@@ -3119,53 +3119,6 @@ const ario = ARIO.mainnet({ logger: customLogger });
|
|
|
3119
3119
|
Logger.default = customLogger;
|
|
3120
3120
|
```
|
|
3121
3121
|
|
|
3122
|
-
#### Winston Logger (Optional)
|
|
3123
|
-
|
|
3124
|
-
For advanced logging features, you can optionally install Winston and use the provided Winston logger adapter:
|
|
3125
|
-
|
|
3126
|
-
```bash
|
|
3127
|
-
yarn add winston
|
|
3128
|
-
```
|
|
3129
|
-
|
|
3130
|
-
```typescript
|
|
3131
|
-
import { ARIO, WinstonLogger } from '@ar.io/sdk';
|
|
3132
|
-
|
|
3133
|
-
// Create Winston logger with custom configuration
|
|
3134
|
-
const winstonLogger = new WinstonLogger({
|
|
3135
|
-
level: 'debug',
|
|
3136
|
-
});
|
|
3137
|
-
|
|
3138
|
-
// Use with any class that accepts a logger
|
|
3139
|
-
const ario = ARIO.mainnet({ logger: winstonLogger });
|
|
3140
|
-
|
|
3141
|
-
// or set it as the default logger in the entire SDK
|
|
3142
|
-
Logger.default = winstonLogger;
|
|
3143
|
-
```
|
|
3144
|
-
|
|
3145
|
-
#### Other Popular Loggers
|
|
3146
|
-
|
|
3147
|
-
You can easily integrate other popular logging libraries:
|
|
3148
|
-
|
|
3149
|
-
```typescript
|
|
3150
|
-
// Bunyan example
|
|
3151
|
-
import { ARIO, ILogger } from '@ar.io/sdk';
|
|
3152
|
-
import bunyan from 'bunyan';
|
|
3153
|
-
|
|
3154
|
-
const bunyanLogger = bunyan.createLogger({ name: 'ar-io-sdk' });
|
|
3155
|
-
const adapter: ILogger = {
|
|
3156
|
-
info: (message, ...args) => bunyanLogger.info({ args }, message),
|
|
3157
|
-
warn: (message, ...args) => bunyanLogger.warn({ args }, message),
|
|
3158
|
-
error: (message, ...args) => bunyanLogger.error({ args }, message),
|
|
3159
|
-
debug: (message, ...args) => bunyanLogger.debug({ args }, message),
|
|
3160
|
-
setLogLevel: (level) => bunyanLogger.level(level),
|
|
3161
|
-
};
|
|
3162
|
-
|
|
3163
|
-
const ario = ARIO.mainnet({ logger: adapter });
|
|
3164
|
-
|
|
3165
|
-
// or set it as the default logger in the entire SDK
|
|
3166
|
-
Logger.default = adapter;
|
|
3167
|
-
```
|
|
3168
|
-
|
|
3169
3122
|
## Pagination
|
|
3170
3123
|
|
|
3171
3124
|
#### Overview
|