@aryasaatvik/scratchpad 0.2.1 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/README.md +32 -5
- package/SECURITY.md +1 -1
- package/dist/scratchpad.js +2460 -2119
- package/docs/adr/0002-bun-effect-sqlite.md +1 -1
- package/docs/adr/0009-worker-multipart-uploads.md +83 -0
- package/docs/adr/README.md +1 -0
- package/docs/release.md +2 -2
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## @aryasaatvik/scratchpad@0.3.0
|
|
2
|
+
|
|
3
|
+
### Upload larger files with resumable multipart transfers
|
|
4
|
+
|
|
5
|
+
Upload files up to 1 GiB through verified Worker-proxied multipart transfers. Large uploads use 32 MiB parts with three concurrent requests and SHA-256 verification. Resume interrupted transfers with `scratchpad upload <file> --resume <session-id>` while the session remains valid. Repeat any `--ttl-days`, `--name`, and `--content-type` options from the original upload with the same values, using the same authenticated profile.
|
|
6
|
+
|
|
7
|
+
### Honor expiry in public download caching
|
|
8
|
+
|
|
9
|
+
Expiring upload links and expired responses use `Cache-Control: no-store`, preventing caches from serving new copies past the configured expiry. Previously downloaded copies cannot be recalled.
|
|
10
|
+
|
|
11
|
+
### Use stable Effect v4
|
|
12
|
+
|
|
13
|
+
Update the CLI runtime to stable Effect v4 while preserving existing commands.
|
|
14
|
+
|
|
1
15
|
## @aryasaatvik/scratchpad@0.2.1
|
|
2
16
|
|
|
3
17
|
### Report the released version
|
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@ matter; the first provider is GitHub. Artifacts and uploads target a deployed
|
|
|
7
7
|
Worker (for example `scratchpad.arya.sh`). Codemaps stay on disk under
|
|
8
8
|
`.scratchpad/codemaps/`.
|
|
9
9
|
|
|
10
|
-
Status: 0.1.
|
|
10
|
+
Status: 0.2.1. Scratchpad is Bun-first.
|
|
11
11
|
|
|
12
12
|
## Packages
|
|
13
13
|
|
|
@@ -206,13 +206,40 @@ artifacts. Also require a profile or `--url`.
|
|
|
206
206
|
|
|
207
207
|
```
|
|
208
208
|
scratchpad upload <file...> [--name <name>] [--ttl-days <n>] [--profile <name>]
|
|
209
|
+
scratchpad upload <file> --resume <session-id> # repeat the original name/type/TTL options
|
|
209
210
|
scratchpad uploads list [--json]
|
|
210
211
|
scratchpad uploads delete <id>
|
|
211
212
|
```
|
|
212
213
|
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
214
|
+
Files up to 1 GiB can be uploaded from the CLI or Files view. The existing
|
|
215
|
+
single-request path handles files up to 100 MiB; larger files stream through
|
|
216
|
+
the Worker in 32 MiB parts. A public link appears only after R2 verifies the
|
|
217
|
+
whole file's SHA-256. Browser hashing reads bounded slices, and text previews
|
|
218
|
+
keep their separate 100 MiB ceiling.
|
|
219
|
+
|
|
220
|
+
Multipart sessions expire after 24 hours, or earlier if their `--ttl-days`
|
|
221
|
+
deadline passes. Requests retry transient failures without duplicating the
|
|
222
|
+
link. If a part's storage result is ambiguous, cancellation and a fresh upload
|
|
223
|
+
are safer than replacing a possibly in-flight part. Completion receipts let
|
|
224
|
+
API callers retry completion with the same session ID after a lost response.
|
|
225
|
+
The CLI's `--resume` flag resumes one unchanged file with its original options
|
|
226
|
+
and authenticated identity. Browser uploads retry in-process; they do not
|
|
227
|
+
persist a resumable session across page reloads.
|
|
228
|
+
`artifact prune --sweep-orphans` retries staging cleanup and removes old,
|
|
229
|
+
cleaned session records. See [the multipart upload design](docs/adr/0009-worker-multipart-uploads.md).
|
|
230
|
+
|
|
231
|
+
Uploaded bodies are served under `/f/*`. With `--ttl-days`, a link expires that
|
|
232
|
+
many days after registration, stops serving, and disappears from upload listings.
|
|
233
|
+
Expiring links use `Cache-Control: no-store` so subsequent requests recheck the
|
|
234
|
+
expiration; links without a TTL retain their one-year immutable caching policy.
|
|
235
|
+
Expiration cannot revoke copies already downloaded or responses cached under an
|
|
236
|
+
older cache policy.
|
|
237
|
+
|
|
238
|
+
Expiration is logical, not immediate storage deletion. Run
|
|
239
|
+
`artifact prune --sweep-orphans` to remove expired upload records and reclaim
|
|
240
|
+
unreferenced blobs after the orphan grace period. Blobs shared by another upload
|
|
241
|
+
or artifact remain available to that reference. Soft-deleted artifacts go to
|
|
242
|
+
Trash via `artifact delete`.
|
|
216
243
|
|
|
217
244
|
Most commands accept `--json` for machine-readable output.
|
|
218
245
|
|
|
@@ -273,6 +300,6 @@ bun run test:worker-integration # ephemeral Worker + paired HTML bridge; require
|
|
|
273
300
|
## Release
|
|
274
301
|
|
|
275
302
|
The npm package is `@aryasaatvik/scratchpad`. See
|
|
276
|
-
[`docs/release.md`](docs/release.md) for the
|
|
303
|
+
[`docs/release.md`](docs/release.md) for the preflight, publish, public
|
|
277
304
|
repository, and tag checklist. Worker deploy steps live in
|
|
278
305
|
[`docs/deploy.md`](docs/deploy.md).
|