Initial commit: New MoreminiMore website with fresh design
This commit is contained in:
2
node_modules/@astrojs/db/dist/_internal/core/integration/error-map.d.ts
generated
vendored
Normal file
2
node_modules/@astrojs/db/dist/_internal/core/integration/error-map.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import type { $ZodErrorMap } from 'zod/v4/core';
|
||||
export declare const errorMap: $ZodErrorMap;
|
||||
1444
node_modules/@astrojs/db/dist/_internal/core/schemas.d.ts
generated
vendored
Normal file
1444
node_modules/@astrojs/db/dist/_internal/core/schemas.d.ts
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
60
node_modules/@astrojs/db/dist/_internal/core/types.d.ts
generated
vendored
Normal file
60
node_modules/@astrojs/db/dist/_internal/core/types.d.ts
generated
vendored
Normal file
@@ -0,0 +1,60 @@
|
||||
import type * as z from 'zod/v4';
|
||||
import type { booleanColumnSchema, columnSchema, columnsSchema, dateColumnSchema, dbConfigSchema, indexSchema, jsonColumnSchema, MaybeArray, numberColumnOptsSchema, numberColumnSchema, referenceableColumnSchema, resolvedIndexSchema, tableSchema, textColumnOptsSchema, textColumnSchema } from './schemas.js';
|
||||
export type ResolvedIndexes = z.output<typeof dbConfigSchema>['tables'][string]['indexes'];
|
||||
export type BooleanColumn = z.infer<typeof booleanColumnSchema>;
|
||||
export type BooleanColumnInput = z.input<typeof booleanColumnSchema>;
|
||||
export type NumberColumn = z.infer<typeof numberColumnSchema>;
|
||||
export type NumberColumnInput = z.input<typeof numberColumnSchema>;
|
||||
export type TextColumn = z.infer<typeof textColumnSchema>;
|
||||
export type TextColumnInput = z.input<typeof textColumnSchema>;
|
||||
export type DateColumn = z.infer<typeof dateColumnSchema>;
|
||||
export type DateColumnInput = z.input<typeof dateColumnSchema>;
|
||||
export type JsonColumn = z.infer<typeof jsonColumnSchema>;
|
||||
export type JsonColumnInput = z.input<typeof jsonColumnSchema>;
|
||||
export type ColumnType = BooleanColumn['type'] | NumberColumn['type'] | TextColumn['type'] | DateColumn['type'] | JsonColumn['type'];
|
||||
export type DBColumn = z.infer<typeof columnSchema>;
|
||||
export type DBColumnInput = DateColumnInput | BooleanColumnInput | NumberColumnInput | TextColumnInput | JsonColumnInput;
|
||||
export type DBColumns = z.infer<typeof columnsSchema>;
|
||||
export type DBTable = z.infer<typeof tableSchema>;
|
||||
export type DBTables = Record<string, DBTable>;
|
||||
export type ResolvedDBTables = z.output<typeof dbConfigSchema>['tables'];
|
||||
export type ResolvedDBTable = z.output<typeof dbConfigSchema>['tables'][string];
|
||||
export type DBSnapshot = {
|
||||
schema: Record<string, ResolvedDBTable>;
|
||||
version: string;
|
||||
};
|
||||
export type DBConfigInput = z.input<typeof dbConfigSchema>;
|
||||
export type DBConfig = z.infer<typeof dbConfigSchema>;
|
||||
export type ColumnsConfig = z.input<typeof tableSchema>['columns'];
|
||||
export type OutputColumnsConfig = z.output<typeof tableSchema>['columns'];
|
||||
export interface TableConfig<TColumns extends ColumnsConfig = ColumnsConfig> extends Pick<z.input<typeof tableSchema>, 'columns' | 'indexes' | 'foreignKeys'> {
|
||||
columns: TColumns;
|
||||
foreignKeys?: Array<{
|
||||
columns: MaybeArray<Extract<keyof TColumns, string>>;
|
||||
references: () => MaybeArray<z.input<typeof referenceableColumnSchema>>;
|
||||
}>;
|
||||
indexes?: Array<IndexConfig<TColumns>> | Record<string, LegacyIndexConfig<TColumns>>;
|
||||
deprecated?: boolean;
|
||||
}
|
||||
interface IndexConfig<TColumns extends ColumnsConfig> extends z.input<typeof indexSchema> {
|
||||
on: MaybeArray<Extract<keyof TColumns, string>>;
|
||||
}
|
||||
/** @deprecated */
|
||||
interface LegacyIndexConfig<TColumns extends ColumnsConfig> extends z.input<typeof resolvedIndexSchema> {
|
||||
on: MaybeArray<Extract<keyof TColumns, string>>;
|
||||
}
|
||||
export type NumberColumnOpts = z.input<typeof numberColumnOptsSchema>;
|
||||
export type TextColumnOpts = z.input<typeof textColumnOptsSchema>;
|
||||
declare global {
|
||||
namespace Astro {
|
||||
interface IntegrationHooks {
|
||||
'astro:db:setup'?: (options: {
|
||||
extendDb: (options: {
|
||||
configEntrypoint?: URL | string;
|
||||
seedEntrypoint?: URL | string;
|
||||
}) => void;
|
||||
}) => void | Promise<void>;
|
||||
}
|
||||
}
|
||||
}
|
||||
export {};
|
||||
19
node_modules/@astrojs/db/dist/_internal/core/utils.d.ts
generated
vendored
Normal file
19
node_modules/@astrojs/db/dist/_internal/core/utils.d.ts
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
import type { AstroConfig, AstroIntegration } from 'astro';
|
||||
import type { Arguments } from 'yargs-parser';
|
||||
import './types.js';
|
||||
export type VitePlugin = Required<AstroConfig['vite']>['plugins'][number];
|
||||
export declare function getAstroEnv(envMode?: string): Record<`ASTRO_${string}`, string>;
|
||||
export type RemoteDatabaseInfo = {
|
||||
url: string;
|
||||
token: string;
|
||||
};
|
||||
export declare function getRemoteDatabaseInfo(): RemoteDatabaseInfo;
|
||||
export declare function resolveDbAppToken(flags: Arguments, envToken: string): string;
|
||||
export declare function resolveDbAppToken(flags: Arguments, envToken: string | undefined): string | undefined;
|
||||
export declare function getDbDirectoryUrl(root: URL | string): URL;
|
||||
export declare function defineDbIntegration(integration: AstroIntegration): AstroIntegration;
|
||||
/**
|
||||
* Map an object's values to a new set of values
|
||||
* while preserving types.
|
||||
*/
|
||||
export declare function mapObject<T, U = T>(item: Record<string, T>, callback: (key: string, value: T) => U): Record<string, U>;
|
||||
92
node_modules/@astrojs/db/dist/_internal/runtime/types.d.ts
generated
vendored
Normal file
92
node_modules/@astrojs/db/dist/_internal/runtime/types.d.ts
generated
vendored
Normal file
@@ -0,0 +1,92 @@
|
||||
import type { ColumnBaseConfig, ColumnDataType } from 'drizzle-orm';
|
||||
import type { SQLiteColumn, SQLiteTableWithColumns } from 'drizzle-orm/sqlite-core';
|
||||
import type { ColumnsConfig, DBColumn, OutputColumnsConfig } from '../core/types.js';
|
||||
type GeneratedConfig<T extends ColumnDataType = ColumnDataType> = Pick<ColumnBaseConfig<T, string>, 'name' | 'tableName' | 'notNull' | 'hasDefault' | 'hasRuntimeDefault' | 'isPrimaryKey'>;
|
||||
type AstroText<T extends GeneratedConfig<'string'>, E extends readonly [string, ...string[]] | string> = SQLiteColumn<T & {
|
||||
data: E extends readonly (infer U)[] ? U : string;
|
||||
dataType: 'string';
|
||||
columnType: 'SQLiteText';
|
||||
driverParam: string;
|
||||
enumValues: E extends [string, ...string[]] ? E : never;
|
||||
baseColumn: never;
|
||||
isAutoincrement: boolean;
|
||||
identity: undefined;
|
||||
generated: undefined;
|
||||
}>;
|
||||
type AstroDate<T extends GeneratedConfig<'custom'>> = SQLiteColumn<T & {
|
||||
data: Date;
|
||||
dataType: 'custom';
|
||||
columnType: 'SQLiteCustomColumn';
|
||||
driverParam: string;
|
||||
enumValues: never;
|
||||
baseColumn: never;
|
||||
isAutoincrement: boolean;
|
||||
identity: undefined;
|
||||
generated: undefined;
|
||||
}>;
|
||||
type AstroBoolean<T extends GeneratedConfig<'boolean'>> = SQLiteColumn<T & {
|
||||
data: boolean;
|
||||
dataType: 'boolean';
|
||||
columnType: 'SQLiteBoolean';
|
||||
driverParam: number;
|
||||
enumValues: never;
|
||||
baseColumn: never;
|
||||
isAutoincrement: boolean;
|
||||
identity: undefined;
|
||||
generated: undefined;
|
||||
}>;
|
||||
type AstroNumber<T extends GeneratedConfig<'number'>> = SQLiteColumn<T & {
|
||||
data: number;
|
||||
dataType: 'number';
|
||||
columnType: 'SQLiteInteger';
|
||||
driverParam: number;
|
||||
enumValues: never;
|
||||
baseColumn: never;
|
||||
isAutoincrement: boolean;
|
||||
identity: undefined;
|
||||
generated: undefined;
|
||||
}>;
|
||||
type AstroJson<T extends GeneratedConfig<'custom'>> = SQLiteColumn<T & {
|
||||
data: unknown;
|
||||
dataType: 'custom';
|
||||
columnType: 'SQLiteCustomColumn';
|
||||
driverParam: string;
|
||||
enumValues: never;
|
||||
baseColumn: never;
|
||||
isAutoincrement: boolean;
|
||||
identity: undefined;
|
||||
generated: undefined;
|
||||
}>;
|
||||
type Column<T extends DBColumn['type'], E extends readonly [string, ...string[]] | string, S extends GeneratedConfig> = T extends 'boolean' ? AstroBoolean<S> : T extends 'number' ? AstroNumber<S> : T extends 'text' ? AstroText<S, E> : T extends 'date' ? AstroDate<S> : T extends 'json' ? AstroJson<S> : never;
|
||||
export type Table<TTableName extends string, TColumns extends OutputColumnsConfig | ColumnsConfig> = SQLiteTableWithColumns<{
|
||||
name: TTableName;
|
||||
schema: undefined;
|
||||
dialect: 'sqlite';
|
||||
columns: {
|
||||
[K in Extract<keyof TColumns, string>]: Column<TColumns[K]['type'], TColumns[K]['schema'] extends {
|
||||
enum: infer E;
|
||||
} ? E extends readonly [string, ...string[]] ? E : string : string, {
|
||||
tableName: TTableName;
|
||||
name: K;
|
||||
isPrimaryKey: TColumns[K]['schema'] extends {
|
||||
primaryKey: true;
|
||||
} ? true : false;
|
||||
hasDefault: TColumns[K]['schema'] extends {
|
||||
default: NonNullable<unknown>;
|
||||
} ? true : TColumns[K]['schema'] extends {
|
||||
primaryKey: true;
|
||||
} ? true : false;
|
||||
hasRuntimeDefault: TColumns[K]['schema'] extends {
|
||||
default: NonNullable<unknown>;
|
||||
} ? true : false;
|
||||
notNull: TColumns[K]['schema']['optional'] extends true ? false : true;
|
||||
}>;
|
||||
};
|
||||
}>;
|
||||
export declare const SERIALIZED_SQL_KEY = "__serializedSQL";
|
||||
export type SerializedSQL = {
|
||||
[SERIALIZED_SQL_KEY]: true;
|
||||
sql: string;
|
||||
};
|
||||
export declare function isSerializedSQL(value: any): value is SerializedSQL;
|
||||
export {};
|
||||
9
node_modules/@astrojs/db/dist/_internal/runtime/utils.d.ts
generated
vendored
Normal file
9
node_modules/@astrojs/db/dist/_internal/runtime/utils.d.ts
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
import { LibsqlError } from '@libsql/client';
|
||||
import { AstroError } from 'astro/errors';
|
||||
import type { DBColumn } from '../core/types.js';
|
||||
export declare function hasPrimaryKey(column: DBColumn): boolean;
|
||||
export declare class AstroDbError extends AstroError {
|
||||
name: string;
|
||||
}
|
||||
export declare function isDbError(err: unknown): err is LibsqlError;
|
||||
export declare function pathToFileURL(path: string): URL;
|
||||
48
node_modules/@astrojs/db/dist/_internal/runtime/virtual.d.ts
generated
vendored
Normal file
48
node_modules/@astrojs/db/dist/_internal/runtime/virtual.d.ts
generated
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
import type { BooleanColumnInput, ColumnsConfig, DateColumnInput, DBConfigInput, JsonColumnInput, NumberColumnOpts, TableConfig, TextColumnOpts } from '../core/types.js';
|
||||
export declare const column: {
|
||||
number: <T extends NumberColumnOpts>(opts?: T) => {
|
||||
type: "number";
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
schema: T;
|
||||
};
|
||||
boolean: <T extends BooleanColumnInput["schema"]>(opts?: T) => {
|
||||
type: "boolean";
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
schema: T;
|
||||
};
|
||||
text: <T extends TextColumnOpts, const E extends T["enum"] extends readonly [string, ...string[]] ? Omit<T, "enum"> & T["enum"] : T>(opts?: E) => {
|
||||
type: "text";
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
schema: E;
|
||||
};
|
||||
date<T extends DateColumnInput["schema"]>(opts?: T): {
|
||||
type: "date";
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
schema: T;
|
||||
};
|
||||
json<T extends JsonColumnInput["schema"]>(opts?: T): {
|
||||
type: "json";
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
schema: T;
|
||||
};
|
||||
};
|
||||
export declare function defineTable<TColumns extends ColumnsConfig>(userConfig: TableConfig<TColumns>): TableConfig<TColumns>;
|
||||
export declare function defineDb(userConfig: DBConfigInput): {
|
||||
tables?: unknown;
|
||||
};
|
||||
export declare const NOW: import("drizzle-orm").SQL<unknown>;
|
||||
export declare const TRUE: import("drizzle-orm").SQL<unknown>;
|
||||
export declare const FALSE: import("drizzle-orm").SQL<unknown>;
|
||||
export { and, asc, avg, avgDistinct, between, count, countDistinct, desc, eq, exists, gt, gte, ilike, inArray, isNotNull, isNull, like, lt, lte, max, min, ne, not, notBetween, notExists, notIlike, notInArray, or, sql, sum, sumDistinct, } from 'drizzle-orm';
|
||||
export { alias } from 'drizzle-orm/sqlite-core';
|
||||
export { isDbError } from './utils.js';
|
||||
Reference in New Issue
Block a user