@croct/sdk 0.22.0 → 0.22.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.
- package/constants.cjs +1 -1
- package/constants.d.cts +2 -2
- package/constants.d.ts +2 -2
- package/constants.js +1 -1
- package/container.cjs +8 -1
- package/container.d.cts +1 -0
- package/container.d.ts +1 -0
- package/container.js +8 -1
- package/package.json +1 -1
package/constants.cjs
CHANGED
|
@@ -25,7 +25,7 @@ __export(constants_exports, {
|
|
|
25
25
|
module.exports = __toCommonJS(constants_exports);
|
|
26
26
|
const BASE_ENDPOINT_URL = "https://api.croct.io";
|
|
27
27
|
const MAX_QUERY_LENGTH = parseInt("<@maxQueryLength@>", 10);
|
|
28
|
-
const VERSION = "0.22.
|
|
28
|
+
const VERSION = "0.22.1";
|
|
29
29
|
const CLIENT_LIBRARY = `Croct SDK JS v${VERSION}`;
|
|
30
30
|
// Annotate the CommonJS export names for ESM import in node:
|
|
31
31
|
0 && (module.exports = {
|
package/constants.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
declare const BASE_ENDPOINT_URL = "https://api.croct.io";
|
|
2
2
|
declare const MAX_QUERY_LENGTH: number;
|
|
3
|
-
declare const VERSION = "0.22.
|
|
4
|
-
declare const CLIENT_LIBRARY = "Croct SDK JS v0.22.
|
|
3
|
+
declare const VERSION = "0.22.1";
|
|
4
|
+
declare const CLIENT_LIBRARY = "Croct SDK JS v0.22.1";
|
|
5
5
|
|
|
6
6
|
export { BASE_ENDPOINT_URL, CLIENT_LIBRARY, MAX_QUERY_LENGTH, VERSION };
|
package/constants.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
declare const BASE_ENDPOINT_URL = "https://api.croct.io";
|
|
2
2
|
declare const MAX_QUERY_LENGTH: number;
|
|
3
|
-
declare const VERSION = "0.22.
|
|
4
|
-
declare const CLIENT_LIBRARY = "Croct SDK JS v0.22.
|
|
3
|
+
declare const VERSION = "0.22.1";
|
|
4
|
+
declare const CLIENT_LIBRARY = "Croct SDK JS v0.22.1";
|
|
5
5
|
|
|
6
6
|
export { BASE_ENDPOINT_URL, CLIENT_LIBRARY, MAX_QUERY_LENGTH, VERSION };
|
package/constants.js
CHANGED
package/container.cjs
CHANGED
|
@@ -49,7 +49,7 @@ const _Container = class _Container {
|
|
|
49
49
|
}
|
|
50
50
|
getTimeZone() {
|
|
51
51
|
if (this.timeZone === void 0) {
|
|
52
|
-
this.timeZone =
|
|
52
|
+
this.timeZone = _Container.detectTimeZone();
|
|
53
53
|
}
|
|
54
54
|
return this.timeZone;
|
|
55
55
|
}
|
|
@@ -304,6 +304,13 @@ const _Container = class _Container {
|
|
|
304
304
|
delete this.removeTokenSyncListener;
|
|
305
305
|
logger.debug("Container resources released.");
|
|
306
306
|
}
|
|
307
|
+
static detectTimeZone() {
|
|
308
|
+
const { timeZone } = Intl.DateTimeFormat().resolvedOptions();
|
|
309
|
+
if (timeZone === void 0 || timeZone === "Etc/Unknown") {
|
|
310
|
+
return null;
|
|
311
|
+
}
|
|
312
|
+
return timeZone;
|
|
313
|
+
}
|
|
307
314
|
};
|
|
308
315
|
_Container.DEFAULT_FETCH_TIMEOUT = 5e3;
|
|
309
316
|
let Container = _Container;
|
package/container.d.cts
CHANGED
package/container.d.ts
CHANGED
package/container.js
CHANGED
|
@@ -27,7 +27,7 @@ const _Container = class _Container {
|
|
|
27
27
|
}
|
|
28
28
|
getTimeZone() {
|
|
29
29
|
if (this.timeZone === void 0) {
|
|
30
|
-
this.timeZone =
|
|
30
|
+
this.timeZone = _Container.detectTimeZone();
|
|
31
31
|
}
|
|
32
32
|
return this.timeZone;
|
|
33
33
|
}
|
|
@@ -282,6 +282,13 @@ const _Container = class _Container {
|
|
|
282
282
|
delete this.removeTokenSyncListener;
|
|
283
283
|
logger.debug("Container resources released.");
|
|
284
284
|
}
|
|
285
|
+
static detectTimeZone() {
|
|
286
|
+
const { timeZone } = Intl.DateTimeFormat().resolvedOptions();
|
|
287
|
+
if (timeZone === void 0 || timeZone === "Etc/Unknown") {
|
|
288
|
+
return null;
|
|
289
|
+
}
|
|
290
|
+
return timeZone;
|
|
291
|
+
}
|
|
285
292
|
};
|
|
286
293
|
_Container.DEFAULT_FETCH_TIMEOUT = 5e3;
|
|
287
294
|
let Container = _Container;
|