mirror of
https://github.com/oven-sh/bun
synced 2026-02-02 15:08:46 +00:00
* Improve support for \`debug-adapter-protocol\` * More improvements, fix formatting in debug console * Fix attaching * Prepare for source maps * Start of source map support, breakpoints work * Source map support * add some package.jsons * wip * Update package.json * More fixes * Make source maps safer if exception occurs * Check bun version if it fails * Fix console.log formatting * Fix source maps partly * More source map fixes * Prepare for extension * watch mode with dap * Improve preview code * Prepare for extension 2 --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
59 lines
1.3 KiB
TypeScript
59 lines
1.3 KiB
TypeScript
// Represents the schema of the protocol.json file.
|
|
|
|
export type Protocol = {
|
|
readonly name: string;
|
|
readonly version: {
|
|
readonly major: number;
|
|
readonly minor: number;
|
|
};
|
|
readonly domains: readonly Domain[];
|
|
};
|
|
|
|
export type Domain = {
|
|
readonly domain: string;
|
|
readonly dependencies?: readonly string[];
|
|
readonly types: readonly Property[];
|
|
readonly commands?: readonly Command[];
|
|
readonly events?: readonly Event[];
|
|
};
|
|
|
|
export type Command = {
|
|
readonly name: string;
|
|
readonly description?: string;
|
|
readonly parameters?: readonly Property[];
|
|
readonly returns?: readonly Property[];
|
|
};
|
|
|
|
export type Event = {
|
|
readonly name: string;
|
|
readonly description?: string;
|
|
readonly parameters: readonly Property[];
|
|
};
|
|
|
|
export type Property = {
|
|
readonly id?: string;
|
|
readonly name?: string;
|
|
readonly description?: string;
|
|
readonly optional?: boolean;
|
|
} & (
|
|
| {
|
|
readonly type: "array";
|
|
readonly items?: Property;
|
|
}
|
|
| {
|
|
readonly type: "object";
|
|
readonly properties?: readonly Property[];
|
|
}
|
|
| {
|
|
readonly type: "string";
|
|
readonly enum?: readonly string[];
|
|
}
|
|
| {
|
|
readonly type: "boolean" | "number" | "integer";
|
|
}
|
|
| {
|
|
readonly type: undefined;
|
|
readonly $ref: string;
|
|
}
|
|
);
|