atmosphere explorer

remove native-file-system-adapter

handle.invalid 60c9e3a6 2f472df2

verified
+22 -59
-1
package.json
··· 53 53 "@solidjs/meta": "^0.29.4", 54 54 "@solidjs/router": "^0.15.4", 55 55 "codemirror": "^6.0.2", 56 - "native-file-system-adapter": "^3.0.1", 57 56 "solid-js": "^1.9.11" 58 57 }, 59 58 "packageManager": "pnpm@10.17.1+sha512.17c560fca4867ae9473a3899ad84a88334914f379be46d455cbf92e5cf4b39d34985d452d2583baf19967fa76cb5c17bc9e245529d0b98745721aa7200ecaf7a"
-36
pnpm-lock.yaml
··· 98 98 codemirror: 99 99 specifier: ^6.0.2 100 100 version: 6.0.2 101 - native-file-system-adapter: 102 - specifier: ^3.0.1 103 - version: 3.0.1 104 101 solid-js: 105 102 specifier: ^1.9.11 106 103 version: 1.9.11 ··· 1122 1119 picomatch: 1123 1120 optional: true 1124 1121 1125 - fetch-blob@3.2.0: 1126 - resolution: {integrity: sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==} 1127 - engines: {node: ^12.20 || >= 14.13} 1128 - 1129 1122 fflate@0.8.2: 1130 1123 resolution: {integrity: sha512-cPJU47OaAoCbg0pBvzsgpTPhmhqI5eJjh/JIu8tPj5q+T7iLvW/JAYUqmE7KOB4R1ZyEhzBaIQpQpardBF5z8A==} 1131 1124 ··· 1277 1270 resolution: {integrity: sha512-c7+7RQ+dMB5dPwwCp4ee1/iV/q2P6aK1mTZcfr1BTuVlyW9hJYiMPybJCcnBlQtuSmTIWNeazm/zqNoZSSElBg==} 1278 1271 engines: {node: ^18 || >=20} 1279 1272 hasBin: true 1280 - 1281 - native-file-system-adapter@3.0.1: 1282 - resolution: {integrity: sha512-ocuhsYk2SY0906LPc3QIMW+rCV3MdhqGiy7wV5Bf0e8/5TsMjDdyIwhNiVPiKxzTJLDrLT6h8BoV9ERfJscKhw==} 1283 - engines: {node: '>=14.8.0'} 1284 - 1285 - node-domexception@1.0.0: 1286 - resolution: {integrity: sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==} 1287 - engines: {node: '>=10.5.0'} 1288 - deprecated: Use your platform's native DOMException instead 1289 1273 1290 1274 node-gyp-build@4.8.4: 1291 1275 resolution: {integrity: sha512-LA4ZjwlnUblHVgq0oBF3Jl/6h/Nvs5fzBLwdEF4nuxnFdsfajde4WfxtJr3CaiH+F6ewcIB/q4jQ4UzPyid+CQ==} ··· 1537 1521 w3c-keyname@2.2.8: 1538 1522 resolution: {integrity: sha512-dpojBhNsCNN7T82Tm7k26A6G9ML3NkhDsnw9n/eoxSRlVBB4CEtIQ/KTCLI2Fwf3ataSXRhYFkQi3SlnFwPvPQ==} 1539 1523 1540 - web-streams-polyfill@3.3.3: 1541 - resolution: {integrity: sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw==} 1542 - engines: {node: '>= 8'} 1543 - 1544 1524 yallist@3.1.1: 1545 1525 resolution: {integrity: sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==} 1546 1526 ··· 2511 2491 optionalDependencies: 2512 2492 picomatch: 4.0.3 2513 2493 2514 - fetch-blob@3.2.0: 2515 - dependencies: 2516 - node-domexception: 1.0.0 2517 - web-streams-polyfill: 3.3.3 2518 - optional: true 2519 - 2520 2494 fflate@0.8.2: {} 2521 2495 2522 2496 fsevents@2.3.3: ··· 2624 2598 nanoid@3.3.11: {} 2625 2599 2626 2600 nanoid@5.1.6: {} 2627 - 2628 - native-file-system-adapter@3.0.1: 2629 - optionalDependencies: 2630 - fetch-blob: 3.2.0 2631 - 2632 - node-domexception@1.0.0: 2633 - optional: true 2634 2601 2635 2602 node-gyp-build@4.8.4: {} 2636 2603 ··· 2816 2783 vite: 7.3.1(@types/node@25.3.0)(jiti@2.6.1)(lightningcss@1.31.1)(tsx@4.19.2) 2817 2784 2818 2785 w3c-keyname@2.2.8: {} 2819 - 2820 - web-streams-polyfill@3.3.3: 2821 - optional: true 2822 2786 2823 2787 yallist@3.1.1: {} 2824 2788
+22 -22
src/views/car/unpack.tsx
··· 1 1 import { fromStream } from "@atcute/repo"; 2 2 import { zip, type ZipEntry } from "@mary/zip"; 3 3 import { Title } from "@solidjs/meta"; 4 - import { FileSystemWritableFileStream, showSaveFilePicker } from "native-file-system-adapter"; 5 4 import { createSignal, onCleanup } from "solid-js"; 6 5 import { createDropHandler, createFileChangeHandler, handleDragOver } from "./file-handlers.js"; 7 6 import { createLogger, LoggerView } from "./logger.jsx"; ··· 114 113 const waiting = logger.progress(`Waiting for user...`); 115 114 116 115 try { 117 - const fd = await showSaveFilePicker({ 118 - suggestedName: `${file.name.replace(/\.car$/, "")}.zip`, 119 - // @ts-expect-error: ponyfill doesn't have full typings 120 - id: "car-unpack", 121 - startIn: "downloads", 122 - types: [ 123 - { 124 - description: "ZIP archive", 125 - accept: { "application/zip": [".zip"] }, 126 - }, 127 - ], 128 - }).catch((err) => { 129 - if (err instanceof DOMException && err.name === "AbortError") { 130 - logger.warn(`File picker was cancelled`); 131 - } else { 132 - logger.warn(`Something went wrong when opening the file picker`); 133 - } 134 - return undefined; 135 - }); 116 + // eslint-disable-next-line @typescript-eslint/no-explicit-any 117 + const fd = await (window as any).showSaveFilePicker({ 118 + suggestedName: `${file.name.replace(/\.car$/, "")}.zip`, 119 + id: "car-unpack", 120 + startIn: "downloads", 121 + types: [ 122 + { 123 + description: "ZIP archive", 124 + accept: { "application/zip": [".zip"] }, 125 + }, 126 + ], 127 + }) 128 + .catch((err: unknown) => { 129 + if (err instanceof DOMException && err.name === "AbortError") { 130 + logger.warn(`File picker was cancelled`); 131 + } else { 132 + logger.warn(`Something went wrong when opening the file picker`); 133 + } 134 + return undefined; 135 + }); 136 136 137 137 if (!fd) { 138 138 logger.warn(`No file handle obtained`); ··· 182 182 writeCount++; 183 183 // Await every 100th write to apply backpressure 184 184 if (writeCount % 100 === 0) { 185 - await writable.write(chunk); 185 + await writable.write(chunk as BufferSource); 186 186 } else { 187 - writable.write(chunk); // Fire and forget 187 + writable.write(chunk as BufferSource); 188 188 } 189 189 } 190 190