@dxos/cli 0.4.5 → 0.4.6-main.20d1ec4
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/src/commands/device/info.d.ts.map +1 -1
- package/dist/src/commands/device/info.js +6 -1
- package/dist/src/commands/device/info.js.map +1 -1
- package/dist/src/commands/device/update.d.ts +1 -1
- package/dist/src/commands/device/update.d.ts.map +1 -1
- package/dist/src/commands/device/update.js +8 -23
- package/dist/src/commands/device/update.js.map +1 -1
- package/dist/src/commands/function/dev.js +1 -1
- package/dist/src/commands/function/dev.js.map +1 -1
- package/dist/src/commands/function/exec.d.ts +0 -1
- package/dist/src/commands/function/exec.d.ts.map +1 -1
- package/dist/src/commands/function/exec.js +26 -17
- package/dist/src/commands/function/exec.js.map +1 -1
- package/dist/src/commands/function/list.d.ts +2 -4
- package/dist/src/commands/function/list.d.ts.map +1 -1
- package/dist/src/commands/function/list.js +22 -20
- package/dist/src/commands/function/list.js.map +1 -1
- package/dist/src/commands/halo/create.d.ts +12 -0
- package/dist/src/commands/halo/create.d.ts.map +1 -1
- package/dist/src/commands/halo/create.js +11 -1
- package/dist/src/commands/halo/create.js.map +1 -1
- package/dist/src/commands/halo/join.d.ts +2 -0
- package/dist/src/commands/halo/join.d.ts.map +1 -1
- package/dist/src/commands/halo/join.js +10 -2
- package/dist/src/commands/halo/join.js.map +1 -1
- package/dist/src/util/devices.d.ts +2 -0
- package/dist/src/util/devices.d.ts.map +1 -1
- package/dist/src/util/devices.js +11 -6
- package/dist/src/util/devices.js.map +1 -1
- package/oclif.manifest.json +28 -5
- package/package.json +23 -23
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"info.d.ts","sourceRoot":"","sources":["../../../../src/commands/device/info.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"info.d.ts","sourceRoot":"","sources":["../../../../src/commands/device/info.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAIjD,MAAM,CAAC,OAAO,OAAO,IAAK,SAAQ,WAAW,CAAC,OAAO,IAAI,CAAC;IACxD,OAAgB,cAAc,UAAQ;IACtC,OAAgB,WAAW,SAAuB;IAE5C,GAAG,IAAI,OAAO,CAAC,GAAG,CAAC;CAoB1B"}
|
|
@@ -8,12 +8,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
9
|
const chalk_1 = __importDefault(require("chalk"));
|
|
10
10
|
const async_1 = require("@dxos/async");
|
|
11
|
+
const credentials_1 = require("@dxos/protocols/proto/dxos/halo/credentials");
|
|
11
12
|
const base_command_1 = require("../../base-command");
|
|
12
13
|
const errors_1 = require("../../errors");
|
|
13
14
|
const timeouts_1 = require("../../timeouts");
|
|
14
15
|
class Info extends base_command_1.BaseCommand {
|
|
15
16
|
async run() {
|
|
16
17
|
return await this.execWithClient(async (client) => {
|
|
18
|
+
var _a, _b;
|
|
17
19
|
// TODO(mykola): Hack to wait for identity with `client.halo.identity.wait()`.
|
|
18
20
|
await (0, async_1.asyncTimeout)(client.spaces.isReady.wait(), timeouts_1.IDENTITY_WAIT_TIMEOUT, new errors_1.IdentityWaitTimeoutError());
|
|
19
21
|
const device = client.halo.device;
|
|
@@ -22,7 +24,10 @@ class Info extends base_command_1.BaseCommand {
|
|
|
22
24
|
return;
|
|
23
25
|
}
|
|
24
26
|
this.log((0, chalk_1.default) `{magenta Device key:}`, device.deviceKey.toHex());
|
|
25
|
-
this.log((0, chalk_1.default) `{magenta Device profile:}`,
|
|
27
|
+
this.log((0, chalk_1.default) `{magenta Device profile:}`, {
|
|
28
|
+
...device.profile,
|
|
29
|
+
type: ((_a = device.profile) === null || _a === void 0 ? void 0 : _a.type) ? credentials_1.DeviceType[(_b = device.profile) === null || _b === void 0 ? void 0 : _b.type] : 'UNKNOWN',
|
|
30
|
+
});
|
|
26
31
|
return device;
|
|
27
32
|
});
|
|
28
33
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"info.js","sourceRoot":"","sources":["../../../../src/commands/device/info.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;;;AAEF,kDAA0B;AAE1B,uCAA2C;
|
|
1
|
+
{"version":3,"file":"info.js","sourceRoot":"","sources":["../../../../src/commands/device/info.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;;;AAEF,kDAA0B;AAE1B,uCAA2C;AAE3C,6EAAyE;AAEzE,qDAAiD;AACjD,yCAAwD;AACxD,6CAAuD;AAEvD,MAAqB,IAAK,SAAQ,0BAAwB;IAIxD,KAAK,CAAC,GAAG;QACP,OAAO,MAAM,IAAI,CAAC,cAAc,CAAC,KAAK,EAAE,MAAc,EAAE,EAAE;;YACxD,8EAA8E;YAC9E,MAAM,IAAA,oBAAY,EAAC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,gCAAqB,EAAE,IAAI,iCAAwB,EAAE,CAAC,CAAC;YACxG,MAAM,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC;YAElC,IAAI,CAAC,MAAM,EAAE;gBACX,IAAI,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC;gBAC7B,OAAO;aACR;YAED,IAAI,CAAC,GAAG,CAAC,IAAA,eAAK,EAAA,uBAAuB,EAAE,MAAM,CAAC,SAAS,CAAC,KAAK,EAAE,CAAC,CAAC;YACjE,IAAI,CAAC,GAAG,CAAC,IAAA,eAAK,EAAA,2BAA2B,EAAE;gBACzC,GAAG,MAAM,CAAC,OAAO;gBACjB,IAAI,EAAE,CAAA,MAAA,MAAM,CAAC,OAAO,0CAAE,IAAI,EAAC,CAAC,CAAC,wBAAU,CAAC,MAAA,MAAM,CAAC,OAAO,0CAAE,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS;aAC1E,CAAC,CAAC;YAEH,OAAO,MAAM,CAAC;QAChB,CAAC,CAAC,CAAC;IACL,CAAC;;AAtBe,mBAAc,GAAG,IAAI,CAAC;AACtB,gBAAW,GAAG,mBAAmB,CAAC;kBAF/B,IAAI"}
|
|
@@ -2,7 +2,7 @@ import { BaseCommand } from '../../base-command';
|
|
|
2
2
|
export default class Update extends BaseCommand<typeof Update> {
|
|
3
3
|
static description: string;
|
|
4
4
|
static flags: {
|
|
5
|
-
label: import("@oclif/core/lib/interfaces").OptionFlag<string
|
|
5
|
+
label: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
6
6
|
json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
7
7
|
'dry-run': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
8
8
|
verbose: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../../../src/commands/device/update.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../../../src/commands/device/update.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAIjD,MAAM,CAAC,OAAO,OAAO,MAAO,SAAQ,WAAW,CAAC,OAAO,MAAM,CAAC;IAC5D,OAAgB,WAAW,SAAyB;IACpD,OAAgB,KAAK;;;;;;;;;;MAGnB;IAEI,GAAG,IAAI,OAAO,CAAC,GAAG,CAAC;CAkB1B"}
|
|
@@ -2,12 +2,8 @@
|
|
|
2
2
|
//
|
|
3
3
|
// Copyright 2022 DXOS.org
|
|
4
4
|
//
|
|
5
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
6
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
7
|
-
};
|
|
8
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
6
|
const core_1 = require("@oclif/core");
|
|
10
|
-
const platform_1 = __importDefault(require("platform"));
|
|
11
7
|
const async_1 = require("@dxos/async");
|
|
12
8
|
const invariant_1 = require("@dxos/invariant");
|
|
13
9
|
const base_command_1 = require("../../base-command");
|
|
@@ -16,28 +12,17 @@ const timeouts_1 = require("../../timeouts");
|
|
|
16
12
|
class Update extends base_command_1.BaseCommand {
|
|
17
13
|
async run() {
|
|
18
14
|
return await this.execWithClient(async (client) => {
|
|
19
|
-
var _a
|
|
15
|
+
var _a;
|
|
20
16
|
// TODO(mykola): Hack to wait for identity with `client.halo.identity.wait()`.
|
|
21
17
|
await (0, async_1.asyncTimeout)(client.spaces.isReady.wait(), timeouts_1.IDENTITY_WAIT_TIMEOUT, new errors_1.IdentityWaitTimeoutError());
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}
|
|
27
|
-
let label = (_a = device.profile) === null || _a === void 0 ? void 0 : _a.label;
|
|
28
|
-
if (this.flags.label) {
|
|
29
|
-
label = this.flags.label;
|
|
30
|
-
}
|
|
18
|
+
// TODO(nf): should updateDevice also apply defaults?
|
|
19
|
+
const updatedProfile = {
|
|
20
|
+
...(_a = client.halo.device) === null || _a === void 0 ? void 0 : _a.profile,
|
|
21
|
+
label: this.flags.label,
|
|
22
|
+
};
|
|
31
23
|
(0, invariant_1.invariant)(client.services.services.DevicesService, 'DevicesService not found');
|
|
32
24
|
// TODO(nf): dedupe
|
|
33
|
-
const uDevice = await client.services.services.DevicesService.updateDevice(
|
|
34
|
-
label,
|
|
35
|
-
platform: platform_1.default.name,
|
|
36
|
-
platformVersion: platform_1.default.version,
|
|
37
|
-
architecture: typeof ((_b = platform_1.default.os) === null || _b === void 0 ? void 0 : _b.architecture) === 'number' ? String(platform_1.default.os.architecture) : undefined,
|
|
38
|
-
os: (_c = platform_1.default.os) === null || _c === void 0 ? void 0 : _c.family,
|
|
39
|
-
osVersion: (_d = platform_1.default.os) === null || _d === void 0 ? void 0 : _d.version,
|
|
40
|
-
});
|
|
25
|
+
const uDevice = await client.services.services.DevicesService.updateDevice(updatedProfile);
|
|
41
26
|
this.log('Device updated:', uDevice);
|
|
42
27
|
return uDevice;
|
|
43
28
|
});
|
|
@@ -46,7 +31,7 @@ class Update extends base_command_1.BaseCommand {
|
|
|
46
31
|
Update.description = 'Update device info.';
|
|
47
32
|
Update.flags = {
|
|
48
33
|
...base_command_1.BaseCommand.flags,
|
|
49
|
-
label: core_1.Flags.string({ description: 'Set device label' }),
|
|
34
|
+
label: core_1.Flags.string({ description: 'Set device label', required: true }),
|
|
50
35
|
};
|
|
51
36
|
exports.default = Update;
|
|
52
37
|
//# sourceMappingURL=update.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update.js","sourceRoot":"","sources":["../../../../src/commands/device/update.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE
|
|
1
|
+
{"version":3,"file":"update.js","sourceRoot":"","sources":["../../../../src/commands/device/update.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;AAEF,sCAAoC;AAEpC,uCAA2C;AAE3C,+CAA4C;AAE5C,qDAAiD;AACjD,yCAAwD;AACxD,6CAAuD;AAEvD,MAAqB,MAAO,SAAQ,0BAA0B;IAO5D,KAAK,CAAC,GAAG;QACP,OAAO,MAAM,IAAI,CAAC,cAAc,CAAC,KAAK,EAAE,MAAc,EAAE,EAAE;;YACxD,8EAA8E;YAC9E,MAAM,IAAA,oBAAY,EAAC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,gCAAqB,EAAE,IAAI,iCAAwB,EAAE,CAAC,CAAC;YACxG,qDAAqD;YACrD,MAAM,cAAc,GAAG;gBACrB,GAAG,MAAA,MAAM,CAAC,IAAI,CAAC,MAAM,0CAAE,OAAO;gBAC9B,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK;aACxB,CAAC;YAEF,IAAA,qBAAS,EAAC,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,cAAc,EAAE,0BAA0B,CAAC,CAAC;YAC/E,mBAAmB;YACnB,MAAM,OAAO,GAAG,MAAM,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,cAAc,CAAC,YAAY,CAAC,cAAc,CAAC,CAAC;YAC3F,IAAI,CAAC,GAAG,CAAC,iBAAiB,EAAE,OAAO,CAAC,CAAC;YAErC,OAAO,OAAO,CAAC;QACjB,CAAC,CAAC,CAAC;IACL,CAAC;;AAvBe,kBAAW,GAAG,qBAAqB,CAAC;AACpC,YAAK,GAAG;IACtB,GAAG,0BAAW,CAAC,KAAK;IACpB,KAAK,EAAE,YAAK,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,kBAAkB,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;CACzE,CAAC;kBALiB,MAAM"}
|
|
@@ -28,8 +28,8 @@ class Dev extends base_command_1.BaseCommand {
|
|
|
28
28
|
const config = new config_1.Config(JSON.parse((await client.services.services.DevtoolsHost.getConfig()).config));
|
|
29
29
|
const functionsConfig = (_c = (_b = (_a = config.values.runtime) === null || _a === void 0 ? void 0 : _a.agent) === null || _b === void 0 ? void 0 : _b.plugins) === null || _c === void 0 ? void 0 : _c.find((plugin) => plugin.id === 'dxos.org/agent/plugin/functions');
|
|
30
30
|
const file = (_f = (_d = this.flags.manifest) !== null && _d !== void 0 ? _d : (_e = functionsConfig === null || functionsConfig === void 0 ? void 0 : functionsConfig.config) === null || _e === void 0 ? void 0 : _e.manifest) !== null && _f !== void 0 ? _f : (0, node_path_1.join)(process.cwd(), 'functions.yml');
|
|
31
|
-
const directory = (_g = this.flags.baseDir) !== null && _g !== void 0 ? _g : (0, node_path_1.join)((0, node_path_1.dirname)(file), 'src/functions');
|
|
32
31
|
const manifest = (0, js_yaml_1.load)(await (0, promises_1.readFile)(file, 'utf8'));
|
|
32
|
+
const directory = (_g = this.flags.baseDir) !== null && _g !== void 0 ? _g : (0, node_path_1.join)((0, node_path_1.dirname)(file), 'src/functions');
|
|
33
33
|
const server = new functions_1.DevServer(client, {
|
|
34
34
|
directory,
|
|
35
35
|
manifest,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dev.js","sourceRoot":"","sources":["../../../../src/commands/function/dev.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;;;AAEF,sCAAoC;AACpC,kDAA0B;AAC1B,qCAA+B;AAC/B,+CAA4C;AAC5C,yCAA0C;AAE1C,2DAAgE;AAChE,yCAAsC;AACtC,+CAA8E;AAE9E,qDAAiD;AAEjD,MAAqB,GAAI,SAAQ,0BAAuB;IAmBtD,KAAK,CAAC,GAAG;;QACP,kCAAkC;QAClC,KAAK,MAAM,WAAW,IAAI,MAAA,IAAI,CAAC,KAAK,CAAC,OAAO,mCAAI,EAAE,EAAE;YAClD,OAAO,CAAC,WAAW,CAAC,CAAC;SACtB;QAED,MAAM,IAAI,CAAC,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE;;YACzC,8CAA8C;YAC9C,MAAM,MAAM,GAAG,IAAI,eAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,YAAa,CAAC,SAAS,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;YACzG,MAAM,eAAe,GAAG,MAAA,MAAA,MAAA,MAAM,CAAC,MAAM,CAAC,OAAO,0CAAE,KAAK,0CAAE,OAAO,0CAAE,IAAI,CACjE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,EAAE,KAAK,iCAAiC,CAC5D,CAAC;YAEF,MAAM,IAAI,GAAG,MAAA,MAAA,IAAI,CAAC,KAAK,CAAC,QAAQ,mCAAI,MAAA,eAAe,aAAf,eAAe,uBAAf,eAAe,CAAE,MAAM,0CAAE,QAAQ,mCAAI,IAAA,gBAAI,EAAC,OAAO,CAAC,GAAG,EAAE,E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
static description: string;
|
|
8
|
-
static state: string;
|
|
9
8
|
static args: {
|
|
10
9
|
name: import("@oclif/core/lib/interfaces/parser").Arg<string, Record<string, unknown>>;
|
|
11
10
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exec.d.ts","sourceRoot":"","sources":["../../../../src/commands/function/exec.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"exec.d.ts","sourceRoot":"","sources":["../../../../src/commands/function/exec.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,IAAK,SAAQ,WAAW,CAAC,OAAO,IAAI,CAAC;IACxD,OAAgB,cAAc,UAAQ;IACtC,OAAgB,WAAW,SAAsB;IAEjD,OAAgB,IAAI;;MAElB;IAEI,GAAG,IAAI,OAAO,CAAC,GAAG,CAAC;CA8B1B"}
|
|
@@ -4,34 +4,43 @@
|
|
|
4
4
|
//
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const core_1 = require("@oclif/core");
|
|
7
|
-
const
|
|
8
|
-
const
|
|
7
|
+
const js_yaml_1 = require("js-yaml");
|
|
8
|
+
const promises_1 = require("node:fs/promises");
|
|
9
|
+
const node_path_1 = require("node:path");
|
|
10
|
+
const config_1 = require("@dxos/config");
|
|
9
11
|
const base_command_1 = require("../../base-command");
|
|
10
12
|
/**
|
|
11
13
|
* @deprecated
|
|
12
14
|
*/
|
|
13
15
|
class Exec extends base_command_1.BaseCommand {
|
|
14
16
|
async run() {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
17
|
+
return await this.execWithClient(async (client) => {
|
|
18
|
+
var _a, _b, _c, _d, _e, _f;
|
|
19
|
+
// TODO(dmaretskyi): Move into system service?
|
|
20
|
+
const config = new config_1.Config(JSON.parse((await client.services.services.DevtoolsHost.getConfig()).config));
|
|
21
|
+
const functionsConfig = (_c = (_b = (_a = config.values.runtime) === null || _a === void 0 ? void 0 : _a.agent) === null || _b === void 0 ? void 0 : _b.plugins) === null || _c === void 0 ? void 0 : _c.find((plugin) => plugin.id === 'dxos.org/agent/plugin/functions');
|
|
22
|
+
const file = (_f = (_d = this.flags.manifest) !== null && _d !== void 0 ? _d : (_e = functionsConfig === null || functionsConfig === void 0 ? void 0 : functionsConfig.config) === null || _e === void 0 ? void 0 : _e.manifest) !== null && _f !== void 0 ? _f : (0, node_path_1.join)(process.cwd(), 'functions.yml');
|
|
23
|
+
const { functions } = (0, js_yaml_1.load)(await (0, promises_1.readFile)(file, 'utf8'));
|
|
24
|
+
const fn = functions.find((fn) => fn.id === this.args.name);
|
|
25
|
+
if (!fn) {
|
|
26
|
+
this.warn(`Function not found: ${this.args.name}`);
|
|
27
|
+
return null;
|
|
28
|
+
}
|
|
29
|
+
const { handler } = fn;
|
|
30
|
+
// TODO(burdon): Get endpoint.
|
|
31
|
+
const url = `http:/localhost:7100/dev/${handler}`;
|
|
32
|
+
this.log(`Calling: ${url}`);
|
|
33
|
+
const { status, statusText } = await fetch(url, {
|
|
34
|
+
method: 'POST',
|
|
35
|
+
});
|
|
36
|
+
if (status !== 200) {
|
|
37
|
+
this.warn(`Error(${status}): ${statusText}`);
|
|
38
|
+
}
|
|
28
39
|
});
|
|
29
|
-
console.log(res);
|
|
30
40
|
}
|
|
31
41
|
}
|
|
32
42
|
Exec.enableJsonFlag = true;
|
|
33
43
|
Exec.description = 'Invoke function.';
|
|
34
|
-
Exec.state = 'deprecated';
|
|
35
44
|
Exec.args = {
|
|
36
45
|
name: core_1.Args.string({ required: true, description: 'Function name.' }),
|
|
37
46
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exec.js","sourceRoot":"","sources":["../../../../src/commands/function/exec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AE,CAAC,EAAE,KAAK,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAC5D,IAAI,CAAC,EAAE,EAAE;gBACP,IAAI,CAAC,IAAI,CAAC,uBAAuB,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;gBACnD,OAAO,IAAI,CAAC;aACb;YAED,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC;YAEvB,8BAA8B;YAC9B,MAAM,GAAG,GAAG,4BAA4B,OAAO,EAAE,CAAC;YAClD,IAAI,CAAC,GAAG,CAAC,YAAY,GAAG,EAAE,CAAC,CAAC;YAC5B,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,GAAG,MAAM,KAAK,CAAC,GAAG,EAAE;gBAC9C,MAAM,EAAE,MAAM;aACf,CAAC,CAAC;YAEH,IAAI,MAAM,KAAK,GAAG,EAAE;gBAClB,IAAI,CAAC,IAAI,CAAC,SAAS,MAAM,MAAM,UAAU,EAAE,CAAC,CAAC;aAC9C;QACH,CAAC,CAAC,CAAC;IACL,CAAC;;AApCe,mBAAc,GAAG,IAAI,CAAC;AACtB,gBAAW,GAAG,kBAAkB,CAAC;AAEjC,SAAI,GAAG;IACrB,IAAI,EAAE,WAAI,CAAC,MAAM,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,gBAAgB,EAAE,CAAC;CACrE,CAAC;kBANiB,IAAI"}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
+
import { type FunctionDef } from '@dxos/functions';
|
|
1
2
|
import { BaseCommand } from '../../base-command';
|
|
2
|
-
export declare const printFunctions: (functions:
|
|
3
|
-
/**
|
|
4
|
-
* @deprecated
|
|
5
|
-
*/
|
|
3
|
+
export declare const printFunctions: (functions: FunctionDef[], flags?: {}) => void;
|
|
6
4
|
export default class List extends BaseCommand<typeof List> {
|
|
7
5
|
static enableJsonFlag: boolean;
|
|
8
6
|
static description: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../../src/commands/function/list.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../../src/commands/function/list.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,KAAK,WAAW,EAAyB,MAAM,iBAAiB,CAAC;AAE1E,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAIjD,eAAO,MAAM,cAAc,cAAe,WAAW,EAAE,qBAkBtD,CAAC;AAEF,MAAM,CAAC,OAAO,OAAO,IAAK,SAAQ,WAAW,CAAC,OAAO,IAAI,CAAC;IACxD,OAAgB,cAAc,UAAQ;IACtC,OAAgB,WAAW,SAAqB;IAE1C,GAAG,IAAI,OAAO,CAAC,GAAG,CAAC;CAe1B"}
|
|
@@ -5,40 +5,42 @@
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.printFunctions = void 0;
|
|
7
7
|
const core_1 = require("@oclif/core");
|
|
8
|
-
const
|
|
9
|
-
const
|
|
8
|
+
const js_yaml_1 = require("js-yaml");
|
|
9
|
+
const promises_1 = require("node:fs/promises");
|
|
10
|
+
const node_path_1 = require("node:path");
|
|
11
|
+
const config_1 = require("@dxos/config");
|
|
10
12
|
const base_command_1 = require("../../base-command");
|
|
13
|
+
// TODO(burdon): List stats.
|
|
14
|
+
// TODO(burdon): List triggers.
|
|
11
15
|
const printFunctions = (functions, flags = {}) => {
|
|
12
16
|
core_1.ux.table(functions, {
|
|
17
|
+
id: {
|
|
18
|
+
header: 'id',
|
|
19
|
+
},
|
|
13
20
|
name: {
|
|
14
21
|
header: 'name',
|
|
15
22
|
},
|
|
16
|
-
|
|
17
|
-
header: '
|
|
18
|
-
},
|
|
19
|
-
createdAt: {
|
|
20
|
-
header: 'createdAt',
|
|
21
|
-
get: (row) => (0, date_fns_1.format)((0, date_fns_1.parseISO)(row.createdAt), 'MM/dd/yyyy HH:mm'),
|
|
22
|
-
},
|
|
23
|
-
invocationCount: {
|
|
24
|
-
header: 'invocations',
|
|
23
|
+
description: {
|
|
24
|
+
header: 'description',
|
|
25
25
|
},
|
|
26
26
|
}, {
|
|
27
27
|
...flags,
|
|
28
28
|
});
|
|
29
29
|
};
|
|
30
30
|
exports.printFunctions = printFunctions;
|
|
31
|
-
/**
|
|
32
|
-
* @deprecated
|
|
33
|
-
*/
|
|
34
31
|
class List extends base_command_1.BaseCommand {
|
|
35
|
-
// static override state = 'deprecated';
|
|
36
32
|
async run() {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
33
|
+
return await this.execWithClient(async (client) => {
|
|
34
|
+
var _a, _b, _c, _d, _e, _f;
|
|
35
|
+
// TODO(dmaretskyi): Move into system service?
|
|
36
|
+
const config = new config_1.Config(JSON.parse((await client.services.services.DevtoolsHost.getConfig()).config));
|
|
37
|
+
const functionsConfig = (_c = (_b = (_a = config.values.runtime) === null || _a === void 0 ? void 0 : _a.agent) === null || _b === void 0 ? void 0 : _b.plugins) === null || _c === void 0 ? void 0 : _c.find((plugin) => plugin.id === 'dxos.org/agent/plugin/functions');
|
|
38
|
+
const file = (_f = (_d = this.flags.manifest) !== null && _d !== void 0 ? _d : (_e = functionsConfig === null || functionsConfig === void 0 ? void 0 : functionsConfig.config) === null || _e === void 0 ? void 0 : _e.manifest) !== null && _f !== void 0 ? _f : (0, node_path_1.join)(process.cwd(), 'functions.yml');
|
|
39
|
+
const manifest = (0, js_yaml_1.load)(await (0, promises_1.readFile)(file, 'utf8'));
|
|
40
|
+
const { functions } = manifest;
|
|
41
|
+
(0, exports.printFunctions)(functions);
|
|
42
|
+
return manifest;
|
|
43
|
+
});
|
|
42
44
|
}
|
|
43
45
|
}
|
|
44
46
|
List.enableJsonFlag = true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list.js","sourceRoot":"","sources":["../../../../src/commands/function/list.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,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AAf,eAAe,uBAAf,eAAe,CAAE,MAAM,0CAAE,QAAQ,mCAAI,IAAA,gBAAI,EAAC,OAAO,CAAC,GAAG,EAAE,EAAE,eAAe,CAAC,CAAC;YAC9G,MAAM,QAAQ,GAAG,IAAA,cAAI,EAAC,MAAM,IAAA,mBAAQ,EAAC,IAAI,EAAE,MAAM,CAAC,CAAqB,CAAC;YACxE,MAAM,EAAE,SAAS,EAAE,GAAG,QAAQ,CAAC;YAC/B,IAAA,sBAAc,EAAC,SAAS,CAAC,CAAC;YAC1B,OAAO,QAAQ,CAAC;QAClB,CAAC,CAAC,CAAC;IACL,CAAC;;AAjBe,mBAAc,GAAG,IAAI,CAAC;AACtB,gBAAW,GAAG,iBAAiB,CAAC;kBAF7B,IAAI"}
|
|
@@ -5,6 +5,18 @@ export default class Create extends BaseCommand<typeof Create> {
|
|
|
5
5
|
static args: {
|
|
6
6
|
displayName: import("@oclif/core/lib/interfaces/parser").Arg<string, Record<string, unknown>>;
|
|
7
7
|
};
|
|
8
|
+
static flags: {
|
|
9
|
+
managedAgent: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
10
|
+
deviceLabel: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
11
|
+
json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
12
|
+
'dry-run': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
13
|
+
verbose: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
14
|
+
profile: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
15
|
+
config: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
16
|
+
'no-agent': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
17
|
+
timeout: import("@oclif/core/lib/interfaces").OptionFlag<number, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
18
|
+
'no-wait': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
19
|
+
};
|
|
8
20
|
run(): Promise<any>;
|
|
9
21
|
}
|
|
10
22
|
//# sourceMappingURL=create.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../../../src/commands/halo/create.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../../../src/commands/halo/create.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD,MAAM,CAAC,OAAO,OAAO,MAAO,SAAQ,WAAW,CAAC,OAAO,MAAM,CAAC;IAC5D,OAAgB,cAAc,UAAQ;IACtC,OAAgB,WAAW,SAAkB;IAC7C,OAAgB,IAAI;;MAElB;IAEF,OAAgB,KAAK;;;;;;;;;;;MAInB;IAEI,GAAG,IAAI,OAAO,CAAC,GAAG,CAAC;CAoB1B"}
|
|
@@ -4,17 +4,22 @@
|
|
|
4
4
|
//
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const core_1 = require("@oclif/core");
|
|
7
|
+
const credentials_1 = require("@dxos/protocols/proto/dxos/halo/credentials");
|
|
7
8
|
const base_command_1 = require("../../base-command");
|
|
8
9
|
class Create extends base_command_1.BaseCommand {
|
|
9
10
|
async run() {
|
|
10
11
|
const { displayName } = this.args;
|
|
12
|
+
const { managedAgent, deviceLabel } = this.flags;
|
|
11
13
|
return await this.execWithClient(async (client) => {
|
|
12
14
|
let identity = client.halo.identity.get();
|
|
13
15
|
if (identity) {
|
|
14
16
|
this.log('Identity already initialized.');
|
|
15
17
|
}
|
|
16
18
|
else {
|
|
17
|
-
identity = await client.halo.createIdentity({ displayName }
|
|
19
|
+
identity = await client.halo.createIdentity({ displayName }, {
|
|
20
|
+
type: managedAgent ? credentials_1.DeviceType.AGENT_MANAGED : credentials_1.DeviceType.AGENT,
|
|
21
|
+
...(deviceLabel ? { label: deviceLabel } : {}),
|
|
22
|
+
});
|
|
18
23
|
return { identityKey: identity.identityKey.toHex(), displayName };
|
|
19
24
|
}
|
|
20
25
|
});
|
|
@@ -25,5 +30,10 @@ Create.description = 'Create HALO.';
|
|
|
25
30
|
Create.args = {
|
|
26
31
|
displayName: core_1.Args.string({ description: 'Display name', required: true }),
|
|
27
32
|
};
|
|
33
|
+
Create.flags = {
|
|
34
|
+
...base_command_1.BaseCommand.flags,
|
|
35
|
+
managedAgent: core_1.Flags.boolean({ description: 'Managed agent', default: false }),
|
|
36
|
+
deviceLabel: core_1.Flags.string({ description: 'Device label' }),
|
|
37
|
+
};
|
|
28
38
|
exports.default = Create;
|
|
29
39
|
//# sourceMappingURL=create.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create.js","sourceRoot":"","sources":["../../../../src/commands/halo/create.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;AAEF,
|
|
1
|
+
{"version":3,"file":"create.js","sourceRoot":"","sources":["../../../../src/commands/halo/create.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;AAEF,sCAA0C;AAG1C,6EAAyE;AAEzE,qDAAiD;AAEjD,MAAqB,MAAO,SAAQ,0BAA0B;IAa5D,KAAK,CAAC,GAAG;QACP,MAAM,EAAE,WAAW,EAAE,GAAG,IAAI,CAAC,IAAI,CAAC;QAClC,MAAM,EAAE,YAAY,EAAE,WAAW,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;QAEjD,OAAO,MAAM,IAAI,CAAC,cAAc,CAAC,KAAK,EAAE,MAAc,EAAE,EAAE;YACxD,IAAI,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC;YAC1C,IAAI,QAAQ,EAAE;gBACZ,IAAI,CAAC,GAAG,CAAC,+BAA+B,CAAC,CAAC;aAC3C;iBAAM;gBACL,QAAQ,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,cAAc,CACzC,EAAE,WAAW,EAAE,EACf;oBACE,IAAI,EAAE,YAAY,CAAC,CAAC,CAAC,wBAAU,CAAC,aAAa,CAAC,CAAC,CAAC,wBAAU,CAAC,KAAK;oBAChE,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;iBAC/C,CACF,CAAC;gBACF,OAAO,EAAE,WAAW,EAAE,QAAQ,CAAC,WAAW,CAAC,KAAK,EAAE,EAAE,WAAW,EAAE,CAAC;aACnE;QACH,CAAC,CAAC,CAAC;IACL,CAAC;;AA/Be,qBAAc,GAAG,IAAI,CAAC;AACtB,kBAAW,GAAG,cAAc,CAAC;AAC7B,WAAI,GAAG;IACrB,WAAW,EAAE,WAAI,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,cAAc,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;CAC1E,CAAC;AAEc,YAAK,GAAG;IACtB,GAAG,0BAAW,CAAC,KAAK;IACpB,YAAY,EAAE,YAAK,CAAC,OAAO,CAAC,EAAE,WAAW,EAAE,eAAe,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;IAC7E,WAAW,EAAE,YAAK,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,cAAc,EAAE,CAAC;CAC3D,CAAC;kBAXiB,MAAM"}
|
|
@@ -6,6 +6,8 @@ export default class Join extends BaseCommand<typeof Join> {
|
|
|
6
6
|
invitation: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
7
7
|
secret: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
8
8
|
timeout: import("@oclif/core/lib/interfaces").OptionFlag<number, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
9
|
+
deviceLabel: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
10
|
+
managedAgent: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
9
11
|
json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
10
12
|
'dry-run': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
11
13
|
verbose: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"join.d.ts","sourceRoot":"","sources":["../../../../src/commands/halo/join.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"join.d.ts","sourceRoot":"","sources":["../../../../src/commands/halo/join.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAGjD,MAAM,CAAC,OAAO,OAAO,IAAK,SAAQ,WAAW,CAAC,OAAO,IAAI,CAAC;IACxD,OAAgB,cAAc,UAAQ;IACtC,OAAgB,WAAW,SAAoC;IAC/D,OAAgB,KAAK;;;;;;;;;;;;;MAgBnB;IAEI,GAAG,IAAI,OAAO,CAAC,GAAG,CAAC;CAqD1B"}
|
|
@@ -10,11 +10,12 @@ const core_1 = require("@oclif/core");
|
|
|
10
10
|
const chalk_1 = __importDefault(require("chalk"));
|
|
11
11
|
const async_1 = require("@dxos/async");
|
|
12
12
|
const invitations_1 = require("@dxos/client/invitations");
|
|
13
|
+
const credentials_1 = require("@dxos/protocols/proto/dxos/halo/credentials");
|
|
13
14
|
const base_command_1 = require("../../base-command");
|
|
14
15
|
const util_1 = require("../../util");
|
|
15
16
|
class Join extends base_command_1.BaseCommand {
|
|
16
17
|
async run() {
|
|
17
|
-
let { invitation: encoded, secret } = this.flags;
|
|
18
|
+
let { invitation: encoded, secret, deviceLabel, managedAgent } = this.flags;
|
|
18
19
|
return await this.execWithClient(async (client) => {
|
|
19
20
|
var _a;
|
|
20
21
|
if (client.halo.identity.get()) {
|
|
@@ -34,7 +35,10 @@ class Join extends base_command_1.BaseCommand {
|
|
|
34
35
|
try {
|
|
35
36
|
invitation = await (0, async_1.asyncTimeout)(Promise.all([
|
|
36
37
|
(0, util_1.acceptInvitation)({
|
|
37
|
-
observable: client.halo.join(invitations_1.InvitationEncoder.decode(encoded)
|
|
38
|
+
observable: client.halo.join(invitations_1.InvitationEncoder.decode(encoded), {
|
|
39
|
+
type: managedAgent ? credentials_1.DeviceType.AGENT_MANAGED : credentials_1.DeviceType.AGENT,
|
|
40
|
+
...(deviceLabel ? { label: deviceLabel } : {}),
|
|
41
|
+
}),
|
|
38
42
|
callbacks: {
|
|
39
43
|
onConnecting: async () => core_1.ux.action.stop(),
|
|
40
44
|
onReadyForAuth: async () => secret !== null && secret !== void 0 ? secret : core_1.ux.prompt((0, chalk_1.default) `\n{red Secret}`),
|
|
@@ -72,6 +76,10 @@ Join.flags = {
|
|
|
72
76
|
description: 'Timeout in seconds',
|
|
73
77
|
default: 300,
|
|
74
78
|
}),
|
|
79
|
+
deviceLabel: core_1.Flags.string({
|
|
80
|
+
description: 'Set device label',
|
|
81
|
+
}),
|
|
82
|
+
managedAgent: core_1.Flags.boolean({ description: 'Managed agent', default: false }),
|
|
75
83
|
};
|
|
76
84
|
exports.default = Join;
|
|
77
85
|
//# sourceMappingURL=join.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"join.js","sourceRoot":"","sources":["../../../../src/commands/halo/join.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;;;AAEF,sCAAwC;AACxC,kDAA0B;AAE1B,uCAAoD;AAEpD,0DAA8E;
|
|
1
|
+
{"version":3,"file":"join.js","sourceRoot":"","sources":["../../../../src/commands/halo/join.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;;;AAEF,sCAAwC;AACxC,kDAA0B;AAE1B,uCAAoD;A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AM,CAAC;QACvB,WAAW,EAAE,iBAAiB;KAC/B,CAAC;IACF,MAAM,EAAE,YAAK,CAAC,MAAM,CAAC;QACnB,WAAW,EAAE,mBAAmB;KACjC,CAAC;IACF,OAAO,EAAE,YAAK,CAAC,OAAO,CAAC;QACrB,WAAW,EAAE,oBAAoB;QACjC,OAAO,EAAE,GAAG;KACb,CAAC;IACF,WAAW,EAAE,YAAK,CAAC,MAAM,CAAC;QACxB,WAAW,EAAE,kBAAkB;KAChC,CAAC;IACF,YAAY,EAAE,YAAK,CAAC,OAAO,CAAC,EAAE,WAAW,EAAE,eAAe,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;CAC9E,CAAC;kBAnBiB,IAAI"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { type Device } from '@dxos/client/halo';
|
|
2
2
|
export declare const mapDevices: (devices: Device[], truncateKeys?: boolean) => {
|
|
3
|
+
label: string | undefined;
|
|
4
|
+
type: string;
|
|
3
5
|
key: string;
|
|
4
6
|
kind: import("@dxos/client/halo").DeviceKind;
|
|
5
7
|
platform: string | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"devices.d.ts","sourceRoot":"","sources":["../../../src/util/devices.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"devices.d.ts","sourceRoot":"","sources":["../../../src/util/devices.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAKhD,eAAO,MAAM,UAAU,YAAa,MAAM,EAAE;;;;;;;;;;GAY3C,CAAC;AAEF,eAAO,MAAM,YAAY,YAAa,MAAM,EAAE,qBAkB7C,CAAC"}
|
package/dist/src/util/devices.js
CHANGED
|
@@ -5,24 +5,29 @@
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.printDevices = exports.mapDevices = void 0;
|
|
7
7
|
const core_1 = require("@oclif/core");
|
|
8
|
+
const credentials_1 = require("@dxos/protocols/proto/dxos/halo/credentials");
|
|
8
9
|
const types_1 = require("./types");
|
|
9
10
|
const mapDevices = (devices, truncateKeys = false) => {
|
|
10
11
|
return devices.map((device) => {
|
|
11
|
-
var _a, _b, _c, _d, _e;
|
|
12
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
12
13
|
return ({
|
|
14
|
+
label: (_a = device.profile) === null || _a === void 0 ? void 0 : _a.label,
|
|
15
|
+
type: ((_b = device.profile) === null || _b === void 0 ? void 0 : _b.type) ? credentials_1.DeviceType[(_c = device.profile) === null || _c === void 0 ? void 0 : _c.type] : 'UNKNOWN',
|
|
13
16
|
key: (0, types_1.maybeTruncateKey)(device.deviceKey, truncateKeys),
|
|
14
17
|
kind: device.kind,
|
|
15
|
-
platform: (
|
|
16
|
-
platformVersion: (
|
|
17
|
-
architecture: (
|
|
18
|
-
os: (
|
|
19
|
-
osVersion: (
|
|
18
|
+
platform: (_d = device.profile) === null || _d === void 0 ? void 0 : _d.platform,
|
|
19
|
+
platformVersion: (_e = device.profile) === null || _e === void 0 ? void 0 : _e.platformVersion,
|
|
20
|
+
architecture: (_f = device.profile) === null || _f === void 0 ? void 0 : _f.architecture,
|
|
21
|
+
os: (_g = device.profile) === null || _g === void 0 ? void 0 : _g.os,
|
|
22
|
+
osVersion: (_h = device.profile) === null || _h === void 0 ? void 0 : _h.osVersion,
|
|
20
23
|
});
|
|
21
24
|
});
|
|
22
25
|
};
|
|
23
26
|
exports.mapDevices = mapDevices;
|
|
24
27
|
const printDevices = (devices, flags = {}) => {
|
|
25
28
|
core_1.ux.table((0, exports.mapDevices)(devices, true), {
|
|
29
|
+
label: { header: 'label' },
|
|
30
|
+
type: { header: 'type' },
|
|
26
31
|
key: { header: 'key' },
|
|
27
32
|
kind: { header: 'kind' },
|
|
28
33
|
platform: { header: 'platform' },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"devices.js","sourceRoot":"","sources":["../../../src/util/devices.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;AAEF,sCAAiC;
|
|
1
|
+
{"version":3,"file":"devices.js","sourceRoot":"","sources":["../../../src/util/devices.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;AAEF,sCAAiC;AAGjC,6EAAyE;AAEzE,mCAA2C;AAEpC,MAAM,UAAU,GAAG,CAAC,OAAiB,EAAE,YAAY,GAAG,KAAK,EAAE,EAAE;IACpE,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE;;QAAC,OAAA,CAAC;YAC9B,KAAK,EAAE,MAAA,MAAM,CAAC,OAAO,0CAAE,KAAK;YAC5B,IAAI,EAAE,CAAA,MAAA,MAAM,CAAC,OAAO,0CAAE,IAAI,EAAC,CAAC,CAAC,wBAAU,CAAC,MAAA,MAAM,CAAC,OAAO,0CAAE,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS;YACzE,GAAG,EAAE,IAAA,wBAAgB,EAAC,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC;YACrD,IAAI,EAAE,MAAM,CAAC,IAAI;YACjB,QAAQ,EAAE,MAAA,MAAM,CAAC,OAAO,0CAAE,QAAQ;YAClC,eAAe,EAAE,MAAA,MAAM,CAAC,OAAO,0CAAE,eAAe;YAChD,YAAY,EAAE,MAAA,MAAM,CAAC,OAAO,0CAAE,YAAY;YAC1C,EAAE,EAAE,MAAA,MAAM,CAAC,OAAO,0CAAE,EAAE;YACtB,SAAS,EAAE,MAAA,MAAM,CAAC,OAAO,0CAAE,SAAS;SACrC,CAAC,CAAA;KAAA,CAAC,CAAC;AACN,CAAC,CAAC;AAZW,QAAA,UAAU,cAYrB;AAEK,MAAM,YAAY,GAAG,CAAC,OAAiB,EAAE,KAAK,GAAG,EAAE,EAAE,EAAE;IAC5D,SAAE,CAAC,KAAK,CACN,IAAA,kBAAU,EAAC,OAAO,EAAE,IAAI,CAAC,EACzB;QACE,KAAK,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE;QAC1B,IAAI,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE;QACxB,GAAG,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE;QACtB,IAAI,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE;QACxB,QAAQ,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE;QAChC,eAAe,EAAE,EAAE,MAAM,EAAE,iBAAiB,EAAE;QAC9C,YAAY,EAAE,EAAE,MAAM,EAAE,cAAc,EAAE;QACxC,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE;QACpB,SAAS,EAAE,EAAE,MAAM,EAAE,WAAW,EAAE;KACnC,EACD;QACE,GAAG,KAAK;KACT,CACF,CAAC;AACJ,CAAC,CAAC;AAlBW,QAAA,YAAY,gBAkBvB"}
|
package/oclif.manifest.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.4.
|
|
2
|
+
"version": "0.4.6-main.20d1ec4",
|
|
3
3
|
"commands": {
|
|
4
4
|
"agent:list": {
|
|
5
5
|
"id": "agent:list",
|
|
@@ -1636,6 +1636,7 @@
|
|
|
1636
1636
|
"name": "label",
|
|
1637
1637
|
"type": "option",
|
|
1638
1638
|
"description": "Set device label",
|
|
1639
|
+
"required": true,
|
|
1639
1640
|
"multiple": false
|
|
1640
1641
|
}
|
|
1641
1642
|
},
|
|
@@ -1759,7 +1760,6 @@
|
|
|
1759
1760
|
"pluginName": "@dxos/cli",
|
|
1760
1761
|
"pluginAlias": "@dxos/cli",
|
|
1761
1762
|
"pluginType": "core",
|
|
1762
|
-
"state": "deprecated",
|
|
1763
1763
|
"aliases": [],
|
|
1764
1764
|
"flags": {
|
|
1765
1765
|
"json": {
|
|
@@ -2003,8 +2003,7 @@
|
|
|
2003
2003
|
"json": {
|
|
2004
2004
|
"name": "json",
|
|
2005
2005
|
"type": "boolean",
|
|
2006
|
-
"description": "
|
|
2007
|
-
"helpGroup": "GLOBAL",
|
|
2006
|
+
"description": "Output as JSON.",
|
|
2008
2007
|
"allowNo": false
|
|
2009
2008
|
},
|
|
2010
2009
|
"dry-run": {
|
|
@@ -2062,6 +2061,18 @@
|
|
|
2062
2061
|
"type": "boolean",
|
|
2063
2062
|
"description": "Do not wait for space to be ready.",
|
|
2064
2063
|
"allowNo": false
|
|
2064
|
+
},
|
|
2065
|
+
"managedAgent": {
|
|
2066
|
+
"name": "managedAgent",
|
|
2067
|
+
"type": "boolean",
|
|
2068
|
+
"description": "Managed agent",
|
|
2069
|
+
"allowNo": false
|
|
2070
|
+
},
|
|
2071
|
+
"deviceLabel": {
|
|
2072
|
+
"name": "deviceLabel",
|
|
2073
|
+
"type": "option",
|
|
2074
|
+
"description": "Device label",
|
|
2075
|
+
"multiple": false
|
|
2065
2076
|
}
|
|
2066
2077
|
},
|
|
2067
2078
|
"args": {
|
|
@@ -2226,6 +2237,18 @@
|
|
|
2226
2237
|
"type": "option",
|
|
2227
2238
|
"description": "Invitation secret",
|
|
2228
2239
|
"multiple": false
|
|
2240
|
+
},
|
|
2241
|
+
"deviceLabel": {
|
|
2242
|
+
"name": "deviceLabel",
|
|
2243
|
+
"type": "option",
|
|
2244
|
+
"description": "Set device label",
|
|
2245
|
+
"multiple": false
|
|
2246
|
+
},
|
|
2247
|
+
"managedAgent": {
|
|
2248
|
+
"name": "managedAgent",
|
|
2249
|
+
"type": "boolean",
|
|
2250
|
+
"description": "Managed agent",
|
|
2251
|
+
"allowNo": false
|
|
2229
2252
|
}
|
|
2230
2253
|
},
|
|
2231
2254
|
"args": {}
|
|
@@ -3761,7 +3784,7 @@
|
|
|
3761
3784
|
"type": "option",
|
|
3762
3785
|
"description": "Tunnel name",
|
|
3763
3786
|
"multiple": false,
|
|
3764
|
-
"default": "
|
|
3787
|
+
"default": "video-avocado-delta-alpha"
|
|
3765
3788
|
}
|
|
3766
3789
|
},
|
|
3767
3790
|
"args": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/cli",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.6-main.20d1ec4",
|
|
4
4
|
"description": "DXOS CLI",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"dxos",
|
|
@@ -46,28 +46,28 @@
|
|
|
46
46
|
"react": "^18.2.0",
|
|
47
47
|
"uuid": "^8.3.2",
|
|
48
48
|
"ws": "^8.14.2",
|
|
49
|
-
"@dxos/agent": "0.4.
|
|
50
|
-
"@dxos/async": "0.4.
|
|
51
|
-
"@dxos/bare-template": "0.4.
|
|
52
|
-
"@dxos/client": "0.4.
|
|
53
|
-
"@dxos/client-protocol": "0.4.
|
|
54
|
-
"@dxos/
|
|
55
|
-
"@dxos/
|
|
56
|
-
"@dxos/
|
|
57
|
-
"@dxos/debug": "0.4.
|
|
58
|
-
"@dxos/
|
|
59
|
-
"@dxos/invariant": "0.4.
|
|
60
|
-
"@dxos/
|
|
61
|
-
"@dxos/
|
|
62
|
-
"@dxos/network-manager": "0.4.
|
|
63
|
-
"@dxos/observability": "0.4.
|
|
64
|
-
"@dxos/plate": "0.4.
|
|
65
|
-
"@dxos/
|
|
66
|
-
"@dxos/
|
|
67
|
-
"@dxos/
|
|
68
|
-
"@dxos/
|
|
69
|
-
"@dxos/
|
|
70
|
-
"@dxos/
|
|
49
|
+
"@dxos/agent": "0.4.6-main.20d1ec4",
|
|
50
|
+
"@dxos/async": "0.4.6-main.20d1ec4",
|
|
51
|
+
"@dxos/bare-template": "0.4.6-main.20d1ec4",
|
|
52
|
+
"@dxos/client": "0.4.6-main.20d1ec4",
|
|
53
|
+
"@dxos/client-protocol": "0.4.6-main.20d1ec4",
|
|
54
|
+
"@dxos/client-services": "0.4.6-main.20d1ec4",
|
|
55
|
+
"@dxos/context": "0.4.6-main.20d1ec4",
|
|
56
|
+
"@dxos/config": "0.4.6-main.20d1ec4",
|
|
57
|
+
"@dxos/debug": "0.4.6-main.20d1ec4",
|
|
58
|
+
"@dxos/functions": "0.4.6-main.20d1ec4",
|
|
59
|
+
"@dxos/invariant": "0.4.6-main.20d1ec4",
|
|
60
|
+
"@dxos/log": "0.4.6-main.20d1ec4",
|
|
61
|
+
"@dxos/hello-template": "0.4.6-main.20d1ec4",
|
|
62
|
+
"@dxos/network-manager": "0.4.6-main.20d1ec4",
|
|
63
|
+
"@dxos/observability": "0.4.6-main.20d1ec4",
|
|
64
|
+
"@dxos/plate": "0.4.6-main.20d1ec4",
|
|
65
|
+
"@dxos/process": "0.4.6-main.20d1ec4",
|
|
66
|
+
"@dxos/protocols": "0.4.6-main.20d1ec4",
|
|
67
|
+
"@dxos/rpc": "0.4.6-main.20d1ec4",
|
|
68
|
+
"@dxos/random": "0.4.6-main.20d1ec4",
|
|
69
|
+
"@dxos/tasks-template": "0.4.6-main.20d1ec4",
|
|
70
|
+
"@dxos/util": "0.4.6-main.20d1ec4"
|
|
71
71
|
},
|
|
72
72
|
"devDependencies": {
|
|
73
73
|
"@oclif/test": "^2.3.31",
|