gencow 0.1.201 → 0.1.203
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/lib/app-command.mjs +3 -2
- package/lib/runtime-bom-resolve.mjs +12 -6
- package/package.json +3 -3
- package/runtime/server.mjs +623 -568
- package/server/index.js.map +0 -7
package/lib/app-command.mjs
CHANGED
|
@@ -22,8 +22,9 @@ import { loadCreds, rpcMutation, rpcQuery, saveCreds, requireCreds } from "./pla
|
|
|
22
22
|
import { resolveProjectMetadataPath, resolveProjectSelection } from "./project-context.mjs";
|
|
23
23
|
import { updateEnvLocalUrl } from "./cli-project-runtime.mjs";
|
|
24
24
|
|
|
25
|
-
// Covers the 60s runtime-observer restart grace
|
|
26
|
-
|
|
25
|
+
// Covers the 60s runtime-observer restart grace, reconciliation scans, and
|
|
26
|
+
// one delayed worker acquisition without reporting a completed deletion as pending.
|
|
27
|
+
const DEFAULT_DELETE_POLL_ATTEMPTS = 120;
|
|
27
28
|
const DELETE_POLL_INTERVAL_MS = 1_000;
|
|
28
29
|
const DEFAULT_APP_CREATE_TIMEOUT_MS = 60_000;
|
|
29
30
|
|
|
@@ -175,6 +175,16 @@ export function isPlatformFetchFallbackEligible(error) {
|
|
|
175
175
|
return true;
|
|
176
176
|
}
|
|
177
177
|
|
|
178
|
+
function platformResponseError(body, status) {
|
|
179
|
+
const message =
|
|
180
|
+
body && typeof body === "object" && !Array.isArray(body) && typeof body.error === "string"
|
|
181
|
+
? body.error.trim()
|
|
182
|
+
: "";
|
|
183
|
+
const error = new Error(message || `HTTP ${status}`);
|
|
184
|
+
error.status = status;
|
|
185
|
+
return error;
|
|
186
|
+
}
|
|
187
|
+
|
|
178
188
|
export async function resolveRuntimeBomForCli({ creds, releaseId, cwd, platformFetchImpl }, deps = {}) {
|
|
179
189
|
const existsSyncImpl = deps.existsSyncImpl ?? existsSync;
|
|
180
190
|
const readFileSyncImpl = deps.readFileSyncImpl ?? readFileSync;
|
|
@@ -192,9 +202,7 @@ export async function resolveRuntimeBomForCli({ creds, releaseId, cwd, platformF
|
|
|
192
202
|
const res = await platformFetchImpl(creds, path, { method: "GET" });
|
|
193
203
|
const body = await res.json().catch(() => ({}));
|
|
194
204
|
if (!res.ok) {
|
|
195
|
-
|
|
196
|
-
err.status = res.status;
|
|
197
|
-
throw err;
|
|
205
|
+
throw platformResponseError(body, res.status);
|
|
198
206
|
}
|
|
199
207
|
return {
|
|
200
208
|
bom: {
|
|
@@ -244,9 +252,7 @@ export async function resolveRuntimeReleaseListForCli({ creds, platformFetchImpl
|
|
|
244
252
|
const res = await platformFetchImpl(creds, "/platform/runtime-releases", { method: "GET" });
|
|
245
253
|
const body = await res.json().catch(() => ({}));
|
|
246
254
|
if (!res.ok) {
|
|
247
|
-
|
|
248
|
-
err.status = res.status;
|
|
249
|
-
throw err;
|
|
255
|
+
throw platformResponseError(body, res.status);
|
|
250
256
|
}
|
|
251
257
|
return {
|
|
252
258
|
currentReleaseId: body.currentReleaseId,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gencow",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.203",
|
|
4
4
|
"description": "Gencow — AI Backend Engine",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -33,9 +33,9 @@
|
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@types/node": "^25.9.5",
|
|
35
35
|
"better-auth": "^1.6.23",
|
|
36
|
-
"@gencow/core": "0.1.42",
|
|
37
36
|
"@gencow/react": "0.2.6",
|
|
38
|
-
"@gencow/client": "0.2.6"
|
|
37
|
+
"@gencow/client": "0.2.6",
|
|
38
|
+
"@gencow/core": "0.1.43"
|
|
39
39
|
},
|
|
40
40
|
"scripts": {
|
|
41
41
|
"prebuild": "pnpm --filter @gencow/migration-contract run build && pnpm --filter @gencow/server run build",
|