@glasstrace/sdk 0.19.0 → 0.20.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.
Files changed (63) hide show
  1. package/README.md +79 -0
  2. package/dist/chunk-BT2OCXCG.js +178 -0
  3. package/dist/chunk-BT2OCXCG.js.map +1 -0
  4. package/dist/{chunk-F2TZRBEH.js → chunk-DO2YPMQ5.js} +9 -181
  5. package/dist/chunk-DO2YPMQ5.js.map +1 -0
  6. package/dist/{chunk-YPXW2TN3.js → chunk-IP4NMDJK.js} +2 -2
  7. package/dist/{chunk-VN3GZDV6.js → chunk-IQN6TRMQ.js} +2 -2
  8. package/dist/{chunk-XNDHQN4S.js → chunk-LU3PPAOQ.js} +288 -54
  9. package/dist/chunk-LU3PPAOQ.js.map +1 -0
  10. package/dist/chunk-R4DAIPXD.js +4461 -0
  11. package/dist/chunk-R4DAIPXD.js.map +1 -0
  12. package/dist/{chunk-5N2IR4EO.js → chunk-TQ54WLCZ.js} +1 -1
  13. package/dist/{chunk-5N2IR4EO.js.map → chunk-TQ54WLCZ.js.map} +1 -1
  14. package/dist/chunk-Z2EGETTT.js +204 -0
  15. package/dist/chunk-Z2EGETTT.js.map +1 -0
  16. package/dist/cli/init.cjs +483 -152
  17. package/dist/cli/init.cjs.map +1 -1
  18. package/dist/cli/init.d.cts +48 -2
  19. package/dist/cli/init.d.ts +48 -2
  20. package/dist/cli/init.js +109 -7
  21. package/dist/cli/init.js.map +1 -1
  22. package/dist/cli/mcp-add.cjs.map +1 -1
  23. package/dist/cli/mcp-add.js +2 -2
  24. package/dist/cli/uninit.cjs +174 -54
  25. package/dist/cli/uninit.cjs.map +1 -1
  26. package/dist/cli/uninit.d.cts +2 -0
  27. package/dist/cli/uninit.d.ts +2 -0
  28. package/dist/cli/uninit.js +2 -1
  29. package/dist/edge-entry-Ds2fNOeh.d.ts +157 -0
  30. package/dist/edge-entry-FJFKkeFF.d.cts +157 -0
  31. package/dist/edge-entry.cjs +14939 -0
  32. package/dist/edge-entry.cjs.map +1 -0
  33. package/dist/edge-entry.d.cts +6 -0
  34. package/dist/edge-entry.d.ts +6 -0
  35. package/dist/edge-entry.js +16 -0
  36. package/dist/index.cjs +13 -4
  37. package/dist/index.cjs.map +1 -1
  38. package/dist/index.d-DgeH-pNJ.d.cts +191 -0
  39. package/dist/index.d-DgeH-pNJ.d.ts +191 -0
  40. package/dist/index.d.cts +9 -461
  41. package/dist/index.d.ts +9 -461
  42. package/dist/index.js +32 -4609
  43. package/dist/index.js.map +1 -1
  44. package/dist/node-entry.cjs +22492 -0
  45. package/dist/node-entry.cjs.map +1 -0
  46. package/dist/node-entry.d.cts +10 -0
  47. package/dist/node-entry.d.ts +10 -0
  48. package/dist/node-entry.js +101 -0
  49. package/dist/node-entry.js.map +1 -0
  50. package/dist/node-subpath.cjs +14506 -0
  51. package/dist/node-subpath.cjs.map +1 -0
  52. package/dist/node-subpath.d.cts +132 -0
  53. package/dist/node-subpath.d.ts +132 -0
  54. package/dist/node-subpath.js +30 -0
  55. package/dist/node-subpath.js.map +1 -0
  56. package/dist/{source-map-uploader-VPDZWWM2.js → source-map-uploader-YXWO6JLN.js} +3 -3
  57. package/dist/source-map-uploader-YXWO6JLN.js.map +1 -0
  58. package/package.json +4 -1
  59. package/dist/chunk-F2TZRBEH.js.map +0 -1
  60. package/dist/chunk-XNDHQN4S.js.map +0 -1
  61. /package/dist/{chunk-YPXW2TN3.js.map → chunk-IP4NMDJK.js.map} +0 -0
  62. /package/dist/{chunk-VN3GZDV6.js.map → chunk-IQN6TRMQ.js.map} +0 -0
  63. /package/dist/{source-map-uploader-VPDZWWM2.js.map → edge-entry.js.map} +0 -0
@@ -0,0 +1,6 @@
1
+ export { C as ClaimState, a as CorrelationIdRequest, G as GlasstraceSpanProcessor, b as SdkError, c as captureCorrelationId, d as createDiscoveryHandler } from './edge-entry-FJFKkeFF.cjs';
2
+ import './index.d-DgeH-pNJ.cjs';
3
+ import './v4/classic/external.cjs';
4
+ import './export/ReadableSpan';
5
+ import './Span';
6
+ import './SpanProcessor';
@@ -0,0 +1,6 @@
1
+ export { C as ClaimState, a as CorrelationIdRequest, G as GlasstraceSpanProcessor, b as SdkError, c as captureCorrelationId, d as createDiscoveryHandler } from './edge-entry-Ds2fNOeh.js';
2
+ import './index.d-DgeH-pNJ.js';
3
+ import './v4/classic/external.cjs';
4
+ import './export/ReadableSpan';
5
+ import './Span';
6
+ import './SpanProcessor';
@@ -0,0 +1,16 @@
1
+ import {
2
+ GlasstraceSpanProcessor,
3
+ SdkError,
4
+ captureCorrelationId,
5
+ createDiscoveryHandler
6
+ } from "./chunk-Z2EGETTT.js";
7
+ import "./chunk-DQ25VOKK.js";
8
+ import "./chunk-TQ54WLCZ.js";
9
+ import "./chunk-NSBPE2FW.js";
10
+ export {
11
+ GlasstraceSpanProcessor,
12
+ SdkError,
13
+ captureCorrelationId,
14
+ createDiscoveryHandler
15
+ };
16
+ //# sourceMappingURL=edge-entry.js.map
package/dist/index.cjs CHANGED
@@ -18170,6 +18170,14 @@ function deriveErrorCategory(errorType) {
18170
18170
  }
18171
18171
 
18172
18172
  // src/discovery-endpoint.ts
18173
+ var runtimeHandlerDeprecationWarned = false;
18174
+ function warnRuntimeHandlerDeprecatedOnce() {
18175
+ if (runtimeHandlerDeprecationWarned) return;
18176
+ runtimeHandlerDeprecationWarned = true;
18177
+ console.warn(
18178
+ "[glasstrace] createDiscoveryHandler is deprecated. Run `npx glasstrace init` to generate a static file at public/.well-known/glasstrace.json (or static/.well-known/glasstrace.json on SvelteKit). The runtime handler will be removed in v1.0.0."
18179
+ );
18180
+ }
18173
18181
  function isAllowedOrigin(origin) {
18174
18182
  if (origin === null) return true;
18175
18183
  if (origin.startsWith("chrome-extension://")) return true;
@@ -18198,6 +18206,7 @@ function createDiscoveryHandler(getAnonKey, getSessionId, getClaimState) {
18198
18206
  if (url2.pathname !== "/__glasstrace/config") {
18199
18207
  return null;
18200
18208
  }
18209
+ warnRuntimeHandlerDeprecatedOnce();
18201
18210
  const origin = request.headers.get("Origin");
18202
18211
  const corsHeaders = buildCorsHeaders(origin);
18203
18212
  if (request.method === "OPTIONS") {
@@ -21835,7 +21844,7 @@ function registerGlasstrace(options) {
21835
21844
  setCoreState(CoreState.REGISTERING);
21836
21845
  startRuntimeStateWriter({
21837
21846
  projectRoot: process.cwd(),
21838
- sdkVersion: "0.19.0"
21847
+ sdkVersion: "0.20.1"
21839
21848
  });
21840
21849
  const config2 = resolveConfig(options);
21841
21850
  if (config2.verbose) {
@@ -22001,8 +22010,8 @@ async function backgroundInit(config2, anonKeyForInit, generation) {
22001
22010
  if (config2.verbose) {
22002
22011
  console.info("[glasstrace] Background init firing.");
22003
22012
  }
22004
- const healthReport = collectHealthReport("0.19.0");
22005
- const initResult = await performInit(config2, anonKeyForInit, "0.19.0", healthReport);
22013
+ const healthReport = collectHealthReport("0.20.1");
22014
+ const initResult = await performInit(config2, anonKeyForInit, "0.20.1", healthReport);
22006
22015
  if (generation !== registrationGeneration) return;
22007
22016
  const currentState = getCoreState();
22008
22017
  if (currentState === CoreState.SHUTTING_DOWN || currentState === CoreState.SHUTDOWN) {
@@ -22025,7 +22034,7 @@ async function backgroundInit(config2, anonKeyForInit, generation) {
22025
22034
  }
22026
22035
  maybeInstallConsoleCapture();
22027
22036
  if (didLastInitSucceed()) {
22028
- startHeartbeat(config2, anonKeyForInit, "0.19.0", generation, (newApiKey, accountId) => {
22037
+ startHeartbeat(config2, anonKeyForInit, "0.20.1", generation, (newApiKey, accountId) => {
22029
22038
  setAuthState(AuthState.CLAIMING);
22030
22039
  emitLifecycleEvent("auth:claim_started", { accountId });
22031
22040
  setResolvedApiKey(newApiKey);