@dxos/cli 2.19.1-dev.50eb4801 → 2.19.1-dev.87a5f68e
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/dist/dx.yml +1 -0
- package/dist/known-extensions.yml +2 -8
- package/dist/src/main.js +1 -0
- package/dist/src/main.js.map +1 -1
- package/dist/src/modules/device/commands/index.d.ts +4 -0
- package/dist/src/modules/device/commands/index.d.ts.map +1 -0
- package/dist/src/modules/device/commands/index.js +23 -0
- package/dist/src/modules/device/commands/index.js.map +1 -0
- package/dist/src/modules/device/commands/info.d.ts +7 -0
- package/dist/src/modules/device/commands/info.d.ts.map +1 -0
- package/dist/src/modules/device/commands/info.js +24 -0
- package/dist/src/modules/device/commands/info.js.map +1 -0
- package/dist/src/modules/device/commands/invite.d.ts +9 -0
- package/dist/src/modules/device/commands/invite.d.ts.map +1 -0
- package/dist/src/modules/device/commands/invite.js +25 -0
- package/dist/src/modules/device/commands/invite.js.map +1 -0
- package/dist/src/modules/device/commands/join.d.ts +23 -0
- package/dist/src/modules/device/commands/join.d.ts.map +1 -0
- package/dist/src/modules/device/commands/join.js +46 -0
- package/dist/src/modules/device/commands/join.js.map +1 -0
- package/dist/src/modules/device/device.d.ts +10 -0
- package/dist/src/modules/device/device.d.ts.map +1 -0
- package/dist/src/modules/device/device.js +40 -0
- package/dist/src/modules/device/device.js.map +1 -0
- package/dist/src/modules/device/device.test.d.ts +2 -0
- package/dist/src/modules/device/device.test.d.ts.map +1 -0
- package/dist/src/modules/device/device.test.js +79 -0
- package/dist/src/modules/device/device.test.js.map +1 -0
- package/dist/src/modules/device/index.d.ts +2 -0
- package/dist/src/modules/device/index.d.ts.map +1 -0
- package/dist/src/modules/device/index.js +21 -0
- package/dist/src/modules/device/index.js.map +1 -0
- package/dist/src/modules/index.d.ts +1 -0
- package/dist/src/modules/index.d.ts.map +1 -1
- package/dist/src/modules/index.js +1 -0
- package/dist/src/modules/index.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +12 -4
package/dist/dx.yml
CHANGED
|
@@ -32,12 +32,6 @@
|
|
|
32
32
|
command: "dxns"
|
|
33
33
|
-
|
|
34
34
|
command: "ns"
|
|
35
|
-
-
|
|
36
|
-
moduleName: "@dxos/cli-echo"
|
|
37
|
-
description: "ECHO extension."
|
|
38
|
-
modules:
|
|
39
|
-
-
|
|
40
|
-
command: "echo"
|
|
41
35
|
-
|
|
42
36
|
moduleName: "@dxos/cli-ipfs"
|
|
43
37
|
description: "IPFS extension."
|
|
@@ -70,8 +64,8 @@
|
|
|
70
64
|
command: "party"
|
|
71
65
|
description: "Party management."
|
|
72
66
|
-
|
|
73
|
-
command: "
|
|
74
|
-
description: "
|
|
67
|
+
command: "echo"
|
|
68
|
+
description: "ECHO operations."
|
|
75
69
|
-
|
|
76
70
|
moduleName: "@dxos/cli-signal"
|
|
77
71
|
description: "Signal server extension."
|
package/dist/src/main.js
CHANGED
package/dist/src/main.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.js","sourceRoot":"","sources":["../../src/main.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;;;AAEF,2BAAgC;AAChC,kEAAmC;AACnC,gDAAwB;AAExB,6CAAiH;AAEjH,6CAAiE;AACjE,
|
|
1
|
+
{"version":3,"file":"main.js","sourceRoot":"","sources":["../../src/main.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;;;AAEF,2BAAgC;AAChC,kEAAmC;AACnC,gDAAwB;AAExB,6CAAiH;AAEjH,6CAAiE;AACjE,uCAWmB;AAEnB,MAAM,gBAAgB,GAAG,IAAI,CAAC;AAE9B,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAA,qBAAU,GAAE,CAAC;AAElC,MAAM,UAAU,GAAG;IACjB,MAAM,EAAE,gBAAgB;IACxB,WAAW,EAAE,EAAE;IACf,iBAAiB,EAAE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Ae,CAAC,MAAM,EAAE,CAAC;QACjD,OAAO,CAAC,IAAI,CAAC,GAAG,eAAe,CAAC,CAAC;KAClC;AACH,CAAC,CAAC;AAEF,MAAM,OAAO,GAAG,KAAK,IAAI,EAAE;IACzB,IAAI,KAAK,EAAE,MAAM,eAAe,IAAI,gBAAgB,EAAE;QACpD,MAAM,eAAe,CAAC,OAAO,EAAE,CAAC;KACjC;AACH,CAAC,CAAC;AAEF,MAAM,WAAW,GAAG,CAAC,GAAQ,EAAE,EAAE;IAC/B,QAAQ,CAAC,GAAG,CAAC,CAAC;IACd,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC;AAEF,OAAO,CAAC,EAAE,CAAC,mBAAmB,EAAE,WAAW,CAAC,CAAC;AAC7C,OAAO,CAAC,EAAE,CAAC,oBAAoB,EAAE,WAAW,CAAC,CAAC;AAE9C,MAAM,CAAC,OAAO,GAAG,IAAA,oBAAS,EAAC;IACzB,GAAG,EAAE,SAAS;IACd,IAAI,EAAE,CAAC,MAAM,CAAC,MAAM;IACpB,IAAI,EAAE,IAAA,kBAAO,EAAC,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,MAAM,oCAAyB,EAAE,CAAC,CAAC;IACtE,IAAI;IACJ,OAAO;IACP,UAAU,EAAE,KAAK,IAAI,EAAE,CAAC,OAAO;IAC/B,OAAO,EAAE,UAAU;CACpB,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/modules/device/commands/index.ts"],"names":[],"mappings":"AAIA,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
//
|
|
3
|
+
// Copyright 2020 DXOS.org
|
|
4
|
+
//
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
17
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
18
|
+
};
|
|
19
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
+
__exportStar(require("./info"), exports);
|
|
21
|
+
__exportStar(require("./invite"), exports);
|
|
22
|
+
__exportStar(require("./join"), exports);
|
|
23
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/device/commands/index.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;;;;;;;;;;;;;;AAEF,yCAAuB;AACvB,2CAAyB;AACzB,yCAAuB"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { CommandModule } from 'yargs';
|
|
2
|
+
import type { Client } from '@dxos/client';
|
|
3
|
+
import { DeviceOptions } from '..';
|
|
4
|
+
export declare const infoCommand: ({ getClient }: {
|
|
5
|
+
getClient: (name?: string | undefined) => Promise<Client>;
|
|
6
|
+
}) => CommandModule<DeviceOptions, DeviceOptions>;
|
|
7
|
+
//# sourceMappingURL=info.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"info.d.ts","sourceRoot":"","sources":["../../../../../src/modules/device/commands/info.ts"],"names":[],"mappings":"AAIA,OAAO,EAAa,aAAa,EAAE,MAAM,OAAO,CAAC;AAGjD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAE3C,OAAO,EAAE,aAAa,EAAE,MAAM,IAAI,CAAC;AAEnC,eAAO,MAAM,WAAW;8CAAmD,QAAQ,MAAM,CAAC;MAAK,cAAc,aAAa,EAAE,aAAa,CAevI,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
//
|
|
3
|
+
// Copyright 2020 DXOS.org
|
|
4
|
+
//
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.infoCommand = void 0;
|
|
7
|
+
const cli_core_1 = require("@dxos/cli-core");
|
|
8
|
+
const infoCommand = ({ getClient }) => ({
|
|
9
|
+
command: ['info'],
|
|
10
|
+
describe: 'Current device info.',
|
|
11
|
+
builder: yargs => yargs,
|
|
12
|
+
handler: (0, cli_core_1.asyncHandler)(async (argv) => {
|
|
13
|
+
var _a;
|
|
14
|
+
const client = await getClient();
|
|
15
|
+
const data = {
|
|
16
|
+
displayName: (_a = client.halo.profile) === null || _a === void 0 ? void 0 : _a.username
|
|
17
|
+
// identityKey: client.echo.halo.identity.identityKey?.publicKey.toHex(),
|
|
18
|
+
// deviceKey: client.echo.halo.identity.deviceKey?.publicKey.toHex()
|
|
19
|
+
};
|
|
20
|
+
return (0, cli_core_1.print)(data, argv);
|
|
21
|
+
})
|
|
22
|
+
});
|
|
23
|
+
exports.infoCommand = infoCommand;
|
|
24
|
+
//# sourceMappingURL=info.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"info.js","sourceRoot":"","sources":["../../../../../src/modules/device/commands/info.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;AAIF,6CAAqD;AAK9C,MAAM,WAAW,GAAG,CAAC,EAAE,SAAS,EAAqD,EAA+C,EAAE,CAAC,CAAC;IAC7I,OAAO,EAAE,CAAC,MAAM,CAAC;IACjB,QAAQ,EAAE,sBAAsB;IAChC,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK;IACvB,OAAO,EAAE,IAAA,uBAAY,EAAC,KAAK,EAAE,IAA8B,EAAE,EAAE;;QAC7D,MAAM,MAAM,GAAG,MAAM,SAAS,EAAE,CAAC;QAEjC,MAAM,IAAI,GAAG;YACX,WAAW,EAAE,MAAA,MAAM,CAAC,IAAI,CAAC,OAAO,0CAAE,QAAQ;YAC1C,yEAAyE;YACzE,oEAAoE;SACrE,CAAC;QAEF,OAAO,IAAA,gBAAK,EAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC3B,CAAC,CAAC;CACH,CAAC,CAAC;AAfU,QAAA,WAAW,eAerB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { CommandModule } from 'yargs';
|
|
2
|
+
import type { Client } from '@dxos/client';
|
|
3
|
+
import { DeviceOptions } from '../device';
|
|
4
|
+
declare type DeviceInviteOptions = {
|
|
5
|
+
getClient: (name?: string) => Promise<Client>;
|
|
6
|
+
};
|
|
7
|
+
export declare const inviteCommand: ({ getClient }: DeviceInviteOptions, onPinGenerated: (pin: string) => void, onGenerated?: ((code: string) => void) | undefined) => CommandModule<DeviceOptions, DeviceOptions>;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=invite.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"invite.d.ts","sourceRoot":"","sources":["../../../../../src/modules/device/commands/invite.ts"],"names":[],"mappings":"AAIA,OAAO,EAAmB,aAAa,EAAE,MAAM,OAAO,CAAC;AAGvD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAE3C,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAO1C,aAAK,mBAAmB,GAAG;IACzB,SAAS,EAAE,CAAC,IAAI,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAA;CAC9C,CAAA;AAED,eAAO,MAAM,aAAa,kBAAmB,mBAAmB,wBAAwB,MAAM,KAAK,IAAI,wBAAuB,MAAM,KAAK,IAAI,kBAAG,cAAc,aAAa,EAAE,aAAa,CAcxL,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
//
|
|
3
|
+
// Copyright 2020 DXOS.org
|
|
4
|
+
//
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.inviteCommand = void 0;
|
|
7
|
+
const cli_core_1 = require("@dxos/cli-core");
|
|
8
|
+
const options = (yargs) => {
|
|
9
|
+
return yargs
|
|
10
|
+
.option('interactive', { hidden: true, default: true }); // override the default.
|
|
11
|
+
};
|
|
12
|
+
const inviteCommand = ({ getClient }, onPinGenerated, onGenerated) => ({
|
|
13
|
+
command: ['invite'],
|
|
14
|
+
describe: 'Invite another device.',
|
|
15
|
+
builder: yargs => options(yargs),
|
|
16
|
+
handler: (0, cli_core_1.asyncHandler)(async (argv) => {
|
|
17
|
+
const client = await getClient();
|
|
18
|
+
const invitation = await client.halo.createInvitation();
|
|
19
|
+
invitation.connected.on(() => { var _a, _b; return onPinGenerated((_b = (_a = invitation.descriptor.secret) === null || _a === void 0 ? void 0 : _a.toString()) !== null && _b !== void 0 ? _b : ''); });
|
|
20
|
+
onGenerated && await onGenerated(invitation.descriptor.encode());
|
|
21
|
+
(0, cli_core_1.print)({ code: invitation.descriptor.encode() }, argv);
|
|
22
|
+
})
|
|
23
|
+
});
|
|
24
|
+
exports.inviteCommand = inviteCommand;
|
|
25
|
+
//# sourceMappingURL=invite.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"invite.js","sourceRoot":"","sources":["../../../../../src/modules/device/commands/invite.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;AAIF,6CAAqD;AAKrD,MAAM,OAAO,GAAG,CAAC,KAA0B,EAAuB,EAAE;IAClE,OAAO,KAAK;SACT,MAAM,CAAC,aAAa,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,wBAAwB;AACrF,CAAC,CAAC;AAMK,MAAM,aAAa,GAAG,CAAC,EAAE,SAAS,EAAuB,EAAE,cAAqC,EAAE,WAAoC,EAA+C,EAAE,CAAC,CAAC;IAC9L,OAAO,EAAE,CAAC,QAAQ,CAAC;IACnB,QAAQ,EAAE,wBAAwB;IAClC,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC;IAChC,OAAO,EAAE,IAAA,uBAAY,EAAC,KAAK,EAAE,IAA8B,EAAE,EAAE;QAC7D,MAAM,MAAM,GAAG,MAAM,SAAS,EAAE,CAAC;QAEjC,MAAM,UAAU,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,gBAAgB,EAAE,CAAC;QACxD,UAAU,CAAC,SAAS,CAAC,EAAE,CAAC,GAAG,EAAE,eAAC,OAAA,cAAc,CAAC,MAAA,MAAA,UAAU,CAAC,UAAU,CAAC,MAAM,0CAAE,QAAQ,EAAE,mCAAI,EAAE,CAAC,CAAA,EAAA,CAAC,CAAC;QAE9F,WAAW,IAAI,MAAM,WAAW,CAAC,UAAU,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC,CAAC;QAEjE,IAAA,gBAAK,EAAC,EAAE,IAAI,EAAE,UAAU,CAAC,UAAU,CAAC,MAAM,EAAE,EAAE,EAAE,IAAI,CAAC,CAAC;IACxD,CAAC,CAAC;CACH,CAAC,CAAC;AAdU,QAAA,aAAa,iBAcvB"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Argv } from 'yargs';
|
|
2
|
+
import { CoreState } from '@dxos/cli-core';
|
|
3
|
+
import type { Client } from '@dxos/client';
|
|
4
|
+
import { DeviceOptions } from '../device';
|
|
5
|
+
declare type DeviceJoinCommandOptions = Pick<CoreState, 'profilePath' | 'cliState'> & {
|
|
6
|
+
getClient: (name?: string) => Promise<Client>;
|
|
7
|
+
storage?: {
|
|
8
|
+
persistent?: boolean;
|
|
9
|
+
path?: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export interface DeviceJoinOptions extends DeviceOptions {
|
|
13
|
+
code: string;
|
|
14
|
+
name: string;
|
|
15
|
+
}
|
|
16
|
+
export declare const joinCommand: ({ storage, profilePath, cliState, getClient }: DeviceJoinCommandOptions, secretProvider: Function) => {
|
|
17
|
+
command: string[];
|
|
18
|
+
describe: string;
|
|
19
|
+
builder: (yargs: Argv<any>) => Argv<DeviceJoinOptions>;
|
|
20
|
+
handler: (argv: any) => Promise<any>;
|
|
21
|
+
};
|
|
22
|
+
export {};
|
|
23
|
+
//# sourceMappingURL=join.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"join.d.ts","sourceRoot":"","sources":["../../../../../src/modules/device/commands/join.ts"],"names":[],"mappings":"AAKA,OAAO,EAAa,IAAI,EAAE,MAAM,OAAO,CAAC;AAExC,OAAO,EAA0B,SAAS,EAA8C,MAAM,gBAAgB,CAAC;AAC/G,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAG3C,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE1C,aAAK,wBAAwB,GAAG,IAAI,CAAC,SAAS,EAAI,aAAa,GAAG,UAAU,CAAC,GAAG;IAC9E,SAAS,EAAE,CAAC,IAAI,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAA;IAC7C,OAAO,CAAC,EAAE;QACR,UAAU,CAAC,EAAE,OAAO,CAAA;QACpB,IAAI,CAAC,EAAE,MAAM,CAAA;KACd,CAAA;CACF,CAAA;AAED,MAAM,WAAW,iBAAkB,SAAQ,aAAa;IACtD,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;CACb;AASD,eAAO,MAAM,WAAW,kDAAmD,wBAAwB,kBAAkB,QAAQ;;;qBAG1G,KAAK,GAAG,CAAC;;CA2B1B,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
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
|
+
exports.joinCommand = void 0;
|
|
10
|
+
const assert_1 = __importDefault(require("assert"));
|
|
11
|
+
const cli_core_1 = require("@dxos/cli-core");
|
|
12
|
+
const echo_db_1 = require("@dxos/echo-db");
|
|
13
|
+
const options = (yargs) => {
|
|
14
|
+
return yargs
|
|
15
|
+
.option('interactive', { hidden: true, default: true }) // override the default.
|
|
16
|
+
.option('name', { type: 'string', required: true })
|
|
17
|
+
.option('code', { type: 'string', required: true });
|
|
18
|
+
};
|
|
19
|
+
const joinCommand = ({ storage, profilePath, cliState, getClient }, secretProvider) => ({
|
|
20
|
+
command: ['join'],
|
|
21
|
+
describe: 'Join device invitation.',
|
|
22
|
+
builder: (yargs) => options(yargs),
|
|
23
|
+
handler: (0, cli_core_1.asyncHandler)(async (argv) => {
|
|
24
|
+
var _a;
|
|
25
|
+
const { code, name } = argv;
|
|
26
|
+
if (cliState.interactive) {
|
|
27
|
+
throw new Error('Can not join from interactive mode.');
|
|
28
|
+
}
|
|
29
|
+
const persistent = (_a = storage === null || storage === void 0 ? void 0 : storage.persistent) !== null && _a !== void 0 ? _a : cli_core_1.CLI_DEFAULT_PERSISTENT;
|
|
30
|
+
if (persistent && !name) {
|
|
31
|
+
throw new Error('Profile name is not provided.');
|
|
32
|
+
}
|
|
33
|
+
if (persistent) {
|
|
34
|
+
(0, assert_1.default)(profilePath, 'Missing profile path.');
|
|
35
|
+
(0, cli_core_1.resetStorageForClientProfile)(storage === null || storage === void 0 ? void 0 : storage.path, name);
|
|
36
|
+
}
|
|
37
|
+
const client = await getClient(name);
|
|
38
|
+
const invitationDescriptor = echo_db_1.InvitationDescriptor.decode(code);
|
|
39
|
+
const invitation = await client.halo.acceptInvitation(invitationDescriptor);
|
|
40
|
+
const secret = await secretProvider();
|
|
41
|
+
invitation.authenticate(secret);
|
|
42
|
+
await invitation.wait();
|
|
43
|
+
})
|
|
44
|
+
});
|
|
45
|
+
exports.joinCommand = joinCommand;
|
|
46
|
+
//# sourceMappingURL=join.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"join.js","sourceRoot":"","sources":["../../../../../src/modules/device/commands/join.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;;;;AAEF,oDAA4B;AAG5B,6CAA+G;AAE/G,2CAAqD;AAiBrD,MAAM,OAAO,GAAG,CAAC,KAA8B,EAA2B,EAAE;IAC1E,OAAO,KAAK;SACT,MAAM,CAAC,aAAa,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,wBAAwB;SAC/E,MAAM,CAAC,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;SAClD,MAAM,CAAC,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;AACxD,CAAC,CAAC;AAEK,MAAM,WAAW,GAAG,CAAC,EAAE,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,SAAS,EAA4B,EAAE,cAAwB,EAAE,EAAE,CAAC,CAAC;IACjI,OAAO,EAAE,CAAC,MAAM,CAAC;IACjB,QAAQ,EAAE,yBAAyB;IACnC,OAAO,EAAE,CAAC,KAAgB,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC;IAC7C,OAAO,EAAE,IAAA,uBAAY,EAAC,KAAK,EAAE,IAAkC,EAAE,EAAE;;QACjE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC;QAC5B,IAAI,QAAQ,CAAC,WAAW,EAAE;YACxB,MAAM,IAAI,KAAK,CAAC,qCAAqC,CAAC,CAAC;SACxD;QAED,MAAM,UAAU,GAAG,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,UAAU,mCAAI,iCAAsB,CAAC;QACjE,IAAI,UAAU,IAAI,CAAC,IAAI,EAAE;YACvB,MAAM,IAAI,KAAK,CAAC,+BAA+B,CAAC,CAAC;SAClD;QAED,IAAI,UAAU,EAAE;YACd,IAAA,gBAAM,EAAC,WAAW,EAAE,uBAAuB,CAAC,CAAC;YAC7C,IAAA,uCAA4B,EAAC,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,IAAI,EAAE,IAAI,CAAC,CAAC;SACnD;QAED,MAAM,MAAM,GAAG,MAAM,SAAS,CAAC,IAAI,CAAC,CAAC;QAErC,MAAM,oBAAoB,GAAG,8BAAoB,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QAE/D,MAAM,UAAU,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,oBAAoB,CAAC,CAAC;QAC5E,MAAM,MAAM,GAAG,MAAM,cAAc,EAAE,CAAC;QACtC,UAAU,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;QAEhC,MAAM,UAAU,CAAC,IAAI,EAAE,CAAC;IAC1B,CAAC,CAAC;CACH,CAAC,CAAC;AA9BU,QAAA,WAAW,eA8BrB"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Argv } from 'yargs';
|
|
2
|
+
import { CoreOptions, CoreState } from '@dxos/cli-core';
|
|
3
|
+
export declare type DeviceOptions = CoreOptions;
|
|
4
|
+
export declare const DeviceModule: ({ config, profilePath, getReadlineInterface, cliState }: CoreState) => {
|
|
5
|
+
command: string[];
|
|
6
|
+
describe: string;
|
|
7
|
+
handler: any;
|
|
8
|
+
builder: (yargs: Argv<CoreOptions>) => Argv<CoreOptions>;
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=device.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"device.d.ts","sourceRoot":"","sources":["../../../../src/modules/device/device.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AAE7B,OAAO,EAAE,WAAW,EAAE,SAAS,EAAgB,MAAM,gBAAgB,CAAC;AAKtE,oBAAY,aAAa,GAAG,WAAW,CAAA;AAMvC,eAAO,MAAM,YAAY,4DAA6D,SAAS;;;;qBAwB1E,KAAK,WAAW,CAAC;CAKrC,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
//
|
|
3
|
+
// Copyright 2020 DXOS.org
|
|
4
|
+
//
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.DeviceModule = void 0;
|
|
7
|
+
const cli_core_1 = require("@dxos/cli-core");
|
|
8
|
+
const debug_1 = require("@dxos/debug");
|
|
9
|
+
const commands_1 = require("./commands");
|
|
10
|
+
const deviceOptions = (yargs) => {
|
|
11
|
+
return yargs;
|
|
12
|
+
};
|
|
13
|
+
const DeviceModule = ({ config, profilePath, getReadlineInterface, cliState }) => {
|
|
14
|
+
const secretProvider = async () => {
|
|
15
|
+
return new Promise(resolve => {
|
|
16
|
+
const rl = getReadlineInterface();
|
|
17
|
+
rl.question('Passcode: ', (pin) => {
|
|
18
|
+
resolve(pin);
|
|
19
|
+
});
|
|
20
|
+
});
|
|
21
|
+
};
|
|
22
|
+
const onPinGenerated = (pin) => {
|
|
23
|
+
(0, debug_1.log)('Pin: ', pin);
|
|
24
|
+
};
|
|
25
|
+
const getClient = async (name) => {
|
|
26
|
+
return (0, cli_core_1.createClient)(config, [], { name, initProfile: false });
|
|
27
|
+
};
|
|
28
|
+
const storage = config.get('runtime.client.storage');
|
|
29
|
+
return {
|
|
30
|
+
command: ['device'],
|
|
31
|
+
describe: 'Device management.',
|
|
32
|
+
handler: undefined,
|
|
33
|
+
builder: (yargs) => deviceOptions(yargs)
|
|
34
|
+
.command((0, commands_1.joinCommand)({ storage, profilePath, cliState, getClient }, secretProvider))
|
|
35
|
+
.command((0, commands_1.infoCommand)({ getClient }))
|
|
36
|
+
.command((0, commands_1.inviteCommand)({ getClient }, onPinGenerated))
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
exports.DeviceModule = DeviceModule;
|
|
40
|
+
//# sourceMappingURL=device.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"device.js","sourceRoot":"","sources":["../../../../src/modules/device/device.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;AAIF,6CAAsE;AACtE,uCAAkC;AAElC,yCAAqE;AAIrE,MAAM,aAAa,GAAG,CAAC,KAAwB,EAAuB,EAAE;IACtE,OAAO,KAAK,CAAC;AACf,CAAC,CAAC;AAEK,MAAM,YAAY,GAAG,CAAC,EAAE,MAAM,EAAE,WAAW,EAAE,oBAAoB,EAAE,QAAQ,EAAa,EAAE,EAAE;IACjG,MAAM,cAAc,GAAG,KAAK,IAAI,EAAE;QAChC,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC,EAAE;YAC3B,MAAM,EAAE,GAAG,oBAAqB,EAAE,CAAC;YACnC,EAAE,CAAC,QAAQ,CAAC,YAAY,EAAE,CAAC,GAAW,EAAE,EAAE;gBACxC,OAAO,CAAC,GAAG,CAAC,CAAC;YACf,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC,CAAC;IAEF,MAAM,cAAc,GAAG,CAAC,GAAW,EAAE,EAAE;QACrC,IAAA,WAAG,EAAC,OAAO,EAAE,GAAG,CAAC,CAAC;IACpB,CAAC,CAAC;IAEF,MAAM,SAAS,GAAG,KAAK,EAAE,IAAa,EAAE,EAAE;QACxC,OAAO,IAAA,uBAAY,EAAC,MAAO,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,CAAC,CAAC;IACjE,CAAC,CAAC;IAEF,MAAM,OAAO,GAAG,MAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC,CAAC;IAEtD,OAAO;QACL,OAAO,EAAE,CAAC,QAAQ,CAAC;QACnB,QAAQ,EAAE,oBAAoB;QAC9B,OAAO,EAAE,SAAgB;QACzB,OAAO,EAAE,CAAC,KAAwB,EAAE,EAAE,CAAC,aAAa,CAAC,KAAK,CAAC;aACxD,OAAO,CAAC,IAAA,sBAAW,EAAC,EAAE,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,cAAc,CAAC,CAAC;aACnF,OAAO,CAAC,IAAA,sBAAW,EAAC,EAAE,SAAS,EAAE,CAAC,CAAC;aACnC,OAAO,CAAC,IAAA,wBAAa,EAAC,EAAE,SAAS,EAAE,EAAE,cAAc,CAAC,CAAC;KACzD,CAAC;AACJ,CAAC,CAAC;AA7BW,QAAA,YAAY,gBA6BvB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"device.test.d.ts","sourceRoot":"","sources":["../../../../src/modules/device/device.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
//
|
|
3
|
+
// Copyright 2020 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 expect_1 = __importDefault(require("expect"));
|
|
10
|
+
const wait_for_expect_1 = __importDefault(require("wait-for-expect"));
|
|
11
|
+
const async_1 = require("@dxos/async");
|
|
12
|
+
const client_1 = require("@dxos/client");
|
|
13
|
+
const crypto_1 = require("@dxos/crypto");
|
|
14
|
+
const signal_1 = require("@dxos/signal");
|
|
15
|
+
const commands_1 = require("./commands");
|
|
16
|
+
const DEFAULT_ARGS = { $0: '', _: [], return: true };
|
|
17
|
+
const NEW_PROFILE_NAME = 'test';
|
|
18
|
+
class PinHelper {
|
|
19
|
+
setPin(value) {
|
|
20
|
+
this._pin = value;
|
|
21
|
+
}
|
|
22
|
+
async getPin() {
|
|
23
|
+
await (0, async_1.waitForCondition)(() => !!this._pin);
|
|
24
|
+
return this._pin;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
describe('cli-party: Device', () => {
|
|
28
|
+
let signalBroker;
|
|
29
|
+
let alice;
|
|
30
|
+
let bob;
|
|
31
|
+
let aliceGetClient;
|
|
32
|
+
let bobGetClient;
|
|
33
|
+
before(async () => {
|
|
34
|
+
signalBroker = await (0, signal_1.createTestBroker)(4002);
|
|
35
|
+
});
|
|
36
|
+
beforeEach(async () => {
|
|
37
|
+
[alice, bob] = await Promise.all(['Alice', 'Bob'].map(async (username) => {
|
|
38
|
+
const client = new client_1.Client({ version: 1, runtime: { services: { signal: { server: 'ws://localhost:4002' } } } });
|
|
39
|
+
await client.initialize();
|
|
40
|
+
if (username === 'Alice') {
|
|
41
|
+
// Bob will be joining Alice's device invitation.
|
|
42
|
+
await client.halo.createProfile({ ...(0, crypto_1.createKeyPair)(), username });
|
|
43
|
+
}
|
|
44
|
+
return client;
|
|
45
|
+
}));
|
|
46
|
+
aliceGetClient = async () => alice;
|
|
47
|
+
bobGetClient = async () => bob;
|
|
48
|
+
});
|
|
49
|
+
afterEach(async () => {
|
|
50
|
+
await (0, async_1.sleep)(200); // Issue on `protocols` side - require some time before destroying.
|
|
51
|
+
await (alice === null || alice === void 0 ? void 0 : alice.destroy());
|
|
52
|
+
await (bob === null || bob === void 0 ? void 0 : bob.destroy());
|
|
53
|
+
});
|
|
54
|
+
after(async () => {
|
|
55
|
+
await signalBroker.stop();
|
|
56
|
+
});
|
|
57
|
+
it('Alice has identity and Bob has not.', async () => {
|
|
58
|
+
const aliceInfo = await (0, commands_1.infoCommand)({ getClient: aliceGetClient }).handler(DEFAULT_ARGS);
|
|
59
|
+
const bobInfo = await (0, commands_1.infoCommand)({ getClient: bobGetClient }).handler(DEFAULT_ARGS);
|
|
60
|
+
(0, expect_1.default)(aliceInfo.displayName).toEqual('Alice');
|
|
61
|
+
(0, expect_1.default)(bobInfo.displayName).toBeUndefined();
|
|
62
|
+
// expect(bobInfo.identityKey).toBeUndefined();
|
|
63
|
+
// expect(bobInfo.deviceKey).toBeUndefined();
|
|
64
|
+
// PublicKey.assertValidPublicKey(PublicKey.from(aliceInfo.identityKey));
|
|
65
|
+
// PublicKey.assertValidPublicKey(PublicKey.from(aliceInfo.deviceKey));
|
|
66
|
+
});
|
|
67
|
+
it('Can join a device invitation.', async () => {
|
|
68
|
+
const pinHelper = new PinHelper();
|
|
69
|
+
const onInvitationGenerated = async (code) => {
|
|
70
|
+
await (0, commands_1.joinCommand)({ getClient: bobGetClient, cliState: { interactive: false }, storage: { persistent: false } }, pinHelper.getPin.bind(pinHelper)).handler({ ...DEFAULT_ARGS, code, name: `${NEW_PROFILE_NAME}-1` });
|
|
71
|
+
};
|
|
72
|
+
await (0, commands_1.inviteCommand)({ getClient: aliceGetClient }, pinHelper.setPin.bind(pinHelper), onInvitationGenerated).handler(DEFAULT_ARGS);
|
|
73
|
+
await (0, wait_for_expect_1.default)(async () => {
|
|
74
|
+
(0, expect_1.default)((await (0, commands_1.infoCommand)({ getClient: aliceGetClient }).handler(DEFAULT_ARGS)).displayName).toEqual('Alice');
|
|
75
|
+
(0, expect_1.default)((await (0, commands_1.infoCommand)({ getClient: bobGetClient }).handler(DEFAULT_ARGS)).displayName).toEqual('Alice'); // Got replaced because it is now Alice's device.
|
|
76
|
+
}, 3000, 1000);
|
|
77
|
+
});
|
|
78
|
+
});
|
|
79
|
+
//# sourceMappingURL=device.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
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C,OAAO,CAAC,CAAC,CAAC,iDAAiD;QACvK,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;IACjB,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/modules/device/index.ts"],"names":[],"mappings":"AAIA,cAAc,UAAU,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
//
|
|
3
|
+
// Copyright 2020 DXOS.org
|
|
4
|
+
//
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
17
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
18
|
+
};
|
|
19
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
+
__exportStar(require("./device"), exports);
|
|
21
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/device/index.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;;;;;;;;;;;;;;AAEF,2CAAyB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/modules/index.ts"],"names":[],"mappings":"AAIA,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/modules/index.ts"],"names":[],"mappings":"AAIA,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC"}
|
|
@@ -17,6 +17,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
17
17
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
18
18
|
};
|
|
19
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
+
__exportStar(require("./device"), exports);
|
|
20
21
|
__exportStar(require("./devtools"), exports);
|
|
21
22
|
__exportStar(require("./extension"), exports);
|
|
22
23
|
__exportStar(require("./halo"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/modules/index.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;;;;;;;;;;;;;;AAEF,6CAA2B;AAC3B,8CAA4B;AAC5B,yCAAuB;AACvB,yCAAuB;AACvB,4CAA0B;AAC1B,4CAA0B;AAC1B,6CAA2B;AAC3B,4CAA0B"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/modules/index.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;;;;;;;;;;;;;;AAEF,2CAAyB;AACzB,6CAA2B;AAC3B,8CAA4B;AAC5B,yCAAuB;AACvB,yCAAuB;AACvB,4CAA0B;AAC1B,4CAA0B;AAC1B,6CAA2B;AAC3B,4CAA0B"}
|