@fireproof/core 0.14.1 → 0.14.2
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/browser/fireproof.cjs +7 -11
- package/dist/browser/fireproof.cjs.map +3 -3
- package/dist/browser/fireproof.esm.js +7 -11
- package/dist/browser/fireproof.esm.js.map +3 -3
- package/dist/browser/fireproof.iife.js +7 -11
- package/dist/browser/fireproof.iife.js.map +3 -3
- package/dist/node/fireproof.cjs +7 -11
- package/dist/node/fireproof.cjs.map +3 -3
- package/dist/node/fireproof.esm.js +7 -11
- package/dist/node/fireproof.esm.js.map +3 -3
- package/dist/types/version.d.ts +1 -1
- package/package.json +2 -2
package/dist/node/fireproof.cjs
CHANGED
@@ -20987,7 +20987,7 @@ var import_os = require("os");
|
|
20987
20987
|
var import_promises = require("fs/promises");
|
20988
20988
|
|
20989
20989
|
// src/version.ts
|
20990
|
-
var PACKAGE_VERSION = "0.14.
|
20990
|
+
var PACKAGE_VERSION = "0.14.2";
|
20991
20991
|
|
20992
20992
|
// src/store.ts
|
20993
20993
|
var match = PACKAGE_VERSION.match(/^([^.]*\.[^.]*)/);
|
@@ -27423,7 +27423,7 @@ var import_err_code7 = __toESM(require_err_code(), 1);
|
|
27423
27423
|
// ../../node_modules/.pnpm/ipfs-unixfs@11.0.2/node_modules/ipfs-unixfs/dist/src/index.js
|
27424
27424
|
var import_err_code5 = __toESM(require_err_code(), 1);
|
27425
27425
|
|
27426
|
-
// ../../node_modules/.pnpm/protons-runtime@5.0.2/node_modules/protons-runtime/dist/src/utils.js
|
27426
|
+
// ../../node_modules/.pnpm/protons-runtime@5.0.2_uint8arraylist@2.4.3/node_modules/protons-runtime/dist/src/utils.js
|
27427
27427
|
var import_reader3 = __toESM(require_reader(), 1);
|
27428
27428
|
var import_reader_buffer = __toESM(require_reader_buffer(), 1);
|
27429
27429
|
var import_minimal2 = __toESM(require_minimal(), 1);
|
@@ -27473,13 +27473,13 @@ function writer() {
|
|
27473
27473
|
return patchWriter(import_writer2.default.create());
|
27474
27474
|
}
|
27475
27475
|
|
27476
|
-
// ../../node_modules/.pnpm/protons-runtime@5.0.2/node_modules/protons-runtime/dist/src/decode.js
|
27476
|
+
// ../../node_modules/.pnpm/protons-runtime@5.0.2_uint8arraylist@2.4.3/node_modules/protons-runtime/dist/src/decode.js
|
27477
27477
|
function decodeMessage(buf3, codec) {
|
27478
27478
|
const r = reader(buf3 instanceof Uint8Array ? buf3 : buf3.subarray());
|
27479
27479
|
return codec.decode(r);
|
27480
27480
|
}
|
27481
27481
|
|
27482
|
-
// ../../node_modules/.pnpm/protons-runtime@5.0.2/node_modules/protons-runtime/dist/src/encode.js
|
27482
|
+
// ../../node_modules/.pnpm/protons-runtime@5.0.2_uint8arraylist@2.4.3/node_modules/protons-runtime/dist/src/encode.js
|
27483
27483
|
function encodeMessage(message2, codec) {
|
27484
27484
|
const w = writer();
|
27485
27485
|
codec.encode(message2, w, {
|
@@ -27488,7 +27488,7 @@ function encodeMessage(message2, codec) {
|
|
27488
27488
|
return w.finish();
|
27489
27489
|
}
|
27490
27490
|
|
27491
|
-
// ../../node_modules/.pnpm/protons-runtime@5.0.2/node_modules/protons-runtime/dist/src/codec.js
|
27491
|
+
// ../../node_modules/.pnpm/protons-runtime@5.0.2_uint8arraylist@2.4.3/node_modules/protons-runtime/dist/src/codec.js
|
27492
27492
|
var CODEC_TYPES;
|
27493
27493
|
(function(CODEC_TYPES2) {
|
27494
27494
|
CODEC_TYPES2[CODEC_TYPES2["VARINT"] = 0] = "VARINT";
|
@@ -27507,7 +27507,7 @@ function createCodec(name8, type2, encode19, decode21) {
|
|
27507
27507
|
};
|
27508
27508
|
}
|
27509
27509
|
|
27510
|
-
// ../../node_modules/.pnpm/protons-runtime@5.0.2/node_modules/protons-runtime/dist/src/codecs/enum.js
|
27510
|
+
// ../../node_modules/.pnpm/protons-runtime@5.0.2_uint8arraylist@2.4.3/node_modules/protons-runtime/dist/src/codecs/enum.js
|
27511
27511
|
function enumeration(v) {
|
27512
27512
|
function findValue(val) {
|
27513
27513
|
if (v[val.toString()] == null) {
|
@@ -27526,7 +27526,7 @@ function enumeration(v) {
|
|
27526
27526
|
return createCodec("enum", CODEC_TYPES.VARINT, encode19, decode21);
|
27527
27527
|
}
|
27528
27528
|
|
27529
|
-
// ../../node_modules/.pnpm/protons-runtime@5.0.2/node_modules/protons-runtime/dist/src/codecs/message.js
|
27529
|
+
// ../../node_modules/.pnpm/protons-runtime@5.0.2_uint8arraylist@2.4.3/node_modules/protons-runtime/dist/src/codecs/message.js
|
27530
27530
|
function message(encode19, decode21) {
|
27531
27531
|
return createCodec("message", CODEC_TYPES.LENGTH_DELIMITED, encode19, decode21);
|
27532
27532
|
}
|
@@ -30142,11 +30142,9 @@ async function processFileset(blocks, files, publicFiles = false) {
|
|
30142
30142
|
const dbBlockstore = blocks.parent;
|
30143
30143
|
const t = new Transaction(dbBlockstore);
|
30144
30144
|
const didPut = [];
|
30145
|
-
let totalSize = 0;
|
30146
30145
|
for (const filename in files) {
|
30147
30146
|
if (File === files[filename].constructor) {
|
30148
30147
|
const file = files[filename];
|
30149
|
-
totalSize += file.size;
|
30150
30148
|
const { cid, blocks: fileBlocks } = await encodeFile2(file);
|
30151
30149
|
didPut.push(filename);
|
30152
30150
|
for (const block of fileBlocks) {
|
@@ -30155,8 +30153,6 @@ async function processFileset(blocks, files, publicFiles = false) {
|
|
30155
30153
|
files[filename] = { cid, type: file.type, size: file.size };
|
30156
30154
|
}
|
30157
30155
|
}
|
30158
|
-
if (totalSize > 1024 * 1024 * 1)
|
30159
|
-
throw new Error("Sync limit for files in a single update is 1MB");
|
30160
30156
|
if (didPut.length) {
|
30161
30157
|
const car = await dbBlockstore.loader?.commit(t, { files }, { public: publicFiles });
|
30162
30158
|
if (car) {
|