@lvce-editor/test-worker 16.8.0 → 17.0.1
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/dist/api.d.ts +91 -4
- package/dist/testWorkerMain.js +438 -158
- package/package.json +1 -1
package/dist/api.d.ts
CHANGED
|
@@ -168,8 +168,28 @@ export interface LayoutExpectation extends LayoutExpectationObject {
|
|
|
168
168
|
readonly groups?: readonly LayoutExpectationObject[];
|
|
169
169
|
}
|
|
170
170
|
|
|
171
|
+
export interface OpenInputOptions {
|
|
172
|
+
readonly editorInput: EditorInput;
|
|
173
|
+
readonly focu: boolean;
|
|
174
|
+
readonly preview?: boolean;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
export interface LocatorClickOptions {
|
|
178
|
+
readonly button?: string;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
export interface ILocatorExternal {
|
|
182
|
+
readonly click: (options?: LocatorClickOptions) => Promise<void>;
|
|
183
|
+
readonly dispatchEvent: (type: string, init: string) => Promise<void>;
|
|
184
|
+
readonly first: () => ILocatorExternal;
|
|
185
|
+
readonly hover: () => Promise<void>;
|
|
186
|
+
readonly locator: (subSelector: string) => ILocatorExternal;
|
|
187
|
+
readonly nth: (nth: number) => ILocatorExternal;
|
|
188
|
+
readonly type: (text: string) => Promise<void>;
|
|
189
|
+
}
|
|
190
|
+
|
|
171
191
|
export interface SelectItemOptions {
|
|
172
|
-
readonly waitUntil?:
|
|
192
|
+
readonly waitUntil?: "done" | "quickPick" | "none";
|
|
173
193
|
}
|
|
174
194
|
|
|
175
195
|
export interface SelectItem2Options {
|
|
@@ -203,6 +223,8 @@ export type DiffLayout = "horizontal" | "vertical";
|
|
|
203
223
|
|
|
204
224
|
export type TokenRow = readonly string[];
|
|
205
225
|
|
|
226
|
+
export type ExtensionStatus = "disabled" | "enabled" | "installing" | "not-installed" | "uninstalling";
|
|
227
|
+
|
|
206
228
|
export type LayoutDirection = "horizontal" | "vertical" | number;
|
|
207
229
|
|
|
208
230
|
export type LayoutExpectationValue = string | number | boolean | RegExp | null | readonly LayoutExpectationValue[] | LayoutExpectationObject;
|
|
@@ -226,7 +248,23 @@ export type SavedState = {
|
|
|
226
248
|
readonly layout?: LayoutState;
|
|
227
249
|
};
|
|
228
250
|
|
|
229
|
-
export type
|
|
251
|
+
export type EditorInput = {
|
|
252
|
+
readonly type: "editor";
|
|
253
|
+
readonly uri: string;
|
|
254
|
+
} | {
|
|
255
|
+
readonly type: "image";
|
|
256
|
+
readonly uri: string;
|
|
257
|
+
} | {
|
|
258
|
+
readonly type: "video";
|
|
259
|
+
readonly uri: string;
|
|
260
|
+
} | {
|
|
261
|
+
readonly type: "diff-editor";
|
|
262
|
+
readonly uriLeft: string;
|
|
263
|
+
readonly uriRight: string;
|
|
264
|
+
} | {
|
|
265
|
+
readonly extensionId: string;
|
|
266
|
+
readonly type: "extension-detail-view";
|
|
267
|
+
};
|
|
230
268
|
|
|
231
269
|
export type SearchInputType = "SearchValue" | "ReplaceValue" | "IncludeValue" | "ExcludeValue";
|
|
232
270
|
|
|
@@ -616,6 +654,8 @@ interface Explorer {
|
|
|
616
654
|
interface Extension {
|
|
617
655
|
readonly addNodeExtension: (relativePath: string) => Promise<void>;
|
|
618
656
|
readonly addWebExtension: (relativePath: string) => Promise<void>;
|
|
657
|
+
readonly disableWorkspace: (id: string) => Promise<void>;
|
|
658
|
+
readonly enableWorkspace: (id: string) => Promise<void>;
|
|
619
659
|
readonly executeCompletionProvider: (textDocument: CompletionTextDocument, ...args: readonly unknown[]) => Promise<readonly CompletionItem[]>;
|
|
620
660
|
readonly executeFormattingProvider: (textDocument: FormattingTextDocument, ...args: readonly unknown[]) => Promise<readonly FormattingEdit[]>;
|
|
621
661
|
}
|
|
@@ -658,6 +698,7 @@ interface ExtensionSearch {
|
|
|
658
698
|
readonly handleContextMenu: (button: number, x: number, y: number) => Promise<void>;
|
|
659
699
|
readonly handleInput: (value: string) => Promise<void>;
|
|
660
700
|
readonly open: () => Promise<void>;
|
|
701
|
+
readonly setExtensionStatus: (id: string, status: ExtensionStatus) => Promise<void>;
|
|
661
702
|
}
|
|
662
703
|
|
|
663
704
|
interface FileSystem {
|
|
@@ -733,7 +774,7 @@ interface Git {
|
|
|
733
774
|
readonly setOrigin: (remoteUrl: string) => Promise<void>;
|
|
734
775
|
readonly setUpstream: (remoteUrl: string) => Promise<void>;
|
|
735
776
|
readonly shouldHaveCommit: (message: string) => Promise<void>;
|
|
736
|
-
readonly shouldHaveInvocations: (
|
|
777
|
+
readonly shouldHaveInvocations: (expectedInvocations: readonly GitInvocation[]) => Promise<void>;
|
|
737
778
|
readonly stage: (pathSpec: string) => Promise<void>;
|
|
738
779
|
readonly stash: (message?: string) => Promise<void>;
|
|
739
780
|
readonly status: () => Promise<unknown>;
|
|
@@ -793,6 +834,7 @@ interface LanguageModels {
|
|
|
793
834
|
}
|
|
794
835
|
|
|
795
836
|
interface Layout {
|
|
837
|
+
readonly getSideBarPosition: () => Promise<number>;
|
|
796
838
|
readonly handleWorkspaceRefresh: () => Promise<void>;
|
|
797
839
|
readonly hideSecondarySideBar: () => Promise<void>;
|
|
798
840
|
readonly hideSideBar: () => Promise<void>;
|
|
@@ -817,6 +859,7 @@ interface Main {
|
|
|
817
859
|
readonly handleClickTogglePreview: () => Promise<void>;
|
|
818
860
|
readonly handleModifiedStatusChange: (uri: string, newStatus: boolean) => Promise<void>;
|
|
819
861
|
readonly handleTabContextMenu: (button: number, x: number, y: number) => Promise<void>;
|
|
862
|
+
readonly openInput: (options: OpenInputOptions) => Promise<void>;
|
|
820
863
|
readonly openKeyBindings: () => Promise<void>;
|
|
821
864
|
readonly openUri: (uri: string) => Promise<void>;
|
|
822
865
|
readonly save: () => Promise<void>;
|
|
@@ -867,6 +910,46 @@ interface Preview {
|
|
|
867
910
|
readonly waitForMutation: () => Promise<void>;
|
|
868
911
|
}
|
|
869
912
|
|
|
913
|
+
interface ProcessExplorer {
|
|
914
|
+
readonly clickRow: (index: number) => Promise<void>;
|
|
915
|
+
readonly collapseAll: () => Promise<void>;
|
|
916
|
+
readonly collapsedRow: () => ILocatorExternal;
|
|
917
|
+
readonly debugProcess: (index?: number) => Promise<void>;
|
|
918
|
+
readonly doubleClickRow: (index?: number) => Promise<void>;
|
|
919
|
+
readonly error: () => ILocatorExternal;
|
|
920
|
+
readonly expandAll: () => Promise<void>;
|
|
921
|
+
readonly expandedRow: () => ILocatorExternal;
|
|
922
|
+
readonly focusFirst: () => Promise<void>;
|
|
923
|
+
readonly focusLast: () => Promise<void>;
|
|
924
|
+
readonly focusNext: () => Promise<void>;
|
|
925
|
+
readonly focusPrevious: () => Promise<void>;
|
|
926
|
+
readonly focusedRow: () => ILocatorExternal;
|
|
927
|
+
readonly handleArrowLeft: () => Promise<void>;
|
|
928
|
+
readonly handleArrowRight: () => Promise<void>;
|
|
929
|
+
readonly headerCell: (index: number) => ILocatorExternal;
|
|
930
|
+
readonly killProcess: (index?: number) => Promise<void>;
|
|
931
|
+
readonly memoryCell: (index: number) => ILocatorExternal;
|
|
932
|
+
readonly memoryHeader: () => ILocatorExternal;
|
|
933
|
+
readonly nameCell: (index: number) => ILocatorExternal;
|
|
934
|
+
readonly nameHeader: () => ILocatorExternal;
|
|
935
|
+
readonly open: () => Promise<void>;
|
|
936
|
+
readonly openContextMenu: (index?: number) => Promise<void>;
|
|
937
|
+
readonly pidCell: (index: number) => ILocatorExternal;
|
|
938
|
+
readonly pidHeader: () => ILocatorExternal;
|
|
939
|
+
readonly refresh: () => Promise<void>;
|
|
940
|
+
readonly root: () => ILocatorExternal;
|
|
941
|
+
readonly row: (index: number) => ILocatorExternal;
|
|
942
|
+
readonly rows: () => ILocatorExternal;
|
|
943
|
+
readonly shouldBeHealthy: () => Promise<void>;
|
|
944
|
+
readonly shouldBeOpen: () => Promise<void>;
|
|
945
|
+
readonly shouldHaveCollapsedRow: () => Promise<void>;
|
|
946
|
+
readonly shouldHaveExpandedRow: () => Promise<void>;
|
|
947
|
+
readonly shouldHaveFocusedRow: () => Promise<void>;
|
|
948
|
+
readonly shouldHaveHeaders: () => Promise<void>;
|
|
949
|
+
readonly shouldHaveRow: (index?: number) => Promise<void>;
|
|
950
|
+
readonly table: () => ILocatorExternal;
|
|
951
|
+
}
|
|
952
|
+
|
|
870
953
|
interface Problems {
|
|
871
954
|
readonly copyMessage: () => Promise<void>;
|
|
872
955
|
readonly focusIndex: (index: number) => Promise<void>;
|
|
@@ -1071,6 +1154,7 @@ export interface TestApi {
|
|
|
1071
1154
|
readonly Panel: Panel
|
|
1072
1155
|
readonly Platform: Platform
|
|
1073
1156
|
readonly Preview: Preview
|
|
1157
|
+
readonly ProcessExplorer: ProcessExplorer
|
|
1074
1158
|
readonly Problems: Problems
|
|
1075
1159
|
readonly QuickPick: QuickPick
|
|
1076
1160
|
readonly References: References
|
|
@@ -1090,4 +1174,7 @@ export interface TestApi {
|
|
|
1090
1174
|
|
|
1091
1175
|
export interface Test {
|
|
1092
1176
|
(api: TestApi): Promise<void>
|
|
1093
|
-
}
|
|
1177
|
+
}
|
|
1178
|
+
|
|
1179
|
+
export type BrowserName = 'chromium' | 'firefox' | 'unknown' | 'webkit'
|
|
1180
|
+
export type Skip = boolean | number | readonly BrowserName[]
|
package/dist/testWorkerMain.js
CHANGED
|
@@ -145,7 +145,6 @@ const walkValue = (value, transferrables, isTransferrable) => {
|
|
|
145
145
|
for (const property of Object.values(value)) {
|
|
146
146
|
walkValue(property, transferrables, isTransferrable);
|
|
147
147
|
}
|
|
148
|
-
return;
|
|
149
148
|
}
|
|
150
149
|
};
|
|
151
150
|
const getTransferrables = value => {
|
|
@@ -601,8 +600,10 @@ const getCurrentStack = () => {
|
|
|
601
600
|
const currentStack = joinLines(splitLines(new Error().stack || '').slice(stackLinesToSkip));
|
|
602
601
|
return currentStack;
|
|
603
602
|
};
|
|
604
|
-
const getNewLineIndex = (string, startIndex
|
|
605
|
-
|
|
603
|
+
const getNewLineIndex = (string, startIndex) => {
|
|
604
|
+
{
|
|
605
|
+
return string.indexOf(NewLine);
|
|
606
|
+
}
|
|
606
607
|
};
|
|
607
608
|
const getParentStack = error => {
|
|
608
609
|
let parentStack = error.stack || error.data || error.message || '';
|
|
@@ -613,55 +614,77 @@ const getParentStack = error => {
|
|
|
613
614
|
};
|
|
614
615
|
const MethodNotFound = -32601;
|
|
615
616
|
const Custom = -32001;
|
|
617
|
+
const restoreExistingError = (error, currentStack) => {
|
|
618
|
+
if (typeof error.stack === 'string') {
|
|
619
|
+
error.stack = error.stack + NewLine + currentStack;
|
|
620
|
+
}
|
|
621
|
+
return error;
|
|
622
|
+
};
|
|
623
|
+
const restoreMethodNotFoundError = (error, currentStack) => {
|
|
624
|
+
const restoredError = new JsonRpcError(error.message);
|
|
625
|
+
const parentStack = getParentStack(error);
|
|
626
|
+
restoredError.stack = parentStack + NewLine + currentStack;
|
|
627
|
+
return restoredError;
|
|
628
|
+
};
|
|
629
|
+
const restoreStackFromData = (restoredError, error, currentStack) => {
|
|
630
|
+
if (error.data.stack && error.data.type && error.message) {
|
|
631
|
+
restoredError.stack = error.data.type + ': ' + error.message + NewLine + error.data.stack + NewLine + currentStack;
|
|
632
|
+
return;
|
|
633
|
+
}
|
|
634
|
+
if (error.data.stack) {
|
|
635
|
+
restoredError.stack = error.data.stack;
|
|
636
|
+
}
|
|
637
|
+
};
|
|
638
|
+
const applyDataProperties = (restoredError, error) => {
|
|
639
|
+
if (!error.data) {
|
|
640
|
+
return;
|
|
641
|
+
}
|
|
642
|
+
restoreStackFromData(restoredError, error, getCurrentStack());
|
|
643
|
+
if (error.data.codeFrame) {
|
|
644
|
+
// @ts-ignore
|
|
645
|
+
restoredError.codeFrame = error.data.codeFrame;
|
|
646
|
+
}
|
|
647
|
+
if (error.data.code) {
|
|
648
|
+
// @ts-ignore
|
|
649
|
+
restoredError.code = error.data.code;
|
|
650
|
+
}
|
|
651
|
+
if (error.data.type) {
|
|
652
|
+
// @ts-ignore
|
|
653
|
+
restoredError.name = error.data.type;
|
|
654
|
+
}
|
|
655
|
+
};
|
|
656
|
+
const applyDirectProperties = (restoredError, error) => {
|
|
657
|
+
if (error.stack) {
|
|
658
|
+
const lowerStack = restoredError.stack || '';
|
|
659
|
+
const indexNewLine = getNewLineIndex(lowerStack);
|
|
660
|
+
const parentStack = getParentStack(error);
|
|
661
|
+
// @ts-ignore
|
|
662
|
+
restoredError.stack = parentStack + lowerStack.slice(indexNewLine);
|
|
663
|
+
}
|
|
664
|
+
if (error.codeFrame) {
|
|
665
|
+
// @ts-ignore
|
|
666
|
+
restoredError.codeFrame = error.codeFrame;
|
|
667
|
+
}
|
|
668
|
+
};
|
|
669
|
+
const restoreMessageError = (error, _currentStack) => {
|
|
670
|
+
const restoredError = constructError(error.message, error.type, error.name);
|
|
671
|
+
if (error.data) {
|
|
672
|
+
applyDataProperties(restoredError, error);
|
|
673
|
+
} else {
|
|
674
|
+
applyDirectProperties(restoredError, error);
|
|
675
|
+
}
|
|
676
|
+
return restoredError;
|
|
677
|
+
};
|
|
616
678
|
const restoreJsonRpcError = error => {
|
|
617
679
|
const currentStack = getCurrentStack();
|
|
618
680
|
if (error && error instanceof Error) {
|
|
619
|
-
|
|
620
|
-
error.stack = error.stack + NewLine + currentStack;
|
|
621
|
-
}
|
|
622
|
-
return error;
|
|
681
|
+
return restoreExistingError(error, currentStack);
|
|
623
682
|
}
|
|
624
683
|
if (error && error.code && error.code === MethodNotFound) {
|
|
625
|
-
|
|
626
|
-
const parentStack = getParentStack(error);
|
|
627
|
-
restoredError.stack = parentStack + NewLine + currentStack;
|
|
628
|
-
return restoredError;
|
|
684
|
+
return restoreMethodNotFoundError(error, currentStack);
|
|
629
685
|
}
|
|
630
686
|
if (error && error.message) {
|
|
631
|
-
|
|
632
|
-
if (error.data) {
|
|
633
|
-
if (error.data.stack && error.data.type && error.message) {
|
|
634
|
-
restoredError.stack = error.data.type + ': ' + error.message + NewLine + error.data.stack + NewLine + currentStack;
|
|
635
|
-
} else if (error.data.stack) {
|
|
636
|
-
restoredError.stack = error.data.stack;
|
|
637
|
-
}
|
|
638
|
-
if (error.data.codeFrame) {
|
|
639
|
-
// @ts-ignore
|
|
640
|
-
restoredError.codeFrame = error.data.codeFrame;
|
|
641
|
-
}
|
|
642
|
-
if (error.data.code) {
|
|
643
|
-
// @ts-ignore
|
|
644
|
-
restoredError.code = error.data.code;
|
|
645
|
-
}
|
|
646
|
-
if (error.data.type) {
|
|
647
|
-
// @ts-ignore
|
|
648
|
-
restoredError.name = error.data.type;
|
|
649
|
-
}
|
|
650
|
-
} else {
|
|
651
|
-
if (error.stack) {
|
|
652
|
-
const lowerStack = restoredError.stack || '';
|
|
653
|
-
// @ts-ignore
|
|
654
|
-
const indexNewLine = getNewLineIndex(lowerStack);
|
|
655
|
-
const parentStack = getParentStack(error);
|
|
656
|
-
// @ts-ignore
|
|
657
|
-
restoredError.stack = parentStack + lowerStack.slice(indexNewLine);
|
|
658
|
-
}
|
|
659
|
-
if (error.codeFrame) {
|
|
660
|
-
// @ts-ignore
|
|
661
|
-
restoredError.codeFrame = error.codeFrame;
|
|
662
|
-
}
|
|
663
|
-
}
|
|
664
|
-
return restoredError;
|
|
687
|
+
return restoreMessageError(error);
|
|
665
688
|
}
|
|
666
689
|
if (typeof error === 'string') {
|
|
667
690
|
return new Error(`JsonRpc Error: ${error}`);
|
|
@@ -1265,17 +1288,53 @@ const initializeOpenerWorker = async () => {
|
|
|
1265
1288
|
set$3(rpc);
|
|
1266
1289
|
};
|
|
1267
1290
|
|
|
1291
|
+
// @ts-nocheck
|
|
1292
|
+
|
|
1268
1293
|
const state$3 = {
|
|
1294
|
+
mockRpcs: Object.create(null),
|
|
1295
|
+
/**
|
|
1296
|
+
* @type {any[]}
|
|
1297
|
+
*/
|
|
1298
|
+
pendingTests: []
|
|
1299
|
+
};
|
|
1300
|
+
const addTest = (name, fn) => {
|
|
1301
|
+
state$3.pendingTests.push({
|
|
1302
|
+
fn,
|
|
1303
|
+
name
|
|
1304
|
+
});
|
|
1305
|
+
};
|
|
1306
|
+
const setMockRpc = mockRpc => {
|
|
1307
|
+
object(mockRpc);
|
|
1308
|
+
string$1(mockRpc.name);
|
|
1309
|
+
state$3.mockRpcs[mockRpc.name] = mockRpc;
|
|
1310
|
+
};
|
|
1311
|
+
const getMockRpc = name => {
|
|
1312
|
+
return state$3.mockRpcs[name];
|
|
1313
|
+
};
|
|
1314
|
+
|
|
1315
|
+
const executeMockRpcFunction = async (name, method, ...params) => {
|
|
1316
|
+
const mockRpc = getMockRpc(name);
|
|
1317
|
+
if (!mockRpc) {
|
|
1318
|
+
throw new Error(`mock rpc not found: ${name}`);
|
|
1319
|
+
}
|
|
1320
|
+
const fn = mockRpc.commands?.[method];
|
|
1321
|
+
if (typeof fn !== 'function') {
|
|
1322
|
+
throw new TypeError(`mock rpc command not found: ${name}.${method}`);
|
|
1323
|
+
}
|
|
1324
|
+
return fn(...params);
|
|
1325
|
+
};
|
|
1326
|
+
|
|
1327
|
+
const state$2 = {
|
|
1269
1328
|
autoFixError: undefined
|
|
1270
1329
|
};
|
|
1271
1330
|
const get$1 = () => {
|
|
1272
|
-
return state$
|
|
1331
|
+
return state$2.autoFixError;
|
|
1273
1332
|
};
|
|
1274
1333
|
const set$1 = value => {
|
|
1275
|
-
state$
|
|
1334
|
+
state$2.autoFixError = value;
|
|
1276
1335
|
};
|
|
1277
1336
|
const clear$3 = () => {
|
|
1278
|
-
state$
|
|
1337
|
+
state$2.autoFixError = undefined;
|
|
1279
1338
|
};
|
|
1280
1339
|
|
|
1281
1340
|
class AssertionError extends Error {
|
|
@@ -1618,27 +1677,6 @@ const nameAnonymousFunction = (fn, name) => {
|
|
|
1618
1677
|
});
|
|
1619
1678
|
};
|
|
1620
1679
|
|
|
1621
|
-
// @ts-nocheck
|
|
1622
|
-
|
|
1623
|
-
const state$2 = {
|
|
1624
|
-
mockRpcs: Object.create(null),
|
|
1625
|
-
/**
|
|
1626
|
-
* @type {any[]}
|
|
1627
|
-
*/
|
|
1628
|
-
pendingTests: []
|
|
1629
|
-
};
|
|
1630
|
-
const addTest = (name, fn) => {
|
|
1631
|
-
state$2.pendingTests.push({
|
|
1632
|
-
fn,
|
|
1633
|
-
name
|
|
1634
|
-
});
|
|
1635
|
-
};
|
|
1636
|
-
const setMockRpc = mockRpc => {
|
|
1637
|
-
object(mockRpc);
|
|
1638
|
-
string$1(mockRpc.name);
|
|
1639
|
-
state$2.mockRpcs[mockRpc.name] = mockRpc;
|
|
1640
|
-
};
|
|
1641
|
-
|
|
1642
1680
|
class CssParsingError extends Error {
|
|
1643
1681
|
constructor(message) {
|
|
1644
1682
|
super(message);
|
|
@@ -1837,16 +1875,16 @@ const handleClickClose$1 = async () => {
|
|
|
1837
1875
|
const handleClickCopy = async () => {
|
|
1838
1876
|
return invoke('About.handleClickCopy');
|
|
1839
1877
|
};
|
|
1840
|
-
const focusNext$
|
|
1878
|
+
const focusNext$a = async () => {
|
|
1841
1879
|
return invoke('About.focusNext');
|
|
1842
1880
|
};
|
|
1843
|
-
const focusPrevious$
|
|
1881
|
+
const focusPrevious$9 = async () => {
|
|
1844
1882
|
return invoke('About.focusPrevious');
|
|
1845
1883
|
};
|
|
1846
1884
|
|
|
1847
1885
|
const About = {
|
|
1848
|
-
focusNext: focusNext$
|
|
1849
|
-
focusPrevious: focusPrevious$
|
|
1886
|
+
focusNext: focusNext$a,
|
|
1887
|
+
focusPrevious: focusPrevious$9,
|
|
1850
1888
|
handleClickClose: handleClickClose$1,
|
|
1851
1889
|
handleClickCopy,
|
|
1852
1890
|
handleClickOk,
|
|
@@ -1865,19 +1903,19 @@ const toggleActivityBarItem = async id => {
|
|
|
1865
1903
|
const setUserLoginState = async loginState => {
|
|
1866
1904
|
await invoke('ActivityBar.setUserLoginState', loginState);
|
|
1867
1905
|
};
|
|
1868
|
-
const focusFirst$
|
|
1906
|
+
const focusFirst$8 = async () => {
|
|
1869
1907
|
await invoke('ActivityBar.focusFirst');
|
|
1870
1908
|
};
|
|
1871
1909
|
const setAccountEnabled = async enabled => {
|
|
1872
1910
|
await invoke('ActivityBar.setAccountEnabled', enabled);
|
|
1873
1911
|
};
|
|
1874
|
-
const focusLast$
|
|
1912
|
+
const focusLast$7 = async () => {
|
|
1875
1913
|
await invoke('ActivityBar.focusLast');
|
|
1876
1914
|
};
|
|
1877
|
-
const focusNext$
|
|
1915
|
+
const focusNext$9 = async () => {
|
|
1878
1916
|
await invoke('ActivityBar.focusNext');
|
|
1879
1917
|
};
|
|
1880
|
-
const focusPrevious$
|
|
1918
|
+
const focusPrevious$8 = async () => {
|
|
1881
1919
|
await invoke('ActivityBar.focusPrevious');
|
|
1882
1920
|
};
|
|
1883
1921
|
const handleClick$4 = async index => {
|
|
@@ -1904,10 +1942,10 @@ const resize = async dimensions => {
|
|
|
1904
1942
|
|
|
1905
1943
|
const ActivityBar = {
|
|
1906
1944
|
focus: focus$2,
|
|
1907
|
-
focusFirst: focusFirst$
|
|
1908
|
-
focusLast: focusLast$
|
|
1909
|
-
focusNext: focusNext$
|
|
1910
|
-
focusPrevious: focusPrevious$
|
|
1945
|
+
focusFirst: focusFirst$8,
|
|
1946
|
+
focusLast: focusLast$7,
|
|
1947
|
+
focusNext: focusNext$9,
|
|
1948
|
+
focusPrevious: focusPrevious$8,
|
|
1911
1949
|
handleClick: handleClick$4,
|
|
1912
1950
|
handleClickSettings: handleClickSettings$1,
|
|
1913
1951
|
handleContextMenu: handleContextMenu$5,
|
|
@@ -1924,8 +1962,13 @@ const execute$1 = async (id, ...args) => {
|
|
|
1924
1962
|
return invoke(id, ...args);
|
|
1925
1963
|
};
|
|
1926
1964
|
const executeExtensionCommand = async (commandId, ...args) => {
|
|
1927
|
-
|
|
1928
|
-
|
|
1965
|
+
try {
|
|
1966
|
+
return await invoke$2('Extensions.executeExtensionCommand', commandId, ...args);
|
|
1967
|
+
} catch {
|
|
1968
|
+
// legacy
|
|
1969
|
+
// TODO maybe ask extension-management-worker instead
|
|
1970
|
+
return invoke('ExtensionHost.executeCommand', commandId, ...args);
|
|
1971
|
+
}
|
|
1929
1972
|
};
|
|
1930
1973
|
|
|
1931
1974
|
const Command = {
|
|
@@ -2282,7 +2325,7 @@ class ChatDebugShouldHavePayloadError extends Error {
|
|
|
2282
2325
|
}
|
|
2283
2326
|
}
|
|
2284
2327
|
|
|
2285
|
-
const open$
|
|
2328
|
+
const open$b = async sessionId => {
|
|
2286
2329
|
await invoke('Main.openUri', `chat-debug://${sessionId}`);
|
|
2287
2330
|
};
|
|
2288
2331
|
const open2 = async ({
|
|
@@ -2453,7 +2496,7 @@ const ChatDebug = {
|
|
|
2453
2496
|
handleTimelinePointerDown,
|
|
2454
2497
|
handleTimelinePointerMove,
|
|
2455
2498
|
handleTimelinePointerUp,
|
|
2456
|
-
open: open$
|
|
2499
|
+
open: open$b,
|
|
2457
2500
|
open2,
|
|
2458
2501
|
openTab,
|
|
2459
2502
|
openTabHeaders,
|
|
@@ -2679,6 +2722,9 @@ const serializeForError = value => {
|
|
|
2679
2722
|
const openUri = async uri => {
|
|
2680
2723
|
await invoke('Main.openUri', uri);
|
|
2681
2724
|
};
|
|
2725
|
+
const openInput = async options => {
|
|
2726
|
+
await invoke('Main.openInput', options);
|
|
2727
|
+
};
|
|
2682
2728
|
const saveState = async uid => {
|
|
2683
2729
|
return invoke('Main.saveState', uid);
|
|
2684
2730
|
};
|
|
@@ -2740,19 +2786,19 @@ const save = async () => {
|
|
|
2740
2786
|
const saveAll = async () => {
|
|
2741
2787
|
await invoke('Main.saveAll');
|
|
2742
2788
|
};
|
|
2743
|
-
const focusFirst$
|
|
2789
|
+
const focusFirst$7 = async () => {
|
|
2744
2790
|
await invoke('Main.focusFirst');
|
|
2745
2791
|
};
|
|
2746
|
-
const focusNext$
|
|
2792
|
+
const focusNext$8 = async () => {
|
|
2747
2793
|
await invoke('Main.focusNext');
|
|
2748
2794
|
};
|
|
2749
|
-
const focusPrevious$
|
|
2795
|
+
const focusPrevious$7 = async () => {
|
|
2750
2796
|
await invoke('Main.focusPrevious');
|
|
2751
2797
|
};
|
|
2752
2798
|
const handleClickCloseTab = async (rawGroupIndex, rawIndex) => {
|
|
2753
2799
|
await invoke('Main.handleClickCloseTab', rawGroupIndex, rawIndex);
|
|
2754
2800
|
};
|
|
2755
|
-
const focusLast$
|
|
2801
|
+
const focusLast$6 = async () => {
|
|
2756
2802
|
await invoke('Main.focusLast');
|
|
2757
2803
|
};
|
|
2758
2804
|
const handleTabContextMenu = async (button, x, y) => {
|
|
@@ -2773,15 +2819,16 @@ const Main = {
|
|
|
2773
2819
|
closeTabsRight,
|
|
2774
2820
|
copyPath: copyPath$2,
|
|
2775
2821
|
copyRelativePath: copyRelativePath$1,
|
|
2776
|
-
focusFirst: focusFirst$
|
|
2777
|
-
focusLast: focusLast$
|
|
2778
|
-
focusNext: focusNext$
|
|
2779
|
-
focusPrevious: focusPrevious$
|
|
2822
|
+
focusFirst: focusFirst$7,
|
|
2823
|
+
focusLast: focusLast$6,
|
|
2824
|
+
focusNext: focusNext$8,
|
|
2825
|
+
focusPrevious: focusPrevious$7,
|
|
2780
2826
|
handleClickAction,
|
|
2781
2827
|
handleClickCloseTab,
|
|
2782
2828
|
handleClickTogglePreview,
|
|
2783
2829
|
handleModifiedStatusChange,
|
|
2784
2830
|
handleTabContextMenu,
|
|
2831
|
+
openInput,
|
|
2785
2832
|
openKeyBindings,
|
|
2786
2833
|
openUri,
|
|
2787
2834
|
save,
|
|
@@ -2793,7 +2840,7 @@ const Main = {
|
|
|
2793
2840
|
splitRight
|
|
2794
2841
|
};
|
|
2795
2842
|
|
|
2796
|
-
const open$
|
|
2843
|
+
const open$a = async (leftUri, rightUri) => {
|
|
2797
2844
|
await openUri(`diff://${leftUri}<->${rightUri}`);
|
|
2798
2845
|
};
|
|
2799
2846
|
const shouldHaveContentLeft = async expectedContent => {
|
|
@@ -2871,7 +2918,7 @@ const DiffView = {
|
|
|
2871
2918
|
handleScrollBarPointerUp,
|
|
2872
2919
|
handleWheel: handleWheel$3,
|
|
2873
2920
|
handleWorkspaceChange,
|
|
2874
|
-
open: open$
|
|
2921
|
+
open: open$a,
|
|
2875
2922
|
setCursorPosition,
|
|
2876
2923
|
setDiffMode,
|
|
2877
2924
|
setFontFamily,
|
|
@@ -3196,7 +3243,7 @@ const copy$1 = async () => {
|
|
|
3196
3243
|
const closeColorPicker = async () => {
|
|
3197
3244
|
await invoke('Editor.closeColorPicker');
|
|
3198
3245
|
};
|
|
3199
|
-
const openContextMenu$
|
|
3246
|
+
const openContextMenu$2 = async () => {
|
|
3200
3247
|
const button = 0;
|
|
3201
3248
|
const x = 0;
|
|
3202
3249
|
const y = 0;
|
|
@@ -3345,7 +3392,7 @@ const Editor = {
|
|
|
3345
3392
|
openColorPicker,
|
|
3346
3393
|
openCompletion,
|
|
3347
3394
|
openCompletionDetails,
|
|
3348
|
-
openContextMenu: openContextMenu$
|
|
3395
|
+
openContextMenu: openContextMenu$2,
|
|
3349
3396
|
openEditorContextMenu,
|
|
3350
3397
|
openFind,
|
|
3351
3398
|
openFindWidget,
|
|
@@ -3457,7 +3504,7 @@ const EditorSourceAction = {
|
|
|
3457
3504
|
selectIndex: selectIndex$5
|
|
3458
3505
|
};
|
|
3459
3506
|
|
|
3460
|
-
const openContextMenu = async index => {
|
|
3507
|
+
const openContextMenu$1 = async index => {
|
|
3461
3508
|
await invoke('Explorer.handleContextMenuKeyboard', index);
|
|
3462
3509
|
};
|
|
3463
3510
|
const handleDragLeave = async () => {
|
|
@@ -3481,7 +3528,7 @@ const focus$1 = async () => {
|
|
|
3481
3528
|
const setDeltaY = async deltaY => {
|
|
3482
3529
|
await invoke('Explorer.setDeltaY', deltaY);
|
|
3483
3530
|
};
|
|
3484
|
-
const focusNext$
|
|
3531
|
+
const focusNext$7 = async () => {
|
|
3485
3532
|
await invoke('Explorer.focusNext');
|
|
3486
3533
|
};
|
|
3487
3534
|
const selectUp = async () => {
|
|
@@ -3493,10 +3540,10 @@ const handleDragOverIndex = async index => {
|
|
|
3493
3540
|
const selectDown = async () => {
|
|
3494
3541
|
await invoke('Explorer.selectDown');
|
|
3495
3542
|
};
|
|
3496
|
-
const collapseAll$
|
|
3543
|
+
const collapseAll$3 = async () => {
|
|
3497
3544
|
await invoke('Explorer.collapseAll');
|
|
3498
3545
|
};
|
|
3499
|
-
const refresh$
|
|
3546
|
+
const refresh$2 = async () => {
|
|
3500
3547
|
await invoke('Explorer.refresh');
|
|
3501
3548
|
};
|
|
3502
3549
|
const focusIndex$5 = async index => {
|
|
@@ -3505,13 +3552,13 @@ const focusIndex$5 = async index => {
|
|
|
3505
3552
|
const clickCurrent = async () => {
|
|
3506
3553
|
await invoke('Explorer.handleClickCurrent');
|
|
3507
3554
|
};
|
|
3508
|
-
const handleArrowLeft$
|
|
3555
|
+
const handleArrowLeft$2 = async () => {
|
|
3509
3556
|
await invoke('Explorer.handleArrowLeft');
|
|
3510
3557
|
};
|
|
3511
|
-
const focusLast$
|
|
3558
|
+
const focusLast$5 = async () => {
|
|
3512
3559
|
await invoke('Explorer.focusLast');
|
|
3513
3560
|
};
|
|
3514
|
-
const focusFirst$
|
|
3561
|
+
const focusFirst$6 = async () => {
|
|
3515
3562
|
await invoke('Explorer.focusFirst');
|
|
3516
3563
|
};
|
|
3517
3564
|
const removeDirent = async () => {
|
|
@@ -3559,7 +3606,7 @@ const acceptEdit = async () => {
|
|
|
3559
3606
|
const updateEditingValue = async value => {
|
|
3560
3607
|
await invoke('Explorer.updateEditingValue', value);
|
|
3561
3608
|
};
|
|
3562
|
-
const expandAll = async () => {
|
|
3609
|
+
const expandAll$1 = async () => {
|
|
3563
3610
|
await invoke('Explorer.expandAll');
|
|
3564
3611
|
};
|
|
3565
3612
|
const handleDragOver = async (x, y) => {
|
|
@@ -3585,17 +3632,17 @@ const Explorer = {
|
|
|
3585
3632
|
acceptEdit,
|
|
3586
3633
|
cancelEdit,
|
|
3587
3634
|
clickCurrent,
|
|
3588
|
-
collapseAll: collapseAll$
|
|
3635
|
+
collapseAll: collapseAll$3,
|
|
3589
3636
|
copyPath: copyPath$1,
|
|
3590
3637
|
copyRelativePath,
|
|
3591
|
-
expandAll,
|
|
3638
|
+
expandAll: expandAll$1,
|
|
3592
3639
|
expandRecursively,
|
|
3593
3640
|
focus: focus$1,
|
|
3594
|
-
focusFirst: focusFirst$
|
|
3641
|
+
focusFirst: focusFirst$6,
|
|
3595
3642
|
focusIndex: focusIndex$5,
|
|
3596
|
-
focusLast: focusLast$
|
|
3597
|
-
focusNext: focusNext$
|
|
3598
|
-
handleArrowLeft: handleArrowLeft$
|
|
3643
|
+
focusLast: focusLast$5,
|
|
3644
|
+
focusNext: focusNext$7,
|
|
3645
|
+
handleArrowLeft: handleArrowLeft$2,
|
|
3599
3646
|
handleBlur,
|
|
3600
3647
|
handleClick: handleClick$3,
|
|
3601
3648
|
handleClickAt: handleClickAt$2,
|
|
@@ -3611,8 +3658,8 @@ const Explorer = {
|
|
|
3611
3658
|
handlePaste,
|
|
3612
3659
|
newFile,
|
|
3613
3660
|
newFolder,
|
|
3614
|
-
openContextMenu,
|
|
3615
|
-
refresh: refresh$
|
|
3661
|
+
openContextMenu: openContextMenu$1,
|
|
3662
|
+
refresh: refresh$2,
|
|
3616
3663
|
removeDirent,
|
|
3617
3664
|
rename,
|
|
3618
3665
|
renameDirent,
|
|
@@ -3637,6 +3684,12 @@ const executeFormattingProvider = async (textDocument, ...args) => {
|
|
|
3637
3684
|
const executeCompletionProvider = async (textDocument, ...args) => {
|
|
3638
3685
|
return invoke$2('Extensions.executeCompletionProvider', textDocument, ...args);
|
|
3639
3686
|
};
|
|
3687
|
+
const enableWorkspace = async id => {
|
|
3688
|
+
await invoke$2('Extensions.enableWorkspace', id);
|
|
3689
|
+
};
|
|
3690
|
+
const disableWorkspace = async id => {
|
|
3691
|
+
await invoke$2('Extensions.disableWorkspace', id);
|
|
3692
|
+
};
|
|
3640
3693
|
const addNodeExtension = async relativePath => {
|
|
3641
3694
|
// TODO compute absolutePath
|
|
3642
3695
|
const absolutePath = relativePath;
|
|
@@ -3646,6 +3699,8 @@ const addNodeExtension = async relativePath => {
|
|
|
3646
3699
|
const Extension = {
|
|
3647
3700
|
addNodeExtension,
|
|
3648
3701
|
addWebExtension,
|
|
3702
|
+
disableWorkspace,
|
|
3703
|
+
enableWorkspace,
|
|
3649
3704
|
executeCompletionProvider,
|
|
3650
3705
|
executeFormattingProvider
|
|
3651
3706
|
};
|
|
@@ -3689,7 +3744,7 @@ const focusNextTab = async () => {
|
|
|
3689
3744
|
const focusPreviousTab = async () => {
|
|
3690
3745
|
await invoke('ExtensionDetail.focusPreviousTab');
|
|
3691
3746
|
};
|
|
3692
|
-
const open$
|
|
3747
|
+
const open$9 = extensionId => {
|
|
3693
3748
|
const uri = `extension-detail://${extensionId}`;
|
|
3694
3749
|
return invoke('Main.openUri', uri);
|
|
3695
3750
|
};
|
|
@@ -3744,7 +3799,7 @@ const ExtensionDetail = {
|
|
|
3744
3799
|
handleScroll: handleScroll$1,
|
|
3745
3800
|
handleTabFocus,
|
|
3746
3801
|
hideSizeLink,
|
|
3747
|
-
open: open$
|
|
3802
|
+
open: open$9,
|
|
3748
3803
|
openCommands,
|
|
3749
3804
|
openFeature,
|
|
3750
3805
|
openJsonValidation,
|
|
@@ -3759,7 +3814,7 @@ const ExtensionDetail = {
|
|
|
3759
3814
|
selectTab: selectTab$1
|
|
3760
3815
|
};
|
|
3761
3816
|
|
|
3762
|
-
const open$
|
|
3817
|
+
const open$8 = async id => {
|
|
3763
3818
|
await invoke('SideBar.openViewlet', id);
|
|
3764
3819
|
};
|
|
3765
3820
|
const hide = async () => {
|
|
@@ -3768,11 +3823,11 @@ const hide = async () => {
|
|
|
3768
3823
|
|
|
3769
3824
|
const SideBar = {
|
|
3770
3825
|
hide,
|
|
3771
|
-
open: open$
|
|
3826
|
+
open: open$8
|
|
3772
3827
|
};
|
|
3773
3828
|
|
|
3774
|
-
const open$
|
|
3775
|
-
await open$
|
|
3829
|
+
const open$7 = async () => {
|
|
3830
|
+
await open$8('Extensions');
|
|
3776
3831
|
};
|
|
3777
3832
|
const handleInput$5 = async value => {
|
|
3778
3833
|
await invoke('Extensions.handleInput', value, Script$1);
|
|
@@ -3795,6 +3850,9 @@ const copyExtensionId = async () => {
|
|
|
3795
3850
|
const clearSearchResults$1 = async () => {
|
|
3796
3851
|
await invoke('Extensions.clearSearchResults');
|
|
3797
3852
|
};
|
|
3853
|
+
const setExtensionStatus = async (id, status) => {
|
|
3854
|
+
await invoke('Extensions.setExtensionStatus', id, status);
|
|
3855
|
+
};
|
|
3798
3856
|
|
|
3799
3857
|
const ExtensionSearch = {
|
|
3800
3858
|
clearSearchResults: clearSearchResults$1,
|
|
@@ -3804,7 +3862,8 @@ const ExtensionSearch = {
|
|
|
3804
3862
|
handleClickFilter,
|
|
3805
3863
|
handleContextMenu: handleContextMenu$4,
|
|
3806
3864
|
handleInput: handleInput$5,
|
|
3807
|
-
open: open$
|
|
3865
|
+
open: open$7,
|
|
3866
|
+
setExtensionStatus
|
|
3808
3867
|
};
|
|
3809
3868
|
|
|
3810
3869
|
const Memfs = 'memfs';
|
|
@@ -4063,10 +4122,10 @@ const FileSystem = {
|
|
|
4063
4122
|
writeJson
|
|
4064
4123
|
};
|
|
4065
4124
|
|
|
4066
|
-
const focusNext$
|
|
4125
|
+
const focusNext$6 = async () => {
|
|
4067
4126
|
await invoke('FindWidget.focusNext');
|
|
4068
4127
|
};
|
|
4069
|
-
const focusPrevious$
|
|
4128
|
+
const focusPrevious$6 = async () => {
|
|
4070
4129
|
await invoke('FindWidget.focusPrevious');
|
|
4071
4130
|
};
|
|
4072
4131
|
const close$1 = async () => {
|
|
@@ -4112,9 +4171,9 @@ const focusPreviousElement = async () => {
|
|
|
4112
4171
|
const FindWidget = {
|
|
4113
4172
|
close: close$1,
|
|
4114
4173
|
focusElement,
|
|
4115
|
-
focusNext: focusNext$
|
|
4174
|
+
focusNext: focusNext$6,
|
|
4116
4175
|
focusNextElement,
|
|
4117
|
-
focusPrevious: focusPrevious$
|
|
4176
|
+
focusPrevious: focusPrevious$6,
|
|
4118
4177
|
focusPreviousElement,
|
|
4119
4178
|
replace,
|
|
4120
4179
|
replaceAll: replaceAll$1,
|
|
@@ -4183,7 +4242,7 @@ const unstash = async () => {
|
|
|
4183
4242
|
await executeExtensionCommand('git.unstash');
|
|
4184
4243
|
};
|
|
4185
4244
|
const applyStash = async () => {
|
|
4186
|
-
await executeExtensionCommand('git.
|
|
4245
|
+
await executeExtensionCommand('git.applyStash');
|
|
4187
4246
|
};
|
|
4188
4247
|
const checkout = async ref => {
|
|
4189
4248
|
await executeExtensionCommand('git.checkout', ref);
|
|
@@ -4266,8 +4325,23 @@ const shouldHaveCommit = async message => {
|
|
|
4266
4325
|
throw new Error(`Expected commit message to be "${message}", but got "${commits[0].message}"`);
|
|
4267
4326
|
}
|
|
4268
4327
|
};
|
|
4269
|
-
const shouldHaveInvocations = async
|
|
4270
|
-
|
|
4328
|
+
const shouldHaveInvocations = async expectedInvocations => {
|
|
4329
|
+
const response = await executeExtensionCommand('git.getInvocations');
|
|
4330
|
+
const actualInvocations = response && typeof response === 'object' && 'result' in response ? response.result : response;
|
|
4331
|
+
if (!Array.isArray(actualInvocations)) {
|
|
4332
|
+
throw new AssertionError(`expected git invocations to be an array but got ${JSON.stringify(actualInvocations)}`);
|
|
4333
|
+
}
|
|
4334
|
+
let actualIndex = 0;
|
|
4335
|
+
for (const expectedInvocation of expectedInvocations) {
|
|
4336
|
+
const expected = JSON.stringify(expectedInvocation);
|
|
4337
|
+
while (actualIndex < actualInvocations.length && JSON.stringify(actualInvocations[actualIndex]) !== expected) {
|
|
4338
|
+
actualIndex++;
|
|
4339
|
+
}
|
|
4340
|
+
if (actualIndex === actualInvocations.length) {
|
|
4341
|
+
throw new AssertionError(`expected git invocation ${expected} in ${JSON.stringify(actualInvocations)}`);
|
|
4342
|
+
}
|
|
4343
|
+
actualIndex++;
|
|
4344
|
+
}
|
|
4271
4345
|
};
|
|
4272
4346
|
|
|
4273
4347
|
const Git = {
|
|
@@ -4324,28 +4398,28 @@ const IconTheme = {
|
|
|
4324
4398
|
const selectIndex$4 = async index => {
|
|
4325
4399
|
return invoke('IframeInspector.selectIndex', index);
|
|
4326
4400
|
};
|
|
4327
|
-
const focusNext$
|
|
4401
|
+
const focusNext$5 = async () => {
|
|
4328
4402
|
return invoke('IframeInspector.focusNext');
|
|
4329
4403
|
};
|
|
4330
|
-
const focusPrevious$
|
|
4404
|
+
const focusPrevious$5 = async () => {
|
|
4331
4405
|
return invoke('IframeInspector.focusPrevious');
|
|
4332
4406
|
};
|
|
4333
|
-
const focusFirst$
|
|
4407
|
+
const focusFirst$5 = async () => {
|
|
4334
4408
|
return invoke('IframeInspector.focusFirst');
|
|
4335
4409
|
};
|
|
4336
|
-
const focusLast$
|
|
4410
|
+
const focusLast$4 = async () => {
|
|
4337
4411
|
return invoke('IframeInspector.focusLast');
|
|
4338
4412
|
};
|
|
4339
4413
|
|
|
4340
4414
|
const IframeInspector = {
|
|
4341
|
-
focusFirst: focusFirst$
|
|
4342
|
-
focusLast: focusLast$
|
|
4343
|
-
focusNext: focusNext$
|
|
4344
|
-
focusPrevious: focusPrevious$
|
|
4415
|
+
focusFirst: focusFirst$5,
|
|
4416
|
+
focusLast: focusLast$4,
|
|
4417
|
+
focusNext: focusNext$5,
|
|
4418
|
+
focusPrevious: focusPrevious$5,
|
|
4345
4419
|
selectIndex: selectIndex$4
|
|
4346
4420
|
};
|
|
4347
4421
|
|
|
4348
|
-
const open$
|
|
4422
|
+
const open$6 = async () => {
|
|
4349
4423
|
await invoke('Main.openUri', 'app://keybindings');
|
|
4350
4424
|
};
|
|
4351
4425
|
const handleInput$4 = value => {
|
|
@@ -4360,19 +4434,19 @@ const handleWheel$1 = (deltaMode, deltaY) => {
|
|
|
4360
4434
|
const handleDoubleClick = (x, y) => {
|
|
4361
4435
|
return invoke('KeyBindings.handleDoubleClick', x, y);
|
|
4362
4436
|
};
|
|
4363
|
-
const focusNext$
|
|
4437
|
+
const focusNext$4 = () => {
|
|
4364
4438
|
return invoke('KeyBindings.focusNext');
|
|
4365
4439
|
};
|
|
4366
|
-
const focusPrevious$
|
|
4440
|
+
const focusPrevious$4 = () => {
|
|
4367
4441
|
return invoke('KeyBindings.focusPrevious');
|
|
4368
4442
|
};
|
|
4369
|
-
const focusFirst$
|
|
4443
|
+
const focusFirst$4 = () => {
|
|
4370
4444
|
return invoke('KeyBindings.focusFirst');
|
|
4371
4445
|
};
|
|
4372
4446
|
const focusIndex$4 = index => {
|
|
4373
4447
|
return invoke('KeyBindings.focusIndex', index);
|
|
4374
4448
|
};
|
|
4375
|
-
const focusLast$
|
|
4449
|
+
const focusLast$3 = () => {
|
|
4376
4450
|
return invoke('KeyBindings.focusLast');
|
|
4377
4451
|
};
|
|
4378
4452
|
const toggleRecordingKeys = () => {
|
|
@@ -4421,17 +4495,17 @@ const KeyBindingsEditor = {
|
|
|
4421
4495
|
clearInput,
|
|
4422
4496
|
copyCommandId,
|
|
4423
4497
|
copyCommandTitle,
|
|
4424
|
-
focusFirst: focusFirst$
|
|
4498
|
+
focusFirst: focusFirst$4,
|
|
4425
4499
|
focusIndex: focusIndex$4,
|
|
4426
|
-
focusLast: focusLast$
|
|
4427
|
-
focusNext: focusNext$
|
|
4428
|
-
focusPrevious: focusPrevious$
|
|
4500
|
+
focusLast: focusLast$3,
|
|
4501
|
+
focusNext: focusNext$4,
|
|
4502
|
+
focusPrevious: focusPrevious$4,
|
|
4429
4503
|
handleClick: handleClick$1,
|
|
4430
4504
|
handleContextMenu: handleContextMenu$3,
|
|
4431
4505
|
handleDoubleClick,
|
|
4432
4506
|
handleInput: handleInput$4,
|
|
4433
4507
|
handleWheel: handleWheel$1,
|
|
4434
|
-
open: open$
|
|
4508
|
+
open: open$6,
|
|
4435
4509
|
removeKeyBinding,
|
|
4436
4510
|
resetKeyBinding,
|
|
4437
4511
|
showSameKeyBindings,
|
|
@@ -4502,7 +4576,7 @@ const KeyBoard = {
|
|
|
4502
4576
|
press
|
|
4503
4577
|
};
|
|
4504
4578
|
|
|
4505
|
-
const open$
|
|
4579
|
+
const open$5 = async () => {
|
|
4506
4580
|
await invoke('Main.openUri', 'language-models:///1');
|
|
4507
4581
|
};
|
|
4508
4582
|
const handleFilterInput$2 = async value => {
|
|
@@ -4522,7 +4596,7 @@ const LanguageModels = {
|
|
|
4522
4596
|
addModel,
|
|
4523
4597
|
clearFilterInput,
|
|
4524
4598
|
handleFilterInput: handleFilterInput$2,
|
|
4525
|
-
open: open$
|
|
4599
|
+
open: open$5,
|
|
4526
4600
|
removeModel
|
|
4527
4601
|
};
|
|
4528
4602
|
|
|
@@ -4532,6 +4606,9 @@ const showSideBar = async () => {
|
|
|
4532
4606
|
const hideSideBar = async () => {
|
|
4533
4607
|
await execute$1('Layout.hideSideBar');
|
|
4534
4608
|
};
|
|
4609
|
+
const getSideBarPosition = async () => {
|
|
4610
|
+
return execute$1('Layout.getSideBarPosition');
|
|
4611
|
+
};
|
|
4535
4612
|
const showSecondarySideBar = async () => {
|
|
4536
4613
|
await execute$1('Layout.showSecondarySideBar');
|
|
4537
4614
|
};
|
|
@@ -4543,6 +4620,7 @@ const handleWorkspaceRefresh = async () => {
|
|
|
4543
4620
|
};
|
|
4544
4621
|
|
|
4545
4622
|
const Layout = {
|
|
4623
|
+
getSideBarPosition,
|
|
4546
4624
|
handleWorkspaceRefresh,
|
|
4547
4625
|
hideSecondarySideBar,
|
|
4548
4626
|
hideSideBar,
|
|
@@ -4575,11 +4653,11 @@ const Open = {
|
|
|
4575
4653
|
shouldHaveUrl
|
|
4576
4654
|
};
|
|
4577
4655
|
|
|
4578
|
-
const open$
|
|
4656
|
+
const open$4 = async id => {
|
|
4579
4657
|
await invoke('Layout.showPanel', id);
|
|
4580
4658
|
};
|
|
4581
4659
|
const openProblems = async () => {
|
|
4582
|
-
await open$
|
|
4660
|
+
await open$4('Problems');
|
|
4583
4661
|
await invoke('Panel.selectIndex', 0);
|
|
4584
4662
|
};
|
|
4585
4663
|
const maximize = async () => {
|
|
@@ -4591,13 +4669,13 @@ const unmaximize = async () => {
|
|
|
4591
4669
|
|
|
4592
4670
|
const Panel = {
|
|
4593
4671
|
maximize,
|
|
4594
|
-
open: open$
|
|
4672
|
+
open: open$4,
|
|
4595
4673
|
openProblems,
|
|
4596
4674
|
unmaximize
|
|
4597
4675
|
};
|
|
4598
4676
|
|
|
4599
4677
|
const show$5 = async () => {
|
|
4600
|
-
await open$
|
|
4678
|
+
await open$4('Output');
|
|
4601
4679
|
await invoke('Panel.selectIndex', 1);
|
|
4602
4680
|
};
|
|
4603
4681
|
const handleFilterInput$1 = async text => {
|
|
@@ -4651,7 +4729,7 @@ const Platform = {
|
|
|
4651
4729
|
isFirefox
|
|
4652
4730
|
};
|
|
4653
4731
|
|
|
4654
|
-
const open$
|
|
4732
|
+
const open$3 = async uri => {
|
|
4655
4733
|
await invoke('Layout.showPreview', uri);
|
|
4656
4734
|
};
|
|
4657
4735
|
const handleClick = async hdId => {
|
|
@@ -4693,12 +4771,178 @@ const Preview = {
|
|
|
4693
4771
|
handleMouseDown,
|
|
4694
4772
|
handleMouseMove,
|
|
4695
4773
|
handleMouseUp,
|
|
4696
|
-
open: open$
|
|
4774
|
+
open: open$3,
|
|
4697
4775
|
setUri,
|
|
4698
4776
|
waitForClick,
|
|
4699
4777
|
waitForMutation
|
|
4700
4778
|
};
|
|
4701
4779
|
|
|
4780
|
+
const invokeOptionalIndex = async (command, index) => {
|
|
4781
|
+
if (index === undefined) {
|
|
4782
|
+
await invoke(command);
|
|
4783
|
+
return;
|
|
4784
|
+
}
|
|
4785
|
+
await invoke(command, index);
|
|
4786
|
+
};
|
|
4787
|
+
const open$2 = async () => {
|
|
4788
|
+
await invoke('Developer.openProcessExplorer');
|
|
4789
|
+
};
|
|
4790
|
+
const refresh$1 = async () => {
|
|
4791
|
+
await invoke('ProcessExplorer.refresh');
|
|
4792
|
+
};
|
|
4793
|
+
const collapseAll$2 = async () => {
|
|
4794
|
+
await invoke('ProcessExplorer.collapseAll');
|
|
4795
|
+
};
|
|
4796
|
+
const expandAll = async () => {
|
|
4797
|
+
await invoke('ProcessExplorer.expandAll');
|
|
4798
|
+
};
|
|
4799
|
+
const focusFirst$3 = async () => {
|
|
4800
|
+
await invoke('ProcessExplorer.focusFirst');
|
|
4801
|
+
};
|
|
4802
|
+
const focusLast$2 = async () => {
|
|
4803
|
+
await invoke('ProcessExplorer.focusLast');
|
|
4804
|
+
};
|
|
4805
|
+
const focusNext$3 = async () => {
|
|
4806
|
+
await invoke('ProcessExplorer.focusNext');
|
|
4807
|
+
};
|
|
4808
|
+
const focusPrevious$3 = async () => {
|
|
4809
|
+
await invoke('ProcessExplorer.focusPrevious');
|
|
4810
|
+
};
|
|
4811
|
+
const handleArrowLeft$1 = async () => {
|
|
4812
|
+
await invoke('ProcessExplorer.handleArrowLeft');
|
|
4813
|
+
};
|
|
4814
|
+
const handleArrowRight$1 = async () => {
|
|
4815
|
+
await invoke('ProcessExplorer.handleArrowRight');
|
|
4816
|
+
};
|
|
4817
|
+
const clickRow = async index => {
|
|
4818
|
+
await invoke('ProcessExplorer.handleClickAt', index);
|
|
4819
|
+
};
|
|
4820
|
+
const doubleClickRow = async index => {
|
|
4821
|
+
await invokeOptionalIndex('ProcessExplorer.handleDoubleClick', index);
|
|
4822
|
+
};
|
|
4823
|
+
const openContextMenu = async index => {
|
|
4824
|
+
await invokeOptionalIndex('ProcessExplorer.handleContextMenu', index);
|
|
4825
|
+
};
|
|
4826
|
+
const killProcess = async index => {
|
|
4827
|
+
await invokeOptionalIndex('ProcessExplorer.killProcess', index);
|
|
4828
|
+
};
|
|
4829
|
+
const debugProcess = async index => {
|
|
4830
|
+
await invokeOptionalIndex('ProcessExplorer.debugProcess', index);
|
|
4831
|
+
};
|
|
4832
|
+
const root = () => {
|
|
4833
|
+
return createLocator('.ProcessExplorer');
|
|
4834
|
+
};
|
|
4835
|
+
const table = () => {
|
|
4836
|
+
return createLocator('.ProcessExplorerTable');
|
|
4837
|
+
};
|
|
4838
|
+
const error = () => {
|
|
4839
|
+
return createLocator('.ProcessExplorerError');
|
|
4840
|
+
};
|
|
4841
|
+
const headerCell = index => {
|
|
4842
|
+
return root().locator('.ProcessExplorerHeaderCell').nth(index);
|
|
4843
|
+
};
|
|
4844
|
+
const nameHeader = () => {
|
|
4845
|
+
return headerCell(0);
|
|
4846
|
+
};
|
|
4847
|
+
const pidHeader = () => {
|
|
4848
|
+
return headerCell(1);
|
|
4849
|
+
};
|
|
4850
|
+
const memoryHeader = () => {
|
|
4851
|
+
return headerCell(2);
|
|
4852
|
+
};
|
|
4853
|
+
const rows = () => {
|
|
4854
|
+
return createLocator('.ProcessExplorerRow');
|
|
4855
|
+
};
|
|
4856
|
+
const row = index => {
|
|
4857
|
+
return rows().nth(index);
|
|
4858
|
+
};
|
|
4859
|
+
const focusedRow = () => {
|
|
4860
|
+
return createLocator('.ProcessExplorerRowFocused');
|
|
4861
|
+
};
|
|
4862
|
+
const expandedRow = () => {
|
|
4863
|
+
return createLocator('.ProcessExplorerRow[aria-expanded="true"]').first();
|
|
4864
|
+
};
|
|
4865
|
+
const collapsedRow = () => {
|
|
4866
|
+
return createLocator('.ProcessExplorerRow[aria-expanded="false"]').first();
|
|
4867
|
+
};
|
|
4868
|
+
const nameCell = index => {
|
|
4869
|
+
return row(index).locator('.ProcessExplorerNameCell');
|
|
4870
|
+
};
|
|
4871
|
+
const pidCell = index => {
|
|
4872
|
+
return row(index).locator('.ProcessExplorerCell').nth(1);
|
|
4873
|
+
};
|
|
4874
|
+
const memoryCell = index => {
|
|
4875
|
+
return row(index).locator('.ProcessExplorerCell').nth(2);
|
|
4876
|
+
};
|
|
4877
|
+
const shouldBeOpen = async () => {
|
|
4878
|
+
await expect$1(root()).toBeVisible();
|
|
4879
|
+
await expect$1(table()).toBeVisible();
|
|
4880
|
+
};
|
|
4881
|
+
const shouldBeHealthy = async () => {
|
|
4882
|
+
await expect$1(table()).toBeVisible();
|
|
4883
|
+
await expect$1(error()).toBeHidden();
|
|
4884
|
+
};
|
|
4885
|
+
const shouldHaveHeaders = async () => {
|
|
4886
|
+
await expect$1(nameHeader()).toHaveText('Name');
|
|
4887
|
+
await expect$1(pidHeader()).toHaveText('PID');
|
|
4888
|
+
await expect$1(memoryHeader()).toHaveText('Memory');
|
|
4889
|
+
};
|
|
4890
|
+
const shouldHaveRow = async (index = 0) => {
|
|
4891
|
+
await expect$1(row(index)).toBeVisible();
|
|
4892
|
+
await expect$1(nameCell(index)).toBeVisible();
|
|
4893
|
+
await expect$1(pidCell(index)).toBeVisible();
|
|
4894
|
+
await expect$1(memoryCell(index)).toBeVisible();
|
|
4895
|
+
};
|
|
4896
|
+
const shouldHaveFocusedRow = async () => {
|
|
4897
|
+
await expect$1(focusedRow()).toBeVisible();
|
|
4898
|
+
};
|
|
4899
|
+
const shouldHaveCollapsedRow = async () => {
|
|
4900
|
+
await expect$1(collapsedRow()).toBeVisible();
|
|
4901
|
+
};
|
|
4902
|
+
const shouldHaveExpandedRow = async () => {
|
|
4903
|
+
await expect$1(expandedRow()).toBeVisible();
|
|
4904
|
+
};
|
|
4905
|
+
|
|
4906
|
+
const ProcessExplorer = {
|
|
4907
|
+
clickRow,
|
|
4908
|
+
collapseAll: collapseAll$2,
|
|
4909
|
+
collapsedRow,
|
|
4910
|
+
debugProcess,
|
|
4911
|
+
doubleClickRow,
|
|
4912
|
+
error,
|
|
4913
|
+
expandAll,
|
|
4914
|
+
expandedRow,
|
|
4915
|
+
focusFirst: focusFirst$3,
|
|
4916
|
+
focusLast: focusLast$2,
|
|
4917
|
+
focusNext: focusNext$3,
|
|
4918
|
+
focusPrevious: focusPrevious$3,
|
|
4919
|
+
focusedRow,
|
|
4920
|
+
handleArrowLeft: handleArrowLeft$1,
|
|
4921
|
+
handleArrowRight: handleArrowRight$1,
|
|
4922
|
+
headerCell,
|
|
4923
|
+
killProcess,
|
|
4924
|
+
memoryCell,
|
|
4925
|
+
memoryHeader,
|
|
4926
|
+
nameCell,
|
|
4927
|
+
nameHeader,
|
|
4928
|
+
open: open$2,
|
|
4929
|
+
openContextMenu,
|
|
4930
|
+
pidCell,
|
|
4931
|
+
pidHeader,
|
|
4932
|
+
refresh: refresh$1,
|
|
4933
|
+
root,
|
|
4934
|
+
row,
|
|
4935
|
+
rows,
|
|
4936
|
+
shouldBeHealthy,
|
|
4937
|
+
shouldBeOpen,
|
|
4938
|
+
shouldHaveCollapsedRow,
|
|
4939
|
+
shouldHaveExpandedRow,
|
|
4940
|
+
shouldHaveFocusedRow,
|
|
4941
|
+
shouldHaveHeaders,
|
|
4942
|
+
shouldHaveRow,
|
|
4943
|
+
table
|
|
4944
|
+
};
|
|
4945
|
+
|
|
4702
4946
|
const show$4 = async () => {
|
|
4703
4947
|
await invoke('Panel.selectIndex', 0);
|
|
4704
4948
|
};
|
|
@@ -4864,7 +5108,7 @@ const References = {
|
|
|
4864
5108
|
};
|
|
4865
5109
|
|
|
4866
5110
|
const show$3 = async () => {
|
|
4867
|
-
await open$
|
|
5111
|
+
await open$8('Run And Debug');
|
|
4868
5112
|
};
|
|
4869
5113
|
const handleClickSectionBreakPoints = async () => {
|
|
4870
5114
|
await invoke('Run And Debug.handleClickSectionBreakPoints');
|
|
@@ -4908,7 +5152,7 @@ const RunAndDebug = {
|
|
|
4908
5152
|
};
|
|
4909
5153
|
|
|
4910
5154
|
const show$2 = async () => {
|
|
4911
|
-
await open$
|
|
5155
|
+
await open$8('Search');
|
|
4912
5156
|
};
|
|
4913
5157
|
const setValue = async value => {
|
|
4914
5158
|
await invoke('Search.handleInput', value, Script);
|
|
@@ -5135,7 +5379,7 @@ const handleContextMenu$1 = async (button, x, y) => {
|
|
|
5135
5379
|
await invoke('Source Control.handleContextMenu', button, x, y);
|
|
5136
5380
|
};
|
|
5137
5381
|
const show = async () => {
|
|
5138
|
-
await open$
|
|
5382
|
+
await open$8('Source Control');
|
|
5139
5383
|
};
|
|
5140
5384
|
|
|
5141
5385
|
const SourceControl = {
|
|
@@ -5414,6 +5658,7 @@ const createApi = (platform, assetDir) => {
|
|
|
5414
5658
|
Platform,
|
|
5415
5659
|
Preview,
|
|
5416
5660
|
Problems,
|
|
5661
|
+
ProcessExplorer,
|
|
5417
5662
|
QuickPick,
|
|
5418
5663
|
References,
|
|
5419
5664
|
RunAndDebug,
|
|
@@ -5576,6 +5821,40 @@ const importTest = async url => {
|
|
|
5576
5821
|
}
|
|
5577
5822
|
};
|
|
5578
5823
|
|
|
5824
|
+
const includes = (userAgent, value) => {
|
|
5825
|
+
return userAgent.includes(value);
|
|
5826
|
+
};
|
|
5827
|
+
const getBrowserNameFromUserAgent = userAgent => {
|
|
5828
|
+
const normalized = userAgent.toLowerCase();
|
|
5829
|
+
if (includes(normalized, 'firefox')) {
|
|
5830
|
+
return 'firefox';
|
|
5831
|
+
}
|
|
5832
|
+
if (includes(normalized, 'chrome') || includes(normalized, 'chromium') || includes(normalized, 'edg')) {
|
|
5833
|
+
return 'chromium';
|
|
5834
|
+
}
|
|
5835
|
+
if (includes(normalized, 'safari') || includes(normalized, 'applewebkit')) {
|
|
5836
|
+
return 'webkit';
|
|
5837
|
+
}
|
|
5838
|
+
return 'unknown';
|
|
5839
|
+
};
|
|
5840
|
+
const getBrowserName = () => {
|
|
5841
|
+
if (typeof navigator === 'undefined') {
|
|
5842
|
+
return 'unknown';
|
|
5843
|
+
}
|
|
5844
|
+
return getBrowserNameFromUserAgent(navigator.userAgent);
|
|
5845
|
+
};
|
|
5846
|
+
|
|
5847
|
+
const shouldSkipTestWithBrowserName = (skip, browserName) => {
|
|
5848
|
+
if (Array.isArray(skip)) {
|
|
5849
|
+
return skip.includes(browserName);
|
|
5850
|
+
}
|
|
5851
|
+
return Boolean(skip);
|
|
5852
|
+
};
|
|
5853
|
+
const shouldSkipTest = skip => {
|
|
5854
|
+
const browserName = getBrowserName();
|
|
5855
|
+
return shouldSkipTestWithBrowserName(skip, browserName);
|
|
5856
|
+
};
|
|
5857
|
+
|
|
5579
5858
|
const state = {
|
|
5580
5859
|
items: []
|
|
5581
5860
|
};
|
|
@@ -5661,7 +5940,7 @@ const executeAllTest = async (item, globals) => {
|
|
|
5661
5940
|
if (mockRpc) {
|
|
5662
5941
|
setMockRpc(mockRpc);
|
|
5663
5942
|
}
|
|
5664
|
-
if (skip) {
|
|
5943
|
+
if (shouldSkipTest(skip)) {
|
|
5665
5944
|
return getSkippedResult(item.name);
|
|
5666
5945
|
}
|
|
5667
5946
|
if (!test) {
|
|
@@ -5744,7 +6023,7 @@ const execute = async (href, platform, assetDir) => {
|
|
|
5744
6023
|
setMockRpc(mockRpc);
|
|
5745
6024
|
}
|
|
5746
6025
|
if (test) {
|
|
5747
|
-
if (skip) {
|
|
6026
|
+
if (shouldSkipTest(skip)) {
|
|
5748
6027
|
await skipTest(name);
|
|
5749
6028
|
} else {
|
|
5750
6029
|
await executeTest(name, test, globals);
|
|
@@ -6206,6 +6485,7 @@ const commandMap = {
|
|
|
6206
6485
|
'Test.execute': execute,
|
|
6207
6486
|
'Test.executeAll': executeAll,
|
|
6208
6487
|
'Test.executeMock': executeMock,
|
|
6488
|
+
'Test.executeMockRpcFunction': executeMockRpcFunction,
|
|
6209
6489
|
'Test.tryAutoFix': tryAutoFix
|
|
6210
6490
|
};
|
|
6211
6491
|
|