@glasstrace/sdk 1.3.0 → 1.3.2

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 (52) hide show
  1. package/dist/{chunk-AGCYKZFY.js → chunk-CRM3EYOL.js} +2 -2
  2. package/dist/{chunk-JMYKR5Z3.js → chunk-DQGNUENK.js} +14 -9
  3. package/dist/chunk-DQGNUENK.js.map +1 -0
  4. package/dist/{chunk-FVHVDBGX.js → chunk-GCFOY7T2.js} +3 -3
  5. package/dist/{chunk-FVHVDBGX.js.map → chunk-GCFOY7T2.js.map} +1 -1
  6. package/dist/{chunk-FMEWG3FY.js → chunk-JFR42QG5.js} +2 -2
  7. package/dist/{chunk-GTPTKN5A.js → chunk-MQHLWSIX.js} +1 -1
  8. package/dist/{chunk-GTPTKN5A.js.map → chunk-MQHLWSIX.js.map} +1 -1
  9. package/dist/{chunk-A63WX7NR.js → chunk-REEU6CNO.js} +3 -3
  10. package/dist/{chunk-AYUL5QMZ.js → chunk-UFZEISZB.js} +11 -2
  11. package/dist/chunk-UFZEISZB.js.map +1 -0
  12. package/dist/{chunk-AKZGMT33.js → chunk-XS3BO7RY.js} +2 -2
  13. package/dist/cli/init.cjs +1 -1
  14. package/dist/cli/init.cjs.map +1 -1
  15. package/dist/cli/init.js +6 -6
  16. package/dist/cli/mcp-add.cjs.map +1 -1
  17. package/dist/cli/mcp-add.js +2 -2
  18. package/dist/cli/uninit.cjs.map +1 -1
  19. package/dist/cli/uninit.js +3 -3
  20. package/dist/cli/validate.cjs.map +1 -1
  21. package/dist/cli/validate.js +2 -2
  22. package/dist/{edge-entry-DYl05SJ-.d.cts → edge-entry-DT9OhPTC.d.cts} +1 -1
  23. package/dist/{edge-entry-CFq085RZ.d.ts → edge-entry-shCc8_Y1.d.ts} +1 -1
  24. package/dist/edge-entry.cjs.map +1 -1
  25. package/dist/edge-entry.d.cts +2 -2
  26. package/dist/edge-entry.d.ts +2 -2
  27. package/dist/edge-entry.js +2 -2
  28. package/dist/index.cjs +16 -4
  29. package/dist/index.cjs.map +1 -1
  30. package/dist/{index.d-CYYe3PxB.d.ts → index.d-DiI6uVEW.d.cts} +1 -1
  31. package/dist/{index.d-CYYe3PxB.d.cts → index.d-DiI6uVEW.d.ts} +1 -1
  32. package/dist/index.d.cts +4 -4
  33. package/dist/index.d.ts +4 -4
  34. package/dist/index.js +5 -5
  35. package/dist/node-entry.cjs +16 -4
  36. package/dist/node-entry.cjs.map +1 -1
  37. package/dist/node-entry.d.cts +2 -2
  38. package/dist/node-entry.d.ts +2 -2
  39. package/dist/node-entry.js +7 -7
  40. package/dist/node-subpath.cjs.map +1 -1
  41. package/dist/node-subpath.d.cts +1 -1
  42. package/dist/node-subpath.d.ts +1 -1
  43. package/dist/node-subpath.js +3 -3
  44. package/dist/{source-map-uploader-M2P5CDOB.js → source-map-uploader-LACAGKIW.js} +3 -3
  45. package/package.json +1 -1
  46. package/dist/chunk-AYUL5QMZ.js.map +0 -1
  47. package/dist/chunk-JMYKR5Z3.js.map +0 -1
  48. /package/dist/{chunk-AGCYKZFY.js.map → chunk-CRM3EYOL.js.map} +0 -0
  49. /package/dist/{chunk-FMEWG3FY.js.map → chunk-JFR42QG5.js.map} +0 -0
  50. /package/dist/{chunk-A63WX7NR.js.map → chunk-REEU6CNO.js.map} +0 -0
  51. /package/dist/{chunk-AKZGMT33.js.map → chunk-XS3BO7RY.js.map} +0 -0
  52. /package/dist/{source-map-uploader-M2P5CDOB.js.map → source-map-uploader-LACAGKIW.js.map} +0 -0
@@ -1,5 +1,5 @@
1
- export { C as CorrelationIdRequest, G as GlasstraceSpanProcessor, S as SdkError, c as captureCorrelationId } from './edge-entry-DYl05SJ-.cjs';
2
- import './index.d-CYYe3PxB.cjs';
1
+ export { C as CorrelationIdRequest, G as GlasstraceSpanProcessor, S as SdkError, c as captureCorrelationId } from './edge-entry-DT9OhPTC.cjs';
2
+ import './index.d-DiI6uVEW.cjs';
3
3
  import './v4/classic/external.cjs';
4
4
  import './export/ReadableSpan';
5
5
  import './Span';
@@ -1,5 +1,5 @@
1
- export { C as CorrelationIdRequest, G as GlasstraceSpanProcessor, S as SdkError, c as captureCorrelationId } from './edge-entry-CFq085RZ.js';
2
- import './index.d-CYYe3PxB.js';
1
+ export { C as CorrelationIdRequest, G as GlasstraceSpanProcessor, S as SdkError, c as captureCorrelationId } from './edge-entry-shCc8_Y1.js';
2
+ import './index.d-DiI6uVEW.js';
3
3
  import './v4/classic/external.cjs';
4
4
  import './export/ReadableSpan';
5
5
  import './Span';
@@ -2,9 +2,9 @@ import {
2
2
  GlasstraceSpanProcessor,
3
3
  SdkError,
4
4
  captureCorrelationId
5
- } from "./chunk-AGCYKZFY.js";
5
+ } from "./chunk-CRM3EYOL.js";
6
6
  import "./chunk-DQ25VOKK.js";
7
- import "./chunk-GTPTKN5A.js";
7
+ import "./chunk-MQHLWSIX.js";
8
8
  import "./chunk-NSBPE2FW.js";
9
9
  export {
10
10
  GlasstraceSpanProcessor,
package/dist/index.cjs CHANGED
@@ -17601,6 +17601,14 @@ function fsyncParentDirSyncWithFs(targetPath, fs3) {
17601
17601
  }
17602
17602
  }
17603
17603
  }
17604
+ function isSyncFsAvailable() {
17605
+ try {
17606
+ loadFsSync();
17607
+ return true;
17608
+ } catch {
17609
+ return false;
17610
+ }
17611
+ }
17604
17612
 
17605
17613
  // src/mcp-runtime.ts
17606
17614
  var MCP_ENDPOINT = "https://api.glasstrace.dev/mcp";
@@ -22426,6 +22434,10 @@ var _debounceTimer = null;
22426
22434
  var _started = false;
22427
22435
  function startRuntimeStateWriter(options) {
22428
22436
  if (_started) return;
22437
+ if (!isSyncFsAvailable()) {
22438
+ _started = true;
22439
+ return;
22440
+ }
22429
22441
  _started = true;
22430
22442
  _projectRoot = options.projectRoot;
22431
22443
  _sdkVersion = options.sdkVersion;
@@ -22511,7 +22523,7 @@ function registerGlasstrace(options) {
22511
22523
  setCoreState(CoreState.REGISTERING);
22512
22524
  startRuntimeStateWriter({
22513
22525
  projectRoot: process.cwd(),
22514
- sdkVersion: "1.3.0"
22526
+ sdkVersion: "1.3.2"
22515
22527
  });
22516
22528
  const config2 = resolveConfig(options);
22517
22529
  if (config2.verbose) {
@@ -22677,8 +22689,8 @@ async function backgroundInit(config2, anonKeyForInit, generation) {
22677
22689
  if (config2.verbose) {
22678
22690
  console.info("[glasstrace] Background init firing.");
22679
22691
  }
22680
- const healthReport = collectHealthReport("1.3.0");
22681
- const initResult = await performInit(config2, anonKeyForInit, "1.3.0", healthReport);
22692
+ const healthReport = collectHealthReport("1.3.2");
22693
+ const initResult = await performInit(config2, anonKeyForInit, "1.3.2", healthReport);
22682
22694
  if (generation !== registrationGeneration) return;
22683
22695
  const currentState = getCoreState();
22684
22696
  if (currentState === CoreState.SHUTTING_DOWN || currentState === CoreState.SHUTDOWN) {
@@ -22701,7 +22713,7 @@ async function backgroundInit(config2, anonKeyForInit, generation) {
22701
22713
  }
22702
22714
  maybeInstallConsoleCapture();
22703
22715
  if (didLastInitSucceed()) {
22704
- startHeartbeat(config2, anonKeyForInit, "1.3.0", generation, (newApiKey, accountId) => {
22716
+ startHeartbeat(config2, anonKeyForInit, "1.3.2", generation, (newApiKey, accountId) => {
22705
22717
  setAuthState(AuthState.CLAIMING);
22706
22718
  emitLifecycleEvent("auth:claim_started", { accountId });
22707
22719
  setResolvedApiKey(newApiKey);