@zuplo/cli 7.2.1 → 7.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/node_modules/@posthog/core/dist/error-tracking/coercers/object-coercer.d.ts.map +1 -1
- package/node_modules/@posthog/core/dist/error-tracking/coercers/object-coercer.js +3 -1
- package/node_modules/@posthog/core/dist/error-tracking/coercers/object-coercer.mjs +3 -1
- package/node_modules/@posthog/core/dist/utils/index.d.ts +0 -1
- package/node_modules/@posthog/core/dist/utils/index.d.ts.map +1 -1
- package/node_modules/@posthog/core/dist/utils/index.js +0 -14
- package/node_modules/@posthog/core/dist/utils/index.mjs +1 -2
- package/node_modules/@posthog/core/package.json +1 -1
- package/node_modules/@posthog/core/src/error-tracking/coercers/object-coercer.ts +5 -1
- package/node_modules/@posthog/core/src/error-tracking/error-properties-builder.coerce.spec.ts +36 -0
- package/node_modules/@posthog/core/src/utils/index.ts +0 -4
- package/node_modules/@zuplo/core/customer.cli.minified.js +143 -143
- package/node_modules/@zuplo/core/index.minified.js +144 -144
- package/node_modules/@zuplo/core/package.json +1 -1
- package/node_modules/@zuplo/graphql/package.json +1 -1
- package/node_modules/@zuplo/openapi-tools/package.json +1 -1
- package/node_modules/@zuplo/otel/package.json +1 -1
- package/node_modules/@zuplo/runtime/out/esm/{chunk-GK3X4WPN.js → chunk-TPXAFGLU.js} +99 -99
- package/node_modules/@zuplo/runtime/out/esm/chunk-TPXAFGLU.js.map +1 -0
- package/node_modules/@zuplo/runtime/out/esm/index.js +1 -1
- package/node_modules/@zuplo/runtime/out/esm/mcp-gateway/index.js +1 -1
- package/node_modules/@zuplo/runtime/out/types/index.d.ts +32 -41
- package/node_modules/@zuplo/runtime/package.json +1 -1
- package/package.json +6 -6
- package/node_modules/@zuplo/runtime/out/esm/chunk-GK3X4WPN.js.map +0 -1
- /package/node_modules/@zuplo/runtime/out/esm/{chunk-GK3X4WPN.js.LEGAL.txt → chunk-TPXAFGLU.js.LEGAL.txt} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"object-coercer.d.ts","sourceRoot":"","sources":["../../../src/error-tracking/coercers/object-coercer.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,aAAa,EAAiC,MAAM,UAAU,CAAA;AAG9G,KAAK,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;AAEzC,qBAAa,aAAc,YAAW,oBAAoB,CAAC,UAAU,CAAC;IACpE,KAAK,CAAC,SAAS,EAAE,OAAO,GAAG,SAAS,IAAI,UAAU;IAIlD,MAAM,CAAC,SAAS,EAAE,UAAU,EAAE,GAAG,EAAE,eAAe,GAAG,aAAa,GAAG,SAAS;IAe9E,OAAO,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM;
|
|
1
|
+
{"version":3,"file":"object-coercer.d.ts","sourceRoot":"","sources":["../../../src/error-tracking/coercers/object-coercer.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,aAAa,EAAiC,MAAM,UAAU,CAAA;AAG9G,KAAK,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;AAEzC,qBAAa,aAAc,YAAW,oBAAoB,CAAC,UAAU,CAAC;IACpE,KAAK,CAAC,SAAS,EAAE,OAAO,GAAG,SAAS,IAAI,UAAU;IAIlD,MAAM,CAAC,SAAS,EAAE,UAAU,EAAE,GAAG,EAAE,eAAe,GAAG,aAAa,GAAG,SAAS;IAe9E,OAAO,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM;IAQ7C,QAAQ,CAAC,GAAG,EAAE,MAAM;IAmBpB,OAAO,CAAC,eAAe;IAIvB,OAAO,CAAC,QAAQ;IAWhB,8EAA8E;IAC9E,OAAO,CAAC,0BAA0B;IAalC,OAAO,CAAC,kBAAkB;CAQ3B"}
|
|
@@ -45,7 +45,9 @@ class ObjectCoercer {
|
|
|
45
45
|
};
|
|
46
46
|
}
|
|
47
47
|
getType(err) {
|
|
48
|
-
|
|
48
|
+
if ((0, index_js_namespaceObject.isEvent)(err)) return err.constructor.name;
|
|
49
|
+
const name = 'name' in err ? err.name : void 0;
|
|
50
|
+
return (0, index_js_namespaceObject.isString)(name) && !(0, index_js_namespaceObject.isEmptyString)(name) ? name : 'Error';
|
|
49
51
|
}
|
|
50
52
|
getValue(err) {
|
|
51
53
|
if ('name' in err && 'string' == typeof err.name) {
|
|
@@ -17,7 +17,9 @@ class ObjectCoercer {
|
|
|
17
17
|
};
|
|
18
18
|
}
|
|
19
19
|
getType(err) {
|
|
20
|
-
|
|
20
|
+
if (isEvent(err)) return err.constructor.name;
|
|
21
|
+
const name = 'name' in err ? err.name : void 0;
|
|
22
|
+
return isString(name) && !isEmptyString(name) ? name : 'Error';
|
|
21
23
|
}
|
|
22
24
|
getValue(err) {
|
|
23
25
|
if ('name' in err && 'string' == typeof err.name) {
|
|
@@ -27,7 +27,6 @@ export declare function currentISOTime(): string;
|
|
|
27
27
|
export declare function safeSetTimeout(fn: () => void, timeout: number): any;
|
|
28
28
|
export declare function raceWithTimeout<T>(promise: Promise<T>, timeoutMs: number, onTimeout?: () => void): Promise<T | void>;
|
|
29
29
|
export declare const isPromise: (obj: any) => obj is Promise<any>;
|
|
30
|
-
export declare const isError: (x: unknown) => x is Error;
|
|
31
30
|
export declare function getFetch(): FetchLike | undefined;
|
|
32
31
|
export declare function allSettled<T>(promises: (Promise<T> | null | undefined)[]): Promise<({
|
|
33
32
|
status: 'fulfilled';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAA;AAEpC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,iBAAiB,CAAA;AAC/B,c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Promise: ()=>isPromise,
|
|
88
87
|
isValidUUID: ()=>isValidUUID,
|
|
89
88
|
raceWithTimeout: ()=>raceWithTimeout,
|
|
@@ -98,7 +97,6 @@ var __webpack_exports__ = {};
|
|
|
98
97
|
"removeTrailingSlash",
|
|
99
98
|
"isValidUUID",
|
|
100
99
|
"currentISOTime",
|
|
101
|
-
"isError",
|
|
102
100
|
"safeSetTimeout",
|
|
103
101
|
"UUID_REGEX",
|
|
104
102
|
"assert",
|
|
@@ -122,7 +120,6 @@ var __webpack_exports__ = {};
|
|
|
122
120
|
"removeTrailingSlash",
|
|
123
121
|
"isValidUUID",
|
|
124
122
|
"currentISOTime",
|
|
125
|
-
"isError",
|
|
126
123
|
"safeSetTimeout",
|
|
127
124
|
"UUID_REGEX",
|
|
128
125
|
"assert",
|
|
@@ -146,7 +143,6 @@ var __webpack_exports__ = {};
|
|
|
146
143
|
"removeTrailingSlash",
|
|
147
144
|
"isValidUUID",
|
|
148
145
|
"currentISOTime",
|
|
149
|
-
"isError",
|
|
150
146
|
"safeSetTimeout",
|
|
151
147
|
"UUID_REGEX",
|
|
152
148
|
"assert",
|
|
@@ -170,7 +166,6 @@ var __webpack_exports__ = {};
|
|
|
170
166
|
"removeTrailingSlash",
|
|
171
167
|
"isValidUUID",
|
|
172
168
|
"currentISOTime",
|
|
173
|
-
"isError",
|
|
174
169
|
"safeSetTimeout",
|
|
175
170
|
"UUID_REGEX",
|
|
176
171
|
"assert",
|
|
@@ -194,7 +189,6 @@ var __webpack_exports__ = {};
|
|
|
194
189
|
"removeTrailingSlash",
|
|
195
190
|
"isValidUUID",
|
|
196
191
|
"currentISOTime",
|
|
197
|
-
"isError",
|
|
198
192
|
"safeSetTimeout",
|
|
199
193
|
"UUID_REGEX",
|
|
200
194
|
"assert",
|
|
@@ -218,7 +212,6 @@ var __webpack_exports__ = {};
|
|
|
218
212
|
"removeTrailingSlash",
|
|
219
213
|
"isValidUUID",
|
|
220
214
|
"currentISOTime",
|
|
221
|
-
"isError",
|
|
222
215
|
"safeSetTimeout",
|
|
223
216
|
"UUID_REGEX",
|
|
224
217
|
"assert",
|
|
@@ -242,7 +235,6 @@ var __webpack_exports__ = {};
|
|
|
242
235
|
"removeTrailingSlash",
|
|
243
236
|
"isValidUUID",
|
|
244
237
|
"currentISOTime",
|
|
245
|
-
"isError",
|
|
246
238
|
"safeSetTimeout",
|
|
247
239
|
"UUID_REGEX",
|
|
248
240
|
"assert",
|
|
@@ -266,7 +258,6 @@ var __webpack_exports__ = {};
|
|
|
266
258
|
"removeTrailingSlash",
|
|
267
259
|
"isValidUUID",
|
|
268
260
|
"currentISOTime",
|
|
269
|
-
"isError",
|
|
270
261
|
"safeSetTimeout",
|
|
271
262
|
"UUID_REGEX",
|
|
272
263
|
"assert",
|
|
@@ -290,7 +281,6 @@ var __webpack_exports__ = {};
|
|
|
290
281
|
"removeTrailingSlash",
|
|
291
282
|
"isValidUUID",
|
|
292
283
|
"currentISOTime",
|
|
293
|
-
"isError",
|
|
294
284
|
"safeSetTimeout",
|
|
295
285
|
"UUID_REGEX",
|
|
296
286
|
"assert",
|
|
@@ -314,7 +304,6 @@ var __webpack_exports__ = {};
|
|
|
314
304
|
"removeTrailingSlash",
|
|
315
305
|
"isValidUUID",
|
|
316
306
|
"currentISOTime",
|
|
317
|
-
"isError",
|
|
318
307
|
"safeSetTimeout",
|
|
319
308
|
"UUID_REGEX",
|
|
320
309
|
"assert",
|
|
@@ -400,7 +389,6 @@ var __webpack_exports__ = {};
|
|
|
400
389
|
}
|
|
401
390
|
}
|
|
402
391
|
const isPromise = (obj)=>obj && 'function' == typeof obj.then;
|
|
403
|
-
const isError = (x)=>x instanceof Error;
|
|
404
392
|
function getFetch() {
|
|
405
393
|
return 'undefined' != typeof fetch ? fetch : void 0 !== globalThis.fetch ? globalThis.fetch : void 0;
|
|
406
394
|
}
|
|
@@ -422,7 +410,6 @@ exports.currentISOTime = __webpack_exports__.currentISOTime;
|
|
|
422
410
|
exports.currentTimestamp = __webpack_exports__.currentTimestamp;
|
|
423
411
|
exports.getEventUuid = __webpack_exports__.getEventUuid;
|
|
424
412
|
exports.getFetch = __webpack_exports__.getFetch;
|
|
425
|
-
exports.isError = __webpack_exports__.isError;
|
|
426
413
|
exports.isPromise = __webpack_exports__.isPromise;
|
|
427
414
|
exports.isValidUUID = __webpack_exports__.isValidUUID;
|
|
428
415
|
exports.raceWithTimeout = __webpack_exports__.raceWithTimeout;
|
|
@@ -439,7 +426,6 @@ for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
|
|
439
426
|
"currentTimestamp",
|
|
440
427
|
"getEventUuid",
|
|
441
428
|
"getFetch",
|
|
442
|
-
"isError",
|
|
443
429
|
"isPromise",
|
|
444
430
|
"isValidUUID",
|
|
445
431
|
"raceWithTimeout",
|
|
@@ -76,7 +76,6 @@ async function raceWithTimeout(promise, timeoutMs, onTimeout) {
|
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
78
|
const isPromise = (obj)=>obj && 'function' == typeof obj.then;
|
|
79
|
-
const isError = (x)=>x instanceof Error;
|
|
80
79
|
function getFetch() {
|
|
81
80
|
return 'undefined' != typeof fetch ? fetch : void 0 !== globalThis.fetch ? globalThis.fetch : void 0;
|
|
82
81
|
}
|
|
@@ -89,4 +88,4 @@ function allSettled(promises) {
|
|
|
89
88
|
reason
|
|
90
89
|
}))));
|
|
91
90
|
}
|
|
92
|
-
export { STRING_FORMAT, UUID_REGEX, allSettled, assert, currentISOTime, currentTimestamp, getEventUuid, getFetch,
|
|
91
|
+
export { STRING_FORMAT, UUID_REGEX, allSettled, assert, currentISOTime, currentTimestamp, getEventUuid, getFetch, isPromise, isValidUUID, raceWithTimeout, removeTrailingSlash, retriable, safeSetTimeout, stripUrlHash };
|
|
@@ -29,7 +29,11 @@ export class ObjectCoercer implements ErrorTrackingCoercer<ObjectLike> {
|
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
getType(err: Record<string, unknown>): string {
|
|
32
|
-
|
|
32
|
+
if (isEvent(err)) {
|
|
33
|
+
return err.constructor.name
|
|
34
|
+
}
|
|
35
|
+
const name = 'name' in err ? err.name : undefined
|
|
36
|
+
return isString(name) && !isEmptyString(name) ? name : 'Error'
|
|
33
37
|
}
|
|
34
38
|
|
|
35
39
|
getValue(err: object) {
|
package/node_modules/@posthog/core/src/error-tracking/error-properties-builder.coerce.spec.ts
CHANGED
|
@@ -263,9 +263,45 @@ describe('ErrorPropertiesBuilder', () => {
|
|
|
263
263
|
})
|
|
264
264
|
|
|
265
265
|
expect(coerceInput(customEvent)).toMatchObject({
|
|
266
|
+
type: 'TypeError',
|
|
266
267
|
value: "'TypeError' captured as exception with message: 'Extension context invalidated.'",
|
|
267
268
|
stack,
|
|
268
269
|
})
|
|
269
270
|
})
|
|
271
|
+
|
|
272
|
+
it('should fall back to Error when the object has no name property', () => {
|
|
273
|
+
const exception = coerceInput({ message: 'oh no disaster' })
|
|
274
|
+
|
|
275
|
+
expect(exception).toMatchObject({
|
|
276
|
+
type: 'Error',
|
|
277
|
+
value: 'oh no disaster',
|
|
278
|
+
})
|
|
279
|
+
})
|
|
280
|
+
|
|
281
|
+
it('should fall back to Error when the name property is an empty string', () => {
|
|
282
|
+
const exception = coerceInput({ name: '', message: 'oh no disaster' })
|
|
283
|
+
|
|
284
|
+
expect(exception).toMatchObject({
|
|
285
|
+
type: 'Error',
|
|
286
|
+
})
|
|
287
|
+
})
|
|
288
|
+
|
|
289
|
+
it('should preserve a string type when name is a stateful accessor', () => {
|
|
290
|
+
let reads = 0
|
|
291
|
+
const candidate = { message: 'boom' }
|
|
292
|
+
|
|
293
|
+
Object.defineProperty(candidate, 'name', {
|
|
294
|
+
// Keep this non-enumerable so the object property scan does not read it first.
|
|
295
|
+
get() {
|
|
296
|
+
reads += 1
|
|
297
|
+
return reads === 1 ? 'TypeError' : 42
|
|
298
|
+
},
|
|
299
|
+
})
|
|
300
|
+
|
|
301
|
+
expect(coerceInput(candidate)).toMatchObject({
|
|
302
|
+
type: 'TypeError',
|
|
303
|
+
value: 'boom',
|
|
304
|
+
})
|
|
305
|
+
})
|
|
270
306
|
})
|
|
271
307
|
})
|
|
@@ -125,10 +125,6 @@ export const isPromise = (obj: any): obj is Promise<any> => {
|
|
|
125
125
|
return obj && typeof obj.then === 'function'
|
|
126
126
|
}
|
|
127
127
|
|
|
128
|
-
export const isError = (x: unknown): x is Error => {
|
|
129
|
-
return x instanceof Error
|
|
130
|
-
}
|
|
131
|
-
|
|
132
128
|
export function getFetch(): FetchLike | undefined {
|
|
133
129
|
return typeof fetch !== 'undefined' ? fetch : typeof globalThis.fetch !== 'undefined' ? globalThis.fetch : undefined
|
|
134
130
|
}
|