@dxos/cli 0.8.4-main.f9ba587 → 0.8.4-main.fcfe5033a5

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 (319) hide show
  1. package/LICENSE +3 -3
  2. package/bin/dx.js +29 -12
  3. package/package.json +14 -129
  4. package/README.md +0 -145
  5. package/bin/agent_entrypoint +0 -22
  6. package/bin/dev.cmd +0 -3
  7. package/bin/dev.js +0 -26
  8. package/bin/handle_invitation +0 -18
  9. package/bin/run.cmd +0 -3
  10. package/dist/src/base.d.ts +0 -18
  11. package/dist/src/base.d.ts.map +0 -1
  12. package/dist/src/base.js +0 -76
  13. package/dist/src/base.js.map +0 -1
  14. package/dist/src/commands/agent/agent.node.test.d.ts +0 -2
  15. package/dist/src/commands/agent/agent.node.test.d.ts.map +0 -1
  16. package/dist/src/commands/agent/agent.node.test.js +0 -178
  17. package/dist/src/commands/agent/agent.node.test.js.map +0 -1
  18. package/dist/src/commands/agent/invitations.d.ts +0 -20
  19. package/dist/src/commands/agent/invitations.d.ts.map +0 -1
  20. package/dist/src/commands/agent/invitations.js +0 -89
  21. package/dist/src/commands/agent/invitations.js.map +0 -1
  22. package/dist/src/commands/agent/list.d.ts +0 -22
  23. package/dist/src/commands/agent/list.d.ts.map +0 -1
  24. package/dist/src/commands/agent/list.js +0 -46
  25. package/dist/src/commands/agent/list.js.map +0 -1
  26. package/dist/src/commands/agent/restart.d.ts +0 -21
  27. package/dist/src/commands/agent/restart.d.ts.map +0 -1
  28. package/dist/src/commands/agent/restart.js +0 -27
  29. package/dist/src/commands/agent/restart.js.map +0 -1
  30. package/dist/src/commands/agent/start.d.ts +0 -33
  31. package/dist/src/commands/agent/start.d.ts.map +0 -1
  32. package/dist/src/commands/agent/start.js +0 -209
  33. package/dist/src/commands/agent/start.js.map +0 -1
  34. package/dist/src/commands/agent/status.d.ts +0 -19
  35. package/dist/src/commands/agent/status.d.ts.map +0 -1
  36. package/dist/src/commands/agent/status.js +0 -31
  37. package/dist/src/commands/agent/status.js.map +0 -1
  38. package/dist/src/commands/agent/stop.d.ts +0 -22
  39. package/dist/src/commands/agent/stop.d.ts.map +0 -1
  40. package/dist/src/commands/agent/stop.js +0 -50
  41. package/dist/src/commands/agent/stop.js.map +0 -1
  42. package/dist/src/commands/config/index.d.ts +0 -7
  43. package/dist/src/commands/config/index.d.ts.map +0 -1
  44. package/dist/src/commands/config/index.js +0 -18
  45. package/dist/src/commands/config/index.js.map +0 -1
  46. package/dist/src/commands/config/index.node.test.d.ts +0 -2
  47. package/dist/src/commands/config/index.node.test.d.ts.map +0 -1
  48. package/dist/src/commands/config/index.node.test.js +0 -25
  49. package/dist/src/commands/config/index.node.test.js.map +0 -1
  50. package/dist/src/commands/debug/diagnostics.d.ts +0 -25
  51. package/dist/src/commands/debug/diagnostics.d.ts.map +0 -1
  52. package/dist/src/commands/debug/diagnostics.js +0 -54
  53. package/dist/src/commands/debug/diagnostics.js.map +0 -1
  54. package/dist/src/commands/debug/error.d.ts +0 -6
  55. package/dist/src/commands/debug/error.d.ts.map +0 -1
  56. package/dist/src/commands/debug/error.js +0 -24
  57. package/dist/src/commands/debug/error.js.map +0 -1
  58. package/dist/src/commands/debug/generate.d.ts +0 -27
  59. package/dist/src/commands/debug/generate.d.ts.map +0 -1
  60. package/dist/src/commands/debug/generate.js +0 -73
  61. package/dist/src/commands/debug/generate.js.map +0 -1
  62. package/dist/src/commands/debug/metrics.d.ts +0 -10
  63. package/dist/src/commands/debug/metrics.d.ts.map +0 -1
  64. package/dist/src/commands/debug/metrics.js +0 -41
  65. package/dist/src/commands/debug/metrics.js.map +0 -1
  66. package/dist/src/commands/debug/status.d.ts +0 -20
  67. package/dist/src/commands/debug/status.d.ts.map +0 -1
  68. package/dist/src/commands/debug/status.js +0 -29
  69. package/dist/src/commands/debug/status.js.map +0 -1
  70. package/dist/src/commands/device/info.d.ts +0 -7
  71. package/dist/src/commands/device/info.d.ts.map +0 -1
  72. package/dist/src/commands/device/info.js +0 -32
  73. package/dist/src/commands/device/info.js.map +0 -1
  74. package/dist/src/commands/device/list.d.ts +0 -20
  75. package/dist/src/commands/device/list.d.ts.map +0 -1
  76. package/dist/src/commands/device/list.js +0 -24
  77. package/dist/src/commands/device/list.js.map +0 -1
  78. package/dist/src/commands/device/update.d.ts +0 -19
  79. package/dist/src/commands/device/update.d.ts.map +0 -1
  80. package/dist/src/commands/device/update.js +0 -34
  81. package/dist/src/commands/device/update.js.map +0 -1
  82. package/dist/src/commands/function/list.d.ts +0 -9
  83. package/dist/src/commands/function/list.d.ts.map +0 -1
  84. package/dist/src/commands/function/list.js +0 -38
  85. package/dist/src/commands/function/list.js.map +0 -1
  86. package/dist/src/commands/function/logs.d.ts +0 -14
  87. package/dist/src/commands/function/logs.d.ts.map +0 -1
  88. package/dist/src/commands/function/logs.js +0 -40
  89. package/dist/src/commands/function/logs.js.map +0 -1
  90. package/dist/src/commands/function/trigger/list.d.ts +0 -26
  91. package/dist/src/commands/function/trigger/list.d.ts.map +0 -1
  92. package/dist/src/commands/function/trigger/list.js +0 -52
  93. package/dist/src/commands/function/trigger/list.js.map +0 -1
  94. package/dist/src/commands/function/upload.d.ts +0 -34
  95. package/dist/src/commands/function/upload.d.ts.map +0 -1
  96. package/dist/src/commands/function/upload.js +0 -153
  97. package/dist/src/commands/function/upload.js.map +0 -1
  98. package/dist/src/commands/function/watch.d.ts +0 -29
  99. package/dist/src/commands/function/watch.d.ts.map +0 -1
  100. package/dist/src/commands/function/watch.js +0 -130
  101. package/dist/src/commands/function/watch.js.map +0 -1
  102. package/dist/src/commands/halo/create.d.ts +0 -24
  103. package/dist/src/commands/halo/create.d.ts.map +0 -1
  104. package/dist/src/commands/halo/create.js +0 -37
  105. package/dist/src/commands/halo/create.js.map +0 -1
  106. package/dist/src/commands/halo/credential/add.d.ts +0 -9
  107. package/dist/src/commands/halo/credential/add.d.ts.map +0 -1
  108. package/dist/src/commands/halo/credential/add.js +0 -43
  109. package/dist/src/commands/halo/credential/add.js.map +0 -1
  110. package/dist/src/commands/halo/credential/list.d.ts +0 -23
  111. package/dist/src/commands/halo/credential/list.d.ts.map +0 -1
  112. package/dist/src/commands/halo/credential/list.js +0 -63
  113. package/dist/src/commands/halo/credential/list.js.map +0 -1
  114. package/dist/src/commands/halo/identity.d.ts +0 -8
  115. package/dist/src/commands/halo/identity.d.ts.map +0 -1
  116. package/dist/src/commands/halo/identity.js +0 -32
  117. package/dist/src/commands/halo/identity.js.map +0 -1
  118. package/dist/src/commands/halo/join.d.ts +0 -23
  119. package/dist/src/commands/halo/join.d.ts.map +0 -1
  120. package/dist/src/commands/halo/join.js +0 -96
  121. package/dist/src/commands/halo/join.js.map +0 -1
  122. package/dist/src/commands/halo/keys.d.ts +0 -7
  123. package/dist/src/commands/halo/keys.d.ts.map +0 -1
  124. package/dist/src/commands/halo/keys.js +0 -15
  125. package/dist/src/commands/halo/keys.js.map +0 -1
  126. package/dist/src/commands/halo/recovery/generate.d.ts +0 -7
  127. package/dist/src/commands/halo/recovery/generate.d.ts.map +0 -1
  128. package/dist/src/commands/halo/recovery/generate.js +0 -17
  129. package/dist/src/commands/halo/recovery/generate.js.map +0 -1
  130. package/dist/src/commands/halo/recovery/use.d.ts +0 -20
  131. package/dist/src/commands/halo/recovery/use.d.ts.map +0 -1
  132. package/dist/src/commands/halo/recovery/use.js +0 -22
  133. package/dist/src/commands/halo/recovery/use.js.map +0 -1
  134. package/dist/src/commands/halo/share.d.ts +0 -24
  135. package/dist/src/commands/halo/share.d.ts.map +0 -1
  136. package/dist/src/commands/halo/share.js +0 -74
  137. package/dist/src/commands/halo/share.js.map +0 -1
  138. package/dist/src/commands/halo/update.d.ts +0 -19
  139. package/dist/src/commands/halo/update.d.ts.map +0 -1
  140. package/dist/src/commands/halo/update.js +0 -36
  141. package/dist/src/commands/halo/update.js.map +0 -1
  142. package/dist/src/commands/info.d.ts +0 -19
  143. package/dist/src/commands/info.d.ts.map +0 -1
  144. package/dist/src/commands/info.js +0 -24
  145. package/dist/src/commands/info.js.map +0 -1
  146. package/dist/src/commands/profile/import.d.ts +0 -20
  147. package/dist/src/commands/profile/import.d.ts.map +0 -1
  148. package/dist/src/commands/profile/import.js +0 -67
  149. package/dist/src/commands/profile/import.js.map +0 -1
  150. package/dist/src/commands/profile/inspect.d.ts +0 -20
  151. package/dist/src/commands/profile/inspect.d.ts.map +0 -1
  152. package/dist/src/commands/profile/inspect.js +0 -38
  153. package/dist/src/commands/profile/inspect.js.map +0 -1
  154. package/dist/src/commands/reset/index.d.ts +0 -20
  155. package/dist/src/commands/reset/index.d.ts.map +0 -1
  156. package/dist/src/commands/reset/index.js +0 -76
  157. package/dist/src/commands/reset/index.js.map +0 -1
  158. package/dist/src/commands/shell/index.d.ts +0 -6
  159. package/dist/src/commands/shell/index.d.ts.map +0 -1
  160. package/dist/src/commands/shell/index.js +0 -26
  161. package/dist/src/commands/shell/index.js.map +0 -1
  162. package/dist/src/commands/space/close.d.ts +0 -9
  163. package/dist/src/commands/space/close.d.ts.map +0 -1
  164. package/dist/src/commands/space/close.js +0 -18
  165. package/dist/src/commands/space/close.js.map +0 -1
  166. package/dist/src/commands/space/create.d.ts +0 -10
  167. package/dist/src/commands/space/create.d.ts.map +0 -1
  168. package/dist/src/commands/space/create.js +0 -26
  169. package/dist/src/commands/space/create.js.map +0 -1
  170. package/dist/src/commands/space/epoch.d.ts +0 -10
  171. package/dist/src/commands/space/epoch.d.ts.map +0 -1
  172. package/dist/src/commands/space/epoch.js +0 -19
  173. package/dist/src/commands/space/epoch.js.map +0 -1
  174. package/dist/src/commands/space/info.d.ts +0 -10
  175. package/dist/src/commands/space/info.d.ts.map +0 -1
  176. package/dist/src/commands/space/info.js +0 -27
  177. package/dist/src/commands/space/info.js.map +0 -1
  178. package/dist/src/commands/space/join.d.ts +0 -21
  179. package/dist/src/commands/space/join.d.ts.map +0 -1
  180. package/dist/src/commands/space/join.js +0 -73
  181. package/dist/src/commands/space/join.js.map +0 -1
  182. package/dist/src/commands/space/list.d.ts +0 -24
  183. package/dist/src/commands/space/list.d.ts.map +0 -1
  184. package/dist/src/commands/space/list.js +0 -91
  185. package/dist/src/commands/space/list.js.map +0 -1
  186. package/dist/src/commands/space/members.d.ts +0 -23
  187. package/dist/src/commands/space/members.d.ts.map +0 -1
  188. package/dist/src/commands/space/members.js +0 -28
  189. package/dist/src/commands/space/members.js.map +0 -1
  190. package/dist/src/commands/space/open.d.ts +0 -9
  191. package/dist/src/commands/space/open.d.ts.map +0 -1
  192. package/dist/src/commands/space/open.js +0 -18
  193. package/dist/src/commands/space/open.js.map +0 -1
  194. package/dist/src/commands/space/query.d.ts +0 -25
  195. package/dist/src/commands/space/query.d.ts.map +0 -1
  196. package/dist/src/commands/space/query.js +0 -46
  197. package/dist/src/commands/space/query.js.map +0 -1
  198. package/dist/src/commands/space/schema/list.d.ts +0 -21
  199. package/dist/src/commands/space/schema/list.d.ts.map +0 -1
  200. package/dist/src/commands/space/schema/list.js +0 -60
  201. package/dist/src/commands/space/schema/list.js.map +0 -1
  202. package/dist/src/commands/space/share.d.ts +0 -27
  203. package/dist/src/commands/space/share.d.ts.map +0 -1
  204. package/dist/src/commands/space/share.js +0 -81
  205. package/dist/src/commands/space/share.js.map +0 -1
  206. package/dist/src/commands/tunnel/index.d.ts +0 -22
  207. package/dist/src/commands/tunnel/index.d.ts.map +0 -1
  208. package/dist/src/commands/tunnel/index.js +0 -46
  209. package/dist/src/commands/tunnel/index.js.map +0 -1
  210. package/dist/src/commands/tunnel/list.d.ts +0 -21
  211. package/dist/src/commands/tunnel/list.d.ts.map +0 -1
  212. package/dist/src/commands/tunnel/list.js +0 -32
  213. package/dist/src/commands/tunnel/list.js.map +0 -1
  214. package/dist/src/components/App.d.ts +0 -10
  215. package/dist/src/components/App.d.ts.map +0 -1
  216. package/dist/src/components/App.js +0 -31
  217. package/dist/src/components/App.js.map +0 -1
  218. package/dist/src/components/SpaceTable.d.ts +0 -10
  219. package/dist/src/components/SpaceTable.d.ts.map +0 -1
  220. package/dist/src/components/SpaceTable.js +0 -33
  221. package/dist/src/components/SpaceTable.js.map +0 -1
  222. package/dist/src/components/SystemTable.d.ts +0 -8
  223. package/dist/src/components/SystemTable.d.ts.map +0 -1
  224. package/dist/src/components/SystemTable.js +0 -51
  225. package/dist/src/components/SystemTable.js.map +0 -1
  226. package/dist/src/components/index.d.ts +0 -4
  227. package/dist/src/components/index.d.ts.map +0 -1
  228. package/dist/src/components/index.js +0 -7
  229. package/dist/src/components/index.js.map +0 -1
  230. package/dist/src/help.d.ts +0 -6
  231. package/dist/src/help.d.ts.map +0 -1
  232. package/dist/src/help.js +0 -37
  233. package/dist/src/help.js.map +0 -1
  234. package/dist/src/hooks/command-not-found.d.ts +0 -4
  235. package/dist/src/hooks/command-not-found.d.ts.map +0 -1
  236. package/dist/src/hooks/command-not-found.js +0 -16
  237. package/dist/src/hooks/command-not-found.js.map +0 -1
  238. package/dist/src/index.d.ts +0 -3
  239. package/dist/src/index.d.ts.map +0 -1
  240. package/dist/src/index.js +0 -6
  241. package/dist/src/index.js.map +0 -1
  242. package/dist/src/util/function/bundle.d.ts +0 -5
  243. package/dist/src/util/function/bundle.d.ts.map +0 -1
  244. package/dist/src/util/function/bundle.js +0 -13
  245. package/dist/src/util/function/bundle.js.map +0 -1
  246. package/dist/src/util/function/index.d.ts +0 -3
  247. package/dist/src/util/function/index.d.ts.map +0 -1
  248. package/dist/src/util/function/index.js +0 -6
  249. package/dist/src/util/function/index.js.map +0 -1
  250. package/dist/src/util/function/lookup.d.ts +0 -18
  251. package/dist/src/util/function/lookup.d.ts.map +0 -1
  252. package/dist/src/util/function/lookup.js +0 -14
  253. package/dist/src/util/function/lookup.js.map +0 -1
  254. package/dist/src/util/index.d.ts +0 -6
  255. package/dist/src/util/index.d.ts.map +0 -1
  256. package/dist/src/util/index.js +0 -9
  257. package/dist/src/util/index.js.map +0 -1
  258. package/dist/src/util/provider/digital-ocean.d.ts +0 -14
  259. package/dist/src/util/provider/digital-ocean.d.ts.map +0 -1
  260. package/dist/src/util/provider/digital-ocean.js +0 -123
  261. package/dist/src/util/provider/digital-ocean.js.map +0 -1
  262. package/dist/src/util/provider/index.d.ts +0 -3
  263. package/dist/src/util/provider/index.d.ts.map +0 -1
  264. package/dist/src/util/provider/index.js +0 -6
  265. package/dist/src/util/provider/index.js.map +0 -1
  266. package/dist/src/util/provider/provider.d.ts +0 -27
  267. package/dist/src/util/provider/provider.d.ts.map +0 -1
  268. package/dist/src/util/provider/provider.js +0 -24
  269. package/dist/src/util/provider/provider.js.map +0 -1
  270. package/dist/src/util/publish/build.d.ts +0 -11
  271. package/dist/src/util/publish/build.d.ts.map +0 -1
  272. package/dist/src/util/publish/build.js +0 -25
  273. package/dist/src/util/publish/build.js.map +0 -1
  274. package/dist/src/util/publish/common.d.ts +0 -11
  275. package/dist/src/util/publish/common.d.ts.map +0 -1
  276. package/dist/src/util/publish/common.js +0 -23
  277. package/dist/src/util/publish/common.js.map +0 -1
  278. package/dist/src/util/publish/config.d.ts +0 -3
  279. package/dist/src/util/publish/config.d.ts.map +0 -1
  280. package/dist/src/util/publish/config.js +0 -28
  281. package/dist/src/util/publish/config.js.map +0 -1
  282. package/dist/src/util/publish/index.d.ts +0 -7
  283. package/dist/src/util/publish/index.d.ts.map +0 -1
  284. package/dist/src/util/publish/index.js +0 -10
  285. package/dist/src/util/publish/index.js.map +0 -1
  286. package/dist/src/util/publish/ipfs-upload.d.ts +0 -8
  287. package/dist/src/util/publish/ipfs-upload.d.ts.map +0 -1
  288. package/dist/src/util/publish/ipfs-upload.js +0 -50
  289. package/dist/src/util/publish/ipfs-upload.js.map +0 -1
  290. package/dist/src/util/publish/publish.d.ts +0 -14
  291. package/dist/src/util/publish/publish.d.ts.map +0 -1
  292. package/dist/src/util/publish/publish.js +0 -52
  293. package/dist/src/util/publish/publish.js.map +0 -1
  294. package/dist/src/util/publish/publisher-rpc-peer.d.ts +0 -15
  295. package/dist/src/util/publish/publisher-rpc-peer.d.ts.map +0 -1
  296. package/dist/src/util/publish/publisher-rpc-peer.js +0 -80
  297. package/dist/src/util/publish/publisher-rpc-peer.js.map +0 -1
  298. package/dist/src/util/supervisor/index.d.ts +0 -2
  299. package/dist/src/util/supervisor/index.d.ts.map +0 -1
  300. package/dist/src/util/supervisor/index.js +0 -5
  301. package/dist/src/util/supervisor/index.js.map +0 -1
  302. package/dist/src/util/supervisor/supervisor-rpc-peer.d.ts +0 -15
  303. package/dist/src/util/supervisor/supervisor-rpc-peer.d.ts.map +0 -1
  304. package/dist/src/util/supervisor/supervisor-rpc-peer.js +0 -81
  305. package/dist/src/util/supervisor/supervisor-rpc-peer.js.map +0 -1
  306. package/dist/src/util/tunnel/common.d.ts +0 -9
  307. package/dist/src/util/tunnel/common.d.ts.map +0 -1
  308. package/dist/src/util/tunnel/common.js +0 -26
  309. package/dist/src/util/tunnel/common.js.map +0 -1
  310. package/dist/src/util/tunnel/index.d.ts +0 -3
  311. package/dist/src/util/tunnel/index.d.ts.map +0 -1
  312. package/dist/src/util/tunnel/index.js +0 -6
  313. package/dist/src/util/tunnel/index.js.map +0 -1
  314. package/dist/src/util/tunnel/tunnel-rpc-peer.d.ts +0 -15
  315. package/dist/src/util/tunnel/tunnel-rpc-peer.d.ts.map +0 -1
  316. package/dist/src/util/tunnel/tunnel-rpc-peer.js +0 -81
  317. package/dist/src/util/tunnel/tunnel-rpc-peer.js.map +0 -1
  318. package/dist/tsconfig.tsbuildinfo +0 -1
  319. package/oclif.manifest.json +0 -5718
@@ -1,25 +0,0 @@
1
- //
2
- // Copyright 2022 DXOS.org
3
- //
4
- import chalk from 'chalk';
5
- import { spawnSync } from 'child_process';
6
- export const build = ({ verbose }, { log, module }) => {
7
- var _a;
8
- log(`Building module ${chalk.bold(module.name)} ...`);
9
- const [command, ...args] = module.build.command.split(' ');
10
- // Build with configuration.
11
- const { status, error } = spawnSync(command, args, {
12
- env: {
13
- ...process.env,
14
- ...((_a = module.build.env) !== null && _a !== void 0 ? _a : {}),
15
- CONFIG_DYNAMIC: 'true',
16
- },
17
- stdio: verbose ? 'inherit' : undefined,
18
- });
19
- if (error || status !== 0) {
20
- log(`Module ${chalk.bold(module.name)} build failed${verbose ? ` with status: ${status}.${error ? '\n' + error : ''}` : '. Re-run with --verbose for more details.'}`);
21
- process.exit(status === null ? 1 : status);
22
- }
23
- log(`Module build ${chalk.bold(module.name)} succeeded.`);
24
- };
25
- //# sourceMappingURL=build.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"build.js","sourceRoot":"","sources":["../../../../src/util/publish/build.ts"],"names":[],"mappings":"AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;AAEF,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAa1C,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,EAAE,OAAO,EAAa,EAAE,EAAE,GAAG,EAAE,MAAM,EAAe,EAAE,EAAE;;IAC5E,GAAG,CAAC,mBAAmB,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAEtD,MAAM,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,GAAG,MAAM,CAAC,KAAM,CAAC,OAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAE7D,4BAA4B;IAC5B,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,SAAS,CAAC,OAAO,EAAE,IAAI,EAAE;QACjD,GAAG,EAAE;YACH,GAAG,OAAO,CAAC,GAAG;YACd,GAAG,CAAC,MAAA,MAAM,CAAC,KAAM,CAAC,GAAG,mCAAI,EAAE,CAAC;YAC5B,cAAc,EAAE,MAAM;SACvB;QACD,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS;KACvC,CAAC,CAAC;IAEH,IAAI,KAAK,IAAI,MAAM,KAAK,CAAC,EAAE,CAAC;QAC1B,GAAG,CACD,UAAU,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,gBAC/B,OAAO,CAAC,CAAC,CAAC,iBAAiB,MAAM,IAAI,KAAK,CAAC,CAAC,CAAC,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,2CACrE,EAAE,CACH,CAAC;QACF,OAAO,CAAC,IAAI,CAAC,MAAM,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;IAC7C,CAAC;IAED,GAAG,CAAC,gBAAgB,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;AAC5D,CAAC,CAAC"}
@@ -1,11 +0,0 @@
1
- import { type TableOptions } from '@dxos/cli-base';
2
- import type { ConfigProto } from '@dxos/config';
3
- export type PackageModule = NonNullable<NonNullable<ConfigProto['package']>['modules']>[0];
4
- export type PackageRepo = NonNullable<NonNullable<ConfigProto['package']>['repos']>[0];
5
- export type Logger = (message: string, ...args: any[]) => void;
6
- export declare const mapModules: (modules: PackageModule[]) => Promise<{
7
- key: string | undefined;
8
- bundle: string;
9
- }[]>;
10
- export declare const printModules: (modules: PackageModule[], flags?: TableOptions) => Promise<void>;
11
- //# sourceMappingURL=common.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../../src/util/publish/common.ts"],"names":[],"mappings":"AAMA,OAAO,EAAS,KAAK,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEhD,MAAM,MAAM,aAAa,GAAG,WAAW,CAAC,WAAW,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAC3F,MAAM,MAAM,WAAW,GAAG,WAAW,CAAC,WAAW,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAEvF,MAAM,MAAM,MAAM,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC;AAE/D,eAAO,MAAM,UAAU,GAAU,SAAS,aAAa,EAAE;;;IAMxD,CAAC;AAEF,eAAO,MAAM,YAAY,GAAU,SAAS,aAAa,EAAE,EAAE,QAAO,YAAiB,kBAepF,CAAC"}
@@ -1,23 +0,0 @@
1
- //
2
- // Copyright 2023 DXOS.org
3
- //
4
- import { ux } from '@oclif/core';
5
- import { table } from '@dxos/cli-base';
6
- export const mapModules = async (modules) => {
7
- const { CID } = await import('kubo-rpc-client');
8
- return modules.map((mod) => ({
9
- key: mod.name,
10
- bundle: CID.decode(mod.bundle).toString(),
11
- }));
12
- };
13
- export const printModules = async (modules, flags = {}) => {
14
- ux.stdout(table(await mapModules(modules), {
15
- key: {
16
- header: 'name',
17
- },
18
- bundle: {
19
- header: 'bundle',
20
- },
21
- }, flags));
22
- };
23
- //# sourceMappingURL=common.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"common.js","sourceRoot":"","sources":["../../../../src/util/publish/common.ts"],"names":[],"mappings":"AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;AAEF,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AAEjC,OAAO,EAAE,KAAK,EAAqB,MAAM,gBAAgB,CAAC;AAQ1D,MAAM,CAAC,MAAM,UAAU,GAAG,KAAK,EAAE,OAAwB,EAAE,EAAE;IAC3D,MAAM,EAAE,GAAG,EAAE,GAAG,MAAM,MAAM,CAAC,iBAAiB,CAAC,CAAC;IAChD,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;QAC3B,GAAG,EAAE,GAAG,CAAC,IAAI;QACb,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,MAAO,CAAC,CAAC,QAAQ,EAAE;KAC3C,CAAC,CAAC,CAAC;AACN,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAG,KAAK,EAAE,OAAwB,EAAE,QAAsB,EAAE,EAAE,EAAE;IACvF,EAAE,CAAC,MAAM,CACP,KAAK,CACH,MAAM,UAAU,CAAC,OAAO,CAAC,EACzB;QACE,GAAG,EAAE;YACH,MAAM,EAAE,MAAM;SACf;QACD,MAAM,EAAE;YACN,MAAM,EAAE,QAAQ;SACjB;KACF,EACD,KAAK,CACN,CACF,CAAC;AACJ,CAAC,CAAC"}
@@ -1,3 +0,0 @@
1
- import { Config } from '@dxos/config';
2
- export declare const loadConfig: (configPath?: string) => Promise<Config>;
3
- //# sourceMappingURL=config.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../../src/util/publish/config.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAStC,eAAO,MAAM,UAAU,GAAU,aAAY,MAAkC,KAAG,OAAO,CAAC,MAAM,CAoB/F,CAAC"}
@@ -1,28 +0,0 @@
1
- //
2
- // Copyright 2022 DXOS.org
3
- //
4
- import fs from 'fs';
5
- import yaml from 'js-yaml';
6
- import defaultsDeep from 'lodash.defaultsdeep';
7
- import path from 'path';
8
- import { Config } from '@dxos/config';
9
- import { invariant } from '@dxos/invariant';
10
- const DEFAULT_BUILD_COMMAND = 'npm run build';
11
- const EXTENSION_CONFIG_FILENAME = 'dx.yml';
12
- export const loadConfig = async (configPath = EXTENSION_CONFIG_FILENAME) => {
13
- var _a, _b;
14
- const absolute = path.isAbsolute(configPath);
15
- configPath = absolute ? configPath : path.join(process.cwd(), configPath);
16
- invariant(fs.existsSync(configPath), `"${configPath}" not found.`);
17
- const dxConfig = yaml.load(String(fs.readFileSync(configPath)));
18
- invariant((_b = (_a = dxConfig.package) === null || _a === void 0 ? void 0 : _a.modules) === null || _b === void 0 ? void 0 : _b.length, `No modules found in ${configPath}`);
19
- return new Config({
20
- version: 1,
21
- package: {
22
- modules: dxConfig.package.modules.map((module) => defaultsDeep(module, {
23
- build: { command: DEFAULT_BUILD_COMMAND },
24
- })),
25
- },
26
- });
27
- };
28
- //# sourceMappingURL=config.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"config.js","sourceRoot":"","sources":["../../../../src/util/publish/config.ts"],"names":[],"mappings":"AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;AAEF,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,SAAS,CAAC;AAC3B,OAAO,YAAY,MAAM,qBAAqB,CAAC;AAC/C,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAEtC,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAI5C,MAAM,qBAAqB,GAAG,eAAe,CAAC;AAC9C,MAAM,yBAAyB,GAAG,QAAQ,CAAC;AAE3C,MAAM,CAAC,MAAM,UAAU,GAAG,KAAK,EAAE,aAAqB,yBAAyB,EAAmB,EAAE;;IAClG,MAAM,QAAQ,GAAG,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;IAC7C,UAAU,GAAG,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,UAAU,CAAC,CAAC;IAE1E,SAAS,CAAC,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,IAAI,UAAU,cAAc,CAAC,CAAC;IAEnE,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC,CAAgB,CAAC;IAE/E,SAAS,CAAC,MAAA,MAAA,QAAQ,CAAC,OAAO,0CAAE,OAAO,0CAAE,MAAM,EAAE,uBAAuB,UAAU,EAAE,CAAC,CAAC;IAElF,OAAO,IAAI,MAAM,CAAC;QAChB,OAAO,EAAE,CAAC;QACV,OAAO,EAAE;YACP,OAAO,EAAE,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAqB,EAAE,EAAE,CAC9D,YAAY,CAAC,MAAM,EAAE;gBACnB,KAAK,EAAE,EAAE,OAAO,EAAE,qBAAqB,EAAE;aAC1C,CAAC,CACH;SACF;KACF,CAAC,CAAC;AACL,CAAC,CAAC"}
@@ -1,7 +0,0 @@
1
- export * from './build';
2
- export * from './common';
3
- export * from './config';
4
- export * from './ipfs-upload';
5
- export * from './publish';
6
- export * from './publisher-rpc-peer';
7
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/util/publish/index.ts"],"names":[],"mappings":"AAIA,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,sBAAsB,CAAC"}
@@ -1,10 +0,0 @@
1
- //
2
- // Copyright 2022 DXOS.org
3
- //
4
- export * from './build';
5
- export * from './common';
6
- export * from './config';
7
- export * from './ipfs-upload';
8
- export * from './publish';
9
- export * from './publisher-rpc-peer';
10
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/util/publish/index.ts"],"names":[],"mappings":"AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;AAEF,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,sBAAsB,CAAC"}
@@ -1,8 +0,0 @@
1
- import { type CID, type KuboRPCClient } from 'kubo-rpc-client';
2
- interface UploadOptions {
3
- progress?: (bytes: number, path?: string) => void;
4
- pin?: boolean;
5
- }
6
- export declare const uploadToIPFS: (ipfsClient: KuboRPCClient, path: string, options?: UploadOptions) => Promise<CID>;
7
- export {};
8
- //# sourceMappingURL=ipfs-upload.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ipfs-upload.d.ts","sourceRoot":"","sources":["../../../../src/util/publish/ipfs-upload.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,GAAG,EAAE,KAAK,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAK/D,UAAU,aAAa;IACrB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAClD,GAAG,CAAC,EAAE,OAAO,CAAC;CACf;AAGD,eAAO,MAAM,YAAY,GAAU,YAAY,aAAa,EAAE,MAAM,MAAM,EAAE,UAAU,aAAa,KAAG,OAAO,CAAC,GAAG,CA2ChH,CAAC"}
@@ -1,50 +0,0 @@
1
- //
2
- // Copyright 2022 DXOS.org
3
- //
4
- import fs from 'fs';
5
- import { join } from 'path';
6
- import { importESM } from '@dxos/cli-base';
7
- // TODO(burdon): Generalize.
8
- export const uploadToIPFS = async (ipfsClient, path, options) => {
9
- const { globSource } = await importESM('kubo-rpc-client');
10
- if (!fs.existsSync(path)) {
11
- throw new Error(`File or directory does not exist: ${path}}`);
12
- }
13
- const { pin = true, progress } = options || {};
14
- if (fs.lstatSync(path).isDirectory()) {
15
- const files = [];
16
- for await (const file of ipfsClient.addAll(globSource(path, '**/*'), {
17
- progress,
18
- pin,
19
- wrapWithDirectory: true,
20
- })) {
21
- const fullPath = join(path, file.path);
22
- if (!fs.lstatSync(fullPath).isDirectory()) {
23
- const remoteChunks = [];
24
- for await (const chunk of ipfsClient.cat(file.cid)) {
25
- remoteChunks.push(chunk);
26
- }
27
- const remoteContent = Buffer.concat(remoteChunks);
28
- const localContent = fs.readFileSync(fullPath);
29
- if (!localContent.equals(remoteContent)) {
30
- throw new Error('file content mismatch', {
31
- cause: {
32
- path: fullPath,
33
- cid: file.cid.toString(),
34
- localSize: localContent.length,
35
- remoteSize: remoteContent.length,
36
- },
37
- });
38
- }
39
- }
40
- files.push(file);
41
- }
42
- return files[files.length - 1].cid; // last file is the root directory
43
- }
44
- else {
45
- const content = fs.readFileSync(path);
46
- const addResult = await ipfsClient.add(content, { pin });
47
- return addResult.cid;
48
- }
49
- };
50
- //# sourceMappingURL=ipfs-upload.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ipfs-upload.js","sourceRoot":"","sources":["../../../../src/util/publish/ipfs-upload.ts"],"names":[],"mappings":"AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;AAEF,OAAO,EAAE,MAAM,IAAI,CAAC;AAEpB,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAE5B,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAO3C,4BAA4B;AAC5B,MAAM,CAAC,MAAM,YAAY,GAAG,KAAK,EAAE,UAAyB,EAAE,IAAY,EAAE,OAAuB,EAAgB,EAAE;IACnH,MAAM,EAAE,UAAU,EAAE,GAAG,MAAM,SAAS,CAAC,iBAAiB,CAAC,CAAC;IAC1D,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;QACzB,MAAM,IAAI,KAAK,CAAC,qCAAqC,IAAI,GAAG,CAAC,CAAC;IAChE,CAAC;IAED,MAAM,EAAE,GAAG,GAAG,IAAI,EAAE,QAAQ,EAAE,GAAG,OAAO,IAAI,EAAE,CAAC;IAC/C,IAAI,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC;QACrC,MAAM,KAAK,GAAG,EAAE,CAAC;QACjB,IAAI,KAAK,EAAE,MAAM,IAAI,IAAI,UAAU,CAAC,MAAM,CAAC,UAAU,CAAC,IAAI,EAAE,MAAM,CAAC,EAAE;YACnE,QAAQ;YACR,GAAG;YACH,iBAAi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S,CAAC,GAAG,CAAC;IACvB,CAAC;AACH,CAAC,CAAC"}
@@ -1,14 +0,0 @@
1
- import type { Config } from '@dxos/client';
2
- import { type Logger, type PackageModule } from './common';
3
- interface PublishOptions {
4
- config: Config;
5
- log: Logger;
6
- module: PackageModule;
7
- verbose?: boolean;
8
- timeout?: string | number;
9
- path?: string;
10
- pin?: boolean;
11
- }
12
- export declare const publish: ({ verbose, timeout, path, pin, log, config, module }: PublishOptions) => Promise<any>;
13
- export {};
14
- //# sourceMappingURL=publish.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"publish.d.ts","sourceRoot":"","sources":["../../../../src/util/publish/publish.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAG3C,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,aAAa,EAAE,MAAM,UAAU,CAAC;AAa3D,UAAU,cAAc;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,aAAa,CAAC;IACtB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC1B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,OAAO,CAAC;CACf;AAED,eAAO,MAAM,OAAO,GAAU,sDAAsD,cAAc,KAAG,OAAO,CAAC,GAAG,CAiC/G,CAAC"}
@@ -1,52 +0,0 @@
1
- //
2
- // Copyright 2022 DXOS.org
3
- //
4
- import chalk from 'chalk';
5
- import cliProgress from 'cli-progress';
6
- import fs from 'fs';
7
- import folderSize from 'get-folder-size';
8
- import { join } from 'path';
9
- import { promisify } from 'util';
10
- import { createIpfsClient } from '@dxos/cli-base';
11
- import { invariant } from '@dxos/invariant';
12
- import { uploadToIPFS } from './ipfs-upload';
13
- const DEFAULT_OUTDIR = 'out';
14
- const getFolderSize = promisify(folderSize);
15
- /**
16
- * Encodes DXN string to fs path.
17
- * Example: `example:app/braneframe` => `example/app/braneframe`
18
- */
19
- const encodeName = (name) => name.replaceAll(':', '/');
20
- export const publish = async ({ verbose, timeout, path, pin, log, config, module }) => {
21
- var _a, _b;
22
- invariant(module.name, 'Module name is required to publish.');
23
- log(`Publishing module ${chalk.bold(module.name)} ...`);
24
- const moduleOut = `out/${encodeName(module.name)}`;
25
- const outdir = (_b = path !== null && path !== void 0 ? path : (_a = module.build) === null || _a === void 0 ? void 0 : _a.outdir) !== null && _b !== void 0 ? _b : (fs.existsSync(moduleOut) ? moduleOut : DEFAULT_OUTDIR);
26
- const publishFolder = join(process.cwd(), outdir);
27
- if (!fs.existsSync(publishFolder)) {
28
- throw new Error(`Publish failed. Build output folder does not exist: ${publishFolder}.`);
29
- }
30
- const total = await getFolderSize(publishFolder);
31
- const progress = new cliProgress.SingleBar({}, cliProgress.Presets.shades_classic);
32
- verbose && progress.start(total, 0);
33
- let cid;
34
- try {
35
- const ipfsClient = await createIpfsClient(config, timeout);
36
- log('Uploading...', { folder: publishFolder, server: ipfsClient.getEndpointConfig().host });
37
- cid = await uploadToIPFS(ipfsClient, publishFolder, {
38
- progress: verbose ? (bytes) => progress.update(bytes) : undefined,
39
- pin,
40
- });
41
- }
42
- catch (err) {
43
- // Avoid leaving user's terminal in a bad state.
44
- progress.stop();
45
- throw new Error(`Publish failed. ${err.message}` + (err.cause ? ` (${err.cause})` : ''));
46
- }
47
- verbose && progress.update(total);
48
- verbose && progress.stop();
49
- log(`Published module ${chalk.bold(module.name)}. IPFS cid: ${cid.toString()}`);
50
- return cid;
51
- };
52
- //# sourceMappingURL=publish.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"publish.js","sourceRoot":"","sources":["../../../../src/util/publish/publish.ts"],"names":[],"mappings":"AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;AAEF,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,WAAW,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,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AC;IAE3B,GAAG,CAAC,oBAAoB,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,eAAe,GAAG,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;IAChF,OAAO,GAAG,CAAC;AACb,CAAC,CAAC"}
@@ -1,15 +0,0 @@
1
- import { Event } from '@dxos/async';
2
- import { type Publisher } from '@dxos/protocols/proto/dxos/service/publisher';
3
- export declare class PublisherRpcPeer {
4
- private readonly _url;
5
- private readonly _socket;
6
- private readonly _rpc;
7
- private readonly _connectTrigger;
8
- readonly connected: Event<void>;
9
- readonly disconnected: Event<void>;
10
- readonly error: Event<Error>;
11
- constructor(_url: string);
12
- get rpc(): Publisher;
13
- close(): Promise<void>;
14
- }
15
- //# sourceMappingURL=publisher-rpc-peer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"publisher-rpc-peer.d.ts","sourceRoot":"","sources":["../../../../src/util/publish/publisher-rpc-peer.ts"],"names":[],"mappings":"AAMA,OAAO,EAAW,KAAK,EAAE,MAAM,aAAa,CAAC;AAG7C,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,8CAA8C,CAAC;AAG9E,qBAAa,gBAAgB;IASf,OAAO,CAAC,QAAQ,CAAC,IAAI;IARjC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAY;IACpC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAyC;IAC9D,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAiB;IAEjD,QAAQ,CAAC,SAAS,cAAe;IACjC,QAAQ,CAAC,YAAY,cAAe;IACpC,QAAQ,CAAC,KAAK,eAAsB;gBAEP,IAAI,EAAE,MAAM;IAqDzC,IAAI,GAAG,IAAI,SAAS,CAEnB;IAEK,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;CAO7B"}
@@ -1,80 +0,0 @@
1
- //
2
- // Copyright 2022 DXOS.org
3
- //
4
- import WebSocket from 'isomorphic-ws';
5
- import { Trigger, Event } from '@dxos/async';
6
- import { log } from '@dxos/log';
7
- import { schema } from '@dxos/protocols/proto';
8
- import { createProtoRpcPeer } from '@dxos/rpc';
9
- export class PublisherRpcPeer {
10
- constructor(_url) {
11
- this._url = _url;
12
- this._connectTrigger = new Trigger();
13
- this.connected = new Event();
14
- this.disconnected = new Event();
15
- this.error = new Event();
16
- this._socket = new WebSocket(this._url);
17
- this._socket.onopen = async () => {
18
- try {
19
- await this._rpc.open();
20
- log(`RPC open ${this._url}`);
21
- this.connected.emit();
22
- this._connectTrigger.wake();
23
- }
24
- catch (err) {
25
- this.error.emit(err);
26
- }
27
- };
28
- this._socket.onclose = async () => {
29
- log(`Disconnected ${this._url}`);
30
- this.disconnected.emit();
31
- try {
32
- await this._rpc.close();
33
- }
34
- catch (err) {
35
- this.error.emit(err);
36
- }
37
- };
38
- this._socket.onerror = (event) => {
39
- var _a;
40
- log(`Publisher socket error ${this._url} ${event.message}`);
41
- this.error.emit((_a = event.error) !== null && _a !== void 0 ? _a : new Error(event.message));
42
- };
43
- this._rpc = createProtoRpcPeer({
44
- requested: {
45
- Publisher: schema.getService('dxos.service.publisher.Publisher'),
46
- },
47
- exposed: {},
48
- handlers: {},
49
- noHandshake: true,
50
- timeout: 1000000,
51
- port: {
52
- send: (msg) => {
53
- this._socket.send(msg);
54
- },
55
- subscribe: (cb) => {
56
- this._socket.onmessage = async (msg) => {
57
- if (typeof Blob !== 'undefined' && msg.data instanceof Blob) {
58
- cb(Buffer.from(await msg.data.arrayBuffer()));
59
- }
60
- else {
61
- cb(msg.data);
62
- }
63
- };
64
- },
65
- },
66
- });
67
- }
68
- get rpc() {
69
- return this._rpc.rpc.Publisher;
70
- }
71
- async close() {
72
- try {
73
- await this._rpc.close();
74
- }
75
- finally {
76
- this._socket.close();
77
- }
78
- }
79
- }
80
- //# sourceMappingURL=publisher-rpc-peer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"publisher-rpc-peer.js","sourceRoot":"","sources":["../../../../src/util/publish/publisher-rpc-peer.ts"],"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,IAAW,CAAC,CAAC;wBACtB,CAAC;oBACH,CAAC,CAAC;gBACJ,CAAC;aACF;SACF,CAAC,CAAC;IACL,CAAC;IAED,IAAI,GAAG;QACL,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC;IACjC,CAAC;IAED,KAAK,CAAC,KAAK;QACT,IAAI,CAAC;YACH,MAAM,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC;QAC1B,CAAC;gBAAS,CAAC;YACT,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;QACvB,CAAC;IACH,CAAC;CACF"}
@@ -1,2 +0,0 @@
1
- export * from './supervisor-rpc-peer';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/util/supervisor/index.ts"],"names":[],"mappings":"AAIA,cAAc,uBAAuB,CAAC"}
@@ -1,5 +0,0 @@
1
- //
2
- // Copyright 2023 DXOS.org
3
- //
4
- export * from './supervisor-rpc-peer';
5
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/util/supervisor/index.ts"],"names":[],"mappings":"AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;AAEF,cAAc,uBAAuB,CAAC"}
@@ -1,15 +0,0 @@
1
- import { Event } from '@dxos/async';
2
- import { type Supervisor } from '@dxos/protocols/proto/dxos/service/supervisor';
3
- export declare class SupervisorRpcPeer {
4
- private readonly _url;
5
- private readonly _socket;
6
- private readonly _rpc;
7
- private readonly _connectTrigger;
8
- readonly connected: Event<void>;
9
- readonly disconnected: Event<void>;
10
- readonly error: Event<Error>;
11
- constructor(_url: string);
12
- get rpc(): Supervisor;
13
- close(): Promise<void>;
14
- }
15
- //# sourceMappingURL=supervisor-rpc-peer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"supervisor-rpc-peer.d.ts","sourceRoot":"","sources":["../../../../src/util/supervisor/supervisor-rpc-peer.ts"],"names":[],"mappings":"AAOA,OAAO,EAAW,KAAK,EAAE,MAAM,aAAa,CAAC;AAG7C,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,+CAA+C,CAAC;AAGhF,qBAAa,iBAAiB;IAShB,OAAO,CAAC,QAAQ,CAAC,IAAI;IARjC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAY;IACpC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAA2C;IAChE,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAiB;IAEjD,QAAQ,CAAC,SAAS,cAAe;IACjC,QAAQ,CAAC,YAAY,cAAe;IACpC,QAAQ,CAAC,KAAK,eAAsB;gBAEP,IAAI,EAAE,MAAM;IAqDzC,IAAI,GAAG,IAAI,UAAU,CAEpB;IAEK,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;CAO7B"}
@@ -1,81 +0,0 @@
1
- //
2
- // Copyright 2023 DXOS.org
3
- //
4
- // TODO(egorgripasov): Factor out.
5
- import WebSocket from 'isomorphic-ws';
6
- import { Trigger, Event } from '@dxos/async';
7
- import { log } from '@dxos/log';
8
- import { schema } from '@dxos/protocols/proto';
9
- import { createProtoRpcPeer } from '@dxos/rpc';
10
- export class SupervisorRpcPeer {
11
- constructor(_url) {
12
- this._url = _url;
13
- this._connectTrigger = new Trigger();
14
- this.connected = new Event();
15
- this.disconnected = new Event();
16
- this.error = new Event();
17
- this._socket = new WebSocket(this._url);
18
- this._socket.onopen = async () => {
19
- try {
20
- await this._rpc.open();
21
- log(`RPC open ${this._url}`);
22
- this.connected.emit();
23
- this._connectTrigger.wake();
24
- }
25
- catch (err) {
26
- this.error.emit(err);
27
- }
28
- };
29
- this._socket.onclose = async () => {
30
- log(`Disconnected ${this._url}`);
31
- this.disconnected.emit();
32
- try {
33
- await this._rpc.close();
34
- }
35
- catch (err) {
36
- this.error.emit(err);
37
- }
38
- };
39
- this._socket.onerror = (event) => {
40
- var _a;
41
- log(`Publisher socket error ${this._url} ${event.message}`);
42
- this.error.emit((_a = event.error) !== null && _a !== void 0 ? _a : new Error(event.message));
43
- };
44
- this._rpc = createProtoRpcPeer({
45
- requested: {
46
- Supervisor: schema.getService('dxos.service.supervisor.Supervisor'),
47
- },
48
- exposed: {},
49
- handlers: {},
50
- noHandshake: true,
51
- timeout: 1000000,
52
- port: {
53
- send: (msg) => {
54
- this._socket.send(msg);
55
- },
56
- subscribe: (cb) => {
57
- this._socket.onmessage = async (msg) => {
58
- if (typeof Blob !== 'undefined' && msg.data instanceof Blob) {
59
- cb(Buffer.from(await msg.data.arrayBuffer()));
60
- }
61
- else {
62
- cb(msg.data);
63
- }
64
- };
65
- },
66
- },
67
- });
68
- }
69
- get rpc() {
70
- return this._rpc.rpc.Supervisor;
71
- }
72
- async close() {
73
- try {
74
- await this._rpc.close();
75
- }
76
- finally {
77
- this._socket.close();
78
- }
79
- }
80
- }
81
- //# sourceMappingURL=supervisor-rpc-peer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"supervisor-rpc-peer.js","sourceRoot":"","sources":["../../../../src/util/supervisor/supervisor-rpc-peer.ts"],"names":[],"mappings":"AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;AAEF,kCAAkC;AAClC,OAAO,SAAS,MAAM,eAAe,CAAC;AAEtC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAChC,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAE/C,OAAO,EAAE,kBAAkB,EAAqB,MAAM,WAAW,CAAC;AAElE,MAAM,OAAO,iBAAiB;IAS5B,YAA6B,IAAY;QAAZ,SAAI,GAAJ,IAAI,CAAQ;QANxB,oBAAe,GAAG,IAAI,OAAO,EAAE,CAAC;QAExC,cAAS,GAAG,IAAI,KAAK,EAAE,CAAC;QACxB,iBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;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;QAEF,IAAI,CAAC,IAAI,GAAG,kBAAkB,CAAC;YAC7B,SAAS,EAAE;gBACT,UAAU,EAAE,MAAM,CAAC,UAAU,CAAC,oCAAoC,CAAC;aACpE;YACD,OAAO,EAAE,EAAE;YACX,QAAQ,EAAE,EAAE;YACZ,WAAW,EAAE,IAAI;YACjB,OAAO,EAAE,OAAS;YAClB,IAAI,EAAE;gBACJ,IAAI,EAAE,CAAC,GAAG,EAAE,EAAE;oBACZ,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;gBACzB,CAAC;gBACD,SAAS,EAAE,CAAC,EAAE,EAAE,EAAE;oBAChB,IAAI,CAAC,OAAO,CAAC,SAAS,GAAG,KAAK,EAAE,GAA2B,EAAE,EAAE;wBAC7D,IAAI,OAAO,IAAI,KAAK,WAAW,IAAI,GAAG,CAAC,IAAI,YAAY,IAAI,EAAE,CAAC;4BAC5D,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC;wBAChD,CAAC;6BAAM,CAAC;4BACN,EAAE,CAAC,GAAG,CAAC,IAAW,CAAC,CAAC;wBACtB,CAAC;oBACH,CAAC,CAAC;gBACJ,CAAC;aACF;SACF,CAAC,CAAC;IACL,CAAC;IAED,IAAI,GAAG;QACL,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC;IAClC,CAAC;IAED,KAAK,CAAC,KAAK;QACT,IAAI,CAAC;YACH,MAAM,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC;QAC1B,CAAC;gBAAS,CAAC;YACT,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;QACvB,CAAC;IACH,CAAC;CACF"}
@@ -1,9 +0,0 @@
1
- import { type TableFlags } from '@dxos/cli-base';
2
- import { type TunnelResponse } from '@dxos/protocols/proto/dxos/service/tunnel';
3
- export declare const mapTunnels: (tunnels: TunnelResponse[]) => {
4
- key: string;
5
- enabled: boolean;
6
- url: string;
7
- }[];
8
- export declare const printTunnels: (tunnels: TunnelResponse[], flags?: TableFlags) => void;
9
- //# sourceMappingURL=common.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../../src/util/tunnel/common.ts"],"names":[],"mappings":"AAMA,OAAO,EAAS,KAAK,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,2CAA2C,CAAC;AAEhF,eAAO,MAAM,UAAU,GAAI,SAAS,cAAc,EAAE;;;;GAMnD,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,SAAS,cAAc,EAAE,EAAE,QAAO,UAAe,SAkB7E,CAAC"}
@@ -1,26 +0,0 @@
1
- //
2
- // Copyright 2023 DXOS.org
3
- //
4
- import { ux } from '@oclif/core';
5
- import { table } from '@dxos/cli-base';
6
- export const mapTunnels = (tunnels) => {
7
- return tunnels.map((tunnel) => ({
8
- key: tunnel.name,
9
- enabled: tunnel.enabled,
10
- url: tunnel.url,
11
- }));
12
- };
13
- export const printTunnels = (tunnels, flags = {}) => {
14
- ux.stdout(table(mapTunnels(tunnels), {
15
- key: {
16
- header: 'app',
17
- },
18
- enabled: {
19
- header: 'enabled',
20
- },
21
- url: {
22
- header: 'url',
23
- },
24
- }, flags));
25
- };
26
- //# sourceMappingURL=common.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"common.js","sourceRoot":"","sources":["../../../../src/util/tunnel/common.ts"],"names":[],"mappings":"AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;AAEF,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AAEjC,OAAO,EAAE,KAAK,EAAmB,MAAM,gBAAgB,CAAC;AAGxD,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,OAAyB,EAAE,EAAE;IACtD,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;QAC9B,GAAG,EAAE,MAAM,CAAC,IAAI;QAChB,OAAO,EAAE,MAAM,CAAC,OAAO;QACvB,GAAG,EAAE,MAAM,CAAC,GAAG;KAChB,CAAC,CAAC,CAAC;AACN,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,OAAyB,EAAE,QAAoB,EAAE,EAAE,EAAE;IAChF,EAAE,CAAC,MAAM,CACP,KAAK,CACH,UAAU,CAAC,OAAO,CAAC,EACnB;QACE,GAAG,EAAE;YACH,MAAM,EAAE,KAAK;SACd;QACD,OAAO,EAAE;YACP,MAAM,EAAE,SAAS;SAClB;QACD,GAAG,EAAE;YACH,MAAM,EAAE,KAAK;SACd;KACF,EACD,KAAK,CACN,CACF,CAAC;AACJ,CAAC,CAAC"}
@@ -1,3 +0,0 @@
1
- export * from './common';
2
- export * from './tunnel-rpc-peer';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/util/tunnel/index.ts"],"names":[],"mappings":"AAIA,cAAc,UAAU,CAAC;AACzB,cAAc,mBAAmB,CAAC"}
@@ -1,6 +0,0 @@
1
- //
2
- // Copyright 2023 DXOS.org
3
- //
4
- export * from './common';
5
- export * from './tunnel-rpc-peer';
6
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/util/tunnel/index.ts"],"names":[],"mappings":"AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;AAEF,cAAc,UAAU,CAAC;AACzB,cAAc,mBAAmB,CAAC"}
@@ -1,15 +0,0 @@
1
- import { Event } from '@dxos/async';
2
- import { type Tunnel } from '@dxos/protocols/proto/dxos/service/tunnel';
3
- export declare class TunnelRpcPeer {
4
- private readonly _url;
5
- private readonly _socket;
6
- private readonly _rpc;
7
- private readonly _connectTrigger;
8
- readonly connected: Event<void>;
9
- readonly disconnected: Event<void>;
10
- readonly error: Event<Error>;
11
- constructor(_url: string);
12
- get rpc(): Tunnel;
13
- close(): Promise<void>;
14
- }
15
- //# sourceMappingURL=tunnel-rpc-peer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tunnel-rpc-peer.d.ts","sourceRoot":"","sources":["../../../../src/util/tunnel/tunnel-rpc-peer.ts"],"names":[],"mappings":"AAOA,OAAO,EAAW,KAAK,EAAE,MAAM,aAAa,CAAC;AAG7C,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,2CAA2C,CAAC;AAGxE,qBAAa,aAAa;IASZ,OAAO,CAAC,QAAQ,CAAC,IAAI;IARjC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAY;IACpC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAmC;IACxD,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAiB;IAEjD,QAAQ,CAAC,SAAS,cAAe;IACjC,QAAQ,CAAC,YAAY,cAAe;IACpC,QAAQ,CAAC,KAAK,eAAsB;gBAEP,IAAI,EAAE,MAAM;IAqDzC,IAAI,GAAG,IAAI,MAAM,CAEhB;IAEK,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;CAO7B"}