@ardrive/turbo-sdk 1.38.0-alpha.1 → 1.38.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/bundles/web.bundle.min.js +1 -1
- package/lib/cjs/version.js +1 -1
- package/lib/esm/version.js +1 -1
- package/lib/types/version.d.ts +1 -1
- package/lib/types/version.d.ts.map +1 -1
- package/package.json +1 -9
- package/lib/cjs/common/winstonLogger.js +0 -66
- package/lib/esm/common/winstonLogger.js +0 -62
- package/lib/types/common/winstonLogger.d.ts +0 -14
- package/lib/types/common/winstonLogger.d.ts.map +0 -1
|
@@ -215990,7 +215990,7 @@ init_process2();
|
|
|
215990
215990
|
init_dirname();
|
|
215991
215991
|
init_buffer2();
|
|
215992
215992
|
init_process2();
|
|
215993
|
-
var version20 = "1.
|
|
215993
|
+
var version20 = "1.38.0-alpha.1";
|
|
215994
215994
|
|
|
215995
215995
|
// src/common/logger.ts
|
|
215996
215996
|
var Logger2 = class _Logger {
|
package/lib/cjs/version.js
CHANGED
package/lib/esm/version.js
CHANGED
package/lib/types/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,eAAO,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,eAAO,MAAM,OAAO,mBAAmB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ardrive/turbo-sdk",
|
|
3
|
-
"version": "1.38.0
|
|
3
|
+
"version": "1.38.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",
|
|
@@ -101,14 +101,6 @@
|
|
|
101
101
|
"tweetnacl": "^1.0.3",
|
|
102
102
|
"x402-fetch": "^0.7.0"
|
|
103
103
|
},
|
|
104
|
-
"peerDependencies": {
|
|
105
|
-
"winston": "^3.14.1"
|
|
106
|
-
},
|
|
107
|
-
"peerDependenciesMeta": {
|
|
108
|
-
"winston": {
|
|
109
|
-
"optional": true
|
|
110
|
-
}
|
|
111
|
-
},
|
|
112
104
|
"devDependencies": {
|
|
113
105
|
"@commitlint/cli": "^17.1.2",
|
|
114
106
|
"@commitlint/config-conventional": "^17.1.0",
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TurboWinstonLogger = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* Copyright (C) 2022-2024 Permanent Data Solutions, Inc.
|
|
6
|
-
*
|
|
7
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
8
|
-
* you may not use this file except in compliance with the License.
|
|
9
|
-
* You may obtain a copy of the License at
|
|
10
|
-
*
|
|
11
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
-
*
|
|
13
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
14
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
-
* See the License for the specific language governing permissions and
|
|
17
|
-
* limitations under the License.
|
|
18
|
-
*/
|
|
19
|
-
const version_js_1 = require("../version.js");
|
|
20
|
-
class TurboWinstonLogger {
|
|
21
|
-
constructor({ level = 'info', } = {}) {
|
|
22
|
-
try {
|
|
23
|
-
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
24
|
-
this.winston = require('winston');
|
|
25
|
-
}
|
|
26
|
-
catch (error) {
|
|
27
|
-
throw new Error('Winston is not installed. Install it with: npm install winston');
|
|
28
|
-
}
|
|
29
|
-
this.logger = this.winston.createLogger({
|
|
30
|
-
level: level === 'none' ? 'error' : level,
|
|
31
|
-
silent: level === 'none',
|
|
32
|
-
defaultMeta: {
|
|
33
|
-
name: 'ar-io-sdk',
|
|
34
|
-
version: version_js_1.version,
|
|
35
|
-
},
|
|
36
|
-
format: this.winston.format.combine(this.winston.format.timestamp(), this.winston.format.json()),
|
|
37
|
-
transports: [
|
|
38
|
-
new this.winston.transports.Console({
|
|
39
|
-
format: this.winston.format.combine(this.winston.format.timestamp(), this.winston.format.json()),
|
|
40
|
-
}),
|
|
41
|
-
],
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
info(message, ...args) {
|
|
45
|
-
this.logger.info(message, ...args);
|
|
46
|
-
}
|
|
47
|
-
warn(message, ...args) {
|
|
48
|
-
this.logger.warn(message, ...args);
|
|
49
|
-
}
|
|
50
|
-
error(message, ...args) {
|
|
51
|
-
this.logger.error(message, ...args);
|
|
52
|
-
}
|
|
53
|
-
debug(message, ...args) {
|
|
54
|
-
this.logger.debug(message, ...args);
|
|
55
|
-
}
|
|
56
|
-
setLogLevel(level) {
|
|
57
|
-
if (level === 'none') {
|
|
58
|
-
this.logger.silent = true;
|
|
59
|
-
}
|
|
60
|
-
else {
|
|
61
|
-
this.logger.silent = false;
|
|
62
|
-
this.logger.level = level;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
exports.TurboWinstonLogger = TurboWinstonLogger;
|
|
@@ -1,62 +0,0 @@
|
|
|
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 { version } from '../version.js';
|
|
17
|
-
export class TurboWinstonLogger {
|
|
18
|
-
constructor({ level = 'info', } = {}) {
|
|
19
|
-
try {
|
|
20
|
-
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
21
|
-
this.winston = require('winston');
|
|
22
|
-
}
|
|
23
|
-
catch (error) {
|
|
24
|
-
throw new Error('Winston is not installed. Install it with: npm install winston');
|
|
25
|
-
}
|
|
26
|
-
this.logger = this.winston.createLogger({
|
|
27
|
-
level: level === 'none' ? 'error' : level,
|
|
28
|
-
silent: level === 'none',
|
|
29
|
-
defaultMeta: {
|
|
30
|
-
name: 'ar-io-sdk',
|
|
31
|
-
version,
|
|
32
|
-
},
|
|
33
|
-
format: this.winston.format.combine(this.winston.format.timestamp(), this.winston.format.json()),
|
|
34
|
-
transports: [
|
|
35
|
-
new this.winston.transports.Console({
|
|
36
|
-
format: this.winston.format.combine(this.winston.format.timestamp(), this.winston.format.json()),
|
|
37
|
-
}),
|
|
38
|
-
],
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
info(message, ...args) {
|
|
42
|
-
this.logger.info(message, ...args);
|
|
43
|
-
}
|
|
44
|
-
warn(message, ...args) {
|
|
45
|
-
this.logger.warn(message, ...args);
|
|
46
|
-
}
|
|
47
|
-
error(message, ...args) {
|
|
48
|
-
this.logger.error(message, ...args);
|
|
49
|
-
}
|
|
50
|
-
debug(message, ...args) {
|
|
51
|
-
this.logger.debug(message, ...args);
|
|
52
|
-
}
|
|
53
|
-
setLogLevel(level) {
|
|
54
|
-
if (level === 'none') {
|
|
55
|
-
this.logger.silent = true;
|
|
56
|
-
}
|
|
57
|
-
else {
|
|
58
|
-
this.logger.silent = false;
|
|
59
|
-
this.logger.level = level;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { ILogger, LogLevel } from './logger.js';
|
|
2
|
-
export declare class TurboWinstonLogger implements ILogger {
|
|
3
|
-
private logger;
|
|
4
|
-
private winston;
|
|
5
|
-
constructor({ level, }?: {
|
|
6
|
-
level?: LogLevel;
|
|
7
|
-
});
|
|
8
|
-
info(message: string, ...args: unknown[]): void;
|
|
9
|
-
warn(message: string, ...args: unknown[]): void;
|
|
10
|
-
error(message: string, ...args: unknown[]): void;
|
|
11
|
-
debug(message: string, ...args: unknown[]): void;
|
|
12
|
-
setLogLevel(level: LogLevel): void;
|
|
13
|
-
}
|
|
14
|
-
//# sourceMappingURL=winstonLogger.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"winstonLogger.d.ts","sourceRoot":"","sources":["../../../src/common/winstonLogger.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEhD,qBAAa,kBAAmB,YAAW,OAAO;IAEhD,OAAO,CAAC,MAAM,CAAM;IAEpB,OAAO,CAAC,OAAO,CAAM;gBAET,EACV,KAAc,GACf,GAAE;QACD,KAAK,CAAC,EAAE,QAAQ,CAAC;KACb;IAgCN,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE;IAIxC,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE;IAIxC,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE;IAIzC,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE;IAIzC,WAAW,CAAC,KAAK,EAAE,QAAQ;CAQ5B"}
|