Compare commits
2 Commits
14b2d53e8e
...
92111ea4c9
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
92111ea4c9 | ||
|
|
73cdd255a9 |
1
.astro/content-assets.mjs
Normal file
1
.astro/content-assets.mjs
Normal file
@@ -0,0 +1 @@
|
||||
export default new Map();
|
||||
1
.astro/content-modules.mjs
Normal file
1
.astro/content-modules.mjs
Normal file
@@ -0,0 +1 @@
|
||||
export default new Map();
|
||||
199
.astro/content.d.ts
vendored
Normal file
199
.astro/content.d.ts
vendored
Normal file
@@ -0,0 +1,199 @@
|
||||
declare module 'astro:content' {
|
||||
export interface RenderResult {
|
||||
Content: import('astro/runtime/server/index.js').AstroComponentFactory;
|
||||
headings: import('astro').MarkdownHeading[];
|
||||
remarkPluginFrontmatter: Record<string, any>;
|
||||
}
|
||||
interface Render {
|
||||
'.md': Promise<RenderResult>;
|
||||
}
|
||||
|
||||
export interface RenderedContent {
|
||||
html: string;
|
||||
metadata?: {
|
||||
imagePaths: Array<string>;
|
||||
[key: string]: unknown;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
declare module 'astro:content' {
|
||||
type Flatten<T> = T extends { [K: string]: infer U } ? U : never;
|
||||
|
||||
export type CollectionKey = keyof AnyEntryMap;
|
||||
export type CollectionEntry<C extends CollectionKey> = Flatten<AnyEntryMap[C]>;
|
||||
|
||||
export type ContentCollectionKey = keyof ContentEntryMap;
|
||||
export type DataCollectionKey = keyof DataEntryMap;
|
||||
|
||||
type AllValuesOf<T> = T extends any ? T[keyof T] : never;
|
||||
type ValidContentEntrySlug<C extends keyof ContentEntryMap> = AllValuesOf<
|
||||
ContentEntryMap[C]
|
||||
>['slug'];
|
||||
|
||||
export type ReferenceDataEntry<
|
||||
C extends CollectionKey,
|
||||
E extends keyof DataEntryMap[C] = string,
|
||||
> = {
|
||||
collection: C;
|
||||
id: E;
|
||||
};
|
||||
export type ReferenceContentEntry<
|
||||
C extends keyof ContentEntryMap,
|
||||
E extends ValidContentEntrySlug<C> | (string & {}) = string,
|
||||
> = {
|
||||
collection: C;
|
||||
slug: E;
|
||||
};
|
||||
export type ReferenceLiveEntry<C extends keyof LiveContentConfig['collections']> = {
|
||||
collection: C;
|
||||
id: string;
|
||||
};
|
||||
|
||||
/** @deprecated Use `getEntry` instead. */
|
||||
export function getEntryBySlug<
|
||||
C extends keyof ContentEntryMap,
|
||||
E extends ValidContentEntrySlug<C> | (string & {}),
|
||||
>(
|
||||
collection: C,
|
||||
// Note that this has to accept a regular string too, for SSR
|
||||
entrySlug: E,
|
||||
): E extends ValidContentEntrySlug<C>
|
||||
? Promise<CollectionEntry<C>>
|
||||
: Promise<CollectionEntry<C> | undefined>;
|
||||
|
||||
/** @deprecated Use `getEntry` instead. */
|
||||
export function getDataEntryById<C extends keyof DataEntryMap, E extends keyof DataEntryMap[C]>(
|
||||
collection: C,
|
||||
entryId: E,
|
||||
): Promise<CollectionEntry<C>>;
|
||||
|
||||
export function getCollection<C extends keyof AnyEntryMap, E extends CollectionEntry<C>>(
|
||||
collection: C,
|
||||
filter?: (entry: CollectionEntry<C>) => entry is E,
|
||||
): Promise<E[]>;
|
||||
export function getCollection<C extends keyof AnyEntryMap>(
|
||||
collection: C,
|
||||
filter?: (entry: CollectionEntry<C>) => unknown,
|
||||
): Promise<CollectionEntry<C>[]>;
|
||||
|
||||
export function getLiveCollection<C extends keyof LiveContentConfig['collections']>(
|
||||
collection: C,
|
||||
filter?: LiveLoaderCollectionFilterType<C>,
|
||||
): Promise<
|
||||
import('astro').LiveDataCollectionResult<LiveLoaderDataType<C>, LiveLoaderErrorType<C>>
|
||||
>;
|
||||
|
||||
export function getEntry<
|
||||
C extends keyof ContentEntryMap,
|
||||
E extends ValidContentEntrySlug<C> | (string & {}),
|
||||
>(
|
||||
entry: ReferenceContentEntry<C, E>,
|
||||
): E extends ValidContentEntrySlug<C>
|
||||
? Promise<CollectionEntry<C>>
|
||||
: Promise<CollectionEntry<C> | undefined>;
|
||||
export function getEntry<
|
||||
C extends keyof DataEntryMap,
|
||||
E extends keyof DataEntryMap[C] | (string & {}),
|
||||
>(
|
||||
entry: ReferenceDataEntry<C, E>,
|
||||
): E extends keyof DataEntryMap[C]
|
||||
? Promise<DataEntryMap[C][E]>
|
||||
: Promise<CollectionEntry<C> | undefined>;
|
||||
export function getEntry<
|
||||
C extends keyof ContentEntryMap,
|
||||
E extends ValidContentEntrySlug<C> | (string & {}),
|
||||
>(
|
||||
collection: C,
|
||||
slug: E,
|
||||
): E extends ValidContentEntrySlug<C>
|
||||
? Promise<CollectionEntry<C>>
|
||||
: Promise<CollectionEntry<C> | undefined>;
|
||||
export function getEntry<
|
||||
C extends keyof DataEntryMap,
|
||||
E extends keyof DataEntryMap[C] | (string & {}),
|
||||
>(
|
||||
collection: C,
|
||||
id: E,
|
||||
): E extends keyof DataEntryMap[C]
|
||||
? string extends keyof DataEntryMap[C]
|
||||
? Promise<DataEntryMap[C][E]> | undefined
|
||||
: Promise<DataEntryMap[C][E]>
|
||||
: Promise<CollectionEntry<C> | undefined>;
|
||||
export function getLiveEntry<C extends keyof LiveContentConfig['collections']>(
|
||||
collection: C,
|
||||
filter: string | LiveLoaderEntryFilterType<C>,
|
||||
): Promise<import('astro').LiveDataEntryResult<LiveLoaderDataType<C>, LiveLoaderErrorType<C>>>;
|
||||
|
||||
/** Resolve an array of entry references from the same collection */
|
||||
export function getEntries<C extends keyof ContentEntryMap>(
|
||||
entries: ReferenceContentEntry<C, ValidContentEntrySlug<C>>[],
|
||||
): Promise<CollectionEntry<C>[]>;
|
||||
export function getEntries<C extends keyof DataEntryMap>(
|
||||
entries: ReferenceDataEntry<C, keyof DataEntryMap[C]>[],
|
||||
): Promise<CollectionEntry<C>[]>;
|
||||
|
||||
export function render<C extends keyof AnyEntryMap>(
|
||||
entry: AnyEntryMap[C][string],
|
||||
): Promise<RenderResult>;
|
||||
|
||||
export function reference<C extends keyof AnyEntryMap>(
|
||||
collection: C,
|
||||
): import('astro/zod').ZodEffects<
|
||||
import('astro/zod').ZodString,
|
||||
C extends keyof ContentEntryMap
|
||||
? ReferenceContentEntry<C, ValidContentEntrySlug<C>>
|
||||
: ReferenceDataEntry<C, keyof DataEntryMap[C]>
|
||||
>;
|
||||
// Allow generic `string` to avoid excessive type errors in the config
|
||||
// if `dev` is not running to update as you edit.
|
||||
// Invalid collection names will be caught at build time.
|
||||
export function reference<C extends string>(
|
||||
collection: C,
|
||||
): import('astro/zod').ZodEffects<import('astro/zod').ZodString, never>;
|
||||
|
||||
type ReturnTypeOrOriginal<T> = T extends (...args: any[]) => infer R ? R : T;
|
||||
type InferEntrySchema<C extends keyof AnyEntryMap> = import('astro/zod').infer<
|
||||
ReturnTypeOrOriginal<Required<ContentConfig['collections'][C]>['schema']>
|
||||
>;
|
||||
|
||||
type ContentEntryMap = {
|
||||
|
||||
};
|
||||
|
||||
type DataEntryMap = {
|
||||
|
||||
};
|
||||
|
||||
type AnyEntryMap = ContentEntryMap & DataEntryMap;
|
||||
|
||||
type ExtractLoaderTypes<T> = T extends import('astro/loaders').LiveLoader<
|
||||
infer TData,
|
||||
infer TEntryFilter,
|
||||
infer TCollectionFilter,
|
||||
infer TError
|
||||
>
|
||||
? { data: TData; entryFilter: TEntryFilter; collectionFilter: TCollectionFilter; error: TError }
|
||||
: { data: never; entryFilter: never; collectionFilter: never; error: never };
|
||||
type ExtractDataType<T> = ExtractLoaderTypes<T>['data'];
|
||||
type ExtractEntryFilterType<T> = ExtractLoaderTypes<T>['entryFilter'];
|
||||
type ExtractCollectionFilterType<T> = ExtractLoaderTypes<T>['collectionFilter'];
|
||||
type ExtractErrorType<T> = ExtractLoaderTypes<T>['error'];
|
||||
|
||||
type LiveLoaderDataType<C extends keyof LiveContentConfig['collections']> =
|
||||
LiveContentConfig['collections'][C]['schema'] extends undefined
|
||||
? ExtractDataType<LiveContentConfig['collections'][C]['loader']>
|
||||
: import('astro/zod').infer<
|
||||
Exclude<LiveContentConfig['collections'][C]['schema'], undefined>
|
||||
>;
|
||||
type LiveLoaderEntryFilterType<C extends keyof LiveContentConfig['collections']> =
|
||||
ExtractEntryFilterType<LiveContentConfig['collections'][C]['loader']>;
|
||||
type LiveLoaderCollectionFilterType<C extends keyof LiveContentConfig['collections']> =
|
||||
ExtractCollectionFilterType<LiveContentConfig['collections'][C]['loader']>;
|
||||
type LiveLoaderErrorType<C extends keyof LiveContentConfig['collections']> = ExtractErrorType<
|
||||
LiveContentConfig['collections'][C]['loader']
|
||||
>;
|
||||
|
||||
export type ContentConfig = typeof import("../src/content.config.mjs");
|
||||
export type LiveContentConfig = never;
|
||||
}
|
||||
2
.astro/types.d.ts
vendored
Normal file
2
.astro/types.d.ts
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
/// <reference types="astro/client" />
|
||||
/// <reference path="content.d.ts" />
|
||||
32
.gitignore
vendored
Normal file
32
.gitignore
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
# build output
|
||||
dist/
|
||||
|
||||
# generated types
|
||||
.astro/
|
||||
|
||||
#Logs
|
||||
logs/
|
||||
|
||||
# dependencies
|
||||
node_modules/
|
||||
|
||||
# logs
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
pnpm-debug.log*
|
||||
|
||||
# environment variables
|
||||
.env
|
||||
.env.production
|
||||
|
||||
# macOS-specific files
|
||||
.DS_Store
|
||||
|
||||
# jetbrains setting folder
|
||||
.idea/
|
||||
|
||||
# NTFY Info
|
||||
.env
|
||||
.env.local
|
||||
.env.*.local
|
||||
@@ -1,5 +1,24 @@
|
||||
// @ts-check
|
||||
// astro.config.mjs
|
||||
import { defineConfig } from 'astro/config';
|
||||
import dotenv from 'dotenv';
|
||||
import node from '@astrojs/node';
|
||||
import sitemap from '@astrojs/sitemap';
|
||||
|
||||
// https://astro.build/config
|
||||
export default defineConfig({});
|
||||
dotenv.config();
|
||||
|
||||
export default defineConfig({
|
||||
site: 'https://juchatz.com',
|
||||
output: 'server',
|
||||
|
||||
adapter: node({
|
||||
mode: 'standalone'
|
||||
}),
|
||||
|
||||
integrations: [sitemap(/* your config */)],
|
||||
|
||||
// Add this server config for local network access
|
||||
server: {
|
||||
host: '0.0.0.0', // Bind to all network interfaces
|
||||
port: 7080
|
||||
}
|
||||
});
|
||||
|
||||
9
dist/client/favicon.svg
vendored
Normal file
9
dist/client/favicon.svg
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
<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>
|
||||
|
After Width: | Height: | Size: 749 B |
1
dist/client/sitemap-0.xml
vendored
Normal file
1
dist/client/sitemap-0.xml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<?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
Normal file
1
dist/client/sitemap-index.xml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<?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
Normal file
1
dist/server/_@astrojs-ssr-adapter.mjs
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export { c as createExports, a as start } from './chunks/_@astrojs-ssr-adapter_DiODGAEm.mjs';
|
||||
3
dist/server/_noop-middleware.mjs
vendored
Normal file
3
dist/server/_noop-middleware.mjs
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
const onRequest = (_, next) => next();
|
||||
|
||||
export { onRequest };
|
||||
4204
dist/server/chunks/_@astrojs-ssr-adapter_DiODGAEm.mjs
vendored
Normal file
4204
dist/server/chunks/_@astrojs-ssr-adapter_DiODGAEm.mjs
vendored
Normal file
File diff suppressed because it is too large
Load Diff
364
dist/server/chunks/astro-designed-error-pages_ByR6z9Nn.mjs
vendored
Normal file
364
dist/server/chunks/astro-designed-error-pages_ByR6z9Nn.mjs
vendored
Normal file
@@ -0,0 +1,364 @@
|
||||
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
Normal file
2761
dist/server/chunks/astro/server_BRK6phUk.mjs
vendored
Normal file
File diff suppressed because it is too large
Load Diff
157
dist/server/chunks/fs-lite_COtHaKzy.mjs
vendored
Normal file
157
dist/server/chunks/fs-lite_COtHaKzy.mjs
vendored
Normal file
@@ -0,0 +1,157 @@
|
||||
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
Normal file
1597
dist/server/chunks/node_ul8Jhv1t.mjs
vendored
Normal file
File diff suppressed because it is too large
Load Diff
188
dist/server/chunks/remote_OOD9OFqU.mjs
vendored
Normal file
188
dist/server/chunks/remote_OOD9OFqU.mjs
vendored
Normal file
@@ -0,0 +1,188 @@
|
||||
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
Normal file
99
dist/server/chunks/sharp_DRkwzUY0.mjs
vendored
Normal file
@@ -0,0 +1,99 @@
|
||||
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
Normal file
39
dist/server/entry.mjs
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
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
Normal file
102
dist/server/manifest_mBJLiTM-.mjs
vendored
Normal file
@@ -0,0 +1,102 @@
|
||||
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
Normal file
3
dist/server/noop-entrypoint.mjs
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
const server = {};
|
||||
|
||||
export { server };
|
||||
2
dist/server/pages/_image.astro.mjs
vendored
Normal file
2
dist/server/pages/_image.astro.mjs
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
export { a as page } from '../chunks/node_ul8Jhv1t.mjs';
|
||||
export { renderers } from '../renderers.mjs';
|
||||
25
dist/server/pages/index.astro.mjs
vendored
Normal file
25
dist/server/pages/index.astro.mjs
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
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
Normal file
3
dist/server/renderers.mjs
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
const renderers = [];
|
||||
|
||||
export { renderers };
|
||||
1
node_modules/.astro/data-store.json
generated
vendored
Normal file
1
node_modules/.astro/data-store.json
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
[["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/sitemap
generated
vendored
Symbolic link
1
node_modules/.bin/sitemap
generated
vendored
Symbolic link
@@ -0,0 +1 @@
|
||||
../sitemap/dist/cli.js
|
||||
265
node_modules/.package-lock.json
generated
vendored
265
node_modules/.package-lock.json
generated
vendored
@@ -45,6 +45,20 @@
|
||||
"vfile": "^6.0.3"
|
||||
}
|
||||
},
|
||||
"node_modules/@astrojs/node": {
|
||||
"version": "9.5.0",
|
||||
"resolved": "https://registry.npmjs.org/@astrojs/node/-/node-9.5.0.tgz",
|
||||
"integrity": "sha512-x1whLIatmCefaqJA8FjfI+P6FStF+bqmmrib0OUGM1M3cZhAXKLgPx6UF2AzQ3JgpXgCWYM24MHtraPvZhhyLQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@astrojs/internal-helpers": "0.7.4",
|
||||
"send": "^1.2.0",
|
||||
"server-destroy": "^1.0.1"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"astro": "^5.14.3"
|
||||
}
|
||||
},
|
||||
"node_modules/@astrojs/prism": {
|
||||
"version": "3.3.0",
|
||||
"resolved": "https://registry.npmjs.org/@astrojs/prism/-/prism-3.3.0.tgz",
|
||||
@@ -57,6 +71,17 @@
|
||||
"node": "18.20.8 || ^20.3.0 || >=22.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@astrojs/sitemap": {
|
||||
"version": "3.6.0",
|
||||
"resolved": "https://registry.npmjs.org/@astrojs/sitemap/-/sitemap-3.6.0.tgz",
|
||||
"integrity": "sha512-4aHkvcOZBWJigRmMIAJwRQXBS+ayoP5z40OklTXYXhUDhwusz+DyDl+nSshY6y9DvkVEavwNcFO8FD81iGhXjg==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"sitemap": "^8.0.0",
|
||||
"stream-replace-string": "^2.0.0",
|
||||
"zod": "^3.25.76"
|
||||
}
|
||||
},
|
||||
"node_modules/@astrojs/telemetry": {
|
||||
"version": "3.3.0",
|
||||
"resolved": "https://registry.npmjs.org/@astrojs/telemetry/-/telemetry-3.3.0.tgz",
|
||||
@@ -783,7 +808,6 @@
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"ideallyInert": true,
|
||||
"license": "LGPL-3.0-or-later",
|
||||
"optional": true,
|
||||
"os": [
|
||||
@@ -937,7 +961,6 @@
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"ideallyInert": true,
|
||||
"license": "Apache-2.0",
|
||||
"optional": true,
|
||||
"os": [
|
||||
@@ -1303,7 +1326,6 @@
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"ideallyInert": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
@@ -1522,6 +1544,15 @@
|
||||
"undici-types": "~7.14.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/sax": {
|
||||
"version": "1.2.7",
|
||||
"resolved": "https://registry.npmjs.org/@types/sax/-/sax-1.2.7.tgz",
|
||||
"integrity": "sha512-rO73L89PJxeYM3s3pPPjiPgVVcymqU490g0YO5n5By0k2Erzj6tay/4lr1CHAAU4JyOWd1rpQ8bCf6cZfHU96A==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@types/node": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/unist": {
|
||||
"version": "3.0.3",
|
||||
"resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.3.tgz",
|
||||
@@ -1645,6 +1676,12 @@
|
||||
"url": "https://github.com/sponsors/jonschlinkert"
|
||||
}
|
||||
},
|
||||
"node_modules/arg": {
|
||||
"version": "5.0.2",
|
||||
"resolved": "https://registry.npmjs.org/arg/-/arg-5.0.2.tgz",
|
||||
"integrity": "sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/argparse": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",
|
||||
@@ -2056,6 +2093,15 @@
|
||||
"integrity": "sha512-mEQCMmwJu317oSz8CwdIOdwf3xMif1ttiM8LTufzc3g6kR+9Pe236twL8j3IYT1F7GfRgGcW6MWxzZjLIkuHIg==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/depd": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz",
|
||||
"integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.8"
|
||||
}
|
||||
},
|
||||
"node_modules/dequal": {
|
||||
"version": "2.0.3",
|
||||
"resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz",
|
||||
@@ -2133,6 +2179,18 @@
|
||||
"integrity": "sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/dotenv": {
|
||||
"version": "17.2.3",
|
||||
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-17.2.3.tgz",
|
||||
"integrity": "sha512-JVUnt+DUIzu87TABbhPmNfVdBDt18BLOWjMUFJMSi/Qqg7NTYtabbvSNJGOJ7afbRuv9D/lngizHtP7QyLQ+9w==",
|
||||
"license": "BSD-2-Clause",
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://dotenvx.com"
|
||||
}
|
||||
},
|
||||
"node_modules/dset": {
|
||||
"version": "3.1.4",
|
||||
"resolved": "https://registry.npmjs.org/dset/-/dset-3.1.4.tgz",
|
||||
@@ -2142,12 +2200,27 @@
|
||||
"node": ">=4"
|
||||
}
|
||||
},
|
||||
"node_modules/ee-first": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
|
||||
"integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/emoji-regex": {
|
||||
"version": "10.6.0",
|
||||
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.6.0.tgz",
|
||||
"integrity": "sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/encodeurl": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz",
|
||||
"integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.8"
|
||||
}
|
||||
},
|
||||
"node_modules/entities": {
|
||||
"version": "6.0.1",
|
||||
"resolved": "https://registry.npmjs.org/entities/-/entities-6.0.1.tgz",
|
||||
@@ -2207,6 +2280,12 @@
|
||||
"@esbuild/win32-x64": "0.25.11"
|
||||
}
|
||||
},
|
||||
"node_modules/escape-html": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
|
||||
"integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/escape-string-regexp": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz",
|
||||
@@ -2228,6 +2307,15 @@
|
||||
"@types/estree": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/etag": {
|
||||
"version": "1.8.1",
|
||||
"resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz",
|
||||
"integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.6"
|
||||
}
|
||||
},
|
||||
"node_modules/eventemitter3": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.1.tgz",
|
||||
@@ -2299,6 +2387,15 @@
|
||||
"unicode-trie": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/fresh": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/fresh/-/fresh-2.0.0.tgz",
|
||||
"integrity": "sha512-Rx/WycZ60HOaqLKAi6cHRKKI7zxWbJ31MhntmtwMoaTeF7XFH9hhBp8vITaMidfljRQ6eYWCKkaTK+ykVJHP2A==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.8"
|
||||
}
|
||||
},
|
||||
"node_modules/fsevents": {
|
||||
"version": "2.3.3",
|
||||
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
|
||||
@@ -2558,6 +2655,31 @@
|
||||
"integrity": "sha512-dTxcvPXqPvXBQpq5dUr6mEMJX4oIEFv6bwom3FDwKRDsuIjjJGANqhBuoAn9c1RQJIdAKav33ED65E2ys+87QQ==",
|
||||
"license": "BSD-2-Clause"
|
||||
},
|
||||
"node_modules/http-errors": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz",
|
||||
"integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"depd": "2.0.0",
|
||||
"inherits": "2.0.4",
|
||||
"setprototypeof": "1.2.0",
|
||||
"statuses": "2.0.1",
|
||||
"toidentifier": "1.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.8"
|
||||
}
|
||||
},
|
||||
"node_modules/http-errors/node_modules/statuses": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz",
|
||||
"integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.8"
|
||||
}
|
||||
},
|
||||
"node_modules/import-meta-resolve": {
|
||||
"version": "4.2.0",
|
||||
"resolved": "https://registry.npmjs.org/import-meta-resolve/-/import-meta-resolve-4.2.0.tgz",
|
||||
@@ -2568,6 +2690,12 @@
|
||||
"url": "https://github.com/sponsors/wooorm"
|
||||
}
|
||||
},
|
||||
"node_modules/inherits": {
|
||||
"version": "2.0.4",
|
||||
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
|
||||
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/iron-webcrypto": {
|
||||
"version": "1.2.1",
|
||||
"resolved": "https://registry.npmjs.org/iron-webcrypto/-/iron-webcrypto-1.2.1.tgz",
|
||||
@@ -3507,6 +3635,27 @@
|
||||
],
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/mime-db": {
|
||||
"version": "1.54.0",
|
||||
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.54.0.tgz",
|
||||
"integrity": "sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.6"
|
||||
}
|
||||
},
|
||||
"node_modules/mime-types": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-3.0.1.tgz",
|
||||
"integrity": "sha512-xRc4oEhT6eaBpU1XF7AjpOFD+xQmXNB5OVKwp4tqCuBpHLS/ZbBDrc07mYTDqVMg6PfxUjjNp85O6Cd2Z/5HWA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"mime-db": "^1.54.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.6"
|
||||
}
|
||||
},
|
||||
"node_modules/mrmime": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/mrmime/-/mrmime-2.0.1.tgz",
|
||||
@@ -3600,6 +3749,18 @@
|
||||
"integrity": "sha512-RdR9FQrFwNBNXAr4GixM8YaRZRJ5PUWbKYbE5eOsrwAjJW0q2REGcf79oYPsLyskQCZG1PLN+S/K1V00joZAoQ==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/on-finished": {
|
||||
"version": "2.4.1",
|
||||
"resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz",
|
||||
"integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"ee-first": "1.1.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.8"
|
||||
}
|
||||
},
|
||||
"node_modules/oniguruma-parser": {
|
||||
"version": "0.12.1",
|
||||
"resolved": "https://registry.npmjs.org/oniguruma-parser/-/oniguruma-parser-0.12.1.tgz",
|
||||
@@ -3795,6 +3956,15 @@
|
||||
"integrity": "sha512-b484I/7b8rDEdSDKckSSBA8knMpcdsXudlE/LNL639wFoHKwLbEkQFZHWEYwDC0wa0FKUcCY+GAF73Z7wxNVFA==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/range-parser": {
|
||||
"version": "1.2.1",
|
||||
"resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz",
|
||||
"integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.6"
|
||||
}
|
||||
},
|
||||
"node_modules/readdirp": {
|
||||
"version": "4.1.2",
|
||||
"resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz",
|
||||
@@ -4082,6 +4252,12 @@
|
||||
"fsevents": "~2.3.2"
|
||||
}
|
||||
},
|
||||
"node_modules/sax": {
|
||||
"version": "1.4.1",
|
||||
"resolved": "https://registry.npmjs.org/sax/-/sax-1.4.1.tgz",
|
||||
"integrity": "sha512-+aWOz7yVScEGoKNd4PA10LZ8sk0A/z5+nXQG5giUO5rprX9jgYsTdov9qCchZiPIZezbZH+jRut8nPodFAX4Jg==",
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/semver": {
|
||||
"version": "7.7.3",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz",
|
||||
@@ -4094,6 +4270,40 @@
|
||||
"node": ">=10"
|
||||
}
|
||||
},
|
||||
"node_modules/send": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/send/-/send-1.2.0.tgz",
|
||||
"integrity": "sha512-uaW0WwXKpL9blXE2o0bRhoL2EGXIrZxQ2ZQ4mgcfoBxdFmQold+qWsD2jLrfZ0trjKL6vOw0j//eAwcALFjKSw==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"debug": "^4.3.5",
|
||||
"encodeurl": "^2.0.0",
|
||||
"escape-html": "^1.0.3",
|
||||
"etag": "^1.8.1",
|
||||
"fresh": "^2.0.0",
|
||||
"http-errors": "^2.0.0",
|
||||
"mime-types": "^3.0.1",
|
||||
"ms": "^2.1.3",
|
||||
"on-finished": "^2.4.1",
|
||||
"range-parser": "^1.2.1",
|
||||
"statuses": "^2.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 18"
|
||||
}
|
||||
},
|
||||
"node_modules/server-destroy": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/server-destroy/-/server-destroy-1.0.1.tgz",
|
||||
"integrity": "sha512-rb+9B5YBIEzYcD6x2VKidaa+cqYBJQKnU4oe4E3ANwRRN56yk/ua1YCJT1n21NTS8w6CcOclAKNP3PhdCXKYtQ==",
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/setprototypeof": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz",
|
||||
"integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==",
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/sharp": {
|
||||
"version": "0.34.4",
|
||||
"resolved": "https://registry.npmjs.org/sharp/-/sharp-0.34.4.tgz",
|
||||
@@ -4159,6 +4369,31 @@
|
||||
"integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/sitemap": {
|
||||
"version": "8.0.0",
|
||||
"resolved": "https://registry.npmjs.org/sitemap/-/sitemap-8.0.0.tgz",
|
||||
"integrity": "sha512-+AbdxhM9kJsHtruUF39bwS/B0Fytw6Fr1o4ZAIAEqA6cke2xcoO2GleBw9Zw7nRzILVEgz7zBM5GiTJjie1G9A==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@types/node": "^17.0.5",
|
||||
"@types/sax": "^1.2.1",
|
||||
"arg": "^5.0.0",
|
||||
"sax": "^1.2.4"
|
||||
},
|
||||
"bin": {
|
||||
"sitemap": "dist/cli.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.0.0",
|
||||
"npm": ">=6.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/sitemap/node_modules/@types/node": {
|
||||
"version": "17.0.45",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.45.tgz",
|
||||
"integrity": "sha512-w+tIMs3rq2afQdsPJlODhoUEKzFP1ayaoyl1CcnwtIlsVe7K7bA1NGm4s3PraqTLlXnbIN84zuBlxBWo1u9BLw==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/smol-toml": {
|
||||
"version": "1.4.2",
|
||||
"resolved": "https://registry.npmjs.org/smol-toml/-/smol-toml-1.4.2.tgz",
|
||||
@@ -4190,6 +4425,21 @@
|
||||
"url": "https://github.com/sponsors/wooorm"
|
||||
}
|
||||
},
|
||||
"node_modules/statuses": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.2.tgz",
|
||||
"integrity": "sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.8"
|
||||
}
|
||||
},
|
||||
"node_modules/stream-replace-string": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/stream-replace-string/-/stream-replace-string-2.0.0.tgz",
|
||||
"integrity": "sha512-TlnjJ1C0QrmxRNrON00JvaFFlNh5TTG00APw23j74ET7gkQpTASi6/L2fuiav8pzK715HXtUeClpBTw2NPSn6w==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/string-width": {
|
||||
"version": "7.2.0",
|
||||
"resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz",
|
||||
@@ -4264,6 +4514,15 @@
|
||||
"url": "https://github.com/sponsors/SuperchupuDev"
|
||||
}
|
||||
},
|
||||
"node_modules/toidentifier": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz",
|
||||
"integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=0.6"
|
||||
}
|
||||
},
|
||||
"node_modules/trim-lines": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/trim-lines/-/trim-lines-3.0.1.tgz",
|
||||
|
||||
31
node_modules/.vite/deps/_metadata.json
generated
vendored
Normal file
31
node_modules/.vite/deps/_metadata.json
generated
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
{
|
||||
"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
Normal file
6776
node_modules/.vite/deps/astro___aria-query.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
7
node_modules/.vite/deps/astro___aria-query.js.map
generated
vendored
Normal file
7
node_modules/.vite/deps/astro___aria-query.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
3754
node_modules/.vite/deps/astro___axobject-query.js
generated
vendored
Normal file
3754
node_modules/.vite/deps/astro___axobject-query.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
7
node_modules/.vite/deps/astro___axobject-query.js.map
generated
vendored
Normal file
7
node_modules/.vite/deps/astro___axobject-query.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
99
node_modules/.vite/deps/astro___cssesc.js
generated
vendored
Normal file
99
node_modules/.vite/deps/astro___cssesc.js
generated
vendored
Normal file
@@ -0,0 +1,99 @@
|
||||
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
Normal file
7
node_modules/.vite/deps/astro___cssesc.js.map
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"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
Normal file
8
node_modules/.vite/deps/chunk-BUSYA2B4.js
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
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
Normal file
7
node_modules/.vite/deps/chunk-BUSYA2B4.js.map
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": [],
|
||||
"sourcesContent": [],
|
||||
"mappings": "",
|
||||
"names": []
|
||||
}
|
||||
3
node_modules/.vite/deps/package.json
generated
vendored
Normal file
3
node_modules/.vite/deps/package.json
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"type": "module"
|
||||
}
|
||||
59
node_modules/@astrojs/node/LICENSE
generated
vendored
Normal file
59
node_modules/@astrojs/node/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,59 @@
|
||||
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.
|
||||
"""
|
||||
38
node_modules/@astrojs/node/README.md
generated
vendored
Normal file
38
node_modules/@astrojs/node/README.md
generated
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
# @astrojs/node
|
||||
|
||||
This adapter allows Astro to deploy your SSR site to Node targets.
|
||||
|
||||
## Documentation
|
||||
|
||||
Read the [`@astrojs/node` docs][docs]
|
||||
|
||||
## Support
|
||||
|
||||
- Get help in the [Astro Discord][discord]. Post questions in our `#support` forum, or visit our dedicated `#dev` channel to discuss current development and more!
|
||||
|
||||
- Check our [Astro Integration Documentation][astro-integration] for more on integrations.
|
||||
|
||||
- Submit bug reports and feature requests as [GitHub issues][issues].
|
||||
|
||||
## Contributing
|
||||
|
||||
This package is maintained by Astro's Core team. You're welcome to submit an issue or PR! These links will help you get started:
|
||||
|
||||
- [Contributor Manual][contributing]
|
||||
- [Code of Conduct][coc]
|
||||
- [Community Guide][community]
|
||||
|
||||
## License
|
||||
|
||||
MIT
|
||||
|
||||
Copyright (c) 2023–present [Astro][astro]
|
||||
|
||||
[astro]: https://astro.build/
|
||||
[docs]: https://docs.astro.build/en/guides/integrations-guide/node/
|
||||
[contributing]: https://github.com/withastro/astro/blob/main/CONTRIBUTING.md
|
||||
[coc]: https://github.com/withastro/.github/blob/main/CODE_OF_CONDUCT.md
|
||||
[community]: https://github.com/withastro/.github/blob/main/COMMUNITY_GUIDE.md
|
||||
[discord]: https://astro.build/chat/
|
||||
[issues]: https://github.com/withastro/astro/issues
|
||||
[astro-integration]: https://docs.astro.build/en/guides/integrations-guide/
|
||||
4
node_modules/@astrojs/node/dist/index.d.ts
generated
vendored
Normal file
4
node_modules/@astrojs/node/dist/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
import type { AstroAdapter, AstroIntegration } from 'astro';
|
||||
import type { Options, UserOptions } from './types.js';
|
||||
export declare function getAdapter(options: Options): AstroAdapter;
|
||||
export default function createIntegration(userOptions: UserOptions): AstroIntegration;
|
||||
123
node_modules/@astrojs/node/dist/index.js
generated
vendored
Normal file
123
node_modules/@astrojs/node/dist/index.js
generated
vendored
Normal file
@@ -0,0 +1,123 @@
|
||||
import { fileURLToPath } from "node:url";
|
||||
import { writeJson } from "@astrojs/internal-helpers/fs";
|
||||
import { AstroError } from "astro/errors";
|
||||
import { STATIC_HEADERS_FILE } from "./shared.js";
|
||||
function getAdapter(options) {
|
||||
return {
|
||||
name: "@astrojs/node",
|
||||
serverEntrypoint: "@astrojs/node/server.js",
|
||||
previewEntrypoint: "@astrojs/node/preview.js",
|
||||
exports: ["handler", "startServer", "options"],
|
||||
args: options,
|
||||
adapterFeatures: {
|
||||
buildOutput: "server",
|
||||
edgeMiddleware: false,
|
||||
experimentalStaticHeaders: options.experimentalStaticHeaders
|
||||
},
|
||||
supportedAstroFeatures: {
|
||||
hybridOutput: "stable",
|
||||
staticOutput: "stable",
|
||||
serverOutput: "stable",
|
||||
sharpImageService: "stable",
|
||||
i18nDomains: "experimental",
|
||||
envGetSecret: "stable"
|
||||
}
|
||||
};
|
||||
}
|
||||
const protocols = ["http:", "https:"];
|
||||
function createIntegration(userOptions) {
|
||||
if (!userOptions?.mode) {
|
||||
throw new AstroError(`Setting the 'mode' option is required.`);
|
||||
}
|
||||
const { experimentalErrorPageHost } = userOptions;
|
||||
if (experimentalErrorPageHost && (!URL.canParse(experimentalErrorPageHost) || !protocols.includes(new URL(experimentalErrorPageHost).protocol))) {
|
||||
throw new AstroError(
|
||||
`Invalid experimentalErrorPageHost: ${experimentalErrorPageHost}. It should be a valid URL.`
|
||||
);
|
||||
}
|
||||
let _options;
|
||||
let _config = void 0;
|
||||
let _routeToHeaders = void 0;
|
||||
return {
|
||||
name: "@astrojs/node",
|
||||
hooks: {
|
||||
"astro:config:setup": async ({ updateConfig, config, logger, command }) => {
|
||||
let session = config.session;
|
||||
_config = config;
|
||||
if (!session?.driver) {
|
||||
logger.info("Enabling sessions with filesystem storage");
|
||||
session = {
|
||||
...session,
|
||||
driver: "fs-lite",
|
||||
options: {
|
||||
base: fileURLToPath(new URL("sessions", config.cacheDir))
|
||||
}
|
||||
};
|
||||
}
|
||||
updateConfig({
|
||||
build: {
|
||||
redirects: false
|
||||
},
|
||||
image: {
|
||||
endpoint: {
|
||||
route: config.image.endpoint.route ?? "_image",
|
||||
entrypoint: config.image.endpoint.entrypoint ?? (command === "dev" ? "astro/assets/endpoint/dev" : "astro/assets/endpoint/node")
|
||||
}
|
||||
},
|
||||
session,
|
||||
vite: {
|
||||
ssr: {
|
||||
noExternal: ["@astrojs/node"]
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
"astro:build:generated": ({ experimentalRouteToHeaders }) => {
|
||||
_routeToHeaders = experimentalRouteToHeaders;
|
||||
},
|
||||
"astro:config:done": ({ setAdapter, config }) => {
|
||||
_options = {
|
||||
...userOptions,
|
||||
client: config.build.client?.toString(),
|
||||
server: config.build.server?.toString(),
|
||||
host: config.server.host,
|
||||
port: config.server.port,
|
||||
assets: config.build.assets,
|
||||
experimentalStaticHeaders: userOptions.experimentalStaticHeaders ?? false,
|
||||
experimentalErrorPageHost
|
||||
};
|
||||
setAdapter(getAdapter(_options));
|
||||
},
|
||||
"astro:build:done": async () => {
|
||||
if (!_config) {
|
||||
return;
|
||||
}
|
||||
if (_routeToHeaders && _routeToHeaders.size > 0) {
|
||||
const headersFileUrl = new URL(STATIC_HEADERS_FILE, _config.outDir);
|
||||
const headersValue = [];
|
||||
for (const [pathname, { headers }] of _routeToHeaders.entries()) {
|
||||
if (_config.experimental.csp) {
|
||||
const csp = headers.get("Content-Security-Policy");
|
||||
if (csp) {
|
||||
headersValue.push({
|
||||
pathname,
|
||||
headers: [
|
||||
{
|
||||
key: "Content-Security-Policy",
|
||||
value: csp
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
await writeJson(headersFileUrl, headersValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
export {
|
||||
createIntegration as default,
|
||||
getAdapter
|
||||
};
|
||||
4
node_modules/@astrojs/node/dist/log-listening-on.d.ts
generated
vendored
Normal file
4
node_modules/@astrojs/node/dist/log-listening-on.d.ts
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
import type http from 'node:http';
|
||||
import https from 'node:https';
|
||||
import type { AstroIntegrationLogger } from 'astro';
|
||||
export declare function logListeningOn(logger: AstroIntegrationLogger, server: http.Server | https.Server, configuredHost: string | boolean | undefined): Promise<void>;
|
||||
57
node_modules/@astrojs/node/dist/log-listening-on.js
generated
vendored
Normal file
57
node_modules/@astrojs/node/dist/log-listening-on.js
generated
vendored
Normal file
@@ -0,0 +1,57 @@
|
||||
import https from "node:https";
|
||||
import os from "node:os";
|
||||
const wildcardHosts = /* @__PURE__ */ new Set(["0.0.0.0", "::", "0000:0000:0000:0000:0000:0000:0000:0000"]);
|
||||
async function logListeningOn(logger, server, configuredHost) {
|
||||
await new Promise((resolve) => server.once("listening", resolve));
|
||||
const protocol = server instanceof https.Server ? "https" : "http";
|
||||
const host = getResolvedHostForHttpServer(configuredHost);
|
||||
const { port } = server.address();
|
||||
const address = getNetworkAddress(protocol, host, port);
|
||||
if (host === void 0 || wildcardHosts.has(host)) {
|
||||
logger.info(
|
||||
`Server listening on
|
||||
local: ${address.local[0]}
|
||||
network: ${address.network[0]}
|
||||
`
|
||||
);
|
||||
} else {
|
||||
logger.info(`Server listening on ${address.local[0]}`);
|
||||
}
|
||||
}
|
||||
function getResolvedHostForHttpServer(host) {
|
||||
if (host === false) {
|
||||
return "localhost";
|
||||
} else if (host === true) {
|
||||
return void 0;
|
||||
} else {
|
||||
return host;
|
||||
}
|
||||
}
|
||||
function getNetworkAddress(protocol = "http", hostname, port, base) {
|
||||
const NetworkAddress = {
|
||||
local: [],
|
||||
network: []
|
||||
};
|
||||
Object.values(os.networkInterfaces()).flatMap((nInterface) => nInterface ?? []).filter(
|
||||
(detail) => detail && detail.address && (detail.family === "IPv4" || // @ts-expect-error Node 18.0 - 18.3 returns number
|
||||
detail.family === 4)
|
||||
).forEach((detail) => {
|
||||
let host = detail.address.replace(
|
||||
"127.0.0.1",
|
||||
hostname === void 0 || wildcardHosts.has(hostname) ? "localhost" : hostname
|
||||
);
|
||||
if (host.includes(":")) {
|
||||
host = `[${host}]`;
|
||||
}
|
||||
const url = `${protocol}://${host}:${port}${base ? base : ""}`;
|
||||
if (detail.address.includes("127.0.0.1")) {
|
||||
NetworkAddress.local.push(url);
|
||||
} else {
|
||||
NetworkAddress.network.push(url);
|
||||
}
|
||||
});
|
||||
return NetworkAddress;
|
||||
}
|
||||
export {
|
||||
logListeningOn
|
||||
};
|
||||
11
node_modules/@astrojs/node/dist/middleware.d.ts
generated
vendored
Normal file
11
node_modules/@astrojs/node/dist/middleware.d.ts
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
import type { NodeApp } from 'astro/app/node';
|
||||
import type { Options, RequestHandler } from './types.js';
|
||||
/**
|
||||
* Creates a middleware that can be used with Express, Connect, etc.
|
||||
*
|
||||
* Similar to `createAppHandler` but can additionally be placed in the express
|
||||
* chain as an error middleware.
|
||||
*
|
||||
* https://expressjs.com/en/guide/using-middleware.html#middleware.error-handling
|
||||
*/
|
||||
export default function createMiddleware(app: NodeApp, options: Options): RequestHandler;
|
||||
29
node_modules/@astrojs/node/dist/middleware.js
generated
vendored
Normal file
29
node_modules/@astrojs/node/dist/middleware.js
generated
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
import { createAppHandler } from "./serve-app.js";
|
||||
function createMiddleware(app, options) {
|
||||
const handler = createAppHandler(app, options);
|
||||
const logger = app.getAdapterLogger();
|
||||
return async (...args) => {
|
||||
const [req, res, next, locals] = args;
|
||||
if (req instanceof Error) {
|
||||
const error = req;
|
||||
if (next) {
|
||||
return next(error);
|
||||
} else {
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
try {
|
||||
await handler(req, res, next, locals);
|
||||
} catch (err) {
|
||||
logger.error(`Could not render ${req.url}`);
|
||||
console.error(err);
|
||||
if (!res.headersSent) {
|
||||
res.writeHead(500, `Server error`);
|
||||
res.end();
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
export {
|
||||
createMiddleware as default
|
||||
};
|
||||
1
node_modules/@astrojs/node/dist/polyfill.d.ts
generated
vendored
Normal file
1
node_modules/@astrojs/node/dist/polyfill.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export {};
|
||||
2
node_modules/@astrojs/node/dist/polyfill.js
generated
vendored
Normal file
2
node_modules/@astrojs/node/dist/polyfill.js
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import { applyPolyfills } from "astro/app/node";
|
||||
applyPolyfills();
|
||||
3
node_modules/@astrojs/node/dist/preview.d.ts
generated
vendored
Normal file
3
node_modules/@astrojs/node/dist/preview.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import type { CreatePreviewServer } from 'astro';
|
||||
declare const createPreviewServer: CreatePreviewServer;
|
||||
export { createPreviewServer as default };
|
||||
50
node_modules/@astrojs/node/dist/preview.js
generated
vendored
Normal file
50
node_modules/@astrojs/node/dist/preview.js
generated
vendored
Normal file
@@ -0,0 +1,50 @@
|
||||
import { fileURLToPath } from "node:url";
|
||||
import { AstroError } from "astro/errors";
|
||||
import { logListeningOn } from "./log-listening-on.js";
|
||||
import { createServer } from "./standalone.js";
|
||||
const createPreviewServer = async (preview) => {
|
||||
let ssrHandler;
|
||||
try {
|
||||
process.env.ASTRO_NODE_AUTOSTART = "disabled";
|
||||
const ssrModule = await import(preview.serverEntrypoint.toString());
|
||||
if (typeof ssrModule.handler === "function") {
|
||||
ssrHandler = ssrModule.handler;
|
||||
} else {
|
||||
throw new AstroError(
|
||||
`The server entrypoint doesn't have a handler. Are you sure this is the right file?`
|
||||
);
|
||||
}
|
||||
} catch (err) {
|
||||
if (err.code === "ERR_MODULE_NOT_FOUND" && err.url === preview.serverEntrypoint.href) {
|
||||
throw new AstroError(
|
||||
`The server entrypoint ${fileURLToPath(
|
||||
preview.serverEntrypoint
|
||||
)} does not exist. Have you ran a build yet?`
|
||||
);
|
||||
} else {
|
||||
throw err;
|
||||
}
|
||||
}
|
||||
const host = process.env.HOST ?? preview.host ?? "0.0.0.0";
|
||||
const port = preview.port ?? 4321;
|
||||
const server = createServer(ssrHandler, host, port);
|
||||
if (preview.headers) {
|
||||
server.server.addListener("request", (_, res) => {
|
||||
if (res.statusCode === 200) {
|
||||
for (const [name, value] of Object.entries(preview.headers ?? {})) {
|
||||
if (value) res.setHeader(name, value);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
logListeningOn(preview.logger, server.server, host);
|
||||
await new Promise((resolve, reject) => {
|
||||
server.server.once("listening", resolve);
|
||||
server.server.once("error", reject);
|
||||
server.server.listen(port, host);
|
||||
});
|
||||
return server;
|
||||
};
|
||||
export {
|
||||
createPreviewServer as default
|
||||
};
|
||||
8
node_modules/@astrojs/node/dist/serve-app.d.ts
generated
vendored
Normal file
8
node_modules/@astrojs/node/dist/serve-app.d.ts
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
import { NodeApp } from 'astro/app/node';
|
||||
import type { Options, RequestHandler } from './types.js';
|
||||
/**
|
||||
* Creates a Node.js http listener for on-demand rendered pages, compatible with http.createServer and Connect middleware.
|
||||
* If the next callback is provided, it will be called if the request does not have a matching route.
|
||||
* Intended to be used in both standalone and middleware mode.
|
||||
*/
|
||||
export declare function createAppHandler(app: NodeApp, options: Options): RequestHandler;
|
||||
53
node_modules/@astrojs/node/dist/serve-app.js
generated
vendored
Normal file
53
node_modules/@astrojs/node/dist/serve-app.js
generated
vendored
Normal file
@@ -0,0 +1,53 @@
|
||||
import { AsyncLocalStorage } from "node:async_hooks";
|
||||
import { NodeApp } from "astro/app/node";
|
||||
function createAppHandler(app, options) {
|
||||
const als = new AsyncLocalStorage();
|
||||
const logger = app.getAdapterLogger();
|
||||
process.on("unhandledRejection", (reason) => {
|
||||
const requestUrl = als.getStore();
|
||||
logger.error(`Unhandled rejection while rendering ${requestUrl}`);
|
||||
console.error(reason);
|
||||
});
|
||||
const originUrl = options.experimentalErrorPageHost ? new URL(options.experimentalErrorPageHost) : void 0;
|
||||
const prerenderedErrorPageFetch = originUrl ? (url) => {
|
||||
const errorPageUrl = new URL(url);
|
||||
errorPageUrl.protocol = originUrl.protocol;
|
||||
errorPageUrl.host = originUrl.host;
|
||||
return fetch(errorPageUrl);
|
||||
} : void 0;
|
||||
return async (req, res, next, locals) => {
|
||||
let request;
|
||||
try {
|
||||
request = NodeApp.createRequest(req, {
|
||||
allowedDomains: app.getAllowedDomains?.() ?? []
|
||||
});
|
||||
} catch (err) {
|
||||
logger.error(`Could not render ${req.url}`);
|
||||
console.error(err);
|
||||
res.statusCode = 500;
|
||||
res.end("Internal Server Error");
|
||||
return;
|
||||
}
|
||||
const routeData = app.match(request, true);
|
||||
if (routeData) {
|
||||
const response = await als.run(
|
||||
request.url,
|
||||
() => app.render(request, {
|
||||
addCookieHeader: true,
|
||||
locals,
|
||||
routeData,
|
||||
prerenderedErrorPageFetch
|
||||
})
|
||||
);
|
||||
await NodeApp.writeResponse(response, res);
|
||||
} else if (next) {
|
||||
return next();
|
||||
} else {
|
||||
const response = await app.render(req, { addCookieHeader: true, prerenderedErrorPageFetch });
|
||||
await NodeApp.writeResponse(response, res);
|
||||
}
|
||||
};
|
||||
}
|
||||
export {
|
||||
createAppHandler
|
||||
};
|
||||
10
node_modules/@astrojs/node/dist/serve-static.d.ts
generated
vendored
Normal file
10
node_modules/@astrojs/node/dist/serve-static.d.ts
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
import type { IncomingMessage, ServerResponse } from 'node:http';
|
||||
import type { NodeApp } from 'astro/app/node';
|
||||
import type { Options } from './types.js';
|
||||
/**
|
||||
* Creates a Node.js http listener for static files and prerendered pages.
|
||||
* In standalone mode, the static handler is queried first for the static files.
|
||||
* If one matching the request path is not found, it relegates to the SSR handler.
|
||||
* Intended to be used only in the standalone mode.
|
||||
*/
|
||||
export declare function createStaticHandler(app: NodeApp, options: Options): (req: IncomingMessage, res: ServerResponse, ssr: () => unknown) => ServerResponse<IncomingMessage> | undefined;
|
||||
111
node_modules/@astrojs/node/dist/serve-static.js
generated
vendored
Normal file
111
node_modules/@astrojs/node/dist/serve-static.js
generated
vendored
Normal file
@@ -0,0 +1,111 @@
|
||||
import fs from "node:fs";
|
||||
import path from "node:path";
|
||||
import url from "node:url";
|
||||
import { hasFileExtension, isInternalPath } from "@astrojs/internal-helpers/path";
|
||||
import send from "send";
|
||||
function createStaticHandler(app, options) {
|
||||
const client = resolveClientDir(options);
|
||||
return (req, res, ssr) => {
|
||||
if (req.url) {
|
||||
const [urlPath, urlQuery] = req.url.split("?");
|
||||
const filePath = path.join(client, app.removeBase(urlPath));
|
||||
let isDirectory = false;
|
||||
try {
|
||||
isDirectory = fs.lstatSync(filePath).isDirectory();
|
||||
} catch {
|
||||
}
|
||||
const { trailingSlash = "ignore" } = options;
|
||||
const hasSlash = urlPath.endsWith("/");
|
||||
let pathname = urlPath;
|
||||
if (app.headersMap && app.headersMap.length > 0) {
|
||||
const routeData = app.match(req, true);
|
||||
if (routeData && routeData.prerender) {
|
||||
const matchedRoute = app.headersMap.find((header) => header.pathname.includes(pathname));
|
||||
if (matchedRoute) {
|
||||
for (const header of matchedRoute.headers) {
|
||||
res.setHeader(header.key, header.value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
switch (trailingSlash) {
|
||||
case "never": {
|
||||
if (isDirectory && urlPath !== "/" && hasSlash) {
|
||||
pathname = urlPath.slice(0, -1) + (urlQuery ? "?" + urlQuery : "");
|
||||
res.statusCode = 301;
|
||||
res.setHeader("Location", pathname);
|
||||
return res.end();
|
||||
}
|
||||
if (isDirectory && !hasSlash) {
|
||||
pathname = `${urlPath}/index.html`;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "ignore": {
|
||||
if (isDirectory && !hasSlash) {
|
||||
pathname = `${urlPath}/index.html`;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "always": {
|
||||
if (!hasSlash && !hasFileExtension(urlPath) && !isInternalPath(urlPath)) {
|
||||
pathname = urlPath + "/" + (urlQuery ? "?" + urlQuery : "");
|
||||
res.statusCode = 301;
|
||||
res.setHeader("Location", pathname);
|
||||
return res.end();
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
pathname = prependForwardSlash(app.removeBase(pathname));
|
||||
const stream = send(req, pathname, {
|
||||
root: client,
|
||||
dotfiles: pathname.startsWith("/.well-known/") ? "allow" : "deny"
|
||||
});
|
||||
let forwardError = false;
|
||||
stream.on("error", (err) => {
|
||||
if (forwardError) {
|
||||
console.error(err.toString());
|
||||
res.writeHead(500);
|
||||
res.end("Internal server error");
|
||||
return;
|
||||
}
|
||||
ssr();
|
||||
});
|
||||
stream.on("headers", (_res) => {
|
||||
if (pathname.startsWith(`/${options.assets}/`)) {
|
||||
_res.setHeader("Cache-Control", "public, max-age=31536000, immutable");
|
||||
}
|
||||
});
|
||||
stream.on("file", () => {
|
||||
forwardError = true;
|
||||
});
|
||||
stream.pipe(res);
|
||||
} else {
|
||||
ssr();
|
||||
}
|
||||
};
|
||||
}
|
||||
function resolveClientDir(options) {
|
||||
const clientURLRaw = new URL(options.client);
|
||||
const serverURLRaw = new URL(options.server);
|
||||
const rel = path.relative(url.fileURLToPath(serverURLRaw), url.fileURLToPath(clientURLRaw));
|
||||
const serverFolder = path.basename(options.server);
|
||||
let serverEntryFolderURL = path.dirname(import.meta.url);
|
||||
while (!serverEntryFolderURL.endsWith(serverFolder)) {
|
||||
serverEntryFolderURL = path.dirname(serverEntryFolderURL);
|
||||
}
|
||||
const serverEntryURL = serverEntryFolderURL + "/entry.mjs";
|
||||
const clientURL = new URL(appendForwardSlash(rel), serverEntryURL);
|
||||
const client = url.fileURLToPath(clientURL);
|
||||
return client;
|
||||
}
|
||||
function prependForwardSlash(pth) {
|
||||
return pth.startsWith("/") ? pth : "/" + pth;
|
||||
}
|
||||
function appendForwardSlash(pth) {
|
||||
return pth.endsWith("/") ? pth : pth + "/";
|
||||
}
|
||||
export {
|
||||
createStaticHandler
|
||||
};
|
||||
18
node_modules/@astrojs/node/dist/server.d.ts
generated
vendored
Normal file
18
node_modules/@astrojs/node/dist/server.d.ts
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
import './polyfill.js';
|
||||
import type { SSRManifest } from 'astro';
|
||||
import type { Options } from './types.js';
|
||||
export declare function createExports(manifest: SSRManifest, options: Options): {
|
||||
options: Options;
|
||||
handler: import("./types.js").RequestHandler;
|
||||
startServer: () => {
|
||||
server: {
|
||||
host: string;
|
||||
port: number;
|
||||
closed(): Promise<void>;
|
||||
stop(): Promise<void>;
|
||||
server: import("http").Server<typeof import("http").IncomingMessage, typeof import("http").ServerResponse> | import("https").Server<typeof import("http").IncomingMessage, typeof import("http").ServerResponse>;
|
||||
};
|
||||
done: Promise<void>;
|
||||
};
|
||||
};
|
||||
export declare function start(manifest: SSRManifest, options: Options): void;
|
||||
56
node_modules/@astrojs/node/dist/server.js
generated
vendored
Normal file
56
node_modules/@astrojs/node/dist/server.js
generated
vendored
Normal file
@@ -0,0 +1,56 @@
|
||||
import "./polyfill.js";
|
||||
import { existsSync, readFileSync } from "node:fs";
|
||||
import { NodeApp } from "astro/app/node";
|
||||
import { setGetEnv } from "astro/env/setup";
|
||||
import createMiddleware from "./middleware.js";
|
||||
import { STATIC_HEADERS_FILE } from "./shared.js";
|
||||
import startServer, { createStandaloneHandler } from "./standalone.js";
|
||||
setGetEnv((key) => process.env[key]);
|
||||
function createExports(manifest, options) {
|
||||
const app = new NodeApp(manifest, !options.experimentalDisableStreaming);
|
||||
let headersMap = void 0;
|
||||
if (options.experimentalStaticHeaders) {
|
||||
headersMap = readHeadersJson(manifest.outDir);
|
||||
}
|
||||
if (headersMap) {
|
||||
app.setHeadersMap(headersMap);
|
||||
}
|
||||
options.trailingSlash = manifest.trailingSlash;
|
||||
return {
|
||||
options,
|
||||
handler: options.mode === "middleware" ? createMiddleware(app, options) : createStandaloneHandler(app, options),
|
||||
startServer: () => startServer(app, options)
|
||||
};
|
||||
}
|
||||
function start(manifest, options) {
|
||||
if (options.mode !== "standalone" || process.env.ASTRO_NODE_AUTOSTART === "disabled") {
|
||||
return;
|
||||
}
|
||||
let headersMap = void 0;
|
||||
if (options.experimentalStaticHeaders) {
|
||||
headersMap = readHeadersJson(manifest.outDir);
|
||||
}
|
||||
const app = new NodeApp(manifest, !options.experimentalDisableStreaming);
|
||||
if (headersMap) {
|
||||
app.setHeadersMap(headersMap);
|
||||
}
|
||||
startServer(app, options);
|
||||
}
|
||||
function readHeadersJson(outDir) {
|
||||
let headersMap = void 0;
|
||||
const headersUrl = new URL(STATIC_HEADERS_FILE, outDir);
|
||||
if (existsSync(headersUrl)) {
|
||||
const content = readFileSync(headersUrl, "utf-8");
|
||||
try {
|
||||
headersMap = JSON.parse(content);
|
||||
} catch (e) {
|
||||
console.error("[@astrojs/node] Error parsing _headers.json: " + e.message);
|
||||
console.error("[@astrojs/node] Please make sure your _headers.json is valid JSON.");
|
||||
}
|
||||
}
|
||||
return headersMap;
|
||||
}
|
||||
export {
|
||||
createExports,
|
||||
start
|
||||
};
|
||||
1
node_modules/@astrojs/node/dist/shared.d.ts
generated
vendored
Normal file
1
node_modules/@astrojs/node/dist/shared.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export declare const STATIC_HEADERS_FILE = "_experimentalHeaders.json";
|
||||
4
node_modules/@astrojs/node/dist/shared.js
generated
vendored
Normal file
4
node_modules/@astrojs/node/dist/shared.js
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
const STATIC_HEADERS_FILE = "_experimentalHeaders.json";
|
||||
export {
|
||||
STATIC_HEADERS_FILE
|
||||
};
|
||||
23
node_modules/@astrojs/node/dist/standalone.d.ts
generated
vendored
Normal file
23
node_modules/@astrojs/node/dist/standalone.d.ts
generated
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
import http from 'node:http';
|
||||
import https from 'node:https';
|
||||
import type { NodeApp } from 'astro/app/node';
|
||||
import type { Options } from './types.js';
|
||||
export declare const hostOptions: (host: Options["host"]) => string;
|
||||
export default function standalone(app: NodeApp, options: Options): {
|
||||
server: {
|
||||
host: string;
|
||||
port: number;
|
||||
closed(): Promise<void>;
|
||||
stop(): Promise<void>;
|
||||
server: http.Server<typeof http.IncomingMessage, typeof http.ServerResponse> | https.Server<typeof http.IncomingMessage, typeof http.ServerResponse>;
|
||||
};
|
||||
done: Promise<void>;
|
||||
};
|
||||
export declare function createStandaloneHandler(app: NodeApp, options: Options): (req: http.IncomingMessage, res: http.ServerResponse) => void;
|
||||
export declare function createServer(listener: http.RequestListener, host: string, port: number): {
|
||||
host: string;
|
||||
port: number;
|
||||
closed(): Promise<void>;
|
||||
stop(): Promise<void>;
|
||||
server: http.Server<typeof http.IncomingMessage, typeof http.ServerResponse> | https.Server<typeof http.IncomingMessage, typeof http.ServerResponse>;
|
||||
};
|
||||
82
node_modules/@astrojs/node/dist/standalone.js
generated
vendored
Normal file
82
node_modules/@astrojs/node/dist/standalone.js
generated
vendored
Normal file
@@ -0,0 +1,82 @@
|
||||
import fs from "node:fs";
|
||||
import http from "node:http";
|
||||
import https from "node:https";
|
||||
import enableDestroy from "server-destroy";
|
||||
import { logListeningOn } from "./log-listening-on.js";
|
||||
import { createAppHandler } from "./serve-app.js";
|
||||
import { createStaticHandler } from "./serve-static.js";
|
||||
const hostOptions = (host) => {
|
||||
if (typeof host === "boolean") {
|
||||
return host ? "0.0.0.0" : "localhost";
|
||||
}
|
||||
return host;
|
||||
};
|
||||
function standalone(app, options) {
|
||||
const port = process.env.PORT ? Number(process.env.PORT) : options.port ?? 8080;
|
||||
const host = process.env.HOST ?? hostOptions(options.host);
|
||||
const handler = createStandaloneHandler(app, options);
|
||||
const server = createServer(handler, host, port);
|
||||
server.server.listen(port, host);
|
||||
if (process.env.ASTRO_NODE_LOGGING !== "disabled") {
|
||||
logListeningOn(app.getAdapterLogger(), server.server, host);
|
||||
}
|
||||
return {
|
||||
server,
|
||||
done: server.closed()
|
||||
};
|
||||
}
|
||||
function createStandaloneHandler(app, options) {
|
||||
const appHandler = createAppHandler(app, options);
|
||||
const staticHandler = createStaticHandler(app, options);
|
||||
return (req, res) => {
|
||||
try {
|
||||
decodeURI(req.url);
|
||||
} catch {
|
||||
res.writeHead(400);
|
||||
res.end("Bad request.");
|
||||
return;
|
||||
}
|
||||
staticHandler(req, res, () => appHandler(req, res));
|
||||
};
|
||||
}
|
||||
function createServer(listener, host, port) {
|
||||
let httpServer;
|
||||
if (process.env.SERVER_CERT_PATH && process.env.SERVER_KEY_PATH) {
|
||||
httpServer = https.createServer(
|
||||
{
|
||||
key: fs.readFileSync(process.env.SERVER_KEY_PATH),
|
||||
cert: fs.readFileSync(process.env.SERVER_CERT_PATH)
|
||||
},
|
||||
listener
|
||||
);
|
||||
} else {
|
||||
httpServer = http.createServer(listener);
|
||||
}
|
||||
enableDestroy(httpServer);
|
||||
const closed = new Promise((resolve, reject) => {
|
||||
httpServer.addListener("close", resolve);
|
||||
httpServer.addListener("error", reject);
|
||||
});
|
||||
const previewable = {
|
||||
host,
|
||||
port,
|
||||
closed() {
|
||||
return closed;
|
||||
},
|
||||
async stop() {
|
||||
await new Promise((resolve, reject) => {
|
||||
httpServer.destroy((err) => err ? reject(err) : resolve(void 0));
|
||||
});
|
||||
}
|
||||
};
|
||||
return {
|
||||
server: httpServer,
|
||||
...previewable
|
||||
};
|
||||
}
|
||||
export {
|
||||
createServer,
|
||||
createStandaloneHandler,
|
||||
standalone as default,
|
||||
hostOptions
|
||||
};
|
||||
47
node_modules/@astrojs/node/dist/types.d.ts
generated
vendored
Normal file
47
node_modules/@astrojs/node/dist/types.d.ts
generated
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
import type { IncomingMessage, ServerResponse } from 'node:http';
|
||||
import type { SSRManifest } from 'astro';
|
||||
export interface UserOptions {
|
||||
/**
|
||||
* Specifies the mode that the adapter builds to.
|
||||
*
|
||||
* - 'middleware' - Build to middleware, to be used within another Node.js server, such as Express.
|
||||
* - 'standalone' - Build to a standalone server. The server starts up just by running the built script.
|
||||
*/
|
||||
mode: 'middleware' | 'standalone';
|
||||
/**
|
||||
* Disables HTML streaming. This is useful for example if there are constraints from your host.
|
||||
*/
|
||||
experimentalDisableStreaming?: boolean;
|
||||
/**
|
||||
* If enabled, the adapter will save [static headers in the framework API file](https://docs.netlify.com/frameworks-api/#headers).
|
||||
*
|
||||
* Here the list of the headers that are added:
|
||||
* - The CSP header of the static pages is added when CSP support is enabled.
|
||||
*/
|
||||
experimentalStaticHeaders?: boolean;
|
||||
/**
|
||||
* The host that should be used if the server needs to fetch the prerendered error page.
|
||||
* If not provided, this will default to the host of the server. This should be set if the server
|
||||
* should fetch prerendered error pages from a different host than the public URL of the server.
|
||||
* This is useful for example if the server is behind a reverse proxy or a load balancer, or if
|
||||
* static files are hosted on a different domain. Do not include a path in the URL: it will be ignored.
|
||||
*/
|
||||
experimentalErrorPageHost?: string | URL;
|
||||
}
|
||||
export interface Options extends UserOptions {
|
||||
host: string | boolean;
|
||||
port: number;
|
||||
server: string;
|
||||
client: string;
|
||||
assets: string;
|
||||
trailingSlash?: SSRManifest['trailingSlash'];
|
||||
experimentalStaticHeaders: boolean;
|
||||
}
|
||||
export type RequestHandler = (...args: RequestHandlerParams) => void | Promise<void>;
|
||||
type RequestHandlerParams = [
|
||||
req: IncomingMessage,
|
||||
res: ServerResponse,
|
||||
next?: (err?: unknown) => void,
|
||||
locals?: object
|
||||
];
|
||||
export {};
|
||||
0
node_modules/@astrojs/node/dist/types.js
generated
vendored
Normal file
0
node_modules/@astrojs/node/dist/types.js
generated
vendored
Normal file
57
node_modules/@astrojs/node/package.json
generated
vendored
Normal file
57
node_modules/@astrojs/node/package.json
generated
vendored
Normal file
@@ -0,0 +1,57 @@
|
||||
{
|
||||
"name": "@astrojs/node",
|
||||
"description": "Deploy your site to a Node.js server",
|
||||
"version": "9.5.0",
|
||||
"type": "module",
|
||||
"types": "./dist/index.d.ts",
|
||||
"author": "withastro",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/withastro/astro.git",
|
||||
"directory": "packages/integrations/node"
|
||||
},
|
||||
"keywords": [
|
||||
"withastro",
|
||||
"astro-adapter"
|
||||
],
|
||||
"bugs": "https://github.com/withastro/astro/issues",
|
||||
"homepage": "https://docs.astro.build/en/guides/integrations-guide/node/",
|
||||
"exports": {
|
||||
".": "./dist/index.js",
|
||||
"./server.js": "./dist/server.js",
|
||||
"./preview.js": "./dist/preview.js",
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"files": [
|
||||
"dist"
|
||||
],
|
||||
"dependencies": {
|
||||
"send": "^1.2.0",
|
||||
"server-destroy": "^1.0.1",
|
||||
"@astrojs/internal-helpers": "0.7.4"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"astro": "^5.14.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^22.10.6",
|
||||
"@types/send": "^0.17.5",
|
||||
"@types/server-destroy": "^1.0.4",
|
||||
"cheerio": "1.1.2",
|
||||
"devalue": "^5.3.2",
|
||||
"express": "^4.21.2",
|
||||
"node-mocks-http": "^1.17.2",
|
||||
"astro": "5.14.5",
|
||||
"astro-scripts": "0.0.14"
|
||||
},
|
||||
"publishConfig": {
|
||||
"provenance": true
|
||||
},
|
||||
"scripts": {
|
||||
"dev": "astro-scripts dev \"src/**/*.ts\"",
|
||||
"build": "astro-scripts build \"src/**/*.ts\" && tsc",
|
||||
"build:ci": "astro-scripts build \"src/**/*.ts\"",
|
||||
"test": "astro-scripts test \"test/**/*.test.js\""
|
||||
}
|
||||
}
|
||||
59
node_modules/@astrojs/sitemap/LICENSE
generated
vendored
Normal file
59
node_modules/@astrojs/sitemap/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,59 @@
|
||||
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.
|
||||
"""
|
||||
38
node_modules/@astrojs/sitemap/README.md
generated
vendored
Normal file
38
node_modules/@astrojs/sitemap/README.md
generated
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
# @astrojs/sitemap 🗺
|
||||
|
||||
This **[Astro integration][astro-integration]** generates a sitemap based on your pages when you build your Astro project.
|
||||
|
||||
## Documentation
|
||||
|
||||
Read the [`@astrojs/sitemap` docs][docs]
|
||||
|
||||
## Support
|
||||
|
||||
- Get help in the [Astro Discord][discord]. Post questions in our `#support` forum, or visit our dedicated `#dev` channel to discuss current development and more!
|
||||
|
||||
- Check our [Astro Integration Documentation][astro-integration] for more on integrations.
|
||||
|
||||
- Submit bug reports and feature requests as [GitHub issues][issues].
|
||||
|
||||
## Contributing
|
||||
|
||||
This package is maintained by Astro's Core team. You're welcome to submit an issue or PR! These links will help you get started:
|
||||
|
||||
- [Contributor Manual][contributing]
|
||||
- [Code of Conduct][coc]
|
||||
- [Community Guide][community]
|
||||
|
||||
## License
|
||||
|
||||
MIT
|
||||
|
||||
Copyright (c) 2023–present [Astro][astro]
|
||||
|
||||
[astro]: https://astro.build/
|
||||
[docs]: https://docs.astro.build/en/guides/integrations-guide/sitemap/
|
||||
[contributing]: https://github.com/withastro/astro/blob/main/CONTRIBUTING.md
|
||||
[coc]: https://github.com/withastro/.github/blob/main/CODE_OF_CONDUCT.md
|
||||
[community]: https://github.com/withastro/.github/blob/main/COMMUNITY_GUIDE.md
|
||||
[discord]: https://astro.build/chat/
|
||||
[issues]: https://github.com/withastro/astro/issues
|
||||
[astro-integration]: https://docs.astro.build/en/guides/integrations-guide/
|
||||
10
node_modules/@astrojs/sitemap/dist/config-defaults.d.ts
generated
vendored
Normal file
10
node_modules/@astrojs/sitemap/dist/config-defaults.d.ts
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
export declare const SITEMAP_CONFIG_DEFAULTS: {
|
||||
filenameBase: string;
|
||||
entryLimit: number;
|
||||
namespaces: {
|
||||
news: true;
|
||||
xhtml: true;
|
||||
image: true;
|
||||
video: true;
|
||||
};
|
||||
};
|
||||
13
node_modules/@astrojs/sitemap/dist/config-defaults.js
generated
vendored
Normal file
13
node_modules/@astrojs/sitemap/dist/config-defaults.js
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
const SITEMAP_CONFIG_DEFAULTS = {
|
||||
filenameBase: "sitemap",
|
||||
entryLimit: 45e3,
|
||||
namespaces: {
|
||||
news: true,
|
||||
xhtml: true,
|
||||
image: true,
|
||||
video: true
|
||||
}
|
||||
};
|
||||
export {
|
||||
SITEMAP_CONFIG_DEFAULTS
|
||||
};
|
||||
3
node_modules/@astrojs/sitemap/dist/generate-sitemap.d.ts
generated
vendored
Normal file
3
node_modules/@astrojs/sitemap/dist/generate-sitemap.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import type { SitemapItem, SitemapOptions } from './index.js';
|
||||
/** Construct sitemap.xml given a set of URLs */
|
||||
export declare function generateSitemap(pages: string[], finalSiteUrl: string, opts?: SitemapOptions): SitemapItem[];
|
||||
52
node_modules/@astrojs/sitemap/dist/generate-sitemap.js
generated
vendored
Normal file
52
node_modules/@astrojs/sitemap/dist/generate-sitemap.js
generated
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
import { parseI18nUrl } from "./utils/parse-i18n-url.js";
|
||||
function generateSitemap(pages, finalSiteUrl, opts) {
|
||||
const { changefreq, priority, lastmod: lastmodSrc, i18n } = opts ?? {};
|
||||
const urls = [...pages];
|
||||
urls.sort((a, b) => a.localeCompare(b, "en", { numeric: true }));
|
||||
const lastmod = lastmodSrc?.toISOString();
|
||||
const { defaultLocale, locales } = i18n ?? {};
|
||||
let getI18nLinks;
|
||||
if (defaultLocale && locales) {
|
||||
getI18nLinks = createGetI18nLinks(urls, defaultLocale, locales, finalSiteUrl);
|
||||
}
|
||||
const urlData = urls.map((url, i) => ({
|
||||
url,
|
||||
links: getI18nLinks?.(i),
|
||||
lastmod,
|
||||
priority,
|
||||
changefreq
|
||||
}));
|
||||
return urlData;
|
||||
}
|
||||
function createGetI18nLinks(urls, defaultLocale, locales, finalSiteUrl) {
|
||||
const parsedI18nUrls = urls.map((url) => parseI18nUrl(url, defaultLocale, locales, finalSiteUrl));
|
||||
const i18nPathToLinksCache = /* @__PURE__ */ new Map();
|
||||
return (urlIndex) => {
|
||||
const i18nUrl = parsedI18nUrls[urlIndex];
|
||||
if (!i18nUrl) {
|
||||
return void 0;
|
||||
}
|
||||
const cached = i18nPathToLinksCache.get(i18nUrl.path);
|
||||
if (cached) {
|
||||
return cached;
|
||||
}
|
||||
const links = [];
|
||||
for (let i = 0; i < parsedI18nUrls.length; i++) {
|
||||
const parsed = parsedI18nUrls[i];
|
||||
if (parsed?.path === i18nUrl.path) {
|
||||
links.push({
|
||||
url: urls[i],
|
||||
lang: locales[parsed.locale]
|
||||
});
|
||||
}
|
||||
}
|
||||
if (links.length <= 1) {
|
||||
return void 0;
|
||||
}
|
||||
i18nPathToLinksCache.set(i18nUrl.path, links);
|
||||
return links;
|
||||
};
|
||||
}
|
||||
export {
|
||||
generateSitemap
|
||||
};
|
||||
30
node_modules/@astrojs/sitemap/dist/index.d.ts
generated
vendored
Normal file
30
node_modules/@astrojs/sitemap/dist/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
import type { AstroIntegration } from 'astro';
|
||||
import type { EnumChangefreq, LinkItem as LinkItemBase, SitemapItemLoose } from 'sitemap';
|
||||
export { EnumChangefreq as ChangeFreqEnum } from 'sitemap';
|
||||
export type ChangeFreq = `${EnumChangefreq}`;
|
||||
export type SitemapItem = Pick<SitemapItemLoose, 'url' | 'lastmod' | 'changefreq' | 'priority' | 'links'>;
|
||||
export type LinkItem = LinkItemBase;
|
||||
export type SitemapOptions = {
|
||||
filenameBase?: string;
|
||||
filter?(page: string): boolean;
|
||||
customSitemaps?: string[];
|
||||
customPages?: string[];
|
||||
i18n?: {
|
||||
defaultLocale: string;
|
||||
locales: Record<string, string>;
|
||||
};
|
||||
entryLimit?: number;
|
||||
changefreq?: ChangeFreq;
|
||||
lastmod?: Date;
|
||||
priority?: number;
|
||||
serialize?(item: SitemapItem): SitemapItem | Promise<SitemapItem | undefined> | undefined;
|
||||
xslURL?: string;
|
||||
namespaces?: {
|
||||
news?: boolean;
|
||||
xhtml?: boolean;
|
||||
image?: boolean;
|
||||
video?: boolean;
|
||||
};
|
||||
} | undefined;
|
||||
declare const createPlugin: (options?: SitemapOptions) => AstroIntegration;
|
||||
export default createPlugin;
|
||||
138
node_modules/@astrojs/sitemap/dist/index.js
generated
vendored
Normal file
138
node_modules/@astrojs/sitemap/dist/index.js
generated
vendored
Normal file
@@ -0,0 +1,138 @@
|
||||
import path from "node:path";
|
||||
import { fileURLToPath } from "node:url";
|
||||
import { ZodError } from "zod";
|
||||
import { generateSitemap } from "./generate-sitemap.js";
|
||||
import { validateOptions } from "./validate-options.js";
|
||||
import { writeSitemap } from "./write-sitemap.js";
|
||||
import { EnumChangefreq } from "sitemap";
|
||||
function formatConfigErrorMessage(err) {
|
||||
const errorList = err.issues.map((issue) => ` ${issue.path.join(".")} ${issue.message + "."}`);
|
||||
return errorList.join("\n");
|
||||
}
|
||||
const PKG_NAME = "@astrojs/sitemap";
|
||||
const STATUS_CODE_PAGES = /* @__PURE__ */ new Set(["404", "500"]);
|
||||
const isStatusCodePage = (locales) => {
|
||||
const statusPathNames = new Set(
|
||||
locales.flatMap((locale) => [...STATUS_CODE_PAGES].map((page) => `${locale}/${page}`)).concat([...STATUS_CODE_PAGES])
|
||||
);
|
||||
return (pathname) => {
|
||||
if (pathname.endsWith("/")) {
|
||||
pathname = pathname.slice(0, -1);
|
||||
}
|
||||
if (pathname.startsWith("/")) {
|
||||
pathname = pathname.slice(1);
|
||||
}
|
||||
return statusPathNames.has(pathname);
|
||||
};
|
||||
};
|
||||
const createPlugin = (options) => {
|
||||
let config;
|
||||
return {
|
||||
name: PKG_NAME,
|
||||
hooks: {
|
||||
"astro:config:done": async ({ config: cfg }) => {
|
||||
config = cfg;
|
||||
},
|
||||
"astro:build:done": async ({ dir, routes, pages, logger }) => {
|
||||
try {
|
||||
if (!config.site) {
|
||||
logger.warn(
|
||||
"The Sitemap integration requires the `site` astro.config option. Skipping."
|
||||
);
|
||||
return;
|
||||
}
|
||||
const opts = validateOptions(config.site, options);
|
||||
const { filenameBase, filter, customPages, customSitemaps, serialize, entryLimit } = opts;
|
||||
const outFile = `${filenameBase}-index.xml`;
|
||||
const finalSiteUrl = new URL(config.base, config.site);
|
||||
const shouldIgnoreStatus = isStatusCodePage(Object.keys(opts.i18n?.locales ?? {}));
|
||||
let pageUrls = pages.filter((p) => !shouldIgnoreStatus(p.pathname)).map((p) => {
|
||||
if (p.pathname !== "" && !finalSiteUrl.pathname.endsWith("/"))
|
||||
finalSiteUrl.pathname += "/";
|
||||
if (p.pathname.startsWith("/")) p.pathname = p.pathname.slice(1);
|
||||
const fullPath = finalSiteUrl.pathname + p.pathname;
|
||||
return new URL(fullPath, finalSiteUrl).href;
|
||||
});
|
||||
const routeUrls = routes.reduce((urls, r) => {
|
||||
if (r.type !== "page") return urls;
|
||||
if (r.pathname) {
|
||||
if (shouldIgnoreStatus(r.pathname ?? r.route)) return urls;
|
||||
let fullPath = finalSiteUrl.pathname;
|
||||
if (fullPath.endsWith("/")) fullPath += r.generate(r.pathname).substring(1);
|
||||
else fullPath += r.generate(r.pathname);
|
||||
const newUrl = new URL(fullPath, finalSiteUrl).href;
|
||||
if (config.trailingSlash === "never") {
|
||||
urls.push(newUrl);
|
||||
} else if (config.build.format === "directory" && !newUrl.endsWith("/")) {
|
||||
urls.push(newUrl + "/");
|
||||
} else {
|
||||
urls.push(newUrl);
|
||||
}
|
||||
}
|
||||
return urls;
|
||||
}, []);
|
||||
pageUrls = Array.from(/* @__PURE__ */ new Set([...pageUrls, ...routeUrls, ...customPages ?? []]));
|
||||
if (filter) {
|
||||
pageUrls = pageUrls.filter(filter);
|
||||
}
|
||||
if (pageUrls.length === 0) {
|
||||
logger.warn(`No pages found!
|
||||
\`${outFile}\` not created.`);
|
||||
return;
|
||||
}
|
||||
let urlData = generateSitemap(pageUrls, finalSiteUrl.href, opts);
|
||||
if (serialize) {
|
||||
try {
|
||||
const serializedUrls = [];
|
||||
for (const item of urlData) {
|
||||
const serialized = await Promise.resolve(serialize(item));
|
||||
if (serialized) {
|
||||
serializedUrls.push(serialized);
|
||||
}
|
||||
}
|
||||
if (serializedUrls.length === 0) {
|
||||
logger.warn("No pages found!");
|
||||
return;
|
||||
}
|
||||
urlData = serializedUrls;
|
||||
} catch (err) {
|
||||
logger.error(`Error serializing pages
|
||||
${err.toString()}`);
|
||||
return;
|
||||
}
|
||||
}
|
||||
const destDir = fileURLToPath(dir);
|
||||
const lastmod = opts.lastmod?.toISOString();
|
||||
const xslURL = opts.xslURL ? new URL(opts.xslURL, finalSiteUrl).href : void 0;
|
||||
await writeSitemap(
|
||||
{
|
||||
filenameBase,
|
||||
hostname: finalSiteUrl.href,
|
||||
destinationDir: destDir,
|
||||
publicBasePath: config.base,
|
||||
sourceData: urlData,
|
||||
limit: entryLimit,
|
||||
customSitemaps,
|
||||
xslURL,
|
||||
lastmod,
|
||||
namespaces: opts.namespaces
|
||||
},
|
||||
config
|
||||
);
|
||||
logger.info(`\`${outFile}\` created at \`${path.relative(process.cwd(), destDir)}\``);
|
||||
} catch (err) {
|
||||
if (err instanceof ZodError) {
|
||||
logger.warn(formatConfigErrorMessage(err));
|
||||
} else {
|
||||
throw err;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
var index_default = createPlugin;
|
||||
export {
|
||||
EnumChangefreq as ChangeFreqEnum,
|
||||
index_default as default
|
||||
};
|
||||
91
node_modules/@astrojs/sitemap/dist/schema.d.ts
generated
vendored
Normal file
91
node_modules/@astrojs/sitemap/dist/schema.d.ts
generated
vendored
Normal file
@@ -0,0 +1,91 @@
|
||||
import { EnumChangefreq as ChangeFreq } from 'sitemap';
|
||||
import { z } from 'zod';
|
||||
export declare const SitemapOptionsSchema: z.ZodDefault<z.ZodObject<{
|
||||
filenameBase: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
||||
filter: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodString], z.ZodUnknown>, z.ZodBoolean>>;
|
||||
customSitemaps: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
||||
customPages: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
||||
canonicalURL: z.ZodOptional<z.ZodString>;
|
||||
xslURL: z.ZodOptional<z.ZodString>;
|
||||
i18n: z.ZodOptional<z.ZodEffects<z.ZodObject<{
|
||||
defaultLocale: z.ZodString;
|
||||
locales: z.ZodRecord<z.ZodString, z.ZodString>;
|
||||
}, "strip", z.ZodTypeAny, {
|
||||
defaultLocale: string;
|
||||
locales: Record<string, string>;
|
||||
}, {
|
||||
defaultLocale: string;
|
||||
locales: Record<string, string>;
|
||||
}>, {
|
||||
defaultLocale: string;
|
||||
locales: Record<string, string>;
|
||||
}, {
|
||||
defaultLocale: string;
|
||||
locales: Record<string, string>;
|
||||
}>>;
|
||||
entryLimit: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
||||
serialize: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodAny], z.ZodUnknown>, z.ZodAny>>;
|
||||
changefreq: z.ZodOptional<z.ZodNativeEnum<typeof ChangeFreq>>;
|
||||
lastmod: z.ZodOptional<z.ZodDate>;
|
||||
priority: z.ZodOptional<z.ZodNumber>;
|
||||
namespaces: z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
||||
news: z.ZodOptional<z.ZodBoolean>;
|
||||
xhtml: z.ZodOptional<z.ZodBoolean>;
|
||||
image: z.ZodOptional<z.ZodBoolean>;
|
||||
video: z.ZodOptional<z.ZodBoolean>;
|
||||
}, "strip", z.ZodTypeAny, {
|
||||
news?: boolean | undefined;
|
||||
xhtml?: boolean | undefined;
|
||||
image?: boolean | undefined;
|
||||
video?: boolean | undefined;
|
||||
}, {
|
||||
news?: boolean | undefined;
|
||||
xhtml?: boolean | undefined;
|
||||
image?: boolean | undefined;
|
||||
video?: boolean | undefined;
|
||||
}>>>;
|
||||
}, "strict", z.ZodTypeAny, {
|
||||
filenameBase: string;
|
||||
entryLimit: number;
|
||||
namespaces: {
|
||||
news?: boolean | undefined;
|
||||
xhtml?: boolean | undefined;
|
||||
image?: boolean | undefined;
|
||||
video?: boolean | undefined;
|
||||
};
|
||||
changefreq?: ChangeFreq | undefined;
|
||||
priority?: number | undefined;
|
||||
lastmod?: Date | undefined;
|
||||
i18n?: {
|
||||
defaultLocale: string;
|
||||
locales: Record<string, string>;
|
||||
} | undefined;
|
||||
filter?: ((args_0: string, ...args: unknown[]) => boolean) | undefined;
|
||||
customSitemaps?: string[] | undefined;
|
||||
customPages?: string[] | undefined;
|
||||
canonicalURL?: string | undefined;
|
||||
xslURL?: string | undefined;
|
||||
serialize?: ((args_0: any, ...args: unknown[]) => any) | undefined;
|
||||
}, {
|
||||
changefreq?: ChangeFreq | undefined;
|
||||
priority?: number | undefined;
|
||||
lastmod?: Date | undefined;
|
||||
i18n?: {
|
||||
defaultLocale: string;
|
||||
locales: Record<string, string>;
|
||||
} | undefined;
|
||||
filter?: ((args_0: string, ...args: unknown[]) => boolean) | undefined;
|
||||
filenameBase?: string | undefined;
|
||||
entryLimit?: number | undefined;
|
||||
customSitemaps?: string[] | undefined;
|
||||
customPages?: string[] | undefined;
|
||||
canonicalURL?: string | undefined;
|
||||
xslURL?: string | undefined;
|
||||
serialize?: ((args_0: any, ...args: unknown[]) => any) | undefined;
|
||||
namespaces?: {
|
||||
news?: boolean | undefined;
|
||||
xhtml?: boolean | undefined;
|
||||
image?: boolean | undefined;
|
||||
video?: boolean | undefined;
|
||||
} | undefined;
|
||||
}>>;
|
||||
37
node_modules/@astrojs/sitemap/dist/schema.js
generated
vendored
Normal file
37
node_modules/@astrojs/sitemap/dist/schema.js
generated
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
import { EnumChangefreq as ChangeFreq } from "sitemap";
|
||||
import { z } from "zod";
|
||||
import { SITEMAP_CONFIG_DEFAULTS } from "./config-defaults.js";
|
||||
const localeKeySchema = z.string().min(1);
|
||||
const SitemapOptionsSchema = z.object({
|
||||
filenameBase: z.string().optional().default(SITEMAP_CONFIG_DEFAULTS.filenameBase),
|
||||
filter: z.function().args(z.string()).returns(z.boolean()).optional(),
|
||||
customSitemaps: z.string().url().array().optional(),
|
||||
customPages: z.string().url().array().optional(),
|
||||
canonicalURL: z.string().url().optional(),
|
||||
xslURL: z.string().optional(),
|
||||
i18n: z.object({
|
||||
defaultLocale: localeKeySchema,
|
||||
locales: z.record(
|
||||
localeKeySchema,
|
||||
z.string().min(2).regex(/^[a-zA-Z\-]+$/gm, {
|
||||
message: "Only English alphabet symbols and hyphen allowed"
|
||||
})
|
||||
)
|
||||
}).refine((val) => !val || val.locales[val.defaultLocale], {
|
||||
message: "`defaultLocale` must exist in `locales` keys"
|
||||
}).optional(),
|
||||
entryLimit: z.number().nonnegative().optional().default(SITEMAP_CONFIG_DEFAULTS.entryLimit),
|
||||
serialize: z.function().args(z.any()).returns(z.any()).optional(),
|
||||
changefreq: z.nativeEnum(ChangeFreq).optional(),
|
||||
lastmod: z.date().optional(),
|
||||
priority: z.number().min(0).max(1).optional(),
|
||||
namespaces: z.object({
|
||||
news: z.boolean().optional(),
|
||||
xhtml: z.boolean().optional(),
|
||||
image: z.boolean().optional(),
|
||||
video: z.boolean().optional()
|
||||
}).optional().default(SITEMAP_CONFIG_DEFAULTS.namespaces)
|
||||
}).strict().default(SITEMAP_CONFIG_DEFAULTS);
|
||||
export {
|
||||
SitemapOptionsSchema
|
||||
};
|
||||
6
node_modules/@astrojs/sitemap/dist/utils/parse-i18n-url.d.ts
generated
vendored
Normal file
6
node_modules/@astrojs/sitemap/dist/utils/parse-i18n-url.d.ts
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
interface ParsedI18nUrl {
|
||||
locale: string;
|
||||
path: string;
|
||||
}
|
||||
export declare function parseI18nUrl(url: string, defaultLocale: string, locales: Record<string, string>, base: string): ParsedI18nUrl | undefined;
|
||||
export {};
|
||||
24
node_modules/@astrojs/sitemap/dist/utils/parse-i18n-url.js
generated
vendored
Normal file
24
node_modules/@astrojs/sitemap/dist/utils/parse-i18n-url.js
generated
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
function parseI18nUrl(url, defaultLocale, locales, base) {
|
||||
if (!url.startsWith(base)) {
|
||||
return void 0;
|
||||
}
|
||||
let s = url.slice(base.length);
|
||||
if (!s || s === "/") {
|
||||
return { locale: defaultLocale, path: "/" };
|
||||
}
|
||||
if (s[0] !== "/") {
|
||||
s = "/" + s;
|
||||
}
|
||||
const locale = s.split("/")[1];
|
||||
if (locale in locales) {
|
||||
let path = s.slice(1 + locale.length);
|
||||
if (!path) {
|
||||
path = "/";
|
||||
}
|
||||
return { locale, path };
|
||||
}
|
||||
return { locale: defaultLocale, path: s };
|
||||
}
|
||||
export {
|
||||
parseI18nUrl
|
||||
};
|
||||
1
node_modules/@astrojs/sitemap/dist/validate-options.d.ts
generated
vendored
Normal file
1
node_modules/@astrojs/sitemap/dist/validate-options.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export {};
|
||||
20
node_modules/@astrojs/sitemap/dist/validate-options.js
generated
vendored
Normal file
20
node_modules/@astrojs/sitemap/dist/validate-options.js
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
import { z } from "zod";
|
||||
import { SitemapOptionsSchema } from "./schema.js";
|
||||
const validateOptions = (site, opts) => {
|
||||
const result = SitemapOptionsSchema.parse(opts);
|
||||
z.object({
|
||||
site: z.string().optional(),
|
||||
// Astro takes care of `site`: how to validate, transform and refine
|
||||
canonicalURL: z.string().optional()
|
||||
// `canonicalURL` is already validated in prev step
|
||||
}).refine((options) => options.site || options.canonicalURL, {
|
||||
message: "Required `site` astro.config option or `canonicalURL` integration option"
|
||||
}).parse({
|
||||
site,
|
||||
canonicalURL: result.canonicalURL
|
||||
});
|
||||
return result;
|
||||
};
|
||||
export {
|
||||
validateOptions
|
||||
};
|
||||
22
node_modules/@astrojs/sitemap/dist/write-sitemap.d.ts
generated
vendored
Normal file
22
node_modules/@astrojs/sitemap/dist/write-sitemap.d.ts
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
import type { AstroConfig } from 'astro';
|
||||
import type { SitemapItem } from './index.js';
|
||||
type WriteSitemapConfig = {
|
||||
filenameBase: string;
|
||||
hostname: string;
|
||||
sitemapHostname?: string;
|
||||
customSitemaps?: string[];
|
||||
sourceData: SitemapItem[];
|
||||
destinationDir: string;
|
||||
publicBasePath?: string;
|
||||
limit?: number;
|
||||
xslURL?: string;
|
||||
lastmod?: string;
|
||||
namespaces?: {
|
||||
news?: boolean;
|
||||
xhtml?: boolean;
|
||||
image?: boolean;
|
||||
video?: boolean;
|
||||
};
|
||||
};
|
||||
export declare function writeSitemap({ filenameBase, hostname, sitemapHostname, sourceData, destinationDir, limit, customSitemaps, publicBasePath, xslURL: xslUrl, lastmod, namespaces, }: WriteSitemapConfig, astroConfig: AstroConfig): Promise<void>;
|
||||
export {};
|
||||
71
node_modules/@astrojs/sitemap/dist/write-sitemap.js
generated
vendored
Normal file
71
node_modules/@astrojs/sitemap/dist/write-sitemap.js
generated
vendored
Normal file
@@ -0,0 +1,71 @@
|
||||
import { createWriteStream } from "node:fs";
|
||||
import { mkdir } from "node:fs/promises";
|
||||
import { normalize, resolve } from "node:path";
|
||||
import { pipeline, Readable } from "node:stream";
|
||||
import { promisify } from "node:util";
|
||||
import { SitemapAndIndexStream, SitemapIndexStream, SitemapStream } from "sitemap";
|
||||
import replace from "stream-replace-string";
|
||||
async function writeSitemap({
|
||||
filenameBase,
|
||||
hostname,
|
||||
sitemapHostname = hostname,
|
||||
sourceData,
|
||||
destinationDir,
|
||||
limit = 5e4,
|
||||
customSitemaps = [],
|
||||
publicBasePath = "./",
|
||||
xslURL: xslUrl,
|
||||
lastmod,
|
||||
namespaces = { news: true, xhtml: true, image: true, video: true }
|
||||
}, astroConfig) {
|
||||
await mkdir(destinationDir, { recursive: true });
|
||||
const sitemapAndIndexStream = new SitemapAndIndexStream({
|
||||
limit,
|
||||
xslUrl,
|
||||
getSitemapStream: (i) => {
|
||||
const sitemapStream = new SitemapStream({
|
||||
hostname,
|
||||
xslUrl,
|
||||
// Custom namespace handling
|
||||
xmlns: {
|
||||
news: namespaces?.news !== false,
|
||||
xhtml: namespaces?.xhtml !== false,
|
||||
image: namespaces?.image !== false,
|
||||
video: namespaces?.video !== false
|
||||
}
|
||||
});
|
||||
const path = `./${filenameBase}-${i}.xml`;
|
||||
const writePath = resolve(destinationDir, path);
|
||||
if (!publicBasePath.endsWith("/")) {
|
||||
publicBasePath += "/";
|
||||
}
|
||||
const publicPath = normalize(publicBasePath + path);
|
||||
let stream;
|
||||
if (astroConfig.trailingSlash === "never" || astroConfig.build.format === "file") {
|
||||
const host = hostname.endsWith("/") ? hostname.slice(0, -1) : hostname;
|
||||
const searchStr = `<loc>${host}/</loc>`;
|
||||
const replaceStr = `<loc>${host}</loc>`;
|
||||
stream = sitemapStream.pipe(replace(searchStr, replaceStr)).pipe(createWriteStream(writePath));
|
||||
} else {
|
||||
stream = sitemapStream.pipe(createWriteStream(writePath));
|
||||
}
|
||||
const url = new URL(publicPath, sitemapHostname).toString();
|
||||
return [{ url, lastmod }, sitemapStream, stream];
|
||||
}
|
||||
});
|
||||
const src = Readable.from(sourceData);
|
||||
const indexPath = resolve(destinationDir, `./${filenameBase}-index.xml`);
|
||||
for (const url of customSitemaps) {
|
||||
SitemapIndexStream.prototype._transform.call(
|
||||
sitemapAndIndexStream,
|
||||
{ url, lastmod },
|
||||
"utf8",
|
||||
() => {
|
||||
}
|
||||
);
|
||||
}
|
||||
return promisify(pipeline)(src, sitemapAndIndexStream, createWriteStream(indexPath));
|
||||
}
|
||||
export {
|
||||
writeSitemap
|
||||
};
|
||||
48
node_modules/@astrojs/sitemap/package.json
generated
vendored
Normal file
48
node_modules/@astrojs/sitemap/package.json
generated
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
{
|
||||
"name": "@astrojs/sitemap",
|
||||
"description": "Generate a sitemap for your Astro site",
|
||||
"version": "3.6.0",
|
||||
"type": "module",
|
||||
"types": "./dist/index.d.ts",
|
||||
"author": "withastro",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/withastro/astro.git",
|
||||
"directory": "packages/integrations/sitemap"
|
||||
},
|
||||
"keywords": [
|
||||
"astro-integration",
|
||||
"astro-component",
|
||||
"seo",
|
||||
"sitemap"
|
||||
],
|
||||
"bugs": "https://github.com/withastro/astro/issues",
|
||||
"homepage": "https://docs.astro.build/en/guides/integrations-guide/sitemap/",
|
||||
"exports": {
|
||||
".": "./dist/index.js",
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"files": [
|
||||
"dist"
|
||||
],
|
||||
"dependencies": {
|
||||
"sitemap": "^8.0.0",
|
||||
"stream-replace-string": "^2.0.0",
|
||||
"zod": "^3.25.76"
|
||||
},
|
||||
"devDependencies": {
|
||||
"xml2js": "0.6.2",
|
||||
"astro-scripts": "0.0.14",
|
||||
"astro": "5.13.8"
|
||||
},
|
||||
"publishConfig": {
|
||||
"provenance": true
|
||||
},
|
||||
"scripts": {
|
||||
"build": "astro-scripts build \"src/**/*.ts\" && tsc",
|
||||
"build:ci": "astro-scripts build \"src/**/*.ts\"",
|
||||
"dev": "astro-scripts dev \"src/**/*.ts\"",
|
||||
"test": "astro-scripts test \"test/**/*.test.js\""
|
||||
}
|
||||
}
|
||||
46
node_modules/@img/sharp-libvips-linuxmusl-x64/README.md
generated
vendored
Normal file
46
node_modules/@img/sharp-libvips-linuxmusl-x64/README.md
generated
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
# `@img/sharp-libvips-linuxmusl-x64`
|
||||
|
||||
Prebuilt libvips and dependencies for use with sharp on Linux (musl) x64.
|
||||
|
||||
## Licensing
|
||||
|
||||
This software contains third-party libraries
|
||||
used under the terms of the following licences:
|
||||
|
||||
| Library | Used under the terms of |
|
||||
|---------------|-----------------------------------------------------------------------------------------------------------|
|
||||
| aom | BSD 2-Clause + [Alliance for Open Media Patent License 1.0](https://aomedia.org/license/patent-license/) |
|
||||
| cairo | Mozilla Public License 2.0 |
|
||||
| cgif | MIT Licence |
|
||||
| expat | MIT Licence |
|
||||
| fontconfig | [fontconfig Licence](https://gitlab.freedesktop.org/fontconfig/fontconfig/blob/main/COPYING) (BSD-like) |
|
||||
| freetype | [freetype Licence](https://git.savannah.gnu.org/cgit/freetype/freetype2.git/tree/docs/FTL.TXT) (BSD-like) |
|
||||
| fribidi | LGPLv3 |
|
||||
| glib | LGPLv3 |
|
||||
| harfbuzz | MIT Licence |
|
||||
| highway | Apache-2.0 License, BSD 3-Clause |
|
||||
| lcms | MIT Licence |
|
||||
| libarchive | BSD 2-Clause |
|
||||
| libexif | LGPLv3 |
|
||||
| libffi | MIT Licence |
|
||||
| libheif | LGPLv3 |
|
||||
| libimagequant | [BSD 2-Clause](https://github.com/lovell/libimagequant/blob/main/COPYRIGHT) |
|
||||
| libnsgif | MIT Licence |
|
||||
| libpng | [libpng License](https://github.com/pnggroup/libpng/blob/master/LICENSE) |
|
||||
| librsvg | LGPLv3 |
|
||||
| libspng | [BSD 2-Clause, libpng License](https://github.com/randy408/libspng/blob/master/LICENSE) |
|
||||
| libtiff | [libtiff License](https://gitlab.com/libtiff/libtiff/blob/master/LICENSE.md) (BSD-like) |
|
||||
| libvips | LGPLv3 |
|
||||
| libwebp | New BSD License |
|
||||
| libxml2 | MIT Licence |
|
||||
| mozjpeg | [zlib License, IJG License, BSD-3-Clause](https://github.com/mozilla/mozjpeg/blob/master/LICENSE.md) |
|
||||
| pango | LGPLv3 |
|
||||
| pixman | MIT Licence |
|
||||
| proxy-libintl | LGPLv3 |
|
||||
| zlib-ng | [zlib Licence](https://github.com/zlib-ng/zlib-ng/blob/develop/LICENSE.md) |
|
||||
|
||||
Use of libraries under the terms of the LGPLv3 is via the
|
||||
"any later version" clause of the LGPLv2 or LGPLv2.1.
|
||||
|
||||
Please report any errors or omissions via
|
||||
https://github.com/lovell/sharp-libvips/issues/new
|
||||
221
node_modules/@img/sharp-libvips-linuxmusl-x64/lib/glib-2.0/include/glibconfig.h
generated
vendored
Normal file
221
node_modules/@img/sharp-libvips-linuxmusl-x64/lib/glib-2.0/include/glibconfig.h
generated
vendored
Normal file
@@ -0,0 +1,221 @@
|
||||
/* glibconfig.h
|
||||
*
|
||||
* This is a generated file. Please modify 'glibconfig.h.in'
|
||||
*/
|
||||
|
||||
#ifndef __GLIBCONFIG_H__
|
||||
#define __GLIBCONFIG_H__
|
||||
|
||||
#include <glib/gmacros.h>
|
||||
|
||||
#include <limits.h>
|
||||
#include <float.h>
|
||||
#define GLIB_HAVE_ALLOCA_H
|
||||
|
||||
#define GLIB_STATIC_COMPILATION 1
|
||||
#define GOBJECT_STATIC_COMPILATION 1
|
||||
#define GIO_STATIC_COMPILATION 1
|
||||
#define GMODULE_STATIC_COMPILATION 1
|
||||
#define GI_STATIC_COMPILATION 1
|
||||
#define G_INTL_STATIC_COMPILATION 1
|
||||
#define FFI_STATIC_BUILD 1
|
||||
|
||||
/* Specifies that GLib's g_print*() functions wrap the
|
||||
* system printf functions. This is useful to know, for example,
|
||||
* when using glibc's register_printf_function().
|
||||
*/
|
||||
#define GLIB_USING_SYSTEM_PRINTF
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define G_MINFLOAT FLT_MIN
|
||||
#define G_MAXFLOAT FLT_MAX
|
||||
#define G_MINDOUBLE DBL_MIN
|
||||
#define G_MAXDOUBLE DBL_MAX
|
||||
#define G_MINSHORT SHRT_MIN
|
||||
#define G_MAXSHORT SHRT_MAX
|
||||
#define G_MAXUSHORT USHRT_MAX
|
||||
#define G_MININT INT_MIN
|
||||
#define G_MAXINT INT_MAX
|
||||
#define G_MAXUINT UINT_MAX
|
||||
#define G_MINLONG LONG_MIN
|
||||
#define G_MAXLONG LONG_MAX
|
||||
#define G_MAXULONG ULONG_MAX
|
||||
|
||||
typedef signed char gint8;
|
||||
typedef unsigned char guint8;
|
||||
|
||||
typedef signed short gint16;
|
||||
typedef unsigned short guint16;
|
||||
|
||||
#define G_GINT16_MODIFIER "h"
|
||||
#define G_GINT16_FORMAT "hi"
|
||||
#define G_GUINT16_FORMAT "hu"
|
||||
|
||||
|
||||
typedef signed int gint32;
|
||||
typedef unsigned int guint32;
|
||||
|
||||
#define G_GINT32_MODIFIER ""
|
||||
#define G_GINT32_FORMAT "i"
|
||||
#define G_GUINT32_FORMAT "u"
|
||||
|
||||
|
||||
#define G_HAVE_GINT64 1 /* deprecated, always true */
|
||||
|
||||
typedef signed long gint64;
|
||||
typedef unsigned long guint64;
|
||||
|
||||
#define G_GINT64_CONSTANT(val) (val##L)
|
||||
#define G_GUINT64_CONSTANT(val) (val##UL)
|
||||
|
||||
#define G_GINT64_MODIFIER "l"
|
||||
#define G_GINT64_FORMAT "li"
|
||||
#define G_GUINT64_FORMAT "lu"
|
||||
|
||||
|
||||
#define GLIB_SIZEOF_VOID_P 8
|
||||
#define GLIB_SIZEOF_LONG 8
|
||||
#define GLIB_SIZEOF_SIZE_T 8
|
||||
#define GLIB_SIZEOF_SSIZE_T 8
|
||||
|
||||
typedef signed long gssize;
|
||||
typedef unsigned long gsize;
|
||||
#define G_GSIZE_MODIFIER "l"
|
||||
#define G_GSSIZE_MODIFIER "l"
|
||||
#define G_GSIZE_FORMAT "lu"
|
||||
#define G_GSSIZE_FORMAT "li"
|
||||
|
||||
#define G_MAXSIZE G_MAXULONG
|
||||
#define G_MINSSIZE G_MINLONG
|
||||
#define G_MAXSSIZE G_MAXLONG
|
||||
|
||||
typedef gint64 goffset;
|
||||
#define G_MINOFFSET G_MININT64
|
||||
#define G_MAXOFFSET G_MAXINT64
|
||||
|
||||
#define G_GOFFSET_MODIFIER G_GINT64_MODIFIER
|
||||
#define G_GOFFSET_FORMAT G_GINT64_FORMAT
|
||||
#define G_GOFFSET_CONSTANT(val) G_GINT64_CONSTANT(val)
|
||||
|
||||
#define G_POLLFD_FORMAT "%d"
|
||||
|
||||
#define GPOINTER_TO_INT(p) ((gint) (glong) (p))
|
||||
#define GPOINTER_TO_UINT(p) ((guint) (gulong) (p))
|
||||
|
||||
#define GINT_TO_POINTER(i) ((gpointer) (glong) (i))
|
||||
#define GUINT_TO_POINTER(u) ((gpointer) (gulong) (u))
|
||||
|
||||
typedef signed long gintptr;
|
||||
typedef unsigned long guintptr;
|
||||
|
||||
#define G_GINTPTR_MODIFIER "l"
|
||||
#define G_GINTPTR_FORMAT "li"
|
||||
#define G_GUINTPTR_FORMAT "lu"
|
||||
|
||||
#define GLIB_MAJOR_VERSION 2
|
||||
#define GLIB_MINOR_VERSION 86
|
||||
#define GLIB_MICRO_VERSION 0
|
||||
|
||||
#define G_OS_UNIX
|
||||
|
||||
#define G_VA_COPY va_copy
|
||||
|
||||
#define G_VA_COPY_AS_ARRAY 1
|
||||
|
||||
#define G_HAVE_ISO_VARARGS 1
|
||||
|
||||
/* gcc-2.95.x supports both gnu style and ISO varargs, but if -ansi
|
||||
* is passed ISO vararg support is turned off, and there is no work
|
||||
* around to turn it on, so we unconditionally turn it off.
|
||||
*/
|
||||
#if __GNUC__ == 2 && __GNUC_MINOR__ == 95
|
||||
# undef G_HAVE_ISO_VARARGS
|
||||
#endif
|
||||
|
||||
#define G_HAVE_GROWING_STACK 0
|
||||
|
||||
#ifndef _MSC_VER
|
||||
# define G_HAVE_GNUC_VARARGS 1
|
||||
#endif
|
||||
|
||||
#if defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)
|
||||
#define G_GNUC_INTERNAL __attribute__((visibility("hidden")))
|
||||
#elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550)
|
||||
#define G_GNUC_INTERNAL __hidden
|
||||
#elif defined (__GNUC__) && defined (G_HAVE_GNUC_VISIBILITY)
|
||||
#define G_GNUC_INTERNAL __attribute__((visibility("hidden")))
|
||||
#else
|
||||
#define G_GNUC_INTERNAL
|
||||
#endif
|
||||
|
||||
#define G_THREADS_ENABLED
|
||||
#define G_THREADS_IMPL_POSIX
|
||||
|
||||
#define G_ATOMIC_LOCK_FREE
|
||||
|
||||
#define GINT16_TO_LE(val) ((gint16) (val))
|
||||
#define GUINT16_TO_LE(val) ((guint16) (val))
|
||||
#define GINT16_TO_BE(val) ((gint16) GUINT16_SWAP_LE_BE (val))
|
||||
#define GUINT16_TO_BE(val) (GUINT16_SWAP_LE_BE (val))
|
||||
|
||||
#define GINT32_TO_LE(val) ((gint32) (val))
|
||||
#define GUINT32_TO_LE(val) ((guint32) (val))
|
||||
#define GINT32_TO_BE(val) ((gint32) GUINT32_SWAP_LE_BE (val))
|
||||
#define GUINT32_TO_BE(val) (GUINT32_SWAP_LE_BE (val))
|
||||
|
||||
#define GINT64_TO_LE(val) ((gint64) (val))
|
||||
#define GUINT64_TO_LE(val) ((guint64) (val))
|
||||
#define GINT64_TO_BE(val) ((gint64) GUINT64_SWAP_LE_BE (val))
|
||||
#define GUINT64_TO_BE(val) (GUINT64_SWAP_LE_BE (val))
|
||||
|
||||
#define GLONG_TO_LE(val) ((glong) GINT64_TO_LE (val))
|
||||
#define GULONG_TO_LE(val) ((gulong) GUINT64_TO_LE (val))
|
||||
#define GLONG_TO_BE(val) ((glong) GINT64_TO_BE (val))
|
||||
#define GULONG_TO_BE(val) ((gulong) GUINT64_TO_BE (val))
|
||||
#define GINT_TO_LE(val) ((gint) GINT32_TO_LE (val))
|
||||
#define GUINT_TO_LE(val) ((guint) GUINT32_TO_LE (val))
|
||||
#define GINT_TO_BE(val) ((gint) GINT32_TO_BE (val))
|
||||
#define GUINT_TO_BE(val) ((guint) GUINT32_TO_BE (val))
|
||||
#define GSIZE_TO_LE(val) ((gsize) GUINT64_TO_LE (val))
|
||||
#define GSSIZE_TO_LE(val) ((gssize) GINT64_TO_LE (val))
|
||||
#define GSIZE_TO_BE(val) ((gsize) GUINT64_TO_BE (val))
|
||||
#define GSSIZE_TO_BE(val) ((gssize) GINT64_TO_BE (val))
|
||||
#define G_BYTE_ORDER G_LITTLE_ENDIAN
|
||||
|
||||
#define GLIB_SYSDEF_POLLIN =1
|
||||
#define GLIB_SYSDEF_POLLOUT =4
|
||||
#define GLIB_SYSDEF_POLLPRI =2
|
||||
#define GLIB_SYSDEF_POLLHUP =16
|
||||
#define GLIB_SYSDEF_POLLERR =8
|
||||
#define GLIB_SYSDEF_POLLNVAL =32
|
||||
|
||||
/* No way to disable deprecation warnings for macros, so only emit deprecation
|
||||
* warnings on platforms where usage of this macro is broken */
|
||||
#if defined(__APPLE__) || defined(_MSC_VER) || defined(__CYGWIN__)
|
||||
#define G_MODULE_SUFFIX "so" GLIB_DEPRECATED_MACRO_IN_2_76
|
||||
#else
|
||||
#define G_MODULE_SUFFIX "so"
|
||||
#endif
|
||||
|
||||
typedef int GPid;
|
||||
#define G_PID_FORMAT "i"
|
||||
|
||||
#define GLIB_SYSDEF_AF_UNIX 1
|
||||
#define GLIB_SYSDEF_AF_INET 2
|
||||
#define GLIB_SYSDEF_AF_INET6 10
|
||||
|
||||
#define GLIB_SYSDEF_MSG_OOB 1
|
||||
#define GLIB_SYSDEF_MSG_PEEK 2
|
||||
#define GLIB_SYSDEF_MSG_DONTROUTE 4
|
||||
|
||||
#define G_DIR_SEPARATOR '/'
|
||||
#define G_DIR_SEPARATOR_S "/"
|
||||
#define G_SEARCHPATH_SEPARATOR ':'
|
||||
#define G_SEARCHPATH_SEPARATOR_S ":"
|
||||
|
||||
#undef G_HAVE_FREE_SIZED
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GLIBCONFIG_H__ */
|
||||
1
node_modules/@img/sharp-libvips-linuxmusl-x64/lib/index.js
generated
vendored
Normal file
1
node_modules/@img/sharp-libvips-linuxmusl-x64/lib/index.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
module.exports = __dirname;
|
||||
BIN
node_modules/@img/sharp-libvips-linuxmusl-x64/lib/libvips-cpp.so.8.17.2
generated
vendored
Normal file
BIN
node_modules/@img/sharp-libvips-linuxmusl-x64/lib/libvips-cpp.so.8.17.2
generated
vendored
Normal file
Binary file not shown.
42
node_modules/@img/sharp-libvips-linuxmusl-x64/package.json
generated
vendored
Normal file
42
node_modules/@img/sharp-libvips-linuxmusl-x64/package.json
generated
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
{
|
||||
"name": "@img/sharp-libvips-linuxmusl-x64",
|
||||
"version": "1.2.3",
|
||||
"description": "Prebuilt libvips and dependencies for use with sharp on Linux (musl) x64",
|
||||
"author": "Lovell Fuller <npm@lovell.info>",
|
||||
"homepage": "https://sharp.pixelplumbing.com",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/lovell/sharp-libvips.git",
|
||||
"directory": "npm/linuxmusl-x64"
|
||||
},
|
||||
"license": "LGPL-3.0-or-later",
|
||||
"funding": {
|
||||
"url": "https://opencollective.com/libvips"
|
||||
},
|
||||
"preferUnplugged": true,
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"files": [
|
||||
"lib",
|
||||
"versions.json"
|
||||
],
|
||||
"type": "commonjs",
|
||||
"exports": {
|
||||
"./lib": "./lib/index.js",
|
||||
"./package": "./package.json",
|
||||
"./versions": "./versions.json"
|
||||
},
|
||||
"config": {
|
||||
"musl": ">=1.2.2"
|
||||
},
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"libc": [
|
||||
"musl"
|
||||
],
|
||||
"cpu": [
|
||||
"x64"
|
||||
]
|
||||
}
|
||||
30
node_modules/@img/sharp-libvips-linuxmusl-x64/versions.json
generated
vendored
Normal file
30
node_modules/@img/sharp-libvips-linuxmusl-x64/versions.json
generated
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
{
|
||||
"aom": "3.13.1",
|
||||
"archive": "3.8.1",
|
||||
"cairo": "1.18.4",
|
||||
"cgif": "0.5.0",
|
||||
"exif": "0.6.25",
|
||||
"expat": "2.7.2",
|
||||
"ffi": "3.5.2",
|
||||
"fontconfig": "2.17.1",
|
||||
"freetype": "2.14.1",
|
||||
"fribidi": "1.0.16",
|
||||
"glib": "2.86.0",
|
||||
"harfbuzz": "11.5.0",
|
||||
"heif": "1.20.2",
|
||||
"highway": "1.3.0",
|
||||
"imagequant": "2.4.1",
|
||||
"lcms": "2.17",
|
||||
"mozjpeg": "4.1.5",
|
||||
"pango": "1.57.0",
|
||||
"pixman": "0.46.4",
|
||||
"png": "1.6.50",
|
||||
"proxy-libintl": "0.5",
|
||||
"rsvg": "2.61.1",
|
||||
"spng": "0.7.4",
|
||||
"tiff": "4.7.0",
|
||||
"vips": "8.17.2",
|
||||
"webp": "1.6.0",
|
||||
"xml2": "2.15.0",
|
||||
"zlib-ng": "2.2.5"
|
||||
}
|
||||
191
node_modules/@img/sharp-linuxmusl-x64/LICENSE
generated
vendored
Normal file
191
node_modules/@img/sharp-linuxmusl-x64/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,191 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction, and
|
||||
distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by the copyright
|
||||
owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all other entities
|
||||
that control, are controlled by, or are under common control with that entity.
|
||||
For the purposes of this definition, "control" means (i) the power, direct or
|
||||
indirect, to cause the direction or management of such entity, whether by
|
||||
contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity exercising
|
||||
permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications, including
|
||||
but not limited to software source code, documentation source, and configuration
|
||||
files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical transformation or
|
||||
translation of a Source form, including but not limited to compiled object code,
|
||||
generated documentation, and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or Object form, made
|
||||
available under the License, as indicated by a copyright notice that is included
|
||||
in or attached to the work (an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object form, that
|
||||
is based on (or derived from) the Work and for which the editorial revisions,
|
||||
annotations, elaborations, or other modifications represent, as a whole, an
|
||||
original work of authorship. For the purposes of this License, Derivative Works
|
||||
shall not include works that remain separable from, or merely link (or bind by
|
||||
name) to the interfaces of, the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including the original version
|
||||
of the Work and any modifications or additions to that Work or Derivative Works
|
||||
thereof, that is intentionally submitted to Licensor for inclusion in the Work
|
||||
by the copyright owner or by an individual or Legal Entity authorized to submit
|
||||
on behalf of the copyright owner. For the purposes of this definition,
|
||||
"submitted" means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems, and
|
||||
issue tracking systems that are managed by, or on behalf of, the Licensor for
|
||||
the purpose of discussing and improving the Work, but excluding communication
|
||||
that is conspicuously marked or otherwise designated in writing by the copyright
|
||||
owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf
|
||||
of whom a Contribution has been received by Licensor and subsequently
|
||||
incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License.
|
||||
|
||||
Subject to the terms and conditions of this License, each Contributor hereby
|
||||
grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,
|
||||
irrevocable copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the Work and such
|
||||
Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License.
|
||||
|
||||
Subject to the terms and conditions of this License, each Contributor hereby
|
||||
grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,
|
||||
irrevocable (except as stated in this section) patent license to make, have
|
||||
made, use, offer to sell, sell, import, and otherwise transfer the Work, where
|
||||
such license applies only to those patent claims licensable by such Contributor
|
||||
that are necessarily infringed by their Contribution(s) alone or by combination
|
||||
of their Contribution(s) with the Work to which such Contribution(s) was
|
||||
submitted. If You institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work or a
|
||||
Contribution incorporated within the Work constitutes direct or contributory
|
||||
patent infringement, then any patent licenses granted to You under this License
|
||||
for that Work shall terminate as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution.
|
||||
|
||||
You may reproduce and distribute copies of the Work or Derivative Works thereof
|
||||
in any medium, with or without modifications, and in Source or Object form,
|
||||
provided that You meet the following conditions:
|
||||
|
||||
You must give any other recipients of the Work or Derivative Works a copy of
|
||||
this License; and
|
||||
You must cause any modified files to carry prominent notices stating that You
|
||||
changed the files; and
|
||||
You must retain, in the Source form of any Derivative Works that You distribute,
|
||||
all copyright, patent, trademark, and attribution notices from the Source form
|
||||
of the Work, excluding those notices that do not pertain to any part of the
|
||||
Derivative Works; and
|
||||
If the Work includes a "NOTICE" text file as part of its distribution, then any
|
||||
Derivative Works that You distribute must include a readable copy of the
|
||||
attribution notices contained within such NOTICE file, excluding those notices
|
||||
that do not pertain to any part of the Derivative Works, in at least one of the
|
||||
following places: within a NOTICE text file distributed as part of the
|
||||
Derivative Works; within the Source form or documentation, if provided along
|
||||
with the Derivative Works; or, within a display generated by the Derivative
|
||||
Works, if and wherever such third-party notices normally appear. The contents of
|
||||
the NOTICE file are for informational purposes only and do not modify the
|
||||
License. You may add Your own attribution notices within Derivative Works that
|
||||
You distribute, alongside or as an addendum to the NOTICE text from the Work,
|
||||
provided that such additional attribution notices cannot be construed as
|
||||
modifying the License.
|
||||
You may add Your own copyright statement to Your modifications and may provide
|
||||
additional or different license terms and conditions for use, reproduction, or
|
||||
distribution of Your modifications, or for any such Derivative Works as a whole,
|
||||
provided Your use, reproduction, and distribution of the Work otherwise complies
|
||||
with the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions.
|
||||
|
||||
Unless You explicitly state otherwise, any Contribution intentionally submitted
|
||||
for inclusion in the Work by You to the Licensor shall be under the terms and
|
||||
conditions of this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify the terms of
|
||||
any separate license agreement you may have executed with Licensor regarding
|
||||
such Contributions.
|
||||
|
||||
6. Trademarks.
|
||||
|
||||
This License does not grant permission to use the trade names, trademarks,
|
||||
service marks, or product names of the Licensor, except as required for
|
||||
reasonable and customary use in describing the origin of the Work and
|
||||
reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty.
|
||||
|
||||
Unless required by applicable law or agreed to in writing, Licensor provides the
|
||||
Work (and each Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied,
|
||||
including, without limitation, any warranties or conditions of TITLE,
|
||||
NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are
|
||||
solely responsible for determining the appropriateness of using or
|
||||
redistributing the Work and assume any risks associated with Your exercise of
|
||||
permissions under this License.
|
||||
|
||||
8. Limitation of Liability.
|
||||
|
||||
In no event and under no legal theory, whether in tort (including negligence),
|
||||
contract, or otherwise, unless required by applicable law (such as deliberate
|
||||
and grossly negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special, incidental,
|
||||
or consequential damages of any character arising as a result of this License or
|
||||
out of the use or inability to use the Work (including but not limited to
|
||||
damages for loss of goodwill, work stoppage, computer failure or malfunction, or
|
||||
any and all other commercial damages or losses), even if such Contributor has
|
||||
been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability.
|
||||
|
||||
While redistributing the Work or Derivative Works thereof, You may choose to
|
||||
offer, and charge a fee for, acceptance of support, warranty, indemnity, or
|
||||
other liability obligations and/or rights consistent with this License. However,
|
||||
in accepting such obligations, You may act only on Your own behalf and on Your
|
||||
sole responsibility, not on behalf of any other Contributor, and only if You
|
||||
agree to indemnify, defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason of your
|
||||
accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work
|
||||
|
||||
To apply the Apache License to your work, attach the following boilerplate
|
||||
notice, with the fields enclosed by brackets "[]" replaced with your own
|
||||
identifying information. (Don't include the brackets!) The text should be
|
||||
enclosed in the appropriate comment syntax for the file format. We also
|
||||
recommend that a file or class name and description of purpose be included on
|
||||
the same "printed page" as the copyright notice for easier identification within
|
||||
third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
18
node_modules/@img/sharp-linuxmusl-x64/README.md
generated
vendored
Normal file
18
node_modules/@img/sharp-linuxmusl-x64/README.md
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
# `@img/sharp-linuxmusl-x64`
|
||||
|
||||
Prebuilt sharp for use with Linux (musl) x64.
|
||||
|
||||
## Licensing
|
||||
|
||||
Copyright 2013 Lovell Fuller and others.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
[https://www.apache.org/licenses/LICENSE-2.0](https://www.apache.org/licenses/LICENSE-2.0)
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
BIN
node_modules/@img/sharp-linuxmusl-x64/lib/sharp-linuxmusl-x64.node
generated
vendored
Normal file
BIN
node_modules/@img/sharp-linuxmusl-x64/lib/sharp-linuxmusl-x64.node
generated
vendored
Normal file
Binary file not shown.
46
node_modules/@img/sharp-linuxmusl-x64/package.json
generated
vendored
Normal file
46
node_modules/@img/sharp-linuxmusl-x64/package.json
generated
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
{
|
||||
"name": "@img/sharp-linuxmusl-x64",
|
||||
"version": "0.34.4",
|
||||
"description": "Prebuilt sharp for use with Linux (musl) x64",
|
||||
"author": "Lovell Fuller <npm@lovell.info>",
|
||||
"homepage": "https://sharp.pixelplumbing.com",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/lovell/sharp.git",
|
||||
"directory": "npm/linuxmusl-x64"
|
||||
},
|
||||
"license": "Apache-2.0",
|
||||
"funding": {
|
||||
"url": "https://opencollective.com/libvips"
|
||||
},
|
||||
"preferUnplugged": true,
|
||||
"optionalDependencies": {
|
||||
"@img/sharp-libvips-linuxmusl-x64": "1.2.3"
|
||||
},
|
||||
"files": [
|
||||
"lib"
|
||||
],
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"type": "commonjs",
|
||||
"exports": {
|
||||
"./sharp.node": "./lib/sharp-linuxmusl-x64.node",
|
||||
"./package": "./package.json"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.17.0 || ^20.3.0 || >=21.0.0"
|
||||
},
|
||||
"config": {
|
||||
"musl": ">=1.2.2"
|
||||
},
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"libc": [
|
||||
"musl"
|
||||
],
|
||||
"cpu": [
|
||||
"x64"
|
||||
]
|
||||
}
|
||||
3
node_modules/@rollup/rollup-linux-x64-musl/README.md
generated
vendored
Normal file
3
node_modules/@rollup/rollup-linux-x64-musl/README.md
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
# `@rollup/rollup-linux-x64-musl`
|
||||
|
||||
This is the **x86_64-unknown-linux-musl** binary for `rollup`
|
||||
25
node_modules/@rollup/rollup-linux-x64-musl/package.json
generated
vendored
Normal file
25
node_modules/@rollup/rollup-linux-x64-musl/package.json
generated
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"name": "@rollup/rollup-linux-x64-musl",
|
||||
"version": "4.52.4",
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"files": [
|
||||
"rollup.linux-x64-musl.node"
|
||||
],
|
||||
"description": "Native bindings for Rollup",
|
||||
"author": "Lukas Taegert-Atkinson",
|
||||
"homepage": "https://rollupjs.org/",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/rollup/rollup.git"
|
||||
},
|
||||
"libc": [
|
||||
"musl"
|
||||
],
|
||||
"main": "./rollup.linux-x64-musl.node"
|
||||
}
|
||||
BIN
node_modules/@rollup/rollup-linux-x64-musl/rollup.linux-x64-musl.node
generated
vendored
Normal file
BIN
node_modules/@rollup/rollup-linux-x64-musl/rollup.linux-x64-musl.node
generated
vendored
Normal file
Binary file not shown.
21
node_modules/@types/sax/LICENSE
generated
vendored
Normal file
21
node_modules/@types/sax/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) Microsoft Corporation.
|
||||
|
||||
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/@types/sax/README.md
generated
vendored
Normal file
15
node_modules/@types/sax/README.md
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
# Installation
|
||||
> `npm install --save @types/sax`
|
||||
|
||||
# Summary
|
||||
This package contains type definitions for sax (https://github.com/isaacs/sax-js).
|
||||
|
||||
# Details
|
||||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/sax.
|
||||
|
||||
### Additional Details
|
||||
* Last updated: Tue, 07 Nov 2023 15:11:36 GMT
|
||||
* Dependencies: [@types/node](https://npmjs.com/package/@types/node)
|
||||
|
||||
# Credits
|
||||
These definitions were written by [Vincent Siao (Asana, Inc.)](https://github.com/vsiao), [Evert Pot](https://github.com/evert), [Daniel Cassidy](https://github.com/djcsdy), and [Fabian van der Veen](https://github.com/fvanderveen).
|
||||
111
node_modules/@types/sax/index.d.ts
generated
vendored
Normal file
111
node_modules/@types/sax/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,111 @@
|
||||
/// <reference types="node" />
|
||||
|
||||
export const EVENTS: string[];
|
||||
|
||||
export interface SAXOptions {
|
||||
trim?: boolean | undefined;
|
||||
normalize?: boolean | undefined;
|
||||
lowercase?: boolean | undefined;
|
||||
xmlns?: boolean | undefined;
|
||||
noscript?: boolean | undefined;
|
||||
position?: boolean | undefined;
|
||||
}
|
||||
|
||||
export interface QualifiedName {
|
||||
name: string;
|
||||
prefix: string;
|
||||
local: string;
|
||||
uri: string;
|
||||
}
|
||||
|
||||
export interface QualifiedAttribute extends QualifiedName {
|
||||
value: string;
|
||||
}
|
||||
|
||||
export interface BaseTag {
|
||||
name: string;
|
||||
isSelfClosing: boolean;
|
||||
}
|
||||
|
||||
// Interface used when the xmlns option is set
|
||||
export interface QualifiedTag extends QualifiedName, BaseTag {
|
||||
ns: { [key: string]: string };
|
||||
attributes: { [key: string]: QualifiedAttribute };
|
||||
}
|
||||
|
||||
export interface Tag extends BaseTag {
|
||||
attributes: { [key: string]: string };
|
||||
}
|
||||
|
||||
export function parser(strict?: boolean, opt?: SAXOptions): SAXParser;
|
||||
export class SAXParser {
|
||||
constructor(strict?: boolean, opt?: SAXOptions);
|
||||
|
||||
// Methods
|
||||
end(): void;
|
||||
write(s: string): SAXParser;
|
||||
resume(): SAXParser;
|
||||
close(): SAXParser;
|
||||
flush(): void;
|
||||
|
||||
// Members
|
||||
line: number;
|
||||
column: number;
|
||||
error: Error;
|
||||
position: number;
|
||||
startTagPosition: number;
|
||||
closed: boolean;
|
||||
strict: boolean;
|
||||
opt: SAXOptions;
|
||||
tag: Tag;
|
||||
ENTITIES: { [key: string]: string };
|
||||
|
||||
// Events
|
||||
onerror(e: Error): void;
|
||||
ontext(t: string): void;
|
||||
ondoctype(doctype: string): void;
|
||||
onprocessinginstruction(node: { name: string; body: string }): void;
|
||||
onsgmldeclaration(sgmlDecl: string): void;
|
||||
onopentag(tag: Tag | QualifiedTag): void;
|
||||
onopentagstart(tag: Tag | QualifiedTag): void;
|
||||
onclosetag(tagName: string): void;
|
||||
onattribute(attr: { name: string; value: string }): void;
|
||||
oncomment(comment: string): void;
|
||||
onopencdata(): void;
|
||||
oncdata(cdata: string): void;
|
||||
onclosecdata(): void;
|
||||
onopennamespace(ns: { prefix: string; uri: string }): void;
|
||||
onclosenamespace(ns: { prefix: string; uri: string }): void;
|
||||
onend(): void;
|
||||
onready(): void;
|
||||
onscript(script: string): void;
|
||||
}
|
||||
|
||||
import stream = require("stream");
|
||||
export function createStream(strict?: boolean, opt?: SAXOptions): SAXStream;
|
||||
export class SAXStream extends stream.Duplex {
|
||||
constructor(strict?: boolean, opt?: SAXOptions);
|
||||
_parser: SAXParser;
|
||||
on(event: "text", listener: (this: this, text: string) => void): this;
|
||||
on(event: "doctype", listener: (this: this, doctype: string) => void): this;
|
||||
on(event: "processinginstruction", listener: (this: this, node: { name: string; body: string }) => void): this;
|
||||
on(event: "sgmldeclaration", listener: (this: this, sgmlDecl: string) => void): this;
|
||||
on(event: "opentag" | "opentagstart", listener: (this: this, tag: Tag | QualifiedTag) => void): this;
|
||||
on(event: "closetag", listener: (this: this, tagName: string) => void): this;
|
||||
on(event: "attribute", listener: (this: this, attr: { name: string; value: string }) => void): this;
|
||||
on(event: "comment", listener: (this: this, comment: string) => void): this;
|
||||
on(
|
||||
event: "opencdata" | "closecdata" | "end" | "ready" | "close" | "readable" | "drain" | "finish",
|
||||
listener: (this: this) => void,
|
||||
): this;
|
||||
on(event: "cdata", listener: (this: this, cdata: string) => void): this;
|
||||
on(
|
||||
event: "opennamespace" | "closenamespace",
|
||||
listener: (this: this, ns: { prefix: string; uri: string }) => void,
|
||||
): this;
|
||||
on(event: "script", listener: (this: this, script: string) => void): this;
|
||||
on(event: "data", listener: (this: this, chunk: any) => void): this;
|
||||
on(event: "error", listener: (this: this, err: Error) => void): this;
|
||||
on(event: "pipe" | "unpipe", listener: (this: this, src: stream.Readable) => void): this;
|
||||
on(event: string | symbol, listener: (this: this, ...args: any[]) => void): this;
|
||||
}
|
||||
42
node_modules/@types/sax/package.json
generated
vendored
Normal file
42
node_modules/@types/sax/package.json
generated
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
{
|
||||
"name": "@types/sax",
|
||||
"version": "1.2.7",
|
||||
"description": "TypeScript definitions for sax",
|
||||
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/sax",
|
||||
"license": "MIT",
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Vincent Siao (Asana, Inc.)",
|
||||
"githubUsername": "vsiao",
|
||||
"url": "https://github.com/vsiao"
|
||||
},
|
||||
{
|
||||
"name": "Evert Pot",
|
||||
"githubUsername": "evert",
|
||||
"url": "https://github.com/evert"
|
||||
},
|
||||
{
|
||||
"name": "Daniel Cassidy",
|
||||
"githubUsername": "djcsdy",
|
||||
"url": "https://github.com/djcsdy"
|
||||
},
|
||||
{
|
||||
"name": "Fabian van der Veen",
|
||||
"githubUsername": "fvanderveen",
|
||||
"url": "https://github.com/fvanderveen"
|
||||
}
|
||||
],
|
||||
"main": "",
|
||||
"types": "index.d.ts",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
|
||||
"directory": "types/sax"
|
||||
},
|
||||
"scripts": {},
|
||||
"dependencies": {
|
||||
"@types/node": "*"
|
||||
},
|
||||
"typesPublisherContentHash": "30ff89927c6c888d3113b0a9453e6166ca211ed5d328e36eed86e90eae239b88",
|
||||
"typeScriptVersion": "4.5"
|
||||
}
|
||||
21
node_modules/arg/LICENSE.md
generated
vendored
Normal file
21
node_modules/arg/LICENSE.md
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2021 Vercel, Inc.
|
||||
|
||||
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.
|
||||
317
node_modules/arg/README.md
generated
vendored
Normal file
317
node_modules/arg/README.md
generated
vendored
Normal file
@@ -0,0 +1,317 @@
|
||||
# Arg
|
||||
|
||||
`arg` is an unopinionated, no-frills CLI argument parser.
|
||||
|
||||
## Installation
|
||||
|
||||
```bash
|
||||
npm install arg
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
`arg()` takes either 1 or 2 arguments:
|
||||
|
||||
1. Command line specification object (see below)
|
||||
2. Parse options (_Optional_, defaults to `{permissive: false, argv: process.argv.slice(2), stopAtPositional: false}`)
|
||||
|
||||
It returns an object with any values present on the command-line (missing options are thus
|
||||
missing from the resulting object). Arg performs no validation/requirement checking - we
|
||||
leave that up to the application.
|
||||
|
||||
All parameters that aren't consumed by options (commonly referred to as "extra" parameters)
|
||||
are added to `result._`, which is _always_ an array (even if no extra parameters are passed,
|
||||
in which case an empty array is returned).
|
||||
|
||||
```javascript
|
||||
const arg = require('arg');
|
||||
|
||||
// `options` is an optional parameter
|
||||
const args = arg(
|
||||
spec,
|
||||
(options = { permissive: false, argv: process.argv.slice(2) })
|
||||
);
|
||||
```
|
||||
|
||||
For example:
|
||||
|
||||
```console
|
||||
$ node ./hello.js --verbose -vvv --port=1234 -n 'My name' foo bar --tag qux --tag=qix -- --foobar
|
||||
```
|
||||
|
||||
```javascript
|
||||
// hello.js
|
||||
const arg = require('arg');
|
||||
|
||||
const args = arg({
|
||||
// Types
|
||||
'--help': Boolean,
|
||||
'--version': Boolean,
|
||||
'--verbose': arg.COUNT, // Counts the number of times --verbose is passed
|
||||
'--port': Number, // --port <number> or --port=<number>
|
||||
'--name': String, // --name <string> or --name=<string>
|
||||
'--tag': [String], // --tag <string> or --tag=<string>
|
||||
|
||||
// Aliases
|
||||
'-v': '--verbose',
|
||||
'-n': '--name', // -n <string>; result is stored in --name
|
||||
'--label': '--name' // --label <string> or --label=<string>;
|
||||
// result is stored in --name
|
||||
});
|
||||
|
||||
console.log(args);
|
||||
/*
|
||||
{
|
||||
_: ["foo", "bar", "--foobar"],
|
||||
'--port': 1234,
|
||||
'--verbose': 4,
|
||||
'--name': "My name",
|
||||
'--tag': ["qux", "qix"]
|
||||
}
|
||||
*/
|
||||
```
|
||||
|
||||
The values for each key=>value pair is either a type (function or [function]) or a string (indicating an alias).
|
||||
|
||||
- In the case of a function, the string value of the argument's value is passed to it,
|
||||
and the return value is used as the ultimate value.
|
||||
|
||||
- In the case of an array, the only element _must_ be a type function. Array types indicate
|
||||
that the argument may be passed multiple times, and as such the resulting value in the returned
|
||||
object is an array with all of the values that were passed using the specified flag.
|
||||
|
||||
- In the case of a string, an alias is established. If a flag is passed that matches the _key_,
|
||||
then the _value_ is substituted in its place.
|
||||
|
||||
Type functions are passed three arguments:
|
||||
|
||||
1. The parameter value (always a string)
|
||||
2. The parameter name (e.g. `--label`)
|
||||
3. The previous value for the destination (useful for reduce-like operations or for supporting `-v` multiple times, etc.)
|
||||
|
||||
This means the built-in `String`, `Number`, and `Boolean` type constructors "just work" as type functions.
|
||||
|
||||
Note that `Boolean` and `[Boolean]` have special treatment - an option argument is _not_ consumed or passed, but instead `true` is
|
||||
returned. These options are called "flags".
|
||||
|
||||
For custom handlers that wish to behave as flags, you may pass the function through `arg.flag()`:
|
||||
|
||||
```javascript
|
||||
const arg = require('arg');
|
||||
|
||||
const argv = [
|
||||
'--foo',
|
||||
'bar',
|
||||
'-ff',
|
||||
'baz',
|
||||
'--foo',
|
||||
'--foo',
|
||||
'qux',
|
||||
'-fff',
|
||||
'qix'
|
||||
];
|
||||
|
||||
function myHandler(value, argName, previousValue) {
|
||||
/* `value` is always `true` */
|
||||
return 'na ' + (previousValue || 'batman!');
|
||||
}
|
||||
|
||||
const args = arg(
|
||||
{
|
||||
'--foo': arg.flag(myHandler),
|
||||
'-f': '--foo'
|
||||
},
|
||||
{
|
||||
argv
|
||||
}
|
||||
);
|
||||
|
||||
console.log(args);
|
||||
/*
|
||||
{
|
||||
_: ['bar', 'baz', 'qux', 'qix'],
|
||||
'--foo': 'na na na na na na na na batman!'
|
||||
}
|
||||
*/
|
||||
```
|
||||
|
||||
As well, `arg` supplies a helper argument handler called `arg.COUNT`, which equivalent to a `[Boolean]` argument's `.length`
|
||||
property - effectively counting the number of times the boolean flag, denoted by the key, is passed on the command line..
|
||||
For example, this is how you could implement `ssh`'s multiple levels of verbosity (`-vvvv` being the most verbose).
|
||||
|
||||
```javascript
|
||||
const arg = require('arg');
|
||||
|
||||
const argv = ['-AAAA', '-BBBB'];
|
||||
|
||||
const args = arg(
|
||||
{
|
||||
'-A': arg.COUNT,
|
||||
'-B': [Boolean]
|
||||
},
|
||||
{
|
||||
argv
|
||||
}
|
||||
);
|
||||
|
||||
console.log(args);
|
||||
/*
|
||||
{
|
||||
_: [],
|
||||
'-A': 4,
|
||||
'-B': [true, true, true, true]
|
||||
}
|
||||
*/
|
||||
```
|
||||
|
||||
### Options
|
||||
|
||||
If a second parameter is specified and is an object, it specifies parsing options to modify the behavior of `arg()`.
|
||||
|
||||
#### `argv`
|
||||
|
||||
If you have already sliced or generated a number of raw arguments to be parsed (as opposed to letting `arg`
|
||||
slice them from `process.argv`) you may specify them in the `argv` option.
|
||||
|
||||
For example:
|
||||
|
||||
```javascript
|
||||
const args = arg(
|
||||
{
|
||||
'--foo': String
|
||||
},
|
||||
{
|
||||
argv: ['hello', '--foo', 'world']
|
||||
}
|
||||
);
|
||||
```
|
||||
|
||||
results in:
|
||||
|
||||
```javascript
|
||||
const args = {
|
||||
_: ['hello'],
|
||||
'--foo': 'world'
|
||||
};
|
||||
```
|
||||
|
||||
#### `permissive`
|
||||
|
||||
When `permissive` set to `true`, `arg` will push any unknown arguments
|
||||
onto the "extra" argument array (`result._`) instead of throwing an error about
|
||||
an unknown flag.
|
||||
|
||||
For example:
|
||||
|
||||
```javascript
|
||||
const arg = require('arg');
|
||||
|
||||
const argv = [
|
||||
'--foo',
|
||||
'hello',
|
||||
'--qux',
|
||||
'qix',
|
||||
'--bar',
|
||||
'12345',
|
||||
'hello again'
|
||||
];
|
||||
|
||||
const args = arg(
|
||||
{
|
||||
'--foo': String,
|
||||
'--bar': Number
|
||||
},
|
||||
{
|
||||
argv,
|
||||
permissive: true
|
||||
}
|
||||
);
|
||||
```
|
||||
|
||||
results in:
|
||||
|
||||
```javascript
|
||||
const args = {
|
||||
_: ['--qux', 'qix', 'hello again'],
|
||||
'--foo': 'hello',
|
||||
'--bar': 12345
|
||||
};
|
||||
```
|
||||
|
||||
#### `stopAtPositional`
|
||||
|
||||
When `stopAtPositional` is set to `true`, `arg` will halt parsing at the first
|
||||
positional argument.
|
||||
|
||||
For example:
|
||||
|
||||
```javascript
|
||||
const arg = require('arg');
|
||||
|
||||
const argv = ['--foo', 'hello', '--bar'];
|
||||
|
||||
const args = arg(
|
||||
{
|
||||
'--foo': Boolean,
|
||||
'--bar': Boolean
|
||||
},
|
||||
{
|
||||
argv,
|
||||
stopAtPositional: true
|
||||
}
|
||||
);
|
||||
```
|
||||
|
||||
results in:
|
||||
|
||||
```javascript
|
||||
const args = {
|
||||
_: ['hello', '--bar'],
|
||||
'--foo': true
|
||||
};
|
||||
```
|
||||
|
||||
### Errors
|
||||
|
||||
Some errors that `arg` throws provide a `.code` property in order to aid in recovering from user error, or to
|
||||
differentiate between user error and developer error (bug).
|
||||
|
||||
##### ARG_UNKNOWN_OPTION
|
||||
|
||||
If an unknown option (not defined in the spec object) is passed, an error with code `ARG_UNKNOWN_OPTION` will be thrown:
|
||||
|
||||
```js
|
||||
// cli.js
|
||||
try {
|
||||
require('arg')({ '--hi': String });
|
||||
} catch (err) {
|
||||
if (err.code === 'ARG_UNKNOWN_OPTION') {
|
||||
console.log(err.message);
|
||||
} else {
|
||||
throw err;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
```shell
|
||||
node cli.js --extraneous true
|
||||
Unknown or unexpected option: --extraneous
|
||||
```
|
||||
|
||||
# FAQ
|
||||
|
||||
A few questions and answers that have been asked before:
|
||||
|
||||
### How do I require an argument with `arg`?
|
||||
|
||||
Do the assertion yourself, such as:
|
||||
|
||||
```javascript
|
||||
const args = arg({ '--name': String });
|
||||
|
||||
if (!args['--name']) throw new Error('missing required argument: --name');
|
||||
```
|
||||
|
||||
# License
|
||||
|
||||
Released under the [MIT License](LICENSE.md).
|
||||
44
node_modules/arg/index.d.ts
generated
vendored
Normal file
44
node_modules/arg/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
declare function arg<T extends arg.Spec>(
|
||||
spec: T,
|
||||
options?: arg.Options
|
||||
): arg.Result<T>;
|
||||
|
||||
declare namespace arg {
|
||||
export const flagSymbol: unique symbol;
|
||||
|
||||
export function flag<T>(fn: T): T & { [arg.flagSymbol]: true };
|
||||
|
||||
export const COUNT: Handler<number> & { [arg.flagSymbol]: true };
|
||||
|
||||
export type Handler<T = any> = (
|
||||
value: string,
|
||||
name: string,
|
||||
previousValue?: T
|
||||
) => T;
|
||||
|
||||
export class ArgError extends Error {
|
||||
constructor(message: string, code: string);
|
||||
|
||||
code: string;
|
||||
}
|
||||
|
||||
export interface Spec {
|
||||
[key: string]: string | Handler | [Handler];
|
||||
}
|
||||
|
||||
export type Result<T extends Spec> = { _: string[] } & {
|
||||
[K in keyof T]?: T[K] extends Handler
|
||||
? ReturnType<T[K]>
|
||||
: T[K] extends [Handler]
|
||||
? Array<ReturnType<T[K][0]>>
|
||||
: never;
|
||||
};
|
||||
|
||||
export interface Options {
|
||||
argv?: string[];
|
||||
permissive?: boolean;
|
||||
stopAtPositional?: boolean;
|
||||
}
|
||||
}
|
||||
|
||||
export = arg;
|
||||
195
node_modules/arg/index.js
generated
vendored
Normal file
195
node_modules/arg/index.js
generated
vendored
Normal file
@@ -0,0 +1,195 @@
|
||||
const flagSymbol = Symbol('arg flag');
|
||||
|
||||
class ArgError extends Error {
|
||||
constructor(msg, code) {
|
||||
super(msg);
|
||||
this.name = 'ArgError';
|
||||
this.code = code;
|
||||
|
||||
Object.setPrototypeOf(this, ArgError.prototype);
|
||||
}
|
||||
}
|
||||
|
||||
function arg(
|
||||
opts,
|
||||
{
|
||||
argv = process.argv.slice(2),
|
||||
permissive = false,
|
||||
stopAtPositional = false
|
||||
} = {}
|
||||
) {
|
||||
if (!opts) {
|
||||
throw new ArgError(
|
||||
'argument specification object is required',
|
||||
'ARG_CONFIG_NO_SPEC'
|
||||
);
|
||||
}
|
||||
|
||||
const result = { _: [] };
|
||||
|
||||
const aliases = {};
|
||||
const handlers = {};
|
||||
|
||||
for (const key of Object.keys(opts)) {
|
||||
if (!key) {
|
||||
throw new ArgError(
|
||||
'argument key cannot be an empty string',
|
||||
'ARG_CONFIG_EMPTY_KEY'
|
||||
);
|
||||
}
|
||||
|
||||
if (key[0] !== '-') {
|
||||
throw new ArgError(
|
||||
`argument key must start with '-' but found: '${key}'`,
|
||||
'ARG_CONFIG_NONOPT_KEY'
|
||||
);
|
||||
}
|
||||
|
||||
if (key.length === 1) {
|
||||
throw new ArgError(
|
||||
`argument key must have a name; singular '-' keys are not allowed: ${key}`,
|
||||
'ARG_CONFIG_NONAME_KEY'
|
||||
);
|
||||
}
|
||||
|
||||
if (typeof opts[key] === 'string') {
|
||||
aliases[key] = opts[key];
|
||||
continue;
|
||||
}
|
||||
|
||||
let type = opts[key];
|
||||
let isFlag = false;
|
||||
|
||||
if (
|
||||
Array.isArray(type) &&
|
||||
type.length === 1 &&
|
||||
typeof type[0] === 'function'
|
||||
) {
|
||||
const [fn] = type;
|
||||
type = (value, name, prev = []) => {
|
||||
prev.push(fn(value, name, prev[prev.length - 1]));
|
||||
return prev;
|
||||
};
|
||||
isFlag = fn === Boolean || fn[flagSymbol] === true;
|
||||
} else if (typeof type === 'function') {
|
||||
isFlag = type === Boolean || type[flagSymbol] === true;
|
||||
} else {
|
||||
throw new ArgError(
|
||||
`type missing or not a function or valid array type: ${key}`,
|
||||
'ARG_CONFIG_VAD_TYPE'
|
||||
);
|
||||
}
|
||||
|
||||
if (key[1] !== '-' && key.length > 2) {
|
||||
throw new ArgError(
|
||||
`short argument keys (with a single hyphen) must have only one character: ${key}`,
|
||||
'ARG_CONFIG_SHORTOPT_TOOLONG'
|
||||
);
|
||||
}
|
||||
|
||||
handlers[key] = [type, isFlag];
|
||||
}
|
||||
|
||||
for (let i = 0, len = argv.length; i < len; i++) {
|
||||
const wholeArg = argv[i];
|
||||
|
||||
if (stopAtPositional && result._.length > 0) {
|
||||
result._ = result._.concat(argv.slice(i));
|
||||
break;
|
||||
}
|
||||
|
||||
if (wholeArg === '--') {
|
||||
result._ = result._.concat(argv.slice(i + 1));
|
||||
break;
|
||||
}
|
||||
|
||||
if (wholeArg.length > 1 && wholeArg[0] === '-') {
|
||||
/* eslint-disable operator-linebreak */
|
||||
const separatedArguments =
|
||||
wholeArg[1] === '-' || wholeArg.length === 2
|
||||
? [wholeArg]
|
||||
: wholeArg
|
||||
.slice(1)
|
||||
.split('')
|
||||
.map((a) => `-${a}`);
|
||||
/* eslint-enable operator-linebreak */
|
||||
|
||||
for (let j = 0; j < separatedArguments.length; j++) {
|
||||
const arg = separatedArguments[j];
|
||||
const [originalArgName, argStr] =
|
||||
arg[1] === '-' ? arg.split(/=(.*)/, 2) : [arg, undefined];
|
||||
|
||||
let argName = originalArgName;
|
||||
while (argName in aliases) {
|
||||
argName = aliases[argName];
|
||||
}
|
||||
|
||||
if (!(argName in handlers)) {
|
||||
if (permissive) {
|
||||
result._.push(arg);
|
||||
continue;
|
||||
} else {
|
||||
throw new ArgError(
|
||||
`unknown or unexpected option: ${originalArgName}`,
|
||||
'ARG_UNKNOWN_OPTION'
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
const [type, isFlag] = handlers[argName];
|
||||
|
||||
if (!isFlag && j + 1 < separatedArguments.length) {
|
||||
throw new ArgError(
|
||||
`option requires argument (but was followed by another short argument): ${originalArgName}`,
|
||||
'ARG_MISSING_REQUIRED_SHORTARG'
|
||||
);
|
||||
}
|
||||
|
||||
if (isFlag) {
|
||||
result[argName] = type(true, argName, result[argName]);
|
||||
} else if (argStr === undefined) {
|
||||
if (
|
||||
argv.length < i + 2 ||
|
||||
(argv[i + 1].length > 1 &&
|
||||
argv[i + 1][0] === '-' &&
|
||||
!(
|
||||
argv[i + 1].match(/^-?\d*(\.(?=\d))?\d*$/) &&
|
||||
(type === Number ||
|
||||
// eslint-disable-next-line no-undef
|
||||
(typeof BigInt !== 'undefined' && type === BigInt))
|
||||
))
|
||||
) {
|
||||
const extended =
|
||||
originalArgName === argName ? '' : ` (alias for ${argName})`;
|
||||
throw new ArgError(
|
||||
`option requires argument: ${originalArgName}${extended}`,
|
||||
'ARG_MISSING_REQUIRED_LONGARG'
|
||||
);
|
||||
}
|
||||
|
||||
result[argName] = type(argv[i + 1], argName, result[argName]);
|
||||
++i;
|
||||
} else {
|
||||
result[argName] = type(argStr, argName, result[argName]);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
result._.push(wholeArg);
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
arg.flag = (fn) => {
|
||||
fn[flagSymbol] = true;
|
||||
return fn;
|
||||
};
|
||||
|
||||
// Utility types
|
||||
arg.COUNT = arg.flag((v, name, existingCount) => (existingCount || 0) + 1);
|
||||
|
||||
// Expose error class
|
||||
arg.ArgError = ArgError;
|
||||
|
||||
module.exports = arg;
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user