@upscopeio/sdk 2026.7.3 → 2026.7.5
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/bundled-upscope.js +1 -1
- package/package.json +1 -1
- package/static.js +1 -1
- package/static.js.map +1 -1
package/package.json
CHANGED
package/static.js
CHANGED
|
@@ -182,7 +182,7 @@ import { bootUpscope } from "./bundled-upscope.js";
|
|
|
182
182
|
import { createStub, createUpscope, environmentOrigin } from "./sdk-core.js";
|
|
183
183
|
// Replaced with the package version at publish time (finish-npm-packages.sh) so the config
|
|
184
184
|
// endpoint returns a configuration shape compatible with this exact (pinned) SDK version.
|
|
185
|
-
var VERSION = "2026.7.
|
|
185
|
+
var VERSION = "2026.7.5";
|
|
186
186
|
// Static entrypoint (@upscopeio/sdk/static): the SDK implementation is bundled in this package,
|
|
187
187
|
// so the running version is pinned to the installed package version. It fetches only the account
|
|
188
188
|
// configuration (works on websites and in MV3 extensions — no remote code execution) and boots
|
package/static.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["static.js"],"names":["bootUpscope","createStub","createUpscope","environmentOrigin","VERSION","loadSDK","w","apiKey","Upscope","stub","loadStaticSDK","response","config","error","fetch","sdkConfigUrl","ok","Error","status","json","exists","console","expired","collectData","__defaultConfiguration","settings","__defaultRegion","defaultRegion","encodeURIComponent","upscopeFor","window"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAASA,WAAW,QAAQ,uBAAuB;AACnD,SAASC,UAAU,EAAEC,aAAa,EAAEC,iBAAiB,QAAQ,gBAAgB;AAC7E,2FAA2F;AAC3F,0FAA0F;AAC1F,IAAM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Aa3B,cAAcG,SAAS;AACjD,eAAewB,WAAWC,QAAQ","file":"static.js","sourcesContent":["import { bootUpscope } from \"./bundled-upscope.js\";\nimport { createStub, createUpscope, environmentOrigin } from \"./sdk-core.js\";\n// Replaced with the package version at publish time (finish-npm-packages.sh) so the config\n// endpoint returns a configuration shape compatible with this exact (pinned) SDK version.\nconst VERSION = \"2026.7.
|
|
1
|
+
{"version":3,"sources":["static.js"],"names":["bootUpscope","createStub","createUpscope","environmentOrigin","VERSION","loadSDK","w","apiKey","Upscope","stub","loadStaticSDK","response","config","error","fetch","sdkConfigUrl","ok","Error","status","json","exists","console","expired","collectData","__defaultConfiguration","settings","__defaultRegion","defaultRegion","encodeURIComponent","upscopeFor","window"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAASA,WAAW,QAAQ,uBAAuB;AACnD,SAASC,UAAU,EAAEC,aAAa,EAAEC,iBAAiB,QAAQ,gBAAgB;AAC7E,2FAA2F;AAC3F,0FAA0F;AAC1F,IAAMC,UAAU;AAChB,gGAAgG;AAChG,iGAAiG;AACjG,+FAA+F;AAC/F,kEAAkE;AAClE,SAASC,QAAQC,CAAC,EAAEC,MAAM;IACtB,IAAI,OAAOD,EAAEE,OAAO,KAAK,aACrB;IACJ,IAAMC,OAAOR,WAAWK;IACxB,KAAKI,cAAcJ,GAAGG,MAAMF;AAChC;AACA,SAAeG,cAAcJ,CAAC,EAAEG,IAAI,EAAEF,MAAM;;YAE9BI,UAGAC,QAsBHC;;;;;;;;;;oBAzBc;;wBAAMC,MAAMC,aAAaR;;;oBAApCI,WAAW;oBACjB,IAAI,CAACA,SAASK,EAAE,EACZ,MAAM,IAAIC,MAAM,AAAC,4CAA2D,OAAhBN,SAASO,MAAM;oBAC/D;;wBAAMP,SAASQ,IAAI;;;oBAA7BP,SAAU;oBAChB,0EAA0E;oBAC1E,IAAI,CAACA,OAAOQ,MAAM,EAAE;wBAChBC,QAAQR,KAAK,CAAC,AAAC,oDAA0D,OAAPN;wBAClE;;;oBACJ;oBACA,IAAIK,OAAOU,OAAO,EAAE;wBAChBD,QAAQR,KAAK,CAAC;wBACd;;;oBACJ;oBACA,IAAI,CAACD,OAAOW,WAAW,EAAE;wBACrBF,QAAQR,KAAK,CAAC;wBACd;;;oBACJ;oBACA,0FAA0F;oBAC1F,+DAA+D;oBAC/D,IAAIP,EAAEE,OAAO,KAAKC,MACd;;;oBACJA,KAAKe,sBAAsB,GAAG,wCAAKZ,OAAOa,QAAQ;wBAAElB,QAAAA;;oBACpDE,KAAKiB,eAAe,GAAGd,OAAOe,aAAa;oBAC3C3B,YAAYM,GAAGG;;;;;;oBAEZI;oBACHQ,QAAQR,KAAK,CAAC,sDAAsDA;;;;;;;;;;;IAE5E;;AACA,SAASE,aAAaR,MAAM;IACxB,OAAO,AAAC,GAAoCqB,OAAlCzB,kBAAkB,cAAa,KAAsDyB,OAAnDA,mBAAmBrB,SAAQ,0BAAoD,OAA5BqB,mBAAmBxB;AACtH;AACA,OAAO,IAAMyB,aAAa3B,cAAcG,SAAS;AACjD,eAAewB,WAAWC,QAAQ","file":"static.js","sourcesContent":["import { bootUpscope } from \"./bundled-upscope.js\";\nimport { createStub, createUpscope, environmentOrigin } from \"./sdk-core.js\";\n// Replaced with the package version at publish time (finish-npm-packages.sh) so the config\n// endpoint returns a configuration shape compatible with this exact (pinned) SDK version.\nconst VERSION = \"2026.7.5\";\n// Static entrypoint (@upscopeio/sdk/static): the SDK implementation is bundled in this package,\n// so the running version is pinned to the installed package version. It fetches only the account\n// configuration (works on websites and in MV3 extensions — no remote code execution) and boots\n// the bundled implementation once that configuration has arrived.\nfunction loadSDK(w, apiKey) {\n if (typeof w.Upscope !== \"undefined\")\n return;\n const stub = createStub(w);\n void loadStaticSDK(w, stub, apiKey);\n}\nasync function loadStaticSDK(w, stub, apiKey) {\n try {\n const response = await fetch(sdkConfigUrl(apiKey));\n if (!response.ok)\n throw new Error(`Configuration request failed with status ${response.status}`);\n const config = (await response.json());\n // The same account states the generated {apiKey}.js script reports today.\n if (!config.exists) {\n console.error(`[Upscope] We could not find a bucket for api key ${apiKey}`);\n return;\n }\n if (config.expired) {\n console.error(\"[Upscope] Your Upscope subscription has expired. Please upgrade now: https://upscope.io/purchase\");\n return;\n }\n if (!config.collectData) {\n console.error(\"[Upscope] You have exceeded your Upscope subscription usage limits. We will collect data again once usage falls back within your subscription's limits.\");\n return;\n }\n // \"shutdown\" (or a fresh \"init\") may have replaced the stub while the config was loading.\n // eslint-disable-next-line upscope/no-direct-object-comparison\n if (w.Upscope !== stub)\n return;\n stub.__defaultConfiguration = { ...config.settings, apiKey };\n stub.__defaultRegion = config.defaultRegion;\n bootUpscope(w, stub);\n }\n catch (error) {\n console.error(\"[Upscope] Could not load the Upscope configuration\", error);\n }\n}\nfunction sdkConfigUrl(apiKey) {\n return `${environmentOrigin(\"sdkconfig\")}/${encodeURIComponent(apiKey)}.json?sdk=web&version=${encodeURIComponent(VERSION)}`;\n}\nexport const upscopeFor = createUpscope(loadSDK);\nexport default upscopeFor(window);\n"]}
|