@sylphx/sdk 0.12.0 → 0.12.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.
@@ -1133,7 +1133,13 @@ function resolveSecretUrl(explicit) {
1133
1133
  var SDK_API_PATH = `/v1`;
1134
1134
  var DEFAULT_SDK_API_HOST = "api.sylphx.com";
1135
1135
  var SDK_VERSION = "0.5.0";
1136
- var SDK_PLATFORM = typeof window !== "undefined" ? "browser" : typeof process !== "undefined" && process.versions?.node ? "node" : "unknown";
1136
+ function detectSdkPlatform() {
1137
+ if (typeof window !== "undefined") return "browser";
1138
+ const runtimeGlobal = globalThis;
1139
+ if (typeof runtimeGlobal.EdgeRuntime !== "undefined") return "edge";
1140
+ return "node";
1141
+ }
1142
+ var SDK_PLATFORM = detectSdkPlatform();
1137
1143
  var DEFAULT_TIMEOUT_MS = 3e4;
1138
1144
  var SESSION_TOKEN_LIFETIME_SECONDS = 5 * 60;
1139
1145
  var SESSION_TOKEN_LIFETIME_MS = SESSION_TOKEN_LIFETIME_SECONDS * 1e3;