@theia/plugin-ext 1.27.0-next.4 → 1.27.0-next.41

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 (224) hide show
  1. package/lib/common/connection.d.ts +3 -3
  2. package/lib/common/connection.d.ts.map +1 -1
  3. package/lib/common/connection.js +0 -1
  4. package/lib/common/connection.js.map +1 -1
  5. package/lib/common/plugin-api-rpc.d.ts +20 -11
  6. package/lib/common/plugin-api-rpc.d.ts.map +1 -1
  7. package/lib/common/plugin-api-rpc.js.map +1 -1
  8. package/lib/common/plugin-identifiers.d.ts +41 -0
  9. package/lib/common/plugin-identifiers.d.ts.map +1 -0
  10. package/lib/common/plugin-identifiers.js +81 -0
  11. package/lib/common/plugin-identifiers.js.map +1 -0
  12. package/lib/common/plugin-protocol.d.ts +41 -7
  13. package/lib/common/plugin-protocol.d.ts.map +1 -1
  14. package/lib/common/plugin-protocol.js +3 -1
  15. package/lib/common/plugin-protocol.js.map +1 -1
  16. package/lib/hosted/browser/hosted-plugin.d.ts +2 -2
  17. package/lib/hosted/browser/hosted-plugin.d.ts.map +1 -1
  18. package/lib/hosted/browser/hosted-plugin.js +20 -13
  19. package/lib/hosted/browser/hosted-plugin.js.map +1 -1
  20. package/lib/hosted/browser/worker/plugin-manifest-loader.d.ts.map +1 -1
  21. package/lib/hosted/browser/worker/plugin-manifest-loader.js +4 -1
  22. package/lib/hosted/browser/worker/plugin-manifest-loader.js.map +1 -1
  23. package/lib/hosted/node/hosted-plugin-deployer-handler.d.ts +10 -5
  24. package/lib/hosted/node/hosted-plugin-deployer-handler.d.ts.map +1 -1
  25. package/lib/hosted/node/hosted-plugin-deployer-handler.js +54 -12
  26. package/lib/hosted/node/hosted-plugin-deployer-handler.js.map +1 -1
  27. package/lib/hosted/node/hosted-plugin-process.d.ts +2 -2
  28. package/lib/hosted/node/hosted-plugin-process.d.ts.map +1 -1
  29. package/lib/hosted/node/hosted-plugin-process.js.map +1 -1
  30. package/lib/hosted/node/hosted-plugin.d.ts +2 -2
  31. package/lib/hosted/node/hosted-plugin.d.ts.map +1 -1
  32. package/lib/hosted/node/hosted-plugin.js.map +1 -1
  33. package/lib/hosted/node/metadata-scanner.d.ts +3 -2
  34. package/lib/hosted/node/metadata-scanner.d.ts.map +1 -1
  35. package/lib/hosted/node/metadata-scanner.js +8 -3
  36. package/lib/hosted/node/metadata-scanner.js.map +1 -1
  37. package/lib/hosted/node/plugin-host-rpc.js.map +1 -1
  38. package/lib/hosted/node/plugin-manifest-loader.d.ts.map +1 -1
  39. package/lib/hosted/node/plugin-manifest-loader.js +3 -0
  40. package/lib/hosted/node/plugin-manifest-loader.js.map +1 -1
  41. package/lib/hosted/node/plugin-service.d.ts +18 -4
  42. package/lib/hosted/node/plugin-service.d.ts.map +1 -1
  43. package/lib/hosted/node/plugin-service.js +73 -18
  44. package/lib/hosted/node/plugin-service.js.map +1 -1
  45. package/lib/hosted/node/scanners/scanner-theia.d.ts.map +1 -1
  46. package/lib/hosted/node/scanners/scanner-theia.js +6 -3
  47. package/lib/hosted/node/scanners/scanner-theia.js.map +1 -1
  48. package/lib/main/browser/custom-editors/custom-editor-opener.d.ts.map +1 -1
  49. package/lib/main/browser/custom-editors/custom-editor-opener.js +2 -2
  50. package/lib/main/browser/custom-editors/custom-editor-opener.js.map +1 -1
  51. package/lib/main/browser/debug/plugin-debug-service.d.ts +6 -0
  52. package/lib/main/browser/debug/plugin-debug-service.d.ts.map +1 -1
  53. package/lib/main/browser/debug/plugin-debug-service.js +25 -3
  54. package/lib/main/browser/debug/plugin-debug-service.js.map +1 -1
  55. package/lib/main/browser/debug/plugin-debug-session-factory.d.ts +3 -3
  56. package/lib/main/browser/debug/plugin-debug-session-factory.d.ts.map +1 -1
  57. package/lib/main/browser/debug/plugin-debug-session-factory.js.map +1 -1
  58. package/lib/main/browser/documents-main.d.ts +1 -2
  59. package/lib/main/browser/documents-main.d.ts.map +1 -1
  60. package/lib/main/browser/documents-main.js +26 -6
  61. package/lib/main/browser/documents-main.js.map +1 -1
  62. package/lib/main/browser/editors-and-documents-main.d.ts +2 -0
  63. package/lib/main/browser/editors-and-documents-main.d.ts.map +1 -1
  64. package/lib/main/browser/editors-and-documents-main.js +14 -2
  65. package/lib/main/browser/editors-and-documents-main.js.map +1 -1
  66. package/lib/main/browser/languages-main.d.ts.map +1 -1
  67. package/lib/main/browser/languages-main.js +2 -1
  68. package/lib/main/browser/languages-main.js.map +1 -1
  69. package/lib/main/browser/main-context.d.ts.map +1 -1
  70. package/lib/main/browser/main-context.js +5 -4
  71. package/lib/main/browser/main-context.js.map +1 -1
  72. package/lib/main/browser/plugin-contribution-handler.d.ts +2 -0
  73. package/lib/main/browser/plugin-contribution-handler.d.ts.map +1 -1
  74. package/lib/main/browser/plugin-contribution-handler.js +36 -1
  75. package/lib/main/browser/plugin-contribution-handler.js.map +1 -1
  76. package/lib/main/browser/plugin-shared-style.d.ts +4 -2
  77. package/lib/main/browser/plugin-shared-style.d.ts.map +1 -1
  78. package/lib/main/browser/plugin-shared-style.js +15 -4
  79. package/lib/main/browser/plugin-shared-style.js.map +1 -1
  80. package/lib/main/browser/text-editors-main.d.ts +6 -3
  81. package/lib/main/browser/text-editors-main.d.ts.map +1 -1
  82. package/lib/main/browser/text-editors-main.js +8 -1
  83. package/lib/main/browser/text-editors-main.js.map +1 -1
  84. package/lib/main/browser/theming-main.d.ts +2 -1
  85. package/lib/main/browser/theming-main.d.ts.map +1 -1
  86. package/lib/main/browser/theming-main.js +3 -6
  87. package/lib/main/browser/theming-main.js.map +1 -1
  88. package/lib/main/browser/view/plugin-tree-view-node-label-provider.d.ts.map +1 -1
  89. package/lib/main/browser/view/plugin-tree-view-node-label-provider.js +7 -5
  90. package/lib/main/browser/view/plugin-tree-view-node-label-provider.js.map +1 -1
  91. package/lib/main/browser/view/plugin-view-registry.d.ts +1 -1
  92. package/lib/main/browser/view/plugin-view-registry.js +2 -2
  93. package/lib/main/browser/view/plugin-view-registry.js.map +1 -1
  94. package/lib/main/browser/view/tree-view-widget.d.ts +10 -5
  95. package/lib/main/browser/view/tree-view-widget.d.ts.map +1 -1
  96. package/lib/main/browser/view/tree-view-widget.js +39 -13
  97. package/lib/main/browser/view/tree-view-widget.js.map +1 -1
  98. package/lib/main/browser/webview/webview-theme-data-provider.d.ts +3 -1
  99. package/lib/main/browser/webview/webview-theme-data-provider.d.ts.map +1 -1
  100. package/lib/main/browser/webview/webview-theme-data-provider.js +5 -1
  101. package/lib/main/browser/webview/webview-theme-data-provider.js.map +1 -1
  102. package/lib/main/node/handlers/plugin-theia-directory-handler.d.ts +6 -1
  103. package/lib/main/node/handlers/plugin-theia-directory-handler.d.ts.map +1 -1
  104. package/lib/main/node/handlers/plugin-theia-directory-handler.js +61 -20
  105. package/lib/main/node/handlers/plugin-theia-directory-handler.js.map +1 -1
  106. package/lib/main/node/handlers/plugin-theia-file-handler.d.ts +4 -0
  107. package/lib/main/node/handlers/plugin-theia-file-handler.d.ts.map +1 -1
  108. package/lib/main/node/handlers/plugin-theia-file-handler.js +25 -4
  109. package/lib/main/node/handlers/plugin-theia-file-handler.js.map +1 -1
  110. package/lib/main/node/plugin-cli-contribution.d.ts +3 -0
  111. package/lib/main/node/plugin-cli-contribution.d.ts.map +1 -1
  112. package/lib/main/node/plugin-cli-contribution.js +13 -0
  113. package/lib/main/node/plugin-cli-contribution.js.map +1 -1
  114. package/lib/main/node/plugin-deployer-directory-handler-context-impl.d.ts +1 -0
  115. package/lib/main/node/plugin-deployer-directory-handler-context-impl.d.ts.map +1 -1
  116. package/lib/main/node/plugin-deployer-directory-handler-context-impl.js +17 -0
  117. package/lib/main/node/plugin-deployer-directory-handler-context-impl.js.map +1 -1
  118. package/lib/main/node/plugin-deployer-file-handler-context-impl.d.ts.map +1 -1
  119. package/lib/main/node/plugin-deployer-file-handler-context-impl.js +0 -1
  120. package/lib/main/node/plugin-deployer-file-handler-context-impl.js.map +1 -1
  121. package/lib/main/node/plugin-deployer-impl.d.ts +5 -2
  122. package/lib/main/node/plugin-deployer-impl.d.ts.map +1 -1
  123. package/lib/main/node/plugin-deployer-impl.js +72 -28
  124. package/lib/main/node/plugin-deployer-impl.js.map +1 -1
  125. package/lib/main/node/plugin-ext-backend-module.d.ts.map +1 -1
  126. package/lib/main/node/plugin-ext-backend-module.js +2 -0
  127. package/lib/main/node/plugin-ext-backend-module.js.map +1 -1
  128. package/lib/main/node/plugin-server-handler.d.ts +3 -2
  129. package/lib/main/node/plugin-server-handler.d.ts.map +1 -1
  130. package/lib/main/node/plugin-server-handler.js +3 -0
  131. package/lib/main/node/plugin-server-handler.js.map +1 -1
  132. package/lib/main/node/plugin-uninstallation-manager.d.ts +12 -0
  133. package/lib/main/node/plugin-uninstallation-manager.d.ts.map +1 -0
  134. package/lib/main/node/plugin-uninstallation-manager.js +66 -0
  135. package/lib/main/node/plugin-uninstallation-manager.js.map +1 -0
  136. package/lib/plugin/custom-editors.d.ts +1 -2
  137. package/lib/plugin/custom-editors.d.ts.map +1 -1
  138. package/lib/plugin/custom-editors.js.map +1 -1
  139. package/lib/plugin/languages-utils.d.ts.map +1 -1
  140. package/lib/plugin/languages-utils.js +3 -2
  141. package/lib/plugin/languages-utils.js.map +1 -1
  142. package/lib/plugin/node/debug/plugin-debug-adapter-session.d.ts +2 -2
  143. package/lib/plugin/node/debug/plugin-debug-adapter-session.d.ts.map +1 -1
  144. package/lib/plugin/node/debug/plugin-debug-adapter-session.js.map +1 -1
  145. package/lib/plugin/plugin-context.d.ts.map +1 -1
  146. package/lib/plugin/plugin-context.js +0 -1
  147. package/lib/plugin/plugin-context.js.map +1 -1
  148. package/lib/plugin/text-editor.d.ts +2 -0
  149. package/lib/plugin/text-editor.d.ts.map +1 -1
  150. package/lib/plugin/text-editor.js +9 -0
  151. package/lib/plugin/text-editor.js.map +1 -1
  152. package/lib/plugin/theming.d.ts +1 -1
  153. package/lib/plugin/theming.d.ts.map +1 -1
  154. package/lib/plugin/tree/tree-views.d.ts +1 -0
  155. package/lib/plugin/tree/tree-views.d.ts.map +1 -1
  156. package/lib/plugin/tree/tree-views.js +10 -9
  157. package/lib/plugin/tree/tree-views.js.map +1 -1
  158. package/lib/plugin/types-impl.d.ts +1 -0
  159. package/lib/plugin/types-impl.d.ts.map +1 -1
  160. package/lib/plugin/types-impl.js +3 -2
  161. package/lib/plugin/types-impl.js.map +1 -1
  162. package/package.json +25 -24
  163. package/src/common/connection.ts +3 -4
  164. package/src/common/plugin-api-rpc.ts +23 -17
  165. package/src/common/plugin-identifiers.ts +84 -0
  166. package/src/common/plugin-protocol.ts +47 -8
  167. package/src/hosted/browser/hosted-plugin.ts +22 -16
  168. package/src/hosted/browser/worker/plugin-manifest-loader.ts +4 -2
  169. package/src/hosted/node/hosted-plugin-deployer-handler.ts +64 -20
  170. package/src/hosted/node/hosted-plugin-process.ts +4 -4
  171. package/src/hosted/node/hosted-plugin.ts +2 -2
  172. package/src/hosted/node/metadata-scanner.ts +8 -6
  173. package/src/hosted/node/plugin-host-rpc.ts +1 -1
  174. package/src/hosted/node/plugin-manifest-loader.ts +2 -0
  175. package/src/hosted/node/plugin-service.ts +79 -23
  176. package/src/hosted/node/scanners/scanner-theia.ts +7 -4
  177. package/src/main/browser/custom-editors/custom-editor-opener.tsx +2 -2
  178. package/src/main/browser/debug/plugin-debug-service.ts +32 -3
  179. package/src/main/browser/debug/plugin-debug-session-factory.ts +2 -2
  180. package/src/main/browser/documents-main.ts +26 -8
  181. package/src/main/browser/editors-and-documents-main.ts +16 -2
  182. package/src/main/browser/languages-main.ts +2 -1
  183. package/src/main/browser/main-context.ts +4 -3
  184. package/src/main/browser/plugin-contribution-handler.ts +41 -3
  185. package/src/main/browser/plugin-icon-theme-service.ts +1 -1
  186. package/src/main/browser/plugin-shared-style.ts +9 -5
  187. package/src/main/browser/text-editors-main.ts +12 -2
  188. package/src/main/browser/theming-main.ts +3 -7
  189. package/src/main/browser/view/plugin-tree-view-node-label-provider.ts +7 -5
  190. package/src/main/browser/view/plugin-view-registry.ts +3 -3
  191. package/src/main/browser/view/tree-view-widget.tsx +44 -16
  192. package/src/main/browser/webview/webview-theme-data-provider.ts +7 -10
  193. package/src/main/node/handlers/plugin-theia-directory-handler.ts +56 -28
  194. package/src/main/node/handlers/plugin-theia-file-handler.ts +25 -4
  195. package/src/main/node/plugin-cli-contribution.ts +12 -0
  196. package/src/main/node/plugin-deployer-directory-handler-context-impl.ts +17 -1
  197. package/src/main/node/plugin-deployer-file-handler-context-impl.ts +0 -1
  198. package/src/main/node/plugin-deployer-impl.ts +75 -30
  199. package/src/main/node/plugin-ext-backend-module.ts +3 -0
  200. package/src/main/node/plugin-server-handler.ts +6 -2
  201. package/src/main/node/plugin-uninstallation-manager.ts +60 -0
  202. package/src/plugin/custom-editors.ts +2 -3
  203. package/src/plugin/languages-utils.ts +3 -2
  204. package/src/plugin/node/debug/plugin-debug-adapter-session.ts +2 -2
  205. package/src/plugin/plugin-context.ts +0 -1
  206. package/src/plugin/text-editor.ts +16 -5
  207. package/src/plugin/theming.ts +1 -1
  208. package/src/plugin/tree/tree-views.ts +15 -12
  209. package/src/plugin/types-impl.ts +1 -1
  210. package/lib/main/browser/custom-editors/glob.d.ts +0 -51
  211. package/lib/main/browser/custom-editors/glob.d.ts.map +0 -1
  212. package/lib/main/browser/custom-editors/glob.js +0 -593
  213. package/lib/main/browser/custom-editors/glob.js.map +0 -1
  214. package/lib/main/browser/custom-editors/paths.d.ts +0 -25
  215. package/lib/main/browser/custom-editors/paths.d.ts.map +0 -1
  216. package/lib/main/browser/custom-editors/paths.js +0 -227
  217. package/lib/main/browser/custom-editors/paths.js.map +0 -1
  218. package/lib/main/browser/editor/untitled-resource.d.ts +0 -3
  219. package/lib/main/browser/editor/untitled-resource.d.ts.map +0 -1
  220. package/lib/main/browser/editor/untitled-resource.js +0 -24
  221. package/lib/main/browser/editor/untitled-resource.js.map +0 -1
  222. package/src/main/browser/custom-editors/glob.ts +0 -743
  223. package/src/main/browser/custom-editors/paths.ts +0 -250
  224. package/src/main/browser/editor/untitled-resource.ts +0 -18
@@ -1,227 +0,0 @@
1
- // *****************************************************************************
2
- // Copyright (C) 2021 SAP SE or an SAP affiliate company 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 WITH Classpath-exception-2.0
15
- // *****************************************************************************
16
- // copied from https://github.com/Microsoft/vscode/blob/bf7ac9201e7a7d01741d4e6e64b5dc9f3197d97b/src/vs/base/common/paths.ts
17
- /*---------------------------------------------------------------------------------------------
18
- * Copyright (c) Microsoft Corporation. All rights reserved.
19
- * Licensed under the MIT License. See License.txt in the project root for license information.
20
- *--------------------------------------------------------------------------------------------*/
21
- /* eslint-disable no-void */
22
- /* eslint-disable no-null/no-null */
23
- 'use strict';
24
- Object.defineProperty(exports, "__esModule", { value: true });
25
- exports.isEqualOrParent = exports.getRoot = exports.normalize = exports.extname = exports.basename = exports.nativeSep = exports.sep = void 0;
26
- const os_1 = require("@theia/core/lib/common/os");
27
- const strings_1 = require("@theia/core/lib/common/strings");
28
- /**
29
- * The forward slash path separator.
30
- */
31
- exports.sep = '/';
32
- /**
33
- * The native path separator depending on the OS.
34
- */
35
- exports.nativeSep = os_1.isWindows ? '\\' : '/';
36
- const _posixBadPath = /(\/\.\.?\/)|(\/\.\.?)$|^(\.\.?\/)|(\/\/+)|(\\)/;
37
- const _winBadPath = /(\\\.\.?\\)|(\\\.\.?)$|^(\.\.?\\)|(\\\\+)|(\/)/;
38
- function _isNormal(path, win) {
39
- return win
40
- ? !_winBadPath.test(path)
41
- : !_posixBadPath.test(path);
42
- }
43
- /**
44
- * @returns the base name of a path.
45
- */
46
- function basename(path) {
47
- const idx = ~path.lastIndexOf('/') || ~path.lastIndexOf('\\');
48
- if (idx === 0) {
49
- return path;
50
- }
51
- else if (~idx === path.length - 1) {
52
- return basename(path.substring(0, path.length - 1));
53
- }
54
- else {
55
- return path.substr(~idx + 1);
56
- }
57
- }
58
- exports.basename = basename;
59
- /**
60
- * @returns `.far` from `boo.far` or the empty string.
61
- */
62
- function extname(path) {
63
- path = basename(path);
64
- const idx = ~path.lastIndexOf('.');
65
- return idx ? path.substring(~idx) : '';
66
- }
67
- exports.extname = extname;
68
- function normalize(path, toOSPath) {
69
- if (path === null || path === void 0) {
70
- return path;
71
- }
72
- const len = path.length;
73
- if (len === 0) {
74
- return '.';
75
- }
76
- const wantsBackslash = os_1.isWindows && toOSPath;
77
- if (_isNormal(path, wantsBackslash)) {
78
- return path;
79
- }
80
- // eslint-disable-next-line @typescript-eslint/no-shadow
81
- const sep = wantsBackslash ? '\\' : '/';
82
- const root = getRoot(path, sep);
83
- // skip the root-portion of the path
84
- let start = root.length;
85
- let skip = false;
86
- let res = '';
87
- for (let end = root.length; end <= len; end++) {
88
- // either at the end or at a path-separator character
89
- if (end === len || path.charCodeAt(end) === 47 /* Slash */ || path.charCodeAt(end) === 92 /* Backslash */) {
90
- if (streql(path, start, end, '..')) {
91
- // skip current and remove parent (if there is already something)
92
- const prev_start = res.lastIndexOf(sep);
93
- const prev_part = res.slice(prev_start + 1);
94
- if ((root || prev_part.length > 0) && prev_part !== '..') {
95
- res = prev_start === -1 ? '' : res.slice(0, prev_start);
96
- skip = true;
97
- }
98
- }
99
- else if (streql(path, start, end, '.') && (root || res || end < len - 1)) {
100
- // skip current (if there is already something or if there is more to come)
101
- skip = true;
102
- }
103
- if (!skip) {
104
- const part = path.slice(start, end);
105
- if (res !== '' && res[res.length - 1] !== sep) {
106
- res += sep;
107
- }
108
- res += part;
109
- }
110
- start = end + 1;
111
- skip = false;
112
- }
113
- }
114
- return root + res;
115
- }
116
- exports.normalize = normalize;
117
- function streql(value, start, end, other) {
118
- return start + other.length === end && value.indexOf(other, start) === start;
119
- }
120
- /**
121
- * Computes the _root_ this path, like `getRoot('c:\files') === c:\`,
122
- * `getRoot('files:///files/path') === files:///`,
123
- * or `getRoot('\\server\shares\path') === \\server\shares\`
124
- */
125
- // eslint-disable-next-line @typescript-eslint/no-shadow
126
- function getRoot(path, sep = '/') {
127
- if (!path) {
128
- return '';
129
- }
130
- const len = path.length;
131
- let code = path.charCodeAt(0);
132
- if (code === 47 /* Slash */ || code === 92 /* Backslash */) {
133
- code = path.charCodeAt(1);
134
- if (code === 47 /* Slash */ || code === 92 /* Backslash */) {
135
- // UNC candidate \\localhost\shares\ddd
136
- // ^^^^^^^^^^^^^^^^^^^
137
- code = path.charCodeAt(2);
138
- if (code !== 47 /* Slash */ && code !== 92 /* Backslash */) {
139
- // eslint-disable-next-line @typescript-eslint/no-shadow
140
- let pos = 3;
141
- const start = pos;
142
- for (; pos < len; pos++) {
143
- code = path.charCodeAt(pos);
144
- if (code === 47 /* Slash */ || code === 92 /* Backslash */) {
145
- break;
146
- }
147
- }
148
- code = path.charCodeAt(pos + 1);
149
- if (start !== pos && code !== 47 /* Slash */ && code !== 92 /* Backslash */) {
150
- pos += 1;
151
- for (; pos < len; pos++) {
152
- code = path.charCodeAt(pos);
153
- if (code === 47 /* Slash */ || code === 92 /* Backslash */) {
154
- return path.slice(0, pos + 1) // consume this separator
155
- .replace(/[\\/]/g, sep);
156
- }
157
- }
158
- }
159
- }
160
- }
161
- // /user/far
162
- // ^
163
- return sep;
164
- }
165
- else if ((code >= 65 /* A */ && code <= 90 /* Z */) || (code >= 97 /* a */ && code <= 122 /* z */)) {
166
- // check for windows drive letter c:\ or c:
167
- if (path.charCodeAt(1) === 58 /* Colon */) {
168
- code = path.charCodeAt(2);
169
- if (code === 47 /* Slash */ || code === 92 /* Backslash */) {
170
- // C:\fff
171
- // ^^^
172
- return path.slice(0, 2) + sep;
173
- }
174
- else {
175
- // C:
176
- // ^^
177
- return path.slice(0, 2);
178
- }
179
- }
180
- }
181
- // check for URI
182
- // scheme://authority/path
183
- // ^^^^^^^^^^^^^^^^^^^
184
- let pos = path.indexOf('://');
185
- if (pos !== -1) {
186
- pos += 3; // 3 -> "://".length
187
- for (; pos < len; pos++) {
188
- code = path.charCodeAt(pos);
189
- if (code === 47 /* Slash */ || code === 92 /* Backslash */) {
190
- return path.slice(0, pos + 1); // consume this separator
191
- }
192
- }
193
- }
194
- return '';
195
- }
196
- exports.getRoot = getRoot;
197
- function isEqualOrParent(path, candidate, ignoreCase) {
198
- if (path === candidate) {
199
- return true;
200
- }
201
- if (!path || !candidate) {
202
- return false;
203
- }
204
- if (candidate.length > path.length) {
205
- return false;
206
- }
207
- if (ignoreCase) {
208
- const beginsWith = (0, strings_1.startsWithIgnoreCase)(path, candidate);
209
- if (!beginsWith) {
210
- return false;
211
- }
212
- if (candidate.length === path.length) {
213
- return true; // same path, different casing
214
- }
215
- let sepOffset = candidate.length;
216
- if (candidate.charAt(candidate.length - 1) === exports.nativeSep) {
217
- sepOffset--; // adjust the expected sep offset in case our candidate already ends in separator character
218
- }
219
- return path.charAt(sepOffset) === exports.nativeSep;
220
- }
221
- if (candidate.charAt(candidate.length - 1) !== exports.nativeSep) {
222
- candidate += exports.nativeSep;
223
- }
224
- return path.indexOf(candidate) === 0;
225
- }
226
- exports.isEqualOrParent = isEqualOrParent;
227
- //# sourceMappingURL=paths.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"paths.js","sourceRoot":"","sources":["../../../../src/main/browser/custom-editors/paths.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,oEAAoE;AACpE,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,2EAA2E;AAC3E,gFAAgF;AAEhF,4HAA4H;AAC5H;;;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IAAI,IAAI,KAAK,SAAS,EAAE;QACpB,OAAO,IAAI,CAAC;KACf;IAED,IAAI,CAAC,IAAI,IAAI,CAAC,SAAS,EAAE;QACrB,OAAO,KAAK,CAAC;KAChB;IAED,IAAI,SAAS,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,EAAE;QAChC,OAAO,KAAK,CAAC;KAChB;IAED,IAAI,UAAU,EAAE;QACZ,MAAM,UAAU,GAAG,IAAA,8BAAoB,EAAC,IAAI,EAAE,SAAS,CAAC,CAAC;QACzD,IAAI,CAAC,UAAU,EAAE;YACb,OAAO,KAAK,CAAC;SAChB;QAED,IAAI,SAAS,CAAC,MAAM,KAAK,IAAI,CAAC,MAAM,EAAE;YAClC,OAAO,IAAI,CAAC,CAAC,8BAA8B;SAC9C;QAED,IAAI,SAAS,GAAG,SAAS,CAAC,MAAM,CAAC;QACjC,IAAI,SAAS,CAAC,MAAM,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC,KAAK,iBAAS,EAAE;YACtD,SAAS,EAAE,CAAC,CAAC,2FAA2F;SAC3G;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,KAAK,iBAAS,CAAC;KAC/C;IAED,IAAI,SAAS,CAAC,MAAM,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC,KAAK,iBAAS,EAAE;QACtD,SAAS,IAAI,iBAAS,CAAC;KAC1B;IAED,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;AACzC,CAAC;AApCD,0CAoCC"}
@@ -1,3 +0,0 @@
1
- /** @deprecated @since 1.24. Import from `core/lib/common/resource` instead. */
2
- export { UntitledResourceResolver, UntitledResource, createUntitledURI } from '@theia/core/lib/common/resource';
3
- //# sourceMappingURL=untitled-resource.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"untitled-resource.d.ts","sourceRoot":"","sources":["../../../../src/main/browser/editor/untitled-resource.ts"],"names":[],"mappings":"AAgBA,+EAA+E;AAC/E,OAAO,EAAE,wBAAwB,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC"}
@@ -1,24 +0,0 @@
1
- "use strict";
2
- // *****************************************************************************
3
- // Copyright (C) 2018 Red Hat, Inc. and others.
4
- //
5
- // This program and the accompanying materials are made available under the
6
- // terms of the Eclipse Public License v. 2.0 which is available at
7
- // http://www.eclipse.org/legal/epl-2.0.
8
- //
9
- // This Source Code may also be made available under the following Secondary
10
- // Licenses when the conditions for such availability set forth in the Eclipse
11
- // Public License v. 2.0 are satisfied: GNU General Public License, version 2
12
- // with the GNU Classpath Exception which is available at
13
- // https://www.gnu.org/software/classpath/license.html.
14
- //
15
- // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
16
- // *****************************************************************************
17
- Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.createUntitledURI = exports.UntitledResource = exports.UntitledResourceResolver = void 0;
19
- /** @deprecated @since 1.24. Import from `core/lib/common/resource` instead. */
20
- var resource_1 = require("@theia/core/lib/common/resource");
21
- Object.defineProperty(exports, "UntitledResourceResolver", { enumerable: true, get: function () { return resource_1.UntitledResourceResolver; } });
22
- Object.defineProperty(exports, "UntitledResource", { enumerable: true, get: function () { return resource_1.UntitledResource; } });
23
- Object.defineProperty(exports, "createUntitledURI", { enumerable: true, get: function () { return resource_1.createUntitledURI; } });
24
- //# sourceMappingURL=untitled-resource.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"untitled-resource.js","sourceRoot":"","sources":["../../../../src/main/browser/editor/untitled-resource.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,+CAA+C;AAC/C,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,2EAA2E;AAC3E,gFAAgF;;;AAEhF,+EAA+E;AAC/E,4DAAgH;AAAvG,oHAAA,wBAAwB,OAAA;AAAE,4GAAA,gBAAgB,OAAA;AAAE,6GAAA,iBAAiB,OAAA"}