@brickkit/cli 0.10.0 → 0.12.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 (147) hide show
  1. package/README.md +1 -1
  2. package/dashboard-dist/CollapsiblePanel-CbUysOp5.js +2 -0
  3. package/dashboard-dist/CompositeRoot-D4sRkYq3.js +1 -0
  4. package/dashboard-dist/Geist-Variable.woff2 +0 -0
  5. package/dashboard-dist/GeistMono-Variable.woff2 +0 -0
  6. package/dashboard-dist/PopoverPopup-CiI2avT_.js +1 -0
  7. package/dashboard-dist/api-reference-B-bZRtNV.js +265 -0
  8. package/dashboard-dist/app.css +2 -2
  9. package/dashboard-dist/app.js +13 -13
  10. package/dashboard-dist/ccount-CcG1m-Yh.js +1 -0
  11. package/dashboard-dist/client-BJJtVSVr.js +1 -0
  12. package/dashboard-dist/core-Z7NJFk0K.js +1 -0
  13. package/dashboard-dist/docs-Dpfc0wJb.js +4 -0
  14. package/dashboard-dist/docs.css +1 -1
  15. package/dashboard-dist/kit.js +1 -0
  16. package/dashboard-dist/popover-BzejBolB.js +1 -0
  17. package/dashboard-dist/react-dom-client.js +3 -0
  18. package/dashboard-dist/react-dom.js +3 -0
  19. package/dashboard-dist/react-jsx-runtime.js +1 -1
  20. package/dashboard-dist/react.js +3 -3
  21. package/dashboard-dist/theme.css +123 -0
  22. package/dist/app-entry2.js +2 -3
  23. package/dist/bin.d.ts +0 -2
  24. package/dist/bin.js +606 -49
  25. package/dist/bin.js.map +1 -1
  26. package/dist/client-contract-file2.js +2 -3
  27. package/dist/client-contract2.js +18 -10
  28. package/dist/client-contract2.js.map +1 -1
  29. package/dist/compiler.d.ts +1 -2
  30. package/dist/compiler.js +1 -1
  31. package/dist/compiler2.js +3 -4
  32. package/dist/config.js +250 -0
  33. package/dist/config.js.map +1 -0
  34. package/dist/dashboard-extension.d.ts +25 -0
  35. package/dist/dashboard.d.ts +2997 -0
  36. package/dist/dev-reporter.d.ts +0 -2
  37. package/dist/dev-reporter.js +1 -2
  38. package/dist/dev-telemetry-store.js +1411 -966
  39. package/dist/dev-telemetry-store.js.map +1 -1
  40. package/dist/dev-telemetry.js +3 -4
  41. package/dist/dev-telemetry.js.map +1 -1
  42. package/dist/dev-worker.js +3 -4
  43. package/dist/emit.d.ts +0 -2
  44. package/dist/index.d.ts +96 -17
  45. package/dist/index.js +4 -5
  46. package/dist/lint/eslint.d.ts +2 -0
  47. package/dist/lint/eslint.js +1 -0
  48. package/dist/lint/oxlint.d.ts +17 -0
  49. package/dist/lint/oxlint.js +18 -0
  50. package/dist/lint/oxlint.js.map +1 -0
  51. package/dist/plugin.d.ts +70 -0
  52. package/dist/plugin.js +64 -0
  53. package/dist/plugin.js.map +1 -0
  54. package/dist/presets.js +1066 -0
  55. package/dist/presets.js.map +1 -0
  56. package/dist/runner.js +114 -32
  57. package/dist/runner.js.map +1 -1
  58. package/dist/vite.d.ts +6 -5
  59. package/dist/vite.js +13 -9
  60. package/dist/vite.js.map +1 -1
  61. package/dist/workflows.d.ts +0 -2
  62. package/dist/workflows2.js +3 -4
  63. package/inspector-dist/client/assets/api.rpc-BvRk9kiK.js +0 -0
  64. package/inspector-dist/client/assets/api.stream._streamId-BvRk9kiK.js +0 -0
  65. package/inspector-dist/client/assets/app-CCzpuUz_.css +2 -0
  66. package/inspector-dist/client/assets/dist-BK8w6xOr.js +3930 -0
  67. package/inspector-dist/client/assets/dist-CG2aVufI.js +197 -0
  68. package/inspector-dist/client/assets/entry.client-D9jbgmTR.js +9391 -0
  69. package/inspector-dist/client/assets/highlighted-body-B3W2YXNL-DYVdwGy2.js +34 -0
  70. package/inspector-dist/client/assets/home-CyjkvtII.js +2883 -0
  71. package/inspector-dist/client/assets/jsx-runtime-CPEah4WQ.js +7084 -0
  72. package/inspector-dist/client/assets/manifest-ba30b52d.js +1 -0
  73. package/inspector-dist/client/assets/mermaid-3ZIDBTTL-Dy6IVqPy.js +1 -0
  74. package/inspector-dist/client/assets/root-8BMab1lL.css +2 -0
  75. package/inspector-dist/client/assets/root-DX9wtogx.js +332 -0
  76. package/inspector-dist/client/assets/run-detail-C69EJGql.js +1549 -0
  77. package/inspector-dist/client/assets/tabs-B6B88IjT.js +75692 -0
  78. package/inspector-dist/client/assets/tabs-L5XKzOpP.css +1 -0
  79. package/inspector-dist/client/assets/world-config-context-C3BqXPIv.js +30 -0
  80. package/inspector-dist/client/assets/zstd-browser-decoder-ByUgcY9H.js +41 -0
  81. package/inspector-dist/server/assets/app-WoDoT62X.js +100155 -0
  82. package/inspector-dist/server/assets/chunk-RLXIAIE6-CbvDIAEa.js +42977 -0
  83. package/inspector-dist/server/assets/dist-BRxZSWUN.js +1140 -0
  84. package/inspector-dist/server/assets/dist-CQnQcIJg.js +199 -0
  85. package/inspector-dist/server/assets/dist-DqRd9pyS.js +1644 -0
  86. package/inspector-dist/server/assets/dist-qR-969AD.js +10327 -0
  87. package/inspector-dist/server/assets/encryption-_PuklZNX.js +888 -0
  88. package/inspector-dist/server/assets/event-metadata-BVakQJ_y.js +147 -0
  89. package/inspector-dist/server/assets/functions-CImcpqNl.js +1172 -0
  90. package/inspector-dist/server/assets/global-singleton-CPirHxFh.js +82 -0
  91. package/inspector-dist/server/assets/highlighted-body-B3W2YXNL-fPMB_t7F.js +36 -0
  92. package/inspector-dist/server/assets/mermaid-3ZIDBTTL-bADXySE3.js +3 -0
  93. package/inspector-dist/server/assets/parse-D9Vvgzt9.js +471 -0
  94. package/inspector-dist/server/assets/rolldown-runtime-CLg409Sh.js +44 -0
  95. package/inspector-dist/server/assets/serialization-format-DDtsVTU1.js +478 -0
  96. package/inspector-dist/server/assets/token-BW4GdQZh.js +62 -0
  97. package/inspector-dist/server/assets/token-D6FXdkJT.js +57 -0
  98. package/inspector-dist/server/assets/token-util-BoNmi-wE.js +457 -0
  99. package/inspector-dist/server/assets/wrapper-wiqsGXcE.js +3626 -0
  100. package/inspector-dist/server/assets/ws-transport-DV7oG4mL.js +29478 -0
  101. package/inspector-dist/server/assets/zstd-browser-decoder-Cswf0KO6.js +40 -0
  102. package/inspector-dist/server/index.js +2 -57
  103. package/package.json +57 -32
  104. package/vite-client.d.ts +1 -1
  105. package/dashboard-dist/CollapsiblePanel-a54TwMKb.js +0 -2
  106. package/dashboard-dist/PopoverPopup-BLzjTqsi.js +0 -1
  107. package/dashboard-dist/api-reference-r893F8zi.js +0 -260
  108. package/dashboard-dist/core-BWAwhSFf.js +0 -1
  109. package/dashboard-dist/docs-CkMy3Y5i.js +0 -4
  110. package/dashboard-dist/preload-helper-CjQDFR0M.js +0 -1
  111. package/dist/bin.d.ts.map +0 -1
  112. package/dist/build.js +0 -119
  113. package/dist/build.js.map +0 -1
  114. package/dist/dev-reporter.d.ts.map +0 -1
  115. package/dist/emit.d.ts.map +0 -1
  116. package/dist/index.d.ts.map +0 -1
  117. package/dist/vite.d.ts.map +0 -1
  118. package/dist/workflows.d.ts.map +0 -1
  119. package/inspector-dist/client/assets/api.rpc-l0sNRNKZ.js +0 -1
  120. package/inspector-dist/client/assets/api.stream._streamId-l0sNRNKZ.js +0 -1
  121. package/inspector-dist/client/assets/app-CY7CQBRo.css +0 -1
  122. package/inspector-dist/client/assets/entry.client-BJ6G3n5t.js +0 -11697
  123. package/inspector-dist/client/assets/highlighted-body-B3W2YXNL-C-3wZnxf.js +0 -19
  124. package/inspector-dist/client/assets/home-CSKAS4P2.js +0 -4979
  125. package/inspector-dist/client/assets/index-DECCyMR0.js +0 -4482
  126. package/inspector-dist/client/assets/index-Dot7CgrA.js +0 -9837
  127. package/inspector-dist/client/assets/index-HqNj_XIX.js +0 -200
  128. package/inspector-dist/client/assets/manifest-4baa7c6f.js +0 -1
  129. package/inspector-dist/client/assets/mermaid-3ZIDBTTL-DC0K8uTy.js +0 -58626
  130. package/inspector-dist/client/assets/mermaid-3ZIDBTTL-F88p7PFX.css +0 -1
  131. package/inspector-dist/client/assets/root-Bmn5n3jF.js +0 -305
  132. package/inspector-dist/client/assets/root-CfCr265_.css +0 -1
  133. package/inspector-dist/client/assets/run-detail-CWoGxu_0.css +0 -1
  134. package/inspector-dist/client/assets/run-detail-Cc7tSGNq.js +0 -6237
  135. package/inspector-dist/client/assets/world-config-context-BAD1QCrR.js +0 -26
  136. package/inspector-dist/client/assets/zstd-browser-decoder-BQoRpP7L.js +0 -28
  137. package/inspector-dist/server/assets/app-C-ZVJtic.js +0 -174880
  138. package/inspector-dist/server/assets/highlighted-body-B3W2YXNL-C8sq8F_D.js +0 -71
  139. package/inspector-dist/server/assets/index-BfLBLRRi.js +0 -204
  140. package/inspector-dist/server/assets/index-BzrGWk7J.js +0 -1164
  141. package/inspector-dist/server/assets/index-CWJr34WJ.js +0 -1296
  142. package/inspector-dist/server/assets/index-CYlmUaKx.js +0 -191
  143. package/inspector-dist/server/assets/mermaid-3ZIDBTTL-Dv5rjfMN.js +0 -58
  144. package/inspector-dist/server/assets/token-DnLp3wBO.js +0 -95
  145. package/inspector-dist/server/assets/token-util-Bpfp-B0w.js +0 -33
  146. package/inspector-dist/server/assets/wrapper-D5LIcZ_u.js +0 -67
  147. package/inspector-dist/server/assets/zstd-browser-decoder-BM8GpVB8.js +0 -77
@@ -0,0 +1,1644 @@
1
+ import { createRequire as __wkfCreateRequire } from "node:module";
2
+ if (typeof require === "undefined") globalThis.require = __wkfCreateRequire(import.meta.url);
3
+ // ../../node_modules/.bun/@opentelemetry+api@1.10.0/node_modules/@opentelemetry/api/dist/diag/types.mjs
4
+ /**
5
+ * Defines the available internal logging levels for the diagnostic logger, the numeric values
6
+ * of the levels are defined to match the original values from the initial LogLevel to avoid
7
+ * compatibility/migration issues for any implementation that assume the numeric ordering.
8
+ *
9
+ * @since 1.0.0
10
+ */
11
+ var DiagLogLevel = /* @__PURE__ */ function(DiagLogLevel) {
12
+ /** Diagnostic Logging level setting to disable all logging (except and forced logs) */
13
+ DiagLogLevel[DiagLogLevel["NONE"] = 0] = "NONE";
14
+ /** Identifies an error scenario */
15
+ DiagLogLevel[DiagLogLevel["ERROR"] = 30] = "ERROR";
16
+ /** Identifies a warning scenario */
17
+ DiagLogLevel[DiagLogLevel["WARN"] = 50] = "WARN";
18
+ /** General informational log message */
19
+ DiagLogLevel[DiagLogLevel["INFO"] = 60] = "INFO";
20
+ /** General debug log message */
21
+ DiagLogLevel[DiagLogLevel["DEBUG"] = 70] = "DEBUG";
22
+ /**
23
+ * Detailed trace level logging should only be used for development, should only be set
24
+ * in a development environment.
25
+ */
26
+ DiagLogLevel[DiagLogLevel["VERBOSE"] = 80] = "VERBOSE";
27
+ /** Used to set the logging level to include all logging */
28
+ DiagLogLevel[DiagLogLevel["ALL"] = 9999] = "ALL";
29
+ return DiagLogLevel;
30
+ }({});
31
+ // ../../node_modules/.bun/@opentelemetry+api@1.10.0/node_modules/@opentelemetry/api/dist/version.mjs
32
+ var VERSION = "1.10.0";
33
+ // ../../node_modules/.bun/@opentelemetry+api@1.10.0/node_modules/@opentelemetry/api/dist/internal/semver.mjs
34
+ var re = /^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;
35
+ /**
36
+ * Create a function to test an API version to see if it is compatible with the provided ownVersion.
37
+ *
38
+ * The returned function has the following semantics:
39
+ * - Exact match is always compatible
40
+ * - Major versions must match exactly
41
+ * - 1.x package cannot use global 2.x package
42
+ * - 2.x package cannot use global 1.x package
43
+ * - The minor version of the API module requesting access to the global API must be less than or equal to the minor version of this API
44
+ * - 1.3 package may use 1.4 global because the later global contains all functions 1.3 expects
45
+ * - 1.4 package may NOT use 1.3 global because it may try to call functions which don't exist on 1.3
46
+ * - If the major version is 0, the minor version is treated as the major and the patch is treated as the minor
47
+ * - Patch and build tag differences are not considered at this time
48
+ *
49
+ * @param ownVersion version which should be checked against
50
+ */
51
+ function _makeCompatibilityCheck(ownVersion) {
52
+ const acceptedVersions = /* @__PURE__ */ new Set([ownVersion]);
53
+ const rejectedVersions = /* @__PURE__ */ new Set();
54
+ const myVersionMatch = ownVersion.match(re);
55
+ if (!myVersionMatch) return () => false;
56
+ const ownVersionParsed = {
57
+ major: +myVersionMatch[1],
58
+ minor: +myVersionMatch[2],
59
+ patch: +myVersionMatch[3],
60
+ prerelease: myVersionMatch[4]
61
+ };
62
+ if (ownVersionParsed.prerelease != null) return function isExactmatch(globalVersion) {
63
+ return globalVersion === ownVersion;
64
+ };
65
+ function _reject(v) {
66
+ rejectedVersions.add(v);
67
+ return false;
68
+ }
69
+ function _accept(v) {
70
+ acceptedVersions.add(v);
71
+ return true;
72
+ }
73
+ return function isCompatible(globalVersion) {
74
+ if (acceptedVersions.has(globalVersion)) return true;
75
+ if (rejectedVersions.has(globalVersion)) return false;
76
+ const globalVersionMatch = globalVersion.match(re);
77
+ if (!globalVersionMatch) return _reject(globalVersion);
78
+ const globalVersionParsed = {
79
+ major: +globalVersionMatch[1],
80
+ minor: +globalVersionMatch[2],
81
+ patch: +globalVersionMatch[3],
82
+ prerelease: globalVersionMatch[4]
83
+ };
84
+ if (globalVersionParsed.prerelease != null) return _reject(globalVersion);
85
+ if (ownVersionParsed.major !== globalVersionParsed.major) return _reject(globalVersion);
86
+ if (ownVersionParsed.major === 0) {
87
+ if (ownVersionParsed.minor === globalVersionParsed.minor && ownVersionParsed.patch <= globalVersionParsed.patch) return _accept(globalVersion);
88
+ return _reject(globalVersion);
89
+ }
90
+ if (ownVersionParsed.minor <= globalVersionParsed.minor) return _accept(globalVersion);
91
+ return _reject(globalVersion);
92
+ };
93
+ }
94
+ /**
95
+ * Test an API version to see if it is compatible with this API.
96
+ *
97
+ * - Exact match is always compatible
98
+ * - Major versions must match exactly
99
+ * - 1.x package cannot use global 2.x package
100
+ * - 2.x package cannot use global 1.x package
101
+ * - The minor version of the API module requesting access to the global API must be less than or equal to the minor version of this API
102
+ * - 1.3 package may use 1.4 global because the later global contains all functions 1.3 expects
103
+ * - 1.4 package may NOT use 1.3 global because it may try to call functions which don't exist on 1.3
104
+ * - If the major version is 0, the minor version is treated as the major and the patch is treated as the minor
105
+ * - Patch and build tag differences are not considered at this time
106
+ *
107
+ * @param version version of the API requesting an instance of the global API
108
+ */
109
+ var isCompatible = _makeCompatibilityCheck(VERSION);
110
+ // ../../node_modules/.bun/@opentelemetry+api@1.10.0/node_modules/@opentelemetry/api/dist/internal/global-utils.mjs
111
+ var major = VERSION.split(".")[0];
112
+ var GLOBAL_OPENTELEMETRY_API_KEY = Symbol.for(`opentelemetry.js.api.${major}`);
113
+ var _global = typeof globalThis === "object" ? globalThis : typeof self === "object" ? self : typeof window === "object" ? window : typeof global === "object" ? global : {};
114
+ function _makeGlobalApi() {
115
+ return Object.defineProperty({}, "version", {
116
+ value: VERSION,
117
+ enumerable: true,
118
+ writable: false,
119
+ configurable: false
120
+ });
121
+ }
122
+ function registerGlobal(type, instance, diag, allowOverride = false) {
123
+ var _global$GLOBAL_OPENTE;
124
+ const api = _global[GLOBAL_OPENTELEMETRY_API_KEY] = (_global$GLOBAL_OPENTE = _global[GLOBAL_OPENTELEMETRY_API_KEY]) !== null && _global$GLOBAL_OPENTE !== void 0 ? _global$GLOBAL_OPENTE : _makeGlobalApi();
125
+ if (!allowOverride && api[type]) {
126
+ const err = /* @__PURE__ */ new Error(`@opentelemetry/api: Attempted duplicate registration of API: ${type}`);
127
+ diag.error(err.stack || err.message);
128
+ return false;
129
+ }
130
+ if (api.version !== "1.10.0") {
131
+ const err = /* @__PURE__ */ new Error(`@opentelemetry/api: Registration of version v${api.version} for ${type} does not match previously registered API v${VERSION}`);
132
+ diag.error(err.stack || err.message);
133
+ return false;
134
+ }
135
+ api[type] = instance;
136
+ diag.debug(`@opentelemetry/api: Registered a global for ${type} v${VERSION}.`);
137
+ return true;
138
+ }
139
+ var _compatibleGlobalApi;
140
+ function getGlobal(type) {
141
+ const api = _global[GLOBAL_OPENTELEMETRY_API_KEY];
142
+ if (api == null) return;
143
+ if (api !== _compatibleGlobalApi) {
144
+ if (!api.version || !isCompatible(api.version)) return;
145
+ _compatibleGlobalApi = api;
146
+ }
147
+ return api[type];
148
+ }
149
+ function unregisterGlobal(type, diag) {
150
+ diag.debug(`@opentelemetry/api: Unregistering a global for ${type} v${VERSION}.`);
151
+ const api = _global[GLOBAL_OPENTELEMETRY_API_KEY];
152
+ if (api) delete api[type];
153
+ }
154
+ // ../../node_modules/.bun/@opentelemetry+api@1.10.0/node_modules/@opentelemetry/api/dist/diag/ComponentLogger.mjs
155
+ /**
156
+ * Component Logger which is meant to be used as part of any component which
157
+ * will add automatically additional namespace in front of the log message.
158
+ * It will then forward all message to global diag logger
159
+ * @example
160
+ * const cLogger = diag.createComponentLogger({ namespace: '@opentelemetry/instrumentation-http' });
161
+ * cLogger.debug('test');
162
+ * // @opentelemetry/instrumentation-http test
163
+ */
164
+ var DiagComponentLogger = class {
165
+ constructor(props) {
166
+ this._namespace = props.namespace || "DiagComponentLogger";
167
+ }
168
+ debug(...args) {
169
+ return logProxy("debug", this._namespace, args);
170
+ }
171
+ error(...args) {
172
+ return logProxy("error", this._namespace, args);
173
+ }
174
+ info(...args) {
175
+ return logProxy("info", this._namespace, args);
176
+ }
177
+ warn(...args) {
178
+ return logProxy("warn", this._namespace, args);
179
+ }
180
+ verbose(...args) {
181
+ return logProxy("verbose", this._namespace, args);
182
+ }
183
+ };
184
+ function logProxy(funcName, namespace, args) {
185
+ const logger = getGlobal("diag");
186
+ if (!logger) return;
187
+ return logger[funcName](namespace, ...args);
188
+ }
189
+ // ../../node_modules/.bun/@opentelemetry+api@1.10.0/node_modules/@opentelemetry/api/dist/diag/internal/logLevelLogger.mjs
190
+ function createLogLevelDiagLogger(maxLevel, logger) {
191
+ if (maxLevel < 0) maxLevel = 0;
192
+ else if (maxLevel > 9999) maxLevel = 9999;
193
+ logger = logger || {};
194
+ function _filterFunc(funcName, theLevel) {
195
+ const theFunc = logger[funcName];
196
+ if (typeof theFunc === "function" && maxLevel >= theLevel) return theFunc.bind(logger);
197
+ return function() {};
198
+ }
199
+ return {
200
+ error: _filterFunc("error", 30),
201
+ warn: _filterFunc("warn", 50),
202
+ info: _filterFunc("info", 60),
203
+ debug: _filterFunc("debug", 70),
204
+ verbose: _filterFunc("verbose", 80)
205
+ };
206
+ }
207
+ // ../../node_modules/.bun/@opentelemetry+api@1.10.0/node_modules/@opentelemetry/api/dist/api/diag.mjs
208
+ var API_NAME$5 = "diag";
209
+ /**
210
+ * Singleton object which represents the entry point to the OpenTelemetry internal
211
+ * diagnostic API
212
+ *
213
+ * @since 1.0.0
214
+ */
215
+ var DiagAPI = class DiagAPI {
216
+ /** Get the singleton instance of the DiagAPI API */
217
+ static instance() {
218
+ if (!this._instance) this._instance = new DiagAPI();
219
+ return this._instance;
220
+ }
221
+ /**
222
+ * Private internal constructor
223
+ * @private
224
+ */
225
+ constructor() {
226
+ function _logProxy(funcName) {
227
+ return function(...args) {
228
+ const logger = getGlobal("diag");
229
+ if (!logger) return;
230
+ return logger[funcName](...args);
231
+ };
232
+ }
233
+ const self = this;
234
+ const setLogger = (logger, optionsOrLogLevel = { logLevel: 60 }) => {
235
+ var _optionsOrLogLevel$lo;
236
+ if (logger === self) {
237
+ var _err$stack;
238
+ const err = /* @__PURE__ */ new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");
239
+ self.error((_err$stack = err.stack) !== null && _err$stack !== void 0 ? _err$stack : err.message);
240
+ return false;
241
+ }
242
+ if (typeof optionsOrLogLevel === "number") optionsOrLogLevel = { logLevel: optionsOrLogLevel };
243
+ const oldLogger = getGlobal("diag");
244
+ const newLogger = createLogLevelDiagLogger((_optionsOrLogLevel$lo = optionsOrLogLevel.logLevel) !== null && _optionsOrLogLevel$lo !== void 0 ? _optionsOrLogLevel$lo : 60, logger);
245
+ if (oldLogger && !optionsOrLogLevel.suppressOverrideMessage) {
246
+ var _Error$stack;
247
+ const stack = (_Error$stack = (/* @__PURE__ */ new Error()).stack) !== null && _Error$stack !== void 0 ? _Error$stack : "<failed to generate stacktrace>";
248
+ oldLogger.warn(`Current logger will be overwritten from ${stack}`);
249
+ newLogger.warn(`Current logger will overwrite one already registered from ${stack}`);
250
+ }
251
+ return registerGlobal("diag", newLogger, self, true);
252
+ };
253
+ self.setLogger = setLogger;
254
+ self.disable = () => {
255
+ unregisterGlobal(API_NAME$5, self);
256
+ };
257
+ self.createComponentLogger = (options) => {
258
+ return new DiagComponentLogger(options);
259
+ };
260
+ self.verbose = _logProxy("verbose");
261
+ self.debug = _logProxy("debug");
262
+ self.info = _logProxy("info");
263
+ self.warn = _logProxy("warn");
264
+ self.error = _logProxy("error");
265
+ }
266
+ };
267
+ // ../../node_modules/.bun/@opentelemetry+api@1.10.0/node_modules/@opentelemetry/api/dist/baggage/internal/baggage-impl.mjs
268
+ var BaggageImpl = class BaggageImpl {
269
+ constructor(entries) {
270
+ this._entries = entries ? new Map(entries) : /* @__PURE__ */ new Map();
271
+ }
272
+ getEntry(key) {
273
+ const entry = this._entries.get(key);
274
+ if (!entry) return;
275
+ return Object.assign({}, entry);
276
+ }
277
+ getAllEntries() {
278
+ return Array.from(this._entries.entries());
279
+ }
280
+ setEntry(key, entry) {
281
+ const newBaggage = new BaggageImpl(this._entries);
282
+ newBaggage._entries.set(key, entry);
283
+ return newBaggage;
284
+ }
285
+ removeEntry(key) {
286
+ const newBaggage = new BaggageImpl(this._entries);
287
+ newBaggage._entries.delete(key);
288
+ return newBaggage;
289
+ }
290
+ removeEntries(...keys) {
291
+ const newBaggage = new BaggageImpl(this._entries);
292
+ for (const key of keys) newBaggage._entries.delete(key);
293
+ return newBaggage;
294
+ }
295
+ clear() {
296
+ return new BaggageImpl();
297
+ }
298
+ };
299
+ // ../../node_modules/.bun/@opentelemetry+api@1.10.0/node_modules/@opentelemetry/api/dist/baggage/internal/symbol.mjs
300
+ /**
301
+ * Symbol used to make BaggageEntryMetadata an opaque type
302
+ */
303
+ var baggageEntryMetadataSymbol = Symbol("BaggageEntryMetadata");
304
+ // ../../node_modules/.bun/@opentelemetry+api@1.10.0/node_modules/@opentelemetry/api/dist/baggage/utils.mjs
305
+ var diag$1 = DiagAPI.instance();
306
+ /**
307
+ * Create a new Baggage with optional entries
308
+ *
309
+ * @param entries An array of baggage entries the new baggage should contain
310
+ */
311
+ function createBaggage(entries = {}) {
312
+ return new BaggageImpl(new Map(Object.entries(entries)));
313
+ }
314
+ /**
315
+ * Create a serializable BaggageEntryMetadata object from a string.
316
+ *
317
+ * @param str string metadata. Format is currently not defined by the spec and has no special meaning.
318
+ *
319
+ * @since 1.0.0
320
+ */
321
+ function baggageEntryMetadataFromString(str) {
322
+ if (typeof str !== "string") {
323
+ diag$1.error(`Cannot create baggage metadata from unknown type: ${typeof str}`);
324
+ str = "";
325
+ }
326
+ return {
327
+ __TYPE__: baggageEntryMetadataSymbol,
328
+ toString() {
329
+ return str;
330
+ }
331
+ };
332
+ }
333
+ // ../../node_modules/.bun/@opentelemetry+api@1.10.0/node_modules/@opentelemetry/api/dist/context/context.mjs
334
+ /**
335
+ * Get a key to uniquely identify a context value
336
+ *
337
+ * @since 1.0.0
338
+ */
339
+ function createContextKey(description) {
340
+ return Symbol.for(description);
341
+ }
342
+ /**
343
+ * The root context is used as the default parent context when there is no active context
344
+ *
345
+ * @since 1.0.0
346
+ */
347
+ var ROOT_CONTEXT = new class BaseContext {
348
+ /**
349
+ * Construct a new context which inherits values from an optional parent context.
350
+ *
351
+ * @param parentContext a context from which to inherit values
352
+ */
353
+ constructor(parentContext) {
354
+ const self = this;
355
+ self._currentContext = parentContext ? new Map(parentContext) : /* @__PURE__ */ new Map();
356
+ self.getValue = (key) => self._currentContext.get(key);
357
+ self.setValue = (key, value) => {
358
+ const context = new BaseContext(self._currentContext);
359
+ context._currentContext.set(key, value);
360
+ return context;
361
+ };
362
+ self.deleteValue = (key) => {
363
+ const context = new BaseContext(self._currentContext);
364
+ context._currentContext.delete(key);
365
+ return context;
366
+ };
367
+ }
368
+ }();
369
+ // ../../node_modules/.bun/@opentelemetry+api@1.10.0/node_modules/@opentelemetry/api/dist/diag/consoleLogger.mjs
370
+ var consoleMap = [
371
+ {
372
+ n: "error",
373
+ c: "error"
374
+ },
375
+ {
376
+ n: "warn",
377
+ c: "warn"
378
+ },
379
+ {
380
+ n: "info",
381
+ c: "info"
382
+ },
383
+ {
384
+ n: "debug",
385
+ c: "debug"
386
+ },
387
+ {
388
+ n: "verbose",
389
+ c: "trace"
390
+ }
391
+ ];
392
+ var _originalConsoleMethods = {};
393
+ if (typeof console !== "undefined") {
394
+ for (const key of [
395
+ "error",
396
+ "warn",
397
+ "info",
398
+ "debug",
399
+ "trace",
400
+ "log"
401
+ ]) if (typeof console[key] === "function") _originalConsoleMethods[key] = console[key];
402
+ }
403
+ /**
404
+ * A simple Immutable Console based diagnostic logger which will output any messages to the Console.
405
+ * If you want to limit the amount of logging to a specific level or lower use the
406
+ * {@link createLogLevelDiagLogger}
407
+ *
408
+ * @since 1.0.0
409
+ */
410
+ var DiagConsoleLogger = class {
411
+ constructor() {
412
+ function _consoleFunc(funcName) {
413
+ return function(...args) {
414
+ let theFunc = _originalConsoleMethods[funcName];
415
+ if (typeof theFunc !== "function") theFunc = _originalConsoleMethods["log"];
416
+ if (typeof theFunc !== "function" && console) {
417
+ theFunc = console[funcName];
418
+ if (typeof theFunc !== "function") theFunc = console.log;
419
+ }
420
+ if (typeof theFunc === "function") return theFunc.apply(console, args);
421
+ };
422
+ }
423
+ for (let i = 0; i < consoleMap.length; i++) this[consoleMap[i].n] = _consoleFunc(consoleMap[i].c);
424
+ }
425
+ };
426
+ // ../../node_modules/.bun/@opentelemetry+api@1.10.0/node_modules/@opentelemetry/api/dist/metrics/NoopMeter.mjs
427
+ /**
428
+ * NoopMeter is a noop implementation of the {@link Meter} interface. It reuses
429
+ * constant NoopMetrics for all of its methods.
430
+ */
431
+ var NoopMeter = class {
432
+ constructor() {}
433
+ /**
434
+ * @see {@link Meter.createGauge}
435
+ */
436
+ createGauge(_name, _options) {
437
+ return NOOP_GAUGE_METRIC;
438
+ }
439
+ /**
440
+ * @see {@link Meter.createHistogram}
441
+ */
442
+ createHistogram(_name, _options) {
443
+ return NOOP_HISTOGRAM_METRIC;
444
+ }
445
+ /**
446
+ * @see {@link Meter.createCounter}
447
+ */
448
+ createCounter(_name, _options) {
449
+ return NOOP_COUNTER_METRIC;
450
+ }
451
+ /**
452
+ * @see {@link Meter.createUpDownCounter}
453
+ */
454
+ createUpDownCounter(_name, _options) {
455
+ return NOOP_UP_DOWN_COUNTER_METRIC;
456
+ }
457
+ /**
458
+ * @see {@link Meter.createObservableGauge}
459
+ */
460
+ createObservableGauge(_name, _options) {
461
+ return NOOP_OBSERVABLE_GAUGE_METRIC;
462
+ }
463
+ /**
464
+ * @see {@link Meter.createObservableCounter}
465
+ */
466
+ createObservableCounter(_name, _options) {
467
+ return NOOP_OBSERVABLE_COUNTER_METRIC;
468
+ }
469
+ /**
470
+ * @see {@link Meter.createObservableUpDownCounter}
471
+ */
472
+ createObservableUpDownCounter(_name, _options) {
473
+ return NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC;
474
+ }
475
+ /**
476
+ * @see {@link Meter.addBatchObservableCallback}
477
+ */
478
+ addBatchObservableCallback(_callback, _observables) {}
479
+ /**
480
+ * @see {@link Meter.removeBatchObservableCallback}
481
+ */
482
+ removeBatchObservableCallback(_callback) {}
483
+ };
484
+ var NoopMetric = class {};
485
+ var NoopCounterMetric = class extends NoopMetric {
486
+ add(_value, _attributes) {}
487
+ };
488
+ var NoopUpDownCounterMetric = class extends NoopMetric {
489
+ add(_value, _attributes) {}
490
+ };
491
+ var NoopGaugeMetric = class extends NoopMetric {
492
+ record(_value, _attributes) {}
493
+ };
494
+ var NoopHistogramMetric = class extends NoopMetric {
495
+ record(_value, _attributes) {}
496
+ };
497
+ var NoopObservableMetric = class {
498
+ addCallback(_callback) {}
499
+ removeCallback(_callback) {}
500
+ };
501
+ var NoopObservableCounterMetric = class extends NoopObservableMetric {};
502
+ var NoopObservableGaugeMetric = class extends NoopObservableMetric {};
503
+ var NoopObservableUpDownCounterMetric = class extends NoopObservableMetric {};
504
+ var NOOP_METER = new NoopMeter();
505
+ var NOOP_COUNTER_METRIC = new NoopCounterMetric();
506
+ var NOOP_GAUGE_METRIC = new NoopGaugeMetric();
507
+ var NOOP_HISTOGRAM_METRIC = new NoopHistogramMetric();
508
+ var NOOP_UP_DOWN_COUNTER_METRIC = new NoopUpDownCounterMetric();
509
+ var NOOP_OBSERVABLE_COUNTER_METRIC = new NoopObservableCounterMetric();
510
+ var NOOP_OBSERVABLE_GAUGE_METRIC = new NoopObservableGaugeMetric();
511
+ var NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC = new NoopObservableUpDownCounterMetric();
512
+ /**
513
+ * Create a no-op Meter
514
+ *
515
+ * @since 1.3.0
516
+ */
517
+ function createNoopMeter() {
518
+ return NOOP_METER;
519
+ }
520
+ // ../../node_modules/.bun/@opentelemetry+api@1.10.0/node_modules/@opentelemetry/api/dist/metrics/Metric.mjs
521
+ /**
522
+ * The Type of value. It describes how the data is reported.
523
+ *
524
+ * @since 1.3.0
525
+ */
526
+ var ValueType = /* @__PURE__ */ function(ValueType) {
527
+ ValueType[ValueType["INT"] = 0] = "INT";
528
+ ValueType[ValueType["DOUBLE"] = 1] = "DOUBLE";
529
+ return ValueType;
530
+ }({});
531
+ // ../../node_modules/.bun/@opentelemetry+api@1.10.0/node_modules/@opentelemetry/api/dist/logs/NoopLogger.mjs
532
+ var NoopLogger = class {
533
+ emit(_logRecord) {}
534
+ enabled() {
535
+ return false;
536
+ }
537
+ };
538
+ var NOOP_LOGGER = new NoopLogger();
539
+ /**
540
+ * Create a no-op Logger
541
+ */
542
+ function createNoopLogger() {
543
+ return NOOP_LOGGER;
544
+ }
545
+ // ../../node_modules/.bun/@opentelemetry+api@1.10.0/node_modules/@opentelemetry/api/dist/logs/LogRecord.mjs
546
+ var SeverityNumber = /* @__PURE__ */ function(SeverityNumber) {
547
+ SeverityNumber[SeverityNumber["UNSPECIFIED"] = 0] = "UNSPECIFIED";
548
+ SeverityNumber[SeverityNumber["TRACE"] = 1] = "TRACE";
549
+ SeverityNumber[SeverityNumber["TRACE2"] = 2] = "TRACE2";
550
+ SeverityNumber[SeverityNumber["TRACE3"] = 3] = "TRACE3";
551
+ SeverityNumber[SeverityNumber["TRACE4"] = 4] = "TRACE4";
552
+ SeverityNumber[SeverityNumber["DEBUG"] = 5] = "DEBUG";
553
+ SeverityNumber[SeverityNumber["DEBUG2"] = 6] = "DEBUG2";
554
+ SeverityNumber[SeverityNumber["DEBUG3"] = 7] = "DEBUG3";
555
+ SeverityNumber[SeverityNumber["DEBUG4"] = 8] = "DEBUG4";
556
+ SeverityNumber[SeverityNumber["INFO"] = 9] = "INFO";
557
+ SeverityNumber[SeverityNumber["INFO2"] = 10] = "INFO2";
558
+ SeverityNumber[SeverityNumber["INFO3"] = 11] = "INFO3";
559
+ SeverityNumber[SeverityNumber["INFO4"] = 12] = "INFO4";
560
+ SeverityNumber[SeverityNumber["WARN"] = 13] = "WARN";
561
+ SeverityNumber[SeverityNumber["WARN2"] = 14] = "WARN2";
562
+ SeverityNumber[SeverityNumber["WARN3"] = 15] = "WARN3";
563
+ SeverityNumber[SeverityNumber["WARN4"] = 16] = "WARN4";
564
+ SeverityNumber[SeverityNumber["ERROR"] = 17] = "ERROR";
565
+ SeverityNumber[SeverityNumber["ERROR2"] = 18] = "ERROR2";
566
+ SeverityNumber[SeverityNumber["ERROR3"] = 19] = "ERROR3";
567
+ SeverityNumber[SeverityNumber["ERROR4"] = 20] = "ERROR4";
568
+ SeverityNumber[SeverityNumber["FATAL"] = 21] = "FATAL";
569
+ SeverityNumber[SeverityNumber["FATAL2"] = 22] = "FATAL2";
570
+ SeverityNumber[SeverityNumber["FATAL3"] = 23] = "FATAL3";
571
+ SeverityNumber[SeverityNumber["FATAL4"] = 24] = "FATAL4";
572
+ return SeverityNumber;
573
+ }({});
574
+ // ../../node_modules/.bun/@opentelemetry+api@1.10.0/node_modules/@opentelemetry/api/dist/propagation/TextMapPropagator.mjs
575
+ /**
576
+ * @since 1.0.0
577
+ */
578
+ var defaultTextMapGetter = {
579
+ get(carrier, key) {
580
+ if (carrier == null) return;
581
+ return carrier[key];
582
+ },
583
+ keys(carrier) {
584
+ if (carrier == null) return [];
585
+ return Object.keys(carrier);
586
+ }
587
+ };
588
+ /**
589
+ * @since 1.0.0
590
+ */
591
+ var defaultTextMapSetter = { set(carrier, key, value) {
592
+ if (carrier == null) return;
593
+ carrier[key] = value;
594
+ } };
595
+ // ../../node_modules/.bun/@opentelemetry+api@1.10.0/node_modules/@opentelemetry/api/dist/trace/trace_flags.mjs
596
+ /**
597
+ * @since 1.0.0
598
+ */
599
+ var TraceFlags = /* @__PURE__ */ function(TraceFlags) {
600
+ /** Represents no flag set. */
601
+ TraceFlags[TraceFlags["NONE"] = 0] = "NONE";
602
+ /** Bit to represent whether trace is sampled in trace flags. */
603
+ TraceFlags[TraceFlags["SAMPLED"] = 1] = "SAMPLED";
604
+ return TraceFlags;
605
+ }({});
606
+ // ../../node_modules/.bun/@opentelemetry+api@1.10.0/node_modules/@opentelemetry/api/dist/trace/invalid-span-constants.mjs
607
+ /**
608
+ * @since 1.0.0
609
+ */
610
+ var INVALID_SPANID = "0000000000000000";
611
+ /**
612
+ * @since 1.0.0
613
+ */
614
+ var INVALID_TRACEID = "00000000000000000000000000000000";
615
+ /**
616
+ * @since 1.0.0
617
+ */
618
+ var INVALID_SPAN_CONTEXT = {
619
+ traceId: INVALID_TRACEID,
620
+ spanId: INVALID_SPANID,
621
+ traceFlags: 0
622
+ };
623
+ // ../../node_modules/.bun/@opentelemetry+api@1.10.0/node_modules/@opentelemetry/api/dist/trace/NonRecordingSpan.mjs
624
+ /**
625
+ * The NonRecordingSpan is the default {@link Span} that is used when no Span
626
+ * implementation is available. All operations are no-op including context
627
+ * propagation.
628
+ */
629
+ var NonRecordingSpan = class {
630
+ constructor(spanContext = INVALID_SPAN_CONTEXT) {
631
+ this._spanContext = spanContext;
632
+ }
633
+ spanContext() {
634
+ return this._spanContext;
635
+ }
636
+ setAttribute(_key, _value) {
637
+ return this;
638
+ }
639
+ setAttributes(_attributes) {
640
+ return this;
641
+ }
642
+ addEvent(_name, _attributes) {
643
+ return this;
644
+ }
645
+ addLink(_link) {
646
+ return this;
647
+ }
648
+ addLinks(_links) {
649
+ return this;
650
+ }
651
+ setStatus(_status) {
652
+ return this;
653
+ }
654
+ updateName(_name) {
655
+ return this;
656
+ }
657
+ end(_endTime) {}
658
+ isRecording() {
659
+ return false;
660
+ }
661
+ recordException(_exception, _time) {}
662
+ };
663
+ // ../../node_modules/.bun/@opentelemetry+api@1.10.0/node_modules/@opentelemetry/api/dist/trace/spancontext-utils.mjs
664
+ var isHex = new Uint8Array([
665
+ 0,
666
+ 0,
667
+ 0,
668
+ 0,
669
+ 0,
670
+ 0,
671
+ 0,
672
+ 0,
673
+ 0,
674
+ 0,
675
+ 0,
676
+ 0,
677
+ 0,
678
+ 0,
679
+ 0,
680
+ 0,
681
+ 0,
682
+ 0,
683
+ 0,
684
+ 0,
685
+ 0,
686
+ 0,
687
+ 0,
688
+ 0,
689
+ 0,
690
+ 0,
691
+ 0,
692
+ 0,
693
+ 0,
694
+ 0,
695
+ 0,
696
+ 0,
697
+ 0,
698
+ 0,
699
+ 0,
700
+ 0,
701
+ 0,
702
+ 0,
703
+ 0,
704
+ 0,
705
+ 0,
706
+ 0,
707
+ 0,
708
+ 0,
709
+ 0,
710
+ 0,
711
+ 0,
712
+ 0,
713
+ 1,
714
+ 1,
715
+ 1,
716
+ 1,
717
+ 1,
718
+ 1,
719
+ 1,
720
+ 1,
721
+ 1,
722
+ 1,
723
+ 0,
724
+ 0,
725
+ 0,
726
+ 0,
727
+ 0,
728
+ 0,
729
+ 0,
730
+ 1,
731
+ 1,
732
+ 1,
733
+ 1,
734
+ 1,
735
+ 1,
736
+ 0,
737
+ 0,
738
+ 0,
739
+ 0,
740
+ 0,
741
+ 0,
742
+ 0,
743
+ 0,
744
+ 0,
745
+ 0,
746
+ 0,
747
+ 0,
748
+ 0,
749
+ 0,
750
+ 0,
751
+ 0,
752
+ 0,
753
+ 0,
754
+ 0,
755
+ 0,
756
+ 0,
757
+ 0,
758
+ 0,
759
+ 0,
760
+ 0,
761
+ 0,
762
+ 1,
763
+ 1,
764
+ 1,
765
+ 1,
766
+ 1,
767
+ 1
768
+ ]);
769
+ function isValidHex(id, length) {
770
+ if (typeof id !== "string" || id.length !== length) return false;
771
+ let r = 0;
772
+ for (let i = 0; i < id.length; i += 4) r += (isHex[id.charCodeAt(i)] | 0) + (isHex[id.charCodeAt(i + 1)] | 0) + (isHex[id.charCodeAt(i + 2)] | 0) + (isHex[id.charCodeAt(i + 3)] | 0);
773
+ return r === length;
774
+ }
775
+ /**
776
+ * @since 1.0.0
777
+ */
778
+ function isValidTraceId(traceId) {
779
+ return isValidHex(traceId, 32) && traceId !== "00000000000000000000000000000000";
780
+ }
781
+ /**
782
+ * @since 1.0.0
783
+ */
784
+ function isValidSpanId(spanId) {
785
+ return isValidHex(spanId, 16) && spanId !== "0000000000000000";
786
+ }
787
+ /**
788
+ * Returns true if this {@link SpanContext} is valid.
789
+ * @return true if this {@link SpanContext} is valid.
790
+ *
791
+ * @since 1.0.0
792
+ */
793
+ function isSpanContextValid(spanContext) {
794
+ return isValidTraceId(spanContext.traceId) && isValidSpanId(spanContext.spanId);
795
+ }
796
+ /**
797
+ * Wrap the given {@link SpanContext} in a new non-recording {@link Span}
798
+ *
799
+ * @param spanContext span context to be wrapped
800
+ * @returns a new non-recording {@link Span} with the provided context
801
+ */
802
+ function wrapSpanContext(spanContext) {
803
+ return new NonRecordingSpan(spanContext);
804
+ }
805
+ // ../../node_modules/.bun/@opentelemetry+api@1.10.0/node_modules/@opentelemetry/api/dist/context/NoopContextManager.mjs
806
+ var NoopContextManager = class {
807
+ active() {
808
+ return ROOT_CONTEXT;
809
+ }
810
+ with(_context, fn, thisArg, ...args) {
811
+ return fn.call(thisArg, ...args);
812
+ }
813
+ bind(_context, target) {
814
+ return target;
815
+ }
816
+ enable() {
817
+ return this;
818
+ }
819
+ disable() {
820
+ return this;
821
+ }
822
+ /** @experimental This API is experimental and may change in minor releases without prior notice. */
823
+ attach(_context) {
824
+ return { dispose() {} };
825
+ }
826
+ };
827
+ // ../../node_modules/.bun/@opentelemetry+api@1.10.0/node_modules/@opentelemetry/api/dist/api/context.mjs
828
+ var API_NAME$4 = "context";
829
+ var NOOP_CONTEXT_MANAGER = new NoopContextManager();
830
+ var NOOP_TOKEN = Object.freeze({ dispose: () => {} });
831
+ /**
832
+ * Singleton object which represents the entry point to the OpenTelemetry Context API
833
+ *
834
+ * @since 1.0.0
835
+ */
836
+ var ContextAPI = class ContextAPI {
837
+ /** Empty private constructor prevents end users from constructing a new instance of the API */
838
+ constructor() {
839
+ this._attachUnsupportedWarned = false;
840
+ }
841
+ /** Get the singleton instance of the Context API */
842
+ static getInstance() {
843
+ if (!this._instance) this._instance = new ContextAPI();
844
+ return this._instance;
845
+ }
846
+ /**
847
+ * Set the current context manager.
848
+ *
849
+ * @returns true if the context manager was successfully registered, else false
850
+ */
851
+ setGlobalContextManager(contextManager) {
852
+ return registerGlobal(API_NAME$4, contextManager, DiagAPI.instance());
853
+ }
854
+ /**
855
+ * Get the currently active context
856
+ */
857
+ active() {
858
+ return this._getContextManager().active();
859
+ }
860
+ /**
861
+ * Execute a function with an active context
862
+ *
863
+ * @param context context to be active during function execution
864
+ * @param fn function to execute in a context
865
+ * @param thisArg optional receiver to be used for calling fn
866
+ * @param args optional arguments forwarded to fn
867
+ */
868
+ with(context, fn, thisArg, ...args) {
869
+ return this._getContextManager().with(context, fn, thisArg, ...args);
870
+ }
871
+ /**
872
+ * Bind a context to a target function or event emitter
873
+ *
874
+ * @param context context to bind to the event emitter or function. Defaults to the currently active context
875
+ * @param target function or event emitter to bind
876
+ */
877
+ bind(context, target) {
878
+ return this._getContextManager().bind(context, target);
879
+ }
880
+ /**
881
+ * Imperatively sets `context` as active, returning a {@link ContextManagementToken} whose
882
+ * {@link ContextManagementToken.dispose} restores the previous context.
883
+ *
884
+ * This is a delicate, low-level API - prefer {@link with}/{@link bind}, which
885
+ * restore context automatically. Use `attach` only to bridge callback
886
+ * boundaries that `with` cannot wrap. Call `token.dispose()` when the
887
+ * operation is done.
888
+ *
889
+ * **Caveat for async functions:** If called inside an async function before
890
+ * the first `await`, the context change may leak into the caller's context
891
+ * and remain active there. Prefer {@link with} for async code.
892
+ *
893
+ * Support is best-effort and varies by the active ContextManager (see
894
+ * {@link ContextManager.attach}); if it does not implement `attach`, this logs
895
+ * a warning and returns a no-op token.
896
+ *
897
+ * @param context The Context to attach
898
+ * @returns A {@link ContextManagementToken} whose dispose() restores the previous Context
899
+ * @since 1.10.0
900
+ * @experimental This API is experimental and may change in minor releases without prior notice.
901
+ */
902
+ attach(context) {
903
+ const contextManager = this._getContextManager();
904
+ if (contextManager.attach) return contextManager.attach(context);
905
+ if (!this._attachUnsupportedWarned) {
906
+ this._attachUnsupportedWarned = true;
907
+ DiagAPI.instance().warn("The current ContextManager does not implement attach(). The context will not be attached. Use a ContextManager that supports attach() (e.g. AsyncLocalStorageContextManager) or use with()/bind() instead.");
908
+ }
909
+ return NOOP_TOKEN;
910
+ }
911
+ _getContextManager() {
912
+ return getGlobal(API_NAME$4) || NOOP_CONTEXT_MANAGER;
913
+ }
914
+ /** Disable and remove the global context manager */
915
+ disable() {
916
+ this._getContextManager().disable();
917
+ unregisterGlobal(API_NAME$4, DiagAPI.instance());
918
+ }
919
+ };
920
+ // ../../node_modules/.bun/@opentelemetry+api@1.10.0/node_modules/@opentelemetry/api/dist/trace/context-utils.mjs
921
+ /**
922
+ * span key
923
+ */
924
+ var SPAN_KEY = createContextKey("OpenTelemetry Context Key SPAN");
925
+ /**
926
+ * Return the span if one exists
927
+ *
928
+ * @param context context to get span from
929
+ */
930
+ function getSpan(context) {
931
+ return context.getValue(SPAN_KEY) || void 0;
932
+ }
933
+ /**
934
+ * Gets the span from the current context, if one exists.
935
+ */
936
+ function getActiveSpan() {
937
+ return getSpan(ContextAPI.getInstance().active());
938
+ }
939
+ /**
940
+ * Set the span on a context
941
+ *
942
+ * @param context context to use as parent
943
+ * @param span span to set active
944
+ */
945
+ function setSpan(context, span) {
946
+ return context.setValue(SPAN_KEY, span);
947
+ }
948
+ /**
949
+ * Remove current span stored in the context
950
+ *
951
+ * @param context context to delete span from
952
+ */
953
+ function deleteSpan(context) {
954
+ return context.deleteValue(SPAN_KEY);
955
+ }
956
+ /**
957
+ * Wrap span context in a NoopSpan and set as span in a new
958
+ * context
959
+ *
960
+ * @param context context to set active span on
961
+ * @param spanContext span context to be wrapped
962
+ */
963
+ function setSpanContext(context, spanContext) {
964
+ return setSpan(context, new NonRecordingSpan(spanContext));
965
+ }
966
+ /**
967
+ * Get the span context of the span if it exists.
968
+ *
969
+ * @param context context to get values from
970
+ */
971
+ function getSpanContext(context) {
972
+ var _getSpan;
973
+ return (_getSpan = getSpan(context)) === null || _getSpan === void 0 ? void 0 : _getSpan.spanContext();
974
+ }
975
+ // ../../node_modules/.bun/@opentelemetry+api@1.10.0/node_modules/@opentelemetry/api/dist/trace/NoopTracer.mjs
976
+ var contextApi = ContextAPI.getInstance();
977
+ /**
978
+ * No-op implementations of {@link Tracer}.
979
+ */
980
+ var NoopTracer = class {
981
+ startSpan(name, options, context = contextApi.active()) {
982
+ if (Boolean(options === null || options === void 0 ? void 0 : options.root)) return new NonRecordingSpan();
983
+ const parentFromContext = context && getSpanContext(context);
984
+ if (isSpanContext(parentFromContext) && isSpanContextValid(parentFromContext)) return new NonRecordingSpan(parentFromContext);
985
+ else return new NonRecordingSpan();
986
+ }
987
+ startActiveSpan(name, arg2, arg3, arg4) {
988
+ var _ctx;
989
+ let opts;
990
+ let ctx;
991
+ let fn;
992
+ if (arguments.length < 2) return;
993
+ else if (arguments.length === 2) fn = arg2;
994
+ else if (arguments.length === 3) {
995
+ opts = arg2;
996
+ fn = arg3;
997
+ } else {
998
+ opts = arg2;
999
+ ctx = arg3;
1000
+ fn = arg4;
1001
+ }
1002
+ const parentContext = (_ctx = ctx) !== null && _ctx !== void 0 ? _ctx : contextApi.active();
1003
+ const span = this.startSpan(name, opts, parentContext);
1004
+ const contextWithSpanSet = setSpan(parentContext, span);
1005
+ return contextApi.with(contextWithSpanSet, fn, void 0, span);
1006
+ }
1007
+ };
1008
+ function isSpanContext(spanContext) {
1009
+ return spanContext !== null && typeof spanContext === "object" && "spanId" in spanContext && typeof spanContext["spanId"] === "string" && "traceId" in spanContext && typeof spanContext["traceId"] === "string" && "traceFlags" in spanContext && typeof spanContext["traceFlags"] === "number";
1010
+ }
1011
+ // ../../node_modules/.bun/@opentelemetry+api@1.10.0/node_modules/@opentelemetry/api/dist/trace/ProxyTracer.mjs
1012
+ var NOOP_TRACER = new NoopTracer();
1013
+ /**
1014
+ * Proxy tracer provided by the proxy tracer provider
1015
+ *
1016
+ * @since 1.0.0
1017
+ */
1018
+ var ProxyTracer = class {
1019
+ constructor(provider, name, version, options) {
1020
+ this._provider = provider;
1021
+ this.name = name;
1022
+ this.version = version;
1023
+ this.options = options;
1024
+ }
1025
+ startSpan(name, options, context) {
1026
+ return this._getTracer().startSpan(name, options, context);
1027
+ }
1028
+ startActiveSpan(_name, _options, _context, _fn) {
1029
+ const tracer = this._getTracer();
1030
+ return Reflect.apply(tracer.startActiveSpan, tracer, arguments);
1031
+ }
1032
+ /**
1033
+ * Try to get a tracer from the proxy tracer provider.
1034
+ * If the proxy tracer provider has no delegate, return a noop tracer.
1035
+ */
1036
+ _getTracer() {
1037
+ if (this._delegate) return this._delegate;
1038
+ const tracer = this._provider.getDelegateTracer(this.name, this.version, this.options);
1039
+ if (!tracer) return NOOP_TRACER;
1040
+ this._delegate = tracer;
1041
+ return this._delegate;
1042
+ }
1043
+ };
1044
+ // ../../node_modules/.bun/@opentelemetry+api@1.10.0/node_modules/@opentelemetry/api/dist/trace/span_kind.mjs
1045
+ /**
1046
+ * @since 1.0.0
1047
+ */
1048
+ var SpanKind = /* @__PURE__ */ function(SpanKind) {
1049
+ /** Default value. Indicates that the span is used internally. */
1050
+ SpanKind[SpanKind["INTERNAL"] = 0] = "INTERNAL";
1051
+ /**
1052
+ * Indicates that the span covers server-side handling of an RPC or other
1053
+ * remote request.
1054
+ */
1055
+ SpanKind[SpanKind["SERVER"] = 1] = "SERVER";
1056
+ /**
1057
+ * Indicates that the span covers the client-side wrapper around an RPC or
1058
+ * other remote request.
1059
+ */
1060
+ SpanKind[SpanKind["CLIENT"] = 2] = "CLIENT";
1061
+ /**
1062
+ * Indicates that the span describes producer sending a message to a
1063
+ * broker. Unlike client and server, there is no direct critical path latency
1064
+ * relationship between producer and consumer spans.
1065
+ */
1066
+ SpanKind[SpanKind["PRODUCER"] = 3] = "PRODUCER";
1067
+ /**
1068
+ * Indicates that the span describes consumer receiving a message from a
1069
+ * broker. Unlike client and server, there is no direct critical path latency
1070
+ * relationship between producer and consumer spans.
1071
+ */
1072
+ SpanKind[SpanKind["CONSUMER"] = 4] = "CONSUMER";
1073
+ return SpanKind;
1074
+ }({});
1075
+ // ../../node_modules/.bun/@opentelemetry+api@1.10.0/node_modules/@opentelemetry/api/dist/trace/status.mjs
1076
+ /**
1077
+ * An enumeration of status codes.
1078
+ *
1079
+ * @since 1.0.0
1080
+ */
1081
+ var SpanStatusCode = /* @__PURE__ */ function(SpanStatusCode) {
1082
+ /**
1083
+ * The default status.
1084
+ */
1085
+ SpanStatusCode[SpanStatusCode["UNSET"] = 0] = "UNSET";
1086
+ /**
1087
+ * The operation has been validated by an Application developer or
1088
+ * Operator to have completed successfully.
1089
+ */
1090
+ SpanStatusCode[SpanStatusCode["OK"] = 1] = "OK";
1091
+ /**
1092
+ * The operation contains an error.
1093
+ */
1094
+ SpanStatusCode[SpanStatusCode["ERROR"] = 2] = "ERROR";
1095
+ return SpanStatusCode;
1096
+ }({});
1097
+ // ../../node_modules/.bun/@opentelemetry+api@1.10.0/node_modules/@opentelemetry/api/dist/trace/internal/tracestate-validators.mjs
1098
+ var VALID_KEY_CHAR_RANGE = "[_0-9a-z-*/]";
1099
+ var VALID_KEY_REGEX = new RegExp(`^(?:${`[a-z]${VALID_KEY_CHAR_RANGE}{0,255}`}|${`[a-z0-9]${VALID_KEY_CHAR_RANGE}{0,240}@[a-z]${VALID_KEY_CHAR_RANGE}{0,13}`})$`);
1100
+ var VALID_VALUE_BASE_REGEX = /^[ -~]{0,255}[!-~]$/;
1101
+ var INVALID_VALUE_COMMA_EQUAL_REGEX = /,|=/;
1102
+ /**
1103
+ * Key is opaque string up to 256 characters printable. It MUST begin with a
1104
+ * lowercase letter, and can only contain lowercase letters a-z, digits 0-9,
1105
+ * underscores _, dashes -, asterisks *, and forward slashes /.
1106
+ * For multi-tenant vendor scenarios, an at sign (@) can be used to prefix the
1107
+ * vendor name. Vendors SHOULD set the tenant ID at the beginning of the key.
1108
+ * see https://www.w3.org/TR/trace-context/#key
1109
+ */
1110
+ function validateKey(key) {
1111
+ return VALID_KEY_REGEX.test(key);
1112
+ }
1113
+ /**
1114
+ * Value is opaque string up to 256 characters printable ASCII RFC0020
1115
+ * characters (i.e., the range 0x20 to 0x7E) except comma , and =.
1116
+ */
1117
+ function validateValue(value) {
1118
+ return VALID_VALUE_BASE_REGEX.test(value) && !INVALID_VALUE_COMMA_EQUAL_REGEX.test(value);
1119
+ }
1120
+ // ../../node_modules/.bun/@opentelemetry+api@1.10.0/node_modules/@opentelemetry/api/dist/trace/internal/tracestate-impl.mjs
1121
+ var MAX_TRACE_STATE_ITEMS = 32;
1122
+ var MAX_TRACE_STATE_LEN = 512;
1123
+ var LIST_MEMBERS_SEPARATOR = ",";
1124
+ var LIST_MEMBER_KEY_VALUE_SPLITTER = "=";
1125
+ /**
1126
+ * TraceState must be a class and not a simple object type because of the spec
1127
+ * requirement (https://www.w3.org/TR/trace-context/#tracestate-field).
1128
+ *
1129
+ * Here is the list of allowed mutations:
1130
+ * - New key-value pair should be added into the beginning of the list
1131
+ * - The value of any key can be updated. Modified keys MUST be moved to the
1132
+ * beginning of the list.
1133
+ *
1134
+ * @deprecated Use TraceState from "@opentelemetry/core". This will be removed in the next major version.
1135
+ */
1136
+ var TraceStateImpl = class TraceStateImpl {
1137
+ constructor(rawTraceState) {
1138
+ this._internalState = /* @__PURE__ */ new Map();
1139
+ if (rawTraceState) this._parse(rawTraceState);
1140
+ }
1141
+ set(key, value) {
1142
+ const currValue = this._internalState.get(key);
1143
+ let newLength = this.serialize().length;
1144
+ if (typeof currValue === "string") newLength += value.length - currValue.length;
1145
+ else {
1146
+ if (this._internalState.size >= MAX_TRACE_STATE_ITEMS) return this;
1147
+ newLength += key.length + value.length + (this._internalState.size > 0 ? 2 : 1);
1148
+ }
1149
+ if (newLength > MAX_TRACE_STATE_LEN) return this;
1150
+ const traceState = this._clone();
1151
+ if (traceState._internalState.has(key)) traceState._internalState.delete(key);
1152
+ traceState._internalState.set(key, value);
1153
+ return traceState;
1154
+ }
1155
+ unset(key) {
1156
+ const traceState = this._clone();
1157
+ traceState._internalState.delete(key);
1158
+ return traceState;
1159
+ }
1160
+ get(key) {
1161
+ return this._internalState.get(key);
1162
+ }
1163
+ serialize() {
1164
+ return Array.from(this._internalState.keys()).reduceRight((agg, key) => {
1165
+ agg.push(key + LIST_MEMBER_KEY_VALUE_SPLITTER + this.get(key));
1166
+ return agg;
1167
+ }, []).join(LIST_MEMBERS_SEPARATOR);
1168
+ }
1169
+ _parse(rawTraceState) {
1170
+ if (rawTraceState.length > MAX_TRACE_STATE_LEN) return;
1171
+ this._internalState = rawTraceState.split(LIST_MEMBERS_SEPARATOR).reduceRight((agg, part) => {
1172
+ const listMember = part.trim();
1173
+ const i = listMember.indexOf(LIST_MEMBER_KEY_VALUE_SPLITTER);
1174
+ if (i !== -1) {
1175
+ const key = listMember.slice(0, i);
1176
+ const value = listMember.slice(i + 1, part.length);
1177
+ if (validateKey(key) && validateValue(value)) agg.set(key, value);
1178
+ }
1179
+ return agg;
1180
+ }, /* @__PURE__ */ new Map());
1181
+ if (this._internalState.size > MAX_TRACE_STATE_ITEMS) this._internalState = new Map(Array.from(this._internalState.entries()).reverse().slice(0, MAX_TRACE_STATE_ITEMS));
1182
+ }
1183
+ _keys() {
1184
+ return Array.from(this._internalState.keys()).reverse();
1185
+ }
1186
+ _clone() {
1187
+ const traceState = new TraceStateImpl();
1188
+ traceState._internalState = new Map(this._internalState);
1189
+ return traceState;
1190
+ }
1191
+ };
1192
+ // ../../node_modules/.bun/@opentelemetry+api@1.10.0/node_modules/@opentelemetry/api/dist/trace/internal/utils.mjs
1193
+ /**
1194
+ * @deprecated Use TraceState from "@opentelemetry/core". This will be removed in the next major version.
1195
+ * @since 1.1.0
1196
+ */
1197
+ function createTraceState(rawTraceState) {
1198
+ return new TraceStateImpl(rawTraceState);
1199
+ }
1200
+ // ../../node_modules/.bun/@opentelemetry+api@1.10.0/node_modules/@opentelemetry/api/dist/trace/NoopTracerProvider.mjs
1201
+ /**
1202
+ * An implementation of the {@link TracerProvider} which returns an impotent
1203
+ * Tracer for all calls to `getTracer`.
1204
+ *
1205
+ * All operations are no-op.
1206
+ */
1207
+ var NoopTracerProvider = class {
1208
+ getTracer(_name, _version, _options) {
1209
+ return new NoopTracer();
1210
+ }
1211
+ };
1212
+ // ../../node_modules/.bun/@opentelemetry+api@1.10.0/node_modules/@opentelemetry/api/dist/trace/ProxyTracerProvider.mjs
1213
+ var NOOP_TRACER_PROVIDER = new NoopTracerProvider();
1214
+ /**
1215
+ * Tracer provider which provides {@link ProxyTracer}s.
1216
+ *
1217
+ * Before a delegate is set, tracers provided are NoOp.
1218
+ * When a delegate is set, traces are provided from the delegate.
1219
+ * When a delegate is set after tracers have already been provided,
1220
+ * all tracers already provided will use the provided delegate implementation.
1221
+ *
1222
+ * @deprecated This will be removed in the next major version.
1223
+ * @since 1.0.0
1224
+ */
1225
+ var ProxyTracerProvider = class {
1226
+ /**
1227
+ * Get a {@link ProxyTracer}
1228
+ */
1229
+ getTracer(name, version, options) {
1230
+ var _this$getDelegateTrac;
1231
+ return (_this$getDelegateTrac = this.getDelegateTracer(name, version, options)) !== null && _this$getDelegateTrac !== void 0 ? _this$getDelegateTrac : new ProxyTracer(this, name, version, options);
1232
+ }
1233
+ getDelegate() {
1234
+ var _this$_delegate;
1235
+ return (_this$_delegate = this._delegate) !== null && _this$_delegate !== void 0 ? _this$_delegate : NOOP_TRACER_PROVIDER;
1236
+ }
1237
+ /**
1238
+ * Set the delegate tracer provider
1239
+ */
1240
+ setDelegate(delegate) {
1241
+ this._delegate = delegate;
1242
+ }
1243
+ getDelegateTracer(name, version, options) {
1244
+ var _this$_delegate2;
1245
+ return (_this$_delegate2 = this._delegate) === null || _this$_delegate2 === void 0 ? void 0 : _this$_delegate2.getTracer(name, version, options);
1246
+ }
1247
+ };
1248
+ // ../../node_modules/.bun/@opentelemetry+api@1.10.0/node_modules/@opentelemetry/api/dist/trace/SamplingResult.mjs
1249
+ /**
1250
+ * @deprecated use the one declared in @opentelemetry/sdk-trace instead.
1251
+ * A sampling decision that determines how a {@link Span} will be recorded
1252
+ * and collected.
1253
+ *
1254
+ * @since 1.0.0
1255
+ */
1256
+ var SamplingDecision = /* @__PURE__ */ function(SamplingDecision) {
1257
+ /**
1258
+ * `Span.isRecording() === false`, span will not be recorded and all events
1259
+ * and attributes will be dropped.
1260
+ */
1261
+ SamplingDecision[SamplingDecision["NOT_RECORD"] = 0] = "NOT_RECORD";
1262
+ /**
1263
+ * `Span.isRecording() === true`, but `Sampled` flag in {@link TraceFlags}
1264
+ * MUST NOT be set.
1265
+ */
1266
+ SamplingDecision[SamplingDecision["RECORD"] = 1] = "RECORD";
1267
+ /**
1268
+ * `Span.isRecording() === true` AND `Sampled` flag in {@link TraceFlags}
1269
+ * MUST be set.
1270
+ */
1271
+ SamplingDecision[SamplingDecision["RECORD_AND_SAMPLED"] = 2] = "RECORD_AND_SAMPLED";
1272
+ return SamplingDecision;
1273
+ }({});
1274
+ // ../../node_modules/.bun/@opentelemetry+api@1.10.0/node_modules/@opentelemetry/api/dist/context-api.mjs
1275
+ /**
1276
+ * Entrypoint for context API
1277
+ * @since 1.0.0
1278
+ */
1279
+ var context = ContextAPI.getInstance();
1280
+ // ../../node_modules/.bun/@opentelemetry+api@1.10.0/node_modules/@opentelemetry/api/dist/diag-api.mjs
1281
+ /**
1282
+ * Entrypoint for Diag API.
1283
+ * Defines Diagnostic handler used for internal diagnostic logging operations.
1284
+ * The default provides a Noop DiagLogger implementation which may be changed via the
1285
+ * diag.setLogger(logger: DiagLogger) function.
1286
+ *
1287
+ * @since 1.0.0
1288
+ */
1289
+ var diag = DiagAPI.instance();
1290
+ // ../../node_modules/.bun/@opentelemetry+api@1.10.0/node_modules/@opentelemetry/api/dist/logs/NoopLoggerProvider.mjs
1291
+ var NoopLoggerProvider = class {
1292
+ getLogger(_name, _version, _options) {
1293
+ return new NoopLogger();
1294
+ }
1295
+ };
1296
+ var NOOP_LOGGER_PROVIDER = new NoopLoggerProvider();
1297
+ // ../../node_modules/.bun/@opentelemetry+api@1.10.0/node_modules/@opentelemetry/api/dist/logs/ProxyLogger.mjs
1298
+ var ProxyLogger = class {
1299
+ constructor(provider, name, version, options) {
1300
+ this._provider = provider;
1301
+ this.name = name;
1302
+ this.version = version;
1303
+ this.options = options;
1304
+ }
1305
+ /**
1306
+ * Emit a log record. This method should only be used by log appenders.
1307
+ *
1308
+ * @param logRecord
1309
+ */
1310
+ emit(logRecord) {
1311
+ this._getLogger().emit(logRecord);
1312
+ }
1313
+ enabled(options) {
1314
+ return this._getLogger().enabled(options);
1315
+ }
1316
+ /**
1317
+ * Try to get a logger from the proxy logger provider.
1318
+ * If the proxy logger provider has no delegate, return a noop logger.
1319
+ */
1320
+ _getLogger() {
1321
+ if (this._delegate) return this._delegate;
1322
+ const logger = this._provider._getDelegateLogger(this.name, this.version, this.options);
1323
+ if (!logger) return NOOP_LOGGER;
1324
+ this._delegate = logger;
1325
+ return this._delegate;
1326
+ }
1327
+ };
1328
+ // ../../node_modules/.bun/@opentelemetry+api@1.10.0/node_modules/@opentelemetry/api/dist/logs/ProxyLoggerProvider.mjs
1329
+ var ProxyLoggerProvider = class {
1330
+ getLogger(name, version, options) {
1331
+ var _this$_getDelegateLog;
1332
+ return (_this$_getDelegateLog = this._getDelegateLogger(name, version, options)) !== null && _this$_getDelegateLog !== void 0 ? _this$_getDelegateLog : new ProxyLogger(this, name, version, options);
1333
+ }
1334
+ /**
1335
+ * Get the delegate logger provider.
1336
+ * Used by tests only.
1337
+ * @internal
1338
+ */
1339
+ _getDelegate() {
1340
+ var _this$_delegate;
1341
+ return (_this$_delegate = this._delegate) !== null && _this$_delegate !== void 0 ? _this$_delegate : NOOP_LOGGER_PROVIDER;
1342
+ }
1343
+ /**
1344
+ * Set the delegate logger provider
1345
+ * @internal
1346
+ */
1347
+ _setDelegate(delegate) {
1348
+ this._delegate = delegate;
1349
+ }
1350
+ /**
1351
+ * @internal
1352
+ */
1353
+ _getDelegateLogger(name, version, options) {
1354
+ var _this$_delegate2;
1355
+ return (_this$_delegate2 = this._delegate) === null || _this$_delegate2 === void 0 ? void 0 : _this$_delegate2.getLogger(name, version, options);
1356
+ }
1357
+ };
1358
+ // ../../node_modules/.bun/@opentelemetry+api@1.10.0/node_modules/@opentelemetry/api/dist/api/logs.mjs
1359
+ var API_NAME$3 = "logs";
1360
+ // ../../node_modules/.bun/@opentelemetry+api@1.10.0/node_modules/@opentelemetry/api/dist/logs-api.mjs
1361
+ /**
1362
+ * Entrypoint for logs API
1363
+ *
1364
+ * @since 1.10.0
1365
+ */
1366
+ var logs = class LogsAPI {
1367
+ /** Empty private constructor prevents end users from constructing a new instance of the API */
1368
+ constructor() {
1369
+ this._proxyLoggerProvider = new ProxyLoggerProvider();
1370
+ }
1371
+ /** Get the singleton instance of the Logs API */
1372
+ static getInstance() {
1373
+ if (!this._instance) this._instance = new LogsAPI();
1374
+ return this._instance;
1375
+ }
1376
+ setGlobalLoggerProvider(provider) {
1377
+ const success = registerGlobal(API_NAME$3, provider, DiagAPI.instance());
1378
+ if (success) this._proxyLoggerProvider._setDelegate(provider);
1379
+ return success;
1380
+ }
1381
+ /**
1382
+ * Returns the global logger provider.
1383
+ *
1384
+ * @returns LoggerProvider
1385
+ */
1386
+ getLoggerProvider() {
1387
+ return getGlobal(API_NAME$3) || this._proxyLoggerProvider;
1388
+ }
1389
+ /**
1390
+ * Returns a Logger, creating one if one with the given name, version,
1391
+ * schemaUrl, and attributes is not already created.
1392
+ *
1393
+ * Getting a Logger may be expensive, especially when `attributes` are
1394
+ * provided. Reuse Logger instances where possible instead of calling
1395
+ * `getLogger()` on hot paths.
1396
+ *
1397
+ * @param name The name of the logger or instrumentation library.
1398
+ * @param version The version of the logger or instrumentation library.
1399
+ * @param options The options of the logger or instrumentation library.
1400
+ * @returns {@link Logger}
1401
+ */
1402
+ getLogger(name, version, options) {
1403
+ return this.getLoggerProvider().getLogger(name, version, options);
1404
+ }
1405
+ /** Remove the global logger provider */
1406
+ disable() {
1407
+ unregisterGlobal(API_NAME$3, DiagAPI.instance());
1408
+ this._proxyLoggerProvider = new ProxyLoggerProvider();
1409
+ }
1410
+ }.getInstance();
1411
+ // ../../node_modules/.bun/@opentelemetry+api@1.10.0/node_modules/@opentelemetry/api/dist/metrics/NoopMeterProvider.mjs
1412
+ /**
1413
+ * An implementation of the {@link MeterProvider} which returns an impotent Meter
1414
+ * for all calls to `getMeter`
1415
+ */
1416
+ var NoopMeterProvider = class {
1417
+ getMeter(_name, _version, _options) {
1418
+ return NOOP_METER;
1419
+ }
1420
+ };
1421
+ var NOOP_METER_PROVIDER = new NoopMeterProvider();
1422
+ // ../../node_modules/.bun/@opentelemetry+api@1.10.0/node_modules/@opentelemetry/api/dist/api/metrics.mjs
1423
+ var API_NAME$2 = "metrics";
1424
+ // ../../node_modules/.bun/@opentelemetry+api@1.10.0/node_modules/@opentelemetry/api/dist/metrics-api.mjs
1425
+ /**
1426
+ * Entrypoint for metrics API
1427
+ *
1428
+ * @since 1.3.0
1429
+ */
1430
+ var metrics = class MetricsAPI {
1431
+ /** Empty private constructor prevents end users from constructing a new instance of the API */
1432
+ constructor() {}
1433
+ /** Get the singleton instance of the Metrics API */
1434
+ static getInstance() {
1435
+ if (!this._instance) this._instance = new MetricsAPI();
1436
+ return this._instance;
1437
+ }
1438
+ /**
1439
+ * Set the current global meter provider.
1440
+ * Returns true if the meter provider was successfully registered, else false.
1441
+ */
1442
+ setGlobalMeterProvider(provider) {
1443
+ return registerGlobal(API_NAME$2, provider, DiagAPI.instance());
1444
+ }
1445
+ /**
1446
+ * Returns the global meter provider.
1447
+ */
1448
+ getMeterProvider() {
1449
+ return getGlobal(API_NAME$2) || NOOP_METER_PROVIDER;
1450
+ }
1451
+ /**
1452
+ * Returns a meter from the global meter provider.
1453
+ */
1454
+ getMeter(name, version, options) {
1455
+ return this.getMeterProvider().getMeter(name, version, options);
1456
+ }
1457
+ /** Remove the global meter provider */
1458
+ disable() {
1459
+ unregisterGlobal(API_NAME$2, DiagAPI.instance());
1460
+ }
1461
+ }.getInstance();
1462
+ // ../../node_modules/.bun/@opentelemetry+api@1.10.0/node_modules/@opentelemetry/api/dist/propagation/NoopTextMapPropagator.mjs
1463
+ /**
1464
+ * No-op implementations of {@link TextMapPropagator}.
1465
+ */
1466
+ var NoopTextMapPropagator = class {
1467
+ /** Noop inject function does nothing */
1468
+ inject(_context, _carrier) {}
1469
+ /** Noop extract function does nothing and returns the input context */
1470
+ extract(context, _carrier) {
1471
+ return context;
1472
+ }
1473
+ fields() {
1474
+ return [];
1475
+ }
1476
+ };
1477
+ // ../../node_modules/.bun/@opentelemetry+api@1.10.0/node_modules/@opentelemetry/api/dist/baggage/context-helpers.mjs
1478
+ /**
1479
+ * Baggage key
1480
+ */
1481
+ var BAGGAGE_KEY = createContextKey("OpenTelemetry Baggage Key");
1482
+ /**
1483
+ * Retrieve the current baggage from the given context
1484
+ *
1485
+ * @param {Context} Context that manage all context values
1486
+ * @returns {Baggage} Extracted baggage from the context
1487
+ */
1488
+ function getBaggage(context) {
1489
+ return context.getValue(BAGGAGE_KEY) || void 0;
1490
+ }
1491
+ /**
1492
+ * Retrieve the current baggage from the active/current context
1493
+ *
1494
+ * @returns {Baggage} Extracted baggage from the context
1495
+ */
1496
+ function getActiveBaggage() {
1497
+ return getBaggage(ContextAPI.getInstance().active());
1498
+ }
1499
+ /**
1500
+ * Store a baggage in the given context
1501
+ *
1502
+ * @param {Context} Context that manage all context values
1503
+ * @param {Baggage} baggage that will be set in the actual context
1504
+ */
1505
+ function setBaggage(context, baggage) {
1506
+ return context.setValue(BAGGAGE_KEY, baggage);
1507
+ }
1508
+ /**
1509
+ * Delete the baggage stored in the given context
1510
+ *
1511
+ * @param {Context} Context that manage all context values
1512
+ */
1513
+ function deleteBaggage(context) {
1514
+ return context.deleteValue(BAGGAGE_KEY);
1515
+ }
1516
+ // ../../node_modules/.bun/@opentelemetry+api@1.10.0/node_modules/@opentelemetry/api/dist/api/propagation.mjs
1517
+ var API_NAME$1 = "propagation";
1518
+ var NOOP_TEXT_MAP_PROPAGATOR = new NoopTextMapPropagator();
1519
+ // ../../node_modules/.bun/@opentelemetry+api@1.10.0/node_modules/@opentelemetry/api/dist/propagation-api.mjs
1520
+ /**
1521
+ * Entrypoint for propagation API
1522
+ *
1523
+ * @since 1.0.0
1524
+ */
1525
+ var propagation = class PropagationAPI {
1526
+ /** Empty private constructor prevents end users from constructing a new instance of the API */
1527
+ constructor() {
1528
+ this.createBaggage = createBaggage;
1529
+ this.getBaggage = getBaggage;
1530
+ this.getActiveBaggage = getActiveBaggage;
1531
+ this.setBaggage = setBaggage;
1532
+ this.deleteBaggage = deleteBaggage;
1533
+ }
1534
+ /** Get the singleton instance of the Propagator API */
1535
+ static getInstance() {
1536
+ if (!this._instance) this._instance = new PropagationAPI();
1537
+ return this._instance;
1538
+ }
1539
+ /**
1540
+ * Set the current propagator.
1541
+ *
1542
+ * @returns true if the propagator was successfully registered, else false
1543
+ */
1544
+ setGlobalPropagator(propagator) {
1545
+ return registerGlobal(API_NAME$1, propagator, DiagAPI.instance());
1546
+ }
1547
+ /**
1548
+ * Inject context into a carrier to be propagated inter-process
1549
+ *
1550
+ * @param context Context carrying tracing data to inject
1551
+ * @param carrier carrier to inject context into
1552
+ * @param setter Function used to set values on the carrier
1553
+ */
1554
+ inject(context, carrier, setter = defaultTextMapSetter) {
1555
+ return this._getGlobalPropagator().inject(context, carrier, setter);
1556
+ }
1557
+ /**
1558
+ * Extract context from a carrier
1559
+ *
1560
+ * @param context Context which the newly created context will inherit from
1561
+ * @param carrier Carrier to extract context from
1562
+ * @param getter Function used to extract keys from a carrier
1563
+ */
1564
+ extract(context, carrier, getter = defaultTextMapGetter) {
1565
+ return this._getGlobalPropagator().extract(context, carrier, getter);
1566
+ }
1567
+ /**
1568
+ * Return a list of all fields which may be used by the propagator.
1569
+ */
1570
+ fields() {
1571
+ return this._getGlobalPropagator().fields();
1572
+ }
1573
+ /** Remove the global propagator */
1574
+ disable() {
1575
+ unregisterGlobal(API_NAME$1, DiagAPI.instance());
1576
+ }
1577
+ _getGlobalPropagator() {
1578
+ return getGlobal(API_NAME$1) || NOOP_TEXT_MAP_PROPAGATOR;
1579
+ }
1580
+ }.getInstance();
1581
+ // ../../node_modules/.bun/@opentelemetry+api@1.10.0/node_modules/@opentelemetry/api/dist/api/trace.mjs
1582
+ var API_NAME = "trace";
1583
+ // ../../node_modules/.bun/@opentelemetry+api@1.10.0/node_modules/@opentelemetry/api/dist/trace-api.mjs
1584
+ /**
1585
+ * Entrypoint for trace API
1586
+ *
1587
+ * @since 1.0.0
1588
+ */
1589
+ var trace = class TraceAPI {
1590
+ /** Empty private constructor prevents end users from constructing a new instance of the API */
1591
+ constructor() {
1592
+ this._proxyTracerProvider = new ProxyTracerProvider();
1593
+ this.wrapSpanContext = wrapSpanContext;
1594
+ this.isSpanContextValid = isSpanContextValid;
1595
+ this.deleteSpan = deleteSpan;
1596
+ this.getSpan = getSpan;
1597
+ this.getActiveSpan = getActiveSpan;
1598
+ this.getSpanContext = getSpanContext;
1599
+ this.setSpan = setSpan;
1600
+ this.setSpanContext = setSpanContext;
1601
+ }
1602
+ /** Get the singleton instance of the Trace API */
1603
+ static getInstance() {
1604
+ if (!this._instance) this._instance = new TraceAPI();
1605
+ return this._instance;
1606
+ }
1607
+ /**
1608
+ * Set the current global tracer.
1609
+ *
1610
+ * @returns true if the tracer provider was successfully registered, else false
1611
+ */
1612
+ setGlobalTracerProvider(provider) {
1613
+ const success = registerGlobal(API_NAME, this._proxyTracerProvider, DiagAPI.instance());
1614
+ if (success) this._proxyTracerProvider.setDelegate(provider);
1615
+ return success;
1616
+ }
1617
+ /**
1618
+ * Returns the global tracer provider.
1619
+ */
1620
+ getTracerProvider() {
1621
+ return getGlobal(API_NAME) || this._proxyTracerProvider;
1622
+ }
1623
+ /**
1624
+ * Returns a tracer from the global tracer provider.
1625
+ */
1626
+ getTracer(name, version) {
1627
+ return this.getTracerProvider().getTracer(name, version);
1628
+ }
1629
+ /** Remove the global tracer provider */
1630
+ disable() {
1631
+ unregisterGlobal(API_NAME, DiagAPI.instance());
1632
+ this._proxyTracerProvider = new ProxyTracerProvider();
1633
+ }
1634
+ }.getInstance();
1635
+ // ../../node_modules/.bun/@opentelemetry+api@1.10.0/node_modules/@opentelemetry/api/dist/index.mjs
1636
+ var src_default = {
1637
+ context,
1638
+ diag,
1639
+ logs,
1640
+ metrics,
1641
+ propagation,
1642
+ trace
1643
+ };
1644
+ export { DiagConsoleLogger, DiagLogLevel, INVALID_SPANID, INVALID_SPAN_CONTEXT, INVALID_TRACEID, ProxyTracer, ProxyTracerProvider, ROOT_CONTEXT, SamplingDecision, SeverityNumber, SpanKind, SpanStatusCode, TraceFlags, ValueType, baggageEntryMetadataFromString, context, createContextKey, createNoopLogger, createNoopMeter, createTraceState, src_default as default, defaultTextMapGetter, defaultTextMapSetter, diag, isSpanContextValid, isValidSpanId, isValidTraceId, logs, metrics, propagation, trace };