|
1 | 1 | /** |
2 | | - * @module ApiFactory |
3 | | - * @description The main module for the `ApiFactory` service, which is |
| 2 | + * @module APIFactory |
| 3 | + * @description The main module for the `APIFactory` service, which is |
4 | 4 | * responsible for creating sandboxed `vscode` API objects for extensions. |
5 | 5 | */ |
6 | 6 |
|
7 | 7 | import { Context, Effect, Layer } from "effect"; |
8 | 8 | import type { IExtensionDescription } from "vs/platform/extensions/common/extensions.js"; |
9 | | -import type * as Vscode from "vscode"; |
| 9 | +import type * as VSCode from "vscode"; |
10 | 10 |
|
11 | 11 | import * as Service from "../../Service.js"; |
12 | | -import { CreateApiFactory } from "./CreateApiFactory.js"; |
| 12 | +import { CreateAPIFactory } from "./CreateAPIFactory.js"; |
13 | 13 |
|
14 | 14 | /** |
15 | | - * The interface for the `ApiFactory` service. |
| 15 | + * The interface for the `APIFactory` service. |
16 | 16 | */ |
17 | 17 | export interface Interface { |
18 | 18 | /** |
19 | 19 | * Creates a new, sandboxed `vscode` API object for a specific extension. |
20 | 20 | * @param Extension The full description of the extension requesting the API. |
21 | 21 | * @returns A frozen `vscode` API object tailored for the extension. |
22 | 22 | */ |
23 | | - readonly Create: (Extension: IExtensionDescription) => typeof Vscode; |
| 23 | + readonly Create: (Extension: IExtensionDescription) => typeof VSCode; |
24 | 24 | } |
25 | 25 |
|
26 | 26 | /** |
27 | | - * The `Context.Tag` for the `ApiFactory` service. |
| 27 | + * The `Context.Tag` for the `APIFactory` service. |
28 | 28 | */ |
29 | | -export const Tag = Context.Tag<Interface>("ApiFactory"); |
| 29 | +export const Tag = Context.Tag<Interface>("APIFactory"); |
30 | 30 |
|
31 | 31 | /** |
32 | | - * The live implementation `Layer` for the `ApiFactory` service. |
| 32 | + * The live implementation `Layer` for the `APIFactory` service. |
33 | 33 | * |
34 | 34 | * This layer has a comprehensive dependency graph, as it requires every |
35 | 35 | * underlying service that contributes to the final `vscode` API object. It |
36 | | - * injects all of these services into the `CreateApiFactory` function to |
| 36 | + * injects all of these services into the `CreateAPIFactory` function to |
37 | 37 | * construct the final service implementation. |
38 | 38 | */ |
39 | 39 | export const Live = Layer.effect( |
40 | 40 | Tag, |
41 | 41 | Effect.gen(function* (_) { |
42 | 42 | // --- Inject all necessary services --- |
43 | 43 | const LogService = yield* _(Service.Log.Tag); |
44 | | - const ProposedApiService = yield* _(Service.ProposedApi.Tag); |
45 | | - const DeprecationService = yield* _(Service.ApiDeprecation.Tag); |
46 | | - const CommandsService = yield* _(Service.Commands.Tag); |
47 | | - const WorkspaceService = yield* _(Service.Workspace.Tag); |
| 44 | + const ProposedAPIService = yield* _(Service.ProposedAPI.Tag); |
| 45 | + const DeprecationService = yield* _(Service.APIDeprecation.Tag); |
| 46 | + const CommandService = yield* _(Service.Command.Tag); |
| 47 | + const WorkSpaceService = yield* _(Service.WorkSpace.Tag); |
48 | 48 | const WindowService = yield* _(Service.Window.Tag); |
49 | 49 | const LanguageFeaturesService = yield* _(Service.LanguageFeatures.Tag); |
50 | 50 | const DebugService = yield* _(Service.Debug.Tag); |
51 | 51 | const TasksService = yield* _(Service.Tasks.Tag); |
52 | 52 | const ExtensionService = yield* _(Service.Extension.Tag); |
53 | | - const WebviewPanelService = yield* _(Service.WebviewPanel.Tag); |
| 53 | + const WebViewPanelService = yield* _(Service.WebViewPanel.Tag); |
54 | 54 | const CustomEditorService = yield* _(Service.CustomEditor.Tag); |
55 | 55 | const TreeViewService = yield* _(Service.TreeView.Tag); |
56 | 56 | const StatusBarService = yield* _(Service.StatusBar.Tag); |
57 | 57 | // Add other services here as they are implemented. |
58 | 58 |
|
59 | 59 | // --- Construct the factory with all its dependencies --- |
60 | | - return CreateApiFactory( |
| 60 | + return CreateAPIFactory( |
61 | 61 | LogService, |
62 | | - ProposedApiService, |
| 62 | + ProposedAPIService, |
63 | 63 | DeprecationService, |
64 | | - CommandsService, |
65 | | - WorkspaceService, |
| 64 | + CommandService, |
| 65 | + WorkSpaceService, |
66 | 66 | WindowService, |
67 | 67 | LanguageFeaturesService, |
68 | 68 | DebugService, |
69 | 69 | TasksService, |
70 | 70 | ExtensionService, |
71 | | - WebviewPanelService, |
| 71 | + WebViewPanelService, |
72 | 72 | CustomEditorService, |
73 | 73 | TreeViewService, |
74 | 74 | StatusBarService, |
|
0 commit comments