@theia/plugin-ext 1.45.1 → 1.46.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.
Files changed (291) hide show
  1. package/lib/common/plugin-api-rpc.d.ts +9 -4
  2. package/lib/common/plugin-api-rpc.d.ts.map +1 -1
  3. package/lib/common/plugin-api-rpc.js +3 -1
  4. package/lib/common/plugin-api-rpc.js.map +1 -1
  5. package/lib/common/plugin-ext-api-contribution.d.ts +35 -5
  6. package/lib/common/plugin-ext-api-contribution.d.ts.map +1 -1
  7. package/lib/common/plugin-ext-api-contribution.js.map +1 -1
  8. package/lib/common/plugin-protocol.d.ts +5 -2
  9. package/lib/common/plugin-protocol.d.ts.map +1 -1
  10. package/lib/common/plugin-protocol.js +1 -0
  11. package/lib/common/plugin-protocol.js.map +1 -1
  12. package/lib/common/proxy-handler.d.ts +7 -0
  13. package/lib/common/proxy-handler.d.ts.map +1 -1
  14. package/lib/common/proxy-handler.js +5 -1
  15. package/lib/common/proxy-handler.js.map +1 -1
  16. package/lib/common/rpc-protocol.d.ts +10 -0
  17. package/lib/common/rpc-protocol.d.ts.map +1 -1
  18. package/lib/common/rpc-protocol.js +32 -3
  19. package/lib/common/rpc-protocol.js.map +1 -1
  20. package/lib/hosted/browser/hosted-plugin.d.ts +16 -74
  21. package/lib/hosted/browser/hosted-plugin.d.ts.map +1 -1
  22. package/lib/hosted/browser/hosted-plugin.js +41 -314
  23. package/lib/hosted/browser/hosted-plugin.js.map +1 -1
  24. package/lib/hosted/browser/worker/debug-stub.d.ts +2 -2
  25. package/lib/hosted/browser/worker/debug-stub.d.ts.map +1 -1
  26. package/lib/hosted/browser/worker/debug-stub.js +3 -3
  27. package/lib/hosted/browser/worker/debug-stub.js.map +1 -1
  28. package/lib/hosted/browser/worker/worker-env-ext.d.ts +1 -2
  29. package/lib/hosted/browser/worker/worker-env-ext.d.ts.map +1 -1
  30. package/lib/hosted/browser/worker/worker-env-ext.js +18 -4
  31. package/lib/hosted/browser/worker/worker-env-ext.js.map +1 -1
  32. package/lib/hosted/browser/worker/worker-main.js +20 -32
  33. package/lib/hosted/browser/worker/worker-main.js.map +1 -1
  34. package/lib/hosted/browser/worker/worker-plugin-module.d.ts +5 -0
  35. package/lib/hosted/browser/worker/worker-plugin-module.d.ts.map +1 -0
  36. package/lib/hosted/browser/worker/worker-plugin-module.js +71 -0
  37. package/lib/hosted/browser/worker/worker-plugin-module.js.map +1 -0
  38. package/lib/hosted/common/hosted-plugin.d.ts +97 -0
  39. package/lib/hosted/common/hosted-plugin.d.ts.map +1 -0
  40. package/lib/hosted/common/hosted-plugin.js +408 -0
  41. package/lib/hosted/common/hosted-plugin.js.map +1 -0
  42. package/lib/hosted/node/hosted-plugin-process.d.ts +1 -1
  43. package/lib/hosted/node/hosted-plugin-process.d.ts.map +1 -1
  44. package/lib/hosted/node/hosted-plugin-process.js +2 -2
  45. package/lib/hosted/node/hosted-plugin-process.js.map +1 -1
  46. package/lib/hosted/node/plugin-ext-hosted-backend-module.d.ts.map +1 -1
  47. package/lib/hosted/node/plugin-ext-hosted-backend-module.js +2 -0
  48. package/lib/hosted/node/plugin-ext-hosted-backend-module.js.map +1 -1
  49. package/lib/hosted/node/plugin-host-module.d.ts +5 -0
  50. package/lib/hosted/node/plugin-host-module.d.ts.map +1 -0
  51. package/lib/hosted/node/plugin-host-module.js +68 -0
  52. package/lib/hosted/node/plugin-host-module.js.map +1 -0
  53. package/lib/hosted/node/plugin-host-rpc.d.ts +93 -7
  54. package/lib/hosted/node/plugin-host-rpc.d.ts.map +1 -1
  55. package/lib/hosted/node/plugin-host-rpc.js +202 -53
  56. package/lib/hosted/node/plugin-host-rpc.js.map +1 -1
  57. package/lib/hosted/node/plugin-host.js +6 -5
  58. package/lib/hosted/node/plugin-host.js.map +1 -1
  59. package/lib/hosted/node/plugin-reader.d.ts.map +1 -1
  60. package/lib/hosted/node/plugin-reader.js +3 -0
  61. package/lib/hosted/node/plugin-reader.js.map +1 -1
  62. package/lib/hosted/node/plugin-service.d.ts +8 -0
  63. package/lib/hosted/node/plugin-service.d.ts.map +1 -1
  64. package/lib/hosted/node/plugin-service.js +14 -4
  65. package/lib/hosted/node/plugin-service.js.map +1 -1
  66. package/lib/hosted/node/scanners/file-plugin-uri-factory.js +1 -1
  67. package/lib/hosted/node/scanners/file-plugin-uri-factory.js.map +1 -1
  68. package/lib/hosted/node/scanners/scanner-theia.d.ts +17 -3
  69. package/lib/hosted/node/scanners/scanner-theia.d.ts.map +1 -1
  70. package/lib/hosted/node/scanners/scanner-theia.js +48 -19
  71. package/lib/hosted/node/scanners/scanner-theia.js.map +1 -1
  72. package/lib/main/browser/authentication-main.d.ts.map +1 -1
  73. package/lib/main/browser/authentication-main.js +3 -1
  74. package/lib/main/browser/authentication-main.js.map +1 -1
  75. package/lib/main/browser/env-main.d.ts +1 -10
  76. package/lib/main/browser/env-main.d.ts.map +1 -1
  77. package/lib/main/browser/env-main.js +2 -21
  78. package/lib/main/browser/env-main.js.map +1 -1
  79. package/lib/main/browser/menus/menus-contribution-handler.d.ts.map +1 -1
  80. package/lib/main/browser/menus/menus-contribution-handler.js +6 -3
  81. package/lib/main/browser/menus/menus-contribution-handler.js.map +1 -1
  82. package/lib/main/browser/menus/plugin-menu-command-adapter.js +1 -1
  83. package/lib/main/browser/menus/plugin-menu-command-adapter.js.map +1 -1
  84. package/lib/main/browser/message-registry-main.d.ts +6 -4
  85. package/lib/main/browser/message-registry-main.d.ts.map +1 -1
  86. package/lib/main/browser/message-registry-main.js +7 -19
  87. package/lib/main/browser/message-registry-main.js.map +1 -1
  88. package/lib/main/browser/notebooks/renderers/cell-output-webview.d.ts +1 -0
  89. package/lib/main/browser/notebooks/renderers/cell-output-webview.d.ts.map +1 -1
  90. package/lib/main/browser/notebooks/renderers/cell-output-webview.js +23 -22
  91. package/lib/main/browser/notebooks/renderers/cell-output-webview.js.map +1 -1
  92. package/lib/main/browser/notebooks/renderers/output-webview-internal.d.ts.map +1 -1
  93. package/lib/main/browser/notebooks/renderers/output-webview-internal.js +22 -14
  94. package/lib/main/browser/notebooks/renderers/output-webview-internal.js.map +1 -1
  95. package/lib/main/browser/notebooks/renderers/webview-communication.d.ts +2 -1
  96. package/lib/main/browser/notebooks/renderers/webview-communication.d.ts.map +1 -1
  97. package/lib/main/browser/notification-main.d.ts +2 -14
  98. package/lib/main/browser/notification-main.d.ts.map +1 -1
  99. package/lib/main/browser/notification-main.js +3 -52
  100. package/lib/main/browser/notification-main.js.map +1 -1
  101. package/lib/main/browser/terminal-main.d.ts +1 -1
  102. package/lib/main/browser/terminal-main.d.ts.map +1 -1
  103. package/lib/main/browser/terminal-main.js +2 -2
  104. package/lib/main/browser/terminal-main.js.map +1 -1
  105. package/lib/main/browser/view/plugin-view-registry.d.ts.map +1 -1
  106. package/lib/main/browser/view/plugin-view-registry.js +5 -2
  107. package/lib/main/browser/view/plugin-view-registry.js.map +1 -1
  108. package/lib/main/browser/webview/webview-context-keys.d.ts +5 -1
  109. package/lib/main/browser/webview/webview-context-keys.d.ts.map +1 -1
  110. package/lib/main/browser/webview/webview-context-keys.js +13 -4
  111. package/lib/main/browser/webview/webview-context-keys.js.map +1 -1
  112. package/lib/main/browser/webview/webview-widget-factory.d.ts.map +1 -1
  113. package/lib/main/browser/webview/webview-widget-factory.js +2 -1
  114. package/lib/main/browser/webview/webview-widget-factory.js.map +1 -1
  115. package/lib/main/browser/webview/webview.d.ts +1 -0
  116. package/lib/main/browser/webview/webview.d.ts.map +1 -1
  117. package/lib/main/browser/webview/webview.js +1 -0
  118. package/lib/main/browser/webview/webview.js.map +1 -1
  119. package/lib/main/browser/webviews-main.d.ts.map +1 -1
  120. package/lib/main/browser/webviews-main.js +7 -2
  121. package/lib/main/browser/webviews-main.js.map +1 -1
  122. package/lib/main/common/basic-message-registry-main.d.ts +14 -0
  123. package/lib/main/common/basic-message-registry-main.d.ts.map +1 -0
  124. package/lib/main/common/basic-message-registry-main.js +50 -0
  125. package/lib/main/common/basic-message-registry-main.js.map +1 -0
  126. package/lib/main/common/basic-notification-main.d.ts +19 -0
  127. package/lib/main/common/basic-notification-main.d.ts.map +1 -0
  128. package/lib/main/common/basic-notification-main.js +75 -0
  129. package/lib/main/common/basic-notification-main.js.map +1 -0
  130. package/lib/main/common/env-main.d.ts +11 -0
  131. package/lib/main/common/env-main.d.ts.map +1 -0
  132. package/lib/main/common/env-main.js +40 -0
  133. package/lib/main/common/env-main.js.map +1 -0
  134. package/lib/main/node/handlers/plugin-theia-directory-handler.d.ts +8 -3
  135. package/lib/main/node/handlers/plugin-theia-directory-handler.d.ts.map +1 -1
  136. package/lib/main/node/handlers/plugin-theia-directory-handler.js +38 -20
  137. package/lib/main/node/handlers/plugin-theia-directory-handler.js.map +1 -1
  138. package/lib/main/node/handlers/plugin-theia-file-handler.js +1 -1
  139. package/lib/main/node/handlers/plugin-theia-file-handler.js.map +1 -1
  140. package/lib/main/node/plugin-deployer-impl.d.ts.map +1 -1
  141. package/lib/main/node/plugin-deployer-impl.js +5 -1
  142. package/lib/main/node/plugin-deployer-impl.js.map +1 -1
  143. package/lib/main/node/plugins-key-value-storage.js +1 -1
  144. package/lib/main/node/plugins-key-value-storage.js.map +1 -1
  145. package/lib/plugin/clipboard-ext.d.ts +3 -2
  146. package/lib/plugin/clipboard-ext.d.ts.map +1 -1
  147. package/lib/plugin/clipboard-ext.js +28 -4
  148. package/lib/plugin/clipboard-ext.js.map +1 -1
  149. package/lib/plugin/debug/debug-ext.d.ts +3 -1
  150. package/lib/plugin/debug/debug-ext.d.ts.map +1 -1
  151. package/lib/plugin/debug/debug-ext.js +31 -4
  152. package/lib/plugin/debug/debug-ext.js.map +1 -1
  153. package/lib/plugin/documents.js +2 -2
  154. package/lib/plugin/documents.js.map +1 -1
  155. package/lib/plugin/editors-and-documents.d.ts +1 -2
  156. package/lib/plugin/editors-and-documents.d.ts.map +1 -1
  157. package/lib/plugin/editors-and-documents.js +21 -4
  158. package/lib/plugin/editors-and-documents.js.map +1 -1
  159. package/lib/plugin/env.d.ts +6 -2
  160. package/lib/plugin/env.d.ts.map +1 -1
  161. package/lib/plugin/env.js +37 -4
  162. package/lib/plugin/env.js.map +1 -1
  163. package/lib/plugin/localization-ext.d.ts +3 -2
  164. package/lib/plugin/localization-ext.d.ts.map +1 -1
  165. package/lib/plugin/localization-ext.js +30 -4
  166. package/lib/plugin/localization-ext.js.map +1 -1
  167. package/lib/plugin/message-registry.d.ts +2 -1
  168. package/lib/plugin/message-registry.d.ts.map +1 -1
  169. package/lib/plugin/message-registry.js +28 -4
  170. package/lib/plugin/message-registry.js.map +1 -1
  171. package/lib/plugin/node/debug/debug.spec.js +21 -1
  172. package/lib/plugin/node/debug/debug.spec.js.map +1 -1
  173. package/lib/plugin/node/env-node-ext.d.ts +1 -6
  174. package/lib/plugin/node/env-node-ext.d.ts.map +1 -1
  175. package/lib/plugin/node/env-node-ext.js +18 -10
  176. package/lib/plugin/node/env-node-ext.js.map +1 -1
  177. package/lib/plugin/node/plugin-container-module.d.ts +75 -0
  178. package/lib/plugin/node/plugin-container-module.d.ts.map +1 -0
  179. package/lib/plugin/node/plugin-container-module.js +115 -0
  180. package/lib/plugin/node/plugin-container-module.js.map +1 -0
  181. package/lib/plugin/notebook/notebook-kernels.d.ts.map +1 -1
  182. package/lib/plugin/notebook/notebook-kernels.js +0 -1
  183. package/lib/plugin/notebook/notebook-kernels.js.map +1 -1
  184. package/lib/plugin/plugin-context.d.ts.map +1 -1
  185. package/lib/plugin/plugin-context.js +9 -1
  186. package/lib/plugin/plugin-context.js.map +1 -1
  187. package/lib/plugin/plugin-manager.d.ts +26 -17
  188. package/lib/plugin/plugin-manager.d.ts.map +1 -1
  189. package/lib/plugin/plugin-manager.js +107 -37
  190. package/lib/plugin/plugin-manager.js.map +1 -1
  191. package/lib/plugin/plugin-storage.d.ts +11 -3
  192. package/lib/plugin/plugin-storage.d.ts.map +1 -1
  193. package/lib/plugin/plugin-storage.js +25 -5
  194. package/lib/plugin/plugin-storage.js.map +1 -1
  195. package/lib/plugin/preference-registry.d.ts +3 -2
  196. package/lib/plugin/preference-registry.d.ts.map +1 -1
  197. package/lib/plugin/preference-registry.js +35 -5
  198. package/lib/plugin/preference-registry.js.map +1 -1
  199. package/lib/plugin/preference-registry.spec.js +8 -1
  200. package/lib/plugin/preference-registry.spec.js.map +1 -1
  201. package/lib/plugin/quick-open.js +3 -3
  202. package/lib/plugin/quick-open.js.map +1 -1
  203. package/lib/plugin/secrets-ext.d.ts +16 -7
  204. package/lib/plugin/secrets-ext.d.ts.map +1 -1
  205. package/lib/plugin/secrets-ext.js +23 -3
  206. package/lib/plugin/secrets-ext.js.map +1 -1
  207. package/lib/plugin/terminal-ext.d.ts +1 -1
  208. package/lib/plugin/terminal-ext.d.ts.map +1 -1
  209. package/lib/plugin/terminal-ext.js +26 -6
  210. package/lib/plugin/terminal-ext.js.map +1 -1
  211. package/lib/plugin/types-impl.d.ts +22 -2
  212. package/lib/plugin/types-impl.d.ts.map +1 -1
  213. package/lib/plugin/types-impl.js +22 -6
  214. package/lib/plugin/types-impl.js.map +1 -1
  215. package/lib/plugin/webview-views.d.ts.map +1 -1
  216. package/lib/plugin/webview-views.js +2 -1
  217. package/lib/plugin/webview-views.js.map +1 -1
  218. package/lib/plugin/webviews.d.ts +7 -5
  219. package/lib/plugin/webviews.d.ts.map +1 -1
  220. package/lib/plugin/webviews.js +46 -12
  221. package/lib/plugin/webviews.js.map +1 -1
  222. package/lib/plugin/workspace.d.ts +4 -3
  223. package/lib/plugin/workspace.d.ts.map +1 -1
  224. package/lib/plugin/workspace.js +40 -6
  225. package/lib/plugin/workspace.js.map +1 -1
  226. package/package.json +29 -29
  227. package/src/common/plugin-api-rpc.ts +10 -6
  228. package/src/common/plugin-ext-api-contribution.ts +38 -5
  229. package/src/common/plugin-protocol.ts +7 -2
  230. package/src/common/proxy-handler.ts +14 -1
  231. package/src/common/rpc-protocol.ts +41 -3
  232. package/src/hosted/browser/hosted-plugin.ts +47 -337
  233. package/src/hosted/browser/worker/debug-stub.ts +4 -3
  234. package/src/hosted/browser/worker/worker-env-ext.ts +5 -4
  235. package/src/hosted/browser/worker/worker-main.ts +103 -115
  236. package/src/hosted/browser/worker/worker-plugin-module.ts +73 -0
  237. package/src/hosted/common/hosted-plugin.ts +456 -0
  238. package/src/hosted/node/hosted-plugin-process.ts +4 -4
  239. package/src/hosted/node/plugin-ext-hosted-backend-module.ts +3 -1
  240. package/src/hosted/node/plugin-host-module.ts +69 -0
  241. package/src/hosted/node/plugin-host-rpc.ts +232 -73
  242. package/src/hosted/node/plugin-host.ts +9 -7
  243. package/src/hosted/node/plugin-reader.ts +3 -0
  244. package/src/hosted/node/plugin-service.ts +21 -4
  245. package/src/hosted/node/scanners/file-plugin-uri-factory.ts +1 -1
  246. package/src/hosted/node/scanners/scanner-theia.ts +46 -12
  247. package/src/main/browser/authentication-main.ts +3 -1
  248. package/src/main/browser/env-main.ts +1 -28
  249. package/src/main/browser/menus/menus-contribution-handler.ts +8 -3
  250. package/src/main/browser/menus/plugin-menu-command-adapter.ts +1 -1
  251. package/src/main/browser/message-registry-main.ts +10 -23
  252. package/src/main/browser/notebooks/renderers/cell-output-webview.tsx +26 -24
  253. package/src/main/browser/notebooks/renderers/output-webview-internal.ts +22 -13
  254. package/src/main/browser/notebooks/renderers/webview-communication.ts +2 -1
  255. package/src/main/browser/notification-main.ts +4 -64
  256. package/src/main/browser/terminal-main.ts +2 -2
  257. package/src/main/browser/view/plugin-view-registry.ts +6 -3
  258. package/src/main/browser/webview/webview-context-keys.ts +17 -4
  259. package/src/main/browser/webview/webview-widget-factory.ts +2 -1
  260. package/src/main/browser/webview/webview.ts +2 -0
  261. package/src/main/browser/webviews-main.ts +7 -2
  262. package/src/main/common/basic-message-registry-main.ts +53 -0
  263. package/src/main/common/basic-notification-main.ts +86 -0
  264. package/src/main/common/env-main.ts +44 -0
  265. package/src/main/node/handlers/plugin-theia-directory-handler.ts +38 -16
  266. package/src/main/node/handlers/plugin-theia-file-handler.ts +1 -1
  267. package/src/main/node/plugin-deployer-impl.ts +5 -1
  268. package/src/main/node/plugins-key-value-storage.ts +1 -1
  269. package/src/plugin/clipboard-ext.ts +9 -3
  270. package/src/plugin/debug/debug-ext.ts +11 -2
  271. package/src/plugin/documents.ts +2 -2
  272. package/src/plugin/editors-and-documents.ts +5 -3
  273. package/src/plugin/env.ts +19 -3
  274. package/src/plugin/localization-ext.ts +8 -3
  275. package/src/plugin/message-registry.ts +7 -2
  276. package/src/plugin/node/debug/debug.spec.ts +5 -1
  277. package/src/plugin/node/env-node-ext.ts +5 -10
  278. package/src/plugin/node/plugin-container-module.ts +165 -0
  279. package/src/plugin/notebook/notebook-kernels.ts +0 -1
  280. package/src/plugin/plugin-context.ts +11 -2
  281. package/src/plugin/plugin-manager.ts +99 -45
  282. package/src/plugin/plugin-storage.ts +22 -4
  283. package/src/plugin/preference-registry.spec.ts +6 -1
  284. package/src/plugin/preference-registry.ts +11 -5
  285. package/src/plugin/quick-open.ts +3 -3
  286. package/src/plugin/secrets-ext.ts +25 -5
  287. package/src/plugin/terminal-ext.ts +5 -3
  288. package/src/plugin/types-impl.ts +30 -2
  289. package/src/plugin/webview-views.ts +2 -1
  290. package/src/plugin/webviews.ts +22 -13
  291. package/src/plugin/workspace.ts +14 -4
@@ -0,0 +1,86 @@
1
+ // *****************************************************************************
2
+ // Copyright (C) 2018 Red Hat, Inc. and others.
3
+ //
4
+ // This program and the accompanying materials are made available under the
5
+ // terms of the Eclipse Public License v. 2.0 which is available at
6
+ // http://www.eclipse.org/legal/epl-2.0.
7
+ //
8
+ // This Source Code may also be made available under the following Secondary
9
+ // Licenses when the conditions for such availability set forth in the Eclipse
10
+ // Public License v. 2.0 are satisfied: GNU General Public License, version 2
11
+ // with the GNU Classpath Exception which is available at
12
+ // https://www.gnu.org/software/classpath/license.html.
13
+ //
14
+ // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
15
+ // *****************************************************************************
16
+
17
+ import { NotificationExt, NotificationMain } from '../../common';
18
+ import { ProgressService, Progress, ProgressMessage } from '@theia/core/lib/common';
19
+ import { interfaces } from '@theia/core/shared/inversify';
20
+ import { ProxyIdentifier, RPCProtocol } from '../../common/rpc-protocol';
21
+ import { Disposable, DisposableCollection } from '@theia/core/lib/common/disposable';
22
+
23
+ export class BasicNotificationMainImpl implements NotificationMain, Disposable {
24
+ protected readonly progressService: ProgressService;
25
+ protected readonly progressMap = new Map<string, Progress>();
26
+ protected readonly progress2Work = new Map<string, number>();
27
+ protected readonly proxy: NotificationExt;
28
+
29
+ protected readonly toDispose = new DisposableCollection(
30
+ Disposable.create(() => { /* mark as not disposed */ })
31
+ );
32
+
33
+ constructor(rpc: RPCProtocol, container: interfaces.Container, extIdentifier: ProxyIdentifier<NotificationExt>) {
34
+ this.progressService = container.get(ProgressService);
35
+ this.proxy = rpc.getProxy(extIdentifier);
36
+ }
37
+
38
+ dispose(): void {
39
+ this.toDispose.dispose();
40
+ }
41
+
42
+ async $startProgress(options: NotificationMain.StartProgressOptions): Promise<string> {
43
+ const onDidCancel = () => {
44
+ // If the map does not contain current id, it has already stopped and should not be cancelled
45
+ if (this.progressMap.has(id)) {
46
+ this.proxy.$acceptProgressCanceled(id);
47
+ }
48
+ };
49
+
50
+ const progressMessage = this.mapOptions(options);
51
+ const progress = await this.progressService.showProgress(progressMessage, onDidCancel);
52
+ const id = progress.id;
53
+ this.progressMap.set(id, progress);
54
+ this.progress2Work.set(id, 0);
55
+ if (this.toDispose.disposed) {
56
+ this.$stopProgress(id);
57
+ } else {
58
+ this.toDispose.push(Disposable.create(() => this.$stopProgress(id)));
59
+ }
60
+ return id;
61
+ }
62
+ protected mapOptions(options: NotificationMain.StartProgressOptions): ProgressMessage {
63
+ const { title, location, cancellable } = options;
64
+ return { text: title, options: { location, cancelable: cancellable } };
65
+ }
66
+
67
+ $stopProgress(id: string): void {
68
+ const progress = this.progressMap.get(id);
69
+
70
+ if (progress) {
71
+ this.progressMap.delete(id);
72
+ this.progress2Work.delete(id);
73
+ progress.cancel();
74
+ }
75
+ }
76
+
77
+ $updateProgress(id: string, item: NotificationMain.ProgressReport): void {
78
+ const progress = this.progressMap.get(id);
79
+ if (!progress) {
80
+ return;
81
+ }
82
+ const done = Math.min((this.progress2Work.get(id) || 0) + (item.increment || 0), 100);
83
+ this.progress2Work.set(id, done);
84
+ progress.report({ message: item.message, work: done ? { done, total: 100 } : undefined });
85
+ }
86
+ }
@@ -0,0 +1,44 @@
1
+ // *****************************************************************************
2
+ // Copyright (C) 2018 Red Hat, Inc. and others.
3
+ //
4
+ // This program and the accompanying materials are made available under the
5
+ // terms of the Eclipse Public License v. 2.0 which is available at
6
+ // http://www.eclipse.org/legal/epl-2.0.
7
+ //
8
+ // This Source Code may also be made available under the following Secondary
9
+ // Licenses when the conditions for such availability set forth in the Eclipse
10
+ // Public License v. 2.0 are satisfied: GNU General Public License, version 2
11
+ // with the GNU Classpath Exception which is available at
12
+ // https://www.gnu.org/software/classpath/license.html.
13
+ //
14
+ // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
15
+ // *****************************************************************************
16
+
17
+ import { interfaces } from '@theia/core/shared/inversify';
18
+ import { EnvVariablesServer } from '@theia/core/lib/common/env-variables';
19
+ import { RPCProtocol } from '../../common/rpc-protocol';
20
+ import { EnvMain } from '../../common/plugin-api-rpc';
21
+ import { isWindows, isOSX } from '@theia/core';
22
+ import { OperatingSystem } from '../../plugin/types-impl';
23
+
24
+ export class EnvMainImpl implements EnvMain {
25
+ private envVariableServer: EnvVariablesServer;
26
+
27
+ constructor(rpc: RPCProtocol, container: interfaces.Container) {
28
+ this.envVariableServer = container.get(EnvVariablesServer);
29
+ }
30
+
31
+ $getEnvVariable(envVarName: string): Promise<string | undefined> {
32
+ return this.envVariableServer.getValue(envVarName).then(result => result ? result.value : undefined);
33
+ }
34
+
35
+ async $getClientOperatingSystem(): Promise<OperatingSystem> {
36
+ if (isWindows) {
37
+ return OperatingSystem.Windows;
38
+ }
39
+ if (isOSX) {
40
+ return OperatingSystem.OSX;
41
+ }
42
+ return OperatingSystem.Linux;
43
+ }
44
+ }
@@ -28,7 +28,7 @@ import { PluginCliContribution } from '../plugin-cli-contribution';
28
28
  import { getTempDirPathAsync } from '../temp-dir-util';
29
29
 
30
30
  @injectable()
31
- export class PluginTheiaDirectoryHandler implements PluginDeployerDirectoryHandler {
31
+ export abstract class AbstractPluginDirectoryHandler implements PluginDeployerDirectoryHandler {
32
32
 
33
33
  protected readonly deploymentDirectory: Deferred<URI>;
34
34
 
@@ -42,15 +42,20 @@ export class PluginTheiaDirectoryHandler implements PluginDeployerDirectoryHandl
42
42
 
43
43
  async accept(resolvedPlugin: PluginDeployerEntry): Promise<boolean> {
44
44
 
45
- console.debug('PluginTheiaDirectoryHandler: accepting plugin with path', resolvedPlugin.path());
45
+ console.debug(`Plugin directory handler: accepting plugin with path ${resolvedPlugin.path()}`);
46
46
 
47
47
  // handle only directories
48
48
  if (await resolvedPlugin.isFile()) {
49
49
  return false;
50
50
  }
51
51
 
52
+ // Was this directory unpacked from an NPM tarball?
53
+ const wasTarball = resolvedPlugin.originalPath().endsWith('.tgz');
54
+ const rootPath = resolvedPlugin.path();
55
+ const basePath = wasTarball ? path.resolve(rootPath, 'package') : rootPath;
56
+
52
57
  // is there a package.json ?
53
- const packageJsonPath = path.resolve(resolvedPlugin.path(), 'package.json');
58
+ const packageJsonPath = path.resolve(basePath, 'package.json');
54
59
 
55
60
  try {
56
61
  let packageJson = resolvedPlugin.getValue<PluginPackage>('package.json');
@@ -60,26 +65,20 @@ export class PluginTheiaDirectoryHandler implements PluginDeployerDirectoryHandl
60
65
  resolvedPlugin.storeValue('package.json', packageJson);
61
66
  }
62
67
 
63
- if (packageJson?.engines?.theiaPlugin) {
68
+ if (this.acceptManifest(packageJson)) {
69
+ if (wasTarball) {
70
+ resolvedPlugin.updatePath(basePath);
71
+ resolvedPlugin.rootPath = rootPath;
72
+ }
64
73
  return true;
65
74
  }
66
75
  } catch { /* Failed to read file. Fall through. */ }
67
76
  return false;
68
77
  }
69
78
 
70
- async handle(context: PluginDeployerDirectoryHandlerContext): Promise<void> {
71
- await this.copyDirectory(context);
72
- const types: PluginDeployerEntryType[] = [];
73
- const packageJson = context.pluginEntry().getValue<PluginPackage>('package.json');
74
- if (packageJson.theiaPlugin && packageJson.theiaPlugin.backend) {
75
- types.push(PluginDeployerEntryType.BACKEND);
76
- }
77
- if (packageJson.theiaPlugin && packageJson.theiaPlugin.frontend) {
78
- types.push(PluginDeployerEntryType.FRONTEND);
79
- }
79
+ protected abstract acceptManifest(plugin: PluginPackage): boolean;
80
80
 
81
- context.pluginEntry().accept(...types);
82
- }
81
+ abstract handle(context: PluginDeployerDirectoryHandlerContext): Promise<void>;
83
82
 
84
83
  protected async copyDirectory(context: PluginDeployerDirectoryHandlerContext): Promise<void> {
85
84
  if (this.pluginCli.copyUncompressedPlugins() && context.pluginEntry().type === PluginType.User) {
@@ -112,4 +111,27 @@ export class PluginTheiaDirectoryHandler implements PluginDeployerDirectoryHandl
112
111
  const deploymentDirectory = await this.deploymentDirectory.promise;
113
112
  return FileUri.fsPath(deploymentDirectory.resolve(filenamify(context.pluginEntry().id(), { replacement: '_' })));
114
113
  }
114
+
115
+ }
116
+
117
+ @injectable()
118
+ export class PluginTheiaDirectoryHandler extends AbstractPluginDirectoryHandler {
119
+
120
+ protected acceptManifest(plugin: PluginPackage): boolean {
121
+ return plugin?.engines?.theiaPlugin !== undefined;
122
+ }
123
+
124
+ async handle(context: PluginDeployerDirectoryHandlerContext): Promise<void> {
125
+ await this.copyDirectory(context);
126
+ const types: PluginDeployerEntryType[] = [];
127
+ const packageJson = context.pluginEntry().getValue<PluginPackage>('package.json');
128
+ if (packageJson.theiaPlugin && packageJson.theiaPlugin.backend) {
129
+ types.push(PluginDeployerEntryType.BACKEND);
130
+ }
131
+ if (packageJson.theiaPlugin && packageJson.theiaPlugin.frontend) {
132
+ types.push(PluginDeployerEntryType.FRONTEND);
133
+ }
134
+
135
+ context.pluginEntry().accept(...types);
136
+ }
115
137
  }
@@ -21,7 +21,7 @@ import { Deferred } from '@theia/core/lib/common/promise-util';
21
21
  import { getTempDirPathAsync } from '../temp-dir-util';
22
22
  import * as fs from '@theia/core/shared/fs-extra';
23
23
  import * as filenamify from 'filenamify';
24
- import { FileUri } from '@theia/core/lib/node/file-uri';
24
+ import { FileUri } from '@theia/core/lib/common/file-uri';
25
25
  import { PluginTheiaEnvironment } from '../../common/plugin-theia-environment';
26
26
 
27
27
  @injectable()
@@ -271,20 +271,24 @@ export class PluginDeployerImpl implements PluginDeployer {
271
271
  const acceptedPlugins = pluginsToDeploy.filter(pluginDeployerEntry => pluginDeployerEntry.isAccepted());
272
272
  const acceptedFrontendPlugins = pluginsToDeploy.filter(pluginDeployerEntry => pluginDeployerEntry.isAccepted(PluginDeployerEntryType.FRONTEND));
273
273
  const acceptedBackendPlugins = pluginsToDeploy.filter(pluginDeployerEntry => pluginDeployerEntry.isAccepted(PluginDeployerEntryType.BACKEND));
274
+ const acceptedHeadlessPlugins = pluginsToDeploy.filter(pluginDeployerEntry => pluginDeployerEntry.isAccepted(PluginDeployerEntryType.HEADLESS));
274
275
 
275
276
  this.logger.debug('the accepted plugins are', acceptedPlugins);
276
277
  this.logger.debug('the acceptedFrontendPlugins plugins are', acceptedFrontendPlugins);
277
278
  this.logger.debug('the acceptedBackendPlugins plugins are', acceptedBackendPlugins);
279
+ this.logger.debug('the acceptedHeadlessPlugins plugins are', acceptedHeadlessPlugins);
278
280
 
279
281
  acceptedPlugins.forEach(plugin => {
280
282
  this.logger.debug('will deploy plugin', plugin.id(), 'with changes', JSON.stringify(plugin.getChanges()), 'and this plugin has been resolved by', plugin.resolvedBy());
281
283
  });
282
284
 
283
285
  // local path to launch
284
- const pluginPaths = acceptedBackendPlugins.map(pluginEntry => pluginEntry.path());
286
+ const pluginPaths = [...acceptedBackendPlugins, ...acceptedHeadlessPlugins].map(pluginEntry => pluginEntry.path());
285
287
  this.logger.debug('local path to deploy on remote instance', pluginPaths);
286
288
 
287
289
  const deployments = await Promise.all([
290
+ // headless plugins are deployed like backend plugins
291
+ this.pluginDeployerHandler.deployBackendPlugins(acceptedHeadlessPlugins),
288
292
  // start the backend plugins
289
293
  this.pluginDeployerHandler.deployBackendPlugins(acceptedBackendPlugins),
290
294
  this.pluginDeployerHandler.deployFrontendPlugins(acceptedFrontendPlugins)
@@ -18,7 +18,7 @@ import { injectable, inject, postConstruct } from '@theia/core/shared/inversify'
18
18
  import { FileSystemLocking } from '@theia/core/lib/node';
19
19
  import * as fs from '@theia/core/shared/fs-extra';
20
20
  import * as path from 'path';
21
- import { FileUri } from '@theia/core/lib/node/file-uri';
21
+ import { FileUri } from '@theia/core/lib/common/file-uri';
22
22
  import { Deferred } from '@theia/core/lib/common/promise-util';
23
23
  import { EnvVariablesServer } from '@theia/core/lib/common/env-variables';
24
24
  import { PluginPaths } from './paths/const';
@@ -15,15 +15,21 @@
15
15
  // *****************************************************************************
16
16
 
17
17
  import * as theia from '@theia/plugin';
18
+ import { inject, injectable, postConstruct } from '@theia/core/shared/inversify';
18
19
  import { RPCProtocol } from '../common/rpc-protocol';
19
20
  import { PLUGIN_RPC_CONTEXT, ClipboardMain } from '../common';
20
21
 
22
+ @injectable()
21
23
  export class ClipboardExt implements theia.Clipboard {
22
24
 
23
- protected readonly proxy: ClipboardMain;
25
+ @inject(RPCProtocol)
26
+ protected readonly rpc: RPCProtocol;
24
27
 
25
- constructor(rpc: RPCProtocol) {
26
- this.proxy = rpc.getProxy(PLUGIN_RPC_CONTEXT.CLIPBOARD_MAIN);
28
+ protected proxy: ClipboardMain;
29
+
30
+ @postConstruct()
31
+ initialize(): void {
32
+ this.proxy = this.rpc.getProxy(PLUGIN_RPC_CONTEXT.CLIPBOARD_MAIN);
27
33
  }
28
34
 
29
35
  readText(): Promise<string> {
@@ -13,6 +13,7 @@
13
13
  //
14
14
  // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
15
15
  // *****************************************************************************
16
+ import { inject, injectable, postConstruct } from '@theia/core/shared/inversify';
16
17
  import { Emitter } from '@theia/core/lib/common/event';
17
18
  import { Path } from '@theia/core/lib/common/path';
18
19
  import * as theia from '@theia/plugin';
@@ -43,7 +44,11 @@ interface ConfigurationProviderRecord {
43
44
 
44
45
  /* eslint-disable @typescript-eslint/no-explicit-any */
45
46
 
47
+ @injectable()
46
48
  export class DebugExtImpl implements DebugExt {
49
+ @inject(RPCProtocol)
50
+ protected readonly rpc: RPCProtocol;
51
+
47
52
  // debug sessions by sessionId
48
53
  private sessions = new Map<string, PluginDebugAdapterSession>();
49
54
  private configurationProviderHandleGenerator: number;
@@ -83,8 +88,7 @@ export class DebugExtImpl implements DebugExt {
83
88
  return [...this._breakpoints.values()];
84
89
  }
85
90
 
86
- constructor(rpc: RPCProtocol) {
87
- this.proxy = rpc.getProxy(Ext.DEBUG_MAIN);
91
+ constructor() {
88
92
  this.activeDebugConsole = {
89
93
  append: (value: string) => this.proxy.$appendToDebugConsole(value),
90
94
  appendLine: (value: string) => this.proxy.$appendLineToDebugConsole(value)
@@ -93,6 +97,11 @@ export class DebugExtImpl implements DebugExt {
93
97
  this.configurationProviders = [];
94
98
  }
95
99
 
100
+ @postConstruct()
101
+ initialize(): void {
102
+ this.proxy = this.rpc.getProxy(Ext.DEBUG_MAIN);
103
+ }
104
+
96
105
  /**
97
106
  * Sets dependencies.
98
107
  */
@@ -158,7 +158,7 @@ export class DocumentsExtImpl implements DocumentsExt {
158
158
  const uriString = uri.toString();
159
159
  const data = this.editorsAndDocuments.getDocument(uriString);
160
160
  if (!data) {
161
- throw new Error('unknown document');
161
+ throw new Error('unknown document: ' + uriString);
162
162
  }
163
163
  data.acceptIsDirty(isDirty);
164
164
  this._onDidChangeDocument.fire({
@@ -172,7 +172,7 @@ export class DocumentsExtImpl implements DocumentsExt {
172
172
  const uriString = uri.toString();
173
173
  const data = this.editorsAndDocuments.getDocument(uriString);
174
174
  if (!data) {
175
- throw new Error('unknown document');
175
+ throw new Error('unknown document: ' + uriString);
176
176
  }
177
177
  data.acceptIsDirty(isDirty);
178
178
  data.onEvents(e);
@@ -14,6 +14,7 @@
14
14
  // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
15
15
  // *****************************************************************************
16
16
 
17
+ import { inject, injectable } from '@theia/core/shared/inversify';
17
18
  import { EditorsAndDocumentsExt, EditorsAndDocumentsDelta, PLUGIN_RPC_CONTEXT } from '../common/plugin-api-rpc';
18
19
  import { TextEditorExt } from './text-editor';
19
20
  import { RPCProtocol } from '../common/rpc-protocol';
@@ -24,7 +25,11 @@ import * as Converter from './type-converters';
24
25
  import { dispose } from '../common/disposable-util';
25
26
  import { URI } from './types-impl';
26
27
 
28
+ @injectable()
27
29
  export class EditorsAndDocumentsExtImpl implements EditorsAndDocumentsExt {
30
+ @inject(RPCProtocol)
31
+ protected readonly rpc: RPCProtocol;
32
+
28
33
  private activeEditorId: string | null = null;
29
34
 
30
35
  private readonly _onDidAddDocuments = new Emitter<DocumentDataExt[]>();
@@ -40,9 +45,6 @@ export class EditorsAndDocumentsExtImpl implements EditorsAndDocumentsExt {
40
45
  private readonly documents = new Map<string, DocumentDataExt>();
41
46
  private readonly editors = new Map<string, TextEditorExt>();
42
47
 
43
- constructor(private readonly rpc: RPCProtocol) {
44
- }
45
-
46
48
  async $acceptEditorsAndDocumentsDelta(delta: EditorsAndDocumentsDelta): Promise<void> {
47
49
  const removedDocuments = new Array<DocumentDataExt>();
48
50
  const addedDocuments = new Array<DocumentDataExt>();
package/src/plugin/env.ts CHANGED
@@ -14,13 +14,18 @@
14
14
  // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
15
15
  // *****************************************************************************
16
16
 
17
+ import { inject, injectable, postConstruct } from '@theia/core/shared/inversify';
17
18
  import * as theia from '@theia/plugin';
18
19
  import { RPCProtocol } from '../common/rpc-protocol';
19
20
  import { EnvMain, PLUGIN_RPC_CONTEXT } from '../common/plugin-api-rpc';
20
21
  import { QueryParameters } from '../common/env';
21
22
  import { v4 } from 'uuid';
22
23
 
24
+ @injectable()
23
25
  export abstract class EnvExtImpl {
26
+ @inject(RPCProtocol)
27
+ protected readonly rpc: RPCProtocol;
28
+
24
29
  private proxy: EnvMain;
25
30
  private queryParameters: QueryParameters;
26
31
  private lang: string;
@@ -29,15 +34,20 @@ export abstract class EnvExtImpl {
29
34
  private envMachineId: string;
30
35
  private envSessionId: string;
31
36
  private host: string;
37
+ private applicationRoot: string;
32
38
  private _remoteName: string | undefined;
33
39
 
34
- constructor(rpc: RPCProtocol) {
35
- this.proxy = rpc.getProxy(PLUGIN_RPC_CONTEXT.ENV_MAIN);
40
+ constructor() {
36
41
  this.envSessionId = v4();
37
42
  this.envMachineId = v4();
38
43
  this._remoteName = undefined;
39
44
  }
40
45
 
46
+ @postConstruct()
47
+ initialize(): void {
48
+ this.proxy = this.rpc.getProxy(PLUGIN_RPC_CONTEXT.ENV_MAIN);
49
+ }
50
+
41
51
  getEnvVariable(envVarName: string): Promise<string | undefined> {
42
52
  return this.proxy.$getEnvVariable(envVarName).then(x => {
43
53
  if (x === null) {
@@ -75,6 +85,10 @@ export abstract class EnvExtImpl {
75
85
  this.host = appHost;
76
86
  }
77
87
 
88
+ setAppRoot(appRoot: string): void {
89
+ this.applicationRoot = appRoot;
90
+ }
91
+
78
92
  getClientOperatingSystem(): Promise<theia.OperatingSystem> {
79
93
  return this.proxy.$getClientOperatingSystem();
80
94
  }
@@ -83,7 +97,9 @@ export abstract class EnvExtImpl {
83
97
  return this.applicationName;
84
98
  }
85
99
 
86
- abstract get appRoot(): string;
100
+ get appRoot(): string {
101
+ return this.applicationRoot;
102
+ }
87
103
 
88
104
  abstract get isNewAppInstall(): boolean;
89
105
 
@@ -16,6 +16,7 @@
16
16
 
17
17
  /* eslint-disable @typescript-eslint/no-explicit-any */
18
18
 
19
+ import { inject, injectable, postConstruct } from '@theia/core/shared/inversify';
19
20
  import { nls } from '@theia/core';
20
21
  import { Localization } from '@theia/core/lib/common/i18n/localization';
21
22
  import { LocalizationExt, LocalizationMain, Plugin, PLUGIN_RPC_CONTEXT, StringDetails } from '../common';
@@ -23,15 +24,19 @@ import { LanguagePackBundle } from '../common/language-pack-service';
23
24
  import { RPCProtocol } from '../common/rpc-protocol';
24
25
  import { URI } from './types-impl';
25
26
 
27
+ @injectable()
26
28
  export class LocalizationExtImpl implements LocalizationExt {
29
+ @inject(RPCProtocol)
30
+ protected readonly rpc: RPCProtocol;
27
31
 
28
- private readonly _proxy: LocalizationMain;
32
+ private _proxy: LocalizationMain;
29
33
  private currentLanguage?: string;
30
34
  private isDefaultLanguage = true;
31
35
  private readonly bundleCache = new Map<string, LanguagePackBundle | undefined>();
32
36
 
33
- constructor(rpc: RPCProtocol) {
34
- this._proxy = rpc.getProxy(PLUGIN_RPC_CONTEXT.LOCALIZATION_MAIN);
37
+ @postConstruct()
38
+ initialize(): void {
39
+ this._proxy = this.rpc.getProxy(PLUGIN_RPC_CONTEXT.LOCALIZATION_MAIN);
35
40
  }
36
41
 
37
42
  translateMessage(pluginId: string, details: StringDetails): string {
@@ -13,18 +13,23 @@
13
13
  //
14
14
  // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
15
15
  // *****************************************************************************
16
+ import { inject, injectable, postConstruct } from '@theia/core/shared/inversify';
16
17
  import {
17
18
  PLUGIN_RPC_CONTEXT as Ext, MessageRegistryMain, MainMessageOptions, MainMessageType
18
19
  } from '../common/plugin-api-rpc';
19
20
  import { RPCProtocol } from '../common/rpc-protocol';
20
21
  import { MessageItem, MessageOptions } from '@theia/plugin';
21
22
 
23
+ @injectable()
22
24
  export class MessageRegistryExt {
25
+ @inject(RPCProtocol)
26
+ protected readonly rpc: RPCProtocol;
23
27
 
24
28
  private proxy: MessageRegistryMain;
25
29
 
26
- constructor(rpc: RPCProtocol) {
27
- this.proxy = rpc.getProxy(Ext.MESSAGE_REGISTRY_MAIN);
30
+ @postConstruct()
31
+ initialize(): void {
32
+ this.proxy = this.rpc.getProxy(Ext.MESSAGE_REGISTRY_MAIN);
28
33
  }
29
34
 
30
35
  async showMessage(type: MainMessageType, message: string,
@@ -13,6 +13,7 @@
13
13
  *
14
14
  * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
15
15
  ********************************************************************************/
16
+ import { Container } from '@theia/core/shared/inversify';
16
17
  import { DebugSession } from '@theia/plugin';
17
18
  import * as chai from 'chai';
18
19
  import { ProxyIdentifier, RPCProtocol } from '../../../common/rpc-protocol';
@@ -37,7 +38,10 @@ describe('Debug API', () => {
37
38
  }
38
39
  };
39
40
 
40
- const debug = new DebugExtImpl(mockRPCProtocol);
41
+ const container = new Container();
42
+ container.bind(RPCProtocol).toConstantValue(mockRPCProtocol);
43
+ container.bind(DebugExtImpl).toSelf().inSingletonScope();
44
+ const debug = container.get(DebugExtImpl);
41
45
 
42
46
  it('should use sourceReference, path and sessionId', () => {
43
47
  const source = {
@@ -14,9 +14,9 @@
14
14
  // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
15
15
  // *****************************************************************************
16
16
 
17
+ import { injectable } from '@theia/core/shared/inversify';
17
18
  import * as mac from 'macaddress';
18
19
  import { EnvExtImpl } from '../env';
19
- import { RPCProtocol } from '../../common/rpc-protocol';
20
20
  import { createHash } from 'crypto';
21
21
  import { v4 } from 'uuid';
22
22
  import fs = require('fs');
@@ -25,13 +25,15 @@ import fs = require('fs');
25
25
  * Provides machineId using mac address. It's only possible on node side
26
26
  * Extending the common class
27
27
  */
28
+ @injectable()
28
29
  export class EnvNodeExtImpl extends EnvExtImpl {
29
30
 
30
31
  private macMachineId: string;
31
32
  private _isNewAppInstall: boolean;
32
33
 
33
- constructor(rpc: RPCProtocol) {
34
- super(rpc);
34
+ constructor() {
35
+ super();
36
+
35
37
  mac.one((err, macAddress) => {
36
38
  if (err) {
37
39
  this.macMachineId = v4();
@@ -49,13 +51,6 @@ export class EnvNodeExtImpl extends EnvExtImpl {
49
51
  return this.macMachineId;
50
52
  }
51
53
 
52
- /**
53
- * Provides application root.
54
- */
55
- get appRoot(): string {
56
- return __dirname;
57
- }
58
-
59
54
  get isNewAppInstall(): boolean {
60
55
  return this._isNewAppInstall;
61
56
  }