@dxos/cli 0.1.55-main.fc12f7c → 0.1.55

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 (175) hide show
  1. package/README.md +312 -115
  2. package/bin/dev +1 -2
  3. package/dist/src/base-command.d.ts +6 -1
  4. package/dist/src/base-command.d.ts.map +1 -1
  5. package/dist/src/base-command.js +29 -15
  6. package/dist/src/base-command.js.map +1 -1
  7. package/dist/src/commands/agent/list.d.ts +19 -1
  8. package/dist/src/commands/agent/list.d.ts.map +1 -1
  9. package/dist/src/commands/agent/list.js +25 -39
  10. package/dist/src/commands/agent/list.js.map +1 -1
  11. package/dist/src/commands/agent/restart.d.ts +1 -0
  12. package/dist/src/commands/agent/restart.d.ts.map +1 -1
  13. package/dist/src/commands/agent/start.d.ts +4 -2
  14. package/dist/src/commands/agent/start.d.ts.map +1 -1
  15. package/dist/src/commands/agent/start.js +18 -10
  16. package/dist/src/commands/agent/start.js.map +1 -1
  17. package/dist/src/commands/agent/stop.d.ts +1 -0
  18. package/dist/src/commands/agent/stop.d.ts.map +1 -1
  19. package/dist/src/commands/app/create.d.ts +1 -0
  20. package/dist/src/commands/app/create.d.ts.map +1 -1
  21. package/dist/src/commands/app/open.d.ts +1 -0
  22. package/dist/src/commands/app/open.d.ts.map +1 -1
  23. package/dist/src/commands/app/publish.d.ts +1 -0
  24. package/dist/src/commands/app/publish.d.ts.map +1 -1
  25. package/dist/src/commands/debug/diagnostics.d.ts +6 -4
  26. package/dist/src/commands/debug/diagnostics.d.ts.map +1 -1
  27. package/dist/src/commands/debug/diagnostics.js +20 -18
  28. package/dist/src/commands/debug/diagnostics.js.map +1 -1
  29. package/dist/src/commands/debug/generate.d.ts +4 -1
  30. package/dist/src/commands/debug/generate.d.ts.map +1 -1
  31. package/dist/src/commands/debug/generate.js +25 -18
  32. package/dist/src/commands/debug/generate.js.map +1 -1
  33. package/dist/src/commands/debug/metrics.d.ts +10 -0
  34. package/dist/src/commands/debug/metrics.d.ts.map +1 -0
  35. package/dist/src/commands/debug/metrics.js +43 -0
  36. package/dist/src/commands/debug/metrics.js.map +1 -0
  37. package/dist/src/commands/{tunnel/set.d.ts → debug/status.d.ts} +4 -5
  38. package/dist/src/commands/debug/status.d.ts.map +1 -0
  39. package/dist/src/commands/debug/status.js +34 -0
  40. package/dist/src/commands/debug/status.js.map +1 -0
  41. package/dist/src/commands/device/list.d.ts +1 -0
  42. package/dist/src/commands/device/list.d.ts.map +1 -1
  43. package/dist/src/commands/function/dev-server.d.ts +1 -0
  44. package/dist/src/commands/function/dev-server.d.ts.map +1 -1
  45. package/dist/src/commands/function/dev-server.js +3 -3
  46. package/dist/src/commands/function/dev-server.js.map +1 -1
  47. package/dist/src/commands/halo/credential/list.d.ts +1 -0
  48. package/dist/src/commands/halo/credential/list.d.ts.map +1 -1
  49. package/dist/src/commands/halo/{info.d.ts → identity.d.ts} +2 -2
  50. package/dist/src/commands/halo/identity.d.ts.map +1 -0
  51. package/dist/src/commands/halo/{info.js → identity.js} +5 -5
  52. package/dist/src/commands/halo/identity.js.map +1 -0
  53. package/dist/src/commands/halo/join.d.ts +1 -0
  54. package/dist/src/commands/halo/join.d.ts.map +1 -1
  55. package/dist/src/commands/halo/share.d.ts +1 -0
  56. package/dist/src/commands/halo/share.d.ts.map +1 -1
  57. package/dist/src/commands/kube/deploy.d.ts +1 -0
  58. package/dist/src/commands/kube/deploy.d.ts.map +1 -1
  59. package/dist/src/commands/kube/deploy.js +1 -1
  60. package/dist/src/commands/kube/deploy.js.map +1 -1
  61. package/dist/src/commands/reset/index.d.ts +1 -0
  62. package/dist/src/commands/reset/index.d.ts.map +1 -1
  63. package/dist/src/commands/reset/index.js +4 -5
  64. package/dist/src/commands/reset/index.js.map +1 -1
  65. package/dist/src/commands/space/close.d.ts +9 -0
  66. package/dist/src/commands/space/close.d.ts.map +1 -0
  67. package/dist/src/commands/space/close.js +21 -0
  68. package/dist/src/commands/space/close.js.map +1 -0
  69. package/dist/src/commands/space/create.js +1 -1
  70. package/dist/src/commands/space/create.js.map +1 -1
  71. package/dist/src/commands/space/info.d.ts +10 -0
  72. package/dist/src/commands/space/info.d.ts.map +1 -0
  73. package/dist/src/commands/space/info.js +29 -0
  74. package/dist/src/commands/space/info.js.map +1 -0
  75. package/dist/src/commands/space/join.d.ts +1 -0
  76. package/dist/src/commands/space/join.d.ts.map +1 -1
  77. package/dist/src/commands/space/list.d.ts +2 -1
  78. package/dist/src/commands/space/list.d.ts.map +1 -1
  79. package/dist/src/commands/space/list.js +22 -22
  80. package/dist/src/commands/space/list.js.map +1 -1
  81. package/dist/src/commands/space/members.d.ts +1 -0
  82. package/dist/src/commands/space/members.d.ts.map +1 -1
  83. package/dist/src/commands/space/open.d.ts +9 -0
  84. package/dist/src/commands/space/open.d.ts.map +1 -0
  85. package/dist/src/commands/space/open.js +20 -0
  86. package/dist/src/commands/space/open.js.map +1 -0
  87. package/dist/src/commands/space/share.d.ts +1 -0
  88. package/dist/src/commands/space/share.d.ts.map +1 -1
  89. package/dist/src/commands/tunnel/index.d.ts +21 -0
  90. package/dist/src/commands/tunnel/index.d.ts.map +1 -0
  91. package/dist/src/commands/tunnel/index.js +41 -0
  92. package/dist/src/commands/tunnel/index.js.map +1 -0
  93. package/dist/src/components/App.d.ts +10 -0
  94. package/dist/src/components/App.d.ts.map +1 -0
  95. package/dist/src/components/App.js +38 -0
  96. package/dist/src/components/App.js.map +1 -0
  97. package/dist/src/components/SpaceTable.d.ts +10 -0
  98. package/dist/src/components/SpaceTable.d.ts.map +1 -0
  99. package/dist/src/components/SpaceTable.js +60 -0
  100. package/dist/src/components/SpaceTable.js.map +1 -0
  101. package/dist/src/components/SystemTable.d.ts +8 -0
  102. package/dist/src/components/SystemTable.d.ts.map +1 -0
  103. package/dist/src/components/SystemTable.js +87 -0
  104. package/dist/src/components/SystemTable.js.map +1 -0
  105. package/dist/src/components/index.d.ts +4 -0
  106. package/dist/src/components/index.d.ts.map +1 -0
  107. package/dist/src/components/index.js +23 -0
  108. package/dist/src/components/index.js.map +1 -0
  109. package/dist/src/errors.d.ts +1 -1
  110. package/dist/src/errors.d.ts.map +1 -1
  111. package/dist/src/errors.js +2 -2
  112. package/dist/src/errors.js.map +1 -1
  113. package/dist/src/help.d.ts.map +1 -1
  114. package/dist/src/help.js +9 -1
  115. package/dist/src/help.js.map +1 -1
  116. package/dist/src/timeouts.d.ts +1 -1
  117. package/dist/src/timeouts.d.ts.map +1 -1
  118. package/dist/src/timeouts.js +2 -1
  119. package/dist/src/timeouts.js.map +1 -1
  120. package/dist/src/util/agents.d.ts +3 -0
  121. package/dist/src/util/agents.d.ts.map +1 -0
  122. package/dist/src/util/agents.js +44 -0
  123. package/dist/src/util/agents.js.map +1 -0
  124. package/dist/src/util/credentials.d.ts +11 -0
  125. package/dist/src/util/credentials.d.ts.map +1 -0
  126. package/dist/src/util/credentials.js +63 -0
  127. package/dist/src/util/credentials.js.map +1 -0
  128. package/dist/src/util/devices.d.ts +7 -0
  129. package/dist/src/util/devices.d.ts.map +1 -0
  130. package/dist/src/util/devices.js +29 -0
  131. package/dist/src/util/devices.js.map +1 -0
  132. package/dist/src/util/index.d.ts +7 -5
  133. package/dist/src/util/index.d.ts.map +1 -1
  134. package/dist/src/util/index.js +7 -5
  135. package/dist/src/util/index.js.map +1 -1
  136. package/dist/src/util/{invitation.d.ts → invitations.d.ts} +1 -1
  137. package/dist/src/util/invitations.d.ts.map +1 -0
  138. package/dist/src/util/{invitation.js → invitations.js} +1 -1
  139. package/dist/src/util/invitations.js.map +1 -0
  140. package/dist/src/util/{print.d.ts → spaces.d.ts} +4 -16
  141. package/dist/src/util/spaces.d.ts.map +1 -0
  142. package/dist/src/util/{print.js → spaces.js} +50 -64
  143. package/dist/src/util/spaces.js.map +1 -0
  144. package/dist/src/util/telemetry.d.ts +3 -3
  145. package/dist/src/util/telemetry.d.ts.map +1 -1
  146. package/dist/src/util/telemetryrc.json +4 -4
  147. package/dist/src/util/{test-util.d.ts → testing.d.ts} +1 -1
  148. package/dist/src/util/testing.d.ts.map +1 -0
  149. package/dist/src/util/{test-util.js → testing.js} +1 -1
  150. package/dist/src/util/testing.js.map +1 -0
  151. package/dist/src/util/types.d.ts +4 -0
  152. package/dist/src/util/types.d.ts.map +1 -0
  153. package/dist/src/util/types.js +20 -0
  154. package/dist/src/util/types.js.map +1 -0
  155. package/oclif.manifest.json +883 -168
  156. package/package.json +22 -19
  157. package/dist/src/commands/halo/info.d.ts.map +0 -1
  158. package/dist/src/commands/halo/info.js.map +0 -1
  159. package/dist/src/commands/tunnel/set.d.ts.map +0 -1
  160. package/dist/src/commands/tunnel/set.js +0 -42
  161. package/dist/src/commands/tunnel/set.js.map +0 -1
  162. package/dist/src/util/credential.d.ts +0 -4
  163. package/dist/src/util/credential.d.ts.map +0 -1
  164. package/dist/src/util/credential.js +0 -33
  165. package/dist/src/util/credential.js.map +0 -1
  166. package/dist/src/util/invitation.d.ts.map +0 -1
  167. package/dist/src/util/invitation.js.map +0 -1
  168. package/dist/src/util/print.d.ts.map +0 -1
  169. package/dist/src/util/print.js.map +0 -1
  170. package/dist/src/util/test-util.d.ts.map +0 -1
  171. package/dist/src/util/test-util.js.map +0 -1
  172. package/dist/src/util/util.d.ts +0 -7
  173. package/dist/src/util/util.d.ts.map +0 -1
  174. package/dist/src/util/util.js +0 -60
  175. package/dist/src/util/util.js.map +0 -1
@@ -1,42 +1,57 @@
1
1
  "use strict";
2
2
  //
3
- // Copyright 2023 DXOS.org
3
+ // Copyright 2022 DXOS.org
4
4
  //
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.printCredentials = exports.mapCredentials = exports.printMembers = exports.mapMembers = exports.printSpaces = exports.mapSpaces = exports.printDevices = exports.mapDevices = void 0;
6
+ exports.printMembers = exports.mapMembers = exports.printSpaces = exports.mapSpaces = exports.waitForSpace = exports.selectSpace = void 0;
7
7
  const core_1 = require("@oclif/core");
8
+ const async_1 = require("@dxos/async");
8
9
  const echo_1 = require("@dxos/client/echo");
9
- const util_1 = require("./util");
10
- //
11
- // Devices
12
- //
13
- const mapDevices = (devices, truncateKeys = false) => {
14
- return devices.map((device) => ({
15
- key: (0, util_1.maybeTruncateKey)(device.deviceKey, truncateKeys),
16
- kind: device.kind,
17
- }));
10
+ const debug_1 = require("@dxos/debug");
11
+ const errors_1 = require("../errors");
12
+ const timeouts_1 = require("../timeouts");
13
+ const types_1 = require("./types");
14
+ const selectSpace = async (spaces) => {
15
+ // eslint-disable-next-line no-eval
16
+ const inquirer = (await eval('import("inquirer")')).default;
17
+ const { key } = await inquirer.prompt([
18
+ {
19
+ name: 'key',
20
+ type: 'list',
21
+ message: 'Select a space:',
22
+ choices: spaces.map((space) => {
23
+ var _a;
24
+ return ({
25
+ name: `[${(0, debug_1.truncateKey)(space.key)}] ${(_a = space.properties.name) !== null && _a !== void 0 ? _a : ''}`,
26
+ value: space.key,
27
+ });
28
+ }),
29
+ },
30
+ ]);
31
+ return key;
18
32
  };
19
- exports.mapDevices = mapDevices;
20
- const printDevices = (devices, flags = {}) => {
21
- core_1.ux.table((0, exports.mapDevices)(devices, true), {
22
- key: {
23
- header: 'key',
24
- },
25
- kind: {
26
- header: 'kind',
27
- },
28
- }, {
29
- ...flags,
30
- });
33
+ exports.selectSpace = selectSpace;
34
+ const waitForSpace = async (space, timeout = timeouts_1.SPACE_WAIT_TIMEOUT, exceptionHandler) => {
35
+ try {
36
+ await (0, async_1.asyncTimeout)(space.waitUntilReady(), timeout, new errors_1.SpaceWaitTimeoutError(timeout));
37
+ }
38
+ catch (err) {
39
+ if (exceptionHandler) {
40
+ exceptionHandler(err);
41
+ }
42
+ else {
43
+ throw err;
44
+ }
45
+ }
31
46
  };
32
- exports.printDevices = printDevices;
47
+ exports.waitForSpace = waitForSpace;
33
48
  const mapSpaces = (spaces, options = { verbose: false, truncateKeys: false }) => {
34
49
  return spaces.map((space) => {
35
50
  var _a, _b, _c, _d, _e, _f, _g, _h;
36
51
  // TODO(burdon): Factor out.
37
52
  // TODO(burdon): Agent needs to restart before `ready` is available.
38
53
  const { open, ready } = (_a = space.internal.data.metrics) !== null && _a !== void 0 ? _a : {};
39
- const startup = open && ready && new Date(ready).getTime() - new Date(open).getTime();
54
+ const startup = open && ready && ready.getTime() - open.getTime();
40
55
  // TODO(burdon): Get feeds from client-services if verbose (factor out from devtools/diagnostics).
41
56
  // const host = client.services.services.DevtoolsHost!;
42
57
  const pipeline = space.internal.data.pipeline;
@@ -46,7 +61,7 @@ const mapSpaces = (spaces, options = { verbose: false, truncateKeys: false }) =>
46
61
  const currentDataMutations = (_f = (_e = pipeline === null || pipeline === void 0 ? void 0 : pipeline.currentDataTimeframe) === null || _e === void 0 ? void 0 : _e.totalMessages()) !== null && _f !== void 0 ? _f : 0;
47
62
  const totalDataMutations = (_h = (_g = pipeline === null || pipeline === void 0 ? void 0 : pipeline.targetDataTimeframe) === null || _g === void 0 ? void 0 : _g.totalMessages()) !== null && _h !== void 0 ? _h : 0;
48
63
  return {
49
- key: (0, util_1.maybeTruncateKey)(space.key, options.truncateKeys),
64
+ key: (0, types_1.maybeTruncateKey)(space.key, options.truncateKeys),
50
65
  open: space.isOpen,
51
66
  name: space.properties.name,
52
67
  members: space.members.get().length,
@@ -57,7 +72,7 @@ const mapSpaces = (spaces, options = { verbose: false, truncateKeys: false }) =>
57
72
  startDataMutations,
58
73
  currentDataMutations,
59
74
  totalDataMutations,
60
- // TODO(burdon): Negative.
75
+ // TODO(burdon): Negative?
61
76
  progress: (Math.min(Math.abs((currentDataMutations - startDataMutations) / (totalDataMutations - startDataMutations)), 1) *
62
77
  100).toFixed(0),
63
78
  };
@@ -71,6 +86,7 @@ const printSpaces = (spaces, flags = {}) => {
71
86
  },
72
87
  open: {
73
88
  header: 'open',
89
+ minWidth: 6,
74
90
  },
75
91
  name: {
76
92
  header: 'name',
@@ -81,16 +97,16 @@ const printSpaces = (spaces, flags = {}) => {
81
97
  objects: {
82
98
  header: 'objects',
83
99
  },
84
- startup: {
85
- header: 'startup',
86
- extended: true,
87
- },
88
100
  epoch: {
89
101
  header: 'epoch',
90
102
  },
91
103
  // appliedEpoch: {
92
104
  // header: 'Applied Epoch',
93
105
  // },
106
+ startup: {
107
+ header: 'startup',
108
+ extended: true,
109
+ },
94
110
  startDataMutations: {
95
111
  header: 'stashed',
96
112
  extended: true,
@@ -105,6 +121,7 @@ const printSpaces = (spaces, flags = {}) => {
105
121
  },
106
122
  progress: {
107
123
  header: 'progress',
124
+ extended: true,
108
125
  // TODO(burdon): Use `ink` to render progress bar (separate from list commands).
109
126
  // get: (spaceInfo) => {
110
127
  // let progressValue = +spaceInfo.progress;
@@ -130,7 +147,7 @@ const mapMembers = (members, truncateKeys = false) => {
130
147
  return members.map((member) => {
131
148
  var _a;
132
149
  return ({
133
- key: (0, util_1.maybeTruncateKey)(member.identity.identityKey, truncateKeys),
150
+ key: (0, types_1.maybeTruncateKey)(member.identity.identityKey, truncateKeys),
134
151
  name: (_a = member.identity.profile) === null || _a === void 0 ? void 0 : _a.displayName,
135
152
  presence: member.presence === echo_1.SpaceMember.PresenceState.ONLINE ? 'Online' : 'Offline',
136
153
  });
@@ -153,35 +170,4 @@ const printMembers = (members, flags = {}) => {
153
170
  });
154
171
  };
155
172
  exports.printMembers = printMembers;
156
- //
157
- // Credentials
158
- //
159
- const mapCredentials = (credentials, truncateKeys = false) => {
160
- return credentials.map((credential) => ({
161
- id: (0, util_1.maybeTruncateKey)(credential.id, truncateKeys),
162
- issuer: (0, util_1.maybeTruncateKey)(credential.issuer, truncateKeys),
163
- subject: (0, util_1.maybeTruncateKey)(credential.subject.id, truncateKeys),
164
- type: credential.subject.assertion['@type'],
165
- }));
166
- };
167
- exports.mapCredentials = mapCredentials;
168
- const printCredentials = (credentials, flags = {}) => {
169
- core_1.ux.table((0, exports.mapCredentials)(credentials, true), {
170
- id: {
171
- header: 'id',
172
- },
173
- issuer: {
174
- header: 'issuer',
175
- },
176
- subject: {
177
- header: 'subject',
178
- },
179
- type: {
180
- header: 'type',
181
- },
182
- }, {
183
- ...flags,
184
- });
185
- };
186
- exports.printCredentials = printCredentials;
187
- //# sourceMappingURL=print.js.map
173
+ //# sourceMappingURL=spaces.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spaces.js","sourceRoot":"","sources":["../../../src/util/spaces.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;AAEF,sCAAiC;AAGjC,uCAA2C;AAC3C,4CAAuD;AACvD,uCAA0C;AAE1C,sCAAkD;AAClD,0CAAiD;AACjD,mCAA2C;AAEpC,MAAM,WAAW,GAAG,KAAK,EAAE,MAAe,EAAE,EAAE;IACnD,mCAAmC;IACnC,MAAM,QAAQ,GAAG,CAAC,MAAM,IAAI,CAAC,oBAAoB,CAAC,CAAC,CAAC,OAAO,CAAC;IAC5D,MAAM,EAAE,GAAG,EAAE,GAAG,MAAM,QAAQ,CAAC,MAAM,CAAC;QACpC;YACE,IAAI,EAAE,KAAK;YACX,IAAI,EAAE,MAAM;YACZ,OAAO,EAAE,iBAAiB;YAC1B,OAAO,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;;gBAAC,OAAA,CAAC;oBAC9B,IAAI,EAAE,IAAI,IAAA,mBAAW,EAAC,KAAK,CAAC,GAAG,CAAC,KAAK,MAAA,KAAK,CAAC,UAAU,CAAC,IAAI,mCAAI,EAAE,EAAE;oBAClE,KAAK,EAAE,KAAK,CAAC,GAAG;iBACjB,CAAC,CAAA;aAAA,CAAC;SACJ;KACF,CAAC,CAAC;IAEH,OAAO,GAAG,CAAC;AACb,CAAC,CAAC;AAhBW,QAAA,WAAW,eAgBtB;AAEK,MAAM,YAAY,GAAG,KAAK,EAC/B,KAAY,EACZ,OAAO,GAAG,6BAAkB,EAC5B,gBAAuC,EACvC,EAAE;IACF,IAAI;QACF,MAAM,IAAA,oBAAY,EAAC,KAAK,CAAC,cAAc,EAAE,EAAE,OAAO,EAAE,IAAI,8BAAqB,CAAC,O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AA,UAAU,cAMrB;AAEK,MAAM,YAAY,GAAG,CAAC,OAAsB,EAAE,KAAK,GAAG,EAAE,EAAE,EAAE;IACjE,SAAE,CAAC,KAAK,CACN,IAAA,kBAAU,EAAC,OAAO,EAAE,IAAI,CAAC,EACzB;QACE,GAAG,EAAE;YACH,MAAM,EAAE,cAAc;SACvB;QACD,IAAI,EAAE;YACJ,MAAM,EAAE,cAAc;SACvB;QACD,QAAQ,EAAE;YACR,MAAM,EAAE,UAAU;SACnB;KACF,EACD;QACE,GAAG,KAAK;KACT,CACF,CAAC;AACJ,CAAC,CAAC;AAlBW,QAAA,YAAY,gBAkBvB"}
@@ -1,7 +1,7 @@
1
1
  export declare const DX_ENVIRONMENT: string;
2
- export declare const DX_RELEASE: string;
3
- export declare const SENTRY_DESTINATION: string;
4
- export declare const TELEMETRY_API_KEY: string;
2
+ export declare const DX_RELEASE: undefined;
3
+ export declare const SENTRY_DESTINATION: undefined;
4
+ export declare const TELEMETRY_API_KEY: undefined;
5
5
  export declare const IPDATA_API_KEY: string;
6
6
  export declare const DX_DISABLE_TELEMETRY: string | undefined;
7
7
  export type TelemetryContext = {
@@ -1 +1 @@
1
- {"version":3,"file":"telemetry.d.ts","sourceRoot":"","sources":["../../../src/util/telemetry.ts"],"names":[],"mappings":"AAiBA,eAAO,MAAM,cAAc,QAAqC,CAAC;AACjE,eAAO,MAAM,UAAU,QAAiC,CAAC;AACzD,eAAO,MAAM,kBAAkB,QAAyC,CAAC;AACzE,eAAO,MAAM,iBAAiB,QAAwC,CAAC;AACvE,eAAO,MAAM,cAAc,QAAqC,CAAC;AAGjE,eAAO,MAAM,oBAAoB,oBAAgD,CAAC;AAElF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,IAAI,EAAE,UAAU,GAAG,OAAO,GAAG,MAAM,CAAC;IACpC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB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BAiBvD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,mBAAmB,cAAqB,MAAM,kBAY1D,CAAC;AAEF,eAAO,MAAM,mBAAmB,cAAqB,MAAM,KAAG,QAAQ,gBAAgB,CAcrF,CAAC"}
@@ -1,7 +1,7 @@
1
1
  {
2
- "DX_ENVIRONMENT": "staging",
3
- "DX_RELEASE": "@dxos/cli@0.1.55-main.fc12f7c",
4
- "SENTRY_DESTINATION": "https://2647916221e643869965e78469479aa4@o4504012000067584.ingest.sentry.io/4504012027265029",
5
- "TELEMETRY_API_KEY": "B00QG6PtJJrJ0VVFe0H5a6bcUUShKyZM",
2
+ "DX_ENVIRONMENT": "circleci",
3
+ "DX_RELEASE": null,
4
+ "SENTRY_DESTINATION": null,
5
+ "TELEMETRY_API_KEY": null,
6
6
  "IPDATA_API_KEY": "ccc5f0cd66dd34a7c31c2ddc61c2bbca2db73892a993982bb3a5f0e2"
7
7
  }
@@ -1,3 +1,3 @@
1
1
  export declare const BIN_PATH: string;
2
2
  export declare const runCommand: (command: string, cwd: string) => Promise<string>;
3
- //# sourceMappingURL=test-util.d.ts.map
3
+ //# sourceMappingURL=testing.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"testing.d.ts","sourceRoot":"","sources":["../../../src/util/testing.ts"],"names":[],"mappings":"AAaA,eAAO,MAAM,QAAQ,QAAiF,CAAC;AAEvG,eAAO,MAAM,UAAU,YAAmB,MAAM,OAAO,MAAM,oBAQ5D,CAAC"}
@@ -25,4 +25,4 @@ const runCommand = async (command, cwd) => {
25
25
  return stdout;
26
26
  };
27
27
  exports.runCommand = runCommand;
28
- //# sourceMappingURL=test-util.js.map
28
+ //# sourceMappingURL=testing.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"testing.js","sourceRoot":"","sources":["../../../src/util/testing.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;;;;;AAEF,2DAA0C;AAC1C,qCAAoC;AACpC,yCAA0C;AAC1C,yCAAsC;AACtC,oDAA2B;AAE3B,uCAA2C;AAC3C,uCAA4C;AAE/B,QAAA,QAAQ,GAAG,IAAA,gBAAI,EAAC,IAAA,mBAAO,EAAC,MAAA,gBAAK,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,SAAS,EAAE,CAAC,mCAAI,IAAA,qBAAa,GAAE,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;AAEhG,MAAM,UAAU,GAAG,KAAK,EAAE,OAAe,EAAE,GAAW,EAAE,EAAE;IAC/D,IAAA,mBAAS,EAAC,GAAG,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IACpC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,IAAA,oBAAY,EAAC,IAAA,qBAAS,EAAC,yBAAI,CAAC,CAAC,GAAG,gBAAQ,IAAI,OAAO,EAAE,EAAE,EAAE,GAAG,EAAE,SAAS,EAAE,CAAC,EAAE,KAAM,CAAC,CAAC;IACrH,IAAI,MAAM,EAAE;QACV,MAAM,IAAI,KAAK,CAAC,MAAM,CAAC,CAAC;KACzB;IAED,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AARW,QAAA,UAAU,cAQrB"}
@@ -0,0 +1,4 @@
1
+ import { PublicKey } from '@dxos/keys';
2
+ export declare const maybeTruncateKey: (key: PublicKey, truncate?: boolean) => string;
3
+ export declare const safeParseInt: (value: string | undefined, defaultValue?: number) => number | undefined;
4
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/util/types.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAEvC,eAAO,MAAM,gBAAgB,QAAS,SAAS,+BAAkE,CAAC;AAElH,eAAO,MAAM,YAAY,UAAW,MAAM,GAAG,SAAS,iBAAiB,MAAM,KAAG,MAAM,GAAG,SAOxF,CAAC"}
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ //
3
+ // Copyright 2023 DXOS.org
4
+ //
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.safeParseInt = exports.maybeTruncateKey = void 0;
7
+ const debug_1 = require("@dxos/debug");
8
+ const maybeTruncateKey = (key, truncate = false) => (truncate ? (0, debug_1.truncateKey)(key) : key.toHex());
9
+ exports.maybeTruncateKey = maybeTruncateKey;
10
+ const safeParseInt = (value, defaultValue) => {
11
+ try {
12
+ const n = parseInt(value !== null && value !== void 0 ? value : '');
13
+ return isNaN(n) ? defaultValue : n;
14
+ }
15
+ catch (err) {
16
+ return defaultValue;
17
+ }
18
+ };
19
+ exports.safeParseInt = safeParseInt;
20
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/util/types.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;AAEF,uCAA0C;AAGnC,MAAM,gBAAgB,GAAG,CAAC,GAAc,EAAE,QAAQ,GAAG,KAAK,EAAE,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAA,mBAAW,EAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC,CAAC;AAArG,QAAA,gBAAgB,oBAAqF;AAE3G,MAAM,YAAY,GAAG,CAAC,KAAyB,EAAE,YAAqB,EAAsB,EAAE;IACnG,IAAI;QACF,MAAM,CAAC,GAAG,QAAQ,CAAC,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,EAAE,CAAC,CAAC;QAChC,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;KACpC;IAAC,OAAO,GAAG,EAAE;QACZ,OAAO,YAAY,CAAC;KACrB;AACH,CAAC,CAAC;AAPW,QAAA,YAAY,gBAOvB"}