@dxos/cli 0.1.55-main.5edf62b → 0.1.55-main.6f6b5eb

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 (116) hide show
  1. package/README.md +140 -66
  2. package/dist/src/base-command.d.ts +9 -1
  3. package/dist/src/base-command.d.ts.map +1 -1
  4. package/dist/src/base-command.js +51 -8
  5. package/dist/src/base-command.js.map +1 -1
  6. package/dist/src/commands/agent/restart.js +2 -2
  7. package/dist/src/commands/agent/restart.js.map +1 -1
  8. package/dist/src/commands/agent/start.d.ts.map +1 -1
  9. package/dist/src/commands/agent/start.js +8 -3
  10. package/dist/src/commands/agent/start.js.map +1 -1
  11. package/dist/src/commands/agent/stop.d.ts.map +1 -1
  12. package/dist/src/commands/agent/stop.js +10 -5
  13. package/dist/src/commands/agent/stop.js.map +1 -1
  14. package/dist/src/commands/app/create.js +3 -3
  15. package/dist/src/commands/app/create.js.map +1 -1
  16. package/dist/src/commands/debug/generate.d.ts +22 -0
  17. package/dist/src/commands/debug/generate.d.ts.map +1 -0
  18. package/dist/src/commands/debug/generate.js +68 -0
  19. package/dist/src/commands/debug/generate.js.map +1 -0
  20. package/dist/src/commands/device/list.d.ts +17 -0
  21. package/dist/src/commands/device/list.d.ts.map +1 -1
  22. package/dist/src/commands/device/list.js +5 -0
  23. package/dist/src/commands/device/list.js.map +1 -1
  24. package/dist/src/commands/halo/credential/list.d.ts +8 -0
  25. package/dist/src/commands/halo/credential/list.d.ts.map +1 -1
  26. package/dist/src/commands/halo/credential/list.js +7 -7
  27. package/dist/src/commands/halo/credential/list.js.map +1 -1
  28. package/dist/src/commands/halo/{index.d.ts → info.d.ts} +2 -2
  29. package/dist/src/commands/halo/info.d.ts.map +1 -0
  30. package/dist/src/commands/halo/{index.js → info.js} +5 -5
  31. package/dist/src/commands/halo/info.js.map +1 -0
  32. package/dist/src/commands/halo/join.d.ts +1 -0
  33. package/dist/src/commands/halo/join.d.ts.map +1 -1
  34. package/dist/src/commands/halo/join.js +20 -14
  35. package/dist/src/commands/halo/join.js.map +1 -1
  36. package/dist/src/commands/halo/share.d.ts.map +1 -1
  37. package/dist/src/commands/halo/share.js +1 -2
  38. package/dist/src/commands/halo/share.js.map +1 -1
  39. package/dist/src/commands/kube/auth.js +1 -1
  40. package/dist/src/commands/kube/auth.js.map +1 -1
  41. package/dist/src/commands/kube/deploy.d.ts.map +1 -1
  42. package/dist/src/commands/kube/deploy.js +16 -25
  43. package/dist/src/commands/kube/deploy.js.map +1 -1
  44. package/dist/src/commands/reset/index.d.ts.map +1 -1
  45. package/dist/src/commands/reset/index.js +12 -7
  46. package/dist/src/commands/reset/index.js.map +1 -1
  47. package/dist/src/commands/shell/index.d.ts +0 -1
  48. package/dist/src/commands/shell/index.d.ts.map +1 -1
  49. package/dist/src/commands/shell/index.js +0 -4
  50. package/dist/src/commands/shell/index.js.map +1 -1
  51. package/dist/src/commands/space/create.d.ts.map +1 -1
  52. package/dist/src/commands/space/create.js +9 -7
  53. package/dist/src/commands/space/create.js.map +1 -1
  54. package/dist/src/commands/space/epoch.d.ts +0 -17
  55. package/dist/src/commands/space/epoch.d.ts.map +1 -1
  56. package/dist/src/commands/space/epoch.js +2 -23
  57. package/dist/src/commands/space/epoch.js.map +1 -1
  58. package/dist/src/commands/space/join.js +17 -15
  59. package/dist/src/commands/space/join.js.map +1 -1
  60. package/dist/src/commands/space/list.d.ts.map +1 -1
  61. package/dist/src/commands/space/list.js +5 -6
  62. package/dist/src/commands/space/list.js.map +1 -1
  63. package/dist/src/commands/space/members.d.ts +3 -3
  64. package/dist/src/commands/space/members.d.ts.map +1 -1
  65. package/dist/src/commands/space/members.js +6 -21
  66. package/dist/src/commands/space/members.js.map +1 -1
  67. package/dist/src/commands/space/{invite.d.ts → query.d.ts} +4 -3
  68. package/dist/src/commands/space/query.d.ts.map +1 -0
  69. package/dist/src/commands/space/query.js +39 -0
  70. package/dist/src/commands/space/query.js.map +1 -0
  71. package/dist/src/commands/space/share.d.ts +20 -0
  72. package/dist/src/commands/space/share.d.ts.map +1 -0
  73. package/dist/src/commands/space/share.js +62 -0
  74. package/dist/src/commands/space/share.js.map +1 -0
  75. package/dist/src/commands/tunnel/list.d.ts.map +1 -1
  76. package/dist/src/commands/tunnel/list.js +3 -4
  77. package/dist/src/commands/tunnel/list.js.map +1 -1
  78. package/dist/src/commands/tunnel/set.d.ts.map +1 -1
  79. package/dist/src/commands/tunnel/set.js +1 -1
  80. package/dist/src/commands/tunnel/set.js.map +1 -1
  81. package/dist/src/errors.d.ts +4 -0
  82. package/dist/src/errors.d.ts.map +1 -0
  83. package/dist/src/errors.js +13 -0
  84. package/dist/src/errors.js.map +1 -0
  85. package/dist/src/timeouts.d.ts +0 -1
  86. package/dist/src/timeouts.d.ts.map +1 -1
  87. package/dist/src/timeouts.js +1 -3
  88. package/dist/src/timeouts.js.map +1 -1
  89. package/dist/src/util/index.d.ts +1 -0
  90. package/dist/src/util/index.d.ts.map +1 -1
  91. package/dist/src/util/index.js +1 -0
  92. package/dist/src/util/index.js.map +1 -1
  93. package/dist/src/util/invitation.js +1 -1
  94. package/dist/src/util/invitation.js.map +1 -1
  95. package/dist/src/util/print.d.ts +14 -2
  96. package/dist/src/util/print.d.ts.map +1 -1
  97. package/dist/src/util/print.js +78 -6
  98. package/dist/src/util/print.js.map +1 -1
  99. package/dist/src/util/provider/digital-ocean.js +11 -7
  100. package/dist/src/util/provider/digital-ocean.js.map +1 -1
  101. package/dist/src/util/random.d.ts +13 -0
  102. package/dist/src/util/random.d.ts.map +1 -0
  103. package/dist/src/util/random.js +27 -0
  104. package/dist/src/util/random.js.map +1 -0
  105. package/dist/src/util/telemetryrc.json +1 -1
  106. package/dist/src/util/util.d.ts +1 -0
  107. package/dist/src/util/util.d.ts.map +1 -1
  108. package/dist/src/util/util.js +23 -6
  109. package/dist/src/util/util.js.map +1 -1
  110. package/oclif.manifest.json +418 -163
  111. package/package.json +21 -21
  112. package/dist/src/commands/halo/index.d.ts.map +0 -1
  113. package/dist/src/commands/halo/index.js.map +0 -1
  114. package/dist/src/commands/space/invite.d.ts.map +0 -1
  115. package/dist/src/commands/space/invite.js +0 -51
  116. package/dist/src/commands/space/invite.js.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxos/cli",
3
- "version": "0.1.55-main.5edf62b",
3
+ "version": "0.1.55-main.6f6b5eb",
4
4
  "description": "DXOS CLI",
5
5
  "keywords": [
6
6
  "dxos",
@@ -47,26 +47,26 @@
47
47
  "tiny-invariant": "^1.3.1",
48
48
  "uuid": "^8.3.2",
49
49
  "ws": "^7.4.4",
50
- "@dxos/agent": "0.1.55-main.5edf62b",
51
- "@dxos/async": "0.1.55-main.5edf62b",
52
- "@dxos/bare-template": "0.1.55-main.5edf62b",
53
- "@dxos/client": "0.1.55-main.5edf62b",
54
- "@dxos/client-protocol": "0.1.55-main.5edf62b",
55
- "@dxos/codec-protobuf": "0.1.55-main.5edf62b",
56
- "@dxos/config": "0.1.55-main.5edf62b",
57
- "@dxos/context": "0.1.55-main.5edf62b",
58
- "@dxos/debug": "0.1.55-main.5edf62b",
59
- "@dxos/functions": "0.1.55-main.5edf62b",
60
- "@dxos/hello-template": "0.1.55-main.5edf62b",
61
- "@dxos/log": "0.1.55-main.5edf62b",
62
- "@dxos/plate": "0.1.55-main.5edf62b",
63
- "@dxos/protocols": "0.1.55-main.5edf62b",
64
- "@dxos/rpc": "0.1.55-main.5edf62b",
65
- "@dxos/sentry": "0.1.55-main.5edf62b",
66
- "@dxos/tasks-template": "0.1.55-main.5edf62b",
67
- "@dxos/telemetry": "0.1.55-main.5edf62b",
68
- "@dxos/util": "0.1.55-main.5edf62b",
69
- "@dxos/websocket-rpc": "0.1.55-main.5edf62b"
50
+ "@dxos/agent": "0.1.55-main.6f6b5eb",
51
+ "@dxos/async": "0.1.55-main.6f6b5eb",
52
+ "@dxos/bare-template": "0.1.55-main.6f6b5eb",
53
+ "@dxos/client": "0.1.55-main.6f6b5eb",
54
+ "@dxos/client-protocol": "0.1.55-main.6f6b5eb",
55
+ "@dxos/codec-protobuf": "0.1.55-main.6f6b5eb",
56
+ "@dxos/config": "0.1.55-main.6f6b5eb",
57
+ "@dxos/context": "0.1.55-main.6f6b5eb",
58
+ "@dxos/debug": "0.1.55-main.6f6b5eb",
59
+ "@dxos/functions": "0.1.55-main.6f6b5eb",
60
+ "@dxos/hello-template": "0.1.55-main.6f6b5eb",
61
+ "@dxos/log": "0.1.55-main.6f6b5eb",
62
+ "@dxos/plate": "0.1.55-main.6f6b5eb",
63
+ "@dxos/protocols": "0.1.55-main.6f6b5eb",
64
+ "@dxos/rpc": "0.1.55-main.6f6b5eb",
65
+ "@dxos/sentry": "0.1.55-main.6f6b5eb",
66
+ "@dxos/tasks-template": "0.1.55-main.6f6b5eb",
67
+ "@dxos/telemetry": "0.1.55-main.6f6b5eb",
68
+ "@dxos/util": "0.1.55-main.6f6b5eb",
69
+ "@dxos/websocket-rpc": "0.1.55-main.6f6b5eb"
70
70
  },
71
71
  "devDependencies": {
72
72
  "@oclif/test": "^2.3.31",
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/commands/halo/index.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD,MAAM,CAAC,OAAO,OAAO,IAAK,SAAQ,WAAW,CAAC,OAAO,IAAI,CAAC;IACxD,OAAgB,cAAc,UAAQ;IACtC,OAAgB,WAAW,SAAwB;IAE7C,GAAG,IAAI,OAAO,CAAC,GAAG,CAAC;CAkB1B"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/commands/halo/index.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;;;AAEF,kDAA0B;AAI1B,qDAAiD;AAEjD,MAAqB,IAAK,SAAQ,0BAAwB;IAIxD,KAAK,CAAC,GAAG;QACP,OAAO,MAAM,IAAI,CAAC,cAAc,CAAC,KAAK,EAAE,MAAc,EAAE,EAAE;YACxD,MAAM,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC;YAC5C,IAAI,CAAC,QAAQ,EAAE;gBACb,oDAAoD;gBACpD,IAAI,CAAC,GAAG,CAAC,IAAA,eAAK,EAAA,iCAAiC,CAAC,CAAC;gBACjD,OAAO,EAAE,CAAC;aACX;iBAAM;gBACL,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,GAAG,QAAQ,CAAC;gBAC1C,IAAI,CAAC,GAAG,CAAC,eAAe,EAAE,WAAW,CAAC,KAAK,EAAE,CAAC,CAAC;gBAC/C,IAAI,CAAC,GAAG,CAAC,eAAe,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,WAAW,CAAC,CAAC;gBAChD,OAAO;oBACL,WAAW,EAAE,WAAW,CAAC,KAAK,EAAE;oBAChC,OAAO;iBACR,CAAC;aACH;QACH,CAAC,CAAC,CAAC;IACL,CAAC;;AApBe,mBAAc,GAAG,IAAI,CAAC;AACtB,gBAAW,GAAG,oBAAoB,CAAC;kBAFhC,IAAI"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"invite.d.ts","sourceRoot":"","sources":["../../../../src/commands/space/invite.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAIjD,MAAM,CAAC,OAAO,OAAO,MAAO,SAAQ,WAAW,CAAC,OAAO,MAAM,CAAC;IAC5D,OAAgB,WAAW,SAA8B;IACzD,OAAgB,IAAI;;MAA4C;IAE1D,GAAG,IAAI,OAAO,CAAC,GAAG,CAAC;CAmC1B"}
@@ -1,51 +0,0 @@
1
- "use strict";
2
- //
3
- // Copyright 2022 DXOS.org
4
- //
5
- var __importDefault = (this && this.__importDefault) || function (mod) {
6
- return (mod && mod.__esModule) ? mod : { "default": mod };
7
- };
8
- Object.defineProperty(exports, "__esModule", { value: true });
9
- const core_1 = require("@oclif/core");
10
- const chalk_1 = __importDefault(require("chalk"));
11
- const async_1 = require("@dxos/async");
12
- const invitations_1 = require("@dxos/client/invitations");
13
- const debug_1 = require("@dxos/debug");
14
- const base_command_1 = require("../../base-command");
15
- const timeouts_1 = require("../../timeouts");
16
- const util_1 = require("../../util");
17
- class Invite extends base_command_1.BaseCommand {
18
- async run() {
19
- let { key } = this.args;
20
- return await this.execWithClient(async (client) => {
21
- const spaces = client.spaces.get();
22
- if (!key) {
23
- key = await (0, util_1.selectSpace)(spaces);
24
- }
25
- const space = spaces.find((space) => space.key.toHex().startsWith(key));
26
- if (!space) {
27
- throw new Error(`Invalid key: ${(0, debug_1.truncateKey)(key)}`);
28
- }
29
- await (0, async_1.asyncTimeout)(space.waitUntilReady(), timeouts_1.SPACE_WAIT_TIMEOUT, (0, timeouts_1.spaceWaitError)());
30
- const observable = space.createInvitation();
31
- const invitationSuccess = (0, util_1.hostInvitation)({
32
- observable,
33
- callbacks: {
34
- onConnecting: async () => {
35
- const invitationCode = invitations_1.InvitationEncoder.encode(observable.get());
36
- this.log((0, chalk_1.default) `\n{blue Invitation}: ${invitationCode}`);
37
- this.log((0, chalk_1.default) `\n{red Secret}: ${observable.get().authCode}\n`);
38
- },
39
- },
40
- });
41
- core_1.ux.action.start('Waiting for peer to connect...');
42
- await invitationSuccess;
43
- core_1.ux.action.stop();
44
- this.log((0, chalk_1.default) `{green Invitation completed.}`);
45
- });
46
- }
47
- }
48
- Invite.description = 'Create space invitation.';
49
- Invite.args = { key: core_1.Args.string({ required: true }) };
50
- exports.default = Invite;
51
- //# sourceMappingURL=invite.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"invite.js","sourceRoot":"","sources":["../../../../src/commands/space/invite.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;;;AAEF,sCAAuC;AACvC,kDAA0B;AAE1B,uCAA2C;AAE3C,0DAA6D;AAC7D,uCA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