Skip to content

Commit

Permalink
\n
Browse files Browse the repository at this point in the history
  • Loading branch information
IncognitoTGT committed Jul 24, 2024
1 parent 309edff commit 8307102
Showing 1 changed file with 95 additions and 95 deletions.
190 changes: 95 additions & 95 deletions stardust-config.d.ts
Original file line number Diff line number Diff line change
@@ -1,109 +1,109 @@
export interface Config {
/**
* The URL of the database to connect to.
*/
databaseUrl: string;
/**
* The public URL of your Stardust instance. Use this if you want to display site metadata.
*/
metadataUrl?: string;
docker: DockerConfig;
auth: AuthConfig;
session?: SessionConfig;
/**
* The URL of the database to connect to.
*/
databaseUrl: string;
/**
* The public URL of your Stardust instance. Use this if you want to display site metadata.
*/
metadataUrl?: string;
docker: DockerConfig;
auth: AuthConfig;
session?: SessionConfig;
}

export interface DockerConfig {
/**
* The type of connection to use to connect to the Docker daemon.
* @default "socket"
*/
type?: "http" | "socket";
/**
* The path to the Docker socket to connect to, if using a socket connection.
* @default "/var/run/docker.sock"
*/
socket?: string;
/**
* The host to connect to, if using an HTTP connection.
*/
host?: string;
/**
* The port for the docker host, if using an HTTP connection.
*/
port?: number;
/**
* The Docker network used for connecting to containers
*/
network: string;
/**
* The type of connection to use to connect to the Docker daemon.
* @default "socket"
*/
type?: "http" | "socket";
/**
* The path to the Docker socket to connect to, if using a socket connection.
* @default "/var/run/docker.sock"
*/
socket?: string;
/**
* The host to connect to, if using an HTTP connection.
*/
host?: string;
/**
* The port for the docker host, if using an HTTP connection.
*/
port?: number;
/**
* The Docker network used for connecting to containers
*/
network: string;
}

export interface AuthConfig {
/**
* The JWT secret used to sign tokens.
**/
secret: string;
/**
* Cloudflare turnstile configuration. Leave `undefined` to disable turnstile.
**/
turnstile?: TurnstileConfig;
/**
* Credentials configuration. Leave `undefined` to disable user/password signups, or as `{}` to enable.
**/
credentials?: {
/**
* Whether to allow user signups.
* @default false
**/
signups?: boolean;
};
/**
* OAuth configuration. Leave `undefined` to disable OAuth signups.
**/
oauth?: {
/**
* The OAuth providers to enable.
**/
providers: {
/**
* the provider name
**/
[key: string]: {
/**
* The client ID for the OAuth provider.
**/
clientId: string;
/**
* The client secret for the OAuth provider.
**/
clientSecret: string;
/**
* The OAuth provider's issuer, if applicable.
**/
issuer?: string;
};
};
};
/**
* The JWT secret used to sign tokens.
**/
secret: string;
/**
* Cloudflare turnstile configuration. Leave `undefined` to disable turnstile.
**/
turnstile?: TurnstileConfig;
/**
* Credentials configuration. Leave `undefined` to disable user/password signups, or as `{}` to enable.
**/
credentials?: {
/**
* Whether to allow user signups.
* @default false
**/
signups?: boolean;
};
/**
* OAuth configuration. Leave `undefined` to disable OAuth signups.
**/
oauth?: {
/**
* The OAuth providers to enable.
**/
providers: {
/**
* the provider name
**/
[key: string]: {
/**
* The client ID for the OAuth provider.
**/
clientId: string;
/**
* The client secret for the OAuth provider.
**/
clientSecret: string;
/**
* The OAuth provider's issuer, if applicable.
**/
issuer?: string;
};
};
};
}

export interface SessionConfig {
/**
* The amount of time to keep an inactive session alive for, in minutes.
* @default 1440
*/
keepaliveDuration?: number;
/**
* The amount of time to keep an inactive session alive for, in minutes.
* @default 1440
*/
keepaliveDuration?: number;
}

export interface TurnstileConfig {
/*
* The Turnstile secret key, used by the backend
*/
secret: string;
/*
* The Turnstile site key, used by the frontend
*/
siteKey: string;
/*
* The hosts to enable Turnstile on
*/
hosts?: string[];
/*
* The Turnstile secret key, used by the backend
*/
secret: string;
/*
* The Turnstile site key, used by the frontend
*/
siteKey: string;
/*
* The hosts to enable Turnstile on
*/
hosts?: string[];
}

0 comments on commit 8307102

Please sign in to comment.