779ca4872b
- Removed Prettier configuration files (.prettierignore and .prettierrc) and migrated formatting to Biome. - Updated Biome configuration from version 2.3.11 to 2.3.12 and changed arrowParentheses rule from 'always' to 'asNeeded'. - Pinned @biomejs/biome dependency to exact version 2.3.12 in package.json and bun.lock. - Applied consistent arrow function formatting across 489 files by removing unnecessary parentheses around single parameters. - Removed blank lines after comment blocks and reorganized imports for consistency across the codebase.
34 lines
874 B
TypeScript
34 lines
874 B
TypeScript
/**
|
|
* Extension Modules Capability
|
|
*
|
|
* TypeScript/JavaScript extension modules loaded by the extension system.
|
|
*/
|
|
import { defineCapability } from ".";
|
|
import type { SourceMeta } from "./types";
|
|
|
|
/**
|
|
* A loaded extension module.
|
|
*/
|
|
export interface ExtensionModule {
|
|
/** Extension module name (derived from path) */
|
|
name: string;
|
|
/** Absolute path to extension entrypoint */
|
|
path: string;
|
|
/** Source level */
|
|
level: "user" | "project";
|
|
/** Source metadata */
|
|
_source: SourceMeta;
|
|
}
|
|
|
|
export const extensionModuleCapability = defineCapability<ExtensionModule>({
|
|
id: "extension-modules",
|
|
displayName: "Extension Modules",
|
|
description: "TypeScript/JavaScript extension modules loaded by the extension system",
|
|
key: ext => ext.name,
|
|
validate: ext => {
|
|
if (!ext.name) return "Missing name";
|
|
if (!ext.path) return "Missing path";
|
|
return undefined;
|
|
},
|
|
});
|