@kong/spec-renderer 1.117.4 → 1.117.5-pr.1073.1a224bc.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/dist/cli/index.js +0 -0
- package/dist/cli/preview-page/client.js +268 -9
- package/dist/cli/preview-page/client.js.map +1 -1
- package/dist/cli/resolve-render-options.js +4 -4
- package/dist/cli/resolve-render-options.js.map +1 -1
- package/dist/cli/server.js +10 -1
- package/dist/cli/server.js.map +1 -1
- package/package.json +26 -27
- package/dist/kongctl-ext-spec-preview-universal.tar.gz +0 -0
package/dist/cli/index.js
CHANGED
|
File without changes
|
|
@@ -1,10 +1,220 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Remembers the scroll offset across the preview page's reloads (live-reload
|
|
3
|
+
* and manual refresh both do a full page reload).
|
|
4
|
+
*/
|
|
5
|
+
const SCROLL_STORAGE_KEY = 'kong-spec-renderer:scroll-position';
|
|
6
|
+
const SCROLL_POLL_INTERVAL_MS = 100;
|
|
7
|
+
/**
|
|
8
|
+
* The first restore can itself trigger further `scrollY` adjustments (the
|
|
9
|
+
* renderer lazily (un)mounts sections around the viewport, and scroll
|
|
10
|
+
* anchoring compensates), and the renderer's own initial section scroll can
|
|
11
|
+
* also land after the first restore. Re-assert the saved offset once more
|
|
12
|
+
* after this delay, then reveal the page - everything is hidden until then,
|
|
13
|
+
* so none of these movements are visible.
|
|
14
|
+
*/
|
|
15
|
+
const SCROLL_REASSERT_DELAY_MS = 800;
|
|
16
|
+
/**
|
|
17
|
+
* Give up on restoring after this long - e.g. the spec shrank and the saved
|
|
18
|
+
* offset is past the end of the document.
|
|
19
|
+
*/
|
|
20
|
+
const SCROLL_RESTORE_TIMEOUT_MS = 4000;
|
|
21
|
+
/**
|
|
22
|
+
* The document is virtualized: sections lazily (un)mount, so the same window
|
|
23
|
+
* `scrollY` can point at different content on the next page load (the
|
|
24
|
+
* mounted set depends on how the page was scrolled). Anchoring to the
|
|
25
|
+
* section the viewport was in, at an offset within it, survives that.
|
|
26
|
+
*/
|
|
27
|
+
function findActiveSection() {
|
|
28
|
+
const root = document.getElementById('preview')?.shadowRoot;
|
|
29
|
+
if (!root) {
|
|
30
|
+
return undefined;
|
|
31
|
+
}
|
|
32
|
+
const y = window.scrollY;
|
|
33
|
+
let active;
|
|
34
|
+
for (const el of Array.from(root.querySelectorAll('[id$="-nodecontainer"]'))) {
|
|
35
|
+
if (el.getBoundingClientRect().top + window.scrollY <= y + 1) {
|
|
36
|
+
active = el;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
if (!active) {
|
|
40
|
+
return undefined;
|
|
41
|
+
}
|
|
42
|
+
return {
|
|
43
|
+
id: active.id,
|
|
44
|
+
heading: active.querySelector('h2')?.textContent?.trim() ?? '',
|
|
45
|
+
offsetIn: Math.max(0, Math.round(y - (active.getBoundingClientRect().top + window.scrollY))),
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Set by the `path-not-found` handler when it falls back to the overview -
|
|
50
|
+
* cancels a running scroll restore, since the position it targets is under
|
|
51
|
+
* the removed/renamed section. (A scroll-driven hash update during the
|
|
52
|
+
* restore must NOT cancel it - see `restoreScrollPosition`.)
|
|
53
|
+
*/
|
|
54
|
+
let scrollRestoreCancelled = false;
|
|
55
|
+
/** Decodes a URL part, tolerating malformed input by returning it as-is. */
|
|
56
|
+
function safeDecode(value) {
|
|
57
|
+
try {
|
|
58
|
+
return decodeURIComponent(value);
|
|
59
|
+
}
|
|
60
|
+
catch {
|
|
61
|
+
return value;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
function readSavedScrollPosition() {
|
|
65
|
+
let saved;
|
|
66
|
+
try {
|
|
67
|
+
saved = JSON.parse(sessionStorage.getItem(SCROLL_STORAGE_KEY) ?? '{}');
|
|
68
|
+
}
|
|
69
|
+
catch {
|
|
70
|
+
return undefined;
|
|
71
|
+
}
|
|
72
|
+
if (typeof saved.href !== 'string' || typeof saved.y !== 'number' || !Number.isFinite(saved.y) || saved.y <= 0) {
|
|
73
|
+
return undefined;
|
|
74
|
+
}
|
|
75
|
+
return typeof saved.section === 'object' && saved.section !== null
|
|
76
|
+
? { href: saved.href, y: saved.y, section: saved.section }
|
|
77
|
+
: { href: saved.href, y: saved.y };
|
|
78
|
+
}
|
|
79
|
+
function rememberScrollPosition() {
|
|
80
|
+
try {
|
|
81
|
+
sessionStorage.setItem(SCROLL_STORAGE_KEY, JSON.stringify({
|
|
82
|
+
href: location.href,
|
|
83
|
+
y: window.scrollY,
|
|
84
|
+
section: findActiveSection(),
|
|
85
|
+
}));
|
|
86
|
+
}
|
|
87
|
+
catch {
|
|
88
|
+
// sessionStorage is unavailable (e.g. Safari private mode) - skip.
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Restores the scroll offset saved by `rememberScrollPosition`.
|
|
93
|
+
*
|
|
94
|
+
* The spec renders asynchronously and the renderer then scrolls the restored
|
|
95
|
+
* section into view, so the browser's own scroll restoration can't work.
|
|
96
|
+
* Several scrolls happen in sequence while settling into the saved offset:
|
|
97
|
+
* the renderer's own initial section scroll, our restore, and layout
|
|
98
|
+
* adjustments triggered by the renderer lazily (un)mounting sections around
|
|
99
|
+
* the viewport (which the browser's scroll anchoring compensates for).
|
|
100
|
+
* Rather than show that as visible jumping, the caller hides the renderer
|
|
101
|
+
* before its content renders and it is only revealed once the offset is
|
|
102
|
+
* final.
|
|
103
|
+
*/
|
|
104
|
+
/**
|
|
105
|
+
* Finds the saved section in the freshly rendered document: by id when the
|
|
106
|
+
* spec is unchanged (indices are stable), else by heading text when a spec
|
|
107
|
+
* edit added/removed sections and shifted indices.
|
|
108
|
+
*/
|
|
109
|
+
function findSavedSection(savedSection) {
|
|
110
|
+
const root = document.getElementById('preview')?.shadowRoot;
|
|
111
|
+
if (!root) {
|
|
112
|
+
return null;
|
|
113
|
+
}
|
|
114
|
+
const byId = root.querySelector(`#${CSS.escape(savedSection.id)}`);
|
|
115
|
+
if (byId && (byId.querySelector('h2')?.textContent?.trim() ?? '') === savedSection.heading) {
|
|
116
|
+
return byId;
|
|
117
|
+
}
|
|
118
|
+
if (savedSection.heading) {
|
|
119
|
+
for (const el of Array.from(root.querySelectorAll('[id$="-nodecontainer"]'))) {
|
|
120
|
+
if ((el.querySelector('h2')?.textContent?.trim() ?? '') === savedSection.heading) {
|
|
121
|
+
return el;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
return null;
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Where to scroll to: the saved section's live position plus the offset
|
|
129
|
+
* within it, measured at call time - virtualization of the sections above
|
|
130
|
+
* shifts a section's absolute position between page loads, but the offset
|
|
131
|
+
* within the section always points at the same content. Falls back to the
|
|
132
|
+
* raw saved `y` when the section can't be found again (e.g. the spec edit
|
|
133
|
+
* removed it - though that case usually goes through `path-not-found`).
|
|
134
|
+
*/
|
|
135
|
+
function scrollTarget(saved) {
|
|
136
|
+
if (saved.section === undefined) {
|
|
137
|
+
return saved.y;
|
|
138
|
+
}
|
|
139
|
+
const section = findSavedSection(saved.section);
|
|
140
|
+
if (section === null) {
|
|
141
|
+
return saved.y;
|
|
142
|
+
}
|
|
143
|
+
return section.getBoundingClientRect().top + window.scrollY + saved.section.offsetIn;
|
|
144
|
+
}
|
|
145
|
+
function restoreScrollPosition(el) {
|
|
146
|
+
const saved = readSavedScrollPosition();
|
|
147
|
+
// The saved entry must belong to the page as it booted - e.g. a `--path`
|
|
148
|
+
// deep link that changed the URL before this ran must not inherit some
|
|
149
|
+
// earlier session's scroll offset.
|
|
150
|
+
if (!saved || saved.href !== location.href) {
|
|
151
|
+
return;
|
|
152
|
+
}
|
|
153
|
+
let hasInteracted = false;
|
|
154
|
+
const reveal = () => {
|
|
155
|
+
el.style.visibility = '';
|
|
156
|
+
};
|
|
157
|
+
// Any real user input wins over the restore from here on - reveal whatever
|
|
158
|
+
// is on screen and don't yank the page out from under someone who is
|
|
159
|
+
// already reading/scrolling.
|
|
160
|
+
for (const type of ['pointerdown', 'wheel', 'keydown', 'touchstart']) {
|
|
161
|
+
window.addEventListener(type, () => {
|
|
162
|
+
hasInteracted = true;
|
|
163
|
+
reveal();
|
|
164
|
+
}, { once: true });
|
|
165
|
+
}
|
|
166
|
+
const restore = () => {
|
|
167
|
+
const target = scrollTarget(saved);
|
|
168
|
+
if (!scrollRestoreCancelled && !hasInteracted && Math.abs(window.scrollY - target) > 2) {
|
|
169
|
+
window.scrollTo(0, target);
|
|
170
|
+
}
|
|
171
|
+
};
|
|
172
|
+
const startedAt = performance.now();
|
|
173
|
+
let hasRendered = false;
|
|
174
|
+
const poll = () => {
|
|
175
|
+
// The path the URL restored turned out invalid - the fallback handler
|
|
176
|
+
// has already reset the URL and remounted at the overview.
|
|
177
|
+
if (scrollRestoreCancelled) {
|
|
178
|
+
reveal();
|
|
179
|
+
return;
|
|
180
|
+
}
|
|
181
|
+
const isRendered = document.documentElement.scrollHeight > saved.y;
|
|
182
|
+
if (isRendered) {
|
|
183
|
+
hasRendered = true;
|
|
184
|
+
}
|
|
185
|
+
if (hasRendered) {
|
|
186
|
+
// Restore as soon as the document is tall enough, then re-assert once
|
|
187
|
+
// the adjustment dust has settled (see SCROLL_REASSERT_DELAY_MS) - the
|
|
188
|
+
// target is re-measured live each time, so virtualization differences
|
|
189
|
+
// self-correct - and only then show the page.
|
|
190
|
+
restore();
|
|
191
|
+
setTimeout(() => {
|
|
192
|
+
restore();
|
|
193
|
+
reveal();
|
|
194
|
+
}, SCROLL_REASSERT_DELAY_MS);
|
|
195
|
+
}
|
|
196
|
+
else if (performance.now() - startedAt < SCROLL_RESTORE_TIMEOUT_MS) {
|
|
197
|
+
setTimeout(poll, SCROLL_POLL_INTERVAL_MS);
|
|
198
|
+
}
|
|
199
|
+
else {
|
|
200
|
+
// Best effort - e.g. the spec shrank and the offset is near the end.
|
|
201
|
+
// If the document never rendered past the saved offset, leave the
|
|
202
|
+
// viewport where the renderer's own section scroll put it.
|
|
203
|
+
if (isRendered) {
|
|
204
|
+
restore();
|
|
205
|
+
}
|
|
206
|
+
reveal();
|
|
207
|
+
}
|
|
208
|
+
};
|
|
209
|
+
poll();
|
|
210
|
+
}
|
|
1
211
|
/**
|
|
2
212
|
* Fetches the spec/config and assigns them onto the `<kong-spec-renderer>`
|
|
3
213
|
* element, then registers (and upgrades) the custom element - deliberately
|
|
4
214
|
* in that order.
|
|
5
215
|
*
|
|
6
|
-
* Vue's `defineCustomElement` reads any already-present own properties on
|
|
7
|
-
* element as its *initial* prop values at construction/upgrade time; props
|
|
216
|
+
* Vue's `defineCustomElement` reads any already-present own properties on
|
|
217
|
+
* the element as its *initial* prop values at construction/upgrade time; props
|
|
8
218
|
* assigned afterwards (e.g. `currentPath`) reach the underlying component
|
|
9
219
|
* reactively for props it actively watches, but some - like `currentPath` -
|
|
10
220
|
* are only snapshotted into local refs once at setup and never re-synced.
|
|
@@ -24,26 +234,62 @@ async function loadAndApply() {
|
|
|
24
234
|
for (const [key, value] of Object.entries(config)) {
|
|
25
235
|
el[key] = value;
|
|
26
236
|
}
|
|
27
|
-
const requestedPath = typeof config.currentPath === 'string' ? config.currentPath : undefined;
|
|
28
237
|
// Matches how the component's own click-driven navigation builds the URL
|
|
29
238
|
// for each `navigationType` (there's no `basePath` here - the CLI's preview
|
|
30
239
|
// page is always served from `/`).
|
|
31
240
|
const toAddressBarUrl = (path) => config.navigationType === 'hash' ? `#${path}` : path;
|
|
241
|
+
// ...and its inverse, for reading the user's last location back after a
|
|
242
|
+
// reload. The component reflects every navigation into the address bar, and
|
|
243
|
+
// the URL survives both live-reload and a manual refresh - so it holds the
|
|
244
|
+
// user's last location.
|
|
245
|
+
const pathFromAddressBar = () => {
|
|
246
|
+
let raw;
|
|
247
|
+
if (config.navigationType === 'path') {
|
|
248
|
+
raw = location.pathname === '/' ? undefined : location.pathname;
|
|
249
|
+
}
|
|
250
|
+
else {
|
|
251
|
+
raw = location.hash ? location.hash.slice(1) : undefined;
|
|
252
|
+
}
|
|
253
|
+
// The component only ever writes node URIs with a leading `/` - accept
|
|
254
|
+
// one without (e.g. from a hand-edited URL) rather than failing to match.
|
|
255
|
+
return raw === undefined ? undefined : safeDecode(raw).replace(/^([^/])/, '/$1');
|
|
256
|
+
};
|
|
257
|
+
// The URL wins over the `--path` flag: it is the user's latest location,
|
|
258
|
+
// and the flag is only the first load's starting point.
|
|
259
|
+
const urlPath = pathFromAddressBar();
|
|
260
|
+
const flagPath = typeof config.currentPath === 'string' ? config.currentPath : undefined;
|
|
261
|
+
const requestedPath = urlPath ?? flagPath;
|
|
262
|
+
const pathSource = urlPath === undefined ? 'flag' : 'url';
|
|
263
|
+
// `config` only carries `currentPath` when `--path` was passed - a
|
|
264
|
+
// URL-supplied path has to be set on the element itself, alongside the
|
|
265
|
+
// other props above and before registration, or the component boots at
|
|
266
|
+
// its own default instead of the user's location.
|
|
267
|
+
if (urlPath !== undefined && urlPath !== '/') {
|
|
268
|
+
el.currentPath = urlPath;
|
|
269
|
+
}
|
|
32
270
|
if (requestedPath && requestedPath !== '/') {
|
|
33
271
|
// The component only pushes address-bar updates from its own click-driven
|
|
34
272
|
// navigation, not for an initial `currentPath` prop supplied externally -
|
|
35
|
-
// reflect
|
|
36
|
-
// actually rendered.
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
273
|
+
// reflect a flag-supplied path ourselves so the URL matches what's
|
|
274
|
+
// actually rendered. A URL-supplied path is already in the address bar.
|
|
275
|
+
if (pathSource === 'flag') {
|
|
276
|
+
history.replaceState({}, '', toAddressBarUrl(requestedPath));
|
|
277
|
+
}
|
|
278
|
+
// The path has to match this library's internal node URI scheme
|
|
40
279
|
// (`/operations/{operationId}`, `/schemas/{SchemaName}`), not the raw OAS
|
|
41
280
|
// path - there's no other feedback if it doesn't match anything, so warn
|
|
42
281
|
// loudly rather than silently rendering a blank document pane.
|
|
43
282
|
el.addEventListener('path-not-found', ((event) => {
|
|
44
|
-
|
|
283
|
+
const requested = String(event.detail?.[0] ?? requestedPath);
|
|
284
|
+
const source = pathSource === 'url'
|
|
285
|
+
? `The path "${requested}" (restored from the URL) doesn't match any operation or schema in this spec - it may have been renamed or removed since. `
|
|
286
|
+
: `--path "${requested}" doesn't match any operation or schema in this spec. `;
|
|
287
|
+
console.warn(`[kong-spec-renderer] ${source}` +
|
|
45
288
|
'Expected format: "/operations/{operationId}" or "/schemas/{SchemaName}" - check the spec\'s operationId/schema names, not its raw OAS paths. ' +
|
|
46
289
|
'Falling back to the overview.');
|
|
290
|
+
// The saved scroll offset belongs to the (now invalid) section - cancel
|
|
291
|
+
// its restore so it can't yank the page mid-fallback.
|
|
292
|
+
scrollRestoreCancelled = true;
|
|
47
293
|
history.replaceState({}, '', '/');
|
|
48
294
|
// `currentPath` is only read once, at the component's initial setup -
|
|
49
295
|
// an invalid path can't be corrected by reassigning the property on
|
|
@@ -57,13 +303,26 @@ async function loadAndApply() {
|
|
|
57
303
|
el.replaceWith(fallback);
|
|
58
304
|
}));
|
|
59
305
|
}
|
|
306
|
+
// A matching saved scroll offset means this load will end up mid-document
|
|
307
|
+
// (the section restore plus the offset restore, and the renderer's own
|
|
308
|
+
// initial scroll in between) - hide the renderer before its content
|
|
309
|
+
// renders so the settling isn't visible, and reveal it only once the
|
|
310
|
+
// offset is final (see restoreScrollPosition).
|
|
311
|
+
if (readSavedScrollPosition()?.href === location.href) {
|
|
312
|
+
el.style.visibility = 'hidden';
|
|
313
|
+
}
|
|
60
314
|
// A variable (rather than a string literal) module specifier so TypeScript
|
|
61
315
|
// treats this as an untyped dynamic import instead of trying to resolve
|
|
62
316
|
// `/assets/...` at typecheck time - it only exists once the CLI serves it.
|
|
63
317
|
const bundlePath = '/assets/kong-spec-renderer.web-component.es.js';
|
|
64
318
|
const { registerKongSpecRenderer } = await import(bundlePath);
|
|
65
319
|
registerKongSpecRenderer();
|
|
320
|
+
restoreScrollPosition(el);
|
|
66
321
|
}
|
|
322
|
+
// The renderer renders asynchronously, so the browser's own scroll restoration
|
|
323
|
+
// can't work across reloads - take it over manually.
|
|
324
|
+
history.scrollRestoration = 'manual';
|
|
325
|
+
window.addEventListener('pagehide', rememberScrollPosition);
|
|
67
326
|
void loadAndApply();
|
|
68
327
|
const RECONNECT_DELAY_MS = 1000;
|
|
69
328
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../../cli/preview-page/client.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;GAaG;AACH,KAAK,UAAU,YAAY;IACzB,MAAM,EAAE,GAAG,QAAQ,CAAC,cAAc,CAAC,SAAS,CAA0B,CAAA;IAEtE,IAAI,CAAC,EAAE,EAAE,CAAC;QACR,OAAM;IACR,CAAC;IAED,MAAM,CAAC,YAAY,EAAE,cAAc,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,CAAA;IAC5F,MAAM,IAAI,GAAG,MAAM,YAAY,CAAC,IAAI,EAAE,CAAA;IACtC,MAAM,MAAM,GAAG,MAAM,cAAc,CAAC,IAAI,EAA6B,CAAA;IAErE,EAAE,CAAC,IAAI,GAAG,IAAI,CAAA;IAEd,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;QAClD,EAAE,CAAC,GAAG,CAAC,GAAG,KAAK,CAAA;IACjB,CAAC;IAED,MAAM,
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../../cli/preview-page/client.ts"],"names":[],"mappings":"AAKA;;;GAGG;AACH,MAAM,kBAAkB,GAAG,oCAAoC,CAAA;AAC/D,MAAM,uBAAuB,GAAG,GAAG,CAAA;AACnC;;;;;;;GAOG;AACH,MAAM,wBAAwB,GAAG,GAAG,CAAA;AACpC;;;GAGG;AACH,MAA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AAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAA;IAC9D,MAAM,MAAM,GAAG,IAAI,SAAS,CAAC,GAAG,QAAQ,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAA;IAE9D,MAAM,CAAC,gBAAgB,CAAC,SAAS,EAAE,CAAC,KAAK,EAAE,EAAE;QAC3C,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,IAAc,CAAqB,CAAA;QAEpE,IAAI,OAAO,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;YAC9B,QAAQ,CAAC,MAAM,EAAE,CAAA;QACnB,CAAC;IACH,CAAC,CAAC,CAAA;IAEF,MAAM,CAAC,gBAAgB,CAAC,OAAO,EAAE,GAAG,EAAE;QACpC,UAAU,CAAC,OAAO,EAAE,kBAAkB,CAAC,CAAA;IACzC,CAAC,CAAC,CAAA;AACJ,CAAC;AAED,OAAO,EAAE,CAAA"}
|
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
* `controlAddressBar` is always hardcoded true - the CLI, not the user, owns
|
|
6
6
|
* the single-page preview environment that prop governs. `navigationType`
|
|
7
7
|
* defaults to `'hash'` rather than the component's own `'path'` default -
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
8
|
+
* `'path'` works too (the server falls back to the preview page for unknown
|
|
9
|
+
* non-asset routes, and the client reads the path back out of the URL), but
|
|
10
|
+
* `'hash'` stays the default since it keeps deep links working even when the
|
|
11
|
+
* preview page is served statically. `showPoweredBy` defaults to `true` here
|
|
12
12
|
* even though the component prop itself defaults to `false` - the CLI wants
|
|
13
13
|
* branding visible unless a user opts out with `--hide-powered-by`.
|
|
14
14
|
* `hideNavigationButtons` defaults to `true` (hidden), matching the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolve-render-options.js","sourceRoot":"","sources":["../../cli/resolve-render-options.ts"],"names":[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,EAAE,KAAK,CAAC,WAAW,EAAE,CAAC;KAC/E,CAAA;AACH,CAAC"}
|
package/dist/cli/server.js
CHANGED
|
@@ -131,7 +131,16 @@ async function handleRequest(url, options, distDir, previewPageDir) {
|
|
|
131
131
|
// Fall through to 404 below - e.g. the file doesn't exist.
|
|
132
132
|
}
|
|
133
133
|
}
|
|
134
|
+
// A missing asset stays a real 404 rather than falling through to the
|
|
135
|
+
// single-page fallback below - HTML served as JavaScript/CSS hides the
|
|
136
|
+
// failure instead of surfacing it in the console.
|
|
137
|
+
return { status: 404, body: 'Not found', contentType: 'text/plain' };
|
|
134
138
|
}
|
|
135
|
-
|
|
139
|
+
// The preview is a single page: serve it for any remaining route so a deep
|
|
140
|
+
// link (e.g. `/operations/getPets` after a browser refresh with
|
|
141
|
+
// `--navigation-type path`) reaches the page - the client reads the path
|
|
142
|
+
// back out of the URL.
|
|
143
|
+
const body = await readFile(join(previewPageDir, 'index.html'), 'utf-8');
|
|
144
|
+
return { status: 200, body, contentType: 'text/html; charset=utf-8' };
|
|
136
145
|
}
|
|
137
146
|
//# sourceMappingURL=server.js.map
|
package/dist/cli/server.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.js","sourceRoot":"","sources":["../../cli/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,IAAI,gBAAgB,EAA6B,MAAM,WAAW,CAAA;AACvF,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAC3C,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAExC,OAAO,EAAE,eAAe,EAAE,MAAM,IAAI,CAAA;AAGpC,MAAM,UAAU,GAAG,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAA;AAC1D,uFAAuF;AACvF,mEAAmE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M,EAAE,GAAG,EAAE,IAAI,EAAE,WAAW,EAAE,aAAa,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,IAAI,0BAA0B,EAAE,CAAA;YAC5G,CAAC;YAAC,MAAM,CAAC;gBACP,2DAA2D;YAC7D,CAAC;QACH,CAAC;QAED,sEAAsE;QACtE,uEAAuE;QACvE,kDAAkD;QAClD,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,WAAW,EAAE,WAAW,EAAE,YAAY,EAAE,CAAA;IACtE,CAAC;IAED,2EAA2E;IAC3E,gEAAgE;IAChE,yEAAyE;IACzE,uBAAuB;IACvB,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,IAAI,CAAC,cAAc,EAAE,YAAY,CAAC,EAAE,OAAO,CAAC,CAAA;IAExE,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,WAAW,EAAE,0BAA0B,EAAE,CAAA;AACvE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kong/spec-renderer",
|
|
3
|
-
"version": "1.117.
|
|
3
|
+
"version": "1.117.5-pr.1073.1a224bc.0",
|
|
4
4
|
"description": "Kong's open-source spec renderer",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -32,30 +32,6 @@
|
|
|
32
32
|
"publishConfig": {
|
|
33
33
|
"access": "public"
|
|
34
34
|
},
|
|
35
|
-
"scripts": {
|
|
36
|
-
"dev": "cross-env USE_SANDBOX=true vite",
|
|
37
|
-
"build": "pnpm run typecheck && pnpm run build:package && pnpm run build:webcomponent && pnpm run build:types && pnpm run build:aliases && pnpm run build:cli",
|
|
38
|
-
"build:package": "vite build -m production",
|
|
39
|
-
"build:webcomponent": "cross-env VITE_AS_WEB_COMPONENT='true' vite build -m production",
|
|
40
|
-
"build:types": "vue-tsc -p './tsconfig.build.json' --emitDeclarationOnly",
|
|
41
|
-
"build:aliases": "tsc-alias -p './tsconfig.build.json'",
|
|
42
|
-
"build:cli": "tsc -p './tsconfig.cli.build.json' && node ./scripts/build-cli-assets.js && node ./scripts/generate-kongctl-manifest.mjs",
|
|
43
|
-
"generate:kongctl-manifest": "pnpm run build:cli",
|
|
44
|
-
"build:analyzer": "BUILD_VISUALIZER='true' vite build -m production",
|
|
45
|
-
"build:sandbox": "cross-env USE_SANDBOX=true vite build -m production",
|
|
46
|
-
"preview": "pnpm run build:sandbox && cross-env USE_SANDBOX=true vite preview",
|
|
47
|
-
"typecheck": "vue-tsc -p './tsconfig.build.json' --noEmit && pnpm run typecheck:cli && pnpm run typecheck:scripts",
|
|
48
|
-
"typecheck:cli": "tsc -p './tsconfig.cli.json' --noEmit",
|
|
49
|
-
"typecheck:scripts": "tsc -p './tsconfig.scripts.json' --noEmit",
|
|
50
|
-
"stylelint": "stylelint --allow-empty-input './src/**/*.{css,scss,vue}'",
|
|
51
|
-
"stylelint:fix": "stylelint --allow-empty-input './src/**/*.{css,scss,sass,vue}' --fix",
|
|
52
|
-
"lint": "eslint",
|
|
53
|
-
"lint:fix": "eslint --fix",
|
|
54
|
-
"test": "cross-env FORCE_COLOR=1 vitest run",
|
|
55
|
-
"test:open": "cross-env FORCE_COLOR=1 vitest --ui",
|
|
56
|
-
"semantic-release": "semantic-release",
|
|
57
|
-
"commit": "cz"
|
|
58
|
-
},
|
|
59
35
|
"peerDependencies": {
|
|
60
36
|
"vue": ">= 3.3.13 < 4"
|
|
61
37
|
},
|
|
@@ -226,5 +202,28 @@
|
|
|
226
202
|
"jiraAppend": "]"
|
|
227
203
|
}
|
|
228
204
|
},
|
|
229
|
-
"
|
|
230
|
-
|
|
205
|
+
"scripts": {
|
|
206
|
+
"dev": "cross-env USE_SANDBOX=true vite",
|
|
207
|
+
"build": "pnpm run typecheck && pnpm run build:package && pnpm run build:webcomponent && pnpm run build:types && pnpm run build:aliases && pnpm run build:cli",
|
|
208
|
+
"build:package": "vite build -m production",
|
|
209
|
+
"build:webcomponent": "cross-env VITE_AS_WEB_COMPONENT='true' vite build -m production",
|
|
210
|
+
"build:types": "vue-tsc -p './tsconfig.build.json' --emitDeclarationOnly",
|
|
211
|
+
"build:aliases": "tsc-alias -p './tsconfig.build.json'",
|
|
212
|
+
"build:cli": "tsc -p './tsconfig.cli.build.json' && node ./scripts/build-cli-assets.js && node ./scripts/generate-kongctl-manifest.mjs",
|
|
213
|
+
"generate:kongctl-manifest": "pnpm run build:cli",
|
|
214
|
+
"build:analyzer": "BUILD_VISUALIZER='true' vite build -m production",
|
|
215
|
+
"build:sandbox": "cross-env USE_SANDBOX=true vite build -m production",
|
|
216
|
+
"preview": "pnpm run build:sandbox && cross-env USE_SANDBOX=true vite preview",
|
|
217
|
+
"typecheck": "vue-tsc -p './tsconfig.build.json' --noEmit && pnpm run typecheck:cli && pnpm run typecheck:scripts",
|
|
218
|
+
"typecheck:cli": "tsc -p './tsconfig.cli.json' --noEmit",
|
|
219
|
+
"typecheck:scripts": "tsc -p './tsconfig.scripts.json' --noEmit",
|
|
220
|
+
"stylelint": "stylelint --allow-empty-input './src/**/*.{css,scss,vue}'",
|
|
221
|
+
"stylelint:fix": "stylelint --allow-empty-input './src/**/*.{css,scss,sass,vue}' --fix",
|
|
222
|
+
"lint": "eslint",
|
|
223
|
+
"lint:fix": "eslint --fix",
|
|
224
|
+
"test": "cross-env FORCE_COLOR=1 vitest run",
|
|
225
|
+
"test:open": "cross-env FORCE_COLOR=1 vitest --ui",
|
|
226
|
+
"semantic-release": "semantic-release",
|
|
227
|
+
"commit": "cz"
|
|
228
|
+
}
|
|
229
|
+
}
|
|
Binary file
|