Changes to run console-app with laconicd #2
10
package.json
10
package.json
@ -30,11 +30,11 @@
|
||||
"lerna": "^3.19.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@dxos/cli": "2.0.20-alpha.0",
|
||||
"@dxos/cli-app": "2.0.20-alpha.0",
|
||||
"@dxos/cli-bot": "2.0.20-alpha.0",
|
||||
"@dxos/cli-data": "2.0.20-alpha.0",
|
||||
"@dxos/cli-wns": "2.0.20-alpha.0",
|
||||
"@dxos/cli": "0.1.13",
|
||||
"@dxos/cli-app": "2.20.4",
|
||||
"@dxos/cli-bot": "2.20.4",
|
||||
"@dxos/cli-party": "2.20.4",
|
||||
"@dxos/cli-dxns": "2.20.4",
|
||||
"babel-eslint": "^10.0.3",
|
||||
"eslint": "^6.7.2",
|
||||
"eslint-config-semistandard": "^15.0.0",
|
||||
|
@ -29,9 +29,18 @@
|
||||
"@apollo/react-components": "^3.1.5",
|
||||
"@apollo/react-hooks": "^3.1.5",
|
||||
"@babel/runtime": "^7.8.7",
|
||||
"@dxos/debug": "^1.0.0-beta.2",
|
||||
"@dxos/debug": "^1.0.0-beta.78",
|
||||
"@dxos/gem-core": "^1.0.0-beta.25",
|
||||
"@dxos/react-ux": "^1.1.0-beta.0",
|
||||
"@dxos/react-components": "~2.31.4",
|
||||
"@emotion/core": "^11.0.0",
|
||||
"@emotion/react": "^11.4.1",
|
||||
"@emotion/styled": "^11.3.0",
|
||||
"@mui/icons-material": "^5.0.0",
|
||||
"@mui/lab": "^5.0.0-alpha.51",
|
||||
"@mui/material": "^5.0.0",
|
||||
"@mui/styles": "^5.0.0",
|
||||
"@mui/system": "^5.0.0",
|
||||
"@mui/x-data-grid": "^5.0.0-beta.1",
|
||||
"@material-ui/core": "^4.10.0",
|
||||
"@material-ui/icons": "^4.9.1",
|
||||
"@material-ui/lab": "^4.0.0-alpha.54",
|
||||
@ -39,7 +48,6 @@
|
||||
"@visx/network": "^1.0.0",
|
||||
"@visx/tooltip": "^1.0.0",
|
||||
"@visx/zoom": "^1.0.0",
|
||||
"@wirelineio/registry-client": "^1.1.0-beta.2",
|
||||
"apollo-cache-inmemory": "^1.6.6",
|
||||
"apollo-client": "^2.6.10",
|
||||
"apollo-link": "^1.2.14",
|
||||
@ -53,8 +61,8 @@
|
||||
"lodash.defaultsdeep": "^4.6.1",
|
||||
"lodash.get": "^4.4.2",
|
||||
"moment": "^2.26.0",
|
||||
"react": "^16.13.1",
|
||||
"react-dom": "^16.13.1",
|
||||
"react": "^17.0.2",
|
||||
"react-dom": "^17.0.2",
|
||||
"react-router": "^5.2.0",
|
||||
"react-router-dom": "^5.2.0",
|
||||
"source-map-support": "^0.5.12"
|
||||
|
@ -31,9 +31,9 @@ const getAppUrl = (config, { wrn }) => {
|
||||
* @param {string} name
|
||||
* @param {string} [text]
|
||||
*/
|
||||
const AppLink = ({ config, wrn, text }) => {
|
||||
const fullURL = getAppUrl(config, { wrn });
|
||||
return <Link href={fullURL} target={wrn}>{text || wrn}</Link>;
|
||||
const AppLink = ({ config, crn, text }) => {
|
||||
const fullURL = getAppUrl(config, { crn });
|
||||
return <Link href={fullURL} target={crn}>{text || crn}</Link>;
|
||||
};
|
||||
|
||||
export default AppLink;
|
||||
|
@ -5,7 +5,7 @@
|
||||
import React from 'react';
|
||||
import { makeStyles } from '@material-ui/core';
|
||||
|
||||
import { JsonTreeView } from '@dxos/react-ux';
|
||||
import { JsonTreeView } from '@dxos/react-components';
|
||||
|
||||
import { omitDeep } from '../util/omit';
|
||||
|
||||
|
@ -37,7 +37,7 @@ const useStyles = makeStyles(theme => ({
|
||||
|
||||
const types = [
|
||||
{ key: 'authority', label: 'Authority' },
|
||||
{ key: 'wrn', label: 'WRN' }
|
||||
{ key: 'crn', label: 'CRN' }
|
||||
];
|
||||
|
||||
export const LookupType = ({ scope = types[0].key, onChange }) => {
|
||||
@ -87,9 +87,9 @@ const RegistryLookup = ({ scope }) => {
|
||||
const getNames = () => {
|
||||
let ret;
|
||||
switch (scope) {
|
||||
case 'wrn': {
|
||||
case 'crn': {
|
||||
ret = [];
|
||||
records.forEach(item => ret.push(...item.names));
|
||||
records.forEach(item => ret.push(...(item.names || [])));
|
||||
break;
|
||||
}
|
||||
|
||||
@ -98,9 +98,9 @@ const RegistryLookup = ({ scope }) => {
|
||||
// TODO(telackey): Should we be able to query WNS for a list of authorities?
|
||||
const names = new Set();
|
||||
for (const record of records) {
|
||||
for (const name of record.names) {
|
||||
// TODO(telackey): We need a general purpose WRN handling library.
|
||||
names.add(name.replace('wrn://', '').split('/')[0]);
|
||||
for (const name of (record.names || [])) {
|
||||
// TODO(telackey): We need a general purpose CRN handling library.
|
||||
names.add(name.replace('crn://', '').split('/')[0]);
|
||||
}
|
||||
}
|
||||
ret = Array.from(names.values());
|
||||
@ -120,7 +120,7 @@ const RegistryLookup = ({ scope }) => {
|
||||
|
||||
let result;
|
||||
switch (scope) {
|
||||
case 'wrn':
|
||||
case 'crn':
|
||||
result = await registry.lookupNames([newInputValue], true);
|
||||
break;
|
||||
|
||||
|
@ -31,13 +31,13 @@ const useStyles = makeStyles(theme => ({
|
||||
|
||||
const types = [
|
||||
{ key: null, label: 'ALL' },
|
||||
{ key: 'wrn:kube', label: 'Kube' },
|
||||
{ key: 'wrn:service', label: 'Service' },
|
||||
{ key: 'wrn:app', label: 'App' },
|
||||
{ key: 'wrn:bot', label: 'Bot' },
|
||||
{ key: 'wrn:bot-factory', label: 'Bot Factory' },
|
||||
{ key: 'wrn:file', label: 'File' },
|
||||
{ key: 'wrn:type', label: 'Type' }
|
||||
{ key: 'crn:kube', label: 'Kube' },
|
||||
{ key: 'crn:service', label: 'Service' },
|
||||
{ key: 'crn:app', label: 'App' },
|
||||
{ key: 'crn:bot', label: 'Bot' },
|
||||
{ key: 'crn:bot-factory', label: 'Bot Factory' },
|
||||
{ key: 'crn:file', label: 'File' },
|
||||
{ key: 'crn:type', label: 'Type' }
|
||||
];
|
||||
|
||||
export const RecordType = ({ type = types[0].key, onChange }) => {
|
||||
@ -104,12 +104,12 @@ const RegistryRecords = ({ type }) => {
|
||||
pkgLink = (<PackageLink config={config} type={type} pkg={pkg} />);
|
||||
}
|
||||
|
||||
if (type === 'wrn:app') {
|
||||
if (type === 'crn:app') {
|
||||
appLinks = (
|
||||
<>
|
||||
{names.map(wrn =>
|
||||
<div key={wrn}>
|
||||
<AppLink config={config} wrn={wrn} />
|
||||
{(names || []).map(crn =>
|
||||
<div key={crn}>
|
||||
<AppLink config={config} crn={crn} />
|
||||
</div>
|
||||
)}
|
||||
</>
|
||||
@ -120,7 +120,7 @@ const RegistryRecords = ({ type }) => {
|
||||
<TableRow key={id} size='small'>
|
||||
<TableCell monospace>{type}</TableCell>
|
||||
<TableCell monospace>
|
||||
{appLinks || names.map(name => <div key={name}>{name}</div>)}
|
||||
{appLinks || (names || []).map(name => <div key={name}>{name}</div>)}
|
||||
</TableCell>
|
||||
<TableCell monospace>
|
||||
{version}
|
||||
|
@ -2,7 +2,7 @@
|
||||
// Copyright 2020 DXOS.org
|
||||
//
|
||||
|
||||
import { Registry } from '@wirelineio/registry-client';
|
||||
import { Registry } from 'laconic-sdk';
|
||||
|
||||
import { getServiceUrl } from '../util/config';
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
import debug from 'debug';
|
||||
|
||||
import { Registry } from '@wirelineio/registry-client';
|
||||
import { Registry } from 'laconic-sdk';
|
||||
|
||||
import { getServiceUrl } from './util/config';
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user