@chrismessina/raycast-downloader 0.1.2 → 0.1.4
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/README.md +87 -0
- package/dist/curl.d.ts +35 -0
- package/dist/curl.d.ts.map +1 -1
- package/dist/curl.js +32 -1
- package/dist/curl.js.map +1 -1
- package/dist/detach.d.ts.map +1 -1
- package/dist/detach.js +151 -35
- package/dist/detach.js.map +1 -1
- package/dist/errors.d.ts +8 -0
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js.map +1 -1
- package/dist/partial.d.ts +189 -0
- package/dist/partial.d.ts.map +1 -0
- package/dist/partial.js +435 -0
- package/dist/partial.js.map +1 -0
- package/dist/runner.bundle.js +667 -10
- package/dist/runner.js +189 -9
- package/dist/runner.js.map +1 -1
- package/dist/status.d.ts +13 -0
- package/dist/status.d.ts.map +1 -1
- package/dist/status.js +9 -0
- package/dist/status.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -29,12 +29,83 @@ watchStatus(ticket.id, {
|
|
|
29
29
|
});
|
|
30
30
|
```
|
|
31
31
|
|
|
32
|
+
## Quick start: toasts and console logs from one watcher
|
|
33
|
+
|
|
34
|
+
The status file is the only channel the detached runner has, and it carries everything both surfaces need. Drive the toast and the log line from the same `watchStatus` handlers rather than building a second reporting path:
|
|
35
|
+
|
|
36
|
+
```ts
|
|
37
|
+
import { showToast, Toast } from "@raycast/api";
|
|
38
|
+
import { logger } from "@chrismessina/raycast-logger"; // optional, your install
|
|
39
|
+
import { startDownload, watchStatus, formatProgressLine, isDownloadError } from "@chrismessina/raycast-downloader";
|
|
40
|
+
|
|
41
|
+
// Fire the indicator BEFORE the async work, so the UI is never silent.
|
|
42
|
+
const toast = await showToast({ style: Toast.Style.Animated, title: "Starting download…" });
|
|
43
|
+
|
|
44
|
+
try {
|
|
45
|
+
const ticket = await startDownload({ url: signedUrl, outputPath, expectedBytes });
|
|
46
|
+
|
|
47
|
+
watchStatus(ticket.id, {
|
|
48
|
+
onChange: (s) => {
|
|
49
|
+
toast.title = s.state === "downloading" ? "Downloading" : "Preparing…";
|
|
50
|
+
toast.message = formatProgressLine(s);
|
|
51
|
+
logger.debug("download", { id: s.id, state: s.state, bytes: s.bytesDownloaded });
|
|
52
|
+
},
|
|
53
|
+
onSettled: (s) => {
|
|
54
|
+
if (s.state === "completed") {
|
|
55
|
+
toast.style = Toast.Style.Success;
|
|
56
|
+
toast.title = "Downloaded";
|
|
57
|
+
toast.message = s.filename;
|
|
58
|
+
logger.debug("download complete", { id: s.id, bytes: s.bytesDownloaded });
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
toast.style = Toast.Style.Failure;
|
|
62
|
+
toast.title = s.state === "cancelled" ? "Cancelled" : "Download failed";
|
|
63
|
+
toast.message = s.error?.message;
|
|
64
|
+
logger.debug("download failed", { id: s.id, code: s.error?.code, httpStatus: s.error?.httpStatus });
|
|
65
|
+
},
|
|
66
|
+
// The runner died without recording an outcome — a real state, not an edge
|
|
67
|
+
// case, and a toast left spinning is worse than one that says so.
|
|
68
|
+
onAbandoned: (s) => {
|
|
69
|
+
toast.style = Toast.Style.Failure;
|
|
70
|
+
toast.title = "Download interrupted";
|
|
71
|
+
logger.debug("download abandoned", { id: s.id, bytes: s.bytesDownloaded });
|
|
72
|
+
},
|
|
73
|
+
});
|
|
74
|
+
} catch (error) {
|
|
75
|
+
// Everything that fails before there is anything to watch lands here: no
|
|
76
|
+
// runner on disk, no curl, a spawn the OS refused outright. There is no
|
|
77
|
+
// ticket and no status file in those cases, so this is the only place they
|
|
78
|
+
// become visible. (A spawn that fails AFTER the OS assigned a pid is
|
|
79
|
+
// reported the other way — as a terminal `runner_failed` status your watcher
|
|
80
|
+
// receives — because by then you already have a ticket.)
|
|
81
|
+
toast.style = Toast.Style.Failure;
|
|
82
|
+
toast.title = "Could not start the download";
|
|
83
|
+
if (isDownloadError(error)) {
|
|
84
|
+
toast.message = error.message;
|
|
85
|
+
logger.debug("launch failed", { code: error.code, retryable: error.retryable });
|
|
86
|
+
}
|
|
87
|
+
throw error;
|
|
88
|
+
}
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
Three things worth copying exactly:
|
|
92
|
+
|
|
93
|
+
**Log the typed `code`, never the URL or the raw cause.** A signed URL is a bearer credential — it travels in a 0600 file rather than argv for that reason, and a log line is the easiest way to undo that. `error.code`, `error.httpStatus` and `retryable` say everything actionable without carrying the secret.
|
|
94
|
+
|
|
95
|
+
**Use `logger.debug` or `logger.log`, not `logger.error`.** This package takes no logger dependency — `@chrismessina/raycast-logger` is one you install yourself, and any logger works. If you use that one: as of v1.5.0 only `debug` and `log` are gated on the `verboseLogging` preference, while `error` and `warn` emit regardless, so an expected failure would print in every user's console. Check your own logger's gating before copying this.
|
|
96
|
+
|
|
97
|
+
**`onAbandoned` is not optional.** It fires when the runner died without recording an outcome, and a consumer that only handles `onSettled` leaves the toast animating forever.
|
|
98
|
+
|
|
99
|
+
The package itself logs nothing and takes no logger dependency. That is deliberate: the runner runs outside the Raycast host, where `@raycast/api` does not resolve and its stdio is discarded, so anything it printed would go nowhere. What it knows, it writes to the status file — which is what the code above reads.
|
|
100
|
+
|
|
32
101
|
## Scope of the guarantee
|
|
33
102
|
|
|
34
103
|
**Survives:** Raycast dismissal, the command being unloaded, the parent process exiting.
|
|
35
104
|
|
|
36
105
|
**Does not survive** (without user action): machine sleep, power loss, unattended network drops. A partial file is retained so an interrupted transfer resumes via HTTP Range instead of starting over.
|
|
37
106
|
|
|
107
|
+
**Resume is not automatic on a byte count.** A `.part` file is resumed only when the package can identify it as its own AND the server gave it something to check: the URL it came from and the `ETag`/`Last-Modified` that describe the bytes are recorded beside the file as it downloads, and the validator is sent back as `If-Range`. A partial with no record — one written by an older version, or a file that happens to occupy the path — is reset and the download restarts, and so is one whose server sent no validator at all. A re-signed URL still resumes: identity ignores the query string, which is what makes the documented "request a fresh link and continue" recovery work. `curl -C -` asserts that the bytes on disk are a correct prefix of what it is fetching, and nothing downstream can check that assertion: measured against a Range-capable server, an 8-byte wrong prefix completes with exit 0, HTTP 206, and a published file that is silently spliced.
|
|
108
|
+
|
|
38
109
|
**One exception, and it is deliberate:** a partial is discarded when it cannot be proven safe to resume from. An unfollowed 3xx leaves the redirect body in the `.part` file; that tail is rolled back, and if the rollback cannot be verified the partial is deleted rather than kept. `curl -C -` appends from the file's current size, so resuming onto unverified bytes would splice the real file after redirect HTML and publish it under the user's filename. Progress is recoverable; a corrupt file is not. If the partial cannot be deleted either, the status records the failure and consumers must not resume that path.
|
|
39
110
|
|
|
40
111
|
This is stated narrowly on purpose. Detached spawn solves parent-process-exit — the problem Raycast creates. It is not a download supervisor.
|
|
@@ -121,6 +192,22 @@ Import from the root or from a subpath (`@chrismessina/raycast-downloader/paths`
|
|
|
121
192
|
|
|
122
193
|
## Notes for consumers
|
|
123
194
|
|
|
195
|
+
**`Range` and `If-Range` are not yours to set.** Passing either in `headers` throws `DownloadError` with `code: "validation"`. The downloader generates both, caller headers are appended after the generated ones, and a duplicate is what a server or proxy may act on — which turns the resume guard off silently.
|
|
196
|
+
|
|
197
|
+
**One destination, one live download.** `startDownload` claims the destination before it spawns anything, and a second attempt against a path a live attempt already holds is refused with `code: "conflict"` rather than queued or silently renamed. Two downloads sharing an `outputPath` append to each other's bytes — exit 0, HTTP 206, published. If you need a free name instead of a refusal, `uniquePath` allocates one:
|
|
198
|
+
|
|
199
|
+
```ts
|
|
200
|
+
import { uniquePath } from "@chrismessina/raycast-downloader/paths";
|
|
201
|
+
|
|
202
|
+
const outputPath = uniquePath(downloadsDir, filename, { reserve: true });
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
A claim whose owner is provably dead is stolen, so a runner killed mid-transfer does not wedge the filename.
|
|
206
|
+
|
|
207
|
+
**Three sidecar files may exist next to a `.part` while a download is live** — `.state`, `.claim` and `.headers`. They hold the provenance that makes a resume safe, the live-attempt claim, and curl's header dump. All are removed when the download completes. If you enumerate the destination directory to show the user what is in flight, filter them out.
|
|
208
|
+
|
|
209
|
+
**Check `partialUnsafe` before you resume.** A failed download normally leaves its `.part` file in place precisely so a retry can resume from it. `partialUnsafe: true` on the status is the exception: the runner put something in that file that does not belong to the download and could not take it back out. **The package enforces this itself** — the same fact is recorded beside the file, and a later attempt resets the partial or fails rather than resuming onto it — so the flag is there for what you show the user, not for a rule you have to implement. The flag is absent on every ordinary status — including failures whose partial is perfectly resumable — and absence means "nothing was recorded", not "verified safe": a runner older than 0.1.3 cannot set it. Do not read `bytesDownloaded: 0` as the same signal; an empty response and a failed setup report zero too.
|
|
210
|
+
|
|
124
211
|
**A 3xx is never a successful download — including with redirects on.** Success is strictly 2xx. With redirects on (the default) curl follows the hops and reports the final 2xx, so the usual redirect is invisible to you; but `--location` only follows a response carrying a usable `Location`, so a **304** (you sent a conditional header) or a **300** ends the transfer as itself. Those now fail with `http_client` rather than publishing an empty or stale file. With `followRedirects: false`, curl writes the redirect *body* to the `.part` file and exits 0 — that stub is discarded and the download fails with "The server redirected (HTTP 302) but redirects are disabled." Expose the preference if your users need it; don't expect a 302 to still produce a file.
|
|
125
212
|
|
|
126
213
|
**Never put a signed URL in `meta`.** It is persisted to the status file. Store an identifier you can re-resolve from instead.
|
package/dist/curl.d.ts
CHANGED
|
@@ -48,6 +48,26 @@ export interface CurlConfigOptions {
|
|
|
48
48
|
* see the note above about sleep.
|
|
49
49
|
*/
|
|
50
50
|
maxTimeSeconds?: number;
|
|
51
|
+
/**
|
|
52
|
+
* Write the response headers to this path (`--dump-header`).
|
|
53
|
+
*
|
|
54
|
+
* The point is the NEXT attempt, not this one: a resumed transfer has to
|
|
55
|
+
* prove the bytes on disk still belong to the resource it is about to append
|
|
56
|
+
* to, and `ETag`/`Last-Modified` are the only proof a server offers. They are
|
|
57
|
+
* dumped even for an interrupted transfer, because that is precisely the
|
|
58
|
+
* transfer whose partial gets resumed.
|
|
59
|
+
*/
|
|
60
|
+
dumpHeaderPath?: string;
|
|
61
|
+
/**
|
|
62
|
+
* `If-Range` validator for a resumed transfer.
|
|
63
|
+
*
|
|
64
|
+
* Turns a silent splice into a clean refusal. Measured against a
|
|
65
|
+
* Range-capable local server: with a stale validator the server answers 200
|
|
66
|
+
* with the whole body, and curl exits 33 leaving the partial untouched —
|
|
67
|
+
* where the same request WITHOUT `If-Range` gets a 206 and appends the new
|
|
68
|
+
* resource's bytes to the old resource's prefix, exit 0, published.
|
|
69
|
+
*/
|
|
70
|
+
ifRange?: string;
|
|
51
71
|
}
|
|
52
72
|
/**
|
|
53
73
|
* Build the contents of a curl config file (`curl -K <file>`).
|
|
@@ -56,6 +76,21 @@ export interface CurlConfigOptions {
|
|
|
56
76
|
* delete once curl has started.
|
|
57
77
|
*/
|
|
58
78
|
export declare function buildCurlConfig(options: CurlConfigOptions): string;
|
|
79
|
+
/**
|
|
80
|
+
* Refuse caller headers that would fight the resume machinery.
|
|
81
|
+
*
|
|
82
|
+
* `Range` and `If-Range` belong to the transport. Caller headers are appended
|
|
83
|
+
* AFTER the generated ones, so a second `If-Range` — or a hand-written `Range`
|
|
84
|
+
* — is what a server or proxy may act on, and the resume guard silently stops
|
|
85
|
+
* guarding: a 206 comes back for bytes that do not continue the partial, curl
|
|
86
|
+
* exits 0, and the spliced file is published.
|
|
87
|
+
*
|
|
88
|
+
* Refused rather than dropped, because a caller who passed one meant something
|
|
89
|
+
* by it and deserves to be told it cannot work. Exported so `startDownload` can
|
|
90
|
+
* fail before it claims a path or spawns anything, rather than minutes later
|
|
91
|
+
* inside a detached process.
|
|
92
|
+
*/
|
|
93
|
+
export declare function assertCallerHeaders(headers?: Record<string, string>): void;
|
|
59
94
|
export interface CurlProgress {
|
|
60
95
|
bytesDownloaded: number;
|
|
61
96
|
totalBytes?: number;
|
package/dist/curl.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"curl.d.ts","sourceRoot":"","sources":["../src/curl.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GA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AAE,MAAM,GAAG,YAAY,CAU1D;AAwBD,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,MAAM,CAAC,EAAE,UAAU,GAAG,IAAI,CAAC;IAC3B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,gEAAgE;IAChE,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,yEAAyE;IACzE,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,iBAAiB,GAAG,aAAa,CA4C3E"}
|
package/dist/curl.js
CHANGED
|
@@ -22,6 +22,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
22
22
|
exports.DEFAULT_STALL_SECONDS = exports.DEFAULT_SPEED_LIMIT_BYTES = void 0;
|
|
23
23
|
exports.hasCurl = hasCurl;
|
|
24
24
|
exports.buildCurlConfig = buildCurlConfig;
|
|
25
|
+
exports.assertCallerHeaders = assertCallerHeaders;
|
|
25
26
|
exports.parseCurlMeter = parseCurlMeter;
|
|
26
27
|
exports.parseCurlSize = parseCurlSize;
|
|
27
28
|
exports.parseCurlDuration = parseCurlDuration;
|
|
@@ -64,7 +65,7 @@ exports.DEFAULT_STALL_SECONDS = 120;
|
|
|
64
65
|
* delete once curl has started.
|
|
65
66
|
*/
|
|
66
67
|
function buildCurlConfig(options) {
|
|
67
|
-
const { url, outputPath, headers = {}, followRedirects = true, resume = false, speedLimitBytes = exports.DEFAULT_SPEED_LIMIT_BYTES, stallSeconds = exports.DEFAULT_STALL_SECONDS, connectTimeoutSeconds = 30, limitRateBytes, maxTimeSeconds, } = options;
|
|
68
|
+
const { url, outputPath, headers = {}, followRedirects = true, resume = false, speedLimitBytes = exports.DEFAULT_SPEED_LIMIT_BYTES, stallSeconds = exports.DEFAULT_STALL_SECONDS, connectTimeoutSeconds = 30, limitRateBytes, maxTimeSeconds, dumpHeaderPath, ifRange, } = options;
|
|
68
69
|
const lines = [
|
|
69
70
|
`url = "${escapeConfigValue(url)}"`,
|
|
70
71
|
`output = "${escapeConfigValue(outputPath)}"`,
|
|
@@ -93,13 +94,43 @@ function buildCurlConfig(options) {
|
|
|
93
94
|
lines.push("continue-at = -");
|
|
94
95
|
if (limitRateBytes !== undefined)
|
|
95
96
|
lines.push(`limit-rate = ${limitRateBytes}`);
|
|
97
|
+
if (dumpHeaderPath)
|
|
98
|
+
lines.push(`dump-header = "${escapeConfigValue(dumpHeaderPath)}"`);
|
|
99
|
+
// Only meaningful alongside `continue-at`, which is what generates the Range
|
|
100
|
+
// this validates. Harmless without one: a server ignores `If-Range` on an
|
|
101
|
+
// unranged request.
|
|
102
|
+
if (ifRange)
|
|
103
|
+
lines.push(`header = "${escapeConfigValue(`If-Range: ${ifRange}`)}"`);
|
|
96
104
|
if (maxTimeSeconds !== undefined)
|
|
97
105
|
lines.push(`max-time = ${maxTimeSeconds}`);
|
|
106
|
+
assertCallerHeaders(headers);
|
|
98
107
|
for (const [name, value] of Object.entries(headers)) {
|
|
99
108
|
lines.push(`header = "${escapeConfigValue(`${name}: ${value}`)}"`);
|
|
100
109
|
}
|
|
101
110
|
return lines.join("\n") + "\n";
|
|
102
111
|
}
|
|
112
|
+
/**
|
|
113
|
+
* Refuse caller headers that would fight the resume machinery.
|
|
114
|
+
*
|
|
115
|
+
* `Range` and `If-Range` belong to the transport. Caller headers are appended
|
|
116
|
+
* AFTER the generated ones, so a second `If-Range` — or a hand-written `Range`
|
|
117
|
+
* — is what a server or proxy may act on, and the resume guard silently stops
|
|
118
|
+
* guarding: a 206 comes back for bytes that do not continue the partial, curl
|
|
119
|
+
* exits 0, and the spliced file is published.
|
|
120
|
+
*
|
|
121
|
+
* Refused rather than dropped, because a caller who passed one meant something
|
|
122
|
+
* by it and deserves to be told it cannot work. Exported so `startDownload` can
|
|
123
|
+
* fail before it claims a path or spawns anything, rather than minutes later
|
|
124
|
+
* inside a detached process.
|
|
125
|
+
*/
|
|
126
|
+
function assertCallerHeaders(headers = {}) {
|
|
127
|
+
for (const name of Object.keys(headers)) {
|
|
128
|
+
if (/^(range|if-range)$/i.test(name.trim())) {
|
|
129
|
+
throw new errors_1.DownloadError("validation", `The ${name.trim()} header is managed by the downloader and cannot be set by a caller. ` +
|
|
130
|
+
`Use the resume option instead.`);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
103
134
|
/**
|
|
104
135
|
* Escape a value for curl's config quoting.
|
|
105
136
|
*
|
package/dist/curl.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"curl.js","sourceRoot":"","sources":["../src/curl.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;GAkBG;;;AAiBH,0BAWC;
|
|
1
|
+
{"version":3,"file":"curl.js","sourceRoot":"","sources":["../src/curl.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;GAkBG;;;AAiBH,0BAWC;AA4DD,0CAuDC;AAgBD,kDAUC;AA2CD,wCA0BC;AAGD,sCAWC;AAGD,8CAQC;AASD,sCAUC;AA0CD,kDA4CC;AA9WD,qCAAsG;AAEtG;;;;;;;;;;GAUG;AACH,IAAI,aAAkC,CAAC;AAEvC,SAAgB,OAAO;IACrB,IAAI,aAAa,KAAK,SAAS;QAAE,OAAO,aAAa,CAAC;IACtD,IAAI,CAAC;QACH,8DAA8D;QAC9D,MAAM,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,oBAAoB,CAAwC,CAAC;QAC9F,YAAY,CAAC,MAAM,EAAE,CAAC,WAAW,CAAC,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;QACxE,aAAa,GAAG,IAAI,CAAC;IACvB,CAAC;IAAC,MAAM,CAAC;QACP,aAAa,GAAG,KAAK,CAAC;IACxB,CAAC;IACD,OAAO,aAAa,CAAC;AACvB,CAA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ACT,MAAM,CAAC,CAAC,CAAC,oBAAoB,MAAM,EAAE,CAAC,CAAC,CAAC,8BAA8B,QAAQ,IAAI,SAAS,IAAI,EAC/F,EAAE,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,CAC3C,CAAC;AACJ,CAAC;AAED;;;;;;;GAOG;AACH,SAAS,yBAAyB,CAAC,MAAc,EAAE,eAAwB;IACzE,IAAI,MAAM,KAAK,GAAG;QAAE,OAAO,2EAA2E,CAAC;IACvG,IAAI,CAAC,eAAe;QAAE,OAAO,+BAA+B,MAAM,+BAA+B,CAAC;IAClG,OAAO,mEAAmE,MAAM,IAAI,CAAC;AACvF,CAAC;AAED,SAAS,gBAAgB,CAAC,MAAc;IACtC,QAAQ,MAAM,EAAE,CAAC;QACf,KAAK,GAAG;YACN,OAAO,iDAAiD,CAAC;QAC3D,KAAK,GAAG;YACN,OAAO,4FAA4F,CAAC;QACtG,KAAK,GAAG;YACN,OAAO,uCAAuC,CAAC;QACjD,KAAK,GAAG;YACN,OAAO,gCAAgC,CAAC;QAC1C,KAAK,GAAG;YACN,OAAO,kDAAkD,CAAC;QAC5D,KAAK,GAAG;YACN,OAAO,gDAAgD,CAAC;QAC1D;YACE,OAAO,MAAM,IAAI,GAAG;gBAClB,CAAC,CAAC,+CAA+C,MAAM,IAAI;gBAC3D,CAAC,CAAC,yCAAyC,MAAM,IAAI,CAAC;IAC5D,CAAC;AACH,CAAC"}
|
package/dist/detach.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"detach.d.ts","sourceRoot":"","sources":["../src/detach.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;
|
|
1
|
+
{"version":3,"file":"detach.d.ts","sourceRoot":"","sources":["../src/detach.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAiBH,OAAO,EAUL,KAAK,cAAc,EACpB,MAAM,UAAU,CAAC;AAElB,MAA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O,CAAC,cAAc,CAAC,CAqP1F;AAuBD,MAAM,WAAW,WAAW;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uEAAuE;IACvE,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;;;GAQG;AACH,wBAAsB,YAAY,CAChC,MAAM,EAAE;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,EACpC,OAAO,GAAE,WAAgB,GACxB,OAAO,CAAC,OAAO,CAAC,CA6FlB;AAoCD;;;;;;;GAOG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE,cAAc,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,cAAc,CAEpF"}
|
package/dist/detach.js
CHANGED
|
@@ -32,6 +32,7 @@ const node_fs_1 = require("node:fs");
|
|
|
32
32
|
const node_path_1 = require("node:path");
|
|
33
33
|
const curl_1 = require("./curl");
|
|
34
34
|
const errors_1 = require("./errors");
|
|
35
|
+
const partial_1 = require("./partial");
|
|
35
36
|
const paths_1 = require("./paths");
|
|
36
37
|
const status_1 = require("./status");
|
|
37
38
|
/**
|
|
@@ -119,6 +120,10 @@ async function startDownload(options) {
|
|
|
119
120
|
// Rejects an id that could escape statusDir via `join()`. Done before any
|
|
120
121
|
// path is built from it.
|
|
121
122
|
(0, status_1.assertSafeId)(id);
|
|
123
|
+
// Before anything is claimed or spawned: a header that would defeat the
|
|
124
|
+
// resume guard is a caller mistake, and a detached process reporting it
|
|
125
|
+
// minutes later is a worse way to learn about it.
|
|
126
|
+
(0, curl_1.assertCallerHeaders)(headers);
|
|
122
127
|
const filename = options.filename ?? outputPath.split("/").pop() ?? "download";
|
|
123
128
|
const partPath = `${outputPath}.part`;
|
|
124
129
|
const runner = runnerOverride ?? runnerPath();
|
|
@@ -131,32 +136,70 @@ async function startDownload(options) {
|
|
|
131
136
|
`If this extension is bundled, copy the package's dist/runner.bundle.js next to the bundle, ` +
|
|
132
137
|
`or set RAYCAST_DOWNLOADER_RUNNER to its path.`);
|
|
133
138
|
}
|
|
139
|
+
// Claim the PATH before anything is written to it, and before the runner that
|
|
140
|
+
// will write to it is spawned.
|
|
141
|
+
//
|
|
142
|
+
// Ids do not protect a file. Two downloads with different ids can name one
|
|
143
|
+
// `outputPath`, and the second one's `curl -C -` appends to the first one's
|
|
144
|
+
// bytes — exit 0, HTTP 206, published. Leases and status locks are both
|
|
145
|
+
// id-scoped, so neither of them sees this at all.
|
|
146
|
+
//
|
|
147
|
+
// Refused rather than serialized or renamed: a queued download looks hung,
|
|
148
|
+
// and silently writing to a different filename than the caller asked for is
|
|
149
|
+
// exactly the override this package refuses to do elsewhere. A caller that
|
|
150
|
+
// wants a free name can get one from `uniquePath`.
|
|
151
|
+
const claimToken = (0, partial_1.claimPartialPath)(partPath, {
|
|
152
|
+
pid: process.pid,
|
|
153
|
+
startedAtMs: (0, status_1.processStartTimeMs)(process.pid) ?? Date.now(),
|
|
154
|
+
id,
|
|
155
|
+
});
|
|
156
|
+
if (!claimToken) {
|
|
157
|
+
const holder = (0, partial_1.partialClaimHolder)(partPath);
|
|
158
|
+
throw new errors_1.DownloadError("conflict", `Another download is already writing to ${outputPath}` +
|
|
159
|
+
`${holder ? ` (process ${holder.pid}, download ${holder.id})` : ""}. ` +
|
|
160
|
+
`Wait for it to finish, or choose a different destination.`);
|
|
161
|
+
}
|
|
162
|
+
// A partial that a PREVIOUS version marked unsafe recorded it in its status
|
|
163
|
+
// and nowhere else. Carry that forward to the file itself, so the runner —
|
|
164
|
+
// which reads the path, not the id — refuses to resume onto it. Id-addressed,
|
|
165
|
+
// not a scan: this is the status for the id the caller handed us.
|
|
166
|
+
if ((0, status_1.readStatus)(id, statusDir)?.partialUnsafe)
|
|
167
|
+
(0, partial_1.markPartialUnsafe)(partPath);
|
|
134
168
|
// Fail here rather than minutes later inside the runner: a missing binary is a
|
|
135
169
|
// prerequisite the user can fix, not a transport error.
|
|
136
170
|
if (!(0, curl_1.hasCurl)()) {
|
|
171
|
+
(0, partial_1.releasePartialClaim)(partPath, claimToken);
|
|
137
172
|
throw new errors_1.DownloadError("validation", "curl is required to download files but was not found on this system.");
|
|
138
173
|
}
|
|
139
174
|
// The payload carries the URL, so it goes in a 0600 file rather than argv,
|
|
140
175
|
// which `ps` exposes to every process on the machine. The runner unlinks it.
|
|
141
176
|
const payloadPath = (0, node_path_1.join)(statusDir, `${id}.payload.json`);
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
177
|
+
try {
|
|
178
|
+
(0, paths_1.writeSecretFile)(payloadPath, JSON.stringify({
|
|
179
|
+
id,
|
|
180
|
+
url,
|
|
181
|
+
outputPath,
|
|
182
|
+
partPath,
|
|
183
|
+
filename,
|
|
184
|
+
statusDir,
|
|
185
|
+
headers,
|
|
186
|
+
expectedBytes,
|
|
187
|
+
resume,
|
|
188
|
+
followRedirects,
|
|
189
|
+
speedLimitBytes,
|
|
190
|
+
stallSeconds,
|
|
191
|
+
limitRateBytes,
|
|
192
|
+
sizeCheck,
|
|
193
|
+
claimToken,
|
|
194
|
+
meta,
|
|
195
|
+
notifyOnFinish,
|
|
196
|
+
}));
|
|
197
|
+
}
|
|
198
|
+
catch (error) {
|
|
199
|
+
// Nothing has been spawned, so this claim belongs to nobody.
|
|
200
|
+
(0, partial_1.releasePartialClaim)(partPath, claimToken);
|
|
201
|
+
throw error;
|
|
202
|
+
}
|
|
160
203
|
const child = (0, node_child_process_1.spawn)(process.execPath, [runner, payloadPath], {
|
|
161
204
|
// POSIX: makes the child a process-group leader so `kill(-pid)` reaches
|
|
162
205
|
// curl too, and detaches it from the parent's session so it survives the
|
|
@@ -170,8 +213,79 @@ async function startDownload(options) {
|
|
|
170
213
|
windowsHide: true,
|
|
171
214
|
});
|
|
172
215
|
child.unref();
|
|
216
|
+
// One shape for both statuses this function may write: the spawn-failure
|
|
217
|
+
// below and the start-up seed further down. They differ in three fields and
|
|
218
|
+
// agreed on a dozen, and a field added to `DownloadStatus` must not have to
|
|
219
|
+
// be remembered twice — the half that gets forgotten is the failure path,
|
|
220
|
+
// which nothing routinely exercises.
|
|
221
|
+
const statusFor = (forPid, state, extra = {}) => {
|
|
222
|
+
const now = Date.now();
|
|
223
|
+
return {
|
|
224
|
+
schema: 1,
|
|
225
|
+
id,
|
|
226
|
+
pid: forPid,
|
|
227
|
+
startedAtMs: (0, status_1.processStartTimeMs)(forPid) ?? now,
|
|
228
|
+
state,
|
|
229
|
+
filename,
|
|
230
|
+
outputPath,
|
|
231
|
+
partPath,
|
|
232
|
+
bytesDownloaded: 0,
|
|
233
|
+
totalBytes: expectedBytes,
|
|
234
|
+
startedAt: now,
|
|
235
|
+
heartbeatAt: now,
|
|
236
|
+
meta,
|
|
237
|
+
...extra,
|
|
238
|
+
};
|
|
239
|
+
};
|
|
240
|
+
// Attached BEFORE `child.pid` is inspected, which is the whole point.
|
|
241
|
+
//
|
|
242
|
+
// `spawn` reports ENOENT, EACCES and EMFILE ASYNCHRONOUSLY, on the child's
|
|
243
|
+
// `error` event, and an `error` event with no listener is thrown by
|
|
244
|
+
// EventEmitter. Measured on Node 22: spawning a nonexistent executable
|
|
245
|
+
// returns `pid === undefined` AND emits `error: ENOENT` a tick later — so
|
|
246
|
+
// registering after the `pid === undefined` branch below means that branch
|
|
247
|
+
// throws a clean DownloadError and the process then dies anyway on the
|
|
248
|
+
// unhandled event, in the Raycast host rather than in the caller's `catch`.
|
|
249
|
+
//
|
|
250
|
+
// Reported through the status file when there is a pid to report it against:
|
|
251
|
+
// the download the caller is already watching has to reach a terminal state,
|
|
252
|
+
// and this is the only channel a watcher listens on. With no pid there is no
|
|
253
|
+
// ticket, no watcher, and no valid status to write (readers require a
|
|
254
|
+
// positive pid), so the throw below is the entire contract.
|
|
255
|
+
let spawnFailed = false;
|
|
256
|
+
child.on("error", (error) => {
|
|
257
|
+
spawnFailed = true;
|
|
258
|
+
// The runner never ran, so nothing else will ever release this path. By
|
|
259
|
+
// token, because this handler fires AFTER `startDownload` threw: the caller
|
|
260
|
+
// may already have retried and taken a new claim, and releasing that one
|
|
261
|
+
// would hand the path to a third attempt mid-transfer.
|
|
262
|
+
(0, partial_1.releasePartialClaim)(partPath, claimToken);
|
|
263
|
+
try {
|
|
264
|
+
(0, node_fs_1.unlinkSync)(payloadPath);
|
|
265
|
+
}
|
|
266
|
+
catch {
|
|
267
|
+
// The runner never started, so nothing else will remove it.
|
|
268
|
+
}
|
|
269
|
+
const failedPid = child.pid;
|
|
270
|
+
if (failedPid === undefined)
|
|
271
|
+
return;
|
|
272
|
+
try {
|
|
273
|
+
(0, status_1.writeStatus)(statusFor(failedPid, "failed", {
|
|
274
|
+
finishedAt: Date.now(),
|
|
275
|
+
// `runner_failed`, deliberately not retryable: the helper could not be
|
|
276
|
+
// started at all, and the environment that prevented it is unchanged
|
|
277
|
+
// by trying again.
|
|
278
|
+
error: { code: "runner_failed", message: `Could not start the download process: ${error.message}` },
|
|
279
|
+
}), statusDir);
|
|
280
|
+
}
|
|
281
|
+
catch {
|
|
282
|
+
// A status write that fails leaves the watcher to time out on a missing
|
|
283
|
+
// status, which is the pre-existing behaviour and still terminal.
|
|
284
|
+
}
|
|
285
|
+
});
|
|
173
286
|
const pid = child.pid;
|
|
174
287
|
if (pid === undefined) {
|
|
288
|
+
(0, partial_1.releasePartialClaim)(partPath, claimToken);
|
|
175
289
|
try {
|
|
176
290
|
(0, node_fs_1.unlinkSync)(payloadPath);
|
|
177
291
|
}
|
|
@@ -180,6 +294,11 @@ async function startDownload(options) {
|
|
|
180
294
|
}
|
|
181
295
|
throw new errors_1.DownloadError("unknown", "Could not start the download process.");
|
|
182
296
|
}
|
|
297
|
+
// Hand the claim to the process that will actually hold it. Taken under this
|
|
298
|
+
// command's identity because the claim has to exist BEFORE the spawn, but
|
|
299
|
+
// this command exits in seconds and the runner runs for minutes — a claim
|
|
300
|
+
// pointing at a dead parent reads as abandoned while the download is live.
|
|
301
|
+
(0, partial_1.updatePartialClaim)(partPath, { pid, startedAtMs: (0, status_1.processStartTimeMs)(pid) ?? Date.now(), id, token: claimToken });
|
|
183
302
|
// Wait briefly for THIS attempt's first status write, so callers can watch a
|
|
184
303
|
// file that already exists rather than racing it.
|
|
185
304
|
//
|
|
@@ -192,25 +311,13 @@ async function startDownload(options) {
|
|
|
192
311
|
// pid into its first status, so requiring the pid to match is a precise test
|
|
193
312
|
// for "this attempt, not the last one".
|
|
194
313
|
const seeded = await waitForStatus(id, statusDir, 3000, pid);
|
|
195
|
-
|
|
314
|
+
// `spawnFailed` is checked because the seed would otherwise overwrite the
|
|
315
|
+
// terminal failure the error handler just wrote with a `starting` status that
|
|
316
|
+
// nothing will ever advance.
|
|
317
|
+
if (!seeded && !spawnFailed) {
|
|
196
318
|
// The runner may still be starting; seed a status so the download is
|
|
197
319
|
// visible and cancellable rather than invisible until its first write.
|
|
198
|
-
|
|
199
|
-
(0, status_1.writeStatus)({
|
|
200
|
-
schema: 1,
|
|
201
|
-
id,
|
|
202
|
-
pid,
|
|
203
|
-
startedAtMs: (0, status_1.processStartTimeMs)(pid) ?? now,
|
|
204
|
-
state: "starting",
|
|
205
|
-
filename,
|
|
206
|
-
outputPath,
|
|
207
|
-
partPath,
|
|
208
|
-
bytesDownloaded: 0,
|
|
209
|
-
totalBytes: expectedBytes,
|
|
210
|
-
startedAt: now,
|
|
211
|
-
heartbeatAt: now,
|
|
212
|
-
meta,
|
|
213
|
-
}, statusDir);
|
|
320
|
+
(0, status_1.writeStatus)(statusFor(pid, "starting"), statusDir);
|
|
214
321
|
}
|
|
215
322
|
return { id, pid, statusPath: (0, node_path_1.join)(statusDir, `${id}.json`) };
|
|
216
323
|
}
|
|
@@ -254,6 +361,12 @@ async function killDownload(ticket, options = {}) {
|
|
|
254
361
|
if (!(0, status_1.isTerminal)(status.state)) {
|
|
255
362
|
(0, status_1.writeStatus)({ ...status, state: "cancelled", finishedAt: Date.now() }, statusDir);
|
|
256
363
|
}
|
|
364
|
+
// And release the path it was holding. A runner that died without running
|
|
365
|
+
// its signal handler — SIGKILL, or `taskkill /T`, which delivers nothing
|
|
366
|
+
// catchable — leaves its claim behind, and the next attempt would have to
|
|
367
|
+
// wait for the staleness check to find a dead owner. `force`, because the
|
|
368
|
+
// holder is provably gone and this process never had its token.
|
|
369
|
+
(0, partial_1.releasePartialClaim)(status.partPath, undefined, true);
|
|
257
370
|
return false;
|
|
258
371
|
}
|
|
259
372
|
// `isAlive` deliberately assumes ALIVE when identity cannot be proven —
|
|
@@ -310,6 +423,9 @@ async function killDownload(ticket, options = {}) {
|
|
|
310
423
|
!(0, status_1.isTerminal)(settled.state) &&
|
|
311
424
|
!(0, status_1.isAlive)(settled)) {
|
|
312
425
|
(0, status_1.writeStatus)({ ...settled, state: "cancelled", finishedAt: Date.now() }, statusDir);
|
|
426
|
+
// Same reasoning as above: this is the Windows path, where the runner is
|
|
427
|
+
// terminated without ever reaching its own cleanup.
|
|
428
|
+
(0, partial_1.releasePartialClaim)(status.partPath, undefined, true);
|
|
313
429
|
}
|
|
314
430
|
return true;
|
|
315
431
|
}
|
package/dist/detach.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"detach.js","sourceRoot":"","sources":["../src/detach.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;;AAiJH,gCAWC;AAGD,8CAEC;AAMD,sCAuIC;AAsCD,oCAuFC;AA4CD,8BAEC;AAvdD,2DAA2C;AAC3C,6CAAyC;AACzC,qCAAiD;AACjD,yCAAiC;AAEjC,iCAAiC;AACjC,qCAAyC;AACzC,mCAA0C;AAC1C,qCAUkB;AA8DlB;;;;;;;;;;;;;;;;;;;GAmBG;AACH,SAAS,gBAAgB;IACvB,4EAA4E;I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,CAAC,KAAK,IAAI,mBAAmB,CAAC,OAAO,CAAC;SACrD,CAAC;IAER,IAAI,CAAC;QACH,IAAA,oBAAW,EAAC,UAAU,EAAE,SAAS,CAAC,CAAC;IACrC,CAAC;IAAC,MAAM,CAAC;QACP,kEAAkE;IACpE,CAAC;IACD,OAAO,UAAU,CAAC;AACpB,CAAC;AAED;;;;;;;;;;;;;GAaG;AACH,SAAS,mBAAmB,CAAC,MAAsB;IACjD,MAAM,YAAY,GAAG,IAAA,oBAAU,EAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAEjF,IAAI,YAAY,GAAG,CAAC,EAAE,CAAC;QACrB,OAAO;YACL,IAAI,EAAE,aAAa;YACnB,OAAO,EAAE,iFAAiF;SAC3F,CAAC;IACJ,CAAC;IAED,6EAA6E;IAC7E,4EAA4E;IAC5E,+EAA+E;IAC/E,mDAAmD;IACnD,OAAO;QACL,IAAI,EAAE,eAAe;QACrB,OAAO,EACL,uGAAuG;YACvG,8BAA8B;KACjC,CAAC;AACJ,CAAC;AAED,SAAS,QAAQ,CAAC,IAAY;IAC5B,IAAI,CAAC;QACH,8DAA8D;QAC9D,MAAM,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAC,SAAS,CAA6B,CAAC;QACpE,OAAO,QAAQ,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC;IAC7B,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,CAAC,CAAC;IACX,CAAC;AACH,CAAC"}
|
package/dist/errors.d.ts
CHANGED
|
@@ -9,6 +9,14 @@
|
|
|
9
9
|
export type DownloadErrorCode = "cancelled" | "network" | "dns" | "tls" | "timeout" | "stalled" | "http_client" | "http_server" | "auth" | "forbidden" | "not_found" | "rate_limited" | "disk_full" | "permission" | "url_expired" | "integrity"
|
|
10
10
|
/** Caller-supplied input was rejected before any request was made. */
|
|
11
11
|
| "validation"
|
|
12
|
+
/**
|
|
13
|
+
* Another live attempt already owns this `outputPath`.
|
|
14
|
+
*
|
|
15
|
+
* Not retryable on its own: the other attempt has to finish, or this caller
|
|
16
|
+
* has to pick a different path (`uniquePath` allocates one). Retrying the
|
|
17
|
+
* same path in a loop just races the same holder again.
|
|
18
|
+
*/
|
|
19
|
+
| "conflict"
|
|
12
20
|
/**
|
|
13
21
|
* The transfer began and then stopped without recording an outcome, leaving a
|
|
14
22
|
* partial file behind. Distinct from `runner_failed` in the one way that
|
package/dist/errors.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,MAAM,MAAM,iBAAiB,GACzB,WAAW,GACX,SAAS,GACT,KAAK,GACL,KAAK,GACL,SAAS,GACT,SAAS,GACT,aAAa,GACb,aAAa,GACb,MAAM,GACN,WAAW,GACX,WAAW,GACX,cAAc,GACd,WAAW,GACX,YAAY,GACZ,aAAa,GACb,WAAW;AACb,sEAAsE;GACpE,YAAY;AACd;;;;GAIG;GACD,aAAa;AACf;;;;GAIG;GACD,eAAe,GACf,SAAS,CAAC;AAEd;;;;;;GAMG;AACH,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC;AAEhC,MAAM,WAAW,mBAAmB;IAClC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,MAAM,CAAC,EAAE,UAAU,GAAG,IAAI,CAAC;IAC3B,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAyBD,qBAAa,aAAc,SAAQ,KAAK;IACtC,QAAQ,CAAC,IAAI,EAAE,iBAAiB,CAAC;IACjC,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,QAAQ,CAAC,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AQ,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,QAAQ,CAAC,MAAM,CAAC,EAAE,UAAU,GAAG,IAAI,CAAC;IACpC,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAE5B,qDAAqD;IACrD,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC;gBAEb,IAAI,EAAE,iBAAiB,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,GAAE,mBAAwB;CAYvF;AAED,yDAAyD;AACzD,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,aAAa,CAEtE;AAED;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,iBAAiB,CASpE"}
|
package/dist/errors.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;AA2GH,0CAEC;AAWD,gDASC;AAtED;;;;;;;GAOG;AACH,MAAM,SAAS,GAAmC,IAAI,GAAG,CAAoB;IAC3E,SAAS;IACT,KAAK;IACL,KAAK;IACL,SAAS;IACT,SAAS;IACT,aAAa;IACb,cAAc;IACd,aAAa;IACb,wEAAwE;IACxE,aAAa;IACb,6EAA6E;IAC7E,yEAAyE;CAC1E,CAAC,CAAC;AAEH,MAAa,aAAc,SAAQ,KAAK;IAUtC,YAAY,IAAuB,EAAE,OAAe,EAAE,SAA8B,EAAE;QACpF,gFAAgF;QAChF,gFAAgF;QAChF,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,eAAe,CAAC;QAC5B,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC;QAC1B,IAAI,CAAC,I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