@glasstrace/sdk 0.15.1 → 0.16.0

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 (78) hide show
  1. package/README.md +84 -1
  2. package/dist/adapters/drizzle.js +2 -5
  3. package/dist/adapters/drizzle.js.map +1 -1
  4. package/dist/{chunk-PD2SKFQQ.js → chunk-55FBXXER.js} +4 -8
  5. package/dist/{chunk-PD2SKFQQ.js.map → chunk-55FBXXER.js.map} +1 -1
  6. package/dist/chunk-5C2TJFLB.js +851 -0
  7. package/dist/chunk-5C2TJFLB.js.map +1 -0
  8. package/dist/{chunk-YMEXDDTA.js → chunk-7JBKXSBU.js} +3 -99
  9. package/dist/chunk-7JBKXSBU.js.map +1 -0
  10. package/dist/{chunk-2LDBR3F3.js → chunk-BANTDXUT.js} +15 -74
  11. package/dist/chunk-BANTDXUT.js.map +1 -0
  12. package/dist/{chunk-ZNOD6FC7.js → chunk-CTJI2YKA.js} +8 -15
  13. package/dist/{chunk-ZNOD6FC7.js.map → chunk-CTJI2YKA.js.map} +1 -1
  14. package/dist/{chunk-WK7MPK2T.js → chunk-DQ25VOKK.js} +1 -89
  15. package/dist/chunk-DQ25VOKK.js.map +1 -0
  16. package/dist/{chunk-BL3YDC6V.js → chunk-DXRZKKSO.js} +1 -6
  17. package/dist/{chunk-BL3YDC6V.js.map → chunk-DXRZKKSO.js.map} +1 -1
  18. package/dist/{chunk-BGZ7J74D.js → chunk-NSBPE2FW.js} +2 -16
  19. package/dist/{chunk-A2AZL6MZ.js → chunk-O63DJKIJ.js} +169 -18
  20. package/dist/chunk-O63DJKIJ.js.map +1 -0
  21. package/dist/{chunk-ECEN724Y.js → chunk-TM5NKZTO.js} +4 -8
  22. package/dist/{chunk-ECEN724Y.js.map → chunk-TM5NKZTO.js.map} +1 -1
  23. package/dist/chunk-VUZCLMIX.js +57 -0
  24. package/dist/chunk-VUZCLMIX.js.map +1 -0
  25. package/dist/{chunk-OSXIUKD5.js → chunk-WZXVS2EO.js} +1 -6
  26. package/dist/{chunk-OSXIUKD5.js.map → chunk-WZXVS2EO.js.map} +1 -1
  27. package/dist/{chunk-ROFOJQWN.js → chunk-XNDHQN4S.js} +7 -11
  28. package/dist/{chunk-ROFOJQWN.js.map → chunk-XNDHQN4S.js.map} +1 -1
  29. package/dist/cli/init.cjs +673 -161
  30. package/dist/cli/init.cjs.map +1 -1
  31. package/dist/cli/init.d.cts +54 -1
  32. package/dist/cli/init.d.ts +54 -1
  33. package/dist/cli/init.js +146 -37
  34. package/dist/cli/init.js.map +1 -1
  35. package/dist/cli/mcp-add.cjs +16 -16
  36. package/dist/cli/mcp-add.cjs.map +1 -1
  37. package/dist/cli/mcp-add.js +10 -13
  38. package/dist/cli/mcp-add.js.map +1 -1
  39. package/dist/cli/status.cjs +2 -2
  40. package/dist/cli/status.js +4 -7
  41. package/dist/cli/status.js.map +1 -1
  42. package/dist/cli/uninit.cjs +56 -59
  43. package/dist/cli/uninit.cjs.map +1 -1
  44. package/dist/cli/uninit.js +4 -4
  45. package/dist/cli/validate.cjs +2 -2
  46. package/dist/cli/validate.js +3 -6
  47. package/dist/cli/validate.js.map +1 -1
  48. package/dist/{esm-MDK7CZID.js → esm-KBPHCVB4.js} +3 -3
  49. package/dist/{getMachineId-bsd-4NIRBWME.js → getMachineId-bsd-345PYXFX.js} +4 -7
  50. package/dist/{getMachineId-bsd-4NIRBWME.js.map → getMachineId-bsd-345PYXFX.js.map} +1 -1
  51. package/dist/{getMachineId-darwin-2XNOCCJQ.js → getMachineId-darwin-5L2D25AD.js} +4 -7
  52. package/dist/{getMachineId-darwin-2XNOCCJQ.js.map → getMachineId-darwin-5L2D25AD.js.map} +1 -1
  53. package/dist/{getMachineId-linux-V6YSQEY7.js → getMachineId-linux-KJR4P5HN.js} +3 -6
  54. package/dist/{getMachineId-linux-V6YSQEY7.js.map → getMachineId-linux-KJR4P5HN.js.map} +1 -1
  55. package/dist/{getMachineId-unsupported-4FKBJNVO.js → getMachineId-unsupported-NDNXDYDY.js} +3 -6
  56. package/dist/{getMachineId-unsupported-4FKBJNVO.js.map → getMachineId-unsupported-NDNXDYDY.js.map} +1 -1
  57. package/dist/{getMachineId-win-WLRZBKVG.js → getMachineId-win-T7PJNJXG.js} +4 -7
  58. package/dist/{getMachineId-win-WLRZBKVG.js.map → getMachineId-win-T7PJNJXG.js.map} +1 -1
  59. package/dist/index.cjs +449 -461
  60. package/dist/index.cjs.map +1 -1
  61. package/dist/index.d.cts +38 -3
  62. package/dist/index.d.ts +38 -3
  63. package/dist/index.js +195 -701
  64. package/dist/index.js.map +1 -1
  65. package/dist/{monorepo-YILKGQXQ.js → monorepo-N5Z63XP7.js} +4 -4
  66. package/dist/{source-map-uploader-3GWUQDTS.js → source-map-uploader-MUZPI2S5.js} +5 -4
  67. package/dist/source-map-uploader-MUZPI2S5.js.map +1 -0
  68. package/package.json +1 -1
  69. package/dist/chunk-2LDBR3F3.js.map +0 -1
  70. package/dist/chunk-A2AZL6MZ.js.map +0 -1
  71. package/dist/chunk-BGZ7J74D.js.map +0 -1
  72. package/dist/chunk-UPS5BGER.js +0 -182
  73. package/dist/chunk-UPS5BGER.js.map +0 -1
  74. package/dist/chunk-WK7MPK2T.js.map +0 -1
  75. package/dist/chunk-YMEXDDTA.js.map +0 -1
  76. /package/dist/{esm-MDK7CZID.js.map → chunk-NSBPE2FW.js.map} +0 -0
  77. /package/dist/{monorepo-YILKGQXQ.js.map → esm-KBPHCVB4.js.map} +0 -0
  78. /package/dist/{source-map-uploader-3GWUQDTS.js.map → monorepo-N5Z63XP7.js.map} +0 -0
package/dist/index.cjs CHANGED
@@ -30,13 +30,6 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
30
30
  ));
31
31
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
32
32
 
33
- // ../../node_modules/tsup/assets/cjs_shims.js
34
- var init_cjs_shims = __esm({
35
- "../../node_modules/tsup/assets/cjs_shims.js"() {
36
- "use strict";
37
- }
38
- });
39
-
40
33
  // src/env-detection.ts
41
34
  function readEnvVars() {
42
35
  return {
@@ -89,7 +82,6 @@ var DEFAULT_ENDPOINT;
89
82
  var init_env_detection = __esm({
90
83
  "src/env-detection.ts"() {
91
84
  "use strict";
92
- init_cjs_shims();
93
85
  DEFAULT_ENDPOINT = "https://api.glasstrace.dev";
94
86
  }
95
87
  });
@@ -156,7 +148,6 @@ var NEVER, $brand, $ZodAsyncError, $ZodEncodeError, globalConfig;
156
148
  var init_core = __esm({
157
149
  "../../node_modules/zod/v4/core/core.js"() {
158
150
  "use strict";
159
- init_cjs_shims();
160
151
  NEVER = Object.freeze({
161
152
  status: "aborted"
162
153
  });
@@ -782,7 +773,6 @@ var EVALUATING, captureStackTrace, allowsEval, getParsedType, propertyKeyTypes,
782
773
  var init_util = __esm({
783
774
  "../../node_modules/zod/v4/core/util.js"() {
784
775
  "use strict";
785
- init_cjs_shims();
786
776
  EVALUATING = /* @__PURE__ */ Symbol("evaluating");
787
777
  captureStackTrace = "captureStackTrace" in Error ? Error.captureStackTrace : (..._args) => {
788
778
  };
@@ -983,7 +973,6 @@ var initializer, $ZodError, $ZodRealError;
983
973
  var init_errors = __esm({
984
974
  "../../node_modules/zod/v4/core/errors.js"() {
985
975
  "use strict";
986
- init_cjs_shims();
987
976
  init_core();
988
977
  init_util();
989
978
  initializer = (inst, def) => {
@@ -1012,7 +1001,6 @@ var _parse, parse, _parseAsync, parseAsync, _safeParse, safeParse, _safeParseAsy
1012
1001
  var init_parse = __esm({
1013
1002
  "../../node_modules/zod/v4/core/parse.js"() {
1014
1003
  "use strict";
1015
- init_cjs_shims();
1016
1004
  init_core();
1017
1005
  init_errors();
1018
1006
  init_util();
@@ -1198,7 +1186,6 @@ var cuid, cuid2, ulid, xid, ksuid, nanoid, duration, extendedDuration, guid, uui
1198
1186
  var init_regexes = __esm({
1199
1187
  "../../node_modules/zod/v4/core/regexes.js"() {
1200
1188
  "use strict";
1201
- init_cjs_shims();
1202
1189
  init_util();
1203
1190
  cuid = /^[cC][^\s-]{8,}$/;
1204
1191
  cuid2 = /^[0-9a-z]+$/;
@@ -1280,7 +1267,6 @@ var $ZodCheck, numericOriginMap, $ZodCheckLessThan, $ZodCheckGreaterThan, $ZodCh
1280
1267
  var init_checks = __esm({
1281
1268
  "../../node_modules/zod/v4/core/checks.js"() {
1282
1269
  "use strict";
1283
- init_cjs_shims();
1284
1270
  init_core();
1285
1271
  init_regexes();
1286
1272
  init_util();
@@ -1833,7 +1819,6 @@ var Doc;
1833
1819
  var init_doc = __esm({
1834
1820
  "../../node_modules/zod/v4/core/doc.js"() {
1835
1821
  "use strict";
1836
- init_cjs_shims();
1837
1822
  Doc = class {
1838
1823
  constructor(args = []) {
1839
1824
  this.content = [];
@@ -1876,7 +1861,6 @@ var version;
1876
1861
  var init_versions = __esm({
1877
1862
  "../../node_modules/zod/v4/core/versions.js"() {
1878
1863
  "use strict";
1879
- init_cjs_shims();
1880
1864
  version = {
1881
1865
  major: 4,
1882
1866
  minor: 3,
@@ -2247,7 +2231,6 @@ var $ZodType, $ZodString, $ZodStringFormat, $ZodGUID, $ZodUUID, $ZodEmail, $ZodU
2247
2231
  var init_schemas = __esm({
2248
2232
  "../../node_modules/zod/v4/core/schemas.js"() {
2249
2233
  "use strict";
2250
- init_cjs_shims();
2251
2234
  init_checks();
2252
2235
  init_core();
2253
2236
  init_doc();
@@ -3881,7 +3864,6 @@ var error;
3881
3864
  var init_ar = __esm({
3882
3865
  "../../node_modules/zod/v4/locales/ar.js"() {
3883
3866
  "use strict";
3884
- init_cjs_shims();
3885
3867
  init_util();
3886
3868
  error = () => {
3887
3869
  const Sizable = {
@@ -3996,7 +3978,6 @@ var error2;
3996
3978
  var init_az = __esm({
3997
3979
  "../../node_modules/zod/v4/locales/az.js"() {
3998
3980
  "use strict";
3999
- init_cjs_shims();
4000
3981
  init_util();
4001
3982
  error2 = () => {
4002
3983
  const Sizable = {
@@ -4125,7 +4106,6 @@ var error3;
4125
4106
  var init_be = __esm({
4126
4107
  "../../node_modules/zod/v4/locales/be.js"() {
4127
4108
  "use strict";
4128
- init_cjs_shims();
4129
4109
  init_util();
4130
4110
  error3 = () => {
4131
4111
  const Sizable = {
@@ -4275,7 +4255,6 @@ var error4;
4275
4255
  var init_bg = __esm({
4276
4256
  "../../node_modules/zod/v4/locales/bg.js"() {
4277
4257
  "use strict";
4278
- init_cjs_shims();
4279
4258
  init_util();
4280
4259
  error4 = () => {
4281
4260
  const Sizable = {
@@ -4404,7 +4383,6 @@ var error5;
4404
4383
  var init_ca = __esm({
4405
4384
  "../../node_modules/zod/v4/locales/ca.js"() {
4406
4385
  "use strict";
4407
- init_cjs_shims();
4408
4386
  init_util();
4409
4387
  error5 = () => {
4410
4388
  const Sizable = {
@@ -4521,7 +4499,6 @@ var error6;
4521
4499
  var init_cs = __esm({
4522
4500
  "../../node_modules/zod/v4/locales/cs.js"() {
4523
4501
  "use strict";
4524
- init_cjs_shims();
4525
4502
  init_util();
4526
4503
  error6 = () => {
4527
4504
  const Sizable = {
@@ -4641,7 +4618,6 @@ var error7;
4641
4618
  var init_da = __esm({
4642
4619
  "../../node_modules/zod/v4/locales/da.js"() {
4643
4620
  "use strict";
4644
- init_cjs_shims();
4645
4621
  init_util();
4646
4622
  error7 = () => {
4647
4623
  const Sizable = {
@@ -4765,7 +4741,6 @@ var error8;
4765
4741
  var init_de = __esm({
4766
4742
  "../../node_modules/zod/v4/locales/de.js"() {
4767
4743
  "use strict";
4768
- init_cjs_shims();
4769
4744
  init_util();
4770
4745
  error8 = () => {
4771
4746
  const Sizable = {
@@ -4882,7 +4857,6 @@ var error9;
4882
4857
  var init_en = __esm({
4883
4858
  "../../node_modules/zod/v4/locales/en.js"() {
4884
4859
  "use strict";
4885
- init_cjs_shims();
4886
4860
  init_util();
4887
4861
  error9 = () => {
4888
4862
  const Sizable = {
@@ -4999,7 +4973,6 @@ var error10;
4999
4973
  var init_eo = __esm({
5000
4974
  "../../node_modules/zod/v4/locales/eo.js"() {
5001
4975
  "use strict";
5002
- init_cjs_shims();
5003
4976
  init_util();
5004
4977
  error10 = () => {
5005
4978
  const Sizable = {
@@ -5117,7 +5090,6 @@ var error11;
5117
5090
  var init_es = __esm({
5118
5091
  "../../node_modules/zod/v4/locales/es.js"() {
5119
5092
  "use strict";
5120
- init_cjs_shims();
5121
5093
  init_util();
5122
5094
  error11 = () => {
5123
5095
  const Sizable = {
@@ -5258,7 +5230,6 @@ var error12;
5258
5230
  var init_fa = __esm({
5259
5231
  "../../node_modules/zod/v4/locales/fa.js"() {
5260
5232
  "use strict";
5261
- init_cjs_shims();
5262
5233
  init_util();
5263
5234
  error12 = () => {
5264
5235
  const Sizable = {
@@ -5381,7 +5352,6 @@ var error13;
5381
5352
  var init_fi = __esm({
5382
5353
  "../../node_modules/zod/v4/locales/fi.js"() {
5383
5354
  "use strict";
5384
- init_cjs_shims();
5385
5355
  init_util();
5386
5356
  error13 = () => {
5387
5357
  const Sizable = {
@@ -5502,7 +5472,6 @@ var error14;
5502
5472
  var init_fr = __esm({
5503
5473
  "../../node_modules/zod/v4/locales/fr.js"() {
5504
5474
  "use strict";
5505
- init_cjs_shims();
5506
5475
  init_util();
5507
5476
  error14 = () => {
5508
5477
  const Sizable = {
@@ -5619,7 +5588,6 @@ var error15;
5619
5588
  var init_fr_CA = __esm({
5620
5589
  "../../node_modules/zod/v4/locales/fr-CA.js"() {
5621
5590
  "use strict";
5622
- init_cjs_shims();
5623
5591
  init_util();
5624
5592
  error15 = () => {
5625
5593
  const Sizable = {
@@ -5735,7 +5703,6 @@ var error16;
5735
5703
  var init_he = __esm({
5736
5704
  "../../node_modules/zod/v4/locales/he.js"() {
5737
5705
  "use strict";
5738
- init_cjs_shims();
5739
5706
  init_util();
5740
5707
  error16 = () => {
5741
5708
  const TypeNames = {
@@ -5938,7 +5905,6 @@ var error17;
5938
5905
  var init_hu = __esm({
5939
5906
  "../../node_modules/zod/v4/locales/hu.js"() {
5940
5907
  "use strict";
5941
- init_cjs_shims();
5942
5908
  init_util();
5943
5909
  error17 = () => {
5944
5910
  const Sizable = {
@@ -6065,7 +6031,6 @@ var error18;
6065
6031
  var init_hy = __esm({
6066
6032
  "../../node_modules/zod/v4/locales/hy.js"() {
6067
6033
  "use strict";
6068
- init_cjs_shims();
6069
6034
  init_util();
6070
6035
  error18 = () => {
6071
6036
  const Sizable = {
@@ -6211,7 +6176,6 @@ var error19;
6211
6176
  var init_id = __esm({
6212
6177
  "../../node_modules/zod/v4/locales/id.js"() {
6213
6178
  "use strict";
6214
- init_cjs_shims();
6215
6179
  init_util();
6216
6180
  error19 = () => {
6217
6181
  const Sizable = {
@@ -6326,7 +6290,6 @@ var error20;
6326
6290
  var init_is = __esm({
6327
6291
  "../../node_modules/zod/v4/locales/is.js"() {
6328
6292
  "use strict";
6329
- init_cjs_shims();
6330
6293
  init_util();
6331
6294
  error20 = () => {
6332
6295
  const Sizable = {
@@ -6444,7 +6407,6 @@ var error21;
6444
6407
  var init_it = __esm({
6445
6408
  "../../node_modules/zod/v4/locales/it.js"() {
6446
6409
  "use strict";
6447
- init_cjs_shims();
6448
6410
  init_util();
6449
6411
  error21 = () => {
6450
6412
  const Sizable = {
@@ -6561,7 +6523,6 @@ var error22;
6561
6523
  var init_ja = __esm({
6562
6524
  "../../node_modules/zod/v4/locales/ja.js"() {
6563
6525
  "use strict";
6564
- init_cjs_shims();
6565
6526
  init_util();
6566
6527
  error22 = () => {
6567
6528
  const Sizable = {
@@ -6677,7 +6638,6 @@ var error23;
6677
6638
  var init_ka = __esm({
6678
6639
  "../../node_modules/zod/v4/locales/ka.js"() {
6679
6640
  "use strict";
6680
- init_cjs_shims();
6681
6641
  init_util();
6682
6642
  error23 = () => {
6683
6643
  const Sizable = {
@@ -6798,7 +6758,6 @@ var error24;
6798
6758
  var init_km = __esm({
6799
6759
  "../../node_modules/zod/v4/locales/km.js"() {
6800
6760
  "use strict";
6801
- init_cjs_shims();
6802
6761
  init_util();
6803
6762
  error24 = () => {
6804
6763
  const Sizable = {
@@ -6914,7 +6873,6 @@ function kh_default() {
6914
6873
  var init_kh = __esm({
6915
6874
  "../../node_modules/zod/v4/locales/kh.js"() {
6916
6875
  "use strict";
6917
- init_cjs_shims();
6918
6876
  init_km();
6919
6877
  }
6920
6878
  });
@@ -6929,7 +6887,6 @@ var error25;
6929
6887
  var init_ko = __esm({
6930
6888
  "../../node_modules/zod/v4/locales/ko.js"() {
6931
6889
  "use strict";
6932
- init_cjs_shims();
6933
6890
  init_util();
6934
6891
  error25 = () => {
6935
6892
  const Sizable = {
@@ -7059,7 +7016,6 @@ var capitalizeFirstCharacter, error26;
7059
7016
  var init_lt = __esm({
7060
7017
  "../../node_modules/zod/v4/locales/lt.js"() {
7061
7018
  "use strict";
7062
- init_cjs_shims();
7063
7019
  init_util();
7064
7020
  capitalizeFirstCharacter = (text) => {
7065
7021
  return text.charAt(0).toUpperCase() + text.slice(1);
@@ -7261,7 +7217,6 @@ var error27;
7261
7217
  var init_mk = __esm({
7262
7218
  "../../node_modules/zod/v4/locales/mk.js"() {
7263
7219
  "use strict";
7264
- init_cjs_shims();
7265
7220
  init_util();
7266
7221
  error27 = () => {
7267
7222
  const Sizable = {
@@ -7379,7 +7334,6 @@ var error28;
7379
7334
  var init_ms = __esm({
7380
7335
  "../../node_modules/zod/v4/locales/ms.js"() {
7381
7336
  "use strict";
7382
- init_cjs_shims();
7383
7337
  init_util();
7384
7338
  error28 = () => {
7385
7339
  const Sizable = {
@@ -7495,7 +7449,6 @@ var error29;
7495
7449
  var init_nl = __esm({
7496
7450
  "../../node_modules/zod/v4/locales/nl.js"() {
7497
7451
  "use strict";
7498
- init_cjs_shims();
7499
7452
  init_util();
7500
7453
  error29 = () => {
7501
7454
  const Sizable = {
@@ -7614,7 +7567,6 @@ var error30;
7614
7567
  var init_no = __esm({
7615
7568
  "../../node_modules/zod/v4/locales/no.js"() {
7616
7569
  "use strict";
7617
- init_cjs_shims();
7618
7570
  init_util();
7619
7571
  error30 = () => {
7620
7572
  const Sizable = {
@@ -7731,7 +7683,6 @@ var error31;
7731
7683
  var init_ota = __esm({
7732
7684
  "../../node_modules/zod/v4/locales/ota.js"() {
7733
7685
  "use strict";
7734
- init_cjs_shims();
7735
7686
  init_util();
7736
7687
  error31 = () => {
7737
7688
  const Sizable = {
@@ -7849,7 +7800,6 @@ var error32;
7849
7800
  var init_ps = __esm({
7850
7801
  "../../node_modules/zod/v4/locales/ps.js"() {
7851
7802
  "use strict";
7852
- init_cjs_shims();
7853
7803
  init_util();
7854
7804
  error32 = () => {
7855
7805
  const Sizable = {
@@ -7972,7 +7922,6 @@ var error33;
7972
7922
  var init_pl = __esm({
7973
7923
  "../../node_modules/zod/v4/locales/pl.js"() {
7974
7924
  "use strict";
7975
- init_cjs_shims();
7976
7925
  init_util();
7977
7926
  error33 = () => {
7978
7927
  const Sizable = {
@@ -8090,7 +8039,6 @@ var error34;
8090
8039
  var init_pt = __esm({
8091
8040
  "../../node_modules/zod/v4/locales/pt.js"() {
8092
8041
  "use strict";
8093
- init_cjs_shims();
8094
8042
  init_util();
8095
8043
  error34 = () => {
8096
8044
  const Sizable = {
@@ -8222,7 +8170,6 @@ var error35;
8222
8170
  var init_ru = __esm({
8223
8171
  "../../node_modules/zod/v4/locales/ru.js"() {
8224
8172
  "use strict";
8225
- init_cjs_shims();
8226
8173
  init_util();
8227
8174
  error35 = () => {
8228
8175
  const Sizable = {
@@ -8372,7 +8319,6 @@ var error36;
8372
8319
  var init_sl = __esm({
8373
8320
  "../../node_modules/zod/v4/locales/sl.js"() {
8374
8321
  "use strict";
8375
- init_cjs_shims();
8376
8322
  init_util();
8377
8323
  error36 = () => {
8378
8324
  const Sizable = {
@@ -8490,7 +8436,6 @@ var error37;
8490
8436
  var init_sv = __esm({
8491
8437
  "../../node_modules/zod/v4/locales/sv.js"() {
8492
8438
  "use strict";
8493
- init_cjs_shims();
8494
8439
  init_util();
8495
8440
  error37 = () => {
8496
8441
  const Sizable = {
@@ -8609,7 +8554,6 @@ var error38;
8609
8554
  var init_ta = __esm({
8610
8555
  "../../node_modules/zod/v4/locales/ta.js"() {
8611
8556
  "use strict";
8612
- init_cjs_shims();
8613
8557
  init_util();
8614
8558
  error38 = () => {
8615
8559
  const Sizable = {
@@ -8728,7 +8672,6 @@ var error39;
8728
8672
  var init_th = __esm({
8729
8673
  "../../node_modules/zod/v4/locales/th.js"() {
8730
8674
  "use strict";
8731
- init_cjs_shims();
8732
8675
  init_util();
8733
8676
  error39 = () => {
8734
8677
  const Sizable = {
@@ -8847,7 +8790,6 @@ var error40;
8847
8790
  var init_tr = __esm({
8848
8791
  "../../node_modules/zod/v4/locales/tr.js"() {
8849
8792
  "use strict";
8850
- init_cjs_shims();
8851
8793
  init_util();
8852
8794
  error40 = () => {
8853
8795
  const Sizable = {
@@ -8961,7 +8903,6 @@ var error41;
8961
8903
  var init_uk = __esm({
8962
8904
  "../../node_modules/zod/v4/locales/uk.js"() {
8963
8905
  "use strict";
8964
- init_cjs_shims();
8965
8906
  init_util();
8966
8907
  error41 = () => {
8967
8908
  const Sizable = {
@@ -9075,7 +9016,6 @@ function ua_default() {
9075
9016
  var init_ua = __esm({
9076
9017
  "../../node_modules/zod/v4/locales/ua.js"() {
9077
9018
  "use strict";
9078
- init_cjs_shims();
9079
9019
  init_uk();
9080
9020
  }
9081
9021
  });
@@ -9090,7 +9030,6 @@ var error42;
9090
9030
  var init_ur = __esm({
9091
9031
  "../../node_modules/zod/v4/locales/ur.js"() {
9092
9032
  "use strict";
9093
- init_cjs_shims();
9094
9033
  init_util();
9095
9034
  error42 = () => {
9096
9035
  const Sizable = {
@@ -9209,7 +9148,6 @@ var error43;
9209
9148
  var init_uz = __esm({
9210
9149
  "../../node_modules/zod/v4/locales/uz.js"() {
9211
9150
  "use strict";
9212
- init_cjs_shims();
9213
9151
  init_util();
9214
9152
  error43 = () => {
9215
9153
  const Sizable = {
@@ -9327,7 +9265,6 @@ var error44;
9327
9265
  var init_vi = __esm({
9328
9266
  "../../node_modules/zod/v4/locales/vi.js"() {
9329
9267
  "use strict";
9330
- init_cjs_shims();
9331
9268
  init_util();
9332
9269
  error44 = () => {
9333
9270
  const Sizable = {
@@ -9444,7 +9381,6 @@ var error45;
9444
9381
  var init_zh_CN = __esm({
9445
9382
  "../../node_modules/zod/v4/locales/zh-CN.js"() {
9446
9383
  "use strict";
9447
- init_cjs_shims();
9448
9384
  init_util();
9449
9385
  error45 = () => {
9450
9386
  const Sizable = {
@@ -9562,7 +9498,6 @@ var error46;
9562
9498
  var init_zh_TW = __esm({
9563
9499
  "../../node_modules/zod/v4/locales/zh-TW.js"() {
9564
9500
  "use strict";
9565
- init_cjs_shims();
9566
9501
  init_util();
9567
9502
  error46 = () => {
9568
9503
  const Sizable = {
@@ -9678,7 +9613,6 @@ var error47;
9678
9613
  var init_yo = __esm({
9679
9614
  "../../node_modules/zod/v4/locales/yo.js"() {
9680
9615
  "use strict";
9681
- init_cjs_shims();
9682
9616
  init_util();
9683
9617
  error47 = () => {
9684
9618
  const Sizable = {
@@ -9840,7 +9774,6 @@ __export(locales_exports, {
9840
9774
  var init_locales = __esm({
9841
9775
  "../../node_modules/zod/v4/locales/index.js"() {
9842
9776
  "use strict";
9843
- init_cjs_shims();
9844
9777
  init_ar();
9845
9778
  init_az();
9846
9779
  init_be();
@@ -9901,7 +9834,6 @@ var _a, $output, $input, $ZodRegistry, globalRegistry;
9901
9834
  var init_registries = __esm({
9902
9835
  "../../node_modules/zod/v4/core/registries.js"() {
9903
9836
  "use strict";
9904
- init_cjs_shims();
9905
9837
  $output = /* @__PURE__ */ Symbol("ZodOutput");
9906
9838
  $input = /* @__PURE__ */ Symbol("ZodInput");
9907
9839
  $ZodRegistry = class {
@@ -10984,7 +10916,6 @@ var TimePrecision;
10984
10916
  var init_api = __esm({
10985
10917
  "../../node_modules/zod/v4/core/api.js"() {
10986
10918
  "use strict";
10987
- init_cjs_shims();
10988
10919
  init_checks();
10989
10920
  init_registries();
10990
10921
  init_schemas();
@@ -11341,7 +11272,6 @@ var createToJSONSchemaMethod, createStandardJSONSchemaMethod;
11341
11272
  var init_to_json_schema = __esm({
11342
11273
  "../../node_modules/zod/v4/core/to-json-schema.js"() {
11343
11274
  "use strict";
11344
- init_cjs_shims();
11345
11275
  init_registries();
11346
11276
  createToJSONSchemaMethod = (schema, processors = {}) => (params) => {
11347
11277
  const ctx = initializeContext({ ...params, processors });
@@ -11398,7 +11328,6 @@ var formatMap, stringProcessor, numberProcessor, booleanProcessor, bigintProcess
11398
11328
  var init_json_schema_processors = __esm({
11399
11329
  "../../node_modules/zod/v4/core/json-schema-processors.js"() {
11400
11330
  "use strict";
11401
- init_cjs_shims();
11402
11331
  init_to_json_schema();
11403
11332
  init_util();
11404
11333
  formatMap = {
@@ -11924,7 +11853,6 @@ var JSONSchemaGenerator;
11924
11853
  var init_json_schema_generator = __esm({
11925
11854
  "../../node_modules/zod/v4/core/json-schema-generator.js"() {
11926
11855
  "use strict";
11927
- init_cjs_shims();
11928
11856
  init_json_schema_processors();
11929
11857
  init_to_json_schema();
11930
11858
  JSONSchemaGenerator = class {
@@ -12008,7 +11936,6 @@ var json_schema_exports = {};
12008
11936
  var init_json_schema = __esm({
12009
11937
  "../../node_modules/zod/v4/core/json-schema.js"() {
12010
11938
  "use strict";
12011
- init_cjs_shims();
12012
11939
  }
12013
11940
  });
12014
11941
 
@@ -12292,7 +12219,6 @@ __export(core_exports2, {
12292
12219
  var init_core2 = __esm({
12293
12220
  "../../node_modules/zod/v4/core/index.js"() {
12294
12221
  "use strict";
12295
- init_cjs_shims();
12296
12222
  init_core();
12297
12223
  init_parse();
12298
12224
  init_errors();
@@ -12348,7 +12274,6 @@ __export(checks_exports2, {
12348
12274
  var init_checks2 = __esm({
12349
12275
  "../../node_modules/zod/v4/classic/checks.js"() {
12350
12276
  "use strict";
12351
- init_cjs_shims();
12352
12277
  init_core2();
12353
12278
  }
12354
12279
  });
@@ -12381,7 +12306,6 @@ var ZodISODateTime, ZodISODate, ZodISOTime, ZodISODuration;
12381
12306
  var init_iso = __esm({
12382
12307
  "../../node_modules/zod/v4/classic/iso.js"() {
12383
12308
  "use strict";
12384
- init_cjs_shims();
12385
12309
  init_core2();
12386
12310
  init_schemas2();
12387
12311
  ZodISODateTime = /* @__PURE__ */ $constructor("ZodISODateTime", (inst, def) => {
@@ -12408,7 +12332,6 @@ var initializer2, ZodError, ZodRealError;
12408
12332
  var init_errors2 = __esm({
12409
12333
  "../../node_modules/zod/v4/classic/errors.js"() {
12410
12334
  "use strict";
12411
- init_cjs_shims();
12412
12335
  init_core2();
12413
12336
  init_core2();
12414
12337
  init_util();
@@ -12458,7 +12381,6 @@ var parse2, parseAsync2, safeParse2, safeParseAsync2, encode2, decode2, encodeAs
12458
12381
  var init_parse2 = __esm({
12459
12382
  "../../node_modules/zod/v4/classic/parse.js"() {
12460
12383
  "use strict";
12461
- init_cjs_shims();
12462
12384
  init_core2();
12463
12385
  init_errors2();
12464
12386
  parse2 = /* @__PURE__ */ _parse(ZodRealError);
@@ -13102,7 +13024,6 @@ var ZodType, _ZodString, ZodString, ZodStringFormat, ZodEmail, ZodGUID, ZodUUID,
13102
13024
  var init_schemas2 = __esm({
13103
13025
  "../../node_modules/zod/v4/classic/schemas.js"() {
13104
13026
  "use strict";
13105
- init_cjs_shims();
13106
13027
  init_core2();
13107
13028
  init_core2();
13108
13029
  init_json_schema_processors();
@@ -13749,7 +13670,6 @@ var ZodIssueCode, ZodFirstPartyTypeKind;
13749
13670
  var init_compat = __esm({
13750
13671
  "../../node_modules/zod/v4/classic/compat.js"() {
13751
13672
  "use strict";
13752
- init_cjs_shims();
13753
13673
  init_core2();
13754
13674
  init_core2();
13755
13675
  ZodIssueCode = {
@@ -14171,7 +14091,6 @@ var z, RECOGNIZED_KEYS;
14171
14091
  var init_from_json_schema = __esm({
14172
14092
  "../../node_modules/zod/v4/classic/from-json-schema.js"() {
14173
14093
  "use strict";
14174
- init_cjs_shims();
14175
14094
  init_registries();
14176
14095
  init_checks2();
14177
14096
  init_iso();
@@ -14282,7 +14201,6 @@ function date4(params) {
14282
14201
  var init_coerce = __esm({
14283
14202
  "../../node_modules/zod/v4/classic/coerce.js"() {
14284
14203
  "use strict";
14285
- init_cjs_shims();
14286
14204
  init_core2();
14287
14205
  init_schemas2();
14288
14206
  }
@@ -14531,7 +14449,6 @@ __export(external_exports, {
14531
14449
  var init_external = __esm({
14532
14450
  "../../node_modules/zod/v4/classic/external.js"() {
14533
14451
  "use strict";
14534
- init_cjs_shims();
14535
14452
  init_core2();
14536
14453
  init_schemas2();
14537
14454
  init_checks2();
@@ -14555,7 +14472,6 @@ var init_external = __esm({
14555
14472
  var init_zod = __esm({
14556
14473
  "../../node_modules/zod/index.js"() {
14557
14474
  "use strict";
14558
- init_cjs_shims();
14559
14475
  init_external();
14560
14476
  init_external();
14561
14477
  }
@@ -14577,7 +14493,6 @@ var DevApiKeySchema, AnonApiKeySchema, SessionIdSchema, BuildHashSchema, SdkDiag
14577
14493
  var init_dist = __esm({
14578
14494
  "../protocol/dist/index.js"() {
14579
14495
  "use strict";
14580
- init_cjs_shims();
14581
14496
  init_zod();
14582
14497
  init_zod();
14583
14498
  init_zod();
@@ -14760,7 +14675,6 @@ var VERSION;
14760
14675
  var init_version = __esm({
14761
14676
  "../../node_modules/@opentelemetry/api/build/esm/version.js"() {
14762
14677
  "use strict";
14763
- init_cjs_shims();
14764
14678
  VERSION = "1.9.1";
14765
14679
  }
14766
14680
  });
@@ -14831,7 +14745,6 @@ var re, isCompatible;
14831
14745
  var init_semver = __esm({
14832
14746
  "../../node_modules/@opentelemetry/api/build/esm/internal/semver.js"() {
14833
14747
  "use strict";
14834
- init_cjs_shims();
14835
14748
  init_version();
14836
14749
  re = /^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;
14837
14750
  isCompatible = _makeCompatibilityCheck(VERSION);
@@ -14877,7 +14790,6 @@ var major, GLOBAL_OPENTELEMETRY_API_KEY, _global;
14877
14790
  var init_global_utils = __esm({
14878
14791
  "../../node_modules/@opentelemetry/api/build/esm/internal/global-utils.js"() {
14879
14792
  "use strict";
14880
- init_cjs_shims();
14881
14793
  init_version();
14882
14794
  init_semver();
14883
14795
  major = VERSION.split(".")[0];
@@ -14898,7 +14810,6 @@ var DiagComponentLogger;
14898
14810
  var init_ComponentLogger = __esm({
14899
14811
  "../../node_modules/@opentelemetry/api/build/esm/diag/ComponentLogger.js"() {
14900
14812
  "use strict";
14901
- init_cjs_shims();
14902
14813
  init_global_utils();
14903
14814
  DiagComponentLogger = class {
14904
14815
  constructor(props) {
@@ -14928,7 +14839,6 @@ var DiagLogLevel;
14928
14839
  var init_types = __esm({
14929
14840
  "../../node_modules/@opentelemetry/api/build/esm/diag/types.js"() {
14930
14841
  "use strict";
14931
- init_cjs_shims();
14932
14842
  (function(DiagLogLevel2) {
14933
14843
  DiagLogLevel2[DiagLogLevel2["NONE"] = 0] = "NONE";
14934
14844
  DiagLogLevel2[DiagLogLevel2["ERROR"] = 30] = "ERROR";
@@ -14968,7 +14878,6 @@ function createLogLevelDiagLogger(maxLevel, logger) {
14968
14878
  var init_logLevelLogger = __esm({
14969
14879
  "../../node_modules/@opentelemetry/api/build/esm/diag/internal/logLevelLogger.js"() {
14970
14880
  "use strict";
14971
- init_cjs_shims();
14972
14881
  init_types();
14973
14882
  }
14974
14883
  });
@@ -14978,7 +14887,6 @@ var API_NAME, DiagAPI;
14978
14887
  var init_diag = __esm({
14979
14888
  "../../node_modules/@opentelemetry/api/build/esm/api/diag.js"() {
14980
14889
  "use strict";
14981
- init_cjs_shims();
14982
14890
  init_ComponentLogger();
14983
14891
  init_logLevelLogger();
14984
14892
  init_types();
@@ -15049,7 +14957,6 @@ var BaggageImpl;
15049
14957
  var init_baggage_impl = __esm({
15050
14958
  "../../node_modules/@opentelemetry/api/build/esm/baggage/internal/baggage-impl.js"() {
15051
14959
  "use strict";
15052
- init_cjs_shims();
15053
14960
  BaggageImpl = class _BaggageImpl {
15054
14961
  constructor(entries) {
15055
14962
  this._entries = entries ? new Map(entries) : /* @__PURE__ */ new Map();
@@ -15093,7 +15000,6 @@ var baggageEntryMetadataSymbol;
15093
15000
  var init_symbol = __esm({
15094
15001
  "../../node_modules/@opentelemetry/api/build/esm/baggage/internal/symbol.js"() {
15095
15002
  "use strict";
15096
- init_cjs_shims();
15097
15003
  baggageEntryMetadataSymbol = /* @__PURE__ */ Symbol("BaggageEntryMetadata");
15098
15004
  }
15099
15005
  });
@@ -15118,7 +15024,6 @@ var diag;
15118
15024
  var init_utils = __esm({
15119
15025
  "../../node_modules/@opentelemetry/api/build/esm/baggage/utils.js"() {
15120
15026
  "use strict";
15121
- init_cjs_shims();
15122
15027
  init_diag();
15123
15028
  init_baggage_impl();
15124
15029
  init_symbol();
@@ -15134,7 +15039,6 @@ var BaseContext, ROOT_CONTEXT;
15134
15039
  var init_context = __esm({
15135
15040
  "../../node_modules/@opentelemetry/api/build/esm/context/context.js"() {
15136
15041
  "use strict";
15137
- init_cjs_shims();
15138
15042
  BaseContext = class _BaseContext {
15139
15043
  /**
15140
15044
  * Construct a new context which inherits values from an optional parent context.
@@ -15166,7 +15070,6 @@ var consoleMap, _originalConsoleMethods, DiagConsoleLogger;
15166
15070
  var init_consoleLogger = __esm({
15167
15071
  "../../node_modules/@opentelemetry/api/build/esm/diag/consoleLogger.js"() {
15168
15072
  "use strict";
15169
- init_cjs_shims();
15170
15073
  consoleMap = [
15171
15074
  { n: "error", c: "error" },
15172
15075
  { n: "warn", c: "warn" },
@@ -15225,7 +15128,6 @@ var NoopMeter, NoopMetric, NoopCounterMetric, NoopUpDownCounterMetric, NoopGauge
15225
15128
  var init_NoopMeter = __esm({
15226
15129
  "../../node_modules/@opentelemetry/api/build/esm/metrics/NoopMeter.js"() {
15227
15130
  "use strict";
15228
- init_cjs_shims();
15229
15131
  NoopMeter = class {
15230
15132
  constructor() {
15231
15133
  }
@@ -15328,7 +15230,6 @@ var ValueType;
15328
15230
  var init_Metric = __esm({
15329
15231
  "../../node_modules/@opentelemetry/api/build/esm/metrics/Metric.js"() {
15330
15232
  "use strict";
15331
- init_cjs_shims();
15332
15233
  (function(ValueType2) {
15333
15234
  ValueType2[ValueType2["INT"] = 0] = "INT";
15334
15235
  ValueType2[ValueType2["DOUBLE"] = 1] = "DOUBLE";
@@ -15341,7 +15242,6 @@ var defaultTextMapGetter, defaultTextMapSetter;
15341
15242
  var init_TextMapPropagator = __esm({
15342
15243
  "../../node_modules/@opentelemetry/api/build/esm/propagation/TextMapPropagator.js"() {
15343
15244
  "use strict";
15344
- init_cjs_shims();
15345
15245
  defaultTextMapGetter = {
15346
15246
  get(carrier, key) {
15347
15247
  if (carrier == null) {
@@ -15372,7 +15272,6 @@ var NoopContextManager;
15372
15272
  var init_NoopContextManager = __esm({
15373
15273
  "../../node_modules/@opentelemetry/api/build/esm/context/NoopContextManager.js"() {
15374
15274
  "use strict";
15375
- init_cjs_shims();
15376
15275
  init_context();
15377
15276
  NoopContextManager = class {
15378
15277
  active() {
@@ -15399,7 +15298,6 @@ var API_NAME2, NOOP_CONTEXT_MANAGER, ContextAPI;
15399
15298
  var init_context2 = __esm({
15400
15299
  "../../node_modules/@opentelemetry/api/build/esm/api/context.js"() {
15401
15300
  "use strict";
15402
- init_cjs_shims();
15403
15301
  init_NoopContextManager();
15404
15302
  init_global_utils();
15405
15303
  init_diag();
@@ -15467,7 +15365,6 @@ var TraceFlags;
15467
15365
  var init_trace_flags = __esm({
15468
15366
  "../../node_modules/@opentelemetry/api/build/esm/trace/trace_flags.js"() {
15469
15367
  "use strict";
15470
- init_cjs_shims();
15471
15368
  (function(TraceFlags2) {
15472
15369
  TraceFlags2[TraceFlags2["NONE"] = 0] = "NONE";
15473
15370
  TraceFlags2[TraceFlags2["SAMPLED"] = 1] = "SAMPLED";
@@ -15480,7 +15377,6 @@ var INVALID_SPANID, INVALID_TRACEID, INVALID_SPAN_CONTEXT;
15480
15377
  var init_invalid_span_constants = __esm({
15481
15378
  "../../node_modules/@opentelemetry/api/build/esm/trace/invalid-span-constants.js"() {
15482
15379
  "use strict";
15483
- init_cjs_shims();
15484
15380
  init_trace_flags();
15485
15381
  INVALID_SPANID = "0000000000000000";
15486
15382
  INVALID_TRACEID = "00000000000000000000000000000000";
@@ -15497,7 +15393,6 @@ var NonRecordingSpan;
15497
15393
  var init_NonRecordingSpan = __esm({
15498
15394
  "../../node_modules/@opentelemetry/api/build/esm/trace/NonRecordingSpan.js"() {
15499
15395
  "use strict";
15500
- init_cjs_shims();
15501
15396
  init_invalid_span_constants();
15502
15397
  NonRecordingSpan = class {
15503
15398
  constructor(spanContext = INVALID_SPAN_CONTEXT) {
@@ -15571,7 +15466,6 @@ var SPAN_KEY;
15571
15466
  var init_context_utils = __esm({
15572
15467
  "../../node_modules/@opentelemetry/api/build/esm/trace/context-utils.js"() {
15573
15468
  "use strict";
15574
- init_cjs_shims();
15575
15469
  init_context();
15576
15470
  init_NonRecordingSpan();
15577
15471
  init_context2();
@@ -15605,7 +15499,6 @@ var isHex;
15605
15499
  var init_spancontext_utils = __esm({
15606
15500
  "../../node_modules/@opentelemetry/api/build/esm/trace/spancontext-utils.js"() {
15607
15501
  "use strict";
15608
- init_cjs_shims();
15609
15502
  init_invalid_span_constants();
15610
15503
  init_NonRecordingSpan();
15611
15504
  isHex = new Uint8Array([
@@ -15724,7 +15617,6 @@ var contextApi, NoopTracer;
15724
15617
  var init_NoopTracer = __esm({
15725
15618
  "../../node_modules/@opentelemetry/api/build/esm/trace/NoopTracer.js"() {
15726
15619
  "use strict";
15727
- init_cjs_shims();
15728
15620
  init_context2();
15729
15621
  init_context_utils();
15730
15622
  init_NonRecordingSpan();
@@ -15774,7 +15666,6 @@ var NOOP_TRACER, ProxyTracer;
15774
15666
  var init_ProxyTracer = __esm({
15775
15667
  "../../node_modules/@opentelemetry/api/build/esm/trace/ProxyTracer.js"() {
15776
15668
  "use strict";
15777
- init_cjs_shims();
15778
15669
  init_NoopTracer();
15779
15670
  NOOP_TRACER = new NoopTracer();
15780
15671
  ProxyTracer = class {
@@ -15815,7 +15706,6 @@ var NoopTracerProvider;
15815
15706
  var init_NoopTracerProvider = __esm({
15816
15707
  "../../node_modules/@opentelemetry/api/build/esm/trace/NoopTracerProvider.js"() {
15817
15708
  "use strict";
15818
- init_cjs_shims();
15819
15709
  init_NoopTracer();
15820
15710
  NoopTracerProvider = class {
15821
15711
  getTracer(_name, _version, _options) {
@@ -15830,7 +15720,6 @@ var NOOP_TRACER_PROVIDER, ProxyTracerProvider;
15830
15720
  var init_ProxyTracerProvider = __esm({
15831
15721
  "../../node_modules/@opentelemetry/api/build/esm/trace/ProxyTracerProvider.js"() {
15832
15722
  "use strict";
15833
- init_cjs_shims();
15834
15723
  init_ProxyTracer();
15835
15724
  init_NoopTracerProvider();
15836
15725
  NOOP_TRACER_PROVIDER = new NoopTracerProvider();
@@ -15865,7 +15754,6 @@ var SamplingDecision;
15865
15754
  var init_SamplingResult = __esm({
15866
15755
  "../../node_modules/@opentelemetry/api/build/esm/trace/SamplingResult.js"() {
15867
15756
  "use strict";
15868
- init_cjs_shims();
15869
15757
  (function(SamplingDecision3) {
15870
15758
  SamplingDecision3[SamplingDecision3["NOT_RECORD"] = 0] = "NOT_RECORD";
15871
15759
  SamplingDecision3[SamplingDecision3["RECORD"] = 1] = "RECORD";
@@ -15879,7 +15767,6 @@ var SpanKind;
15879
15767
  var init_span_kind = __esm({
15880
15768
  "../../node_modules/@opentelemetry/api/build/esm/trace/span_kind.js"() {
15881
15769
  "use strict";
15882
- init_cjs_shims();
15883
15770
  (function(SpanKind2) {
15884
15771
  SpanKind2[SpanKind2["INTERNAL"] = 0] = "INTERNAL";
15885
15772
  SpanKind2[SpanKind2["SERVER"] = 1] = "SERVER";
@@ -15895,7 +15782,6 @@ var SpanStatusCode;
15895
15782
  var init_status = __esm({
15896
15783
  "../../node_modules/@opentelemetry/api/build/esm/trace/status.js"() {
15897
15784
  "use strict";
15898
- init_cjs_shims();
15899
15785
  (function(SpanStatusCode2) {
15900
15786
  SpanStatusCode2[SpanStatusCode2["UNSET"] = 0] = "UNSET";
15901
15787
  SpanStatusCode2[SpanStatusCode2["OK"] = 1] = "OK";
@@ -15915,7 +15801,6 @@ var VALID_KEY_CHAR_RANGE, VALID_KEY, VALID_VENDOR_KEY, VALID_KEY_REGEX, VALID_VA
15915
15801
  var init_tracestate_validators = __esm({
15916
15802
  "../../node_modules/@opentelemetry/api/build/esm/trace/internal/tracestate-validators.js"() {
15917
15803
  "use strict";
15918
- init_cjs_shims();
15919
15804
  VALID_KEY_CHAR_RANGE = "[_0-9a-z-*/]";
15920
15805
  VALID_KEY = `[a-z]${VALID_KEY_CHAR_RANGE}{0,255}`;
15921
15806
  VALID_VENDOR_KEY = `[a-z0-9]${VALID_KEY_CHAR_RANGE}{0,240}@[a-z]${VALID_KEY_CHAR_RANGE}{0,13}`;
@@ -15930,7 +15815,6 @@ var MAX_TRACE_STATE_ITEMS, MAX_TRACE_STATE_LEN, LIST_MEMBERS_SEPARATOR, LIST_MEM
15930
15815
  var init_tracestate_impl = __esm({
15931
15816
  "../../node_modules/@opentelemetry/api/build/esm/trace/internal/tracestate-impl.js"() {
15932
15817
  "use strict";
15933
- init_cjs_shims();
15934
15818
  init_tracestate_validators();
15935
15819
  MAX_TRACE_STATE_ITEMS = 32;
15936
15820
  MAX_TRACE_STATE_LEN = 512;
@@ -16004,7 +15888,6 @@ function createTraceState(rawTraceState) {
16004
15888
  var init_utils2 = __esm({
16005
15889
  "../../node_modules/@opentelemetry/api/build/esm/trace/internal/utils.js"() {
16006
15890
  "use strict";
16007
- init_cjs_shims();
16008
15891
  init_tracestate_impl();
16009
15892
  }
16010
15893
  });
@@ -16014,7 +15897,6 @@ var context;
16014
15897
  var init_context_api = __esm({
16015
15898
  "../../node_modules/@opentelemetry/api/build/esm/context-api.js"() {
16016
15899
  "use strict";
16017
- init_cjs_shims();
16018
15900
  init_context2();
16019
15901
  context = ContextAPI.getInstance();
16020
15902
  }
@@ -16025,7 +15907,6 @@ var diag2;
16025
15907
  var init_diag_api = __esm({
16026
15908
  "../../node_modules/@opentelemetry/api/build/esm/diag-api.js"() {
16027
15909
  "use strict";
16028
- init_cjs_shims();
16029
15910
  init_diag();
16030
15911
  diag2 = DiagAPI.instance();
16031
15912
  }
@@ -16036,7 +15917,6 @@ var NoopMeterProvider, NOOP_METER_PROVIDER;
16036
15917
  var init_NoopMeterProvider = __esm({
16037
15918
  "../../node_modules/@opentelemetry/api/build/esm/metrics/NoopMeterProvider.js"() {
16038
15919
  "use strict";
16039
- init_cjs_shims();
16040
15920
  init_NoopMeter();
16041
15921
  NoopMeterProvider = class {
16042
15922
  getMeter(_name, _version, _options) {
@@ -16052,7 +15932,6 @@ var API_NAME3, MetricsAPI;
16052
15932
  var init_metrics = __esm({
16053
15933
  "../../node_modules/@opentelemetry/api/build/esm/api/metrics.js"() {
16054
15934
  "use strict";
16055
- init_cjs_shims();
16056
15935
  init_NoopMeterProvider();
16057
15936
  init_global_utils();
16058
15937
  init_diag();
@@ -16100,7 +15979,6 @@ var metrics;
16100
15979
  var init_metrics_api = __esm({
16101
15980
  "../../node_modules/@opentelemetry/api/build/esm/metrics-api.js"() {
16102
15981
  "use strict";
16103
- init_cjs_shims();
16104
15982
  init_metrics();
16105
15983
  metrics = MetricsAPI.getInstance();
16106
15984
  }
@@ -16111,7 +15989,6 @@ var NoopTextMapPropagator;
16111
15989
  var init_NoopTextMapPropagator = __esm({
16112
15990
  "../../node_modules/@opentelemetry/api/build/esm/propagation/NoopTextMapPropagator.js"() {
16113
15991
  "use strict";
16114
- init_cjs_shims();
16115
15992
  NoopTextMapPropagator = class {
16116
15993
  /** Noop inject function does nothing */
16117
15994
  inject(_context, _carrier) {
@@ -16144,7 +16021,6 @@ var BAGGAGE_KEY;
16144
16021
  var init_context_helpers = __esm({
16145
16022
  "../../node_modules/@opentelemetry/api/build/esm/baggage/context-helpers.js"() {
16146
16023
  "use strict";
16147
- init_cjs_shims();
16148
16024
  init_context2();
16149
16025
  init_context();
16150
16026
  BAGGAGE_KEY = createContextKey("OpenTelemetry Baggage Key");
@@ -16156,7 +16032,6 @@ var API_NAME4, NOOP_TEXT_MAP_PROPAGATOR, PropagationAPI;
16156
16032
  var init_propagation = __esm({
16157
16033
  "../../node_modules/@opentelemetry/api/build/esm/api/propagation.js"() {
16158
16034
  "use strict";
16159
- init_cjs_shims();
16160
16035
  init_global_utils();
16161
16036
  init_NoopTextMapPropagator();
16162
16037
  init_TextMapPropagator();
@@ -16231,7 +16106,6 @@ var propagation;
16231
16106
  var init_propagation_api = __esm({
16232
16107
  "../../node_modules/@opentelemetry/api/build/esm/propagation-api.js"() {
16233
16108
  "use strict";
16234
- init_cjs_shims();
16235
16109
  init_propagation();
16236
16110
  propagation = PropagationAPI.getInstance();
16237
16111
  }
@@ -16242,7 +16116,6 @@ var API_NAME5, TraceAPI;
16242
16116
  var init_trace = __esm({
16243
16117
  "../../node_modules/@opentelemetry/api/build/esm/api/trace.js"() {
16244
16118
  "use strict";
16245
- init_cjs_shims();
16246
16119
  init_global_utils();
16247
16120
  init_ProxyTracerProvider();
16248
16121
  init_spancontext_utils();
@@ -16307,7 +16180,6 @@ var trace;
16307
16180
  var init_trace_api = __esm({
16308
16181
  "../../node_modules/@opentelemetry/api/build/esm/trace-api.js"() {
16309
16182
  "use strict";
16310
- init_cjs_shims();
16311
16183
  init_trace();
16312
16184
  trace = TraceAPI.getInstance();
16313
16185
  }
@@ -16349,7 +16221,6 @@ var esm_default;
16349
16221
  var init_esm = __esm({
16350
16222
  "../../node_modules/@opentelemetry/api/build/esm/index.js"() {
16351
16223
  "use strict";
16352
- init_cjs_shims();
16353
16224
  init_utils();
16354
16225
  init_context();
16355
16226
  init_consoleLogger();
@@ -16387,8 +16258,8 @@ function sanitize(input) {
16387
16258
  }
16388
16259
  function markerFileExists() {
16389
16260
  try {
16390
- const fs4 = require("fs");
16391
- const path4 = require("path");
16261
+ const fs4 = require("node:fs");
16262
+ const path4 = require("node:path");
16392
16263
  const markerPath = path4.join(process.cwd(), ".glasstrace", "mcp-connected");
16393
16264
  return fs4.existsSync(markerPath);
16394
16265
  } catch {
@@ -16421,7 +16292,6 @@ var hasFired;
16421
16292
  var init_error_nudge = __esm({
16422
16293
  "src/nudge/error-nudge.ts"() {
16423
16294
  "use strict";
16424
- init_cjs_shims();
16425
16295
  init_env_detection();
16426
16296
  hasFired = false;
16427
16297
  }
@@ -16494,7 +16364,6 @@ var isGlasstraceLog, originalError, originalWarn, installed, otelApi;
16494
16364
  var init_console_capture = __esm({
16495
16365
  "src/console-capture.ts"() {
16496
16366
  "use strict";
16497
- init_cjs_shims();
16498
16367
  init_error_nudge();
16499
16368
  isGlasstraceLog = false;
16500
16369
  originalError = null;
@@ -16825,11 +16694,10 @@ var fs2, path2, crypto2, import_node_child_process, LARGE_FILE_WARNING_BYTES, PR
16825
16694
  var init_source_map_uploader = __esm({
16826
16695
  "src/source-map-uploader.ts"() {
16827
16696
  "use strict";
16828
- init_cjs_shims();
16829
- fs2 = __toESM(require("fs/promises"), 1);
16830
- path2 = __toESM(require("path"), 1);
16831
- crypto2 = __toESM(require("crypto"), 1);
16832
- import_node_child_process = require("child_process");
16697
+ fs2 = __toESM(require("node:fs/promises"), 1);
16698
+ path2 = __toESM(require("node:path"), 1);
16699
+ crypto2 = __toESM(require("node:crypto"), 1);
16700
+ import_node_child_process = require("node:child_process");
16833
16701
  init_console_capture();
16834
16702
  init_dist();
16835
16703
  LARGE_FILE_WARNING_BYTES = 50 * 1024 * 1024;
@@ -16882,10 +16750,8 @@ __export(src_exports, {
16882
16750
  withGlasstraceConfig: () => withGlasstraceConfig
16883
16751
  });
16884
16752
  module.exports = __toCommonJS(src_exports);
16885
- init_cjs_shims();
16886
16753
 
16887
16754
  // src/errors.ts
16888
- init_cjs_shims();
16889
16755
  var SdkError = class extends Error {
16890
16756
  code;
16891
16757
  constructor(code, message, cause) {
@@ -16899,7 +16765,6 @@ var SdkError = class extends Error {
16899
16765
  init_env_detection();
16900
16766
 
16901
16767
  // src/session.ts
16902
- init_cjs_shims();
16903
16768
  init_dist();
16904
16769
  var FOUR_HOURS_MS = 4 * 60 * 60 * 1e3;
16905
16770
  var hashFn = null;
@@ -16915,7 +16780,7 @@ function fnv1aHash(input) {
16915
16780
  function getHashFn() {
16916
16781
  if (hashFn) return hashFn;
16917
16782
  try {
16918
- const { createHash: createHash3 } = require("crypto");
16783
+ const { createHash: createHash3 } = require("node:crypto");
16919
16784
  hashFn = (input) => createHash3("sha256").update(input).digest("hex").slice(0, 16);
16920
16785
  } catch {
16921
16786
  hashFn = (input) => {
@@ -16991,7 +16856,6 @@ var SessionManager = class {
16991
16856
  };
16992
16857
 
16993
16858
  // src/fetch-classifier.ts
16994
- init_cjs_shims();
16995
16859
  var cachedPort2 = process.env.PORT ?? "3000";
16996
16860
  function classifyFetchTarget(url2) {
16997
16861
  let parsed;
@@ -17017,7 +16881,6 @@ function classifyFetchTarget(url2) {
17017
16881
  }
17018
16882
 
17019
16883
  // src/anon-key.ts
17020
- init_cjs_shims();
17021
16884
  init_dist();
17022
16885
  var GLASSTRACE_DIR = ".glasstrace";
17023
16886
  var ANON_KEY_FILE = "anon_key";
@@ -17026,8 +16889,8 @@ async function loadFsPath() {
17026
16889
  if (fsPathCache !== void 0) return fsPathCache;
17027
16890
  try {
17028
16891
  const [fs4, path4] = await Promise.all([
17029
- import("fs/promises"),
17030
- import("path")
16892
+ import("node:fs/promises"),
16893
+ import("node:path")
17031
16894
  ]);
17032
16895
  fsPathCache = { fs: fs4, path: path4 };
17033
16896
  return fsPathCache;
@@ -17107,11 +16970,9 @@ async function getOrCreateAnonKey(projectRoot) {
17107
16970
  }
17108
16971
 
17109
16972
  // src/init-client.ts
17110
- init_cjs_shims();
17111
16973
  init_dist();
17112
16974
 
17113
16975
  // src/health-collector.ts
17114
- init_cjs_shims();
17115
16976
  var tracesExported = 0;
17116
16977
  var tracesDropped = 0;
17117
16978
  var initFailures = 0;
@@ -17163,6 +17024,238 @@ function acknowledgeHealthReport(report) {
17163
17024
  initFailures = Number.isFinite(failVal) ? Math.max(0, failVal) : initFailures;
17164
17025
  }
17165
17026
 
17027
+ // src/https-transport.ts
17028
+ var import_node_https = require("node:https");
17029
+ var import_node_http = require("node:http");
17030
+ var import_node_url = require("node:url");
17031
+ var HttpsTransportError = class extends Error {
17032
+ kind = "transport";
17033
+ cause;
17034
+ constructor(message, cause) {
17035
+ super(message);
17036
+ this.name = "HttpsTransportError";
17037
+ this.cause = cause;
17038
+ }
17039
+ };
17040
+ var HttpsStatusError = class extends Error {
17041
+ kind = "status";
17042
+ status;
17043
+ /** Raw response body text (may be truncated by caller if large). */
17044
+ body;
17045
+ constructor(status, body) {
17046
+ super(`Server returned HTTP ${status}`);
17047
+ this.name = "HttpsStatusError";
17048
+ this.status = status;
17049
+ this.body = body;
17050
+ }
17051
+ };
17052
+ var HttpsBodyParseError = class extends Error {
17053
+ kind = "parse";
17054
+ status;
17055
+ cause;
17056
+ constructor(status, cause) {
17057
+ super(`Server returned malformed response (HTTP ${status})`);
17058
+ this.name = "HttpsBodyParseError";
17059
+ this.status = status;
17060
+ this.cause = cause;
17061
+ }
17062
+ };
17063
+ var DEFAULT_TIMEOUT_MS = 1e4;
17064
+ var DEFAULT_RETRY_DELAYS_MS = [500, 1500];
17065
+ var DEFAULT_TOTAL_DEADLINE_MS = 2e4;
17066
+ async function httpsPostJson(url2, jsonBody, options) {
17067
+ const parsed = new import_node_url.URL(url2);
17068
+ const isHttps = parsed.protocol === "https:";
17069
+ const isHttp = parsed.protocol === "http:";
17070
+ if (!isHttps && !isHttp) {
17071
+ throw new HttpsTransportError(
17072
+ `Unsupported protocol: ${parsed.protocol} (expected http: or https:)`
17073
+ );
17074
+ }
17075
+ const timeoutMs = options.timeoutMs ?? DEFAULT_TIMEOUT_MS;
17076
+ const maxAttempts = options.maxAttempts ?? 3;
17077
+ const retryDelaysMs = options.retryDelaysMs ?? DEFAULT_RETRY_DELAYS_MS;
17078
+ const totalDeadlineMs = options.totalDeadlineMs ?? DEFAULT_TOTAL_DEADLINE_MS;
17079
+ const scheduler = options.scheduler ?? ((fn, ms) => setTimeout(fn, ms));
17080
+ const requestImpl = isHttps ? options.requestImpl ?? import_node_https.request : options.httpRequestImpl ?? import_node_http.request;
17081
+ let payload;
17082
+ try {
17083
+ payload = JSON.stringify(jsonBody);
17084
+ } catch (err) {
17085
+ throw new HttpsTransportError(
17086
+ `Failed to serialize request body: ${err instanceof Error ? err.message : String(err)}`,
17087
+ err
17088
+ );
17089
+ }
17090
+ const payloadBuffer = Buffer.from(payload, "utf-8");
17091
+ const startedAt = Date.now();
17092
+ let lastError;
17093
+ for (let attempt = 0; attempt < maxAttempts; attempt += 1) {
17094
+ if (options.signal?.aborted) {
17095
+ throw new HttpsTransportError("Request aborted");
17096
+ }
17097
+ const elapsed = Date.now() - startedAt;
17098
+ if (elapsed >= totalDeadlineMs) {
17099
+ break;
17100
+ }
17101
+ const remainingBudget = totalDeadlineMs - elapsed;
17102
+ const attemptTimeoutMs = Math.min(timeoutMs, remainingBudget);
17103
+ try {
17104
+ return await sendSingleRequest(
17105
+ parsed,
17106
+ payloadBuffer,
17107
+ options.headers,
17108
+ attemptTimeoutMs,
17109
+ options.signal,
17110
+ requestImpl
17111
+ );
17112
+ } catch (err) {
17113
+ lastError = err;
17114
+ if (err instanceof HttpsStatusError || err instanceof HttpsBodyParseError) {
17115
+ throw err;
17116
+ }
17117
+ const isLast = attempt === maxAttempts - 1;
17118
+ if (isLast) break;
17119
+ const delayMs = retryDelaysMs[attempt] ?? retryDelaysMs[retryDelaysMs.length - 1] ?? 0;
17120
+ const elapsedBeforeSleep = Date.now() - startedAt;
17121
+ const remaining = totalDeadlineMs - elapsedBeforeSleep;
17122
+ if (remaining <= 0) break;
17123
+ const actualDelayMs = Math.min(delayMs, remaining);
17124
+ await sleep(actualDelayMs, scheduler, options.signal);
17125
+ }
17126
+ }
17127
+ if (lastError instanceof HttpsTransportError) throw lastError;
17128
+ throw new HttpsTransportError(
17129
+ lastError instanceof Error ? lastError.message : "Request failed",
17130
+ lastError
17131
+ );
17132
+ }
17133
+ function sendSingleRequest(url2, payload, headers, timeoutMs, signal, requestImpl) {
17134
+ return new Promise((resolve3, reject) => {
17135
+ const finalHeaders = {
17136
+ ...headers,
17137
+ "Content-Length": payload.byteLength
17138
+ };
17139
+ const reqOptions = {
17140
+ method: "POST",
17141
+ hostname: url2.hostname,
17142
+ port: url2.port === "" ? void 0 : Number(url2.port),
17143
+ path: `${url2.pathname}${url2.search}`,
17144
+ headers: finalHeaders,
17145
+ // Explicit timeout at the socket level. Still complemented by a
17146
+ // manual timer below because `timeout` only fires when the socket
17147
+ // is idle — it does not cover "TLS handshake hangs forever".
17148
+ timeout: timeoutMs
17149
+ };
17150
+ let settled = false;
17151
+ let cleanup = () => {
17152
+ };
17153
+ const settle = (fn) => {
17154
+ if (settled) return;
17155
+ settled = true;
17156
+ cleanup();
17157
+ fn();
17158
+ };
17159
+ const req = requestImpl(reqOptions, (res) => {
17160
+ const chunks = [];
17161
+ res.on("data", (chunk) => {
17162
+ chunks.push(typeof chunk === "string" ? Buffer.from(chunk, "utf-8") : chunk);
17163
+ });
17164
+ res.on("end", () => {
17165
+ const raw = Buffer.concat(chunks).toString("utf-8");
17166
+ const status = res.statusCode ?? 0;
17167
+ if (status < 200 || status >= 300) {
17168
+ settle(() => reject(new HttpsStatusError(status, raw)));
17169
+ return;
17170
+ }
17171
+ if (status === 204 || raw.length === 0) {
17172
+ settle(() => resolve3({ status, body: void 0, raw }));
17173
+ return;
17174
+ }
17175
+ try {
17176
+ const parsed = JSON.parse(raw);
17177
+ settle(() => resolve3({ status, body: parsed, raw }));
17178
+ } catch (err) {
17179
+ settle(() => reject(new HttpsBodyParseError(status, err)));
17180
+ }
17181
+ });
17182
+ res.on("error", (err) => {
17183
+ settle(() => reject(new HttpsTransportError(`Response stream error: ${err.message}`, err)));
17184
+ });
17185
+ });
17186
+ const timer = setTimeout(() => {
17187
+ settle(() => {
17188
+ req.destroy(new Error("Request timed out"));
17189
+ reject(new HttpsTransportError(`Request timed out after ${timeoutMs}ms`));
17190
+ });
17191
+ }, timeoutMs);
17192
+ if (typeof timer.unref === "function") timer.unref();
17193
+ const onAbort = () => {
17194
+ settle(() => {
17195
+ req.destroy(new Error("Aborted"));
17196
+ reject(new HttpsTransportError("Request aborted"));
17197
+ });
17198
+ };
17199
+ cleanup = () => {
17200
+ clearTimeout(timer);
17201
+ if (signal !== void 0) {
17202
+ signal.removeEventListener("abort", onAbort);
17203
+ }
17204
+ };
17205
+ req.on("error", (err) => {
17206
+ settle(() => reject(new HttpsTransportError(`fetch failed: ${err.message}`, err)));
17207
+ });
17208
+ req.on("timeout", () => {
17209
+ settle(() => {
17210
+ req.destroy(new Error("Request timed out"));
17211
+ reject(new HttpsTransportError(`Request timed out after ${timeoutMs}ms`));
17212
+ });
17213
+ });
17214
+ if (signal !== void 0) {
17215
+ if (signal.aborted) {
17216
+ req.destroy(new Error("Aborted"));
17217
+ settle(() => reject(new HttpsTransportError("Request aborted")));
17218
+ return;
17219
+ }
17220
+ signal.addEventListener("abort", onAbort, { once: true });
17221
+ }
17222
+ req.end(payload);
17223
+ });
17224
+ }
17225
+ function sleep(ms, scheduler, signal) {
17226
+ return new Promise((resolve3, reject) => {
17227
+ let settled = false;
17228
+ let cleanup = () => {
17229
+ };
17230
+ const settle = (fn) => {
17231
+ if (settled) return;
17232
+ settled = true;
17233
+ cleanup();
17234
+ fn();
17235
+ };
17236
+ const onAbort = () => {
17237
+ settle(() => reject(new HttpsTransportError("Request aborted")));
17238
+ };
17239
+ const timer = scheduler(() => {
17240
+ settle(resolve3);
17241
+ }, ms);
17242
+ if (typeof timer.unref === "function") timer.unref();
17243
+ cleanup = () => {
17244
+ clearTimeout(timer);
17245
+ if (signal !== void 0) {
17246
+ signal.removeEventListener("abort", onAbort);
17247
+ }
17248
+ };
17249
+ if (signal !== void 0) {
17250
+ if (signal.aborted) {
17251
+ onAbort();
17252
+ return;
17253
+ }
17254
+ signal.addEventListener("abort", onAbort, { once: true });
17255
+ }
17256
+ });
17257
+ }
17258
+
17166
17259
  // src/init-client.ts
17167
17260
  var GLASSTRACE_DIR2 = ".glasstrace";
17168
17261
  var CONFIG_FILE = "config";
@@ -17173,8 +17266,8 @@ async function loadFsPathAsync() {
17173
17266
  if (fsPathAsyncCache !== void 0) return fsPathAsyncCache;
17174
17267
  try {
17175
17268
  const [fs4, path4] = await Promise.all([
17176
- import("fs/promises"),
17177
- import("path")
17269
+ import("node:fs/promises"),
17270
+ import("node:path")
17178
17271
  ]);
17179
17272
  fsPathAsyncCache = { fs: fs4, path: path4 };
17180
17273
  return fsPathAsyncCache;
@@ -17185,13 +17278,14 @@ async function loadFsPathAsync() {
17185
17278
  }
17186
17279
  function loadFsSyncOrNull() {
17187
17280
  try {
17188
- const fs4 = require("fs");
17189
- const path4 = require("path");
17281
+ const fs4 = require("node:fs");
17282
+ const path4 = require("node:path");
17190
17283
  return { readFileSync: fs4.readFileSync, join: path4.join };
17191
17284
  } catch {
17192
17285
  return null;
17193
17286
  }
17194
17287
  }
17288
+ var transportOverride = null;
17195
17289
  var currentConfig = null;
17196
17290
  var configCacheChecked = false;
17197
17291
  var rateLimitBackoff = false;
@@ -17281,26 +17375,34 @@ async function sendInitRequest(config2, anonKey, sdkVersion, importGraph, health
17281
17375
  payload.diagnostics = diagnostics;
17282
17376
  }
17283
17377
  const url2 = `${config2.endpoint}/v1/sdk/init`;
17284
- const response = await fetch(url2, {
17285
- method: "POST",
17286
- headers: {
17287
- "Content-Type": "application/json",
17288
- Authorization: `Bearer ${effectiveKey}`
17289
- },
17290
- body: JSON.stringify(payload),
17291
- signal
17292
- });
17293
- if (!response.ok) {
17294
- try {
17295
- await response.text();
17296
- } catch {
17378
+ const transport = transportOverride ?? httpsPostJson;
17379
+ let result;
17380
+ try {
17381
+ result = await transport(url2, payload, {
17382
+ headers: {
17383
+ "Content-Type": "application/json",
17384
+ Authorization: `Bearer ${effectiveKey}`
17385
+ },
17386
+ timeoutMs: INIT_TIMEOUT_MS,
17387
+ signal
17388
+ });
17389
+ } catch (err) {
17390
+ if (err instanceof HttpsStatusError) {
17391
+ const error48 = new Error(`Init request failed with status ${err.status}`);
17392
+ error48.status = err.status;
17393
+ throw error48;
17394
+ }
17395
+ if (err instanceof HttpsBodyParseError) {
17396
+ const cause = err.cause;
17397
+ if (cause instanceof SyntaxError) throw cause;
17398
+ throw err;
17399
+ }
17400
+ if (err instanceof HttpsTransportError) {
17401
+ throw err;
17297
17402
  }
17298
- const error48 = new Error(`Init request failed with status ${response.status}`);
17299
- error48.status = response.status;
17300
- throw error48;
17403
+ throw err;
17301
17404
  }
17302
- const body = await response.json();
17303
- return SdkInitResponseSchema.parse(body);
17405
+ return SdkInitResponseSchema.parse(result.body);
17304
17406
  }
17305
17407
  async function writeClaimedKey(newApiKey, projectRoot) {
17306
17408
  const modules = await loadFsPathAsync();
@@ -17389,8 +17491,6 @@ async function performInit(config2, anonKey, sdkVersion, healthReport) {
17389
17491
  console.warn("[glasstrace] No API key available for init request.");
17390
17492
  return null;
17391
17493
  }
17392
- const controller = new AbortController();
17393
- const timeoutId = setTimeout(() => controller.abort(), INIT_TIMEOUT_MS);
17394
17494
  try {
17395
17495
  const result = await sendInitRequest(
17396
17496
  config2,
@@ -17398,10 +17498,8 @@ async function performInit(config2, anonKey, sdkVersion, healthReport) {
17398
17498
  sdkVersion,
17399
17499
  void 0,
17400
17500
  healthReport ?? void 0,
17401
- void 0,
17402
- controller.signal
17501
+ void 0
17403
17502
  );
17404
- clearTimeout(timeoutId);
17405
17503
  currentConfig = result;
17406
17504
  recordConfigSync(Date.now());
17407
17505
  if (healthReport) {
@@ -17418,10 +17516,13 @@ async function performInit(config2, anonKey, sdkVersion, healthReport) {
17418
17516
  }
17419
17517
  return null;
17420
17518
  } catch (err) {
17421
- clearTimeout(timeoutId);
17422
17519
  recordInitFailure();
17423
- if (err instanceof DOMException && err.name === "AbortError") {
17424
- console.warn("[glasstrace] ingestion_unreachable: Init request timed out.");
17520
+ if (err instanceof HttpsTransportError) {
17521
+ if (/timed out|aborted/i.test(err.message)) {
17522
+ console.warn("[glasstrace] ingestion_unreachable: Init request timed out.");
17523
+ } else {
17524
+ console.warn(`[glasstrace] ingestion_unreachable: ${err.message}`);
17525
+ }
17425
17526
  return null;
17426
17527
  }
17427
17528
  const status = err.status;
@@ -17495,7 +17596,6 @@ function didLastInitSucceed() {
17495
17596
  }
17496
17597
 
17497
17598
  // src/span-processor.ts
17498
- init_cjs_shims();
17499
17599
  var GlasstraceSpanProcessor = class {
17500
17600
  wrappedProcessor;
17501
17601
  /* eslint-disable @typescript-eslint/no-unused-vars -- backward compat signature */
@@ -17517,7 +17617,6 @@ var GlasstraceSpanProcessor = class {
17517
17617
  };
17518
17618
 
17519
17619
  // src/enriching-exporter.ts
17520
- init_cjs_shims();
17521
17620
  init_esm();
17522
17621
  init_dist();
17523
17622
  init_console_capture();
@@ -17899,7 +17998,6 @@ function deriveErrorCategory(errorType) {
17899
17998
  }
17900
17999
 
17901
18000
  // src/discovery-endpoint.ts
17902
- init_cjs_shims();
17903
18001
  function isAllowedOrigin(origin) {
17904
18002
  if (origin === null) return true;
17905
18003
  if (origin.startsWith("chrome-extension://")) return true;
@@ -17989,29 +18087,9 @@ function createDiscoveryHandler(getAnonKey, getSessionId, getClaimState) {
17989
18087
  }
17990
18088
 
17991
18089
  // src/register.ts
17992
- init_cjs_shims();
17993
18090
  init_env_detection();
17994
18091
 
17995
- // src/otel-config.ts
17996
- init_cjs_shims();
17997
-
17998
- // ../../node_modules/@opentelemetry/exporter-trace-otlp-http/build/esm/index.js
17999
- init_cjs_shims();
18000
-
18001
- // ../../node_modules/@opentelemetry/exporter-trace-otlp-http/build/esm/platform/index.js
18002
- init_cjs_shims();
18003
-
18004
- // ../../node_modules/@opentelemetry/exporter-trace-otlp-http/build/esm/platform/node/index.js
18005
- init_cjs_shims();
18006
-
18007
- // ../../node_modules/@opentelemetry/exporter-trace-otlp-http/build/esm/platform/node/OTLPTraceExporter.js
18008
- init_cjs_shims();
18009
-
18010
- // ../../node_modules/@opentelemetry/otlp-exporter-base/build/esm/index.js
18011
- init_cjs_shims();
18012
-
18013
18092
  // ../../node_modules/@opentelemetry/otlp-exporter-base/build/esm/OTLPExporterBase.js
18014
- init_cjs_shims();
18015
18093
  var OTLPExporterBase = class {
18016
18094
  _delegate;
18017
18095
  constructor(delegate) {
@@ -18034,7 +18112,6 @@ var OTLPExporterBase = class {
18034
18112
  };
18035
18113
 
18036
18114
  // ../../node_modules/@opentelemetry/otlp-exporter-base/build/esm/types.js
18037
- init_cjs_shims();
18038
18115
  var OTLPExporterError = class extends Error {
18039
18116
  code;
18040
18117
  name = "OTLPExporterError";
@@ -18047,7 +18124,6 @@ var OTLPExporterError = class extends Error {
18047
18124
  };
18048
18125
 
18049
18126
  // ../../node_modules/@opentelemetry/otlp-exporter-base/build/esm/configuration/shared-configuration.js
18050
- init_cjs_shims();
18051
18127
  function validateTimeoutMillis(timeoutMillis) {
18052
18128
  if (Number.isFinite(timeoutMillis) && timeoutMillis > 0) {
18053
18129
  return timeoutMillis;
@@ -18076,7 +18152,6 @@ function getSharedConfigurationDefaults() {
18076
18152
  }
18077
18153
 
18078
18154
  // ../../node_modules/@opentelemetry/otlp-exporter-base/build/esm/bounded-queue-export-promise-handler.js
18079
- init_cjs_shims();
18080
18155
  var BoundedQueueExportPromiseHandler = class {
18081
18156
  _concurrencyLimit;
18082
18157
  _sendingPromises = [];
@@ -18108,14 +18183,7 @@ function createBoundedQueueExportPromiseHandler(options) {
18108
18183
  return new BoundedQueueExportPromiseHandler(options.concurrencyLimit);
18109
18184
  }
18110
18185
 
18111
- // ../../node_modules/@opentelemetry/otlp-exporter-base/build/esm/otlp-export-delegate.js
18112
- init_cjs_shims();
18113
-
18114
- // ../../node_modules/@opentelemetry/core/build/esm/index.js
18115
- init_cjs_shims();
18116
-
18117
18186
  // ../../node_modules/@opentelemetry/core/build/esm/trace/suppress-tracing.js
18118
- init_cjs_shims();
18119
18187
  init_esm();
18120
18188
  var SUPPRESS_TRACING_KEY = createContextKey("OpenTelemetry SDK Context Key SUPPRESS_TRACING");
18121
18189
  function suppressTracing(context2) {
@@ -18126,13 +18194,11 @@ function isTracingSuppressed(context2) {
18126
18194
  }
18127
18195
 
18128
18196
  // ../../node_modules/@opentelemetry/core/build/esm/baggage/constants.js
18129
- init_cjs_shims();
18130
18197
  var BAGGAGE_KEY_PAIR_SEPARATOR = "=";
18131
18198
  var BAGGAGE_PROPERTIES_SEPARATOR = ";";
18132
18199
  var BAGGAGE_ITEMS_SEPARATOR = ",";
18133
18200
 
18134
18201
  // ../../node_modules/@opentelemetry/core/build/esm/baggage/utils.js
18135
- init_cjs_shims();
18136
18202
  init_esm();
18137
18203
  function parsePairKeyValue(entry) {
18138
18204
  if (!entry)
@@ -18175,7 +18241,6 @@ function parseKeyPairsIntoRecord(value) {
18175
18241
  }
18176
18242
 
18177
18243
  // ../../node_modules/@opentelemetry/core/build/esm/common/attributes.js
18178
- init_cjs_shims();
18179
18244
  init_esm();
18180
18245
  function sanitizeAttributes(attributes) {
18181
18246
  const out = {};
@@ -18245,11 +18310,7 @@ function isValidPrimitiveAttributeValueType(valType) {
18245
18310
  return false;
18246
18311
  }
18247
18312
 
18248
- // ../../node_modules/@opentelemetry/core/build/esm/common/global-error-handler.js
18249
- init_cjs_shims();
18250
-
18251
18313
  // ../../node_modules/@opentelemetry/core/build/esm/common/logging-error-handler.js
18252
- init_cjs_shims();
18253
18314
  init_esm();
18254
18315
  function loggingErrorHandler() {
18255
18316
  return (ex) => {
@@ -18289,17 +18350,7 @@ function globalErrorHandler(ex) {
18289
18350
  }
18290
18351
  }
18291
18352
 
18292
- // ../../node_modules/@opentelemetry/core/build/esm/common/time.js
18293
- init_cjs_shims();
18294
-
18295
- // ../../node_modules/@opentelemetry/core/build/esm/platform/index.js
18296
- init_cjs_shims();
18297
-
18298
- // ../../node_modules/@opentelemetry/core/build/esm/platform/node/index.js
18299
- init_cjs_shims();
18300
-
18301
18353
  // ../../node_modules/@opentelemetry/core/build/esm/platform/node/environment.js
18302
- init_cjs_shims();
18303
18354
  init_esm();
18304
18355
  var import_util3 = require("util");
18305
18356
  function getNumberFromEnv(key) {
@@ -18322,15 +18373,10 @@ function getStringFromEnv(key) {
18322
18373
  return raw;
18323
18374
  }
18324
18375
 
18325
- // ../../node_modules/@opentelemetry/core/build/esm/platform/node/sdk-info.js
18326
- init_cjs_shims();
18327
-
18328
18376
  // ../../node_modules/@opentelemetry/core/build/esm/version.js
18329
- init_cjs_shims();
18330
18377
  var VERSION2 = "2.6.1";
18331
18378
 
18332
18379
  // ../../node_modules/@opentelemetry/semantic-conventions/build/esm/stable_attributes.js
18333
- init_cjs_shims();
18334
18380
  var ATTR_EXCEPTION_MESSAGE = "exception.message";
18335
18381
  var ATTR_EXCEPTION_STACKTRACE = "exception.stacktrace";
18336
18382
  var ATTR_EXCEPTION_TYPE = "exception.type";
@@ -18341,7 +18387,6 @@ var ATTR_TELEMETRY_SDK_NAME = "telemetry.sdk.name";
18341
18387
  var ATTR_TELEMETRY_SDK_VERSION = "telemetry.sdk.version";
18342
18388
 
18343
18389
  // ../../node_modules/@opentelemetry/core/build/esm/semconv.js
18344
- init_cjs_shims();
18345
18390
  var ATTR_PROCESS_RUNTIME_NAME = "process.runtime.name";
18346
18391
 
18347
18392
  // ../../node_modules/@opentelemetry/core/build/esm/platform/node/sdk-info.js
@@ -18399,18 +18444,13 @@ function addHrTimes(time1, time22) {
18399
18444
  }
18400
18445
 
18401
18446
  // ../../node_modules/@opentelemetry/core/build/esm/ExportResult.js
18402
- init_cjs_shims();
18403
18447
  var ExportResultCode;
18404
18448
  (function(ExportResultCode2) {
18405
18449
  ExportResultCode2[ExportResultCode2["SUCCESS"] = 0] = "SUCCESS";
18406
18450
  ExportResultCode2[ExportResultCode2["FAILED"] = 1] = "FAILED";
18407
18451
  })(ExportResultCode || (ExportResultCode = {}));
18408
18452
 
18409
- // ../../node_modules/@opentelemetry/core/build/esm/utils/merge.js
18410
- init_cjs_shims();
18411
-
18412
18453
  // ../../node_modules/@opentelemetry/core/build/esm/utils/lodash.merge.js
18413
- init_cjs_shims();
18414
18454
  var objectTag = "[object Object]";
18415
18455
  var nullTag = "[object Null]";
18416
18456
  var undefinedTag = "[object Undefined]";
@@ -18570,11 +18610,7 @@ function shouldMerge(one, two) {
18570
18610
  return true;
18571
18611
  }
18572
18612
 
18573
- // ../../node_modules/@opentelemetry/core/build/esm/utils/callback.js
18574
- init_cjs_shims();
18575
-
18576
18613
  // ../../node_modules/@opentelemetry/core/build/esm/utils/promise.js
18577
- init_cjs_shims();
18578
18614
  var Deferred = class {
18579
18615
  _promise;
18580
18616
  _resolve;
@@ -18626,7 +18662,6 @@ var BindOnceFuture = class {
18626
18662
  };
18627
18663
 
18628
18664
  // ../../node_modules/@opentelemetry/otlp-exporter-base/build/esm/logging-response-handler.js
18629
- init_cjs_shims();
18630
18665
  init_esm();
18631
18666
  function isPartialSuccessResponse(response) {
18632
18667
  return Object.prototype.hasOwnProperty.call(response, "partialSuccess");
@@ -18726,11 +18761,7 @@ function createOtlpExportDelegate(components, settings) {
18726
18761
  return new OTLPExportDelegate(components.transport, components.serializer, createLoggingPartialSuccessResponseHandler(), components.promiseHandler, settings.timeout);
18727
18762
  }
18728
18763
 
18729
- // ../../node_modules/@opentelemetry/otlp-transformer/build/esm/index.js
18730
- init_cjs_shims();
18731
-
18732
18764
  // ../../node_modules/@opentelemetry/otlp-transformer/build/esm/common/internal.js
18733
- init_cjs_shims();
18734
18765
  function createResource(resource, encoder) {
18735
18766
  const result = {
18736
18767
  attributes: toAttributes(resource.attributes, encoder),
@@ -18791,7 +18822,6 @@ function toAnyValue(value, encoder) {
18791
18822
  }
18792
18823
 
18793
18824
  // ../../node_modules/@opentelemetry/otlp-transformer/build/esm/common/utils.js
18794
- init_cjs_shims();
18795
18825
  function hrTimeToNanos(hrTime2) {
18796
18826
  const NANOSECONDS = BigInt(1e9);
18797
18827
  return BigInt(Math.trunc(hrTime2[0])) * NANOSECONDS + BigInt(Math.trunc(hrTime2[1]));
@@ -18820,15 +18850,10 @@ var JSON_ENCODER = {
18820
18850
  }
18821
18851
  };
18822
18852
 
18823
- // ../../node_modules/@opentelemetry/resources/build/esm/index.js
18824
- init_cjs_shims();
18825
-
18826
18853
  // ../../node_modules/@opentelemetry/resources/build/esm/ResourceImpl.js
18827
- init_cjs_shims();
18828
18854
  init_esm();
18829
18855
 
18830
18856
  // ../../node_modules/@opentelemetry/resources/build/esm/default-service-name.js
18831
- init_cjs_shims();
18832
18857
  var serviceName;
18833
18858
  function defaultServiceName() {
18834
18859
  if (serviceName === void 0) {
@@ -18843,7 +18868,6 @@ function defaultServiceName() {
18843
18868
  }
18844
18869
 
18845
18870
  // ../../node_modules/@opentelemetry/resources/build/esm/utils.js
18846
- init_cjs_shims();
18847
18871
  var isPromiseLike = (val) => {
18848
18872
  return val !== null && typeof val === "object" && typeof val.then === "function";
18849
18873
  };
@@ -18971,7 +18995,6 @@ function mergeSchemaUrl(old, updating) {
18971
18995
  }
18972
18996
 
18973
18997
  // ../../node_modules/@opentelemetry/otlp-transformer/build/esm/trace/internal.js
18974
- init_cjs_shims();
18975
18998
  var SPAN_FLAGS_CONTEXT_HAS_IS_REMOTE_MASK = 256;
18976
18999
  var SPAN_FLAGS_CONTEXT_IS_REMOTE_MASK = 512;
18977
19000
  function buildSpanFlagsFrom(traceFlags, isRemote) {
@@ -19084,11 +19107,7 @@ function spanRecordsToResourceSpans(readableSpans, encoder) {
19084
19107
  return out;
19085
19108
  }
19086
19109
 
19087
- // ../../node_modules/@opentelemetry/otlp-transformer/build/esm/trace/json/index.js
19088
- init_cjs_shims();
19089
-
19090
19110
  // ../../node_modules/@opentelemetry/otlp-transformer/build/esm/trace/json/trace.js
19091
- init_cjs_shims();
19092
19111
  var JsonTraceSerializer = {
19093
19112
  serializeRequest: (arg) => {
19094
19113
  const request = createExportTraceServiceRequest(arg, JSON_ENCODER);
@@ -19104,17 +19123,7 @@ var JsonTraceSerializer = {
19104
19123
  }
19105
19124
  };
19106
19125
 
19107
- // ../../node_modules/@opentelemetry/otlp-exporter-base/build/esm/index-node-http.js
19108
- init_cjs_shims();
19109
-
19110
- // ../../node_modules/@opentelemetry/otlp-exporter-base/build/esm/configuration/otlp-node-http-configuration.js
19111
- init_cjs_shims();
19112
-
19113
- // ../../node_modules/@opentelemetry/otlp-exporter-base/build/esm/configuration/otlp-http-configuration.js
19114
- init_cjs_shims();
19115
-
19116
19126
  // ../../node_modules/@opentelemetry/otlp-exporter-base/build/esm/util.js
19117
- init_cjs_shims();
19118
19127
  init_esm();
19119
19128
  function validateAndNormalizeHeaders(partialHeaders) {
19120
19129
  const headers = {};
@@ -19197,19 +19206,11 @@ function getNodeHttpConfigurationDefaults(requiredHeaders, signalResourcePath) {
19197
19206
  };
19198
19207
  }
19199
19208
 
19200
- // ../../node_modules/@opentelemetry/otlp-exporter-base/build/esm/otlp-http-export-delegate.js
19201
- init_cjs_shims();
19202
-
19203
- // ../../node_modules/@opentelemetry/otlp-exporter-base/build/esm/transport/http-exporter-transport.js
19204
- init_cjs_shims();
19205
-
19206
19209
  // ../../node_modules/@opentelemetry/otlp-exporter-base/build/esm/transport/http-transport-utils.js
19207
- init_cjs_shims();
19208
19210
  var zlib = __toESM(require("zlib"));
19209
19211
  var import_stream = require("stream");
19210
19212
 
19211
19213
  // ../../node_modules/@opentelemetry/otlp-exporter-base/build/esm/is-export-retryable.js
19212
- init_cjs_shims();
19213
19214
  function isExportHTTPErrorRetryable(statusCode) {
19214
19215
  return statusCode === 429 || statusCode === 502 || statusCode === 503 || statusCode === 504;
19215
19216
  }
@@ -19229,7 +19230,6 @@ function parseRetryAfterToMills(retryAfter) {
19229
19230
  }
19230
19231
 
19231
19232
  // ../../node_modules/@opentelemetry/otlp-exporter-base/build/esm/version.js
19232
- init_cjs_shims();
19233
19233
  var VERSION3 = "0.214.0";
19234
19234
 
19235
19235
  // ../../node_modules/@opentelemetry/otlp-exporter-base/build/esm/transport/http-transport-utils.js
@@ -19387,7 +19387,6 @@ function createHttpExporterTransport(parameters) {
19387
19387
  }
19388
19388
 
19389
19389
  // ../../node_modules/@opentelemetry/otlp-exporter-base/build/esm/retrying-transport.js
19390
- init_cjs_shims();
19391
19390
  init_esm();
19392
19391
  var MAX_ATTEMPTS = 5;
19393
19392
  var INITIAL_BACKOFF = 1e3;
@@ -19456,7 +19455,6 @@ function createOtlpHttpExportDelegate(options, serializer) {
19456
19455
  }
19457
19456
 
19458
19457
  // ../../node_modules/@opentelemetry/otlp-exporter-base/build/esm/configuration/shared-env-configuration.js
19459
- init_cjs_shims();
19460
19458
  init_esm();
19461
19459
  function parseAndValidateTimeoutFromEnv(timeoutEnvVar) {
19462
19460
  const envTimeout = getNumberFromEnv(timeoutEnvVar);
@@ -19494,11 +19492,9 @@ function getSharedConfigurationFromEnvironment(signalIdentifier) {
19494
19492
  }
19495
19493
 
19496
19494
  // ../../node_modules/@opentelemetry/otlp-exporter-base/build/esm/configuration/convert-legacy-node-http-options.js
19497
- init_cjs_shims();
19498
19495
  init_esm();
19499
19496
 
19500
19497
  // ../../node_modules/@opentelemetry/otlp-exporter-base/build/esm/configuration/otlp-node-http-env-configuration.js
19501
- init_cjs_shims();
19502
19498
  var fs = __toESM(require("fs"));
19503
19499
  var path = __toESM(require("path"));
19504
19500
  init_esm();
@@ -19593,7 +19589,6 @@ function getNodeHttpConfigurationFromEnvironment(signalIdentifier, signalResourc
19593
19589
  }
19594
19590
 
19595
19591
  // ../../node_modules/@opentelemetry/otlp-exporter-base/build/esm/configuration/convert-legacy-http-options.js
19596
- init_cjs_shims();
19597
19592
  function convertLegacyHeaders(config2) {
19598
19593
  if (typeof config2.headers === "function") {
19599
19594
  return config2.headers;
@@ -19640,22 +19635,13 @@ var OTLPTraceExporter = class extends OTLPExporterBase {
19640
19635
  }
19641
19636
  };
19642
19637
 
19643
- // ../../node_modules/@opentelemetry/sdk-trace-base/build/esm/index.js
19644
- init_cjs_shims();
19645
-
19646
- // ../../node_modules/@opentelemetry/sdk-trace-base/build/esm/BasicTracerProvider.js
19647
- init_cjs_shims();
19648
-
19649
19638
  // ../../node_modules/@opentelemetry/sdk-trace-base/build/esm/Tracer.js
19650
- init_cjs_shims();
19651
19639
  init_esm();
19652
19640
 
19653
19641
  // ../../node_modules/@opentelemetry/sdk-trace-base/build/esm/Span.js
19654
- init_cjs_shims();
19655
19642
  init_esm();
19656
19643
 
19657
19644
  // ../../node_modules/@opentelemetry/sdk-trace-base/build/esm/enums.js
19658
- init_cjs_shims();
19659
19645
  var ExceptionEventName = "exception";
19660
19646
 
19661
19647
  // ../../node_modules/@opentelemetry/sdk-trace-base/build/esm/Span.js
@@ -20007,18 +19993,10 @@ var SpanImpl = class {
20007
19993
  }
20008
19994
  };
20009
19995
 
20010
- // ../../node_modules/@opentelemetry/sdk-trace-base/build/esm/utility.js
20011
- init_cjs_shims();
20012
-
20013
19996
  // ../../node_modules/@opentelemetry/sdk-trace-base/build/esm/config.js
20014
- init_cjs_shims();
20015
19997
  init_esm();
20016
19998
 
20017
- // ../../node_modules/@opentelemetry/sdk-trace-base/build/esm/sampler/AlwaysOffSampler.js
20018
- init_cjs_shims();
20019
-
20020
19999
  // ../../node_modules/@opentelemetry/sdk-trace-base/build/esm/Sampler.js
20021
- init_cjs_shims();
20022
20000
  var SamplingDecision2;
20023
20001
  (function(SamplingDecision3) {
20024
20002
  SamplingDecision3[SamplingDecision3["NOT_RECORD"] = 0] = "NOT_RECORD";
@@ -20039,7 +20017,6 @@ var AlwaysOffSampler = class {
20039
20017
  };
20040
20018
 
20041
20019
  // ../../node_modules/@opentelemetry/sdk-trace-base/build/esm/sampler/AlwaysOnSampler.js
20042
- init_cjs_shims();
20043
20020
  var AlwaysOnSampler = class {
20044
20021
  shouldSample() {
20045
20022
  return {
@@ -20052,7 +20029,6 @@ var AlwaysOnSampler = class {
20052
20029
  };
20053
20030
 
20054
20031
  // ../../node_modules/@opentelemetry/sdk-trace-base/build/esm/sampler/ParentBasedSampler.js
20055
- init_cjs_shims();
20056
20032
  init_esm();
20057
20033
  var ParentBasedSampler = class {
20058
20034
  _root;
@@ -20093,7 +20069,6 @@ var ParentBasedSampler = class {
20093
20069
  };
20094
20070
 
20095
20071
  // ../../node_modules/@opentelemetry/sdk-trace-base/build/esm/sampler/TraceIdRatioBasedSampler.js
20096
- init_cjs_shims();
20097
20072
  init_esm();
20098
20073
  var TraceIdRatioBasedSampler = class {
20099
20074
  _ratio;
@@ -20216,17 +20191,7 @@ function reconfigureLimits(userConfig) {
20216
20191
  return Object.assign({}, userConfig, { spanLimits });
20217
20192
  }
20218
20193
 
20219
- // ../../node_modules/@opentelemetry/sdk-trace-base/build/esm/platform/index.js
20220
- init_cjs_shims();
20221
-
20222
- // ../../node_modules/@opentelemetry/sdk-trace-base/build/esm/platform/node/index.js
20223
- init_cjs_shims();
20224
-
20225
- // ../../node_modules/@opentelemetry/sdk-trace-base/build/esm/platform/node/export/BatchSpanProcessor.js
20226
- init_cjs_shims();
20227
-
20228
20194
  // ../../node_modules/@opentelemetry/sdk-trace-base/build/esm/export/BatchSpanProcessorBase.js
20229
- init_cjs_shims();
20230
20195
  init_esm();
20231
20196
  var BatchSpanProcessorBase = class {
20232
20197
  _maxExportBatchSize;
@@ -20399,7 +20364,6 @@ var BatchSpanProcessor = class extends BatchSpanProcessorBase {
20399
20364
  };
20400
20365
 
20401
20366
  // ../../node_modules/@opentelemetry/sdk-trace-base/build/esm/platform/node/RandomIdGenerator.js
20402
- init_cjs_shims();
20403
20367
  var SPAN_ID_BYTES = 8;
20404
20368
  var TRACE_ID_BYTES = 16;
20405
20369
  var RandomIdGenerator = class {
@@ -20431,11 +20395,7 @@ function getIdGenerator(bytes) {
20431
20395
  };
20432
20396
  }
20433
20397
 
20434
- // ../../node_modules/@opentelemetry/sdk-trace-base/build/esm/TracerMetrics.js
20435
- init_cjs_shims();
20436
-
20437
20398
  // ../../node_modules/@opentelemetry/sdk-trace-base/build/esm/semconv.js
20438
- init_cjs_shims();
20439
20399
  var ATTR_OTEL_SPAN_PARENT_ORIGIN = "otel.span.parent.origin";
20440
20400
  var ATTR_OTEL_SPAN_SAMPLING_RESULT = "otel.span.sampling_result";
20441
20401
  var METRIC_OTEL_SDK_SPAN_LIVE = "otel.sdk.span.live";
@@ -20495,7 +20455,6 @@ function samplingDecisionToString(decision) {
20495
20455
  }
20496
20456
 
20497
20457
  // ../../node_modules/@opentelemetry/sdk-trace-base/build/esm/version.js
20498
- init_cjs_shims();
20499
20458
  var VERSION4 = "2.6.1";
20500
20459
 
20501
20460
  // ../../node_modules/@opentelemetry/sdk-trace-base/build/esm/Tracer.js
@@ -20617,7 +20576,6 @@ var Tracer = class {
20617
20576
  };
20618
20577
 
20619
20578
  // ../../node_modules/@opentelemetry/sdk-trace-base/build/esm/MultiSpanProcessor.js
20620
- init_cjs_shims();
20621
20579
  var MultiSpanProcessor = class {
20622
20580
  _spanProcessors;
20623
20581
  constructor(spanProcessors) {
@@ -20742,8 +20700,7 @@ init_esm();
20742
20700
  init_console_capture();
20743
20701
 
20744
20702
  // src/lifecycle.ts
20745
- init_cjs_shims();
20746
- var import_node_events = require("events");
20703
+ var import_node_events = require("node:events");
20747
20704
  var CoreState = {
20748
20705
  IDLE: "IDLE",
20749
20706
  REGISTERING: "REGISTERING",
@@ -21088,9 +21045,9 @@ function registerBeforeExitTrigger() {
21088
21045
  }
21089
21046
 
21090
21047
  // src/coexistence.ts
21091
- init_cjs_shims();
21092
21048
  init_env_detection();
21093
21049
  init_console_capture();
21050
+ var GLASSTRACE_EXPORTER_BRAND = /* @__PURE__ */ Symbol.for("glasstrace.exporter");
21094
21051
  function createGlasstraceSpanProcessor(options) {
21095
21052
  const config2 = resolveConfig(options);
21096
21053
  const exporterUrl = `${config2.endpoint}/v1/traces`;
@@ -21101,13 +21058,64 @@ function createGlasstraceSpanProcessor(options) {
21101
21058
  getConfig: () => getActiveConfig(),
21102
21059
  environment: config2.environment,
21103
21060
  endpointUrl: exporterUrl,
21104
- createDelegate: createOtlpExporter
21061
+ createDelegate: createOtlpExporter,
21062
+ // Propagate verbose so exporter-level enrichment and export logs
21063
+ // stay observable whether the processor is built automatically by
21064
+ // the coexistence path or wired manually by the developer.
21065
+ verbose: config2.verbose
21105
21066
  });
21106
21067
  registerExporterForKeyNotification(exporter);
21107
21068
  return new BatchSpanProcessor(exporter, {
21108
21069
  scheduledDelayMillis: 1e3
21109
21070
  });
21110
21071
  }
21072
+ function isGlasstraceProcessorPresent(tracerProvider) {
21073
+ try {
21074
+ const proxy = tracerProvider;
21075
+ const delegate = typeof proxy.getDelegate === "function" ? proxy.getDelegate() : tracerProvider;
21076
+ const v2 = delegate;
21077
+ const v2Processors = v2._activeSpanProcessor?._spanProcessors;
21078
+ if (Array.isArray(v2Processors) && hasBrandedProcessor(v2Processors)) {
21079
+ return true;
21080
+ }
21081
+ const v1 = delegate;
21082
+ if (typeof v1.getActiveSpanProcessor === "function") {
21083
+ const active = v1.getActiveSpanProcessor();
21084
+ const processors = active?._spanProcessors;
21085
+ if (Array.isArray(processors) && hasBrandedProcessor(processors)) {
21086
+ return true;
21087
+ }
21088
+ }
21089
+ return false;
21090
+ } catch {
21091
+ return false;
21092
+ }
21093
+ }
21094
+ function tryAutoAttachGlasstraceProcessor(tracerProvider, options) {
21095
+ try {
21096
+ if (isGlasstraceProcessorPresent(tracerProvider)) {
21097
+ return "already_present";
21098
+ }
21099
+ const proxy = tracerProvider;
21100
+ const delegate = typeof proxy.getDelegate === "function" ? proxy.getDelegate() : tracerProvider;
21101
+ const withAdd = delegate;
21102
+ if (typeof withAdd.addSpanProcessor === "function") {
21103
+ const processor2 = createGlasstraceSpanProcessor(options);
21104
+ withAdd.addSpanProcessor(processor2);
21105
+ return { method: "v1_public", processor: processor2 };
21106
+ }
21107
+ const v2 = delegate;
21108
+ const multiProcessor = v2._activeSpanProcessor;
21109
+ if (!multiProcessor || !Array.isArray(multiProcessor._spanProcessors)) {
21110
+ return null;
21111
+ }
21112
+ const processor = createGlasstraceSpanProcessor(options);
21113
+ multiProcessor._spanProcessors.push(processor);
21114
+ return { method: "v2_private", processor };
21115
+ } catch {
21116
+ return null;
21117
+ }
21118
+ }
21111
21119
  function emitNudgeMessage() {
21112
21120
  const isSentry = detectSentry();
21113
21121
  if (isSentry) {
@@ -21176,6 +21184,12 @@ Add Glasstrace to your provider configuration:
21176
21184
  );
21177
21185
  }
21178
21186
  }
21187
+ function hasBrandedProcessor(processors) {
21188
+ return processors.some((p) => {
21189
+ const exporter = p._exporter;
21190
+ return exporter?.[GLASSTRACE_EXPORTER_BRAND] === true;
21191
+ });
21192
+ }
21179
21193
  function detectSentry() {
21180
21194
  try {
21181
21195
  require.resolve("@sentry/node");
@@ -21217,65 +21231,75 @@ async function tryImport(moduleId) {
21217
21231
  return null;
21218
21232
  }
21219
21233
  }
21220
- function tryInjectProcessor(tracerProvider, glasstraceExporter) {
21221
- try {
21222
- const proxy = tracerProvider;
21223
- const delegate = typeof proxy.getDelegate === "function" ? proxy.getDelegate() : tracerProvider;
21224
- const withAdd = delegate;
21225
- if (typeof withAdd.addSpanProcessor === "function") {
21226
- if (typeof withAdd.getActiveSpanProcessor === "function") {
21227
- const active = withAdd.getActiveSpanProcessor();
21228
- const brand = /* @__PURE__ */ Symbol.for("glasstrace.exporter");
21229
- const processors = active?._spanProcessors;
21230
- if (Array.isArray(processors) && processors.some((p) => {
21231
- const exp = p._exporter;
21232
- return exp?.[brand] === true;
21233
- })) {
21234
- return "already_present";
21235
- }
21236
- }
21237
- const processor2 = new BatchSpanProcessor(glasstraceExporter, {
21238
- scheduledDelayMillis: 1e3
21239
- });
21240
- withAdd.addSpanProcessor(processor2);
21241
- _injectedProcessor = processor2;
21242
- return "v1_public";
21243
- }
21244
- const provider = delegate;
21245
- const multiProcessor = provider._activeSpanProcessor;
21246
- if (!multiProcessor || !Array.isArray(multiProcessor._spanProcessors)) {
21247
- return null;
21234
+ async function configureOtel(config2, sessionManager) {
21235
+ setOtelState(OtelState.CONFIGURING);
21236
+ await new Promise((resolve3) => {
21237
+ if (typeof setImmediate === "function") {
21238
+ setImmediate(resolve3);
21239
+ } else {
21240
+ setTimeout(resolve3, 0);
21248
21241
  }
21249
- const processor = new BatchSpanProcessor(glasstraceExporter, {
21250
- scheduledDelayMillis: 1e3
21251
- });
21252
- multiProcessor._spanProcessors.push(processor);
21253
- _injectedProcessor = processor;
21254
- return "v2_private";
21255
- } catch {
21256
- return null;
21242
+ });
21243
+ const existingProvider = trace.getTracerProvider();
21244
+ const probeTracer = existingProvider.getTracer("glasstrace-probe");
21245
+ const anotherProviderRegistered = probeTracer.constructor.name !== "ProxyTracer";
21246
+ if (anotherProviderRegistered) {
21247
+ await runCoexistencePath(existingProvider, config2);
21248
+ return;
21257
21249
  }
21250
+ await runRegistrationPath(config2, sessionManager);
21258
21251
  }
21259
- function isGlasstraceProcessorPresent(tracerProvider) {
21260
- try {
21261
- const proxy = tracerProvider;
21262
- const delegate = typeof proxy.getDelegate === "function" ? proxy.getDelegate() : tracerProvider;
21263
- const provider = delegate;
21264
- const processors = provider._activeSpanProcessor?._spanProcessors;
21265
- if (!Array.isArray(processors)) {
21266
- return false;
21252
+ async function runCoexistencePath(existingProvider, config2) {
21253
+ const result = tryAutoAttachGlasstraceProcessor(existingProvider, {
21254
+ endpoint: config2.endpoint,
21255
+ verbose: config2.verbose
21256
+ });
21257
+ if (result === "already_present") {
21258
+ if (config2.verbose) {
21259
+ sdkLog("info", "[glasstrace] Existing provider detected \u2014 Glasstrace processor already present.");
21260
+ }
21261
+ setOtelState(OtelState.PROCESSOR_PRESENT);
21262
+ emitLifecycleEvent("otel:configured", { state: OtelState.PROCESSOR_PRESENT, scenario: "B-clean" });
21263
+ return;
21264
+ }
21265
+ if (result !== null) {
21266
+ _injectedProcessor = result.processor;
21267
+ if (config2.verbose) {
21268
+ sdkLog(
21269
+ "info",
21270
+ "[glasstrace] Existing provider detected \u2014 auto-attached Glasstrace span processor."
21271
+ );
21267
21272
  }
21268
- const brand = /* @__PURE__ */ Symbol.for("glasstrace.exporter");
21269
- return processors.some((p) => {
21270
- const exporter = p._exporter;
21271
- return exporter?.[brand] === true;
21273
+ registerShutdownHook({
21274
+ name: "coexistence-flush",
21275
+ priority: 5,
21276
+ fn: async () => {
21277
+ if (_injectedProcessor) {
21278
+ await _injectedProcessor.forceFlush();
21279
+ }
21280
+ }
21272
21281
  });
21273
- } catch {
21274
- return false;
21282
+ registerBeforeExitTrigger();
21283
+ const scenario = result.method === "v1_public" ? "D1" : "B-auto";
21284
+ setOtelState(OtelState.AUTO_ATTACHED);
21285
+ emitLifecycleEvent("otel:configured", { state: OtelState.AUTO_ATTACHED, scenario });
21286
+ emitLifecycleEvent("otel:injection_succeeded", { method: result.method });
21287
+ emitNudgeMessage();
21288
+ return;
21289
+ }
21290
+ if (config2.verbose) {
21291
+ sdkLog("info", "[glasstrace] Existing provider detected \u2014 could not auto-attach.");
21292
+ }
21293
+ emitGuidanceMessage();
21294
+ setOtelState(OtelState.COEXISTENCE_FAILED);
21295
+ emitLifecycleEvent("otel:configured", { state: OtelState.COEXISTENCE_FAILED, scenario: "C/F" });
21296
+ emitLifecycleEvent("otel:injection_failed", { reason: "provider internals inaccessible" });
21297
+ const coreState = getCoreState();
21298
+ if (coreState === CoreState.ACTIVE || coreState === CoreState.KEY_RESOLVED) {
21299
+ setCoreState(CoreState.ACTIVE_DEGRADED);
21275
21300
  }
21276
21301
  }
21277
- async function configureOtel(config2, sessionManager) {
21278
- setOtelState(OtelState.CONFIGURING);
21302
+ async function runRegistrationPath(config2, sessionManager) {
21279
21303
  const exporterUrl = `${config2.endpoint}/v1/traces`;
21280
21304
  const createOtlpExporter = (url2, headers) => new OTLPTraceExporter({ url: url2, headers });
21281
21305
  const glasstraceExporter = new GlasstraceExporter({
@@ -21288,71 +21312,6 @@ async function configureOtel(config2, sessionManager) {
21288
21312
  verbose: config2.verbose
21289
21313
  });
21290
21314
  _activeExporter = glasstraceExporter;
21291
- await new Promise((resolve3) => {
21292
- if (typeof setImmediate === "function") {
21293
- setImmediate(resolve3);
21294
- } else {
21295
- setTimeout(resolve3, 0);
21296
- }
21297
- });
21298
- const existingProvider = trace.getTracerProvider();
21299
- const probeTracer = existingProvider.getTracer("glasstrace-probe");
21300
- const anotherProviderRegistered = probeTracer.constructor.name !== "ProxyTracer";
21301
- if (anotherProviderRegistered) {
21302
- if (isGlasstraceProcessorPresent(existingProvider)) {
21303
- if (config2.verbose) {
21304
- sdkLog("info", "[glasstrace] Existing provider detected \u2014 Glasstrace processor already present.");
21305
- }
21306
- _activeExporter = null;
21307
- setOtelState(OtelState.PROCESSOR_PRESENT);
21308
- emitLifecycleEvent("otel:configured", { state: OtelState.PROCESSOR_PRESENT, scenario: "B-clean" });
21309
- return;
21310
- }
21311
- const injectionMethod = tryInjectProcessor(existingProvider, glasstraceExporter);
21312
- if (injectionMethod === "already_present") {
21313
- if (config2.verbose) {
21314
- sdkLog("info", "[glasstrace] Existing provider detected \u2014 Glasstrace processor already present (v1 check).");
21315
- }
21316
- _activeExporter = null;
21317
- setOtelState(OtelState.PROCESSOR_PRESENT);
21318
- emitLifecycleEvent("otel:configured", { state: OtelState.PROCESSOR_PRESENT, scenario: "B-clean" });
21319
- return;
21320
- }
21321
- if (injectionMethod) {
21322
- if (config2.verbose) {
21323
- sdkLog("info", "[glasstrace] Existing provider detected \u2014 auto-attaching Glasstrace processor.");
21324
- }
21325
- registerShutdownHook({
21326
- name: "coexistence-flush",
21327
- priority: 5,
21328
- fn: async () => {
21329
- if (_injectedProcessor) {
21330
- await _injectedProcessor.forceFlush();
21331
- }
21332
- }
21333
- });
21334
- registerBeforeExitTrigger();
21335
- const scenario = injectionMethod === "v1_public" ? "D1" : "B-auto";
21336
- setOtelState(OtelState.AUTO_ATTACHED);
21337
- emitLifecycleEvent("otel:configured", { state: OtelState.AUTO_ATTACHED, scenario });
21338
- emitLifecycleEvent("otel:injection_succeeded", { method: injectionMethod });
21339
- emitNudgeMessage();
21340
- return;
21341
- }
21342
- if (config2.verbose) {
21343
- sdkLog("info", "[glasstrace] Existing provider detected \u2014 could not auto-attach.");
21344
- }
21345
- emitGuidanceMessage();
21346
- _activeExporter = null;
21347
- setOtelState(OtelState.COEXISTENCE_FAILED);
21348
- emitLifecycleEvent("otel:configured", { state: OtelState.COEXISTENCE_FAILED, scenario: "C/F" });
21349
- emitLifecycleEvent("otel:injection_failed", { reason: "provider internals inaccessible" });
21350
- const coreState = getCoreState();
21351
- if (coreState === CoreState.ACTIVE || coreState === CoreState.KEY_RESOLVED) {
21352
- setCoreState(CoreState.ACTIVE_DEGRADED);
21353
- }
21354
- return;
21355
- }
21356
21315
  const vercelOtel = await tryImport("@vercel/otel");
21357
21316
  if (vercelOtel && typeof vercelOtel.registerOTel === "function") {
21358
21317
  const otelConfig = {
@@ -21415,8 +21374,7 @@ async function configureOtel(config2, sessionManager) {
21415
21374
  }
21416
21375
 
21417
21376
  // src/context-manager.ts
21418
- init_cjs_shims();
21419
- var import_node_async_hooks = require("async_hooks");
21377
+ var import_node_async_hooks = require("node:async_hooks");
21420
21378
  init_esm();
21421
21379
  function installContextManager() {
21422
21380
  try {
@@ -21451,7 +21409,6 @@ init_esm();
21451
21409
  init_console_capture();
21452
21410
 
21453
21411
  // src/heartbeat.ts
21454
- init_cjs_shims();
21455
21412
  init_console_capture();
21456
21413
  var HEARTBEAT_INTERVAL_MS = 5 * 60 * 1e3;
21457
21414
  var BACKOFF_BASE_MS = HEARTBEAT_INTERVAL_MS;
@@ -21488,8 +21445,8 @@ function checkShutdownMarker(projectRoot) {
21488
21445
  let fsSync2 = null;
21489
21446
  let pathSync = null;
21490
21447
  try {
21491
- fsSync2 = require("fs");
21492
- pathSync = require("path");
21448
+ fsSync2 = require("node:fs");
21449
+ pathSync = require("node:path");
21493
21450
  } catch {
21494
21451
  return { triggered: false };
21495
21452
  }
@@ -21577,9 +21534,8 @@ function registerHeartbeatShutdownHook(config2, anonKey, sdkVersion) {
21577
21534
  }
21578
21535
 
21579
21536
  // src/runtime-state.ts
21580
- init_cjs_shims();
21581
- var import_node_fs = require("fs");
21582
- var import_node_path = require("path");
21537
+ var import_node_fs = require("node:fs");
21538
+ var import_node_path = require("node:path");
21583
21539
  init_console_capture();
21584
21540
  var _projectRoot = null;
21585
21541
  var _sdkVersion = "unknown";
@@ -21675,7 +21631,7 @@ function registerGlasstrace(options) {
21675
21631
  setCoreState(CoreState.REGISTERING);
21676
21632
  startRuntimeStateWriter({
21677
21633
  projectRoot: process.cwd(),
21678
- sdkVersion: "0.15.1"
21634
+ sdkVersion: "0.16.0"
21679
21635
  });
21680
21636
  const config2 = resolveConfig(options);
21681
21637
  if (config2.verbose) {
@@ -21840,8 +21796,8 @@ async function backgroundInit(config2, anonKeyForInit, generation) {
21840
21796
  if (config2.verbose) {
21841
21797
  console.info("[glasstrace] Background init firing.");
21842
21798
  }
21843
- const healthReport = collectHealthReport("0.15.1");
21844
- const initResult = await performInit(config2, anonKeyForInit, "0.15.1", healthReport);
21799
+ const healthReport = collectHealthReport("0.16.0");
21800
+ const initResult = await performInit(config2, anonKeyForInit, "0.16.0", healthReport);
21845
21801
  if (generation !== registrationGeneration) return;
21846
21802
  const currentState = getCoreState();
21847
21803
  if (currentState === CoreState.SHUTTING_DOWN || currentState === CoreState.SHUTDOWN) {
@@ -21864,7 +21820,7 @@ async function backgroundInit(config2, anonKeyForInit, generation) {
21864
21820
  }
21865
21821
  maybeInstallConsoleCapture();
21866
21822
  if (didLastInitSucceed()) {
21867
- startHeartbeat(config2, anonKeyForInit, "0.15.1", generation, (newApiKey, accountId) => {
21823
+ startHeartbeat(config2, anonKeyForInit, "0.16.0", generation, (newApiKey, accountId) => {
21868
21824
  setAuthState(AuthState.CLAIMING);
21869
21825
  emitLifecycleEvent("auth:claim_started", { accountId });
21870
21826
  setResolvedApiKey(newApiKey);
@@ -21894,7 +21850,7 @@ function isDiscoveryEnabled(config2) {
21894
21850
  }
21895
21851
 
21896
21852
  // src/config-wrapper.ts
21897
- init_cjs_shims();
21853
+ var import_node_module = require("node:module");
21898
21854
  function isTurbopackBuild() {
21899
21855
  if (typeof process === "undefined") return false;
21900
21856
  const argv = Array.isArray(process.argv) ? process.argv : [];
@@ -21903,6 +21859,36 @@ function isTurbopackBuild() {
21903
21859
  if (process.env?.TURBOPACK === "1") return true;
21904
21860
  return false;
21905
21861
  }
21862
+ var SDK_PACKAGE_NAME = "@glasstrace/sdk";
21863
+ function appendNodeSchemeExternal(webpackConfig) {
21864
+ const nodeBuiltinExternal = (data, callback) => {
21865
+ const request = data.request;
21866
+ if (typeof request === "string" && (0, import_node_module.isBuiltin)(request)) {
21867
+ callback(null, "commonjs " + request);
21868
+ return;
21869
+ }
21870
+ callback(null);
21871
+ };
21872
+ const existing = webpackConfig.externals;
21873
+ if (Array.isArray(existing)) {
21874
+ webpackConfig.externals = [...existing, nodeBuiltinExternal];
21875
+ } else if (existing == null) {
21876
+ webpackConfig.externals = [nodeBuiltinExternal];
21877
+ } else {
21878
+ webpackConfig.externals = [existing, nodeBuiltinExternal];
21879
+ }
21880
+ }
21881
+ function ensureServerExternal(config2) {
21882
+ const existingStable = config2.serverExternalPackages;
21883
+ const stable = Array.isArray(existingStable) ? (
21884
+ // Clone so we never mutate a caller-owned array in place.
21885
+ existingStable.filter((entry) => typeof entry === "string")
21886
+ ) : [];
21887
+ if (!stable.includes(SDK_PACKAGE_NAME)) {
21888
+ stable.push(SDK_PACKAGE_NAME);
21889
+ }
21890
+ config2.serverExternalPackages = stable;
21891
+ }
21906
21892
  function withGlasstraceConfig(nextConfig) {
21907
21893
  if (typeof process === "undefined" || typeof process.versions?.node !== "string") {
21908
21894
  return nextConfig != null ? { ...nextConfig } : {};
@@ -21914,6 +21900,7 @@ function withGlasstraceConfig(nextConfig) {
21914
21900
  ...existingExperimental,
21915
21901
  serverSourceMaps: true
21916
21902
  };
21903
+ ensureServerExternal(bag);
21917
21904
  if (bag.turbopack == null) {
21918
21905
  bag.turbopack = {};
21919
21906
  }
@@ -21928,6 +21915,9 @@ function withGlasstraceConfig(nextConfig) {
21928
21915
  result = existingWebpack(webpackConfig, context2);
21929
21916
  }
21930
21917
  const webpackContext = context2;
21918
+ if (webpackContext.isServer) {
21919
+ appendNodeSchemeExternal(result);
21920
+ }
21931
21921
  if (!webpackContext.isServer && webpackContext.dev === false) {
21932
21922
  const plugins = result.plugins ?? [];
21933
21923
  plugins.push({
@@ -21990,7 +21980,6 @@ async function handleSourceMapUpload(distDir) {
21990
21980
  init_source_map_uploader();
21991
21981
 
21992
21982
  // src/capture-error.ts
21993
- init_cjs_shims();
21994
21983
  init_esm();
21995
21984
  init_error_nudge();
21996
21985
  function captureError(error48) {
@@ -22013,11 +22002,10 @@ function captureError(error48) {
22013
22002
  }
22014
22003
 
22015
22004
  // src/import-graph.ts
22016
- init_cjs_shims();
22017
- var fs3 = __toESM(require("fs/promises"), 1);
22018
- var fsSync = __toESM(require("fs"), 1);
22019
- var path3 = __toESM(require("path"), 1);
22020
- var crypto3 = __toESM(require("crypto"), 1);
22005
+ var fs3 = __toESM(require("node:fs/promises"), 1);
22006
+ var fsSync = __toESM(require("node:fs"), 1);
22007
+ var path3 = __toESM(require("node:path"), 1);
22008
+ var crypto3 = __toESM(require("node:crypto"), 1);
22021
22009
  init_dist();
22022
22010
  var MAX_TEST_FILES = 5e3;
22023
22011
  var EXCLUDED_DIRS = /* @__PURE__ */ new Set(["node_modules", ".next", ".git", "dist", ".turbo"]);