From 47fa0a9f6f1a70c25121813d6f982d487652c12d Mon Sep 17 00:00:00 2001 From: Aisland Date: Wed, 2 Sep 2026 00:47:18 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E7=A7=BB=E9=99=A4=E8=AF=AF=E5=85=A5?= =?UTF-8?q?=E5=BA=93=E7=9A=84=E6=8E=92=E9=9A=9C=E4=B8=B4=E6=97=B6=E8=84=9A?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 02_process/tmp-async.ps1 | 4 ---- 02_process/tmp-idb.ps1 | 4 ---- 02_process/tmp-list.ps1 | 2 -- 02_process/tmp-list2.ps1 | 2 -- 02_process/tmp-list3.ps1 | 4 ---- 02_process/tmp-list4.ps1 | 4 ---- 02_process/tmp-list5.ps1 | 4 ---- 02_process/tmp-seed.ps1 | 3 --- 8 files changed, 27 deletions(-) delete mode 100644 02_process/tmp-async.ps1 delete mode 100644 02_process/tmp-idb.ps1 delete mode 100644 02_process/tmp-list.ps1 delete mode 100644 02_process/tmp-list2.ps1 delete mode 100644 02_process/tmp-list3.ps1 delete mode 100644 02_process/tmp-list4.ps1 delete mode 100644 02_process/tmp-list5.ps1 delete mode 100644 02_process/tmp-seed.ps1 diff --git a/02_process/tmp-async.ps1 b/02_process/tmp-async.ps1 deleted file mode 100644 index a43d58a..0000000 --- a/02_process/tmp-async.ps1 +++ /dev/null @@ -1,4 +0,0 @@ -$ErrorActionPreference = 'Stop' -opencli --profile 74u3g3us browser wt eval "(() => { window.__t = 1; setTimeout(() => { window.__t = 2; }, 400); return 's'; })()" -Start-Sleep -Milliseconds 900 -opencli --profile 74u3g3us browser wt eval "window.__t" diff --git a/02_process/tmp-idb.ps1 b/02_process/tmp-idb.ps1 deleted file mode 100644 index 2d9d43c..0000000 --- a/02_process/tmp-idb.ps1 +++ /dev/null @@ -1,4 +0,0 @@ -$ErrorActionPreference = 'Stop' -opencli --profile 74u3g3us browser wt eval "(() => { window.__idb = 'pending'; const o = indexedDB.open('dsh-worktable', 2); o.onsuccess = () => { try { const db = o.result; const names = Array.from(db.objectStoreNames).join(','); const r = db.transaction('photoRecords', 'readonly').objectStore('photoRecords').get('default1'); r.onsuccess = () => { window.__idb = 'names=' + names + ';get-default1=' + (r.target.result ? 'found ' + r.target.result.blob.type + ' ' + r.target.result.blob.size : 'null'); }; r.onerror = () => { window.__idb = 'get-err'; }; } catch (e) { window.__idb = 'tx-err:' + e.message; } }; o.onerror = () => { window.__idb = 'open-err'; }; return 's'; })()" -Start-Sleep -Milliseconds 1500 -opencli --profile 74u3g3us browser wt eval "window.__idb" diff --git a/02_process/tmp-list.ps1 b/02_process/tmp-list.ps1 deleted file mode 100644 index 4463fda..0000000 --- a/02_process/tmp-list.ps1 +++ /dev/null @@ -1,2 +0,0 @@ -$ErrorActionPreference = 'Stop' -opencli --profile 74u3g3us browser wt eval "(() => { const o = indexedDB.open('dsh-worktable', 2); o.onsuccess = () => { const r = o.result.transaction('photoRecords', 'readonly').objectStore('photoRecords').getAll(); r.onsuccess = () => { const out = r.target.result.map(x => ({ id: x.id, createdAt: x.createdAt, type: x.blob && x.blob.type, size: x.blob && x.blob.size })); console.log('DATA:' + JSON.stringify(out)); }; }; return 'go'; })()" diff --git a/02_process/tmp-list2.ps1 b/02_process/tmp-list2.ps1 deleted file mode 100644 index 2638d6b..0000000 --- a/02_process/tmp-list2.ps1 +++ /dev/null @@ -1,2 +0,0 @@ -$ErrorActionPreference = 'Stop' -opencli --profile 74u3g3us browser wt eval "(async () => { const o = indexedDB.open('dsh-worktable', 2); const db = await new Promise((res, rej) => { o.onsuccess = () => res(o.result); o.onerror = () => rej(o.error); }); const r = db.transaction('photoRecords', 'readonly').objectStore('photoRecords').getAll(); const list = await new Promise((res, rej) => { r.onsuccess = () => res(r.target.result); r.onerror = () => rej(r.error); }); return JSON.stringify(list.map(x => ({ id: x.id, type: x.blob && x.blob.type, size: x.blob && x.blob.size }))); })()" diff --git a/02_process/tmp-list3.ps1 b/02_process/tmp-list3.ps1 deleted file mode 100644 index 65eba1b..0000000 --- a/02_process/tmp-list3.ps1 +++ /dev/null @@ -1,4 +0,0 @@ -$ErrorActionPreference = 'Stop' -opencli --profile 74u3g3us browser wt eval "(() => { const o = indexedDB.open('dsh-worktable', 2); o.onsuccess = () => { const r = o.result.transaction('photoRecords', 'readonly').objectStore('photoRecords').getAll(); r.onsuccess = () => { window.__mediaList = JSON.stringify(r.target.result.map(x => ({ id: x.id, type: x.blob && x.blob.type, size: x.blob && x.blob.size }))); }; }; return 'scheduled'; })()" -Start-Sleep -Milliseconds 1200 -opencli --profile 74u3g3us browser wt eval "window.__mediaList || 'none'" diff --git a/02_process/tmp-list4.ps1 b/02_process/tmp-list4.ps1 deleted file mode 100644 index 4b2cdeb..0000000 --- a/02_process/tmp-list4.ps1 +++ /dev/null @@ -1,4 +0,0 @@ -$ErrorActionPreference = 'Stop' -opencli --profile 74u3g3us browser wt eval "(() => { try { const o = indexedDB.open('dsh-worktable', 2); o.onerror = () => { window.__mediaList = 'open-err'; }; o.onsuccess = () => { const db = o.result; try { const tx = db.transaction('photoRecords', 'readonly'); const r = tx.objectStore('photoRecords').getAll(); r.onsuccess = () => { window.__mediaList = JSON.stringify(r.target.result.map(x => ({ id: x.id, type: x.blob && x.blob.type, size: x.blob && x.blob.size }))); }; r.onerror = () => { window.__mediaList = 'get-err'; }; } catch (e) { window.__mediaList = 'tx-err:' + e.message; } }; return 'go2'; })()" -Start-Sleep -Milliseconds 3000 -opencli --profile 74u3g3us browser wt eval "window.__mediaList || 'none2'" diff --git a/02_process/tmp-list5.ps1 b/02_process/tmp-list5.ps1 deleted file mode 100644 index 696f831..0000000 --- a/02_process/tmp-list5.ps1 +++ /dev/null @@ -1,4 +0,0 @@ -$ErrorActionPreference = 'Stop' -opencli --profile 74u3g3us browser wt eval "(() => { window.__mediaList = 'pending'; const o = indexedDB.open('dsh-worktable', 2); o.onerror = () => { window.__mediaList = 'open-err'; }; o.onsuccess = () => { const db = o.result; const r = db.transaction('photoRecords', 'readonly').objectStore('photoRecords').getAll(); r.onsuccess = () => { window.__mediaList = JSON.stringify(r.target.result.map(x => ({ id: x.id, type: x.blob && x.blob.type, size: x.blob && x.blob.size }))); }; r.onerror = () => { window.__mediaList = 'get-err'; }; }; return 'go3'; })()" -Start-Sleep -Milliseconds 2500 -opencli --profile 74u3g3us browser wt eval "window.__mediaList || 'none3'" diff --git a/02_process/tmp-seed.ps1 b/02_process/tmp-seed.ps1 deleted file mode 100644 index 170b797..0000000 --- a/02_process/tmp-seed.ps1 +++ /dev/null @@ -1,3 +0,0 @@ -$ErrorActionPreference = 'Stop' -opencli --profile 74u3g3us browser wt eval "(() => { try { const id = 'default1'; const svg = atob('PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMjgwIiBoZWlnaHQ9IjcyMCIgdmlld0JveD0iMCAwIDEyODAgNzIwIj48ZGVmcz48bGluZWFyR3JhZGllbnQgaWQ9ImciIHgxPSIwIiB5MT0iMCIgeDI9IjAiIHkyPSIxIj48c3RvcCBvZmZzZXQ9IjAiIHN0b3AtY29sb3I9IiMwYTBkMTMiLz48c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiMxMDFhMmUiLz48L2xpbmVhckdyYWRpZW50PjxyYWRpYWxHcmFkaWVudCBpZD0iYjEiPjxzdG9wIG9mZnNldD0iMCIgc3RvcC1jb2xvcj0iIzRmOGVmNyIgc3RvcC1vcGFjaXR5PSIwLjU1Ii8+PHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjNGY4ZWY3IiBzdG9wLW9wYWNpdHk9IjAiLz48L3JhZGlhbEdyYWRpZW50PjxyYWRpYWxHcmFkaWVudCBpZD0iYjIiPjxzdG9wIG9mZnNldD0iMCIgc3RvcC1jb2xvcj0iIzdhNWNmZiIgc3RvcC1vcGFjaXR5PSIwLjQ1Ii8+PHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjN2E1Y2ZmIiBzdG9wLW9wYWNpdHk9IjAiLz48L3JhZGlhbEdyYWRpZW50PjxyYWRpYWxHcmFkaWVudCBpZD0iYjMiPjxzdG9wIG9mZnNldD0iMCIgc3RvcC1jb2xvcj0iIzAwYzJmZiIgc3RvcC1vcGFjaXR5PSIwLjQiLz48c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiMwMGMyZmYiIHN0b3Atb3BhY2l0eT0iMCIvPjwvcmFkaWFsR3JhZGllbnQ+PHJhZGlhbEdyYWRpZW50IGlkPSJiNCI+PHN0b3Agb2Zmc2V0PSIwIiBzdG9wLWNvbG9yPSIjZmY5YTNkIiBzdG9wLW9wYWNpdHk9IjAuMjgiLz48c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiNmZjlhM2QiIHN0b3Atb3BhY2l0eT0iMCIvPjwvcmFkaWFsR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHdpZHRoPSIxMjgwIiBoZWlnaHQ9IjcyMCIgZmlsbD0idXJsKCNnKSIvPjxlbGxpcHNlIGN4PSIzMDAiIGN5PSIxODAiIHJ4PSI0MjAiIHJ5PSIyNjAiIGZpbGw9InVybCgjYjEpIi8+PGVsbGlwc2UgY3g9Ijk4MCIgY3k9IjIyMCIgcng9IjM4MCIgcnk9IjI0MCIgZmlsbD0idXJsKCNiMikiLz48ZWxsaXBzZSBjeD0iNzYwIiBjeT0iNTYwIiByeD0iNDIwIiByeT0iMjUwIiBmaWxsPSJ1cmwoI2IzKSIvPjxlbGxpcHNlIGN4PSIxODAiIGN5PSI2MDAiIHJ4PSIzMDAiIHJ5PSIyMDAiIGZpbGw9InVybCgjYjQpIi8+PC9zdmc+'); const o = indexedDB.open('dsh-worktable', 2); o.onsuccess = () => { const db = o.result; const tx = db.transaction('photoRecords', 'readwrite'); tx.objectStore('photoRecords').put({ id: id, createdAt: Date.now(), blob: new Blob([svg], { type: 'image/svg+xml' }) }, id); tx.oncomplete = () => { db.close(); }; tx.onerror = () => {}; }; return 'seeded-ok'; } catch (e) { return 'err:' + e.message; } })()" -opencli --profile 74u3g3us browser wt eval "(() => { const o = indexedDB.open('dsh-worktable', 2); let n = -1; o.onsuccess = () => { o.result.transaction('photoRecords', 'readonly').objectStore('photoRecords').getAll().onsuccess = (r) => { n = r.target.result.length; }; }; return 'count-scheduled'; })()"