Skip to content

Commit

Permalink
fix(#140): Hoist nested sub-sub-modules back to sub-modules
Browse files Browse the repository at this point in the history
* Removes nested kubernetes-api workspace in favour of making its sub-modules
  first-class citizens of main root workspace.

* Only reason for nesting was to "hide" the k8-api testing app. However,
  given time this can be converted into one of the full testing apps for
  hawtio-online so hiding it is unnecessary.

Fixes #140 (4)
  • Loading branch information
phantomjinx committed Jul 14, 2023
1 parent 73b6647 commit 1a0df1e
Show file tree
Hide file tree
Showing 54 changed files with 242 additions and 370 deletions.
39 changes: 13 additions & 26 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,26 +14,18 @@
"docker"
],
"scripts": {
"start:app": "yarn workspace app start",
"build:all": "yarn workspaces foreach -v -i -pt --exclude @hawtio/online-root run build",
"build:app": "yarn workspace app build",
"build:camel-model": "yarn workspace @hawtio/camel-model build",
"build:hawtio": "yarn workspace @hawtio/react build",
"build:hawtio:watch": "yarn workspace @hawtio/react build:watch",
"test": "yarn test:bats && yarn test:docker && yarn test:nginx",
"test:all": "yarn workspaces foreach -v -i -pt --exclude @hawtio/online-root run test",
"test:hawtio": "yarn workspace @hawtio/react test",
"test:hawtio:watch": "yarn workspace @hawtio/react test:watch",
"lint": "yarn eslint packages/hawtio/src/ packages/camel-model/src packages/hawtio/scripts/ app/src/",
"lint:fix": "yarn lint --fix",
"format:check": "yarn prettier --check .",
"format:fix": "yarn prettier --write .",
"generate:camel-model": "yarn workspace @hawtio/camel-model generate",
"release:camel-model": "yarn workspace @hawtio/camel-model npm publish --tolerate-republish",
"release:hawtio": "yarn workspace @hawtio/react npm publish --tolerate-republish",
"start-cluster": "gulp --master=`oc whoami --show-server` --mode=cluster",
"start-namespace": "gulp --master=`oc whoami --show-server` --mode=namespace --namespace=`oc project -q`",
"site": "gulp site",
"start:k8": "concurrently -n kubernetes-api,kubernetes-api-app \"yarn build:k8api:watch\" \"yarn start:k8app\"",
"start:k8app": "yarn workspace @hawtio/online-kubernetes-api-app start",
"build:k8": "yarn build:k8api && yarn build:k8app",
"build:k8app": "yarn workspace @hawtio/online-kubernetes-api-app build",
"build:k8api": "yarn workspace @hawtio/online-kubernetes-api build",
"build:k8api:watch": "yarn workspace @hawtio/online-kubernetes-api build:watch",
"test:k8api": "yarn workspace @hawtio/online-kubernetes-api test",
"test:k8api:watch": "yarn workspace @hawtio/online-kubernetes-api test:watch",
"lint": "yarn workspaces foreach -v -i -pt --exclude @hawtio/online-root eslint src/",
"lint:fix": "yarn workspaces foreach -v -i -pt --exclude @hawtio/online-root eslint --fix src/",
"format:check": "yarn workspaces foreach -v -i -pt --exclude @hawtio/online-root yarn prettier --check .",
"format:fix": "yarn workspaces foreach -v -i -pt --exclude @hawtio/online-root yarn prettier --write .",
"image": "docker build -t docker.io/${ORG:-hawtio}/${PROJECT:-online}:${TAG:-latest} .",
"license": "license-reporter merge --mpn='hawtio-online' --mlx='./packages/online/licenses/licenses.xml,./packages/integration/licenses/licenses.xml' --mo=licenses.xml -o=docker/licenses",
"gen:proxying": "./scripts/generate-proxying.sh",
Expand All @@ -48,20 +40,15 @@
"kustomize:image": "cd deploy/base && kustomize edit set image hawtio/online=docker.io/${ORG:-hawtio}/${PROJECT:-online}:${TAG:-latest}"
},
"devDependencies": {
"@hawtio/node-backend": "^4.1.4",
"@typescript-eslint/eslint-plugin": "^5.50.0",
"@typescript-eslint/parser": "^5.50.0",
"bats": "^1.5.0",
"bats-assert": "bats-core/bats-assert#v2.0.0",
"bats-support": "bats-core/bats-support#v0.3.0",
"concurrently": "^8.2.0",
"cz-conventional-changelog": "3.3.0",
"eslint": "^8.33.0",
"eslint-config-prettier": "^8.8.0",
"eslint-config-react-app": "^7.0.1",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-react-hooks": "^4.6.0",
"js-logger": "^0.9.14",
"prettier": "2.8.8"
},
"config": {
Expand All @@ -71,7 +58,7 @@
},
"packageManager": "yarn@3.6.0",
"engines": {
"yarn": ">=3.4.1",
"yarn": ">=3.6.0",
"node": ">=16"
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
163 changes: 163 additions & 0 deletions packages/kubernetes-api-app/__webpackConfig__.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
output = {
path: '/home/phantomjinx/programming/openshift/hawtio-online/packages/kubernetes-api-app/build',
pathinfo: false,
filename: 'static/js/[name].[contenthash:8].js',
chunkFilename: 'static/js/[name].[contenthash:8].chunk.js',
assetModuleFilename: 'static/media/[name].[hash][ext]',
publicPath: 'auto',
devtoolModuleFilenameTemplate: [Function (anonymous)]
}

plugins = [
Dotenv {
config: {
path: './.env',
prefix: 'process.env.',
safe: true,
allowEmptyValues: true,
defaults: true,
systemvars: true,
ignoreStub: true
}
},
ModuleFederationPlugin {
_options: {
name: 'app',
filename: 'remoteEntry.js',
exposes: {},
shared: [Object]
}
},
HtmlWebpackPlugin {
userOptions: {
inject: true,
template: '/home/phantomjinx/programming/openshift/hawtio-online/packages/kubernetes-api-app/public/index.html',
minify: [Object]
},
version: 5
},
InlineChunkHtmlPlugin {
htmlWebpackPlugin: [class HtmlWebpackPlugin] {
version: 5,
getHooks: [Function: getHtmlWebpackPluginHooks],
createHtmlTagObject: [Function: createHtmlTagObject]
},
tests: [ /runtime-.+[.]js/ ]
},
InterpolateHtmlPlugin {
htmlWebpackPlugin: [class HtmlWebpackPlugin] {
version: 5,
getHooks: [Function: getHtmlWebpackPluginHooks],
createHtmlTagObject: [Function: createHtmlTagObject]
},
replacements: {
NODE_ENV: 'production',
PUBLIC_URL: '',
WDS_SOCKET_HOST: undefined,
WDS_SOCKET_PATH: undefined,
WDS_SOCKET_PORT: undefined,
FAST_REFRESH: true,
REACT_APP_KUBERNETES_MASTER: 'pgr'
}
},
ModuleNotFoundPlugin {
appPath: '/home/phantomjinx/programming/openshift/hawtio-online/packages/kubernetes-api-app',
yarnLockFile: undefined,
useYarnCommand: [Function: bound useYarnCommand],
getRelativePath: [Function: bound getRelativePath],
prettierError: [Function: bound prettierError]
},
DefinePlugin { definitions: { 'process.env': [Object] } },
MiniCssExtractPlugin {
_sortedModulesCache: WeakMap { <items unknown> },
options: {
filename: 'static/css/[name].[contenthash:8].css',
ignoreOrder: true,
experimentalUseImportModule: undefined,
runtime: true,
chunkFilename: 'static/css/[name].[contenthash:8].chunk.css'
},
runtimeOptions: { insert: undefined, linkType: 'text/css', attributes: undefined }
},
WebpackManifestPlugin {
options: {
assetHookStage: Infinity,
basePath: '',
fileName: 'asset-manifest.json',
filter: null,
generate: [Function: generate],
map: null,
publicPath: '/',
removeKeyHash: /([a-f0-9]{16,32}\.?)/gi,
seed: undefined,
serialize: [Function: serialize],
sort: null,
transformExtensions: /^(gz|map)$/i,
useEntryKeys: false,
useLegacyEmit: false,
writeToFileEmit: false
}
},
IgnorePlugin {
options: { resourceRegExp: /^\.\/locale$/, contextRegExp: /moment$/ },
checkIgnore: [Function: bound checkIgnore]
},
ForkTsCheckerWebpackPlugin {
options: {
async: false,
typescript: [Object],
issue: [Object],
logger: [Object]
}
},
ESLintWebpackPlugin {
key: 'ESLintWebpackPlugin',
options: {
extensions: [Array],
emitError: true,
emitWarning: true,
failOnError: true,
resourceQueryExclude: [],
formatter: '/home/phantomjinx/programming/openshift/hawtio-online/node_modules/react-dev-utils/eslintFormatter.js',
eslintPath: '/home/phantomjinx/programming/openshift/hawtio-online/node_modules/react-scripts/node_modules/eslint/lib/api.js',
context: '/home/phantomjinx/programming/openshift/hawtio-online/packages/kubernetes-api-app/src',
cache: true,
cacheLocation: '/home/phantomjinx/programming/openshift/hawtio-online/packages/kubernetes-api-app/node_modules/.cache/.eslintcache',
cwd: '/home/phantomjinx/programming/openshift/hawtio-online/packages/kubernetes-api-app',
resolvePluginsRelativeTo: '/home/phantomjinx/programming/openshift/hawtio-online/node_modules/react-scripts/config',
baseConfig: [Object],
ignore: true
},
run: [Function: bound run] AsyncFunction
}
]

resolve = {
modules: [
'/home/phantomjinx/programming/openshift/hawtio-online/packages/kubernetes-api-app/node_modules',
'/home/phantomjinx/programming/openshift/hawtio-online/node_modules'
],
extensions: [
'.web.mjs', '.mjs',
'.web.js', '.js',
'.web.ts', '.ts',
'.web.tsx', '.tsx',
'.json', '.web.jsx',
'.jsx'
],
alias: {
'react-native': 'react-native-web',
src: '/home/phantomjinx/programming/openshift/hawtio-online/packages/kubernetes-api-app/src'
},
plugins: [
ModuleScopePlugin {
appSrcs: [Array],
allowedFiles: [Set],
allowedPaths: [Array]
}
],
fallback: {
path: '/home/phantomjinx/programming/openshift/hawtio-online/node_modules/path-browserify/index.js',
os: '/home/phantomjinx/programming/openshift/hawtio-online/node_modules/os-browserify/main.js'
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ module.exports = () => {
webpackConfig['resolve'] = {
modules: [
path.resolve(__dirname, 'node_modules'),
path.resolve(__dirname, '../../../node_modules'),
path.resolve(__dirname, '../../node_modules'),
],
extensions: extensions,
alias: alias,
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
68 changes: 0 additions & 68 deletions packages/kubernetes-api/api/package.json

This file was deleted.

File renamed without changes.
Loading

0 comments on commit 1a0df1e

Please sign in to comment.