diff --git a/README.md b/README.md index 6b1c912..44b9f60 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # Console -DXOS Network GraphQL server and console application. +DXOS Kubenet GraphQL server and console application. ![Console](./docs/images/console.png) diff --git a/package.json b/package.json index 277378e..e094b75 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@dxos/console", "version": "1.0.0-beta.0", - "description": "DXOS Console", + "description": "Kubenet Console", "main": "index.js", "private": true, "scripts": { diff --git a/packages/console-app/app.yml b/packages/console-app/app.yml index cad5f14..9a5c06e 100644 --- a/packages/console-app/app.yml +++ b/packages/console-app/app.yml @@ -1,5 +1,5 @@ name: dxos.network/console-app -displayName: DXOS Console Client +displayName: Kubenet Console Client build: yarn dist version: 0.0.6 package: QmZpM8u7ZUfQpXLgtdB1ug7nGExUrXhebtTSfSBPrRwcLX diff --git a/packages/console-app/config-kube.yml b/packages/console-app/config-kube.yml index eecf8df..7df27e1 100644 --- a/packages/console-app/config-kube.yml +++ b/packages/console-app/config-kube.yml @@ -1,11 +1,11 @@ # -# NODE_ENV === production +# NODE_ENV=development # NOTE: Set CONFIG_FILE to swap out this config file. # app: - title: 'Console' - org': 'DXOS' + title: 'Kubnet Console' + org': 'DXOS.org' theme: 'dark' website: 'https://dxos.org' publicUrl: '/console' diff --git a/packages/console-app/config-local.yml b/packages/console-app/config-local.yml index cef2dab..b65c0f5 100644 --- a/packages/console-app/config-local.yml +++ b/packages/console-app/config-local.yml @@ -1,11 +1,11 @@ # -# NODE_ENV === production +# NODE_ENV=development # NOTE: Set CONFIG_FILE to swap out this config file. # app: - title: 'Console' - org': 'DXOS' + title: 'Kubnet Console' + org': 'DXOS.org' theme: 'dark' website: 'https://dxos.org' publicUrl: '/console' diff --git a/packages/console-app/config-production.yml b/packages/console-app/config-production.yml index ee81eef..ba00ec5 100644 --- a/packages/console-app/config-production.yml +++ b/packages/console-app/config-production.yml @@ -1,11 +1,11 @@ # -# NODE_ENV === production +# NODE_ENV=production # NOTE: Set CONFIG_FILE to swap out this config file. # app: - title: 'Console' - org': 'DXOS' + title: 'Kubenet Console' + org': 'DXOS.org' theme: 'dark' website: 'https://dxos.org' publicUrl: '/console' diff --git a/packages/console-app/config-testnet.yml b/packages/console-app/config-testnet.yml index d4df7ca..2c2b4ea 100644 --- a/packages/console-app/config-testnet.yml +++ b/packages/console-app/config-testnet.yml @@ -1,11 +1,11 @@ # -# NODE_ENV === production +# NODE_ENV=development # NOTE: Set CONFIG_FILE to swap out this config file. # app: - title: 'Console' - org': 'DXOS' + title: 'Kubenet Console' + org': 'DXOS.org' theme: 'dark' website: 'https://dxos.org' publicUrl: '/console' diff --git a/packages/console-app/package.json b/packages/console-app/package.json index 1053be8..f9946ab 100644 --- a/packages/console-app/package.json +++ b/packages/console-app/package.json @@ -1,7 +1,7 @@ { "name": "@dxos/console-app", "version": "1.0.0-beta.17", - "description": "DXOS Console Client", + "description": "Kubenet Console Client", "main": "dist/es/index.js", "files": [ "src/gql" @@ -10,10 +10,10 @@ "analyzer": "webpack --config webpack-analyzer.config.js", "build:babel": "babel ./src --out-dir ./dist/es --ignore \"**/*.test.js\" --source-maps inline", "build": "yarn dist", - "dist": "yarn clean && cp -f config-production.yml config.yml && yarn build:babel && webpack", + "dist": "yarn clean && CONFIG_FILE=config-production.yml yarn build:babel && webpack", "clean": "rm -rf dist", "lint": "semistandard 'src/**/*.js'", - "start": "cp -f ${CONFIG_FILE:-config-local.yml} config.yml && VERBOSE=true webpack-dev-server --mode development", + "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", diff --git a/packages/console-app/src/components/AppLink.js b/packages/console-app/src/components/AppLink.js index 83677f0..386cbaa 100644 --- a/packages/console-app/src/components/AppLink.js +++ b/packages/console-app/src/components/AppLink.js @@ -1,5 +1,5 @@ // -// Copyright 2020 DXOS.org.org +// Copyright 2020 DXOS.org // import React from 'react'; diff --git a/packages/console-app/src/components/PackageLink.js b/packages/console-app/src/components/PackageLink.js index 6e4a9bd..4b6ffb8 100644 --- a/packages/console-app/src/components/PackageLink.js +++ b/packages/console-app/src/components/PackageLink.js @@ -1,5 +1,5 @@ // -// Copyright 2020 DXOS.org.org +// Copyright 2020 DXOS.org // import React from 'react'; diff --git a/packages/console-app/src/components/QueryLink.js b/packages/console-app/src/components/QueryLink.js index 19e44cf..72ba73a 100644 --- a/packages/console-app/src/components/QueryLink.js +++ b/packages/console-app/src/components/QueryLink.js @@ -1,5 +1,5 @@ // -// Copyright 2020 DXOS.org.org +// Copyright 2020 DXOS.org // import React from 'react'; diff --git a/packages/console-app/src/config.js b/packages/console-app/src/config.js new file mode 100644 index 0000000..3bbf89c --- /dev/null +++ b/packages/console-app/src/config.js @@ -0,0 +1,8 @@ +// +// Copyright 2020 DXOS.org +// + +// See webpack-common.config.js +import config from '__CONFIG_FILE__'; + +export default config; \ No newline at end of file diff --git a/packages/console-app/src/main.js b/packages/console-app/src/main.js index 568d3f4..1f75a14 100644 --- a/packages/console-app/src/main.js +++ b/packages/console-app/src/main.js @@ -6,7 +6,7 @@ import debug from 'debug'; import React from 'react'; import { render } from 'react-dom'; -import config from '../config.yml'; +import config from './config'; import Main from './containers/Main'; diff --git a/packages/console-app/src/version.json b/packages/console-app/src/version.json index 0db70c4..10087f1 100644 --- a/packages/console-app/src/version.json +++ b/packages/console-app/src/version.json @@ -1,7 +1,7 @@ { "build": { "name": "@dxos/console-app", - "buildDate": "2020-07-20T17:06:29.786Z", - "version": "1.0.0-beta.16" + "buildDate": "2020-07-20T20:15:46.769Z", + "version": "1.0.0-beta.17" } } diff --git a/packages/console-app/webpack-common.config.js b/packages/console-app/webpack-common.config.js index c02bae3..eebaf48 100644 --- a/packages/console-app/webpack-common.config.js +++ b/packages/console-app/webpack-common.config.js @@ -9,8 +9,7 @@ const webpack = require('webpack'); const PUBLIC_URL = process.env.PUBLIC_URL || ''; -// TODO(burdon): Remove. -const STACK_CONFIG = process.env.CONFIG || 'default'; +const CONFIG_FILE = path.relative('./src', process.env.CONFIG_FILE || 'config-local.yml'); module.exports = { devtool: 'eval-source-map', @@ -76,8 +75,8 @@ module.exports = { // Define the build config file based on the target. // https://webpack.js.org/plugins/normal-module-replacement-plugin - new webpack.NormalModuleReplacementPlugin(/(.*)__STACK_CONFIG__/, (resource) => { - resource.request = resource.request.replace(/__STACK_CONFIG__/, STACK_CONFIG); + new webpack.NormalModuleReplacementPlugin(/(.*)__CONFIG_FILE__/, (resource) => { + resource.request = resource.request.replace(/__CONFIG_FILE__/, CONFIG_FILE); }), // https://www.npmjs.com/package/webpack-version-file-plugin diff --git a/packages/console-app/webpack.config.js b/packages/console-app/webpack.config.js index 2237412..ca31e61 100644 --- a/packages/console-app/webpack.config.js +++ b/packages/console-app/webpack.config.js @@ -15,7 +15,7 @@ module.exports = merge(commonConfig, { new HtmlWebPackPlugin({ template: './public/index.html', templateParameters: { - title: 'DXOS Console' + title: 'Kubenet Console' } }) ] diff --git a/packages/console-server/config-kube.yml b/packages/console-server/config-kube.yml index 3d934c9..86ec62e 100644 --- a/packages/console-server/config-kube.yml +++ b/packages/console-server/config-kube.yml @@ -1,11 +1,11 @@ # -# NODE_ENV === production +# NODE_ENV=development # NOTE: Set CONFIG_FILE to swap out this config file. # app: - title: 'Console' - org': 'DXOS' + title: 'Kubenet Console' + org': 'DXOS.org' theme: 'dark' website: 'https://dxos.org' publicUrl: '/console' diff --git a/packages/console-server/config-testnet.yml b/packages/console-server/config-testnet.yml index 2cc9802..3f3cdce 100644 --- a/packages/console-server/config-testnet.yml +++ b/packages/console-server/config-testnet.yml @@ -1,11 +1,11 @@ # -# NODE_ENV === production +# NODE_ENV=development # NOTE: Set CONFIG_FILE to swap out this config file. # app: - title: 'Console' - org': 'DXOS' + title: 'Kubenet Console' + org': 'DXOS.org' theme: 'dark' website: 'https://dxos.org' publicUrl: '/console' diff --git a/packages/console-server/config.yml b/packages/console-server/config.yml index b71e901..18b9add 100644 --- a/packages/console-server/config.yml +++ b/packages/console-server/config.yml @@ -1,11 +1,11 @@ # -# NODE_ENV === production +# NODE_ENV=production # NOTE: Set CONFIG_FILE to swap out this config file. # app: - title: 'Console' - org': 'DXOS' + title: 'Kubenet Console' + org': 'DXOS.org' theme: 'dark' website: 'https://dxos.org' publicUrl: '/console' diff --git a/packages/console-server/package.json b/packages/console-server/package.json index 0f2fd40..e080818 100644 --- a/packages/console-server/package.json +++ b/packages/console-server/package.json @@ -1,7 +1,7 @@ { "name": "@dxos/console-server", "version": "1.0.0-beta.17", - "description": "DXOS Console Server", + "description": "Kubenet Console Server", "main": "dist/es/index.js", "bin": { "dxos-console": "bin/console.js" diff --git a/packages/console-server/webpack.config.js b/packages/console-server/webpack.config.js index c467a8c..5c6b7f5 100644 --- a/packages/console-server/webpack.config.js +++ b/packages/console-server/webpack.config.js @@ -67,7 +67,7 @@ module.exports = { new HtmlWebPackPlugin({ template: './public/index.html', templateParameters: { - title: 'DXOS Console' + title: 'Kubenet Console' } }),