@flyo/nitro-astro 1.4.4 → 2.0.0
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/cdn.ts +15 -10
- package/components/BlockSlot.astro +6 -9
- package/components/BlockSlot.ts +2 -2
- package/components/FallbackComponent.astro +15 -6
- package/components/FallbackComponent.ts +2 -2
- package/components/FlyoNitroBlock.astro +11 -14
- package/components/FlyoNitroBlock.ts +1 -1
- package/components/FlyoNitroPage.astro +5 -9
- package/components/FlyoNitroPage.ts +1 -1
- package/components/MetaInfo.astro +30 -19
- package/components/MetaInfo.ts +1 -1
- package/components/MetaInfoEntity.astro +11 -7
- package/components/MetaInfoEntity.ts +1 -1
- package/components/MetaInfoPage.astro +10 -7
- package/components/MetaInfoPage.ts +1 -1
- package/dist/nitro-astro.js +44 -5
- package/dist/nitro-astro.mjs +494 -466
- package/middleware.ts +45 -0
- package/module.d.ts +5 -3
- package/package.json +35 -26
- package/sitemap.ts +11 -10
- package/README.md +0 -167
- package/dist/cdn.d.ts +0 -6
- package/dist/components/BlockSlot.d.ts +0 -2
- package/dist/components/FallbackComponent.d.ts +0 -2
- package/dist/components/FlyoNitroBlock.d.ts +0 -2
- package/dist/components/FlyoNitroPage.d.ts +0 -2
- package/dist/components/MetaInfo.d.ts +0 -2
- package/dist/components/MetaInfoEntity.d.ts +0 -2
- package/dist/components/MetaInfoPage.d.ts +0 -2
- package/dist/index.d.ts +0 -19
- package/dist/sitemap.d.ts +0 -1
package/dist/nitro-astro.mjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
const
|
|
2
|
-
class
|
|
3
|
-
constructor(
|
|
4
|
-
this.configuration =
|
|
1
|
+
const x = "https://api.flyo.cloud/nitro/v1".replace(/\/+$/, "");
|
|
2
|
+
class S {
|
|
3
|
+
constructor(n = {}) {
|
|
4
|
+
this.configuration = n;
|
|
5
5
|
}
|
|
6
|
-
set config(
|
|
7
|
-
this.configuration =
|
|
6
|
+
set config(n) {
|
|
7
|
+
this.configuration = n;
|
|
8
8
|
}
|
|
9
9
|
get basePath() {
|
|
10
|
-
return this.configuration.basePath != null ? this.configuration.basePath :
|
|
10
|
+
return this.configuration.basePath != null ? this.configuration.basePath : x;
|
|
11
11
|
}
|
|
12
12
|
get fetchApi() {
|
|
13
13
|
return this.configuration.fetchApi;
|
|
@@ -16,7 +16,7 @@ class P {
|
|
|
16
16
|
return this.configuration.middleware || [];
|
|
17
17
|
}
|
|
18
18
|
get queryParamsStringify() {
|
|
19
|
-
return this.configuration.queryParamsStringify ||
|
|
19
|
+
return this.configuration.queryParamsStringify || q;
|
|
20
20
|
}
|
|
21
21
|
get username() {
|
|
22
22
|
return this.configuration.username;
|
|
@@ -25,14 +25,14 @@ class P {
|
|
|
25
25
|
return this.configuration.password;
|
|
26
26
|
}
|
|
27
27
|
get apiKey() {
|
|
28
|
-
const
|
|
29
|
-
if (
|
|
30
|
-
return typeof
|
|
28
|
+
const n = this.configuration.apiKey;
|
|
29
|
+
if (n)
|
|
30
|
+
return typeof n == "function" ? n : () => n;
|
|
31
31
|
}
|
|
32
32
|
get accessToken() {
|
|
33
|
-
const
|
|
34
|
-
if (
|
|
35
|
-
return typeof
|
|
33
|
+
const n = this.configuration.accessToken;
|
|
34
|
+
if (n)
|
|
35
|
+
return typeof n == "function" ? n : async () => n;
|
|
36
36
|
}
|
|
37
37
|
get headers() {
|
|
38
38
|
return this.configuration.headers;
|
|
@@ -41,51 +41,51 @@ class P {
|
|
|
41
41
|
return this.configuration.credentials;
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
|
-
const
|
|
45
|
-
constructor(
|
|
46
|
-
this.configuration =
|
|
47
|
-
let
|
|
48
|
-
for (const
|
|
49
|
-
|
|
44
|
+
const U = new S(), C = class E {
|
|
45
|
+
constructor(n = U) {
|
|
46
|
+
this.configuration = n, this.fetchApi = async (t, i) => {
|
|
47
|
+
let r = { url: t, init: i };
|
|
48
|
+
for (const a of this.middleware)
|
|
49
|
+
a.pre && (r = await a.pre({
|
|
50
50
|
fetch: this.fetchApi,
|
|
51
|
-
...
|
|
52
|
-
}) ||
|
|
53
|
-
let
|
|
51
|
+
...r
|
|
52
|
+
}) || r);
|
|
53
|
+
let o;
|
|
54
54
|
try {
|
|
55
|
-
|
|
56
|
-
} catch (
|
|
57
|
-
for (const
|
|
58
|
-
|
|
55
|
+
o = await (this.configuration.fetchApi || fetch)(r.url, r.init);
|
|
56
|
+
} catch (a) {
|
|
57
|
+
for (const l of this.middleware)
|
|
58
|
+
l.onError && (o = await l.onError({
|
|
59
59
|
fetch: this.fetchApi,
|
|
60
|
-
url:
|
|
61
|
-
init:
|
|
62
|
-
error:
|
|
63
|
-
response:
|
|
64
|
-
}) ||
|
|
65
|
-
if (
|
|
66
|
-
throw
|
|
60
|
+
url: r.url,
|
|
61
|
+
init: r.init,
|
|
62
|
+
error: a,
|
|
63
|
+
response: o ? o.clone() : void 0
|
|
64
|
+
}) || o);
|
|
65
|
+
if (o === void 0)
|
|
66
|
+
throw a instanceof Error ? new P(a, "The request failed and the interceptors did not return an alternative response") : a;
|
|
67
67
|
}
|
|
68
|
-
for (const
|
|
69
|
-
|
|
68
|
+
for (const a of this.middleware)
|
|
69
|
+
a.post && (o = await a.post({
|
|
70
70
|
fetch: this.fetchApi,
|
|
71
|
-
url:
|
|
72
|
-
init:
|
|
73
|
-
response:
|
|
74
|
-
}) ||
|
|
75
|
-
return
|
|
76
|
-
}, this.middleware =
|
|
71
|
+
url: r.url,
|
|
72
|
+
init: r.init,
|
|
73
|
+
response: o.clone()
|
|
74
|
+
}) || o);
|
|
75
|
+
return o;
|
|
76
|
+
}, this.middleware = n.middleware;
|
|
77
77
|
}
|
|
78
|
-
withMiddleware(...
|
|
79
|
-
const
|
|
80
|
-
return
|
|
78
|
+
withMiddleware(...n) {
|
|
79
|
+
const t = this.clone();
|
|
80
|
+
return t.middleware = t.middleware.concat(...n), t;
|
|
81
81
|
}
|
|
82
|
-
withPreMiddleware(...
|
|
83
|
-
const
|
|
84
|
-
return this.withMiddleware(...
|
|
82
|
+
withPreMiddleware(...n) {
|
|
83
|
+
const t = n.map((i) => ({ pre: i }));
|
|
84
|
+
return this.withMiddleware(...t);
|
|
85
85
|
}
|
|
86
|
-
withPostMiddleware(...
|
|
87
|
-
const
|
|
88
|
-
return this.withMiddleware(...
|
|
86
|
+
withPostMiddleware(...n) {
|
|
87
|
+
const t = n.map((i) => ({ post: i }));
|
|
88
|
+
return this.withMiddleware(...t);
|
|
89
89
|
}
|
|
90
90
|
/**
|
|
91
91
|
* Check if the given MIME is a JSON MIME.
|
|
@@ -97,647 +97,666 @@ const L = new P(), C = class k {
|
|
|
97
97
|
* @param mime - MIME (Multipurpose Internet Mail Extensions)
|
|
98
98
|
* @return True if the given MIME is JSON, false otherwise.
|
|
99
99
|
*/
|
|
100
|
-
isJsonMime(
|
|
101
|
-
return
|
|
102
|
-
}
|
|
103
|
-
async request(
|
|
104
|
-
const { url:
|
|
105
|
-
if (
|
|
106
|
-
return
|
|
107
|
-
throw new
|
|
108
|
-
}
|
|
109
|
-
async createFetchParams(
|
|
110
|
-
let
|
|
111
|
-
|
|
112
|
-
const
|
|
113
|
-
Object.keys(
|
|
114
|
-
const
|
|
115
|
-
method:
|
|
116
|
-
headers:
|
|
117
|
-
body:
|
|
100
|
+
isJsonMime(n) {
|
|
101
|
+
return n ? E.jsonRegex.test(n) : !1;
|
|
102
|
+
}
|
|
103
|
+
async request(n, t) {
|
|
104
|
+
const { url: i, init: r } = await this.createFetchParams(n, t), o = await this.fetchApi(i, r);
|
|
105
|
+
if (o && o.status >= 200 && o.status < 300)
|
|
106
|
+
return o;
|
|
107
|
+
throw new F(o, "Response returned an error code");
|
|
108
|
+
}
|
|
109
|
+
async createFetchParams(n, t) {
|
|
110
|
+
let i = this.configuration.basePath + n.path;
|
|
111
|
+
n.query !== void 0 && Object.keys(n.query).length !== 0 && (i += "?" + this.configuration.queryParamsStringify(n.query));
|
|
112
|
+
const r = Object.assign({}, this.configuration.headers, n.headers);
|
|
113
|
+
Object.keys(r).forEach((p) => r[p] === void 0 ? delete r[p] : {});
|
|
114
|
+
const o = typeof t == "function" ? t : async () => t, a = {
|
|
115
|
+
method: n.method,
|
|
116
|
+
headers: r,
|
|
117
|
+
body: n.body,
|
|
118
118
|
credentials: this.configuration.credentials
|
|
119
|
-
},
|
|
120
|
-
...
|
|
121
|
-
...await
|
|
122
|
-
init:
|
|
123
|
-
context:
|
|
119
|
+
}, l = {
|
|
120
|
+
...a,
|
|
121
|
+
...await o({
|
|
122
|
+
init: a,
|
|
123
|
+
context: n
|
|
124
124
|
})
|
|
125
125
|
};
|
|
126
|
-
let
|
|
127
|
-
|
|
128
|
-
const
|
|
129
|
-
...
|
|
130
|
-
body:
|
|
126
|
+
let s;
|
|
127
|
+
L(l.body) || l.body instanceof URLSearchParams || j(l.body) ? s = l.body : this.isJsonMime(r["Content-Type"]) ? s = JSON.stringify(l.body) : s = l.body;
|
|
128
|
+
const u = {
|
|
129
|
+
...l,
|
|
130
|
+
body: s
|
|
131
131
|
};
|
|
132
|
-
return { url:
|
|
132
|
+
return { url: i, init: u };
|
|
133
133
|
}
|
|
134
134
|
/**
|
|
135
135
|
* Create a shallow clone of `this` by constructing a new instance
|
|
136
136
|
* and then shallow cloning data members.
|
|
137
137
|
*/
|
|
138
138
|
clone() {
|
|
139
|
-
const
|
|
140
|
-
return
|
|
139
|
+
const n = this.constructor, t = new n(this.configuration);
|
|
140
|
+
return t.middleware = this.middleware.slice(), t;
|
|
141
141
|
}
|
|
142
142
|
};
|
|
143
143
|
C.jsonRegex = new RegExp("^(:?application/json|[^;/ ]+/[^;/ ]+[+]json)[ ]*(:?;.*)?$", "i");
|
|
144
|
-
let
|
|
145
|
-
function
|
|
144
|
+
let d = C;
|
|
145
|
+
function j(e) {
|
|
146
146
|
return typeof Blob < "u" && e instanceof Blob;
|
|
147
147
|
}
|
|
148
|
-
function
|
|
148
|
+
function L(e) {
|
|
149
149
|
return typeof FormData < "u" && e instanceof FormData;
|
|
150
150
|
}
|
|
151
|
-
class
|
|
152
|
-
constructor(
|
|
153
|
-
super(
|
|
151
|
+
class F extends Error {
|
|
152
|
+
constructor(n, t) {
|
|
153
|
+
super(t), this.response = n, this.name = "ResponseError";
|
|
154
154
|
}
|
|
155
155
|
}
|
|
156
|
-
class
|
|
157
|
-
constructor(
|
|
158
|
-
super(
|
|
156
|
+
class P extends Error {
|
|
157
|
+
constructor(n, t) {
|
|
158
|
+
super(t), this.cause = n, this.name = "FetchError";
|
|
159
159
|
}
|
|
160
160
|
}
|
|
161
|
-
class
|
|
162
|
-
constructor(
|
|
163
|
-
super(
|
|
161
|
+
class g extends Error {
|
|
162
|
+
constructor(n, t) {
|
|
163
|
+
super(t), this.field = n, this.name = "RequiredError";
|
|
164
164
|
}
|
|
165
165
|
}
|
|
166
|
-
function
|
|
167
|
-
return e[t]
|
|
168
|
-
}
|
|
169
|
-
function A(e, t = "") {
|
|
170
|
-
return Object.keys(e).map((i) => I(i, e[i], t)).filter((i) => i.length > 0).join("&");
|
|
166
|
+
function q(e, n = "") {
|
|
167
|
+
return Object.keys(e).map((t) => R(t, e[t], n)).filter((t) => t.length > 0).join("&");
|
|
171
168
|
}
|
|
172
|
-
function
|
|
173
|
-
const
|
|
174
|
-
if (
|
|
175
|
-
const
|
|
176
|
-
return `${encodeURIComponent(
|
|
169
|
+
function R(e, n, t = "") {
|
|
170
|
+
const i = t + (t.length ? `[${e}]` : e);
|
|
171
|
+
if (n instanceof Array) {
|
|
172
|
+
const r = n.map((o) => encodeURIComponent(String(o))).join(`&${encodeURIComponent(i)}=`);
|
|
173
|
+
return `${encodeURIComponent(i)}=${r}`;
|
|
177
174
|
}
|
|
178
|
-
if (
|
|
179
|
-
const
|
|
180
|
-
return
|
|
175
|
+
if (n instanceof Set) {
|
|
176
|
+
const r = Array.from(n);
|
|
177
|
+
return R(e, r, t);
|
|
181
178
|
}
|
|
182
|
-
return
|
|
179
|
+
return n instanceof Date ? `${encodeURIComponent(i)}=${encodeURIComponent(n.toISOString())}` : n instanceof Object ? q(n, i) : `${encodeURIComponent(i)}=${encodeURIComponent(String(n))}`;
|
|
183
180
|
}
|
|
184
|
-
function
|
|
181
|
+
function y(e, n) {
|
|
185
182
|
return Object.keys(e).reduce(
|
|
186
|
-
(
|
|
183
|
+
(t, i) => ({ ...t, [i]: n(e[i]) }),
|
|
187
184
|
{}
|
|
188
185
|
);
|
|
189
186
|
}
|
|
190
|
-
class
|
|
191
|
-
constructor(
|
|
192
|
-
this.raw =
|
|
187
|
+
class c {
|
|
188
|
+
constructor(n, t = (i) => i) {
|
|
189
|
+
this.raw = n, this.transformer = t;
|
|
193
190
|
}
|
|
194
191
|
async value() {
|
|
195
192
|
return this.transformer(await this.raw.json());
|
|
196
193
|
}
|
|
197
194
|
}
|
|
198
|
-
function
|
|
199
|
-
return
|
|
195
|
+
function K(e) {
|
|
196
|
+
return N(e);
|
|
200
197
|
}
|
|
201
|
-
function
|
|
198
|
+
function N(e, n) {
|
|
202
199
|
return e == null ? e : {
|
|
203
|
-
identifier:
|
|
204
|
-
content:
|
|
200
|
+
identifier: e.identifier == null ? void 0 : e.identifier,
|
|
201
|
+
content: e.content == null ? void 0 : e.content.map(A)
|
|
205
202
|
};
|
|
206
203
|
}
|
|
207
|
-
function
|
|
208
|
-
return
|
|
204
|
+
function A(e) {
|
|
205
|
+
return $(e);
|
|
209
206
|
}
|
|
210
|
-
function
|
|
207
|
+
function $(e, n) {
|
|
211
208
|
return e == null ? e : {
|
|
212
|
-
items:
|
|
213
|
-
content:
|
|
214
|
-
config:
|
|
215
|
-
identifier:
|
|
216
|
-
uid:
|
|
217
|
-
component:
|
|
218
|
-
slots:
|
|
209
|
+
items: e.items == null ? void 0 : e.items,
|
|
210
|
+
content: e.content == null ? void 0 : e.content,
|
|
211
|
+
config: e.config == null ? void 0 : e.config,
|
|
212
|
+
identifier: e.identifier == null ? void 0 : e.identifier,
|
|
213
|
+
uid: e.uid == null ? void 0 : e.uid,
|
|
214
|
+
component: e.component == null ? void 0 : e.component,
|
|
215
|
+
slots: e.slots == null ? void 0 : y(e.slots, K)
|
|
219
216
|
};
|
|
220
217
|
}
|
|
221
|
-
function
|
|
222
|
-
return
|
|
218
|
+
function I(e) {
|
|
219
|
+
return B(e);
|
|
223
220
|
}
|
|
224
|
-
function
|
|
221
|
+
function B(e, n) {
|
|
225
222
|
return e == null ? e : {
|
|
226
|
-
type:
|
|
227
|
-
target:
|
|
228
|
-
label:
|
|
229
|
-
href:
|
|
230
|
-
slug:
|
|
231
|
-
properties:
|
|
232
|
-
children:
|
|
223
|
+
type: e.type == null ? void 0 : e.type,
|
|
224
|
+
target: e.target == null ? void 0 : e.target,
|
|
225
|
+
label: e.label == null ? void 0 : e.label,
|
|
226
|
+
href: e.href == null ? void 0 : e.href,
|
|
227
|
+
slug: e.slug == null ? void 0 : e.slug,
|
|
228
|
+
properties: e.properties == null ? void 0 : e.properties,
|
|
229
|
+
children: e.children == null ? void 0 : e.children.map(I)
|
|
233
230
|
};
|
|
234
231
|
}
|
|
235
|
-
function
|
|
236
|
-
return
|
|
232
|
+
function M(e) {
|
|
233
|
+
return O(e);
|
|
237
234
|
}
|
|
238
|
-
function
|
|
235
|
+
function O(e, n) {
|
|
239
236
|
return e == null ? e : {
|
|
240
|
-
items:
|
|
241
|
-
uid:
|
|
242
|
-
identifier:
|
|
243
|
-
label:
|
|
237
|
+
items: e.items == null ? void 0 : e.items.map(I),
|
|
238
|
+
uid: e.uid == null ? void 0 : e.uid,
|
|
239
|
+
identifier: e.identifier == null ? void 0 : e.identifier,
|
|
240
|
+
label: e.label == null ? void 0 : e.label
|
|
244
241
|
};
|
|
245
242
|
}
|
|
246
|
-
function
|
|
247
|
-
return
|
|
243
|
+
function D(e) {
|
|
244
|
+
return G(e);
|
|
248
245
|
}
|
|
249
|
-
function
|
|
246
|
+
function G(e, n) {
|
|
250
247
|
return e == null ? e : {
|
|
251
|
-
domain:
|
|
252
|
-
slug:
|
|
253
|
-
version:
|
|
254
|
-
updated_at:
|
|
255
|
-
language:
|
|
248
|
+
domain: e.domain == null ? void 0 : e.domain,
|
|
249
|
+
slug: e.slug == null ? void 0 : e.slug,
|
|
250
|
+
version: e.version == null ? void 0 : e.version,
|
|
251
|
+
updated_at: e.updated_at == null ? void 0 : e.updated_at,
|
|
252
|
+
language: e.language == null ? void 0 : e.language,
|
|
253
|
+
primary_language: e.primary_language == null ? void 0 : e.primary_language
|
|
256
254
|
};
|
|
257
255
|
}
|
|
258
|
-
function
|
|
259
|
-
return
|
|
256
|
+
function H(e) {
|
|
257
|
+
return V(e);
|
|
260
258
|
}
|
|
261
|
-
function
|
|
259
|
+
function V(e, n) {
|
|
262
260
|
return e == null ? e : {
|
|
263
|
-
nitro:
|
|
264
|
-
pages:
|
|
265
|
-
containers:
|
|
266
|
-
globals:
|
|
261
|
+
nitro: e.nitro == null ? void 0 : D(e.nitro),
|
|
262
|
+
pages: e.pages == null ? void 0 : e.pages,
|
|
263
|
+
containers: e.containers == null ? void 0 : y(e.containers, M),
|
|
264
|
+
globals: e.globals == null ? void 0 : e.globals
|
|
267
265
|
};
|
|
268
266
|
}
|
|
269
|
-
function
|
|
270
|
-
return
|
|
267
|
+
function z(e) {
|
|
268
|
+
return J(e);
|
|
271
269
|
}
|
|
272
|
-
function
|
|
270
|
+
function J(e, n) {
|
|
273
271
|
return e == null ? e : {
|
|
274
|
-
api:
|
|
275
|
-
image:
|
|
272
|
+
api: e.api == null ? void 0 : e.api,
|
|
273
|
+
image: e.image == null ? void 0 : e.image
|
|
276
274
|
};
|
|
277
275
|
}
|
|
278
|
-
function
|
|
279
|
-
return
|
|
276
|
+
function W(e) {
|
|
277
|
+
return Q(e);
|
|
280
278
|
}
|
|
281
|
-
function
|
|
279
|
+
function Q(e, n) {
|
|
282
280
|
return e == null ? e : {
|
|
283
|
-
_version:
|
|
284
|
-
entity_metric:
|
|
285
|
-
entity_unique_id:
|
|
286
|
-
entity_id:
|
|
287
|
-
entity_image:
|
|
288
|
-
entity_slug:
|
|
289
|
-
entity_teaser:
|
|
290
|
-
entity_time_end:
|
|
291
|
-
entity_time_start:
|
|
292
|
-
entity_title:
|
|
293
|
-
entity_type:
|
|
294
|
-
entity_type_id:
|
|
295
|
-
updated_at:
|
|
296
|
-
routes:
|
|
281
|
+
_version: e._version == null ? void 0 : e._version,
|
|
282
|
+
entity_metric: e.entity_metric == null ? void 0 : z(e.entity_metric),
|
|
283
|
+
entity_unique_id: e.entity_unique_id == null ? void 0 : e.entity_unique_id,
|
|
284
|
+
entity_id: e.entity_id == null ? void 0 : e.entity_id,
|
|
285
|
+
entity_image: e.entity_image == null ? void 0 : e.entity_image,
|
|
286
|
+
entity_slug: e.entity_slug == null ? void 0 : e.entity_slug,
|
|
287
|
+
entity_teaser: e.entity_teaser == null ? void 0 : e.entity_teaser,
|
|
288
|
+
entity_time_end: e.entity_time_end == null ? void 0 : e.entity_time_end,
|
|
289
|
+
entity_time_start: e.entity_time_start == null ? void 0 : e.entity_time_start,
|
|
290
|
+
entity_title: e.entity_title == null ? void 0 : e.entity_title,
|
|
291
|
+
entity_type: e.entity_type == null ? void 0 : e.entity_type,
|
|
292
|
+
entity_type_id: e.entity_type_id == null ? void 0 : e.entity_type_id,
|
|
293
|
+
updated_at: e.updated_at == null ? void 0 : e.updated_at,
|
|
294
|
+
routes: e.routes == null ? void 0 : e.routes
|
|
297
295
|
};
|
|
298
296
|
}
|
|
299
|
-
function
|
|
300
|
-
return
|
|
297
|
+
function v(e) {
|
|
298
|
+
return Y(e);
|
|
301
299
|
}
|
|
302
|
-
function
|
|
300
|
+
function Y(e, n) {
|
|
303
301
|
return e == null ? e : {
|
|
304
|
-
entity:
|
|
305
|
-
model:
|
|
306
|
-
language:
|
|
307
|
-
jsonld:
|
|
302
|
+
entity: e.entity == null ? void 0 : W(e.entity),
|
|
303
|
+
model: e.model == null ? void 0 : e.model,
|
|
304
|
+
language: e.language == null ? void 0 : e.language,
|
|
305
|
+
jsonld: e.jsonld == null ? void 0 : e.jsonld
|
|
308
306
|
};
|
|
309
307
|
}
|
|
310
|
-
function
|
|
311
|
-
return
|
|
308
|
+
function k(e) {
|
|
309
|
+
return Z(e);
|
|
312
310
|
}
|
|
313
|
-
function
|
|
311
|
+
function Z(e, n) {
|
|
314
312
|
return e == null ? e : {
|
|
315
|
-
entity_unique_id:
|
|
316
|
-
entity_title:
|
|
317
|
-
entity_teaser:
|
|
318
|
-
entity_slug:
|
|
319
|
-
entity_time_start:
|
|
320
|
-
entity_type:
|
|
321
|
-
entity_type_id:
|
|
322
|
-
entity_image:
|
|
323
|
-
routes:
|
|
313
|
+
entity_unique_id: e.entity_unique_id == null ? void 0 : e.entity_unique_id,
|
|
314
|
+
entity_title: e.entity_title == null ? void 0 : e.entity_title,
|
|
315
|
+
entity_teaser: e.entity_teaser == null ? void 0 : e.entity_teaser,
|
|
316
|
+
entity_slug: e.entity_slug == null ? void 0 : e.entity_slug,
|
|
317
|
+
entity_time_start: e.entity_time_start == null ? void 0 : e.entity_time_start,
|
|
318
|
+
entity_type: e.entity_type == null ? void 0 : e.entity_type,
|
|
319
|
+
entity_type_id: e.entity_type_id == null ? void 0 : e.entity_type_id,
|
|
320
|
+
entity_image: e.entity_image == null ? void 0 : e.entity_image,
|
|
321
|
+
routes: e.routes == null ? void 0 : e.routes
|
|
324
322
|
};
|
|
325
323
|
}
|
|
326
|
-
function
|
|
327
|
-
return
|
|
324
|
+
function X(e) {
|
|
325
|
+
return ee(e);
|
|
328
326
|
}
|
|
329
|
-
function
|
|
327
|
+
function ee(e, n) {
|
|
330
328
|
return e == null ? e : {
|
|
331
|
-
description:
|
|
332
|
-
image:
|
|
333
|
-
title:
|
|
329
|
+
description: e.description == null ? void 0 : e.description,
|
|
330
|
+
image: e.image == null ? void 0 : e.image,
|
|
331
|
+
title: e.title == null ? void 0 : e.title
|
|
334
332
|
};
|
|
335
333
|
}
|
|
336
|
-
function
|
|
337
|
-
return
|
|
334
|
+
function ne(e) {
|
|
335
|
+
return te(e);
|
|
338
336
|
}
|
|
339
|
-
function
|
|
337
|
+
function te(e, n) {
|
|
340
338
|
return e == null ? e : {
|
|
341
|
-
slug:
|
|
342
|
-
title:
|
|
339
|
+
slug: e.slug == null ? void 0 : e.slug,
|
|
340
|
+
title: e.title == null ? void 0 : e.title
|
|
343
341
|
};
|
|
344
342
|
}
|
|
345
|
-
function
|
|
346
|
-
return
|
|
343
|
+
function ie(e) {
|
|
344
|
+
return oe(e);
|
|
347
345
|
}
|
|
348
|
-
function
|
|
346
|
+
function oe(e, n) {
|
|
349
347
|
return e == null ? e : {
|
|
350
|
-
value:
|
|
351
|
-
navigation:
|
|
352
|
-
propagate:
|
|
348
|
+
value: e.value == null ? void 0 : e.value,
|
|
349
|
+
navigation: e.navigation == null ? void 0 : e.navigation,
|
|
350
|
+
propagate: e.propagate == null ? void 0 : e.propagate
|
|
353
351
|
};
|
|
354
352
|
}
|
|
355
|
-
function
|
|
356
|
-
return
|
|
353
|
+
function m(e) {
|
|
354
|
+
return re(e);
|
|
357
355
|
}
|
|
358
|
-
function
|
|
356
|
+
function re(e, n) {
|
|
359
357
|
return e == null ? e : {
|
|
360
|
-
id:
|
|
361
|
-
title:
|
|
362
|
-
href:
|
|
363
|
-
slug:
|
|
364
|
-
json:
|
|
365
|
-
depth:
|
|
366
|
-
is_home:
|
|
367
|
-
created_at:
|
|
368
|
-
updated_at:
|
|
369
|
-
is_visible:
|
|
370
|
-
meta_json:
|
|
371
|
-
properties:
|
|
372
|
-
uid:
|
|
373
|
-
type:
|
|
374
|
-
target:
|
|
375
|
-
container:
|
|
376
|
-
breadcrumb:
|
|
358
|
+
id: e.id == null ? void 0 : e.id,
|
|
359
|
+
title: e.title == null ? void 0 : e.title,
|
|
360
|
+
href: e.href == null ? void 0 : e.href,
|
|
361
|
+
slug: e.slug == null ? void 0 : e.slug,
|
|
362
|
+
json: e.json == null ? void 0 : e.json.map(A),
|
|
363
|
+
depth: e.depth == null ? void 0 : e.depth,
|
|
364
|
+
is_home: e.is_home == null ? void 0 : e.is_home,
|
|
365
|
+
created_at: e.created_at == null ? void 0 : e.created_at,
|
|
366
|
+
updated_at: e.updated_at == null ? void 0 : e.updated_at,
|
|
367
|
+
is_visible: e.is_visible == null ? void 0 : e.is_visible,
|
|
368
|
+
meta_json: e.meta_json == null ? void 0 : X(e.meta_json),
|
|
369
|
+
properties: e.properties == null ? void 0 : y(e.properties, ie),
|
|
370
|
+
uid: e.uid == null ? void 0 : e.uid,
|
|
371
|
+
type: e.type == null ? void 0 : e.type,
|
|
372
|
+
target: e.target == null ? void 0 : e.target,
|
|
373
|
+
container: e.container == null ? void 0 : e.container,
|
|
374
|
+
breadcrumb: e.breadcrumb == null ? void 0 : e.breadcrumb.map(ne)
|
|
377
375
|
};
|
|
378
376
|
}
|
|
379
|
-
function
|
|
377
|
+
function ae(e) {
|
|
380
378
|
return le(e);
|
|
381
379
|
}
|
|
382
|
-
function le(e,
|
|
380
|
+
function le(e, n) {
|
|
383
381
|
return e == null ? e : {
|
|
384
|
-
version:
|
|
385
|
-
updated_at:
|
|
382
|
+
version: e.version == null ? void 0 : e.version,
|
|
383
|
+
updated_at: e.updated_at == null ? void 0 : e.updated_at
|
|
386
384
|
};
|
|
387
385
|
}
|
|
388
|
-
class
|
|
386
|
+
class se extends d {
|
|
389
387
|
/**
|
|
390
388
|
* The config API endpoint provides comprehensive information required for configuring the layout of websites. It encompasses various essential elements, including containers with pages, an extensive list of available slugs, globals containing content pool data, and crucial details about the Nitro configuration itself. By accessing this endpoint, developers can gather all the necessary data to effectively design and structure their websites. The endpoint offers a holistic view of the website\'s layout, empowering developers to tailor the user experience and optimize the overall design.
|
|
391
389
|
* Get Config
|
|
392
390
|
*/
|
|
393
|
-
async configRaw(t) {
|
|
394
|
-
const i = {}
|
|
395
|
-
|
|
396
|
-
const
|
|
391
|
+
async configRaw(n, t) {
|
|
392
|
+
const i = {};
|
|
393
|
+
n.lang != null && (i.lang = n.lang);
|
|
394
|
+
const r = {};
|
|
395
|
+
this.configuration && this.configuration.apiKey && (i.token = await this.configuration.apiKey("token"));
|
|
396
|
+
const o = await this.request({
|
|
397
397
|
path: "/config",
|
|
398
398
|
method: "GET",
|
|
399
|
-
headers:
|
|
399
|
+
headers: r,
|
|
400
400
|
query: i
|
|
401
401
|
}, t);
|
|
402
|
-
return new
|
|
402
|
+
return new c(o, (a) => H(a));
|
|
403
403
|
}
|
|
404
404
|
/**
|
|
405
405
|
* The config API endpoint provides comprehensive information required for configuring the layout of websites. It encompasses various essential elements, including containers with pages, an extensive list of available slugs, globals containing content pool data, and crucial details about the Nitro configuration itself. By accessing this endpoint, developers can gather all the necessary data to effectively design and structure their websites. The endpoint offers a holistic view of the website\'s layout, empowering developers to tailor the user experience and optimize the overall design.
|
|
406
406
|
* Get Config
|
|
407
407
|
*/
|
|
408
|
-
async config(t) {
|
|
409
|
-
return await (await this.configRaw(t)).value();
|
|
408
|
+
async config(n = {}, t) {
|
|
409
|
+
return await (await this.configRaw(n, t)).value();
|
|
410
410
|
}
|
|
411
411
|
}
|
|
412
|
-
class
|
|
412
|
+
class ue extends d {
|
|
413
413
|
/**
|
|
414
|
-
*
|
|
415
|
-
* Find entity by slug and optional Type-ID
|
|
414
|
+
* The endpoint allows for the retrieval of entities based on their slug, with an optional Entity-Type-ID for more accurate results. The endpoint requires a `slug` parameter to be passed in the path, which is necessary for identifying the entity. However, since slugs are not unique across different entities, it is highly recommended to also provide the `typeId` parameter through the query to avoid incorrect or unintended results. This `typeId` serves as an Entity-Definition-Schema ID, ensuring a more precise and targeted entity retrieval by distinguishing the entities more clearly. The `slug` parameter is mandatory and should be a string (e.g., \'hello-world\'), while the `typeId` parameter is optional and should be an integer (e.g., 123), representing the Entity-Definition-Schema ID.
|
|
415
|
+
* Find entity by slug and optional Entity-Type-ID
|
|
416
416
|
*/
|
|
417
|
-
async entityBySlugRaw(
|
|
418
|
-
if (
|
|
419
|
-
throw new
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
417
|
+
async entityBySlugRaw(n, t) {
|
|
418
|
+
if (n.slug == null)
|
|
419
|
+
throw new g(
|
|
420
|
+
"slug",
|
|
421
|
+
'Required parameter "slug" was null or undefined when calling entityBySlug().'
|
|
422
|
+
);
|
|
423
|
+
const i = {};
|
|
424
|
+
n.lang != null && (i.lang = n.lang), n.typeId != null && (i.typeId = n.typeId);
|
|
425
|
+
const r = {};
|
|
426
|
+
this.configuration && this.configuration.apiKey && (i.token = await this.configuration.apiKey("token"));
|
|
427
|
+
const o = await this.request({
|
|
428
|
+
path: "/entities/slug/{slug}".replace("{slug}", encodeURIComponent(String(n.slug))),
|
|
426
429
|
method: "GET",
|
|
427
|
-
headers:
|
|
428
|
-
query:
|
|
429
|
-
},
|
|
430
|
-
return new
|
|
430
|
+
headers: r,
|
|
431
|
+
query: i
|
|
432
|
+
}, t);
|
|
433
|
+
return new c(o, (a) => v(a));
|
|
431
434
|
}
|
|
432
435
|
/**
|
|
433
|
-
*
|
|
434
|
-
* Find entity by slug and optional Type-ID
|
|
436
|
+
* The endpoint allows for the retrieval of entities based on their slug, with an optional Entity-Type-ID for more accurate results. The endpoint requires a `slug` parameter to be passed in the path, which is necessary for identifying the entity. However, since slugs are not unique across different entities, it is highly recommended to also provide the `typeId` parameter through the query to avoid incorrect or unintended results. This `typeId` serves as an Entity-Definition-Schema ID, ensuring a more precise and targeted entity retrieval by distinguishing the entities more clearly. The `slug` parameter is mandatory and should be a string (e.g., \'hello-world\'), while the `typeId` parameter is optional and should be an integer (e.g., 123), representing the Entity-Definition-Schema ID.
|
|
437
|
+
* Find entity by slug and optional Entity-Type-ID
|
|
435
438
|
*/
|
|
436
|
-
async entityBySlug(
|
|
437
|
-
return await (await this.entityBySlugRaw(
|
|
439
|
+
async entityBySlug(n, t) {
|
|
440
|
+
return await (await this.entityBySlugRaw(n, t)).value();
|
|
438
441
|
}
|
|
439
442
|
/**
|
|
440
443
|
* The endpoint provides comprehensive information about a specified entity. An entity represents a collection of information pertaining to a specific data type and is defined by a key-value pair. You can use various data types such as blogs, events, or any other relevant data. However, in order to access an entity, it must be properly configured within the nitro config.
|
|
441
444
|
* Find entity by uniqueid
|
|
442
445
|
*/
|
|
443
|
-
async entityByUniqueidRaw(
|
|
444
|
-
if (
|
|
445
|
-
throw new
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
446
|
+
async entityByUniqueidRaw(n, t) {
|
|
447
|
+
if (n.uniqueid == null)
|
|
448
|
+
throw new g(
|
|
449
|
+
"uniqueid",
|
|
450
|
+
'Required parameter "uniqueid" was null or undefined when calling entityByUniqueid().'
|
|
451
|
+
);
|
|
452
|
+
const i = {};
|
|
453
|
+
n.lang != null && (i.lang = n.lang);
|
|
454
|
+
const r = {};
|
|
455
|
+
this.configuration && this.configuration.apiKey && (i.token = await this.configuration.apiKey("token"));
|
|
456
|
+
const o = await this.request({
|
|
457
|
+
path: "/entities/uniqueid/{uniqueid}".replace("{uniqueid}", encodeURIComponent(String(n.uniqueid))),
|
|
450
458
|
method: "GET",
|
|
451
|
-
headers:
|
|
452
|
-
query:
|
|
453
|
-
},
|
|
454
|
-
return new
|
|
459
|
+
headers: r,
|
|
460
|
+
query: i
|
|
461
|
+
}, t);
|
|
462
|
+
return new c(o, (a) => v(a));
|
|
455
463
|
}
|
|
456
464
|
/**
|
|
457
465
|
* The endpoint provides comprehensive information about a specified entity. An entity represents a collection of information pertaining to a specific data type and is defined by a key-value pair. You can use various data types such as blogs, events, or any other relevant data. However, in order to access an entity, it must be properly configured within the nitro config.
|
|
458
466
|
* Find entity by uniqueid
|
|
459
467
|
*/
|
|
460
|
-
async entityByUniqueid(
|
|
461
|
-
return await (await this.entityByUniqueidRaw(
|
|
468
|
+
async entityByUniqueid(n, t) {
|
|
469
|
+
return await (await this.entityByUniqueidRaw(n, t)).value();
|
|
462
470
|
}
|
|
463
471
|
}
|
|
464
|
-
class
|
|
472
|
+
class ce extends d {
|
|
465
473
|
/**
|
|
466
474
|
* This endpoint allows you to retrieve the designated homepage of a website. Alternatively, you can utilize the pages endpoint by specifying an empty slug parameter to achieve the same result. By using either of these methods, you can effectively access the desired homepage of the website.
|
|
467
475
|
* Get Home
|
|
468
476
|
*/
|
|
469
|
-
async homeRaw(t) {
|
|
470
|
-
const i = {}
|
|
471
|
-
|
|
472
|
-
const
|
|
477
|
+
async homeRaw(n, t) {
|
|
478
|
+
const i = {};
|
|
479
|
+
n.lang != null && (i.lang = n.lang);
|
|
480
|
+
const r = {};
|
|
481
|
+
this.configuration && this.configuration.apiKey && (i.token = await this.configuration.apiKey("token"));
|
|
482
|
+
const o = await this.request({
|
|
473
483
|
path: "/pages/home",
|
|
474
484
|
method: "GET",
|
|
475
|
-
headers:
|
|
485
|
+
headers: r,
|
|
476
486
|
query: i
|
|
477
487
|
}, t);
|
|
478
|
-
return new
|
|
488
|
+
return new c(o, (a) => m(a));
|
|
479
489
|
}
|
|
480
490
|
/**
|
|
481
491
|
* This endpoint allows you to retrieve the designated homepage of a website. Alternatively, you can utilize the pages endpoint by specifying an empty slug parameter to achieve the same result. By using either of these methods, you can effectively access the desired homepage of the website.
|
|
482
492
|
* Get Home
|
|
483
493
|
*/
|
|
484
|
-
async home(t) {
|
|
485
|
-
return await (await this.homeRaw(t)).value();
|
|
494
|
+
async home(n = {}, t) {
|
|
495
|
+
return await (await this.homeRaw(n, t)).value();
|
|
486
496
|
}
|
|
487
497
|
/**
|
|
488
498
|
* This endpoint retrieves comprehensive information from a specified page using either a slug or a path. The slug refers to a unique identifier for the page, while the path is the slug with a leading slash. By providing either the slug or the path as input, the function will gather all the relevant details associated with the page.
|
|
489
499
|
* Get Page by slug
|
|
490
500
|
*/
|
|
491
|
-
async pageRaw(
|
|
492
|
-
const
|
|
493
|
-
|
|
494
|
-
const
|
|
495
|
-
this.configuration && this.configuration.apiKey && (
|
|
496
|
-
const
|
|
501
|
+
async pageRaw(n, t) {
|
|
502
|
+
const i = {};
|
|
503
|
+
n.lang != null && (i.lang = n.lang), n.slug != null && (i.slug = n.slug);
|
|
504
|
+
const r = {};
|
|
505
|
+
this.configuration && this.configuration.apiKey && (i.token = await this.configuration.apiKey("token"));
|
|
506
|
+
const o = await this.request({
|
|
497
507
|
path: "/pages",
|
|
498
508
|
method: "GET",
|
|
499
|
-
headers:
|
|
500
|
-
query:
|
|
501
|
-
},
|
|
502
|
-
return new
|
|
509
|
+
headers: r,
|
|
510
|
+
query: i
|
|
511
|
+
}, t);
|
|
512
|
+
return new c(o, (a) => m(a));
|
|
503
513
|
}
|
|
504
514
|
/**
|
|
505
515
|
* This endpoint retrieves comprehensive information from a specified page using either a slug or a path. The slug refers to a unique identifier for the page, while the path is the slug with a leading slash. By providing either the slug or the path as input, the function will gather all the relevant details associated with the page.
|
|
506
516
|
* Get Page by slug
|
|
507
517
|
*/
|
|
508
|
-
async page(
|
|
509
|
-
return await (await this.pageRaw(
|
|
518
|
+
async page(n = {}, t) {
|
|
519
|
+
return await (await this.pageRaw(n, t)).value();
|
|
510
520
|
}
|
|
511
521
|
}
|
|
512
|
-
class
|
|
522
|
+
class de extends d {
|
|
513
523
|
/**
|
|
514
524
|
* This endpoint offers a powerful capability to search through the websites sitemap, encompassing both pages and entities. With this endpoint, users can efficiently explore and retrieve information from your sitemap by creating a paginated search experience.
|
|
515
525
|
* Get Search by query
|
|
516
526
|
*/
|
|
517
|
-
async searchRaw(
|
|
518
|
-
if (
|
|
519
|
-
throw new
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
527
|
+
async searchRaw(n, t) {
|
|
528
|
+
if (n.query == null)
|
|
529
|
+
throw new g(
|
|
530
|
+
"query",
|
|
531
|
+
'Required parameter "query" was null or undefined when calling search().'
|
|
532
|
+
);
|
|
533
|
+
const i = {};
|
|
534
|
+
n.lang != null && (i.lang = n.lang), n.query != null && (i.query = n.query);
|
|
535
|
+
const r = {};
|
|
536
|
+
this.configuration && this.configuration.apiKey && (i.token = await this.configuration.apiKey("token"));
|
|
537
|
+
const o = await this.request({
|
|
525
538
|
path: "/search",
|
|
526
539
|
method: "GET",
|
|
527
|
-
headers:
|
|
528
|
-
query:
|
|
529
|
-
},
|
|
530
|
-
return new
|
|
540
|
+
headers: r,
|
|
541
|
+
query: i
|
|
542
|
+
}, t);
|
|
543
|
+
return new c(o, (a) => a.map(k));
|
|
531
544
|
}
|
|
532
545
|
/**
|
|
533
546
|
* This endpoint offers a powerful capability to search through the websites sitemap, encompassing both pages and entities. With this endpoint, users can efficiently explore and retrieve information from your sitemap by creating a paginated search experience.
|
|
534
547
|
* Get Search by query
|
|
535
548
|
*/
|
|
536
|
-
async search(
|
|
537
|
-
return await (await this.searchRaw(
|
|
549
|
+
async search(n, t) {
|
|
550
|
+
return await (await this.searchRaw(n, t)).value();
|
|
538
551
|
}
|
|
539
552
|
}
|
|
540
|
-
class
|
|
553
|
+
class fe extends d {
|
|
541
554
|
/**
|
|
542
555
|
* This endpoint provides comprehensive data for generating the sitemap. It encompasses all the necessary information, including pages from containers, as well as all entities that have been mapped.
|
|
543
556
|
* Get Sitemap
|
|
544
557
|
*/
|
|
545
|
-
async sitemapRaw(t) {
|
|
546
|
-
const i = {}
|
|
547
|
-
|
|
548
|
-
const
|
|
558
|
+
async sitemapRaw(n, t) {
|
|
559
|
+
const i = {};
|
|
560
|
+
n.lang != null && (i.lang = n.lang);
|
|
561
|
+
const r = {};
|
|
562
|
+
this.configuration && this.configuration.apiKey && (i.token = await this.configuration.apiKey("token"));
|
|
563
|
+
const o = await this.request({
|
|
549
564
|
path: "/sitemap",
|
|
550
565
|
method: "GET",
|
|
551
|
-
headers:
|
|
566
|
+
headers: r,
|
|
552
567
|
query: i
|
|
553
568
|
}, t);
|
|
554
|
-
return new
|
|
569
|
+
return new c(o, (a) => a.map(k));
|
|
555
570
|
}
|
|
556
571
|
/**
|
|
557
572
|
* This endpoint provides comprehensive data for generating the sitemap. It encompasses all the necessary information, including pages from containers, as well as all entities that have been mapped.
|
|
558
573
|
* Get Sitemap
|
|
559
574
|
*/
|
|
560
|
-
async sitemap(t) {
|
|
561
|
-
return await (await this.sitemapRaw(t)).value();
|
|
575
|
+
async sitemap(n = {}, t) {
|
|
576
|
+
return await (await this.sitemapRaw(n, t)).value();
|
|
562
577
|
}
|
|
563
578
|
}
|
|
564
|
-
class
|
|
579
|
+
class pe extends d {
|
|
565
580
|
/**
|
|
566
581
|
* The Version API endpoint offers a highly efficient solution for evaluating the current caching status of your application\'s caching mechanism. This functionality allows you to cache the entire application configuration and page responses indefinitely. However, utilizing this endpoint enables you to assess the validity of the cache by sending a request to determine its current status. This caching endpoint is specifically designed for optimal performance when compared to the configuration endpoint, which requires more thorough evaluation and encompasses a substantial response body.
|
|
567
582
|
* Get Version Information
|
|
568
583
|
*/
|
|
569
|
-
async versionRaw(t) {
|
|
570
|
-
const i = {}
|
|
571
|
-
|
|
572
|
-
const
|
|
584
|
+
async versionRaw(n, t) {
|
|
585
|
+
const i = {};
|
|
586
|
+
n.lang != null && (i.lang = n.lang);
|
|
587
|
+
const r = {};
|
|
588
|
+
this.configuration && this.configuration.apiKey && (i.token = await this.configuration.apiKey("token"));
|
|
589
|
+
const o = await this.request({
|
|
573
590
|
path: "/version",
|
|
574
591
|
method: "GET",
|
|
575
|
-
headers:
|
|
592
|
+
headers: r,
|
|
576
593
|
query: i
|
|
577
594
|
}, t);
|
|
578
|
-
return new
|
|
595
|
+
return new c(o, (a) => ae(a));
|
|
579
596
|
}
|
|
580
597
|
/**
|
|
581
598
|
* The Version API endpoint offers a highly efficient solution for evaluating the current caching status of your application\'s caching mechanism. This functionality allows you to cache the entire application configuration and page responses indefinitely. However, utilizing this endpoint enables you to assess the validity of the cache by sending a request to determine its current status. This caching endpoint is specifically designed for optimal performance when compared to the configuration endpoint, which requires more thorough evaluation and encompasses a substantial response body.
|
|
582
599
|
* Get Version Information
|
|
583
600
|
*/
|
|
584
|
-
async version(t) {
|
|
585
|
-
return await (await this.versionRaw(t)).value();
|
|
601
|
+
async version(n = {}, t) {
|
|
602
|
+
return await (await this.versionRaw(n, t)).value();
|
|
586
603
|
}
|
|
587
604
|
}
|
|
588
|
-
const
|
|
589
|
-
let
|
|
590
|
-
for (let
|
|
591
|
-
const
|
|
592
|
-
|
|
605
|
+
const ge = /[\p{Lu}]/u, ye = /[\p{Ll}]/u, w = /^[\p{Lu}](?![\p{Lu}])/gu, T = /([\p{Alpha}\p{N}_]|$)/u, h = /[_.\- ]+/, he = new RegExp("^" + h.source), _ = new RegExp(h.source + T.source, "gu"), b = new RegExp("\\d+" + T.source, "gu"), ve = (e, n, t, i) => {
|
|
606
|
+
let r = !1, o = !1, a = !1, l = !1;
|
|
607
|
+
for (let s = 0; s < e.length; s++) {
|
|
608
|
+
const u = e[s];
|
|
609
|
+
l = s > 2 ? e[s - 3] === "-" : !0, r && ge.test(u) ? (e = e.slice(0, s) + "-" + e.slice(s), r = !1, a = o, o = !0, s++) : o && a && ye.test(u) && (!l || i) ? (e = e.slice(0, s - 1) + "-" + e.slice(s - 1), a = o, o = !1, r = !0) : (r = n(u) === u && t(u) !== u, a = o, o = t(u) === u && n(u) !== u);
|
|
593
610
|
}
|
|
594
611
|
return e;
|
|
595
|
-
},
|
|
596
|
-
function
|
|
612
|
+
}, me = (e, n) => (w.lastIndex = 0, e.replace(w, (t) => n(t))), we = (e, n) => (_.lastIndex = 0, b.lastIndex = 0, e.replace(_, (t, i) => n(i)).replace(b, (t) => n(t)));
|
|
613
|
+
function _e(e, n) {
|
|
597
614
|
if (!(typeof e == "string" || Array.isArray(e)))
|
|
598
615
|
throw new TypeError("Expected the input to be `string | string[]`");
|
|
599
|
-
if (
|
|
616
|
+
if (n = {
|
|
600
617
|
pascalCase: !1,
|
|
601
618
|
preserveConsecutiveUppercase: !1,
|
|
602
|
-
...
|
|
603
|
-
}, Array.isArray(e) ? e = e.map((
|
|
619
|
+
...n
|
|
620
|
+
}, Array.isArray(e) ? e = e.map((o) => o.trim()).filter((o) => o.length).join("-") : e = e.trim(), e.length === 0)
|
|
604
621
|
return "";
|
|
605
|
-
const
|
|
606
|
-
return e.length === 1 ?
|
|
622
|
+
const t = n.locale === !1 ? (o) => o.toLowerCase() : (o) => o.toLocaleLowerCase(n.locale), i = n.locale === !1 ? (o) => o.toUpperCase() : (o) => o.toLocaleUpperCase(n.locale);
|
|
623
|
+
return e.length === 1 ? h.test(e) ? "" : n.pascalCase ? i(e) : t(e) : (e !== t(e) && (e = ve(e, t, i, n.preserveConsecutiveUppercase)), e = e.replace(he, ""), e = n.preserveConsecutiveUppercase ? me(e, t) : t(e), n.pascalCase && (e = i(e.charAt(0)) + e.slice(1)), we(e, i));
|
|
607
624
|
}
|
|
608
|
-
function
|
|
609
|
-
const
|
|
625
|
+
function be(e, n, t) {
|
|
626
|
+
const i = "virtual:flyo-components", r = "\0" + i;
|
|
610
627
|
return {
|
|
611
628
|
name: "vite-plugin-flyo-components",
|
|
612
|
-
async resolveId(
|
|
613
|
-
if (
|
|
614
|
-
return
|
|
629
|
+
async resolveId(o) {
|
|
630
|
+
if (o === i)
|
|
631
|
+
return r;
|
|
615
632
|
},
|
|
616
|
-
async load(
|
|
617
|
-
if (
|
|
618
|
-
const
|
|
619
|
-
for (const [
|
|
620
|
-
|
|
621
|
-
|
|
633
|
+
async load(o) {
|
|
634
|
+
if (o === r) {
|
|
635
|
+
const a = [];
|
|
636
|
+
for (const [s, u] of Object.entries(
|
|
637
|
+
n
|
|
638
|
+
)) {
|
|
639
|
+
const p = await this.resolve(
|
|
640
|
+
"/" + e + "/" + u + ".astro"
|
|
641
|
+
);
|
|
642
|
+
p && a.push(
|
|
643
|
+
`export { default as ${_e(s)} } from "${p.id}"`
|
|
622
644
|
);
|
|
623
|
-
h && s.push(`export { default as ${Ee(c)} } from "${h.id}"`);
|
|
624
645
|
}
|
|
625
|
-
let
|
|
626
|
-
return
|
|
627
|
-
"/" + e + "/" +
|
|
628
|
-
)),
|
|
646
|
+
let l = null;
|
|
647
|
+
return t && (l = await this.resolve(
|
|
648
|
+
"/" + e + "/" + t + ".astro"
|
|
649
|
+
)), l ? a.push(
|
|
650
|
+
`export { default as fallback } from "${l.id}"`
|
|
651
|
+
) : a.push(
|
|
652
|
+
'export { default as fallback } from "@flyo/nitro-astro/FallbackComponent.astro"'
|
|
653
|
+
), a.join(";");
|
|
629
654
|
}
|
|
630
655
|
}
|
|
631
656
|
};
|
|
632
657
|
}
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
})(), o.value;
|
|
638
|
-
},
|
|
639
|
-
l: t || 0,
|
|
640
|
-
lc: 0,
|
|
641
|
-
listen(a, r) {
|
|
642
|
-
return o.lc = i.push(a, r || o.l) / 2, () => {
|
|
643
|
-
let s = i.indexOf(a);
|
|
644
|
-
~s && (i.splice(s, 2), --o.lc || o.off());
|
|
645
|
-
};
|
|
646
|
-
},
|
|
647
|
-
notify(a, r) {
|
|
648
|
-
let s = !d.length;
|
|
649
|
-
for (let u = 0; u < i.length; u += 2)
|
|
650
|
-
d.push(
|
|
651
|
-
i[u],
|
|
652
|
-
i[u + 1],
|
|
653
|
-
o.value,
|
|
654
|
-
a,
|
|
655
|
-
r
|
|
656
|
-
);
|
|
657
|
-
if (s) {
|
|
658
|
-
for (let u = 0; u < d.length; u += 5) {
|
|
659
|
-
let c;
|
|
660
|
-
for (let l = u + 1; !c && (l += 5) < d.length; )
|
|
661
|
-
d[l] < d[u + 1] && (c = d.push(
|
|
662
|
-
d[u],
|
|
663
|
-
d[u + 1],
|
|
664
|
-
d[u + 2],
|
|
665
|
-
d[u + 3],
|
|
666
|
-
d[u + 4]
|
|
667
|
-
));
|
|
668
|
-
c || d[u](
|
|
669
|
-
d[u + 2],
|
|
670
|
-
d[u + 3],
|
|
671
|
-
d[u + 4]
|
|
672
|
-
);
|
|
673
|
-
}
|
|
674
|
-
d.length = 0;
|
|
675
|
-
}
|
|
676
|
-
},
|
|
677
|
-
/* It will be called on last listener unsubscribing.
|
|
678
|
-
We will redefine it in onMount and onStop. */
|
|
679
|
-
off() {
|
|
680
|
-
},
|
|
681
|
-
set(a) {
|
|
682
|
-
let r = o.value;
|
|
683
|
-
r !== a && (o.value = a, o.notify(r));
|
|
684
|
-
},
|
|
685
|
-
subscribe(a, r) {
|
|
686
|
-
let s = o.listen(a, r);
|
|
687
|
-
return a(o.value), s;
|
|
688
|
-
},
|
|
689
|
-
value: e
|
|
690
|
-
};
|
|
691
|
-
return process.env.NODE_ENV !== "production" && (o[Ce] = () => {
|
|
692
|
-
i = [], o.lc = 0, o.off();
|
|
693
|
-
}), o;
|
|
694
|
-
};
|
|
695
|
-
function y() {
|
|
696
|
-
return globalThis.flyoNitroInstance || console.error("The Flyo Typescript Configuration has not been initialized correctly"), globalThis.flyoNitroInstance;
|
|
658
|
+
function Ce() {
|
|
659
|
+
return globalThis.flyoNitroInstance || console.error(
|
|
660
|
+
"The Flyo Typescript Configuration has not been initialized correctly"
|
|
661
|
+
), globalThis.flyoNitroInstance;
|
|
697
662
|
}
|
|
698
|
-
function
|
|
699
|
-
return
|
|
663
|
+
function f() {
|
|
664
|
+
return Ce().config;
|
|
700
665
|
}
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
return g.get() || g.set(await Ae().config()), g.get();
|
|
666
|
+
async function qe(e) {
|
|
667
|
+
return await e.locals.config;
|
|
704
668
|
}
|
|
705
|
-
function
|
|
706
|
-
return new
|
|
669
|
+
function Re() {
|
|
670
|
+
return new se(f());
|
|
707
671
|
}
|
|
708
|
-
function
|
|
709
|
-
return new
|
|
672
|
+
function Ae() {
|
|
673
|
+
return new ue(f());
|
|
710
674
|
}
|
|
711
|
-
function
|
|
712
|
-
return new
|
|
675
|
+
function Ie() {
|
|
676
|
+
return new ce(f());
|
|
713
677
|
}
|
|
714
|
-
function
|
|
715
|
-
return new
|
|
678
|
+
function ke() {
|
|
679
|
+
return new de(f());
|
|
716
680
|
}
|
|
717
|
-
function
|
|
718
|
-
return new
|
|
681
|
+
function Te() {
|
|
682
|
+
return new fe(f());
|
|
719
683
|
}
|
|
720
|
-
function
|
|
684
|
+
function xe() {
|
|
685
|
+
return new pe(f());
|
|
686
|
+
}
|
|
687
|
+
function Se(e) {
|
|
721
688
|
return {
|
|
722
689
|
"data-flyo-block-uid": e.uid
|
|
723
690
|
};
|
|
724
691
|
}
|
|
725
|
-
|
|
726
|
-
|
|
692
|
+
const Ee = `
|
|
693
|
+
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 163.4 88.5">
|
|
694
|
+
<style type="text/css">
|
|
695
|
+
.st8{fill:#FFFFFF;}
|
|
696
|
+
</style>
|
|
697
|
+
<g id="Ebene_1">
|
|
698
|
+
<g>
|
|
699
|
+
<path class="st8" d="M49,56.7c-0.5-0.3-0.8-0.7-1.2-1.2c-0.4-0.5-0.6-1.2-0.7-1.8c-0.1-0.6-0.2-1.2-0.2-1.8V18.7
|
|
700
|
+
c0-5.2-1.6-9.4-4.8-12.6c-3.2-3.2-8.2-4.8-15-4.8c-6.1,0-10.9,1.5-14.3,4.6C9.4,8.9,7.7,13.3,7.7,19v6.4H1.5V35h6.1v32.1h11.9V35
|
|
701
|
+
h7.7v-9.6h-7.7c0-8.3,0.6-9.4,1.8-11.3c1.2-1.8,3.2-2.8,6.1-2.8c1.5,0,2.7,0.3,3.7,0.8c1,0.5,1.7,1.2,2.3,2.1
|
|
702
|
+
c0.6,0.9,0.9,1.9,1.2,3.1c0.2,1.2,0.3,2.4,0.3,3.7v36.8c0,1.4,0.3,2.6,0.8,3.8c0.5,1.2,1.3,2.2,2.3,3.2c1,0.9,2.1,1.6,3.5,2.1
|
|
703
|
+
c10.1,3,18.5-1.1,18.5-1.1l-4-10.1C52,58.4,49.6,57,49,56.7z"/>
|
|
704
|
+
<path class="st8" d="M146.3,34.6c-1.1-2.9-2.7-5.5-4.9-7.7c-2.1-2.2-4.7-4-7.7-5.3c-3-1.3-6.4-2-10.2-2c-3.8,0-7.2,0.7-10.2,2
|
|
705
|
+
c-3,1.3-5.6,3.1-7.7,5.3c-2.1,2.2-3.7,4.8-4.9,7.7c-1.1,2.9-1.7,6-1.7,9.3c0,3.2,0.6,6.3,1.7,9.2c1.1,2.9,2.7,5.5,4.9,7.7
|
|
706
|
+
c2.1,2.2,4.7,4,7.7,5.3c3,1.3,6.4,2,10.2,2c3.8,0,7.2-0.7,10.2-2c3-1.3,5.6-3.1,7.7-5.3c2.1-2.2,3.7-4.8,4.8-7.7
|
|
707
|
+
c1.1-2.9,1.7-6,1.7-9.2C148,40.6,147.4,37.5,146.3,34.6z M134.8,49.5c-0.6,1.7-1.5,3.2-2.6,4.5c-1.1,1.2-2.4,2.2-3.9,2.9
|
|
708
|
+
c-1.5,0.7-3.1,1-4.8,1c-1.7,0-3.3-0.3-4.8-1c-1.5-0.7-2.8-1.6-3.9-2.9c-1.1-1.2-2-2.7-2.6-4.4s-0.9-3.6-0.9-5.7
|
|
709
|
+
c0-2,0.3-3.9,0.9-5.6c0.6-1.7,1.5-3.2,2.6-4.5c1.1-1.2,2.4-2.2,3.9-2.9c1.5-0.7,3.1-1.1,4.8-1.1c1.7,0,3.3,0.3,4.8,1
|
|
710
|
+
c1.5,0.7,2.8,1.6,3.9,2.9c1.1,1.2,2,2.7,2.6,4.5c0.6,1.7,0.9,3.6,0.9,5.6C135.8,45.8,135.4,47.7,134.8,49.5z"/>
|
|
711
|
+
<path class="st8" d="M88.2,20.4L77,56.8L64.4,20.4H52.1l18.4,46.6c-0.1,0.9-0.2,1.7-0.4,2.6c-0.1,0.4-0.2,0.7-0.3,1.1c0,0,0,0,0,0
|
|
712
|
+
c-0.5,1.2-1,2.4-1.7,3.3c-0.1,0.1-0.1,0.2-0.2,0.3c0,0.1-0.1,0.1-0.2,0.2c-0.8,1-1.8,1.9-3,2.7c0.7,1.7,1.4,3.3,2.2,5.4l1.8,4.7
|
|
713
|
+
c0.3-0.1,0.6-0.3,0.9-0.4c0.3-0.2,0.6-0.3,0.9-0.4c0.2-0.1,0.4-0.2,0.5-0.3c1.3-0.7,2.3-1.4,3.4-2.3c0,0,0.1-0.1,0.1-0.1
|
|
714
|
+
c0.1-0.1,0.3-0.2,0.4-0.4c1.2-1.1,2.2-2.1,3-3.2c1.4-1.8,2.5-3.7,3.3-5.9c0.7-1.8,1.2-3.7,1.4-5.6c0-0.3,0.1-0.6,0.2-1l16.6-47.3
|
|
715
|
+
H88.2z"/>
|
|
716
|
+
<path class="st8" d="M161.3,62.6c-0.3-0.8-0.8-1.6-1.4-2.2c-0.6-0.6-1.3-1.1-2.2-1.5c-0.9-0.4-1.8-0.6-2.9-0.6
|
|
717
|
+
c-1.1,0-2.1,0.2-2.9,0.6c-0.9,0.4-1.6,0.9-2.2,1.5c-0.6,0.6-1.1,1.4-1.4,2.2c-0.3,0.8-0.5,1.7-0.5,2.6c0,0.9,0.2,1.8,0.5,2.6
|
|
718
|
+
c0.3,0.8,0.8,1.6,1.4,2.2c0.6,0.6,1.3,1.1,2.2,1.5c0.9,0.4,1.8,0.6,2.9,0.6c1.1,0,2.1-0.2,2.9-0.6c0.9-0.4,1.6-0.9,2.2-1.5
|
|
719
|
+
c0.6-0.6,1.1-1.4,1.4-2.2c0.3-0.8,0.5-1.7,0.5-2.6C161.7,64.3,161.6,63.4,161.3,62.6z"/>
|
|
720
|
+
</g>
|
|
721
|
+
</g>
|
|
722
|
+
</svg>
|
|
723
|
+
`;
|
|
724
|
+
function Ue(e) {
|
|
725
|
+
const n = {
|
|
727
726
|
accessToken: !1,
|
|
728
727
|
liveEdit: !1,
|
|
729
728
|
fallbackComponent: null,
|
|
730
729
|
componentsDir: "src/components/flyo",
|
|
730
|
+
serverCacheHeaderTtl: 1200,
|
|
731
|
+
// 20 minutes
|
|
732
|
+
clientCacheHeaderTtl: 900,
|
|
733
|
+
// 15 minutes
|
|
731
734
|
...e
|
|
732
735
|
};
|
|
733
|
-
return
|
|
736
|
+
return n.liveEdit === "true" ? n.liveEdit = !0 : n.liveEdit === "false" && (n.liveEdit = !1), {
|
|
734
737
|
name: "@flyo/nitro-astro",
|
|
735
738
|
hooks: {
|
|
736
|
-
"astro:config:setup": ({
|
|
739
|
+
"astro:config:setup": ({
|
|
740
|
+
injectScript: t,
|
|
741
|
+
updateConfig: i,
|
|
742
|
+
injectRoute: r,
|
|
743
|
+
addMiddleware: o,
|
|
744
|
+
addDevToolbarApp: a
|
|
745
|
+
}) => {
|
|
737
746
|
a({
|
|
747
|
+
id: "flyo-nitro",
|
|
748
|
+
name: "Flyo Nitro",
|
|
749
|
+
//icon: 'lightbulb',
|
|
750
|
+
icon: Ee,
|
|
751
|
+
//icon: '<svg width="200" height="200" viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"><ellipse cx="100" cy="60" rx="90" ry="50" fill="#F4A460" /><circle cx="70" cy="45" r="5" fill="white" /><circle cx="90" cy="30" r="5" fill="white" /><circle cx="110" cy="45" r="5" fill="white" /><circle cx="130" cy="30" r="5" fill="white" /><circle cx="150" cy="45" r="5" fill="white" /><path d="M30 90 Q60 75, 90 90 T150 90 Q160 80, 180 90" fill="#228B22" /><rect x="30" y="90" width="140" height="15" fill="#FF6347" /><rect x="30" y="105" width="140" height="15" fill="#FFD700" /><rect x="30" y="120" width="140" height="25" fill="#8B4513" /><ellipse cx="100" cy="160" rx="90" ry="30" fill="#F4A460" /></svg>',
|
|
752
|
+
entrypoint: "@flyo/nitro-astro/toolbar.ts"
|
|
753
|
+
}), r({
|
|
738
754
|
pattern: "sitemap.xml",
|
|
739
755
|
entrypoint: "@flyo/nitro-astro/sitemap.ts"
|
|
740
756
|
}), o({
|
|
757
|
+
entrypoint: "@flyo/nitro-astro/middleware.ts",
|
|
758
|
+
order: "post"
|
|
759
|
+
}), i({
|
|
741
760
|
image: {
|
|
742
761
|
service: {
|
|
743
762
|
entrypoint: "@flyo/nitro-astro/cdn.ts"
|
|
@@ -745,25 +764,33 @@ function Le(e) {
|
|
|
745
764
|
},
|
|
746
765
|
vite: {
|
|
747
766
|
plugins: [
|
|
748
|
-
|
|
767
|
+
be(
|
|
749
768
|
e.componentsDir,
|
|
750
|
-
e.components,
|
|
769
|
+
e.components || {},
|
|
751
770
|
e.fallbackComponent
|
|
752
771
|
)
|
|
753
772
|
]
|
|
754
773
|
}
|
|
755
|
-
}),
|
|
774
|
+
}), t(
|
|
756
775
|
"page-ssr",
|
|
757
776
|
`
|
|
758
777
|
import { Configuration } from '@flyo/nitro-typescript'
|
|
759
778
|
|
|
760
779
|
var defaultConfig = new Configuration({
|
|
761
|
-
apiKey: '${
|
|
780
|
+
apiKey: '${n.accessToken}'
|
|
762
781
|
})
|
|
763
782
|
|
|
764
|
-
globalThis.flyoNitroInstance =
|
|
783
|
+
globalThis.flyoNitroInstance = {
|
|
784
|
+
config: defaultConfig,
|
|
785
|
+
options: {
|
|
786
|
+
liveEdit: ${n.liveEdit},
|
|
787
|
+
componentsDir: '${n.componentsDir}',
|
|
788
|
+
clientCacheHeaderTtl: ${n.clientCacheHeaderTtl},
|
|
789
|
+
serverCacheHeaderTtl: ${n.serverCacheHeaderTtl}
|
|
790
|
+
}
|
|
791
|
+
};
|
|
765
792
|
`
|
|
766
|
-
),
|
|
793
|
+
), n.liveEdit && t(
|
|
767
794
|
"page",
|
|
768
795
|
`
|
|
769
796
|
window.addEventListener("message", (event) => {
|
|
@@ -803,14 +830,15 @@ function Le(e) {
|
|
|
803
830
|
};
|
|
804
831
|
}
|
|
805
832
|
export {
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
833
|
+
Ue as default,
|
|
834
|
+
Se as editableBlock,
|
|
835
|
+
qe as useConfig,
|
|
836
|
+
Re as useConfigApi,
|
|
837
|
+
f as useConfiguration,
|
|
838
|
+
Ae as useEntitiesApi,
|
|
839
|
+
Ce as useFlyoIntegration,
|
|
840
|
+
Ie as usePagesApi,
|
|
841
|
+
ke as useSearchApi,
|
|
842
|
+
Te as useSitemapApi,
|
|
843
|
+
xe as useVersionApi
|
|
816
844
|
};
|