@timeback/webhooks 0.1.2-beta.20260305053803 → 0.1.2-beta.20260309034759

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.
@@ -0,0 +1,25 @@
1
+ var __create = Object.create;
2
+ var __getProtoOf = Object.getPrototypeOf;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __toESM = (mod, isNodeMode, target) => {
7
+ target = mod != null ? __create(__getProtoOf(mod)) : {};
8
+ const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
9
+ for (let key of __getOwnPropNames(mod))
10
+ if (!__hasOwnProp.call(to, key))
11
+ __defProp(to, key, {
12
+ get: () => mod[key],
13
+ enumerable: true
14
+ });
15
+ return to;
16
+ };
17
+ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
18
+ get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
19
+ }) : x)(function(x) {
20
+ if (typeof require !== "undefined")
21
+ return require.apply(this, arguments);
22
+ throw Error('Dynamic require of "' + x + '" is not supported');
23
+ });
24
+
25
+ export { __toESM, __require };
@@ -0,0 +1,408 @@
1
+ import"./chunk-6jf1natv.js";
2
+
3
+ // node:util
4
+ var formatRegExp = /%[sdj%]/g;
5
+ function format(f, ...args) {
6
+ if (!isString(f)) {
7
+ var objects = [f];
8
+ for (var i = 0;i < args.length; i++)
9
+ objects.push(inspect(args[i]));
10
+ return objects.join(" ");
11
+ }
12
+ var i = 0, len = args.length, str = String(f).replace(formatRegExp, function(x2) {
13
+ if (x2 === "%%")
14
+ return "%";
15
+ if (i >= len)
16
+ return x2;
17
+ switch (x2) {
18
+ case "%s":
19
+ return String(args[i++]);
20
+ case "%d":
21
+ return Number(args[i++]);
22
+ case "%j":
23
+ try {
24
+ return JSON.stringify(args[i++]);
25
+ } catch (_) {
26
+ return "[Circular]";
27
+ }
28
+ default:
29
+ return x2;
30
+ }
31
+ });
32
+ for (var x = args[i];i < len; x = args[++i])
33
+ if (isNull(x) || !isObject(x))
34
+ str += " " + x;
35
+ else
36
+ str += " " + inspect(x);
37
+ return str;
38
+ }
39
+ function deprecate(fn, msg) {
40
+ if (typeof process > "u" || process?.noDeprecation === true)
41
+ return fn;
42
+ var warned = false;
43
+ function deprecated(...args) {
44
+ if (!warned) {
45
+ if (process.throwDeprecation)
46
+ throw Error(msg);
47
+ else if (process.traceDeprecation)
48
+ console.trace(msg);
49
+ else
50
+ console.error(msg);
51
+ warned = true;
52
+ }
53
+ return fn.apply(this, ...args);
54
+ }
55
+ return deprecated;
56
+ }
57
+ var debuglog = ((debugs = {}, debugEnvRegex = {}, debugEnv) => ((debugEnv = typeof process < "u" && false) && (debugEnv = debugEnv.replace(/[|\\{}()[\]^$+?.]/g, "\\$&").replace(/\*/g, ".*").replace(/,/g, "$|^").toUpperCase()), debugEnvRegex = new RegExp("^" + debugEnv + "$", "i"), (set) => {
58
+ if (set = set.toUpperCase(), !debugs[set])
59
+ if (debugEnvRegex.test(set))
60
+ debugs[set] = function(...args) {
61
+ console.error("%s: %s", set, pid, format.apply(null, ...args));
62
+ };
63
+ else
64
+ debugs[set] = function() {};
65
+ return debugs[set];
66
+ }))();
67
+ var 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) {
68
+ var ctx = { seen: [], stylize: stylizeNoColor };
69
+ if (rest.length >= 1)
70
+ ctx.depth = rest[0];
71
+ if (rest.length >= 2)
72
+ ctx.colors = rest[1];
73
+ if (isBoolean(opts))
74
+ ctx.showHidden = opts;
75
+ else if (opts)
76
+ _extend(ctx, opts);
77
+ if (isUndefined(ctx.showHidden))
78
+ ctx.showHidden = false;
79
+ if (isUndefined(ctx.depth))
80
+ ctx.depth = 2;
81
+ if (isUndefined(ctx.colors))
82
+ ctx.colors = false;
83
+ if (ctx.colors)
84
+ ctx.stylize = stylizeWithColor;
85
+ return formatValue(ctx, obj, ctx.depth);
86
+ });
87
+ function stylizeWithColor(str, styleType) {
88
+ var style = inspect.styles[styleType];
89
+ if (style)
90
+ return "\x1B[" + inspect.colors[style][0] + "m" + str + "\x1B[" + inspect.colors[style][1] + "m";
91
+ else
92
+ return str;
93
+ }
94
+ function stylizeNoColor(str, styleType) {
95
+ return str;
96
+ }
97
+ function arrayToHash(array) {
98
+ var hash = {};
99
+ return array.forEach(function(val, idx) {
100
+ hash[val] = true;
101
+ }), hash;
102
+ }
103
+ function formatValue(ctx, value, recurseTimes) {
104
+ if (ctx.customInspect && value && isFunction(value.inspect) && value.inspect !== inspect && !(value.constructor && value.constructor.prototype === value)) {
105
+ var ret = value.inspect(recurseTimes, ctx);
106
+ if (!isString(ret))
107
+ ret = formatValue(ctx, ret, recurseTimes);
108
+ return ret;
109
+ }
110
+ var primitive = formatPrimitive(ctx, value);
111
+ if (primitive)
112
+ return primitive;
113
+ var keys = Object.keys(value), visibleKeys = arrayToHash(keys);
114
+ if (ctx.showHidden)
115
+ keys = Object.getOwnPropertyNames(value);
116
+ if (isError(value) && (keys.indexOf("message") >= 0 || keys.indexOf("description") >= 0))
117
+ return formatError(value);
118
+ if (keys.length === 0) {
119
+ if (isFunction(value)) {
120
+ var name = value.name ? ": " + value.name : "";
121
+ return ctx.stylize("[Function" + name + "]", "special");
122
+ }
123
+ if (isRegExp(value))
124
+ return ctx.stylize(RegExp.prototype.toString.call(value), "regexp");
125
+ if (isDate(value))
126
+ return ctx.stylize(Date.prototype.toString.call(value), "date");
127
+ if (isError(value))
128
+ return formatError(value);
129
+ }
130
+ var base = "", array = false, braces = ["{", "}"];
131
+ if (isArray(value))
132
+ array = true, braces = ["[", "]"];
133
+ if (isFunction(value)) {
134
+ var n = value.name ? ": " + value.name : "";
135
+ base = " [Function" + n + "]";
136
+ }
137
+ if (isRegExp(value))
138
+ base = " " + RegExp.prototype.toString.call(value);
139
+ if (isDate(value))
140
+ base = " " + Date.prototype.toUTCString.call(value);
141
+ if (isError(value))
142
+ base = " " + formatError(value);
143
+ if (keys.length === 0 && (!array || value.length == 0))
144
+ return braces[0] + base + braces[1];
145
+ if (recurseTimes < 0)
146
+ if (isRegExp(value))
147
+ return ctx.stylize(RegExp.prototype.toString.call(value), "regexp");
148
+ else
149
+ return ctx.stylize("[Object]", "special");
150
+ ctx.seen.push(value);
151
+ var output;
152
+ if (array)
153
+ output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);
154
+ else
155
+ output = keys.map(function(key) {
156
+ return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);
157
+ });
158
+ return ctx.seen.pop(), reduceToSingleString(output, base, braces);
159
+ }
160
+ function formatPrimitive(ctx, value) {
161
+ if (isUndefined(value))
162
+ return ctx.stylize("undefined", "undefined");
163
+ if (isString(value)) {
164
+ var simple = "'" + JSON.stringify(value).replace(/^"|"$/g, "").replace(/'/g, "\\'").replace(/\\"/g, '"') + "'";
165
+ return ctx.stylize(simple, "string");
166
+ }
167
+ if (isNumber(value))
168
+ return ctx.stylize("" + value, "number");
169
+ if (isBoolean(value))
170
+ return ctx.stylize("" + value, "boolean");
171
+ if (isNull(value))
172
+ return ctx.stylize("null", "null");
173
+ }
174
+ function formatError(value) {
175
+ return "[" + Error.prototype.toString.call(value) + "]";
176
+ }
177
+ function formatArray(ctx, value, recurseTimes, visibleKeys, keys) {
178
+ var output = [];
179
+ for (var i = 0, l = value.length;i < l; ++i)
180
+ if (hasOwnProperty(value, String(i)))
181
+ output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, String(i), true));
182
+ else
183
+ output.push("");
184
+ return keys.forEach(function(key) {
185
+ if (!key.match(/^\d+$/))
186
+ output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, key, true));
187
+ }), output;
188
+ }
189
+ function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {
190
+ var name, str, desc;
191
+ if (desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] }, desc.get)
192
+ if (desc.set)
193
+ str = ctx.stylize("[Getter/Setter]", "special");
194
+ else
195
+ str = ctx.stylize("[Getter]", "special");
196
+ else if (desc.set)
197
+ str = ctx.stylize("[Setter]", "special");
198
+ if (!hasOwnProperty(visibleKeys, key))
199
+ name = "[" + key + "]";
200
+ if (!str)
201
+ if (ctx.seen.indexOf(desc.value) < 0) {
202
+ if (isNull(recurseTimes))
203
+ str = formatValue(ctx, desc.value, null);
204
+ else
205
+ str = formatValue(ctx, desc.value, recurseTimes - 1);
206
+ if (str.indexOf(`
207
+ `) > -1)
208
+ if (array)
209
+ str = str.split(`
210
+ `).map(function(line) {
211
+ return " " + line;
212
+ }).join(`
213
+ `).slice(2);
214
+ else
215
+ str = `
216
+ ` + str.split(`
217
+ `).map(function(line) {
218
+ return " " + line;
219
+ }).join(`
220
+ `);
221
+ } else
222
+ str = ctx.stylize("[Circular]", "special");
223
+ if (isUndefined(name)) {
224
+ if (array && key.match(/^\d+$/))
225
+ return str;
226
+ if (name = JSON.stringify("" + key), name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/))
227
+ name = name.slice(1, -1), name = ctx.stylize(name, "name");
228
+ else
229
+ name = name.replace(/'/g, "\\'").replace(/\\"/g, '"').replace(/(^"|"$)/g, "'"), name = ctx.stylize(name, "string");
230
+ }
231
+ return name + ": " + str;
232
+ }
233
+ function reduceToSingleString(output, base, braces) {
234
+ var numLinesEst = 0, length = output.reduce(function(prev, cur) {
235
+ if (numLinesEst++, cur.indexOf(`
236
+ `) >= 0)
237
+ numLinesEst++;
238
+ return prev + cur.replace(/\u001b\[\d\d?m/g, "").length + 1;
239
+ }, 0);
240
+ if (length > 60)
241
+ return braces[0] + (base === "" ? "" : base + `
242
+ `) + " " + output.join(`,
243
+ `) + " " + braces[1];
244
+ return braces[0] + base + " " + output.join(", ") + " " + braces[1];
245
+ }
246
+ var types = () => {};
247
+ function isArray(ar) {
248
+ return Array.isArray(ar);
249
+ }
250
+ function isBoolean(arg) {
251
+ return typeof arg === "boolean";
252
+ }
253
+ function isNull(arg) {
254
+ return arg === null;
255
+ }
256
+ function isNullOrUndefined(arg) {
257
+ return arg == null;
258
+ }
259
+ function isNumber(arg) {
260
+ return typeof arg === "number";
261
+ }
262
+ function isString(arg) {
263
+ return typeof arg === "string";
264
+ }
265
+ function isSymbol(arg) {
266
+ return typeof arg === "symbol";
267
+ }
268
+ function isUndefined(arg) {
269
+ return arg === undefined;
270
+ }
271
+ function isRegExp(re) {
272
+ return isObject(re) && objectToString(re) === "[object RegExp]";
273
+ }
274
+ function isObject(arg) {
275
+ return typeof arg === "object" && arg !== null;
276
+ }
277
+ function isDate(d) {
278
+ return isObject(d) && objectToString(d) === "[object Date]";
279
+ }
280
+ function isError(e) {
281
+ return isObject(e) && (objectToString(e) === "[object Error]" || e instanceof Error);
282
+ }
283
+ function isFunction(arg) {
284
+ return typeof arg === "function";
285
+ }
286
+ function isPrimitive(arg) {
287
+ return arg === null || typeof arg === "boolean" || typeof arg === "number" || typeof arg === "string" || typeof arg === "symbol" || typeof arg > "u";
288
+ }
289
+ function isBuffer(arg) {
290
+ return arg instanceof Buffer;
291
+ }
292
+ function objectToString(o) {
293
+ return Object.prototype.toString.call(o);
294
+ }
295
+ function pad(n) {
296
+ return n < 10 ? "0" + n.toString(10) : n.toString(10);
297
+ }
298
+ var months = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
299
+ function timestamp() {
300
+ var d = new Date, time = [pad(d.getHours()), pad(d.getMinutes()), pad(d.getSeconds())].join(":");
301
+ return [d.getDate(), months[d.getMonth()], time].join(" ");
302
+ }
303
+ function log(...args) {
304
+ console.log("%s - %s", timestamp(), format.apply(null, args));
305
+ }
306
+ function inherits(ctor, superCtor) {
307
+ if (superCtor)
308
+ ctor.super_ = superCtor, ctor.prototype = Object.create(superCtor.prototype, { constructor: { value: ctor, enumerable: false, writable: true, configurable: true } });
309
+ }
310
+ function _extend(origin, add) {
311
+ if (!add || !isObject(add))
312
+ return origin;
313
+ var keys = Object.keys(add), i = keys.length;
314
+ while (i--)
315
+ origin[keys[i]] = add[keys[i]];
316
+ return origin;
317
+ }
318
+ function hasOwnProperty(obj, prop) {
319
+ return Object.prototype.hasOwnProperty.call(obj, prop);
320
+ }
321
+ var promisify = ((x) => (x.custom = Symbol.for("nodejs.util.promisify.custom"), x))(function(original) {
322
+ if (typeof original !== "function")
323
+ throw TypeError('The "original" argument must be of type Function');
324
+ if (kCustomPromisifiedSymbol && original[kCustomPromisifiedSymbol]) {
325
+ var fn = original[kCustomPromisifiedSymbol];
326
+ if (typeof fn !== "function")
327
+ throw TypeError('The "nodejs.util.promisify.custom" argument must be of type Function');
328
+ return Object.defineProperty(fn, kCustomPromisifiedSymbol, { value: fn, enumerable: false, writable: false, configurable: true }), fn;
329
+ }
330
+ function fn(...args) {
331
+ var promiseResolve, promiseReject, promise = new Promise(function(resolve, reject) {
332
+ promiseResolve = resolve, promiseReject = reject;
333
+ });
334
+ args.push(function(err, value) {
335
+ if (err)
336
+ promiseReject(err);
337
+ else
338
+ promiseResolve(value);
339
+ });
340
+ try {
341
+ original.apply(this, args);
342
+ } catch (err) {
343
+ promiseReject(err);
344
+ }
345
+ return promise;
346
+ }
347
+ if (Object.setPrototypeOf(fn, Object.getPrototypeOf(original)), kCustomPromisifiedSymbol)
348
+ Object.defineProperty(fn, kCustomPromisifiedSymbol, { value: fn, enumerable: false, writable: false, configurable: true });
349
+ return Object.defineProperties(fn, Object.getOwnPropertyDescriptors(original));
350
+ });
351
+ function callbackifyOnRejected(reason, cb) {
352
+ if (!reason) {
353
+ var newReason = Error("Promise was rejected with a falsy value");
354
+ newReason.reason = reason, reason = newReason;
355
+ }
356
+ return cb(reason);
357
+ }
358
+ function callbackify(original) {
359
+ if (typeof original !== "function")
360
+ throw TypeError('The "original" argument must be of type Function');
361
+ function callbackified(...args) {
362
+ var maybeCb = args.pop();
363
+ if (typeof maybeCb !== "function")
364
+ throw TypeError("The last argument must be of type Function");
365
+ var self = this, cb = function(...args2) {
366
+ return maybeCb.apply(self, ...args2);
367
+ };
368
+ original.apply(this, args).then(function(ret) {
369
+ process.nextTick(cb.bind(null, null, ret));
370
+ }, function(rej) {
371
+ process.nextTick(callbackifyOnRejected.bind(null, rej, cb));
372
+ });
373
+ }
374
+ return Object.setPrototypeOf(callbackified, Object.getPrototypeOf(original)), Object.defineProperties(callbackified, Object.getOwnPropertyDescriptors(original)), callbackified;
375
+ }
376
+ var { TextEncoder, TextDecoder } = globalThis;
377
+ var util_default = { TextEncoder, TextDecoder, promisify, log, inherits, _extend, callbackifyOnRejected, callbackify };
378
+ export {
379
+ types,
380
+ promisify,
381
+ log,
382
+ isUndefined,
383
+ isSymbol,
384
+ isString,
385
+ isRegExp,
386
+ isPrimitive,
387
+ isObject,
388
+ isNumber,
389
+ isNullOrUndefined,
390
+ isNull,
391
+ isFunction,
392
+ isError,
393
+ isDate,
394
+ isBuffer,
395
+ isBoolean,
396
+ isArray,
397
+ inspect,
398
+ inherits,
399
+ format,
400
+ deprecate,
401
+ util_default as default,
402
+ debuglog,
403
+ callbackifyOnRejected,
404
+ callbackify,
405
+ _extend,
406
+ TextEncoder,
407
+ TextDecoder
408
+ };