@sparkvault/sdk-js 12.0.4 → 12.0.5

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/index.cjs CHANGED
@@ -1909,14 +1909,14 @@ function defineEntropyLayout(fields) {
1909
1909
  }
1910
1910
  const names = new Set();
1911
1911
  let bytes = 0;
1912
- for (const [name, length] of fields) {
1913
- if (typeof name !== 'string' || name.length === 0 || names.has(name)) {
1914
- throw new TypeError(`Entropy layout field names must be unique non-empty strings (${String(name)})`);
1912
+ for (const [field, length] of fields) {
1913
+ if (typeof field !== 'string' || field.length === 0 || names.has(field)) {
1914
+ throw new TypeError(`Entropy layout field names must be unique non-empty strings (${String(field)})`);
1915
1915
  }
1916
1916
  if (!Number.isSafeInteger(length) || length <= 0) {
1917
- throw new TypeError(`Entropy layout field ${name} must be a positive whole number of bytes`);
1917
+ throw new TypeError(`Entropy layout field ${field} must be a positive whole number of bytes`);
1918
1918
  }
1919
- names.add(name);
1919
+ names.add(field);
1920
1920
  bytes += length;
1921
1921
  }
1922
1922
  if (bytes > MAX_DRAW_BYTES) {
@@ -3674,7 +3674,15 @@ class SparkLinkHandler {
3674
3674
  * alike.
3675
3675
  */
3676
3676
 
3677
- const LOCAL_PART = /^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+$/;
3677
+ /**
3678
+ * The characters an RFC 5322 dot-atom local part holds, in its canonical
3679
+ * (lowercase) form, as the body of a character class: the one set the
3680
+ * grammar below accepts and the log mask (./pii-mask.js) reads an address in
3681
+ * text by.
3682
+ */
3683
+ const EMAIL_LOCAL_PART_CHARACTERS = "a-z0-9.!#$%&'*+/=?^_`{|}~-";
3684
+
3685
+ const LOCAL_PART = new RegExp(`^[${EMAIL_LOCAL_PART_CHARACTERS}]+$`);
3678
3686
  const DOMAIN_LABEL = /^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$/;
3679
3687
 
3680
3688
  /** RFC 5321 length limits, in characters. */
@@ -16541,8 +16549,10 @@ function mapFolder(wire) {
16541
16549
  * - `upsert` (the server default): the upload replaces the holder's content.
16542
16550
  * - `complete_pending`: a holder whose own upload never finalized is completed
16543
16551
  * (`created: false`); a published holder is refused with a 409 CONFLICT whose
16544
- * `details` are `{ reason: 'NAME_HELD', ingot_id, status, size_bytes }`, and
16545
- * is left untouched.
16552
+ * `details.reason` is `'NAME_HELD'`, and is left untouched. The details
16553
+ * describe the holder (`ingot_id`, `status`, `size_bytes`) unless another
16554
+ * app manages it or another request claimed the name first, when they carry
16555
+ * the reason alone.
16546
16556
  * - `refuse`: any holder, its upload finished or not, is refused with that
16547
16557
  * same 409 and left untouched; the create only ever mints.
16548
16558
  * - `new_name`: the holder is never touched; the ingot is minted under the
@@ -17928,7 +17938,7 @@ class SparkVault {
17928
17938
  }
17929
17939
  /** Get the SDK version */
17930
17940
  static get version() {
17931
- return '12.0.4';
17941
+ return '12.0.5';
17932
17942
  }
17933
17943
  }
17934
17944
  if (typeof window !== 'undefined') {