-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4a8768e
commit 0f18548
Showing
6 changed files
with
169 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: Update config types | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
|
||
jobs: | ||
|
||
update: | ||
|
||
runs-on: ubuntu-latest | ||
permissions: # Job-level permissions configuration starts here | ||
contents: write # 'write' access to repository contents | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Pull the repository and update the config types | ||
run: apt install curl; echo $(curl https://raw.githubusercontent.com/spaceness/stardust/main/src/types/config.d.ts) > stardust-config.d.ts | ||
- name: Push changes | ||
uses: stefanzweifel/git-auto-commit-action@v4 | ||
if: ${{ github.repository == 'spaceness/stardust-docs' && github.ref == 'refs/heads/main' }} | ||
with: | ||
commit_message: "chore: re-generate README sections" | ||
commit_author: "github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>" | ||
branch: ${{ github.head_ref }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
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; | ||
} | ||
|
||
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; | ||
} | ||
|
||
export interface AuthConfig { | ||
/** | ||
* The JWT secret used to sign tokens. | ||
**/ | ||
secret: string; | ||
/** | ||
* Cloudflare turnstile configuration. Leave `undefined` to disable turnstile. | ||
**/ | ||
turnstile?: { | ||
secret: string; | ||
siteKey: string; | ||
}; | ||
/** | ||
* Credentials configuration. Leave `undefined` to disable user/password signups. | ||
**/ | ||
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; | ||
} |