[ci] format
This commit is contained in:
parent
fa7ed3f3a9
commit
3dc22a2443
4 changed files with 9 additions and 9 deletions
|
@ -9,7 +9,7 @@ import type {
|
|||
} from '../../@types/astro';
|
||||
import type { LogOptions } from '../logger/core.js';
|
||||
|
||||
import { renderComponent, renderHead, renderPage } from '../../runtime/server/index.js';
|
||||
import { renderComponent, renderPage } from '../../runtime/server/index.js';
|
||||
import { getParams } from '../routing/params.js';
|
||||
import { createResult } from './result.js';
|
||||
import { callGetStaticPaths, findPathItemByKey, RouteCache } from './route-cache.js';
|
||||
|
|
|
@ -662,9 +662,7 @@ export async function renderHead(result: SSRResult): Promise<string> {
|
|||
const links = Array.from(result.links)
|
||||
.filter(uniqueElements)
|
||||
.map((link) => renderElement('link', link, false));
|
||||
return markHTMLString(
|
||||
links.join('\n') + styles.join('\n') + scripts.join('\n')
|
||||
);
|
||||
return markHTMLString(links.join('\n') + styles.join('\n') + scripts.join('\n'));
|
||||
}
|
||||
|
||||
// This function is called by Astro components that do not contain a <head> component
|
||||
|
@ -672,7 +670,7 @@ export async function renderHead(result: SSRResult): Promise<string> {
|
|||
// is called before a component's first non-head HTML element. If the head was
|
||||
// already injected it is a noop.
|
||||
export function maybeRenderHead(result: SSRResult): string | Promise<string> {
|
||||
if(alreadyHeadRenderedResults.has(result)) {
|
||||
if (alreadyHeadRenderedResults.has(result)) {
|
||||
return '';
|
||||
}
|
||||
return renderHead(result);
|
||||
|
|
|
@ -59,7 +59,9 @@ export function getPrescripts(type: PrescriptType, directive: string): string {
|
|||
// deps to be loaded immediately.
|
||||
switch (type) {
|
||||
case 'both':
|
||||
return `<style>astro-island,astro-slot{display:contents}</style><script>${getDirectiveScriptText(directive) + islandScript}</script>`;
|
||||
return `<style>astro-island,astro-slot{display:contents}</style><script>${
|
||||
getDirectiveScriptText(directive) + islandScript
|
||||
}</script>`;
|
||||
case 'directive':
|
||||
return `<script>${getDirectiveScriptText(directive)}</script>`;
|
||||
}
|
||||
|
|
2
packages/webapi/mod.d.ts
vendored
2
packages/webapi/mod.d.ts
vendored
|
@ -1,5 +1,5 @@
|
|||
export { pathToPosix } from './lib/utils';
|
||||
export { AbortController, AbortSignal, alert, atob, Blob, btoa, ByteLengthQueuingStrategy, cancelAnimationFrame, cancelIdleCallback, CanvasRenderingContext2D, CharacterData, clearTimeout, Comment, CountQueuingStrategy, CSSStyleSheet, CustomElementRegistry, CustomEvent, Document, DocumentFragment, DOMException, Element, Event, EventTarget, fetch, File, FormData, Headers, HTMLBodyElement, HTMLCanvasElement, HTMLDivElement, HTMLDocument, HTMLElement, HTMLHeadElement, HTMLHtmlElement, HTMLImageElement, HTMLSpanElement, HTMLStyleElement, HTMLTemplateElement, HTMLUnknownElement, Image, ImageData, IntersectionObserver, MediaQueryList, MutationObserver, Node, NodeFilter, NodeIterator, OffscreenCanvas, ReadableByteStreamController, ReadableStream, ReadableStreamBYOBReader, ReadableStreamBYOBRequest, ReadableStreamDefaultController, ReadableStreamDefaultReader, Request, requestAnimationFrame, requestIdleCallback, ResizeObserver, Response, setTimeout, ShadowRoot, structuredClone, StyleSheet, Text, TransformStream, TreeWalker, URLPattern, Window, WritableStream, WritableStreamDefaultController, WritableStreamDefaultWriter, } from './mod.js';
|
||||
export { AbortController, AbortSignal, alert, atob, Blob, btoa, ByteLengthQueuingStrategy, cancelAnimationFrame, cancelIdleCallback, CanvasRenderingContext2D, CharacterData, clearTimeout, Comment, CountQueuingStrategy, CSSStyleSheet, CustomElementRegistry, CustomEvent, Document, DocumentFragment, DOMException, Element, Event, EventTarget, fetch, File, FormData, Headers, HTMLBodyElement, HTMLCanvasElement, HTMLDivElement, HTMLDocument, HTMLElement, HTMLHeadElement, HTMLHtmlElement, HTMLImageElement, HTMLSpanElement, HTMLStyleElement, HTMLTemplateElement, HTMLUnknownElement, Image, ImageData, IntersectionObserver, MediaQueryList, MutationObserver, Node, NodeFilter, NodeIterator, OffscreenCanvas, ReadableByteStreamController, ReadableStream, ReadableStreamBYOBReader, ReadableStreamBYOBRequest, ReadableStreamDefaultController, ReadableStreamDefaultReader, Request, requestAnimationFrame, requestIdleCallback, ResizeObserver, Response, setTimeout, ShadowRoot, structuredClone, StyleSheet, Text, TransformStream, TreeWalker, URLPattern, Window, WritableStream, WritableStreamDefaultController, WritableStreamDefaultWriter } from './mod.js';
|
||||
export declare const polyfill: {
|
||||
(target: any, options?: PolyfillOptions): any;
|
||||
internals(target: any, name: string): any;
|
||||
|
|
Loading…
Reference in a new issue