Remove build artifacts from git
This commit is contained in:
9
dist/client/favicon.svg
vendored
9
dist/client/favicon.svg
vendored
@@ -1,9 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 128 128">
|
||||
<path d="M50.4 78.5a75.1 75.1 0 0 0-28.5 6.9l24.2-65.7c.7-2 1.9-3.2 3.4-3.2h29c1.5 0 2.7 1.2 3.4 3.2l24.2 65.7s-11.6-7-28.5-7L67 45.5c-.4-1.7-1.6-2.8-2.9-2.8-1.3 0-2.5 1.1-2.9 2.7L50.4 78.5Zm-1.1 28.2Zm-4.2-20.2c-2 6.6-.6 15.8 4.2 20.2a17.5 17.5 0 0 1 .2-.7 5.5 5.5 0 0 1 5.7-4.5c2.8.1 4.3 1.5 4.7 4.7.2 1.1.2 2.3.2 3.5v.4c0 2.7.7 5.2 2.2 7.4a13 13 0 0 0 5.7 4.9v-.3l-.2-.3c-1.8-5.6-.5-9.5 4.4-12.8l1.5-1a73 73 0 0 0 3.2-2.2 16 16 0 0 0 6.8-11.4c.3-2 .1-4-.6-6l-.8.6-1.6 1a37 37 0 0 1-22.4 2.7c-5-.7-9.7-2-13.2-6.2Z" />
|
||||
<style>
|
||||
path { fill: #000; }
|
||||
@media (prefers-color-scheme: dark) {
|
||||
path { fill: #FFF; }
|
||||
}
|
||||
</style>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 749 B |
1
dist/client/sitemap-0.xml
vendored
1
dist/client/sitemap-0.xml
vendored
@@ -1 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?><urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:news="http://www.google.com/schemas/sitemap-news/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" xmlns:video="http://www.google.com/schemas/sitemap-video/1.1"><url><loc>https://juchatz.com/</loc></url></urlset>
|
||||
1
dist/client/sitemap-index.xml
vendored
1
dist/client/sitemap-index.xml
vendored
@@ -1 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?><sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"><sitemap><loc>https://juchatz.com/sitemap-0.xml</loc></sitemap></sitemapindex>
|
||||
1
dist/server/_@astrojs-ssr-adapter.mjs
vendored
1
dist/server/_@astrojs-ssr-adapter.mjs
vendored
@@ -1 +0,0 @@
|
||||
export { c as createExports, a as start } from './chunks/_@astrojs-ssr-adapter_DiODGAEm.mjs';
|
||||
3
dist/server/_noop-middleware.mjs
vendored
3
dist/server/_noop-middleware.mjs
vendored
@@ -1,3 +0,0 @@
|
||||
const onRequest = (_, next) => next();
|
||||
|
||||
export { onRequest };
|
||||
4204
dist/server/chunks/_@astrojs-ssr-adapter_DiODGAEm.mjs
vendored
4204
dist/server/chunks/_@astrojs-ssr-adapter_DiODGAEm.mjs
vendored
File diff suppressed because it is too large
Load Diff
@@ -1,364 +0,0 @@
|
||||
import { ai as NOOP_MIDDLEWARE_HEADER, aj as REDIRECT_STATUS_CODES, A as AstroError, ak as ActionsReturnedInvalidDataError, O as DEFAULT_404_COMPONENT } from './astro/server_BRK6phUk.mjs';
|
||||
import { parse, stringify } from 'devalue';
|
||||
import { escape } from 'html-escaper';
|
||||
|
||||
const NOOP_MIDDLEWARE_FN = async (_ctx, next) => {
|
||||
const response = await next();
|
||||
response.headers.set(NOOP_MIDDLEWARE_HEADER, "true");
|
||||
return response;
|
||||
};
|
||||
|
||||
const ACTION_QUERY_PARAMS$1 = {
|
||||
actionName: "_action"};
|
||||
const ACTION_RPC_ROUTE_PATTERN = "/_actions/[...path]";
|
||||
|
||||
const __vite_import_meta_env__ = {"ASSETS_PREFIX": undefined, "BASE_URL": "/", "DEV": false, "MODE": "production", "PROD": true, "SITE": "https://juchatz.com", "SSR": true};
|
||||
const ACTION_QUERY_PARAMS = ACTION_QUERY_PARAMS$1;
|
||||
const codeToStatusMap = {
|
||||
// Implemented from IANA HTTP Status Code Registry
|
||||
// https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml
|
||||
BAD_REQUEST: 400,
|
||||
UNAUTHORIZED: 401,
|
||||
PAYMENT_REQUIRED: 402,
|
||||
FORBIDDEN: 403,
|
||||
NOT_FOUND: 404,
|
||||
METHOD_NOT_ALLOWED: 405,
|
||||
NOT_ACCEPTABLE: 406,
|
||||
PROXY_AUTHENTICATION_REQUIRED: 407,
|
||||
REQUEST_TIMEOUT: 408,
|
||||
CONFLICT: 409,
|
||||
GONE: 410,
|
||||
LENGTH_REQUIRED: 411,
|
||||
PRECONDITION_FAILED: 412,
|
||||
CONTENT_TOO_LARGE: 413,
|
||||
URI_TOO_LONG: 414,
|
||||
UNSUPPORTED_MEDIA_TYPE: 415,
|
||||
RANGE_NOT_SATISFIABLE: 416,
|
||||
EXPECTATION_FAILED: 417,
|
||||
MISDIRECTED_REQUEST: 421,
|
||||
UNPROCESSABLE_CONTENT: 422,
|
||||
LOCKED: 423,
|
||||
FAILED_DEPENDENCY: 424,
|
||||
TOO_EARLY: 425,
|
||||
UPGRADE_REQUIRED: 426,
|
||||
PRECONDITION_REQUIRED: 428,
|
||||
TOO_MANY_REQUESTS: 429,
|
||||
REQUEST_HEADER_FIELDS_TOO_LARGE: 431,
|
||||
UNAVAILABLE_FOR_LEGAL_REASONS: 451,
|
||||
INTERNAL_SERVER_ERROR: 500,
|
||||
NOT_IMPLEMENTED: 501,
|
||||
BAD_GATEWAY: 502,
|
||||
SERVICE_UNAVAILABLE: 503,
|
||||
GATEWAY_TIMEOUT: 504,
|
||||
HTTP_VERSION_NOT_SUPPORTED: 505,
|
||||
VARIANT_ALSO_NEGOTIATES: 506,
|
||||
INSUFFICIENT_STORAGE: 507,
|
||||
LOOP_DETECTED: 508,
|
||||
NETWORK_AUTHENTICATION_REQUIRED: 511
|
||||
};
|
||||
const statusToCodeMap = Object.entries(codeToStatusMap).reduce(
|
||||
// reverse the key-value pairs
|
||||
(acc, [key, value]) => ({ ...acc, [value]: key }),
|
||||
{}
|
||||
);
|
||||
class ActionError extends Error {
|
||||
type = "AstroActionError";
|
||||
code = "INTERNAL_SERVER_ERROR";
|
||||
status = 500;
|
||||
constructor(params) {
|
||||
super(params.message);
|
||||
this.code = params.code;
|
||||
this.status = ActionError.codeToStatus(params.code);
|
||||
if (params.stack) {
|
||||
this.stack = params.stack;
|
||||
}
|
||||
}
|
||||
static codeToStatus(code) {
|
||||
return codeToStatusMap[code];
|
||||
}
|
||||
static statusToCode(status) {
|
||||
return statusToCodeMap[status] ?? "INTERNAL_SERVER_ERROR";
|
||||
}
|
||||
static fromJson(body) {
|
||||
if (isInputError(body)) {
|
||||
return new ActionInputError(body.issues);
|
||||
}
|
||||
if (isActionError(body)) {
|
||||
return new ActionError(body);
|
||||
}
|
||||
return new ActionError({
|
||||
code: "INTERNAL_SERVER_ERROR"
|
||||
});
|
||||
}
|
||||
}
|
||||
function isActionError(error) {
|
||||
return typeof error === "object" && error != null && "type" in error && error.type === "AstroActionError";
|
||||
}
|
||||
function isInputError(error) {
|
||||
return typeof error === "object" && error != null && "type" in error && error.type === "AstroActionInputError" && "issues" in error && Array.isArray(error.issues);
|
||||
}
|
||||
class ActionInputError extends ActionError {
|
||||
type = "AstroActionInputError";
|
||||
// We don't expose all ZodError properties.
|
||||
// Not all properties will serialize from server to client,
|
||||
// and we don't want to import the full ZodError object into the client.
|
||||
issues;
|
||||
fields;
|
||||
constructor(issues) {
|
||||
super({
|
||||
message: `Failed to validate: ${JSON.stringify(issues, null, 2)}`,
|
||||
code: "BAD_REQUEST"
|
||||
});
|
||||
this.issues = issues;
|
||||
this.fields = {};
|
||||
for (const issue of issues) {
|
||||
if (issue.path.length > 0) {
|
||||
const key = issue.path[0].toString();
|
||||
this.fields[key] ??= [];
|
||||
this.fields[key]?.push(issue.message);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
function getActionQueryString(name) {
|
||||
const searchParams = new URLSearchParams({ [ACTION_QUERY_PARAMS$1.actionName]: name });
|
||||
return `?${searchParams.toString()}`;
|
||||
}
|
||||
function serializeActionResult(res) {
|
||||
if (res.error) {
|
||||
if (Object.assign(__vite_import_meta_env__, { _: process.env._ })?.DEV) {
|
||||
actionResultErrorStack.set(res.error.stack);
|
||||
}
|
||||
let body2;
|
||||
if (res.error instanceof ActionInputError) {
|
||||
body2 = {
|
||||
type: res.error.type,
|
||||
issues: res.error.issues,
|
||||
fields: res.error.fields
|
||||
};
|
||||
} else {
|
||||
body2 = {
|
||||
...res.error,
|
||||
message: res.error.message
|
||||
};
|
||||
}
|
||||
return {
|
||||
type: "error",
|
||||
status: res.error.status,
|
||||
contentType: "application/json",
|
||||
body: JSON.stringify(body2)
|
||||
};
|
||||
}
|
||||
if (res.data === void 0) {
|
||||
return {
|
||||
type: "empty",
|
||||
status: 204
|
||||
};
|
||||
}
|
||||
let body;
|
||||
try {
|
||||
body = stringify(res.data, {
|
||||
// Add support for URL objects
|
||||
URL: (value) => value instanceof URL && value.href
|
||||
});
|
||||
} catch (e) {
|
||||
let hint = ActionsReturnedInvalidDataError.hint;
|
||||
if (res.data instanceof Response) {
|
||||
hint = REDIRECT_STATUS_CODES.includes(res.data.status) ? "If you need to redirect when the action succeeds, trigger a redirect where the action is called. See the Actions guide for server and client redirect examples: https://docs.astro.build/en/guides/actions." : "If you need to return a Response object, try using a server endpoint instead. See https://docs.astro.build/en/guides/endpoints/#server-endpoints-api-routes";
|
||||
}
|
||||
throw new AstroError({
|
||||
...ActionsReturnedInvalidDataError,
|
||||
message: ActionsReturnedInvalidDataError.message(String(e)),
|
||||
hint
|
||||
});
|
||||
}
|
||||
return {
|
||||
type: "data",
|
||||
status: 200,
|
||||
contentType: "application/json+devalue",
|
||||
body
|
||||
};
|
||||
}
|
||||
function deserializeActionResult(res) {
|
||||
if (res.type === "error") {
|
||||
let json;
|
||||
try {
|
||||
json = JSON.parse(res.body);
|
||||
} catch {
|
||||
return {
|
||||
data: void 0,
|
||||
error: new ActionError({
|
||||
message: res.body,
|
||||
code: "INTERNAL_SERVER_ERROR"
|
||||
})
|
||||
};
|
||||
}
|
||||
if (Object.assign(__vite_import_meta_env__, { _: process.env._ })?.PROD) {
|
||||
return { error: ActionError.fromJson(json), data: void 0 };
|
||||
} else {
|
||||
const error = ActionError.fromJson(json);
|
||||
error.stack = actionResultErrorStack.get();
|
||||
return {
|
||||
error,
|
||||
data: void 0
|
||||
};
|
||||
}
|
||||
}
|
||||
if (res.type === "empty") {
|
||||
return { data: void 0, error: void 0 };
|
||||
}
|
||||
return {
|
||||
data: parse(res.body, {
|
||||
URL: (href) => new URL(href)
|
||||
}),
|
||||
error: void 0
|
||||
};
|
||||
}
|
||||
const actionResultErrorStack = /* @__PURE__ */ (function actionResultErrorStackFn() {
|
||||
let errorStack;
|
||||
return {
|
||||
set(stack) {
|
||||
errorStack = stack;
|
||||
},
|
||||
get() {
|
||||
return errorStack;
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
function template({
|
||||
title,
|
||||
pathname,
|
||||
statusCode = 404,
|
||||
tabTitle,
|
||||
body
|
||||
}) {
|
||||
return `<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>${tabTitle}</title>
|
||||
<style>
|
||||
:root {
|
||||
--gray-10: hsl(258, 7%, 10%);
|
||||
--gray-20: hsl(258, 7%, 20%);
|
||||
--gray-30: hsl(258, 7%, 30%);
|
||||
--gray-40: hsl(258, 7%, 40%);
|
||||
--gray-50: hsl(258, 7%, 50%);
|
||||
--gray-60: hsl(258, 7%, 60%);
|
||||
--gray-70: hsl(258, 7%, 70%);
|
||||
--gray-80: hsl(258, 7%, 80%);
|
||||
--gray-90: hsl(258, 7%, 90%);
|
||||
--black: #13151A;
|
||||
--accent-light: #E0CCFA;
|
||||
}
|
||||
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
html {
|
||||
background: var(--black);
|
||||
color-scheme: dark;
|
||||
accent-color: var(--accent-light);
|
||||
}
|
||||
|
||||
body {
|
||||
background-color: var(--gray-10);
|
||||
color: var(--gray-80);
|
||||
font-family: ui-monospace, Menlo, Monaco, "Cascadia Mono", "Segoe UI Mono", "Roboto Mono", "Oxygen Mono", "Ubuntu Monospace", "Source Code Pro", "Fira Mono", "Droid Sans Mono", "Courier New", monospace;
|
||||
line-height: 1.5;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
a {
|
||||
color: var(--accent-light);
|
||||
}
|
||||
|
||||
.center {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 100vh;
|
||||
width: 100vw;
|
||||
}
|
||||
|
||||
h1 {
|
||||
margin-bottom: 8px;
|
||||
color: white;
|
||||
font-family: system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
|
||||
font-weight: 700;
|
||||
margin-top: 1rem;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.statusCode {
|
||||
color: var(--accent-light);
|
||||
}
|
||||
|
||||
.astro-icon {
|
||||
height: 124px;
|
||||
width: 124px;
|
||||
}
|
||||
|
||||
pre, code {
|
||||
padding: 2px 8px;
|
||||
background: rgba(0,0,0, 0.25);
|
||||
border: 1px solid rgba(255,255,255, 0.25);
|
||||
border-radius: 4px;
|
||||
font-size: 1.2em;
|
||||
margin-top: 0;
|
||||
max-width: 60em;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<main class="center">
|
||||
<svg class="astro-icon" xmlns="http://www.w3.org/2000/svg" width="64" height="80" viewBox="0 0 64 80" fill="none"> <path d="M20.5253 67.6322C16.9291 64.3531 15.8793 57.4632 17.3776 52.4717C19.9755 55.6188 23.575 56.6157 27.3035 57.1784C33.0594 58.0468 38.7122 57.722 44.0592 55.0977C44.6709 54.7972 45.2362 54.3978 45.9045 53.9931C46.4062 55.4451 46.5368 56.9109 46.3616 58.4028C45.9355 62.0362 44.1228 64.8429 41.2397 66.9705C40.0868 67.8215 38.8669 68.5822 37.6762 69.3846C34.0181 71.8508 33.0285 74.7426 34.403 78.9491C34.4357 79.0516 34.4649 79.1541 34.5388 79.4042C32.6711 78.5705 31.3069 77.3565 30.2674 75.7604C29.1694 74.0757 28.6471 72.2121 28.6196 70.1957C28.6059 69.2144 28.6059 68.2244 28.4736 67.257C28.1506 64.8985 27.0406 63.8425 24.9496 63.7817C22.8036 63.7192 21.106 65.0426 20.6559 67.1268C20.6215 67.2865 20.5717 67.4446 20.5218 67.6304L20.5253 67.6322Z" fill="white"/> <path d="M20.5253 67.6322C16.9291 64.3531 15.8793 57.4632 17.3776 52.4717C19.9755 55.6188 23.575 56.6157 27.3035 57.1784C33.0594 58.0468 38.7122 57.722 44.0592 55.0977C44.6709 54.7972 45.2362 54.3978 45.9045 53.9931C46.4062 55.4451 46.5368 56.9109 46.3616 58.4028C45.9355 62.0362 44.1228 64.8429 41.2397 66.9705C40.0868 67.8215 38.8669 68.5822 37.6762 69.3846C34.0181 71.8508 33.0285 74.7426 34.403 78.9491C34.4357 79.0516 34.4649 79.1541 34.5388 79.4042C32.6711 78.5705 31.3069 77.3565 30.2674 75.7604C29.1694 74.0757 28.6471 72.2121 28.6196 70.1957C28.6059 69.2144 28.6059 68.2244 28.4736 67.257C28.1506 64.8985 27.0406 63.8425 24.9496 63.7817C22.8036 63.7192 21.106 65.0426 20.6559 67.1268C20.6215 67.2865 20.5717 67.4446 20.5218 67.6304L20.5253 67.6322Z" fill="url(#paint0_linear_738_686)"/> <path d="M0 51.6401C0 51.6401 10.6488 46.4654 21.3274 46.4654L29.3786 21.6102C29.6801 20.4082 30.5602 19.5913 31.5538 19.5913C32.5474 19.5913 33.4275 20.4082 33.7289 21.6102L41.7802 46.4654C54.4274 46.4654 63.1076 51.6401 63.1076 51.6401C63.1076 51.6401 45.0197 2.48776 44.9843 2.38914C44.4652 0.935933 43.5888 0 42.4073 0H20.7022C19.5206 0 18.6796 0.935933 18.1251 2.38914C18.086 2.4859 0 51.6401 0 51.6401Z" fill="white"/> <defs> <linearGradient id="paint0_linear_738_686" x1="31.554" y1="75.4423" x2="39.7462" y2="48.376" gradientUnits="userSpaceOnUse"> <stop stop-color="#D83333"/> <stop offset="1" stop-color="#F041FF"/> </linearGradient> </defs> </svg>
|
||||
<h1>${statusCode ? `<span class="statusCode">${statusCode}: </span> ` : ""}<span class="statusMessage">${title}</span></h1>
|
||||
${body || `
|
||||
<pre>Path: ${escape(pathname)}</pre>
|
||||
`}
|
||||
</main>
|
||||
</body>
|
||||
</html>`;
|
||||
}
|
||||
|
||||
const DEFAULT_404_ROUTE = {
|
||||
component: DEFAULT_404_COMPONENT,
|
||||
generate: () => "",
|
||||
params: [],
|
||||
pattern: /^\/404\/?$/,
|
||||
prerender: false,
|
||||
pathname: "/404",
|
||||
segments: [[{ content: "404", dynamic: false, spread: false }]],
|
||||
type: "page",
|
||||
route: "/404",
|
||||
fallbackRoutes: [],
|
||||
isIndex: false,
|
||||
origin: "internal"
|
||||
};
|
||||
function ensure404Route(manifest) {
|
||||
if (!manifest.routes.some((route) => route.route === "/404")) {
|
||||
manifest.routes.push(DEFAULT_404_ROUTE);
|
||||
}
|
||||
return manifest;
|
||||
}
|
||||
async function default404Page({ pathname }) {
|
||||
return new Response(
|
||||
template({
|
||||
statusCode: 404,
|
||||
title: "Not found",
|
||||
tabTitle: "404: Not Found",
|
||||
pathname
|
||||
}),
|
||||
{ status: 404, headers: { "Content-Type": "text/html" } }
|
||||
);
|
||||
}
|
||||
default404Page.isAstroComponentFactory = true;
|
||||
const default404Instance = {
|
||||
default: default404Page
|
||||
};
|
||||
|
||||
export { ActionError as A, DEFAULT_404_ROUTE as D, NOOP_MIDDLEWARE_FN as N, ACTION_RPC_ROUTE_PATTERN as a, ACTION_QUERY_PARAMS as b, default404Instance as c, deserializeActionResult as d, ensure404Route as e, getActionQueryString as g, serializeActionResult as s };
|
||||
2761
dist/server/chunks/astro/server_BRK6phUk.mjs
vendored
2761
dist/server/chunks/astro/server_BRK6phUk.mjs
vendored
File diff suppressed because it is too large
Load Diff
157
dist/server/chunks/fs-lite_COtHaKzy.mjs
vendored
157
dist/server/chunks/fs-lite_COtHaKzy.mjs
vendored
@@ -1,157 +0,0 @@
|
||||
import { promises, existsSync } from 'node:fs';
|
||||
import { resolve, dirname, join } from 'node:path';
|
||||
|
||||
function defineDriver(factory) {
|
||||
return factory;
|
||||
}
|
||||
function createError(driver, message, opts) {
|
||||
const err = new Error(`[unstorage] [${driver}] ${message}`, opts);
|
||||
if (Error.captureStackTrace) {
|
||||
Error.captureStackTrace(err, createError);
|
||||
}
|
||||
return err;
|
||||
}
|
||||
function createRequiredError(driver, name) {
|
||||
if (Array.isArray(name)) {
|
||||
return createError(
|
||||
driver,
|
||||
`Missing some of the required options ${name.map((n) => "`" + n + "`").join(", ")}`
|
||||
);
|
||||
}
|
||||
return createError(driver, `Missing required option \`${name}\`.`);
|
||||
}
|
||||
|
||||
function ignoreNotfound(err) {
|
||||
return err.code === "ENOENT" || err.code === "EISDIR" ? null : err;
|
||||
}
|
||||
function ignoreExists(err) {
|
||||
return err.code === "EEXIST" ? null : err;
|
||||
}
|
||||
async function writeFile(path, data, encoding) {
|
||||
await ensuredir(dirname(path));
|
||||
return promises.writeFile(path, data, encoding);
|
||||
}
|
||||
function readFile(path, encoding) {
|
||||
return promises.readFile(path, encoding).catch(ignoreNotfound);
|
||||
}
|
||||
function unlink(path) {
|
||||
return promises.unlink(path).catch(ignoreNotfound);
|
||||
}
|
||||
function readdir(dir) {
|
||||
return promises.readdir(dir, { withFileTypes: true }).catch(ignoreNotfound).then((r) => r || []);
|
||||
}
|
||||
async function ensuredir(dir) {
|
||||
if (existsSync(dir)) {
|
||||
return;
|
||||
}
|
||||
await ensuredir(dirname(dir)).catch(ignoreExists);
|
||||
await promises.mkdir(dir).catch(ignoreExists);
|
||||
}
|
||||
async function readdirRecursive(dir, ignore, maxDepth) {
|
||||
if (ignore && ignore(dir)) {
|
||||
return [];
|
||||
}
|
||||
const entries = await readdir(dir);
|
||||
const files = [];
|
||||
await Promise.all(
|
||||
entries.map(async (entry) => {
|
||||
const entryPath = resolve(dir, entry.name);
|
||||
if (entry.isDirectory()) {
|
||||
if (maxDepth === void 0 || maxDepth > 0) {
|
||||
const dirFiles = await readdirRecursive(
|
||||
entryPath,
|
||||
ignore,
|
||||
maxDepth === void 0 ? void 0 : maxDepth - 1
|
||||
);
|
||||
files.push(...dirFiles.map((f) => entry.name + "/" + f));
|
||||
}
|
||||
} else {
|
||||
if (!(ignore && ignore(entry.name))) {
|
||||
files.push(entry.name);
|
||||
}
|
||||
}
|
||||
})
|
||||
);
|
||||
return files;
|
||||
}
|
||||
async function rmRecursive(dir) {
|
||||
const entries = await readdir(dir);
|
||||
await Promise.all(
|
||||
entries.map((entry) => {
|
||||
const entryPath = resolve(dir, entry.name);
|
||||
if (entry.isDirectory()) {
|
||||
return rmRecursive(entryPath).then(() => promises.rmdir(entryPath));
|
||||
} else {
|
||||
return promises.unlink(entryPath);
|
||||
}
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
const PATH_TRAVERSE_RE = /\.\.:|\.\.$/;
|
||||
const DRIVER_NAME = "fs-lite";
|
||||
const fsLite = defineDriver((opts = {}) => {
|
||||
if (!opts.base) {
|
||||
throw createRequiredError(DRIVER_NAME, "base");
|
||||
}
|
||||
opts.base = resolve(opts.base);
|
||||
const r = (key) => {
|
||||
if (PATH_TRAVERSE_RE.test(key)) {
|
||||
throw createError(
|
||||
DRIVER_NAME,
|
||||
`Invalid key: ${JSON.stringify(key)}. It should not contain .. segments`
|
||||
);
|
||||
}
|
||||
const resolved = join(opts.base, key.replace(/:/g, "/"));
|
||||
return resolved;
|
||||
};
|
||||
return {
|
||||
name: DRIVER_NAME,
|
||||
options: opts,
|
||||
flags: {
|
||||
maxDepth: true
|
||||
},
|
||||
hasItem(key) {
|
||||
return existsSync(r(key));
|
||||
},
|
||||
getItem(key) {
|
||||
return readFile(r(key), "utf8");
|
||||
},
|
||||
getItemRaw(key) {
|
||||
return readFile(r(key));
|
||||
},
|
||||
async getMeta(key) {
|
||||
const { atime, mtime, size, birthtime, ctime } = await promises.stat(r(key)).catch(() => ({}));
|
||||
return { atime, mtime, size, birthtime, ctime };
|
||||
},
|
||||
setItem(key, value) {
|
||||
if (opts.readOnly) {
|
||||
return;
|
||||
}
|
||||
return writeFile(r(key), value, "utf8");
|
||||
},
|
||||
setItemRaw(key, value) {
|
||||
if (opts.readOnly) {
|
||||
return;
|
||||
}
|
||||
return writeFile(r(key), value);
|
||||
},
|
||||
removeItem(key) {
|
||||
if (opts.readOnly) {
|
||||
return;
|
||||
}
|
||||
return unlink(r(key));
|
||||
},
|
||||
getKeys(_base, topts) {
|
||||
return readdirRecursive(r("."), opts.ignore, topts?.maxDepth);
|
||||
},
|
||||
async clear() {
|
||||
if (opts.readOnly || opts.noClear) {
|
||||
return;
|
||||
}
|
||||
await rmRecursive(r("."));
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
export { fsLite as default };
|
||||
1597
dist/server/chunks/node_ul8Jhv1t.mjs
vendored
1597
dist/server/chunks/node_ul8Jhv1t.mjs
vendored
File diff suppressed because it is too large
Load Diff
188
dist/server/chunks/remote_OOD9OFqU.mjs
vendored
188
dist/server/chunks/remote_OOD9OFqU.mjs
vendored
@@ -1,188 +0,0 @@
|
||||
function appendForwardSlash(path) {
|
||||
return path.endsWith("/") ? path : path + "/";
|
||||
}
|
||||
function prependForwardSlash(path) {
|
||||
return path[0] === "/" ? path : "/" + path;
|
||||
}
|
||||
const MANY_TRAILING_SLASHES = /\/{2,}$/g;
|
||||
function collapseDuplicateTrailingSlashes(path, trailingSlash) {
|
||||
if (!path) {
|
||||
return path;
|
||||
}
|
||||
return path.replace(MANY_TRAILING_SLASHES, trailingSlash ? "/" : "") || "/";
|
||||
}
|
||||
function removeTrailingForwardSlash(path) {
|
||||
return path.endsWith("/") ? path.slice(0, path.length - 1) : path;
|
||||
}
|
||||
function removeLeadingForwardSlash(path) {
|
||||
return path.startsWith("/") ? path.substring(1) : path;
|
||||
}
|
||||
function trimSlashes(path) {
|
||||
return path.replace(/^\/|\/$/g, "");
|
||||
}
|
||||
function isString(path) {
|
||||
return typeof path === "string" || path instanceof String;
|
||||
}
|
||||
const INTERNAL_PREFIXES = /* @__PURE__ */ new Set(["/_", "/@", "/.", "//"]);
|
||||
const JUST_SLASHES = /^\/{2,}$/;
|
||||
function isInternalPath(path) {
|
||||
return INTERNAL_PREFIXES.has(path.slice(0, 2)) && !JUST_SLASHES.test(path);
|
||||
}
|
||||
function joinPaths(...paths) {
|
||||
return paths.filter(isString).map((path, i) => {
|
||||
if (i === 0) {
|
||||
return removeTrailingForwardSlash(path);
|
||||
} else if (i === paths.length - 1) {
|
||||
return removeLeadingForwardSlash(path);
|
||||
} else {
|
||||
return trimSlashes(path);
|
||||
}
|
||||
}).join("/");
|
||||
}
|
||||
function removeQueryString(path) {
|
||||
const index = path.lastIndexOf("?");
|
||||
return index > 0 ? path.substring(0, index) : path;
|
||||
}
|
||||
function isRemotePath(src) {
|
||||
if (!src) return false;
|
||||
const trimmed = src.trim();
|
||||
if (!trimmed) return false;
|
||||
let decoded = trimmed;
|
||||
let previousDecoded = "";
|
||||
let maxIterations = 10;
|
||||
while (decoded !== previousDecoded && maxIterations > 0) {
|
||||
previousDecoded = decoded;
|
||||
try {
|
||||
decoded = decodeURIComponent(decoded);
|
||||
} catch {
|
||||
break;
|
||||
}
|
||||
maxIterations--;
|
||||
}
|
||||
if (/^[a-zA-Z]:/.test(decoded)) {
|
||||
return false;
|
||||
}
|
||||
if (decoded[0] === "/" && decoded[1] !== "/" && decoded[1] !== "\\") {
|
||||
return false;
|
||||
}
|
||||
if (decoded[0] === "\\") {
|
||||
return true;
|
||||
}
|
||||
if (decoded.startsWith("//")) {
|
||||
return true;
|
||||
}
|
||||
try {
|
||||
const url = new URL(decoded, "http://n");
|
||||
if (url.username || url.password) {
|
||||
return true;
|
||||
}
|
||||
if (decoded.includes("@") && !url.pathname.includes("@") && !url.search.includes("@")) {
|
||||
return true;
|
||||
}
|
||||
if (url.origin !== "http://n") {
|
||||
const protocol = url.protocol.toLowerCase();
|
||||
if (protocol === "file:") {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
if (URL.canParse(decoded)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
} catch {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
function isParentDirectory(parentPath, childPath) {
|
||||
if (!parentPath || !childPath) {
|
||||
return false;
|
||||
}
|
||||
if (parentPath.includes("://") || childPath.includes("://")) {
|
||||
return false;
|
||||
}
|
||||
if (isRemotePath(parentPath) || isRemotePath(childPath)) {
|
||||
return false;
|
||||
}
|
||||
if (parentPath.includes("..") || childPath.includes("..")) {
|
||||
return false;
|
||||
}
|
||||
if (parentPath.includes("\0") || childPath.includes("\0")) {
|
||||
return false;
|
||||
}
|
||||
const normalizedParent = appendForwardSlash(slash(parentPath).toLowerCase());
|
||||
const normalizedChild = slash(childPath).toLowerCase();
|
||||
if (normalizedParent === normalizedChild || normalizedParent === normalizedChild + "/") {
|
||||
return false;
|
||||
}
|
||||
return normalizedChild.startsWith(normalizedParent);
|
||||
}
|
||||
function slash(path) {
|
||||
return path.replace(/\\/g, "/");
|
||||
}
|
||||
function fileExtension(path) {
|
||||
const ext = path.split(".").pop();
|
||||
return ext !== path ? `.${ext}` : "";
|
||||
}
|
||||
const WITH_FILE_EXT = /\/[^/]+\.\w+$/;
|
||||
function hasFileExtension(path) {
|
||||
return WITH_FILE_EXT.test(path);
|
||||
}
|
||||
|
||||
function matchPattern(url, remotePattern) {
|
||||
return matchProtocol(url, remotePattern.protocol) && matchHostname(url, remotePattern.hostname, true) && matchPort(url, remotePattern.port) && matchPathname(url, remotePattern.pathname, true);
|
||||
}
|
||||
function matchPort(url, port) {
|
||||
return !port || port === url.port;
|
||||
}
|
||||
function matchProtocol(url, protocol) {
|
||||
return !protocol || protocol === url.protocol.slice(0, -1);
|
||||
}
|
||||
function matchHostname(url, hostname, allowWildcard = false) {
|
||||
if (!hostname) {
|
||||
return true;
|
||||
} else if (!allowWildcard || !hostname.startsWith("*")) {
|
||||
return hostname === url.hostname;
|
||||
} else if (hostname.startsWith("**.")) {
|
||||
const slicedHostname = hostname.slice(2);
|
||||
return slicedHostname !== url.hostname && url.hostname.endsWith(slicedHostname);
|
||||
} else if (hostname.startsWith("*.")) {
|
||||
const slicedHostname = hostname.slice(1);
|
||||
const additionalSubdomains = url.hostname.replace(slicedHostname, "").split(".").filter(Boolean);
|
||||
return additionalSubdomains.length === 1;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
function matchPathname(url, pathname, allowWildcard = false) {
|
||||
if (!pathname) {
|
||||
return true;
|
||||
} else if (!allowWildcard || !pathname.endsWith("*")) {
|
||||
return pathname === url.pathname;
|
||||
} else if (pathname.endsWith("/**")) {
|
||||
const slicedPathname = pathname.slice(0, -2);
|
||||
return slicedPathname !== url.pathname && url.pathname.startsWith(slicedPathname);
|
||||
} else if (pathname.endsWith("/*")) {
|
||||
const slicedPathname = pathname.slice(0, -1);
|
||||
const additionalPathChunks = url.pathname.replace(slicedPathname, "").split("/").filter(Boolean);
|
||||
return additionalPathChunks.length === 1;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
function isRemoteAllowed(src, {
|
||||
domains,
|
||||
remotePatterns
|
||||
}) {
|
||||
if (!URL.canParse(src)) {
|
||||
return false;
|
||||
}
|
||||
const url = new URL(src);
|
||||
if (url.protocol === "data:") {
|
||||
return true;
|
||||
}
|
||||
if (!["http:", "https:"].includes(url.protocol)) {
|
||||
return false;
|
||||
}
|
||||
return domains.some((domain) => matchHostname(url, domain)) || remotePatterns.some((remotePattern) => matchPattern(url, remotePattern));
|
||||
}
|
||||
|
||||
export { isRemotePath as a, isParentDirectory as b, appendForwardSlash as c, removeTrailingForwardSlash as d, isInternalPath as e, fileExtension as f, collapseDuplicateTrailingSlashes as g, hasFileExtension as h, isRemoteAllowed as i, joinPaths as j, matchPattern as m, prependForwardSlash as p, removeQueryString as r, slash as s, trimSlashes as t };
|
||||
99
dist/server/chunks/sharp_DRkwzUY0.mjs
vendored
99
dist/server/chunks/sharp_DRkwzUY0.mjs
vendored
@@ -1,99 +0,0 @@
|
||||
import { A as AstroError, al as MissingSharp } from './astro/server_BRK6phUk.mjs';
|
||||
import { b as baseService, p as parseQuality } from './node_ul8Jhv1t.mjs';
|
||||
|
||||
let sharp;
|
||||
const qualityTable = {
|
||||
low: 25,
|
||||
mid: 50,
|
||||
high: 80,
|
||||
max: 100
|
||||
};
|
||||
async function loadSharp() {
|
||||
let sharpImport;
|
||||
try {
|
||||
sharpImport = (await import('sharp')).default;
|
||||
} catch {
|
||||
throw new AstroError(MissingSharp);
|
||||
}
|
||||
sharpImport.cache(false);
|
||||
return sharpImport;
|
||||
}
|
||||
const fitMap = {
|
||||
fill: "fill",
|
||||
contain: "inside",
|
||||
cover: "cover",
|
||||
none: "outside",
|
||||
"scale-down": "inside",
|
||||
outside: "outside",
|
||||
inside: "inside"
|
||||
};
|
||||
const sharpService = {
|
||||
validateOptions: baseService.validateOptions,
|
||||
getURL: baseService.getURL,
|
||||
parseURL: baseService.parseURL,
|
||||
getHTMLAttributes: baseService.getHTMLAttributes,
|
||||
getSrcSet: baseService.getSrcSet,
|
||||
async transform(inputBuffer, transformOptions, config) {
|
||||
if (!sharp) sharp = await loadSharp();
|
||||
const transform = transformOptions;
|
||||
if (transform.format === "svg") return { data: inputBuffer, format: "svg" };
|
||||
const result = sharp(inputBuffer, {
|
||||
failOnError: false,
|
||||
pages: -1,
|
||||
limitInputPixels: config.service.config.limitInputPixels
|
||||
});
|
||||
result.rotate();
|
||||
const withoutEnlargement = Boolean(transform.fit);
|
||||
if (transform.width && transform.height && transform.fit) {
|
||||
const fit = fitMap[transform.fit] ?? "inside";
|
||||
result.resize({
|
||||
width: Math.round(transform.width),
|
||||
height: Math.round(transform.height),
|
||||
fit,
|
||||
position: transform.position,
|
||||
withoutEnlargement
|
||||
});
|
||||
} else if (transform.height && !transform.width) {
|
||||
result.resize({
|
||||
height: Math.round(transform.height),
|
||||
withoutEnlargement
|
||||
});
|
||||
} else if (transform.width) {
|
||||
result.resize({
|
||||
width: Math.round(transform.width),
|
||||
withoutEnlargement
|
||||
});
|
||||
}
|
||||
if (transform.format) {
|
||||
let quality = void 0;
|
||||
if (transform.quality) {
|
||||
const parsedQuality = parseQuality(transform.quality);
|
||||
if (typeof parsedQuality === "number") {
|
||||
quality = parsedQuality;
|
||||
} else {
|
||||
quality = transform.quality in qualityTable ? qualityTable[transform.quality] : void 0;
|
||||
}
|
||||
}
|
||||
const isGifInput = inputBuffer[0] === 71 && // 'G'
|
||||
inputBuffer[1] === 73 && // 'I'
|
||||
inputBuffer[2] === 70 && // 'F'
|
||||
inputBuffer[3] === 56 && // '8'
|
||||
(inputBuffer[4] === 57 || inputBuffer[4] === 55) && // '9' or '7'
|
||||
inputBuffer[5] === 97;
|
||||
if (transform.format === "webp" && isGifInput) {
|
||||
result.webp({ quality: typeof quality === "number" ? quality : void 0, loop: 0 });
|
||||
} else {
|
||||
result.toFormat(transform.format, { quality });
|
||||
}
|
||||
}
|
||||
const { data, info } = await result.toBuffer({ resolveWithObject: true });
|
||||
const needsCopy = "buffer" in data && data.buffer instanceof SharedArrayBuffer;
|
||||
return {
|
||||
data: needsCopy ? new Uint8Array(data) : data,
|
||||
format: info.format
|
||||
};
|
||||
}
|
||||
};
|
||||
var sharp_default = sharpService;
|
||||
|
||||
export { sharp_default as default };
|
||||
39
dist/server/entry.mjs
vendored
39
dist/server/entry.mjs
vendored
@@ -1,39 +0,0 @@
|
||||
import { renderers } from './renderers.mjs';
|
||||
import { c as createExports, s as serverEntrypointModule } from './chunks/_@astrojs-ssr-adapter_DiODGAEm.mjs';
|
||||
import { manifest } from './manifest_mBJLiTM-.mjs';
|
||||
|
||||
const serverIslandMap = new Map();;
|
||||
|
||||
const _page0 = () => import('./pages/_image.astro.mjs');
|
||||
const _page1 = () => import('./pages/index.astro.mjs');
|
||||
const pageMap = new Map([
|
||||
["node_modules/astro/dist/assets/endpoint/node.js", _page0],
|
||||
["src/pages/index.astro", _page1]
|
||||
]);
|
||||
|
||||
const _manifest = Object.assign(manifest, {
|
||||
pageMap,
|
||||
serverIslandMap,
|
||||
renderers,
|
||||
actions: () => import('./noop-entrypoint.mjs'),
|
||||
middleware: () => import('./_noop-middleware.mjs')
|
||||
});
|
||||
const _args = {
|
||||
"mode": "standalone",
|
||||
"client": "file:///root/homewebsite/dist/client/",
|
||||
"server": "file:///root/homewebsite/dist/server/",
|
||||
"host": "0.0.0.0",
|
||||
"port": 7080,
|
||||
"assets": "_astro",
|
||||
"experimentalStaticHeaders": false
|
||||
};
|
||||
const _exports = createExports(_manifest, _args);
|
||||
const handler = _exports['handler'];
|
||||
const startServer = _exports['startServer'];
|
||||
const options = _exports['options'];
|
||||
const _start = 'start';
|
||||
if (Object.prototype.hasOwnProperty.call(serverEntrypointModule, _start)) {
|
||||
serverEntrypointModule[_start](_manifest, _args);
|
||||
}
|
||||
|
||||
export { handler, options, pageMap, startServer };
|
||||
102
dist/server/manifest_mBJLiTM-.mjs
vendored
102
dist/server/manifest_mBJLiTM-.mjs
vendored
@@ -1,102 +0,0 @@
|
||||
import 'kleur/colors';
|
||||
import { l as decodeKey } from './chunks/astro/server_BRK6phUk.mjs';
|
||||
import 'clsx';
|
||||
import 'cookie';
|
||||
import { N as NOOP_MIDDLEWARE_FN } from './chunks/astro-designed-error-pages_ByR6z9Nn.mjs';
|
||||
import 'es-module-lexer';
|
||||
|
||||
function sanitizeParams(params) {
|
||||
return Object.fromEntries(
|
||||
Object.entries(params).map(([key, value]) => {
|
||||
if (typeof value === "string") {
|
||||
return [key, value.normalize().replace(/#/g, "%23").replace(/\?/g, "%3F")];
|
||||
}
|
||||
return [key, value];
|
||||
})
|
||||
);
|
||||
}
|
||||
function getParameter(part, params) {
|
||||
if (part.spread) {
|
||||
return params[part.content.slice(3)] || "";
|
||||
}
|
||||
if (part.dynamic) {
|
||||
if (!params[part.content]) {
|
||||
throw new TypeError(`Missing parameter: ${part.content}`);
|
||||
}
|
||||
return params[part.content];
|
||||
}
|
||||
return part.content.normalize().replace(/\?/g, "%3F").replace(/#/g, "%23").replace(/%5B/g, "[").replace(/%5D/g, "]");
|
||||
}
|
||||
function getSegment(segment, params) {
|
||||
const segmentPath = segment.map((part) => getParameter(part, params)).join("");
|
||||
return segmentPath ? "/" + segmentPath : "";
|
||||
}
|
||||
function getRouteGenerator(segments, addTrailingSlash) {
|
||||
return (params) => {
|
||||
const sanitizedParams = sanitizeParams(params);
|
||||
let trailing = "";
|
||||
if (addTrailingSlash === "always" && segments.length) {
|
||||
trailing = "/";
|
||||
}
|
||||
const path = segments.map((segment) => getSegment(segment, sanitizedParams)).join("") + trailing;
|
||||
return path || "/";
|
||||
};
|
||||
}
|
||||
|
||||
function deserializeRouteData(rawRouteData) {
|
||||
return {
|
||||
route: rawRouteData.route,
|
||||
type: rawRouteData.type,
|
||||
pattern: new RegExp(rawRouteData.pattern),
|
||||
params: rawRouteData.params,
|
||||
component: rawRouteData.component,
|
||||
generate: getRouteGenerator(rawRouteData.segments, rawRouteData._meta.trailingSlash),
|
||||
pathname: rawRouteData.pathname || void 0,
|
||||
segments: rawRouteData.segments,
|
||||
prerender: rawRouteData.prerender,
|
||||
redirect: rawRouteData.redirect,
|
||||
redirectRoute: rawRouteData.redirectRoute ? deserializeRouteData(rawRouteData.redirectRoute) : void 0,
|
||||
fallbackRoutes: rawRouteData.fallbackRoutes.map((fallback) => {
|
||||
return deserializeRouteData(fallback);
|
||||
}),
|
||||
isIndex: rawRouteData.isIndex,
|
||||
origin: rawRouteData.origin
|
||||
};
|
||||
}
|
||||
|
||||
function deserializeManifest(serializedManifest) {
|
||||
const routes = [];
|
||||
for (const serializedRoute of serializedManifest.routes) {
|
||||
routes.push({
|
||||
...serializedRoute,
|
||||
routeData: deserializeRouteData(serializedRoute.routeData)
|
||||
});
|
||||
const route = serializedRoute;
|
||||
route.routeData = deserializeRouteData(serializedRoute.routeData);
|
||||
}
|
||||
const assets = new Set(serializedManifest.assets);
|
||||
const componentMetadata = new Map(serializedManifest.componentMetadata);
|
||||
const inlinedScripts = new Map(serializedManifest.inlinedScripts);
|
||||
const clientDirectives = new Map(serializedManifest.clientDirectives);
|
||||
const serverIslandNameMap = new Map(serializedManifest.serverIslandNameMap);
|
||||
const key = decodeKey(serializedManifest.key);
|
||||
return {
|
||||
// in case user middleware exists, this no-op middleware will be reassigned (see plugin-ssr.ts)
|
||||
middleware() {
|
||||
return { onRequest: NOOP_MIDDLEWARE_FN };
|
||||
},
|
||||
...serializedManifest,
|
||||
assets,
|
||||
componentMetadata,
|
||||
inlinedScripts,
|
||||
clientDirectives,
|
||||
routes,
|
||||
serverIslandNameMap,
|
||||
key
|
||||
};
|
||||
}
|
||||
|
||||
const manifest = deserializeManifest({"hrefRoot":"file:///root/homewebsite/","cacheDir":"file:///root/homewebsite/node_modules/.astro/","outDir":"file:///root/homewebsite/dist/","srcDir":"file:///root/homewebsite/src/","publicDir":"file:///root/homewebsite/public/","buildClientDir":"file:///root/homewebsite/dist/client/","buildServerDir":"file:///root/homewebsite/dist/server/","adapterName":"@astrojs/node","routes":[{"file":"","links":[],"scripts":[],"styles":[],"routeData":{"type":"page","component":"_server-islands.astro","params":["name"],"segments":[[{"content":"_server-islands","dynamic":false,"spread":false}],[{"content":"name","dynamic":true,"spread":false}]],"pattern":"^\\/_server-islands\\/([^/]+?)\\/?$","prerender":false,"isIndex":false,"fallbackRoutes":[],"route":"/_server-islands/[name]","origin":"internal","_meta":{"trailingSlash":"ignore"}}},{"file":"","links":[],"scripts":[],"styles":[],"routeData":{"type":"endpoint","isIndex":false,"route":"/_image","pattern":"^\\/_image\\/?$","segments":[[{"content":"_image","dynamic":false,"spread":false}]],"params":[],"component":"node_modules/astro/dist/assets/endpoint/node.js","pathname":"/_image","prerender":false,"fallbackRoutes":[],"origin":"internal","_meta":{"trailingSlash":"ignore"}}},{"file":"","links":[],"scripts":[],"styles":[],"routeData":{"route":"/","isIndex":true,"type":"page","pattern":"^\\/$","segments":[],"params":[],"component":"src/pages/index.astro","pathname":"/","prerender":false,"fallbackRoutes":[],"distURL":[],"origin":"project","_meta":{"trailingSlash":"ignore"}}}],"site":"https://juchatz.com","base":"/","trailingSlash":"ignore","compressHTML":true,"componentMetadata":[["/root/homewebsite/src/pages/index.astro",{"propagation":"none","containsHead":true}]],"renderers":[],"clientDirectives":[["idle","(()=>{var l=(n,t)=>{let i=async()=>{await(await n())()},e=typeof t.value==\"object\"?t.value:void 0,s={timeout:e==null?void 0:e.timeout};\"requestIdleCallback\"in window?window.requestIdleCallback(i,s):setTimeout(i,s.timeout||200)};(self.Astro||(self.Astro={})).idle=l;window.dispatchEvent(new Event(\"astro:idle\"));})();"],["load","(()=>{var e=async t=>{await(await t())()};(self.Astro||(self.Astro={})).load=e;window.dispatchEvent(new Event(\"astro:load\"));})();"],["media","(()=>{var n=(a,t)=>{let i=async()=>{await(await a())()};if(t.value){let e=matchMedia(t.value);e.matches?i():e.addEventListener(\"change\",i,{once:!0})}};(self.Astro||(self.Astro={})).media=n;window.dispatchEvent(new Event(\"astro:media\"));})();"],["only","(()=>{var e=async t=>{await(await t())()};(self.Astro||(self.Astro={})).only=e;window.dispatchEvent(new Event(\"astro:only\"));})();"],["visible","(()=>{var a=(s,i,o)=>{let r=async()=>{await(await s())()},t=typeof i.value==\"object\"?i.value:void 0,c={rootMargin:t==null?void 0:t.rootMargin},n=new IntersectionObserver(e=>{for(let l of e)if(l.isIntersecting){n.disconnect(),r();break}},c);for(let e of o.children)n.observe(e)};(self.Astro||(self.Astro={})).visible=a;window.dispatchEvent(new Event(\"astro:visible\"));})();"]],"entryModules":{"\u0000noop-middleware":"_noop-middleware.mjs","\u0000virtual:astro:actions/noop-entrypoint":"noop-entrypoint.mjs","\u0000@astro-page:src/pages/index@_@astro":"pages/index.astro.mjs","\u0000@astrojs-ssr-virtual-entry":"entry.mjs","\u0000@astro-renderers":"renderers.mjs","\u0000@astro-page:node_modules/astro/dist/assets/endpoint/node@_@js":"pages/_image.astro.mjs","\u0000@astrojs-ssr-adapter":"_@astrojs-ssr-adapter.mjs","\u0000@astrojs-manifest":"manifest_mBJLiTM-.mjs","/root/homewebsite/node_modules/unstorage/drivers/fs-lite.mjs":"chunks/fs-lite_COtHaKzy.mjs","/root/homewebsite/node_modules/astro/dist/assets/services/sharp.js":"chunks/sharp_DRkwzUY0.mjs","astro:scripts/before-hydration.js":""},"inlinedScripts":[],"assets":["/favicon.svg"],"buildFormat":"directory","checkOrigin":true,"allowedDomains":[],"serverIslandNameMap":[],"key":"JfNUK8vOdMs0TdCi6ckjfe+7rf2Ih/vxYPu55eWz0D4=","sessionConfig":{"driver":"fs-lite","options":{"base":"/root/homewebsite/node_modules/.astro/sessions"}}});
|
||||
if (manifest.sessionConfig) manifest.sessionConfig.driverModule = () => import('./chunks/fs-lite_COtHaKzy.mjs');
|
||||
|
||||
export { manifest };
|
||||
3
dist/server/noop-entrypoint.mjs
vendored
3
dist/server/noop-entrypoint.mjs
vendored
@@ -1,3 +0,0 @@
|
||||
const server = {};
|
||||
|
||||
export { server };
|
||||
2
dist/server/pages/_image.astro.mjs
vendored
2
dist/server/pages/_image.astro.mjs
vendored
@@ -1,2 +0,0 @@
|
||||
export { a as page } from '../chunks/node_ul8Jhv1t.mjs';
|
||||
export { renderers } from '../renderers.mjs';
|
||||
25
dist/server/pages/index.astro.mjs
vendored
25
dist/server/pages/index.astro.mjs
vendored
@@ -1,25 +0,0 @@
|
||||
import { e as createComponent, f as createAstro, h as addAttribute, k as renderHead, r as renderTemplate } from '../chunks/astro/server_BRK6phUk.mjs';
|
||||
import 'kleur/colors';
|
||||
import 'clsx';
|
||||
export { renderers } from '../renderers.mjs';
|
||||
|
||||
const $$Astro = createAstro();
|
||||
const $$Index = createComponent(($$result, $$props, $$slots) => {
|
||||
const Astro2 = $$result.createAstro($$Astro, $$props, $$slots);
|
||||
Astro2.self = $$Index;
|
||||
return renderTemplate`<html lang="en"> <head><meta charset="utf-8"><link rel="icon" type="image/svg+xml" href="/favicon.svg"><meta name="viewport" content="width=device-width"><meta name="generator"${addAttribute(Astro2.generator, "content")}><title>Astro</title>${renderHead()}</head> <body> <h1>Astro</h1> </body></html>`;
|
||||
}, "/root/homewebsite/src/pages/index.astro", void 0);
|
||||
|
||||
const $$file = "/root/homewebsite/src/pages/index.astro";
|
||||
const $$url = "";
|
||||
|
||||
const _page = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
||||
__proto__: null,
|
||||
default: $$Index,
|
||||
file: $$file,
|
||||
url: $$url
|
||||
}, Symbol.toStringTag, { value: 'Module' }));
|
||||
|
||||
const page = () => _page;
|
||||
|
||||
export { page };
|
||||
3
dist/server/renderers.mjs
vendored
3
dist/server/renderers.mjs
vendored
@@ -1,3 +0,0 @@
|
||||
const renderers = [];
|
||||
|
||||
export { renderers };
|
||||
1
node_modules/.astro/data-store.json
generated
vendored
1
node_modules/.astro/data-store.json
generated
vendored
@@ -1 +0,0 @@
|
||||
[["Map",1,2],"meta::meta",["Map",3,4,5,6],"astro-version","5.14.6","astro-config-digest","{\"root\":{},\"srcDir\":{},\"publicDir\":{},\"outDir\":{},\"cacheDir\":{},\"site\":\"https://juchatz.com\",\"compressHTML\":true,\"base\":\"/\",\"trailingSlash\":\"ignore\",\"output\":\"server\",\"scopedStyleStrategy\":\"attribute\",\"build\":{\"format\":\"directory\",\"client\":{},\"server\":{},\"assets\":\"_astro\",\"serverEntry\":\"entry.mjs\",\"redirects\":false,\"inlineStylesheets\":\"auto\",\"concurrency\":1},\"server\":{\"open\":false,\"host\":\"0.0.0.0\",\"port\":7080,\"streaming\":true,\"allowedHosts\":[]},\"redirects\":{},\"image\":{\"endpoint\":{\"route\":\"/_image\",\"entrypoint\":\"astro/assets/endpoint/node\"},\"service\":{\"entrypoint\":\"astro/assets/services/sharp\",\"config\":{}},\"domains\":[],\"remotePatterns\":[],\"responsiveStyles\":false},\"devToolbar\":{\"enabled\":true},\"markdown\":{\"syntaxHighlight\":{\"type\":\"shiki\",\"excludeLangs\":[\"math\"]},\"shikiConfig\":{\"langs\":[],\"langAlias\":{},\"theme\":\"github-dark\",\"themes\":{},\"wrap\":false,\"transformers\":[]},\"remarkPlugins\":[],\"rehypePlugins\":[],\"remarkRehype\":{},\"gfm\":true,\"smartypants\":true},\"security\":{\"checkOrigin\":true,\"allowedDomains\":[]},\"env\":{\"schema\":{},\"validateSecrets\":false},\"experimental\":{\"clientPrerender\":false,\"contentIntellisense\":false,\"headingIdCompat\":false,\"preserveScriptOrder\":false,\"liveContentCollections\":false,\"csp\":false,\"staticImportMetaEnv\":false,\"chromeDevtoolsWorkspace\":false,\"failOnPrerenderConflict\":false},\"legacy\":{\"collections\":false},\"session\":{\"driver\":\"fs-lite\",\"options\":{\"base\":\"/root/homewebsite/node_modules/.astro/sessions\"}}}"]
|
||||
1
node_modules/.bin/acorn
generated
vendored
1
node_modules/.bin/acorn
generated
vendored
@@ -1 +0,0 @@
|
||||
../acorn/bin/acorn
|
||||
1
node_modules/.bin/astro
generated
vendored
1
node_modules/.bin/astro
generated
vendored
@@ -1 +0,0 @@
|
||||
../astro/astro.js
|
||||
1
node_modules/.bin/cssesc
generated
vendored
1
node_modules/.bin/cssesc
generated
vendored
@@ -1 +0,0 @@
|
||||
../cssesc/bin/cssesc
|
||||
1
node_modules/.bin/esbuild
generated
vendored
1
node_modules/.bin/esbuild
generated
vendored
@@ -1 +0,0 @@
|
||||
../esbuild/bin/esbuild
|
||||
1
node_modules/.bin/is-docker
generated
vendored
1
node_modules/.bin/is-docker
generated
vendored
@@ -1 +0,0 @@
|
||||
../is-docker/cli.js
|
||||
1
node_modules/.bin/is-inside-container
generated
vendored
1
node_modules/.bin/is-inside-container
generated
vendored
@@ -1 +0,0 @@
|
||||
../is-inside-container/cli.js
|
||||
1
node_modules/.bin/js-yaml
generated
vendored
1
node_modules/.bin/js-yaml
generated
vendored
@@ -1 +0,0 @@
|
||||
../js-yaml/bin/js-yaml.js
|
||||
1
node_modules/.bin/nanoid
generated
vendored
1
node_modules/.bin/nanoid
generated
vendored
@@ -1 +0,0 @@
|
||||
../nanoid/bin/nanoid.cjs
|
||||
1
node_modules/.bin/parser
generated
vendored
1
node_modules/.bin/parser
generated
vendored
@@ -1 +0,0 @@
|
||||
../@babel/parser/bin/babel-parser.js
|
||||
1
node_modules/.bin/rollup
generated
vendored
1
node_modules/.bin/rollup
generated
vendored
@@ -1 +0,0 @@
|
||||
../rollup/dist/bin/rollup
|
||||
1
node_modules/.bin/semver
generated
vendored
1
node_modules/.bin/semver
generated
vendored
@@ -1 +0,0 @@
|
||||
../semver/bin/semver.js
|
||||
1
node_modules/.bin/sitemap
generated
vendored
1
node_modules/.bin/sitemap
generated
vendored
@@ -1 +0,0 @@
|
||||
../sitemap/dist/cli.js
|
||||
1
node_modules/.bin/tsc
generated
vendored
1
node_modules/.bin/tsc
generated
vendored
@@ -1 +0,0 @@
|
||||
../typescript/bin/tsc
|
||||
1
node_modules/.bin/tsconfck
generated
vendored
1
node_modules/.bin/tsconfck
generated
vendored
@@ -1 +0,0 @@
|
||||
../tsconfck/bin/tsconfck.js
|
||||
1
node_modules/.bin/tsserver
generated
vendored
1
node_modules/.bin/tsserver
generated
vendored
@@ -1 +0,0 @@
|
||||
../typescript/bin/tsserver
|
||||
1
node_modules/.bin/vite
generated
vendored
1
node_modules/.bin/vite
generated
vendored
@@ -1 +0,0 @@
|
||||
../vite/bin/vite.js
|
||||
5169
node_modules/.package-lock.json
generated
vendored
5169
node_modules/.package-lock.json
generated
vendored
File diff suppressed because it is too large
Load Diff
31
node_modules/.vite/deps/_metadata.json
generated
vendored
31
node_modules/.vite/deps/_metadata.json
generated
vendored
@@ -1,31 +0,0 @@
|
||||
{
|
||||
"hash": "3f8379cd",
|
||||
"configHash": "b954eaf4",
|
||||
"lockfileHash": "3432b1a7",
|
||||
"browserHash": "d085d3e0",
|
||||
"optimized": {
|
||||
"astro > cssesc": {
|
||||
"src": "../../cssesc/cssesc.js",
|
||||
"file": "astro___cssesc.js",
|
||||
"fileHash": "c2de14a5",
|
||||
"needsInterop": true
|
||||
},
|
||||
"astro > aria-query": {
|
||||
"src": "../../aria-query/lib/index.js",
|
||||
"file": "astro___aria-query.js",
|
||||
"fileHash": "a36c2232",
|
||||
"needsInterop": true
|
||||
},
|
||||
"astro > axobject-query": {
|
||||
"src": "../../axobject-query/lib/index.js",
|
||||
"file": "astro___axobject-query.js",
|
||||
"fileHash": "34d46228",
|
||||
"needsInterop": true
|
||||
}
|
||||
},
|
||||
"chunks": {
|
||||
"chunk-BUSYA2B4": {
|
||||
"file": "chunk-BUSYA2B4.js"
|
||||
}
|
||||
}
|
||||
}
|
||||
6776
node_modules/.vite/deps/astro___aria-query.js
generated
vendored
6776
node_modules/.vite/deps/astro___aria-query.js
generated
vendored
File diff suppressed because it is too large
Load Diff
7
node_modules/.vite/deps/astro___aria-query.js.map
generated
vendored
7
node_modules/.vite/deps/astro___aria-query.js.map
generated
vendored
File diff suppressed because one or more lines are too long
3754
node_modules/.vite/deps/astro___axobject-query.js
generated
vendored
3754
node_modules/.vite/deps/astro___axobject-query.js
generated
vendored
File diff suppressed because one or more lines are too long
7
node_modules/.vite/deps/astro___axobject-query.js.map
generated
vendored
7
node_modules/.vite/deps/astro___axobject-query.js.map
generated
vendored
File diff suppressed because one or more lines are too long
99
node_modules/.vite/deps/astro___cssesc.js
generated
vendored
99
node_modules/.vite/deps/astro___cssesc.js
generated
vendored
@@ -1,99 +0,0 @@
|
||||
import {
|
||||
__commonJS
|
||||
} from "./chunk-BUSYA2B4.js";
|
||||
|
||||
// node_modules/cssesc/cssesc.js
|
||||
var require_cssesc = __commonJS({
|
||||
"node_modules/cssesc/cssesc.js"(exports, module) {
|
||||
var object = {};
|
||||
var hasOwnProperty = object.hasOwnProperty;
|
||||
var merge = function merge2(options, defaults) {
|
||||
if (!options) {
|
||||
return defaults;
|
||||
}
|
||||
var result = {};
|
||||
for (var key in defaults) {
|
||||
result[key] = hasOwnProperty.call(options, key) ? options[key] : defaults[key];
|
||||
}
|
||||
return result;
|
||||
};
|
||||
var regexAnySingleEscape = /[ -,\.\/:-@\[-\^`\{-~]/;
|
||||
var regexSingleEscape = /[ -,\.\/:-@\[\]\^`\{-~]/;
|
||||
var regexExcessiveSpaces = /(^|\\+)?(\\[A-F0-9]{1,6})\x20(?![a-fA-F0-9\x20])/g;
|
||||
var cssesc = function cssesc2(string, options) {
|
||||
options = merge(options, cssesc2.options);
|
||||
if (options.quotes != "single" && options.quotes != "double") {
|
||||
options.quotes = "single";
|
||||
}
|
||||
var quote = options.quotes == "double" ? '"' : "'";
|
||||
var isIdentifier = options.isIdentifier;
|
||||
var firstChar = string.charAt(0);
|
||||
var output = "";
|
||||
var counter = 0;
|
||||
var length = string.length;
|
||||
while (counter < length) {
|
||||
var character = string.charAt(counter++);
|
||||
var codePoint = character.charCodeAt();
|
||||
var value = void 0;
|
||||
if (codePoint < 32 || codePoint > 126) {
|
||||
if (codePoint >= 55296 && codePoint <= 56319 && counter < length) {
|
||||
var extra = string.charCodeAt(counter++);
|
||||
if ((extra & 64512) == 56320) {
|
||||
codePoint = ((codePoint & 1023) << 10) + (extra & 1023) + 65536;
|
||||
} else {
|
||||
counter--;
|
||||
}
|
||||
}
|
||||
value = "\\" + codePoint.toString(16).toUpperCase() + " ";
|
||||
} else {
|
||||
if (options.escapeEverything) {
|
||||
if (regexAnySingleEscape.test(character)) {
|
||||
value = "\\" + character;
|
||||
} else {
|
||||
value = "\\" + codePoint.toString(16).toUpperCase() + " ";
|
||||
}
|
||||
} else if (/[\t\n\f\r\x0B]/.test(character)) {
|
||||
value = "\\" + codePoint.toString(16).toUpperCase() + " ";
|
||||
} else if (character == "\\" || !isIdentifier && (character == '"' && quote == character || character == "'" && quote == character) || isIdentifier && regexSingleEscape.test(character)) {
|
||||
value = "\\" + character;
|
||||
} else {
|
||||
value = character;
|
||||
}
|
||||
}
|
||||
output += value;
|
||||
}
|
||||
if (isIdentifier) {
|
||||
if (/^-[-\d]/.test(output)) {
|
||||
output = "\\-" + output.slice(1);
|
||||
} else if (/\d/.test(firstChar)) {
|
||||
output = "\\3" + firstChar + " " + output.slice(1);
|
||||
}
|
||||
}
|
||||
output = output.replace(regexExcessiveSpaces, function($0, $1, $2) {
|
||||
if ($1 && $1.length % 2) {
|
||||
return $0;
|
||||
}
|
||||
return ($1 || "") + $2;
|
||||
});
|
||||
if (!isIdentifier && options.wrap) {
|
||||
return quote + output + quote;
|
||||
}
|
||||
return output;
|
||||
};
|
||||
cssesc.options = {
|
||||
"escapeEverything": false,
|
||||
"isIdentifier": false,
|
||||
"quotes": "single",
|
||||
"wrap": false
|
||||
};
|
||||
cssesc.version = "3.0.0";
|
||||
module.exports = cssesc;
|
||||
}
|
||||
});
|
||||
export default require_cssesc();
|
||||
/*! Bundled license information:
|
||||
|
||||
cssesc/cssesc.js:
|
||||
(*! https://mths.be/cssesc v3.0.0 by @mathias *)
|
||||
*/
|
||||
//# sourceMappingURL=astro___cssesc.js.map
|
||||
7
node_modules/.vite/deps/astro___cssesc.js.map
generated
vendored
7
node_modules/.vite/deps/astro___cssesc.js.map
generated
vendored
@@ -1,7 +0,0 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../../cssesc/cssesc.js"],
|
||||
"sourcesContent": ["/*! https://mths.be/cssesc v3.0.0 by @mathias */\n'use strict';\n\nvar object = {};\nvar hasOwnProperty = object.hasOwnProperty;\nvar merge = function merge(options, defaults) {\n\tif (!options) {\n\t\treturn defaults;\n\t}\n\tvar result = {};\n\tfor (var key in defaults) {\n\t\t// `if (defaults.hasOwnProperty(key) { … }` is not needed here, since\n\t\t// only recognized option names are used.\n\t\tresult[key] = hasOwnProperty.call(options, key) ? options[key] : defaults[key];\n\t}\n\treturn result;\n};\n\nvar regexAnySingleEscape = /[ -,\\.\\/:-@\\[-\\^`\\{-~]/;\nvar regexSingleEscape = /[ -,\\.\\/:-@\\[\\]\\^`\\{-~]/;\nvar regexAlwaysEscape = /['\"\\\\]/;\nvar regexExcessiveSpaces = /(^|\\\\+)?(\\\\[A-F0-9]{1,6})\\x20(?![a-fA-F0-9\\x20])/g;\n\n// https://mathiasbynens.be/notes/css-escapes#css\nvar cssesc = function cssesc(string, options) {\n\toptions = merge(options, cssesc.options);\n\tif (options.quotes != 'single' && options.quotes != 'double') {\n\t\toptions.quotes = 'single';\n\t}\n\tvar quote = options.quotes == 'double' ? '\"' : '\\'';\n\tvar isIdentifier = options.isIdentifier;\n\n\tvar firstChar = string.charAt(0);\n\tvar output = '';\n\tvar counter = 0;\n\tvar length = string.length;\n\twhile (counter < length) {\n\t\tvar character = string.charAt(counter++);\n\t\tvar codePoint = character.charCodeAt();\n\t\tvar value = void 0;\n\t\t// If it’s not a printable ASCII character…\n\t\tif (codePoint < 0x20 || codePoint > 0x7E) {\n\t\t\tif (codePoint >= 0xD800 && codePoint <= 0xDBFF && counter < length) {\n\t\t\t\t// It’s a high surrogate, and there is a next character.\n\t\t\t\tvar extra = string.charCodeAt(counter++);\n\t\t\t\tif ((extra & 0xFC00) == 0xDC00) {\n\t\t\t\t\t// next character is low surrogate\n\t\t\t\t\tcodePoint = ((codePoint & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000;\n\t\t\t\t} else {\n\t\t\t\t\t// It’s an unmatched surrogate; only append this code unit, in case\n\t\t\t\t\t// the next code unit is the high surrogate of a surrogate pair.\n\t\t\t\t\tcounter--;\n\t\t\t\t}\n\t\t\t}\n\t\t\tvalue = '\\\\' + codePoint.toString(16).toUpperCase() + ' ';\n\t\t} else {\n\t\t\tif (options.escapeEverything) {\n\t\t\t\tif (regexAnySingleEscape.test(character)) {\n\t\t\t\t\tvalue = '\\\\' + character;\n\t\t\t\t} else {\n\t\t\t\t\tvalue = '\\\\' + codePoint.toString(16).toUpperCase() + ' ';\n\t\t\t\t}\n\t\t\t} else if (/[\\t\\n\\f\\r\\x0B]/.test(character)) {\n\t\t\t\tvalue = '\\\\' + codePoint.toString(16).toUpperCase() + ' ';\n\t\t\t} else if (character == '\\\\' || !isIdentifier && (character == '\"' && quote == character || character == '\\'' && quote == character) || isIdentifier && regexSingleEscape.test(character)) {\n\t\t\t\tvalue = '\\\\' + character;\n\t\t\t} else {\n\t\t\t\tvalue = character;\n\t\t\t}\n\t\t}\n\t\toutput += value;\n\t}\n\n\tif (isIdentifier) {\n\t\tif (/^-[-\\d]/.test(output)) {\n\t\t\toutput = '\\\\-' + output.slice(1);\n\t\t} else if (/\\d/.test(firstChar)) {\n\t\t\toutput = '\\\\3' + firstChar + ' ' + output.slice(1);\n\t\t}\n\t}\n\n\t// Remove spaces after `\\HEX` escapes that are not followed by a hex digit,\n\t// since they’re redundant. Note that this is only possible if the escape\n\t// sequence isn’t preceded by an odd number of backslashes.\n\toutput = output.replace(regexExcessiveSpaces, function ($0, $1, $2) {\n\t\tif ($1 && $1.length % 2) {\n\t\t\t// It’s not safe to remove the space, so don’t.\n\t\t\treturn $0;\n\t\t}\n\t\t// Strip the space.\n\t\treturn ($1 || '') + $2;\n\t});\n\n\tif (!isIdentifier && options.wrap) {\n\t\treturn quote + output + quote;\n\t}\n\treturn output;\n};\n\n// Expose default options (so they can be overridden globally).\ncssesc.options = {\n\t'escapeEverything': false,\n\t'isIdentifier': false,\n\t'quotes': 'single',\n\t'wrap': false\n};\n\ncssesc.version = '3.0.0';\n\nmodule.exports = cssesc;\n"],
|
||||
"mappings": ";;;;;AAAA;AAAA;AAGA,QAAI,SAAS,CAAC;AACd,QAAI,iBAAiB,OAAO;AAC5B,QAAI,QAAQ,SAASA,OAAM,SAAS,UAAU;AAC7C,UAAI,CAAC,SAAS;AACb,eAAO;AAAA,MACR;AACA,UAAI,SAAS,CAAC;AACd,eAAS,OAAO,UAAU;AAGzB,eAAO,GAAG,IAAI,eAAe,KAAK,SAAS,GAAG,IAAI,QAAQ,GAAG,IAAI,SAAS,GAAG;AAAA,MAC9E;AACA,aAAO;AAAA,IACR;AAEA,QAAI,uBAAuB;AAC3B,QAAI,oBAAoB;AAExB,QAAI,uBAAuB;AAG3B,QAAI,SAAS,SAASC,QAAO,QAAQ,SAAS;AAC7C,gBAAU,MAAM,SAASA,QAAO,OAAO;AACvC,UAAI,QAAQ,UAAU,YAAY,QAAQ,UAAU,UAAU;AAC7D,gBAAQ,SAAS;AAAA,MAClB;AACA,UAAI,QAAQ,QAAQ,UAAU,WAAW,MAAM;AAC/C,UAAI,eAAe,QAAQ;AAE3B,UAAI,YAAY,OAAO,OAAO,CAAC;AAC/B,UAAI,SAAS;AACb,UAAI,UAAU;AACd,UAAI,SAAS,OAAO;AACpB,aAAO,UAAU,QAAQ;AACxB,YAAI,YAAY,OAAO,OAAO,SAAS;AACvC,YAAI,YAAY,UAAU,WAAW;AACrC,YAAI,QAAQ;AAEZ,YAAI,YAAY,MAAQ,YAAY,KAAM;AACzC,cAAI,aAAa,SAAU,aAAa,SAAU,UAAU,QAAQ;AAEnE,gBAAI,QAAQ,OAAO,WAAW,SAAS;AACvC,iBAAK,QAAQ,UAAW,OAAQ;AAE/B,4BAAc,YAAY,SAAU,OAAO,QAAQ,QAAS;AAAA,YAC7D,OAAO;AAGN;AAAA,YACD;AAAA,UACD;AACA,kBAAQ,OAAO,UAAU,SAAS,EAAE,EAAE,YAAY,IAAI;AAAA,QACvD,OAAO;AACN,cAAI,QAAQ,kBAAkB;AAC7B,gBAAI,qBAAqB,KAAK,SAAS,GAAG;AACzC,sBAAQ,OAAO;AAAA,YAChB,OAAO;AACN,sBAAQ,OAAO,UAAU,SAAS,EAAE,EAAE,YAAY,IAAI;AAAA,YACvD;AAAA,UACD,WAAW,iBAAiB,KAAK,SAAS,GAAG;AAC5C,oBAAQ,OAAO,UAAU,SAAS,EAAE,EAAE,YAAY,IAAI;AAAA,UACvD,WAAW,aAAa,QAAQ,CAAC,iBAAiB,aAAa,OAAO,SAAS,aAAa,aAAa,OAAQ,SAAS,cAAc,gBAAgB,kBAAkB,KAAK,SAAS,GAAG;AAC1L,oBAAQ,OAAO;AAAA,UAChB,OAAO;AACN,oBAAQ;AAAA,UACT;AAAA,QACD;AACA,kBAAU;AAAA,MACX;AAEA,UAAI,cAAc;AACjB,YAAI,UAAU,KAAK,MAAM,GAAG;AAC3B,mBAAS,QAAQ,OAAO,MAAM,CAAC;AAAA,QAChC,WAAW,KAAK,KAAK,SAAS,GAAG;AAChC,mBAAS,QAAQ,YAAY,MAAM,OAAO,MAAM,CAAC;AAAA,QAClD;AAAA,MACD;AAKA,eAAS,OAAO,QAAQ,sBAAsB,SAAU,IAAI,IAAI,IAAI;AACnE,YAAI,MAAM,GAAG,SAAS,GAAG;AAExB,iBAAO;AAAA,QACR;AAEA,gBAAQ,MAAM,MAAM;AAAA,MACrB,CAAC;AAED,UAAI,CAAC,gBAAgB,QAAQ,MAAM;AAClC,eAAO,QAAQ,SAAS;AAAA,MACzB;AACA,aAAO;AAAA,IACR;AAGA,WAAO,UAAU;AAAA,MAChB,oBAAoB;AAAA,MACpB,gBAAgB;AAAA,MAChB,UAAU;AAAA,MACV,QAAQ;AAAA,IACT;AAEA,WAAO,UAAU;AAEjB,WAAO,UAAU;AAAA;AAAA;",
|
||||
"names": ["merge", "cssesc"]
|
||||
}
|
||||
8
node_modules/.vite/deps/chunk-BUSYA2B4.js
generated
vendored
8
node_modules/.vite/deps/chunk-BUSYA2B4.js
generated
vendored
@@ -1,8 +0,0 @@
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __commonJS = (cb, mod) => function __require() {
|
||||
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
||||
};
|
||||
|
||||
export {
|
||||
__commonJS
|
||||
};
|
||||
7
node_modules/.vite/deps/chunk-BUSYA2B4.js.map
generated
vendored
7
node_modules/.vite/deps/chunk-BUSYA2B4.js.map
generated
vendored
@@ -1,7 +0,0 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": [],
|
||||
"sourcesContent": [],
|
||||
"mappings": "",
|
||||
"names": []
|
||||
}
|
||||
3
node_modules/.vite/deps/package.json
generated
vendored
3
node_modules/.vite/deps/package.json
generated
vendored
@@ -1,3 +0,0 @@
|
||||
{
|
||||
"type": "module"
|
||||
}
|
||||
53
node_modules/@astrojs/compiler/LICENSE
generated
vendored
53
node_modules/@astrojs/compiler/LICENSE
generated
vendored
@@ -1,53 +0,0 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2021 [Astro contributors](https://github.com/withastro/compiler/graphs/contributors)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
"""
|
||||
This license applies to parts of the `internal/` subdirectory originating from
|
||||
the https://cs.opensource.google/go/x/net/+/master:html/ repository:
|
||||
|
||||
Copyright (c) 2009 The Go Authors. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above
|
||||
copyright notice, this list of conditions and the following disclaimer
|
||||
in the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
* Neither the name of Google Inc. nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
72
node_modules/@astrojs/compiler/README.md
generated
vendored
72
node_modules/@astrojs/compiler/README.md
generated
vendored
@@ -1,72 +0,0 @@
|
||||
# Astro Compiler
|
||||
|
||||
Astro’s [Go](https://golang.org/) + WASM compiler.
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
npm install @astrojs/compiler
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
#### Transform `.astro` to valid TypeScript
|
||||
|
||||
The Astro compiler can convert `.astro` syntax to a TypeScript Module whose default export generates HTML.
|
||||
|
||||
**Some notes**...
|
||||
|
||||
- TypeScript is valid `.astro` syntax! The output code may need an additional post-processing step to generate valid JavaScript.
|
||||
- `.astro` files rely on a server implementation exposed as `astro/runtime/server/index.js` in the Node ecosystem. Other runtimes currently need to bring their own rendering implementation and reference it via `internalURL`. This is a pain point we're looking into fixing.
|
||||
|
||||
```js
|
||||
import { transform, type TransformResult } from "@astrojs/compiler";
|
||||
|
||||
const result = await transform(source, {
|
||||
filename: "/Users/astro/Code/project/src/pages/index.astro",
|
||||
sourcemap: "both",
|
||||
internalURL: "astro/runtime/server/index.js",
|
||||
});
|
||||
```
|
||||
|
||||
#### Parse `.astro` and return an AST
|
||||
|
||||
The Astro compiler can emit an AST using the `parse` method.
|
||||
|
||||
**Some notes**...
|
||||
|
||||
- Position data is currently incomplete and in some cases incorrect. We're working on it!
|
||||
- A `TextNode` can represent both HTML `text` and JavaScript/TypeScript source code.
|
||||
- The `@astrojs/compiler/utils` entrypoint exposes `walk` and `walkAsync` functions that can be used to traverse the AST. It also exposes the `is` helper which can be used as guards to derive the proper types for each `node`.
|
||||
|
||||
```js
|
||||
import { parse } from "@astrojs/compiler";
|
||||
import { walk, walkAsync, is } from "@astrojs/compiler/utils";
|
||||
|
||||
const result = await parse(source, {
|
||||
position: false, // defaults to `true`
|
||||
});
|
||||
|
||||
walk(result.ast, (node) => {
|
||||
// `tag` nodes are `element` | `custom-element` | `component`
|
||||
if (is.tag(node)) {
|
||||
console.log(node.name);
|
||||
}
|
||||
});
|
||||
|
||||
await walkAsync(result.ast, async (node) => {
|
||||
if (is.tag(node)) {
|
||||
node.value = await expensiveCalculation(node)
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
## Develop
|
||||
|
||||
### VSCode / CodeSpaces
|
||||
|
||||
A `devcontainer` configuration is available for use with VSCode's [Remote Development extension pack](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.vscode-remote-extensionpack) and GitHub CodeSpaces.
|
||||
|
||||
## Contributing
|
||||
|
||||
[CONTRIBUTING.md](/CONTRIBUTING.md)
|
||||
BIN
node_modules/@astrojs/compiler/dist/astro.wasm
generated
vendored
BIN
node_modules/@astrojs/compiler/dist/astro.wasm
generated
vendored
Binary file not shown.
2
node_modules/@astrojs/compiler/dist/browser/index.cjs
generated
vendored
2
node_modules/@astrojs/compiler/dist/browser/index.cjs
generated
vendored
File diff suppressed because one or more lines are too long
11
node_modules/@astrojs/compiler/dist/browser/index.d.ts
generated
vendored
11
node_modules/@astrojs/compiler/dist/browser/index.d.ts
generated
vendored
@@ -1,11 +0,0 @@
|
||||
import { transform as transform$1, parse as parse$1, convertToTSX as convertToTSX$1, teardown as teardown$1, initialize as initialize$1 } from '../shared/types.js';
|
||||
import '../shared/ast.js';
|
||||
import '../shared/diagnostics.js';
|
||||
|
||||
declare const transform: typeof transform$1;
|
||||
declare const parse: typeof parse$1;
|
||||
declare const convertToTSX: typeof convertToTSX$1;
|
||||
declare const teardown: typeof teardown$1;
|
||||
declare const initialize: typeof initialize$1;
|
||||
|
||||
export { convertToTSX, initialize, parse, teardown, transform };
|
||||
1
node_modules/@astrojs/compiler/dist/browser/index.js
generated
vendored
1
node_modules/@astrojs/compiler/dist/browser/index.js
generated
vendored
@@ -1 +0,0 @@
|
||||
import{a as f}from"../chunk-QR6QDSEV.js";var u=(t,e)=>p().transform(t,e),S=(t,e)=>p().parse(t,e),v=(t,e)=>p().convertToTSX(t,e),a,i,h=()=>{a=void 0,i=void 0,globalThis["@astrojs/compiler"]=void 0},T=async t=>{let e=t.wasmURL;if(!e)throw new Error('Must provide the "wasmURL" option');e+="",a||(a=m(e).catch(n=>{throw a=void 0,n})),i=i||await a},p=()=>{if(!a)throw new Error('You need to call "initialize" before calling this');if(!i)throw new Error('You need to wait for the promise returned from "initialize" to be resolved before calling this');return i},y=async(t,e)=>{let n;return WebAssembly.instantiateStreaming?n=await WebAssembly.instantiateStreaming(fetch(t),e):n=await(async()=>{let s=await fetch(t).then(o=>o.arrayBuffer());return WebAssembly.instantiate(s,e)})(),n},m=async t=>{let e=new f,n=await y(t,e.importObject);e.run(n.instance);let c=globalThis["@astrojs/compiler"];return{transform:(s,o)=>new Promise(r=>r(c.transform(s,o||{}))),convertToTSX:(s,o)=>new Promise(r=>r(c.convertToTSX(s,o||{}))).then(r=>({...r,map:JSON.parse(r.map)})),parse:(s,o)=>new Promise(r=>r(c.parse(s,o||{}))).then(r=>({...r,ast:JSON.parse(r.ast)}))}};export{v as convertToTSX,T as initialize,S as parse,h as teardown,u as transform};
|
||||
3
node_modules/@astrojs/compiler/dist/browser/utils.cjs
generated
vendored
3
node_modules/@astrojs/compiler/dist/browser/utils.cjs
generated
vendored
@@ -1,3 +0,0 @@
|
||||
"use strict";var c=Object.defineProperty;var d=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var N=Object.prototype.hasOwnProperty;var u=(o,e)=>{for(var t in e)c(o,t,{get:e[t],enumerable:!0})},f=(o,e,t,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of p(e))!N.call(o,r)&&r!==t&&c(o,r,{get:()=>e[r],enumerable:!(a=d(e,r))||a.enumerable});return o};var y=o=>f(c({},"__esModule",{value:!0}),o);var v={};u(v,{is:()=>s,serialize:()=>k,walk:()=>h,walkAsync:()=>x});module.exports=y(v);function n(o){return e=>e.type===o}var s={parent(o){return Array.isArray(o.children)},literal(o){return typeof o.value=="string"},tag(o){return o.type==="element"||o.type==="custom-element"||o.type==="component"||o.type==="fragment"},whitespace(o){return o.type==="text"&&o.value.trim().length===0},root:n("root"),element:n("element"),customElement:n("custom-element"),component:n("component"),fragment:n("fragment"),expression:n("expression"),text:n("text"),doctype:n("doctype"),comment:n("comment"),frontmatter:n("frontmatter")},l=class{constructor(e){this.callback=e}async visit(e,t,a){if(await this.callback(e,t,a),s.parent(e)){let r=[];for(let i=0;i<e.children.length;i++){let m=e.children[i];r.push(this.callback(m,e,i))}await Promise.all(r)}}};function h(o,e){new l(e).visit(o)}function x(o,e){return new l(e).visit(o)}function g(o){let e="";for(let t of o.attributes)switch(e+=" ",t.kind){case"empty":{e+=`${t.name}`;break}case"expression":{e+=`${t.name}={${t.value}}`;break}case"quoted":{e+=`${t.name}=${t.raw}`;break}case"template-literal":{e+=`${t.name}=\`${t.value}\``;break}case"shorthand":{e+=`{${t.name}}`;break}case"spread":{e+=`{...${t.value}}`;break}}return e}function k(o,e={selfClose:!0}){let t="";function a(r){if(s.root(r))for(let i of r.children)a(i);else if(s.frontmatter(r))t+=`---${r.value}---
|
||||
|
||||
`;else if(s.comment(r))t+=`<!--${r.value}-->`;else if(s.expression(r)){t+="{";for(let i of r.children)a(i);t+="}"}else if(s.literal(r))t+=r.value;else if(s.tag(r))if(t+=`<${r.name}`,t+=g(r),r.children.length===0&&e.selfClose)t+=" />";else{t+=">";for(let i of r.children)a(i);t+=`</${r.name}>`}}return a(o),t}0&&(module.exports={is,serialize,walk,walkAsync});
|
||||
29
node_modules/@astrojs/compiler/dist/browser/utils.d.ts
generated
vendored
29
node_modules/@astrojs/compiler/dist/browser/utils.d.ts
generated
vendored
@@ -1,29 +0,0 @@
|
||||
import { Node, ParentNode, LiteralNode, TagLikeNode, TextNode, RootNode, ElementNode, CustomElementNode, ComponentNode, FragmentNode, ExpressionNode, DoctypeNode, CommentNode, FrontmatterNode } from '../shared/ast.js';
|
||||
|
||||
type Visitor = (node: Node, parent?: ParentNode, index?: number) => void | Promise<void>;
|
||||
declare const is: {
|
||||
parent(node: Node): node is ParentNode;
|
||||
literal(node: Node): node is LiteralNode;
|
||||
tag(node: Node): node is TagLikeNode;
|
||||
whitespace(node: Node): node is TextNode;
|
||||
root: (node: Node) => node is RootNode;
|
||||
element: (node: Node) => node is ElementNode;
|
||||
customElement: (node: Node) => node is CustomElementNode;
|
||||
component: (node: Node) => node is ComponentNode;
|
||||
fragment: (node: Node) => node is FragmentNode;
|
||||
expression: (node: Node) => node is ExpressionNode;
|
||||
text: (node: Node) => node is TextNode;
|
||||
doctype: (node: Node) => node is DoctypeNode;
|
||||
comment: (node: Node) => node is CommentNode;
|
||||
frontmatter: (node: Node) => node is FrontmatterNode;
|
||||
};
|
||||
declare function walk(node: ParentNode, callback: Visitor): void;
|
||||
declare function walkAsync(node: ParentNode, callback: Visitor): Promise<void>;
|
||||
interface SerializeOptions {
|
||||
selfClose: boolean;
|
||||
}
|
||||
/** @deprecated Please use `SerializeOptions` */
|
||||
type SerializeOtions = SerializeOptions;
|
||||
declare function serialize(root: Node, opts?: SerializeOptions): string;
|
||||
|
||||
export { SerializeOptions, SerializeOtions, Visitor, is, serialize, walk, walkAsync };
|
||||
3
node_modules/@astrojs/compiler/dist/browser/utils.js
generated
vendored
3
node_modules/@astrojs/compiler/dist/browser/utils.js
generated
vendored
@@ -1,3 +0,0 @@
|
||||
function n(o){return t=>t.type===o}var a={parent(o){return Array.isArray(o.children)},literal(o){return typeof o.value=="string"},tag(o){return o.type==="element"||o.type==="custom-element"||o.type==="component"||o.type==="fragment"},whitespace(o){return o.type==="text"&&o.value.trim().length===0},root:n("root"),element:n("element"),customElement:n("custom-element"),component:n("component"),fragment:n("fragment"),expression:n("expression"),text:n("text"),doctype:n("doctype"),comment:n("comment"),frontmatter:n("frontmatter")},l=class{constructor(t){this.callback=t}async visit(t,e,s){if(await this.callback(t,e,s),a.parent(t)){let r=[];for(let i=0;i<t.children.length;i++){let c=t.children[i];r.push(this.callback(c,t,i))}await Promise.all(r)}}};function N(o,t){new l(t).visit(o)}function u(o,t){return new l(t).visit(o)}function m(o){let t="";for(let e of o.attributes)switch(t+=" ",e.kind){case"empty":{t+=`${e.name}`;break}case"expression":{t+=`${e.name}={${e.value}}`;break}case"quoted":{t+=`${e.name}=${e.raw}`;break}case"template-literal":{t+=`${e.name}=\`${e.value}\``;break}case"shorthand":{t+=`{${e.name}}`;break}case"spread":{t+=`{...${e.value}}`;break}}return t}function f(o,t={selfClose:!0}){let e="";function s(r){if(a.root(r))for(let i of r.children)s(i);else if(a.frontmatter(r))e+=`---${r.value}---
|
||||
|
||||
`;else if(a.comment(r))e+=`<!--${r.value}-->`;else if(a.expression(r)){e+="{";for(let i of r.children)s(i);e+="}"}else if(a.literal(r))e+=r.value;else if(a.tag(r))if(e+=`<${r.name}`,e+=m(r),r.children.length===0&&t.selfClose)e+=" />";else{e+=">";for(let i of r.children)s(i);e+=`</${r.name}>`}}return s(o),e}export{a as is,f as serialize,N as walk,u as walkAsync};
|
||||
2
node_modules/@astrojs/compiler/dist/browser/wasm_exec.cjs
generated
vendored
2
node_modules/@astrojs/compiler/dist/browser/wasm_exec.cjs
generated
vendored
File diff suppressed because one or more lines are too long
37
node_modules/@astrojs/compiler/dist/browser/wasm_exec.d.ts
generated
vendored
37
node_modules/@astrojs/compiler/dist/browser/wasm_exec.d.ts
generated
vendored
@@ -1,37 +0,0 @@
|
||||
declare class Go {
|
||||
importObject: {
|
||||
gojs: {
|
||||
'runtime.wasmExit': (sp: any) => void;
|
||||
'runtime.wasmWrite': (sp: any) => void;
|
||||
'runtime.resetMemoryDataView': (sp: any) => void;
|
||||
'runtime.nanotime1': (sp: any) => void;
|
||||
'runtime.walltime': (sp: any) => void;
|
||||
'runtime.scheduleTimeoutEvent': (sp: any) => void;
|
||||
'runtime.clearTimeoutEvent': (sp: any) => void;
|
||||
'runtime.getRandomData': (sp: any) => void;
|
||||
'syscall/js.finalizeRef': (sp: any) => void;
|
||||
'syscall/js.stringVal': (sp: any) => void;
|
||||
'syscall/js.valueGet': (sp: any) => void;
|
||||
'syscall/js.valueSet': (sp: any) => void;
|
||||
'syscall/js.valueDelete': (sp: any) => void;
|
||||
'syscall/js.valueIndex': (sp: any) => void;
|
||||
'syscall/js.valueSetIndex': (sp: any) => void;
|
||||
'syscall/js.valueCall': (sp: any) => void;
|
||||
'syscall/js.valueInvoke': (sp: any) => void;
|
||||
'syscall/js.valueNew': (sp: any) => void;
|
||||
'syscall/js.valueLength': (sp: any) => void;
|
||||
'syscall/js.valuePrepareString': (sp: any) => void;
|
||||
'syscall/js.valueLoadString': (sp: any) => void;
|
||||
'syscall/js.valueInstanceOf': (sp: any) => void;
|
||||
'syscall/js.copyBytesToGo': (sp: any) => void;
|
||||
'syscall/js.copyBytesToJS': (sp: any) => void;
|
||||
debug: (value: any) => void;
|
||||
};
|
||||
};
|
||||
constructor();
|
||||
run(instance: any): Promise<void>;
|
||||
private _resume;
|
||||
private _makeFuncWrapper;
|
||||
}
|
||||
|
||||
export { Go as default };
|
||||
1
node_modules/@astrojs/compiler/dist/browser/wasm_exec.js
generated
vendored
1
node_modules/@astrojs/compiler/dist/browser/wasm_exec.js
generated
vendored
@@ -1 +0,0 @@
|
||||
import{a}from"../chunk-QR6QDSEV.js";export{a as default};
|
||||
2
node_modules/@astrojs/compiler/dist/chunk-QR6QDSEV.js
generated
vendored
2
node_modules/@astrojs/compiler/dist/chunk-QR6QDSEV.js
generated
vendored
File diff suppressed because one or more lines are too long
1
node_modules/@astrojs/compiler/dist/chunk-W5DTLHV4.js
generated
vendored
1
node_modules/@astrojs/compiler/dist/chunk-W5DTLHV4.js
generated
vendored
File diff suppressed because one or more lines are too long
1
node_modules/@astrojs/compiler/dist/node/index.cjs
generated
vendored
1
node_modules/@astrojs/compiler/dist/node/index.cjs
generated
vendored
File diff suppressed because one or more lines are too long
12
node_modules/@astrojs/compiler/dist/node/index.d.ts
generated
vendored
12
node_modules/@astrojs/compiler/dist/node/index.d.ts
generated
vendored
@@ -1,12 +0,0 @@
|
||||
import { transform as transform$1, parse as parse$1, convertToTSX as convertToTSX$1, teardown as teardown$1 } from '../shared/types.js';
|
||||
export { HoistedScript, ParseOptions, ParseResult, PreprocessorResult, TransformOptions, TransformResult } from '../shared/types.js';
|
||||
import '../shared/ast.js';
|
||||
import '../shared/diagnostics.js';
|
||||
|
||||
declare const transform: typeof transform$1;
|
||||
declare const parse: typeof parse$1;
|
||||
declare const convertToTSX: typeof convertToTSX$1;
|
||||
declare const compile: (template: string) => Promise<string>;
|
||||
declare const teardown: typeof teardown$1;
|
||||
|
||||
export { compile, convertToTSX, parse, teardown, transform };
|
||||
1
node_modules/@astrojs/compiler/dist/node/index.js
generated
vendored
1
node_modules/@astrojs/compiler/dist/node/index.js
generated
vendored
@@ -1 +0,0 @@
|
||||
import{a as c}from"../chunk-W5DTLHV4.js";import{promises as m}from"fs";import{fileURLToPath as f}from"url";var w=async(t,s)=>i().then(r=>r.transform(t,s)),l=async(t,s)=>i().then(r=>r.parse(t,s)),b=async(t,s)=>i().then(r=>r.convertToTSX(t,s)),P=async t=>{let{default:s}=await import(`data:text/javascript;charset=utf-8;base64,${Buffer.from(t).toString("base64")}`);return s},n,g=()=>{n=void 0,globalThis["@astrojs/compiler"]=void 0},i=()=>(n||(n=d().catch(t=>{throw n=void 0,t})),n),y=async(t,s)=>{let r;return r=await(async()=>{let o=await m.readFile(t).then(e=>e.buffer);return WebAssembly.instantiate(new Uint8Array(o),s)})(),r},d=async()=>{let t=new c,s=await y(f(new URL("../astro.wasm",import.meta.url)),t.importObject);t.run(s.instance);let r=globalThis["@astrojs/compiler"];return{transform:(a,o)=>new Promise(e=>{try{e(r.transform(a,o||{}))}catch(p){throw n=void 0,p}}),parse:(a,o)=>new Promise(e=>e(r.parse(a,o||{}))).catch(e=>{throw n=void 0,e}).then(e=>({...e,ast:JSON.parse(e.ast)})),convertToTSX:(a,o)=>new Promise(e=>e(r.convertToTSX(a,o||{}))).catch(e=>{throw n=void 0,e}).then(e=>({...e,map:JSON.parse(e.map)}))}};export{P as compile,b as convertToTSX,l as parse,g as teardown,w as transform};
|
||||
1
node_modules/@astrojs/compiler/dist/node/sync.cjs
generated
vendored
1
node_modules/@astrojs/compiler/dist/node/sync.cjs
generated
vendored
File diff suppressed because one or more lines are too long
16
node_modules/@astrojs/compiler/dist/node/sync.d.ts
generated
vendored
16
node_modules/@astrojs/compiler/dist/node/sync.d.ts
generated
vendored
@@ -1,16 +0,0 @@
|
||||
import { TransformOptions, TransformResult, ParseOptions, ParseResult, ConvertToTSXOptions, TSXResult, transform as transform$1, parse as parse$1, convertToTSX as convertToTSX$1 } from '../shared/types.js';
|
||||
import '../shared/ast.js';
|
||||
import '../shared/diagnostics.js';
|
||||
|
||||
type UnwrappedPromise<T> = T extends (...params: any) => Promise<infer Return> ? (...params: Parameters<T>) => Return : T;
|
||||
interface Service {
|
||||
transform: UnwrappedPromise<typeof transform$1>;
|
||||
parse: UnwrappedPromise<typeof parse$1>;
|
||||
convertToTSX: UnwrappedPromise<typeof convertToTSX$1>;
|
||||
}
|
||||
declare const transform: (input: string, options: TransformOptions | undefined) => TransformResult;
|
||||
declare const parse: (input: string, options: ParseOptions | undefined) => ParseResult;
|
||||
declare const convertToTSX: (input: string, options: ConvertToTSXOptions | undefined) => TSXResult;
|
||||
declare function startRunningService(): Service;
|
||||
|
||||
export { convertToTSX, parse, startRunningService, transform };
|
||||
1
node_modules/@astrojs/compiler/dist/node/sync.js
generated
vendored
1
node_modules/@astrojs/compiler/dist/node/sync.js
generated
vendored
@@ -1 +0,0 @@
|
||||
import{a as c}from"../chunk-W5DTLHV4.js";import{readFileSync as p}from"fs";import{fileURLToPath as m}from"url";function i(){return s||(s=f()),s}var s,l=(e,t)=>i().transform(e,t),w=(e,t)=>i().parse(e,t),h=(e,t)=>i().convertToTSX(e,t);function f(){let e=new c,t=v(m(new URL("../astro.wasm",import.meta.url)),e.importObject);e.run(t);let o=globalThis["@astrojs/compiler"];return{transform:(n,a)=>{try{return o.transform(n,a||{})}catch(r){throw s=void 0,r}},parse:(n,a)=>{try{let r=o.parse(n,a||{});return{...r,ast:JSON.parse(r.ast)}}catch(r){throw s=void 0,r}},convertToTSX:(n,a)=>{try{let r=o.convertToTSX(n,a||{});return{...r,map:JSON.parse(r.map)}}catch(r){throw s=void 0,r}}}}function v(e,t){let o=p(e);return new WebAssembly.Instance(new WebAssembly.Module(o),t)}export{h as convertToTSX,w as parse,f as startRunningService,l as transform};
|
||||
3
node_modules/@astrojs/compiler/dist/node/utils.cjs
generated
vendored
3
node_modules/@astrojs/compiler/dist/node/utils.cjs
generated
vendored
@@ -1,3 +0,0 @@
|
||||
"use strict";var m=Object.defineProperty;var d=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var N=Object.prototype.hasOwnProperty;var u=(o,e)=>{for(var t in e)m(o,t,{get:e[t],enumerable:!0})},f=(o,e,t,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of p(e))!N.call(o,r)&&r!==t&&m(o,r,{get:()=>e[r],enumerable:!(a=d(e,r))||a.enumerable});return o};var y=o=>f(m({},"__esModule",{value:!0}),o);var v={};u(v,{is:()=>s,serialize:()=>k,walk:()=>h,walkAsync:()=>x});module.exports=y(v);function n(o){return e=>e.type===o}var s={parent(o){return Array.isArray(o.children)},literal(o){return typeof o.value=="string"},tag(o){return o.type==="element"||o.type==="custom-element"||o.type==="component"||o.type==="fragment"},whitespace(o){return o.type==="text"&&o.value.trim().length===0},root:n("root"),element:n("element"),customElement:n("custom-element"),component:n("component"),fragment:n("fragment"),expression:n("expression"),text:n("text"),doctype:n("doctype"),comment:n("comment"),frontmatter:n("frontmatter")},l=class{constructor(e){this.callback=e}async visit(e,t,a){if(await this.callback(e,t,a),s.parent(e)){let r=[];for(let i=0;i<e.children.length;i++){let c=e.children[i];r.push(this.callback(c,e,i))}await Promise.all(r)}}};function h(o,e){new l(e).visit(o)}function x(o,e){return new l(e).visit(o)}function g(o){let e="";for(let t of o.attributes)switch(e+=" ",t.kind){case"empty":{e+=`${t.name}`;break}case"expression":{e+=`${t.name}={${t.value}}`;break}case"quoted":{e+=`${t.name}=${t.raw}`;break}case"template-literal":{e+=`${t.name}=\`${t.value}\``;break}case"shorthand":{e+=`{${t.name}}`;break}case"spread":{e+=`{...${t.name}}`;break}}return e}function k(o,e={selfClose:!0}){let t="";function a(r){if(s.root(r))for(let i of r.children)a(i);else if(s.frontmatter(r))t+=`---${r.value}---
|
||||
|
||||
`;else if(s.comment(r))t+=`<!--${r.value}-->`;else if(s.expression(r)){t+="{";for(let i of r.children)a(i);t+="}"}else if(s.literal(r))t+=r.value;else if(s.tag(r))if(t+=`<${r.name}`,t+=g(r),r.children.length===0&&e.selfClose)t+=" />";else{t+=">";for(let i of r.children)a(i);t+=`</${r.name}>`}}return a(o),t}0&&(module.exports={is,serialize,walk,walkAsync});
|
||||
29
node_modules/@astrojs/compiler/dist/node/utils.d.ts
generated
vendored
29
node_modules/@astrojs/compiler/dist/node/utils.d.ts
generated
vendored
@@ -1,29 +0,0 @@
|
||||
import { Node, ParentNode, LiteralNode, TagLikeNode, TextNode, RootNode, ElementNode, CustomElementNode, ComponentNode, FragmentNode, ExpressionNode, DoctypeNode, CommentNode, FrontmatterNode } from '../shared/ast.js';
|
||||
|
||||
type Visitor = (node: Node, parent?: ParentNode, index?: number) => void | Promise<void>;
|
||||
declare const is: {
|
||||
parent(node: Node): node is ParentNode;
|
||||
literal(node: Node): node is LiteralNode;
|
||||
tag(node: Node): node is TagLikeNode;
|
||||
whitespace(node: Node): node is TextNode;
|
||||
root: (node: Node) => node is RootNode;
|
||||
element: (node: Node) => node is ElementNode;
|
||||
customElement: (node: Node) => node is CustomElementNode;
|
||||
component: (node: Node) => node is ComponentNode;
|
||||
fragment: (node: Node) => node is FragmentNode;
|
||||
expression: (node: Node) => node is ExpressionNode;
|
||||
text: (node: Node) => node is TextNode;
|
||||
doctype: (node: Node) => node is DoctypeNode;
|
||||
comment: (node: Node) => node is CommentNode;
|
||||
frontmatter: (node: Node) => node is FrontmatterNode;
|
||||
};
|
||||
declare function walk(node: ParentNode, callback: Visitor): void;
|
||||
declare function walkAsync(node: ParentNode, callback: Visitor): Promise<void>;
|
||||
interface SerializeOptions {
|
||||
selfClose: boolean;
|
||||
}
|
||||
/** @deprecated Please use `SerializeOptions` */
|
||||
type SerializeOtions = SerializeOptions;
|
||||
declare function serialize(root: Node, opts?: SerializeOptions): string;
|
||||
|
||||
export { SerializeOptions, SerializeOtions, Visitor, is, serialize, walk, walkAsync };
|
||||
3
node_modules/@astrojs/compiler/dist/node/utils.js
generated
vendored
3
node_modules/@astrojs/compiler/dist/node/utils.js
generated
vendored
@@ -1,3 +0,0 @@
|
||||
function n(o){return t=>t.type===o}var a={parent(o){return Array.isArray(o.children)},literal(o){return typeof o.value=="string"},tag(o){return o.type==="element"||o.type==="custom-element"||o.type==="component"||o.type==="fragment"},whitespace(o){return o.type==="text"&&o.value.trim().length===0},root:n("root"),element:n("element"),customElement:n("custom-element"),component:n("component"),fragment:n("fragment"),expression:n("expression"),text:n("text"),doctype:n("doctype"),comment:n("comment"),frontmatter:n("frontmatter")},l=class{constructor(t){this.callback=t}async visit(t,e,s){if(await this.callback(t,e,s),a.parent(t)){let r=[];for(let i=0;i<t.children.length;i++){let m=t.children[i];r.push(this.callback(m,t,i))}await Promise.all(r)}}};function N(o,t){new l(t).visit(o)}function u(o,t){return new l(t).visit(o)}function c(o){let t="";for(let e of o.attributes)switch(t+=" ",e.kind){case"empty":{t+=`${e.name}`;break}case"expression":{t+=`${e.name}={${e.value}}`;break}case"quoted":{t+=`${e.name}=${e.raw}`;break}case"template-literal":{t+=`${e.name}=\`${e.value}\``;break}case"shorthand":{t+=`{${e.name}}`;break}case"spread":{t+=`{...${e.name}}`;break}}return t}function f(o,t={selfClose:!0}){let e="";function s(r){if(a.root(r))for(let i of r.children)s(i);else if(a.frontmatter(r))e+=`---${r.value}---
|
||||
|
||||
`;else if(a.comment(r))e+=`<!--${r.value}-->`;else if(a.expression(r)){e+="{";for(let i of r.children)s(i);e+="}"}else if(a.literal(r))e+=r.value;else if(a.tag(r))if(e+=`<${r.name}`,e+=c(r),r.children.length===0&&t.selfClose)e+=" />";else{e+=">";for(let i of r.children)s(i);e+=`</${r.name}>`}}return s(o),e}export{a as is,f as serialize,N as walk,u as walkAsync};
|
||||
1
node_modules/@astrojs/compiler/dist/node/wasm_exec.cjs
generated
vendored
1
node_modules/@astrojs/compiler/dist/node/wasm_exec.cjs
generated
vendored
File diff suppressed because one or more lines are too long
37
node_modules/@astrojs/compiler/dist/node/wasm_exec.d.ts
generated
vendored
37
node_modules/@astrojs/compiler/dist/node/wasm_exec.d.ts
generated
vendored
@@ -1,37 +0,0 @@
|
||||
declare class Go {
|
||||
importObject: {
|
||||
gojs: {
|
||||
'runtime.wasmExit': (sp: any) => void;
|
||||
'runtime.wasmWrite': (sp: any) => void;
|
||||
'runtime.resetMemoryDataView': (sp: any) => void;
|
||||
'runtime.nanotime1': (sp: any) => void;
|
||||
'runtime.walltime': (sp: any) => void;
|
||||
'runtime.scheduleTimeoutEvent': (sp: any) => void;
|
||||
'runtime.clearTimeoutEvent': (sp: any) => void;
|
||||
'runtime.getRandomData': (sp: any) => void;
|
||||
'syscall/js.finalizeRef': (sp: any) => void;
|
||||
'syscall/js.stringVal': (sp: any) => void;
|
||||
'syscall/js.valueGet': (sp: any) => void;
|
||||
'syscall/js.valueSet': (sp: any) => void;
|
||||
'syscall/js.valueDelete': (sp: any) => void;
|
||||
'syscall/js.valueIndex': (sp: any) => void;
|
||||
'syscall/js.valueSetIndex': (sp: any) => void;
|
||||
'syscall/js.valueCall': (sp: any) => void;
|
||||
'syscall/js.valueInvoke': (sp: any) => void;
|
||||
'syscall/js.valueNew': (sp: any) => void;
|
||||
'syscall/js.valueLength': (sp: any) => void;
|
||||
'syscall/js.valuePrepareString': (sp: any) => void;
|
||||
'syscall/js.valueLoadString': (sp: any) => void;
|
||||
'syscall/js.valueInstanceOf': (sp: any) => void;
|
||||
'syscall/js.copyBytesToGo': (sp: any) => void;
|
||||
'syscall/js.copyBytesToJS': (sp: any) => void;
|
||||
debug: (value: any) => void;
|
||||
};
|
||||
};
|
||||
constructor();
|
||||
run(instance: any): Promise<void>;
|
||||
private _resume;
|
||||
private _makeFuncWrapper;
|
||||
}
|
||||
|
||||
export { Go as default };
|
||||
1
node_modules/@astrojs/compiler/dist/node/wasm_exec.js
generated
vendored
1
node_modules/@astrojs/compiler/dist/node/wasm_exec.js
generated
vendored
@@ -1 +0,0 @@
|
||||
import{a}from"../chunk-W5DTLHV4.js";export{a as default};
|
||||
1
node_modules/@astrojs/compiler/dist/shared/ast.cjs
generated
vendored
1
node_modules/@astrojs/compiler/dist/shared/ast.cjs
generated
vendored
@@ -1 +0,0 @@
|
||||
"use strict";var r=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var i=Object.getOwnPropertyNames;var N=Object.prototype.hasOwnProperty;var p=(t,e,d,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of i(e))!N.call(t,o)&&o!==d&&r(t,o,{get:()=>e[o],enumerable:!(n=a(e,o))||n.enumerable});return t};var s=t=>p(r({},"__esModule",{value:!0}),t);var m={};module.exports=s(m);
|
||||
74
node_modules/@astrojs/compiler/dist/shared/ast.d.ts
generated
vendored
74
node_modules/@astrojs/compiler/dist/shared/ast.d.ts
generated
vendored
@@ -1,74 +0,0 @@
|
||||
type ParentNode = RootNode | ElementNode | ComponentNode | CustomElementNode | FragmentNode | ExpressionNode;
|
||||
type LiteralNode = TextNode | DoctypeNode | CommentNode | FrontmatterNode;
|
||||
type Node = RootNode | ElementNode | ComponentNode | CustomElementNode | FragmentNode | ExpressionNode | TextNode | FrontmatterNode | DoctypeNode | CommentNode;
|
||||
interface Position {
|
||||
start: Point;
|
||||
end?: Point;
|
||||
}
|
||||
interface Point {
|
||||
/** 1-based line number */
|
||||
line: number;
|
||||
/** 1-based column number, per-line */
|
||||
column: number;
|
||||
/** 0-based byte offset */
|
||||
offset: number;
|
||||
}
|
||||
interface BaseNode {
|
||||
type: string;
|
||||
position?: Position;
|
||||
}
|
||||
interface ParentLikeNode extends BaseNode {
|
||||
type: 'element' | 'component' | 'custom-element' | 'fragment' | 'expression' | 'root';
|
||||
children: Node[];
|
||||
}
|
||||
interface ValueNode extends BaseNode {
|
||||
value: string;
|
||||
}
|
||||
interface RootNode extends ParentLikeNode {
|
||||
type: 'root';
|
||||
}
|
||||
interface AttributeNode extends BaseNode {
|
||||
type: 'attribute';
|
||||
kind: 'quoted' | 'empty' | 'expression' | 'spread' | 'shorthand' | 'template-literal';
|
||||
name: string;
|
||||
value: string;
|
||||
raw?: string;
|
||||
}
|
||||
interface TextNode extends ValueNode {
|
||||
type: 'text';
|
||||
}
|
||||
interface ElementNode extends ParentLikeNode {
|
||||
type: 'element';
|
||||
name: string;
|
||||
attributes: AttributeNode[];
|
||||
}
|
||||
interface FragmentNode extends ParentLikeNode {
|
||||
type: 'fragment';
|
||||
name: string;
|
||||
attributes: AttributeNode[];
|
||||
}
|
||||
interface ComponentNode extends ParentLikeNode {
|
||||
type: 'component';
|
||||
name: string;
|
||||
attributes: AttributeNode[];
|
||||
}
|
||||
interface CustomElementNode extends ParentLikeNode {
|
||||
type: 'custom-element';
|
||||
name: string;
|
||||
attributes: AttributeNode[];
|
||||
}
|
||||
type TagLikeNode = ElementNode | FragmentNode | ComponentNode | CustomElementNode;
|
||||
interface DoctypeNode extends ValueNode {
|
||||
type: 'doctype';
|
||||
}
|
||||
interface CommentNode extends ValueNode {
|
||||
type: 'comment';
|
||||
}
|
||||
interface FrontmatterNode extends ValueNode {
|
||||
type: 'frontmatter';
|
||||
}
|
||||
interface ExpressionNode extends ParentLikeNode {
|
||||
type: 'expression';
|
||||
}
|
||||
|
||||
export { AttributeNode, BaseNode, CommentNode, ComponentNode, CustomElementNode, DoctypeNode, ElementNode, ExpressionNode, FragmentNode, FrontmatterNode, LiteralNode, Node, ParentLikeNode, ParentNode, Point, Position, RootNode, TagLikeNode, TextNode, ValueNode };
|
||||
0
node_modules/@astrojs/compiler/dist/shared/ast.js
generated
vendored
0
node_modules/@astrojs/compiler/dist/shared/ast.js
generated
vendored
1
node_modules/@astrojs/compiler/dist/shared/diagnostics.cjs
generated
vendored
1
node_modules/@astrojs/compiler/dist/shared/diagnostics.cjs
generated
vendored
@@ -1 +0,0 @@
|
||||
"use strict";var I=Object.defineProperty;var M=Object.getOwnPropertyDescriptor;var G=Object.getOwnPropertyNames;var S=Object.prototype.hasOwnProperty;var U=(E,N)=>{for(var _ in N)I(E,_,{get:N[_],enumerable:!0})},H=(E,N,_,A)=>{if(N&&typeof N=="object"||typeof N=="function")for(let T of G(N))!S.call(E,T)&&T!==_&&I(E,T,{get:()=>N[T],enumerable:!(A=M(N,T))||A.enumerable});return E};var W=E=>H(I({},"__esModule",{value:!0}),E);var P={};U(P,{DiagnosticCode:()=>O});module.exports=W(P);var O=(R=>(R[R.ERROR=1e3]="ERROR",R[R.ERROR_UNTERMINATED_JS_COMMENT=1001]="ERROR_UNTERMINATED_JS_COMMENT",R[R.ERROR_FRAGMENT_SHORTHAND_ATTRS=1002]="ERROR_FRAGMENT_SHORTHAND_ATTRS",R[R.ERROR_UNMATCHED_IMPORT=1003]="ERROR_UNMATCHED_IMPORT",R[R.ERROR_UNSUPPORTED_SLOT_ATTRIBUTE=1004]="ERROR_UNSUPPORTED_SLOT_ATTRIBUTE",R[R.WARNING=2e3]="WARNING",R[R.WARNING_UNTERMINATED_HTML_COMMENT=2001]="WARNING_UNTERMINATED_HTML_COMMENT",R[R.WARNING_UNCLOSED_HTML_TAG=2002]="WARNING_UNCLOSED_HTML_TAG",R[R.WARNING_DEPRECATED_DIRECTIVE=2003]="WARNING_DEPRECATED_DIRECTIVE",R[R.WARNING_IGNORED_DIRECTIVE=2004]="WARNING_IGNORED_DIRECTIVE",R[R.WARNING_UNSUPPORTED_EXPRESSION=2005]="WARNING_UNSUPPORTED_EXPRESSION",R[R.WARNING_SET_WITH_CHILDREN=2006]="WARNING_SET_WITH_CHILDREN",R[R.INFO=3e3]="INFO",R[R.HINT=4e3]="HINT",R))(O||{});0&&(module.exports={DiagnosticCode});
|
||||
18
node_modules/@astrojs/compiler/dist/shared/diagnostics.d.ts
generated
vendored
18
node_modules/@astrojs/compiler/dist/shared/diagnostics.d.ts
generated
vendored
@@ -1,18 +0,0 @@
|
||||
declare enum DiagnosticCode {
|
||||
ERROR = 1000,
|
||||
ERROR_UNTERMINATED_JS_COMMENT = 1001,
|
||||
ERROR_FRAGMENT_SHORTHAND_ATTRS = 1002,
|
||||
ERROR_UNMATCHED_IMPORT = 1003,
|
||||
ERROR_UNSUPPORTED_SLOT_ATTRIBUTE = 1004,
|
||||
WARNING = 2000,
|
||||
WARNING_UNTERMINATED_HTML_COMMENT = 2001,
|
||||
WARNING_UNCLOSED_HTML_TAG = 2002,
|
||||
WARNING_DEPRECATED_DIRECTIVE = 2003,
|
||||
WARNING_IGNORED_DIRECTIVE = 2004,
|
||||
WARNING_UNSUPPORTED_EXPRESSION = 2005,
|
||||
WARNING_SET_WITH_CHILDREN = 2006,
|
||||
INFO = 3000,
|
||||
HINT = 4000
|
||||
}
|
||||
|
||||
export { DiagnosticCode };
|
||||
1
node_modules/@astrojs/compiler/dist/shared/diagnostics.js
generated
vendored
1
node_modules/@astrojs/compiler/dist/shared/diagnostics.js
generated
vendored
@@ -1 +0,0 @@
|
||||
var N=(R=>(R[R.ERROR=1e3]="ERROR",R[R.ERROR_UNTERMINATED_JS_COMMENT=1001]="ERROR_UNTERMINATED_JS_COMMENT",R[R.ERROR_FRAGMENT_SHORTHAND_ATTRS=1002]="ERROR_FRAGMENT_SHORTHAND_ATTRS",R[R.ERROR_UNMATCHED_IMPORT=1003]="ERROR_UNMATCHED_IMPORT",R[R.ERROR_UNSUPPORTED_SLOT_ATTRIBUTE=1004]="ERROR_UNSUPPORTED_SLOT_ATTRIBUTE",R[R.WARNING=2e3]="WARNING",R[R.WARNING_UNTERMINATED_HTML_COMMENT=2001]="WARNING_UNTERMINATED_HTML_COMMENT",R[R.WARNING_UNCLOSED_HTML_TAG=2002]="WARNING_UNCLOSED_HTML_TAG",R[R.WARNING_DEPRECATED_DIRECTIVE=2003]="WARNING_DEPRECATED_DIRECTIVE",R[R.WARNING_IGNORED_DIRECTIVE=2004]="WARNING_IGNORED_DIRECTIVE",R[R.WARNING_UNSUPPORTED_EXPRESSION=2005]="WARNING_UNSUPPORTED_EXPRESSION",R[R.WARNING_SET_WITH_CHILDREN=2006]="WARNING_SET_WITH_CHILDREN",R[R.INFO=3e3]="INFO",R[R.HINT=4e3]="HINT",R))(N||{});export{N as DiagnosticCode};
|
||||
1
node_modules/@astrojs/compiler/dist/shared/types.cjs
generated
vendored
1
node_modules/@astrojs/compiler/dist/shared/types.cjs
generated
vendored
@@ -1 +0,0 @@
|
||||
"use strict";var o=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var c=Object.prototype.hasOwnProperty;var l=(r,t)=>{for(var n in t)o(r,n,{get:t[n],enumerable:!0})},g=(r,t,n,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let e of p(t))!c.call(r,e)&&e!==n&&o(r,e,{get:()=>t[e],enumerable:!(s=a(t,e))||s.enumerable});return r};var d=r=>g(o({},"__esModule",{value:!0}),r);var m={};l(m,{DiagnosticSeverity:()=>i});module.exports=d(m);var i=(e=>(e[e.Error=1]="Error",e[e.Warning=2]="Warning",e[e.Information=3]="Information",e[e.Hint=4]="Hint",e))(i||{});0&&(module.exports={DiagnosticSeverity});
|
||||
160
node_modules/@astrojs/compiler/dist/shared/types.d.ts
generated
vendored
160
node_modules/@astrojs/compiler/dist/shared/types.d.ts
generated
vendored
@@ -1,160 +0,0 @@
|
||||
import { RootNode } from './ast.js';
|
||||
export { AttributeNode, BaseNode, CommentNode, ComponentNode, CustomElementNode, DoctypeNode, ElementNode, ExpressionNode, FragmentNode, FrontmatterNode, LiteralNode, Node, ParentLikeNode, ParentNode, Point, Position, TagLikeNode, TextNode, ValueNode } from './ast.js';
|
||||
import { DiagnosticCode } from './diagnostics.js';
|
||||
|
||||
interface PreprocessorResult {
|
||||
code: string;
|
||||
map?: string;
|
||||
}
|
||||
interface PreprocessorError {
|
||||
error: string;
|
||||
}
|
||||
interface ParseOptions {
|
||||
position?: boolean;
|
||||
}
|
||||
declare enum DiagnosticSeverity {
|
||||
Error = 1,
|
||||
Warning = 2,
|
||||
Information = 3,
|
||||
Hint = 4
|
||||
}
|
||||
interface DiagnosticMessage {
|
||||
severity: DiagnosticSeverity;
|
||||
code: DiagnosticCode;
|
||||
location: DiagnosticLocation;
|
||||
hint?: string;
|
||||
text: string;
|
||||
}
|
||||
interface DiagnosticLocation {
|
||||
file: string;
|
||||
line: number;
|
||||
column: number;
|
||||
length: number;
|
||||
}
|
||||
interface TransformOptions {
|
||||
internalURL?: string;
|
||||
filename?: string;
|
||||
normalizedFilename?: string;
|
||||
sourcemap?: boolean | 'inline' | 'external' | 'both';
|
||||
astroGlobalArgs?: string;
|
||||
compact?: boolean;
|
||||
resultScopedSlot?: boolean;
|
||||
scopedStyleStrategy?: 'where' | 'class' | 'attribute';
|
||||
/**
|
||||
* @deprecated "as" has been removed and no longer has any effect!
|
||||
*/
|
||||
as?: 'document' | 'fragment';
|
||||
transitionsAnimationURL?: string;
|
||||
resolvePath?: (specifier: string) => Promise<string> | string;
|
||||
preprocessStyle?: (content: string, attrs: Record<string, string>) => null | Promise<PreprocessorResult | PreprocessorError>;
|
||||
annotateSourceFile?: boolean;
|
||||
/**
|
||||
* Render script tags to be processed (e.g. script tags that have no attributes or only a `src` attribute)
|
||||
* using a `renderScript` function from `internalURL`, instead of stripping the script entirely.
|
||||
* @experimental
|
||||
*/
|
||||
renderScript?: boolean;
|
||||
experimentalScriptOrder?: boolean;
|
||||
}
|
||||
type ConvertToTSXOptions = Pick<TransformOptions, 'filename' | 'normalizedFilename' | 'sourcemap'> & {
|
||||
/** If set to true, script tags content will be included in the generated TSX
|
||||
* Scripts will be wrapped in an arrow function to be compatible with JSX's spec
|
||||
*/
|
||||
includeScripts?: boolean;
|
||||
/** If set to true, style tags content will be included in the generated TSX
|
||||
* Styles will be wrapped in a template literal to be compatible with JSX's spec
|
||||
*/
|
||||
includeStyles?: boolean;
|
||||
};
|
||||
type HoistedScript = {
|
||||
type: string;
|
||||
} & ({
|
||||
type: 'external';
|
||||
src: string;
|
||||
} | {
|
||||
type: 'inline';
|
||||
code: string;
|
||||
map: string;
|
||||
});
|
||||
interface HydratedComponent {
|
||||
exportName: string;
|
||||
localName: string;
|
||||
specifier: string;
|
||||
resolvedPath: string;
|
||||
}
|
||||
interface TransformResult {
|
||||
code: string;
|
||||
map: string;
|
||||
scope: string;
|
||||
styleError: string[];
|
||||
diagnostics: DiagnosticMessage[];
|
||||
css: string[];
|
||||
scripts: HoistedScript[];
|
||||
hydratedComponents: HydratedComponent[];
|
||||
clientOnlyComponents: HydratedComponent[];
|
||||
serverComponents: HydratedComponent[];
|
||||
containsHead: boolean;
|
||||
propagation: boolean;
|
||||
}
|
||||
interface SourceMap {
|
||||
file: string;
|
||||
mappings: string;
|
||||
names: string[];
|
||||
sources: string[];
|
||||
sourcesContent: string[];
|
||||
version: number;
|
||||
}
|
||||
/**
|
||||
* Represents a location in a TSX file.
|
||||
* Both the `start` and `end` properties are 0-based, and are based off utf-16 code units. (i.e. JavaScript's `String.prototype.length`)
|
||||
*/
|
||||
interface TSXLocation {
|
||||
start: number;
|
||||
end: number;
|
||||
}
|
||||
interface TSXExtractedTag {
|
||||
position: TSXLocation;
|
||||
content: string;
|
||||
}
|
||||
interface TSXExtractedScript extends TSXExtractedTag {
|
||||
type: 'processed-module' | 'module' | 'inline' | 'event-attribute' | 'json' | 'raw' | 'unknown';
|
||||
}
|
||||
interface TSXExtractedStyle extends TSXExtractedTag {
|
||||
type: 'tag' | 'style-attribute';
|
||||
lang: 'css' | 'scss' | 'sass' | 'less' | 'stylus' | 'styl' | 'postcss' | 'pcss' | 'unknown' | (string & {});
|
||||
}
|
||||
interface TSXResult {
|
||||
code: string;
|
||||
map: SourceMap;
|
||||
diagnostics: DiagnosticMessage[];
|
||||
metaRanges: {
|
||||
frontmatter: TSXLocation;
|
||||
body: TSXLocation;
|
||||
scripts?: TSXExtractedScript[];
|
||||
styles?: TSXExtractedStyle[];
|
||||
};
|
||||
}
|
||||
interface ParseResult {
|
||||
ast: RootNode;
|
||||
diagnostics: DiagnosticMessage[];
|
||||
}
|
||||
declare function transform(input: string, options?: TransformOptions): Promise<TransformResult>;
|
||||
declare function parse(input: string, options?: ParseOptions): Promise<ParseResult>;
|
||||
declare function convertToTSX(input: string, options?: ConvertToTSXOptions): Promise<TSXResult>;
|
||||
declare function initialize(options: InitializeOptions): Promise<void>;
|
||||
/**
|
||||
* When calling the core compiler APIs, e.g. `transform`, `parse`, etc, they
|
||||
* would automatically instantiate a WASM instance to process the input. When
|
||||
* done, you can call this to manually teardown the WASM instance.
|
||||
*
|
||||
* If the APIs are called again, they will automatically instantiate a new WASM
|
||||
* instance. In browsers, you have to call `initialize()` again before using the APIs.
|
||||
*
|
||||
* Note: Calling teardown is optional and exists mostly as an optimization only.
|
||||
*/
|
||||
declare function teardown(): void;
|
||||
interface InitializeOptions {
|
||||
wasmURL?: string;
|
||||
}
|
||||
|
||||
export { ConvertToTSXOptions, DiagnosticLocation, DiagnosticMessage, DiagnosticSeverity, HoistedScript, HydratedComponent, InitializeOptions, ParseOptions, ParseResult, PreprocessorError, PreprocessorResult, RootNode, SourceMap, TSXExtractedScript, TSXExtractedStyle, TSXExtractedTag, TSXLocation, TSXResult, TransformOptions, TransformResult, convertToTSX, initialize, parse, teardown, transform };
|
||||
1
node_modules/@astrojs/compiler/dist/shared/types.js
generated
vendored
1
node_modules/@astrojs/compiler/dist/shared/types.js
generated
vendored
@@ -1 +0,0 @@
|
||||
var t=(e=>(e[e.Error=1]="Error",e[e.Warning=2]="Warning",e[e.Information=3]="Information",e[e.Hint=4]="Hint",e))(t||{});export{t as DiagnosticSeverity};
|
||||
58
node_modules/@astrojs/compiler/package.json
generated
vendored
58
node_modules/@astrojs/compiler/package.json
generated
vendored
@@ -1,58 +0,0 @@
|
||||
{
|
||||
"name": "@astrojs/compiler",
|
||||
"author": "withastro",
|
||||
"license": "MIT",
|
||||
"type": "module",
|
||||
"bugs": "https://github.com/withastro/compiler/issues",
|
||||
"homepage": "https://astro.build",
|
||||
"version": "2.13.0",
|
||||
"main": "./dist/node/index.js",
|
||||
"types": "./dist/shared/types.d.ts",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/withastro/compiler.git"
|
||||
},
|
||||
"files": [
|
||||
"dist",
|
||||
"types.d.ts",
|
||||
"utils.d.ts",
|
||||
"sync.d.ts"
|
||||
],
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./dist/node/index.d.ts",
|
||||
"browser": "./dist/browser/index.js",
|
||||
"import": "./dist/node/index.js",
|
||||
"require": "./dist/node/index.cjs",
|
||||
"default": "./dist/browser/index.js"
|
||||
},
|
||||
"./sync": {
|
||||
"types": "./dist/node/sync.d.ts",
|
||||
"import": "./dist/node/sync.js",
|
||||
"require": "./dist/node/sync.cjs",
|
||||
"default": "./dist/node/sync.js"
|
||||
},
|
||||
"./utils": {
|
||||
"types": "./dist/node/utils.d.ts",
|
||||
"browser": "./dist/browser/utils.js",
|
||||
"import": "./dist/node/utils.js",
|
||||
"require": "./dist/node/utils.cjs",
|
||||
"default": "./dist/browser/utils.js"
|
||||
},
|
||||
"./astro.wasm": "./dist/astro.wasm",
|
||||
"./types": "./dist/shared/types.d.ts",
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@jridgewell/trace-mapping": "^0.3.16",
|
||||
"@types/node": "^18.15.11",
|
||||
"@types/sass": "^1.43.1",
|
||||
"acorn": "^8.8.1",
|
||||
"esbuild": "^0.17.17",
|
||||
"tsup": "^6.7.0",
|
||||
"typescript": "~5.0.2"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "tsup"
|
||||
}
|
||||
}
|
||||
1
node_modules/@astrojs/compiler/sync.d.ts
generated
vendored
1
node_modules/@astrojs/compiler/sync.d.ts
generated
vendored
@@ -1 +0,0 @@
|
||||
export * from './dist/node/sync.js';
|
||||
1
node_modules/@astrojs/compiler/types.d.ts
generated
vendored
1
node_modules/@astrojs/compiler/types.d.ts
generated
vendored
@@ -1 +0,0 @@
|
||||
export type * from './dist/shared/types.js';
|
||||
1
node_modules/@astrojs/compiler/utils.d.ts
generated
vendored
1
node_modules/@astrojs/compiler/utils.d.ts
generated
vendored
@@ -1 +0,0 @@
|
||||
export * from './dist/node/utils.js';
|
||||
59
node_modules/@astrojs/internal-helpers/LICENSE
generated
vendored
59
node_modules/@astrojs/internal-helpers/LICENSE
generated
vendored
@@ -1,59 +0,0 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2021 Fred K. Schott
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
"""
|
||||
This license applies to parts of the `packages/create-astro` and `packages/astro` subdirectories originating from the https://github.com/sveltejs/kit repository:
|
||||
|
||||
Copyright (c) 2020 [these people](https://github.com/sveltejs/kit/graphs/contributors)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
"""
|
||||
|
||||
"""
|
||||
This license applies to parts of the `packages/create-astro` and `packages/astro` subdirectories originating from the https://github.com/vitejs/vite repository:
|
||||
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2019-present, Yuxi (Evan) You and Vite contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
"""
|
||||
15
node_modules/@astrojs/internal-helpers/dist/fs.d.ts
generated
vendored
15
node_modules/@astrojs/internal-helpers/dist/fs.d.ts
generated
vendored
@@ -1,15 +0,0 @@
|
||||
import type { PathLike } from 'node:fs';
|
||||
export declare function writeJson<T>(path: PathLike, data: T): Promise<void>;
|
||||
export declare function removeDir(dir: PathLike): Promise<void>;
|
||||
export declare function emptyDir(dir: PathLike): Promise<void>;
|
||||
export declare function getFilesFromFolder(dir: URL): Promise<URL[]>;
|
||||
/**
|
||||
* Copies files into a folder keeping the folder structure intact.
|
||||
* The resulting file tree will start at the common ancestor.
|
||||
*
|
||||
* @param {URL[]} files A list of files to copy (absolute path).
|
||||
* @param {URL} outDir Destination folder where to copy the files to (absolute path).
|
||||
* @param {URL[]} [exclude] A list of files to exclude (absolute path).
|
||||
* @returns {Promise<string>} The common ancestor of the copied files.
|
||||
*/
|
||||
export declare function copyFilesToFolder(files: URL[], outDir: URL, exclude?: URL[]): Promise<string>;
|
||||
66
node_modules/@astrojs/internal-helpers/dist/fs.js
generated
vendored
66
node_modules/@astrojs/internal-helpers/dist/fs.js
generated
vendored
@@ -1,66 +0,0 @@
|
||||
import { existsSync } from "node:fs";
|
||||
import * as fs from "node:fs/promises";
|
||||
import nodePath from "node:path";
|
||||
import { fileURLToPath } from "node:url";
|
||||
async function writeJson(path, data) {
|
||||
await fs.writeFile(path, JSON.stringify(data, null, " "), { encoding: "utf-8" });
|
||||
}
|
||||
async function removeDir(dir) {
|
||||
await fs.rm(dir, { recursive: true, force: true, maxRetries: 3 });
|
||||
}
|
||||
async function emptyDir(dir) {
|
||||
await removeDir(dir);
|
||||
await fs.mkdir(dir, { recursive: true });
|
||||
}
|
||||
async function getFilesFromFolder(dir) {
|
||||
const data = await fs.readdir(dir, { withFileTypes: true });
|
||||
let files = [];
|
||||
for (const item of data) {
|
||||
if (item.isDirectory()) {
|
||||
const moreFiles = await getFilesFromFolder(new URL(`./${item.name}/`, dir));
|
||||
files = files.concat(moreFiles);
|
||||
} else {
|
||||
files.push(new URL(`./${item.name}`, dir));
|
||||
}
|
||||
}
|
||||
return files;
|
||||
}
|
||||
async function copyFilesToFolder(files, outDir, exclude = []) {
|
||||
const excludeList = exclude.map((url) => fileURLToPath(url));
|
||||
const fileList = files.map((url) => fileURLToPath(url)).filter((f) => !excludeList.includes(f));
|
||||
if (files.length === 0) throw new Error("No files found to copy");
|
||||
let commonAncestor = nodePath.dirname(fileList[0]);
|
||||
for (const file of fileList.slice(1)) {
|
||||
while (!file.startsWith(commonAncestor)) {
|
||||
commonAncestor = nodePath.dirname(commonAncestor);
|
||||
}
|
||||
}
|
||||
for (const origin of fileList) {
|
||||
const dest = new URL(nodePath.relative(commonAncestor, origin), outDir);
|
||||
const realpath = await fs.realpath(origin);
|
||||
const isSymlink = realpath !== origin;
|
||||
const isDir = (await fs.stat(origin)).isDirectory();
|
||||
if (isDir && !isSymlink) {
|
||||
await fs.mkdir(new URL("..", dest), { recursive: true });
|
||||
} else {
|
||||
await fs.mkdir(new URL(".", dest), { recursive: true });
|
||||
}
|
||||
if (isSymlink) {
|
||||
const realdest = fileURLToPath(new URL(nodePath.relative(commonAncestor, realpath), outDir));
|
||||
const target = nodePath.relative(fileURLToPath(new URL(".", dest)), realdest);
|
||||
if (!existsSync(dest)) {
|
||||
await fs.symlink(target, dest, isDir ? "dir" : "file");
|
||||
}
|
||||
} else if (!isDir) {
|
||||
await fs.copyFile(origin, dest);
|
||||
}
|
||||
}
|
||||
return commonAncestor;
|
||||
}
|
||||
export {
|
||||
copyFilesToFolder,
|
||||
emptyDir,
|
||||
getFilesFromFolder,
|
||||
removeDir,
|
||||
writeJson
|
||||
};
|
||||
39
node_modules/@astrojs/internal-helpers/dist/path.d.ts
generated
vendored
39
node_modules/@astrojs/internal-helpers/dist/path.d.ts
generated
vendored
@@ -1,39 +0,0 @@
|
||||
/**
|
||||
* A set of common path utilities commonly used through the Astro core and integration
|
||||
* projects. These do things like ensure a forward slash prepends paths.
|
||||
*/
|
||||
export declare function appendExtension(path: string, extension: string): string;
|
||||
export declare function appendForwardSlash(path: string): string;
|
||||
export declare function prependForwardSlash(path: string): string;
|
||||
export declare function collapseDuplicateSlashes(path: string): string;
|
||||
export declare const MANY_TRAILING_SLASHES: RegExp;
|
||||
export declare function collapseDuplicateTrailingSlashes(path: string, trailingSlash: boolean): string;
|
||||
export declare function removeTrailingForwardSlash(path: string): string;
|
||||
export declare function removeLeadingForwardSlash(path: string): string;
|
||||
export declare function removeLeadingForwardSlashWindows(path: string): string;
|
||||
export declare function trimSlashes(path: string): string;
|
||||
export declare function startsWithForwardSlash(path: string): boolean;
|
||||
export declare function startsWithDotDotSlash(path: string): boolean;
|
||||
export declare function startsWithDotSlash(path: string): boolean;
|
||||
export declare function isRelativePath(path: string): boolean;
|
||||
export declare function isAbsolutePath(path: string): boolean;
|
||||
export declare function isInternalPath(path: string): boolean;
|
||||
export declare function joinPaths(...paths: (string | undefined)[]): string;
|
||||
export declare function removeFileExtension(path: string): string;
|
||||
export declare function removeQueryString(path: string): string;
|
||||
/**
|
||||
* Checks whether the path is considered a remote path.
|
||||
* Remote means untrusted in this context, so anything that isn't a straightforward
|
||||
* local path is considered remote.
|
||||
*
|
||||
* @param src
|
||||
*/
|
||||
export declare function isRemotePath(src: string): boolean;
|
||||
/**
|
||||
* Checks if parentPath is a parent directory of childPath.
|
||||
*/
|
||||
export declare function isParentDirectory(parentPath: string, childPath: string): boolean;
|
||||
export declare function slash(path: string): string;
|
||||
export declare function fileExtension(path: string): string;
|
||||
export declare function removeBase(path: string, base: string): string;
|
||||
export declare function hasFileExtension(path: string): boolean;
|
||||
196
node_modules/@astrojs/internal-helpers/dist/path.js
generated
vendored
196
node_modules/@astrojs/internal-helpers/dist/path.js
generated
vendored
@@ -1,196 +0,0 @@
|
||||
function appendExtension(path, extension) {
|
||||
return path + "." + extension;
|
||||
}
|
||||
function appendForwardSlash(path) {
|
||||
return path.endsWith("/") ? path : path + "/";
|
||||
}
|
||||
function prependForwardSlash(path) {
|
||||
return path[0] === "/" ? path : "/" + path;
|
||||
}
|
||||
function collapseDuplicateSlashes(path) {
|
||||
return path.replace(/(?<!:)\/{2,}/g, "/");
|
||||
}
|
||||
const MANY_TRAILING_SLASHES = /\/{2,}$/g;
|
||||
function collapseDuplicateTrailingSlashes(path, trailingSlash) {
|
||||
if (!path) {
|
||||
return path;
|
||||
}
|
||||
return path.replace(MANY_TRAILING_SLASHES, trailingSlash ? "/" : "") || "/";
|
||||
}
|
||||
function removeTrailingForwardSlash(path) {
|
||||
return path.endsWith("/") ? path.slice(0, path.length - 1) : path;
|
||||
}
|
||||
function removeLeadingForwardSlash(path) {
|
||||
return path.startsWith("/") ? path.substring(1) : path;
|
||||
}
|
||||
function removeLeadingForwardSlashWindows(path) {
|
||||
return path.startsWith("/") && path[2] === ":" ? path.substring(1) : path;
|
||||
}
|
||||
function trimSlashes(path) {
|
||||
return path.replace(/^\/|\/$/g, "");
|
||||
}
|
||||
function startsWithForwardSlash(path) {
|
||||
return path[0] === "/";
|
||||
}
|
||||
function startsWithDotDotSlash(path) {
|
||||
const c1 = path[0];
|
||||
const c2 = path[1];
|
||||
const c3 = path[2];
|
||||
return c1 === "." && c2 === "." && c3 === "/";
|
||||
}
|
||||
function startsWithDotSlash(path) {
|
||||
const c1 = path[0];
|
||||
const c2 = path[1];
|
||||
return c1 === "." && c2 === "/";
|
||||
}
|
||||
function isRelativePath(path) {
|
||||
return startsWithDotDotSlash(path) || startsWithDotSlash(path);
|
||||
}
|
||||
function isAbsolutePath(path) {
|
||||
return startsWithForwardSlash(path) || /^[a-zA-Z]:/.test(path);
|
||||
}
|
||||
function isString(path) {
|
||||
return typeof path === "string" || path instanceof String;
|
||||
}
|
||||
const INTERNAL_PREFIXES = /* @__PURE__ */ new Set(["/_", "/@", "/.", "//"]);
|
||||
const JUST_SLASHES = /^\/{2,}$/;
|
||||
function isInternalPath(path) {
|
||||
return INTERNAL_PREFIXES.has(path.slice(0, 2)) && !JUST_SLASHES.test(path);
|
||||
}
|
||||
function joinPaths(...paths) {
|
||||
return paths.filter(isString).map((path, i) => {
|
||||
if (i === 0) {
|
||||
return removeTrailingForwardSlash(path);
|
||||
} else if (i === paths.length - 1) {
|
||||
return removeLeadingForwardSlash(path);
|
||||
} else {
|
||||
return trimSlashes(path);
|
||||
}
|
||||
}).join("/");
|
||||
}
|
||||
function removeFileExtension(path) {
|
||||
let idx = path.lastIndexOf(".");
|
||||
return idx === -1 ? path : path.slice(0, idx);
|
||||
}
|
||||
function removeQueryString(path) {
|
||||
const index = path.lastIndexOf("?");
|
||||
return index > 0 ? path.substring(0, index) : path;
|
||||
}
|
||||
function isRemotePath(src) {
|
||||
if (!src) return false;
|
||||
const trimmed = src.trim();
|
||||
if (!trimmed) return false;
|
||||
let decoded = trimmed;
|
||||
let previousDecoded = "";
|
||||
let maxIterations = 10;
|
||||
while (decoded !== previousDecoded && maxIterations > 0) {
|
||||
previousDecoded = decoded;
|
||||
try {
|
||||
decoded = decodeURIComponent(decoded);
|
||||
} catch {
|
||||
break;
|
||||
}
|
||||
maxIterations--;
|
||||
}
|
||||
if (/^[a-zA-Z]:/.test(decoded)) {
|
||||
return false;
|
||||
}
|
||||
if (decoded[0] === "/" && decoded[1] !== "/" && decoded[1] !== "\\") {
|
||||
return false;
|
||||
}
|
||||
if (decoded[0] === "\\") {
|
||||
return true;
|
||||
}
|
||||
if (decoded.startsWith("//")) {
|
||||
return true;
|
||||
}
|
||||
try {
|
||||
const url = new URL(decoded, "http://n");
|
||||
if (url.username || url.password) {
|
||||
return true;
|
||||
}
|
||||
if (decoded.includes("@") && !url.pathname.includes("@") && !url.search.includes("@")) {
|
||||
return true;
|
||||
}
|
||||
if (url.origin !== "http://n") {
|
||||
const protocol = url.protocol.toLowerCase();
|
||||
if (protocol === "file:") {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
if (URL.canParse(decoded)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
} catch {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
function isParentDirectory(parentPath, childPath) {
|
||||
if (!parentPath || !childPath) {
|
||||
return false;
|
||||
}
|
||||
if (parentPath.includes("://") || childPath.includes("://")) {
|
||||
return false;
|
||||
}
|
||||
if (isRemotePath(parentPath) || isRemotePath(childPath)) {
|
||||
return false;
|
||||
}
|
||||
if (parentPath.includes("..") || childPath.includes("..")) {
|
||||
return false;
|
||||
}
|
||||
if (parentPath.includes("\0") || childPath.includes("\0")) {
|
||||
return false;
|
||||
}
|
||||
const normalizedParent = appendForwardSlash(slash(parentPath).toLowerCase());
|
||||
const normalizedChild = slash(childPath).toLowerCase();
|
||||
if (normalizedParent === normalizedChild || normalizedParent === normalizedChild + "/") {
|
||||
return false;
|
||||
}
|
||||
return normalizedChild.startsWith(normalizedParent);
|
||||
}
|
||||
function slash(path) {
|
||||
return path.replace(/\\/g, "/");
|
||||
}
|
||||
function fileExtension(path) {
|
||||
const ext = path.split(".").pop();
|
||||
return ext !== path ? `.${ext}` : "";
|
||||
}
|
||||
function removeBase(path, base) {
|
||||
if (path.startsWith(base)) {
|
||||
return path.slice(removeTrailingForwardSlash(base).length);
|
||||
}
|
||||
return path;
|
||||
}
|
||||
const WITH_FILE_EXT = /\/[^/]+\.\w+$/;
|
||||
function hasFileExtension(path) {
|
||||
return WITH_FILE_EXT.test(path);
|
||||
}
|
||||
export {
|
||||
MANY_TRAILING_SLASHES,
|
||||
appendExtension,
|
||||
appendForwardSlash,
|
||||
collapseDuplicateSlashes,
|
||||
collapseDuplicateTrailingSlashes,
|
||||
fileExtension,
|
||||
hasFileExtension,
|
||||
isAbsolutePath,
|
||||
isInternalPath,
|
||||
isParentDirectory,
|
||||
isRelativePath,
|
||||
isRemotePath,
|
||||
joinPaths,
|
||||
prependForwardSlash,
|
||||
removeBase,
|
||||
removeFileExtension,
|
||||
removeLeadingForwardSlash,
|
||||
removeLeadingForwardSlashWindows,
|
||||
removeQueryString,
|
||||
removeTrailingForwardSlash,
|
||||
slash,
|
||||
startsWithDotDotSlash,
|
||||
startsWithDotSlash,
|
||||
startsWithForwardSlash,
|
||||
trimSlashes
|
||||
};
|
||||
62
node_modules/@astrojs/internal-helpers/dist/remote.d.ts
generated
vendored
62
node_modules/@astrojs/internal-helpers/dist/remote.d.ts
generated
vendored
@@ -1,62 +0,0 @@
|
||||
export type RemotePattern = {
|
||||
hostname?: string;
|
||||
pathname?: string;
|
||||
protocol?: string;
|
||||
port?: string;
|
||||
};
|
||||
/**
|
||||
* Evaluates whether a given URL matches the specified remote pattern based on protocol, hostname, port, and pathname.
|
||||
*
|
||||
* @param {URL} url - The URL object to be matched against the remote pattern.
|
||||
* @param {RemotePattern} remotePattern - The remote pattern object containing the protocol, hostname, port, and pathname to match.
|
||||
* @return {boolean} Returns `true` if the URL matches the given remote pattern; otherwise, `false`.
|
||||
*/
|
||||
export declare function matchPattern(url: URL, remotePattern: RemotePattern): boolean;
|
||||
/**
|
||||
* Checks if the given URL's port matches the specified port. If no port is provided, it returns `true`.
|
||||
*
|
||||
* @param {URL} url - The URL object whose port will be checked.
|
||||
* @param {string} [port=] - The port to match against the URL's port. Optional.
|
||||
* @return {boolean} Returns `true` if the URL's port matches the specified port or if no port is provided; otherwise, `false`.
|
||||
*/
|
||||
export declare function matchPort(url: URL, port?: string): boolean;
|
||||
/**
|
||||
* Compares the protocol of the provided URL with a specified protocol.
|
||||
*
|
||||
* @param {URL} url - The URL object whose protocol needs to be checked.
|
||||
* @param {string} [protocol] - The protocol to compare against, without the trailing colon. If not provided, the method will always return `true`.
|
||||
* @return {boolean} Returns `true` if the protocol matches or if no protocol is specified; otherwise, `false`.
|
||||
*/
|
||||
export declare function matchProtocol(url: URL, protocol?: string): boolean;
|
||||
/**
|
||||
* Matches a given URL's hostname against a specified hostname, with optional support for wildcard patterns.
|
||||
*
|
||||
* @param {URL} url - The URL object whose hostname is to be matched.
|
||||
* @param {string} [hostname] - The hostname to match against. Supports wildcard patterns if `allowWildcard` is `true`.
|
||||
* @param {boolean} [allowWildcard=false] - Indicates whether wildcard patterns in the `hostname` parameter are allowed.
|
||||
* @return {boolean} - Returns `true` if the URL's hostname matches the given hostname criteria; otherwise, `false`.
|
||||
*/
|
||||
export declare function matchHostname(url: URL, hostname?: string, allowWildcard?: boolean): boolean;
|
||||
/**
|
||||
* Matches a given URL's pathname against a specified pattern, with optional support for wildcards.
|
||||
*
|
||||
* @param {URL} url - The URL object containing the pathname to be matched.
|
||||
* @param {string} [pathname] - The pathname pattern to match the URL against.
|
||||
* @param {boolean} [allowWildcard=false] - Determines whether wildcard matching is allowed.
|
||||
* @return {boolean} - Returns `true` if the URL's pathname matches the specified pattern; otherwise, `false`.
|
||||
*/
|
||||
export declare function matchPathname(url: URL, pathname?: string, allowWildcard?: boolean): boolean;
|
||||
/**
|
||||
* Determines whether a given remote resource, identified by its source URL,
|
||||
* is allowed based on specified domains and remote patterns.
|
||||
*
|
||||
* @param {string} src - The source URL of the remote resource to be validated.
|
||||
* @param {Object} options - The configuration options for domain and pattern matching.
|
||||
* @param {string[]} options.domains - A list of allowed domain names.
|
||||
* @param {RemotePattern[]} options.remotePatterns - A list of allowed remote patterns for matching.
|
||||
* @return {boolean} Returns `true` if the source URL matches any of the specified domains or remote patterns; otherwise, `false`.
|
||||
*/
|
||||
export declare function isRemoteAllowed(src: string, { domains, remotePatterns, }: {
|
||||
domains: string[];
|
||||
remotePatterns: RemotePattern[];
|
||||
}): boolean;
|
||||
63
node_modules/@astrojs/internal-helpers/dist/remote.js
generated
vendored
63
node_modules/@astrojs/internal-helpers/dist/remote.js
generated
vendored
@@ -1,63 +0,0 @@
|
||||
function matchPattern(url, remotePattern) {
|
||||
return matchProtocol(url, remotePattern.protocol) && matchHostname(url, remotePattern.hostname, true) && matchPort(url, remotePattern.port) && matchPathname(url, remotePattern.pathname, true);
|
||||
}
|
||||
function matchPort(url, port) {
|
||||
return !port || port === url.port;
|
||||
}
|
||||
function matchProtocol(url, protocol) {
|
||||
return !protocol || protocol === url.protocol.slice(0, -1);
|
||||
}
|
||||
function matchHostname(url, hostname, allowWildcard = false) {
|
||||
if (!hostname) {
|
||||
return true;
|
||||
} else if (!allowWildcard || !hostname.startsWith("*")) {
|
||||
return hostname === url.hostname;
|
||||
} else if (hostname.startsWith("**.")) {
|
||||
const slicedHostname = hostname.slice(2);
|
||||
return slicedHostname !== url.hostname && url.hostname.endsWith(slicedHostname);
|
||||
} else if (hostname.startsWith("*.")) {
|
||||
const slicedHostname = hostname.slice(1);
|
||||
const additionalSubdomains = url.hostname.replace(slicedHostname, "").split(".").filter(Boolean);
|
||||
return additionalSubdomains.length === 1;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
function matchPathname(url, pathname, allowWildcard = false) {
|
||||
if (!pathname) {
|
||||
return true;
|
||||
} else if (!allowWildcard || !pathname.endsWith("*")) {
|
||||
return pathname === url.pathname;
|
||||
} else if (pathname.endsWith("/**")) {
|
||||
const slicedPathname = pathname.slice(0, -2);
|
||||
return slicedPathname !== url.pathname && url.pathname.startsWith(slicedPathname);
|
||||
} else if (pathname.endsWith("/*")) {
|
||||
const slicedPathname = pathname.slice(0, -1);
|
||||
const additionalPathChunks = url.pathname.replace(slicedPathname, "").split("/").filter(Boolean);
|
||||
return additionalPathChunks.length === 1;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
function isRemoteAllowed(src, {
|
||||
domains,
|
||||
remotePatterns
|
||||
}) {
|
||||
if (!URL.canParse(src)) {
|
||||
return false;
|
||||
}
|
||||
const url = new URL(src);
|
||||
if (url.protocol === "data:") {
|
||||
return true;
|
||||
}
|
||||
if (!["http:", "https:"].includes(url.protocol)) {
|
||||
return false;
|
||||
}
|
||||
return domains.some((domain) => matchHostname(url, domain)) || remotePatterns.some((remotePattern) => matchPattern(url, remotePattern));
|
||||
}
|
||||
export {
|
||||
isRemoteAllowed,
|
||||
matchHostname,
|
||||
matchPathname,
|
||||
matchPattern,
|
||||
matchPort,
|
||||
matchProtocol
|
||||
};
|
||||
52
node_modules/@astrojs/internal-helpers/package.json
generated
vendored
52
node_modules/@astrojs/internal-helpers/package.json
generated
vendored
@@ -1,52 +0,0 @@
|
||||
{
|
||||
"name": "@astrojs/internal-helpers",
|
||||
"description": "Internal helpers used by core Astro packages.",
|
||||
"version": "0.7.4",
|
||||
"type": "module",
|
||||
"author": "withastro",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/withastro/astro.git",
|
||||
"directory": "packages/internal-helpers"
|
||||
},
|
||||
"bugs": "https://github.com/withastro/astro/issues",
|
||||
"exports": {
|
||||
"./path": "./dist/path.js",
|
||||
"./remote": "./dist/remote.js",
|
||||
"./fs": "./dist/fs.js"
|
||||
},
|
||||
"typesVersions": {
|
||||
"*": {
|
||||
"path": [
|
||||
"./dist/path.d.ts"
|
||||
],
|
||||
"remote": [
|
||||
"./dist/remote.d.ts"
|
||||
],
|
||||
"fs": [
|
||||
"./dist/fs.d.ts"
|
||||
]
|
||||
}
|
||||
},
|
||||
"files": [
|
||||
"dist"
|
||||
],
|
||||
"devDependencies": {
|
||||
"astro-scripts": "0.0.14"
|
||||
},
|
||||
"keywords": [
|
||||
"astro",
|
||||
"astro-component"
|
||||
],
|
||||
"publishConfig": {
|
||||
"provenance": true
|
||||
},
|
||||
"scripts": {
|
||||
"prepublish": "pnpm build",
|
||||
"build": "astro-scripts build \"src/**/*.ts\" && tsc -p tsconfig.json",
|
||||
"build:ci": "astro-scripts build \"src/**/*.ts\"",
|
||||
"dev": "astro-scripts dev \"src/**/*.ts\"",
|
||||
"test": "astro-scripts test \"test/**/*.test.js\""
|
||||
}
|
||||
}
|
||||
3
node_modules/@astrojs/internal-helpers/readme.md
generated
vendored
3
node_modules/@astrojs/internal-helpers/readme.md
generated
vendored
@@ -1,3 +0,0 @@
|
||||
# @astrojs/internal-helpers
|
||||
|
||||
These are internal helpers used by core Astro packages. This package does not follow semver and should not be used externally.
|
||||
59
node_modules/@astrojs/markdown-remark/LICENSE
generated
vendored
59
node_modules/@astrojs/markdown-remark/LICENSE
generated
vendored
@@ -1,59 +0,0 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2021 Fred K. Schott
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
"""
|
||||
This license applies to parts of the `packages/create-astro` and `packages/astro` subdirectories originating from the https://github.com/sveltejs/kit repository:
|
||||
|
||||
Copyright (c) 2020 [these people](https://github.com/sveltejs/kit/graphs/contributors)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
"""
|
||||
|
||||
"""
|
||||
This license applies to parts of the `packages/create-astro` and `packages/astro` subdirectories originating from the https://github.com/vitejs/vite repository:
|
||||
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2019-present, Yuxi (Evan) You and Vite contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
"""
|
||||
20
node_modules/@astrojs/markdown-remark/dist/frontmatter.d.ts
generated
vendored
20
node_modules/@astrojs/markdown-remark/dist/frontmatter.d.ts
generated
vendored
@@ -1,20 +0,0 @@
|
||||
export declare function isFrontmatterValid(frontmatter: Record<string, any>): boolean;
|
||||
export declare function extractFrontmatter(code: string): string | undefined;
|
||||
export interface ParseFrontmatterOptions {
|
||||
/**
|
||||
* How the frontmatter should be handled in the returned `content` string.
|
||||
* - `preserve`: Keep the frontmatter.
|
||||
* - `remove`: Remove the frontmatter.
|
||||
* - `empty-with-spaces`: Replace the frontmatter with empty spaces. (preserves sourcemap line/col/offset)
|
||||
* - `empty-with-lines`: Replace the frontmatter with empty line breaks. (preserves sourcemap line/col)
|
||||
*
|
||||
* @default 'remove'
|
||||
*/
|
||||
frontmatter: 'preserve' | 'remove' | 'empty-with-spaces' | 'empty-with-lines';
|
||||
}
|
||||
export interface ParseFrontmatterResult {
|
||||
frontmatter: Record<string, any>;
|
||||
rawFrontmatter: string;
|
||||
content: string;
|
||||
}
|
||||
export declare function parseFrontmatter(code: string, options?: ParseFrontmatterOptions): ParseFrontmatterResult;
|
||||
58
node_modules/@astrojs/markdown-remark/dist/frontmatter.js
generated
vendored
58
node_modules/@astrojs/markdown-remark/dist/frontmatter.js
generated
vendored
@@ -1,58 +0,0 @@
|
||||
import yaml from "js-yaml";
|
||||
import * as toml from "smol-toml";
|
||||
function isFrontmatterValid(frontmatter) {
|
||||
try {
|
||||
JSON.stringify(frontmatter);
|
||||
} catch {
|
||||
return false;
|
||||
}
|
||||
return typeof frontmatter === "object" && frontmatter !== null;
|
||||
}
|
||||
const frontmatterRE = /(?:^\uFEFF?|^\s*\n)(?:---|\+\+\+)([\s\S]*?\n)(?:---|\+\+\+)/;
|
||||
const frontmatterTypeRE = /(?:^\uFEFF?|^\s*\n)(---|\+\+\+)/;
|
||||
function extractFrontmatter(code) {
|
||||
return frontmatterRE.exec(code)?.[1];
|
||||
}
|
||||
function getFrontmatterParser(code) {
|
||||
return frontmatterTypeRE.exec(code)?.[1] === "+++" ? ["+++", toml.parse] : ["---", yaml.load];
|
||||
}
|
||||
function parseFrontmatter(code, options) {
|
||||
const rawFrontmatter = extractFrontmatter(code);
|
||||
if (rawFrontmatter == null) {
|
||||
return { frontmatter: {}, rawFrontmatter: "", content: code };
|
||||
}
|
||||
const [delims, parser] = getFrontmatterParser(code);
|
||||
const parsed = parser(rawFrontmatter);
|
||||
const frontmatter = parsed && typeof parsed === "object" ? parsed : {};
|
||||
let content;
|
||||
switch (options?.frontmatter ?? "remove") {
|
||||
case "preserve":
|
||||
content = code;
|
||||
break;
|
||||
case "remove":
|
||||
content = code.replace(`${delims}${rawFrontmatter}${delims}`, "");
|
||||
break;
|
||||
case "empty-with-spaces":
|
||||
content = code.replace(
|
||||
`${delims}${rawFrontmatter}${delims}`,
|
||||
` ${rawFrontmatter.replace(/[^\r\n]/g, " ")} `
|
||||
);
|
||||
break;
|
||||
case "empty-with-lines":
|
||||
content = code.replace(
|
||||
`${delims}${rawFrontmatter}${delims}`,
|
||||
rawFrontmatter.replace(/[^\r\n]/g, "")
|
||||
);
|
||||
break;
|
||||
}
|
||||
return {
|
||||
frontmatter,
|
||||
rawFrontmatter,
|
||||
content
|
||||
};
|
||||
}
|
||||
export {
|
||||
extractFrontmatter,
|
||||
isFrontmatterValid,
|
||||
parseFrontmatter
|
||||
};
|
||||
16
node_modules/@astrojs/markdown-remark/dist/highlight.d.ts
generated
vendored
16
node_modules/@astrojs/markdown-remark/dist/highlight.d.ts
generated
vendored
@@ -1,16 +0,0 @@
|
||||
import type { Root } from 'hast';
|
||||
type Highlighter = (code: string, language: string, options?: {
|
||||
meta?: string;
|
||||
}) => Promise<Root | string>;
|
||||
export declare const defaultExcludeLanguages: string[];
|
||||
/**
|
||||
* A hast utility to syntax highlight code blocks with a given syntax highlighter.
|
||||
*
|
||||
* @param tree
|
||||
* The hast tree in which to syntax highlight code blocks.
|
||||
* @param highlighter
|
||||
* A function which receives the code and language, and returns the HTML of a syntax
|
||||
* highlighted `<pre>` element.
|
||||
*/
|
||||
export declare function highlightCodeBlocks(tree: Root, highlighter: Highlighter, excludeLanguages?: string[]): Promise<void>;
|
||||
export {};
|
||||
61
node_modules/@astrojs/markdown-remark/dist/highlight.js
generated
vendored
61
node_modules/@astrojs/markdown-remark/dist/highlight.js
generated
vendored
@@ -1,61 +0,0 @@
|
||||
import { fromHtml } from "hast-util-from-html";
|
||||
import { toText } from "hast-util-to-text";
|
||||
import { removePosition } from "unist-util-remove-position";
|
||||
import { visitParents } from "unist-util-visit-parents";
|
||||
const languagePattern = /\blanguage-(\S+)\b/;
|
||||
const defaultExcludeLanguages = ["math"];
|
||||
async function highlightCodeBlocks(tree, highlighter, excludeLanguages = []) {
|
||||
const nodes = [];
|
||||
visitParents(tree, { type: "element", tagName: "code" }, (node, ancestors) => {
|
||||
const parent = ancestors.at(-1);
|
||||
if (parent?.type !== "element" || parent.tagName !== "pre") {
|
||||
return;
|
||||
}
|
||||
if (parent.children.length !== 1) {
|
||||
return;
|
||||
}
|
||||
let languageMatch;
|
||||
let { className } = node.properties;
|
||||
if (typeof className === "string") {
|
||||
languageMatch = languagePattern.exec(className);
|
||||
} else if (Array.isArray(className)) {
|
||||
for (const cls of className) {
|
||||
if (typeof cls !== "string") {
|
||||
continue;
|
||||
}
|
||||
languageMatch = languagePattern.exec(cls);
|
||||
if (languageMatch) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
const language = languageMatch?.[1] || "plaintext";
|
||||
if (excludeLanguages.includes(language) || defaultExcludeLanguages.includes(language)) {
|
||||
return;
|
||||
}
|
||||
nodes.push({
|
||||
node,
|
||||
language,
|
||||
parent,
|
||||
grandParent: ancestors.at(-2)
|
||||
});
|
||||
});
|
||||
for (const { node, language, grandParent, parent } of nodes) {
|
||||
const meta = node.data?.meta ?? node.properties.metastring ?? void 0;
|
||||
const code = toText(node, { whitespace: "pre" });
|
||||
const result = await highlighter(code, language, { meta });
|
||||
let replacement;
|
||||
if (typeof result === "string") {
|
||||
replacement = fromHtml(result, { fragment: true }).children[0];
|
||||
removePosition(replacement);
|
||||
} else {
|
||||
replacement = result.children[0];
|
||||
}
|
||||
const index = grandParent.children.indexOf(parent);
|
||||
grandParent.children[index] = replacement;
|
||||
}
|
||||
}
|
||||
export {
|
||||
defaultExcludeLanguages,
|
||||
highlightCodeBlocks
|
||||
};
|
||||
2
node_modules/@astrojs/markdown-remark/dist/import-plugin-browser.d.ts
generated
vendored
2
node_modules/@astrojs/markdown-remark/dist/import-plugin-browser.d.ts
generated
vendored
@@ -1,2 +0,0 @@
|
||||
import type * as unified from 'unified';
|
||||
export declare function importPlugin(p: string): Promise<unified.Plugin>;
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user