Merge pull request #43 from dxos/release-moon

Release moon
This commit is contained in:
Thomas E Lackey 2020-08-27 13:25:05 -05:00 committed by GitHub
commit ee835e8a82
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
16 changed files with 3017 additions and 3025 deletions

View File

@ -31,7 +31,7 @@ jobs:
yarn lerna publish -y prerelease --dist-tag="beta" --force-publish
# Publish to WNS
yarn wire profile init --name $WIRE_PROFILE --template-url https://signal1.dxos.network/dxos/ipfs/gateway/QmeJcwpcQuXeY1N94ezWAzYinSX5AA4kZoaZjp9JmmpaLN
yarn wire profile init --name $WIRE_PROFILE --template-url https://git.io/JUkhm
scripts/deploy_apps_to_wns.sh
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}

View File

@ -1,5 +1,5 @@
{
"version": "1.0.0-beta.24",
"version": "1.1.0-beta.0",
"useWorkspaces": true,
"npmClient": "yarn"
}

View File

@ -30,9 +30,9 @@
"lerna": "^3.19.0"
},
"devDependencies": {
"@dxos/cli": "^1.0.1-beta.5",
"@dxos/cli-app": "^1.0.1-beta.5",
"@wirelineio/cli-wns": "^1.0.1-beta.5",
"@dxos/cli": "^1.1.0-beta.0",
"@dxos/cli-app": "^1.1.0-beta.0",
"@dxos/cli-wns": "^1.1.0-beta.0",
"babel-eslint": "^10.0.3",
"eslint": "^6.7.2",
"eslint-config-semistandard": "^15.0.0",

View File

@ -1,5 +1,5 @@
name: dxos.network/console-app
displayName: Kubenet Console Client
name: console
build: yarn dist
version: 0.0.6
package: QmZpM8u7ZUfQpXLgtdB1ug7nGExUrXhebtTSfSBPrRwcLX
version: 0.0.25
package:
/: QmRTdeFtvdu41EXPoBovEhFc4V1RNKBUGjQ1GcBGMxBk1c

View File

@ -1,6 +1,6 @@
{
"name": "@dxos/console-app",
"version": "1.0.0-beta.24",
"version": "1.1.0-beta.0",
"description": "Kubenet Console Client",
"main": "dist/es/index.js",
"files": [

View File

@ -8,7 +8,7 @@ import Link from '@material-ui/core/Link';
import { getServiceUrl } from '../util/config';
const getAppUrl = (config, { name, version }) => {
const getAppUrl = (config, { wrn }) => {
const base = getServiceUrl(config, 'app.server');
const pathComponents = [base];
@ -21,11 +21,7 @@ const getAppUrl = (config, { name, version }) => {
pathComponents.push(prefix.substring(1));
}
if (version) {
pathComponents.push(`${name}@${version}`);
} else {
pathComponents.push(name);
}
pathComponents.push(encodeURIComponent(wrn));
return `${pathComponents.join('/')}/`;
};
@ -34,11 +30,10 @@ const getAppUrl = (config, { name, version }) => {
* @param {Object} config
* @param {string} name
* @param {string} [text]
* @param {string} [version]
*/
const AppLink = ({ config, name, version, text }) => {
const fullURL = getAppUrl(config, { name, version });
return <Link href={fullURL} target={name}>{text || name}</Link>;
const AppLink = ({ config, wrn, text }) => {
const fullURL = getAppUrl(config, { wrn });
return <Link href={fullURL} target={wrn}>{text || wrn}</Link>;
};
export default AppLink;

View File

@ -10,24 +10,23 @@ import { getServiceUrl } from '../util/config';
/**
* Render IPFS links in package.
* @param {Object} config
* @param {string} [type]
* @param {string} type
* @param {string} pkg
* @param {string} [text]
*/
const PackageLink = ({ config, type, pkg, text }) => {
// TODO(burdon): Pass in expected arg types.
if (typeof pkg === 'string') {
const ipfsUrl = getServiceUrl(config, 'ipfs.gateway', { path: `${pkg}` });
return <Link href={ipfsUrl} key={pkg} target={pkg}>{text || pkg}</Link>;
}
// eslint-disable-next-line default-case
switch (type) {
case 'wrn:app': {
const cid = pkg['/'];
const ipfsUrl = getServiceUrl(config, 'ipfs.gateway', { path: `${cid}` });
return <Link href={ipfsUrl} key={cid} target={cid}>{text || cid}</Link>;
}
case 'wrn:bot': {
const packageLinks = [];
Object.keys(pkg).forEach((platform, i) => {
Object.keys(pkg[platform]).forEach(arch => {
const cid = pkg[platform][arch];
const cid = pkg[platform][arch]['/'];
const ipfsUrl = getServiceUrl(config, 'ipfs.gateway', { path: `${cid}` });
packageLinks.push(
<div>

View File

@ -11,10 +11,9 @@ import { getServiceUrl } from '../util/config';
const QUERY = `
query {
queryRecords(attributes: [{ key: "name", value: { string: "%NAME%" } }]) {
getRecordsByIds(ids: [ "%ID%" ]) {
id
type
name
names
bondId
createTime
expiryTime
@ -33,13 +32,13 @@ const QUERY = `
/**
* Render link to record in WNS.
* @param {Object} config
* @param {string} name
* @param {string} id
* @param {string} [text]
* @param {boolean} icon
*/
const QueryLink = ({ config, name, text, icon = false }) => {
const QueryLink = ({ config, id, text, icon = false }) => {
const baseURL = getServiceUrl(config, 'wns.webui');
const query = QUERY.replace('%NAME%', name);
const query = QUERY.replace('%ID%', id);
// NOTE: Playground bug opens two tabs.
const fullURL = encodeURI(`${baseURL}?query=${query}`);
@ -50,7 +49,7 @@ const QueryLink = ({ config, name, text, icon = false }) => {
<LinkIcon />
)}
{!icon && (
text || name
text || id
)}
</Link>
);

View File

@ -42,29 +42,32 @@ const AppRecords = () => {
<Table>
<TableHead>
<TableRow>
<TableCell onClick={sortBy('name')}>Identifier</TableCell>
<TableCell onClick={sortBy('version')} size='small'>Version</TableCell>
<TableCell onClick={sortBy('attributes.displayName')}>Name</TableCell>
<TableCell onClick={sortBy('names[0]')}>Registered Names</TableCell>
<TableCell onClick={sortBy('attributes.version')} size='small'>Version</TableCell>
<TableCell onClick={sortBy('attributes.name')}>Name</TableCell>
<TableCell onClick={sortBy('createTime')} size='small'>Created</TableCell>
<TableCell size='icon' />
</TableRow>
</TableHead>
<TableBody>
{appData.sort(sorter).map(({ id, name, version, createTime, attributes: { displayName, package: hash } }) => {
{appData.sort(sorter).map(({ id, names, createTime, attributes: { name: displayName, version, package: packageLink } }) => {
return (
<TableRow key={id} size='small'>
<TableCell monospace>
<AppLink config={config} name={name} />
{names.map(wrn => <div>
<AppLink config={config} wrn={wrn} />
</div>
)}
</TableCell>
<TableCell monospace>
<AppLink config={config} name={name} version={version} text={version} />
{version}
</TableCell>
<TableCell>
{displayName}
</TableCell>
<TableCell>{moment.utc(createTime).fromNow()}</TableCell>
<TableCell>
<BooleanIcon yes={localRefs && localRefs.has(hash)} />
<BooleanIcon yes={localRefs && localRefs.has(packageLink['/'])} />
</TableCell>
</TableRow>
);

View File

@ -35,18 +35,18 @@ const BotRecords = () => {
<Table>
<TableHead>
<TableRow>
<TableCell onClick={sortBy('name')}>Identifier</TableCell>
<TableCell onClick={sortBy('version')} size='small'>Version</TableCell>
<TableCell onClick={sortBy('attributes.displayName')}>Name</TableCell>
<TableCell onClick={sortBy('names[0]')}>Identifier</TableCell>
<TableCell onClick={sortBy('attributes.version')} size='small'>Version</TableCell>
<TableCell onClick={sortBy('attributes.name')}>Name</TableCell>
<TableCell onClick={sortBy('createTime')} size='small'>Created</TableCell>
<TableCell size='icon' />
</TableRow>
</TableHead>
<TableBody>
{records.sort(sorter).map(({ id, name, version, createTime, attributes: { displayName } }) => {
{records.sort(sorter).map(({ id, names, createTime, attributes: { name: displayName, version } }) => {
return (
<TableRow key={id} size='small'>
<TableCell monospace>{name}</TableCell>
<TableCell monospace>{names.map(name => <div>{name}</div>)}</TableCell>
<TableCell monospace>{version}</TableCell>
<TableCell>{displayName}</TableCell>
<TableCell>{moment.utc(createTime).fromNow()}</TableCell>

View File

@ -78,7 +78,7 @@ const IPFSStatus = () => {
}
const ipfsData = JSON.parse(ipfsResponse.ipfs_status.json);
const registeredServers = JSON.parse(wnsResponse.wns_records.json);
const registeredServers = JSON.parse(wnsResponse.wns_records.json).filter(record => get(record, 'attributes.ipfs.active') !== false);
const displayServers = registeredServers.map((service) => {
const addresses = get(service, 'attributes.ipfs.addresses');
@ -93,10 +93,10 @@ const IPFSStatus = () => {
}
return {
name: get(service, 'name'),
...service.attributes,
...service.attributes.ipfs,
names: get(service, 'names'),
version: get(service, 'version'),
description: get(service, 'attributes.description'),
ipfs: get(service, 'attributes.ipfs'),
connected
};
});
@ -115,19 +115,19 @@ const IPFSStatus = () => {
<Table stickyHeader size='small' className={classes.table}>
<TableHead>
<TableRow>
<TableCell>Identifier</TableCell>
<TableCell>Registered Names</TableCell>
<TableCell size='medium'>Description</TableCell>
<TableCell>Address</TableCell>
<TableCell size='small'>Connected</TableCell>
</TableRow>
</TableHead>
<TableBody>
{displayServers.map(({ name, description, ipfs, connected }) => (
<TableRow key={name}>
<TableCell>{name}</TableCell>
{displayServers.map(({ names, description, addresses, connected }) => (
<TableRow key={names}>
<TableCell>{names.map(name => <>{name}<br /></>)}</TableCell>
<TableCell>{description}</TableCell>
<TableCell>
{ipfs.addresses}
{addresses}
</TableCell>
<TableCell>
<BooleanIcon yes={connected} />

View File

@ -26,7 +26,6 @@ import AppLink from '../../../components/AppLink';
const types = [
{ key: null, label: 'ALL' },
{ key: 'wrn:kube', label: 'Kube' },
{ key: 'wrn:resource', label: 'Resource' },
{ key: 'wrn:service', label: 'Service' },
{ key: 'wrn:app', label: 'App' },
{ key: 'wrn:bot', label: 'Bot' },
@ -83,41 +82,47 @@ const WNSRecords = ({ type }) => {
<Table>
<TableHead>
<TableRow>
<TableCell onClick={sortBy('type')} size='medium'>Type</TableCell>
<TableCell onClick={sortBy('name')}>Identifier</TableCell>
<TableCell onClick={sortBy('version')} size='small'>Version</TableCell>
<TableCell onClick={sortBy('attributes.displayName')}>Name</TableCell>
<TableCell onClick={sortBy('attributes.type')} size='medium'>Type</TableCell>
<TableCell onClick={sortBy('names[0]')}>Registered Names</TableCell>
<TableCell onClick={sortBy('attributes.version')} size='small'>Version</TableCell>
<TableCell onClick={sortBy('attributes.name')}>Name</TableCell>
<TableCell onClick={sortBy('createTime')} size='small'>Created</TableCell>
<TableCell onClick={sortBy('package')}>Package</TableCell>
<TableCell onClick={sortBy('attributes.package')}>Package</TableCell>
<TableCell size='icon' />
</TableRow>
</TableHead>
<TableBody>
{records.sort(sorter)
.map((record) => {
const { id, type, name, version, createTime, attributes: { displayName, description, service, package: pkg } } = record;
const { id, names, createTime, attributes: { type, name: displayName, version, description, service, package: pkg } } = record;
let pkgLink;
let appLink;
let verLink;
let appLinks;
if (pkg) {
pkgLink = (<PackageLink config={config} type={type} pkg={pkg} />);
}
if (type === 'wrn:app') {
appLink = (<AppLink config={config} name={name} />);
verLink = (<AppLink config={config} name={name} version={version} text={version} />);
appLinks = (
<>
{names.map(wrn =>
<div>
<AppLink config={config} wrn={wrn} />
</div>
)}
</>
);
}
return (
<TableRow key={id} size='small'>
<TableCell monospace>{type}</TableCell>
<TableCell monospace>
{appLink || name}
{appLinks || names.map(name => <div>{name}</div>)}
</TableCell>
<TableCell monospace>
{verLink || version}
{version}
</TableCell>
<TableCell>
{displayName || service || description}
@ -129,7 +134,7 @@ const WNSRecords = ({ type }) => {
{pkgLink}
</TableCell>
<TableCell>
<QueryLink config={config} name={name} icon />
<QueryLink config={config} id={id} icon />
</TableCell>
</TableRow>
);

View File

@ -1,7 +1,7 @@
{
"build": {
"name": "@dxos/console-app",
"buildDate": "2020-07-21T20:40:54.153Z",
"version": "1.0.0-beta.22"
"buildDate": "2020-08-27T18:22:17.963Z",
"version": "1.0.0-moon.0"
}
}

View File

@ -1,6 +1,6 @@
{
"name": "@dxos/console-server",
"version": "1.0.0-beta.24",
"version": "1.1.0-beta.0",
"description": "Kubenet Console Server",
"main": "dist/es/index.js",
"bin": {
@ -31,7 +31,7 @@
"dependencies": {
"@babel/polyfill": "^7.8.7",
"@babel/runtime": "^7.8.7",
"@dxos/console-app": "^1.0.0-beta.24",
"@dxos/console-app": "^1.1.0-beta.0",
"@wirelineio/wns-schema": "^0.1.1",
"apollo-boost": "^0.4.9",
"apollo-server-express": "^2.13.1",

View File

@ -5,8 +5,8 @@ set -euo pipefail
for appdir in `find ./packages -name '*-app' -type d | grep -v node_modules`; do
pushd $appdir
ORG="dxos.network"
PKG_NAME=`cat package.json | jq -r '.name' | cut -d'/' -f2-`
WNS_ORG="dxos"
PKG_NAME=`cat package.json | jq -r '.name' | cut -d'/' -f2- | sed 's/-app$//'`
PKG_DESC=`cat package.json | jq -r '.description'`
PKG_VERSION=`cat package.json | jq -r '.version'`
@ -14,16 +14,15 @@ for appdir in `find ./packages -name '*-app' -type d | grep -v node_modules`; do
PKG_DESC="$PKG_NAME"
fi
WNS_NAME="$ORG/$PKG_NAME"
WNS_VERSION=`yarn -s wire app query --name "$WNS_NAME" | jq -r '.[0].version'`
WNS_NAME="$WNS_ORG/$PKG_NAME"
WNS_VERSION=`yarn -s wire wns name resolve wrn://${WNS_ORG}/application/${PKG_NAME} | jq -r '.records[0].attributes.version'`
if [ -z "$WNS_VERSION" ]; then
WNS_VERSION="0.0.0"
WNS_VERSION="0.0.1"
fi
cat <<EOF > app.yml
name: $WNS_NAME
displayName: $PKG_DESC
name: $PKG_NAME
build: yarn dist
version: $WNS_VERSION
EOF
@ -40,7 +39,7 @@ EOF
else
yarn -s wire app publish
fi
yarn -s wire app register
yarn -s wire app register --name "wrn://${WNS_ORG}/application/${PKG_NAME}"
popd
done

5878
yarn.lock

File diff suppressed because it is too large Load Diff