full site update
This commit is contained in:
1
node_modules/astro/dist/preferences/constants.d.ts
generated
vendored
Normal file
1
node_modules/astro/dist/preferences/constants.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export declare const SETTINGS_FILE = "settings.json";
|
4
node_modules/astro/dist/preferences/constants.js
generated
vendored
Normal file
4
node_modules/astro/dist/preferences/constants.js
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
const SETTINGS_FILE = "settings.json";
|
||||
export {
|
||||
SETTINGS_FILE
|
||||
};
|
10
node_modules/astro/dist/preferences/index.d.ts
generated
vendored
10
node_modules/astro/dist/preferences/index.d.ts
generated
vendored
@@ -1,11 +1,11 @@
|
||||
import type { AstroConfig } from '../@types/astro.js';
|
||||
import type { AstroConfig } from '../types/public/config.js';
|
||||
import { type Preferences, type PublicPreferences } from './defaults.js';
|
||||
type DotKeys<T> = T extends object ? {
|
||||
[K in keyof T]: `${Exclude<K, symbol>}${DotKeys<T[K]> extends never ? '' : `.${DotKeys<T[K]>}`}`;
|
||||
}[keyof T] : never;
|
||||
export type GetDotKey<T extends Record<string | number, any>, K extends string> = K extends `${infer U}.${infer Rest}` ? GetDotKey<T[U], Rest> : T[K];
|
||||
export type PreferenceLocation = 'global' | 'project';
|
||||
export interface PreferenceOptions {
|
||||
type GetDotKey<T extends Record<string | number, any>, K extends string> = K extends `${infer U}.${infer Rest}` ? GetDotKey<T[U], Rest> : T[K];
|
||||
type PreferenceLocation = 'global' | 'project';
|
||||
interface PreferenceOptions {
|
||||
location?: PreferenceLocation;
|
||||
/**
|
||||
* If `true`, the server will be reloaded after setting the preference.
|
||||
@@ -19,7 +19,7 @@ type DeepPartial<T> = T extends object ? {
|
||||
[P in keyof T]?: DeepPartial<T[P]>;
|
||||
} : T;
|
||||
export type PreferenceKey = DotKeys<Preferences>;
|
||||
export interface PreferenceList extends Record<PreferenceLocation, DeepPartial<PublicPreferences>> {
|
||||
interface PreferenceList extends Record<PreferenceLocation, DeepPartial<PublicPreferences>> {
|
||||
fromAstroConfig: DeepPartial<Preferences>;
|
||||
defaults: PublicPreferences;
|
||||
}
|
||||
|
3
node_modules/astro/dist/preferences/store.js
generated
vendored
3
node_modules/astro/dist/preferences/store.js
generated
vendored
@@ -2,8 +2,9 @@ import fs from "node:fs";
|
||||
import path from "node:path";
|
||||
import dget from "dlv";
|
||||
import { dset } from "dset";
|
||||
import { SETTINGS_FILE } from "./constants.js";
|
||||
class PreferenceStore {
|
||||
constructor(dir, filename = "settings.json") {
|
||||
constructor(dir, filename = SETTINGS_FILE) {
|
||||
this.dir = dir;
|
||||
this.file = path.join(this.dir, filename);
|
||||
}
|
||||
|
Reference in New Issue
Block a user