@haystackeditor/cli 0.23.1 → 0.23.2
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.
|
@@ -136,11 +136,13 @@ async function body(response, what) {
|
|
|
136
136
|
throw new OnboardingResponseError(`The onboarding service returned ${what} that is not JSON: ${error instanceof Error ? error.message : String(error)}`);
|
|
137
137
|
}
|
|
138
138
|
}
|
|
139
|
-
/** The onboarding of `repository` at `baseCommit`, now
|
|
140
|
-
|
|
139
|
+
/** The onboarding of `repository` at `baseCommit`, now; with `onboardRunId`, that run's (or the run a derivation change moved
|
|
140
|
+
* it to), whatever derivation is live: what a waiting command follows. */
|
|
141
|
+
export async function readOnboardingStatus(repository, baseCommit, token, onboardRunId = null) {
|
|
141
142
|
if (!COMMIT.test(baseCommit))
|
|
142
143
|
throw new Error(`Invalid base commit ${baseCommit}.`);
|
|
143
|
-
const path = `${ONBOARDING_PATH}?repository=${encodeURIComponent(repository)}&baseCommit=${baseCommit}
|
|
144
|
+
const path = `${ONBOARDING_PATH}?repository=${encodeURIComponent(repository)}&baseCommit=${baseCommit}`
|
|
145
|
+
+ (onboardRunId === null ? '' : `&onboardRunId=${encodeURIComponent(onboardRunId)}`);
|
|
144
146
|
const response = await gatewayFetch(path, token);
|
|
145
147
|
if (!response.ok)
|
|
146
148
|
throw await classifyHttpError(response, `Haystack API ${ONBOARDING_PATH}`);
|
|
@@ -185,7 +187,9 @@ export async function waitForOnboarding(first, token, progress, resume) {
|
|
|
185
187
|
await delay(ONBOARDING_READ_EVERY_MS);
|
|
186
188
|
let next;
|
|
187
189
|
try {
|
|
188
|
-
|
|
190
|
+
// The run this wait follows, not the base under whatever derivation is live: a release swap mid-wait otherwise reads
|
|
191
|
+
// not-started while the run goes on to admit this command's crawl (galaxy's n8n replays, 2026-10-03).
|
|
192
|
+
next = await readOnboardingStatus(status.repository, status.baseCommit, token, status.onboardRunId);
|
|
189
193
|
}
|
|
190
194
|
catch (error) {
|
|
191
195
|
const why = transientReadFailure(error);
|