schema.ts
1 import type { BrickColour } from "$lib/brickColours" // actually works!?! 2 3 export type Config = { 4 /** 5 * The name of your revival. Make sure it's something stupid. 6 * 7 * [**No good names. Absolutely none.**](https://youtube.com/watch?v=88KGJ-eh7FU&t=145) 8 */ 9 Name: string 10 /** 11 * Your revival's domain name. 12 */ 13 Domain: string 14 /** 15 * The URL of your database server. 16 */ 17 DatabaseURL: string 18 /** 19 * The URL of your RCC proxy server. Requires a URL scheme. 20 */ 21 RCCServiceProxyURL: string 22 /** 23 * The URL of your Orbiter gameserver hoster, exposing the private API for use by the Site. Requires a URL scheme. 24 */ 25 OrbiterPrivateURL: string 26 /** 27 * The domain name of your Orbiter gameserver hoster, exposing the public API for use by a user's browser. 28 */ 29 OrbiterPublicDomain: string 30 /** 31 * The URI scheme to pass to the launcher when joining a game. 32 */ 33 LauncherURI: string 34 /** 35 * The symbol for your revival's currency. Placed before the amount. 36 */ 37 CurrencySymbol: string 38 /** 39 * Controls which optional pages on the site are enabled. This allows you to turn off unnecessary features for your revival. 40 */ 41 Pages: ("Statistics" | "Groups" | "Forum")[] 42 43 /** 44 * The default body colours for avatar creation, given to each new user on registration. 45 * 46 * Each colour is a BrickColor ID. 47 */ 48 DefaultBodyColors: { 49 /** 50 * The default head colour. 51 */ 52 Head: BrickColour 53 /** 54 * The default left arm colour. 55 */ 56 LeftArm: BrickColour 57 /** 58 * The default left leg colour. 59 */ 60 LeftLeg: BrickColour 61 /** 62 * The default right arm colour. 63 */ 64 RightArm: BrickColour 65 /** 66 * The default right leg colour. 67 */ 68 RightLeg: BrickColour 69 /** 70 * The default torso colour. 71 */ 72 Torso: BrickColour 73 } 74 75 /** 76 * Configuration for logging done by Mercury Core. 77 */ 78 Logging: { 79 /** 80 * Whether to log all incoming requests to dynamic pages. 81 */ 82 Requests: boolean 83 /** 84 * Whether to format errors in a more readable way. This does not provide a full stack trace. 85 */ 86 FormattedErrors: boolean 87 /** 88 * Whether to log the time of each request. 89 */ 90 Time: boolean 91 } 92 93 /** 94 * Configuration for custom branding and icon file paths in the Assets directory. 95 */ 96 Branding: { 97 /** 98 * Path to your revival's favicon in the Assets directory. May be in any browser-supported format. 99 */ 100 Favicon: string 101 /** 102 * Path to your revival's logo icon in the Assets directory. May be in any browser-supported format. 103 */ 104 Icon: string 105 /** 106 * A very short tagline for your revival. This is displayed in the footer as well as on the login and register pages. 107 * 108 * If set to an empty string, this does not display. 109 */ 110 Tagline: string 111 /** 112 * Descriptions for your revival's features. These are displayed on the register page. 113 * 114 * Each description is a key-value pair, where the key is a feature's title and the value is its description. 115 */ 116 Descriptions: { [feature: string]: string } 117 } 118 119 /** 120 * Configuration for image file paths in the Assets directory. 121 */ 122 Images: { 123 /** 124 * Array of paths for default place icons in the Assets directory. May be in any browser-supported format. 125 */ 126 DefaultPlaceIcons: string[] 127 /** 128 * Array of paths for default place icons in the Assets directory. May be in any browser-supported format. 129 */ 130 DefaultPlaceThumbnails: string[] 131 } 132 133 /** 134 * Configuration for the revival's available themes. The first theme in the array will be the default theme. 135 */ 136 Themes: { 137 /** 138 * The name of the theme. 139 */ 140 Name: string 141 /** 142 * Path to the theme's CSS file in the Assets directory. 143 */ 144 Path: string 145 }[] 146 147 /** 148 * Configuration for basic text filtering for profanity. 149 */ 150 Filtering: { 151 /** 152 * Array of words to naively filter out of text (where surrounded by whitespace). You may wish to pass this in from a package or JSON file. 153 * 154 * Set to a blank array to disable filtering. 155 */ 156 FilteredWords: string[] 157 /** 158 * The character of which to replace filtered words with. 159 */ 160 ReplaceWith: string 161 /** 162 * How to replace filtered words, either by replacing each character or replacing the entire word with ReplaceWith. 163 */ 164 ReplaceType: "Character" | "Word" 165 } 166 167 /** 168 * Configuration for user registration. 169 */ 170 Registration: { 171 /** 172 * Configuration for how registration keys are used and generated. 173 */ 174 Keys: { 175 /** 176 * Whether registration keys are enabled. 177 */ 178 Enabled: boolean 179 /** 180 * Prefix for registration keys. This is used to identify keys generated by your revival. 181 */ 182 Prefix: string 183 } 184 /** 185 * Whether to ask for and require email addresses for registration. 186 */ 187 Emails: boolean 188 } 189 190 /** 191 * Configuration for sending emails. 192 */ 193 Email: { 194 /** 195 * The SMTP server host to use for sending emails. 196 */ 197 Host: string 198 /** 199 * The SMTP server port to use for sending emails. 200 */ 201 Port: number 202 /** 203 * The username to use for authentication with the SMTP server. The corresponding password should be configured in your environment variables. 204 */ 205 Username: string 206 } 207 208 /** 209 * Configuration for gameserver hosting. 210 */ 211 Gameservers: { 212 /** 213 * The type of gameserver hosting to use. 214 */ 215 Hosting: "Selfhosted" | "Dedicated" | "Both" 216 } 217 }