uniweb 1.34.3 → 1.34.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "uniweb",
|
|
3
|
-
"version": "1.34.
|
|
3
|
+
"version": "1.34.4",
|
|
4
4
|
"description": "Create structured Vite + React sites with content/code separation",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -41,14 +41,14 @@
|
|
|
41
41
|
"js-yaml": "^4.3.2",
|
|
42
42
|
"prompts": "^2.4.2",
|
|
43
43
|
"tar": "^7.5.21",
|
|
44
|
+
"@uniweb/schemas": "~1.7.4",
|
|
44
45
|
"@uniweb/content-writer": "~1.3.2",
|
|
45
|
-
"@uniweb/semantic-parser": "~1.13.4",
|
|
46
46
|
"@uniweb/core": "~1.6.12",
|
|
47
|
-
"@uniweb/
|
|
47
|
+
"@uniweb/semantic-parser": "~1.13.4"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
|
-
"@uniweb/semantic-parser": "~1.13.4",
|
|
51
50
|
"@uniweb/content-reader": "~1.5.10",
|
|
51
|
+
"@uniweb/semantic-parser": "~1.13.4",
|
|
52
52
|
"@uniweb/build": "~1.23.3"
|
|
53
53
|
},
|
|
54
54
|
"peerDependenciesMeta": {
|
package/src/backend/site-sync.js
CHANGED
|
@@ -2447,8 +2447,10 @@ export async function pushSyncPackages({
|
|
|
2447
2447
|
const body = await res.text().catch(() => '')
|
|
2448
2448
|
// Two unrelated conflicts share HTTP 409, so branch on the machine-readable
|
|
2449
2449
|
// `reason` — never on `detail`, which is prose the backend may reword.
|
|
2450
|
+
// A 401 is read too, for a session made for another of the backend's clients (below).
|
|
2451
|
+
// ⛔ Until 2026-11-11 it was not, so that refusal could never be told from any other 401.
|
|
2450
2452
|
let problem = null
|
|
2451
|
-
if ((res.status === 409 || res.status === 400 || res.status === 403 || res.status === 413 || res.status === 422 || res.status === 507) && body) {
|
|
2453
|
+
if ((res.status === 409 || res.status === 400 || res.status === 401 || res.status === 403 || res.status === 413 || res.status === 422 || res.status === 507) && body) {
|
|
2452
2454
|
try {
|
|
2453
2455
|
problem = JSON.parse(body)
|
|
2454
2456
|
} catch {
|
|
@@ -2634,15 +2636,16 @@ export async function pushSyncPackages({
|
|
|
2634
2636
|
return null
|
|
2635
2637
|
}
|
|
2636
2638
|
error(`${label} push rejected: HTTP ${res.status} ${res.statusText}`)
|
|
2637
|
-
// A
|
|
2638
|
-
//
|
|
2639
|
+
// A session made for another of the backend's clients says so, and names a sign-in. Any
|
|
2640
|
+
// other 401 is the credentials, as before; a typed 403 says its own cause (a plan's limit,
|
|
2641
|
+
// say), which is not the credentials.
|
|
2639
2642
|
const anotherClient = await anotherClientsSessionLines(problem, {
|
|
2640
2643
|
origin: client.origin,
|
|
2641
2644
|
fromEnv: Boolean(process.env.UNIWEB_TOKEN)
|
|
2642
2645
|
})
|
|
2643
2646
|
if (anotherClient) {
|
|
2644
2647
|
for (const line of anotherClient) note(line)
|
|
2645
|
-
} else if (
|
|
2648
|
+
} else if (res.status === 401 || (res.status === 403 && typeof problem?.reason !== 'string')) {
|
|
2646
2649
|
note(
|
|
2647
2650
|
"Credentials weren't accepted — log in again (`uniweb login --server <url>`), or check UNIWEB_TOKEN."
|
|
2648
2651
|
)
|
|
@@ -376,8 +376,8 @@ export const SESSION_FOR_ANOTHER_CLIENT = 'session_for_another_client'
|
|
|
376
376
|
* own message.
|
|
377
377
|
*
|
|
378
378
|
* ⭐ IT NAMES THE FIX: a session the CLI signs in for itself, on the backend that refused
|
|
379
|
-
* (`loginCommand`). ⛔ Until 2026-11-11 the token checks said only "HTTP 401", and a push
|
|
380
|
-
*
|
|
379
|
+
* (`loginCommand`). ⛔ Until 2026-11-11 the token checks said only "HTTP 401", and a push gave
|
|
380
|
+
* only its general "log in again" advice, since it never read a 401's body.
|
|
381
381
|
*
|
|
382
382
|
* @param {object|null|undefined} problem - the refusal's parsed body
|
|
383
383
|
* @param {{ origin: string, fromEnv?: boolean }} o - the backend that refused, and whether the
|