@keyframerdev/vitals 0.1.0 → 0.1.1

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/babel.cjs CHANGED
@@ -319,10 +319,16 @@ ${key}`)}`, fn, component: null, prop: null });
319
319
  const value = (a) => a?.value?.type === "JSXExpressionContainer" && a.value.expression.type !== "JSXEmptyExpression" ? a.value.expression : null;
320
320
  const setAttr = (n, expr) => {
321
321
  const a = attr(n);
322
- if (a)
322
+ if (a) {
323
323
  a.value = t.jsxExpressionContainer(expr);
324
+ return;
325
+ }
326
+ const added = t.jsxAttribute(t.jsxIdentifier(n), t.jsxExpressionContainer(expr));
327
+ const spread = el.attributes.findIndex((x) => x.type === "JSXSpreadAttribute");
328
+ if (spread >= 0)
329
+ el.attributes.splice(spread, 0, added);
324
330
  else
325
- el.attributes.push(t.jsxAttribute(t.jsxIdentifier(n), t.jsxExpressionContainer(expr)));
331
+ el.attributes.push(added);
326
332
  };
327
333
  const loc = el.loc;
328
334
  if (loc) {
package/dist/index.js CHANGED
@@ -620,7 +620,7 @@ function slimArg(a, idOf) {
620
620
 
621
621
  // src/version.ts
622
622
  var SDK_NAME = "@keyframerdev/vitals";
623
- var SDK_VERSION = "0.1.0";
623
+ var SDK_VERSION = "0.1.1";
624
624
 
625
625
  // src/controller.ts
626
626
  var STORAGE_KEYS = {
@@ -1114,7 +1114,8 @@ class VitalsController {
1114
1114
  }
1115
1115
  if (res.status === 429 || res.status >= 500)
1116
1116
  return "retry";
1117
- this.log(`report refused (${res.status})`);
1117
+ const why = (await res.json().catch(() => null))?.error;
1118
+ this.log(`report refused (${res.status})${why ? `: ${why}` : ""}`);
1118
1119
  return "done";
1119
1120
  } catch {
1120
1121
  return "retry";
@@ -1,3 +1,3 @@
1
1
  /** This package's version: sent in every report's `sdk`, and compared with the config's `minSdk`. Keep it in step with package.json. */
2
2
  export declare const SDK_NAME = "@keyframerdev/vitals";
3
- export declare const SDK_VERSION = "0.1.0";
3
+ export declare const SDK_VERSION = "0.1.1";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@keyframerdev/vitals",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Motion Vitals for React Native: slow frames and janky animations from production, by screen and call site",
5
5
  "keywords": [
6
6
  "react-native",