@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 +19 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +4 -2
- package/dist/index.mjs +19 -9
- package/dist/index.mjs.map +1 -1
- package/dist/ingots/types.d.ts +4 -2
- package/dist/sparkvault.js +1 -1
- package/dist/sparkvault.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -2293,8 +2293,10 @@ interface UpdateFolderOptions {
|
|
|
2293
2293
|
* - `upsert` (the server default): the upload replaces the holder's content.
|
|
2294
2294
|
* - `complete_pending`: a holder whose own upload never finalized is completed
|
|
2295
2295
|
* (`created: false`); a published holder is refused with a 409 CONFLICT whose
|
|
2296
|
-
* `details`
|
|
2297
|
-
*
|
|
2296
|
+
* `details.reason` is `'NAME_HELD'`, and is left untouched. The details
|
|
2297
|
+
* describe the holder (`ingot_id`, `status`, `size_bytes`) unless another
|
|
2298
|
+
* app manages it or another request claimed the name first, when they carry
|
|
2299
|
+
* the reason alone.
|
|
2298
2300
|
* - `refuse`: any holder, its upload finished or not, is refused with that
|
|
2299
2301
|
* same 409 and left untouched; the create only ever mints.
|
|
2300
2302
|
* - `new_name`: the holder is never touched; the ingot is minted under the
|
package/dist/index.mjs
CHANGED
|
@@ -1905,14 +1905,14 @@ function defineEntropyLayout(fields) {
|
|
|
1905
1905
|
}
|
|
1906
1906
|
const names = new Set();
|
|
1907
1907
|
let bytes = 0;
|
|
1908
|
-
for (const [
|
|
1909
|
-
if (typeof
|
|
1910
|
-
throw new TypeError(`Entropy layout field names must be unique non-empty strings (${String(
|
|
1908
|
+
for (const [field, length] of fields) {
|
|
1909
|
+
if (typeof field !== 'string' || field.length === 0 || names.has(field)) {
|
|
1910
|
+
throw new TypeError(`Entropy layout field names must be unique non-empty strings (${String(field)})`);
|
|
1911
1911
|
}
|
|
1912
1912
|
if (!Number.isSafeInteger(length) || length <= 0) {
|
|
1913
|
-
throw new TypeError(`Entropy layout field ${
|
|
1913
|
+
throw new TypeError(`Entropy layout field ${field} must be a positive whole number of bytes`);
|
|
1914
1914
|
}
|
|
1915
|
-
names.add(
|
|
1915
|
+
names.add(field);
|
|
1916
1916
|
bytes += length;
|
|
1917
1917
|
}
|
|
1918
1918
|
if (bytes > MAX_DRAW_BYTES) {
|
|
@@ -3670,7 +3670,15 @@ class SparkLinkHandler {
|
|
|
3670
3670
|
* alike.
|
|
3671
3671
|
*/
|
|
3672
3672
|
|
|
3673
|
-
|
|
3673
|
+
/**
|
|
3674
|
+
* The characters an RFC 5322 dot-atom local part holds, in its canonical
|
|
3675
|
+
* (lowercase) form, as the body of a character class: the one set the
|
|
3676
|
+
* grammar below accepts and the log mask (./pii-mask.js) reads an address in
|
|
3677
|
+
* text by.
|
|
3678
|
+
*/
|
|
3679
|
+
const EMAIL_LOCAL_PART_CHARACTERS = "a-z0-9.!#$%&'*+/=?^_`{|}~-";
|
|
3680
|
+
|
|
3681
|
+
const LOCAL_PART = new RegExp(`^[${EMAIL_LOCAL_PART_CHARACTERS}]+$`);
|
|
3674
3682
|
const DOMAIN_LABEL = /^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$/;
|
|
3675
3683
|
|
|
3676
3684
|
/** RFC 5321 length limits, in characters. */
|
|
@@ -16537,8 +16545,10 @@ function mapFolder(wire) {
|
|
|
16537
16545
|
* - `upsert` (the server default): the upload replaces the holder's content.
|
|
16538
16546
|
* - `complete_pending`: a holder whose own upload never finalized is completed
|
|
16539
16547
|
* (`created: false`); a published holder is refused with a 409 CONFLICT whose
|
|
16540
|
-
* `details`
|
|
16541
|
-
*
|
|
16548
|
+
* `details.reason` is `'NAME_HELD'`, and is left untouched. The details
|
|
16549
|
+
* describe the holder (`ingot_id`, `status`, `size_bytes`) unless another
|
|
16550
|
+
* app manages it or another request claimed the name first, when they carry
|
|
16551
|
+
* the reason alone.
|
|
16542
16552
|
* - `refuse`: any holder, its upload finished or not, is refused with that
|
|
16543
16553
|
* same 409 and left untouched; the create only ever mints.
|
|
16544
16554
|
* - `new_name`: the holder is never touched; the ingot is minted under the
|
|
@@ -17924,7 +17934,7 @@ class SparkVault {
|
|
|
17924
17934
|
}
|
|
17925
17935
|
/** Get the SDK version */
|
|
17926
17936
|
static get version() {
|
|
17927
|
-
return '12.0.
|
|
17937
|
+
return '12.0.5';
|
|
17928
17938
|
}
|
|
17929
17939
|
}
|
|
17930
17940
|
if (typeof window !== 'undefined') {
|