@fireproof/core 0.20.0-dev-preview-10 → 0.20.0-dev-preview-12
Sign up to get free protection for your applications and to get access to all the features.
- package/index.cjs +24 -10
- package/index.cjs.map +1 -1
- package/index.d.cts +11 -5
- package/index.d.ts +11 -5
- package/index.js +24 -10
- package/index.js.map +1 -1
- package/metafile-cjs.json +1 -1
- package/metafile-esm.json +1 -1
- package/package.json +1 -1
- package/react/index.cjs +1 -1
- package/react/index.cjs.map +1 -1
- package/react/index.js +1 -1
- package/react/index.js.map +1 -1
- package/react/metafile-cjs.json +1 -1
- package/react/metafile-esm.json +1 -1
- package/tests/blockstore/interceptor-gateway.test.ts +1 -1
- package/tests/fireproof/all-gateway.test.ts +2 -2
- package/tests/fireproof/database.test.ts +9 -9
- package/tests/fireproof/fireproof.test.ts +19 -19
- package/tests/fireproof/hello.test.ts +5 -5
- package/tests/fireproof/indexer.test.ts +7 -7
- package/tests/fireproof/multiple-ledger.test.ts +1 -1
- package/tests/gateway/file/loader-config.test.ts +4 -4
- package/tests/gateway/indexdb/loader-config.test.ts +1 -1
@@ -32,7 +32,7 @@ describe("basic Index", () => {
|
|
32
32
|
});
|
33
33
|
beforeEach(async function () {
|
34
34
|
await sthis.start();
|
35
|
-
db = fireproof
|
35
|
+
db = fireproof("test-indexer");
|
36
36
|
await db.put({ title: "amazing" });
|
37
37
|
await db.put({ title: "creative" });
|
38
38
|
await db.put({ title: "bazillas" });
|
@@ -119,7 +119,7 @@ describe("Index query with compound key", function () {
|
|
119
119
|
});
|
120
120
|
beforeEach(async function () {
|
121
121
|
await sthis.start();
|
122
|
-
db = fireproof
|
122
|
+
db = fireproof("test-indexer");
|
123
123
|
await db.put({ title: "amazing", score: 1 });
|
124
124
|
await db.put({ title: "creative", score: 2 });
|
125
125
|
await db.put({ title: "creative", score: 20 });
|
@@ -149,7 +149,7 @@ describe("basic Index with map fun", function () {
|
|
149
149
|
});
|
150
150
|
beforeEach(async function () {
|
151
151
|
await sthis.start();
|
152
|
-
db = fireproof
|
152
|
+
db = fireproof("test-indexer");
|
153
153
|
await db.put({ title: "amazing" });
|
154
154
|
await db.put({ title: "creative" });
|
155
155
|
await db.put({ title: "bazillas" });
|
@@ -177,7 +177,7 @@ describe("basic Index with map fun with value", function () {
|
|
177
177
|
});
|
178
178
|
beforeEach(async function () {
|
179
179
|
await sthis.start();
|
180
|
-
db = fireproof
|
180
|
+
db = fireproof("test-indexer");
|
181
181
|
await db.put({ title: "amazing" });
|
182
182
|
await db.put({ title: "creative" });
|
183
183
|
await db.put({ title: "bazillas" });
|
@@ -217,7 +217,7 @@ describe("Index query with map and compound key", function () {
|
|
217
217
|
});
|
218
218
|
beforeEach(async function () {
|
219
219
|
await sthis.start();
|
220
|
-
db = fireproof
|
220
|
+
db = fireproof("test-indexer");
|
221
221
|
await db.put({ title: "amazing", score: 1 });
|
222
222
|
await db.put({ title: "creative", score: 2 });
|
223
223
|
await db.put({ title: "creative", score: 20 });
|
@@ -247,7 +247,7 @@ describe("basic Index with string fun", function () {
|
|
247
247
|
});
|
248
248
|
beforeEach(async function () {
|
249
249
|
await sthis.start();
|
250
|
-
db = fireproof
|
250
|
+
db = fireproof("test-indexer");
|
251
251
|
await db.put({ title: "amazing" });
|
252
252
|
await db.put({ title: "creative" });
|
253
253
|
await db.put({ title: "bazillas" });
|
@@ -388,7 +388,7 @@ describe("basic Index with no data", function () {
|
|
388
388
|
});
|
389
389
|
beforeEach(async function () {
|
390
390
|
await sthis.start();
|
391
|
-
db = fireproof
|
391
|
+
db = fireproof("test-indexer");
|
392
392
|
indexer = new Index<string, TestType>(sthis, db.ledger.crdt, "hello", (doc) => {
|
393
393
|
didMap = true;
|
394
394
|
return doc.title;
|
@@ -26,7 +26,7 @@ describe("Multiple Databases", () => {
|
|
26
26
|
.fill(0)
|
27
27
|
.map(async (_, i) => {
|
28
28
|
const name = `db-${group}-${i}`;
|
29
|
-
const db = fireproof
|
29
|
+
const db = fireproof(name);
|
30
30
|
dbs.push({ db, name });
|
31
31
|
for (let i = 0; i < rows; i++) {
|
32
32
|
await db.put({ _id: `${name}-${i}`, hello: "world" });
|
@@ -33,7 +33,7 @@ describe("config file gateway", () => {
|
|
33
33
|
});
|
34
34
|
|
35
35
|
it("loader", async () => {
|
36
|
-
const db = fireproof
|
36
|
+
const db = fireproof(my_app());
|
37
37
|
await db.put({ name: "my-app" });
|
38
38
|
expect(db.ledger.name).toBe(my_app());
|
39
39
|
|
@@ -110,7 +110,7 @@ describe("config file gateway", () => {
|
|
110
110
|
/* */
|
111
111
|
});
|
112
112
|
|
113
|
-
const db = fireproof
|
113
|
+
const db = fireproof(my_app(), { storeUrls: { base } });
|
114
114
|
// console.log(`>>>>>>>>>>>>>>>file-path`)
|
115
115
|
await db.put({ name: "my-app" });
|
116
116
|
expect(db.ledger.name).toBe(my_app());
|
@@ -177,7 +177,7 @@ describe("config file gateway", () => {
|
|
177
177
|
|
178
178
|
expect(baseDir).toMatch(new RegExp(`/\\.fireproof/${rt.FILESTORE_VERSION.replace(/-file/, "")}/${my_app()}`));
|
179
179
|
|
180
|
-
const db = fireproof
|
180
|
+
const db = fireproof(my_app());
|
181
181
|
await db.put({ name: "my-app" });
|
182
182
|
expect(db.ledger.name).toBe(my_app());
|
183
183
|
const carStore = await db.ledger.crdt.blockstore.loader?.carStore();
|
@@ -250,7 +250,7 @@ describe("config file gateway", () => {
|
|
250
250
|
/* */
|
251
251
|
});
|
252
252
|
|
253
|
-
const db = fireproof
|
253
|
+
const db = fireproof(my_app());
|
254
254
|
await db.put({ name: "my-app" });
|
255
255
|
expect(db.ledger.name).toBe(my_app());
|
256
256
|
const carStore = await db.ledger.crdt.blockstore.loader.carStore();
|