@atomm-developer/generator-sdk 1.0.11 → 1.0.12

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.
@@ -2627,7 +2627,7 @@ const getBaseURL = (env) => {
2627
2627
  return BASE_URL_MAP[env] ?? BASE_URL_MAP.prod;
2628
2628
  };
2629
2629
  const TOKEN_KEY_PREFIX = "__atomm_sdk_token__";
2630
- const TOKEN_COOKIE_DOMAIN = "";
2630
+ const TOKEN_COOKIE_DOMAIN = ".atomm.com";
2631
2631
  const TOKEN_COOKIE_PATH = "/";
2632
2632
  const TOKEN_COOKIE_MAX_AGE_SECONDS = 15 * 24 * 60 * 60;
2633
2633
  const getTokenKey = (appKey) => `${TOKEN_KEY_PREFIX}${appKey}`;
@@ -2644,12 +2644,10 @@ const setToken = (appKey, token) => {
2644
2644
  };
2645
2645
  const getToken = (appKey) => {
2646
2646
  try {
2647
- const tokenKey = getTokenKey(appKey);
2648
- const tokenPair = document.cookie.split("; ").find((item) => item.startsWith(`${tokenKey}=`));
2649
- if (!tokenPair) {
2650
- return "";
2651
- }
2652
- return decodeURIComponent(tokenPair.slice(tokenKey.length + 1));
2647
+ void appKey;
2648
+ const cookies2 = document.cookie.split(";").map((part) => part.trim()).filter(Boolean);
2649
+ const utokenEntry = cookies2.find((part) => part.startsWith("utoken="));
2650
+ return utokenEntry ? decodeURIComponent(utokenEntry.slice("utoken=".length)) : "";
2653
2651
  } catch {
2654
2652
  return "";
2655
2653
  }
@@ -12326,7 +12324,7 @@ class HttpProtocol extends SerdeContext {
12326
12324
  });
12327
12325
  }
12328
12326
  async loadEventStreamCapability() {
12329
- const { EventStreamSerde } = await import("./index-DcHLmTaB.js");
12327
+ const { EventStreamSerde } = await import("./index-C-L7AXBe.js");
12330
12328
  return new EventStreamSerde({
12331
12329
  marshaller: this.getEventStreamMarshaller(),
12332
12330
  serializer: this.serializer,
@@ -1,7 +1,7 @@
1
1
  var __defProp = Object.defineProperty;
2
2
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
3
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
4
- import { t as toUtf8, f as fromUtf8 } from "./index-DuQGCcOW.js";
4
+ import { t as toUtf8, f as fromUtf8 } from "./index-Bqy069_f.js";
5
5
  class EventStreamSerde {
6
6
  constructor({ marshaller, serializer, deserializer, serdeContext, defaultContentType }) {
7
7
  __publicField(this, "marshaller");
package/dist/index.es.js CHANGED
@@ -1,4 +1,4 @@
1
- import { G, S, T, w } from "./index-DuQGCcOW.js";
1
+ import { G, S, T, w } from "./index-Bqy069_f.js";
2
2
  export {
3
3
  G as GeneratorSDK,
4
4
  S as SdkError,