@hue-run/sdk 0.2.1 → 0.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/dist/safety.js CHANGED
@@ -166,10 +166,16 @@ export function estimateRecordBytes(value, limit) {
166
166
  bytes += item.byteLength;
167
167
  else if (item && typeof item === "object" && !seen.has(item)) {
168
168
  seen.add(item);
169
- for (const [key, child] of Object.entries(item)) {
170
- bytes += key.length * 2 + 16;
171
- visit(child, depth + 1);
172
- }
169
+ // Match admission (`Snapshot.copy`): array elements are nodes without retained index
170
+ // keys. Charging indexes here would refuse array-heavy records the queue admitted.
171
+ if (Array.isArray(item))
172
+ for (const child of item)
173
+ visit(child, depth + 1);
174
+ else
175
+ for (const [key, child] of Object.entries(item)) {
176
+ bytes += key.length * 2 + 16;
177
+ visit(child, depth + 1);
178
+ }
173
179
  }
174
180
  if (bytes > limit)
175
181
  throw new RangeError("Telemetry byte limit exceeded");
package/dist/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
1
  /** Package version shared by the instrumentation scope and the export User-Agent. */
2
- export declare const sdkVersion = "0.2.1";
2
+ export declare const sdkVersion = "0.2.2";
package/dist/version.js CHANGED
@@ -1,3 +1,3 @@
1
1
  // Generated by scripts/write-version.mjs from package.json; do not edit by hand.
2
2
  /** Package version shared by the instrumentation scope and the export User-Agent. */
3
- export const sdkVersion = "0.2.1";
3
+ export const sdkVersion = "0.2.2";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hue-run/sdk",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "publishConfig": {