gipity 1.1.24 → 1.1.26
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/dist/api.js +4 -1
- package/dist/commands/deploy.js +3 -1
- package/dist/commands/page-eval.js +12 -2
- package/dist/commands/page-inspect.js +3 -1
- package/dist/commands/test.js +14 -5
- package/dist/helpers/command.js +5 -0
- package/dist/helpers/index.js +1 -1
- package/dist/helpers/sync.js +27 -0
- package/dist/index.js +46 -13
- package/dist/net.js +2 -1
- package/dist/upload.js +6 -1
- package/package.json +1 -1
package/dist/api.js
CHANGED
|
@@ -418,7 +418,10 @@ export async function putToPresignedUrl(url, body, contentLength, contentType) {
|
|
|
418
418
|
}
|
|
419
419
|
if (!res.ok) {
|
|
420
420
|
const text = await res.text().catch(() => res.statusText);
|
|
421
|
-
|
|
421
|
+
// The storage host answers in provider XML; keep only its error code so the
|
|
422
|
+
// message stays one readable line and doesn't name the provider.
|
|
423
|
+
const code = /<Code>([^<]+)<\/Code>/.exec(text)?.[1];
|
|
424
|
+
throw new ApiError(res.status, 'S3_UPLOAD', `Gipity Storage upload failed: HTTP ${res.status}${code ? ` (${code})` : ''}`);
|
|
422
425
|
}
|
|
423
426
|
const etag = (res.headers.get('etag') ?? '').replace(/^"|"$/g, '');
|
|
424
427
|
return etag;
|
package/dist/commands/deploy.js
CHANGED
|
@@ -3,7 +3,7 @@ import { get, post } from '../api.js';
|
|
|
3
3
|
import { requireConfig, resolveApiBase, getEnvOption } from '../config.js';
|
|
4
4
|
import { formatSize } from '../utils.js';
|
|
5
5
|
import { success, error as clrError, warning, muted, bold, brand } from '../colors.js';
|
|
6
|
-
import { run, syncBeforeAction } from '../helpers/index.js';
|
|
6
|
+
import { run, syncBeforeAction, syncAfterAction } from '../helpers/index.js';
|
|
7
7
|
import { withSpinner } from '../progress.js';
|
|
8
8
|
import { inspectPage } from './page-inspect.js';
|
|
9
9
|
// ── Status icons ───────────────────────────────────────────────────────
|
|
@@ -119,6 +119,7 @@ export const deployCommand = new Command('deploy')
|
|
|
119
119
|
}
|
|
120
120
|
};
|
|
121
121
|
if (opts.json) {
|
|
122
|
+
await syncAfterAction(opts);
|
|
122
123
|
console.log(JSON.stringify(d));
|
|
123
124
|
const failedJson = d.phases?.some(p => p.status === 'failed');
|
|
124
125
|
// The exit code carries the outcome too, so a script reading --json
|
|
@@ -150,6 +151,7 @@ export const deployCommand = new Command('deploy')
|
|
|
150
151
|
if (d.warning) {
|
|
151
152
|
console.log(`${warning(d.warning)}`);
|
|
152
153
|
}
|
|
154
|
+
await syncAfterAction(opts);
|
|
153
155
|
// Show example curl commands for public endpoints
|
|
154
156
|
if (d.examples && d.examples.length > 0) {
|
|
155
157
|
console.log('');
|
|
@@ -118,6 +118,9 @@ export function summarizeExpr(expr) {
|
|
|
118
118
|
return `${head} ${shape}`;
|
|
119
119
|
}
|
|
120
120
|
const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
|
|
121
|
+
/** Shown whenever the server cut the result at its cap. */
|
|
122
|
+
export const EVAL_TRUNCATED_NOTE = '⚠ Result cut at 16 KB: the value above is incomplete. Return something smaller (a count, a hash, a summary). '
|
|
123
|
+
+ 'To check a rendered image, use `gipity page screenshot` instead of returning its data.';
|
|
121
124
|
// A single browser session is held open synchronously for the whole --wait, so
|
|
122
125
|
// the server caps it at the gateway idle timeout. Longer is impossible in one
|
|
123
126
|
// shot; watching an app past 30s means several windows, not one big wait.
|
|
@@ -673,6 +676,10 @@ export const pageEvalCommand = new Command('eval')
|
|
|
673
676
|
// raise --timeout" is guaranteed-wasted advice against a looped still.
|
|
674
677
|
const emptyHint = camera ? EVAL_CAMERA_EMPTY_HINT : EVAL_EMPTY_STATE_HINT;
|
|
675
678
|
if (opts.json) {
|
|
679
|
+
// A cut value inside the JSON is easy to miss (a base64 image decodes to
|
|
680
|
+
// exactly 12288 bytes and looks like a corrupt file), so say it on stderr.
|
|
681
|
+
if (d.truncated)
|
|
682
|
+
console.error(warning(EVAL_TRUNCATED_NOTE));
|
|
676
683
|
console.log(JSON.stringify({
|
|
677
684
|
...d, result,
|
|
678
685
|
...(stepOut.length ? { stepResults: stepOut.map((s) => s.result) } : {}),
|
|
@@ -733,7 +740,7 @@ export const pageEvalCommand = new Command('eval')
|
|
|
733
740
|
if (emptyState)
|
|
734
741
|
console.log(muted(`\n${emptyHint}`));
|
|
735
742
|
if (d.truncated)
|
|
736
|
-
console.log(
|
|
743
|
+
console.log(warning(`\n${EVAL_TRUNCATED_NOTE}`));
|
|
737
744
|
for (let i = 0; i < stepOut.length; i++) {
|
|
738
745
|
const s = stepOut[i];
|
|
739
746
|
console.log(`\n${bold(`Step ${i + 1}`)} ${muted(summarizeExpr(s.expr))} ${muted('(same page load)')}`);
|
|
@@ -754,7 +761,10 @@ export const pageEvalCommand = new Command('eval')
|
|
|
754
761
|
if (restoreDb) {
|
|
755
762
|
try {
|
|
756
763
|
const r = await restoreCheckpoint(restoreDb.projectGuid, restoreDb.database);
|
|
757
|
-
|
|
764
|
+
// The app tables are restored; Records change history lives in the
|
|
765
|
+
// platform audit log and is not part of the checkpoint, so don't
|
|
766
|
+
// promise that nothing survives.
|
|
767
|
+
console.error(muted(`Rolled ${r.tables.length} table(s) back to the checkpoint (${r.rows} row(s)). Not rolled back: Records change history (gipity records history) and id sequences, so rows this eval created can still show there.`));
|
|
758
768
|
}
|
|
759
769
|
catch (err) {
|
|
760
770
|
console.error(warning(`⚠ Could not roll back the database - the checkpoint is still there, retry with: gipity db restore (${err.message})`));
|
|
@@ -191,7 +191,9 @@ export async function inspectPage(url, opts = {}) {
|
|
|
191
191
|
: `${warning('Auth: session NOT established')}${b.auth.detail ? `: ${b.auth.detail}` : ''} ${muted('(this is the anonymous view)')}`);
|
|
192
192
|
}
|
|
193
193
|
else {
|
|
194
|
-
|
|
194
|
+
// A full command, not "pass --auth": this also prints under
|
|
195
|
+
// `deploy --inspect`, and deploy has no --auth flag.
|
|
196
|
+
console.log(muted(`Auth: anonymous visitor (signed out). Signed-in view: gipity page inspect ${url} --auth`));
|
|
195
197
|
}
|
|
196
198
|
console.log(`${muted('Title:')} ${b.title || '(none)'}`);
|
|
197
199
|
console.log(`${muted('Elements:')} ${b.elementCount || 0}`);
|
package/dist/commands/test.js
CHANGED
|
@@ -211,16 +211,25 @@ export const testCommand = new Command('test')
|
|
|
211
211
|
// subdirectory must not read this as "the project has no tests" for
|
|
212
212
|
// the wrong reason (cli#120).
|
|
213
213
|
const root = getProjectRoot();
|
|
214
|
+
let listing = {};
|
|
215
|
+
try {
|
|
216
|
+
listing = (await get(`/projects/${config.projectGuid}/test/list`)).data;
|
|
217
|
+
}
|
|
218
|
+
catch { /* advisory - fall through to the generic message */ }
|
|
219
|
+
const files = listing.files ?? [];
|
|
220
|
+
if (files.length > 0) {
|
|
221
|
+
// Files exist but registered nothing: almost always a file that
|
|
222
|
+
// exports its tests instead of calling the harness's global test().
|
|
223
|
+
console.log(clrError(`No tests ran - found ${files.length} test file(s) but none registered a test: ${files.map(f => f.path).join(', ')}`));
|
|
224
|
+
console.log(muted("Each file must call the global test('name', async (ctx) => { ... }) at top level. Exported tests (export default { tests }) are not run, and test/assert must not be imported."));
|
|
225
|
+
process.exit(1);
|
|
226
|
+
}
|
|
214
227
|
console.log(muted(`No tests ran - no tests/*.test.js files under the project root${root ? ` (${root})` : ''}.`));
|
|
215
228
|
console.log(muted('gipity test runs server-function tests only; a frontend-only app (no functions/) has nothing here to run.'));
|
|
216
229
|
console.log(muted('Verify a frontend app by driving the live page: gipity page inspect <url> (or gipity page eval).'));
|
|
217
230
|
// Enumerate test-looking files the runner deliberately skips (kit
|
|
218
231
|
// tests, .spec.*) so this answer never contradicts what's on disk.
|
|
219
|
-
|
|
220
|
-
const listRes = await get(`/projects/${config.projectGuid}/test/list`);
|
|
221
|
-
printSkippedCandidates(listRes.data.skipped ?? []);
|
|
222
|
-
}
|
|
223
|
-
catch { /* the skipped list is advisory - never fail the run over it */ }
|
|
232
|
+
printSkippedCandidates(listing.skipped ?? []);
|
|
224
233
|
return;
|
|
225
234
|
}
|
|
226
235
|
if (data.status === 'failed' && data.errorMessage) {
|
package/dist/helpers/command.js
CHANGED
|
@@ -36,6 +36,11 @@ export function printCommandError(label, err) {
|
|
|
36
36
|
export function run(label, action) {
|
|
37
37
|
return action().catch((err) => {
|
|
38
38
|
printCommandError(label, err);
|
|
39
|
+
// A --json caller parses stdout: give it a JSON error too, or its parser
|
|
40
|
+
// crashes on the plain-text failure and the real reason is lost.
|
|
41
|
+
if (process.argv.includes('--json')) {
|
|
42
|
+
console.log(JSON.stringify({ error: { code: err?.code ?? 'ERROR', message: `${label} failed: ${err?.message ?? String(err)}` } }));
|
|
43
|
+
}
|
|
39
44
|
process.exit(1);
|
|
40
45
|
});
|
|
41
46
|
}
|
package/dist/helpers/index.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export { run } from './command.js';
|
|
5
5
|
export { printOutput, printList, printResult, pluckField, emitField } from './output.js';
|
|
6
|
-
export { syncBeforeAction } from './sync.js';
|
|
6
|
+
export { syncBeforeAction, syncAfterAction } from './sync.js';
|
|
7
7
|
export { resolveJsonBody, resolveBody, resolveFormBody } from './body.js';
|
|
8
8
|
export { parseDuration } from './duration.js';
|
|
9
9
|
//# sourceMappingURL=index.js.map
|
package/dist/helpers/sync.js
CHANGED
|
@@ -40,5 +40,32 @@ export async function syncBeforeAction(opts) {
|
|
|
40
40
|
for (const e of result.errors)
|
|
41
41
|
console.error(clrError(`[sync] ${e}`));
|
|
42
42
|
}
|
|
43
|
+
// A conflict means the server copy won the real path and the local edit was
|
|
44
|
+
// moved aside. Carrying on would run the action on code the caller never
|
|
45
|
+
// wrote (a GipRunner build deployed every function public this way), so stop.
|
|
46
|
+
const conflicts = result.plan.actions.filter(a => a.kind === 'conflict');
|
|
47
|
+
if (conflicts.length > 0) {
|
|
48
|
+
const lines = conflicts.map(a => ` ${a.path}: the server copy changed too; your local edit was saved as "${a.renamedLocalTo ?? '(conflict copy)'}"`);
|
|
49
|
+
throw new Error(`Stopped before running: local edits conflicted with newer server copies.\n${lines.join('\n')}\n`
|
|
50
|
+
+ 'Nothing was run against the server. Put the version you want at the real path (often: re-apply your edit on top of the server copy), delete the conflict copy, then run the command again.');
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Pull down files the action itself wrote on the server. A deploy can rewrite
|
|
55
|
+
* source (auto-declared functions in gipity.yaml, a share card re-synced to the
|
|
56
|
+
* page title); the editor hooks only pull before the next user turn, so an agent
|
|
57
|
+
* editing right after the deploy would read the stale local copy.
|
|
58
|
+
*/
|
|
59
|
+
export async function syncAfterAction(opts) {
|
|
60
|
+
if (opts.sync === false)
|
|
61
|
+
return;
|
|
62
|
+
const result = await sync({ interactive: false });
|
|
63
|
+
if (result.applied > 0 && !opts.json) {
|
|
64
|
+
console.log(muted(`Pulled ${result.applied} file${result.applied > 1 ? 's' : ''} the deploy updated`));
|
|
65
|
+
}
|
|
66
|
+
if (result.errors.length > 0 && !opts.json) {
|
|
67
|
+
for (const e of result.errors)
|
|
68
|
+
console.error(clrError(`[sync] ${e}`));
|
|
69
|
+
}
|
|
43
70
|
}
|
|
44
71
|
//# sourceMappingURL=sync.js.map
|
package/dist/index.js
CHANGED
|
@@ -9367,7 +9367,8 @@ async function putToPresignedUrl(url, body, contentLength, contentType) {
|
|
|
9367
9367
|
}
|
|
9368
9368
|
if (!res.ok) {
|
|
9369
9369
|
const text = await res.text().catch(() => res.statusText);
|
|
9370
|
-
|
|
9370
|
+
const code = /<Code>([^<]+)<\/Code>/.exec(text)?.[1];
|
|
9371
|
+
throw new ApiError(res.status, "S3_UPLOAD", `Gipity Storage upload failed: HTTP ${res.status}${code ? ` (${code})` : ""}`);
|
|
9371
9372
|
}
|
|
9372
9373
|
const etag = (res.headers.get("etag") ?? "").replace(/^"|"$/g, "");
|
|
9373
9374
|
return etag;
|
|
@@ -34468,7 +34469,7 @@ function describeFetchError(err, input, proxyActive, env = process.env) {
|
|
|
34468
34469
|
let protocol;
|
|
34469
34470
|
try {
|
|
34470
34471
|
const url = new URL(input instanceof Request ? input.url : String(input));
|
|
34471
|
-
origin = url.origin;
|
|
34472
|
+
origin = /(^|\.)amazonaws\.com$/i.test(url.hostname) ? "Gipity Storage" : url.origin;
|
|
34472
34473
|
protocol = url.protocol;
|
|
34473
34474
|
} catch {
|
|
34474
34475
|
}
|
|
@@ -34719,6 +34720,9 @@ function printCommandError(label2, err) {
|
|
|
34719
34720
|
function run(label2, action) {
|
|
34720
34721
|
return action().catch((err) => {
|
|
34721
34722
|
printCommandError(label2, err);
|
|
34723
|
+
if (process.argv.includes("--json")) {
|
|
34724
|
+
console.log(JSON.stringify({ error: { code: err?.code ?? "ERROR", message: `${label2} failed: ${err?.message ?? String(err)}` } }));
|
|
34725
|
+
}
|
|
34722
34726
|
process.exit(1);
|
|
34723
34727
|
});
|
|
34724
34728
|
}
|
|
@@ -34826,7 +34830,7 @@ async function withRetry(label2, fn, attempts = 3) {
|
|
|
34826
34830
|
if (i === attempts - 1) break;
|
|
34827
34831
|
const delay2 = 500 * Math.pow(2, i);
|
|
34828
34832
|
await new Promise((r) => setTimeout(r, delay2));
|
|
34829
|
-
console.error(`[upload] ${label2} attempt ${i + 1} failed, retrying in ${delay2}ms: ${err.message}`);
|
|
34833
|
+
if (i > 0) console.error(`[upload] ${label2} attempt ${i + 1} failed, retrying in ${delay2}ms: ${err.message}`);
|
|
34830
34834
|
}
|
|
34831
34835
|
}
|
|
34832
34836
|
throw lastErr;
|
|
@@ -36223,6 +36227,25 @@ async function syncBeforeAction(opts) {
|
|
|
36223
36227
|
if (result.errors.length > 0 && !opts.json) {
|
|
36224
36228
|
for (const e of result.errors) console.error(error(`[sync] ${e}`));
|
|
36225
36229
|
}
|
|
36230
|
+
const conflicts = result.plan.actions.filter((a) => a.kind === "conflict");
|
|
36231
|
+
if (conflicts.length > 0) {
|
|
36232
|
+
const lines = conflicts.map((a) => ` ${a.path}: the server copy changed too; your local edit was saved as "${a.renamedLocalTo ?? "(conflict copy)"}"`);
|
|
36233
|
+
throw new Error(
|
|
36234
|
+
`Stopped before running: local edits conflicted with newer server copies.
|
|
36235
|
+
${lines.join("\n")}
|
|
36236
|
+
Nothing was run against the server. Put the version you want at the real path (often: re-apply your edit on top of the server copy), delete the conflict copy, then run the command again.`
|
|
36237
|
+
);
|
|
36238
|
+
}
|
|
36239
|
+
}
|
|
36240
|
+
async function syncAfterAction(opts) {
|
|
36241
|
+
if (opts.sync === false) return;
|
|
36242
|
+
const result = await sync({ interactive: false });
|
|
36243
|
+
if (result.applied > 0 && !opts.json) {
|
|
36244
|
+
console.log(muted(`Pulled ${result.applied} file${result.applied > 1 ? "s" : ""} the deploy updated`));
|
|
36245
|
+
}
|
|
36246
|
+
if (result.errors.length > 0 && !opts.json) {
|
|
36247
|
+
for (const e of result.errors) console.error(error(`[sync] ${e}`));
|
|
36248
|
+
}
|
|
36226
36249
|
}
|
|
36227
36250
|
|
|
36228
36251
|
// src/helpers/body.ts
|
|
@@ -38047,6 +38070,7 @@ function summarizeExpr(expr) {
|
|
|
38047
38070
|
return `${head} ${shape}`;
|
|
38048
38071
|
}
|
|
38049
38072
|
var sleep = (ms2) => new Promise((r) => setTimeout(r, ms2));
|
|
38073
|
+
var EVAL_TRUNCATED_NOTE = "\u26A0 Result cut at 16 KB: the value above is incomplete. Return something smaller (a count, a hash, a summary). To check a rendered image, use `gipity page screenshot` instead of returning its data.";
|
|
38050
38074
|
var MAX_WAIT_MS = 3e4;
|
|
38051
38075
|
function capWaitMs(rawWait, url) {
|
|
38052
38076
|
const parsed = parseInt(rawWait, 10);
|
|
@@ -38357,6 +38381,7 @@ ${hint}`);
|
|
|
38357
38381
|
const emptyState2 = !noValue && isEmptyStateResult(result);
|
|
38358
38382
|
const emptyHint = camera ? EVAL_CAMERA_EMPTY_HINT : EVAL_EMPTY_STATE_HINT;
|
|
38359
38383
|
if (opts.json) {
|
|
38384
|
+
if (d.truncated) console.error(warning(EVAL_TRUNCATED_NOTE));
|
|
38360
38385
|
console.log(JSON.stringify({
|
|
38361
38386
|
...d,
|
|
38362
38387
|
result,
|
|
@@ -38395,7 +38420,8 @@ ${result.trim() ? result : muted("(empty result)")}`);
|
|
|
38395
38420
|
${EVAL_NO_VALUE_HINT}`));
|
|
38396
38421
|
if (emptyState2) console.log(muted(`
|
|
38397
38422
|
${emptyHint}`));
|
|
38398
|
-
if (d.truncated) console.log(
|
|
38423
|
+
if (d.truncated) console.log(warning(`
|
|
38424
|
+
${EVAL_TRUNCATED_NOTE}`));
|
|
38399
38425
|
for (let i = 0; i < stepOut.length; i++) {
|
|
38400
38426
|
const s = stepOut[i];
|
|
38401
38427
|
console.log(`
|
|
@@ -38414,7 +38440,7 @@ ${bold("After reload")} ${muted("(page reloaded in place: storage preserved)")}`
|
|
|
38414
38440
|
if (restoreDb) {
|
|
38415
38441
|
try {
|
|
38416
38442
|
const r = await restoreCheckpoint(restoreDb.projectGuid, restoreDb.database);
|
|
38417
|
-
console.error(muted(`Rolled ${r.tables.length} table(s) back to the checkpoint (${r.rows} row(s))
|
|
38443
|
+
console.error(muted(`Rolled ${r.tables.length} table(s) back to the checkpoint (${r.rows} row(s)). Not rolled back: Records change history (gipity records history) and id sequences, so rows this eval created can still show there.`));
|
|
38418
38444
|
} catch (err) {
|
|
38419
38445
|
console.error(warning(`\u26A0 Could not roll back the database - the checkpoint is still there, retry with: gipity db restore (${err.message})`));
|
|
38420
38446
|
}
|
|
@@ -39015,7 +39041,7 @@ async function inspectPage(url, opts = {}) {
|
|
|
39015
39041
|
const who = getAuth()?.email;
|
|
39016
39042
|
console.log(b7.auth.established ? `${muted("Auth:")} ${success("session established")}${who ? muted(` as ${who}`) : ""} ${muted("(what the page renders with it is app-defined)")}` : `${warning("Auth: session NOT established")}${b7.auth.detail ? `: ${b7.auth.detail}` : ""} ${muted("(this is the anonymous view)")}`);
|
|
39017
39043
|
} else {
|
|
39018
|
-
console.log(muted(
|
|
39044
|
+
console.log(muted(`Auth: anonymous visitor (signed out). Signed-in view: gipity page inspect ${url} --auth`));
|
|
39019
39045
|
}
|
|
39020
39046
|
console.log(`${muted("Title:")} ${b7.title || "(none)"}`);
|
|
39021
39047
|
console.log(`${muted("Elements:")} ${b7.elementCount || 0}`);
|
|
@@ -39191,6 +39217,7 @@ var deployCommand = new Command("deploy").description("Deploy the app to prod, o
|
|
|
39191
39217
|
}
|
|
39192
39218
|
};
|
|
39193
39219
|
if (opts.json) {
|
|
39220
|
+
await syncAfterAction(opts);
|
|
39194
39221
|
console.log(JSON.stringify(d));
|
|
39195
39222
|
const failedJson = d.phases?.some((p) => p.status === "failed");
|
|
39196
39223
|
if (failedJson) process.exit(1);
|
|
@@ -39215,6 +39242,7 @@ var deployCommand = new Command("deploy").description("Deploy the app to prod, o
|
|
|
39215
39242
|
if (d.warning) {
|
|
39216
39243
|
console.log(`${warning(d.warning)}`);
|
|
39217
39244
|
}
|
|
39245
|
+
await syncAfterAction(opts);
|
|
39218
39246
|
if (d.examples && d.examples.length > 0) {
|
|
39219
39247
|
console.log("");
|
|
39220
39248
|
console.log(bold("Test your endpoints:"));
|
|
@@ -45641,16 +45669,21 @@ var testCommand = new Command("test").description("Run tests").argument("[path]"
|
|
|
45641
45669
|
}
|
|
45642
45670
|
if (!filterPath && data.total === 0 && data.results.length === 0) {
|
|
45643
45671
|
const root = getProjectRoot();
|
|
45644
|
-
|
|
45645
|
-
console.log(muted("gipity test runs server-function tests only; a frontend-only app (no functions/) has nothing here to run."));
|
|
45646
|
-
console.log(muted("Verify a frontend app by driving the live page: gipity page inspect <url> (or gipity page eval)."));
|
|
45672
|
+
let listing = {};
|
|
45647
45673
|
try {
|
|
45648
|
-
|
|
45649
|
-
`/projects/${config.projectGuid}/test/list`
|
|
45650
|
-
);
|
|
45651
|
-
printSkippedCandidates(listRes.data.skipped ?? []);
|
|
45674
|
+
listing = (await get(`/projects/${config.projectGuid}/test/list`)).data;
|
|
45652
45675
|
} catch {
|
|
45653
45676
|
}
|
|
45677
|
+
const files = listing.files ?? [];
|
|
45678
|
+
if (files.length > 0) {
|
|
45679
|
+
console.log(error(`No tests ran - found ${files.length} test file(s) but none registered a test: ${files.map((f) => f.path).join(", ")}`));
|
|
45680
|
+
console.log(muted("Each file must call the global test('name', async (ctx) => { ... }) at top level. Exported tests (export default { tests }) are not run, and test/assert must not be imported."));
|
|
45681
|
+
process.exit(1);
|
|
45682
|
+
}
|
|
45683
|
+
console.log(muted(`No tests ran - no tests/*.test.js files under the project root${root ? ` (${root})` : ""}.`));
|
|
45684
|
+
console.log(muted("gipity test runs server-function tests only; a frontend-only app (no functions/) has nothing here to run."));
|
|
45685
|
+
console.log(muted("Verify a frontend app by driving the live page: gipity page inspect <url> (or gipity page eval)."));
|
|
45686
|
+
printSkippedCandidates(listing.skipped ?? []);
|
|
45654
45687
|
return;
|
|
45655
45688
|
}
|
|
45656
45689
|
if (data.status === "failed" && data.errorMessage) {
|
package/dist/net.js
CHANGED
|
@@ -56,7 +56,8 @@ export function describeFetchError(err, input, proxyActive, env = process.env) {
|
|
|
56
56
|
let protocol;
|
|
57
57
|
try {
|
|
58
58
|
const url = new URL(input instanceof Request ? input.url : String(input));
|
|
59
|
-
|
|
59
|
+
// Uploads go straight to the storage provider; users see it as Gipity Storage.
|
|
60
|
+
origin = /(^|\.)amazonaws\.com$/i.test(url.hostname) ? 'Gipity Storage' : url.origin;
|
|
60
61
|
protocol = url.protocol;
|
|
61
62
|
}
|
|
62
63
|
catch { /* keep the generic name */ }
|
package/dist/upload.js
CHANGED
|
@@ -90,7 +90,12 @@ async function withRetry(label, fn, attempts = 3) {
|
|
|
90
90
|
break;
|
|
91
91
|
const delay = 500 * Math.pow(2, i);
|
|
92
92
|
await new Promise(r => setTimeout(r, delay));
|
|
93
|
-
|
|
93
|
+
// The first failure is usually a pooled connection the storage host had
|
|
94
|
+
// already closed (ECONNRESET on the first PUT after a pause), and the retry
|
|
95
|
+
// succeeds. Printing it made agents and reviewers treat a healthy upload as
|
|
96
|
+
// a network fault, so only a second failure is reported.
|
|
97
|
+
if (i > 0)
|
|
98
|
+
console.error(`[upload] ${label} attempt ${i + 1} failed, retrying in ${delay}ms: ${err.message}`);
|
|
94
99
|
}
|
|
95
100
|
}
|
|
96
101
|
throw lastErr;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gipity",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.26",
|
|
4
4
|
"description": "The full-stack platform tuned for AI agents. Database, storage, auth, functions, deploy, and drop-in kits - all agent-tuned. Pair with Claude Code or use standalone.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"gipity": "dist/updater/shim.js",
|