@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.
- package/README.md +312 -115
- package/bin/dev +1 -2
- package/dist/src/base-command.d.ts +6 -1
- package/dist/src/base-command.d.ts.map +1 -1
- package/dist/src/base-command.js +29 -15
- package/dist/src/base-command.js.map +1 -1
- package/dist/src/commands/agent/list.d.ts +19 -1
- package/dist/src/commands/agent/list.d.ts.map +1 -1
- package/dist/src/commands/agent/list.js +25 -39
- package/dist/src/commands/agent/list.js.map +1 -1
- package/dist/src/commands/agent/restart.d.ts +1 -0
- package/dist/src/commands/agent/restart.d.ts.map +1 -1
- package/dist/src/commands/agent/start.d.ts +4 -2
- package/dist/src/commands/agent/start.d.ts.map +1 -1
- package/dist/src/commands/agent/start.js +18 -10
- package/dist/src/commands/agent/start.js.map +1 -1
- package/dist/src/commands/agent/stop.d.ts +1 -0
- package/dist/src/commands/agent/stop.d.ts.map +1 -1
- package/dist/src/commands/app/create.d.ts +1 -0
- package/dist/src/commands/app/create.d.ts.map +1 -1
- package/dist/src/commands/app/open.d.ts +1 -0
- package/dist/src/commands/app/open.d.ts.map +1 -1
- package/dist/src/commands/app/publish.d.ts +1 -0
- package/dist/src/commands/app/publish.d.ts.map +1 -1
- package/dist/src/commands/debug/diagnostics.d.ts +6 -4
- package/dist/src/commands/debug/diagnostics.d.ts.map +1 -1
- package/dist/src/commands/debug/diagnostics.js +20 -18
- package/dist/src/commands/debug/diagnostics.js.map +1 -1
- package/dist/src/commands/debug/generate.d.ts +4 -1
- package/dist/src/commands/debug/generate.d.ts.map +1 -1
- package/dist/src/commands/debug/generate.js +25 -18
- package/dist/src/commands/debug/generate.js.map +1 -1
- package/dist/src/commands/debug/metrics.d.ts +10 -0
- package/dist/src/commands/debug/metrics.d.ts.map +1 -0
- package/dist/src/commands/debug/metrics.js +43 -0
- package/dist/src/commands/debug/metrics.js.map +1 -0
- package/dist/src/commands/{tunnel/set.d.ts → debug/status.d.ts} +4 -5
- package/dist/src/commands/debug/status.d.ts.map +1 -0
- package/dist/src/commands/debug/status.js +34 -0
- package/dist/src/commands/debug/status.js.map +1 -0
- package/dist/src/commands/device/list.d.ts +1 -0
- package/dist/src/commands/device/list.d.ts.map +1 -1
- package/dist/src/commands/function/dev-server.d.ts +1 -0
- package/dist/src/commands/function/dev-server.d.ts.map +1 -1
- package/dist/src/commands/function/dev-server.js +3 -3
- package/dist/src/commands/function/dev-server.js.map +1 -1
- package/dist/src/commands/halo/credential/list.d.ts +1 -0
- package/dist/src/commands/halo/credential/list.d.ts.map +1 -1
- package/dist/src/commands/halo/{info.d.ts → identity.d.ts} +2 -2
- package/dist/src/commands/halo/identity.d.ts.map +1 -0
- package/dist/src/commands/halo/{info.js → identity.js} +5 -5
- package/dist/src/commands/halo/identity.js.map +1 -0
- package/dist/src/commands/halo/join.d.ts +1 -0
- package/dist/src/commands/halo/join.d.ts.map +1 -1
- package/dist/src/commands/halo/share.d.ts +1 -0
- package/dist/src/commands/halo/share.d.ts.map +1 -1
- package/dist/src/commands/kube/deploy.d.ts +1 -0
- package/dist/src/commands/kube/deploy.d.ts.map +1 -1
- package/dist/src/commands/kube/deploy.js +1 -1
- package/dist/src/commands/kube/deploy.js.map +1 -1
- package/dist/src/commands/reset/index.d.ts +1 -0
- package/dist/src/commands/reset/index.d.ts.map +1 -1
- package/dist/src/commands/reset/index.js +4 -5
- package/dist/src/commands/reset/index.js.map +1 -1
- package/dist/src/commands/space/close.d.ts +9 -0
- package/dist/src/commands/space/close.d.ts.map +1 -0
- package/dist/src/commands/space/close.js +21 -0
- package/dist/src/commands/space/close.js.map +1 -0
- package/dist/src/commands/space/create.js +1 -1
- package/dist/src/commands/space/create.js.map +1 -1
- package/dist/src/commands/space/info.d.ts +10 -0
- package/dist/src/commands/space/info.d.ts.map +1 -0
- package/dist/src/commands/space/info.js +29 -0
- package/dist/src/commands/space/info.js.map +1 -0
- package/dist/src/commands/space/join.d.ts +1 -0
- package/dist/src/commands/space/join.d.ts.map +1 -1
- package/dist/src/commands/space/list.d.ts +2 -1
- package/dist/src/commands/space/list.d.ts.map +1 -1
- package/dist/src/commands/space/list.js +22 -22
- package/dist/src/commands/space/list.js.map +1 -1
- package/dist/src/commands/space/members.d.ts +1 -0
- package/dist/src/commands/space/members.d.ts.map +1 -1
- package/dist/src/commands/space/open.d.ts +9 -0
- package/dist/src/commands/space/open.d.ts.map +1 -0
- package/dist/src/commands/space/open.js +20 -0
- package/dist/src/commands/space/open.js.map +1 -0
- package/dist/src/commands/space/share.d.ts +1 -0
- package/dist/src/commands/space/share.d.ts.map +1 -1
- package/dist/src/commands/tunnel/index.d.ts +21 -0
- package/dist/src/commands/tunnel/index.d.ts.map +1 -0
- package/dist/src/commands/tunnel/index.js +41 -0
- package/dist/src/commands/tunnel/index.js.map +1 -0
- package/dist/src/components/App.d.ts +10 -0
- package/dist/src/components/App.d.ts.map +1 -0
- package/dist/src/components/App.js +38 -0
- package/dist/src/components/App.js.map +1 -0
- package/dist/src/components/SpaceTable.d.ts +10 -0
- package/dist/src/components/SpaceTable.d.ts.map +1 -0
- package/dist/src/components/SpaceTable.js +60 -0
- package/dist/src/components/SpaceTable.js.map +1 -0
- package/dist/src/components/SystemTable.d.ts +8 -0
- package/dist/src/components/SystemTable.d.ts.map +1 -0
- package/dist/src/components/SystemTable.js +87 -0
- package/dist/src/components/SystemTable.js.map +1 -0
- package/dist/src/components/index.d.ts +4 -0
- package/dist/src/components/index.d.ts.map +1 -0
- package/dist/src/components/index.js +23 -0
- package/dist/src/components/index.js.map +1 -0
- package/dist/src/errors.d.ts +1 -1
- package/dist/src/errors.d.ts.map +1 -1
- package/dist/src/errors.js +2 -2
- package/dist/src/errors.js.map +1 -1
- package/dist/src/help.d.ts.map +1 -1
- package/dist/src/help.js +9 -1
- package/dist/src/help.js.map +1 -1
- package/dist/src/timeouts.d.ts +1 -1
- package/dist/src/timeouts.d.ts.map +1 -1
- package/dist/src/timeouts.js +2 -1
- package/dist/src/timeouts.js.map +1 -1
- package/dist/src/util/agents.d.ts +3 -0
- package/dist/src/util/agents.d.ts.map +1 -0
- package/dist/src/util/agents.js +44 -0
- package/dist/src/util/agents.js.map +1 -0
- package/dist/src/util/credentials.d.ts +11 -0
- package/dist/src/util/credentials.d.ts.map +1 -0
- package/dist/src/util/credentials.js +63 -0
- package/dist/src/util/credentials.js.map +1 -0
- package/dist/src/util/devices.d.ts +7 -0
- package/dist/src/util/devices.d.ts.map +1 -0
- package/dist/src/util/devices.js +29 -0
- package/dist/src/util/devices.js.map +1 -0
- package/dist/src/util/index.d.ts +7 -5
- package/dist/src/util/index.d.ts.map +1 -1
- package/dist/src/util/index.js +7 -5
- package/dist/src/util/index.js.map +1 -1
- package/dist/src/util/{invitation.d.ts → invitations.d.ts} +1 -1
- package/dist/src/util/invitations.d.ts.map +1 -0
- package/dist/src/util/{invitation.js → invitations.js} +1 -1
- package/dist/src/util/invitations.js.map +1 -0
- package/dist/src/util/{print.d.ts → spaces.d.ts} +4 -16
- package/dist/src/util/spaces.d.ts.map +1 -0
- package/dist/src/util/{print.js → spaces.js} +50 -64
- package/dist/src/util/spaces.js.map +1 -0
- package/dist/src/util/telemetry.d.ts +3 -3
- package/dist/src/util/telemetry.d.ts.map +1 -1
- package/dist/src/util/telemetryrc.json +4 -4
- package/dist/src/util/{test-util.d.ts → testing.d.ts} +1 -1
- package/dist/src/util/testing.d.ts.map +1 -0
- package/dist/src/util/{test-util.js → testing.js} +1 -1
- package/dist/src/util/testing.js.map +1 -0
- package/dist/src/util/types.d.ts +4 -0
- package/dist/src/util/types.d.ts.map +1 -0
- package/dist/src/util/types.js +20 -0
- package/dist/src/util/types.js.map +1 -0
- package/oclif.manifest.json +883 -168
- package/package.json +22 -19
- package/dist/src/commands/halo/info.d.ts.map +0 -1
- package/dist/src/commands/halo/info.js.map +0 -1
- package/dist/src/commands/tunnel/set.d.ts.map +0 -1
- package/dist/src/commands/tunnel/set.js +0 -42
- package/dist/src/commands/tunnel/set.js.map +0 -1
- package/dist/src/util/credential.d.ts +0 -4
- package/dist/src/util/credential.d.ts.map +0 -1
- package/dist/src/util/credential.js +0 -33
- package/dist/src/util/credential.js.map +0 -1
- package/dist/src/util/invitation.d.ts.map +0 -1
- package/dist/src/util/invitation.js.map +0 -1
- package/dist/src/util/print.d.ts.map +0 -1
- package/dist/src/util/print.js.map +0 -1
- package/dist/src/util/test-util.d.ts.map +0 -1
- package/dist/src/util/test-util.js.map +0 -1
- package/dist/src/util/util.d.ts +0 -7
- package/dist/src/util/util.d.ts.map +0 -1
- package/dist/src/util/util.js +0 -60
- package/dist/src/util/util.js.map +0 -1
|
@@ -1,42 +1,57 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
//
|
|
3
|
-
// Copyright
|
|
3
|
+
// Copyright 2022 DXOS.org
|
|
4
4
|
//
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
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
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
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.
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
|
|
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.
|
|
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 &&
|
|
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,
|
|
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,
|
|
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,mB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AAE,YAAY,GAAG,KAAK,EAAE,EAAE;IACzE,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE;;QAAC,OAAA,CAAC;YAC9B,GAAG,EAAE,IAAA,wBAAgB,EAAC,MAAM,CAAC,QAAQ,CAAC,WAAW,EAAE,YAAY,CAAC;YAChE,IAAI,EAAE,MAAA,MAAM,CAAC,QAAQ,CAAC,OAAO,0CAAE,WAAW;YAC1C,QAAQ,EAAE,MAAM,CAAC,QAAQ,KAAK,kBAAW,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS;SACtF,CAAC,CAAA;KAAA,CAAC,CAAC;AACN,CAAC,CAAC;AANW,QAAA,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:
|
|
3
|
-
export declare const SENTRY_DESTINATION:
|
|
4
|
-
export declare const TELEMETRY_API_KEY:
|
|
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,
|
|
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,WAAiC,CAAC;AACzD,eAAO,MAAM,kBAAkB,WAAyC,CAAC;AACzE,eAAO,MAAM,iBAAiB,WAAwC,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,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,OAAO,CAAC;IACZ,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB,CAAC;AAaF,eAAO,MAAM,gBAAgB,cAAqB,MAAM,kBAiBvD,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": "
|
|
3
|
-
"DX_RELEASE":
|
|
4
|
-
"SENTRY_DESTINATION":
|
|
5
|
-
"TELEMETRY_API_KEY":
|
|
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
|
}
|
|
@@ -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"}
|
|
@@ -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"}
|