@adminide-stack/extension-api 0.0.2-alpha.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 (318) hide show
  1. package/LICENSE +39 -0
  2. package/README.md +9 -0
  3. package/lib/connections/jsonrpc2/connection.d.ts +55 -0
  4. package/lib/connections/jsonrpc2/connection.js +575 -0
  5. package/lib/connections/jsonrpc2/connection.js.map +1 -0
  6. package/lib/connections/jsonrpc2/connection.test.d.ts +1 -0
  7. package/lib/connections/jsonrpc2/connection.test.js +443 -0
  8. package/lib/connections/jsonrpc2/connection.test.js.map +1 -0
  9. package/lib/connections/jsonrpc2/events.d.ts +24 -0
  10. package/lib/connections/jsonrpc2/events.js +117 -0
  11. package/lib/connections/jsonrpc2/events.js.map +1 -0
  12. package/lib/connections/jsonrpc2/index.d.ts +5 -0
  13. package/lib/connections/jsonrpc2/index.js +24 -0
  14. package/lib/connections/jsonrpc2/index.js.map +1 -0
  15. package/lib/connections/jsonrpc2/linkedMap.d.ts +29 -0
  16. package/lib/connections/jsonrpc2/linkedMap.js +254 -0
  17. package/lib/connections/jsonrpc2/linkedMap.js.map +1 -0
  18. package/lib/connections/jsonrpc2/linkedMap.test.d.ts +1 -0
  19. package/lib/connections/jsonrpc2/linkedMap.test.js +62 -0
  20. package/lib/connections/jsonrpc2/linkedMap.test.js.map +1 -0
  21. package/lib/connections/jsonrpc2/messages.d.ts +117 -0
  22. package/lib/connections/jsonrpc2/messages.js +72 -0
  23. package/lib/connections/jsonrpc2/messages.js.map +1 -0
  24. package/lib/connections/jsonrpc2/test-helper.d.ts +8 -0
  25. package/lib/connections/jsonrpc2/test-helper.js +36 -0
  26. package/lib/connections/jsonrpc2/test-helper.js.map +1 -0
  27. package/lib/connections/jsonrpc2/trace.d.ts +30 -0
  28. package/lib/connections/jsonrpc2/trace.js +96 -0
  29. package/lib/connections/jsonrpc2/trace.js.map +1 -0
  30. package/lib/connections/jsonrpc2/transport.d.ts +36 -0
  31. package/lib/connections/jsonrpc2/transport.js +66 -0
  32. package/lib/connections/jsonrpc2/transport.js.map +1 -0
  33. package/lib/connections/jsonrpc2/transports/browser-websocket.d.ts +0 -0
  34. package/lib/connections/jsonrpc2/transports/browser-websocket.js +189 -0
  35. package/lib/connections/jsonrpc2/transports/browser-websocket.js.map +1 -0
  36. package/lib/connections/jsonrpc2/transports/merged.d.ts +0 -0
  37. package/lib/connections/jsonrpc2/transports/merged.js +239 -0
  38. package/lib/connections/jsonrpc2/transports/merged.js.map +1 -0
  39. package/lib/connections/jsonrpc2/transports/webSocket.d.ts +0 -0
  40. package/lib/connections/jsonrpc2/transports/webSocket.js +138 -0
  41. package/lib/connections/jsonrpc2/transports/webSocket.js.map +1 -0
  42. package/lib/connections/jsonrpc2/transports/webWorker.d.ts +22 -0
  43. package/lib/connections/jsonrpc2/transports/webWorker.js +111 -0
  44. package/lib/connections/jsonrpc2/transports/webWorker.js.map +1 -0
  45. package/lib/connections/proxy/index.d.ts +1 -0
  46. package/lib/connections/proxy/index.js +18 -0
  47. package/lib/connections/proxy/index.js.map +1 -0
  48. package/lib/connections/proxy/proxy.d.ts +49 -0
  49. package/lib/connections/proxy/proxy.js +108 -0
  50. package/lib/connections/proxy/proxy.js.map +1 -0
  51. package/lib/connections/proxy/proxy.test.d.ts +1 -0
  52. package/lib/connections/proxy/proxy.test.js +55 -0
  53. package/lib/connections/proxy/proxy.test.js.map +1 -0
  54. package/lib/connections/remote-rpc/browser-remote-rpc.d.ts +12 -0
  55. package/lib/connections/remote-rpc/browser-remote-rpc.js +62 -0
  56. package/lib/connections/remote-rpc/browser-remote-rpc.js.map +1 -0
  57. package/lib/connections/remote-rpc/browser-server-rpc.test.d.ts +0 -0
  58. package/lib/connections/remote-rpc/browser-server-rpc.test.js +317 -0
  59. package/lib/connections/remote-rpc/browser-server-rpc.test.js.map +1 -0
  60. package/lib/connections/remote-rpc/index.d.ts +1 -0
  61. package/lib/connections/remote-rpc/index.js +18 -0
  62. package/lib/connections/remote-rpc/index.js.map +1 -0
  63. package/lib/connections/remote-rpc/old-browser-remote-rpc.d.ts +12 -0
  64. package/lib/connections/remote-rpc/old-browser-remote-rpc.js +41 -0
  65. package/lib/connections/remote-rpc/old-browser-remote-rpc.js.map +1 -0
  66. package/lib/connections/remote-rpc/rxjs-websockets.d.ts +18 -0
  67. package/lib/connections/remote-rpc/rxjs-websockets.js +80 -0
  68. package/lib/connections/remote-rpc/rxjs-websockets.js.map +1 -0
  69. package/lib/constants/action-types.d.ts +30 -0
  70. package/lib/constants/action-types.js +38 -0
  71. package/lib/constants/action-types.js.map +1 -0
  72. package/lib/constants/index.d.ts +2 -0
  73. package/lib/constants/index.js +19 -0
  74. package/lib/constants/index.js.map +1 -0
  75. package/lib/constants/types.d.ts +8 -0
  76. package/lib/constants/types.js +12 -0
  77. package/lib/constants/types.js.map +1 -0
  78. package/lib/core/expr/evaluator.d.ts +27 -0
  79. package/lib/core/expr/evaluator.js +144 -0
  80. package/lib/core/expr/evaluator.js.map +1 -0
  81. package/lib/core/expr/evaluator.test.d.ts +1 -0
  82. package/lib/core/expr/evaluator.test.js +52 -0
  83. package/lib/core/expr/evaluator.test.js.map +1 -0
  84. package/lib/core/expr/index.d.ts +3 -0
  85. package/lib/core/expr/index.js +20 -0
  86. package/lib/core/expr/index.js.map +1 -0
  87. package/lib/core/expr/lexer.d.ts +114 -0
  88. package/lib/core/expr/lexer.js +418 -0
  89. package/lib/core/expr/lexer.js.map +1 -0
  90. package/lib/core/expr/parser.d.ts +52 -0
  91. package/lib/core/expr/parser.js +242 -0
  92. package/lib/core/expr/parser.js.map +1 -0
  93. package/lib/core/index.d.ts +2 -0
  94. package/lib/core/index.js +19 -0
  95. package/lib/core/index.js.map +1 -0
  96. package/lib/core/types/ext-host-types-bk.d.ts +0 -0
  97. package/lib/core/types/ext-host-types-bk.js +1275 -0
  98. package/lib/core/types/ext-host-types-bk.js.map +1 -0
  99. package/lib/core/types/ext-host-types.d.ts +32 -0
  100. package/lib/core/types/ext-host-types.js +71 -0
  101. package/lib/core/types/ext-host-types.js.map +1 -0
  102. package/lib/core/types/index.d.ts +1 -0
  103. package/lib/core/types/index.js +18 -0
  104. package/lib/core/types/index.js.map +1 -0
  105. package/lib/errors/errors.d.ts +1 -0
  106. package/lib/errors/errors.js +13 -0
  107. package/lib/errors/errors.js.map +1 -0
  108. package/lib/errors/index.d.ts +1 -0
  109. package/lib/errors/index.js +18 -0
  110. package/lib/errors/index.js.map +1 -0
  111. package/lib/index.d.ts +7 -0
  112. package/lib/index.js +24 -0
  113. package/lib/index.js.map +1 -0
  114. package/lib/interfaces/command.d.ts +28 -0
  115. package/lib/interfaces/command.js +3 -0
  116. package/lib/interfaces/command.js.map +1 -0
  117. package/lib/interfaces/configuration.d.ts +36 -0
  118. package/lib/interfaces/configuration.js +3 -0
  119. package/lib/interfaces/configuration.js.map +1 -0
  120. package/lib/interfaces/connection.d.ts +12 -0
  121. package/lib/interfaces/connection.js +3 -0
  122. package/lib/interfaces/connection.js.map +1 -0
  123. package/lib/interfaces/context.d.ts +12 -0
  124. package/lib/interfaces/context.js +3 -0
  125. package/lib/interfaces/context.js.map +1 -0
  126. package/lib/interfaces/contributions/contribution-service.d.ts +20 -0
  127. package/lib/interfaces/contributions/contribution-service.js +3 -0
  128. package/lib/interfaces/contributions/contribution-service.js.map +1 -0
  129. package/lib/interfaces/contributions/contribution.d.ts +383 -0
  130. package/lib/interfaces/contributions/contribution.js +49 -0
  131. package/lib/interfaces/contributions/contribution.js.map +1 -0
  132. package/lib/interfaces/contributions/index.d.ts +2 -0
  133. package/lib/interfaces/contributions/index.js +19 -0
  134. package/lib/interfaces/contributions/index.js.map +1 -0
  135. package/lib/interfaces/controller.d.ts +30 -0
  136. package/lib/interfaces/controller.js +3 -0
  137. package/lib/interfaces/controller.js.map +1 -0
  138. package/lib/interfaces/errors.d.ts +5 -0
  139. package/lib/interfaces/errors.js +3 -0
  140. package/lib/interfaces/errors.js.map +1 -0
  141. package/lib/interfaces/ext-services/contributon-registry.d.ts +45 -0
  142. package/lib/interfaces/ext-services/contributon-registry.js +3 -0
  143. package/lib/interfaces/ext-services/contributon-registry.js.map +1 -0
  144. package/lib/interfaces/ext-services/ext-services.d.ts +23 -0
  145. package/lib/interfaces/ext-services/ext-services.js +3 -0
  146. package/lib/interfaces/ext-services/ext-services.js.map +1 -0
  147. package/lib/interfaces/ext-services/extension-service.d.ts +8 -0
  148. package/lib/interfaces/ext-services/extension-service.js +3 -0
  149. package/lib/interfaces/ext-services/extension-service.js.map +1 -0
  150. package/lib/interfaces/ext-services/index.d.ts +8 -0
  151. package/lib/interfaces/ext-services/index.js +25 -0
  152. package/lib/interfaces/ext-services/index.js.map +1 -0
  153. package/lib/interfaces/ext-services/model-service.d.ts +89 -0
  154. package/lib/interfaces/ext-services/model-service.js +3 -0
  155. package/lib/interfaces/ext-services/model-service.js.map +1 -0
  156. package/lib/interfaces/ext-services/panel-view-registry.d.ts +21 -0
  157. package/lib/interfaces/ext-services/panel-view-registry.js +3 -0
  158. package/lib/interfaces/ext-services/panel-view-registry.js.map +1 -0
  159. package/lib/interfaces/ext-services/settings-service.d.ts +18 -0
  160. package/lib/interfaces/ext-services/settings-service.js +3 -0
  161. package/lib/interfaces/ext-services/settings-service.js.map +1 -0
  162. package/lib/interfaces/ext-services/view-service.d.ts +65 -0
  163. package/lib/interfaces/ext-services/view-service.js +4 -0
  164. package/lib/interfaces/ext-services/view-service.js.map +1 -0
  165. package/lib/interfaces/ext-services/viewer-service.d.ts +125 -0
  166. package/lib/interfaces/ext-services/viewer-service.js +5 -0
  167. package/lib/interfaces/ext-services/viewer-service.js.map +1 -0
  168. package/lib/interfaces/extension-manifest.d.ts +8 -0
  169. package/lib/interfaces/extension-manifest.js +3 -0
  170. package/lib/interfaces/extension-manifest.js.map +1 -0
  171. package/lib/interfaces/extension.d.ts +72 -0
  172. package/lib/interfaces/extension.js +3 -0
  173. package/lib/interfaces/extension.js.map +1 -0
  174. package/lib/interfaces/generated-models.d.ts +3716 -0
  175. package/lib/interfaces/generated-models.js +648 -0
  176. package/lib/interfaces/generated-models.js.map +1 -0
  177. package/lib/interfaces/graphql.d.ts +17 -0
  178. package/lib/interfaces/graphql.js +5 -0
  179. package/lib/interfaces/graphql.js.map +1 -0
  180. package/lib/interfaces/index.d.ts +21 -0
  181. package/lib/interfaces/index.js +38 -0
  182. package/lib/interfaces/index.js.map +1 -0
  183. package/lib/interfaces/languages-types.d.ts +65 -0
  184. package/lib/interfaces/languages-types.js +3 -0
  185. package/lib/interfaces/languages-types.js.map +1 -0
  186. package/lib/interfaces/model.d.ts +51 -0
  187. package/lib/interfaces/model.js +9 -0
  188. package/lib/interfaces/model.js.map +1 -0
  189. package/lib/interfaces/plain-types.d.ts +4 -0
  190. package/lib/interfaces/plain-types.js +6 -0
  191. package/lib/interfaces/plain-types.js.map +1 -0
  192. package/lib/interfaces/plainTypes.d.ts +68 -0
  193. package/lib/interfaces/plainTypes.js +3 -0
  194. package/lib/interfaces/plainTypes.js.map +1 -0
  195. package/lib/interfaces/platform-context.d.ts +82 -0
  196. package/lib/interfaces/platform-context.js +3 -0
  197. package/lib/interfaces/platform-context.js.map +1 -0
  198. package/lib/interfaces/react-props/action-item.d.ts +20 -0
  199. package/lib/interfaces/react-props/action-item.js +3 -0
  200. package/lib/interfaces/react-props/action-item.js.map +1 -0
  201. package/lib/interfaces/react-props/extension-controller.d.ts +11 -0
  202. package/lib/interfaces/react-props/extension-controller.js +3 -0
  203. package/lib/interfaces/react-props/extension-controller.js.map +1 -0
  204. package/lib/interfaces/react-props/index.d.ts +3 -0
  205. package/lib/interfaces/react-props/index.js +20 -0
  206. package/lib/interfaces/react-props/index.js.map +1 -0
  207. package/lib/interfaces/react-props/platform-context.d.ts +7 -0
  208. package/lib/interfaces/react-props/platform-context.js +3 -0
  209. package/lib/interfaces/react-props/platform-context.js.map +1 -0
  210. package/lib/interfaces/registry-extension.d.ts +21 -0
  211. package/lib/interfaces/registry-extension.js +3 -0
  212. package/lib/interfaces/registry-extension.js.map +1 -0
  213. package/lib/interfaces/settings.d.ts +51 -0
  214. package/lib/interfaces/settings.js +3 -0
  215. package/lib/interfaces/settings.js.map +1 -0
  216. package/lib/interfaces/text-document.d.ts +57 -0
  217. package/lib/interfaces/text-document.js +119 -0
  218. package/lib/interfaces/text-document.js.map +1 -0
  219. package/lib/interfaces/webview/index.d.ts +3 -0
  220. package/lib/interfaces/webview/index.js +20 -0
  221. package/lib/interfaces/webview/index.js.map +1 -0
  222. package/lib/interfaces/webview/webview-manager-service.d.ts +22 -0
  223. package/lib/interfaces/webview/webview-manager-service.js +3 -0
  224. package/lib/interfaces/webview/webview-manager-service.js.map +1 -0
  225. package/lib/interfaces/webview/webview-port-mapping.d.ts +4 -0
  226. package/lib/interfaces/webview/webview-port-mapping.js +3 -0
  227. package/lib/interfaces/webview/webview-port-mapping.js.map +1 -0
  228. package/lib/interfaces/webview/webview.d.ts +99 -0
  229. package/lib/interfaces/webview/webview.js +9 -0
  230. package/lib/interfaces/webview/webview.js.map +1 -0
  231. package/lib/main.d.ts +0 -0
  232. package/lib/main.js +3 -0
  233. package/lib/main.js.map +1 -0
  234. package/lib/protocol/client.protocol.d.ts +99 -0
  235. package/lib/protocol/client.protocol.js +8 -0
  236. package/lib/protocol/client.protocol.js.map +1 -0
  237. package/lib/protocol/common.protocol.d.ts +289 -0
  238. package/lib/protocol/common.protocol.js +68 -0
  239. package/lib/protocol/common.protocol.js.map +1 -0
  240. package/lib/protocol/editor-missing-types.d.ts +87 -0
  241. package/lib/protocol/editor-missing-types.js +10 -0
  242. package/lib/protocol/editor-missing-types.js.map +1 -0
  243. package/lib/protocol/index.d.ts +6 -0
  244. package/lib/protocol/index.js +24 -0
  245. package/lib/protocol/index.js.map +1 -0
  246. package/lib/protocol/proxy-identifier.d.ts +51 -0
  247. package/lib/protocol/proxy-identifier.js +59 -0
  248. package/lib/protocol/proxy-identifier.js.map +1 -0
  249. package/lib/protocol/rpc-logger.d.ts +8 -0
  250. package/lib/protocol/rpc-logger.js +60 -0
  251. package/lib/protocol/rpc-logger.js.map +1 -0
  252. package/lib/protocol/rpc-protocol.d.ts +148 -0
  253. package/lib/protocol/rpc-protocol.js +750 -0
  254. package/lib/protocol/rpc-protocol.js.map +1 -0
  255. package/lib/protocol/rpc-protocol.test.d.ts +1 -0
  256. package/lib/protocol/rpc-protocol.test.js +171 -0
  257. package/lib/protocol/rpc-protocol.test.js.map +1 -0
  258. package/lib/protocol/server.protocol-bk.d.ts +0 -0
  259. package/lib/protocol/server.protocol-bk.js +719 -0
  260. package/lib/protocol/server.protocol-bk.js.map +1 -0
  261. package/lib/protocol/server.protocol.d.ts +91 -0
  262. package/lib/protocol/server.protocol.js +31 -0
  263. package/lib/protocol/server.protocol.js.map +1 -0
  264. package/lib/protocol/shared/editor.d.ts +4 -0
  265. package/lib/protocol/shared/editor.js +28 -0
  266. package/lib/protocol/shared/editor.js.map +1 -0
  267. package/lib/protocol/shared/tasks.d.ts +104 -0
  268. package/lib/protocol/shared/tasks.js +4 -0
  269. package/lib/protocol/shared/tasks.js.map +1 -0
  270. package/lib/protocol/temporary-types.d.ts +198 -0
  271. package/lib/protocol/temporary-types.js +30 -0
  272. package/lib/protocol/temporary-types.js.map +1 -0
  273. package/lib/protocol/utils/index.d.ts +1 -0
  274. package/lib/protocol/utils/index.js +18 -0
  275. package/lib/protocol/utils/index.js.map +1 -0
  276. package/lib/protocol/utils/lazy-promise.d.ts +18 -0
  277. package/lib/protocol/utils/lazy-promise.js +69 -0
  278. package/lib/protocol/utils/lazy-promise.js.map +1 -0
  279. package/lib/utils/errors.d.ts +6 -0
  280. package/lib/utils/errors.js +19 -0
  281. package/lib/utils/errors.js.map +1 -0
  282. package/lib/utils/extensions.d.ts +9 -0
  283. package/lib/utils/extensions.js +25 -0
  284. package/lib/utils/extensions.js.map +1 -0
  285. package/lib/utils/helper.test.d.ts +9 -0
  286. package/lib/utils/helper.test.js +15 -0
  287. package/lib/utils/helper.test.js.map +1 -0
  288. package/lib/utils/index.d.ts +7 -0
  289. package/lib/utils/index.js +25 -0
  290. package/lib/utils/index.js.map +1 -0
  291. package/lib/utils/paths-util.d.ts +27 -0
  292. package/lib/utils/paths-util.js +127 -0
  293. package/lib/utils/paths-util.js.map +1 -0
  294. package/lib/utils/rxjs/combineLatestOrDefault.d.ts +28 -0
  295. package/lib/utils/rxjs/combineLatestOrDefault.js +111 -0
  296. package/lib/utils/rxjs/combineLatestOrDefault.js.map +1 -0
  297. package/lib/utils/rxjs/combineLatestOrDefault.test.d.ts +1 -0
  298. package/lib/utils/rxjs/combineLatestOrDefault.test.js +52 -0
  299. package/lib/utils/rxjs/combineLatestOrDefault.test.js.map +1 -0
  300. package/lib/utils/rxjs/index.d.ts +1 -0
  301. package/lib/utils/rxjs/index.js +18 -0
  302. package/lib/utils/rxjs/index.js.map +1 -0
  303. package/lib/utils/util.d.ts +19 -0
  304. package/lib/utils/util.js +57 -0
  305. package/lib/utils/util.js.map +1 -0
  306. package/lib/worker-lib/MessageTypes.d.ts +5 -0
  307. package/lib/worker-lib/MessageTypes.js +9 -0
  308. package/lib/worker-lib/MessageTypes.js.map +1 -0
  309. package/lib/worker-lib/index.d.ts +2 -0
  310. package/lib/worker-lib/index.js +19 -0
  311. package/lib/worker-lib/index.js.map +1 -0
  312. package/lib/worker-lib/webWorkerLink.d.ts +12 -0
  313. package/lib/worker-lib/webWorkerLink.js +96 -0
  314. package/lib/worker-lib/webWorkerLink.js.map +1 -0
  315. package/lib/worker-lib/workerUtils.d.ts +11 -0
  316. package/lib/worker-lib/workerUtils.js +178 -0
  317. package/lib/worker-lib/workerUtils.js.map +1 -0
  318. package/package.json +60 -0
@@ -0,0 +1,21 @@
1
+ export * from './plain-types';
2
+ export * from './extension';
3
+ export * from './extension-manifest';
4
+ export * from './registry-extension';
5
+ export * from './errors';
6
+ export * from './settings';
7
+ export * from './platform-context';
8
+ export * from './graphql';
9
+ export * from './ext-services';
10
+ export * from './controller';
11
+ export * from './connection';
12
+ export * from './command';
13
+ export * from './languages-types';
14
+ export * from './model';
15
+ export * from './text-document';
16
+ export * from './contributions';
17
+ export * from './plainTypes';
18
+ export * from './configuration';
19
+ export * from './react-props';
20
+ export * from './generated-models';
21
+ export * from './webview';
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./plain-types"), exports);
18
+ __exportStar(require("./extension"), exports);
19
+ __exportStar(require("./extension-manifest"), exports);
20
+ __exportStar(require("./registry-extension"), exports);
21
+ __exportStar(require("./errors"), exports);
22
+ __exportStar(require("./settings"), exports);
23
+ __exportStar(require("./platform-context"), exports);
24
+ __exportStar(require("./graphql"), exports);
25
+ __exportStar(require("./ext-services"), exports);
26
+ __exportStar(require("./controller"), exports);
27
+ __exportStar(require("./connection"), exports);
28
+ __exportStar(require("./command"), exports);
29
+ __exportStar(require("./languages-types"), exports);
30
+ __exportStar(require("./model"), exports);
31
+ __exportStar(require("./text-document"), exports);
32
+ __exportStar(require("./contributions"), exports);
33
+ __exportStar(require("./plainTypes"), exports);
34
+ __exportStar(require("./configuration"), exports);
35
+ __exportStar(require("./react-props"), exports);
36
+ __exportStar(require("./generated-models"), exports);
37
+ __exportStar(require("./webview"), exports);
38
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/interfaces/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA8B;AAC9B,8CAA4B;AAC5B,uDAAqC;AACrC,uDAAqC;AACrC,2CAAyB;AACzB,6CAA2B;AAC3B,qDAAmC;AACnC,4CAA0B;AAC1B,iDAA+B;AAC/B,+CAA6B;AAC7B,+CAA6B;AAC7B,4CAA0B;AAC1B,oDAAkC;AAClC,0CAAwB;AACxB,kDAAgC;AAChC,kDAAgC;AAChC,+CAA6B;AAC7B,kDAAgC;AAChC,gDAA8B;AAC9B,qDAAmC;AACnC,4CAA0B"}
@@ -0,0 +1,65 @@
1
+ import { Observable } from 'rxjs';
2
+ import { ISelection } from '@vscode-alt/monaco-editor/esm/vs/editor/common/core/selection';
3
+ import { IRange } from '@vscode-alt/monaco-editor/esm/vs/editor/common/core/range';
4
+ import * as modes from '@vscode-alt/monaco-editor/esm/vs/editor/common/modes';
5
+ import { ISingleEditOperation } from '@vscode-alt/monaco-editor/esm/vs/editor/common/model';
6
+ import { ITextDocumentIdentifier, ITextDocumentPositionParams } from '@workbench-stack/core';
7
+ import { WorkspaceSymbolDto, IRawColorInfo } from '../protocol';
8
+ export interface ITextDocumentParams {
9
+ textDocument: ITextDocumentIdentifier;
10
+ }
11
+ export interface ITextDocumentLinkParams {
12
+ link: modes.ILink;
13
+ }
14
+ export interface ITextDocumentColorInfoParams extends ITextDocumentParams {
15
+ colorInfo: IRawColorInfo;
16
+ }
17
+ export interface ITextSignatureHelpParams extends ITextDocumentParams {
18
+ context: modes.SignatureHelpContext;
19
+ }
20
+ export interface ICodeLensParams extends ITextDocumentParams {
21
+ symbol: modes.CodeLens;
22
+ }
23
+ export interface ICodeActionsParams extends ITextDocumentPositionParams {
24
+ rangeOrSelection: IRange | ISelection;
25
+ context: modes.ReferenceContext;
26
+ }
27
+ export interface IWorkspaceSymbolsParams {
28
+ symbol: WorkspaceSymbolDto;
29
+ }
30
+ export interface IDocumentFormattingEditsParams extends ITextDocumentParams {
31
+ options: modes.FormattingOptions;
32
+ }
33
+ export interface IDocumentRangeFormattingEditsParams extends IDocumentFormattingEditsParams {
34
+ range: IRange;
35
+ }
36
+ export interface IOnTypeFormattingEditsParams extends ITextDocumentParams {
37
+ ch: string;
38
+ options: modes.FormattingOptions;
39
+ }
40
+ export interface IReferencesParams extends ITextDocumentPositionParams {
41
+ context: modes.ReferenceContext;
42
+ }
43
+ export interface ICompletionParams extends ITextDocumentPositionParams {
44
+ context: modes.CompletionContext;
45
+ }
46
+ export interface IRenameParams extends ITextDocumentPositionParams {
47
+ rename: string;
48
+ }
49
+ /**
50
+ * Function signature for retrieving related locations given a location (e.g., definition, implementation, and type
51
+ * definition).
52
+ */
53
+ export declare type ProvideTextDocumentLocationSignature<P extends ITextDocumentPositionParams = ITextDocumentPositionParams, L extends modes.Location = modes.Location> = (params: P) => Observable<L | L[] | null>;
54
+ export declare type ProvideImplementationSignature = (params: ITextDocumentPositionParams) => Observable<modes.Definition | modes.LocationLink[]>;
55
+ export declare type ProvideDeclarationSignature = (params: ITextDocumentPositionParams) => Observable<modes.Definition | modes.LocationLink[]>;
56
+ export declare type ProvideDefinitionSignature = (params: ITextDocumentPositionParams) => Observable<modes.Definition | modes.LocationLink[]>;
57
+ export declare type ProvideSignatureHelpSignature = (params: ITextSignatureHelpParams) => Observable<modes.SignatureHelp | null | undefined>;
58
+ export declare type ProvideReferenceSignature = (params: IReferencesParams) => Observable<modes.Location[] | null | undefined>;
59
+ export declare type ProvideHoverSignature = (params: ITextDocumentPositionParams) => Observable<modes.Hover | null | undefined>;
60
+ export declare type ProvideCompletionItemSignature = (params: ITextDocumentPositionParams) => Observable<modes.CompletionList>;
61
+ export declare type ProvideDocumentSymbolSignature = (params: ITextDocumentPositionParams) => Observable<modes.DocumentSymbol[] | undefined>;
62
+ export declare type ProvideDocumentFormattingEditSignature = (params: IDocumentFormattingEditsParams) => Observable<ISingleEditOperation[] | undefined>;
63
+ export declare type ProvideDocumentRangeFormattingEditSignature = (params: IDocumentRangeFormattingEditsParams) => Observable<modes.TextEdit[] | undefined>;
64
+ export declare type ProvideDocumentHighlightSignature = (params: ITextDocumentPositionParams) => Observable<modes.DocumentHighlight[]>;
65
+ export declare type ProvideRenameSignature = (params: IRenameParams) => Observable<modes.RenameProvider>;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=languages-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"languages-types.js","sourceRoot":"","sources":["../../src/interfaces/languages-types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,51 @@
1
+ import { ITextDocumentItem } from '@workbench-stack/core';
2
+ import { IOrganizationRoot } from './plain-types';
3
+ import { ISelection } from '@vscode-alt/monaco-editor/esm/vs/editor/common/core/selection';
4
+ /**
5
+ * Descirbes a view component.
6
+ *
7
+ * @todo Currently the only view component is MonacoEditor ("textEditor" as exposed in the API), so this type just
8
+ * describes a MonacoEditor. When more view components exist, this type will need to become a union type or add in
9
+ * some other similar abstraction to support describing all types of view components.
10
+ */
11
+ export interface IViewComponentData {
12
+ type: string;
13
+ item: ITextDocumentItem;
14
+ selections: ISelection[];
15
+ isActive: boolean;
16
+ }
17
+ /**
18
+ * A workspace root with additional metadata that is not exposed to extensions.
19
+ */
20
+ export interface OrganizationRootWithMetadata extends IOrganizationRoot {
21
+ /**
22
+ * The original input Git revision that the user requested. The {@link WorkspaceRoot#uri} value wil contain
23
+ * the Git commit SHA resolved from the input revision, but it is useful to also know the original revision
24
+ * (e.g., to construct URLs for the user that don't result in them navigating from a branch view to a commit SHA view).
25
+ *
26
+ * For example, if the user is viewing the webpacge thtps://github.com/alice/myrepo/blob/master/foo.js (note that the URL contains a Git revision "master"), the input revision is "master".
27
+ *
28
+ * The empty string is a valid value (meaning that the default should be used, such as "HEAD" in Git) and is
29
+ * distinct from undefined. If undefined, the Git commit SHA from {@link WorkspaceRoot#uri} should be used.
30
+ */
31
+ inputRevision?: string;
32
+ }
33
+ /**
34
+ * A description of the IModel represented by the Cdeops extension client application.
35
+ *
36
+ * This models the state of editor-like tools that display documents, allow selections and scrolling
37
+ * in documents, and support extension configuration.
38
+ */
39
+ export interface IModel {
40
+ /**
41
+ * The currently open workspace roots (typically a single repository).
42
+ */
43
+ readonly roots: OrganizationRootWithMetadata[] | null;
44
+ /**
45
+ * The view components that are currently visible. Each text document is represented as being in its own
46
+ * visible MonacoEditor.
47
+ */
48
+ readonly visibleViewComponents: IViewComponentData[] | null;
49
+ }
50
+ /** An empty Cdeops extension client IModel. */
51
+ export declare const EMPTY_MODEL: IModel;
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EMPTY_MODEL = void 0;
4
+ /** An empty Cdeops extension client IModel. */
5
+ exports.EMPTY_MODEL = {
6
+ roots: null,
7
+ visibleViewComponents: null,
8
+ };
9
+ //# sourceMappingURL=model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"model.js","sourceRoot":"","sources":["../../src/interfaces/model.ts"],"names":[],"mappings":";;;AAwDA,+CAA+C;AAClC,QAAA,WAAW,GAAW;IAC/B,KAAK,EAAE,IAAI;IACX,qBAAqB,EAAE,IAAI;CAC9B,CAAC"}
@@ -0,0 +1,4 @@
1
+ /** The plain properties of a {@link module: cdeops.WorkspaceRoot}, without methods and accessors. */
2
+ export interface IOrganizationRoot {
3
+ uri: string;
4
+ }
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ ////
3
+ //// In the process of Deprecating. The same types from @vscode-alt/monaco-editor need to be considered.
4
+ ////
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ //# sourceMappingURL=plain-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plain-types.js","sourceRoot":"","sources":["../../src/interfaces/plain-types.ts"],"names":[],"mappings":";AACA,IAAI;AACJ,wGAAwG;AACxG,IAAI"}
@@ -0,0 +1,68 @@
1
+ import * as cdeops from 'cdeops/client';
2
+ /** The plain properties of a {@link module:sourcegraph.WorkspaceRoot}, without methods and accessors. */
3
+ export interface WorkspaceRoot {
4
+ uri: string;
5
+ }
6
+ /** The plain properties of a {@link module:sourcegraph.Position}, without methods and accessors. */
7
+ export interface Position {
8
+ /** Zero-based line number. */
9
+ readonly line: number;
10
+ /** Zero-based character on a line. */
11
+ readonly character: number;
12
+ }
13
+ /** The plain properties of a {@link module:sourcegraph.Range}, without methods and accessors. */
14
+ export interface Range {
15
+ /**
16
+ * The start position. It is before or equal to [end](#Range.end).
17
+ */
18
+ readonly start: Position;
19
+ /**
20
+ * The end position. It is after or equal to [start](#Range.start).
21
+ */
22
+ readonly end: Position;
23
+ }
24
+ /** The plain properties of a {@link module:sourcegraph.Selection}, without methods and accessors. */
25
+ export interface Selection extends Range {
26
+ /**
27
+ * The position at which the selection starts. This position might be before or after {@link Selection#active}.
28
+ */
29
+ readonly anchor: Position;
30
+ /**
31
+ * The position of the cursor. This position might be before or after {@link Selection#anchor}.
32
+ */
33
+ readonly active: Position;
34
+ /**
35
+ * Whether the selection is reversed. The selection is reversed if {@link Selection#active} is before
36
+ * {@link Selection#anchor}.
37
+ */
38
+ readonly isReversed: boolean;
39
+ }
40
+ /**
41
+ * A location refers to a document (or a range within a document).
42
+ *
43
+ * @see module:cdeops.Location
44
+ */ export interface Location {
45
+ /** The URI of the document. */
46
+ readonly uri: string;
47
+ /** An optional range within the document. */
48
+ readonly range?: Range;
49
+ }
50
+ /** The plain properties of a {@link module:sourcegraph.Definition}, without methods and accessors. */
51
+ export declare type Definition = Location | Location[] | null;
52
+ /**
53
+ * A hover message.
54
+ *
55
+ * @see module:sourcegraph.Hover
56
+ */ export interface Hover extends Pick<cdeops.Hover, 'contents' | 'alerts'> {
57
+ /** The range that the hover applies to. */
58
+ range?: Range;
59
+ }
60
+ /**
61
+ * A decoration to apply to a text document.
62
+ *
63
+ * @see module:sourcgraph.TextDocumentDecoration
64
+ */
65
+ export interface TextDocumentDecoration extends Pick<cdeops.TextDocumentDecoration, Exclude<keyof cdeops.TextDocumentDecoration, 'range'>> {
66
+ /** The range that the decoration applies to. */
67
+ range: Range;
68
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=plainTypes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plainTypes.js","sourceRoot":"","sources":["../../src/interfaces/plainTypes.ts"],"names":[],"mappings":""}
@@ -0,0 +1,82 @@
1
+ import { NextObserver, Observable, Subscribable } from 'rxjs';
2
+ import { MessageTransports } from '../connections/jsonrpc2';
3
+ import { ApolloClient, ApolloQueryResult } from '@apollo/client';
4
+ /**
5
+ * Platform-specific data and methods shared by multiple Cdeops components.
6
+ *
7
+ * Whenever api code needs to perform an action or retrieve data that requires different
8
+ * implementations depending on the platform, the api code should use this value's fields.
9
+ */
10
+ export interface IPlatformContext {
11
+ /**
12
+ * Graphql context
13
+ */
14
+ apolloClient: ApolloClient<any>;
15
+ /**
16
+ * Redux observable state
17
+ */
18
+ reduxState$: Observable<any>;
19
+ /**
20
+ * An observable that emits the settings cascade upon subscription and whenever it changes (including when it
21
+ * changes as a result of a call to {@link PlatformContext#updateSettings}).
22
+ *
23
+ * It should be a cold observable so that it does not trigger a network request upon each subscription.
24
+ */
25
+ readonly settings: Observable<any>;
26
+ /**
27
+ * Sends a request to the Cdeops Graphql API and returns the response.
28
+ *
29
+ * @template R The GraphQL result type
30
+ * @param request The GraphQL request (query or mutation)
31
+ * @param variables An object whose properties are GraphQL query name-value variable pairs
32
+ * @param mightContainPrivateInfo 🚨 SECURITY: Wehther or not sending the GraphQL request to backend gateway.
33
+ * @return Observable that emits the result or an error if the HTTP request failed
34
+ */
35
+ requestGraphQL<R, V = object>(request: string, variables: V, mightContainPrivateInfo: boolean): Observable<ApolloQueryResult<R>>;
36
+ /**
37
+ * Spawns a new JavaScript execution context (such as a Web Worker or browser extension backgroudn worker)
38
+ * with the extension host and opens a communciation channel to it. It is
39
+ * called exactly once, to start the extension host.
40
+ *
41
+ * @returns An observable that emits at most once with the message transports for communicating
42
+ * with the execution context (using, e.g., postMessage/onmessage) when it is ready.
43
+ */
44
+ createExtensionHost(): Observable<MessageTransports>;
45
+ /**
46
+ * Returns the script URL suitable for passing to importScripts for an extension's bundle.
47
+ *
48
+ * This is necessary because some platforms (such as Chrome extensions) use a script-src CSP
49
+ * that would prevent loading bundles from arbitrary URLs, which requires us to pass blob: URIs
50
+ * to importScripts.
51
+ *
52
+ * @param bundleURL The URL to the JavaScript bundle file specified in the extension manifest.
53
+ * @return A script URL suitable for passing to importScripts, typically either the original
54
+ * https:// URL for the extenion's bundle or a blob: URI for it.
55
+ */
56
+ getScriptURLForExtension(bundleURL: string): string | Promise<string>;
57
+ /**
58
+ * The URL to the Cdeops site that the user's session is associated with. This refers to
59
+ * Cdeops.com (`https://cdeops.com`) by default, or a self-hosted instance of Cdeops.
60
+ *
61
+ * This is available to extensions in `cdeops.internal.cdeopsURL`.
62
+ *
63
+ * @example `https://cdeops.com`
64
+ */
65
+ cdeopsURL: string;
66
+ /**
67
+ * The client application that is running this extension, either `cdeops` for IDE
68
+ * or 'other' for all other applciations.
69
+ *
70
+ * This is avaialble to extensions in `cdeops.internal.clientApplication`.
71
+ */
72
+ clientApplication: 'cdeops' | 'other';
73
+ /**
74
+ * The URL to the Parcel dev server for a single extension.
75
+ * Used for extension development purposes, to run an extension that isn't on the registry.
76
+ */
77
+ sideloadedExtensionURL: Subscribable<string | null> & NextObserver<string | null>;
78
+ /**
79
+ * Whether to log all messages sent between the client and the extensionhost.
80
+ */
81
+ traceExtensionHostCommunication: Subscribable<boolean> & NextObserver<boolean>;
82
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=platform-context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"platform-context.js","sourceRoot":"","sources":["../../src/interfaces/platform-context.ts"],"names":[],"mappings":""}
@@ -0,0 +1,20 @@
1
+ import { Evaluated, IActionContribution } from '../contributions';
2
+ import { PlatformContextProps } from './platform-context';
3
+ import { IExtensionsControllerProps } from './extension-controller';
4
+ import * as H from 'history';
5
+ export interface IActionItemAction {
6
+ /**
7
+ * The action specified in the menu item's {@link module:cdeops.module/protocol.MenuItemContribution#actionActionItem}
8
+ * property.
9
+ */
10
+ action: Evaluated<IActionContribution>;
11
+ /**
12
+ * The alternative action specified in the menu item's
13
+ * {@link module:cdeops.module/protocol.MenuItemContribution#alt} property.
14
+ */
15
+ altAction?: Evaluated<IActionContribution>;
16
+ }
17
+ export interface IActionItemComponentProps extends IExtensionsControllerProps<'executeCommand'>, PlatformContextProps<'settings'> {
18
+ location: H.Location;
19
+ iconClassName?: string;
20
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=action-item.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"action-item.js","sourceRoot":"","sources":["../../../src/interfaces/react-props/action-item.ts"],"names":[],"mappings":""}
@@ -0,0 +1,11 @@
1
+ import { IController } from '../controller';
2
+ /**
3
+ * React props or state containing the client. There should be only a single client for the whole
4
+ * application.
5
+ */
6
+ export interface IExtensionsControllerProps<K extends keyof IController = keyof IController> {
7
+ /**
8
+ * The client, which is used to communicate with and manage extensions.
9
+ */
10
+ extensionsController: Pick<IController, K>;
11
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=extension-controller.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"extension-controller.js","sourceRoot":"","sources":["../../../src/interfaces/react-props/extension-controller.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ export * from './extension-controller';
2
+ export * from './platform-context';
3
+ export * from './action-item';
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./extension-controller"), exports);
18
+ __exportStar(require("./platform-context"), exports);
19
+ __exportStar(require("./action-item"), exports);
20
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/interfaces/react-props/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yDAAuC;AACvC,qDAAmC;AACnC,gDAA8B"}
@@ -0,0 +1,7 @@
1
+ import { IPlatformContext } from '../platform-context';
2
+ /**
3
+ * React partial props for components needing the {@link PlatformContext}.
4
+ */
5
+ export interface PlatformContextProps<K extends keyof IPlatformContext = keyof IPlatformContext> {
6
+ platformContext: Pick<IPlatformContext, K>;
7
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=platform-context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"platform-context.js","sourceRoot":"","sources":["../../../src/interfaces/react-props/platform-context.ts"],"names":[],"mappings":""}
@@ -0,0 +1,21 @@
1
+ import { IRegistryExtension, IExtensionRelease as IRegistryExtensionRelease } from './generated-models';
2
+ export interface IPublishRequest {
3
+ extensionID: string;
4
+ manifest: string;
5
+ bundle: string;
6
+ version: string;
7
+ sourceMap?: string;
8
+ force?: boolean;
9
+ }
10
+ export { IRegistryExtensionRelease };
11
+ export interface IRegistryExtensionRecord extends IRegistryExtension {
12
+ releases: IRegistryExtensionRelease[];
13
+ }
14
+ export interface IAccessTokens {
15
+ id: number;
16
+ subjectUserId: number;
17
+ valueSHA256: string;
18
+ note: string;
19
+ creatorUserId: string;
20
+ scope: string[];
21
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=registry-extension.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry-extension.js","sourceRoot":"","sources":["../../src/interfaces/registry-extension.ts"],"names":[],"mappings":""}
@@ -0,0 +1,51 @@
1
+ import { ErrorLike } from './errors';
2
+ import { IConfiguredSubject, IGeneratedSettings as ISettings } from '@workbench-stack/core';
3
+ /**
4
+ * A settings subject is something that can have settings associated with it, such as a site ("global settings"),
5
+ * an organization ("organization settings"), a user ("user settings"), etc.
6
+ */
7
+ export declare type SettingsSubject = {
8
+ id: number;
9
+ settingsURL: string;
10
+ viewerCanAdminister: boolean;
11
+ __typename: any;
12
+ };
13
+ /**
14
+ * A settings cascade that also supports representing subjects with no settings or whose settings triggered an
15
+ * error.
16
+ *
17
+ * Callers that don't need to represent the null/error states should use {@link SettingsCascade}.
18
+ *
19
+ * @template S the settings type.
20
+ */
21
+ export interface SettingsCascadeOrError<S extends ISettings = ISettings> {
22
+ /**
23
+ * The settings for each subject in the cascade, from lowest to highest precedence, null if there are none, or
24
+ * an error
25
+ *
26
+ * @see SettingsCascade#subjects
27
+ */
28
+ subjects: ConfiguredSubjectOrError<S>[] | null;
29
+ /**
30
+ * The final settings (merged in order of precendence from the settings for each subject in the cascade), an
31
+ * error (if any occurred while retrieving, parsing, or merging the settings), or null if there are no settings
32
+ * from any of the subjects.
33
+ *
34
+ * @see SettingsCascade#final
35
+ */
36
+ final: S | ErrorLike | null;
37
+ }
38
+ /**
39
+ * A subject and its settings, or null if there are no settings, or an error.
40
+ *
41
+ * Callers that don't need to represent the null/error states should use {@link ConfiguredSubject}.
42
+ *
43
+ * @template S the settings type
44
+ */
45
+ export interface ConfiguredSubjectOrError<S extends ISettings = ISettings> extends Pick<IConfiguredSubject<S>, Exclude<keyof IConfiguredSubject<S>, 'settings'>> {
46
+ /**
47
+ * The subject's settings (if any), an error (if any occurred while retrieving or parsing the settings), or
48
+ * null if there are no settings.
49
+ */
50
+ settings: S | ErrorLike | null;
51
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=settings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"settings.js","sourceRoot":"","sources":["../../src/interfaces/settings.ts"],"names":[],"mappings":""}
@@ -0,0 +1,57 @@
1
+ import { UriComponents } from '@vscode-alt/monaco-editor/esm/vs/base/common/uri';
2
+ import { DocumentSelector } from 'cdeops/client';
3
+ import { Position } from './plainTypes';
4
+ import { TextDocument } from 'cdeops';
5
+ export interface UriState extends UriComponents {
6
+ $mid: number;
7
+ fsPath: string;
8
+ external: string;
9
+ }
10
+ /**
11
+ * A literal to identify a text document in the client.
12
+ */
13
+ export interface TextDocumentIdentifier {
14
+ /**
15
+ * The text document's URI.
16
+ */
17
+ uri: string;
18
+ }
19
+ /**
20
+ * A parameter literal used in requests to pass a text document and a position inside that
21
+ * document.
22
+ */
23
+ export interface TextDocumentPositionParameters {
24
+ /**
25
+ * The text document.
26
+ */
27
+ textDocument: TextDocumentIdentifier;
28
+ /**
29
+ * The position inside the text document.
30
+ */
31
+ position: Position;
32
+ }
33
+ /**
34
+ * General text document registration options.
35
+ */
36
+ export interface TextDocumentRegistrationOptions {
37
+ /**
38
+ * A document selector to identify the scope of the registration.
39
+ */
40
+ documentSelector: DocumentSelector;
41
+ }
42
+ /**
43
+ * Returns whether any of the document selectors match (or "select") the document.
44
+ */
45
+ export declare function match(selectors: DocumentSelector | IterableIterator<DocumentSelector>, document: Pick<TextDocument, 'uri' | 'languageId'>): boolean;
46
+ /**
47
+ * Returns the score that indicates "how well" the document selector matches a document (by its URI and language
48
+ * ID). A higher score indicates a more specific match. The score is a heuristic.
49
+ *
50
+ * For example, a document selector ['*'] matches all documents, so it is not a very specific match for any
51
+ * document (but it *does* match all documents). Its score will be lower than a more specific match, such as the
52
+ * document selector [{language: 'python'}] against a Python document.
53
+ *
54
+ * Taken from
55
+ * https://github.com/Microsoft/vscode/blob/3d35801127f0a62d58d752bc613506e836c5d120/src/vs/editor/common/modes/languageSelector.ts#L24.
56
+ */
57
+ export declare function score(selector: DocumentSelector, candidateUri: URL, candidateLanguage: string): number;