@lvce-editor/test-worker 16.8.0 → 17.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/api.d.ts CHANGED
@@ -157,11 +157,6 @@ 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
-
165
160
  export interface LayoutExpectation extends LayoutExpectationObject {
166
161
  readonly activeGroupIndex?: number;
167
162
  readonly direction?: LayoutDirection;
@@ -169,7 +164,7 @@ export interface LayoutExpectation extends LayoutExpectationObject {
169
164
  }
170
165
 
171
166
  export interface SelectItemOptions {
172
- readonly waitUntil?: SelectItemWaitUntil;
167
+ readonly waitUntil?: "done" | "quickPick" | "none";
173
168
  }
174
169
 
175
170
  export interface SelectItem2Options {
@@ -226,8 +221,6 @@ export type SavedState = {
226
221
  readonly layout?: LayoutState;
227
222
  };
228
223
 
229
- export type SelectItemWaitUntil = "done" | "quickPick" | "none";
230
-
231
224
  export type SearchInputType = "SearchValue" | "ReplaceValue" | "IncludeValue" | "ExcludeValue";
232
225
 
233
226
  interface Workspace {
@@ -616,6 +609,8 @@ interface Explorer {
616
609
  interface Extension {
617
610
  readonly addNodeExtension: (relativePath: string) => Promise<void>;
618
611
  readonly addWebExtension: (relativePath: string) => Promise<void>;
612
+ readonly disableWorkspace: (id: string) => Promise<void>;
613
+ readonly enableWorkspace: (id: string) => Promise<void>;
619
614
  readonly executeCompletionProvider: (textDocument: CompletionTextDocument, ...args: readonly unknown[]) => Promise<readonly CompletionItem[]>;
620
615
  readonly executeFormattingProvider: (textDocument: FormattingTextDocument, ...args: readonly unknown[]) => Promise<readonly FormattingEdit[]>;
621
616
  }
@@ -733,7 +728,6 @@ interface Git {
733
728
  readonly setOrigin: (remoteUrl: string) => Promise<void>;
734
729
  readonly setUpstream: (remoteUrl: string) => Promise<void>;
735
730
  readonly shouldHaveCommit: (message: string) => Promise<void>;
736
- readonly shouldHaveInvocations: (invocations: readonly GitInvocation[]) => Promise<void>;
737
731
  readonly stage: (pathSpec: string) => Promise<void>;
738
732
  readonly stash: (message?: string) => Promise<void>;
739
733
  readonly status: () => Promise<unknown>;
@@ -1924,8 +1924,13 @@ const execute$1 = async (id, ...args) => {
1924
1924
  return invoke(id, ...args);
1925
1925
  };
1926
1926
  const executeExtensionCommand = async (commandId, ...args) => {
1927
- // TODO maybe ask extension-management-worker instead
1928
- return invoke('ExtensionHost.executeCommand', commandId, ...args);
1927
+ try {
1928
+ return await invoke$2('Extensions.executeExtensionCommand', commandId, ...args);
1929
+ } catch {
1930
+ // legacy
1931
+ // TODO maybe ask extension-management-worker instead
1932
+ return invoke('ExtensionHost.executeCommand', commandId, ...args);
1933
+ }
1929
1934
  };
1930
1935
 
1931
1936
  const Command = {
@@ -3637,6 +3642,12 @@ const executeFormattingProvider = async (textDocument, ...args) => {
3637
3642
  const executeCompletionProvider = async (textDocument, ...args) => {
3638
3643
  return invoke$2('Extensions.executeCompletionProvider', textDocument, ...args);
3639
3644
  };
3645
+ const enableWorkspace = async id => {
3646
+ await invoke$2('Extensions.enableWorkspace', id);
3647
+ };
3648
+ const disableWorkspace = async id => {
3649
+ await invoke$2('Extensions.disableWorkspace', id);
3650
+ };
3640
3651
  const addNodeExtension = async relativePath => {
3641
3652
  // TODO compute absolutePath
3642
3653
  const absolutePath = relativePath;
@@ -3646,6 +3657,8 @@ const addNodeExtension = async relativePath => {
3646
3657
  const Extension = {
3647
3658
  addNodeExtension,
3648
3659
  addWebExtension,
3660
+ disableWorkspace,
3661
+ enableWorkspace,
3649
3662
  executeCompletionProvider,
3650
3663
  executeFormattingProvider
3651
3664
  };
@@ -4266,9 +4279,6 @@ const shouldHaveCommit = async message => {
4266
4279
  throw new Error(`Expected commit message to be "${message}", but got "${commits[0].message}"`);
4267
4280
  }
4268
4281
  };
4269
- const shouldHaveInvocations = async invocations => {
4270
- // TODO
4271
- };
4272
4282
 
4273
4283
  const Git = {
4274
4284
  add,
@@ -4304,7 +4314,6 @@ const Git = {
4304
4314
  setOrigin,
4305
4315
  setUpstream,
4306
4316
  shouldHaveCommit,
4307
- shouldHaveInvocations,
4308
4317
  stage,
4309
4318
  stash,
4310
4319
  status,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/test-worker",
3
- "version": "16.8.0",
3
+ "version": "17.0.0",
4
4
  "description": "Test Worker",
5
5
  "repository": {
6
6
  "type": "git",