blank project
This commit is contained in:
4
node_modules/astro/dist/virtual-modules/actions.d.ts
generated
vendored
Normal file
4
node_modules/astro/dist/virtual-modules/actions.d.ts
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
import type { ActionClient } from '../actions/runtime/server.js';
|
||||
export * from 'virtual:astro:actions/runtime';
|
||||
export declare function getActionPath(action: ActionClient<any, any, any>): string;
|
||||
export declare const actions: Record<string | symbol, any>;
|
||||
123
node_modules/astro/dist/virtual-modules/actions.js
generated
vendored
Normal file
123
node_modules/astro/dist/virtual-modules/actions.js
generated
vendored
Normal file
@@ -0,0 +1,123 @@
|
||||
import { shouldAppendTrailingSlash } from "virtual:astro:actions/options";
|
||||
import {
|
||||
ACTION_QUERY_PARAMS,
|
||||
ActionError,
|
||||
appendForwardSlash,
|
||||
astroCalledServerError,
|
||||
deserializeActionResult,
|
||||
getActionQueryString
|
||||
} from "../actions/runtime/shared.js";
|
||||
export * from "virtual:astro:actions/runtime";
|
||||
const apiContextRoutesSymbol = Symbol.for("context.routes");
|
||||
const ENCODED_DOT = "%2E";
|
||||
function toActionProxy(actionCallback = {}, aggregatedPath = "") {
|
||||
return new Proxy(actionCallback, {
|
||||
get(target, objKey) {
|
||||
if (target.hasOwnProperty(objKey) || typeof objKey === "symbol") {
|
||||
return target[objKey];
|
||||
}
|
||||
const path = aggregatedPath + encodeURIComponent(objKey.toString()).replaceAll(".", ENCODED_DOT);
|
||||
function action(param) {
|
||||
return handleAction(param, path, this);
|
||||
}
|
||||
Object.assign(action, {
|
||||
queryString: getActionQueryString(path),
|
||||
toString: () => action.queryString,
|
||||
// redefine prototype methods as the object's own property, not the prototype's
|
||||
bind: action.bind,
|
||||
valueOf: () => action.valueOf,
|
||||
// Progressive enhancement info for React.
|
||||
$$FORM_ACTION: function() {
|
||||
const searchParams = new URLSearchParams(action.toString());
|
||||
return {
|
||||
method: "POST",
|
||||
// `name` creates a hidden input.
|
||||
// It's unused by Astro, but we can't turn this off.
|
||||
// At least use a name that won't conflict with a user's formData.
|
||||
name: "_astroAction",
|
||||
action: "?" + searchParams.toString()
|
||||
};
|
||||
},
|
||||
// Note: `orThrow` does not have progressive enhancement info.
|
||||
// If you want to throw exceptions,
|
||||
// you must handle those exceptions with client JS.
|
||||
async orThrow(param) {
|
||||
const { data, error } = await handleAction(param, path, this);
|
||||
if (error) throw error;
|
||||
return data;
|
||||
}
|
||||
});
|
||||
return toActionProxy(action, path + ".");
|
||||
}
|
||||
});
|
||||
}
|
||||
function _getActionPath(toString) {
|
||||
let path = `${import.meta.env.BASE_URL.replace(/\/$/, "")}/_actions/${new URLSearchParams(toString()).get(ACTION_QUERY_PARAMS.actionName)}`;
|
||||
if (shouldAppendTrailingSlash) {
|
||||
path = appendForwardSlash(path);
|
||||
}
|
||||
return path;
|
||||
}
|
||||
function getActionPath(action) {
|
||||
return _getActionPath(action.toString);
|
||||
}
|
||||
async function handleAction(param, path, context) {
|
||||
if (import.meta.env.SSR && context) {
|
||||
const pipeline = Reflect.get(context, apiContextRoutesSymbol);
|
||||
if (!pipeline) {
|
||||
throw astroCalledServerError();
|
||||
}
|
||||
const action = await pipeline.getAction(path);
|
||||
if (!action) throw new Error(`Action not found: ${path}`);
|
||||
return action.bind(context)(param);
|
||||
}
|
||||
const headers = new Headers();
|
||||
headers.set("Accept", "application/json");
|
||||
let body = param;
|
||||
if (!(body instanceof FormData)) {
|
||||
try {
|
||||
body = JSON.stringify(param);
|
||||
} catch (e) {
|
||||
throw new ActionError({
|
||||
code: "BAD_REQUEST",
|
||||
message: `Failed to serialize request body to JSON. Full error: ${e.message}`
|
||||
});
|
||||
}
|
||||
if (body) {
|
||||
headers.set("Content-Type", "application/json");
|
||||
} else {
|
||||
headers.set("Content-Length", "0");
|
||||
}
|
||||
}
|
||||
const rawResult = await fetch(
|
||||
_getActionPath(() => getActionQueryString(path)),
|
||||
{
|
||||
method: "POST",
|
||||
body,
|
||||
headers
|
||||
}
|
||||
);
|
||||
if (rawResult.status === 204) {
|
||||
return deserializeActionResult({ type: "empty", status: 204 });
|
||||
}
|
||||
const bodyText = await rawResult.text();
|
||||
if (rawResult.ok) {
|
||||
return deserializeActionResult({
|
||||
type: "data",
|
||||
body: bodyText,
|
||||
status: 200,
|
||||
contentType: "application/json+devalue"
|
||||
});
|
||||
}
|
||||
return deserializeActionResult({
|
||||
type: "error",
|
||||
body: bodyText,
|
||||
status: rawResult.status,
|
||||
contentType: "application/json"
|
||||
});
|
||||
}
|
||||
const actions = toActionProxy();
|
||||
export {
|
||||
actions,
|
||||
getActionPath
|
||||
};
|
||||
17
node_modules/astro/dist/virtual-modules/container.d.ts
generated
vendored
Normal file
17
node_modules/astro/dist/virtual-modules/container.d.ts
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
import type { AstroRenderer } from '../types/public/integrations.js';
|
||||
import type { SSRLoadedRenderer } from '../types/public/internal.js';
|
||||
/**
|
||||
* Use this function to provide renderers to the `AstroContainer`:
|
||||
*
|
||||
* ```js
|
||||
* import { getContainerRenderer } from "@astrojs/react";
|
||||
* import { experimental_AstroContainer as AstroContainer } from "astro/container";
|
||||
* import { loadRenderers } from "astro:container"; // use this only when using vite/vitest
|
||||
*
|
||||
* const renderers = await loadRenderers([ getContainerRenderer ]);
|
||||
* const container = await AstroContainer.create({ renderers });
|
||||
*
|
||||
* ```
|
||||
* @param renderers
|
||||
*/
|
||||
export declare function loadRenderers(renderers: AstroRenderer[]): Promise<SSRLoadedRenderer[]>;
|
||||
18
node_modules/astro/dist/virtual-modules/container.js
generated
vendored
Normal file
18
node_modules/astro/dist/virtual-modules/container.js
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
async function loadRenderers(renderers) {
|
||||
const loadedRenderers = await Promise.all(
|
||||
renderers.map(async (renderer) => {
|
||||
const mod = await import(renderer.serverEntrypoint.toString());
|
||||
if (typeof mod.default !== "undefined") {
|
||||
return {
|
||||
...renderer,
|
||||
ssr: mod.default
|
||||
};
|
||||
}
|
||||
return void 0;
|
||||
})
|
||||
);
|
||||
return loadedRenderers.filter((r) => Boolean(r));
|
||||
}
|
||||
export {
|
||||
loadRenderers
|
||||
};
|
||||
230
node_modules/astro/dist/virtual-modules/i18n.d.ts
generated
vendored
Normal file
230
node_modules/astro/dist/virtual-modules/i18n.d.ts
generated
vendored
Normal file
@@ -0,0 +1,230 @@
|
||||
import type { RedirectToFallback } from '../i18n/index.js';
|
||||
import * as I18nInternals from '../i18n/index.js';
|
||||
import type { MiddlewareHandler } from '../types/public/common.js';
|
||||
import type { AstroConfig, ValidRedirectStatus } from '../types/public/config.js';
|
||||
import type { APIContext } from '../types/public/context.js';
|
||||
export { normalizeTheLocale, toCodes, toPaths } from '../i18n/index.js';
|
||||
export type GetLocaleOptions = I18nInternals.GetLocaleOptions;
|
||||
/**
|
||||
* @param locale A locale
|
||||
* @param path An optional path to add after the `locale`.
|
||||
* @param options Customise the generated path
|
||||
*
|
||||
* Returns a _relative_ path with passed locale.
|
||||
*
|
||||
* ## Errors
|
||||
*
|
||||
* Throws an error if the locale doesn't exist in the list of locales defined in the configuration.
|
||||
*
|
||||
* ## Examples
|
||||
*
|
||||
* ```js
|
||||
* import { getRelativeLocaleUrl } from "astro:i18n";
|
||||
* getRelativeLocaleUrl("es"); // /es
|
||||
* getRelativeLocaleUrl("es", "getting-started"); // /es/getting-started
|
||||
* getRelativeLocaleUrl("es_US", "getting-started", { prependWith: "blog" }); // /blog/es-us/getting-started
|
||||
* getRelativeLocaleUrl("es_US", "getting-started", { prependWith: "blog", normalizeLocale: false }); // /blog/es_US/getting-started
|
||||
* ```
|
||||
*/
|
||||
export declare const getRelativeLocaleUrl: (locale: string, path?: string, options?: GetLocaleOptions) => string;
|
||||
/**
|
||||
*
|
||||
* @param locale A locale
|
||||
* @param path An optional path to add after the `locale`.
|
||||
* @param options Customise the generated path
|
||||
*
|
||||
* Returns an absolute path with the passed locale. The behaviour is subject to change based on `site` configuration.
|
||||
* If _not_ provided, the function will return a _relative_ URL.
|
||||
*
|
||||
* ## Errors
|
||||
*
|
||||
* Throws an error if the locale doesn't exist in the list of locales defined in the configuration.
|
||||
*
|
||||
* ## Examples
|
||||
*
|
||||
* If `site` is `https://example.com`:
|
||||
*
|
||||
* ```js
|
||||
* import { getAbsoluteLocaleUrl } from "astro:i18n";
|
||||
* getAbsoluteLocaleUrl("es"); // https://example.com/es
|
||||
* getAbsoluteLocaleUrl("es", "getting-started"); // https://example.com/es/getting-started
|
||||
* getAbsoluteLocaleUrl("es_US", "getting-started", { prependWith: "blog" }); // https://example.com/blog/es-us/getting-started
|
||||
* getAbsoluteLocaleUrl("es_US", "getting-started", { prependWith: "blog", normalizeLocale: false }); // https://example.com/blog/es_US/getting-started
|
||||
* ```
|
||||
*/
|
||||
export declare const getAbsoluteLocaleUrl: (locale: string, path?: string, options?: GetLocaleOptions) => string;
|
||||
/**
|
||||
* @param path An optional path to add after the `locale`.
|
||||
* @param options Customise the generated path
|
||||
*
|
||||
* Works like `getRelativeLocaleUrl` but it emits the relative URLs for ALL locales:
|
||||
*/
|
||||
export declare const getRelativeLocaleUrlList: (path?: string, options?: GetLocaleOptions) => string[];
|
||||
/**
|
||||
* @param path An optional path to add after the `locale`.
|
||||
* @param options Customise the generated path
|
||||
*
|
||||
* Works like `getAbsoluteLocaleUrl` but it emits the absolute URLs for ALL locales:
|
||||
*/
|
||||
export declare const getAbsoluteLocaleUrlList: (path?: string, options?: GetLocaleOptions) => string[];
|
||||
/**
|
||||
* A function that return the `path` associated to a locale (defined as code). It's particularly useful in case you decide
|
||||
* to use locales that are broken down in paths and codes.
|
||||
*
|
||||
* @param locale The code of the locale
|
||||
* @returns The path associated to the locale
|
||||
*
|
||||
* ## Example
|
||||
*
|
||||
* ```js
|
||||
* // astro.config.mjs
|
||||
*
|
||||
* export default defineConfig({
|
||||
* i18n: {
|
||||
* locales: [
|
||||
* { codes: ["it", "it-VT"], path: "italiano" },
|
||||
* "es"
|
||||
* ]
|
||||
* }
|
||||
* })
|
||||
* ```
|
||||
*
|
||||
* ```js
|
||||
* import { getPathByLocale } from "astro:i18n";
|
||||
* getPathByLocale("it"); // returns "italiano"
|
||||
* getPathByLocale("it-VT"); // returns "italiano"
|
||||
* getPathByLocale("es"); // returns "es"
|
||||
* ```
|
||||
*/
|
||||
export declare const getPathByLocale: (locale: string) => string;
|
||||
/**
|
||||
* A function that returns the preferred locale given a certain path. This is particularly useful if you configure a locale using
|
||||
* `path` and `codes`. When you define multiple `code`, this function will return the first code of the array.
|
||||
*
|
||||
* Astro will treat the first code as the one that the user prefers.
|
||||
*
|
||||
* @param path The path that maps to a locale
|
||||
* @returns The path associated to the locale
|
||||
*
|
||||
* ## Example
|
||||
*
|
||||
* ```js
|
||||
* // astro.config.mjs
|
||||
*
|
||||
* export default defineConfig({
|
||||
* i18n: {
|
||||
* locales: [
|
||||
* { codes: ["it-VT", "it"], path: "italiano" },
|
||||
* "es"
|
||||
* ]
|
||||
* }
|
||||
* })
|
||||
* ```
|
||||
*
|
||||
* ```js
|
||||
* import { getLocaleByPath } from "astro:i18n";
|
||||
* getLocaleByPath("italiano"); // returns "it-VT" because that's the first code configured
|
||||
* getLocaleByPath("es"); // returns "es"
|
||||
* ```
|
||||
*/
|
||||
export declare const getLocaleByPath: (path: string) => string;
|
||||
/**
|
||||
* A function that can be used to check if the current path contains a configured locale.
|
||||
*
|
||||
* @param path The path that maps to a locale
|
||||
* @returns Whether the `path` has the locale
|
||||
*
|
||||
* ## Example
|
||||
*
|
||||
* Given the following configuration:
|
||||
*
|
||||
* ```js
|
||||
* // astro.config.mjs
|
||||
*
|
||||
* export default defineConfig({
|
||||
* i18n: {
|
||||
* locales: [
|
||||
* { codes: ["it-VT", "it"], path: "italiano" },
|
||||
* "es"
|
||||
* ]
|
||||
* }
|
||||
* })
|
||||
* ```
|
||||
*
|
||||
* Here's some use cases:
|
||||
*
|
||||
* ```js
|
||||
* import { pathHasLocale } from "astro:i18n";
|
||||
* getLocaleByPath("italiano"); // returns `true`
|
||||
* getLocaleByPath("es"); // returns `true`
|
||||
* getLocaleByPath("it-VT"); // returns `false`
|
||||
* ```
|
||||
*/
|
||||
export declare const pathHasLocale: (path: string) => boolean;
|
||||
/**
|
||||
*
|
||||
* This function returns a redirect to the default locale configured in the
|
||||
*
|
||||
* @param {APIContext} context The context passed to the middleware
|
||||
* @param {ValidRedirectStatus?} statusCode An optional status code for the redirect.
|
||||
*/
|
||||
export declare let redirectToDefaultLocale: (context: APIContext, statusCode?: ValidRedirectStatus) => Response | undefined;
|
||||
/**
|
||||
*
|
||||
* Use this function to return a 404 when:
|
||||
* - the current path isn't a root. e.g. / or /<base>
|
||||
* - the URL doesn't contain a locale
|
||||
*
|
||||
* When a `Response` is passed, the new `Response` emitted by this function will contain the same headers of the original response.
|
||||
*
|
||||
* @param {APIContext} context The context passed to the middleware
|
||||
* @param {Response?} response An optional `Response` in case you're handling a `Response` coming from the `next` function.
|
||||
*
|
||||
*/
|
||||
export declare let notFound: (context: APIContext, response?: Response) => Response | undefined;
|
||||
/**
|
||||
* Checks whether the current URL contains a configured locale. Internally, this function will use `APIContext#url.pathname`
|
||||
*
|
||||
* @param {APIContext} context The context passed to the middleware
|
||||
*/
|
||||
export declare let requestHasLocale: (context: APIContext) => boolean;
|
||||
/**
|
||||
* Allows to use the build-in fallback system of Astro
|
||||
*
|
||||
* @param {APIContext} context The context passed to the middleware
|
||||
* @param {Promise<Response>} response An optional `Response` in case you're handling a `Response` coming from the `next` function.
|
||||
*/
|
||||
export declare let redirectToFallback: RedirectToFallback;
|
||||
type OnlyObject<T> = T extends object ? T : never;
|
||||
type NewAstroRoutingConfigWithoutManual = OnlyObject<NonNullable<AstroConfig['i18n']>['routing']>;
|
||||
/**
|
||||
* @param {AstroConfig['i18n']['routing']} customOptions
|
||||
*
|
||||
* A function that allows to programmatically create the Astro i18n middleware.
|
||||
*
|
||||
* This is use useful when you still want to use the default i18n logic, but add only few exceptions to your website.
|
||||
*
|
||||
* ## Examples
|
||||
*
|
||||
* ```js
|
||||
* // middleware.js
|
||||
* import { middleware } from "astro:i18n";
|
||||
* import { sequence, defineMiddleware } from "astro:middleware";
|
||||
*
|
||||
* const customLogic = defineMiddleware(async (context, next) => {
|
||||
* const response = await next();
|
||||
*
|
||||
* // Custom logic after resolving the response.
|
||||
* // It's possible to catch the response coming from Astro i18n middleware.
|
||||
*
|
||||
* return response;
|
||||
* });
|
||||
*
|
||||
* export const onRequest = sequence(customLogic, middleware({
|
||||
* prefixDefaultLocale: true,
|
||||
* redirectToDefaultLocale: false
|
||||
* }))
|
||||
*
|
||||
* ```
|
||||
*/
|
||||
export declare let middleware: (customOptions: NewAstroRoutingConfigWithoutManual) => MiddlewareHandler;
|
||||
160
node_modules/astro/dist/virtual-modules/i18n.js
generated
vendored
Normal file
160
node_modules/astro/dist/virtual-modules/i18n.js
generated
vendored
Normal file
@@ -0,0 +1,160 @@
|
||||
import { IncorrectStrategyForI18n } from "../core/errors/errors-data.js";
|
||||
import { AstroError } from "../core/errors/index.js";
|
||||
import * as I18nInternals from "../i18n/index.js";
|
||||
import { toFallbackType, toRoutingStrategy } from "../i18n/utils.js";
|
||||
import { normalizeTheLocale, toCodes, toPaths } from "../i18n/index.js";
|
||||
const { trailingSlash, format, site, i18n, isBuild } = (
|
||||
// @ts-expect-error
|
||||
__ASTRO_INTERNAL_I18N_CONFIG__
|
||||
);
|
||||
const { defaultLocale, locales, domains, fallback, routing } = i18n;
|
||||
const base = import.meta.env.BASE_URL;
|
||||
let strategy = toRoutingStrategy(routing, domains);
|
||||
let fallbackType = toFallbackType(routing);
|
||||
const noop = (method) => function() {
|
||||
throw new AstroError({
|
||||
...IncorrectStrategyForI18n,
|
||||
message: IncorrectStrategyForI18n.message(method)
|
||||
});
|
||||
};
|
||||
const getRelativeLocaleUrl = (locale, path, options) => I18nInternals.getLocaleRelativeUrl({
|
||||
locale,
|
||||
path,
|
||||
base,
|
||||
trailingSlash,
|
||||
format,
|
||||
defaultLocale,
|
||||
locales,
|
||||
strategy,
|
||||
domains,
|
||||
...options
|
||||
});
|
||||
const getAbsoluteLocaleUrl = (locale, path, options) => I18nInternals.getLocaleAbsoluteUrl({
|
||||
locale,
|
||||
path,
|
||||
base,
|
||||
trailingSlash,
|
||||
format,
|
||||
site,
|
||||
defaultLocale,
|
||||
locales,
|
||||
strategy,
|
||||
domains,
|
||||
isBuild,
|
||||
...options
|
||||
});
|
||||
const getRelativeLocaleUrlList = (path, options) => I18nInternals.getLocaleRelativeUrlList({
|
||||
base,
|
||||
path,
|
||||
trailingSlash,
|
||||
format,
|
||||
defaultLocale,
|
||||
locales,
|
||||
strategy,
|
||||
domains,
|
||||
...options
|
||||
});
|
||||
const getAbsoluteLocaleUrlList = (path, options) => I18nInternals.getLocaleAbsoluteUrlList({
|
||||
site,
|
||||
base,
|
||||
path,
|
||||
trailingSlash,
|
||||
format,
|
||||
defaultLocale,
|
||||
locales,
|
||||
strategy,
|
||||
domains,
|
||||
isBuild,
|
||||
...options
|
||||
});
|
||||
const getPathByLocale = (locale) => I18nInternals.getPathByLocale(locale, locales);
|
||||
const getLocaleByPath = (path) => I18nInternals.getLocaleByPath(path, locales);
|
||||
const pathHasLocale = (path) => I18nInternals.pathHasLocale(path, locales);
|
||||
let redirectToDefaultLocale;
|
||||
if (i18n?.routing === "manual") {
|
||||
redirectToDefaultLocale = I18nInternals.redirectToDefaultLocale({
|
||||
base,
|
||||
trailingSlash,
|
||||
format,
|
||||
defaultLocale,
|
||||
locales,
|
||||
strategy,
|
||||
domains,
|
||||
fallback,
|
||||
fallbackType
|
||||
});
|
||||
} else {
|
||||
redirectToDefaultLocale = noop("redirectToDefaultLocale");
|
||||
}
|
||||
let notFound;
|
||||
if (i18n?.routing === "manual") {
|
||||
notFound = I18nInternals.notFound({
|
||||
base,
|
||||
trailingSlash,
|
||||
format,
|
||||
defaultLocale,
|
||||
locales,
|
||||
strategy,
|
||||
domains,
|
||||
fallback,
|
||||
fallbackType
|
||||
});
|
||||
} else {
|
||||
notFound = noop("notFound");
|
||||
}
|
||||
let requestHasLocale;
|
||||
if (i18n?.routing === "manual") {
|
||||
requestHasLocale = I18nInternals.requestHasLocale(locales);
|
||||
} else {
|
||||
requestHasLocale = noop("requestHasLocale");
|
||||
}
|
||||
let redirectToFallback;
|
||||
if (i18n?.routing === "manual") {
|
||||
redirectToFallback = I18nInternals.redirectToFallback({
|
||||
base,
|
||||
trailingSlash,
|
||||
format,
|
||||
defaultLocale,
|
||||
locales,
|
||||
strategy,
|
||||
domains,
|
||||
fallback,
|
||||
fallbackType
|
||||
});
|
||||
} else {
|
||||
redirectToFallback = noop("useFallback");
|
||||
}
|
||||
let middleware;
|
||||
if (i18n?.routing === "manual") {
|
||||
middleware = (customOptions) => {
|
||||
strategy = toRoutingStrategy(customOptions, {});
|
||||
fallbackType = toFallbackType(customOptions);
|
||||
const manifest = {
|
||||
...i18n,
|
||||
strategy,
|
||||
domainLookupTable: {},
|
||||
fallbackType,
|
||||
fallback: i18n.fallback
|
||||
};
|
||||
return I18nInternals.createMiddleware(manifest, base, trailingSlash, format);
|
||||
};
|
||||
} else {
|
||||
middleware = noop("middleware");
|
||||
}
|
||||
export {
|
||||
getAbsoluteLocaleUrl,
|
||||
getAbsoluteLocaleUrlList,
|
||||
getLocaleByPath,
|
||||
getPathByLocale,
|
||||
getRelativeLocaleUrl,
|
||||
getRelativeLocaleUrlList,
|
||||
middleware,
|
||||
normalizeTheLocale,
|
||||
notFound,
|
||||
pathHasLocale,
|
||||
redirectToDefaultLocale,
|
||||
redirectToFallback,
|
||||
requestHasLocale,
|
||||
toCodes,
|
||||
toPaths
|
||||
};
|
||||
12
node_modules/astro/dist/virtual-modules/live-config.d.ts
generated
vendored
Normal file
12
node_modules/astro/dist/virtual-modules/live-config.d.ts
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
export * as z from 'zod';
|
||||
export { defineLiveCollection } from '../content/config.js';
|
||||
export declare const getCollection: () => never;
|
||||
export declare const render: () => never;
|
||||
export declare const getEntry: () => never;
|
||||
export declare const getEntryBySlug: () => never;
|
||||
export declare const getDataEntryById: () => never;
|
||||
export declare const getEntries: () => never;
|
||||
export declare const reference: () => never;
|
||||
export declare const getLiveCollection: () => never;
|
||||
export declare const getLiveEntry: () => never;
|
||||
export declare const defineCollection: () => never;
|
||||
37
node_modules/astro/dist/virtual-modules/live-config.js
generated
vendored
Normal file
37
node_modules/astro/dist/virtual-modules/live-config.js
generated
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
import * as z from "zod";
|
||||
import { defineLiveCollection } from "../content/config.js";
|
||||
function createErrorFunction(message) {
|
||||
return () => {
|
||||
const error = new Error(`The ${message}() function is not available in live config files.`);
|
||||
const stackLines = error.stack?.split("\n");
|
||||
if (stackLines && stackLines.length > 1) {
|
||||
stackLines.splice(1, 1);
|
||||
error.stack = stackLines.join("\n");
|
||||
}
|
||||
throw error;
|
||||
};
|
||||
}
|
||||
const getCollection = createErrorFunction("getCollection");
|
||||
const render = createErrorFunction("render");
|
||||
const getEntry = createErrorFunction("getEntry");
|
||||
const getEntryBySlug = createErrorFunction("getEntryBySlug");
|
||||
const getDataEntryById = createErrorFunction("getDataEntryById");
|
||||
const getEntries = createErrorFunction("getEntries");
|
||||
const reference = createErrorFunction("reference");
|
||||
const getLiveCollection = createErrorFunction("getLiveCollection");
|
||||
const getLiveEntry = createErrorFunction("getLiveEntry");
|
||||
const defineCollection = createErrorFunction("defineCollection");
|
||||
export {
|
||||
defineCollection,
|
||||
defineLiveCollection,
|
||||
getCollection,
|
||||
getDataEntryById,
|
||||
getEntries,
|
||||
getEntry,
|
||||
getEntryBySlug,
|
||||
getLiveCollection,
|
||||
getLiveEntry,
|
||||
reference,
|
||||
render,
|
||||
z
|
||||
};
|
||||
1
node_modules/astro/dist/virtual-modules/middleware.d.ts
generated
vendored
Normal file
1
node_modules/astro/dist/virtual-modules/middleware.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export { defineMiddleware, sequence } from '../core/middleware/index.js';
|
||||
5
node_modules/astro/dist/virtual-modules/middleware.js
generated
vendored
Normal file
5
node_modules/astro/dist/virtual-modules/middleware.js
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
import { defineMiddleware, sequence } from "../core/middleware/index.js";
|
||||
export {
|
||||
defineMiddleware,
|
||||
sequence
|
||||
};
|
||||
1
node_modules/astro/dist/virtual-modules/prefetch.d.ts
generated
vendored
Normal file
1
node_modules/astro/dist/virtual-modules/prefetch.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export * from '../prefetch/index.js';
|
||||
1
node_modules/astro/dist/virtual-modules/prefetch.js
generated
vendored
Normal file
1
node_modules/astro/dist/virtual-modules/prefetch.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export * from "../prefetch/index.js";
|
||||
1
node_modules/astro/dist/virtual-modules/transitions-events.d.ts
generated
vendored
Normal file
1
node_modules/astro/dist/virtual-modules/transitions-events.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export * from '../transitions/events.js';
|
||||
1
node_modules/astro/dist/virtual-modules/transitions-events.js
generated
vendored
Normal file
1
node_modules/astro/dist/virtual-modules/transitions-events.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export * from "../transitions/events.js";
|
||||
1
node_modules/astro/dist/virtual-modules/transitions-router.d.ts
generated
vendored
Normal file
1
node_modules/astro/dist/virtual-modules/transitions-router.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export * from '../transitions/router.js';
|
||||
1
node_modules/astro/dist/virtual-modules/transitions-router.js
generated
vendored
Normal file
1
node_modules/astro/dist/virtual-modules/transitions-router.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export * from "../transitions/router.js";
|
||||
1
node_modules/astro/dist/virtual-modules/transitions-swap-functions.d.ts
generated
vendored
Normal file
1
node_modules/astro/dist/virtual-modules/transitions-swap-functions.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export * from '../transitions/swap-functions.js';
|
||||
1
node_modules/astro/dist/virtual-modules/transitions-swap-functions.js
generated
vendored
Normal file
1
node_modules/astro/dist/virtual-modules/transitions-swap-functions.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export * from "../transitions/swap-functions.js";
|
||||
1
node_modules/astro/dist/virtual-modules/transitions-types.d.ts
generated
vendored
Normal file
1
node_modules/astro/dist/virtual-modules/transitions-types.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export * from '../transitions/types.js';
|
||||
1
node_modules/astro/dist/virtual-modules/transitions-types.js
generated
vendored
Normal file
1
node_modules/astro/dist/virtual-modules/transitions-types.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export * from "../transitions/types.js";
|
||||
1
node_modules/astro/dist/virtual-modules/transitions.d.ts
generated
vendored
Normal file
1
node_modules/astro/dist/virtual-modules/transitions.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export * from '../transitions/index.js';
|
||||
1
node_modules/astro/dist/virtual-modules/transitions.js
generated
vendored
Normal file
1
node_modules/astro/dist/virtual-modules/transitions.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export * from "../transitions/index.js";
|
||||
Reference in New Issue
Block a user