@hollware/nuxt 1.0.0-rc.0 → 1.0.0-rc.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/dist/index.d.mts +0 -9
- package/dist/index.mjs +10 -29
- package/dist/route-rules.mjs +17 -0
- package/dist/runtime/components/HollwareContent.d.mts +0 -6
- package/dist/runtime/components/HollwareContent.mjs +0 -5
- package/dist/runtime/components/HollwareImage.d.mts +31 -0
- package/dist/runtime/components/HollwareImage.mjs +32 -0
- package/dist/runtime/composables.d.mts +2 -15
- package/dist/runtime/composables.mjs +1 -20
- package/dist/runtime/server/answer.d.mts +0 -9
- package/dist/runtime/server/answer.mjs +3 -12
- package/dist/runtime/server/cache.d.mts +0 -6
- package/dist/runtime/server/cache.mjs +0 -6
- package/dist/runtime/server/preview-exchange.d.mts +0 -7
- package/dist/runtime/server/preview-exchange.mjs +1 -8
- package/dist/runtime/server/preview.d.mts +0 -8
- package/dist/runtime/server/preview.mjs +3 -13
- package/dist/runtime/server/reader.d.mts +1 -6
- package/dist/runtime/server/reader.mjs +1 -10
- package/dist/runtime/server/routes/entry.mjs +1 -1
- package/dist/runtime/server/routes/site.d.mts +1 -0
- package/dist/runtime/server/routes/webhook.mjs +5 -0
- package/dist/runtime/server/url.d.mts +0 -4
- package/dist/runtime/server/url.mjs +0 -4
- package/dist/runtime/tags.d.mts +1 -15
- package/dist/runtime/tags.mjs +7 -21
- package/package.json +7 -7
- package/dist/runtime/beacon.client.d.mts +0 -4
- package/dist/runtime/beacon.client.mjs +0 -16
- package/dist/runtime/beacon.d.mts +0 -9
- package/dist/runtime/beacon.mjs +0 -22
package/dist/index.d.mts
CHANGED
|
@@ -22,13 +22,6 @@ export interface ModuleOptions {
|
|
|
22
22
|
token?: string;
|
|
23
23
|
/** Whether pages carry `<meta name="generator" content="Hollware">`. */
|
|
24
24
|
generator: boolean;
|
|
25
|
-
/**
|
|
26
|
-
* The public URL of the Hollware that counts this site's page views (ADR-031), such as
|
|
27
|
-
* `https://cms.example.com`: each page the reader sees is sent to its `/events`, as the site and
|
|
28
|
-
* the path, with no cookie. The site's `url` in the Hollware config must be this site's origin.
|
|
29
|
-
* No views are counted when it is not set.
|
|
30
|
-
*/
|
|
31
|
-
beacon?: string;
|
|
32
25
|
/**
|
|
33
26
|
* How the pages that read Hollware are kept (S8):
|
|
34
27
|
*
|
|
@@ -46,8 +39,6 @@ export interface ModuleOptions {
|
|
|
46
39
|
webhookSecret?: string;
|
|
47
40
|
}
|
|
48
41
|
export declare const name = "@hollware/nuxt";
|
|
49
|
-
/** The routes of the site that read Hollware for its pages, on the server. */
|
|
50
|
-
export declare const ROUTES: readonly [readonly ['/_hollware/site', 'site'], readonly ['/_hollware/entries/:collection', 'entries'], readonly ['/_hollware/entry/:collection/:locale/:slug', 'entry'], readonly ['/_hollware/translations/:collection/:group', 'translations']];
|
|
51
42
|
declare const _default: import("nuxt/schema").NuxtModule<ModuleOptions, ModuleOptions, false>;
|
|
52
43
|
//#endregion
|
|
53
44
|
export { type PageEntry, _default as default };
|
package/dist/index.mjs
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { secondsCacheRules } from "./route-rules.mjs";
|
|
2
2
|
import { addComponent, addImports, addPlugin, addServerHandler, addServerImports, addServerPlugin, createResolver, defineNuxtModule } from "@nuxt/kit";
|
|
3
3
|
//#region src/index.ts
|
|
4
4
|
const name = "@hollware/nuxt";
|
|
5
|
-
/** The routes of the site that read Hollware for its pages, on the server. */
|
|
6
5
|
const ROUTES = [
|
|
7
6
|
["/_hollware/site", "site"],
|
|
8
7
|
["/_hollware/entries/:collection", "entries"],
|
|
@@ -53,6 +52,10 @@ var src_default = defineNuxtModule({
|
|
|
53
52
|
name: "HollwareContent",
|
|
54
53
|
filePath: resolve("./runtime/components/HollwareContent")
|
|
55
54
|
});
|
|
55
|
+
addComponent({
|
|
56
|
+
name: "HollwareImage",
|
|
57
|
+
filePath: resolve("./runtime/components/HollwareImage")
|
|
58
|
+
});
|
|
56
59
|
if (options.generator) addPlugin(resolve("./runtime/generator"));
|
|
57
60
|
addServerPlugin(resolve("./runtime/server/preview"));
|
|
58
61
|
addServerHandler({
|
|
@@ -67,33 +70,11 @@ var src_default = defineNuxtModule({
|
|
|
67
70
|
handler: resolve("./runtime/server/routes/webhook")
|
|
68
71
|
});
|
|
69
72
|
}
|
|
70
|
-
if (typeof options.cache === "number" && options.cache > 0) {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
varies: [PREVIEW_HEADER]
|
|
75
|
-
} };
|
|
76
|
-
const routes = {
|
|
77
|
-
swr: false,
|
|
78
|
-
cache: false
|
|
79
|
-
};
|
|
80
|
-
nuxt.options.routeRules = {
|
|
81
|
-
"/**": pages,
|
|
82
|
-
"/_hollware/**": routes,
|
|
83
|
-
...nuxt.options.routeRules
|
|
84
|
-
};
|
|
85
|
-
}
|
|
86
|
-
if (options.beacon !== void 0 && options.beacon !== "") {
|
|
87
|
-
nuxt.options.runtimeConfig.public["hollware"] = {
|
|
88
|
-
site: options.site,
|
|
89
|
-
beacon: options.beacon
|
|
90
|
-
};
|
|
91
|
-
addPlugin({
|
|
92
|
-
src: resolve("./runtime/beacon.client"),
|
|
93
|
-
mode: "client"
|
|
94
|
-
});
|
|
95
|
-
}
|
|
73
|
+
if (typeof options.cache === "number" && options.cache > 0) nuxt.options.routeRules = {
|
|
74
|
+
...secondsCacheRules(options.cache),
|
|
75
|
+
...nuxt.options.routeRules
|
|
76
|
+
};
|
|
96
77
|
}
|
|
97
78
|
});
|
|
98
79
|
//#endregion
|
|
99
|
-
export {
|
|
80
|
+
export { src_default as default, name };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { PREVIEW_HEADER } from "./runtime/tags.mjs";
|
|
2
|
+
//#region src/route-rules.ts
|
|
3
|
+
function secondsCacheRules(seconds) {
|
|
4
|
+
return {
|
|
5
|
+
"/**": { cache: {
|
|
6
|
+
swr: true,
|
|
7
|
+
maxAge: seconds,
|
|
8
|
+
varies: [PREVIEW_HEADER]
|
|
9
|
+
} },
|
|
10
|
+
"/_hollware/**": {
|
|
11
|
+
swr: false,
|
|
12
|
+
cache: false
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
//#endregion
|
|
17
|
+
export { secondsCacheRules };
|
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
import { PropType } from "vue";
|
|
2
2
|
//#region src/runtime/components/HollwareContent.d.ts
|
|
3
|
-
/**
|
|
4
|
-
* The body of an entry: the Comark document Hollware stored when it was written, rendered with
|
|
5
|
-
* `@comark/vue`. `components` maps the names of the entry's components to the site's own.
|
|
6
|
-
*/
|
|
7
3
|
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
8
|
-
/** An entry as `useHollwareEntry` gives it, with its `document`. */
|
|
9
4
|
entry: {
|
|
10
5
|
type: PropType<{
|
|
11
6
|
document?: unknown;
|
|
@@ -19,7 +14,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
19
14
|
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
20
15
|
[key: string]: any;
|
|
21
16
|
}> | null, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
22
|
-
/** An entry as `useHollwareEntry` gives it, with its `document`. */
|
|
23
17
|
entry: {
|
|
24
18
|
type: PropType<{
|
|
25
19
|
document?: unknown;
|
|
@@ -1,14 +1,9 @@
|
|
|
1
1
|
import { defineComponent, h } from "vue";
|
|
2
2
|
import { MarkdownDocument } from "@comark/vue";
|
|
3
3
|
//#region src/runtime/components/HollwareContent.ts
|
|
4
|
-
/**
|
|
5
|
-
* The body of an entry: the Comark document Hollware stored when it was written, rendered with
|
|
6
|
-
* `@comark/vue`. `components` maps the names of the entry's components to the site's own.
|
|
7
|
-
*/
|
|
8
4
|
var HollwareContent_default = defineComponent({
|
|
9
5
|
name: "HollwareContent",
|
|
10
6
|
props: {
|
|
11
|
-
/** An entry as `useHollwareEntry` gives it, with its `document`. */
|
|
12
7
|
entry: {
|
|
13
8
|
type: Object,
|
|
14
9
|
default: null
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { imageOf } from "@hollware/client";
|
|
2
|
+
import { PropType } from "vue";
|
|
3
|
+
//#region src/runtime/components/HollwareImage.d.ts
|
|
4
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
5
|
+
entry: {
|
|
6
|
+
type: PropType<Parameters<typeof imageOf>[0]>;
|
|
7
|
+
default: null;
|
|
8
|
+
};
|
|
9
|
+
field: {
|
|
10
|
+
type: StringConstructor;
|
|
11
|
+
required: true;
|
|
12
|
+
};
|
|
13
|
+
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
14
|
+
[key: string]: any;
|
|
15
|
+
}> | null, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
16
|
+
entry: {
|
|
17
|
+
type: PropType<Parameters<typeof imageOf>[0]>;
|
|
18
|
+
default: null;
|
|
19
|
+
};
|
|
20
|
+
field: {
|
|
21
|
+
type: StringConstructor;
|
|
22
|
+
required: true;
|
|
23
|
+
};
|
|
24
|
+
}>> & Readonly<{}>, {
|
|
25
|
+
entry: {
|
|
26
|
+
readonly frontmatter?: Readonly<Record<string, unknown>>;
|
|
27
|
+
readonly images?: Readonly<Record<string, import("@hollware/client").PageImage>>;
|
|
28
|
+
} | null | undefined;
|
|
29
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
30
|
+
//#endregion
|
|
31
|
+
export { _default as default };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { imageOf } from "@hollware/client";
|
|
2
|
+
import { defineComponent, h } from "vue";
|
|
3
|
+
//#region src/runtime/components/HollwareImage.ts
|
|
4
|
+
var HollwareImage_default = defineComponent({
|
|
5
|
+
name: "HollwareImage",
|
|
6
|
+
props: {
|
|
7
|
+
entry: {
|
|
8
|
+
type: Object,
|
|
9
|
+
default: null
|
|
10
|
+
},
|
|
11
|
+
field: {
|
|
12
|
+
type: String,
|
|
13
|
+
required: true
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
setup(props) {
|
|
17
|
+
return () => {
|
|
18
|
+
const image = imageOf(props.entry, props.field);
|
|
19
|
+
if (image === null) return null;
|
|
20
|
+
return h("img", {
|
|
21
|
+
src: image.src,
|
|
22
|
+
alt: image.alt ?? "",
|
|
23
|
+
srcset: image.srcset,
|
|
24
|
+
sizes: image.sizes,
|
|
25
|
+
width: image.width,
|
|
26
|
+
height: image.height
|
|
27
|
+
});
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
//#endregion
|
|
32
|
+
export { HollwareImage_default as default };
|
|
@@ -1,40 +1,26 @@
|
|
|
1
1
|
import { PageEntry } from "./types.mjs";
|
|
2
2
|
import { MaybeRefOrGetter } from "vue";
|
|
3
3
|
//#region src/runtime/composables.d.ts
|
|
4
|
-
/**
|
|
5
|
-
* An entry, with its Comark document; `data` is null while it loads, `error` a 404 when it is not
|
|
6
|
-
* published. A visitor who opened the admin's "Preview on the site" link has the token in the
|
|
7
|
-
* `hollware_preview` cookie (the server exchanged it for the link's `?hollware-preview=`), and the
|
|
8
|
-
* `/_hollware/entry` route reads the latest revision of that entry instead: a draft too. The page
|
|
9
|
-
* then answers `no-store`; a token that does not hold (expired, of another entry) is an error,
|
|
10
|
-
* never the published version, and when Hollware says it expired or is invalid the response
|
|
11
|
-
* clears the cookie.
|
|
12
|
-
*/
|
|
13
4
|
export declare function useHollwareEntry(collection: MaybeRefOrGetter<string>, locale: MaybeRefOrGetter<string>, slug: MaybeRefOrGetter<string>): import("nuxt/app").AsyncData<{
|
|
14
5
|
outcome: 'ok';
|
|
15
6
|
entry: PageEntry;
|
|
16
7
|
} | undefined, import("nuxt/app").NuxtError<unknown> | undefined>;
|
|
17
|
-
/** A page of the published entries of a collection, newest first. */
|
|
18
8
|
export declare function useHollwareEntries(collection: MaybeRefOrGetter<string>, options?: MaybeRefOrGetter<{
|
|
19
9
|
locale?: string;
|
|
20
10
|
tag?: string;
|
|
21
11
|
limit?: number;
|
|
22
12
|
cursor?: string;
|
|
23
|
-
}>,
|
|
24
|
-
/** `lazy: true` renders without waiting for the answer, as `useFetch` does. */
|
|
25
|
-
fetching?: {
|
|
13
|
+
}>, fetching?: {
|
|
26
14
|
lazy?: boolean;
|
|
27
15
|
}): import("nuxt/app").AsyncData<{
|
|
28
16
|
outcome: 'ok';
|
|
29
17
|
entries: PageEntry[];
|
|
30
18
|
nextCursor: string | null;
|
|
31
19
|
} | undefined, import("nuxt/app").NuxtError<unknown> | undefined>;
|
|
32
|
-
/** The entries of a translation group, one per locale. */
|
|
33
20
|
export declare function useHollwareTranslations(collection: MaybeRefOrGetter<string>, group: MaybeRefOrGetter<string>): import("nuxt/app").AsyncData<{
|
|
34
21
|
outcome: 'ok';
|
|
35
22
|
entries: PageEntry[];
|
|
36
23
|
} | undefined, import("nuxt/app").NuxtError<unknown> | undefined>;
|
|
37
|
-
/** The site: its locales, its collections and their schemas. */
|
|
38
24
|
export declare function useHollwareSite(): import("nuxt/app").AsyncData<{
|
|
39
25
|
outcome: "ok";
|
|
40
26
|
site: {
|
|
@@ -50,6 +36,7 @@ export declare function useHollwareSite(): import("nuxt/app").AsyncData<{
|
|
|
50
36
|
translationGroupField: string | null;
|
|
51
37
|
tagsField: string | null;
|
|
52
38
|
sortByField: string | null;
|
|
39
|
+
automaticFields?: Record<string, "firstPublished" | "lastModified" | "readingTime" | "wordCount"> | undefined;
|
|
53
40
|
components: {
|
|
54
41
|
name: string;
|
|
55
42
|
description: string | null;
|
|
@@ -1,27 +1,11 @@
|
|
|
1
1
|
import { entryTags, groupTags, listTags, recordTags, siteTags } from "./tags.mjs";
|
|
2
|
-
import { useFetch, useRequestEvent } from "nuxt/app";
|
|
3
2
|
import { appendResponseHeader } from "h3";
|
|
3
|
+
import { useFetch, useRequestEvent } from "nuxt/app";
|
|
4
4
|
import { computed, toValue } from "vue";
|
|
5
5
|
//#region src/runtime/composables.ts
|
|
6
|
-
/**
|
|
7
|
-
* The published content of the site, for a page: each reads the site's own `/_hollware/` route,
|
|
8
|
-
* which reads Hollware on the server, so no token reaches the browser. They are `useFetch`, so the
|
|
9
|
-
* page renders on the server with the answer and the browser does not ask again. On the server,
|
|
10
|
-
* each records on the page's request the cache tags of what it read (S8).
|
|
11
|
-
*/
|
|
12
|
-
/** The request of the page being rendered, on the server; none in the browser. */
|
|
13
6
|
function pageRequest() {
|
|
14
7
|
return import.meta.server ? useRequestEvent() : void 0;
|
|
15
8
|
}
|
|
16
|
-
/**
|
|
17
|
-
* An entry, with its Comark document; `data` is null while it loads, `error` a 404 when it is not
|
|
18
|
-
* published. A visitor who opened the admin's "Preview on the site" link has the token in the
|
|
19
|
-
* `hollware_preview` cookie (the server exchanged it for the link's `?hollware-preview=`), and the
|
|
20
|
-
* `/_hollware/entry` route reads the latest revision of that entry instead: a draft too. The page
|
|
21
|
-
* then answers `no-store`; a token that does not hold (expired, of another entry) is an error,
|
|
22
|
-
* never the published version, and when Hollware says it expired or is invalid the response
|
|
23
|
-
* clears the cookie.
|
|
24
|
-
*/
|
|
25
9
|
function useHollwareEntry(collection, locale, slug) {
|
|
26
10
|
const path = computed(() => `/_hollware/entry/${encodeURIComponent(toValue(collection))}/${encodeURIComponent(toValue(locale))}/${encodeURIComponent(toValue(slug))}`);
|
|
27
11
|
const event = pageRequest();
|
|
@@ -36,7 +20,6 @@ function useHollwareEntry(collection, locale, slug) {
|
|
|
36
20
|
}
|
|
37
21
|
});
|
|
38
22
|
}
|
|
39
|
-
/** A page of the published entries of a collection, newest first. */
|
|
40
23
|
function useHollwareEntries(collection, options = {}, fetching = {}) {
|
|
41
24
|
const path = computed(() => `/_hollware/entries/${encodeURIComponent(toValue(collection))}`);
|
|
42
25
|
const event = pageRequest();
|
|
@@ -49,7 +32,6 @@ function useHollwareEntries(collection, options = {}, fetching = {}) {
|
|
|
49
32
|
}
|
|
50
33
|
});
|
|
51
34
|
}
|
|
52
|
-
/** The entries of a translation group, one per locale. */
|
|
53
35
|
function useHollwareTranslations(collection, group) {
|
|
54
36
|
const path = computed(() => `/_hollware/translations/${encodeURIComponent(toValue(collection))}/${encodeURIComponent(toValue(group))}`);
|
|
55
37
|
const event = pageRequest();
|
|
@@ -58,7 +40,6 @@ function useHollwareTranslations(collection, group) {
|
|
|
58
40
|
return answer;
|
|
59
41
|
} });
|
|
60
42
|
}
|
|
61
|
-
/** The site: its locales, its collections and their schemas. */
|
|
62
43
|
function useHollwareSite() {
|
|
63
44
|
const event = pageRequest();
|
|
64
45
|
return useFetch("/_hollware/site", { transform: (answer) => {
|
|
@@ -1,16 +1,7 @@
|
|
|
1
1
|
import { H3Event } from "h3";
|
|
2
2
|
//#region src/runtime/server/answer.d.ts
|
|
3
|
-
/**
|
|
4
|
-
* Hollware's answer as the site's own: a `not_found` outcome is a 404, a refusal of the read API
|
|
5
|
-
* keeps its status, and the rest is the answer. Pages revalidate it: it is published content, and
|
|
6
|
-
* a publication purges nothing on the site's side.
|
|
7
|
-
*/
|
|
8
3
|
export declare function answer<Value extends {
|
|
9
4
|
outcome: string;
|
|
10
5
|
}>(event: H3Event, read: () => Promise<Value>): Promise<Value>;
|
|
11
|
-
/**
|
|
12
|
-
* An entry for a page: its verdict, its revision and its last publication stay on the server, as
|
|
13
|
-
* the page sends what it read to the browser in its payload.
|
|
14
|
-
*/
|
|
15
6
|
export declare function forPage(entry: unknown): Record<string, unknown> | undefined;
|
|
16
7
|
//#endregion
|
|
@@ -1,11 +1,6 @@
|
|
|
1
|
-
import { createError, setResponseHeader } from "h3";
|
|
2
1
|
import { HollwareClientError } from "@hollware/client";
|
|
2
|
+
import { createError, setResponseHeader } from "h3";
|
|
3
3
|
//#region src/runtime/server/answer.ts
|
|
4
|
-
/**
|
|
5
|
-
* Hollware's answer as the site's own: a `not_found` outcome is a 404, a refusal of the read API
|
|
6
|
-
* keeps its status, and the rest is the answer. Pages revalidate it: it is published content, and
|
|
7
|
-
* a publication purges nothing on the site's side.
|
|
8
|
-
*/
|
|
9
4
|
async function answer(event, read) {
|
|
10
5
|
let value;
|
|
11
6
|
try {
|
|
@@ -24,7 +19,6 @@ async function answer(event, read) {
|
|
|
24
19
|
setResponseHeader(event, "cache-control", "no-cache");
|
|
25
20
|
return value;
|
|
26
21
|
}
|
|
27
|
-
/** The fields of an entry that a page shows: what a reader sees, and not how it was checked. */
|
|
28
22
|
const PUBLIC_FIELDS = [
|
|
29
23
|
"id",
|
|
30
24
|
"collection",
|
|
@@ -35,12 +29,9 @@ const PUBLIC_FIELDS = [
|
|
|
35
29
|
"tags",
|
|
36
30
|
"publishedAt",
|
|
37
31
|
"updatedAt",
|
|
38
|
-
"document"
|
|
32
|
+
"document",
|
|
33
|
+
"images"
|
|
39
34
|
];
|
|
40
|
-
/**
|
|
41
|
-
* An entry for a page: its verdict, its revision and its last publication stay on the server, as
|
|
42
|
-
* the page sends what it read to the browser in its payload.
|
|
43
|
-
*/
|
|
44
35
|
function forPage(entry) {
|
|
45
36
|
if (typeof entry !== "object" || entry === null) return void 0;
|
|
46
37
|
return Object.fromEntries(PUBLIC_FIELDS.filter((field) => field in entry).map((field) => [field, Reflect.get(entry, field)]));
|
|
@@ -1,10 +1,4 @@
|
|
|
1
1
|
//#region src/runtime/server/cache.d.ts
|
|
2
|
-
/**
|
|
3
|
-
* The cache of `hollware.cache: 'purge'` (S8): a response that read Hollware and answered 200 is
|
|
4
|
-
* kept by Cloudflare's Workers Cache, which serves it again without running the Worker, tagged with
|
|
5
|
-
* what it showed, until an event of Hollware purges one of its tags (`/_hollware/webhook`). The
|
|
6
|
-
* browser keeps nothing: only the edge does (`cloudflare-cdn-cache-control`). A preview is never kept.
|
|
7
|
-
*/
|
|
8
2
|
declare const _default: import("nitropack").NitroAppPlugin;
|
|
9
3
|
//#endregion
|
|
10
4
|
export { _default as default };
|
|
@@ -2,12 +2,6 @@ import { edgeHeaders, tagsOf } from "../tags.mjs";
|
|
|
2
2
|
import { previewTokenFromCookie } from "@hollware/client";
|
|
3
3
|
import { defineNitroPlugin } from "nitropack/runtime";
|
|
4
4
|
//#region src/runtime/server/cache.ts
|
|
5
|
-
/**
|
|
6
|
-
* The cache of `hollware.cache: 'purge'` (S8): a response that read Hollware and answered 200 is
|
|
7
|
-
* kept by Cloudflare's Workers Cache, which serves it again without running the Worker, tagged with
|
|
8
|
-
* what it showed, until an event of Hollware purges one of its tags (`/_hollware/webhook`). The
|
|
9
|
-
* browser keeps nothing: only the edge does (`cloudflare-cdn-cache-control`). A preview is never kept.
|
|
10
|
-
*/
|
|
11
5
|
var cache_default = defineNitroPlugin((nitroApp) => {
|
|
12
6
|
nitroApp.hooks.hook("beforeResponse", (event) => {
|
|
13
7
|
if (previewTokenFromCookie(event.node.req.headers.cookie) !== void 0) return;
|
|
@@ -1,11 +1,4 @@
|
|
|
1
1
|
//#region src/runtime/server/preview-exchange.d.ts
|
|
2
|
-
/**
|
|
3
|
-
* The link of the admin's "Preview on the site" (`?hollware-preview=<token>`) is exchanged for a
|
|
4
|
-
* cookie, so the token is in a URL once: a `303` to the same URL without the parameter, with the
|
|
5
|
-
* token in `hollware_preview` (HttpOnly, SameSite=Lax, an hour, Secure but on http://localhost and
|
|
6
|
-
* http://127.0.0.1), `no-store` and `Referrer-Policy: no-referrer`. The token is not checked here:
|
|
7
|
-
* Hollware does, when the page reads. A value not shaped like a token sets no cookie.
|
|
8
|
-
*/
|
|
9
2
|
declare const _default: import("h3").EventHandler<import("h3").EventHandlerRequest, Promise<void> | undefined>;
|
|
10
3
|
//#endregion
|
|
11
4
|
export { _default as default };
|
|
@@ -1,14 +1,7 @@
|
|
|
1
1
|
import { requestUrl } from "./url.mjs";
|
|
2
|
-
import { defineEventHandler, sendRedirect, setResponseHeader } from "h3";
|
|
3
2
|
import { exchangeHeaders, exchangePreviewLink } from "@hollware/client";
|
|
3
|
+
import { defineEventHandler, sendRedirect, setResponseHeader } from "h3";
|
|
4
4
|
//#region src/runtime/server/preview-exchange.ts
|
|
5
|
-
/**
|
|
6
|
-
* The link of the admin's "Preview on the site" (`?hollware-preview=<token>`) is exchanged for a
|
|
7
|
-
* cookie, so the token is in a URL once: a `303` to the same URL without the parameter, with the
|
|
8
|
-
* token in `hollware_preview` (HttpOnly, SameSite=Lax, an hour, Secure but on http://localhost and
|
|
9
|
-
* http://127.0.0.1), `no-store` and `Referrer-Policy: no-referrer`. The token is not checked here:
|
|
10
|
-
* Hollware does, when the page reads. A value not shaped like a token sets no cookie.
|
|
11
|
-
*/
|
|
12
5
|
var preview_exchange_default = defineEventHandler((event) => {
|
|
13
6
|
if (event.method !== "GET" && event.method !== "HEAD") return;
|
|
14
7
|
const url = requestUrl(event);
|
|
@@ -1,12 +1,4 @@
|
|
|
1
1
|
//#region src/runtime/server/preview.d.ts
|
|
2
|
-
/**
|
|
3
|
-
* A request that carries a preview token (the `hollware_preview` cookie, see `preview-exchange`)
|
|
4
|
-
* reads the latest revision of an entry, and nothing may keep what it answers: the response is
|
|
5
|
-
* `no-store` and has no cache tag, so neither the browser nor Workers Cache keeps it, and the
|
|
6
|
-
* request gets a header of its own for Nitro's cache (`hollware.cache: <seconds>`) to vary on, so
|
|
7
|
-
* it neither reads nor fills the entry that every other request of the path shares. Any request
|
|
8
|
-
* without a token has no such header, whatever it sent.
|
|
9
|
-
*/
|
|
10
2
|
declare const _default: import("nitropack").NitroAppPlugin;
|
|
11
3
|
//#endregion
|
|
12
4
|
export { _default as default };
|
|
@@ -1,21 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { removeResponseHeader, setResponseHeader } from "h3";
|
|
1
|
+
import { markPreviewRequest } from "../tags.mjs";
|
|
3
2
|
import { previewTokenFromCookie } from "@hollware/client";
|
|
3
|
+
import { removeResponseHeader, setResponseHeader } from "h3";
|
|
4
4
|
import { defineNitroPlugin } from "nitropack/runtime";
|
|
5
5
|
//#region src/runtime/server/preview.ts
|
|
6
|
-
/**
|
|
7
|
-
* A request that carries a preview token (the `hollware_preview` cookie, see `preview-exchange`)
|
|
8
|
-
* reads the latest revision of an entry, and nothing may keep what it answers: the response is
|
|
9
|
-
* `no-store` and has no cache tag, so neither the browser nor Workers Cache keeps it, and the
|
|
10
|
-
* request gets a header of its own for Nitro's cache (`hollware.cache: <seconds>`) to vary on, so
|
|
11
|
-
* it neither reads nor fills the entry that every other request of the path shares. Any request
|
|
12
|
-
* without a token has no such header, whatever it sent.
|
|
13
|
-
*/
|
|
14
6
|
var preview_default = defineNitroPlugin((nitroApp) => {
|
|
15
7
|
nitroApp.hooks.hook("request", (event) => {
|
|
16
|
-
|
|
17
|
-
if (previewTokenFromCookie(headers.cookie) === void 0) delete headers[PREVIEW_HEADER];
|
|
18
|
-
else headers[PREVIEW_HEADER] = crypto.randomUUID();
|
|
8
|
+
markPreviewRequest(event.node.req.headers);
|
|
19
9
|
});
|
|
20
10
|
nitroApp.hooks.hook("beforeResponse", (event) => {
|
|
21
11
|
if (previewTokenFromCookie(event.node.req.headers.cookie) === void 0) return;
|
|
@@ -1,11 +1,6 @@
|
|
|
1
|
-
import { H3Event } from "h3";
|
|
2
1
|
import { HollwareReader } from "@hollware/client";
|
|
2
|
+
import { H3Event } from "h3";
|
|
3
3
|
//#region src/runtime/server/reader.d.ts
|
|
4
|
-
/**
|
|
5
|
-
* The site's reader of Hollware for a request: the service binding when the Worker has it, else
|
|
6
|
-
* HTTP with the URL and the read token of the config. A site with neither gets a 500 that says
|
|
7
|
-
* which to set.
|
|
8
|
-
*/
|
|
9
4
|
export declare function useHollware(event: H3Event): {
|
|
10
5
|
site: string;
|
|
11
6
|
reader: HollwareReader;
|
|
@@ -1,16 +1,11 @@
|
|
|
1
1
|
import { entryTags, groupTags, listTags, recordTags, siteTags } from "../tags.mjs";
|
|
2
|
-
import { createError } from "h3";
|
|
3
2
|
import { createClient } from "@hollware/client";
|
|
3
|
+
import { createError } from "h3";
|
|
4
4
|
import { useRuntimeConfig } from "nitropack/runtime";
|
|
5
5
|
//#region src/runtime/server/reader.ts
|
|
6
6
|
function isReader(value) {
|
|
7
7
|
return typeof value === "object" && value !== null && "getEntry" in value;
|
|
8
8
|
}
|
|
9
|
-
/**
|
|
10
|
-
* The site's reader of Hollware for a request: the service binding when the Worker has it, else
|
|
11
|
-
* HTTP with the URL and the read token of the config. A site with neither gets a 500 that says
|
|
12
|
-
* which to set.
|
|
13
|
-
*/
|
|
14
9
|
function useHollware(event) {
|
|
15
10
|
const config = useRuntimeConfig(event)["hollware"];
|
|
16
11
|
const env = event.context["cloudflare"]?.env;
|
|
@@ -31,10 +26,6 @@ function useHollware(event) {
|
|
|
31
26
|
statusMessage: `Hollware: the Worker has no binding ${config.binding}, and hollware.url with a read token (NUXT_HOLLWARE_TOKEN) is not set.`
|
|
32
27
|
});
|
|
33
28
|
}
|
|
34
|
-
/**
|
|
35
|
-
* The reader, recording on the request the cache tags of what each read answered (S8): a route of
|
|
36
|
-
* the site's own that reads through `useHollware` is tagged with no work of its own.
|
|
37
|
-
*/
|
|
38
29
|
function tagging(event, reader) {
|
|
39
30
|
return {
|
|
40
31
|
...reader,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { answer, forPage } from "../answer.mjs";
|
|
2
2
|
import { requestUrl } from "../url.mjs";
|
|
3
3
|
import { useHollware } from "../reader.mjs";
|
|
4
|
-
import { appendResponseHeader, createError, defineEventHandler, getHeader, getRouterParam } from "h3";
|
|
5
4
|
import { clearedPreviewCookie, isPreviewRefusal, isSecureRequest, previewTokenFromCookie } from "@hollware/client";
|
|
5
|
+
import { appendResponseHeader, createError, defineEventHandler, getHeader, getRouterParam } from "h3";
|
|
6
6
|
//#region src/runtime/server/routes/entry.ts
|
|
7
7
|
var entry_default = defineEventHandler(async (event) => {
|
|
8
8
|
const { site, reader } = useHollware(event);
|
|
@@ -14,6 +14,7 @@ declare const _default: import("h3").EventHandler<import("h3").EventHandlerReque
|
|
|
14
14
|
translationGroupField: string | null;
|
|
15
15
|
tagsField: string | null;
|
|
16
16
|
sortByField: string | null;
|
|
17
|
+
automaticFields?: Record<string, "firstPublished" | "lastModified" | "readingTime" | "wordCount"> | undefined;
|
|
17
18
|
components: {
|
|
18
19
|
name: string;
|
|
19
20
|
description: string | null;
|
|
@@ -24,6 +24,11 @@ var webhook_default = defineEventHandler(async (event) => {
|
|
|
24
24
|
statusMessage: "The signature of the event does not hold"
|
|
25
25
|
});
|
|
26
26
|
const payload = JSON.parse(body);
|
|
27
|
+
const site = String(Reflect.get(Reflect.get(config, "hollware") ?? {}, "site") ?? "");
|
|
28
|
+
if ((typeof payload === "object" && payload !== null ? Reflect.get(payload, "site") : void 0) !== site) throw createError({
|
|
29
|
+
statusCode: 401,
|
|
30
|
+
statusMessage: "The event is of another site"
|
|
31
|
+
});
|
|
27
32
|
const found = typeof payload === "object" && payload !== null ? Reflect.get(payload, "cacheTags") : void 0;
|
|
28
33
|
const tags = Array.isArray(found) ? found.filter((tag) => typeof tag === "string") : [];
|
|
29
34
|
const cache = cacheOf(event.context);
|
|
@@ -1,8 +1,4 @@
|
|
|
1
1
|
import { H3Event } from "h3";
|
|
2
2
|
//#region src/runtime/server/url.d.ts
|
|
3
|
-
/**
|
|
4
|
-
* The URL the visitor asked for. On Workers it is the one of the Request itself, whose scheme and
|
|
5
|
-
* host are the real ones; elsewhere h3 builds it from the `Host` header.
|
|
6
|
-
*/
|
|
7
3
|
export declare function requestUrl(event: H3Event): URL;
|
|
8
4
|
//#endregion
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
import { getRequestURL } from "h3";
|
|
2
2
|
//#region src/runtime/server/url.ts
|
|
3
|
-
/**
|
|
4
|
-
* The URL the visitor asked for. On Workers it is the one of the Request itself, whose scheme and
|
|
5
|
-
* host are the real ones; elsewhere h3 builds it from the `Host` header.
|
|
6
|
-
*/
|
|
7
3
|
function requestUrl(event) {
|
|
8
4
|
const request = event.context["cloudflare"]?.request;
|
|
9
5
|
const url = typeof request === "object" && request !== null ? Reflect.get(request, "url") : void 0;
|
package/dist/runtime/tags.d.mts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
//#region src/runtime/tags.d.ts
|
|
2
|
-
/** What a request holds of its own, whether Nuxt's or h3's: its context. */
|
|
3
2
|
interface Tagged {
|
|
4
3
|
readonly context: Record<string, unknown>;
|
|
5
4
|
}
|
|
@@ -8,26 +7,13 @@ export declare function tagsOf(event: Tagged): string[];
|
|
|
8
7
|
interface Entryish {
|
|
9
8
|
readonly id?: unknown;
|
|
10
9
|
}
|
|
11
|
-
/** The tags of an entry read alone. */
|
|
12
10
|
export declare function entryTags(entry: Entryish | undefined): string[];
|
|
13
|
-
/** The tags of a list: the list itself, in its locale or every one, and each entry it shows. */
|
|
14
11
|
export declare function listTags(collection: string, locale: string | undefined, entries: readonly Entryish[]): string[];
|
|
15
|
-
/** The tags of the translations of a group. */
|
|
16
12
|
export declare function groupTags(collection: string, group: string, entries: readonly Entryish[]): string[];
|
|
17
13
|
export declare function siteTags(): string[];
|
|
18
|
-
/** How long the edge keeps a page no event purges: a year, the most it keeps anything. */
|
|
19
14
|
export declare const EDGE_SECONDS = 31536000;
|
|
20
|
-
/**
|
|
21
|
-
* The headers that let the edge keep a response, tagged with what it showed: only a GET that
|
|
22
|
-
* answered 200 and read Hollware. An error, a redirect or a write is never kept, nor a response
|
|
23
|
-
* that read nothing to purge it by. The browser keeps nothing; only the edge does.
|
|
24
|
-
*/
|
|
25
15
|
export declare function edgeHeaders(tags: readonly string[], status: number, method: string): Readonly<Record<string, string>> | null;
|
|
26
|
-
/**
|
|
27
|
-
* A request header that only the preview plugin sets, and that Nitro's cache (`cache: <seconds>`)
|
|
28
|
-
* varies on: a preview gets a fresh value each time, so it never reads or fills the entry that
|
|
29
|
-
* every other request of the same path shares.
|
|
30
|
-
*/
|
|
31
16
|
export declare const PREVIEW_HEADER = "x-hollware-preview";
|
|
17
|
+
export declare function markPreviewRequest(headers: Record<string, string | string[] | undefined>): void;
|
|
32
18
|
//#endregion
|
|
33
19
|
export {};
|
package/dist/runtime/tags.mjs
CHANGED
|
@@ -1,11 +1,6 @@
|
|
|
1
|
+
import { previewTokenFromCookie } from "@hollware/client";
|
|
1
2
|
import { EVERY_LOCALE, SITE_TAG, entryTag, groupTag, listTag } from "@hollware/core";
|
|
2
3
|
//#region src/runtime/tags.ts
|
|
3
|
-
/**
|
|
4
|
-
* The cache tags of a response (S8): what it showed of Hollware, in the names of the contract of
|
|
5
|
-
* `@hollware/core`, gathered on its request as each read answers, and written as `Cache-Tag` once
|
|
6
|
-
* it is rendered. A page gathers the tags of every read it made; a route of `/_hollware/` those of
|
|
7
|
-
* its own.
|
|
8
|
-
*/
|
|
9
4
|
const KEY = "hollwareTags";
|
|
10
5
|
function recordTags(event, tags) {
|
|
11
6
|
if (event === void 0 || tags.length === 0) return;
|
|
@@ -21,28 +16,19 @@ function tagsOf(event) {
|
|
|
21
16
|
function idsOf(entries) {
|
|
22
17
|
return entries.flatMap((entry) => typeof entry.id === "string" ? [entryTag(entry.id)] : []);
|
|
23
18
|
}
|
|
24
|
-
/** The tags of an entry read alone. */
|
|
25
19
|
function entryTags(entry) {
|
|
26
20
|
return entry === void 0 ? [] : idsOf([entry]);
|
|
27
21
|
}
|
|
28
|
-
/** The tags of a list: the list itself, in its locale or every one, and each entry it shows. */
|
|
29
22
|
function listTags(collection, locale, entries) {
|
|
30
23
|
return [listTag(collection, locale ?? EVERY_LOCALE), ...idsOf(entries)];
|
|
31
24
|
}
|
|
32
|
-
/** The tags of the translations of a group. */
|
|
33
25
|
function groupTags(collection, group, entries) {
|
|
34
26
|
return [groupTag(collection, group), ...idsOf(entries)];
|
|
35
27
|
}
|
|
36
28
|
function siteTags() {
|
|
37
29
|
return [SITE_TAG];
|
|
38
30
|
}
|
|
39
|
-
/** How long the edge keeps a page no event purges: a year, the most it keeps anything. */
|
|
40
31
|
const EDGE_SECONDS = 31536e3;
|
|
41
|
-
/**
|
|
42
|
-
* The headers that let the edge keep a response, tagged with what it showed: only a GET that
|
|
43
|
-
* answered 200 and read Hollware. An error, a redirect or a write is never kept, nor a response
|
|
44
|
-
* that read nothing to purge it by. The browser keeps nothing; only the edge does.
|
|
45
|
-
*/
|
|
46
32
|
function edgeHeaders(tags, status, method) {
|
|
47
33
|
if (tags.length === 0 || status !== 200 || method !== "GET") return null;
|
|
48
34
|
return {
|
|
@@ -51,11 +37,11 @@ function edgeHeaders(tags, status, method) {
|
|
|
51
37
|
"cloudflare-cdn-cache-control": `max-age=${EDGE_SECONDS}`
|
|
52
38
|
};
|
|
53
39
|
}
|
|
54
|
-
/**
|
|
55
|
-
* A request header that only the preview plugin sets, and that Nitro's cache (`cache: <seconds>`)
|
|
56
|
-
* varies on: a preview gets a fresh value each time, so it never reads or fills the entry that
|
|
57
|
-
* every other request of the same path shares.
|
|
58
|
-
*/
|
|
59
40
|
const PREVIEW_HEADER = "x-hollware-preview";
|
|
41
|
+
function markPreviewRequest(headers) {
|
|
42
|
+
const cookie = headers["cookie"];
|
|
43
|
+
if (previewTokenFromCookie(typeof cookie === "string" ? cookie : void 0) === void 0) delete headers[PREVIEW_HEADER];
|
|
44
|
+
else headers[PREVIEW_HEADER] = crypto.randomUUID();
|
|
45
|
+
}
|
|
60
46
|
//#endregion
|
|
61
|
-
export { EDGE_SECONDS, PREVIEW_HEADER, edgeHeaders, entryTags, groupTags, listTags, recordTags, siteTags, tagsOf };
|
|
47
|
+
export { EDGE_SECONDS, PREVIEW_HEADER, edgeHeaders, entryTags, groupTags, listTags, markPreviewRequest, recordTags, siteTags, tagsOf };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hollware/nuxt",
|
|
3
|
-
"version": "1.0.0-rc.
|
|
3
|
+
"version": "1.0.0-rc.10",
|
|
4
4
|
"description": "Read Hollware from a Nuxt site, over a service binding or HTTP.",
|
|
5
5
|
"homepage": "https://hollware.com",
|
|
6
6
|
"bugs": {
|
|
@@ -28,19 +28,19 @@
|
|
|
28
28
|
"provenance": true
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@comark/vue": "0.
|
|
32
|
-
"@hollware/client": "1.0.0-rc.
|
|
33
|
-
"@hollware/core": "1.0.0-rc.
|
|
34
|
-
"@nuxt/kit": "4.6.
|
|
31
|
+
"@comark/vue": "0.8.1",
|
|
32
|
+
"@hollware/client": "1.0.0-rc.10",
|
|
33
|
+
"@hollware/core": "1.0.0-rc.10",
|
|
34
|
+
"@nuxt/kit": "4.6.2"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@types/node": "24.19.2",
|
|
38
38
|
"h3": "1.15.11",
|
|
39
39
|
"nitropack": "2.13.4",
|
|
40
|
-
"nuxt": "4.6.
|
|
40
|
+
"nuxt": "4.6.2",
|
|
41
41
|
"publint": "0.3.25",
|
|
42
42
|
"typescript": "7.0.2",
|
|
43
|
-
"vite-plus": "1.
|
|
43
|
+
"vite-plus": "1.3.0",
|
|
44
44
|
"vue": "3.5.44"
|
|
45
45
|
},
|
|
46
46
|
"peerDependencies": {
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { sendView } from "./beacon.mjs";
|
|
2
|
-
import { defineNuxtPlugin, useRouter, useRuntimeConfig } from "nuxt/app";
|
|
3
|
-
//#region src/runtime/beacon.client.ts
|
|
4
|
-
var beacon_client_default = defineNuxtPlugin((nuxtApp) => {
|
|
5
|
-
const config = useRuntimeConfig().public["hollware"];
|
|
6
|
-
if (typeof config !== "object" || config === null) return;
|
|
7
|
-
const site = "site" in config && typeof config.site === "string" ? config.site : "";
|
|
8
|
-
const beacon = "beacon" in config && typeof config.beacon === "string" ? config.beacon : "";
|
|
9
|
-
if (site === "" || beacon === "") return;
|
|
10
|
-
const router = useRouter();
|
|
11
|
-
nuxtApp.hook("page:finish", () => {
|
|
12
|
-
sendView((url, init) => fetch(url, init), beacon, site, router.currentRoute.value.path);
|
|
13
|
-
});
|
|
14
|
-
});
|
|
15
|
-
//#endregion
|
|
16
|
-
export { beacon_client_default as default };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
//#region src/runtime/beacon.d.ts
|
|
2
|
-
/**
|
|
3
|
-
* What a page sends to count a view (ADR-031): the site and the path, nothing else. It goes with
|
|
4
|
-
* `fetch` and not `navigator.sendBeacon`, so that it can leave cookies out: `credentials: 'omit'`.
|
|
5
|
-
* `keepalive` lets it finish when the page is left; `no-cors` with a text body needs no preflight,
|
|
6
|
-
* and the page never reads the answer.
|
|
7
|
-
*/
|
|
8
|
-
export declare function sendView(send: (url: string, init: RequestInit) => Promise<unknown>, hollwareUrl: string, site: string, path: string): void;
|
|
9
|
-
//#endregion
|
package/dist/runtime/beacon.mjs
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
//#region src/runtime/beacon.ts
|
|
2
|
-
/**
|
|
3
|
-
* What a page sends to count a view (ADR-031): the site and the path, nothing else. It goes with
|
|
4
|
-
* `fetch` and not `navigator.sendBeacon`, so that it can leave cookies out: `credentials: 'omit'`.
|
|
5
|
-
* `keepalive` lets it finish when the page is left; `no-cors` with a text body needs no preflight,
|
|
6
|
-
* and the page never reads the answer.
|
|
7
|
-
*/
|
|
8
|
-
function sendView(send, hollwareUrl, site, path) {
|
|
9
|
-
send(`${hollwareUrl.replace(/\/+$/, "")}/events`, {
|
|
10
|
-
method: "POST",
|
|
11
|
-
body: JSON.stringify({
|
|
12
|
-
site,
|
|
13
|
-
path
|
|
14
|
-
}),
|
|
15
|
-
headers: { "content-type": "text/plain;charset=UTF-8" },
|
|
16
|
-
credentials: "omit",
|
|
17
|
-
keepalive: true,
|
|
18
|
-
mode: "no-cors"
|
|
19
|
-
}).catch(() => {});
|
|
20
|
-
}
|
|
21
|
-
//#endregion
|
|
22
|
-
export { sendView };
|