@spillway-cms/astro 0.1.9 → 0.1.10
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/README.md +1 -1
- package/components/SpillwayPage.astro +5 -2
- package/dist/index.d.ts +4 -2
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/server.d.ts +25 -1
- package/dist/server.js +45 -1
- package/dist/server.js.map +1 -1
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -20,6 +20,6 @@ export const getStaticPaths = () => spillwayStaticPaths(client);
|
|
|
20
20
|
|
|
21
21
|
- `spillway:client` is the configured `@spillway-cms/client` (server only; add `/// <reference types="@spillway-cms/astro/client" />` for types).
|
|
22
22
|
- `<SpillwayPage>` and `<SpillwayStyles>` render pages with the core block library through React server rendering; `@spillway-cms/astro/render` has `renderPage`, `renderHead`, `renderMenu`, `pageStyles` for custom layouts.
|
|
23
|
-
- `@spillway-cms/astro/server`: `createRevalidateEndpoint({ secret, onEvent: deployHook(url) })` answers Spillway's signed publish webhooks.
|
|
23
|
+
- `@spillway-cms/astro/server`: `createRevalidateEndpoint({ secret, onEvent: deployHook(url) })` answers Spillway's signed publish webhooks; `createPreviewEndpoint({ client })` and `createPreviewExitEndpoint()` open and close previews (a release share link, or `?preview=1&secret=` checked against the client's `previewSecret`, `SPILLWAY_PREVIEW_SECRET`, which signs the cookie `<SpillwayPage preview="auto">` verifies).
|
|
24
24
|
|
|
25
25
|
Peer dependencies: `astro`, `react`, `react-dom`, `@spillway-cms/blocks`, `@puckeditor/core`. Example: `examples/astro-site`. Full documentation: `docs/adapters.md` in the Spillway repository.
|
|
@@ -19,7 +19,10 @@ interface Props extends RenderPageOptions {
|
|
|
19
19
|
page?: PublicRender | null;
|
|
20
20
|
/** Query parameters for blocks that read them (exposed filters, `page`, `month`). */
|
|
21
21
|
params?: Record<string, string | number | undefined>;
|
|
22
|
-
/**
|
|
22
|
+
/**
|
|
23
|
+
* A preview state, `null` for none (default), or `'auto'` to read `?release=&token=` (or `?workstream=`) and the preview
|
|
24
|
+
* cookie from the request (SSR pages). A draft preview needs the cookie `createPreviewEndpoint` signs with the client's `previewSecret`.
|
|
25
|
+
*/
|
|
23
26
|
preview?: PreviewState | null | 'auto';
|
|
24
27
|
styles?: boolean;
|
|
25
28
|
client?: SpillwayClient;
|
|
@@ -32,7 +35,7 @@ const client = Astro.props.client ?? defaultClient;
|
|
|
32
35
|
let previewState: PreviewState | null = null;
|
|
33
36
|
if (Astro.props.preview === 'auto') {
|
|
34
37
|
try {
|
|
35
|
-
previewState = previewFromRequest(Astro.request);
|
|
38
|
+
previewState = previewFromRequest(Astro.request, { secret: client.options.previewSecret });
|
|
36
39
|
} catch {
|
|
37
40
|
previewState = null;
|
|
38
41
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -7,13 +7,15 @@
|
|
|
7
7
|
* webhooks. docs/adapters.md explains the setup.
|
|
8
8
|
*/
|
|
9
9
|
import type { ClientOptions, PublicPath, SpillwayClient } from '@spillway-cms/client';
|
|
10
|
-
export { createClient, previewFromRequest, previewCookieValue, parsePreviewCookie, SpillwayError, SpillwayClient, PREVIEW_COOKIE } from '@spillway-cms/client';
|
|
11
|
-
export type { ClientOptions, PreviewState, PublicRender, PublicSite, PublicMenu, PublicPath, Entity, CollectionItem, Paginated } from '@spillway-cms/client';
|
|
10
|
+
export { createClient, previewFromRequest, previewCookieValue, parsePreviewCookie, checkPreviewRequest, safeRedirectUrl, previewSecretMatches, SpillwayError, SpillwayClient, PREVIEW_COOKIE, PREVIEW_MAX_AGE } from '@spillway-cms/client';
|
|
11
|
+
export type { ClientOptions, PreviewState, PreviewVerifyOptions, PreviewCookieOptions, PublicRender, PublicSite, PublicMenu, PublicPath, Entity, CollectionItem, Paginated } from '@spillway-cms/client';
|
|
12
12
|
export interface SpillwayIntegrationOptions extends Partial<Omit<ClientOptions, 'fetch' | 'requestInit'>> {
|
|
13
13
|
/** The Spillway origin; falls back to `SPILLWAY_URL` in the environment at runtime. */
|
|
14
14
|
baseUrl?: string;
|
|
15
15
|
/** An API token for previews and multisite; falls back to `SPILLWAY_TOKEN`. Server only. */
|
|
16
16
|
token?: string;
|
|
17
|
+
/** The preview secret for draft previews (see `createPreviewEndpoint`); falls back to `SPILLWAY_PREVIEW_SECRET`. Server only. */
|
|
18
|
+
previewSecret?: string;
|
|
17
19
|
}
|
|
18
20
|
export declare const VIRTUAL_MODULE_ID = "spillway:client";
|
|
19
21
|
/** The source of the virtual module: the options as given, with the environment filling in what is missing at runtime. */
|
package/dist/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
export { createClient, previewFromRequest, previewCookieValue, parsePreviewCookie, SpillwayError, SpillwayClient, PREVIEW_COOKIE } from '@spillway-cms/client';
|
|
1
|
+
export { createClient, previewFromRequest, previewCookieValue, parsePreviewCookie, checkPreviewRequest, safeRedirectUrl, previewSecretMatches, SpillwayError, SpillwayClient, PREVIEW_COOKIE, PREVIEW_MAX_AGE } from '@spillway-cms/client';
|
|
2
2
|
export const VIRTUAL_MODULE_ID = 'spillway:client';
|
|
3
3
|
const RESOLVED_ID = '\0' + VIRTUAL_MODULE_ID;
|
|
4
4
|
/** The source of the virtual module: the options as given, with the environment filling in what is missing at runtime. */
|
|
5
5
|
export function virtualModuleSource(options) {
|
|
6
|
-
const { baseUrl, token, ...rest } = options;
|
|
6
|
+
const { baseUrl, token, previewSecret, ...rest } = options;
|
|
7
7
|
return [
|
|
8
8
|
`import { createClient } from '@spillway-cms/client';`,
|
|
9
9
|
`const env = typeof process !== 'undefined' && process.env ? process.env : {};`,
|
|
10
|
-
`export const options = { ...${JSON.stringify(rest)}, baseUrl: ${JSON.stringify(baseUrl ?? null)} ?? env.SPILLWAY_URL ?? 'http://localhost:3000', token: ${JSON.stringify(token ?? null)} ?? env.SPILLWAY_TOKEN ?? undefined };`,
|
|
10
|
+
`export const options = { ...${JSON.stringify(rest)}, baseUrl: ${JSON.stringify(baseUrl ?? null)} ?? env.SPILLWAY_URL ?? 'http://localhost:3000', token: ${JSON.stringify(token ?? null)} ?? env.SPILLWAY_TOKEN ?? undefined, previewSecret: ${JSON.stringify(previewSecret ?? null)} ?? env.SPILLWAY_PREVIEW_SECRET ?? undefined };`,
|
|
11
11
|
`export const client = createClient(options);`,
|
|
12
12
|
`export default client;`,
|
|
13
13
|
'',
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,aAAa,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,eAAe,EAAE,oBAAoB,EAAE,aAAa,EAAE,cAAc,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAY5O,MAAM,CAAC,MAAM,iBAAiB,GAAG,iBAAiB,CAAC;AACnD,MAAM,WAAW,GAAG,IAAI,GAAG,iBAAiB,CAAC;AAE7C,0HAA0H;AAC1H,MAAM,UAAU,mBAAmB,CAAC,OAAmC;IACrE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,GAAG,IAAI,EAAE,GAAG,OAAO,CAAC;IAC3D,OAAO;QACL,sDAAsD;QACtD,+EAA+E;QAC/E,+BAA+B,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,cAAc,IAAI,CAAC,SAAS,CAAC,OAAO,IAAI,IAAI,CAAC,2DAA2D,IAAI,CAAC,SAAS,CAAC,KAAK,IAAI,IAAI,CAAC,uDAAuD,IAAI,CAAC,SAAS,CAAC,aAAa,IAAI,IAAI,CAAC,iDAA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,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC,IAAI,KAAK,GAAG,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC,CAAC;IACnJ,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,IAAI,IAAI,CAAC,OAAO;YAAE,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QAC3C,MAAM,GAAG,CAAC;IACZ,CAAC;AACH,CAAC;AAED,6GAA6G;AAC7G,MAAM,UAAU,cAAc,CAAC,MAA0C,EAAE,KAAK,GAAG,MAAM;IACvF,MAAM,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IACxB,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC;AAC/C,CAAC"}
|
package/dist/server.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Server-side helpers for SSR and hybrid Astro sites: the signed revalidation endpoint Spillway's publish webhooks
|
|
3
|
-
* call,
|
|
3
|
+
* call, the deploy-hook helper for static sites that rebuild on publish, and the preview routes that open and close a
|
|
4
|
+
* preview session (`createPreviewEndpoint`, `createPreviewExitEndpoint`).
|
|
4
5
|
*/
|
|
6
|
+
import { type PreviewState, type SpillwayClient } from '@spillway-cms/client';
|
|
5
7
|
import { affectedByWebhook, type WebhookPayload } from '@spillway-cms/client/webhook';
|
|
6
8
|
export { readWebhook, verifyWebhookSignature, affectedByWebhook, WebhookError } from '@spillway-cms/client/webhook';
|
|
7
9
|
export type { WebhookPayload } from '@spillway-cms/client/webhook';
|
|
@@ -23,3 +25,25 @@ export type EndpointHandler = (context: {
|
|
|
23
25
|
export declare function createRevalidateEndpoint(opts: RevalidateEndpointOptions): EndpointHandler;
|
|
24
26
|
/** An `onEvent` that POSTs to a deploy hook (Netlify, Vercel, Cloudflare Pages, GitHub Actions) so a static site rebuilds. */
|
|
25
27
|
export declare function deployHook(url: string, init?: RequestInit): RevalidateEndpointOptions['onEvent'];
|
|
28
|
+
export interface PreviewEndpointOptions {
|
|
29
|
+
/** The server-side client (with the API token for draft previews); `client` from `spillway:client`. */
|
|
30
|
+
client: SpillwayClient;
|
|
31
|
+
/**
|
|
32
|
+
* The preview secret: `?preview=1` needs `&secret=` to match it, and it signs the draft preview cookie. Defaults to the
|
|
33
|
+
* client's `previewSecret` (`SPILLWAY_PREVIEW_SECRET` through the integration), which `<SpillwayPage preview="auto">`
|
|
34
|
+
* verifies the cookie with. Without a secret only release share links open a preview.
|
|
35
|
+
*/
|
|
36
|
+
secret?: string;
|
|
37
|
+
/** Where to send the editor; defaults to the `path` query parameter, then `/`. Only a same-origin path is followed. */
|
|
38
|
+
redirectTo?: (state: PreviewState, path: string) => string;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* `export const GET = createPreviewEndpoint({ client })` in an on-demand route (`export const prerender = false`), for
|
|
42
|
+
* `?path=/about&release=<id>&token=<share token>` or `?path=/about&preview=1&secret=<SPILLWAY_PREVIEW_SECRET>`. Checks
|
|
43
|
+
* the credential (the secret here, the share token against Spillway by rendering the path), sets the `spillway_preview`
|
|
44
|
+
* cookie (signed when there is a secret) and redirects to the page on this origin. A static site points `redirectTo` at
|
|
45
|
+
* its on-demand preview page.
|
|
46
|
+
*/
|
|
47
|
+
export declare function createPreviewEndpoint(opts: PreviewEndpointOptions): EndpointHandler;
|
|
48
|
+
/** `export const GET = createPreviewExitEndpoint('/')`: forgets the preview cookie and goes back to a path on this origin. */
|
|
49
|
+
export declare function createPreviewExitEndpoint(redirectTo?: string): EndpointHandler;
|
package/dist/server.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Server-side helpers for SSR and hybrid Astro sites: the signed revalidation endpoint Spillway's publish webhooks
|
|
3
|
-
* call,
|
|
3
|
+
* call, the deploy-hook helper for static sites that rebuild on publish, and the preview routes that open and close a
|
|
4
|
+
* preview session (`createPreviewEndpoint`, `createPreviewExitEndpoint`).
|
|
4
5
|
*/
|
|
6
|
+
import { PREVIEW_COOKIE, PREVIEW_MAX_AGE, SpillwayError, checkPreviewRequest, previewCookieValue, safeRedirectUrl } from '@spillway-cms/client';
|
|
5
7
|
import { WebhookError, affectedByWebhook, readWebhook } from '@spillway-cms/client/webhook';
|
|
6
8
|
export { readWebhook, verifyWebhookSignature, affectedByWebhook, WebhookError } from '@spillway-cms/client/webhook';
|
|
7
9
|
/**
|
|
@@ -36,4 +38,46 @@ export function deployHook(url, init = {}) {
|
|
|
36
38
|
throw new Error(`deploy hook responded ${res.status}`);
|
|
37
39
|
};
|
|
38
40
|
}
|
|
41
|
+
function previewCookieHeader(value, secure, maxAge) {
|
|
42
|
+
return [`${PREVIEW_COOKIE}=${encodeURIComponent(value)}`, 'Path=/', 'HttpOnly', 'SameSite=Lax', ...(secure ? ['Secure'] : []), ...(maxAge !== undefined ? [`Max-Age=${maxAge}`] : [])].join('; ');
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* `export const GET = createPreviewEndpoint({ client })` in an on-demand route (`export const prerender = false`), for
|
|
46
|
+
* `?path=/about&release=<id>&token=<share token>` or `?path=/about&preview=1&secret=<SPILLWAY_PREVIEW_SECRET>`. Checks
|
|
47
|
+
* the credential (the secret here, the share token against Spillway by rendering the path), sets the `spillway_preview`
|
|
48
|
+
* cookie (signed when there is a secret) and redirects to the page on this origin. A static site points `redirectTo` at
|
|
49
|
+
* its on-demand preview page.
|
|
50
|
+
*/
|
|
51
|
+
export function createPreviewEndpoint(opts) {
|
|
52
|
+
return async ({ request }) => {
|
|
53
|
+
const url = new URL(request.url);
|
|
54
|
+
const secret = opts.secret ?? opts.client.options?.previewSecret;
|
|
55
|
+
const check = checkPreviewRequest(request, { secret });
|
|
56
|
+
if (!check.ok)
|
|
57
|
+
return Response.json({ error: check.error }, { status: check.status });
|
|
58
|
+
const { state, path } = check;
|
|
59
|
+
try {
|
|
60
|
+
await opts.client.withPreview(state).render(path);
|
|
61
|
+
}
|
|
62
|
+
catch (err) {
|
|
63
|
+
if (err instanceof SpillwayError && (err.status === 401 || err.status === 403))
|
|
64
|
+
return Response.json({ error: 'Preview credential refused' }, { status: 401 });
|
|
65
|
+
if (!(err instanceof SpillwayError && err.status === 404))
|
|
66
|
+
throw err; // a missing page still opens the preview session
|
|
67
|
+
}
|
|
68
|
+
const to = opts.redirectTo ? opts.redirectTo(state, path) : path;
|
|
69
|
+
const headers = new Headers({ location: safeRedirectUrl(to, url.origin).href, 'cache-control': 'no-store' });
|
|
70
|
+
headers.append('set-cookie', previewCookieHeader(previewCookieValue(state, { secret }), url.protocol === 'https:', secret ? PREVIEW_MAX_AGE : undefined));
|
|
71
|
+
return new Response(null, { status: 307, headers });
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
/** `export const GET = createPreviewExitEndpoint('/')`: forgets the preview cookie and goes back to a path on this origin. */
|
|
75
|
+
export function createPreviewExitEndpoint(redirectTo = '/') {
|
|
76
|
+
return async ({ request }) => {
|
|
77
|
+
const url = new URL(request.url);
|
|
78
|
+
const headers = new Headers({ location: safeRedirectUrl(redirectTo, url.origin).href, 'cache-control': 'no-store' });
|
|
79
|
+
headers.append('set-cookie', previewCookieHeader('', url.protocol === 'https:', 0));
|
|
80
|
+
return new Response(null, { status: 307, headers });
|
|
81
|
+
};
|
|
82
|
+
}
|
|
39
83
|
//# sourceMappingURL=server.js.map
|
package/dist/server.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"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way-cms/astro",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.10",
|
|
4
4
|
"description": "Astro integration for Spillway CMS: a spillway:client virtual module, a <SpillwayPage> component that renders pages with the core blocks, getStaticPaths from the published paths and a signed revalidation endpoint",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -46,15 +46,15 @@
|
|
|
46
46
|
"LICENSE"
|
|
47
47
|
],
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@spillway-cms/
|
|
50
|
-
"@spillway-cms/
|
|
49
|
+
"@spillway-cms/client": "0.1.10",
|
|
50
|
+
"@spillway-cms/shared": "0.1.10"
|
|
51
51
|
},
|
|
52
52
|
"peerDependencies": {
|
|
53
53
|
"@puckeditor/core": "^0.24.0",
|
|
54
54
|
"astro": ">=5.0.0",
|
|
55
55
|
"react": "^19.0.0",
|
|
56
56
|
"react-dom": "^19.0.0",
|
|
57
|
-
"@spillway-cms/blocks": "^0.1.
|
|
57
|
+
"@spillway-cms/blocks": "^0.1.10"
|
|
58
58
|
},
|
|
59
59
|
"peerDependenciesMeta": {
|
|
60
60
|
"astro": {
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"react-dom": "^19.0.0",
|
|
71
71
|
"typescript": "^5.9.0",
|
|
72
72
|
"vitest": "^3.0.0",
|
|
73
|
-
"@spillway-cms/blocks": "0.1.
|
|
73
|
+
"@spillway-cms/blocks": "0.1.10"
|
|
74
74
|
},
|
|
75
75
|
"scripts": {
|
|
76
76
|
"build": "rm -rf dist && tsc -p tsconfig.json",
|