@lvce-editor/test-worker 4.40.0 → 4.42.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api.d.ts +23 -14
- package/dist/testWorkerMain.js +45 -6
- package/package.json +1 -1
package/dist/api.d.ts
CHANGED
|
@@ -84,12 +84,15 @@ declare const getText: () => Promise<string>;
|
|
|
84
84
|
declare const rename: () => Promise<void>;
|
|
85
85
|
declare const showHover: () => Promise<void>;
|
|
86
86
|
declare const openRename: () => Promise<void>;
|
|
87
|
+
declare const rename2: (newName: string) => Promise<void>;
|
|
87
88
|
declare const growSelection: () => Promise<void>;
|
|
88
89
|
declare const getSelections: () => Promise<Uint32Array>;
|
|
89
90
|
declare const shouldHaveText: (expectedText: string) => Promise<void>;
|
|
90
91
|
declare const shouldHaveSelections: (expectedSelections: Uint32Array) => Promise<void>;
|
|
91
92
|
declare const selectIndex: (index: number) => Promise<void>;
|
|
92
93
|
declare const selectCurrentIndex: () => Promise<void>;
|
|
94
|
+
declare const selectIndex$1: (index: number) => Promise<void>;
|
|
95
|
+
declare const selectCurrentIndex$1: () => Promise<void>;
|
|
93
96
|
declare const openContextMenu$1: (index: number) => Promise<void>;
|
|
94
97
|
declare const handleDragLeave: () => Promise<void>;
|
|
95
98
|
declare const handleBlur: () => Promise<void>;
|
|
@@ -142,6 +145,7 @@ declare const openJsonValidation: () => Promise<void>;
|
|
|
142
145
|
declare const openSettings: () => Promise<void>;
|
|
143
146
|
declare const handleScroll: (scrollTop: number) => Promise<void>;
|
|
144
147
|
declare const writeFile: (uri: string, content: string) => Promise<void>;
|
|
148
|
+
declare const writeJson: (uri: string, data: any) => Promise<void>;
|
|
145
149
|
declare const readFile: (uri: string) => Promise<string>;
|
|
146
150
|
declare const mkdir: (uri: string) => Promise<void>;
|
|
147
151
|
declare const remove: (uri: string) => Promise<void>;
|
|
@@ -154,7 +158,7 @@ declare const createExecutableFrom: (uri: string) => Promise<string>;
|
|
|
154
158
|
declare const focusNext$3: () => Promise<void>;
|
|
155
159
|
declare const setValue: (value: string) => Promise<void>;
|
|
156
160
|
declare const setIconTheme: (id: string) => Promise<void>;
|
|
157
|
-
declare const selectIndex$
|
|
161
|
+
declare const selectIndex$2: (index: number) => Promise<void>;
|
|
158
162
|
declare const focusNext$4: () => Promise<void>;
|
|
159
163
|
declare const focusPrevious$2: () => Promise<void>;
|
|
160
164
|
declare const focusFirst$2: () => Promise<void>;
|
|
@@ -199,6 +203,7 @@ declare const handleFilterInput: (text: string) => Promise<void>;
|
|
|
199
203
|
declare const selectChannel: (channelId: string) => Promise<void>;
|
|
200
204
|
declare const clear: () => Promise<void>;
|
|
201
205
|
declare const open$2: (id: string) => Promise<void>;
|
|
206
|
+
declare const openProblems: () => Promise<void>;
|
|
202
207
|
declare const getNodePath: () => Promise<string>;
|
|
203
208
|
declare const isFirefox: () => boolean;
|
|
204
209
|
declare const show$2: () => Promise<void>;
|
|
@@ -221,14 +226,14 @@ declare const focusLast$5: () => Promise<void>;
|
|
|
221
226
|
declare const focusIndex$2: (index: number) => Promise<void>;
|
|
222
227
|
declare const focusPrevious$5: () => Promise<void>;
|
|
223
228
|
declare const selectItem$1: (label: string) => Promise<void>;
|
|
224
|
-
declare const selectIndex$
|
|
225
|
-
declare const selectCurrentIndex$
|
|
229
|
+
declare const selectIndex$3: (index: number) => Promise<void>;
|
|
230
|
+
declare const selectCurrentIndex$2: () => Promise<void>;
|
|
226
231
|
declare const executeCommand: (label: string) => Promise<void>;
|
|
227
232
|
declare const handleClickSectionWatch: () => Promise<void>;
|
|
228
233
|
declare const addWatchExpression: (expression: string) => Promise<void>;
|
|
229
234
|
declare const handleWatchValueChange: () => Promise<void>;
|
|
230
235
|
declare const acceptWatchExpressionEdit: () => Promise<void>;
|
|
231
|
-
declare const selectIndex$
|
|
236
|
+
declare const selectIndex$4: (index: number) => Promise<void>;
|
|
232
237
|
declare const setPauseOnExceptions: (value: number) => Promise<void>;
|
|
233
238
|
declare const handleRename: () => Promise<void>;
|
|
234
239
|
declare const handleSpace: () => Promise<void>;
|
|
@@ -243,7 +248,7 @@ declare const collapseDetails: () => Promise<void>;
|
|
|
243
248
|
declare const dismissItem: () => Promise<void>;
|
|
244
249
|
declare const focusFirst$6: () => Promise<void>;
|
|
245
250
|
declare const focusIndex$3: (index: number) => Promise<void>;
|
|
246
|
-
declare const selectIndex$
|
|
251
|
+
declare const selectIndex$5: (index: number) => Promise<void>;
|
|
247
252
|
declare const focusNext$8: () => Promise<void>;
|
|
248
253
|
declare const handleWheel$1: (deltaMode: number, deltaY: number) => Promise<void>;
|
|
249
254
|
declare const focusNextPage: () => Promise<void>;
|
|
@@ -268,7 +273,7 @@ declare const selectExtensions: () => Promise<void>;
|
|
|
268
273
|
declare const handleScroll$1: (scrollTop: number) => Promise<void>;
|
|
269
274
|
declare const open$4: (id: string) => Promise<void>;
|
|
270
275
|
declare const hide: () => Promise<void>;
|
|
271
|
-
declare const selectIndex$
|
|
276
|
+
declare const selectIndex$6: (index: number) => Promise<void>;
|
|
272
277
|
declare const acceptInput: () => Promise<void>;
|
|
273
278
|
declare const handleInput$3: (text: string) => Promise<void>;
|
|
274
279
|
declare const handleClickSourceControlButtons: (index: number, name: string) => Promise<void>;
|
|
@@ -324,11 +329,14 @@ declare namespace Dialog {
|
|
|
324
329
|
export { executeMock, mockSaveFilePicker, showSaveFilePicker };
|
|
325
330
|
}
|
|
326
331
|
declare namespace Editor {
|
|
327
|
-
export { addAllMissingImports, closeColorPicker, closeCompletion, closeCompletionDetails, copy, copyLineDown, copyLineUp, cursorCharacterLeft, cursorCharacterRight, cursorDown, cursorEnd, cursorHome, cursorUp, cursorWordLeft, cursorWordPartLeft, cursorWordPartRight, cursorWordRight, deleteAllLeft, deleteAllRight, executeTabCompletion, findAllImplementations, findAllReferences, format, getSelections, getText, goToDefinition, goToTypeDefinition, growSelection, insertLineBreak, invokeBraceCompletion, invokeTabCompletion, openColorPicker, openCompletion, openCompletionDetails, openContextMenu, openEditorContextMenu, openFind, openFindWidget, openHover, openRename, openSourceActions, organizeImports, rename, selectAll, setCursor, setDeltaY, setSelections, shouldHaveSelections, shouldHaveText, showHover, sortImports, sourceActionsSelectCurrent, toggleBlockComment, toggleCompletionDetails, toggleLineComment, type };
|
|
332
|
+
export { addAllMissingImports, closeColorPicker, closeCompletion, closeCompletionDetails, copy, copyLineDown, copyLineUp, cursorCharacterLeft, cursorCharacterRight, cursorDown, cursorEnd, cursorHome, cursorUp, cursorWordLeft, cursorWordPartLeft, cursorWordPartRight, cursorWordRight, deleteAllLeft, deleteAllRight, executeTabCompletion, findAllImplementations, findAllReferences, format, getSelections, getText, goToDefinition, goToTypeDefinition, growSelection, insertLineBreak, invokeBraceCompletion, invokeTabCompletion, openColorPicker, openCompletion, openCompletionDetails, openContextMenu, openEditorContextMenu, openFind, openFindWidget, openHover, openRename, openSourceActions, organizeImports, rename, rename2, selectAll, setCursor, setDeltaY, setSelections, shouldHaveSelections, shouldHaveText, showHover, sortImports, sourceActionsSelectCurrent, toggleBlockComment, toggleCompletionDetails, toggleLineComment, type };
|
|
328
333
|
}
|
|
329
334
|
declare namespace EditorCompletion {
|
|
330
335
|
export { selectCurrentIndex, selectIndex };
|
|
331
336
|
}
|
|
337
|
+
declare namespace EditorSourceAction {
|
|
338
|
+
export { selectCurrentIndex$1 as selectCurrentIndex, selectIndex$1 as selectIndex };
|
|
339
|
+
}
|
|
332
340
|
declare namespace Explorer {
|
|
333
341
|
export { acceptEdit, cancelEdit, clickCurrent, expandAll, expandRecursively, focus$1 as focus, focusFirst$1 as focusFirst, focusIndex, focusLast$1 as focusLast, focusNext$2 as focusNext, handleArrowLeft, handleBlur, handleClick$1 as handleClick, handleClickAt, handleCopy, handleCut, handleDragLeave, handleDragOver, handleDragOverIndex, handleDrop, handleInputBlur, handlePaste, newFile, newFolder, openContextMenu$1 as openContextMenu, refresh, removeDirent, rename$1 as rename, renameDirent, selectAll$1 as selectAll, selectDown, selectIndices, selectUp, toggleIndividualSelection, updateEditingValue };
|
|
334
342
|
}
|
|
@@ -339,7 +347,7 @@ declare namespace ExtensionDetail {
|
|
|
339
347
|
export { handleScroll, open, openCommands, openFeature, openJsonValidation, openRuntimeStatus, openSettings, openThemes, openWebViews, selectChangelog, selectDetails, selectFeature, selectFeatures, selectTab };
|
|
340
348
|
}
|
|
341
349
|
declare namespace FileSystem {
|
|
342
|
-
export { chmod, createExecutable, createExecutableFrom, getTmpDir, mkdir, readFile, remove, writeFile };
|
|
350
|
+
export { chmod, createExecutable, createExecutableFrom, getTmpDir, mkdir, readFile, remove, writeFile, writeJson };
|
|
343
351
|
}
|
|
344
352
|
declare namespace FindWidget {
|
|
345
353
|
export { focusNext$3 as focusNext, setValue };
|
|
@@ -348,7 +356,7 @@ declare namespace IconTheme {
|
|
|
348
356
|
export { setIconTheme };
|
|
349
357
|
}
|
|
350
358
|
declare namespace IframeInspector {
|
|
351
|
-
export { focusFirst$2 as focusFirst, focusLast$2 as focusLast, focusNext$4 as focusNext, focusPrevious$2 as focusPrevious, selectIndex$
|
|
359
|
+
export { focusFirst$2 as focusFirst, focusLast$2 as focusLast, focusNext$4 as focusNext, focusPrevious$2 as focusPrevious, selectIndex$2 as selectIndex };
|
|
352
360
|
}
|
|
353
361
|
declare namespace KeyBindingsEditor {
|
|
354
362
|
export { addKeyBinding, changeWhenExpression, clearInput, copyCommandId, copyCommandTitle, focusFirst$3 as focusFirst, focusLast$3 as focusLast, focusNext$5 as focusNext, focusPrevious$3 as focusPrevious, handleClick$2 as handleClick, handleContextMenu$1 as handleContextMenu, handleDoubleClick, handleInput, handleWheel, open$1 as open, removeKeyBinding, resetKeyBinding, showSameKeyBindings, sortByPrecedence, startRecordingKeys, stopRecordingKeys, toggleRecordingKeys };
|
|
@@ -363,7 +371,7 @@ declare namespace Output {
|
|
|
363
371
|
export { clear, handleFilterInput, selectChannel, show$1 as show };
|
|
364
372
|
}
|
|
365
373
|
declare namespace Panel {
|
|
366
|
-
export { open$2 as open };
|
|
374
|
+
export { open$2 as open, openProblems };
|
|
367
375
|
}
|
|
368
376
|
declare namespace Platform {
|
|
369
377
|
export { getNodePath, isFirefox };
|
|
@@ -372,13 +380,13 @@ declare namespace Problems {
|
|
|
372
380
|
export { copyMessage, focusIndex$1 as focusIndex, handleArrowLeft$1 as handleArrowLeft, handleArrowRight, handleClickAt$1 as handleClickAt, handleFilterInput$1 as handleFilterInput, handleIconThemeChange, show$2 as show, viewAsList, viewAsTable };
|
|
373
381
|
}
|
|
374
382
|
declare namespace QuickPick {
|
|
375
|
-
export { executeCommand, focusFirst$5 as focusFirst, focusIndex$2 as focusIndex, focusLast$5 as focusLast, focusNext$7 as focusNext, focusPrevious$5 as focusPrevious, handleClickAt$2 as handleClickAt, handleInput$1 as handleInput, open$3 as open, selectCurrentIndex$
|
|
383
|
+
export { executeCommand, focusFirst$5 as focusFirst, focusIndex$2 as focusIndex, focusLast$5 as focusLast, focusNext$7 as focusNext, focusPrevious$5 as focusPrevious, handleClickAt$2 as handleClickAt, handleInput$1 as handleInput, open$3 as open, selectCurrentIndex$2 as selectCurrentIndex, selectIndex$3 as selectIndex, selectItem$1 as selectItem, setValue$1 as setValue };
|
|
376
384
|
}
|
|
377
385
|
declare namespace RunAndDebug {
|
|
378
|
-
export { acceptWatchExpressionEdit, addWatchExpression, handleClickSectionWatch, handleRename, handleSpace, handleWatchValueChange, selectIndex$
|
|
386
|
+
export { acceptWatchExpressionEdit, addWatchExpression, handleClickSectionWatch, handleRename, handleSpace, handleWatchValueChange, selectIndex$4 as selectIndex, setPauseOnExceptions };
|
|
379
387
|
}
|
|
380
388
|
declare namespace Search {
|
|
381
|
-
export { clearSearchResults, collapseDetails, dismissItem, focusFirst$6 as focusFirst, focusIndex$3 as focusIndex, focusNext$8 as focusNext, focusNextPage, focusPrevious$6 as focusPrevious, focusPreviousPage, handleWheel$1 as handleWheel, openDetails, replaceAll, selectIndex$
|
|
389
|
+
export { clearSearchResults, collapseDetails, dismissItem, focusFirst$6 as focusFirst, focusIndex$3 as focusIndex, focusNext$8 as focusNext, focusNextPage, focusPrevious$6 as focusPrevious, focusPreviousPage, handleWheel$1 as handleWheel, openDetails, replaceAll, selectIndex$5 as selectIndex, setExcludeValue, setIncludeValue, setReplaceValue, setValue$2 as setValue, toggleMatchCase, toggleMatchWholeWord, togglePreserveCase, toggleReplace, toggleSearchDetails, toggleUseRegularExpression };
|
|
382
390
|
}
|
|
383
391
|
declare namespace Settings {
|
|
384
392
|
export { update };
|
|
@@ -390,7 +398,7 @@ declare namespace SideBar {
|
|
|
390
398
|
export { hide, open$4 as open };
|
|
391
399
|
}
|
|
392
400
|
declare namespace SourceControl {
|
|
393
|
-
export { acceptInput, handleClickSourceControlButtons, handleInput$3 as handleInput, selectIndex$
|
|
401
|
+
export { acceptInput, handleClickSourceControlButtons, handleInput$3 as handleInput, selectIndex$6 as selectIndex };
|
|
394
402
|
}
|
|
395
403
|
declare namespace StatusBar {
|
|
396
404
|
export { update$1 as update };
|
|
@@ -416,6 +424,7 @@ export interface TestApi {
|
|
|
416
424
|
readonly Dialog: typeof Dialog,
|
|
417
425
|
readonly Editor: typeof Editor,
|
|
418
426
|
readonly EditorCompletion: typeof EditorCompletion,
|
|
427
|
+
readonly EditorSourceAction: typeof EditorSourceAction,
|
|
419
428
|
readonly Explorer: typeof Explorer,
|
|
420
429
|
readonly Extension: typeof Extension,
|
|
421
430
|
readonly ExtensionDetail: typeof ExtensionDetail,
|
package/dist/testWorkerMain.js
CHANGED
|
@@ -1888,6 +1888,8 @@ const invoke = async (method, ...params) => {
|
|
|
1888
1888
|
return rpc.invoke(method, ...params);
|
|
1889
1889
|
};
|
|
1890
1890
|
|
|
1891
|
+
const Script = 2;
|
|
1892
|
+
|
|
1891
1893
|
const setCursor = async (rowIndex, columnIndex) => {
|
|
1892
1894
|
await invoke$1('Editor.cursorSet', rowIndex, columnIndex);
|
|
1893
1895
|
};
|
|
@@ -2053,6 +2055,13 @@ const showHover = async () => {
|
|
|
2053
2055
|
const openRename = async () => {
|
|
2054
2056
|
await invoke$1('Editor.openRename');
|
|
2055
2057
|
};
|
|
2058
|
+
const rename2 = async newName => {
|
|
2059
|
+
await openRename();
|
|
2060
|
+
// @ts-ignore
|
|
2061
|
+
await invoke$1('EditorRename.handleInput', newName, Script);
|
|
2062
|
+
// @ts-ignore
|
|
2063
|
+
await invoke$1('EditorRename.accept');
|
|
2064
|
+
};
|
|
2056
2065
|
const growSelection = async () => {
|
|
2057
2066
|
// @ts-ignore
|
|
2058
2067
|
await invoke$1('Editor.selectionGrow');
|
|
@@ -2126,6 +2135,7 @@ const TestFrameWorkComponentEditor = {
|
|
|
2126
2135
|
openSourceActions,
|
|
2127
2136
|
organizeImports,
|
|
2128
2137
|
rename: rename$1,
|
|
2138
|
+
rename2,
|
|
2129
2139
|
selectAll: selectAll$1,
|
|
2130
2140
|
setCursor,
|
|
2131
2141
|
setDeltaY,
|
|
@@ -2141,14 +2151,29 @@ const TestFrameWorkComponentEditor = {
|
|
|
2141
2151
|
type
|
|
2142
2152
|
};
|
|
2143
2153
|
|
|
2144
|
-
const selectIndex$
|
|
2154
|
+
const selectIndex$6 = async index => {
|
|
2145
2155
|
await invoke$1('EditorCompletion.selectIndex', index);
|
|
2146
2156
|
};
|
|
2147
|
-
const selectCurrentIndex$
|
|
2157
|
+
const selectCurrentIndex$2 = async () => {
|
|
2148
2158
|
await invoke$1('EditorCompletion.selectCurrentIndex');
|
|
2149
2159
|
};
|
|
2150
2160
|
|
|
2151
2161
|
const TestFrameWorkComponentEditorCompletion = {
|
|
2162
|
+
__proto__: null,
|
|
2163
|
+
selectCurrentIndex: selectCurrentIndex$2,
|
|
2164
|
+
selectIndex: selectIndex$6
|
|
2165
|
+
};
|
|
2166
|
+
|
|
2167
|
+
const selectIndex$5 = async index => {
|
|
2168
|
+
// @ts-ignore
|
|
2169
|
+
await invoke$1('EditorSourceAction.selectIndex', index);
|
|
2170
|
+
};
|
|
2171
|
+
const selectCurrentIndex$1 = async () => {
|
|
2172
|
+
// @ts-ignore
|
|
2173
|
+
await invoke$1('EditorSourceAction.selectCurrentIndex');
|
|
2174
|
+
};
|
|
2175
|
+
|
|
2176
|
+
const TestFrameWorkComponentEditorSourceAction = {
|
|
2152
2177
|
__proto__: null,
|
|
2153
2178
|
selectCurrentIndex: selectCurrentIndex$1,
|
|
2154
2179
|
selectIndex: selectIndex$5
|
|
@@ -2405,9 +2430,17 @@ const {
|
|
|
2405
2430
|
Slash
|
|
2406
2431
|
} = Character;
|
|
2407
2432
|
|
|
2433
|
+
const stringifyJson = data => {
|
|
2434
|
+
return JSON.stringify(data, null, 2) + '\n';
|
|
2435
|
+
};
|
|
2436
|
+
|
|
2408
2437
|
const writeFile = async (uri, content) => {
|
|
2409
2438
|
await invoke$1('FileSystem.writeFile', uri, content);
|
|
2410
2439
|
};
|
|
2440
|
+
const writeJson = async (uri, data) => {
|
|
2441
|
+
const content = stringifyJson(data);
|
|
2442
|
+
await writeFile(uri, content);
|
|
2443
|
+
};
|
|
2411
2444
|
const readFile = async uri => {
|
|
2412
2445
|
return invoke$1('FileSystem.readFile', uri);
|
|
2413
2446
|
};
|
|
@@ -2462,7 +2495,8 @@ const TestFrameWorkComponentFileSystem = {
|
|
|
2462
2495
|
mkdir,
|
|
2463
2496
|
readFile,
|
|
2464
2497
|
remove,
|
|
2465
|
-
writeFile
|
|
2498
|
+
writeFile,
|
|
2499
|
+
writeJson
|
|
2466
2500
|
};
|
|
2467
2501
|
|
|
2468
2502
|
const focusNext$6 = async () => {
|
|
@@ -2713,8 +2747,6 @@ const TestFrameWorkComponentMain = {
|
|
|
2713
2747
|
splitRight
|
|
2714
2748
|
};
|
|
2715
2749
|
|
|
2716
|
-
const Script = 2;
|
|
2717
|
-
|
|
2718
2750
|
const show$2 = async () => {
|
|
2719
2751
|
// @ts-ignore
|
|
2720
2752
|
await invoke$1('Panel.selectIndex', 1);
|
|
@@ -2743,10 +2775,16 @@ const TestFrameWorkComponentOutput = {
|
|
|
2743
2775
|
const open$2 = async id => {
|
|
2744
2776
|
await invoke$1('Layout.showPanel', id);
|
|
2745
2777
|
};
|
|
2778
|
+
const openProblems = async () => {
|
|
2779
|
+
await open$2('Problems');
|
|
2780
|
+
// @ts-ignore
|
|
2781
|
+
await invoke$1('Panel.selectIndex', 0);
|
|
2782
|
+
};
|
|
2746
2783
|
|
|
2747
2784
|
const TestFrameWorkComponentPanel = {
|
|
2748
2785
|
__proto__: null,
|
|
2749
|
-
open: open$2
|
|
2786
|
+
open: open$2,
|
|
2787
|
+
openProblems
|
|
2750
2788
|
};
|
|
2751
2789
|
|
|
2752
2790
|
const getIsFirefox = () => {
|
|
@@ -3354,6 +3392,7 @@ const TestFrameWorkComponent = {
|
|
|
3354
3392
|
Dialog: TestFrameWorkComponentDialog,
|
|
3355
3393
|
Editor: TestFrameWorkComponentEditor,
|
|
3356
3394
|
EditorCompletion: TestFrameWorkComponentEditorCompletion,
|
|
3395
|
+
EditorSourceAction: TestFrameWorkComponentEditorSourceAction,
|
|
3357
3396
|
Explorer: TestFrameWorkComponentExplorer,
|
|
3358
3397
|
Extension: TestFrameWorkComponentExtension,
|
|
3359
3398
|
ExtensionDetail: TestFrameWorkComponentExtensionDetail,
|