@opensumi/ide-core-common 2.12.1-next-079c1930

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 (450) hide show
  1. package/lib/application-error.d.ts +36 -0
  2. package/lib/application-error.d.ts.map +1 -0
  3. package/lib/application-error.js +64 -0
  4. package/lib/application-error.js.map +1 -0
  5. package/lib/application-props.d.ts +26 -0
  6. package/lib/application-props.d.ts.map +1 -0
  7. package/lib/application-props.js +3 -0
  8. package/lib/application-props.js.map +1 -0
  9. package/lib/arrays.d.ts +131 -0
  10. package/lib/arrays.d.ts.map +1 -0
  11. package/lib/arrays.js +533 -0
  12. package/lib/arrays.js.map +1 -0
  13. package/lib/async.d.ts +165 -0
  14. package/lib/async.d.ts.map +1 -0
  15. package/lib/async.js +417 -0
  16. package/lib/async.js.map +1 -0
  17. package/lib/browser-fs/ensure-dir.d.ts +7 -0
  18. package/lib/browser-fs/ensure-dir.d.ts.map +1 -0
  19. package/lib/browser-fs/ensure-dir.js +40 -0
  20. package/lib/browser-fs/ensure-dir.js.map +1 -0
  21. package/lib/browser-fs/util.d.ts +18 -0
  22. package/lib/browser-fs/util.d.ts.map +1 -0
  23. package/lib/browser-fs/util.js +21 -0
  24. package/lib/browser-fs/util.js.map +1 -0
  25. package/lib/cache.d.ts +12 -0
  26. package/lib/cache.d.ts.map +1 -0
  27. package/lib/cache.js +36 -0
  28. package/lib/cache.js.map +1 -0
  29. package/lib/cancellation.d.ts +23 -0
  30. package/lib/cancellation.d.ts.map +1 -0
  31. package/lib/cancellation.js +116 -0
  32. package/lib/cancellation.js.map +1 -0
  33. package/lib/charCode.d.ts +406 -0
  34. package/lib/charCode.d.ts.map +1 -0
  35. package/lib/charCode.js +8 -0
  36. package/lib/charCode.js.map +1 -0
  37. package/lib/character-classifier.d.ts +25 -0
  38. package/lib/character-classifier.d.ts.map +1 -0
  39. package/lib/character-classifier.js +58 -0
  40. package/lib/character-classifier.js.map +1 -0
  41. package/lib/command.d.ts +350 -0
  42. package/lib/command.d.ts.map +1 -0
  43. package/lib/command.js +408 -0
  44. package/lib/command.js.map +1 -0
  45. package/lib/connection.d.ts +8 -0
  46. package/lib/connection.d.ts.map +1 -0
  47. package/lib/connection.js +17 -0
  48. package/lib/connection.js.map +1 -0
  49. package/lib/const/application.d.ts +3 -0
  50. package/lib/const/application.d.ts.map +1 -0
  51. package/lib/const/application.js +6 -0
  52. package/lib/const/application.js.map +1 -0
  53. package/lib/const/encodings.d.ts +10 -0
  54. package/lib/const/encodings.d.ts.map +1 -0
  55. package/lib/const/encodings.js +244 -0
  56. package/lib/const/encodings.js.map +1 -0
  57. package/lib/const/index.d.ts +2 -0
  58. package/lib/const/index.d.ts.map +1 -0
  59. package/lib/const/index.js +5 -0
  60. package/lib/const/index.js.map +1 -0
  61. package/lib/contribution-provider.d.ts +38 -0
  62. package/lib/contribution-provider.d.ts.map +1 -0
  63. package/lib/contribution-provider.js +60 -0
  64. package/lib/contribution-provider.js.map +1 -0
  65. package/lib/credential.d.ts +21 -0
  66. package/lib/credential.d.ts.map +1 -0
  67. package/lib/credential.js +6 -0
  68. package/lib/credential.js.map +1 -0
  69. package/lib/cryptr.d.ts +7 -0
  70. package/lib/cryptr.d.ts.map +1 -0
  71. package/lib/cryptr.js +6 -0
  72. package/lib/cryptr.js.map +1 -0
  73. package/lib/date.d.ts +2 -0
  74. package/lib/date.d.ts.map +1 -0
  75. package/lib/date.js +16 -0
  76. package/lib/date.js.map +1 -0
  77. package/lib/declare.d.ts +3 -0
  78. package/lib/declare.d.ts.map +1 -0
  79. package/lib/declare.js +3 -0
  80. package/lib/declare.js.map +1 -0
  81. package/lib/di-helper/domain-helper.d.ts +14 -0
  82. package/lib/di-helper/domain-helper.d.ts.map +1 -0
  83. package/lib/di-helper/domain-helper.js +48 -0
  84. package/lib/di-helper/domain-helper.js.map +1 -0
  85. package/lib/di-helper/index.d.ts +2 -0
  86. package/lib/di-helper/index.d.ts.map +1 -0
  87. package/lib/di-helper/index.js +5 -0
  88. package/lib/di-helper/index.js.map +1 -0
  89. package/lib/disposable.d.ts +88 -0
  90. package/lib/disposable.d.ts.map +1 -0
  91. package/lib/disposable.js +309 -0
  92. package/lib/disposable.js.map +1 -0
  93. package/lib/electron.d.ts +118 -0
  94. package/lib/electron.d.ts.map +1 -0
  95. package/lib/electron.js +7 -0
  96. package/lib/electron.js.map +1 -0
  97. package/lib/encoding/index.d.ts +34 -0
  98. package/lib/encoding/index.d.ts.map +1 -0
  99. package/lib/encoding/index.js +219 -0
  100. package/lib/encoding/index.js.map +1 -0
  101. package/lib/env.d.ts +2 -0
  102. package/lib/env.d.ts.map +1 -0
  103. package/lib/env.js +5 -0
  104. package/lib/env.js.map +1 -0
  105. package/lib/errors.d.ts +60 -0
  106. package/lib/errors.d.ts.map +1 -0
  107. package/lib/errors.js +148 -0
  108. package/lib/errors.js.map +1 -0
  109. package/lib/event-bus/basic-event.d.ts +5 -0
  110. package/lib/event-bus/basic-event.d.ts.map +1 -0
  111. package/lib/event-bus/basic-event.js +10 -0
  112. package/lib/event-bus/basic-event.js.map +1 -0
  113. package/lib/event-bus/event-bus-types.d.ts +66 -0
  114. package/lib/event-bus/event-bus-types.d.ts.map +1 -0
  115. package/lib/event-bus/event-bus-types.js +5 -0
  116. package/lib/event-bus/event-bus-types.js.map +1 -0
  117. package/lib/event-bus/event-bus.d.ts +13 -0
  118. package/lib/event-bus/event-bus.d.ts.map +1 -0
  119. package/lib/event-bus/event-bus.js +55 -0
  120. package/lib/event-bus/event-bus.js.map +1 -0
  121. package/lib/event-bus/event-decorator.d.ts +10 -0
  122. package/lib/event-bus/event-decorator.d.ts.map +1 -0
  123. package/lib/event-bus/event-decorator.js +34 -0
  124. package/lib/event-bus/event-decorator.js.map +1 -0
  125. package/lib/event-bus/index.d.ts +5 -0
  126. package/lib/event-bus/index.d.ts.map +1 -0
  127. package/lib/event-bus/index.js +8 -0
  128. package/lib/event-bus/index.js.map +1 -0
  129. package/lib/event.d.ts +270 -0
  130. package/lib/event.d.ts.map +1 -0
  131. package/lib/event.js +810 -0
  132. package/lib/event.js.map +1 -0
  133. package/lib/filters.d.ts +51 -0
  134. package/lib/filters.d.ts.map +1 -0
  135. package/lib/filters.js +688 -0
  136. package/lib/filters.js.map +1 -0
  137. package/lib/functional.d.ts +4 -0
  138. package/lib/functional.d.ts.map +1 -0
  139. package/lib/functional.js +45 -0
  140. package/lib/functional.js.map +1 -0
  141. package/lib/hash-calculate/WASMInterface.d.ts +61 -0
  142. package/lib/hash-calculate/WASMInterface.d.ts.map +1 -0
  143. package/lib/hash-calculate/WASMInterface.js +180 -0
  144. package/lib/hash-calculate/WASMInterface.js.map +1 -0
  145. package/lib/hash-calculate/hash-calculate.d.ts +13 -0
  146. package/lib/hash-calculate/hash-calculate.d.ts.map +1 -0
  147. package/lib/hash-calculate/hash-calculate.js +41 -0
  148. package/lib/hash-calculate/hash-calculate.js.map +1 -0
  149. package/lib/hash-calculate/lockedCreate.d.ts +4 -0
  150. package/lib/hash-calculate/lockedCreate.d.ts.map +1 -0
  151. package/lib/hash-calculate/lockedCreate.js +17 -0
  152. package/lib/hash-calculate/lockedCreate.js.map +1 -0
  153. package/lib/hash-calculate/md5.wasm.json +1 -0
  154. package/lib/hash-calculate/mutex.d.ts +6 -0
  155. package/lib/hash-calculate/mutex.d.ts.map +1 -0
  156. package/lib/hash-calculate/mutex.js +32 -0
  157. package/lib/hash-calculate/mutex.js.map +1 -0
  158. package/lib/hash-calculate/util.d.ts +12 -0
  159. package/lib/hash-calculate/util.d.ts.map +1 -0
  160. package/lib/hash-calculate/util.js +166 -0
  161. package/lib/hash-calculate/util.js.map +1 -0
  162. package/lib/id-generator.d.ts +8 -0
  163. package/lib/id-generator.d.ts.map +1 -0
  164. package/lib/id-generator.js +15 -0
  165. package/lib/id-generator.js.map +1 -0
  166. package/lib/index.d.ts +47 -0
  167. package/lib/index.d.ts.map +1 -0
  168. package/lib/index.js +50 -0
  169. package/lib/index.js.map +1 -0
  170. package/lib/iterator.d.ts +14 -0
  171. package/lib/iterator.d.ts.map +1 -0
  172. package/lib/iterator.js +9 -0
  173. package/lib/iterator.js.map +1 -0
  174. package/lib/json-schema.d.ts +65 -0
  175. package/lib/json-schema.d.ts.map +1 -0
  176. package/lib/json-schema.js +3 -0
  177. package/lib/json-schema.js.map +1 -0
  178. package/lib/keyboard/index.d.ts +3 -0
  179. package/lib/keyboard/index.d.ts.map +1 -0
  180. package/lib/keyboard/index.js +6 -0
  181. package/lib/keyboard/index.js.map +1 -0
  182. package/lib/keyboard/keyboard-layout-provider.d.ts +38 -0
  183. package/lib/keyboard/keyboard-layout-provider.d.ts.map +1 -0
  184. package/lib/keyboard/keyboard-layout-provider.js +23 -0
  185. package/lib/keyboard/keyboard-layout-provider.js.map +1 -0
  186. package/lib/keyboard/keymap.d.ts +71 -0
  187. package/lib/keyboard/keymap.d.ts.map +1 -0
  188. package/lib/keyboard/keymap.js +128 -0
  189. package/lib/keyboard/keymap.js.map +1 -0
  190. package/lib/lifecycle.d.ts +17 -0
  191. package/lib/lifecycle.d.ts.map +1 -0
  192. package/lib/lifecycle.js +37 -0
  193. package/lib/lifecycle.js.map +1 -0
  194. package/lib/line-text.d.ts +17 -0
  195. package/lib/line-text.d.ts.map +1 -0
  196. package/lib/line-text.js +72 -0
  197. package/lib/line-text.js.map +1 -0
  198. package/lib/linked-list.d.ts +18 -0
  199. package/lib/linked-list.d.ts.map +1 -0
  200. package/lib/linked-list.js +138 -0
  201. package/lib/linked-list.js.map +1 -0
  202. package/lib/linkedText.d.ts +13 -0
  203. package/lib/linkedText.d.ts.map +1 -0
  204. package/lib/linkedText.js +50 -0
  205. package/lib/linkedText.js.map +1 -0
  206. package/lib/localize.d.ts +52 -0
  207. package/lib/localize.d.ts.map +1 -0
  208. package/lib/localize.js +128 -0
  209. package/lib/localize.js.map +1 -0
  210. package/lib/log.d.ts +181 -0
  211. package/lib/log.d.ts.map +1 -0
  212. package/lib/log.js +163 -0
  213. package/lib/log.js.map +1 -0
  214. package/lib/map.d.ts +124 -0
  215. package/lib/map.d.ts.map +1 -0
  216. package/lib/map.js +819 -0
  217. package/lib/map.js.map +1 -0
  218. package/lib/menu.d.ts +27 -0
  219. package/lib/menu.d.ts.map +1 -0
  220. package/lib/menu.js +5 -0
  221. package/lib/menu.js.map +1 -0
  222. package/lib/mocks/electron/browserMock.d.ts +2 -0
  223. package/lib/mocks/electron/browserMock.d.ts.map +1 -0
  224. package/lib/mocks/electron/browserMock.js +15 -0
  225. package/lib/mocks/electron/browserMock.js.map +1 -0
  226. package/lib/mocks/electron/ipcRenderer.d.ts +13 -0
  227. package/lib/mocks/electron/ipcRenderer.d.ts.map +1 -0
  228. package/lib/mocks/electron/ipcRenderer.js +32 -0
  229. package/lib/mocks/electron/ipcRenderer.js.map +1 -0
  230. package/lib/module.d.ts +23 -0
  231. package/lib/module.d.ts.map +1 -0
  232. package/lib/module.js +22 -0
  233. package/lib/module.js.map +1 -0
  234. package/lib/network.d.ts +33 -0
  235. package/lib/network.d.ts.map +1 -0
  236. package/lib/network.js +37 -0
  237. package/lib/network.js.map +1 -0
  238. package/lib/node/port.d.ts +14 -0
  239. package/lib/node/port.d.ts.map +1 -0
  240. package/lib/node/port.js +124 -0
  241. package/lib/node/port.js.map +1 -0
  242. package/lib/path.d.ts +92 -0
  243. package/lib/path.d.ts.map +1 -0
  244. package/lib/path.js +1711 -0
  245. package/lib/path.js.map +1 -0
  246. package/lib/platform.d.ts +48 -0
  247. package/lib/platform.d.ts.map +1 -0
  248. package/lib/platform.js +143 -0
  249. package/lib/platform.js.map +1 -0
  250. package/lib/preferences/index.d.ts +3 -0
  251. package/lib/preferences/index.d.ts.map +1 -0
  252. package/lib/preferences/index.js +6 -0
  253. package/lib/preferences/index.js.map +1 -0
  254. package/lib/preferences/preference-schema.d.ts +76 -0
  255. package/lib/preferences/preference-schema.d.ts.map +1 -0
  256. package/lib/preferences/preference-schema.js +59 -0
  257. package/lib/preferences/preference-schema.js.map +1 -0
  258. package/lib/preferences/preference-scope.d.ts +15 -0
  259. package/lib/preferences/preference-scope.d.ts.map +1 -0
  260. package/lib/preferences/preference-scope.js +54 -0
  261. package/lib/preferences/preference-scope.js.map +1 -0
  262. package/lib/problem-matcher.d.ts +111 -0
  263. package/lib/problem-matcher.d.ts.map +1 -0
  264. package/lib/problem-matcher.js +294 -0
  265. package/lib/problem-matcher.js.map +1 -0
  266. package/lib/problem-pattern.d.ts +193 -0
  267. package/lib/problem-pattern.d.ts.map +1 -0
  268. package/lib/problem-pattern.js +416 -0
  269. package/lib/problem-pattern.js.map +1 -0
  270. package/lib/process.d.ts +5 -0
  271. package/lib/process.d.ts.map +1 -0
  272. package/lib/process.js +15 -0
  273. package/lib/process.js.map +1 -0
  274. package/lib/progress.d.ts +56 -0
  275. package/lib/progress.d.ts.map +1 -0
  276. package/lib/progress.js +25 -0
  277. package/lib/progress.js.map +1 -0
  278. package/lib/range.d.ts +7 -0
  279. package/lib/range.d.ts.map +1 -0
  280. package/lib/range.js +28 -0
  281. package/lib/range.js.map +1 -0
  282. package/lib/reference.d.ts +35 -0
  283. package/lib/reference.d.ts.map +1 -0
  284. package/lib/reference.js +122 -0
  285. package/lib/reference.js.map +1 -0
  286. package/lib/reporter.d.ts +16 -0
  287. package/lib/reporter.d.ts.map +1 -0
  288. package/lib/reporter.js +66 -0
  289. package/lib/reporter.js.map +1 -0
  290. package/lib/sequence.d.ts +20 -0
  291. package/lib/sequence.d.ts.map +1 -0
  292. package/lib/sequence.js +17 -0
  293. package/lib/sequence.js.map +1 -0
  294. package/lib/storage.d.ts +64 -0
  295. package/lib/storage.d.ts.map +1 -0
  296. package/lib/storage.js +70 -0
  297. package/lib/storage.js.map +1 -0
  298. package/lib/task-definition.d.ts +45 -0
  299. package/lib/task-definition.d.ts.map +1 -0
  300. package/lib/task-definition.js +130 -0
  301. package/lib/task-definition.js.map +1 -0
  302. package/lib/theme.d.ts +5 -0
  303. package/lib/theme.d.ts.map +1 -0
  304. package/lib/theme.js +8 -0
  305. package/lib/theme.js.map +1 -0
  306. package/lib/types/accessibility.d.ts +5 -0
  307. package/lib/types/accessibility.d.ts.map +1 -0
  308. package/lib/types/accessibility.js +3 -0
  309. package/lib/types/accessibility.js.map +1 -0
  310. package/lib/types/application.d.ts +13 -0
  311. package/lib/types/application.d.ts.map +1 -0
  312. package/lib/types/application.js +5 -0
  313. package/lib/types/application.js.map +1 -0
  314. package/lib/types/authentication.d.ts +90 -0
  315. package/lib/types/authentication.d.ts.map +1 -0
  316. package/lib/types/authentication.js +8 -0
  317. package/lib/types/authentication.js.map +1 -0
  318. package/lib/types/common.d.ts +10 -0
  319. package/lib/types/common.d.ts.map +1 -0
  320. package/lib/types/common.js +6 -0
  321. package/lib/types/common.js.map +1 -0
  322. package/lib/types/dnd.d.ts +8 -0
  323. package/lib/types/dnd.d.ts.map +1 -0
  324. package/lib/types/dnd.js +9 -0
  325. package/lib/types/dnd.js.map +1 -0
  326. package/lib/types/editor.d.ts +157 -0
  327. package/lib/types/editor.d.ts.map +1 -0
  328. package/lib/types/editor.js +148 -0
  329. package/lib/types/editor.js.map +1 -0
  330. package/lib/types/extension.d.ts +73 -0
  331. package/lib/types/extension.d.ts.map +1 -0
  332. package/lib/types/extension.js +28 -0
  333. package/lib/types/extension.js.map +1 -0
  334. package/lib/types/file-watch.d.ts +70 -0
  335. package/lib/types/file-watch.d.ts.map +1 -0
  336. package/lib/types/file-watch.js +72 -0
  337. package/lib/types/file-watch.js.map +1 -0
  338. package/lib/types/file.d.ts +219 -0
  339. package/lib/types/file.d.ts.map +1 -0
  340. package/lib/types/file.js +51 -0
  341. package/lib/types/file.js.map +1 -0
  342. package/lib/types/index.d.ts +13 -0
  343. package/lib/types/index.d.ts.map +1 -0
  344. package/lib/types/index.js +16 -0
  345. package/lib/types/index.js.map +1 -0
  346. package/lib/types/markers/index.d.ts +3 -0
  347. package/lib/types/markers/index.d.ts.map +1 -0
  348. package/lib/types/markers/index.js +6 -0
  349. package/lib/types/markers/index.js.map +1 -0
  350. package/lib/types/markers/markers-manager.d.ts +120 -0
  351. package/lib/types/markers/markers-manager.d.ts.map +1 -0
  352. package/lib/types/markers/markers-manager.js +307 -0
  353. package/lib/types/markers/markers-manager.js.map +1 -0
  354. package/lib/types/markers/markers.d.ts +76 -0
  355. package/lib/types/markers/markers.d.ts.map +1 -0
  356. package/lib/types/markers/markers.js +76 -0
  357. package/lib/types/markers/markers.js.map +1 -0
  358. package/lib/types/message.d.ts +7 -0
  359. package/lib/types/message.d.ts.map +1 -0
  360. package/lib/types/message.js +11 -0
  361. package/lib/types/message.js.map +1 -0
  362. package/lib/types/reporter.d.ts +83 -0
  363. package/lib/types/reporter.d.ts.map +1 -0
  364. package/lib/types/reporter.js +63 -0
  365. package/lib/types/reporter.js.map +1 -0
  366. package/lib/types/string.d.ts +4 -0
  367. package/lib/types/string.d.ts.map +1 -0
  368. package/lib/types/string.js +3 -0
  369. package/lib/types/string.js.map +1 -0
  370. package/lib/uint.d.ts +32 -0
  371. package/lib/uint.d.ts.map +1 -0
  372. package/lib/uint.js +28 -0
  373. package/lib/uint.js.map +1 -0
  374. package/lib/uri.d.ts +94 -0
  375. package/lib/uri.d.ts.map +1 -0
  376. package/lib/uri.js +226 -0
  377. package/lib/uri.js.map +1 -0
  378. package/lib/utils/ansi.d.ts +5 -0
  379. package/lib/utils/ansi.d.ts.map +1 -0
  380. package/lib/utils/ansi.js +16 -0
  381. package/lib/utils/ansi.js.map +1 -0
  382. package/lib/utils/arrays.d.ts +62 -0
  383. package/lib/utils/arrays.d.ts.map +1 -0
  384. package/lib/utils/arrays.js +254 -0
  385. package/lib/utils/arrays.js.map +1 -0
  386. package/lib/utils/buffer.d.ts +36 -0
  387. package/lib/utils/buffer.d.ts.map +1 -0
  388. package/lib/utils/buffer.js +178 -0
  389. package/lib/utils/buffer.js.map +1 -0
  390. package/lib/utils/comparers.d.ts +7 -0
  391. package/lib/utils/comparers.d.ts.map +1 -0
  392. package/lib/utils/comparers.js +135 -0
  393. package/lib/utils/comparers.js.map +1 -0
  394. package/lib/utils/decorators.d.ts +13 -0
  395. package/lib/utils/decorators.d.ts.map +1 -0
  396. package/lib/utils/decorators.js +150 -0
  397. package/lib/utils/decorators.js.map +1 -0
  398. package/lib/utils/file-uri.d.ts +30 -0
  399. package/lib/utils/file-uri.d.ts.map +1 -0
  400. package/lib/utils/file-uri.js +62 -0
  401. package/lib/utils/file-uri.js.map +1 -0
  402. package/lib/utils/glob.d.ts +46 -0
  403. package/lib/utils/glob.d.ts.map +1 -0
  404. package/lib/utils/glob.js +546 -0
  405. package/lib/utils/glob.js.map +1 -0
  406. package/lib/utils/index.d.ts +14 -0
  407. package/lib/utils/index.d.ts.map +1 -0
  408. package/lib/utils/index.js +17 -0
  409. package/lib/utils/index.js.map +1 -0
  410. package/lib/utils/ipc.d.ts +2 -0
  411. package/lib/utils/ipc.d.ts.map +1 -0
  412. package/lib/utils/ipc.js +21 -0
  413. package/lib/utils/ipc.js.map +1 -0
  414. package/lib/utils/json.d.ts +78 -0
  415. package/lib/utils/json.d.ts.map +1 -0
  416. package/lib/utils/json.js +190 -0
  417. package/lib/utils/json.js.map +1 -0
  418. package/lib/utils/marshalling.d.ts +7 -0
  419. package/lib/utils/marshalling.d.ts.map +1 -0
  420. package/lib/utils/marshalling.js +57 -0
  421. package/lib/utils/marshalling.js.map +1 -0
  422. package/lib/utils/objects.d.ts +6 -0
  423. package/lib/utils/objects.d.ts.map +1 -0
  424. package/lib/utils/objects.js +103 -0
  425. package/lib/utils/objects.js.map +1 -0
  426. package/lib/utils/os.d.ts +42 -0
  427. package/lib/utils/os.d.ts.map +1 -0
  428. package/lib/utils/os.js +94 -0
  429. package/lib/utils/os.js.map +1 -0
  430. package/lib/utils/paths.d.ts +35 -0
  431. package/lib/utils/paths.d.ts.map +1 -0
  432. package/lib/utils/paths.js +318 -0
  433. package/lib/utils/paths.js.map +1 -0
  434. package/lib/utils/promise-util.d.ts +10 -0
  435. package/lib/utils/promise-util.d.ts.map +1 -0
  436. package/lib/utils/promise-util.js +17 -0
  437. package/lib/utils/promise-util.js.map +1 -0
  438. package/lib/utils/strings.d.ts +177 -0
  439. package/lib/utils/strings.d.ts.map +1 -0
  440. package/lib/utils/strings.js +837 -0
  441. package/lib/utils/strings.js.map +1 -0
  442. package/lib/utils/types.d.ts +65 -0
  443. package/lib/utils/types.d.ts.map +1 -0
  444. package/lib/utils/types.js +194 -0
  445. package/lib/utils/types.js.map +1 -0
  446. package/lib/uuid.d.ts +2 -0
  447. package/lib/uuid.d.ts.map +1 -0
  448. package/lib/uuid.js +10 -0
  449. package/lib/uuid.js.map +1 -0
  450. package/package.json +30 -0
@@ -0,0 +1,244 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SUPPORTED_ENCODINGS = void 0;
4
+ exports.SUPPORTED_ENCODINGS = {
5
+ utf8: {
6
+ labelLong: 'UTF-8',
7
+ labelShort: 'UTF-8',
8
+ order: 1,
9
+ alias: 'utf8bom',
10
+ },
11
+ utf8bom: {
12
+ labelLong: 'UTF-8 with BOM',
13
+ labelShort: 'UTF-8 with BOM',
14
+ encodeOnly: true,
15
+ order: 2,
16
+ alias: 'utf8',
17
+ },
18
+ utf16le: {
19
+ labelLong: 'UTF-16 LE',
20
+ labelShort: 'UTF-16 LE',
21
+ order: 3,
22
+ },
23
+ utf16be: {
24
+ labelLong: 'UTF-16 BE',
25
+ labelShort: 'UTF-16 BE',
26
+ order: 4,
27
+ },
28
+ windows1252: {
29
+ labelLong: 'Western (Windows 1252)',
30
+ labelShort: 'Windows 1252',
31
+ order: 5,
32
+ },
33
+ iso88591: {
34
+ labelLong: 'Western (ISO 8859-1)',
35
+ labelShort: 'ISO 8859-1',
36
+ order: 6,
37
+ },
38
+ iso88593: {
39
+ labelLong: 'Western (ISO 8859-3)',
40
+ labelShort: 'ISO 8859-3',
41
+ order: 7,
42
+ },
43
+ iso885915: {
44
+ labelLong: 'Western (ISO 8859-15)',
45
+ labelShort: 'ISO 8859-15',
46
+ order: 8,
47
+ },
48
+ macroman: {
49
+ labelLong: 'Western (Mac Roman)',
50
+ labelShort: 'Mac Roman',
51
+ order: 9,
52
+ },
53
+ cp437: {
54
+ labelLong: 'DOS (CP 437)',
55
+ labelShort: 'CP437',
56
+ order: 10,
57
+ },
58
+ windows1256: {
59
+ labelLong: 'Arabic (Windows 1256)',
60
+ labelShort: 'Windows 1256',
61
+ order: 11,
62
+ },
63
+ iso88596: {
64
+ labelLong: 'Arabic (ISO 8859-6)',
65
+ labelShort: 'ISO 8859-6',
66
+ order: 12,
67
+ },
68
+ windows1257: {
69
+ labelLong: 'Baltic (Windows 1257)',
70
+ labelShort: 'Windows 1257',
71
+ order: 13,
72
+ },
73
+ iso88594: {
74
+ labelLong: 'Baltic (ISO 8859-4)',
75
+ labelShort: 'ISO 8859-4',
76
+ order: 14,
77
+ },
78
+ iso885914: {
79
+ labelLong: 'Celtic (ISO 8859-14)',
80
+ labelShort: 'ISO 8859-14',
81
+ order: 15,
82
+ },
83
+ windows1250: {
84
+ labelLong: 'Central European (Windows 1250)',
85
+ labelShort: 'Windows 1250',
86
+ order: 16,
87
+ },
88
+ iso88592: {
89
+ labelLong: 'Central European (ISO 8859-2)',
90
+ labelShort: 'ISO 8859-2',
91
+ order: 17,
92
+ },
93
+ cp852: {
94
+ labelLong: 'Central European (CP 852)',
95
+ labelShort: 'CP 852',
96
+ order: 18,
97
+ },
98
+ windows1251: {
99
+ labelLong: 'Cyrillic (Windows 1251)',
100
+ labelShort: 'Windows 1251',
101
+ order: 19,
102
+ },
103
+ cp866: {
104
+ labelLong: 'Cyrillic (CP 866)',
105
+ labelShort: 'CP 866',
106
+ order: 20,
107
+ },
108
+ iso88595: {
109
+ labelLong: 'Cyrillic (ISO 8859-5)',
110
+ labelShort: 'ISO 8859-5',
111
+ order: 21,
112
+ },
113
+ koi8r: {
114
+ labelLong: 'Cyrillic (KOI8-R)',
115
+ labelShort: 'KOI8-R',
116
+ order: 22,
117
+ },
118
+ koi8u: {
119
+ labelLong: 'Cyrillic (KOI8-U)',
120
+ labelShort: 'KOI8-U',
121
+ order: 23,
122
+ },
123
+ iso885913: {
124
+ labelLong: 'Estonian (ISO 8859-13)',
125
+ labelShort: 'ISO 8859-13',
126
+ order: 24,
127
+ },
128
+ windows1253: {
129
+ labelLong: 'Greek (Windows 1253)',
130
+ labelShort: 'Windows 1253',
131
+ order: 25,
132
+ },
133
+ iso88597: {
134
+ labelLong: 'Greek (ISO 8859-7)',
135
+ labelShort: 'ISO 8859-7',
136
+ order: 26,
137
+ },
138
+ windows1255: {
139
+ labelLong: 'Hebrew (Windows 1255)',
140
+ labelShort: 'Windows 1255',
141
+ order: 27,
142
+ },
143
+ iso88598: {
144
+ labelLong: 'Hebrew (ISO 8859-8)',
145
+ labelShort: 'ISO 8859-8',
146
+ order: 28,
147
+ },
148
+ iso885910: {
149
+ labelLong: 'Nordic (ISO 8859-10)',
150
+ labelShort: 'ISO 8859-10',
151
+ order: 29,
152
+ },
153
+ iso885916: {
154
+ labelLong: 'Romanian (ISO 8859-16)',
155
+ labelShort: 'ISO 8859-16',
156
+ order: 30,
157
+ },
158
+ windows1254: {
159
+ labelLong: 'Turkish (Windows 1254)',
160
+ labelShort: 'Windows 1254',
161
+ order: 31,
162
+ },
163
+ iso88599: {
164
+ labelLong: 'Turkish (ISO 8859-9)',
165
+ labelShort: 'ISO 8859-9',
166
+ order: 32,
167
+ },
168
+ windows1258: {
169
+ labelLong: 'Vietnamese (Windows 1258)',
170
+ labelShort: 'Windows 1258',
171
+ order: 33,
172
+ },
173
+ gbk: {
174
+ labelLong: 'Simplified Chinese (GBK)',
175
+ labelShort: 'GBK',
176
+ order: 34,
177
+ },
178
+ gb18030: {
179
+ labelLong: 'Simplified Chinese (GB18030)',
180
+ labelShort: 'GB18030',
181
+ order: 35,
182
+ },
183
+ cp950: {
184
+ labelLong: 'Traditional Chinese (Big5)',
185
+ labelShort: 'Big5',
186
+ order: 36,
187
+ },
188
+ big5hkscs: {
189
+ labelLong: 'Traditional Chinese (Big5-HKSCS)',
190
+ labelShort: 'Big5-HKSCS',
191
+ order: 37,
192
+ },
193
+ shiftjis: {
194
+ labelLong: 'Japanese (Shift JIS)',
195
+ labelShort: 'Shift JIS',
196
+ order: 38,
197
+ },
198
+ eucjp: {
199
+ labelLong: 'Japanese (EUC-JP)',
200
+ labelShort: 'EUC-JP',
201
+ order: 39,
202
+ },
203
+ euckr: {
204
+ labelLong: 'Korean (EUC-KR)',
205
+ labelShort: 'EUC-KR',
206
+ order: 40,
207
+ },
208
+ windows874: {
209
+ labelLong: 'Thai (Windows 874)',
210
+ labelShort: 'Windows 874',
211
+ order: 41,
212
+ },
213
+ iso885911: {
214
+ labelLong: 'Latin/Thai (ISO 8859-11)',
215
+ labelShort: 'ISO 8859-11',
216
+ order: 42,
217
+ },
218
+ koi8ru: {
219
+ labelLong: 'Cyrillic (KOI8-RU)',
220
+ labelShort: 'KOI8-RU',
221
+ order: 43,
222
+ },
223
+ koi8t: {
224
+ labelLong: 'Tajik (KOI8-T)',
225
+ labelShort: 'KOI8-T',
226
+ order: 44,
227
+ },
228
+ gb2312: {
229
+ labelLong: 'Simplified Chinese (GB 2312)',
230
+ labelShort: 'GB 2312',
231
+ order: 45,
232
+ },
233
+ cp865: {
234
+ labelLong: 'Nordic DOS (CP 865)',
235
+ labelShort: 'CP 865',
236
+ order: 46,
237
+ },
238
+ cp850: {
239
+ labelLong: 'Western European DOS (CP 850)',
240
+ labelShort: 'CP 850',
241
+ order: 47,
242
+ },
243
+ };
244
+ //# sourceMappingURL=encodings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"encodings.js","sourceRoot":"","sources":["../../src/const/encodings.ts"],"names":[],"mappings":";;;AAAa,QAAA,mBAAmB,GAA2H;IACzJ,IAAI,EAAE;QACJ,SAAS,EAAE,OAAO;QAClB,UAAU,EAAE,OAAO;QACnB,KAAK,EAAE,CAAC;QACR,KAAK,EAAE,SAAS;KACjB;IACD,OAA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K,EAAE;QACL,SAAS,EAAE,iBAAiB;QAC5B,UAAU,EAAE,QAAQ;QACpB,KAAK,EAAE,EAAE;KACV;IACD,UAAU,EAAE;QACV,SAAS,EAAE,oBAAoB;QAC/B,UAAU,EAAE,aAAa;QACzB,KAAK,EAAE,EAAE;KACV;IACD,SAAS,EAAE;QACT,SAAS,EAAE,0BAA0B;QACrC,UAAU,EAAE,aAAa;QACzB,KAAK,EAAE,EAAE;KACV;IACD,MAAM,EAAE;QACN,SAAS,EAAE,oBAAoB;QAC/B,UAAU,EAAE,SAAS;QACrB,KAAK,EAAE,EAAE;KACV;IACD,KAAK,EAAE;QACL,SAAS,EAAE,gBAAgB;QAC3B,UAAU,EAAE,QAAQ;QACpB,KAAK,EAAE,EAAE;KACV;IACD,MAAM,EAAE;QACN,SAAS,EAAE,8BAA8B;QACzC,UAAU,EAAE,SAAS;QACrB,KAAK,EAAE,EAAE;KACV;IACD,KAAK,EAAE;QACL,SAAS,EAAE,qBAAqB;QAChC,UAAU,EAAE,QAAQ;QACpB,KAAK,EAAE,EAAE;KACV;IACD,KAAK,EAAE;QACL,SAAS,EAAE,+BAA+B;QAC1C,UAAU,EAAE,QAAQ;QACpB,KAAK,EAAE,EAAE;KACV;CACF,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './encodings';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/const/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC"}
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ (0, tslib_1.__exportStar)(require("./encodings"), exports);
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/const/index.ts"],"names":[],"mappings":";;;AAAA,2DAA4B"}
@@ -0,0 +1,38 @@
1
+ /********************************************************************************
2
+ * Copyright (C) 2017 TypeFox 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
+ import { Injector, Domain, ConstructorOf } from '@opensumi/di';
17
+ export declare const ContributionProvider: unique symbol;
18
+ export interface ContributionProvider<T extends object> {
19
+ getContributions(): T[];
20
+ addContribution(...contributionsCls: ConstructorOf<any>[]): void;
21
+ reload(): T[];
22
+ }
23
+ export declare class BaseContributionProvider<T extends object> implements ContributionProvider<T> {
24
+ protected readonly domain: Domain;
25
+ protected readonly injector: Injector;
26
+ protected services: T[] | undefined;
27
+ constructor(domain: Domain, injector: Injector);
28
+ addContribution(...contributionsCls: ConstructorOf<T>[]): void;
29
+ getContributions(): T[];
30
+ reload(): T[];
31
+ }
32
+ /**
33
+ * 使用工厂函数创建 ContributionProvider
34
+ * @param injector 全局唯一的 injector,用来获取当前 Domain 的 Contribution、并注册 ContributionProvider
35
+ * @param domain 用来区分 Contribution 的标识,也是 ContributionProvider 的 Token
36
+ */
37
+ export declare function createContributionProvider(injector: Injector, domain: Domain): void;
38
+ //# sourceMappingURL=contribution-provider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contribution-provider.d.ts","sourceRoot":"","sources":["../src/contribution-provider.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAElF,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE/D,eAAO,MAAM,oBAAoB,eAAiC,CAAC;AAEnE,MAAM,WAAW,oBAAoB,CAAC,CAAC,SAAS,MAAM;IACpD,gBAAgB,IAAI,CAAC,EAAE,CAAC;IACxB,eAAe,CAAC,GAAG,gBAAgB,EAAE,aAAa,CAAC,GAAG,CAAC,EAAE,GAAG,IAAI,CAAC;IACjE,MAAM,IAAI,CAAC,EAAE,CAAC;CACf;AAED,qBAAa,wBAAwB,CAAC,CAAC,SAAS,MAAM,CAAE,YAAW,oBAAoB,CAAC,CAAC,CAAC;IAKtF,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,MAAM;IACjC,SAAS,CAAC,QAAQ,CAAC,QAAQ,EAAE,QAAQ;IAJvC,SAAS,CAAC,QAAQ,EAAE,CAAC,EAAE,GAAG,SAAS,CAAC;gBAGf,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,QAAQ;IAGvC,eAAe,CAAC,GAAG,gBAAgB,EAAE,aAAa,CAAC,CAAC,CAAC,EAAE,GAAG,IAAI;IAS9D,gBAAgB,IAAI,CAAC,EAAE;IASvB,MAAM,IAAI,CAAC,EAAE;CAId;AAED;;;;GAIG;AACH,wBAAgB,0BAA0B,CAAC,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,QAO5E"}
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+ /********************************************************************************
3
+ * Copyright (C) 2017 TypeFox 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.createContributionProvider = exports.BaseContributionProvider = exports.ContributionProvider = void 0;
19
+ exports.ContributionProvider = Symbol('ContributionProvider');
20
+ class BaseContributionProvider {
21
+ constructor(domain, injector) {
22
+ this.domain = domain;
23
+ this.injector = injector;
24
+ }
25
+ addContribution(...contributionsCls) {
26
+ for (const contributionCls of contributionsCls) {
27
+ this.injector.addProviders(contributionCls);
28
+ if (this.services) {
29
+ this.services.push(this.injector.get(contributionCls));
30
+ }
31
+ }
32
+ }
33
+ getContributions() {
34
+ // if (this.services === undefined) {
35
+ // // 从 Injector 里获取相同类型的 Contribution
36
+ // this.services = this.injector.getFromDomain(this.domain);
37
+ // }
38
+ // return this.services;
39
+ return this.injector.getFromDomain(this.domain);
40
+ }
41
+ reload() {
42
+ this.services = this.injector.getFromDomain(this.domain);
43
+ return this.services;
44
+ }
45
+ }
46
+ exports.BaseContributionProvider = BaseContributionProvider;
47
+ /**
48
+ * 使用工厂函数创建 ContributionProvider
49
+ * @param injector 全局唯一的 injector,用来获取当前 Domain 的 Contribution、并注册 ContributionProvider
50
+ * @param domain 用来区分 Contribution 的标识,也是 ContributionProvider 的 Token
51
+ */
52
+ function createContributionProvider(injector, domain) {
53
+ const contributionProvider = new BaseContributionProvider(domain, injector);
54
+ injector.addProviders({
55
+ token: domain,
56
+ useValue: contributionProvider,
57
+ });
58
+ }
59
+ exports.createContributionProvider = createContributionProvider;
60
+ //# sourceMappingURL=contribution-provider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contribution-provider.js","sourceRoot":"","sources":["../src/contribution-provider.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;AAIrE,QAAA,oBAAoB,GAAG,MAAM,CAAC,sBAAsB,CAAC,CAAC;AAQnE,MAAa,wBAAwB;IAInC,YACqB,MAAc,EACd,QAAkB;QADlB,WAAM,GAAN,MAAM,CAAQ;QACd,aAAQ,GAAR,QAAQ,CAAU;IACnC,CAAC;IAEL,eAAe,CAAC,GAAG,gBAAoC;QACrD,KAAI,MAAM,eAAe,IAAI,gBAAgB,EAAE;YAC7C,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,eAAe,CAAC,CAAC;YAC5C,IAAI,IAAI,CAAC,QAAQ,EAAE;gBACjB,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC,CAAC;aACxD;SACF;IACH,CAAC;IAED,gBAAgB;QACd,qCAAqC;QACrC,wCAAwC;QACxC,8DAA8D;QAC9D,IAAI;QACJ,wBAAwB;QACxB,OAAO,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAClD,CAAC;IAED,MAAM;QACJ,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACzD,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;CACF;AA/BD,4DA+BC;AAED;;;;GAIG;AACH,SAAgB,0BAA0B,CAAC,QAAkB,EAAE,MAAc;IAC3E,MAAM,oBAAoB,GAAG,IAAI,wBAAwB,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;IAE5E,QAAQ,CAAC,YAAY,CAAC;QACpB,KAAK,EAAE,MAAM;QACb,QAAQ,EAAE,oBAAoB;KAC/B,CAAC,CAAC;AACL,CAAC;AAPD,gEAOC"}
@@ -0,0 +1,21 @@
1
+ export declare const KeytarServicePath = "/services/keytar";
2
+ export declare const INativeCredentialService: unique symbol;
3
+ export interface INativeCredentialService {
4
+ setPassword(service: string, account: string, password: string): Promise<void>;
5
+ getPassword(service: string, account: string): Promise<string | null>;
6
+ deletePassword(service: string, account: string): Promise<boolean>;
7
+ findPassword(service: string): Promise<string | null>;
8
+ findCredentials(service: string): Promise<Array<{
9
+ account: string;
10
+ password: string;
11
+ }>>;
12
+ }
13
+ export interface IChunkedPassword {
14
+ content: string;
15
+ hasNextChunk: boolean;
16
+ }
17
+ export interface ICredentialsChangeEvent {
18
+ service: string;
19
+ account: string;
20
+ }
21
+ //# sourceMappingURL=credential.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"credential.d.ts","sourceRoot":"","sources":["../src/credential.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iBAAiB,qBAAqB,CAAC;AAEpD,eAAO,MAAM,wBAAwB,eAAqC,CAAC;AAE3E,MAAM,WAAW,wBAAwB;IACvC,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/E,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IACtE,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACnE,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IACtD,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC,CAAC;CACzF;AAED,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,OAAO,CAAC;CACvB;AAED,MAAM,WAAW,uBAAuB;IACvC,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,MAAM,CAAC;CAChB"}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.INativeCredentialService = exports.KeytarServicePath = void 0;
4
+ exports.KeytarServicePath = '/services/keytar';
5
+ exports.INativeCredentialService = Symbol('INativeCredentialService');
6
+ //# sourceMappingURL=credential.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"credential.js","sourceRoot":"","sources":["../src/credential.ts"],"names":[],"mappings":";;;AAAa,QAAA,iBAAiB,GAAG,kBAAkB,CAAC;AAEvC,QAAA,wBAAwB,GAAG,MAAM,CAAC,0BAA0B,CAAC,CAAC"}
@@ -0,0 +1,7 @@
1
+ export declare const CryptrServicePath = "/services/cryptr";
2
+ export declare const INativeCryptrService: unique symbol;
3
+ export interface INativeCryptrService {
4
+ decrypt(hash: string): Promise<string>;
5
+ encrypt(password: string): Promise<string>;
6
+ }
7
+ //# sourceMappingURL=cryptr.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cryptr.d.ts","sourceRoot":"","sources":["../src/cryptr.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iBAAiB,qBAAqB,CAAC;AAEpD,eAAO,MAAM,oBAAoB,eAAiC,CAAC;AAEnE,MAAM,WAAW,oBAAoB;IACnC,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IACvC,OAAO,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CAC5C"}
package/lib/cryptr.js ADDED
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.INativeCryptrService = exports.CryptrServicePath = void 0;
4
+ exports.CryptrServicePath = '/services/cryptr';
5
+ exports.INativeCryptrService = Symbol('INativeCryptrService');
6
+ //# sourceMappingURL=cryptr.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cryptr.js","sourceRoot":"","sources":["../src/cryptr.ts"],"names":[],"mappings":";;;AAAa,QAAA,iBAAiB,GAAG,kBAAkB,CAAC;AAEvC,QAAA,oBAAoB,GAAG,MAAM,CAAC,sBAAsB,CAAC,CAAC"}
package/lib/date.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ export declare function toLocalISOString(date: Date): string;
2
+ //# sourceMappingURL=date.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"date.d.ts","sourceRoot":"","sources":["../src/date.ts"],"names":[],"mappings":"AAEA,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,CASnD"}
package/lib/date.js ADDED
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.toLocalISOString = void 0;
4
+ const strings_1 = require("./utils//strings");
5
+ function toLocalISOString(date) {
6
+ return date.getFullYear() +
7
+ '-' + (0, strings_1.pad)(date.getMonth() + 1, 2) +
8
+ '-' + (0, strings_1.pad)(date.getDate(), 2) +
9
+ 'T' + (0, strings_1.pad)(date.getHours(), 2) +
10
+ ':' + (0, strings_1.pad)(date.getMinutes(), 2) +
11
+ ':' + (0, strings_1.pad)(date.getSeconds(), 2) +
12
+ '.' + (date.getMilliseconds() / 1000).toFixed(3).slice(2, 5) +
13
+ 'Z';
14
+ }
15
+ exports.toLocalISOString = toLocalISOString;
16
+ //# sourceMappingURL=date.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"date.js","sourceRoot":"","sources":["../src/date.ts"],"names":[],"mappings":";;;AAAA,8CAAuC;AAEvC,SAAgB,gBAAgB,CAAC,IAAU;IAC1C,OAAO,IAAI,CAAC,WAAW,EAAE;QACxB,GAAG,GAAG,IAAA,aAAG,EAAC,IAAI,CAAC,QAAQ,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC;QACjC,GAAG,GAAG,IAAA,aAAG,EAAC,IAAI,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;QAC5B,GAAG,GAAG,IAAA,aAAG,EAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;QAC7B,GAAG,GAAG,IAAA,aAAG,EAAC,IAAI,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;QAC/B,GAAG,GAAG,IAAA,aAAG,EAAC,IAAI,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;QAC/B,GAAG,GAAG,CAAC,IAAI,CAAC,eAAe,EAAE,GAAG,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC;QAC5D,GAAG,CAAC;AACN,CAAC;AATD,4CASC"}
@@ -0,0 +1,3 @@
1
+ export declare type ConstructorOf<T, K extends any[] = any[]> = new (...args: K) => T;
2
+ export declare type MaybeNull<T> = T | null | undefined;
3
+ //# sourceMappingURL=declare.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"declare.d.ts","sourceRoot":"","sources":["../src/declare.ts"],"names":[],"mappings":"AAAA,oBAAY,aAAa,CAAC,CAAC,EAAE,CAAC,SAAS,GAAG,EAAE,GAAG,GAAG,EAAE,IAClD,KAAK,GAAG,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC;AAExB,oBAAY,SAAS,CAAC,CAAC,IAAI,CAAC,GAAG,IAAI,GAAG,SAAS,CAAE"}
package/lib/declare.js ADDED
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=declare.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"declare.js","sourceRoot":"","sources":["../src/declare.ts"],"names":[],"mappings":""}
@@ -0,0 +1,14 @@
1
+ import { Domain } from '@opensumi/di';
2
+ import { ConstructorOf } from '../declare';
3
+ /**
4
+ * 修饰一个 Class 是某个特定的 DI 分组的装饰器
5
+ * @param domains
6
+ */
7
+ export declare function Domain(...domains: Domain[]): (target: ConstructorOf<any>) => void;
8
+ /**
9
+ * 带全局记录的 Domain 装饰器
10
+ * @param domain
11
+ */
12
+ export declare function EffectDomain(domain: Domain): (target: ConstructorOf<any>) => void;
13
+ export declare function getDomainConstructors(...domains: Domain[]): ConstructorOf<any, any[]>[];
14
+ //# sourceMappingURL=domain-helper.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"domain-helper.d.ts","sourceRoot":"","sources":["../../src/di-helper/domain-helper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqC,MAAM,EAAE,MAAM,cAAc,CAAC;AACzE,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAE3C;;;GAGG;AACH,wBAAgB,MAAM,CAAC,GAAG,OAAO,EAAE,MAAM,EAAE,YACzB,cAAc,GAAG,CAAC,UAKnC;AAKD;;;GAGG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,YACzB,cAAc,GAAG,CAAC,UAUnC;AAED,wBAAgB,qBAAqB,CAAC,GAAG,OAAO,EAAE,MAAM,EAAE,+BAWzD"}
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getDomainConstructors = exports.EffectDomain = exports.Domain = void 0;
4
+ const di_1 = require("@opensumi/di");
5
+ /**
6
+ * 修饰一个 Class 是某个特定的 DI 分组的装饰器
7
+ * @param domains
8
+ */
9
+ function Domain(...domains) {
10
+ return (target) => {
11
+ const opts = (0, di_1.getInjectableOpts)(target) || {};
12
+ opts.domain = domains;
13
+ (0, di_1.markInjectable)(target, opts);
14
+ };
15
+ }
16
+ exports.Domain = Domain;
17
+ const domainMap = new Map();
18
+ /**
19
+ * 带全局记录的 Domain 装饰器
20
+ * @param domain
21
+ */
22
+ function EffectDomain(domain) {
23
+ return (target) => {
24
+ const opts = (0, di_1.getInjectableOpts)(target) || {};
25
+ opts.domain = domain;
26
+ (0, di_1.markInjectable)(target, opts);
27
+ const tmp = domainMap.get(domain);
28
+ if (!tmp) {
29
+ domainMap.set(domain, target);
30
+ }
31
+ };
32
+ }
33
+ exports.EffectDomain = EffectDomain;
34
+ function getDomainConstructors(...domains) {
35
+ const constructorSet = new Set();
36
+ for (const domain of domains) {
37
+ const constructor = domainMap.get(domain);
38
+ if (constructor) {
39
+ constructorSet.add(constructor);
40
+ }
41
+ else {
42
+ console.error(`没有获取到 ${String(domain)} 对应的Constructor!`);
43
+ }
44
+ }
45
+ return Array.from(constructorSet);
46
+ }
47
+ exports.getDomainConstructors = getDomainConstructors;
48
+ //# sourceMappingURL=domain-helper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"domain-helper.js","sourceRoot":"","sources":["../../src/di-helper/domain-helper.ts"],"names":[],"mappings":";;;AAAA,qCAAyE;AAGzE;;;GAGG;AACH,SAAgB,MAAM,CAAC,GAAG,OAAiB;IACzC,OAAO,CAAC,MAA0B,EAAE,EAAE;QACpC,MAAM,IAAI,GAAG,IAAA,sBAAiB,EAAC,MAAM,CAAC,IAAI,EAAE,CAAC;QAC7C,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC;QACtB,IAAA,mBAAc,EAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IAC/B,CAAC,CAAA;AACH,CAAC;AAND,wBAMC;AAGD,MAAM,SAAS,GAAG,IAAI,GAAG,EAA8B,CAAC;AAExD;;;GAGG;AACH,SAAgB,YAAY,CAAC,MAAc;IACzC,OAAO,CAAC,MAA0B,EAAE,EAAE;QACpC,MAAM,IAAI,GAAG,IAAA,sBAAiB,EAAC,MAAM,CAAC,IAAI,EAAE,CAAC;QAC7C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAA,mBAAc,EAAC,MAAM,EAAE,IAAI,CAAC,CAAC;QAE7B,MAAM,GAAG,GAAG,SAAS,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QAClC,IAAI,CAAC,GAAG,EAAE;YACR,SAAS,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;SAC/B;IACH,CAAC,CAAA;AACH,CAAC;AAXD,oCAWC;AAED,SAAgB,qBAAqB,CAAC,GAAG,OAAiB;IACxD,MAAM,cAAc,GAAG,IAAI,GAAG,EAAsB,CAAC;IACrD,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE;QAC5B,MAAM,WAAW,GAAG,SAAS,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QAC1C,IAAI,WAAW,EAAE;YACf,cAAc,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;SACjC;aAAM;YACL,OAAO,CAAC,KAAK,CAAC,SAAS,MAAM,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC;SAC1D;KACF;IACD,OAAO,KAAK,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;AACpC,CAAC;AAXD,sDAWC"}
@@ -0,0 +1,2 @@
1
+ export * from './domain-helper';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/di-helper/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC"}
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ (0, tslib_1.__exportStar)(require("./domain-helper"), exports);
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/di-helper/index.ts"],"names":[],"mappings":";;;AAAA,+DAAgC"}