@dxos/cli 0.4.6-main.268e405 → 0.4.6-main.2c76dca
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/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/oclif.manifest.json +2 -3
- package/package.json +23 -23
|
@@ -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,EAAE,eAAe,CAAC,CAAC;YAC9G,MAAM,
|
|
1
|
+
{"version":3,"file":"dev.js","sourceRoot":"","sources":["../../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AI,EAAE,EAAE,EAAE,EAAE,CAAC,IAAA,eAAK,EAAA,KAAK,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC,UAAU,IAAA,gBAAI,EAAC,MAAM,CAAC,KAAM,EAAE,IAAI,CAAC,GAAG,CAAC;yBAC7F,IAAI,CAAC,IAAI,CAAC,CAChB,CAAC;aACH;YAED,gCAAgC;YAChC,MAAM,IAAI,OAAO,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC;QAC9B,CAAC,CAAC,CAAC;IACL,CAAC;;AAvEe,kBAAc,GAAG,IAAI,CAAC;AACtB,eAAW,GAAG,+BAA+B,CAAC;AAC9C,WAAO,GAAG,CAAC,qBAAqB,CAAC,CAAC;AAClC,YAAQ,GAAG;IACzB;QACE,WAAW,EAAE,8BAA8B;QAC3C,OAAO,EAAE,+CAA+C;KACzD;CACF,CAAC;AAEc,SAAK,GAAG;IACtB,GAAG,0BAAW,CAAC,KAAK;IACpB,OAAO,EAAE,YAAK,CAAC,MAAM,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,GAAG,CAAC,EAAE,OAAO,EAAE,CAAC,kBAAkB,CAAC,EAAE,CAAC;IACxF,OAAO,EAAE,YAAK,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,uCAAuC,EAAE,CAAC;IAC/E,QAAQ,EAAE,YAAK,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,0BAA0B,EAAE,CAAC;IACnE,MAAM,EAAE,YAAK,CAAC,OAAO,CAAC,EAAE,WAAW,EAAE,6BAA6B,EAAE,CAAC;CACtE,CAAC;kBAjBiB,GAAG"}
|
|
@@ -5,7 +5,6 @@ import { BaseCommand } from '../../base-command';
|
|
|
5
5
|
export default class Exec extends BaseCommand<typeof Exec> {
|
|
6
6
|
static enableJsonFlag: boolean;
|
|
7
7
|
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.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;AAEF,sCAAmC;
|
|
1
|
+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AE,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,0BAA0B;AAC1B,EAAE;;;AAEF,sCAAiC;AACjC,
|
|
1
|
+
{"version":3,"file":"list.js","sourceRoot":"","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AC,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"}
|
package/oclif.manifest.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.4.6-main.
|
|
2
|
+
"version": "0.4.6-main.2c76dca",
|
|
3
3
|
"commands": {
|
|
4
4
|
"agent:list": {
|
|
5
5
|
"id": "agent:list",
|
|
@@ -1760,7 +1760,6 @@
|
|
|
1760
1760
|
"pluginName": "@dxos/cli",
|
|
1761
1761
|
"pluginAlias": "@dxos/cli",
|
|
1762
1762
|
"pluginType": "core",
|
|
1763
|
-
"state": "deprecated",
|
|
1764
1763
|
"aliases": [],
|
|
1765
1764
|
"flags": {
|
|
1766
1765
|
"json": {
|
|
@@ -3785,7 +3784,7 @@
|
|
|
3785
3784
|
"type": "option",
|
|
3786
3785
|
"description": "Tunnel name",
|
|
3787
3786
|
"multiple": false,
|
|
3788
|
-
"default": "
|
|
3787
|
+
"default": "missouri-timing-stream-william"
|
|
3789
3788
|
}
|
|
3790
3789
|
},
|
|
3791
3790
|
"args": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/cli",
|
|
3
|
-
"version": "0.4.6-main.
|
|
3
|
+
"version": "0.4.6-main.2c76dca",
|
|
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.6-main.
|
|
50
|
-
"@dxos/async": "0.4.6-main.
|
|
51
|
-
"@dxos/bare-template": "0.4.6-main.
|
|
52
|
-
"@dxos/client": "0.4.6-main.
|
|
53
|
-
"@dxos/client-protocol": "0.4.6-main.
|
|
54
|
-
"@dxos/client-services": "0.4.6-main.
|
|
55
|
-
"@dxos/config": "0.4.6-main.
|
|
56
|
-
"@dxos/context": "0.4.6-main.
|
|
57
|
-
"@dxos/debug": "0.4.6-main.
|
|
58
|
-
"@dxos/functions": "0.4.6-main.
|
|
59
|
-
"@dxos/hello-template": "0.4.6-main.
|
|
60
|
-
"@dxos/invariant": "0.4.6-main.
|
|
61
|
-
"@dxos/log": "0.4.6-main.
|
|
62
|
-
"@dxos/network-manager": "0.4.6-main.
|
|
63
|
-
"@dxos/observability": "0.4.6-main.
|
|
64
|
-
"@dxos/
|
|
65
|
-
"@dxos/
|
|
66
|
-
"@dxos/
|
|
67
|
-
"@dxos/random": "0.4.6-main.
|
|
68
|
-
"@dxos/rpc": "0.4.6-main.
|
|
69
|
-
"@dxos/tasks-template": "0.4.6-main.
|
|
70
|
-
"@dxos/util": "0.4.6-main.
|
|
49
|
+
"@dxos/agent": "0.4.6-main.2c76dca",
|
|
50
|
+
"@dxos/async": "0.4.6-main.2c76dca",
|
|
51
|
+
"@dxos/bare-template": "0.4.6-main.2c76dca",
|
|
52
|
+
"@dxos/client": "0.4.6-main.2c76dca",
|
|
53
|
+
"@dxos/client-protocol": "0.4.6-main.2c76dca",
|
|
54
|
+
"@dxos/client-services": "0.4.6-main.2c76dca",
|
|
55
|
+
"@dxos/config": "0.4.6-main.2c76dca",
|
|
56
|
+
"@dxos/context": "0.4.6-main.2c76dca",
|
|
57
|
+
"@dxos/debug": "0.4.6-main.2c76dca",
|
|
58
|
+
"@dxos/functions": "0.4.6-main.2c76dca",
|
|
59
|
+
"@dxos/hello-template": "0.4.6-main.2c76dca",
|
|
60
|
+
"@dxos/invariant": "0.4.6-main.2c76dca",
|
|
61
|
+
"@dxos/log": "0.4.6-main.2c76dca",
|
|
62
|
+
"@dxos/network-manager": "0.4.6-main.2c76dca",
|
|
63
|
+
"@dxos/observability": "0.4.6-main.2c76dca",
|
|
64
|
+
"@dxos/process": "0.4.6-main.2c76dca",
|
|
65
|
+
"@dxos/plate": "0.4.6-main.2c76dca",
|
|
66
|
+
"@dxos/protocols": "0.4.6-main.2c76dca",
|
|
67
|
+
"@dxos/random": "0.4.6-main.2c76dca",
|
|
68
|
+
"@dxos/rpc": "0.4.6-main.2c76dca",
|
|
69
|
+
"@dxos/tasks-template": "0.4.6-main.2c76dca",
|
|
70
|
+
"@dxos/util": "0.4.6-main.2c76dca"
|
|
71
71
|
},
|
|
72
72
|
"devDependencies": {
|
|
73
73
|
"@oclif/test": "^2.3.31",
|