@fireproof/core 0.18.0 → 0.19.0-dev-use-fix
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +29 -15
- package/chunk-AZVWSRER.js +208 -0
- package/chunk-AZVWSRER.js.map +1 -0
- package/chunk-H3A2HMMM.js +164 -0
- package/chunk-H3A2HMMM.js.map +1 -0
- package/chunk-NZNG6TQT.js +370 -0
- package/chunk-NZNG6TQT.js.map +1 -0
- package/chunk-VZGT7ZYP.js +22 -0
- package/chunk-VZGT7ZYP.js.map +1 -0
- package/chunk-ZHO4NMWL.js +39 -0
- package/chunk-ZHO4NMWL.js.map +1 -0
- package/index.cjs +4706 -0
- package/index.cjs.map +1 -0
- package/index.d.cts +1012 -0
- package/index.d.ts +1012 -0
- package/index.js +2856 -0
- package/index.js.map +1 -0
- package/metafile-cjs.json +1 -0
- package/metafile-esm.json +1 -0
- package/node-sys-container-E7LADX2Z.js +29 -0
- package/node-sys-container-E7LADX2Z.js.map +1 -0
- package/package.json +23 -109
- package/sqlite-data-store-3ST7XOLX.js +120 -0
- package/sqlite-data-store-3ST7XOLX.js.map +1 -0
- package/sqlite-meta-store-QOIMCSJ7.js +137 -0
- package/sqlite-meta-store-QOIMCSJ7.js.map +1 -0
- package/sqlite-wal-store-JFBQPOYT.js +123 -0
- package/sqlite-wal-store-JFBQPOYT.js.map +1 -0
- package/store-file-CSS5THFH.js +193 -0
- package/store-file-CSS5THFH.js.map +1 -0
- package/store-indexdb-DR4HELVP.js +20 -0
- package/store-indexdb-DR4HELVP.js.map +1 -0
- package/store-sql-BG6SMGQJ.js +344 -0
- package/store-sql-BG6SMGQJ.js.map +1 -0
- package/tests/blockstore/loader.test.ts +265 -0
- package/tests/blockstore/store.test.ts +164 -0
- package/tests/blockstore/transaction.test.ts +121 -0
- package/tests/fireproof/config.test.ts +212 -0
- package/tests/fireproof/crdt.test.ts +434 -0
- package/tests/fireproof/database.test.ts +466 -0
- package/tests/fireproof/fireproof.test.ts +602 -0
- package/tests/fireproof/hello.test.ts +54 -0
- package/tests/fireproof/indexer.test.ts +389 -0
- package/tests/helpers.ts +81 -0
- package/tests/react/useFireproof.test.tsx +19 -0
- package/tests/www/gallery.html +132 -0
- package/tests/www/iife.html +42 -0
- package/tests/www/todo-aws.html +232 -0
- package/tests/www/todo-ipfs.html +213 -0
- package/tests/www/todo-local.html +214 -0
- package/tests/www/todo-netlify.html +227 -0
- package/tests/www/todo.html +236 -0
- package/dist/browser/fireproof.cjs +0 -1172
- package/dist/browser/fireproof.cjs.map +0 -1
- package/dist/browser/fireproof.d.cts +0 -268
- package/dist/browser/fireproof.d.ts +0 -268
- package/dist/browser/fireproof.global.js +0 -24178
- package/dist/browser/fireproof.global.js.map +0 -1
- package/dist/browser/fireproof.js +0 -1147
- package/dist/browser/fireproof.js.map +0 -1
- package/dist/browser/metafile-cjs.json +0 -1
- package/dist/browser/metafile-esm.json +0 -1
- package/dist/browser/metafile-iife.json +0 -1
- package/dist/memory/fireproof.cjs +0 -1172
- package/dist/memory/fireproof.cjs.map +0 -1
- package/dist/memory/fireproof.d.cts +0 -268
- package/dist/memory/fireproof.d.ts +0 -268
- package/dist/memory/fireproof.global.js +0 -24178
- package/dist/memory/fireproof.global.js.map +0 -1
- package/dist/memory/fireproof.js +0 -1147
- package/dist/memory/fireproof.js.map +0 -1
- package/dist/memory/metafile-cjs.json +0 -1
- package/dist/memory/metafile-esm.json +0 -1
- package/dist/memory/metafile-iife.json +0 -1
- package/dist/node/fireproof.cjs +0 -1172
- package/dist/node/fireproof.cjs.map +0 -1
- package/dist/node/fireproof.d.cts +0 -268
- package/dist/node/fireproof.d.ts +0 -268
- package/dist/node/fireproof.global.js +0 -38540
- package/dist/node/fireproof.global.js.map +0 -1
- package/dist/node/fireproof.js +0 -1138
- package/dist/node/fireproof.js.map +0 -1
- package/dist/node/metafile-cjs.json +0 -1
- package/dist/node/metafile-esm.json +0 -1
- package/dist/node/metafile-iife.json +0 -1
@@ -0,0 +1,227 @@
|
|
1
|
+
<!doctype html>
|
2
|
+
<html lang="en">
|
3
|
+
<head>
|
4
|
+
<meta charset="UTF-8" />
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
6
|
+
<title>Fireproof Test</title>
|
7
|
+
<script src="./fireproof.iife.js"></script>
|
8
|
+
<script src="./connect-netlify.iife.js"></script>
|
9
|
+
<script type="text/javascript">
|
10
|
+
function todoApp() {
|
11
|
+
const actorTag = Math.random().toString(36).substring(2, 7);
|
12
|
+
const { fireproof, index } = Fireproof;
|
13
|
+
const { connect } = FireproofConnect;
|
14
|
+
|
15
|
+
let dbName;
|
16
|
+
let db;
|
17
|
+
let cx;
|
18
|
+
|
19
|
+
let dbUnsubscribe = false;
|
20
|
+
|
21
|
+
function setupDb(name, newDb, newConn) {
|
22
|
+
const input = document.querySelector("#todo");
|
23
|
+
input.disabled = true;
|
24
|
+
|
25
|
+
if (dbUnsubscribe) {
|
26
|
+
dbUnsubscribe();
|
27
|
+
}
|
28
|
+
if (newDb) {
|
29
|
+
// console.log('new db', newDb, newConn)
|
30
|
+
name = newDb.name;
|
31
|
+
dbName = newDb.name;
|
32
|
+
db = newDb;
|
33
|
+
cx = newConn;
|
34
|
+
const input = document.querySelector("#list");
|
35
|
+
input.value = dbName;
|
36
|
+
} else {
|
37
|
+
dbName = name;
|
38
|
+
db = fireproof(name);
|
39
|
+
cx = connect.netlify(db);
|
40
|
+
cx.ready.then(async () => {
|
41
|
+
const span = document.querySelector("#cxInfo");
|
42
|
+
span.innerText = `📡 ${cx.name}`;
|
43
|
+
});
|
44
|
+
}
|
45
|
+
|
46
|
+
window.db = db;
|
47
|
+
window.cx = cx;
|
48
|
+
|
49
|
+
db.changes([], { limit: 1 }).then((changes) => {
|
50
|
+
if (changes.clock.length > 0) {
|
51
|
+
input.disabled = false;
|
52
|
+
} else {
|
53
|
+
cx.ready.then(async () => {
|
54
|
+
input.disabled = false;
|
55
|
+
});
|
56
|
+
}
|
57
|
+
});
|
58
|
+
|
59
|
+
dbUnsubscribe = db.subscribe(redraw);
|
60
|
+
return db;
|
61
|
+
}
|
62
|
+
|
63
|
+
let doing;
|
64
|
+
const redraw = async () => {
|
65
|
+
if (doing) {
|
66
|
+
return doing;
|
67
|
+
}
|
68
|
+
doing = doRedraw().finally(() => (doing = null));
|
69
|
+
return doing;
|
70
|
+
};
|
71
|
+
window.redraw = redraw;
|
72
|
+
|
73
|
+
let compactor = "🚗";
|
74
|
+
function drawInfo() {
|
75
|
+
document.querySelector("#carLog").innerText =
|
76
|
+
` ⏰ ${db._crdt.clock.head.length} ${compactor} ${cx.loader.carLog.length} 📩 ${cx.taskManager.queue.length}`;
|
77
|
+
}
|
78
|
+
const doRedraw = async () => {
|
79
|
+
drawInfo();
|
80
|
+
const result = await db.allDocs();
|
81
|
+
drawInfo();
|
82
|
+
document.querySelector("ul").innerHTML = "";
|
83
|
+
for (const row of result.rows) {
|
84
|
+
// const doc = await db.get(row.id);
|
85
|
+
const doc = row.value;
|
86
|
+
const checkbox = document.createElement("input");
|
87
|
+
checkbox.setAttribute("type", "checkbox");
|
88
|
+
if (doc.completed) {
|
89
|
+
checkbox.setAttribute("checked", true);
|
90
|
+
}
|
91
|
+
checkbox.onchange = async (e) => {
|
92
|
+
e.target.indeterminate = true;
|
93
|
+
const clicks = doc.clicks || 0;
|
94
|
+
doc.clicks = clicks + 1;
|
95
|
+
doc.completed = !doc.completed;
|
96
|
+
await db.put(doc);
|
97
|
+
};
|
98
|
+
const textSpan = document.createElement("span");
|
99
|
+
textSpan.innerText = `${doc.actor}:${doc.clicks || 0} ${doc.task}`;
|
100
|
+
const li = document.createElement("li");
|
101
|
+
li.appendChild(checkbox);
|
102
|
+
li.appendChild(textSpan);
|
103
|
+
document.querySelector("ul").appendChild(li);
|
104
|
+
}
|
105
|
+
};
|
106
|
+
|
107
|
+
async function initialize() {
|
108
|
+
ps = new URLSearchParams(location.search);
|
109
|
+
const listQ = ps.get("list");
|
110
|
+
setupDb(listQ || "my-list");
|
111
|
+
const input = document.querySelector("#list");
|
112
|
+
input.value = dbName;
|
113
|
+
redraw();
|
114
|
+
}
|
115
|
+
|
116
|
+
async function openDashboard(e) {
|
117
|
+
db.openDashboard();
|
118
|
+
}
|
119
|
+
window.openDashboard = openDashboard;
|
120
|
+
|
121
|
+
async function changeList(e) {
|
122
|
+
e.preventDefault();
|
123
|
+
const input = document.querySelector("#list");
|
124
|
+
dbName = input.value;
|
125
|
+
history.pushState(null, "", location.pathname + "?list=" + encodeURIComponent(dbName));
|
126
|
+
setupDb(dbName);
|
127
|
+
redraw();
|
128
|
+
}
|
129
|
+
window.changeList = changeList;
|
130
|
+
|
131
|
+
async function createTodoClick(e) {
|
132
|
+
e.preventDefault();
|
133
|
+
const input = document.querySelector("#todo");
|
134
|
+
input.disabled = true;
|
135
|
+
const ok = await db.put({ actor: actorTag, created: Date.now(), task: input.value, completed: false });
|
136
|
+
input.disabled = false;
|
137
|
+
input.value = "";
|
138
|
+
}
|
139
|
+
window.createTodoClick = createTodoClick;
|
140
|
+
|
141
|
+
let worker;
|
142
|
+
async function startWorker() {
|
143
|
+
const button = document.querySelector("#robot");
|
144
|
+
button.innerText = "🦾";
|
145
|
+
const dcs = await db.allDocs();
|
146
|
+
console.log("start worker", dcs.rows.length);
|
147
|
+
// worker = setInterval(async () => {
|
148
|
+
// dcs.rows.map((r) => db.put({ ...r.value, clicks: (r.value.clicks || 0) + 1, completed: Math.random() > 0.5 }))
|
149
|
+
// }, 5000)
|
150
|
+
goWorker(dcs);
|
151
|
+
}
|
152
|
+
const goWorker = (dcs) => {
|
153
|
+
worker = setTimeout(
|
154
|
+
async () => {
|
155
|
+
await Promise.all(
|
156
|
+
dcs.rows.slice(0, 5).map((r) => {
|
157
|
+
r.value.clicks = r.value.clicks || 0;
|
158
|
+
r.value.clicks += 1;
|
159
|
+
r.value.completed = Math.random() > 0.5;
|
160
|
+
db.put({ ...r.value });
|
161
|
+
}),
|
162
|
+
);
|
163
|
+
goWorker(dcs);
|
164
|
+
},
|
165
|
+
Math.floor(Math.random() * 5000) + 5000,
|
166
|
+
);
|
167
|
+
};
|
168
|
+
|
169
|
+
const stopWorker = () => {
|
170
|
+
const button = document.querySelector("#robot");
|
171
|
+
button.innerText = "🤖";
|
172
|
+
console.log("stop worker");
|
173
|
+
clearTimeout(worker);
|
174
|
+
};
|
175
|
+
const toggleWorker = (e) => {
|
176
|
+
e.preventDefault();
|
177
|
+
if (worker) {
|
178
|
+
stopWorker();
|
179
|
+
} else {
|
180
|
+
startWorker(e);
|
181
|
+
}
|
182
|
+
};
|
183
|
+
window.toggleWorker = toggleWorker;
|
184
|
+
|
185
|
+
async function doCompact(e) {
|
186
|
+
e.preventDefault();
|
187
|
+
compactor = "🚕";
|
188
|
+
drawInfo();
|
189
|
+
await db.compact();
|
190
|
+
drawInfo();
|
191
|
+
compactor = "🚗";
|
192
|
+
}
|
193
|
+
window.doCompact = doCompact;
|
194
|
+
|
195
|
+
window.onload = initialize;
|
196
|
+
window.db = db;
|
197
|
+
}
|
198
|
+
|
199
|
+
todoApp();
|
200
|
+
</script>
|
201
|
+
</head>
|
202
|
+
|
203
|
+
<body>
|
204
|
+
<h1>Fireproof Todos</h1>
|
205
|
+
List:
|
206
|
+
<input title="Change list" type="text" name="list" id="list" />
|
207
|
+
<button onclick="changeList(event)">Change List</button>
|
208
|
+
|
209
|
+
<p>
|
210
|
+
Fireproof stores data locally and encrypts it before sending it to the cloud. This demo uses web3.storage, but you can easily
|
211
|
+
run Fireproof on S3 or another provider.
|
212
|
+
<a href="https://use-fireproof.com/">Learn more in the Fireproof developer docs.</a>
|
213
|
+
</p>
|
214
|
+
|
215
|
+
<button onclick="openDashboard(event)">🔥 Import to Dashboard</button>
|
216
|
+
<button id="robot" onclick="toggleWorker(event)">🤖</button>
|
217
|
+
<br />
|
218
|
+
<span id="carLog" onclick="doCompact(event)"></span>
|
219
|
+
<br />
|
220
|
+
<span id="cxInfo"></span>
|
221
|
+
|
222
|
+
<h3>Todos</h3>
|
223
|
+
<input title="Create a todo" type="text" name="todo" id="todo" />
|
224
|
+
<button onclick="createTodoClick(event)">Create Todo</button>
|
225
|
+
<ul></ul>
|
226
|
+
</body>
|
227
|
+
</html>
|
@@ -0,0 +1,236 @@
|
|
1
|
+
<!doctype html>
|
2
|
+
<html lang="en">
|
3
|
+
<head>
|
4
|
+
<meta charset="UTF-8" />
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
6
|
+
<title>Fireproof Test</title>
|
7
|
+
<script src="./fireproof.iife.js"></script>
|
8
|
+
<script src="./connect-partykit.iife.js"></script>
|
9
|
+
<script type="text/javascript">
|
10
|
+
function todoApp() {
|
11
|
+
const actorTag = Math.random().toString(36).substring(2, 7);
|
12
|
+
const { fireproof, index } = Fireproof;
|
13
|
+
const { connect } = FireproofConnect;
|
14
|
+
|
15
|
+
// console.log('connect', connect)
|
16
|
+
|
17
|
+
let dbName;
|
18
|
+
let db;
|
19
|
+
let cx;
|
20
|
+
|
21
|
+
let dbUnsubscribe = false;
|
22
|
+
|
23
|
+
function setupDb(name, newDb, newConn) {
|
24
|
+
const input = document.querySelector("#todo");
|
25
|
+
input.disabled = true;
|
26
|
+
|
27
|
+
if (dbUnsubscribe) {
|
28
|
+
dbUnsubscribe();
|
29
|
+
}
|
30
|
+
if (newDb) {
|
31
|
+
// console.log('new db', newDb, newConn)
|
32
|
+
name = newDb.name;
|
33
|
+
dbName = newDb.name;
|
34
|
+
db = newDb;
|
35
|
+
cx = newConn;
|
36
|
+
const input = document.querySelector("#list");
|
37
|
+
input.value = dbName;
|
38
|
+
} else {
|
39
|
+
dbName = name;
|
40
|
+
db = fireproof(name, { autoCompact: 100, threshold: 50000 });
|
41
|
+
cx = connect.partykitRest(db);
|
42
|
+
cx.ready.then(async () => {
|
43
|
+
const span = document.querySelector("#cxInfo");
|
44
|
+
span.innerText = `📡 ${cx.party.id}`;
|
45
|
+
});
|
46
|
+
}
|
47
|
+
|
48
|
+
window.db = db;
|
49
|
+
window.cx = cx;
|
50
|
+
|
51
|
+
db.changes([], { limit: 1 }).then((changes) => {
|
52
|
+
if (changes.clock.length > 0) {
|
53
|
+
input.disabled = false;
|
54
|
+
} else {
|
55
|
+
cx.ready.then(async () => {
|
56
|
+
input.disabled = false;
|
57
|
+
});
|
58
|
+
}
|
59
|
+
});
|
60
|
+
|
61
|
+
dbUnsubscribe = db.subscribe(redraw);
|
62
|
+
return db;
|
63
|
+
}
|
64
|
+
|
65
|
+
let doing;
|
66
|
+
const redraw = async () => {
|
67
|
+
if (doing) {
|
68
|
+
return doing;
|
69
|
+
}
|
70
|
+
doing = doRedraw().finally(() => (doing = null));
|
71
|
+
return doing;
|
72
|
+
};
|
73
|
+
window.redraw = redraw;
|
74
|
+
|
75
|
+
let compactor = "🚗";
|
76
|
+
function drawInfo() {
|
77
|
+
document.querySelector("#carLog").innerText =
|
78
|
+
` ⏰ ${db._crdt.clock.head.length} ${compactor} ${cx.loader.carLog.length} 📩 ${cx.loader.remoteWAL.walState.operations.length}`;
|
79
|
+
}
|
80
|
+
const doRedraw = async () => {
|
81
|
+
drawInfo();
|
82
|
+
const result = await db.allDocs().catch((e) => {
|
83
|
+
console.error(
|
84
|
+
"allDocs error",
|
85
|
+
e,
|
86
|
+
` ⏰ ${db._crdt.clock.head.length} ${compactor} ${cx.loader.carLog.length} 📩 ${cx.loader.remoteWAL.walState.operations.length}`,
|
87
|
+
);
|
88
|
+
return { rows: [] };
|
89
|
+
});
|
90
|
+
drawInfo();
|
91
|
+
document.querySelector("ul").innerHTML = "";
|
92
|
+
for (const row of result.rows) {
|
93
|
+
// const doc = await db.get(row.id);
|
94
|
+
const doc = row.value;
|
95
|
+
const checkbox = document.createElement("input");
|
96
|
+
checkbox.setAttribute("type", "checkbox");
|
97
|
+
if (doc.completed) {
|
98
|
+
checkbox.setAttribute("checked", true);
|
99
|
+
}
|
100
|
+
checkbox.onchange = async (e) => {
|
101
|
+
e.target.indeterminate = true;
|
102
|
+
const clicks = doc.clicks || 0;
|
103
|
+
doc.clicks = clicks + 1;
|
104
|
+
doc.completed = !doc.completed;
|
105
|
+
await db.put(doc);
|
106
|
+
};
|
107
|
+
const textSpan = document.createElement("span");
|
108
|
+
textSpan.innerText = `${doc.actor}:${doc.clicks || 0} ${doc.task}`;
|
109
|
+
const li = document.createElement("li");
|
110
|
+
li.appendChild(checkbox);
|
111
|
+
li.appendChild(textSpan);
|
112
|
+
document.querySelector("ul").appendChild(li);
|
113
|
+
}
|
114
|
+
};
|
115
|
+
|
116
|
+
async function initialize() {
|
117
|
+
ps = new URLSearchParams(location.search);
|
118
|
+
const listQ = ps.get("list");
|
119
|
+
setupDb(listQ || "my-list");
|
120
|
+
const input = document.querySelector("#list");
|
121
|
+
input.value = dbName;
|
122
|
+
redraw();
|
123
|
+
}
|
124
|
+
|
125
|
+
async function openDashboard(e) {
|
126
|
+
db.openDashboard();
|
127
|
+
}
|
128
|
+
window.openDashboard = openDashboard;
|
129
|
+
|
130
|
+
async function changeList(e) {
|
131
|
+
e.preventDefault();
|
132
|
+
const input = document.querySelector("#list");
|
133
|
+
dbName = input.value;
|
134
|
+
history.pushState(null, "", location.pathname + "?list=" + encodeURIComponent(dbName));
|
135
|
+
setupDb(dbName);
|
136
|
+
redraw();
|
137
|
+
}
|
138
|
+
window.changeList = changeList;
|
139
|
+
|
140
|
+
async function createTodoClick(e) {
|
141
|
+
e.preventDefault();
|
142
|
+
const input = document.querySelector("#todo");
|
143
|
+
input.disabled = true;
|
144
|
+
const ok = await db.put({
|
145
|
+
actor: actorTag,
|
146
|
+
created: Date.now(),
|
147
|
+
task: input.value,
|
148
|
+
completed: false,
|
149
|
+
});
|
150
|
+
input.disabled = false;
|
151
|
+
input.value = "";
|
152
|
+
}
|
153
|
+
window.createTodoClick = createTodoClick;
|
154
|
+
|
155
|
+
let worker;
|
156
|
+
async function startWorker() {
|
157
|
+
const button = document.querySelector("#robot");
|
158
|
+
button.innerText = "🦾";
|
159
|
+
const dcs = await db.allDocs();
|
160
|
+
console.log("start worker", dcs.rows.length);
|
161
|
+
// worker = setInterval(async () => {
|
162
|
+
// dcs.rows.map((r) => db.put({ ...r.value, clicks: (r.value.clicks || 0) + 1, completed: Math.random() > 0.5 }))
|
163
|
+
// }, 5000)
|
164
|
+
goWorker(dcs);
|
165
|
+
}
|
166
|
+
const goWorker = (dcs) => {
|
167
|
+
const timeout =
|
168
|
+
10 +
|
169
|
+
Math.pow(db._crdt.clock.head.length + cx.loader.remoteWAL.walState.operations.length, 2) *
|
170
|
+
(Math.floor(Math.random() * 1000) + 1000);
|
171
|
+
// console.log('go worker', timeout/ 1000)
|
172
|
+
worker = setTimeout(async () => {
|
173
|
+
await Promise.all(
|
174
|
+
dcs.rows.slice(0, 5).map((r) => {
|
175
|
+
r.value.clicks = r.value.clicks || 0;
|
176
|
+
r.value.clicks += 1;
|
177
|
+
r.value.completed = Math.random() > 0.5;
|
178
|
+
db.put({ ...r.value });
|
179
|
+
}),
|
180
|
+
);
|
181
|
+
goWorker(await db.allDocs());
|
182
|
+
}, timeout);
|
183
|
+
};
|
184
|
+
|
185
|
+
const stopWorker = () => {
|
186
|
+
const button = document.querySelector("#robot");
|
187
|
+
button.innerText = "🤖";
|
188
|
+
console.log("stop worker");
|
189
|
+
clearTimeout(worker);
|
190
|
+
};
|
191
|
+
const toggleWorker = (e) => {
|
192
|
+
e.preventDefault();
|
193
|
+
if (worker) {
|
194
|
+
stopWorker();
|
195
|
+
} else {
|
196
|
+
startWorker(e);
|
197
|
+
}
|
198
|
+
};
|
199
|
+
window.toggleWorker = toggleWorker;
|
200
|
+
|
201
|
+
async function doCompact(e) {
|
202
|
+
e.preventDefault();
|
203
|
+
compactor = "🚕";
|
204
|
+
drawInfo();
|
205
|
+
await db.compact();
|
206
|
+
drawInfo();
|
207
|
+
compactor = "🚗";
|
208
|
+
}
|
209
|
+
window.doCompact = doCompact;
|
210
|
+
|
211
|
+
window.onload = initialize;
|
212
|
+
window.db = db;
|
213
|
+
}
|
214
|
+
|
215
|
+
todoApp();
|
216
|
+
</script>
|
217
|
+
</head>
|
218
|
+
|
219
|
+
<body>
|
220
|
+
<h1><a href="https://use-fireproof.com/">Fireproof</a> Test App</h1>
|
221
|
+
Database:
|
222
|
+
<input title="Change list" type="text" name="list" id="list" />
|
223
|
+
<button onclick="changeList(event)">Switch</button>
|
224
|
+
|
225
|
+
<p>This version of the Fireprof test app uses PartyKit as the storage backend. Refresh is automatic and live.</p>
|
226
|
+
|
227
|
+
<button id="robot" onclick="toggleWorker(event)">🤖</button>
|
228
|
+
<span id="carLog" onclick="doCompact(event)"></span>
|
229
|
+
<span id="cxInfo"></span>
|
230
|
+
|
231
|
+
<h3>Todos</h3>
|
232
|
+
<input title="Create a todo" type="text" name="todo" id="todo" />
|
233
|
+
<button onclick="createTodoClick(event)">Create Todo</button>
|
234
|
+
<ul></ul>
|
235
|
+
</body>
|
236
|
+
</html>
|