@lvce-editor/test-worker 17.0.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 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[]
@@ -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 = undefined) => {
605
- return string.indexOf(NewLine, startIndex);
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
- if (typeof error.stack === 'string') {
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
- const restoredError = new JsonRpcError(error.message);
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
- const restoredError = constructError(error.message, error.type, error.name);
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$3.autoFixError;
1331
+ return state$2.autoFixError;
1273
1332
  };
1274
1333
  const set$1 = value => {
1275
- state$3.autoFixError = value;
1334
+ state$2.autoFixError = value;
1276
1335
  };
1277
1336
  const clear$3 = () => {
1278
- state$3.autoFixError = undefined;
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$9 = async () => {
1878
+ const focusNext$a = async () => {
1841
1879
  return invoke('About.focusNext');
1842
1880
  };
1843
- const focusPrevious$8 = async () => {
1881
+ const focusPrevious$9 = async () => {
1844
1882
  return invoke('About.focusPrevious');
1845
1883
  };
1846
1884
 
1847
1885
  const About = {
1848
- focusNext: focusNext$9,
1849
- focusPrevious: focusPrevious$8,
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$7 = async () => {
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$6 = async () => {
1912
+ const focusLast$7 = async () => {
1875
1913
  await invoke('ActivityBar.focusLast');
1876
1914
  };
1877
- const focusNext$8 = async () => {
1915
+ const focusNext$9 = async () => {
1878
1916
  await invoke('ActivityBar.focusNext');
1879
1917
  };
1880
- const focusPrevious$7 = async () => {
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$7,
1908
- focusLast: focusLast$6,
1909
- focusNext: focusNext$8,
1910
- focusPrevious: focusPrevious$7,
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$a = async sessionId => {
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$a,
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$6 = async () => {
2789
+ const focusFirst$7 = async () => {
2749
2790
  await invoke('Main.focusFirst');
2750
2791
  };
2751
- const focusNext$7 = async () => {
2792
+ const focusNext$8 = async () => {
2752
2793
  await invoke('Main.focusNext');
2753
2794
  };
2754
- const focusPrevious$6 = async () => {
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$5 = async () => {
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$6,
2782
- focusLast: focusLast$5,
2783
- focusNext: focusNext$7,
2784
- focusPrevious: focusPrevious$6,
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$9 = async (leftUri, rightUri) => {
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$9,
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$1 = async () => {
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$1,
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$6 = async () => {
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$2 = async () => {
3543
+ const collapseAll$3 = async () => {
3502
3544
  await invoke('Explorer.collapseAll');
3503
3545
  };
3504
- const refresh$1 = async () => {
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$1 = async () => {
3555
+ const handleArrowLeft$2 = async () => {
3514
3556
  await invoke('Explorer.handleArrowLeft');
3515
3557
  };
3516
- const focusLast$4 = async () => {
3558
+ const focusLast$5 = async () => {
3517
3559
  await invoke('Explorer.focusLast');
3518
3560
  };
3519
- const focusFirst$5 = async () => {
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$2,
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$5,
3641
+ focusFirst: focusFirst$6,
3600
3642
  focusIndex: focusIndex$5,
3601
- focusLast: focusLast$4,
3602
- focusNext: focusNext$6,
3603
- handleArrowLeft: handleArrowLeft$1,
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$1,
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$8 = extensionId => {
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$8,
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$7 = async id => {
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$7
3826
+ open: open$8
3785
3827
  };
3786
3828
 
3787
- const open$6 = async () => {
3788
- await open$7('Extensions');
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$6
3865
+ open: open$7,
3866
+ setExtensionStatus
3821
3867
  };
3822
3868
 
3823
3869
  const Memfs = 'memfs';
@@ -4076,10 +4122,10 @@ const FileSystem = {
4076
4122
  writeJson
4077
4123
  };
4078
4124
 
4079
- const focusNext$5 = async () => {
4125
+ const focusNext$6 = async () => {
4080
4126
  await invoke('FindWidget.focusNext');
4081
4127
  };
4082
- const focusPrevious$5 = async () => {
4128
+ const focusPrevious$6 = async () => {
4083
4129
  await invoke('FindWidget.focusPrevious');
4084
4130
  };
4085
4131
  const close$1 = async () => {
@@ -4125,9 +4171,9 @@ const focusPreviousElement = async () => {
4125
4171
  const FindWidget = {
4126
4172
  close: close$1,
4127
4173
  focusElement,
4128
- focusNext: focusNext$5,
4174
+ focusNext: focusNext$6,
4129
4175
  focusNextElement,
4130
- focusPrevious: focusPrevious$5,
4176
+ focusPrevious: focusPrevious$6,
4131
4177
  focusPreviousElement,
4132
4178
  replace,
4133
4179
  replaceAll: replaceAll$1,
@@ -4196,7 +4242,7 @@ const unstash = async () => {
4196
4242
  await executeExtensionCommand('git.unstash');
4197
4243
  };
4198
4244
  const applyStash = async () => {
4199
- await executeExtensionCommand('git.applystash');
4245
+ await executeExtensionCommand('git.applyStash');
4200
4246
  };
4201
4247
  const checkout = async ref => {
4202
4248
  await executeExtensionCommand('git.checkout', ref);
@@ -4279,6 +4325,24 @@ const shouldHaveCommit = async message => {
4279
4325
  throw new Error(`Expected commit message to be "${message}", but got "${commits[0].message}"`);
4280
4326
  }
4281
4327
  };
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
+ }
4345
+ };
4282
4346
 
4283
4347
  const Git = {
4284
4348
  add,
@@ -4314,6 +4378,7 @@ const Git = {
4314
4378
  setOrigin,
4315
4379
  setUpstream,
4316
4380
  shouldHaveCommit,
4381
+ shouldHaveInvocations,
4317
4382
  stage,
4318
4383
  stash,
4319
4384
  status,
@@ -4333,28 +4398,28 @@ const IconTheme = {
4333
4398
  const selectIndex$4 = async index => {
4334
4399
  return invoke('IframeInspector.selectIndex', index);
4335
4400
  };
4336
- const focusNext$4 = async () => {
4401
+ const focusNext$5 = async () => {
4337
4402
  return invoke('IframeInspector.focusNext');
4338
4403
  };
4339
- const focusPrevious$4 = async () => {
4404
+ const focusPrevious$5 = async () => {
4340
4405
  return invoke('IframeInspector.focusPrevious');
4341
4406
  };
4342
- const focusFirst$4 = async () => {
4407
+ const focusFirst$5 = async () => {
4343
4408
  return invoke('IframeInspector.focusFirst');
4344
4409
  };
4345
- const focusLast$3 = async () => {
4410
+ const focusLast$4 = async () => {
4346
4411
  return invoke('IframeInspector.focusLast');
4347
4412
  };
4348
4413
 
4349
4414
  const IframeInspector = {
4350
- focusFirst: focusFirst$4,
4351
- focusLast: focusLast$3,
4352
- focusNext: focusNext$4,
4353
- focusPrevious: focusPrevious$4,
4415
+ focusFirst: focusFirst$5,
4416
+ focusLast: focusLast$4,
4417
+ focusNext: focusNext$5,
4418
+ focusPrevious: focusPrevious$5,
4354
4419
  selectIndex: selectIndex$4
4355
4420
  };
4356
4421
 
4357
- const open$5 = async () => {
4422
+ const open$6 = async () => {
4358
4423
  await invoke('Main.openUri', 'app://keybindings');
4359
4424
  };
4360
4425
  const handleInput$4 = value => {
@@ -4369,19 +4434,19 @@ const handleWheel$1 = (deltaMode, deltaY) => {
4369
4434
  const handleDoubleClick = (x, y) => {
4370
4435
  return invoke('KeyBindings.handleDoubleClick', x, y);
4371
4436
  };
4372
- const focusNext$3 = () => {
4437
+ const focusNext$4 = () => {
4373
4438
  return invoke('KeyBindings.focusNext');
4374
4439
  };
4375
- const focusPrevious$3 = () => {
4440
+ const focusPrevious$4 = () => {
4376
4441
  return invoke('KeyBindings.focusPrevious');
4377
4442
  };
4378
- const focusFirst$3 = () => {
4443
+ const focusFirst$4 = () => {
4379
4444
  return invoke('KeyBindings.focusFirst');
4380
4445
  };
4381
4446
  const focusIndex$4 = index => {
4382
4447
  return invoke('KeyBindings.focusIndex', index);
4383
4448
  };
4384
- const focusLast$2 = () => {
4449
+ const focusLast$3 = () => {
4385
4450
  return invoke('KeyBindings.focusLast');
4386
4451
  };
4387
4452
  const toggleRecordingKeys = () => {
@@ -4430,17 +4495,17 @@ const KeyBindingsEditor = {
4430
4495
  clearInput,
4431
4496
  copyCommandId,
4432
4497
  copyCommandTitle,
4433
- focusFirst: focusFirst$3,
4498
+ focusFirst: focusFirst$4,
4434
4499
  focusIndex: focusIndex$4,
4435
- focusLast: focusLast$2,
4436
- focusNext: focusNext$3,
4437
- focusPrevious: focusPrevious$3,
4500
+ focusLast: focusLast$3,
4501
+ focusNext: focusNext$4,
4502
+ focusPrevious: focusPrevious$4,
4438
4503
  handleClick: handleClick$1,
4439
4504
  handleContextMenu: handleContextMenu$3,
4440
4505
  handleDoubleClick,
4441
4506
  handleInput: handleInput$4,
4442
4507
  handleWheel: handleWheel$1,
4443
- open: open$5,
4508
+ open: open$6,
4444
4509
  removeKeyBinding,
4445
4510
  resetKeyBinding,
4446
4511
  showSameKeyBindings,
@@ -4511,7 +4576,7 @@ const KeyBoard = {
4511
4576
  press
4512
4577
  };
4513
4578
 
4514
- const open$4 = async () => {
4579
+ const open$5 = async () => {
4515
4580
  await invoke('Main.openUri', 'language-models:///1');
4516
4581
  };
4517
4582
  const handleFilterInput$2 = async value => {
@@ -4531,7 +4596,7 @@ const LanguageModels = {
4531
4596
  addModel,
4532
4597
  clearFilterInput,
4533
4598
  handleFilterInput: handleFilterInput$2,
4534
- open: open$4,
4599
+ open: open$5,
4535
4600
  removeModel
4536
4601
  };
4537
4602
 
@@ -4541,6 +4606,9 @@ const showSideBar = async () => {
4541
4606
  const hideSideBar = async () => {
4542
4607
  await execute$1('Layout.hideSideBar');
4543
4608
  };
4609
+ const getSideBarPosition = async () => {
4610
+ return execute$1('Layout.getSideBarPosition');
4611
+ };
4544
4612
  const showSecondarySideBar = async () => {
4545
4613
  await execute$1('Layout.showSecondarySideBar');
4546
4614
  };
@@ -4552,6 +4620,7 @@ const handleWorkspaceRefresh = async () => {
4552
4620
  };
4553
4621
 
4554
4622
  const Layout = {
4623
+ getSideBarPosition,
4555
4624
  handleWorkspaceRefresh,
4556
4625
  hideSecondarySideBar,
4557
4626
  hideSideBar,
@@ -4584,11 +4653,11 @@ const Open = {
4584
4653
  shouldHaveUrl
4585
4654
  };
4586
4655
 
4587
- const open$3 = async id => {
4656
+ const open$4 = async id => {
4588
4657
  await invoke('Layout.showPanel', id);
4589
4658
  };
4590
4659
  const openProblems = async () => {
4591
- await open$3('Problems');
4660
+ await open$4('Problems');
4592
4661
  await invoke('Panel.selectIndex', 0);
4593
4662
  };
4594
4663
  const maximize = async () => {
@@ -4600,13 +4669,13 @@ const unmaximize = async () => {
4600
4669
 
4601
4670
  const Panel = {
4602
4671
  maximize,
4603
- open: open$3,
4672
+ open: open$4,
4604
4673
  openProblems,
4605
4674
  unmaximize
4606
4675
  };
4607
4676
 
4608
4677
  const show$5 = async () => {
4609
- await open$3('Output');
4678
+ await open$4('Output');
4610
4679
  await invoke('Panel.selectIndex', 1);
4611
4680
  };
4612
4681
  const handleFilterInput$1 = async text => {
@@ -4660,7 +4729,7 @@ const Platform = {
4660
4729
  isFirefox
4661
4730
  };
4662
4731
 
4663
- const open$2 = async uri => {
4732
+ const open$3 = async uri => {
4664
4733
  await invoke('Layout.showPreview', uri);
4665
4734
  };
4666
4735
  const handleClick = async hdId => {
@@ -4702,12 +4771,178 @@ const Preview = {
4702
4771
  handleMouseDown,
4703
4772
  handleMouseMove,
4704
4773
  handleMouseUp,
4705
- open: open$2,
4774
+ open: open$3,
4706
4775
  setUri,
4707
4776
  waitForClick,
4708
4777
  waitForMutation
4709
4778
  };
4710
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
+
4711
4946
  const show$4 = async () => {
4712
4947
  await invoke('Panel.selectIndex', 0);
4713
4948
  };
@@ -4873,7 +5108,7 @@ const References = {
4873
5108
  };
4874
5109
 
4875
5110
  const show$3 = async () => {
4876
- await open$7('Run And Debug');
5111
+ await open$8('Run And Debug');
4877
5112
  };
4878
5113
  const handleClickSectionBreakPoints = async () => {
4879
5114
  await invoke('Run And Debug.handleClickSectionBreakPoints');
@@ -4917,7 +5152,7 @@ const RunAndDebug = {
4917
5152
  };
4918
5153
 
4919
5154
  const show$2 = async () => {
4920
- await open$7('Search');
5155
+ await open$8('Search');
4921
5156
  };
4922
5157
  const setValue = async value => {
4923
5158
  await invoke('Search.handleInput', value, Script);
@@ -5144,7 +5379,7 @@ const handleContextMenu$1 = async (button, x, y) => {
5144
5379
  await invoke('Source Control.handleContextMenu', button, x, y);
5145
5380
  };
5146
5381
  const show = async () => {
5147
- await open$7('Source Control');
5382
+ await open$8('Source Control');
5148
5383
  };
5149
5384
 
5150
5385
  const SourceControl = {
@@ -5423,6 +5658,7 @@ const createApi = (platform, assetDir) => {
5423
5658
  Platform,
5424
5659
  Preview,
5425
5660
  Problems,
5661
+ ProcessExplorer,
5426
5662
  QuickPick,
5427
5663
  References,
5428
5664
  RunAndDebug,
@@ -5585,6 +5821,40 @@ const importTest = async url => {
5585
5821
  }
5586
5822
  };
5587
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
+
5588
5858
  const state = {
5589
5859
  items: []
5590
5860
  };
@@ -5670,7 +5940,7 @@ const executeAllTest = async (item, globals) => {
5670
5940
  if (mockRpc) {
5671
5941
  setMockRpc(mockRpc);
5672
5942
  }
5673
- if (skip) {
5943
+ if (shouldSkipTest(skip)) {
5674
5944
  return getSkippedResult(item.name);
5675
5945
  }
5676
5946
  if (!test) {
@@ -5753,7 +6023,7 @@ const execute = async (href, platform, assetDir) => {
5753
6023
  setMockRpc(mockRpc);
5754
6024
  }
5755
6025
  if (test) {
5756
- if (skip) {
6026
+ if (shouldSkipTest(skip)) {
5757
6027
  await skipTest(name);
5758
6028
  } else {
5759
6029
  await executeTest(name, test, globals);
@@ -6215,6 +6485,7 @@ const commandMap = {
6215
6485
  'Test.execute': execute,
6216
6486
  'Test.executeAll': executeAll,
6217
6487
  'Test.executeMock': executeMock,
6488
+ 'Test.executeMockRpcFunction': executeMockRpcFunction,
6218
6489
  'Test.tryAutoFix': tryAutoFix
6219
6490
  };
6220
6491
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/test-worker",
3
- "version": "17.0.0",
3
+ "version": "17.0.1",
4
4
  "description": "Test Worker",
5
5
  "repository": {
6
6
  "type": "git",