@lvce-editor/test-worker 17.0.0 → 17.0.2
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 +94 -1
- package/dist/testWorkerMain.js +437 -155
- package/package.json +1 -1
package/dist/api.d.ts
CHANGED
|
@@ -157,12 +157,37 @@ export interface GitPushOptions {
|
|
|
157
157
|
readonly setUpstream?: readonly string[];
|
|
158
158
|
}
|
|
159
159
|
|
|
160
|
+
export interface GitInvocation {
|
|
161
|
+
readonly command: readonly string[];
|
|
162
|
+
readonly cwd: string;
|
|
163
|
+
}
|
|
164
|
+
|
|
160
165
|
export interface LayoutExpectation extends LayoutExpectationObject {
|
|
161
166
|
readonly activeGroupIndex?: number;
|
|
162
167
|
readonly direction?: LayoutDirection;
|
|
163
168
|
readonly groups?: readonly LayoutExpectationObject[];
|
|
164
169
|
}
|
|
165
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
|
+
|
|
166
191
|
export interface SelectItemOptions {
|
|
167
192
|
readonly waitUntil?: "done" | "quickPick" | "none";
|
|
168
193
|
}
|
|
@@ -198,6 +223,8 @@ export type DiffLayout = "horizontal" | "vertical";
|
|
|
198
223
|
|
|
199
224
|
export type TokenRow = readonly string[];
|
|
200
225
|
|
|
226
|
+
export type ExtensionStatus = "disabled" | "enabled" | "installing" | "not-installed" | "uninstalling";
|
|
227
|
+
|
|
201
228
|
export type LayoutDirection = "horizontal" | "vertical" | number;
|
|
202
229
|
|
|
203
230
|
export type LayoutExpectationValue = string | number | boolean | RegExp | null | readonly LayoutExpectationValue[] | LayoutExpectationObject;
|
|
@@ -221,6 +248,24 @@ export type SavedState = {
|
|
|
221
248
|
readonly layout?: LayoutState;
|
|
222
249
|
};
|
|
223
250
|
|
|
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
|
+
};
|
|
268
|
+
|
|
224
269
|
export type SearchInputType = "SearchValue" | "ReplaceValue" | "IncludeValue" | "ExcludeValue";
|
|
225
270
|
|
|
226
271
|
interface Workspace {
|
|
@@ -653,6 +698,7 @@ interface ExtensionSearch {
|
|
|
653
698
|
readonly handleContextMenu: (button: number, x: number, y: number) => Promise<void>;
|
|
654
699
|
readonly handleInput: (value: string) => Promise<void>;
|
|
655
700
|
readonly open: () => Promise<void>;
|
|
701
|
+
readonly setExtensionStatus: (id: string, status: ExtensionStatus) => Promise<void>;
|
|
656
702
|
}
|
|
657
703
|
|
|
658
704
|
interface FileSystem {
|
|
@@ -728,6 +774,7 @@ interface Git {
|
|
|
728
774
|
readonly setOrigin: (remoteUrl: string) => Promise<void>;
|
|
729
775
|
readonly setUpstream: (remoteUrl: string) => Promise<void>;
|
|
730
776
|
readonly shouldHaveCommit: (message: string) => Promise<void>;
|
|
777
|
+
readonly shouldHaveInvocations: (expectedInvocations: readonly GitInvocation[]) => Promise<void>;
|
|
731
778
|
readonly stage: (pathSpec: string) => Promise<void>;
|
|
732
779
|
readonly stash: (message?: string) => Promise<void>;
|
|
733
780
|
readonly status: () => Promise<unknown>;
|
|
@@ -787,6 +834,7 @@ interface LanguageModels {
|
|
|
787
834
|
}
|
|
788
835
|
|
|
789
836
|
interface Layout {
|
|
837
|
+
readonly getSideBarPosition: () => Promise<number>;
|
|
790
838
|
readonly handleWorkspaceRefresh: () => Promise<void>;
|
|
791
839
|
readonly hideSecondarySideBar: () => Promise<void>;
|
|
792
840
|
readonly hideSideBar: () => Promise<void>;
|
|
@@ -811,6 +859,7 @@ interface Main {
|
|
|
811
859
|
readonly handleClickTogglePreview: () => Promise<void>;
|
|
812
860
|
readonly handleModifiedStatusChange: (uri: string, newStatus: boolean) => Promise<void>;
|
|
813
861
|
readonly handleTabContextMenu: (button: number, x: number, y: number) => Promise<void>;
|
|
862
|
+
readonly openInput: (options: OpenInputOptions) => Promise<void>;
|
|
814
863
|
readonly openKeyBindings: () => Promise<void>;
|
|
815
864
|
readonly openUri: (uri: string) => Promise<void>;
|
|
816
865
|
readonly save: () => Promise<void>;
|
|
@@ -861,6 +910,46 @@ interface Preview {
|
|
|
861
910
|
readonly waitForMutation: () => Promise<void>;
|
|
862
911
|
}
|
|
863
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
|
+
|
|
864
953
|
interface Problems {
|
|
865
954
|
readonly copyMessage: () => Promise<void>;
|
|
866
955
|
readonly focusIndex: (index: number) => Promise<void>;
|
|
@@ -1065,6 +1154,7 @@ export interface TestApi {
|
|
|
1065
1154
|
readonly Panel: Panel
|
|
1066
1155
|
readonly Platform: Platform
|
|
1067
1156
|
readonly Preview: Preview
|
|
1157
|
+
readonly ProcessExplorer: ProcessExplorer
|
|
1068
1158
|
readonly Problems: Problems
|
|
1069
1159
|
readonly QuickPick: QuickPick
|
|
1070
1160
|
readonly References: References
|
|
@@ -1084,4 +1174,7 @@ export interface TestApi {
|
|
|
1084
1174
|
|
|
1085
1175
|
export interface Test {
|
|
1086
1176
|
(api: TestApi): Promise<void>
|
|
1087
|
-
}
|
|
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,
|
|
@@ -2287,7 +2325,7 @@ class ChatDebugShouldHavePayloadError extends Error {
|
|
|
2287
2325
|
}
|
|
2288
2326
|
}
|
|
2289
2327
|
|
|
2290
|
-
const open$
|
|
2328
|
+
const open$b = async sessionId => {
|
|
2291
2329
|
await invoke('Main.openUri', `chat-debug://${sessionId}`);
|
|
2292
2330
|
};
|
|
2293
2331
|
const open2 = async ({
|
|
@@ -2458,7 +2496,7 @@ const ChatDebug = {
|
|
|
2458
2496
|
handleTimelinePointerDown,
|
|
2459
2497
|
handleTimelinePointerMove,
|
|
2460
2498
|
handleTimelinePointerUp,
|
|
2461
|
-
open: open$
|
|
2499
|
+
open: open$b,
|
|
2462
2500
|
open2,
|
|
2463
2501
|
openTab,
|
|
2464
2502
|
openTabHeaders,
|
|
@@ -2684,6 +2722,9 @@ const serializeForError = value => {
|
|
|
2684
2722
|
const openUri = async uri => {
|
|
2685
2723
|
await invoke('Main.openUri', uri);
|
|
2686
2724
|
};
|
|
2725
|
+
const openInput = async options => {
|
|
2726
|
+
await invoke('Main.openInput', options);
|
|
2727
|
+
};
|
|
2687
2728
|
const saveState = async uid => {
|
|
2688
2729
|
return invoke('Main.saveState', uid);
|
|
2689
2730
|
};
|
|
@@ -2745,19 +2786,19 @@ const save = async () => {
|
|
|
2745
2786
|
const saveAll = async () => {
|
|
2746
2787
|
await invoke('Main.saveAll');
|
|
2747
2788
|
};
|
|
2748
|
-
const focusFirst$
|
|
2789
|
+
const focusFirst$7 = async () => {
|
|
2749
2790
|
await invoke('Main.focusFirst');
|
|
2750
2791
|
};
|
|
2751
|
-
const focusNext$
|
|
2792
|
+
const focusNext$8 = async () => {
|
|
2752
2793
|
await invoke('Main.focusNext');
|
|
2753
2794
|
};
|
|
2754
|
-
const focusPrevious$
|
|
2795
|
+
const focusPrevious$7 = async () => {
|
|
2755
2796
|
await invoke('Main.focusPrevious');
|
|
2756
2797
|
};
|
|
2757
2798
|
const handleClickCloseTab = async (rawGroupIndex, rawIndex) => {
|
|
2758
2799
|
await invoke('Main.handleClickCloseTab', rawGroupIndex, rawIndex);
|
|
2759
2800
|
};
|
|
2760
|
-
const focusLast$
|
|
2801
|
+
const focusLast$6 = async () => {
|
|
2761
2802
|
await invoke('Main.focusLast');
|
|
2762
2803
|
};
|
|
2763
2804
|
const handleTabContextMenu = async (button, x, y) => {
|
|
@@ -2778,15 +2819,16 @@ const Main = {
|
|
|
2778
2819
|
closeTabsRight,
|
|
2779
2820
|
copyPath: copyPath$2,
|
|
2780
2821
|
copyRelativePath: copyRelativePath$1,
|
|
2781
|
-
focusFirst: focusFirst$
|
|
2782
|
-
focusLast: focusLast$
|
|
2783
|
-
focusNext: focusNext$
|
|
2784
|
-
focusPrevious: focusPrevious$
|
|
2822
|
+
focusFirst: focusFirst$7,
|
|
2823
|
+
focusLast: focusLast$6,
|
|
2824
|
+
focusNext: focusNext$8,
|
|
2825
|
+
focusPrevious: focusPrevious$7,
|
|
2785
2826
|
handleClickAction,
|
|
2786
2827
|
handleClickCloseTab,
|
|
2787
2828
|
handleClickTogglePreview,
|
|
2788
2829
|
handleModifiedStatusChange,
|
|
2789
2830
|
handleTabContextMenu,
|
|
2831
|
+
openInput,
|
|
2790
2832
|
openKeyBindings,
|
|
2791
2833
|
openUri,
|
|
2792
2834
|
save,
|
|
@@ -2798,7 +2840,7 @@ const Main = {
|
|
|
2798
2840
|
splitRight
|
|
2799
2841
|
};
|
|
2800
2842
|
|
|
2801
|
-
const open$
|
|
2843
|
+
const open$a = async (leftUri, rightUri) => {
|
|
2802
2844
|
await openUri(`diff://${leftUri}<->${rightUri}`);
|
|
2803
2845
|
};
|
|
2804
2846
|
const shouldHaveContentLeft = async expectedContent => {
|
|
@@ -2876,7 +2918,7 @@ const DiffView = {
|
|
|
2876
2918
|
handleScrollBarPointerUp,
|
|
2877
2919
|
handleWheel: handleWheel$3,
|
|
2878
2920
|
handleWorkspaceChange,
|
|
2879
|
-
open: open$
|
|
2921
|
+
open: open$a,
|
|
2880
2922
|
setCursorPosition,
|
|
2881
2923
|
setDiffMode,
|
|
2882
2924
|
setFontFamily,
|
|
@@ -3201,7 +3243,7 @@ const copy$1 = async () => {
|
|
|
3201
3243
|
const closeColorPicker = async () => {
|
|
3202
3244
|
await invoke('Editor.closeColorPicker');
|
|
3203
3245
|
};
|
|
3204
|
-
const openContextMenu$
|
|
3246
|
+
const openContextMenu$2 = async () => {
|
|
3205
3247
|
const button = 0;
|
|
3206
3248
|
const x = 0;
|
|
3207
3249
|
const y = 0;
|
|
@@ -3350,7 +3392,7 @@ const Editor = {
|
|
|
3350
3392
|
openColorPicker,
|
|
3351
3393
|
openCompletion,
|
|
3352
3394
|
openCompletionDetails,
|
|
3353
|
-
openContextMenu: openContextMenu$
|
|
3395
|
+
openContextMenu: openContextMenu$2,
|
|
3354
3396
|
openEditorContextMenu,
|
|
3355
3397
|
openFind,
|
|
3356
3398
|
openFindWidget,
|
|
@@ -3462,7 +3504,7 @@ const EditorSourceAction = {
|
|
|
3462
3504
|
selectIndex: selectIndex$5
|
|
3463
3505
|
};
|
|
3464
3506
|
|
|
3465
|
-
const openContextMenu = async index => {
|
|
3507
|
+
const openContextMenu$1 = async index => {
|
|
3466
3508
|
await invoke('Explorer.handleContextMenuKeyboard', index);
|
|
3467
3509
|
};
|
|
3468
3510
|
const handleDragLeave = async () => {
|
|
@@ -3486,7 +3528,7 @@ const focus$1 = async () => {
|
|
|
3486
3528
|
const setDeltaY = async deltaY => {
|
|
3487
3529
|
await invoke('Explorer.setDeltaY', deltaY);
|
|
3488
3530
|
};
|
|
3489
|
-
const focusNext$
|
|
3531
|
+
const focusNext$7 = async () => {
|
|
3490
3532
|
await invoke('Explorer.focusNext');
|
|
3491
3533
|
};
|
|
3492
3534
|
const selectUp = async () => {
|
|
@@ -3498,10 +3540,10 @@ const handleDragOverIndex = async index => {
|
|
|
3498
3540
|
const selectDown = async () => {
|
|
3499
3541
|
await invoke('Explorer.selectDown');
|
|
3500
3542
|
};
|
|
3501
|
-
const collapseAll$
|
|
3543
|
+
const collapseAll$3 = async () => {
|
|
3502
3544
|
await invoke('Explorer.collapseAll');
|
|
3503
3545
|
};
|
|
3504
|
-
const refresh$
|
|
3546
|
+
const refresh$2 = async () => {
|
|
3505
3547
|
await invoke('Explorer.refresh');
|
|
3506
3548
|
};
|
|
3507
3549
|
const focusIndex$5 = async index => {
|
|
@@ -3510,13 +3552,13 @@ const focusIndex$5 = async index => {
|
|
|
3510
3552
|
const clickCurrent = async () => {
|
|
3511
3553
|
await invoke('Explorer.handleClickCurrent');
|
|
3512
3554
|
};
|
|
3513
|
-
const handleArrowLeft$
|
|
3555
|
+
const handleArrowLeft$2 = async () => {
|
|
3514
3556
|
await invoke('Explorer.handleArrowLeft');
|
|
3515
3557
|
};
|
|
3516
|
-
const focusLast$
|
|
3558
|
+
const focusLast$5 = async () => {
|
|
3517
3559
|
await invoke('Explorer.focusLast');
|
|
3518
3560
|
};
|
|
3519
|
-
const focusFirst$
|
|
3561
|
+
const focusFirst$6 = async () => {
|
|
3520
3562
|
await invoke('Explorer.focusFirst');
|
|
3521
3563
|
};
|
|
3522
3564
|
const removeDirent = async () => {
|
|
@@ -3564,7 +3606,7 @@ const acceptEdit = async () => {
|
|
|
3564
3606
|
const updateEditingValue = async value => {
|
|
3565
3607
|
await invoke('Explorer.updateEditingValue', value);
|
|
3566
3608
|
};
|
|
3567
|
-
const expandAll = async () => {
|
|
3609
|
+
const expandAll$1 = async () => {
|
|
3568
3610
|
await invoke('Explorer.expandAll');
|
|
3569
3611
|
};
|
|
3570
3612
|
const handleDragOver = async (x, y) => {
|
|
@@ -3590,17 +3632,17 @@ const Explorer = {
|
|
|
3590
3632
|
acceptEdit,
|
|
3591
3633
|
cancelEdit,
|
|
3592
3634
|
clickCurrent,
|
|
3593
|
-
collapseAll: collapseAll$
|
|
3635
|
+
collapseAll: collapseAll$3,
|
|
3594
3636
|
copyPath: copyPath$1,
|
|
3595
3637
|
copyRelativePath,
|
|
3596
|
-
expandAll,
|
|
3638
|
+
expandAll: expandAll$1,
|
|
3597
3639
|
expandRecursively,
|
|
3598
3640
|
focus: focus$1,
|
|
3599
|
-
focusFirst: focusFirst$
|
|
3641
|
+
focusFirst: focusFirst$6,
|
|
3600
3642
|
focusIndex: focusIndex$5,
|
|
3601
|
-
focusLast: focusLast$
|
|
3602
|
-
focusNext: focusNext$
|
|
3603
|
-
handleArrowLeft: handleArrowLeft$
|
|
3643
|
+
focusLast: focusLast$5,
|
|
3644
|
+
focusNext: focusNext$7,
|
|
3645
|
+
handleArrowLeft: handleArrowLeft$2,
|
|
3604
3646
|
handleBlur,
|
|
3605
3647
|
handleClick: handleClick$3,
|
|
3606
3648
|
handleClickAt: handleClickAt$2,
|
|
@@ -3616,8 +3658,8 @@ const Explorer = {
|
|
|
3616
3658
|
handlePaste,
|
|
3617
3659
|
newFile,
|
|
3618
3660
|
newFolder,
|
|
3619
|
-
openContextMenu,
|
|
3620
|
-
refresh: refresh$
|
|
3661
|
+
openContextMenu: openContextMenu$1,
|
|
3662
|
+
refresh: refresh$2,
|
|
3621
3663
|
removeDirent,
|
|
3622
3664
|
rename,
|
|
3623
3665
|
renameDirent,
|
|
@@ -3702,7 +3744,7 @@ const focusNextTab = async () => {
|
|
|
3702
3744
|
const focusPreviousTab = async () => {
|
|
3703
3745
|
await invoke('ExtensionDetail.focusPreviousTab');
|
|
3704
3746
|
};
|
|
3705
|
-
const open$
|
|
3747
|
+
const open$9 = extensionId => {
|
|
3706
3748
|
const uri = `extension-detail://${extensionId}`;
|
|
3707
3749
|
return invoke('Main.openUri', uri);
|
|
3708
3750
|
};
|
|
@@ -3757,7 +3799,7 @@ const ExtensionDetail = {
|
|
|
3757
3799
|
handleScroll: handleScroll$1,
|
|
3758
3800
|
handleTabFocus,
|
|
3759
3801
|
hideSizeLink,
|
|
3760
|
-
open: open$
|
|
3802
|
+
open: open$9,
|
|
3761
3803
|
openCommands,
|
|
3762
3804
|
openFeature,
|
|
3763
3805
|
openJsonValidation,
|
|
@@ -3772,7 +3814,7 @@ const ExtensionDetail = {
|
|
|
3772
3814
|
selectTab: selectTab$1
|
|
3773
3815
|
};
|
|
3774
3816
|
|
|
3775
|
-
const open$
|
|
3817
|
+
const open$8 = async id => {
|
|
3776
3818
|
await invoke('SideBar.openViewlet', id);
|
|
3777
3819
|
};
|
|
3778
3820
|
const hide = async () => {
|
|
@@ -3781,11 +3823,11 @@ const hide = async () => {
|
|
|
3781
3823
|
|
|
3782
3824
|
const SideBar = {
|
|
3783
3825
|
hide,
|
|
3784
|
-
open: open$
|
|
3826
|
+
open: open$8
|
|
3785
3827
|
};
|
|
3786
3828
|
|
|
3787
|
-
const open$
|
|
3788
|
-
await open$
|
|
3829
|
+
const open$7 = async () => {
|
|
3830
|
+
await open$8('Extensions');
|
|
3789
3831
|
};
|
|
3790
3832
|
const handleInput$5 = async value => {
|
|
3791
3833
|
await invoke('Extensions.handleInput', value, Script$1);
|
|
@@ -3808,6 +3850,9 @@ const copyExtensionId = async () => {
|
|
|
3808
3850
|
const clearSearchResults$1 = async () => {
|
|
3809
3851
|
await invoke('Extensions.clearSearchResults');
|
|
3810
3852
|
};
|
|
3853
|
+
const setExtensionStatus = async (id, status) => {
|
|
3854
|
+
await invoke('Extensions.setExtensionStatus', id, status);
|
|
3855
|
+
};
|
|
3811
3856
|
|
|
3812
3857
|
const ExtensionSearch = {
|
|
3813
3858
|
clearSearchResults: clearSearchResults$1,
|
|
@@ -3817,7 +3862,8 @@ const ExtensionSearch = {
|
|
|
3817
3862
|
handleClickFilter,
|
|
3818
3863
|
handleContextMenu: handleContextMenu$4,
|
|
3819
3864
|
handleInput: handleInput$5,
|
|
3820
|
-
open: open$
|
|
3865
|
+
open: open$7,
|
|
3866
|
+
setExtensionStatus
|
|
3821
3867
|
};
|
|
3822
3868
|
|
|
3823
3869
|
const Memfs = 'memfs';
|
|
@@ -3991,9 +4037,20 @@ const shouldHaveFile = async (uri, expectedContent) => {
|
|
|
3991
4037
|
const remove = async uri => {
|
|
3992
4038
|
await invoke('FileSystem.remove', uri);
|
|
3993
4039
|
};
|
|
4040
|
+
const windowsPathRegex = /^[A-Za-z]:\//;
|
|
4041
|
+
const toFileUri = path => {
|
|
4042
|
+
if (path.startsWith('file://')) {
|
|
4043
|
+
return path;
|
|
4044
|
+
}
|
|
4045
|
+
const normalizedPath = path.replaceAll('\\', '/');
|
|
4046
|
+
if (windowsPathRegex.test(normalizedPath)) {
|
|
4047
|
+
return `file:///${normalizedPath}`;
|
|
4048
|
+
}
|
|
4049
|
+
return `file://${normalizedPath}`;
|
|
4050
|
+
};
|
|
3994
4051
|
const getTmpDirFileScheme = async () => {
|
|
3995
4052
|
const tmpFolder = await invoke('PlatformPaths.getTmpDir');
|
|
3996
|
-
const tmpUri = tmpFolder
|
|
4053
|
+
const tmpUri = toFileUri(tmpFolder);
|
|
3997
4054
|
const uri = `${tmpUri}/test-${Date.now()}`;
|
|
3998
4055
|
await mkdir(uri);
|
|
3999
4056
|
return uri;
|
|
@@ -4076,10 +4133,10 @@ const FileSystem = {
|
|
|
4076
4133
|
writeJson
|
|
4077
4134
|
};
|
|
4078
4135
|
|
|
4079
|
-
const focusNext$
|
|
4136
|
+
const focusNext$6 = async () => {
|
|
4080
4137
|
await invoke('FindWidget.focusNext');
|
|
4081
4138
|
};
|
|
4082
|
-
const focusPrevious$
|
|
4139
|
+
const focusPrevious$6 = async () => {
|
|
4083
4140
|
await invoke('FindWidget.focusPrevious');
|
|
4084
4141
|
};
|
|
4085
4142
|
const close$1 = async () => {
|
|
@@ -4125,9 +4182,9 @@ const focusPreviousElement = async () => {
|
|
|
4125
4182
|
const FindWidget = {
|
|
4126
4183
|
close: close$1,
|
|
4127
4184
|
focusElement,
|
|
4128
|
-
focusNext: focusNext$
|
|
4185
|
+
focusNext: focusNext$6,
|
|
4129
4186
|
focusNextElement,
|
|
4130
|
-
focusPrevious: focusPrevious$
|
|
4187
|
+
focusPrevious: focusPrevious$6,
|
|
4131
4188
|
focusPreviousElement,
|
|
4132
4189
|
replace,
|
|
4133
4190
|
replaceAll: replaceAll$1,
|
|
@@ -4196,7 +4253,7 @@ const unstash = async () => {
|
|
|
4196
4253
|
await executeExtensionCommand('git.unstash');
|
|
4197
4254
|
};
|
|
4198
4255
|
const applyStash = async () => {
|
|
4199
|
-
await executeExtensionCommand('git.
|
|
4256
|
+
await executeExtensionCommand('git.applyStash');
|
|
4200
4257
|
};
|
|
4201
4258
|
const checkout = async ref => {
|
|
4202
4259
|
await executeExtensionCommand('git.checkout', ref);
|
|
@@ -4279,6 +4336,24 @@ const shouldHaveCommit = async message => {
|
|
|
4279
4336
|
throw new Error(`Expected commit message to be "${message}", but got "${commits[0].message}"`);
|
|
4280
4337
|
}
|
|
4281
4338
|
};
|
|
4339
|
+
const shouldHaveInvocations = async expectedInvocations => {
|
|
4340
|
+
const response = await executeExtensionCommand('git.getInvocations');
|
|
4341
|
+
const actualInvocations = response && typeof response === 'object' && 'result' in response ? response.result : response;
|
|
4342
|
+
if (!Array.isArray(actualInvocations)) {
|
|
4343
|
+
throw new AssertionError(`expected git invocations to be an array but got ${JSON.stringify(actualInvocations)}`);
|
|
4344
|
+
}
|
|
4345
|
+
let actualIndex = 0;
|
|
4346
|
+
for (const expectedInvocation of expectedInvocations) {
|
|
4347
|
+
const expected = JSON.stringify(expectedInvocation);
|
|
4348
|
+
while (actualIndex < actualInvocations.length && JSON.stringify(actualInvocations[actualIndex]) !== expected) {
|
|
4349
|
+
actualIndex++;
|
|
4350
|
+
}
|
|
4351
|
+
if (actualIndex === actualInvocations.length) {
|
|
4352
|
+
throw new AssertionError(`expected git invocation ${expected} in ${JSON.stringify(actualInvocations)}`);
|
|
4353
|
+
}
|
|
4354
|
+
actualIndex++;
|
|
4355
|
+
}
|
|
4356
|
+
};
|
|
4282
4357
|
|
|
4283
4358
|
const Git = {
|
|
4284
4359
|
add,
|
|
@@ -4314,6 +4389,7 @@ const Git = {
|
|
|
4314
4389
|
setOrigin,
|
|
4315
4390
|
setUpstream,
|
|
4316
4391
|
shouldHaveCommit,
|
|
4392
|
+
shouldHaveInvocations,
|
|
4317
4393
|
stage,
|
|
4318
4394
|
stash,
|
|
4319
4395
|
status,
|
|
@@ -4333,28 +4409,28 @@ const IconTheme = {
|
|
|
4333
4409
|
const selectIndex$4 = async index => {
|
|
4334
4410
|
return invoke('IframeInspector.selectIndex', index);
|
|
4335
4411
|
};
|
|
4336
|
-
const focusNext$
|
|
4412
|
+
const focusNext$5 = async () => {
|
|
4337
4413
|
return invoke('IframeInspector.focusNext');
|
|
4338
4414
|
};
|
|
4339
|
-
const focusPrevious$
|
|
4415
|
+
const focusPrevious$5 = async () => {
|
|
4340
4416
|
return invoke('IframeInspector.focusPrevious');
|
|
4341
4417
|
};
|
|
4342
|
-
const focusFirst$
|
|
4418
|
+
const focusFirst$5 = async () => {
|
|
4343
4419
|
return invoke('IframeInspector.focusFirst');
|
|
4344
4420
|
};
|
|
4345
|
-
const focusLast$
|
|
4421
|
+
const focusLast$4 = async () => {
|
|
4346
4422
|
return invoke('IframeInspector.focusLast');
|
|
4347
4423
|
};
|
|
4348
4424
|
|
|
4349
4425
|
const IframeInspector = {
|
|
4350
|
-
focusFirst: focusFirst$
|
|
4351
|
-
focusLast: focusLast$
|
|
4352
|
-
focusNext: focusNext$
|
|
4353
|
-
focusPrevious: focusPrevious$
|
|
4426
|
+
focusFirst: focusFirst$5,
|
|
4427
|
+
focusLast: focusLast$4,
|
|
4428
|
+
focusNext: focusNext$5,
|
|
4429
|
+
focusPrevious: focusPrevious$5,
|
|
4354
4430
|
selectIndex: selectIndex$4
|
|
4355
4431
|
};
|
|
4356
4432
|
|
|
4357
|
-
const open$
|
|
4433
|
+
const open$6 = async () => {
|
|
4358
4434
|
await invoke('Main.openUri', 'app://keybindings');
|
|
4359
4435
|
};
|
|
4360
4436
|
const handleInput$4 = value => {
|
|
@@ -4369,19 +4445,19 @@ const handleWheel$1 = (deltaMode, deltaY) => {
|
|
|
4369
4445
|
const handleDoubleClick = (x, y) => {
|
|
4370
4446
|
return invoke('KeyBindings.handleDoubleClick', x, y);
|
|
4371
4447
|
};
|
|
4372
|
-
const focusNext$
|
|
4448
|
+
const focusNext$4 = () => {
|
|
4373
4449
|
return invoke('KeyBindings.focusNext');
|
|
4374
4450
|
};
|
|
4375
|
-
const focusPrevious$
|
|
4451
|
+
const focusPrevious$4 = () => {
|
|
4376
4452
|
return invoke('KeyBindings.focusPrevious');
|
|
4377
4453
|
};
|
|
4378
|
-
const focusFirst$
|
|
4454
|
+
const focusFirst$4 = () => {
|
|
4379
4455
|
return invoke('KeyBindings.focusFirst');
|
|
4380
4456
|
};
|
|
4381
4457
|
const focusIndex$4 = index => {
|
|
4382
4458
|
return invoke('KeyBindings.focusIndex', index);
|
|
4383
4459
|
};
|
|
4384
|
-
const focusLast$
|
|
4460
|
+
const focusLast$3 = () => {
|
|
4385
4461
|
return invoke('KeyBindings.focusLast');
|
|
4386
4462
|
};
|
|
4387
4463
|
const toggleRecordingKeys = () => {
|
|
@@ -4430,17 +4506,17 @@ const KeyBindingsEditor = {
|
|
|
4430
4506
|
clearInput,
|
|
4431
4507
|
copyCommandId,
|
|
4432
4508
|
copyCommandTitle,
|
|
4433
|
-
focusFirst: focusFirst$
|
|
4509
|
+
focusFirst: focusFirst$4,
|
|
4434
4510
|
focusIndex: focusIndex$4,
|
|
4435
|
-
focusLast: focusLast$
|
|
4436
|
-
focusNext: focusNext$
|
|
4437
|
-
focusPrevious: focusPrevious$
|
|
4511
|
+
focusLast: focusLast$3,
|
|
4512
|
+
focusNext: focusNext$4,
|
|
4513
|
+
focusPrevious: focusPrevious$4,
|
|
4438
4514
|
handleClick: handleClick$1,
|
|
4439
4515
|
handleContextMenu: handleContextMenu$3,
|
|
4440
4516
|
handleDoubleClick,
|
|
4441
4517
|
handleInput: handleInput$4,
|
|
4442
4518
|
handleWheel: handleWheel$1,
|
|
4443
|
-
open: open$
|
|
4519
|
+
open: open$6,
|
|
4444
4520
|
removeKeyBinding,
|
|
4445
4521
|
resetKeyBinding,
|
|
4446
4522
|
showSameKeyBindings,
|
|
@@ -4511,7 +4587,7 @@ const KeyBoard = {
|
|
|
4511
4587
|
press
|
|
4512
4588
|
};
|
|
4513
4589
|
|
|
4514
|
-
const open$
|
|
4590
|
+
const open$5 = async () => {
|
|
4515
4591
|
await invoke('Main.openUri', 'language-models:///1');
|
|
4516
4592
|
};
|
|
4517
4593
|
const handleFilterInput$2 = async value => {
|
|
@@ -4531,7 +4607,7 @@ const LanguageModels = {
|
|
|
4531
4607
|
addModel,
|
|
4532
4608
|
clearFilterInput,
|
|
4533
4609
|
handleFilterInput: handleFilterInput$2,
|
|
4534
|
-
open: open$
|
|
4610
|
+
open: open$5,
|
|
4535
4611
|
removeModel
|
|
4536
4612
|
};
|
|
4537
4613
|
|
|
@@ -4541,6 +4617,9 @@ const showSideBar = async () => {
|
|
|
4541
4617
|
const hideSideBar = async () => {
|
|
4542
4618
|
await execute$1('Layout.hideSideBar');
|
|
4543
4619
|
};
|
|
4620
|
+
const getSideBarPosition = async () => {
|
|
4621
|
+
return execute$1('Layout.getSideBarPosition');
|
|
4622
|
+
};
|
|
4544
4623
|
const showSecondarySideBar = async () => {
|
|
4545
4624
|
await execute$1('Layout.showSecondarySideBar');
|
|
4546
4625
|
};
|
|
@@ -4552,6 +4631,7 @@ const handleWorkspaceRefresh = async () => {
|
|
|
4552
4631
|
};
|
|
4553
4632
|
|
|
4554
4633
|
const Layout = {
|
|
4634
|
+
getSideBarPosition,
|
|
4555
4635
|
handleWorkspaceRefresh,
|
|
4556
4636
|
hideSecondarySideBar,
|
|
4557
4637
|
hideSideBar,
|
|
@@ -4584,11 +4664,11 @@ const Open = {
|
|
|
4584
4664
|
shouldHaveUrl
|
|
4585
4665
|
};
|
|
4586
4666
|
|
|
4587
|
-
const open$
|
|
4667
|
+
const open$4 = async id => {
|
|
4588
4668
|
await invoke('Layout.showPanel', id);
|
|
4589
4669
|
};
|
|
4590
4670
|
const openProblems = async () => {
|
|
4591
|
-
await open$
|
|
4671
|
+
await open$4('Problems');
|
|
4592
4672
|
await invoke('Panel.selectIndex', 0);
|
|
4593
4673
|
};
|
|
4594
4674
|
const maximize = async () => {
|
|
@@ -4600,13 +4680,13 @@ const unmaximize = async () => {
|
|
|
4600
4680
|
|
|
4601
4681
|
const Panel = {
|
|
4602
4682
|
maximize,
|
|
4603
|
-
open: open$
|
|
4683
|
+
open: open$4,
|
|
4604
4684
|
openProblems,
|
|
4605
4685
|
unmaximize
|
|
4606
4686
|
};
|
|
4607
4687
|
|
|
4608
4688
|
const show$5 = async () => {
|
|
4609
|
-
await open$
|
|
4689
|
+
await open$4('Output');
|
|
4610
4690
|
await invoke('Panel.selectIndex', 1);
|
|
4611
4691
|
};
|
|
4612
4692
|
const handleFilterInput$1 = async text => {
|
|
@@ -4660,7 +4740,7 @@ const Platform = {
|
|
|
4660
4740
|
isFirefox
|
|
4661
4741
|
};
|
|
4662
4742
|
|
|
4663
|
-
const open$
|
|
4743
|
+
const open$3 = async uri => {
|
|
4664
4744
|
await invoke('Layout.showPreview', uri);
|
|
4665
4745
|
};
|
|
4666
4746
|
const handleClick = async hdId => {
|
|
@@ -4702,12 +4782,178 @@ const Preview = {
|
|
|
4702
4782
|
handleMouseDown,
|
|
4703
4783
|
handleMouseMove,
|
|
4704
4784
|
handleMouseUp,
|
|
4705
|
-
open: open$
|
|
4785
|
+
open: open$3,
|
|
4706
4786
|
setUri,
|
|
4707
4787
|
waitForClick,
|
|
4708
4788
|
waitForMutation
|
|
4709
4789
|
};
|
|
4710
4790
|
|
|
4791
|
+
const invokeOptionalIndex = async (command, index) => {
|
|
4792
|
+
if (index === undefined) {
|
|
4793
|
+
await invoke(command);
|
|
4794
|
+
return;
|
|
4795
|
+
}
|
|
4796
|
+
await invoke(command, index);
|
|
4797
|
+
};
|
|
4798
|
+
const open$2 = async () => {
|
|
4799
|
+
await invoke('Developer.openProcessExplorer');
|
|
4800
|
+
};
|
|
4801
|
+
const refresh$1 = async () => {
|
|
4802
|
+
await invoke('ProcessExplorer.refresh');
|
|
4803
|
+
};
|
|
4804
|
+
const collapseAll$2 = async () => {
|
|
4805
|
+
await invoke('ProcessExplorer.collapseAll');
|
|
4806
|
+
};
|
|
4807
|
+
const expandAll = async () => {
|
|
4808
|
+
await invoke('ProcessExplorer.expandAll');
|
|
4809
|
+
};
|
|
4810
|
+
const focusFirst$3 = async () => {
|
|
4811
|
+
await invoke('ProcessExplorer.focusFirst');
|
|
4812
|
+
};
|
|
4813
|
+
const focusLast$2 = async () => {
|
|
4814
|
+
await invoke('ProcessExplorer.focusLast');
|
|
4815
|
+
};
|
|
4816
|
+
const focusNext$3 = async () => {
|
|
4817
|
+
await invoke('ProcessExplorer.focusNext');
|
|
4818
|
+
};
|
|
4819
|
+
const focusPrevious$3 = async () => {
|
|
4820
|
+
await invoke('ProcessExplorer.focusPrevious');
|
|
4821
|
+
};
|
|
4822
|
+
const handleArrowLeft$1 = async () => {
|
|
4823
|
+
await invoke('ProcessExplorer.handleArrowLeft');
|
|
4824
|
+
};
|
|
4825
|
+
const handleArrowRight$1 = async () => {
|
|
4826
|
+
await invoke('ProcessExplorer.handleArrowRight');
|
|
4827
|
+
};
|
|
4828
|
+
const clickRow = async index => {
|
|
4829
|
+
await invoke('ProcessExplorer.handleClickAt', index);
|
|
4830
|
+
};
|
|
4831
|
+
const doubleClickRow = async index => {
|
|
4832
|
+
await invokeOptionalIndex('ProcessExplorer.handleDoubleClick', index);
|
|
4833
|
+
};
|
|
4834
|
+
const openContextMenu = async index => {
|
|
4835
|
+
await invokeOptionalIndex('ProcessExplorer.handleContextMenu', index);
|
|
4836
|
+
};
|
|
4837
|
+
const killProcess = async index => {
|
|
4838
|
+
await invokeOptionalIndex('ProcessExplorer.killProcess', index);
|
|
4839
|
+
};
|
|
4840
|
+
const debugProcess = async index => {
|
|
4841
|
+
await invokeOptionalIndex('ProcessExplorer.debugProcess', index);
|
|
4842
|
+
};
|
|
4843
|
+
const root = () => {
|
|
4844
|
+
return createLocator('.ProcessExplorer');
|
|
4845
|
+
};
|
|
4846
|
+
const table = () => {
|
|
4847
|
+
return createLocator('.ProcessExplorerTable');
|
|
4848
|
+
};
|
|
4849
|
+
const error = () => {
|
|
4850
|
+
return createLocator('.ProcessExplorerError');
|
|
4851
|
+
};
|
|
4852
|
+
const headerCell = index => {
|
|
4853
|
+
return root().locator('.ProcessExplorerHeaderCell').nth(index);
|
|
4854
|
+
};
|
|
4855
|
+
const nameHeader = () => {
|
|
4856
|
+
return headerCell(0);
|
|
4857
|
+
};
|
|
4858
|
+
const pidHeader = () => {
|
|
4859
|
+
return headerCell(1);
|
|
4860
|
+
};
|
|
4861
|
+
const memoryHeader = () => {
|
|
4862
|
+
return headerCell(2);
|
|
4863
|
+
};
|
|
4864
|
+
const rows = () => {
|
|
4865
|
+
return createLocator('.ProcessExplorerRow');
|
|
4866
|
+
};
|
|
4867
|
+
const row = index => {
|
|
4868
|
+
return rows().nth(index);
|
|
4869
|
+
};
|
|
4870
|
+
const focusedRow = () => {
|
|
4871
|
+
return createLocator('.ProcessExplorerRowFocused');
|
|
4872
|
+
};
|
|
4873
|
+
const expandedRow = () => {
|
|
4874
|
+
return createLocator('.ProcessExplorerRow[aria-expanded="true"]').first();
|
|
4875
|
+
};
|
|
4876
|
+
const collapsedRow = () => {
|
|
4877
|
+
return createLocator('.ProcessExplorerRow[aria-expanded="false"]').first();
|
|
4878
|
+
};
|
|
4879
|
+
const nameCell = index => {
|
|
4880
|
+
return row(index).locator('.ProcessExplorerNameCell');
|
|
4881
|
+
};
|
|
4882
|
+
const pidCell = index => {
|
|
4883
|
+
return row(index).locator('.ProcessExplorerCell').nth(1);
|
|
4884
|
+
};
|
|
4885
|
+
const memoryCell = index => {
|
|
4886
|
+
return row(index).locator('.ProcessExplorerCell').nth(2);
|
|
4887
|
+
};
|
|
4888
|
+
const shouldBeOpen = async () => {
|
|
4889
|
+
await expect$1(root()).toBeVisible();
|
|
4890
|
+
await expect$1(table()).toBeVisible();
|
|
4891
|
+
};
|
|
4892
|
+
const shouldBeHealthy = async () => {
|
|
4893
|
+
await expect$1(table()).toBeVisible();
|
|
4894
|
+
await expect$1(error()).toBeHidden();
|
|
4895
|
+
};
|
|
4896
|
+
const shouldHaveHeaders = async () => {
|
|
4897
|
+
await expect$1(nameHeader()).toHaveText('Name');
|
|
4898
|
+
await expect$1(pidHeader()).toHaveText('PID');
|
|
4899
|
+
await expect$1(memoryHeader()).toHaveText('Memory');
|
|
4900
|
+
};
|
|
4901
|
+
const shouldHaveRow = async (index = 0) => {
|
|
4902
|
+
await expect$1(row(index)).toBeVisible();
|
|
4903
|
+
await expect$1(nameCell(index)).toBeVisible();
|
|
4904
|
+
await expect$1(pidCell(index)).toBeVisible();
|
|
4905
|
+
await expect$1(memoryCell(index)).toBeVisible();
|
|
4906
|
+
};
|
|
4907
|
+
const shouldHaveFocusedRow = async () => {
|
|
4908
|
+
await expect$1(focusedRow()).toBeVisible();
|
|
4909
|
+
};
|
|
4910
|
+
const shouldHaveCollapsedRow = async () => {
|
|
4911
|
+
await expect$1(collapsedRow()).toBeVisible();
|
|
4912
|
+
};
|
|
4913
|
+
const shouldHaveExpandedRow = async () => {
|
|
4914
|
+
await expect$1(expandedRow()).toBeVisible();
|
|
4915
|
+
};
|
|
4916
|
+
|
|
4917
|
+
const ProcessExplorer = {
|
|
4918
|
+
clickRow,
|
|
4919
|
+
collapseAll: collapseAll$2,
|
|
4920
|
+
collapsedRow,
|
|
4921
|
+
debugProcess,
|
|
4922
|
+
doubleClickRow,
|
|
4923
|
+
error,
|
|
4924
|
+
expandAll,
|
|
4925
|
+
expandedRow,
|
|
4926
|
+
focusFirst: focusFirst$3,
|
|
4927
|
+
focusLast: focusLast$2,
|
|
4928
|
+
focusNext: focusNext$3,
|
|
4929
|
+
focusPrevious: focusPrevious$3,
|
|
4930
|
+
focusedRow,
|
|
4931
|
+
handleArrowLeft: handleArrowLeft$1,
|
|
4932
|
+
handleArrowRight: handleArrowRight$1,
|
|
4933
|
+
headerCell,
|
|
4934
|
+
killProcess,
|
|
4935
|
+
memoryCell,
|
|
4936
|
+
memoryHeader,
|
|
4937
|
+
nameCell,
|
|
4938
|
+
nameHeader,
|
|
4939
|
+
open: open$2,
|
|
4940
|
+
openContextMenu,
|
|
4941
|
+
pidCell,
|
|
4942
|
+
pidHeader,
|
|
4943
|
+
refresh: refresh$1,
|
|
4944
|
+
root,
|
|
4945
|
+
row,
|
|
4946
|
+
rows,
|
|
4947
|
+
shouldBeHealthy,
|
|
4948
|
+
shouldBeOpen,
|
|
4949
|
+
shouldHaveCollapsedRow,
|
|
4950
|
+
shouldHaveExpandedRow,
|
|
4951
|
+
shouldHaveFocusedRow,
|
|
4952
|
+
shouldHaveHeaders,
|
|
4953
|
+
shouldHaveRow,
|
|
4954
|
+
table
|
|
4955
|
+
};
|
|
4956
|
+
|
|
4711
4957
|
const show$4 = async () => {
|
|
4712
4958
|
await invoke('Panel.selectIndex', 0);
|
|
4713
4959
|
};
|
|
@@ -4873,7 +5119,7 @@ const References = {
|
|
|
4873
5119
|
};
|
|
4874
5120
|
|
|
4875
5121
|
const show$3 = async () => {
|
|
4876
|
-
await open$
|
|
5122
|
+
await open$8('Run And Debug');
|
|
4877
5123
|
};
|
|
4878
5124
|
const handleClickSectionBreakPoints = async () => {
|
|
4879
5125
|
await invoke('Run And Debug.handleClickSectionBreakPoints');
|
|
@@ -4917,7 +5163,7 @@ const RunAndDebug = {
|
|
|
4917
5163
|
};
|
|
4918
5164
|
|
|
4919
5165
|
const show$2 = async () => {
|
|
4920
|
-
await open$
|
|
5166
|
+
await open$8('Search');
|
|
4921
5167
|
};
|
|
4922
5168
|
const setValue = async value => {
|
|
4923
5169
|
await invoke('Search.handleInput', value, Script);
|
|
@@ -5144,7 +5390,7 @@ const handleContextMenu$1 = async (button, x, y) => {
|
|
|
5144
5390
|
await invoke('Source Control.handleContextMenu', button, x, y);
|
|
5145
5391
|
};
|
|
5146
5392
|
const show = async () => {
|
|
5147
|
-
await open$
|
|
5393
|
+
await open$8('Source Control');
|
|
5148
5394
|
};
|
|
5149
5395
|
|
|
5150
5396
|
const SourceControl = {
|
|
@@ -5423,6 +5669,7 @@ const createApi = (platform, assetDir) => {
|
|
|
5423
5669
|
Platform,
|
|
5424
5670
|
Preview,
|
|
5425
5671
|
Problems,
|
|
5672
|
+
ProcessExplorer,
|
|
5426
5673
|
QuickPick,
|
|
5427
5674
|
References,
|
|
5428
5675
|
RunAndDebug,
|
|
@@ -5585,6 +5832,40 @@ const importTest = async url => {
|
|
|
5585
5832
|
}
|
|
5586
5833
|
};
|
|
5587
5834
|
|
|
5835
|
+
const includes = (userAgent, value) => {
|
|
5836
|
+
return userAgent.includes(value);
|
|
5837
|
+
};
|
|
5838
|
+
const getBrowserNameFromUserAgent = userAgent => {
|
|
5839
|
+
const normalized = userAgent.toLowerCase();
|
|
5840
|
+
if (includes(normalized, 'firefox')) {
|
|
5841
|
+
return 'firefox';
|
|
5842
|
+
}
|
|
5843
|
+
if (includes(normalized, 'chrome') || includes(normalized, 'chromium') || includes(normalized, 'edg')) {
|
|
5844
|
+
return 'chromium';
|
|
5845
|
+
}
|
|
5846
|
+
if (includes(normalized, 'safari') || includes(normalized, 'applewebkit')) {
|
|
5847
|
+
return 'webkit';
|
|
5848
|
+
}
|
|
5849
|
+
return 'unknown';
|
|
5850
|
+
};
|
|
5851
|
+
const getBrowserName = () => {
|
|
5852
|
+
if (typeof navigator === 'undefined') {
|
|
5853
|
+
return 'unknown';
|
|
5854
|
+
}
|
|
5855
|
+
return getBrowserNameFromUserAgent(navigator.userAgent);
|
|
5856
|
+
};
|
|
5857
|
+
|
|
5858
|
+
const shouldSkipTestWithBrowserName = (skip, browserName) => {
|
|
5859
|
+
if (Array.isArray(skip)) {
|
|
5860
|
+
return skip.includes(browserName);
|
|
5861
|
+
}
|
|
5862
|
+
return Boolean(skip);
|
|
5863
|
+
};
|
|
5864
|
+
const shouldSkipTest = skip => {
|
|
5865
|
+
const browserName = getBrowserName();
|
|
5866
|
+
return shouldSkipTestWithBrowserName(skip, browserName);
|
|
5867
|
+
};
|
|
5868
|
+
|
|
5588
5869
|
const state = {
|
|
5589
5870
|
items: []
|
|
5590
5871
|
};
|
|
@@ -5670,7 +5951,7 @@ const executeAllTest = async (item, globals) => {
|
|
|
5670
5951
|
if (mockRpc) {
|
|
5671
5952
|
setMockRpc(mockRpc);
|
|
5672
5953
|
}
|
|
5673
|
-
if (skip) {
|
|
5954
|
+
if (shouldSkipTest(skip)) {
|
|
5674
5955
|
return getSkippedResult(item.name);
|
|
5675
5956
|
}
|
|
5676
5957
|
if (!test) {
|
|
@@ -5753,7 +6034,7 @@ const execute = async (href, platform, assetDir) => {
|
|
|
5753
6034
|
setMockRpc(mockRpc);
|
|
5754
6035
|
}
|
|
5755
6036
|
if (test) {
|
|
5756
|
-
if (skip) {
|
|
6037
|
+
if (shouldSkipTest(skip)) {
|
|
5757
6038
|
await skipTest(name);
|
|
5758
6039
|
} else {
|
|
5759
6040
|
await executeTest(name, test, globals);
|
|
@@ -6215,6 +6496,7 @@ const commandMap = {
|
|
|
6215
6496
|
'Test.execute': execute,
|
|
6216
6497
|
'Test.executeAll': executeAll,
|
|
6217
6498
|
'Test.executeMock': executeMock,
|
|
6499
|
+
'Test.executeMockRpcFunction': executeMockRpcFunction,
|
|
6218
6500
|
'Test.tryAutoFix': tryAutoFix
|
|
6219
6501
|
};
|
|
6220
6502
|
|