this repo has no description
3
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add doc comments for the extension manifest

+131 -1
+41
packages/types/src/config.ts
··· 33 33 }; 34 34 35 35 export type BooleanSettingType = { 36 + /** 37 + * Displays as a simple switch. 38 + */ 36 39 type: ExtensionSettingType.Boolean; 37 40 default?: boolean; 38 41 }; 39 42 40 43 export type NumberSettingType = { 44 + /** 45 + * Displays as a simple slider. 46 + */ 41 47 type: ExtensionSettingType.Number; 42 48 default?: number; 43 49 min?: number; ··· 45 51 }; 46 52 47 53 export type StringSettingType = { 54 + /** 55 + * Displays as a single line string input. 56 + */ 48 57 type: ExtensionSettingType.String; 49 58 default?: string; 50 59 }; 51 60 52 61 export type MultilineTextInputSettingType = { 62 + /** 63 + * Displays as a multiple line string input. 64 + */ 53 65 type: ExtensionSettingType.MultilineString; 54 66 default?: string; 55 67 }; 56 68 57 69 export type SelectSettingType = { 70 + /** 71 + * A dropdown to pick between one of many values. 72 + */ 58 73 type: ExtensionSettingType.Select; 59 74 options: SelectOption[]; 60 75 default?: string; 61 76 }; 62 77 63 78 export type MultiSelectSettingType = { 79 + /** 80 + * A dropdown to pick multiple values. 81 + */ 64 82 type: ExtensionSettingType.MultiSelect; 65 83 options: string[]; 66 84 default?: string[]; 67 85 }; 68 86 69 87 export type ListSettingType = { 88 + /** 89 + * A list of strings that the user can add or remove from. 90 + */ 70 91 type: ExtensionSettingType.List; 71 92 default?: string[]; 72 93 }; 73 94 74 95 export type DictionarySettingType = { 96 + /** 97 + * A dictionary (key-value pair) that the user can add or remove from. 98 + */ 75 99 type: ExtensionSettingType.Dictionary; 76 100 default?: Record<string, string>; 77 101 }; 78 102 79 103 export type CustomSettingType = { 104 + /** 105 + * A custom component. 106 + * You can use the registerConfigComponent function in the Moonbase API to register a React component to render here. 107 + */ 80 108 type: ExtensionSettingType.Custom; 81 109 default?: any; 82 110 }; ··· 88 116 } 89 117 90 118 export type ExtensionSettingsManifest = { 119 + /** 120 + * A human friendly name for the setting. 121 + */ 91 122 displayName?: string; 123 + 124 + /** 125 + * A longer description for the setting. 126 + * Markdown is not supported. 127 + */ 92 128 description?: string; 129 + 130 + /** 131 + * The "advice" to give upon changing this setting. 132 + * Can be configured to reload the client, restart the client, or do nothing. 133 + */ 93 134 advice?: ExtensionSettingsAdvice; 94 135 } & ( 95 136 | BooleanSettingType
+90 -1
packages/types/src/extension.ts
··· 28 28 }; 29 29 30 30 export type ExtensionManifest = { 31 + $schema?: string; 32 + 33 + /** 34 + * A unique identifier for your extension. 35 + */ 31 36 id: string; 37 + 38 + /** 39 + * A version string for your extension - doesn't need to follow a specific format. Required for publishing. 40 + */ 32 41 version?: string; 42 + 43 + /** 44 + * The API level this extension targets. If it does not match the current version, the extension will not be loaded. 45 + */ 33 46 apiLevel?: number; 47 + 48 + /** 49 + * Which environment this extension is capable of running in. 50 + */ 34 51 environment?: ExtensionEnvironment; 35 52 53 + /** 54 + * Metadata about your extension for use in Moonbase. 55 + */ 36 56 meta?: { 57 + /** 58 + * A human friendly name for your extension as a proper noun. 59 + */ 37 60 name?: string; 61 + 62 + /** 63 + * A short tagline that appears below the name. 64 + */ 38 65 tagline?: string; 66 + 67 + /** 68 + * A longer description that can use Markdown. 69 + */ 39 70 description?: string; 71 + 72 + /** 73 + * List of authors that worked on this extension - accepts string or object with ID. 74 + */ 40 75 authors?: ExtensionAuthor[]; 41 - deprecated?: boolean; 76 + 77 + /** 78 + * A list of tags that are relevant to the extension. 79 + */ 42 80 tags?: ExtensionTag[]; 81 + 82 + /** 83 + * The URL to the source repository. 84 + */ 43 85 source?: string; 86 + 87 + /** 88 + * A changelog to show in Moonbase. 89 + * Moonbase will show the changelog for the latest version, even if it is not installed. 90 + */ 44 91 changelog?: string; 92 + 93 + /** 94 + * Whether the extension is deprecated and no longer receiving updates. 95 + */ 96 + deprecated?: boolean; 45 97 }; 46 98 99 + /** 100 + * A list of extension IDs that are required for the extension to load. 101 + */ 47 102 dependencies?: string[]; 103 + 104 + /** 105 + * A list of extension IDs that the user may want to install. 106 + */ 48 107 suggested?: string[]; 108 + 109 + /** 110 + * A list of extension IDs that the extension is incompatible with. 111 + * If two incompatible extensions are enabled, one of them will not load. 112 + */ 49 113 incompatible?: string[]; 50 114 115 + /** 116 + * A list of settings for your extension, where the key is the settings ID. 117 + */ 51 118 settings?: Record<string, ExtensionSettingsManifest>; 52 119 120 + /** 121 + * A list of URLs to bypass CORS for. 122 + * This is implemented by checking if the start of the URL matches. 123 + * @example https://moonlight-mod.github.io/ 124 + */ 53 125 cors?: string[]; 126 + 127 + /** 128 + * A list of URLs to block all requests to. 129 + * This is implemented by checking if the start of the URL matches. 130 + * @example https://moonlight-mod.github.io/ 131 + */ 54 132 blocked?: string[]; 55 133 }; 56 134 57 135 export enum ExtensionEnvironment { 136 + /** 137 + * The extension will run on both platforms, the host/native modules MAY be loaded 138 + */ 58 139 Both = "both", 140 + 141 + /** 142 + * Extension will run on desktop only, the host/native modules are guaranteed to load 143 + */ 59 144 Desktop = "desktop", 145 + 146 + /** 147 + * Currently equivalent to Both 148 + */ 60 149 Web = "web" 61 150 } 62 151