@gitpod/gitpod-protocol 0.1.5-update-ovsx.0 → 0.1.5-update-yarnlock.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 (455) hide show
  1. package/data/gitpod-schema.json +159 -25
  2. package/lib/accounting-protocol.d.ts +165 -0
  3. package/lib/accounting-protocol.d.ts.map +1 -0
  4. package/lib/accounting-protocol.js +120 -0
  5. package/lib/accounting-protocol.js.map +1 -0
  6. package/lib/admin-protocol.d.ts +51 -6
  7. package/lib/admin-protocol.d.ts.map +1 -1
  8. package/lib/admin-protocol.js +17 -2
  9. package/lib/admin-protocol.js.map +1 -1
  10. package/lib/analytics.d.ts +44 -0
  11. package/lib/analytics.d.ts.map +1 -0
  12. package/lib/analytics.js +10 -0
  13. package/lib/analytics.js.map +1 -0
  14. package/lib/attribution.d.ts +25 -0
  15. package/lib/attribution.d.ts.map +1 -0
  16. package/lib/attribution.js +58 -0
  17. package/lib/attribution.js.map +1 -0
  18. package/lib/auth.d.ts +25 -0
  19. package/lib/auth.d.ts.map +1 -0
  20. package/lib/auth.js +16 -0
  21. package/lib/auth.js.map +1 -0
  22. package/lib/billing-mode.d.ts +45 -0
  23. package/lib/billing-mode.d.ts.map +1 -0
  24. package/lib/billing-mode.js +44 -0
  25. package/lib/billing-mode.js.map +1 -0
  26. package/lib/blocked-repositories-protocol.d.ts +13 -0
  27. package/lib/blocked-repositories-protocol.d.ts.map +1 -0
  28. package/lib/blocked-repositories-protocol.js +8 -0
  29. package/lib/blocked-repositories-protocol.js.map +1 -0
  30. package/lib/context-url.d.ts +30 -0
  31. package/lib/context-url.d.ts.map +1 -0
  32. package/lib/context-url.js +100 -0
  33. package/lib/context-url.js.map +1 -0
  34. package/lib/context-url.spec.d.ts +12 -0
  35. package/lib/context-url.spec.d.ts.map +1 -0
  36. package/lib/context-url.spec.js +81 -0
  37. package/lib/context-url.spec.js.map +1 -0
  38. package/lib/encryption/container-module.d.ts +2 -2
  39. package/lib/encryption/container-module.d.ts.map +1 -1
  40. package/lib/encryption/container-module.js +8 -6
  41. package/lib/encryption/container-module.js.map +1 -1
  42. package/lib/encryption/encryption-engine.d.ts +2 -2
  43. package/lib/encryption/encryption-engine.d.ts.map +1 -1
  44. package/lib/encryption/encryption-engine.js +28 -28
  45. package/lib/encryption/encryption-engine.js.map +1 -1
  46. package/lib/encryption/encryption-engine.spec.d.ts +3 -3
  47. package/lib/encryption/encryption-engine.spec.d.ts.map +1 -1
  48. package/lib/encryption/encryption-engine.spec.js +32 -39
  49. package/lib/encryption/encryption-engine.spec.js.map +1 -1
  50. package/lib/encryption/encryption-service.d.ts +2 -2
  51. package/lib/encryption/encryption-service.d.ts.map +1 -1
  52. package/lib/encryption/encryption-service.js +33 -46
  53. package/lib/encryption/encryption-service.js.map +1 -1
  54. package/lib/encryption/key-provider.d.ts +3 -3
  55. package/lib/encryption/key-provider.d.ts.map +1 -1
  56. package/lib/encryption/key-provider.js +34 -40
  57. package/lib/encryption/key-provider.js.map +1 -1
  58. package/lib/env.d.ts +2 -8
  59. package/lib/env.d.ts.map +1 -1
  60. package/lib/env.js +10 -29
  61. package/lib/env.js.map +1 -1
  62. package/lib/experiments/always-default.d.ts +8 -0
  63. package/lib/experiments/always-default.d.ts.map +1 -0
  64. package/lib/experiments/always-default.js +20 -0
  65. package/lib/experiments/always-default.js.map +1 -0
  66. package/lib/experiments/configcat-server.d.ts +10 -0
  67. package/lib/experiments/configcat-server.d.ts.map +1 -0
  68. package/lib/experiments/configcat-server.js +37 -0
  69. package/lib/experiments/configcat-server.js.map +1 -0
  70. package/lib/experiments/configcat.d.ts +21 -0
  71. package/lib/experiments/configcat.d.ts.map +1 -0
  72. package/lib/experiments/configcat.js +51 -0
  73. package/lib/experiments/configcat.js.map +1 -0
  74. package/lib/experiments/types.d.ts +22 -0
  75. package/lib/experiments/types.d.ts.map +1 -0
  76. package/lib/experiments/types.js +10 -0
  77. package/lib/experiments/types.js.map +1 -0
  78. package/lib/frontend-dashboard-service.d.ts +99 -0
  79. package/lib/frontend-dashboard-service.d.ts.map +1 -0
  80. package/lib/frontend-dashboard-service.js +55 -0
  81. package/lib/frontend-dashboard-service.js.map +1 -0
  82. package/lib/gitpod-file-parser.d.ts +2 -2
  83. package/lib/gitpod-file-parser.d.ts.map +1 -1
  84. package/lib/gitpod-file-parser.js +29 -44
  85. package/lib/gitpod-file-parser.js.map +1 -1
  86. package/lib/gitpod-file-parser.spec.d.ts +2 -2
  87. package/lib/gitpod-file-parser.spec.js +147 -144
  88. package/lib/gitpod-file-parser.spec.js.map +1 -1
  89. package/lib/gitpod-service.d.ts +290 -50
  90. package/lib/gitpod-service.d.ts.map +1 -1
  91. package/lib/gitpod-service.js +288 -123
  92. package/lib/gitpod-service.js.map +1 -1
  93. package/lib/headless-workspace-log.d.ts +11 -13
  94. package/lib/headless-workspace-log.d.ts.map +1 -1
  95. package/lib/headless-workspace-log.js +8 -9
  96. package/lib/headless-workspace-log.js.map +1 -1
  97. package/lib/ide-frontend-service.d.ts +26 -0
  98. package/lib/ide-frontend-service.d.ts.map +1 -0
  99. package/lib/ide-frontend-service.js +8 -0
  100. package/lib/ide-frontend-service.js.map +1 -0
  101. package/lib/ide-protocol.d.ts +126 -0
  102. package/lib/ide-protocol.d.ts.map +1 -0
  103. package/lib/ide-protocol.js +18 -0
  104. package/lib/ide-protocol.js.map +1 -0
  105. package/lib/index.d.ts +18 -12
  106. package/lib/index.d.ts.map +1 -1
  107. package/lib/index.js +28 -13
  108. package/lib/index.js.map +1 -1
  109. package/lib/installation-admin-protocol.d.ts +30 -0
  110. package/lib/installation-admin-protocol.d.ts.map +1 -0
  111. package/lib/installation-admin-protocol.js +31 -0
  112. package/lib/installation-admin-protocol.js.map +1 -0
  113. package/lib/license-protocol.d.ts +9 -2
  114. package/lib/license-protocol.d.ts.map +1 -1
  115. package/lib/license-protocol.js +3 -2
  116. package/lib/license-protocol.js.map +1 -1
  117. package/lib/messaging/browser/connection.d.ts +6 -4
  118. package/lib/messaging/browser/connection.d.ts.map +1 -1
  119. package/lib/messaging/browser/connection.js +188 -48
  120. package/lib/messaging/browser/connection.js.map +1 -1
  121. package/lib/messaging/browser/window-connection.d.ts +9 -4
  122. package/lib/messaging/browser/window-connection.d.ts.map +1 -1
  123. package/lib/messaging/browser/window-connection.js +48 -59
  124. package/lib/messaging/browser/window-connection.js.map +1 -1
  125. package/lib/messaging/client-call-metrics.d.ts +21 -0
  126. package/lib/messaging/client-call-metrics.d.ts.map +1 -0
  127. package/lib/messaging/client-call-metrics.js +95 -0
  128. package/lib/messaging/client-call-metrics.js.map +1 -0
  129. package/lib/messaging/error.d.ts +18 -4
  130. package/lib/messaging/error.d.ts.map +1 -1
  131. package/lib/messaging/error.js +38 -7
  132. package/lib/messaging/error.js.map +1 -1
  133. package/lib/messaging/handler.d.ts +10 -0
  134. package/lib/messaging/handler.d.ts.map +1 -1
  135. package/lib/messaging/handler.js +2 -1
  136. package/lib/messaging/handler.js.map +1 -1
  137. package/lib/messaging/node/connection.d.ts +1 -17
  138. package/lib/messaging/node/connection.d.ts.map +1 -1
  139. package/lib/messaging/node/connection.js +24 -59
  140. package/lib/messaging/node/connection.js.map +1 -1
  141. package/lib/messaging/proxy-factory.d.ts +3 -1
  142. package/lib/messaging/proxy-factory.d.ts.map +1 -1
  143. package/lib/messaging/proxy-factory.js +76 -162
  144. package/lib/messaging/proxy-factory.js.map +1 -1
  145. package/lib/oss-allowlist.d.ts +14 -0
  146. package/lib/oss-allowlist.d.ts.map +1 -0
  147. package/lib/oss-allowlist.js +8 -0
  148. package/lib/oss-allowlist.js.map +1 -0
  149. package/lib/payment-protocol.d.ts +18 -0
  150. package/lib/payment-protocol.d.ts.map +1 -0
  151. package/lib/payment-protocol.js +13 -0
  152. package/lib/payment-protocol.js.map +1 -0
  153. package/lib/permission.d.ts +26 -15
  154. package/lib/permission.d.ts.map +1 -1
  155. package/lib/permission.js +50 -36
  156. package/lib/permission.js.map +1 -1
  157. package/lib/plans.d.ts +213 -0
  158. package/lib/plans.d.ts.map +1 -0
  159. package/lib/plans.js +625 -0
  160. package/lib/plans.js.map +1 -0
  161. package/lib/protocol.d.ts +338 -111
  162. package/lib/protocol.d.ts.map +1 -1
  163. package/lib/protocol.js +422 -201
  164. package/lib/protocol.js.map +1 -1
  165. package/lib/protocol.spec.d.ts +7 -0
  166. package/lib/protocol.spec.d.ts.map +1 -0
  167. package/lib/protocol.spec.js +127 -0
  168. package/lib/protocol.spec.js.map +1 -0
  169. package/lib/snapshot-url.d.ts +14 -0
  170. package/lib/snapshot-url.d.ts.map +1 -0
  171. package/lib/snapshot-url.js +26 -0
  172. package/lib/snapshot-url.js.map +1 -0
  173. package/lib/snapshot-url.spec.d.ts +7 -0
  174. package/lib/snapshot-url.spec.d.ts.map +1 -0
  175. package/lib/snapshot-url.spec.js +41 -0
  176. package/lib/snapshot-url.spec.js.map +1 -0
  177. package/lib/team-subscription-protocol.d.ts +93 -0
  178. package/lib/team-subscription-protocol.d.ts.map +1 -0
  179. package/lib/team-subscription-protocol.js +82 -0
  180. package/lib/team-subscription-protocol.js.map +1 -0
  181. package/lib/teams-projects-protocol.d.ts +136 -0
  182. package/lib/teams-projects-protocol.d.ts.map +1 -0
  183. package/lib/teams-projects-protocol.js +41 -0
  184. package/lib/teams-projects-protocol.js.map +1 -0
  185. package/lib/typings/globals.d.ts +8 -3
  186. package/lib/typings/globals.d.ts.map +1 -1
  187. package/lib/typings/globals.js +2 -2
  188. package/lib/usage.d.ts +73 -0
  189. package/lib/usage.d.ts.map +1 -0
  190. package/lib/usage.js +20 -0
  191. package/lib/usage.js.map +1 -0
  192. package/lib/util/analytics.d.ts +8 -0
  193. package/lib/util/analytics.d.ts.map +1 -0
  194. package/lib/util/analytics.js +88 -0
  195. package/lib/util/analytics.js.map +1 -0
  196. package/lib/util/async-iterator.d.ts +2 -2
  197. package/lib/util/async-iterator.d.ts.map +1 -1
  198. package/lib/util/async-iterator.js +60 -137
  199. package/lib/util/async-iterator.js.map +1 -1
  200. package/lib/util/cancelable.d.ts +2 -2
  201. package/lib/util/cancelable.js +20 -61
  202. package/lib/util/cancelable.js.map +1 -1
  203. package/lib/util/date-time.d.ts +2 -2
  204. package/lib/util/date-time.js +14 -13
  205. package/lib/util/date-time.js.map +1 -1
  206. package/lib/util/debug-app.d.ts +25 -0
  207. package/lib/util/debug-app.d.ts.map +1 -0
  208. package/lib/util/debug-app.js +100 -0
  209. package/lib/util/debug-app.js.map +1 -0
  210. package/lib/util/deep-partial.d.ts +2 -2
  211. package/lib/util/deep-partial.js +2 -2
  212. package/lib/util/deferred.d.ts +2 -2
  213. package/lib/util/deferred.js +13 -14
  214. package/lib/util/deferred.js.map +1 -1
  215. package/lib/util/disposable.d.ts +2 -2
  216. package/lib/util/disposable.d.ts.map +1 -1
  217. package/lib/util/disposable.js +28 -40
  218. package/lib/util/disposable.js.map +1 -1
  219. package/lib/util/event.d.ts +1 -1
  220. package/lib/util/event.d.ts.map +1 -1
  221. package/lib/util/event.js +64 -77
  222. package/lib/util/event.js.map +1 -1
  223. package/lib/util/garbage-collected-cache.d.ts +3 -2
  224. package/lib/util/garbage-collected-cache.d.ts.map +1 -1
  225. package/lib/util/garbage-collected-cache.js +35 -49
  226. package/lib/util/garbage-collected-cache.js.map +1 -1
  227. package/lib/util/generate-workspace-id.d.ts +9 -0
  228. package/lib/util/generate-workspace-id.d.ts.map +1 -0
  229. package/lib/util/generate-workspace-id.js +491 -0
  230. package/lib/util/generate-workspace-id.js.map +1 -0
  231. package/lib/util/generate-workspace-id.spec.d.ts +7 -0
  232. package/lib/util/generate-workspace-id.spec.d.ts.map +1 -0
  233. package/lib/util/generate-workspace-id.spec.js +98 -0
  234. package/lib/util/generate-workspace-id.spec.js.map +1 -0
  235. package/lib/util/gitpod-cookie.d.ts +20 -0
  236. package/lib/util/gitpod-cookie.d.ts.map +1 -0
  237. package/lib/util/gitpod-cookie.js +41 -0
  238. package/lib/util/gitpod-cookie.js.map +1 -0
  239. package/lib/util/gitpod-host-url.d.ts +20 -8
  240. package/lib/util/gitpod-host-url.d.ts.map +1 -1
  241. package/lib/util/gitpod-host-url.js +143 -85
  242. package/lib/util/gitpod-host-url.js.map +1 -1
  243. package/lib/util/gitpod-host-url.spec.d.ts +16 -0
  244. package/lib/util/gitpod-host-url.spec.d.ts.map +1 -0
  245. package/lib/util/gitpod-host-url.spec.js +134 -0
  246. package/lib/util/gitpod-host-url.spec.js.map +1 -0
  247. package/lib/util/grpc.d.ts +35 -0
  248. package/lib/util/grpc.d.ts.map +1 -0
  249. package/lib/util/grpc.js +90 -0
  250. package/lib/util/grpc.js.map +1 -0
  251. package/lib/util/jaeger-client-types.d.ts +68 -0
  252. package/lib/util/jaeger-client-types.d.ts.map +1 -0
  253. package/lib/util/jaeger-client-types.js +8 -0
  254. package/lib/util/jaeger-client-types.js.map +1 -0
  255. package/lib/util/logging.d.ts +58 -35
  256. package/lib/util/logging.d.ts.map +1 -1
  257. package/lib/util/logging.js +144 -129
  258. package/lib/util/logging.js.map +1 -1
  259. package/lib/util/logging.spec.d.ts +7 -0
  260. package/lib/util/logging.spec.d.ts.map +1 -0
  261. package/lib/util/logging.spec.js +52 -0
  262. package/lib/util/logging.spec.js.map +1 -0
  263. package/lib/util/make-link.d.ts +2 -2
  264. package/lib/util/make-link.js +8 -7
  265. package/lib/util/make-link.js.map +1 -1
  266. package/lib/util/nice-grpc.d.ts +9 -0
  267. package/lib/util/nice-grpc.d.ts.map +1 -0
  268. package/lib/util/nice-grpc.js +121 -0
  269. package/lib/util/nice-grpc.js.map +1 -0
  270. package/lib/util/parse-workspace-id.d.ts +15 -5
  271. package/lib/util/parse-workspace-id.d.ts.map +1 -1
  272. package/lib/util/parse-workspace-id.js +39 -9
  273. package/lib/util/parse-workspace-id.js.map +1 -1
  274. package/lib/util/parse-workspace-id.spec.d.ts +10 -2
  275. package/lib/util/parse-workspace-id.spec.d.ts.map +1 -1
  276. package/lib/util/parse-workspace-id.spec.js +130 -49
  277. package/lib/util/parse-workspace-id.spec.js.map +1 -1
  278. package/lib/util/queue.d.ts +2 -2
  279. package/lib/util/queue.js +19 -57
  280. package/lib/util/queue.js.map +1 -1
  281. package/lib/util/queue.spec.d.ts +2 -2
  282. package/lib/util/queue.spec.js +149 -288
  283. package/lib/util/queue.spec.js.map +1 -1
  284. package/lib/util/repeat.d.ts +15 -0
  285. package/lib/util/repeat.d.ts.map +1 -0
  286. package/lib/util/repeat.js +55 -0
  287. package/lib/util/repeat.js.map +1 -0
  288. package/lib/util/semaphore.d.ts +2 -2
  289. package/lib/util/semaphore.d.ts.map +1 -1
  290. package/lib/util/semaphore.js +18 -48
  291. package/lib/util/semaphore.js.map +1 -1
  292. package/lib/util/skip-if.d.ts +2 -2
  293. package/lib/util/skip-if.d.ts.map +1 -1
  294. package/lib/util/skip-if.js +9 -8
  295. package/lib/util/skip-if.js.map +1 -1
  296. package/lib/util/timeutil.d.ts +4 -2
  297. package/lib/util/timeutil.d.ts.map +1 -1
  298. package/lib/util/timeutil.js +43 -18
  299. package/lib/util/timeutil.js.map +1 -1
  300. package/lib/util/timeutil.spec.d.ts +4 -2
  301. package/lib/util/timeutil.spec.d.ts.map +1 -1
  302. package/lib/util/timeutil.spec.js +57 -25
  303. package/lib/util/timeutil.spec.js.map +1 -1
  304. package/lib/util/tracing.d.ts +55 -8
  305. package/lib/util/tracing.d.ts.map +1 -1
  306. package/lib/util/tracing.js +210 -66
  307. package/lib/util/tracing.js.map +1 -1
  308. package/lib/util/tracing.spec.d.ts +7 -0
  309. package/lib/util/tracing.spec.d.ts.map +1 -0
  310. package/lib/util/tracing.spec.js +121 -0
  311. package/lib/util/tracing.spec.js.map +1 -0
  312. package/lib/util/workspace-port-authentication.d.ts +9 -9
  313. package/lib/util/workspace-port-authentication.d.ts.map +1 -1
  314. package/lib/util/workspace-port-authentication.js +13 -14
  315. package/lib/util/workspace-port-authentication.js.map +1 -1
  316. package/lib/webhook-event.d.ts +44 -0
  317. package/lib/webhook-event.d.ts.map +1 -0
  318. package/lib/webhook-event.js +8 -0
  319. package/lib/webhook-event.js.map +1 -0
  320. package/lib/workspace-class.d.ts +14 -0
  321. package/lib/workspace-class.d.ts.map +1 -0
  322. package/lib/workspace-class.js +8 -0
  323. package/lib/workspace-class.js.map +1 -0
  324. package/lib/workspace-cluster.d.ts +80 -0
  325. package/lib/workspace-cluster.d.ts.map +1 -0
  326. package/lib/workspace-cluster.js +36 -0
  327. package/lib/workspace-cluster.js.map +1 -0
  328. package/lib/workspace-instance.d.ts +51 -8
  329. package/lib/workspace-instance.d.ts.map +1 -1
  330. package/lib/workspace-instance.js +2 -2
  331. package/lib/wsready.d.ts +8 -2
  332. package/lib/wsready.d.ts.map +1 -1
  333. package/lib/wsready.js +4 -3
  334. package/lib/wsready.js.map +1 -1
  335. package/package.json +42 -18
  336. package/pkg-yarn.lock +24 -10
  337. package/provenance-bundle.jsonl +2 -0
  338. package/src/accounting-protocol.ts +253 -0
  339. package/src/admin-protocol.ts +96 -21
  340. package/src/analytics.ts +52 -0
  341. package/src/attribution.ts +67 -0
  342. package/src/auth.ts +27 -0
  343. package/src/billing-mode.ts +84 -0
  344. package/src/blocked-repositories-protocol.ts +13 -0
  345. package/src/context-url.spec.ts +49 -0
  346. package/src/context-url.ts +107 -0
  347. package/src/encryption/container-module.ts +4 -5
  348. package/src/encryption/encryption-engine.spec.ts +11 -10
  349. package/src/encryption/encryption-engine.ts +22 -18
  350. package/src/encryption/encryption-service.ts +6 -7
  351. package/src/encryption/key-provider.ts +18 -21
  352. package/src/env.ts +3 -26
  353. package/src/experiments/always-default.ts +24 -0
  354. package/src/experiments/configcat-server.ts +42 -0
  355. package/src/experiments/configcat.ts +56 -0
  356. package/src/experiments/types.ts +34 -0
  357. package/src/frontend-dashboard-service.ts +148 -0
  358. package/src/gitpod-file-parser.spec.ts +57 -63
  359. package/src/gitpod-file-parser.ts +18 -19
  360. package/src/gitpod-service.ts +602 -99
  361. package/src/headless-workspace-log.ts +14 -16
  362. package/src/ide-frontend-service.ts +28 -0
  363. package/src/ide-protocol.ts +147 -0
  364. package/src/index.ts +18 -12
  365. package/src/installation-admin-protocol.ts +45 -0
  366. package/src/license-protocol.ts +14 -8
  367. package/src/messaging/browser/connection.ts +202 -26
  368. package/src/messaging/browser/window-connection.ts +45 -29
  369. package/src/messaging/client-call-metrics.ts +94 -0
  370. package/src/messaging/error.ts +51 -10
  371. package/src/messaging/handler.ts +13 -1
  372. package/src/messaging/node/connection.ts +23 -70
  373. package/src/messaging/proxy-factory.ts +35 -34
  374. package/src/oss-allowlist.ts +15 -0
  375. package/src/payment-protocol.ts +20 -0
  376. package/src/permission.ts +53 -40
  377. package/src/plans.ts +699 -0
  378. package/src/protocol.spec.ts +97 -0
  379. package/src/protocol.ts +790 -302
  380. package/src/snapshot-url.spec.ts +27 -0
  381. package/src/snapshot-url.ts +27 -0
  382. package/src/team-subscription-protocol.ts +153 -0
  383. package/src/teams-projects-protocol.ts +180 -0
  384. package/src/typings/globals.ts +13 -5
  385. package/src/usage.ts +85 -0
  386. package/src/util/analytics.ts +109 -0
  387. package/src/util/async-iterator.ts +6 -7
  388. package/src/util/cancelable.ts +5 -5
  389. package/src/util/date-time.ts +10 -10
  390. package/src/util/debug-app.ts +81 -0
  391. package/src/util/deep-partial.ts +2 -2
  392. package/src/util/deferred.ts +8 -8
  393. package/src/util/disposable.ts +3 -6
  394. package/src/util/event.ts +9 -11
  395. package/src/util/garbage-collected-cache.ts +18 -10
  396. package/src/util/generate-workspace-id.spec.ts +58 -0
  397. package/src/util/generate-workspace-id.ts +481 -0
  398. package/src/util/gitpod-cookie.ts +38 -0
  399. package/src/util/gitpod-host-url.spec.ts +76 -0
  400. package/src/util/gitpod-host-url.ts +119 -40
  401. package/src/util/grpc.ts +107 -0
  402. package/src/util/jaeger-client-types.ts +102 -0
  403. package/src/util/logging.spec.ts +23 -0
  404. package/src/util/logging.ts +163 -73
  405. package/src/util/make-link.ts +8 -9
  406. package/src/util/nice-grpc.ts +96 -0
  407. package/src/util/parse-workspace-id.spec.ts +62 -12
  408. package/src/util/parse-workspace-id.ts +40 -10
  409. package/src/util/queue.spec.ts +30 -28
  410. package/src/util/queue.ts +2 -2
  411. package/src/util/repeat.ts +45 -0
  412. package/src/util/semaphore.ts +8 -10
  413. package/src/util/skip-if.ts +12 -9
  414. package/src/util/timeutil.spec.ts +42 -16
  415. package/src/util/timeutil.ts +33 -17
  416. package/src/util/tracing.spec.ts +88 -0
  417. package/src/util/tracing.ts +211 -33
  418. package/src/util/workspace-port-authentication.ts +12 -15
  419. package/src/webhook-event.ts +55 -0
  420. package/src/workspace-class.ts +14 -0
  421. package/src/workspace-cluster.ts +121 -0
  422. package/src/workspace-instance.ts +120 -36
  423. package/src/wsready.ts +11 -4
  424. package/data/builtin-theia-plugins.json +0 -362
  425. package/lib/email-protocol.d.ts +0 -49
  426. package/lib/email-protocol.d.ts.map +0 -1
  427. package/lib/email-protocol.js +0 -27
  428. package/lib/email-protocol.js.map +0 -1
  429. package/lib/messaging/connection-error-handler.d.ts +0 -27
  430. package/lib/messaging/connection-error-handler.d.ts.map +0 -1
  431. package/lib/messaging/connection-error-handler.js +0 -45
  432. package/lib/messaging/connection-error-handler.js.map +0 -1
  433. package/lib/theia-plugins.d.ts +0 -11
  434. package/lib/theia-plugins.d.ts.map +0 -1
  435. package/lib/theia-plugins.js +0 -8
  436. package/lib/theia-plugins.js.map +0 -1
  437. package/lib/util/repeater.d.ts +0 -22
  438. package/lib/util/repeater.d.ts.map +0 -1
  439. package/lib/util/repeater.js +0 -117
  440. package/lib/util/repeater.js.map +0 -1
  441. package/lib/util/safe-promise.d.ts +0 -11
  442. package/lib/util/safe-promise.d.ts.map +0 -1
  443. package/lib/util/safe-promise.js +0 -33
  444. package/lib/util/safe-promise.js.map +0 -1
  445. package/lib/util/without.d.ts +0 -7
  446. package/lib/util/without.d.ts.map +0 -1
  447. package/lib/util/without.js +0 -8
  448. package/lib/util/without.js.map +0 -1
  449. package/src/email-protocol.ts +0 -67
  450. package/src/messaging/connection-error-handler.ts +0 -62
  451. package/src/theia-plugins.ts +0 -11
  452. package/src/util/jaeger-client.d.ts +0 -105
  453. package/src/util/repeater.ts +0 -49
  454. package/src/util/safe-promise.ts +0 -26
  455. package/src/util/without.ts +0 -8
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  /**
3
- * Copyright (c) 2020 TypeFox GmbH. All rights reserved.
3
+ * Copyright (c) 2020 Gitpod GmbH. All rights reserved.
4
4
  * Licensed under the GNU Affero General Public License (AGPL).
5
- * See License-AGPL.txt in the project root for license information.
5
+ * See License.AGPL.txt in the project root for license information.
6
6
  */
7
7
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
8
8
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
@@ -13,66 +13,36 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
13
13
  step((generator = generator.apply(thisArg, _arguments || [])).next());
14
14
  });
15
15
  };
16
- var __generator = (this && this.__generator) || function (thisArg, body) {
17
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
18
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
19
- function verb(n) { return function (v) { return step([n, v]); }; }
20
- function step(op) {
21
- if (f) throw new TypeError("Generator is already executing.");
22
- while (_) try {
23
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
24
- if (y = 0, t) op = [op[0] & 2, t.value];
25
- switch (op[0]) {
26
- case 0: case 1: t = op; break;
27
- case 4: _.label++; return { value: op[1], done: false };
28
- case 5: _.label++; y = op[1]; op = [0]; continue;
29
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
30
- default:
31
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
32
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
33
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
34
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
35
- if (t[2]) _.ops.pop();
36
- _.trys.pop(); continue;
37
- }
38
- op = body.call(thisArg, _);
39
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
40
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
41
- }
42
- };
43
16
  Object.defineProperty(exports, "__esModule", { value: true });
44
- var Semaphore = /** @class */ (function () {
45
- function Semaphore(capacity) {
17
+ exports.Semaphore = void 0;
18
+ class Semaphore {
19
+ constructor(capacity) {
46
20
  this.capacity = capacity;
47
21
  this.queue = [];
48
22
  if (capacity < 1) {
49
23
  throw new Error("Capacity cannot be less than 1");
50
24
  }
51
25
  }
52
- Semaphore.prototype.release = function () {
26
+ release() {
53
27
  if (this.used == 0)
54
28
  return;
55
- var queued = this.queue.shift();
29
+ const queued = this.queue.shift();
56
30
  if (queued) {
57
31
  queued();
58
32
  }
59
33
  this.used--;
60
- };
61
- Semaphore.prototype.acquire = function () {
62
- return __awaiter(this, void 0, void 0, function () {
63
- var _this = this;
64
- return __generator(this, function (_a) {
65
- this.used++;
66
- if (this.used <= this.capacity) {
67
- return [2 /*return*/, Promise.resolve()];
68
- }
69
- return [2 /*return*/, new Promise(function (rs, rj) {
70
- _this.queue.push(rs);
71
- })];
34
+ }
35
+ acquire() {
36
+ return __awaiter(this, void 0, void 0, function* () {
37
+ this.used++;
38
+ if (this.used <= this.capacity) {
39
+ return Promise.resolve();
40
+ }
41
+ return new Promise((rs, rj) => {
42
+ this.queue.push(rs);
72
43
  });
73
44
  });
74
- };
75
- return Semaphore;
76
- }());
45
+ }
46
+ }
77
47
  exports.Semaphore = Semaphore;
78
48
  //# sourceMappingURL=semaphore.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"semaphore.js","sourceRoot":"","sources":["../../src/util/semaphore.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGH;IAII,mBAA+B,QAAgB;QAAhB,aAAQ,GAAR,QAAQ,CAAQ;QAHrC,UAAK,GAAmB,EAAE,CAAC;QAIjC,IAAG,QAAQ,GAAG,CAAC,EAAE;YACb,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAC;SACrD;IACL,CAAC;IAEM,2BAAO,GAAd;QACI,IAAG,IAAI,CAAC,IAAI,IAAI,CAAC;YAAE,OAAO;QAE1B,IAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;QAClC,IAAI,MAAM,EAAE;YACR,MAAM,EAAE,CAAC;SACZ;QAED,IAAI,CAAC,IAAI,EAAE,CAAC;IAChB,CAAC;IAEY,2BAAO,GAApB;;;;gBACI,IAAI,CAAC,IAAI,EAAE,CAAC;gBACZ,IAAG,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,QAAQ,EAAE;oBAC3B,sBAAO,OAAO,CAAC,OAAO,EAAE,EAAC;iBAC5B;gBAED,sBAAO,IAAI,OAAO,CAAO,UAAC,EAAE,EAAE,EAAE;wBAC5B,KAAI,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;oBACxB,CAAC,CAAC,EAAC;;;KACN;IAEL,gBAAC;AAAD,CAAC,AAhCD,IAgCC;AAhCY,8BAAS"}
1
+ {"version":3,"file":"semaphore.js","sourceRoot":"","sources":["../../src/util/semaphore.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;;;;;;;AAEH,MAAa,SAAS;IAIlB,YAA+B,QAAgB;QAAhB,aAAQ,GAAR,QAAQ,CAAQ;QAHrC,UAAK,GAAmB,EAAE,CAAC;QAIjC,IAAI,QAAQ,GAAG,CAAC,EAAE;YACd,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAC;SACrD;IACL,CAAC;IAEM,OAAO;QACV,IAAI,IAAI,CAAC,IAAI,IAAI,CAAC;YAAE,OAAO;QAE3B,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;QAClC,IAAI,MAAM,EAAE;YACR,MAAM,EAAE,CAAC;SACZ;QAED,IAAI,CAAC,IAAI,EAAE,CAAC;IAChB,CAAC;IAEY,OAAO;;YAChB,IAAI,CAAC,IAAI,EAAE,CAAC;YACZ,IAAI,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,QAAQ,EAAE;gBAC5B,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;aAC5B;YAED,OAAO,IAAI,OAAO,CAAO,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE;gBAChC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YACxB,CAAC,CAAC,CAAC;QACP,CAAC;KAAA;CACJ;AA/BD,8BA+BC"}
@@ -1,7 +1,7 @@
1
1
  /**
2
- * Copyright (c) 2020 TypeFox GmbH. All rights reserved.
2
+ * Copyright (c) 2020 Gitpod GmbH. All rights reserved.
3
3
  * Licensed under the GNU Affero General Public License (AGPL).
4
- * See License-AGPL.txt in the project root for license information.
4
+ * See License.AGPL.txt in the project root for license information.
5
5
  */
6
6
  /// <reference types="mocha" />
7
7
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"skip-if.d.ts","sourceRoot":"","sources":["../../src/util/skip-if.ts"],"names":[],"mappings":"AAAA;;;;GAIG;;AAGH;;GAEG;AACH,UAAU,gBAAiB,SAAQ,KAAK,CAAC,qBAAqB;IAC1D,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,CAAC,EAAE,EAAE,CAAC,IAAI,EAAE,KAAK,CAAC,oBAAoB,KAAK,IAAI,KAAK,IAAI,CAAC;CACxE;AAED;;;GAGG;AACH,wBAAgB,MAAM,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,gBAAgB,KAAK,OAAO,GAAG,eAAe,CAAC,UAAU,CAc/F;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,eAAe,CAAC,UAAU,CAQ3E"}
1
+ {"version":3,"file":"skip-if.d.ts","sourceRoot":"","sources":["../../src/util/skip-if.ts"],"names":[],"mappings":"AAAA;;;;GAIG;;AAEH;;GAEG;AACH,UAAU,gBAAiB,SAAQ,KAAK,CAAC,qBAAqB;IAC1D,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,CAAC,EAAE,EAAE,CAAC,IAAI,EAAE,KAAK,CAAC,oBAAoB,KAAK,IAAI,KAAK,IAAI,CAAC;CACxE;AAED;;;GAGG;AACH,wBAAgB,MAAM,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,gBAAgB,KAAK,OAAO,GAAG,eAAe,CAAC,UAAU,CAkB/F;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,eAAe,CAAC,UAAU,CAQ3E"}
@@ -1,18 +1,19 @@
1
1
  "use strict";
2
2
  /**
3
- * Copyright (c) 2020 TypeFox GmbH. All rights reserved.
3
+ * Copyright (c) 2020 Gitpod GmbH. All rights reserved.
4
4
  * Licensed under the GNU Affero General Public License (AGPL).
5
- * See License-AGPL.txt in the project root for license information.
5
+ * See License.AGPL.txt in the project root for license information.
6
6
  */
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.skipIfEnvVarNotSet = exports.skipIf = void 0;
8
9
  /**
9
10
  * Skips all tests of the marked Suite if the passed function returns true
10
11
  * @param doSkip A function which takes a TestSuite and decides if it should be skipped
11
12
  */
12
13
  function skipIf(doSkip) {
13
- var trait = function (ctx, ctor) {
14
- var suite = ctx; // No idea why those fields are not exported in the types
15
- var skip = doSkip(suite);
14
+ const trait = function (ctx, ctor) {
15
+ const suite = ctx; // No idea why those fields are not exported in the types
16
+ const skip = doSkip(suite);
16
17
  suite.beforeEach(function () {
17
18
  if (skip) {
18
19
  this.skip();
@@ -29,10 +30,10 @@ exports.skipIf = skipIf;
29
30
  * @param name The name of the env var the TestSuite depends on being present
30
31
  */
31
32
  function skipIfEnvVarNotSet(name) {
32
- return skipIf(function (suite) {
33
- var skip = process.env[name] === undefined;
33
+ return skipIf((suite) => {
34
+ const skip = process.env[name] === undefined;
34
35
  if (skip) {
35
- console.log("Skipping suite " + suite.title + " because env var '" + name + "' is not set");
36
+ console.log(`Skipping suite ${suite.title} because env var '${name}' is not set`);
36
37
  }
37
38
  return skip;
38
39
  });
@@ -1 +1 @@
1
- {"version":3,"file":"skip-if.js","sourceRoot":"","sources":["../../src/util/skip-if.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;AAWH;;;GAGG;AACH,SAAgB,MAAM,CAAC,MAA4C;IAC/D,IAAM,KAAK,GAA+B,UAA4C,GAAgC,EAAE,IAAc;QAClI,IAAM,KAAK,GAAG,GAA8B,CAAC,CAAE,yDAAyD;QACxG,IAAM,IAAI,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;QAC3B,KAAK,CAAC,UAAU,CAAC;YACb,IAAI,IAAI,EAAE;gBACN,IAAI,CAAC,IAAI,EAAE,CAAC;aACf;QACL,CAAC,CAAC,CAAA;IACN,CAAC,CAAC;IAEF,2IAA2I;IAC1I,KAAa,CAAC,eAAe,CAAC,GAAG,IAAI,CAAC;IACvC,OAAO,KAAK,CAAC;AACjB,CAAC;AAdD,wBAcC;AAED;;;GAGG;AACH,SAAgB,kBAAkB,CAAC,IAAY;IAC3C,OAAO,MAAM,CAAC,UAAC,KAAK;QAChB,IAAM,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,SAAS,CAAC;QAC7C,IAAI,IAAI,EAAE;YACN,OAAO,CAAC,GAAG,CAAC,oBAAkB,KAAK,CAAC,KAAK,0BAAqB,IAAI,iBAAc,CAAC,CAAC;SACrF;QACD,OAAO,IAAI,CAAC;IAChB,CAAC,CAAC,CAAC;AACP,CAAC;AARD,gDAQC"}
1
+ {"version":3,"file":"skip-if.js","sourceRoot":"","sources":["../../src/util/skip-if.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAUH;;;GAGG;AACH,SAAgB,MAAM,CAAC,MAA4C;IAC/D,MAAM,KAAK,GAA+B,UAEtC,GAAgC,EAChC,IAAc;QAEd,MAAM,KAAK,GAAG,GAA8B,CAAC,CAAC,yDAAyD;QACvG,MAAM,IAAI,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;QAC3B,KAAK,CAAC,UAAU,CAAC;YACb,IAAI,IAAI,EAAE;gBACN,IAAI,CAAC,IAAI,EAAE,CAAC;aACf;QACL,CAAC,CAAC,CAAC;IACP,CAAC,CAAC;IAEF,2IAA2I;IAC1I,KAAa,CAAC,eAAe,CAAC,GAAG,IAAI,CAAC;IACvC,OAAO,KAAK,CAAC;AACjB,CAAC;AAlBD,wBAkBC;AAED;;;GAGG;AACH,SAAgB,kBAAkB,CAAC,IAAY;IAC3C,OAAO,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE;QACpB,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,SAAS,CAAC;QAC7C,IAAI,IAAI,EAAE;YACN,OAAO,CAAC,GAAG,CAAC,kBAAkB,KAAK,CAAC,KAAK,qBAAqB,IAAI,cAAc,CAAC,CAAC;SACrF;QACD,OAAO,IAAI,CAAC;IAChB,CAAC,CAAC,CAAC;AACP,CAAC;AARD,gDAQC"}
@@ -1,7 +1,7 @@
1
1
  /**
2
- * Copyright (c) 2020 TypeFox GmbH. All rights reserved.
2
+ * Copyright (c) 2020 Gitpod GmbH. All rights reserved.
3
3
  * Licensed under the GNU Affero General Public License (AGPL).
4
- * See License-AGPL.txt in the project root for license information.
4
+ * See License.AGPL.txt in the project root for license information.
5
5
  */
6
6
  /**
7
7
  * Returns the <code>day</code>th of the next month from <code>formDate</code>.
@@ -25,6 +25,8 @@ export declare const earliest: (d1: string, d2: string) => string;
25
25
  export declare const orderAsc: (d1: string, d2: string) => number;
26
26
  export declare const liftDate1: <T>(d1: string, f: (d1: Date) => T) => T;
27
27
  export declare const liftDate: <T>(d1: string, d2: string, f: (d1: Date, d2: Date) => T) => T;
28
+ export declare function daysBefore(date: string, days: number): string;
29
+ export declare function hoursBefore(date: string, hours: number): string;
28
30
  export declare function hoursLater(date: string, hours: number): string;
29
31
  export declare function secondsBefore(date: string, seconds: number): string;
30
32
  export declare function rightAfter(date: string): string;
@@ -1 +1 @@
1
- {"version":3,"file":"timeutil.d.ts","sourceRoot":"","sources":["../../src/util/timeutil.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,CAUpE;AACD,eAAO,MAAM,UAAU,6CAGrB,CAAC;AAGH,eAAO,MAAM,SAAS,wCAAuG,CAAC;AAC9H,eAAO,MAAM,eAAe,oCAA6G,CAAC;AAC1I,eAAO,MAAM,gBAAgB,oCAAwF,CAAC;AAEtH,eAAO,MAAM,oBAAoB,qCAAkG,CAAC;AACpI,eAAO,MAAM,oBAAoB,iDAA0D,CAAC;AAC5F,eAAO,MAAM,aAAa,iDAAyD,CAAC;AACpF,eAAO,MAAM,MAAM,oCAAwD,CAAC;AAC5E,eAAO,MAAM,QAAQ,oCAAwD,CAAC;AAC9E,eAAO,MAAM,QAAQ,oCAAgG,CAAC;AACtH,eAAO,MAAM,SAAS,0CAA4D,CAAC;AACnF,eAAO,MAAM,QAAQ,gEAAgG,CAAC;AAEtH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAI9D;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAEnE;AAED,wBAAgB,UAAU,CAAC,I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AM,UAAU,IAAI,MAAM,IAAI,YAA2C,CAAC;AAEtH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAI7D;AAED,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAI/D;AAED,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAI9D;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAEnE;AAED,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE/C;AAED,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEhD;AAED,wBAAgB,mBAAmB,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAEhE;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAEzD"}
@@ -1,10 +1,11 @@
1
1
  "use strict";
2
2
  /**
3
- * Copyright (c) 2020 TypeFox GmbH. All rights reserved.
3
+ * Copyright (c) 2020 Gitpod GmbH. All rights reserved.
4
4
  * Licensed under the GNU Affero General Public License (AGPL).
5
- * See License-AGPL.txt in the project root for license information.
5
+ * See License.AGPL.txt in the project root for license information.
6
6
  */
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.hoursToMilliseconds = exports.millisecondsToHours = exports.rightBefore = exports.rightAfter = exports.secondsBefore = exports.hoursLater = exports.hoursBefore = exports.daysBefore = exports.liftDate = exports.liftDate1 = exports.orderAsc = exports.earliest = exports.oldest = exports.isDateSmaller = exports.isDateSmallerOrEqual = exports.isDateGreaterOrEqual = exports.durationInMillis = exports.durationInHours = exports.addMillis = exports.yearsLater = exports.oneMonthLater = void 0;
8
9
  /**
9
10
  * Returns the <code>day</code>th of the next month from <code>formDate</code>.
10
11
  * If the next month does not have a <code>day</code>th, the last day of that
@@ -15,9 +16,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
15
16
  * @param day
16
17
  */
17
18
  function oneMonthLater(fromDate, day) {
18
- var later = new Date(fromDate);
19
+ const later = new Date(fromDate);
19
20
  day = day || later.getDate();
20
- var fromMonth = later.getMonth();
21
+ const fromMonth = later.getMonth();
21
22
  later.setDate(day);
22
23
  later.setMonth(later.getMonth() + 1);
23
24
  if (later.getMonth() - fromMonth > 1) {
@@ -26,25 +27,49 @@ function oneMonthLater(fromDate, day) {
26
27
  return later.toISOString();
27
28
  }
28
29
  exports.oneMonthLater = oneMonthLater;
29
- exports.yearsLater = function (fromDate, years) { return exports.liftDate1(fromDate, function (d) {
30
+ const yearsLater = (fromDate, years) => (0, exports.liftDate1)(fromDate, (d) => {
30
31
  d.setUTCFullYear(d.getUTCFullYear() + years);
31
32
  return d.toISOString();
32
- }); };
33
+ });
34
+ exports.yearsLater = yearsLater;
33
35
  // tslint:disable-next-line:no-shadowed-variable
34
- exports.addMillis = function (d1, millis) { return exports.liftDate1(d1, function (d1) { return new Date(d1.getTime() + millis).toISOString(); }); };
35
- exports.durationInHours = function (d1, d2) { return exports.liftDate(d1, d2, function (d1, d2) { return millisecondsToHours(d1.getTime() - d2.getTime()); }); };
36
- exports.durationInMillis = function (d1, d2) { return exports.liftDate(d1, d2, function (d1, d2) { return d1.getTime() - d2.getTime(); }); };
36
+ const addMillis = (d1, millis) => (0, exports.liftDate1)(d1, (d1) => new Date(d1.getTime() + millis).toISOString());
37
+ exports.addMillis = addMillis;
38
+ const durationInHours = (d1, d2) => (0, exports.liftDate)(d1, d2, (d1, d2) => millisecondsToHours(d1.getTime() - d2.getTime()));
39
+ exports.durationInHours = durationInHours;
40
+ const durationInMillis = (d1, d2) => (0, exports.liftDate)(d1, d2, (d1, d2) => d1.getTime() - d2.getTime());
41
+ exports.durationInMillis = durationInMillis;
37
42
  // tslint:disable-next-line:no-shadowed-variable
38
- exports.isDateGreaterOrEqual = function (d1, d2) { return exports.liftDate(d1, d2, function (d1, d2) { return d1.getTime() >= d2.getTime(); }); };
39
- exports.isDateSmallerOrEqual = function (d1, d2) { return !d2 || d1 <= d2; };
40
- exports.isDateSmaller = function (d1, d2) { return !d2 || d1 < d2; };
41
- exports.oldest = function (d1, d2) { return d1 > d2 ? d1 : d2; };
42
- exports.earliest = function (d1, d2) { return d1 < d2 ? d1 : d2; };
43
- exports.orderAsc = function (d1, d2) { return exports.liftDate(d1, d2, function (d1, d2) { return d1.getTime() - d2.getTime(); }); };
44
- exports.liftDate1 = function (d1, f) { return f(new Date(d1)); };
45
- exports.liftDate = function (d1, d2, f) { return f(new Date(d1), new Date(d2)); };
43
+ const isDateGreaterOrEqual = (d1, d2) => (0, exports.liftDate)(d1, d2, (d1, d2) => d1.getTime() >= d2.getTime());
44
+ exports.isDateGreaterOrEqual = isDateGreaterOrEqual;
45
+ const isDateSmallerOrEqual = (d1, d2) => !d2 || d1 <= d2;
46
+ exports.isDateSmallerOrEqual = isDateSmallerOrEqual;
47
+ const isDateSmaller = (d1, d2) => !d2 || d1 < d2;
48
+ exports.isDateSmaller = isDateSmaller;
49
+ const oldest = (d1, d2) => (d1 > d2 ? d1 : d2);
50
+ exports.oldest = oldest;
51
+ const earliest = (d1, d2) => (d1 < d2 ? d1 : d2);
52
+ exports.earliest = earliest;
53
+ const orderAsc = (d1, d2) => (0, exports.liftDate)(d1, d2, (d1, d2) => d1.getTime() - d2.getTime());
54
+ exports.orderAsc = orderAsc;
55
+ const liftDate1 = (d1, f) => f(new Date(d1));
56
+ exports.liftDate1 = liftDate1;
57
+ const liftDate = (d1, d2, f) => f(new Date(d1), new Date(d2));
58
+ exports.liftDate = liftDate;
59
+ function daysBefore(date, days) {
60
+ const result = new Date(date);
61
+ result.setDate(result.getDate() - days);
62
+ return result.toISOString();
63
+ }
64
+ exports.daysBefore = daysBefore;
65
+ function hoursBefore(date, hours) {
66
+ const result = new Date(date);
67
+ result.setHours(result.getHours() - hours);
68
+ return result.toISOString();
69
+ }
70
+ exports.hoursBefore = hoursBefore;
46
71
  function hoursLater(date, hours) {
47
- var result = new Date(date);
72
+ const result = new Date(date);
48
73
  result.setHours(result.getHours() + hours);
49
74
  return result.toISOString();
50
75
  }
@@ -1 +1 @@
1
- {"version":3,"file":"timeutil.js","sourceRoot":"","sources":["../../src/util/timeutil.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;AAEH;;;;;;;;GAQG;AACH,SAAgB,aAAa,CAAC,QAAgB,EAAE,GAAY;IACxD,IAAM,KAAK,GAAG,IAAI,IAAI,CAAC,QAAQ,CAAC,CAAC;IACjC,GAAG,GAAG,GAAG,IAAI,KAAK,CAAC,OAAO,EAAE,CAAC;IAC7B,IAAM,SAAS,GAAG,KAAK,CAAC,QAAQ,EAAE,CAAC;IACnC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACnB,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC,CAAC;IACrC,IAAI,KAAK,CAAC,QAAQ,EAAE,GAAG,SAAS,GAAG,CAAC,EAAE;QAClC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;KACpB;IACD,OAAO,KAAK,CAAC,WAAW,EAAE,CAAC;AAC/B,CAAC;AAVD,sCAUC;AACY,QAAA,UAAU,GAAG,UAAC,QAAgB,EAAE,KAAa,IAAa,OAAA,iBAAS,CAAC,QAAQ,EAAE,UAAC,CAAC;IACzF,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,cAAc,EAAE,GAAG,KAAK,CAAC,CAAC;IAC7C,OAAO,CAAC,CAAC,WAAW,EAAE,CAAC;AAC3B,CAAC,CAAC,EAHqE,CAGrE,CAAC;AAEH,gDAAgD;AACnC,QAAA,SAAS,GAAG,UAAC,EAAU,EAAE,MAAc,IAAK,OAAA,iBAAS,CAAC,EAAE,EAAE,UAAC,EAAE,IAAK,OAAA,IAAI,IAAI,CAAC,EAAE,CA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,EAAE,GAAG,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;AAChE,CAAC;AAFD,kCAEC;AAED,SAAgB,mBAAmB,CAAC,YAAoB;IACpD,OAAO,YAAY,GAAG,IAAI,GAAG,EAAE,GAAG,EAAE,CAAC;AACzC,CAAC;AAFD,kDAEC;AAED,SAAgB,mBAAmB,CAAC,KAAa;IAC7C,OAAO,KAAK,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AAClC,CAAC;AAFD,kDAEC"}
@@ -1,10 +1,12 @@
1
1
  /**
2
- * Copyright (c) 2020 TypeFox GmbH. All rights reserved.
2
+ * Copyright (c) 2020 Gitpod GmbH. All rights reserved.
3
3
  * Licensed under the GNU Affero General Public License (AGPL).
4
- * See License-AGPL.txt in the project root for license information.
4
+ * See License.AGPL.txt in the project root for license information.
5
5
  */
6
6
  export declare class TimeutilSpec {
7
+ testDaysBefore(): void;
7
8
  testTimeutil(): void;
8
9
  isOneMonthLater(from: Date, day: number, expectation: Date): void;
10
+ testDaysBefore2(): void;
9
11
  }
10
12
  //# sourceMappingURL=timeutil.spec.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"timeutil.spec.d.ts","sourceRoot":"","sources":["../../src/util/timeutil.spec.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAOH,qBACa,YAAY;IAGrB,YAAY;IAuBZ,eAAe,CAAC,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,WAAW,EAAE,IAAI;CAI7D"}
1
+ {"version":3,"file":"timeutil.spec.d.ts","sourceRoot":"","sources":["../../src/util/timeutil.spec.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAOH,qBACa,YAAY;IAErB,cAAc;IAMd,YAAY;IAuBZ,eAAe,CAAC,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,WAAW,EAAE,IAAI;IAM1D,eAAe;CAmBlB"}
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  /**
3
- * Copyright (c) 2020 TypeFox GmbH. All rights reserved.
3
+ * Copyright (c) 2020 Gitpod GmbH. All rights reserved.
4
4
  * Licensed under the GNU Affero General Public License (AGPL).
5
- * See License-AGPL.txt in the project root for license information.
5
+ * See License.AGPL.txt in the project root for license information.
6
6
  */
7
7
  var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
8
8
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
@@ -14,14 +14,17 @@ var __metadata = (this && this.__metadata) || function (k, v) {
14
14
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- var chai = require("chai");
18
- var expect = chai.expect;
19
- var mocha_typescript_1 = require("mocha-typescript");
20
- var timeutil_1 = require("./timeutil");
21
- var TimeutilSpec = /** @class */ (function () {
22
- function TimeutilSpec() {
17
+ exports.TimeutilSpec = void 0;
18
+ const chai = require("chai");
19
+ const expect = chai.expect;
20
+ const mocha_typescript_1 = require("mocha-typescript");
21
+ const timeutil_1 = require("./timeutil");
22
+ let TimeutilSpec = class TimeutilSpec {
23
+ testDaysBefore() {
24
+ const now = new Date().toISOString();
25
+ expect((0, timeutil_1.daysBefore)(now, 2)).to.be.eq((0, timeutil_1.hoursBefore)(now, 48));
23
26
  }
24
- TimeutilSpec.prototype.testTimeutil = function () {
27
+ testTimeutil() {
25
28
  // targeting a 1st, 1th of Jan => 1st of Feb
26
29
  this.isOneMonthLater(new Date(2000, 0, 1), 1, new Date(2000, 1, 1));
27
30
  // targeting a 31th, 30th of Apr => 31st of May
@@ -37,21 +40,50 @@ var TimeutilSpec = /** @class */ (function () {
37
40
  this.isOneMonthLater(new Date(2001, 0, 31), 31, new Date(2001, 1, 28));
38
41
  // Feb leap year
39
42
  this.isOneMonthLater(new Date(2000, 0, 31), 31, new Date(2000, 1, 29));
40
- };
41
- TimeutilSpec.prototype.isOneMonthLater = function (from, day, expectation) {
42
- var later = timeutil_1.oneMonthLater(from.toISOString(), day);
43
- expect(later, "expected " + later + " to be equal " + expectation).to.be.equal(expectation.toISOString());
44
- };
45
- __decorate([
46
- mocha_typescript_1.test,
47
- __metadata("design:type", Function),
48
- __metadata("design:paramtypes", []),
49
- __metadata("design:returntype", void 0)
50
- ], TimeutilSpec.prototype, "testTimeutil", null);
51
- TimeutilSpec = __decorate([
52
- mocha_typescript_1.suite()
53
- ], TimeutilSpec);
54
- return TimeutilSpec;
55
- }());
43
+ }
44
+ isOneMonthLater(from, day, expectation) {
45
+ const later = (0, timeutil_1.oneMonthLater)(from.toISOString(), day);
46
+ expect(later, `expected ${later} to be equal ${expectation}`).to.be.equal(expectation.toISOString());
47
+ }
48
+ testDaysBefore2() {
49
+ const tests = [
50
+ {
51
+ date: new Date("2021-07-13T00:00:00.000Z"),
52
+ daysEarlier: 365,
53
+ expectation: "2020-07-13T00:00:00.000Z",
54
+ },
55
+ {
56
+ date: new Date("2019-02-01T00:00:00.000Z"),
57
+ daysEarlier: 365,
58
+ expectation: "2018-02-01T00:00:00.000Z",
59
+ },
60
+ ];
61
+ for (const t of tests) {
62
+ const actual = (0, timeutil_1.daysBefore)(t.date.toISOString(), t.daysEarlier);
63
+ expect(actual).to.equal(t.expectation, `expected ${actual} to be equal ${t.expectation}`);
64
+ }
65
+ }
66
+ };
67
+ __decorate([
68
+ mocha_typescript_1.test,
69
+ __metadata("design:type", Function),
70
+ __metadata("design:paramtypes", []),
71
+ __metadata("design:returntype", void 0)
72
+ ], TimeutilSpec.prototype, "testDaysBefore", null);
73
+ __decorate([
74
+ mocha_typescript_1.test,
75
+ __metadata("design:type", Function),
76
+ __metadata("design:paramtypes", []),
77
+ __metadata("design:returntype", void 0)
78
+ ], TimeutilSpec.prototype, "testTimeutil", null);
79
+ __decorate([
80
+ mocha_typescript_1.test,
81
+ __metadata("design:type", Function),
82
+ __metadata("design:paramtypes", []),
83
+ __metadata("design:returntype", void 0)
84
+ ], TimeutilSpec.prototype, "testDaysBefore2", null);
85
+ TimeutilSpec = __decorate([
86
+ (0, mocha_typescript_1.suite)()
87
+ ], TimeutilSpec);
56
88
  exports.TimeutilSpec = TimeutilSpec;
57
89
  //# sourceMappingURL=timeutil.spec.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"timeutil.spec.js","sourceRoot":"","sources":["../../src/util/timeutil.spec.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;;;;;;AAEH,2BAA6B;AAC7B,IAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;AAC3B,qDAA+C;AAC/C,uCAA2C;AAG3C;IAAA;IA8BA,CAAC;IA3BG,mCAAY,GAAZ;QACI,4CAA4C;QAC5C,IAAI,CAAC,eAAe,CAAC,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAA;QAEnE,+CAA+C;QAC/C,IAAI,CAAC,eAAe,CAAC,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAA;QAEtE,+CAA+C;QAC/C,IAAI,CAAC,eAAe,CAAC,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAA;QAEtE,+CAA+C;QAC/C,IAAI,CAAC,eAAe,CAAC,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAA;QAEtE,YAAY;QACZ,IAAI,CAAC,eAAe,CAAC,IAAI,IAAI,CAAC,IAAI,E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,MAAM,GAAG,IAAA,qBAAU,EAAC,CAAC,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC,WAAW,CAAC,CAAC;YAC/D,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,WAAW,EAAE,YAAY,MAAM,gBAAgB,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC;SAC7F;IACL,CAAC;CACJ,CAAA;AAtDG;IADC,uBAAI;;;;kDAIJ;AAGD;IADC,uBAAI;;;;gDAsBJ;AAQD;IADC,uBAAI;;;;mDAmBJ;AAvDQ,YAAY;IADxB,IAAA,wBAAK,GAAE;GACK,YAAY,CAwDxB;AAxDY,oCAAY"}
@@ -1,21 +1,62 @@
1
1
  /**
2
- * Copyright (c) 2020 TypeFox GmbH. All rights reserved.
2
+ * Copyright (c) 2020 Gitpod GmbH. All rights reserved.
3
3
  * Licensed under the GNU Affero General Public License (AGPL).
4
- * See License-AGPL.txt in the project root for license information.
4
+ * See License.AGPL.txt in the project root for license information.
5
5
  */
6
- import * as opentracing from 'opentracing';
7
- import { Sampler, SamplingDecision } from 'jaeger-client';
6
+ import * as opentracing from "opentracing";
7
+ import { Sampler, SamplingDecision } from "./jaeger-client-types";
8
+ import { ResponseError } from "vscode-jsonrpc";
9
+ import { LogContext } from "./logging";
8
10
  export interface TraceContext {
9
11
  span?: opentracing.Span;
10
12
  }
13
+ export declare type TraceContextWithSpan = TraceContext & {
14
+ span: opentracing.Span;
15
+ };
11
16
  export declare namespace TraceContext {
12
- function startSpan(operation: string, ctx: TraceContext): opentracing.Span;
13
- function startAsyncSpan(operation: string, ctx: TraceContext): opentracing.Span;
14
- function logError(ctx: TraceContext, err: Error): void;
17
+ function startSpan(operation: string, parentCtx?: TraceContext): opentracing.Span;
18
+ function childContext(operation: string, parentCtx: TraceContext): TraceContextWithSpan;
19
+ function withSpan(operation: string, callback: (ctx: TraceContext) => void, ctx?: TraceContext): void;
20
+ function setError(ctx: TraceContext, err: Error): void;
21
+ function setJsonRPCMetadata(ctx: TraceContext, method?: string): void;
22
+ function setJsonRPCError(ctx: TraceContext, method: string, err: ResponseError<any>, withStatusCode?: boolean): void;
23
+ function addJsonRPCParameters(ctx: TraceContext, params: {
24
+ [key: string]: any;
25
+ }): void;
26
+ /**
27
+ * Does what one would expect from `span.addTags`: Calls `span.addTag` for all keys in map, recursively for objects.
28
+ * Example:
29
+ * ```
30
+ * TraceContext.addNestedTags(ctx, {
31
+ * rpc: {
32
+ * system: "jsonrpc",
33
+ * jsonrpc: {
34
+ * version: "1.0",
35
+ * method: "test",
36
+ * parameters: ["abc", "def"],
37
+ * },
38
+ * },
39
+ * });
40
+ * ```
41
+ * gives
42
+ * rpc.system = "jsonrpc"
43
+ * rpc.jsonrpc.version = "1.0"
44
+ * rpc.jsonrpc.method = "test"
45
+ * rpc.jsonrpc.parameters.0 = "abc"
46
+ * rpc.jsonrpc.parameters.1 = "def"
47
+ * @param ctx
48
+ * @param keyValueMap
49
+ * @returns
50
+ */
51
+ function addNestedTags(ctx: TraceContext, keyValueMap: {
52
+ [key: string]: any;
53
+ }, _namespace?: string): void;
54
+ function setOWI(ctx: TraceContext, owi: LogContext): void;
55
+ function finishOnce(span: opentracing.Span): () => void;
15
56
  }
16
57
  export declare class TracingManager {
17
58
  setup(serviceName: string, opts?: CustomTracerOpts): void;
18
- getTracerForService(serviceName: string, opts?: CustomTracerOpts): opentracing.Tracer;
59
+ getTracerForService(serviceName: string, opts?: CustomTracerOpts): import("jaeger-client").JaegerTracer;
19
60
  }
20
61
  export interface CustomTracerOpts {
21
62
  perOpSampling?: PerOperationSampling;
@@ -36,4 +77,10 @@ export declare class PerOperationSampler implements Sampler {
36
77
  equal(other: Sampler): boolean;
37
78
  close(callback: () => void): void;
38
79
  }
80
+ declare type IsValidArg<T> = T extends object ? (keyof T extends never ? false : true) : true;
81
+ declare type AddTraceContext<T> = T extends (a: infer A, b: infer B, c: infer C, d: infer D, e: infer E, f: infer F) => infer R ? IsValidArg<F> extends true ? (ctx: TraceContextWithSpan, a: A, b: B, c: C, d: D, e: E, f: F) => R : IsValidArg<E> extends true ? (ctx: TraceContextWithSpan, a: A, b: B, c: C, d: D, e: E) => R : IsValidArg<D> extends true ? (ctx: TraceContextWithSpan, a: A, b: B, c: C, d: D) => R : IsValidArg<C> extends true ? (ctx: TraceContextWithSpan, a: A, b: B, c: C) => R : IsValidArg<B> extends true ? (ctx: TraceContextWithSpan, a: A, b: B) => R : IsValidArg<A> extends true ? (ctx: TraceContextWithSpan, a: A) => R : (ctx: TraceContextWithSpan) => Promise<R> : never;
82
+ export declare type InterfaceWithTraceContext<T> = {
83
+ [P in keyof T]: AddTraceContext<T[P]>;
84
+ };
85
+ export {};
39
86
  //# sourceMappingURL=tracing.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"tracing.d.ts","sourceRoot":"","sources":["../../src/util/tracing.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,WAAW,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAoC,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAI5F,MAAM,WAAW,YAAY;IACzB,IAAI,CAAC,EAAE,WAAW,CAAC,IAAI,CAAA;CAC1B;AAED,yBAAiB,YAAY,CAAC;IAC1B,SAAgB,SAAS,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,YAAY,GAAG,WAAW,CAAC,IAAI,CAKhF;IAED,SAAgB,cAAc,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,YAAY,GAAG,WAAW,CAAC,IAAI,CAMrF;IAED,SAAgB,QAAQ,CAAC,GAAG,EAAE,YAAY,EAAE,GAAG,EAAE,KAAK,QAUrD;CACJ;AAED,qBACa,cAAc;IAEhB,KAAK,CAAC,WAAW,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,gBAAgB;IAIlD,mBAAmB,CAAC,WAAW,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE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