@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 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.0";
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.0";
4
- declare const CLIENT_LIBRARY = "Croct SDK JS v0.22.0";
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.0";
4
- declare const CLIENT_LIBRARY = "Croct SDK JS v0.22.0";
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
@@ -1,6 +1,6 @@
1
1
  const BASE_ENDPOINT_URL = "https://api.croct.io";
2
2
  const MAX_QUERY_LENGTH = parseInt("<@maxQueryLength@>", 10);
3
- const VERSION = "0.22.0";
3
+ const VERSION = "0.22.1";
4
4
  const CLIENT_LIBRARY = `Croct SDK JS v${VERSION}`;
5
5
  export {
6
6
  BASE_ENDPOINT_URL,
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 = Intl.DateTimeFormat().resolvedOptions().timeZone ?? null;
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
@@ -91,6 +91,7 @@ declare class Container {
91
91
  private getSessionStorage;
92
92
  getEventManager(): EventManager<SdkEventMap>;
93
93
  dispose(): Promise<void>;
94
+ private static detectTimeZone;
94
95
  }
95
96
 
96
97
  export { type Configuration, Container };
package/container.d.ts CHANGED
@@ -91,6 +91,7 @@ declare class Container {
91
91
  private getSessionStorage;
92
92
  getEventManager(): EventManager<SdkEventMap>;
93
93
  dispose(): Promise<void>;
94
+ private static detectTimeZone;
94
95
  }
95
96
 
96
97
  export { type Configuration, Container };
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 = Intl.DateTimeFormat().resolvedOptions().timeZone ?? null;
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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@croct/sdk",
3
- "version": "0.22.0",
3
+ "version": "0.22.1",
4
4
  "description": "Croct SDK for JavaScript.",
5
5
  "license": "MIT",
6
6
  "author": {