shiply-cli 0.25.1 → 0.25.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.
- package/dist/index.js +15 -0
- package/dist/publish.js +24 -7
- package/dist/ssr-adapters.js +7 -6
- package/package.json +42 -42
- package/skill/CHANGELOG.md +15 -0
package/dist/index.js
CHANGED
|
@@ -409,11 +409,26 @@ async function main() {
|
|
|
409
409
|
anonymous: res.anonymous,
|
|
410
410
|
expiresAt: res.expiresAt,
|
|
411
411
|
updated: updating,
|
|
412
|
+
...(res.function ? { function: res.function } : {}),
|
|
412
413
|
})}\n`);
|
|
413
414
|
return;
|
|
414
415
|
}
|
|
415
416
|
const skipped = res.skipped > 0 ? ` (${res.skipped} unchanged, skipped)` : '';
|
|
416
417
|
console.log(`✔ ${updating ? `updated ${res.slug} in place` : 'published'} — ${res.uploaded} file${res.uploaded === 1 ? '' : 's'}${skipped}`);
|
|
418
|
+
// A failed function/bundle deploy does NOT fail the publish (static
|
|
419
|
+
// files still went live) — but a worker-backed site is broken without
|
|
420
|
+
// its worker, so surface the server's errors instead of swallowing them.
|
|
421
|
+
if (res.function?.errors?.length) {
|
|
422
|
+
console.error(`\n✖ function deploy FAILED — the site's worker is NOT live:`);
|
|
423
|
+
for (const err of res.function.errors)
|
|
424
|
+
console.error(` ${err}`);
|
|
425
|
+
}
|
|
426
|
+
else if (res.function?.deployed) {
|
|
427
|
+
const crons = res.function.cronCount ? ` (${res.function.cronCount} cron${res.function.cronCount === 1 ? '' : 's'})` : '';
|
|
428
|
+
console.log(` function deployed${crons}`);
|
|
429
|
+
}
|
|
430
|
+
for (const hint of res.function?.hints ?? [])
|
|
431
|
+
console.log(` ${hint}`);
|
|
417
432
|
console.log(`\n ${res.siteUrl}\n`);
|
|
418
433
|
// confirm the site actually serves, then celebrate
|
|
419
434
|
try {
|
package/dist/publish.js
CHANGED
|
@@ -52,8 +52,8 @@ export async function fetchWithRetry(url, init, opts = {}) {
|
|
|
52
52
|
}
|
|
53
53
|
throw new Error(`request to ${label} failed after ${attempts} attempts: ${lastErr?.message ?? 'unknown error'}`);
|
|
54
54
|
}
|
|
55
|
-
export async function api(url, init) {
|
|
56
|
-
const res = await fetchWithRetry(url, init, { label: `${init.method ?? 'GET'} ${url}
|
|
55
|
+
export async function api(url, init, opts = {}) {
|
|
56
|
+
const res = await fetchWithRetry(url, init, { label: `${init.method ?? 'GET'} ${url}`, ...opts });
|
|
57
57
|
const body = await res.json().catch(() => ({}));
|
|
58
58
|
if (!res.ok) {
|
|
59
59
|
const err = body.error;
|
|
@@ -87,12 +87,29 @@ export async function publish(dir, opts = {}) {
|
|
|
87
87
|
}),
|
|
88
88
|
});
|
|
89
89
|
await uploadAll(dir, created.upload.uploads);
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
90
|
+
// Finalize deploys any worker bundle server-side, which can exceed the
|
|
91
|
+
// default 60s timeout — an aborted-then-retried finalize used to fail the
|
|
92
|
+
// whole publish with "already finalized" even though the deploy succeeded.
|
|
93
|
+
// Give it room, and treat that conflict as the success it is (an earlier
|
|
94
|
+
// attempt completed after the client gave up on it).
|
|
95
|
+
let finalized;
|
|
96
|
+
try {
|
|
97
|
+
finalized = await api(created.upload.finalizeUrl, {
|
|
98
|
+
method: 'POST',
|
|
99
|
+
headers: { 'content-type': 'application/json' },
|
|
100
|
+
body: JSON.stringify({ versionId: created.upload.versionId }),
|
|
101
|
+
}, { timeoutMs: 300_000 });
|
|
102
|
+
}
|
|
103
|
+
catch (e) {
|
|
104
|
+
if (e instanceof ApiError && e.code === 'conflict' && /already finalized/.test(e.message)) {
|
|
105
|
+
finalized = {}; // deployed by the earlier attempt; function info unavailable
|
|
106
|
+
}
|
|
107
|
+
else {
|
|
108
|
+
throw e;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
95
111
|
return {
|
|
112
|
+
...(finalized.function ? { function: finalized.function } : {}),
|
|
96
113
|
siteId: created.siteId,
|
|
97
114
|
slug: created.slug,
|
|
98
115
|
siteUrl: created.siteUrl,
|
package/dist/ssr-adapters.js
CHANGED
|
@@ -77,12 +77,13 @@ export async function detectSsr(dir) {
|
|
|
77
77
|
// (esbuild shims it). The wrangler path applies asset-first in its own entry.
|
|
78
78
|
bundleWith: 'wrangler',
|
|
79
79
|
compatibilityFlags: ['nodejs_compat', 'global_fetch_strictly_public'],
|
|
80
|
-
// OpenNext
|
|
81
|
-
//
|
|
82
|
-
// node:
|
|
83
|
-
//
|
|
84
|
-
//
|
|
85
|
-
|
|
80
|
+
// OpenNext needs a modern compat date for its node:* imports: 2025-03-25
|
|
81
|
+
// fails "No such module node:http"; @opennextjs/cloudflare 1.20.x also
|
|
82
|
+
// imports `node:fs`, which 2025-09-01 still lacks (real upload fails —
|
|
83
|
+
// wrangler --dry-run doesn't validate runtime modules, and OpenNext's own
|
|
84
|
+
// config bakes an even older date). 2026-06-01 verified live with a
|
|
85
|
+
// Next 15 + OpenNext 1.20 deploy — so we override it here.
|
|
86
|
+
compatibilityDate: '2026-06-01',
|
|
86
87
|
};
|
|
87
88
|
}
|
|
88
89
|
// Generic Cloudflare Worker via a wrangler config (Hono, itty, raw fetch).
|
package/package.json
CHANGED
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "shiply-cli",
|
|
3
|
-
"version": "0.25.
|
|
4
|
-
"description": "Publish static sites to shiply.now from the command line
|
|
5
|
-
"license": "MIT",
|
|
6
|
-
"type": "module",
|
|
7
|
-
"bin": {
|
|
8
|
-
"shiply": "dist/index.js"
|
|
9
|
-
},
|
|
10
|
-
"files": [
|
|
11
|
-
"dist",
|
|
12
|
-
"skill",
|
|
13
|
-
"README.md"
|
|
14
|
-
],
|
|
15
|
-
"scripts": {
|
|
16
|
-
"build": "tsc -p tsconfig.build.json",
|
|
17
|
-
"prepublishOnly": "pnpm build",
|
|
18
|
-
"test": "vitest run",
|
|
19
|
-
"typecheck": "tsc --noEmit"
|
|
20
|
-
},
|
|
21
|
-
"engines": {
|
|
22
|
-
"node": ">=18"
|
|
23
|
-
},
|
|
24
|
-
"keywords": [
|
|
25
|
-
"shiply",
|
|
26
|
-
"hosting",
|
|
27
|
-
"static",
|
|
28
|
-
"deploy",
|
|
29
|
-
"agents",
|
|
30
|
-
"publish"
|
|
31
|
-
],
|
|
32
|
-
"homepage": "https://shiply.now",
|
|
33
|
-
"devDependencies": {
|
|
34
|
-
"@types/node": "^22.15.0",
|
|
35
|
-
"typescript": "^5.8.0",
|
|
36
|
-
"vitest": "^3.1.0"
|
|
37
|
-
},
|
|
38
|
-
"dependencies": {
|
|
39
|
-
"esbuild": "^0.25.12",
|
|
40
|
-
"smol-toml": "^1.7.0"
|
|
41
|
-
}
|
|
42
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "shiply-cli",
|
|
3
|
+
"version": "0.25.2",
|
|
4
|
+
"description": "Publish static sites to shiply.now from the command line \u00e2\u20ac\u201d instant web hosting for agents.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"bin": {
|
|
8
|
+
"shiply": "dist/index.js"
|
|
9
|
+
},
|
|
10
|
+
"files": [
|
|
11
|
+
"dist",
|
|
12
|
+
"skill",
|
|
13
|
+
"README.md"
|
|
14
|
+
],
|
|
15
|
+
"scripts": {
|
|
16
|
+
"build": "tsc -p tsconfig.build.json",
|
|
17
|
+
"prepublishOnly": "pnpm build",
|
|
18
|
+
"test": "vitest run",
|
|
19
|
+
"typecheck": "tsc --noEmit"
|
|
20
|
+
},
|
|
21
|
+
"engines": {
|
|
22
|
+
"node": ">=18"
|
|
23
|
+
},
|
|
24
|
+
"keywords": [
|
|
25
|
+
"shiply",
|
|
26
|
+
"hosting",
|
|
27
|
+
"static",
|
|
28
|
+
"deploy",
|
|
29
|
+
"agents",
|
|
30
|
+
"publish"
|
|
31
|
+
],
|
|
32
|
+
"homepage": "https://shiply.now",
|
|
33
|
+
"devDependencies": {
|
|
34
|
+
"@types/node": "^22.15.0",
|
|
35
|
+
"typescript": "^5.8.0",
|
|
36
|
+
"vitest": "^3.1.0"
|
|
37
|
+
},
|
|
38
|
+
"dependencies": {
|
|
39
|
+
"esbuild": "^0.25.12",
|
|
40
|
+
"smol-toml": "^1.7.0"
|
|
41
|
+
}
|
|
42
|
+
}
|
package/skill/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,21 @@ entry here, that capability may be missing from your copy — re-install with
|
|
|
6
6
|
(This is the agent-facing capability log; the CLI's own release notes live in
|
|
7
7
|
the npm package changelog.)
|
|
8
8
|
|
|
9
|
+
## 2026-07-07
|
|
10
|
+
|
|
11
|
+
- **Fix** — custom domains attached to SSR/function sites no longer 404: the
|
|
12
|
+
platform's per-site access gate resolved requests by the wrong hostname on
|
|
13
|
+
custom-domain dispatch. No action needed; already-deployed sites are fixed
|
|
14
|
+
server-side, and the next publish bakes in the hardened gate.
|
|
15
|
+
- **Fix** — `shiply publish` now surfaces server-side function/bundle deploy
|
|
16
|
+
errors and hints (previously discarded — a broken worker deploy looked like
|
|
17
|
+
a successful publish). Also included in `--json` output as `function`.
|
|
18
|
+
- **Fix** — Next.js (OpenNext) deploys use compatibility date `2026-06-01`
|
|
19
|
+
(@opennextjs/cloudflare 1.20.x imports `node:fs`; the old date failed the
|
|
20
|
+
Workers upload with "No such module node:fs").
|
|
21
|
+
- **Fix** — long finalize calls (large worker bundles) no longer abort at 60s
|
|
22
|
+
and mis-report a successful deploy as "already finalized".
|
|
23
|
+
|
|
9
24
|
## 2026-07-04
|
|
10
25
|
|
|
11
26
|
- **Update** — the site-relative endpoints (`POST /.shiply/data/<collection>`,
|