@codingame/monaco-vscode-a9da9abe-278d-5ce6-9418-99c7c07c5c37-common 19.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/empty.js ADDED
@@ -0,0 +1 @@
1
+ export {}
package/package.json ADDED
@@ -0,0 +1,41 @@
1
+ {
2
+ "name": "@codingame/monaco-vscode-a9da9abe-278d-5ce6-9418-99c7c07c5c37-common",
3
+ "version": "19.0.0",
4
+ "private": false,
5
+ "description": "VSCode public API plugged on the monaco editor - common package (chat, extensions, notebook, terminal, testing)",
6
+ "keywords": [],
7
+ "author": {
8
+ "name": "CodinGame",
9
+ "url": "http://www.codingame.com"
10
+ },
11
+ "license": "MIT",
12
+ "repository": {
13
+ "type": "git",
14
+ "url": "git+ssh://git@github.com/CodinGame/monaco-vscode-api.git"
15
+ },
16
+ "type": "module",
17
+ "dependencies": {},
18
+ "exports": {
19
+ ".": {
20
+ "default": "./empty.js"
21
+ },
22
+ "./vscode/*.css": {
23
+ "default": "./vscode/src/*.css"
24
+ },
25
+ "./vscode/*": {
26
+ "types": "./vscode/src/*.d.ts",
27
+ "default": "./vscode/src/*.js"
28
+ },
29
+ "./*": {
30
+ "types": "./*.d.ts",
31
+ "default": "./*.js"
32
+ }
33
+ },
34
+ "typesVersions": {
35
+ "*": {
36
+ "vscode/*": [
37
+ "./vscode/src/*.d.ts"
38
+ ]
39
+ }
40
+ }
41
+ }
@@ -0,0 +1,182 @@
1
+ import { Event } from "@codingame/monaco-vscode-api/vscode/vs/base/common/event";
2
+ import type { IPromptInputModel, ISerializedPromptInputModel } from "@codingame/monaco-vscode-f6ab89b2-83b0-5a43-8772-cb0eafa650b5-common/vscode/vs/platform/terminal/common/capabilities/commandDetection/promptInputModel";
3
+ import { ICurrentPartialCommand } from "@codingame/monaco-vscode-f6ab89b2-83b0-5a43-8772-cb0eafa650b5-common/vscode/vs/platform/terminal/common/capabilities/commandDetection/terminalCommand";
4
+ import { ITerminalOutputMatch, ITerminalOutputMatcher } from "@codingame/monaco-vscode-api/vscode/vs/platform/terminal/common/terminal";
5
+ import { ReplayEntry } from "@codingame/monaco-vscode-api/vscode/vs/platform/terminal/common/terminalProcess";
6
+ import type { IMarker } from "@xterm/headless";
7
+ export declare enum TerminalCapability {
8
+ CwdDetection = 0,
9
+ NaiveCwdDetection = 1,
10
+ CommandDetection = 2,
11
+ PartialCommandDetection = 3,
12
+ BufferMarkDetection = 4,
13
+ ShellEnvDetection = 5
14
+ }
15
+ export interface ITerminalCapabilityStore {
16
+ readonly items: IterableIterator<TerminalCapability>;
17
+ readonly onDidAddCapabilityType: Event<TerminalCapability>;
18
+ readonly onDidRemoveCapabilityType: Event<TerminalCapability>;
19
+ readonly onDidAddCapability: Event<TerminalCapabilityChangeEvent<any>>;
20
+ readonly onDidRemoveCapability: Event<TerminalCapabilityChangeEvent<any>>;
21
+ has(capability: TerminalCapability): boolean;
22
+ get<T extends TerminalCapability>(capability: T): ITerminalCapabilityImplMap[T] | undefined;
23
+ }
24
+ export interface TerminalCapabilityChangeEvent<T extends TerminalCapability> {
25
+ id: T;
26
+ capability: ITerminalCapabilityImplMap[T];
27
+ }
28
+ export interface ITerminalCapabilityImplMap {
29
+ [TerminalCapability.CwdDetection]: ICwdDetectionCapability;
30
+ [TerminalCapability.CommandDetection]: ICommandDetectionCapability;
31
+ [TerminalCapability.NaiveCwdDetection]: INaiveCwdDetectionCapability;
32
+ [TerminalCapability.PartialCommandDetection]: IPartialCommandDetectionCapability;
33
+ [TerminalCapability.BufferMarkDetection]: IBufferMarkCapability;
34
+ [TerminalCapability.ShellEnvDetection]: IShellEnvDetectionCapability;
35
+ }
36
+ export interface ICwdDetectionCapability {
37
+ readonly type: TerminalCapability.CwdDetection;
38
+ readonly onDidChangeCwd: Event<string>;
39
+ readonly cwds: string[];
40
+ getCwd(): string;
41
+ updateCwd(cwd: string): void;
42
+ }
43
+ export interface IShellEnvDetectionCapability {
44
+ readonly type: TerminalCapability.ShellEnvDetection;
45
+ readonly onDidChangeEnv: Event<TerminalShellIntegrationEnvironment>;
46
+ get env(): TerminalShellIntegrationEnvironment;
47
+ setEnvironment(envs: {
48
+ [key: string]: string | undefined;
49
+ } | undefined, isTrusted: boolean): void;
50
+ startEnvironmentSingleVar(clear: boolean, isTrusted: boolean): void;
51
+ setEnvironmentSingleVar(key: string, value: string | undefined, isTrusted: boolean): void;
52
+ deleteEnvironmentSingleVar(key: string, value: string | undefined, isTrusted: boolean): void;
53
+ endEnvironmentSingleVar(isTrusted: boolean): void;
54
+ }
55
+ export interface TerminalShellIntegrationEnvironment {
56
+ value: {
57
+ [key: string]: string | undefined;
58
+ } | undefined;
59
+ isTrusted: boolean;
60
+ }
61
+ export interface TerminalShellIntegration {
62
+ readonly env: TerminalShellIntegrationEnvironment;
63
+ }
64
+ export declare enum CommandInvalidationReason {
65
+ Windows = "windows",
66
+ NoProblemsReported = "noProblemsReported"
67
+ }
68
+ export interface ICommandInvalidationRequest {
69
+ reason: CommandInvalidationReason;
70
+ }
71
+ export interface IBufferMarkCapability {
72
+ type: TerminalCapability.BufferMarkDetection;
73
+ markers(): IterableIterator<IMarker>;
74
+ onMarkAdded: Event<IMarkProperties>;
75
+ addMark(properties?: IMarkProperties): void;
76
+ getMark(id: string): IMarker | undefined;
77
+ }
78
+ export interface ICommandDetectionCapability {
79
+ readonly type: TerminalCapability.CommandDetection;
80
+ readonly promptInputModel: IPromptInputModel;
81
+ readonly commands: readonly ITerminalCommand[];
82
+ readonly executingCommand: string | undefined;
83
+ readonly executingCommandObject: ITerminalCommand | undefined;
84
+ readonly executingCommandConfidence: "low" | "medium" | "high" | undefined;
85
+ readonly cwd: string | undefined;
86
+ readonly hasRichCommandDetection: boolean;
87
+ readonly promptType: string | undefined;
88
+ readonly currentCommand: ICurrentPartialCommand | undefined;
89
+ readonly onCommandStarted: Event<ITerminalCommand>;
90
+ readonly onCommandFinished: Event<ITerminalCommand>;
91
+ readonly onCommandExecuted: Event<ITerminalCommand>;
92
+ readonly onCommandInvalidated: Event<ITerminalCommand[]>;
93
+ readonly onCurrentCommandInvalidated: Event<ICommandInvalidationRequest>;
94
+ readonly onPromptTypeChanged: Event<string | undefined>;
95
+ readonly onSetRichCommandDetection: Event<boolean>;
96
+ setContinuationPrompt(value: string): void;
97
+ setPromptTerminator(value: string, lastPromptLine: string): void;
98
+ setCwd(value: string): void;
99
+ setIsWindowsPty(value: boolean): void;
100
+ setIsCommandStorageDisabled(): void;
101
+ getCwdForLine(line: number): string | undefined;
102
+ getCommandForLine(line: number): ITerminalCommand | ICurrentPartialCommand | undefined;
103
+ handlePromptStart(options?: IHandleCommandOptions): void;
104
+ handleContinuationStart(): void;
105
+ handleContinuationEnd(): void;
106
+ handleRightPromptStart(): void;
107
+ handleRightPromptEnd(): void;
108
+ handleCommandStart(options?: IHandleCommandOptions): void;
109
+ handleCommandExecuted(options?: IHandleCommandOptions): void;
110
+ handleCommandFinished(exitCode?: number, options?: IHandleCommandOptions): void;
111
+ setHasRichCommandDetection(value: boolean): void;
112
+ setPromptType(value: string): void;
113
+ setCommandLine(commandLine: string, isTrusted: boolean): void;
114
+ serialize(): ISerializedCommandDetectionCapability;
115
+ deserialize(serialized: ISerializedCommandDetectionCapability): void;
116
+ }
117
+ export interface IHandleCommandOptions {
118
+ ignoreCommandLine?: boolean;
119
+ marker?: IMarker;
120
+ markProperties?: IMarkProperties;
121
+ }
122
+ export interface INaiveCwdDetectionCapability {
123
+ readonly type: TerminalCapability.NaiveCwdDetection;
124
+ readonly onDidChangeCwd: Event<string>;
125
+ getCwd(): Promise<string>;
126
+ }
127
+ export interface IPartialCommandDetectionCapability {
128
+ readonly type: TerminalCapability.PartialCommandDetection;
129
+ readonly commands: readonly IMarker[];
130
+ readonly onCommandFinished: Event<IMarker>;
131
+ }
132
+ interface IBaseTerminalCommand {
133
+ command: string;
134
+ commandLineConfidence: "low" | "medium" | "high";
135
+ isTrusted: boolean;
136
+ timestamp: number;
137
+ duration: number;
138
+ cwd: string | undefined;
139
+ exitCode: number | undefined;
140
+ commandStartLineContent: string | undefined;
141
+ markProperties: IMarkProperties | undefined;
142
+ executedX: number | undefined;
143
+ startX: number | undefined;
144
+ }
145
+ export interface ITerminalCommand extends IBaseTerminalCommand {
146
+ readonly promptStartMarker?: IMarker;
147
+ readonly marker?: IMarker;
148
+ endMarker?: IMarker;
149
+ readonly executedMarker?: IMarker;
150
+ readonly aliases?: string[][];
151
+ readonly wasReplayed?: boolean;
152
+ extractCommandLine(): string;
153
+ getOutput(): string | undefined;
154
+ getOutputMatch(outputMatcher: ITerminalOutputMatcher): ITerminalOutputMatch | undefined;
155
+ hasOutput(): boolean;
156
+ getPromptRowCount(): number;
157
+ getCommandRowCount(): number;
158
+ }
159
+ export interface ISerializedTerminalCommand extends IBaseTerminalCommand {
160
+ startLine: number | undefined;
161
+ promptStartLine: number | undefined;
162
+ endLine: number | undefined;
163
+ executedLine: number | undefined;
164
+ }
165
+ export interface IMarkProperties {
166
+ hoverMessage?: string;
167
+ disableCommandStorage?: boolean;
168
+ hidden?: boolean;
169
+ marker?: IMarker;
170
+ id?: string;
171
+ }
172
+ export interface ISerializedCommandDetectionCapability {
173
+ isWindowsPty: boolean;
174
+ hasRichCommandDetection: boolean;
175
+ commands: ISerializedTerminalCommand[];
176
+ promptInputModel: ISerializedPromptInputModel | undefined;
177
+ }
178
+ export interface IPtyHostProcessReplayEvent {
179
+ events: ReplayEntry[];
180
+ commands: ISerializedCommandDetectionCapability;
181
+ }
182
+ export {};
@@ -0,0 +1,18 @@
1
+
2
+
3
+ var TerminalCapability;
4
+ (function (TerminalCapability) {
5
+ TerminalCapability[TerminalCapability["CwdDetection"] = 0] = "CwdDetection";
6
+ TerminalCapability[TerminalCapability["NaiveCwdDetection"] = 1] = "NaiveCwdDetection";
7
+ TerminalCapability[TerminalCapability["CommandDetection"] = 2] = "CommandDetection";
8
+ TerminalCapability[TerminalCapability["PartialCommandDetection"] = 3] = "PartialCommandDetection";
9
+ TerminalCapability[TerminalCapability["BufferMarkDetection"] = 4] = "BufferMarkDetection";
10
+ TerminalCapability[TerminalCapability["ShellEnvDetection"] = 5] = "ShellEnvDetection";
11
+ })(TerminalCapability || (TerminalCapability = {}));
12
+ var CommandInvalidationReason;
13
+ (function (CommandInvalidationReason) {
14
+ CommandInvalidationReason["Windows"] = "windows";
15
+ CommandInvalidationReason["NoProblemsReported"] = "noProblemsReported";
16
+ })(CommandInvalidationReason || (CommandInvalidationReason = {}));
17
+
18
+ export { CommandInvalidationReason, TerminalCapability };