@plitzi/sdk-server 0.39.7 → 0.39.9
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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# @plitzi/sdk-server
|
|
2
2
|
|
|
3
|
+
## 0.39.9
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- f04c646: Released with every `@plitzi` package at this version. What changed in each, and what to do when you upgrade, is in
|
|
8
|
+
`@plitzi/cli`'s `CHANGELOG.md`: one copy of the notes, not one per package.
|
|
9
|
+
- Updated dependencies [f04c646]
|
|
10
|
+
- @plitzi/plitzi-sdk@0.39.9
|
|
11
|
+
- @plitzi/sdk-actions@0.39.9
|
|
12
|
+
- @plitzi/sdk-kernel@0.39.9
|
|
13
|
+
- @plitzi/sdk-shared@0.39.9
|
|
14
|
+
|
|
15
|
+
## 0.39.8
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- fd14ce2: Released with every `@plitzi` package at this version. What changed in each, and what to do when you upgrade, is in
|
|
20
|
+
`@plitzi/cli`'s `CHANGELOG.md`: one copy of the notes, not one per package.
|
|
21
|
+
- Updated dependencies [fd14ce2]
|
|
22
|
+
- @plitzi/plitzi-sdk@0.39.8
|
|
23
|
+
- @plitzi/sdk-actions@0.39.8
|
|
24
|
+
- @plitzi/sdk-kernel@0.39.8
|
|
25
|
+
- @plitzi/sdk-shared@0.39.8
|
|
26
|
+
|
|
3
27
|
## 0.39.7
|
|
4
28
|
|
|
5
29
|
### Patch Changes
|
|
@@ -1516,6 +1516,14 @@ var sendUnavailable = (res, said) => {
|
|
|
1516
1516
|
};
|
|
1517
1517
|
/** How long a page answered busy tells its visitor to wait before asking again, in seconds. */
|
|
1518
1518
|
var BUSY_RETRY_AFTER_S = 2;
|
|
1519
|
+
/**
|
|
1520
|
+
* A page hydrates over the very HTML it was sent: the browser's first render must find, node for node, what the server
|
|
1521
|
+
* drew. A proxy that edits the document on its way — an email address rewritten against scrapers, a script injected,
|
|
1522
|
+
* markup minified — breaks that, and React throws the server's page away and draws it again from nothing: every
|
|
1523
|
+
* animation starts twice, every font and image is asked for again (#418; Cloudflare's Email Address Obfuscation did it
|
|
1524
|
+
* to a landing with one address in its copy). `no-transform` is HTTP's own word for it, and the proxies honour it.
|
|
1525
|
+
*/
|
|
1526
|
+
var PAGE_AS_SENT = "no-transform";
|
|
1519
1527
|
/** The turn of a space with no limit: nothing to give back. */
|
|
1520
1528
|
var noTurn = () => void 0;
|
|
1521
1529
|
var renderSSR = async (req, res, config, renderFn, pluginManager, caches, published) => {
|
|
@@ -1523,6 +1531,7 @@ var renderSSR = async (req, res, config, renderFn, pluginManager, caches, publis
|
|
|
1523
1531
|
const devMode = config.devMode ?? false;
|
|
1524
1532
|
const limit = renderLimitFor(req.ctx.spaceDeployment, config.renderLimit);
|
|
1525
1533
|
res.setHeader("Content-Type", "text/html; charset=utf-8");
|
|
1534
|
+
res.setHeader("Cache-Control", PAGE_AS_SENT);
|
|
1526
1535
|
res.setHeader("Accept-CH", SCHEME_HINT_HEADER);
|
|
1527
1536
|
res.setHeader("Vary", SCHEME_HINT_HEADER);
|
|
1528
1537
|
if (req.ctx.spaceDeployment?.noindex) res.setHeader("X-Robots-Tag", "noindex, nofollow");
|
|
@@ -1538,7 +1547,7 @@ var renderSSR = async (req, res, config, renderFn, pluginManager, caches, publis
|
|
|
1538
1547
|
* somebody else, and `noindex` because a draft URL that reaches a crawler puts unpublished copy in a search
|
|
1539
1548
|
* result. Neither is a nicety: the whole point of a draft is that it is not the site yet.
|
|
1540
1549
|
*/
|
|
1541
|
-
res.setHeader("Cache-Control",
|
|
1550
|
+
res.setHeader("Cache-Control", `no-store, no-cache, must-revalidate, ${PAGE_AS_SENT}`);
|
|
1542
1551
|
res.setHeader("X-Robots-Tag", "noindex, nofollow");
|
|
1543
1552
|
if (draft.reusable) res.setHeader("Set-Cookie", draftSessionCookie(req, draft.token, config.preview?.sessionTtlMs ?? 9e5));
|
|
1544
1553
|
}
|
|
@@ -1571,7 +1580,10 @@ var renderSSR = async (req, res, config, renderFn, pluginManager, caches, publis
|
|
|
1571
1580
|
}
|
|
1572
1581
|
if (decision?.noindex) res.setHeader("X-Robots-Tag", "noindex, nofollow");
|
|
1573
1582
|
sendScriptPolicy(res, config, page.nonce, req.ctx.spaceDeployment);
|
|
1574
|
-
res.send(() => pageHtml(page), {
|
|
1583
|
+
res.send(() => pageHtml(page), {
|
|
1584
|
+
compressed: { ...page.compressed },
|
|
1585
|
+
ownEncoding: true
|
|
1586
|
+
});
|
|
1575
1587
|
return decision;
|
|
1576
1588
|
};
|
|
1577
1589
|
/** The page rendered for this request — kept for the others when `claim` says this render is the one they wait on. */
|
|
@@ -1598,7 +1610,10 @@ var renderSSR = async (req, res, config, renderFn, pluginManager, caches, publis
|
|
|
1598
1610
|
}
|
|
1599
1611
|
if (applySSRResult(res, rendered.result, renderParamsOf(req.query))) return;
|
|
1600
1612
|
sendScriptPolicy(res, config, rendered.nonce, req.ctx.spaceDeployment);
|
|
1601
|
-
res.send(rendered.body ?? "",
|
|
1613
|
+
res.send(rendered.body ?? "", {
|
|
1614
|
+
...page ? { compressed: { ...page.compressed } } : {},
|
|
1615
|
+
ownEncoding: true
|
|
1616
|
+
});
|
|
1602
1617
|
};
|
|
1603
1618
|
if (slot) {
|
|
1604
1619
|
const kept = await readPage(slot);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as createServer } from "./createServer-
|
|
1
|
+
import { t as createServer } from "./createServer-DyjYdSq0.js";
|
|
2
2
|
import { dataDirLookup } from "@plitzi/sdk-kernel/data";
|
|
3
3
|
import { createPageEngine } from "@plitzi/sdk-actions/worker";
|
|
4
4
|
// src/core/platform.ts
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as resolveRscData, t as createServer } from "./chunks/createServer-
|
|
1
|
+
import { r as resolveRscData, t as createServer } from "./chunks/createServer-DyjYdSq0.js";
|
|
2
2
|
import { L as createCacheInvalidator, _ as createCloudAdapters, c as fixedSpace, d as verifiedDomain, dt as DEFAULT_IGNORED_QUERY_PARAMS, f as wildcardSubdomain, g as createJsonAdapters, h as createAuthAdapters, l as presentsCredential, m as refuse, n as createSpaceAdapters, p as createMemoryCache, s as authoringPreview, t as createRedisPageStore, u as renderGrant } from "./chunks/core-CoKORAOg.js";
|
|
3
3
|
import { E as takeDraftOverride, _ as resolveServices, w as createMemoryDraftStore } from "./chunks/buildBody-Bm398uxH.js";
|
|
4
4
|
import path from "node:path";
|
package/dist/platform.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as createPlatform } from "./chunks/platform-
|
|
1
|
+
export { t as createPlatform } from "./chunks/platform-B6C07M-P.js";
|
package/dist/project.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as LIVE_PAGES_PATH } from "./chunks/createServer-
|
|
1
|
+
import { n as LIVE_PAGES_PATH } from "./chunks/createServer-DyjYdSq0.js";
|
|
2
2
|
import { _ as createCloudAdapters, b as escapeHtml, g as createJsonAdapters } from "./chunks/core-CoKORAOg.js";
|
|
3
|
-
import { t as createPlatform } from "./chunks/platform-
|
|
3
|
+
import { t as createPlatform } from "./chunks/platform-B6C07M-P.js";
|
|
4
4
|
import { reachOwnServer } from "@plitzi/sdk-kernel/outbound";
|
|
5
5
|
import { EMPTY_SCHEMA } from "@plitzi/sdk-shared/schema";
|
|
6
6
|
import { mkdir, writeFile } from "node:fs/promises";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plitzi/sdk-server",
|
|
3
|
-
"version": "0.39.
|
|
3
|
+
"version": "0.39.9",
|
|
4
4
|
"license": "AGPL-3.0",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -95,10 +95,10 @@
|
|
|
95
95
|
"./dist/env.js"
|
|
96
96
|
],
|
|
97
97
|
"dependencies": {
|
|
98
|
-
"@plitzi/plitzi-sdk": "0.39.
|
|
99
|
-
"@plitzi/sdk-actions": "0.39.
|
|
100
|
-
"@plitzi/sdk-kernel": "0.39.
|
|
101
|
-
"@plitzi/sdk-shared": "0.39.
|
|
98
|
+
"@plitzi/plitzi-sdk": "0.39.9",
|
|
99
|
+
"@plitzi/sdk-actions": "0.39.9",
|
|
100
|
+
"@plitzi/sdk-kernel": "0.39.9",
|
|
101
|
+
"@plitzi/sdk-shared": "0.39.9",
|
|
102
102
|
"ejs": "^7.0.2",
|
|
103
103
|
"esbuild": "^0.28.2",
|
|
104
104
|
"jsonwebtoken": "^9.0.3",
|
|
@@ -115,7 +115,7 @@
|
|
|
115
115
|
}
|
|
116
116
|
},
|
|
117
117
|
"devDependencies": {
|
|
118
|
-
"@plitzi/sdk-runtime": "0.39.
|
|
118
|
+
"@plitzi/sdk-runtime": "0.39.9",
|
|
119
119
|
"@types/ejs": "^3.1.5",
|
|
120
120
|
"@types/jsonwebtoken": "^9.0.10",
|
|
121
121
|
"@types/node": "^26.6.6",
|