@croct/sdk 0.15.2 → 0.15.3
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/constants.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export declare const BASE_ENDPOINT_URL = "https://api.croct.io";
|
|
2
2
|
export declare const MAX_QUERY_LENGTH: number;
|
|
3
|
-
export declare const VERSION = "0.15.
|
|
4
|
-
export declare const CLIENT_LIBRARY = "Croct SDK JS v0.15.
|
|
3
|
+
export declare const VERSION = "0.15.3";
|
|
4
|
+
export declare const CLIENT_LIBRARY = "Croct SDK JS v0.15.3";
|
package/constants.js
CHANGED
|
@@ -3,6 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.CLIENT_LIBRARY = exports.VERSION = exports.MAX_QUERY_LENGTH = exports.BASE_ENDPOINT_URL = void 0;
|
|
4
4
|
exports.BASE_ENDPOINT_URL = 'https://api.croct.io';
|
|
5
5
|
exports.MAX_QUERY_LENGTH = 500;
|
|
6
|
-
exports.VERSION = '0.15.
|
|
6
|
+
exports.VERSION = '0.15.3';
|
|
7
7
|
exports.CLIENT_LIBRARY = `Croct SDK JS v${exports.VERSION}`;
|
|
8
8
|
//# sourceMappingURL=constants.js.map
|
package/logging/consoleLogger.js
CHANGED
|
@@ -6,22 +6,22 @@ class ConsoleLogger {
|
|
|
6
6
|
this.namespace = namespace;
|
|
7
7
|
}
|
|
8
8
|
get debug() {
|
|
9
|
-
return this.bind(
|
|
9
|
+
return this.bind(console.debug);
|
|
10
10
|
}
|
|
11
11
|
get info() {
|
|
12
|
-
return this.bind(
|
|
12
|
+
return this.bind(console.info);
|
|
13
13
|
}
|
|
14
14
|
get warn() {
|
|
15
|
-
return this.bind(
|
|
15
|
+
return this.bind(console.warn);
|
|
16
16
|
}
|
|
17
17
|
get error() {
|
|
18
|
-
return this.bind(
|
|
18
|
+
return this.bind(console.error);
|
|
19
19
|
}
|
|
20
20
|
bind(method) {
|
|
21
21
|
if (this.namespace !== undefined) {
|
|
22
|
-
return method.bind(
|
|
22
|
+
return method.bind(console, `[${this.namespace}]`);
|
|
23
23
|
}
|
|
24
|
-
return method.bind(
|
|
24
|
+
return method.bind(console);
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
exports.ConsoleLogger = ConsoleLogger;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consoleLogger.js","sourceRoot":"","sources":["../src/logging/consoleLogger.ts"],"names":[],"mappings":";;;AAMA,MAAa,aAAa;IAGtB,YAAmB,SAAkB;QACjC,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;IAC/B,CAAC;IAED,IAAW,KAAK;QACZ,OAAO,IAAI,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"consoleLogger.js","sourceRoot":"","sources":["../src/logging/consoleLogger.ts"],"names":[],"mappings":";;;AAMA,MAAa,aAAa;IAGtB,YAAmB,SAAkB;QACjC,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;IAC/B,CAAC;IAED,IAAW,KAAK;QACZ,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IACpC,CAAC;IAED,IAAW,IAAI;QACX,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IACnC,CAAC;IAED,IAAW,IAAI;QACX,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IACnC,CAAC;IAED,IAAW,KAAK;QACZ,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IACpC,CAAC;IAEO,IAAI,CAAC,MAAqB;QAC9B,IAAI,IAAI,CAAC,SAAS,KAAK,SAAS,EAAE,CAAC;YAC/B,OAAO,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,IAAI,CAAC,SAAS,GAAG,CAAC,CAAC;QACvD,CAAC;QAED,OAAO,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAChC,CAAC;CACJ;AA9BD,sCA8BC"}
|
package/package.json
CHANGED
|
@@ -12,26 +12,26 @@ export class ConsoleLogger implements Logger {
|
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
public get debug(): (message: string) => void {
|
|
15
|
-
return this.bind(
|
|
15
|
+
return this.bind(console.debug);
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
public get info(): (message: string) => void {
|
|
19
|
-
return this.bind(
|
|
19
|
+
return this.bind(console.info);
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
public get warn(): (message: string) => void {
|
|
23
|
-
return this.bind(
|
|
23
|
+
return this.bind(console.warn);
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
public get error(): (message: string) => void {
|
|
27
|
-
return this.bind(
|
|
27
|
+
return this.bind(console.error);
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
private bind(method: ConsoleMethod): ConsoleMethod {
|
|
31
31
|
if (this.namespace !== undefined) {
|
|
32
|
-
return method.bind(
|
|
32
|
+
return method.bind(console, `[${this.namespace}]`);
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
return method.bind(
|
|
35
|
+
return method.bind(console);
|
|
36
36
|
}
|
|
37
37
|
}
|