@timeback/caliper 0.1.3 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,20 +1,4 @@
1
- import { createRequire } from "node:module";
2
- var __create = Object.create;
3
- var __getProtoOf = Object.getPrototypeOf;
4
1
  var __defProp = Object.defineProperty;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __toESM = (mod, isNodeMode, target) => {
8
- target = mod != null ? __create(__getProtoOf(mod)) : {};
9
- const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
10
- for (let key of __getOwnPropNames(mod))
11
- if (!__hasOwnProp.call(to, key))
12
- __defProp(to, key, {
13
- get: () => mod[key],
14
- enumerable: true
15
- });
16
- return to;
17
- };
18
2
  var __export = (target, all) => {
19
3
  for (var name in all)
20
4
  __defProp(target, name, {
@@ -24,7 +8,417 @@ var __export = (target, all) => {
24
8
  set: (newValue) => all[name] = () => newValue
25
9
  });
26
10
  };
27
- var __require = /* @__PURE__ */ createRequire(import.meta.url);
11
+ var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
12
+
13
+ // node:util
14
+ var exports_util = {};
15
+ __export(exports_util, {
16
+ types: () => types,
17
+ promisify: () => promisify,
18
+ log: () => log,
19
+ isUndefined: () => isUndefined,
20
+ isSymbol: () => isSymbol,
21
+ isString: () => isString,
22
+ isRegExp: () => isRegExp,
23
+ isPrimitive: () => isPrimitive,
24
+ isObject: () => isObject,
25
+ isNumber: () => isNumber,
26
+ isNullOrUndefined: () => isNullOrUndefined,
27
+ isNull: () => isNull,
28
+ isFunction: () => isFunction,
29
+ isError: () => isError,
30
+ isDate: () => isDate,
31
+ isBuffer: () => isBuffer,
32
+ isBoolean: () => isBoolean,
33
+ isArray: () => isArray,
34
+ inspect: () => inspect,
35
+ inherits: () => inherits,
36
+ format: () => format,
37
+ deprecate: () => deprecate,
38
+ default: () => util_default,
39
+ debuglog: () => debuglog,
40
+ callbackifyOnRejected: () => callbackifyOnRejected,
41
+ callbackify: () => callbackify,
42
+ _extend: () => _extend,
43
+ TextEncoder: () => TextEncoder,
44
+ TextDecoder: () => TextDecoder
45
+ });
46
+ function format(f, ...args) {
47
+ if (!isString(f)) {
48
+ var objects = [f];
49
+ for (var i = 0;i < args.length; i++)
50
+ objects.push(inspect(args[i]));
51
+ return objects.join(" ");
52
+ }
53
+ var i = 0, len = args.length, str = String(f).replace(formatRegExp, function(x2) {
54
+ if (x2 === "%%")
55
+ return "%";
56
+ if (i >= len)
57
+ return x2;
58
+ switch (x2) {
59
+ case "%s":
60
+ return String(args[i++]);
61
+ case "%d":
62
+ return Number(args[i++]);
63
+ case "%j":
64
+ try {
65
+ return JSON.stringify(args[i++]);
66
+ } catch (_) {
67
+ return "[Circular]";
68
+ }
69
+ default:
70
+ return x2;
71
+ }
72
+ });
73
+ for (var x = args[i];i < len; x = args[++i])
74
+ if (isNull(x) || !isObject(x))
75
+ str += " " + x;
76
+ else
77
+ str += " " + inspect(x);
78
+ return str;
79
+ }
80
+ function deprecate(fn, msg) {
81
+ if (typeof process > "u" || process?.noDeprecation === true)
82
+ return fn;
83
+ var warned = false;
84
+ function deprecated(...args) {
85
+ if (!warned) {
86
+ if (process.throwDeprecation)
87
+ throw Error(msg);
88
+ else if (process.traceDeprecation)
89
+ console.trace(msg);
90
+ else
91
+ console.error(msg);
92
+ warned = true;
93
+ }
94
+ return fn.apply(this, ...args);
95
+ }
96
+ return deprecated;
97
+ }
98
+ function stylizeWithColor(str, styleType) {
99
+ var style = inspect.styles[styleType];
100
+ if (style)
101
+ return "\x1B[" + inspect.colors[style][0] + "m" + str + "\x1B[" + inspect.colors[style][1] + "m";
102
+ else
103
+ return str;
104
+ }
105
+ function stylizeNoColor(str, styleType) {
106
+ return str;
107
+ }
108
+ function arrayToHash(array) {
109
+ var hash = {};
110
+ return array.forEach(function(val, idx) {
111
+ hash[val] = true;
112
+ }), hash;
113
+ }
114
+ function formatValue(ctx, value, recurseTimes) {
115
+ if (ctx.customInspect && value && isFunction(value.inspect) && value.inspect !== inspect && !(value.constructor && value.constructor.prototype === value)) {
116
+ var ret = value.inspect(recurseTimes, ctx);
117
+ if (!isString(ret))
118
+ ret = formatValue(ctx, ret, recurseTimes);
119
+ return ret;
120
+ }
121
+ var primitive = formatPrimitive(ctx, value);
122
+ if (primitive)
123
+ return primitive;
124
+ var keys = Object.keys(value), visibleKeys = arrayToHash(keys);
125
+ if (ctx.showHidden)
126
+ keys = Object.getOwnPropertyNames(value);
127
+ if (isError(value) && (keys.indexOf("message") >= 0 || keys.indexOf("description") >= 0))
128
+ return formatError(value);
129
+ if (keys.length === 0) {
130
+ if (isFunction(value)) {
131
+ var name = value.name ? ": " + value.name : "";
132
+ return ctx.stylize("[Function" + name + "]", "special");
133
+ }
134
+ if (isRegExp(value))
135
+ return ctx.stylize(RegExp.prototype.toString.call(value), "regexp");
136
+ if (isDate(value))
137
+ return ctx.stylize(Date.prototype.toString.call(value), "date");
138
+ if (isError(value))
139
+ return formatError(value);
140
+ }
141
+ var base = "", array = false, braces = ["{", "}"];
142
+ if (isArray(value))
143
+ array = true, braces = ["[", "]"];
144
+ if (isFunction(value)) {
145
+ var n = value.name ? ": " + value.name : "";
146
+ base = " [Function" + n + "]";
147
+ }
148
+ if (isRegExp(value))
149
+ base = " " + RegExp.prototype.toString.call(value);
150
+ if (isDate(value))
151
+ base = " " + Date.prototype.toUTCString.call(value);
152
+ if (isError(value))
153
+ base = " " + formatError(value);
154
+ if (keys.length === 0 && (!array || value.length == 0))
155
+ return braces[0] + base + braces[1];
156
+ if (recurseTimes < 0)
157
+ if (isRegExp(value))
158
+ return ctx.stylize(RegExp.prototype.toString.call(value), "regexp");
159
+ else
160
+ return ctx.stylize("[Object]", "special");
161
+ ctx.seen.push(value);
162
+ var output;
163
+ if (array)
164
+ output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);
165
+ else
166
+ output = keys.map(function(key) {
167
+ return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);
168
+ });
169
+ return ctx.seen.pop(), reduceToSingleString(output, base, braces);
170
+ }
171
+ function formatPrimitive(ctx, value) {
172
+ if (isUndefined(value))
173
+ return ctx.stylize("undefined", "undefined");
174
+ if (isString(value)) {
175
+ var simple = "'" + JSON.stringify(value).replace(/^"|"$/g, "").replace(/'/g, "\\'").replace(/\\"/g, '"') + "'";
176
+ return ctx.stylize(simple, "string");
177
+ }
178
+ if (isNumber(value))
179
+ return ctx.stylize("" + value, "number");
180
+ if (isBoolean(value))
181
+ return ctx.stylize("" + value, "boolean");
182
+ if (isNull(value))
183
+ return ctx.stylize("null", "null");
184
+ }
185
+ function formatError(value) {
186
+ return "[" + Error.prototype.toString.call(value) + "]";
187
+ }
188
+ function formatArray(ctx, value, recurseTimes, visibleKeys, keys) {
189
+ var output = [];
190
+ for (var i = 0, l = value.length;i < l; ++i)
191
+ if (hasOwnProperty(value, String(i)))
192
+ output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, String(i), true));
193
+ else
194
+ output.push("");
195
+ return keys.forEach(function(key) {
196
+ if (!key.match(/^\d+$/))
197
+ output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, key, true));
198
+ }), output;
199
+ }
200
+ function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {
201
+ var name, str, desc;
202
+ if (desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] }, desc.get)
203
+ if (desc.set)
204
+ str = ctx.stylize("[Getter/Setter]", "special");
205
+ else
206
+ str = ctx.stylize("[Getter]", "special");
207
+ else if (desc.set)
208
+ str = ctx.stylize("[Setter]", "special");
209
+ if (!hasOwnProperty(visibleKeys, key))
210
+ name = "[" + key + "]";
211
+ if (!str)
212
+ if (ctx.seen.indexOf(desc.value) < 0) {
213
+ if (isNull(recurseTimes))
214
+ str = formatValue(ctx, desc.value, null);
215
+ else
216
+ str = formatValue(ctx, desc.value, recurseTimes - 1);
217
+ if (str.indexOf(`
218
+ `) > -1)
219
+ if (array)
220
+ str = str.split(`
221
+ `).map(function(line) {
222
+ return " " + line;
223
+ }).join(`
224
+ `).slice(2);
225
+ else
226
+ str = `
227
+ ` + str.split(`
228
+ `).map(function(line) {
229
+ return " " + line;
230
+ }).join(`
231
+ `);
232
+ } else
233
+ str = ctx.stylize("[Circular]", "special");
234
+ if (isUndefined(name)) {
235
+ if (array && key.match(/^\d+$/))
236
+ return str;
237
+ if (name = JSON.stringify("" + key), name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/))
238
+ name = name.slice(1, -1), name = ctx.stylize(name, "name");
239
+ else
240
+ name = name.replace(/'/g, "\\'").replace(/\\"/g, '"').replace(/(^"|"$)/g, "'"), name = ctx.stylize(name, "string");
241
+ }
242
+ return name + ": " + str;
243
+ }
244
+ function reduceToSingleString(output, base, braces) {
245
+ var numLinesEst = 0, length = output.reduce(function(prev, cur) {
246
+ if (numLinesEst++, cur.indexOf(`
247
+ `) >= 0)
248
+ numLinesEst++;
249
+ return prev + cur.replace(/\u001b\[\d\d?m/g, "").length + 1;
250
+ }, 0);
251
+ if (length > 60)
252
+ return braces[0] + (base === "" ? "" : base + `
253
+ `) + " " + output.join(`,
254
+ `) + " " + braces[1];
255
+ return braces[0] + base + " " + output.join(", ") + " " + braces[1];
256
+ }
257
+ function isArray(ar) {
258
+ return Array.isArray(ar);
259
+ }
260
+ function isBoolean(arg) {
261
+ return typeof arg === "boolean";
262
+ }
263
+ function isNull(arg) {
264
+ return arg === null;
265
+ }
266
+ function isNullOrUndefined(arg) {
267
+ return arg == null;
268
+ }
269
+ function isNumber(arg) {
270
+ return typeof arg === "number";
271
+ }
272
+ function isString(arg) {
273
+ return typeof arg === "string";
274
+ }
275
+ function isSymbol(arg) {
276
+ return typeof arg === "symbol";
277
+ }
278
+ function isUndefined(arg) {
279
+ return arg === undefined;
280
+ }
281
+ function isRegExp(re) {
282
+ return isObject(re) && objectToString(re) === "[object RegExp]";
283
+ }
284
+ function isObject(arg) {
285
+ return typeof arg === "object" && arg !== null;
286
+ }
287
+ function isDate(d) {
288
+ return isObject(d) && objectToString(d) === "[object Date]";
289
+ }
290
+ function isError(e) {
291
+ return isObject(e) && (objectToString(e) === "[object Error]" || e instanceof Error);
292
+ }
293
+ function isFunction(arg) {
294
+ return typeof arg === "function";
295
+ }
296
+ function isPrimitive(arg) {
297
+ return arg === null || typeof arg === "boolean" || typeof arg === "number" || typeof arg === "string" || typeof arg === "symbol" || typeof arg > "u";
298
+ }
299
+ function isBuffer(arg) {
300
+ return arg instanceof Buffer;
301
+ }
302
+ function objectToString(o) {
303
+ return Object.prototype.toString.call(o);
304
+ }
305
+ function pad(n) {
306
+ return n < 10 ? "0" + n.toString(10) : n.toString(10);
307
+ }
308
+ function timestamp() {
309
+ var d = new Date, time = [pad(d.getHours()), pad(d.getMinutes()), pad(d.getSeconds())].join(":");
310
+ return [d.getDate(), months[d.getMonth()], time].join(" ");
311
+ }
312
+ function log(...args) {
313
+ console.log("%s - %s", timestamp(), format.apply(null, args));
314
+ }
315
+ function inherits(ctor, superCtor) {
316
+ if (superCtor)
317
+ ctor.super_ = superCtor, ctor.prototype = Object.create(superCtor.prototype, { constructor: { value: ctor, enumerable: false, writable: true, configurable: true } });
318
+ }
319
+ function _extend(origin, add) {
320
+ if (!add || !isObject(add))
321
+ return origin;
322
+ var keys = Object.keys(add), i = keys.length;
323
+ while (i--)
324
+ origin[keys[i]] = add[keys[i]];
325
+ return origin;
326
+ }
327
+ function hasOwnProperty(obj, prop) {
328
+ return Object.prototype.hasOwnProperty.call(obj, prop);
329
+ }
330
+ function callbackifyOnRejected(reason, cb) {
331
+ if (!reason) {
332
+ var newReason = Error("Promise was rejected with a falsy value");
333
+ newReason.reason = reason, reason = newReason;
334
+ }
335
+ return cb(reason);
336
+ }
337
+ function callbackify(original) {
338
+ if (typeof original !== "function")
339
+ throw TypeError('The "original" argument must be of type Function');
340
+ function callbackified(...args) {
341
+ var maybeCb = args.pop();
342
+ if (typeof maybeCb !== "function")
343
+ throw TypeError("The last argument must be of type Function");
344
+ var self = this, cb = function(...args2) {
345
+ return maybeCb.apply(self, ...args2);
346
+ };
347
+ original.apply(this, args).then(function(ret) {
348
+ process.nextTick(cb.bind(null, null, ret));
349
+ }, function(rej) {
350
+ process.nextTick(callbackifyOnRejected.bind(null, rej, cb));
351
+ });
352
+ }
353
+ return Object.setPrototypeOf(callbackified, Object.getPrototypeOf(original)), Object.defineProperties(callbackified, Object.getOwnPropertyDescriptors(original)), callbackified;
354
+ }
355
+ var formatRegExp, debuglog, inspect, types = () => {}, months, promisify, TextEncoder, TextDecoder, util_default;
356
+ var init_util = __esm(() => {
357
+ formatRegExp = /%[sdj%]/g;
358
+ debuglog = ((debugs = {}, debugEnvRegex = {}, debugEnv) => ((debugEnv = typeof process < "u" && false) && (debugEnv = debugEnv.replace(/[|\\{}()[\]^$+?.]/g, "\\$&").replace(/\*/g, ".*").replace(/,/g, "$|^").toUpperCase()), debugEnvRegex = new RegExp("^" + debugEnv + "$", "i"), (set) => {
359
+ if (set = set.toUpperCase(), !debugs[set])
360
+ if (debugEnvRegex.test(set))
361
+ debugs[set] = function(...args) {
362
+ console.error("%s: %s", set, pid, format.apply(null, ...args));
363
+ };
364
+ else
365
+ debugs[set] = function() {};
366
+ return debugs[set];
367
+ }))();
368
+ inspect = ((i) => (i.colors = { bold: [1, 22], italic: [3, 23], underline: [4, 24], inverse: [7, 27], white: [37, 39], grey: [90, 39], black: [30, 39], blue: [34, 39], cyan: [36, 39], green: [32, 39], magenta: [35, 39], red: [31, 39], yellow: [33, 39] }, i.styles = { special: "cyan", number: "yellow", boolean: "yellow", undefined: "grey", null: "bold", string: "green", date: "magenta", regexp: "red" }, i.custom = Symbol.for("nodejs.util.inspect.custom"), i))(function(obj, opts, ...rest) {
369
+ var ctx = { seen: [], stylize: stylizeNoColor };
370
+ if (rest.length >= 1)
371
+ ctx.depth = rest[0];
372
+ if (rest.length >= 2)
373
+ ctx.colors = rest[1];
374
+ if (isBoolean(opts))
375
+ ctx.showHidden = opts;
376
+ else if (opts)
377
+ _extend(ctx, opts);
378
+ if (isUndefined(ctx.showHidden))
379
+ ctx.showHidden = false;
380
+ if (isUndefined(ctx.depth))
381
+ ctx.depth = 2;
382
+ if (isUndefined(ctx.colors))
383
+ ctx.colors = false;
384
+ if (ctx.colors)
385
+ ctx.stylize = stylizeWithColor;
386
+ return formatValue(ctx, obj, ctx.depth);
387
+ });
388
+ months = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
389
+ promisify = ((x) => (x.custom = Symbol.for("nodejs.util.promisify.custom"), x))(function(original) {
390
+ if (typeof original !== "function")
391
+ throw TypeError('The "original" argument must be of type Function');
392
+ if (kCustomPromisifiedSymbol && original[kCustomPromisifiedSymbol]) {
393
+ var fn = original[kCustomPromisifiedSymbol];
394
+ if (typeof fn !== "function")
395
+ throw TypeError('The "nodejs.util.promisify.custom" argument must be of type Function');
396
+ return Object.defineProperty(fn, kCustomPromisifiedSymbol, { value: fn, enumerable: false, writable: false, configurable: true }), fn;
397
+ }
398
+ function fn(...args) {
399
+ var promiseResolve, promiseReject, promise = new Promise(function(resolve, reject) {
400
+ promiseResolve = resolve, promiseReject = reject;
401
+ });
402
+ args.push(function(err, value) {
403
+ if (err)
404
+ promiseReject(err);
405
+ else
406
+ promiseResolve(value);
407
+ });
408
+ try {
409
+ original.apply(this, args);
410
+ } catch (err) {
411
+ promiseReject(err);
412
+ }
413
+ return promise;
414
+ }
415
+ if (Object.setPrototypeOf(fn, Object.getPrototypeOf(original)), kCustomPromisifiedSymbol)
416
+ Object.defineProperty(fn, kCustomPromisifiedSymbol, { value: fn, enumerable: false, writable: false, configurable: true });
417
+ return Object.defineProperties(fn, Object.getOwnPropertyDescriptors(original));
418
+ });
419
+ ({ TextEncoder, TextDecoder } = globalThis);
420
+ util_default = { TextEncoder, TextDecoder, promisify, log, inherits, _extend, callbackifyOnRejected, callbackify };
421
+ });
28
422
 
29
423
  // ../../internal/constants/src/endpoints.ts
30
424
  var DEFAULT_PLATFORM = "BEYOND_AI";
@@ -180,7 +574,7 @@ function detectEnvironment() {
180
574
  var nodeInspect;
181
575
  if (!isBrowser()) {
182
576
  try {
183
- const util = await import("node:util");
577
+ const util = await Promise.resolve().then(() => (init_util(), exports_util));
184
578
  nodeInspect = util.inspect;
185
579
  } catch {}
186
580
  }
@@ -233,10 +627,10 @@ var terminalFormatter = (entry) => {
233
627
  const consoleMethod = getConsoleMethod(entry.level);
234
628
  const levelUpper = entry.level.toUpperCase().padEnd(5);
235
629
  const isoString = entry.timestamp.toISOString().replace(/\.\d{3}Z$/, "");
236
- const timestamp = `${colors.dim}[${isoString}]${colors.reset}`;
630
+ const timestamp2 = `${colors.dim}[${isoString}]${colors.reset}`;
237
631
  const level = `${levelColor}${levelUpper}${colors.reset}`;
238
632
  const scope = entry.scope ? `${colors.bold}[${entry.scope}]${colors.reset} ` : "";
239
- const prefix = `${timestamp} ${level} ${scope}${entry.message}`;
633
+ const prefix = `${timestamp2} ${level} ${scope}${entry.message}`;
240
634
  if (entry.context && Object.keys(entry.context).length > 0) {
241
635
  consoleMethod(prefix, formatContext(entry.context));
242
636
  } else {
@@ -251,9 +645,9 @@ var LEVEL_PREFIX = {
251
645
  error: "[ERROR]"
252
646
  };
253
647
  function formatContext2(context) {
254
- return Object.entries(context).map(([key, value]) => `${key}=${formatValue(value)}`).join(" ");
648
+ return Object.entries(context).map(([key, value]) => `${key}=${formatValue2(value)}`).join(" ");
255
649
  }
256
- function formatValue(value) {
650
+ function formatValue2(value) {
257
651
  if (typeof value === "string")
258
652
  return value;
259
653
  if (typeof value === "number")
@@ -413,7 +807,7 @@ function isDebug() {
413
807
  return false;
414
808
  }
415
809
  }
416
- var log = createLogger({ scope: "auth", minLevel: isDebug() ? "debug" : "warn" });
810
+ var log2 = createLogger({ scope: "auth", minLevel: isDebug() ? "debug" : "warn" });
417
811
 
418
812
  class TokenManager {
419
813
  config;
@@ -427,11 +821,11 @@ class TokenManager {
427
821
  }
428
822
  async getToken() {
429
823
  if (this.accessToken && Date.now() < this.tokenExpiry) {
430
- log.debug("Using cached token");
824
+ log2.debug("Using cached token");
431
825
  return this.accessToken;
432
826
  }
433
827
  if (this.pendingRequest) {
434
- log.debug("Waiting for in-flight token request");
828
+ log2.debug("Waiting for in-flight token request");
435
829
  return this.pendingRequest;
436
830
  }
437
831
  this.pendingRequest = this.fetchToken();
@@ -442,7 +836,7 @@ class TokenManager {
442
836
  }
443
837
  }
444
838
  async fetchToken() {
445
- log.debug("Fetching new access token...");
839
+ log2.debug("Fetching new access token...");
446
840
  const { clientId, clientSecret } = this.config.credentials;
447
841
  const credentials = btoa(`${clientId}:${clientSecret}`);
448
842
  const start = performance.now();
@@ -456,17 +850,17 @@ class TokenManager {
456
850
  });
457
851
  const duration = Math.round(performance.now() - start);
458
852
  if (!response.ok) {
459
- log.error(`Token request failed: ${response.status} ${response.statusText}`);
853
+ log2.error(`Token request failed: ${response.status} ${response.statusText}`);
460
854
  throw new Error(`Failed to obtain access token: ${response.status} ${response.statusText}`);
461
855
  }
462
856
  const data = await response.json();
463
857
  this.accessToken = data.access_token;
464
858
  this.tokenExpiry = Date.now() + (data.expires_in - 60) * 1000;
465
- log.debug(`Token acquired (${duration}ms, expires in ${data.expires_in}s)`);
859
+ log2.debug(`Token acquired (${duration}ms, expires in ${data.expires_in}s)`);
466
860
  return this.accessToken;
467
861
  }
468
862
  invalidate() {
469
- log.debug("Token invalidated");
863
+ log2.debug("Token invalidated");
470
864
  this.accessToken = null;
471
865
  this.tokenExpiry = 0;
472
866
  }
@@ -1279,43 +1673,43 @@ function escapeValue(value) {
1279
1673
  }
1280
1674
  return value.replaceAll("'", "''");
1281
1675
  }
1282
- function formatValue2(value) {
1676
+ function formatValue3(value) {
1283
1677
  const escaped = escapeValue(value);
1284
1678
  const needsQuotes = typeof value === "string" || value instanceof Date;
1285
1679
  return needsQuotes ? `'${escaped}'` : escaped;
1286
1680
  }
1287
1681
  function fieldToConditions(field, condition) {
1288
1682
  if (typeof condition === "string" || typeof condition === "number" || typeof condition === "boolean" || condition instanceof Date) {
1289
- return [`${field}=${formatValue2(condition)}`];
1683
+ return [`${field}=${formatValue3(condition)}`];
1290
1684
  }
1291
1685
  if (typeof condition === "object" && condition !== null) {
1292
1686
  const ops = condition;
1293
1687
  const conditions = [];
1294
1688
  if (ops.ne !== undefined) {
1295
- conditions.push(`${field}!=${formatValue2(ops.ne)}`);
1689
+ conditions.push(`${field}!=${formatValue3(ops.ne)}`);
1296
1690
  }
1297
1691
  if (ops.gt !== undefined) {
1298
- conditions.push(`${field}>${formatValue2(ops.gt)}`);
1692
+ conditions.push(`${field}>${formatValue3(ops.gt)}`);
1299
1693
  }
1300
1694
  if (ops.gte !== undefined) {
1301
- conditions.push(`${field}>=${formatValue2(ops.gte)}`);
1695
+ conditions.push(`${field}>=${formatValue3(ops.gte)}`);
1302
1696
  }
1303
1697
  if (ops.lt !== undefined) {
1304
- conditions.push(`${field}<${formatValue2(ops.lt)}`);
1698
+ conditions.push(`${field}<${formatValue3(ops.lt)}`);
1305
1699
  }
1306
1700
  if (ops.lte !== undefined) {
1307
- conditions.push(`${field}<=${formatValue2(ops.lte)}`);
1701
+ conditions.push(`${field}<=${formatValue3(ops.lte)}`);
1308
1702
  }
1309
1703
  if (ops.contains !== undefined) {
1310
- conditions.push(`${field}~${formatValue2(ops.contains)}`);
1704
+ conditions.push(`${field}~${formatValue3(ops.contains)}`);
1311
1705
  }
1312
1706
  if (ops.in !== undefined && ops.in.length > 0) {
1313
- const inConditions = ops.in.map((v) => `${field}=${formatValue2(v)}`);
1707
+ const inConditions = ops.in.map((v) => `${field}=${formatValue3(v)}`);
1314
1708
  const joined = inConditions.join(" OR ");
1315
1709
  conditions.push(inConditions.length > 1 ? `(${joined})` : joined);
1316
1710
  }
1317
1711
  if (ops.notIn !== undefined && ops.notIn.length > 0) {
1318
- const notInConditions = ops.notIn.map((v) => `${field}!=${formatValue2(v)}`);
1712
+ const notInConditions = ops.notIn.map((v) => `${field}!=${formatValue3(v)}`);
1319
1713
  conditions.push(notInConditions.join(" AND "));
1320
1714
  }
1321
1715
  return conditions;
@@ -1522,13 +1916,13 @@ function resolveToProvider2(config, registry = DEFAULT_PROVIDER_REGISTRY) {
1522
1916
  }
1523
1917
 
1524
1918
  // src/utils.ts
1525
- var log2 = createScopedLogger("caliper");
1919
+ var log3 = createScopedLogger("caliper");
1526
1920
 
1527
1921
  // src/lib/transport.ts
1528
1922
  class Transport extends BaseTransport {
1529
1923
  paths;
1530
1924
  constructor(config) {
1531
- super({ config, logger: log2 });
1925
+ super({ config, logger: log3 });
1532
1926
  this.paths = config.paths;
1533
1927
  }
1534
1928
  async requestPaginated(path, options = {}) {
@@ -1554,7 +1948,7 @@ __export(exports_external, {
1554
1948
  uuidv6: () => uuidv6,
1555
1949
  uuidv4: () => uuidv4,
1556
1950
  uuid: () => uuid2,
1557
- util: () => exports_util,
1951
+ util: () => exports_util2,
1558
1952
  url: () => url,
1559
1953
  uppercase: () => _uppercase,
1560
1954
  unknown: () => unknown,
@@ -1663,7 +2057,7 @@ __export(exports_external, {
1663
2057
  getErrorMap: () => getErrorMap,
1664
2058
  function: () => _function,
1665
2059
  fromJSONSchema: () => fromJSONSchema,
1666
- formatError: () => formatError,
2060
+ formatError: () => formatError2,
1667
2061
  float64: () => float64,
1668
2062
  float32: () => float32,
1669
2063
  flattenError: () => flattenError,
@@ -1789,7 +2183,7 @@ __export(exports_external, {
1789
2183
  var exports_core2 = {};
1790
2184
  __export(exports_core2, {
1791
2185
  version: () => version,
1792
- util: () => exports_util,
2186
+ util: () => exports_util2,
1793
2187
  treeifyError: () => treeifyError,
1794
2188
  toJSONSchema: () => toJSONSchema,
1795
2189
  toDotPath: () => toDotPath,
@@ -1813,7 +2207,7 @@ __export(exports_core2, {
1813
2207
  initializeContext: () => initializeContext,
1814
2208
  globalRegistry: () => globalRegistry,
1815
2209
  globalConfig: () => globalConfig,
1816
- formatError: () => formatError,
2210
+ formatError: () => formatError2,
1817
2211
  flattenError: () => flattenError,
1818
2212
  finalize: () => finalize,
1819
2213
  extractDefs: () => extractDefs,
@@ -2140,8 +2534,8 @@ function config(newConfig) {
2140
2534
  return globalConfig;
2141
2535
  }
2142
2536
  // ../../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/core/util.js
2143
- var exports_util = {};
2144
- __export(exports_util, {
2537
+ var exports_util2 = {};
2538
+ __export(exports_util2, {
2145
2539
  unwrapMessage: () => unwrapMessage,
2146
2540
  uint8ArrayToHex: () => uint8ArrayToHex,
2147
2541
  uint8ArrayToBase64url: () => uint8ArrayToBase64url,
@@ -2171,7 +2565,7 @@ __export(exports_util, {
2171
2565
  joinValues: () => joinValues,
2172
2566
  issue: () => issue2,
2173
2567
  isPlainObject: () => isPlainObject,
2174
- isObject: () => isObject,
2568
+ isObject: () => isObject2,
2175
2569
  hexToUint8Array: () => hexToUint8Array,
2176
2570
  getSizableOrigin: () => getSizableOrigin,
2177
2571
  getParsedType: () => getParsedType,
@@ -2340,7 +2734,7 @@ function slugify(input) {
2340
2734
  return input.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, "");
2341
2735
  }
2342
2736
  var captureStackTrace = "captureStackTrace" in Error ? Error.captureStackTrace : (..._args) => {};
2343
- function isObject(data) {
2737
+ function isObject2(data) {
2344
2738
  return typeof data === "object" && data !== null && !Array.isArray(data);
2345
2739
  }
2346
2740
  var allowsEval = cached(() => {
@@ -2356,7 +2750,7 @@ var allowsEval = cached(() => {
2356
2750
  }
2357
2751
  });
2358
2752
  function isPlainObject(o) {
2359
- if (isObject(o) === false)
2753
+ if (isObject2(o) === false)
2360
2754
  return false;
2361
2755
  const ctor = o.constructor;
2362
2756
  if (ctor === undefined)
@@ -2364,7 +2758,7 @@ function isPlainObject(o) {
2364
2758
  if (typeof ctor !== "function")
2365
2759
  return true;
2366
2760
  const prot = ctor.prototype;
2367
- if (isObject(prot) === false)
2761
+ if (isObject2(prot) === false)
2368
2762
  return false;
2369
2763
  if (Object.prototype.hasOwnProperty.call(prot, "isPrototypeOf") === false) {
2370
2764
  return false;
@@ -2845,7 +3239,7 @@ function flattenError(error, mapper = (issue3) => issue3.message) {
2845
3239
  }
2846
3240
  return { formErrors, fieldErrors };
2847
3241
  }
2848
- function formatError(error, mapper = (issue3) => issue3.message) {
3242
+ function formatError2(error, mapper = (issue3) => issue3.message) {
2849
3243
  const fieldErrors = { _errors: [] };
2850
3244
  const processError = (error2) => {
2851
3245
  for (const issue3 of error2.issues) {
@@ -4370,15 +4764,15 @@ var $ZodDate = /* @__PURE__ */ $constructor("$ZodDate", (inst, def) => {
4370
4764
  } catch (_err) {}
4371
4765
  }
4372
4766
  const input = payload.value;
4373
- const isDate = input instanceof Date;
4374
- const isValidDate = isDate && !Number.isNaN(input.getTime());
4767
+ const isDate2 = input instanceof Date;
4768
+ const isValidDate = isDate2 && !Number.isNaN(input.getTime());
4375
4769
  if (isValidDate)
4376
4770
  return payload;
4377
4771
  payload.issues.push({
4378
4772
  expected: "date",
4379
4773
  code: "invalid_type",
4380
4774
  input,
4381
- ...isDate ? { received: "Invalid Date" } : {},
4775
+ ...isDate2 ? { received: "Invalid Date" } : {},
4382
4776
  inst
4383
4777
  });
4384
4778
  return payload;
@@ -4517,13 +4911,13 @@ var $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
4517
4911
  }
4518
4912
  return propValues;
4519
4913
  });
4520
- const isObject2 = isObject;
4914
+ const isObject3 = isObject2;
4521
4915
  const catchall = def.catchall;
4522
4916
  let value;
4523
4917
  inst._zod.parse = (payload, ctx) => {
4524
4918
  value ?? (value = _normalized.value);
4525
4919
  const input = payload.value;
4526
- if (!isObject2(input)) {
4920
+ if (!isObject3(input)) {
4527
4921
  payload.issues.push({
4528
4922
  expected: "object",
4529
4923
  code: "invalid_type",
@@ -4621,7 +5015,7 @@ var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) =>
4621
5015
  return (payload, ctx) => fn(shape, payload, ctx);
4622
5016
  };
4623
5017
  let fastpass;
4624
- const isObject2 = isObject;
5018
+ const isObject3 = isObject2;
4625
5019
  const jit = !globalConfig.jitless;
4626
5020
  const allowsEval2 = allowsEval;
4627
5021
  const fastEnabled = jit && allowsEval2.value;
@@ -4630,7 +5024,7 @@ var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) =>
4630
5024
  inst._zod.parse = (payload, ctx) => {
4631
5025
  value ?? (value = _normalized.value);
4632
5026
  const input = payload.value;
4633
- if (!isObject2(input)) {
5027
+ if (!isObject3(input)) {
4634
5028
  payload.issues.push({
4635
5029
  expected: "object",
4636
5030
  code: "invalid_type",
@@ -4808,7 +5202,7 @@ var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnio
4808
5202
  });
4809
5203
  inst._zod.parse = (payload, ctx) => {
4810
5204
  const input = payload.value;
4811
- if (!isObject(input)) {
5205
+ if (!isObject2(input)) {
4812
5206
  payload.issues.push({
4813
5207
  code: "invalid_type",
4814
5208
  expected: "object",
@@ -11902,10 +12296,10 @@ function _property(property, schema, params) {
11902
12296
  ...normalizeParams(params)
11903
12297
  });
11904
12298
  }
11905
- function _mime(types, params) {
12299
+ function _mime(types2, params) {
11906
12300
  return new $ZodCheckMimeType({
11907
12301
  check: "mime_type",
11908
- mime: types,
12302
+ mime: types2,
11909
12303
  ...normalizeParams(params)
11910
12304
  });
11911
12305
  }
@@ -12228,13 +12622,13 @@ function _stringbool(Classes, _params) {
12228
12622
  });
12229
12623
  return codec;
12230
12624
  }
12231
- function _stringFormat(Class2, format, fnOrRegex, _params = {}) {
12625
+ function _stringFormat(Class2, format2, fnOrRegex, _params = {}) {
12232
12626
  const params = normalizeParams(_params);
12233
12627
  const def = {
12234
12628
  ...normalizeParams(_params),
12235
12629
  check: "string_format",
12236
12630
  type: "string",
12237
- format,
12631
+ format: format2,
12238
12632
  fn: typeof fnOrRegex === "function" ? fnOrRegex : (val) => fnOrRegex.test(val),
12239
12633
  ...params
12240
12634
  };
@@ -12600,16 +12994,16 @@ var formatMap = {
12600
12994
  var stringProcessor = (schema, ctx, _json, _params) => {
12601
12995
  const json = _json;
12602
12996
  json.type = "string";
12603
- const { minimum, maximum, format, patterns: patterns2, contentEncoding } = schema._zod.bag;
12997
+ const { minimum, maximum, format: format2, patterns: patterns2, contentEncoding } = schema._zod.bag;
12604
12998
  if (typeof minimum === "number")
12605
12999
  json.minLength = minimum;
12606
13000
  if (typeof maximum === "number")
12607
13001
  json.maxLength = maximum;
12608
- if (format) {
12609
- json.format = formatMap[format] ?? format;
13002
+ if (format2) {
13003
+ json.format = formatMap[format2] ?? format2;
12610
13004
  if (json.format === "")
12611
13005
  delete json.format;
12612
- if (format === "time") {
13006
+ if (format2 === "time") {
12613
13007
  delete json.format;
12614
13008
  }
12615
13009
  }
@@ -12631,8 +13025,8 @@ var stringProcessor = (schema, ctx, _json, _params) => {
12631
13025
  };
12632
13026
  var numberProcessor = (schema, ctx, _json, _params) => {
12633
13027
  const json = _json;
12634
- const { minimum, maximum, format, multipleOf, exclusiveMaximum, exclusiveMinimum } = schema._zod.bag;
12635
- if (typeof format === "string" && format.includes("int"))
13028
+ const { minimum, maximum, format: format2, multipleOf, exclusiveMaximum, exclusiveMinimum } = schema._zod.bag;
13029
+ if (typeof format2 === "string" && format2.includes("int"))
12636
13030
  json.type = "integer";
12637
13031
  else
12638
13032
  json.type = "number";
@@ -13445,7 +13839,7 @@ var initializer2 = (inst, issues) => {
13445
13839
  inst.name = "ZodError";
13446
13840
  Object.defineProperties(inst, {
13447
13841
  format: {
13448
- value: (mapper) => formatError(inst, mapper)
13842
+ value: (mapper) => formatError2(inst, mapper)
13449
13843
  },
13450
13844
  flatten: {
13451
13845
  value: (mapper) => flattenError(inst, mapper)
@@ -13502,7 +13896,7 @@ var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
13502
13896
  inst.type = def.type;
13503
13897
  Object.defineProperty(inst, "_def", { value: def });
13504
13898
  inst.check = (...checks2) => {
13505
- return inst.clone(exports_util.mergeDefs(def, {
13899
+ return inst.clone(exports_util2.mergeDefs(def, {
13506
13900
  checks: [
13507
13901
  ...def.checks ?? [],
13508
13902
  ...checks2.map((ch) => typeof ch === "function" ? { _zod: { check: ch, def: { check: "custom" }, onattach: [] } } : ch)
@@ -13675,7 +14069,7 @@ function httpUrl(params) {
13675
14069
  return _url(ZodURL, {
13676
14070
  protocol: /^https?$/,
13677
14071
  hostname: exports_regexes.domain,
13678
- ...exports_util.normalizeParams(params)
14072
+ ...exports_util2.normalizeParams(params)
13679
14073
  });
13680
14074
  }
13681
14075
  var ZodEmoji = /* @__PURE__ */ $constructor("ZodEmoji", (inst, def) => {
@@ -13794,8 +14188,8 @@ var ZodCustomStringFormat = /* @__PURE__ */ $constructor("ZodCustomStringFormat"
13794
14188
  $ZodCustomStringFormat.init(inst, def);
13795
14189
  ZodStringFormat.init(inst, def);
13796
14190
  });
13797
- function stringFormat(format, fnOrRegex, _params = {}) {
13798
- return _stringFormat(ZodCustomStringFormat, format, fnOrRegex, _params);
14191
+ function stringFormat(format2, fnOrRegex, _params = {}) {
14192
+ return _stringFormat(ZodCustomStringFormat, format2, fnOrRegex, _params);
13799
14193
  }
13800
14194
  function hostname2(_params) {
13801
14195
  return _stringFormat(ZodCustomStringFormat, "hostname", exports_regexes.hostname, _params);
@@ -13805,11 +14199,11 @@ function hex2(_params) {
13805
14199
  }
13806
14200
  function hash(alg, params) {
13807
14201
  const enc = params?.enc ?? "hex";
13808
- const format = `${alg}_${enc}`;
13809
- const regex = exports_regexes[format];
14202
+ const format2 = `${alg}_${enc}`;
14203
+ const regex = exports_regexes[format2];
13810
14204
  if (!regex)
13811
- throw new Error(`Unrecognized hash format: ${format}`);
13812
- return _stringFormat(ZodCustomStringFormat, format, regex, params);
14205
+ throw new Error(`Unrecognized hash format: ${format2}`);
14206
+ return _stringFormat(ZodCustomStringFormat, format2, regex, params);
13813
14207
  }
13814
14208
  var ZodNumber = /* @__PURE__ */ $constructor("ZodNumber", (inst, def) => {
13815
14209
  $ZodNumber.init(inst, def);
@@ -13993,7 +14387,7 @@ var ZodObject = /* @__PURE__ */ $constructor("ZodObject", (inst, def) => {
13993
14387
  $ZodObjectJIT.init(inst, def);
13994
14388
  ZodType.init(inst, def);
13995
14389
  inst._zod.processJSONSchema = (ctx, json, params) => objectProcessor(inst, ctx, json, params);
13996
- exports_util.defineLazy(inst, "shape", () => {
14390
+ exports_util2.defineLazy(inst, "shape", () => {
13997
14391
  return def.shape;
13998
14392
  });
13999
14393
  inst.keyof = () => _enum2(Object.keys(inst._zod.def.shape));
@@ -14003,22 +14397,22 @@ var ZodObject = /* @__PURE__ */ $constructor("ZodObject", (inst, def) => {
14003
14397
  inst.strict = () => inst.clone({ ...inst._zod.def, catchall: never() });
14004
14398
  inst.strip = () => inst.clone({ ...inst._zod.def, catchall: undefined });
14005
14399
  inst.extend = (incoming) => {
14006
- return exports_util.extend(inst, incoming);
14400
+ return exports_util2.extend(inst, incoming);
14007
14401
  };
14008
14402
  inst.safeExtend = (incoming) => {
14009
- return exports_util.safeExtend(inst, incoming);
14403
+ return exports_util2.safeExtend(inst, incoming);
14010
14404
  };
14011
- inst.merge = (other) => exports_util.merge(inst, other);
14012
- inst.pick = (mask) => exports_util.pick(inst, mask);
14013
- inst.omit = (mask) => exports_util.omit(inst, mask);
14014
- inst.partial = (...args) => exports_util.partial(ZodOptional, inst, args[0]);
14015
- inst.required = (...args) => exports_util.required(ZodNonOptional, inst, args[0]);
14405
+ inst.merge = (other) => exports_util2.merge(inst, other);
14406
+ inst.pick = (mask) => exports_util2.pick(inst, mask);
14407
+ inst.omit = (mask) => exports_util2.omit(inst, mask);
14408
+ inst.partial = (...args) => exports_util2.partial(ZodOptional, inst, args[0]);
14409
+ inst.required = (...args) => exports_util2.required(ZodNonOptional, inst, args[0]);
14016
14410
  });
14017
14411
  function object(shape, params) {
14018
14412
  const def = {
14019
14413
  type: "object",
14020
14414
  shape: shape ?? {},
14021
- ...exports_util.normalizeParams(params)
14415
+ ...exports_util2.normalizeParams(params)
14022
14416
  };
14023
14417
  return new ZodObject(def);
14024
14418
  }
@@ -14027,7 +14421,7 @@ function strictObject(shape, params) {
14027
14421
  type: "object",
14028
14422
  shape,
14029
14423
  catchall: never(),
14030
- ...exports_util.normalizeParams(params)
14424
+ ...exports_util2.normalizeParams(params)
14031
14425
  });
14032
14426
  }
14033
14427
  function looseObject(shape, params) {
@@ -14035,7 +14429,7 @@ function looseObject(shape, params) {
14035
14429
  type: "object",
14036
14430
  shape,
14037
14431
  catchall: unknown(),
14038
- ...exports_util.normalizeParams(params)
14432
+ ...exports_util2.normalizeParams(params)
14039
14433
  });
14040
14434
  }
14041
14435
  var ZodUnion = /* @__PURE__ */ $constructor("ZodUnion", (inst, def) => {
@@ -14048,7 +14442,7 @@ function union(options, params) {
14048
14442
  return new ZodUnion({
14049
14443
  type: "union",
14050
14444
  options,
14051
- ...exports_util.normalizeParams(params)
14445
+ ...exports_util2.normalizeParams(params)
14052
14446
  });
14053
14447
  }
14054
14448
  var ZodXor = /* @__PURE__ */ $constructor("ZodXor", (inst, def) => {
@@ -14062,7 +14456,7 @@ function xor(options, params) {
14062
14456
  type: "union",
14063
14457
  options,
14064
14458
  inclusive: false,
14065
- ...exports_util.normalizeParams(params)
14459
+ ...exports_util2.normalizeParams(params)
14066
14460
  });
14067
14461
  }
14068
14462
  var ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("ZodDiscriminatedUnion", (inst, def) => {
@@ -14074,7 +14468,7 @@ function discriminatedUnion(discriminator, options, params) {
14074
14468
  type: "union",
14075
14469
  options,
14076
14470
  discriminator,
14077
- ...exports_util.normalizeParams(params)
14471
+ ...exports_util2.normalizeParams(params)
14078
14472
  });
14079
14473
  }
14080
14474
  var ZodIntersection = /* @__PURE__ */ $constructor("ZodIntersection", (inst, def) => {
@@ -14106,7 +14500,7 @@ function tuple(items, _paramsOrRest, _params) {
14106
14500
  type: "tuple",
14107
14501
  items,
14108
14502
  rest,
14109
- ...exports_util.normalizeParams(params)
14503
+ ...exports_util2.normalizeParams(params)
14110
14504
  });
14111
14505
  }
14112
14506
  var ZodRecord = /* @__PURE__ */ $constructor("ZodRecord", (inst, def) => {
@@ -14121,7 +14515,7 @@ function record(keyType, valueType, params) {
14121
14515
  type: "record",
14122
14516
  keyType,
14123
14517
  valueType,
14124
- ...exports_util.normalizeParams(params)
14518
+ ...exports_util2.normalizeParams(params)
14125
14519
  });
14126
14520
  }
14127
14521
  function partialRecord(keyType, valueType, params) {
@@ -14131,7 +14525,7 @@ function partialRecord(keyType, valueType, params) {
14131
14525
  type: "record",
14132
14526
  keyType: k,
14133
14527
  valueType,
14134
- ...exports_util.normalizeParams(params)
14528
+ ...exports_util2.normalizeParams(params)
14135
14529
  });
14136
14530
  }
14137
14531
  function looseRecord(keyType, valueType, params) {
@@ -14140,7 +14534,7 @@ function looseRecord(keyType, valueType, params) {
14140
14534
  keyType,
14141
14535
  valueType,
14142
14536
  mode: "loose",
14143
- ...exports_util.normalizeParams(params)
14537
+ ...exports_util2.normalizeParams(params)
14144
14538
  });
14145
14539
  }
14146
14540
  var ZodMap = /* @__PURE__ */ $constructor("ZodMap", (inst, def) => {
@@ -14159,7 +14553,7 @@ function map(keyType, valueType, params) {
14159
14553
  type: "map",
14160
14554
  keyType,
14161
14555
  valueType,
14162
- ...exports_util.normalizeParams(params)
14556
+ ...exports_util2.normalizeParams(params)
14163
14557
  });
14164
14558
  }
14165
14559
  var ZodSet = /* @__PURE__ */ $constructor("ZodSet", (inst, def) => {
@@ -14175,7 +14569,7 @@ function set(valueType, params) {
14175
14569
  return new ZodSet({
14176
14570
  type: "set",
14177
14571
  valueType,
14178
- ...exports_util.normalizeParams(params)
14572
+ ...exports_util2.normalizeParams(params)
14179
14573
  });
14180
14574
  }
14181
14575
  var ZodEnum = /* @__PURE__ */ $constructor("ZodEnum", (inst, def) => {
@@ -14196,7 +14590,7 @@ var ZodEnum = /* @__PURE__ */ $constructor("ZodEnum", (inst, def) => {
14196
14590
  return new ZodEnum({
14197
14591
  ...def,
14198
14592
  checks: [],
14199
- ...exports_util.normalizeParams(params),
14593
+ ...exports_util2.normalizeParams(params),
14200
14594
  entries: newEntries
14201
14595
  });
14202
14596
  };
@@ -14211,7 +14605,7 @@ var ZodEnum = /* @__PURE__ */ $constructor("ZodEnum", (inst, def) => {
14211
14605
  return new ZodEnum({
14212
14606
  ...def,
14213
14607
  checks: [],
14214
- ...exports_util.normalizeParams(params),
14608
+ ...exports_util2.normalizeParams(params),
14215
14609
  entries: newEntries
14216
14610
  });
14217
14611
  };
@@ -14221,14 +14615,14 @@ function _enum2(values, params) {
14221
14615
  return new ZodEnum({
14222
14616
  type: "enum",
14223
14617
  entries,
14224
- ...exports_util.normalizeParams(params)
14618
+ ...exports_util2.normalizeParams(params)
14225
14619
  });
14226
14620
  }
14227
14621
  function nativeEnum(entries, params) {
14228
14622
  return new ZodEnum({
14229
14623
  type: "enum",
14230
14624
  entries,
14231
- ...exports_util.normalizeParams(params)
14625
+ ...exports_util2.normalizeParams(params)
14232
14626
  });
14233
14627
  }
14234
14628
  var ZodLiteral = /* @__PURE__ */ $constructor("ZodLiteral", (inst, def) => {
@@ -14249,7 +14643,7 @@ function literal(value, params) {
14249
14643
  return new ZodLiteral({
14250
14644
  type: "literal",
14251
14645
  values: Array.isArray(value) ? value : [value],
14252
- ...exports_util.normalizeParams(params)
14646
+ ...exports_util2.normalizeParams(params)
14253
14647
  });
14254
14648
  }
14255
14649
  var ZodFile = /* @__PURE__ */ $constructor("ZodFile", (inst, def) => {
@@ -14258,7 +14652,7 @@ var ZodFile = /* @__PURE__ */ $constructor("ZodFile", (inst, def) => {
14258
14652
  inst._zod.processJSONSchema = (ctx, json, params) => fileProcessor(inst, ctx, json, params);
14259
14653
  inst.min = (size, params) => inst.check(_minSize(size, params));
14260
14654
  inst.max = (size, params) => inst.check(_maxSize(size, params));
14261
- inst.mime = (types, params) => inst.check(_mime(Array.isArray(types) ? types : [types], params));
14655
+ inst.mime = (types2, params) => inst.check(_mime(Array.isArray(types2) ? types2 : [types2], params));
14262
14656
  });
14263
14657
  function file(params) {
14264
14658
  return _file(ZodFile, params);
@@ -14273,7 +14667,7 @@ var ZodTransform = /* @__PURE__ */ $constructor("ZodTransform", (inst, def) => {
14273
14667
  }
14274
14668
  payload.addIssue = (issue3) => {
14275
14669
  if (typeof issue3 === "string") {
14276
- payload.issues.push(exports_util.issue(issue3, payload.value, def));
14670
+ payload.issues.push(exports_util2.issue(issue3, payload.value, def));
14277
14671
  } else {
14278
14672
  const _issue = issue3;
14279
14673
  if (_issue.fatal)
@@ -14281,7 +14675,7 @@ var ZodTransform = /* @__PURE__ */ $constructor("ZodTransform", (inst, def) => {
14281
14675
  _issue.code ?? (_issue.code = "custom");
14282
14676
  _issue.input ?? (_issue.input = payload.value);
14283
14677
  _issue.inst ?? (_issue.inst = inst);
14284
- payload.issues.push(exports_util.issue(_issue));
14678
+ payload.issues.push(exports_util2.issue(_issue));
14285
14679
  }
14286
14680
  };
14287
14681
  const output = def.transform(payload.value, payload);
@@ -14352,7 +14746,7 @@ function _default2(innerType, defaultValue) {
14352
14746
  type: "default",
14353
14747
  innerType,
14354
14748
  get defaultValue() {
14355
- return typeof defaultValue === "function" ? defaultValue() : exports_util.shallowClone(defaultValue);
14749
+ return typeof defaultValue === "function" ? defaultValue() : exports_util2.shallowClone(defaultValue);
14356
14750
  }
14357
14751
  });
14358
14752
  }
@@ -14367,7 +14761,7 @@ function prefault(innerType, defaultValue) {
14367
14761
  type: "prefault",
14368
14762
  innerType,
14369
14763
  get defaultValue() {
14370
- return typeof defaultValue === "function" ? defaultValue() : exports_util.shallowClone(defaultValue);
14764
+ return typeof defaultValue === "function" ? defaultValue() : exports_util2.shallowClone(defaultValue);
14371
14765
  }
14372
14766
  });
14373
14767
  }
@@ -14381,7 +14775,7 @@ function nonoptional(innerType, params) {
14381
14775
  return new ZodNonOptional({
14382
14776
  type: "nonoptional",
14383
14777
  innerType,
14384
- ...exports_util.normalizeParams(params)
14778
+ ...exports_util2.normalizeParams(params)
14385
14779
  });
14386
14780
  }
14387
14781
  var ZodSuccess = /* @__PURE__ */ $constructor("ZodSuccess", (inst, def) => {
@@ -14466,7 +14860,7 @@ function templateLiteral(parts, params) {
14466
14860
  return new ZodTemplateLiteral({
14467
14861
  type: "template_literal",
14468
14862
  parts,
14469
- ...exports_util.normalizeParams(params)
14863
+ ...exports_util2.normalizeParams(params)
14470
14864
  });
14471
14865
  }
14472
14866
  var ZodLazy = /* @__PURE__ */ $constructor("ZodLazy", (inst, def) => {
@@ -14534,7 +14928,7 @@ function _instanceof(cls, params = {}) {
14534
14928
  check: "custom",
14535
14929
  fn: (data) => data instanceof cls,
14536
14930
  abort: true,
14537
- ...exports_util.normalizeParams(params)
14931
+ ...exports_util2.normalizeParams(params)
14538
14932
  });
14539
14933
  inst._zod.bag.Class = cls;
14540
14934
  inst._zod.check = (payload) => {
@@ -14768,52 +15162,52 @@ function convertBaseSchema(schema, ctx) {
14768
15162
  case "string": {
14769
15163
  let stringSchema = z.string();
14770
15164
  if (schema.format) {
14771
- const format = schema.format;
14772
- if (format === "email") {
15165
+ const format2 = schema.format;
15166
+ if (format2 === "email") {
14773
15167
  stringSchema = stringSchema.check(z.email());
14774
- } else if (format === "uri" || format === "uri-reference") {
15168
+ } else if (format2 === "uri" || format2 === "uri-reference") {
14775
15169
  stringSchema = stringSchema.check(z.url());
14776
- } else if (format === "uuid" || format === "guid") {
15170
+ } else if (format2 === "uuid" || format2 === "guid") {
14777
15171
  stringSchema = stringSchema.check(z.uuid());
14778
- } else if (format === "date-time") {
15172
+ } else if (format2 === "date-time") {
14779
15173
  stringSchema = stringSchema.check(z.iso.datetime());
14780
- } else if (format === "date") {
15174
+ } else if (format2 === "date") {
14781
15175
  stringSchema = stringSchema.check(z.iso.date());
14782
- } else if (format === "time") {
15176
+ } else if (format2 === "time") {
14783
15177
  stringSchema = stringSchema.check(z.iso.time());
14784
- } else if (format === "duration") {
15178
+ } else if (format2 === "duration") {
14785
15179
  stringSchema = stringSchema.check(z.iso.duration());
14786
- } else if (format === "ipv4") {
15180
+ } else if (format2 === "ipv4") {
14787
15181
  stringSchema = stringSchema.check(z.ipv4());
14788
- } else if (format === "ipv6") {
15182
+ } else if (format2 === "ipv6") {
14789
15183
  stringSchema = stringSchema.check(z.ipv6());
14790
- } else if (format === "mac") {
15184
+ } else if (format2 === "mac") {
14791
15185
  stringSchema = stringSchema.check(z.mac());
14792
- } else if (format === "cidr") {
15186
+ } else if (format2 === "cidr") {
14793
15187
  stringSchema = stringSchema.check(z.cidrv4());
14794
- } else if (format === "cidr-v6") {
15188
+ } else if (format2 === "cidr-v6") {
14795
15189
  stringSchema = stringSchema.check(z.cidrv6());
14796
- } else if (format === "base64") {
15190
+ } else if (format2 === "base64") {
14797
15191
  stringSchema = stringSchema.check(z.base64());
14798
- } else if (format === "base64url") {
15192
+ } else if (format2 === "base64url") {
14799
15193
  stringSchema = stringSchema.check(z.base64url());
14800
- } else if (format === "e164") {
15194
+ } else if (format2 === "e164") {
14801
15195
  stringSchema = stringSchema.check(z.e164());
14802
- } else if (format === "jwt") {
15196
+ } else if (format2 === "jwt") {
14803
15197
  stringSchema = stringSchema.check(z.jwt());
14804
- } else if (format === "emoji") {
15198
+ } else if (format2 === "emoji") {
14805
15199
  stringSchema = stringSchema.check(z.emoji());
14806
- } else if (format === "nanoid") {
15200
+ } else if (format2 === "nanoid") {
14807
15201
  stringSchema = stringSchema.check(z.nanoid());
14808
- } else if (format === "cuid") {
15202
+ } else if (format2 === "cuid") {
14809
15203
  stringSchema = stringSchema.check(z.cuid());
14810
- } else if (format === "cuid2") {
15204
+ } else if (format2 === "cuid2") {
14811
15205
  stringSchema = stringSchema.check(z.cuid2());
14812
- } else if (format === "ulid") {
15206
+ } else if (format2 === "ulid") {
14813
15207
  stringSchema = stringSchema.check(z.ulid());
14814
- } else if (format === "xid") {
15208
+ } else if (format2 === "xid") {
14815
15209
  stringSchema = stringSchema.check(z.xid());
14816
- } else if (format === "ksuid") {
15210
+ } else if (format2 === "ksuid") {
14817
15211
  stringSchema = stringSchema.check(z.ksuid());
14818
15212
  }
14819
15213
  }
@@ -15256,6 +15650,8 @@ var ActivityCompletedInput = exports_external.object({
15256
15650
  metricsId: exports_external.string().optional(),
15257
15651
  id: exports_external.string().optional(),
15258
15652
  extensions: exports_external.record(exports_external.string(), exports_external.unknown()).optional(),
15653
+ edApp: exports_external.union([exports_external.string(), exports_external.record(exports_external.string(), exports_external.unknown())]).optional(),
15654
+ session: exports_external.union([exports_external.string(), exports_external.record(exports_external.string(), exports_external.unknown())]).optional(),
15259
15655
  attempt: exports_external.number().int().min(1).optional(),
15260
15656
  generatedExtensions: exports_external.object({
15261
15657
  pctCompleteApp: exports_external.number().optional()
@@ -15268,7 +15664,9 @@ var TimeSpentInput = exports_external.object({
15268
15664
  eventTime: IsoDateTimeString.optional(),
15269
15665
  metricsId: exports_external.string().optional(),
15270
15666
  id: exports_external.string().optional(),
15271
- extensions: exports_external.record(exports_external.string(), exports_external.unknown()).optional()
15667
+ extensions: exports_external.record(exports_external.string(), exports_external.unknown()).optional(),
15668
+ edApp: exports_external.union([exports_external.string(), exports_external.record(exports_external.string(), exports_external.unknown())]).optional(),
15669
+ session: exports_external.union([exports_external.string(), exports_external.record(exports_external.string(), exports_external.unknown())]).optional()
15272
15670
  }).strict();
15273
15671
  var TimebackEvent = exports_external.union([TimebackActivityEvent, TimebackTimeSpentEvent]);
15274
15672
  var CaliperEnvelope = exports_external.object({
@@ -15458,7 +15856,7 @@ var TimebackConfig = exports_external.object({
15458
15856
  path: ["courses"]
15459
15857
  });
15460
15858
  // ../../types/src/zod/edubridge.ts
15461
- var EdubridgeDateString = IsoDateTimeString;
15859
+ var EdubridgeDateString = exports_external.union([IsoDateTimeString, IsoDateString]);
15462
15860
  var EduBridgeEnrollment = exports_external.object({
15463
15861
  id: exports_external.string(),
15464
15862
  role: exports_external.string(),
@@ -16457,7 +16855,9 @@ function createActivityEvent(input) {
16457
16855
  ...input.attempt === undefined ? {} : { attempt: input.attempt },
16458
16856
  ...input.generatedExtensions ? { extensions: input.generatedExtensions } : {}
16459
16857
  },
16460
- extensions: input.extensions
16858
+ extensions: input.extensions,
16859
+ ...input.edApp === undefined ? {} : { edApp: input.edApp },
16860
+ ...input.session === undefined ? {} : { session: input.session }
16461
16861
  };
16462
16862
  }
16463
16863
  function createTimeSpentEvent(input) {
@@ -16477,7 +16877,9 @@ function createTimeSpentEvent(input) {
16477
16877
  type: "TimebackTimeSpentMetricsCollection",
16478
16878
  items: input.metrics
16479
16879
  },
16480
- extensions: input.extensions
16880
+ extensions: input.extensions,
16881
+ ...input.edApp === undefined ? {} : { edApp: input.edApp },
16882
+ ...input.session === undefined ? {} : { session: input.session }
16481
16883
  };
16482
16884
  }
16483
16885
 
@@ -16491,7 +16893,7 @@ class Paginator2 extends Paginator {
16491
16893
  path,
16492
16894
  params: requestParams,
16493
16895
  max,
16494
- logger: log2
16896
+ logger: log3
16495
16897
  });
16496
16898
  }
16497
16899
  }
@@ -16514,12 +16916,12 @@ class EventsResource {
16514
16916
  }
16515
16917
  async sendEnvelope(envelope) {
16516
16918
  validateWithSchema(CaliperEnvelopeInput, envelope, "caliper envelope");
16517
- log2.debug("Sending Caliper envelope", {
16919
+ log3.debug("Sending Caliper envelope", {
16518
16920
  sensor: envelope.sensor,
16519
16921
  eventCount: envelope.data.length
16520
16922
  });
16521
16923
  const response = await this.transport.request(this.transport.paths.send, { method: "POST", body: envelope });
16522
- log2.debug("Events queued for processing", { jobId: response.jobId });
16924
+ log3.debug("Events queued for processing", { jobId: response.jobId });
16523
16925
  return { jobId: response.jobId };
16524
16926
  }
16525
16927
  async validate(envelope) {
@@ -16528,7 +16930,7 @@ class EventsResource {
16528
16930
  throw new Error("validate() is not supported on this platform");
16529
16931
  }
16530
16932
  validateWithSchema(CaliperEnvelopeInput, envelope, "caliper envelope");
16531
- log2.debug("Validating Caliper envelope", {
16933
+ log3.debug("Validating Caliper envelope", {
16532
16934
  sensor: envelope.sensor,
16533
16935
  eventCount: envelope.data.length
16534
16936
  });
@@ -16536,7 +16938,7 @@ class EventsResource {
16536
16938
  method: "POST",
16537
16939
  body: envelope
16538
16940
  });
16539
- log2.debug("Validation complete", { status: response.status });
16941
+ log3.debug("Validation complete", { status: response.status });
16540
16942
  return response;
16541
16943
  }
16542
16944
  async list(params = {}) {
@@ -16545,7 +16947,7 @@ class EventsResource {
16545
16947
  throw new Error("list() is not supported on this platform");
16546
16948
  }
16547
16949
  validateWithSchema(CaliperListEventsParams, params, "list events params");
16548
- log2.debug("Listing events", { params });
16950
+ log3.debug("Listing events", { params });
16549
16951
  const queryParams = {};
16550
16952
  if (params.limit !== undefined)
16551
16953
  queryParams.limit = params.limit;
@@ -16577,7 +16979,7 @@ class EventsResource {
16577
16979
  const { max, ...filterParams } = params;
16578
16980
  validateWithSchema(CaliperListEventsParams, filterParams, "list events params");
16579
16981
  validateOffsetListParams(params);
16580
- log2.debug("Streaming events", { params });
16982
+ log3.debug("Streaming events", { params });
16581
16983
  const queryParams = {};
16582
16984
  if (filterParams.limit !== undefined)
16583
16985
  queryParams.limit = filterParams.limit;
@@ -16604,7 +17006,7 @@ class EventsResource {
16604
17006
  throw new Error("get() is not supported on this platform");
16605
17007
  }
16606
17008
  validateNonEmptyString(externalId, "externalId");
16607
- log2.debug("Getting event", { externalId });
17009
+ log3.debug("Getting event", { externalId });
16608
17010
  const path = getPath.replace("{id}", encodeURIComponent(externalId));
16609
17011
  const response = await this.transport.request(path);
16610
17012
  if (!response.event) {
@@ -16615,7 +17017,7 @@ class EventsResource {
16615
17017
  sendActivity(sensor, input) {
16616
17018
  validateWithSchema(ActivityCompletedInput, input, "activity event");
16617
17019
  const event = createActivityEvent(input);
16618
- log2.debug("Sending ActivityCompletedEvent", {
17020
+ log3.debug("Sending ActivityCompletedEvent", {
16619
17021
  eventId: event.id,
16620
17022
  actor: input.actor.email,
16621
17023
  subject: input.object.subject,
@@ -16626,7 +17028,7 @@ class EventsResource {
16626
17028
  sendTimeSpent(sensor, input) {
16627
17029
  validateWithSchema(TimeSpentInput, input, "time spent event");
16628
17030
  const event = createTimeSpentEvent(input);
16629
- log2.debug("Sending TimeSpentEvent", {
17031
+ log3.debug("Sending TimeSpentEvent", {
16630
17032
  eventId: event.id,
16631
17033
  actor: input.actor.email,
16632
17034
  subject: input.object.subject,
@@ -16647,7 +17049,7 @@ class JobsResource {
16647
17049
  throw new Error("getStatus() is not supported on this platform");
16648
17050
  }
16649
17051
  validateNonEmptyString(jobId, "jobId");
16650
- log2.debug("Getting job status", { jobId });
17052
+ log3.debug("Getting job status", { jobId });
16651
17053
  const path = jobStatusPath.replace("{id}", encodeURIComponent(jobId));
16652
17054
  const response = await this.transport.request(path);
16653
17055
  return response.job;
@@ -16657,15 +17059,15 @@ class JobsResource {
16657
17059
  validateWaitForCompletionOptions(options);
16658
17060
  const { timeoutMs = 30000, pollIntervalMs = 1000 } = options;
16659
17061
  const startTime = Date.now();
16660
- log2.debug("Waiting for job completion", { jobId, timeoutMs, pollIntervalMs });
17062
+ log3.debug("Waiting for job completion", { jobId, timeoutMs, pollIntervalMs });
16661
17063
  while (Date.now() - startTime < timeoutMs) {
16662
17064
  const status = await this.getStatus(jobId);
16663
17065
  if (status.state === "completed") {
16664
- log2.info("Job completed", { jobId });
17066
+ log3.info("Job completed", { jobId });
16665
17067
  return status;
16666
17068
  }
16667
17069
  if (status.state === "failed") {
16668
- log2.error("Job failed", { jobId });
17070
+ log3.error("Job failed", { jobId });
16669
17071
  throw new Error(`Job ${jobId} failed`);
16670
17072
  }
16671
17073
  await new Promise((resolve) => {
@@ -16705,7 +17107,7 @@ function createCaliperClient(registry2 = DEFAULT_PROVIDER_REGISTRY) {
16705
17107
  const resolved = resolveToProvider2(config3, registry2);
16706
17108
  if (resolved.mode === "transport") {
16707
17109
  this.transport = resolved.transport;
16708
- log2.info("Client initialized with custom transport");
17110
+ log3.info("Client initialized with custom transport");
16709
17111
  } else {
16710
17112
  const { provider } = resolved;
16711
17113
  const { baseUrl, paths } = provider.getEndpointWithPaths("caliper");
@@ -16720,7 +17122,7 @@ function createCaliperClient(registry2 = DEFAULT_PROVIDER_REGISTRY) {
16720
17122
  timeout: provider.timeout,
16721
17123
  paths
16722
17124
  });
16723
- log2.info("Client initialized", {
17125
+ log3.info("Client initialized", {
16724
17126
  platform: provider.platform,
16725
17127
  env: provider.env,
16726
17128
  baseUrl