Refactor code to remove dxos and rename to laconic (#5)

* Rename dxos to laconic

* Use react-ux

* Change package scopes from dxos to cerc-io

* Comment github CI publishing package

* Rename dxos to laconic in config files

* Rename Laconic.org to Laconic
This commit is contained in:
nikugogoi 2022-12-05 14:16:14 +05:30 committed by GitHub
parent e1aae9d41e
commit 8761a54a50
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
29 changed files with 226 additions and 9026 deletions

View File

@ -8,7 +8,7 @@ on:
branches: [ main ]
jobs:
publish:
test:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
@ -17,24 +17,24 @@ jobs:
with:
node-version: 12
registry-url: https://registry.npmjs.org/
- name: Build and WNS publish
- name: Test and build
run: |
git config --global user.email "npm@dxos.org"
git config --global user.name "DXOS"
# git config --global user.email "npm@dxos.org"
# git config --global user.name "DXOS"
yarn install
yarn build
yarn test
yarn lint
yarn test
yarn build
# Uncomment for NPM publishing.
npm whoami
yarn lerna publish -y prerelease --dist-tag="alpha" --force-publish
# npm whoami
# yarn lerna publish -y prerelease --dist-tag="alpha" --force-publish
# Publish to WNS
yarn wire profile init --name $WIRE_PROFILE --template-url "$WIRE_PROFILE_URL"
export PKG_CHANNEL="@alpha"
scripts/deploy_apps_to_wns.sh
# yarn wire profile init --name $WIRE_PROFILE --template-url "$WIRE_PROFILE_URL"
# export PKG_CHANNEL="@alpha"
# scripts/deploy_apps_to_wns.sh
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
WIRE_WNS_USER_KEY: ${{secrets.wns_user_key}}

View File

@ -1,5 +1,5 @@
# Console
DXOS Kubenet GraphQL server and console application.
Laconic Kubenet GraphQL server and console application.
![Console](./docs/images/console.png)

View File

@ -1,7 +1,7 @@
{
"name": "@dxos/console",
"name": "laconic-console",
"version": "1.2.9-alpha.0",
"description": "Console",
"description": "Laconic Console",
"main": "index.js",
"private": true,
"scripts": {
@ -13,7 +13,7 @@
"sort-package-json": "lerna exec npx sort-package-json",
"test": "lerna run test"
},
"author": "DXOS.org",
"author": "",
"license": "AGPLv3",
"workspaces": {
"packages": [
@ -30,11 +30,6 @@
"lerna": "^3.19.0"
},
"devDependencies": {
"@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",

View File

@ -49,11 +49,10 @@ This creates the following folders:
NOTE: GQL and Production files and exported and may be used by the server.
```javascript
import QUERY_STATUS from '@dxos/console-client/gql/system_status.graphql';
import config from '@dxos/console-client/config.json';
import SYSTEM_STATUS from '@cerc-io/console-app/src/gql/system_status.graphql';
...
const file = path.join(__dirname + '../../../../node_modules/@dxos/console-client/dist/production', 'index.html');
const file = path.join(__dirname + '../../../../node_modules/@cerc-io/console-app/dist/production', 'index.html');
res.sendFile(file);
```

View File

@ -5,9 +5,9 @@
app:
title: 'Console'
org': 'DXOS.org'
org': 'Laconic'
theme: 'dark'
website: 'https://dxos.org'
website: 'https://laconic.com'
publicUrl: '/console'
api:
@ -17,7 +17,7 @@ api:
pollInterval: 10000
system:
debug: 'dxos:console:*'
debug: 'laconic:console:*'
services:
app:
@ -25,16 +25,16 @@ services:
server: 'https://kube.local'
wns:
server: 'https://kube.local/dxos/wns/api'
webui: 'https://kube.local/dxos/wns/console'
server: 'https://kube.local/laconic/wns/api'
webui: 'https://kube.local/laconic/wns/console'
signal:
server: 'wss://kube.local/dxos/signal'
api: 'https://kube.local/dxos/signal/api'
server: 'wss://kube.local/laconic/signal'
api: 'https://kube.local/laconic/signal/api'
ipfs:
server: 'https://kube.local/dxos/ipfs/api'
gateway: 'https://kube.local/dxos/ipfs/gateway'
server: 'https://kube.local/laconic/ipfs/api'
gateway: 'https://kube.local/laconic/ipfs/gateway'
wellknown:
endpoint: 'https://kube.local/.well-known/dxos'
endpoint: 'https://kube.local/.well-known/laconic'

View File

@ -5,9 +5,9 @@
app:
title: 'Console'
org': 'DXOS.org'
org': 'Laconic'
theme: 'dark'
website: 'https://dxos.org'
website: 'https://laconic.com'
publicUrl: '/console'
api:
@ -17,7 +17,7 @@ api:
pollInterval: 10000
system:
debug: 'dxos:console:*'
debug: 'laconic:console:*'
services:
app:
@ -37,4 +37,4 @@ services:
gateway: 'http://127.0.0.1:8888/ipfs/'
wellknown:
endpoint: 'http://127.0.0.1:9000/.well-known/dxos'
endpoint: 'http://127.0.0.1:9000/.well-known/laconic'

View File

@ -5,9 +5,9 @@
app:
title: 'Console'
org': 'DXOS.org'
org: 'Laconic'
theme: 'dark'
website: 'https://dxos.org'
website: 'https://laconinc.com'
publicUrl: '/console'
api:
@ -16,22 +16,22 @@ api:
pollInterval: 10000
system:
debug: 'dxos:console:*'
debug: 'laconic:console:*'
routes:
app:
server: '/app'
wns:
server: '/dxos/wns/api'
webui: '/dxos/wns/console'
server: '/laconic/wns/api'
webui: '/laconic/wns/console'
signal:
api: '/dxos/signal/api'
api: '/laconic/signal/api'
ipfs:
server: '/dxos/ipfs/api'
gateway: '/dxos/ipfs/gateway'
server: '/laconic/ipfs/api'
gateway: '/laconic/ipfs/gateway'
wellknown:
endpoint: '/.well-known/dxos'
endpoint: '/.well-known/laconic'

View File

@ -5,36 +5,36 @@
app:
title: 'Console'
org': 'DXOS.org'
org': 'Laconic'
theme: 'dark'
website: 'https://dxos.org'
website: 'https://laconic.com'
publicUrl: '/console'
api:
server: 'https://apollo1.kube.moon.dxos.network'
server: 'https://apollo1.kube.moon.laconic.network'
path: '/api'
intervalLog: 5000
pollInterval: 10000
system:
debug: 'dxos:console:*'
debug: 'laconic:console:*'
services:
app:
prefix: '/app'
server: 'https://apollo1.kube.moon.dxos.network'
server: 'https://apollo1.kube.moon.laconic.network'
wns:
server: 'https://apollo1.kube.moon.dxos.network/dxos/wns/api'
webui: 'https://apollo1.kube.moon.dxos.network/dxos/wns/console'
server: 'https://apollo1.kube.moon.laconic.network/laconic/wns/api'
webui: 'https://apollo1.kube.moon.laconic.network/laconic/wns/console'
signal:
server: 'wss://apollo1.kube.moon.dxos.network/dxos/signal'
api: 'https://apollo1.kube.moon.dxos.network/dxos/signal/api'
server: 'wss://apollo1.kube.moon.laconic.network/laconic/signal'
api: 'https://apollo1.kube.moon.laconic.network/laconic/signal/api'
ipfs:
server: 'https://apollo1.kube.moon.dxos.network/dxos/ipfs/api'
gateway: 'https://apollo1.kube.moon.dxos.network/dxos/ipfs/gateway'
server: 'https://apollo1.kube.moon.laconic.network/laconic/ipfs/api'
gateway: 'https://apollo1.kube.moon.laconic.network/laconic/ipfs/gateway'
wellknown:
endpoint: 'https://apollo1.kube.moon.dxos.network/.well-known/dxos'
endpoint: 'https://apollo1.kube.moon.laconic.network/.well-known/laconic'

View File

@ -1,8 +1,8 @@
{
"name": "@dxos/console-app",
"name": "@cerc-io/console-app",
"version": "1.2.9",
"description": "Kubenet Console Client",
"repository": "https://github.com/dxos/console",
"repository": "https://github.com/cerc-io/laconic-console",
"main": "dist/es/index.js",
"files": [
"src/gql"
@ -17,7 +17,7 @@
"start": "CONFIG_FILE=${CONFIG_FILE:-config-testnet.yml} VERBOSE=true webpack-dev-server --mode development",
"test": "jest --rootDir ./src --passWithNoTests --no-cache"
},
"author": "DXOS.org",
"author": "",
"license": "GPL-3.0",
"browserslist": [
"> 2%"
@ -31,16 +31,7 @@
"@babel/runtime": "^7.8.7",
"@dxos/debug": "^1.0.0-beta.78",
"@dxos/gem-core": "^1.0.0-beta.25",
"@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",
"@dxos/react-ux": "https://github.com/dxos-deprecated/sdk.git#v1.1.0-beta.0",
"@material-ui/core": "^4.10.0",
"@material-ui/icons": "^4.9.1",
"@material-ui/lab": "^4.0.0-alpha.54",

View File

@ -5,7 +5,7 @@
import React from 'react';
import { makeStyles } from '@material-ui/core';
import { JsonTreeView } from '@dxos/react-components';
import { JsonTreeView } from '@dxos/react-ux';
import { omitDeep } from '../util/omit';

View File

@ -16,7 +16,7 @@ import { useQueryStatusReducer } from '../hooks';
const CHECK_INTERVAL = 5 * 60 * 1000;
const UPDATE_LINK = 'https://github.com/dxos/kube#updating-the-system';
const UPDATE_LINK = 'https://github.com/laconic/kube#updating-the-system';
const useStyles = makeStyles(theme => ({
update: {
@ -42,12 +42,12 @@ const VersionCheck = () => {
const statusData = JSON.parse(statusResponse.system_status.json);
const wnsData = JSON.parse(wnsResponse.wns_records.json);
const current = get(statusData, 'dxos.kube.version', '0.0.0');
const current = get(statusData, 'laconic.kube.version', '0.0.0');
let latest = current;
wnsData.forEach(({ attributes: { name, version } }) => {
// TODO(burdon): Filter by type (WRN?)
if (name.startsWith('dxos/kube:')) {
if (name.startsWith('laconic/kube:')) {
if (compareVersions(version, latest) > 0) {
latest = version;
}

View File

@ -8,7 +8,7 @@ import { Registry } from 'laconic-sdk';
import { getServiceUrl } from './util/config';
const log = debug('dxos:console:client:resolvers');
const log = debug('laconic:console:client:resolvers');
const timestamp = () => new Date().toUTCString();

View File

@ -1,6 +1,6 @@
{
"build": {
"name": "@dxos/console-app",
"name": "@cerc-io/console-app",
"buildDate": "2020-12-19T03:06:08.492Z",
"version": "1.2.9-alpha.1"
}

View File

@ -47,8 +47,8 @@ module.exports = {
name (module) {
const packageName = module.context.match(/[\\/]node_modules[\\/](.*?)([\\/]|$)/)[1];
if (packageName.startsWith('@dxos')) {
return 'dxos';
if (packageName.startsWith('@cerc-io')) {
return 'cerc-io';
}
if (packageName.startsWith('@material-ui')) {

View File

@ -10,7 +10,7 @@ Use the following command to run the server at: http://localhost:9004
yarn start
```
To test the Console app, the `@dxos/console-app` must be built first:
To test the Console app, the `@cerc-io/console-app` must be built first:
```bash
cd ../console-app

View File

@ -5,9 +5,9 @@
app:
title: 'Console'
org': 'DXOS.org'
org': 'Laconic'
theme: 'dark'
website: 'https://dxos.org'
website: 'https://laconic.com'
publicUrl: '/console'
api:
@ -17,7 +17,7 @@ api:
pollInterval: 10000
system:
debug: 'dxos:console:*'
debug: 'laconic:console:*'
services:
app:
@ -25,16 +25,16 @@ services:
server: 'https://kube.local'
wns:
server: 'https://kube.local/dxos/wns/api'
webui: 'https://kube.local/dxos/wns/console'
server: 'https://kube.local/laconic/wns/api'
webui: 'https://kube.local/laconic/wns/console'
signal:
server: 'wss://kube.local/dxos/signal/api'
api: 'https://kube.local/dxos/signal'
server: 'wss://kube.local/laconic/signal/api'
api: 'https://kube.local/laconic/signal'
ipfs:
server: 'https://kube.local/dxos/ipfs/api'
gateway: 'https://kube.local/dxos/ipfs/gateway'
server: 'https://kube.local/laconic/ipfs/api'
gateway: 'https://kube.local/laconic/ipfs/gateway'
wellknown:
endpoint: 'https://kube.local/.well-known/dxos'
endpoint: 'https://kube.local/.well-known/laconic'

View File

@ -5,9 +5,9 @@
app:
title: 'Console'
org': 'DXOS.org'
org': 'Laconic'
theme: 'dark'
website: 'https://dxos.org'
website: 'https://laconic.com'
publicUrl: '/console'
api:
@ -17,24 +17,24 @@ api:
pollInterval: 10000
system:
debug: 'dxos:console:*'
debug: 'laconic:console:*'
services:
app:
prefix: '/app'
server: 'https://apollo1.kube.moon.dxos.network'
server: 'https://apollo1.kube.moon.laconic.network'
wns:
server: 'https://apollo1.kube.moon.dxos.network/dxos/wns/api'
webui: 'https://apollo1.kube.moon.dxos.network/dxos/wns/console'
server: 'https://apollo1.kube.moon.laconic.network/laconic/wns/api'
webui: 'https://apollo1.kube.moon.laconic.network/laconic/wns/console'
signal:
server: 'wss://apollo1.kube.moon.dxos.network/dxos/signal'
api: 'https://apollo1.kube.moon.dxos.network/dxos/signal/api'
server: 'wss://apollo1.kube.moon.laconic.network/laconic/signal'
api: 'https://apollo1.kube.moon.laconic.network/laconic/signal/api'
ipfs:
server: 'https://apollo1.kube.moon.dxos.network/dxos/ipfs/api'
gateway: 'https://apollo1.kube.moon.dxos.network/dxos/ipfs/gateway'
server: 'https://apollo1.kube.moon.laconic.network/laconic/ipfs/api'
gateway: 'https://apollo1.kube.moon.laconic.network/laconic/ipfs/gateway'
wellknown:
endpoint: 'https://apollo1.kube.moon.dxos.network/.well-known/dxos'
endpoint: 'https://apollo1.kube.moon.laconic.network/.well-known/laconic'

View File

@ -5,9 +5,9 @@
app:
title: 'Console'
org': 'DXOS.org'
org': 'Laconic'
theme: 'dark'
website: 'https://dxos.org'
website: 'https://laconic.com'
publicUrl: '/console'
api:
@ -17,7 +17,7 @@ api:
pollInterval: 10000
system:
debug: 'dxos:console:*'
debug: 'laconic:console:*'
services:
app:
@ -37,4 +37,4 @@ services:
gateway: 'http://127.0.0.1:8888/ipfs/'
wellknown:
endpoint: 'http://127.0.0.1:9000/.well-known/dxos'
endpoint: 'http://127.0.0.1:9000/.well-known/laconic'

View File

@ -1,10 +1,10 @@
{
"name": "@dxos/console-server",
"name": "@cerc-io/console-server",
"version": "1.2.9",
"description": "Kubenet Console Server",
"main": "dist/es/index.js",
"bin": {
"dxos-console": "bin/console.js"
"laconic-console": "bin/console.js"
},
"files": [
"bin/",
@ -20,7 +20,7 @@
"test": "jest --rootDir ./src --passWithNoTests --no-cache",
"start": "CONFIG_FILE=${CONFIG_FILE=./config.yml} BABEL_DISABLE_CACHE=1 nodemon --exec babel-node src/server/main.js -- --verbose"
},
"author": "DXOS.org",
"author": "",
"license": "GPL-3.0",
"browserslist": [
"> 5%"
@ -31,8 +31,7 @@
"dependencies": {
"@babel/polyfill": "^7.8.7",
"@babel/runtime": "^7.8.7",
"@dxos/console-app": "^1.2.9",
"@wirelineio/wns-schema": "^0.1.1",
"@cerc-io/console-app": "^1.2.9",
"apollo-boost": "^0.4.9",
"apollo-server-express": "^2.13.1",
"body-parser": "^1.19.0",

View File

@ -6,10 +6,10 @@ import debug from 'debug';
import React from 'react';
import { render } from 'react-dom';
import { Main } from '@dxos/console-app';
import { Main } from '@cerc-io/console-app';
// Load from global printed into HTML page via template.
const { config } = window.__DXOS__;
const { config } = window.__Laconic__;
debug.enable(config.system.debug);

View File

@ -13,7 +13,7 @@ import kill from 'tree-kill';
const DEFAULT_BOT_FACTORY_CWD = '.wire/bots';
const SERVICE_CONFIG_FILENAME = 'service.yml';
const log = debug('dxos:console:server:resolvers');
const log = debug('laconic:console:server:resolvers');
let topic;
const getBotFactoryTopic = (botFactoryCwd) => {

View File

@ -17,7 +17,7 @@ const ifBigDipper = () => {
} else {
return {
title: 'Block Explorer',
url: 'http://blockexplorer.moon.dxos.network:3080/'
url: 'http://blockexplorer.moon.laconic.network:3080/'
};
}
} catch (e) {}
@ -25,7 +25,7 @@ const ifBigDipper = () => {
const ifRadicle = () => {
try {
const result = childProcess.execSync('docker ps -f "ancestor=dxos/radicle-seed-node" -q');
const result = childProcess.execSync('docker ps -f "ancestor=laconic/radicle-seed-node" -q');
if (result && result.toString()) {
return {
title: 'Radicle',
@ -39,7 +39,7 @@ const ifRadicle = () => {
const ifSentry = () => {
return {
title: 'Sentry',
url: 'http://sentry.kube.dxos.network:9000/'
url: 'http://sentry.kube.laconic.network:9000/'
};
};

View File

@ -12,7 +12,7 @@ import { logResolvers } from './log';
import { botsResolvers } from './bots';
// eslint-disable-next-line
const log = debug('dxos:console:server:resolvers');
const log = debug('laconic:console:server:resolvers');
/**
* Resolvers

View File

@ -4,7 +4,7 @@
import debug from 'debug';
import IpfsHttpClient from 'ipfs-http-client';
const log = debug('dxos:console:server:resolvers');
const log = debug('laconic:console:server:resolvers');
export const ipfsResolvers = {
Query: {

View File

@ -94,7 +94,7 @@ const getSystemInfo = async () => {
version: process.version
},
dxos: {
laconic: {
kube: {
version: getVersionInfo()
},

View File

@ -17,7 +17,7 @@ import yargs from 'yargs';
// TODO(burdon): Use once published by @ashwinp.
// import { extensions as WNS_EXTENSIONS, schema as WNS_SCHEMA } from '@wirelineio/wns-schema';
import SYSTEM_STATUS from '@dxos/console-app/src/gql/system_status.graphql';
import SYSTEM_STATUS from '@cerc-io/console-app/src/gql/system_status.graphql';
import { resolvers } from '../resolvers';
@ -46,7 +46,7 @@ if (!configFile) {
const config = yaml.safeLoad(fs.readFileSync(configFile));
const log = debug('dxos:console:server');
const log = debug('laconic:console:server');
debug.enable(config.system.debug);
@ -90,7 +90,7 @@ app.use(cors({
//
const bundles = [
'runtime', 'vendor', 'material-ui', 'dxos', 'main'
'runtime', 'vendor', 'material-ui', 'cerc-io', 'main'
];
app.use(`${publicUrl}/lib`, express.static('./dist/client'));

View File

@ -9,7 +9,7 @@
<!-- Config loaded by client. -->
<script charset="utf-8" type="application/javascript">
window.__DXOS__ = { config: {{{ config }}} };
window.__Lacnonic__ = { config: {{{ config }}} };
</script>
<!-- React bundles. -->

View File

@ -47,8 +47,8 @@ module.exports = {
name (module) {
const packageName = module.context.match(/[\\/]node_modules[\\/](.*?)([\\/]|$)/)[1];
if (packageName.startsWith('@dxos')) {
return 'dxos';
if (packageName.startsWith('@cerc-io')) {
return 'cerc-io';
}
if (packageName.startsWith('@material-ui')) {

9018
yarn.lock

File diff suppressed because it is too large Load Diff