@wix/create-app 0.0.167 → 0.0.169

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/build/index.js CHANGED
@@ -55184,6 +55184,44 @@ function shouldAddPerformanceIntegrations(options) {
55184
55184
  // ../cli-error-reporting/src/error-reporter.ts
55185
55185
  var import_verror3 = __toESM(require_verror(), 1);
55186
55186
  import EventEmitter2 from "node:events";
55187
+
55188
+ // ../cli-error-reporting/src/error-utils.ts
55189
+ init_esm_shims();
55190
+ function truncateStringValues(value2, maxLength) {
55191
+ if (value2 == null) {
55192
+ return value2;
55193
+ }
55194
+ if (typeof value2 === "string") {
55195
+ if (value2.length <= maxLength) {
55196
+ return value2;
55197
+ }
55198
+ return `${value2.slice(0, maxLength)} [Truncated]`;
55199
+ }
55200
+ if (Array.isArray(value2)) {
55201
+ return value2.map((item) => truncateStringValues(item, maxLength));
55202
+ }
55203
+ if (typeof value2 === "object") {
55204
+ return Object.fromEntries(
55205
+ Object.entries(value2).map(([k, v]) => [
55206
+ k,
55207
+ truncateStringValues(v, maxLength)
55208
+ ])
55209
+ );
55210
+ }
55211
+ return value2;
55212
+ }
55213
+ function toSafeJson(value2) {
55214
+ if (typeof value2 === "string") {
55215
+ try {
55216
+ return JSON.parse(value2);
55217
+ } catch {
55218
+ return value2;
55219
+ }
55220
+ }
55221
+ return value2;
55222
+ }
55223
+
55224
+ // ../cli-error-reporting/src/error-reporter.ts
55187
55225
  var ReportErrorResult = (0, import_variant16.variant)({
55188
55226
  Reported: (0, import_variant16.fields)(),
55189
55227
  Ignored: {}
@@ -55199,7 +55237,11 @@ var reportError = (scope, originalError, { data } = {}) => {
55199
55237
  const httpError = extractHttpError(error);
55200
55238
  if (httpError) {
55201
55239
  localScope.setTag("request.id", httpError.requestId);
55202
- localScope.setContext("Request Info", getHttpErrorInfo(httpError));
55240
+ const errorInfo = getHttpErrorInfo(httpError);
55241
+ errorInfo.request.data = toSafeJson(errorInfo.request.data);
55242
+ errorInfo.response.data = toSafeJson(errorInfo.response.data);
55243
+ const truncatedErrorInfo = truncateStringValues(errorInfo, 200);
55244
+ localScope.setContext("Request Info", truncatedErrorInfo);
55203
55245
  }
55204
55246
  if (error instanceof Error) {
55205
55247
  localScope.setContext("Error Details", {
@@ -55238,8 +55280,9 @@ function createErrorReporter({ dsn, release: release2 }) {
55238
55280
  },
55239
55281
  // Since we pass `requestInfo`, the default depth of 3
55240
55282
  // redacts most useful info passed from API error responses
55241
- // so we increase it to include more of the potential error http repsonse.
55242
- normalizeDepth: 10
55283
+ // so we increase it to include more of the potential error http response.
55284
+ normalizeDepth: 8,
55285
+ normalizeMaxBreadth: 20
55243
55286
  });
55244
55287
  const sentryScope = new Scope();
55245
55288
  sentryScope.setClient(sentryClient);
@@ -57238,7 +57281,7 @@ function reportCommandStartEvent({
57238
57281
  var package_default = {
57239
57282
  name: "@wix/create-app",
57240
57283
  description: "Create Wix apps",
57241
- version: "0.0.167",
57284
+ version: "0.0.169",
57242
57285
  author: "Ihor Machuzhak",
57243
57286
  bin: "bin/index.cjs",
57244
57287
  devDependencies: {