-
-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master-github-upstream' into feature/integrate_visualizer
# Conflicts: # package-lock.json # package.json # src/components/Visualiser/Controls.tsx # src/components/Visualiser/FlowDiagram.tsx # src/components/Visualiser/Nodes/ApplicationNode.tsx # src/components/Visualiser/Nodes/PublishNode.tsx # src/components/Visualiser/Nodes/SubscribeNode.tsx # src/components/Visualiser/Visualiser.tsx # src/components/Visualiser/VisualiserTemplate.tsx # src/components/Visualiser/utils/node-calculator.ts # src/components/Visualiser/utils/node-factory.ts
- Loading branch information
Showing
25 changed files
with
8,799 additions
and
16,172 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,86 @@ | ||
// eslint-disable-next-line | ||
const crypto = require('crypto'); // Force method use SHA-256 to address | ||
const cryptCreateHashOrig = crypto.createHash; // OpenSSL 3.0 deprecation of | ||
crypto.createHash = () => cryptCreateHashOrig('sha256'); // MD4 algorithm | ||
|
||
module.exports = { | ||
style: { | ||
postcss: { | ||
plugins: [ | ||
require('tailwindcss'), | ||
require('autoprefixer'), | ||
], | ||
}, | ||
}, | ||
webpack: { | ||
configure: (webpackConfig) => { | ||
webpackConfig.module.rules.push({ | ||
test: /\.yml$/i, | ||
loader: 'raw-loader', | ||
}); | ||
|
||
webpackConfig.resolve.alias = webpackConfig.resolve.alias || {}; | ||
webpackConfig.resolve.alias['nimma/fallbacks'] = require.resolve('./node_modules/nimma/dist/legacy/cjs/fallbacks/index.js'); | ||
webpackConfig.resolve.alias['nimma/legacy'] = require.resolve('./node_modules/nimma/dist/legacy/cjs/index.js'); | ||
|
||
return webpackConfig; | ||
/* eslint-disable */ | ||
|
||
const crypto = require('crypto'); | ||
const webpack = require('webpack'); | ||
|
||
function getFileLoaderRule(rules) { | ||
for (const rule of rules) { | ||
if ("oneOf" in rule) { | ||
const found = getFileLoaderRule(rule.oneOf); | ||
if (found) { | ||
return found; | ||
} | ||
} else if (rule.test === undefined && rule.type === 'asset/resource') { | ||
return rule; | ||
} | ||
} | ||
}; | ||
throw new Error("File loader not found"); | ||
} | ||
|
||
function configureWebpack(webpackConfig) { | ||
// fallbacks | ||
const fallback = webpackConfig.resolve.fallback || {}; | ||
Object.assign(fallback, { | ||
assert: require.resolve('assert/'), | ||
buffer: require.resolve('buffer'), | ||
http: require.resolve('stream-http'), | ||
https: require.resolve('https-browserify'), | ||
path: require.resolve('path-browserify'), | ||
stream: require.resolve('stream-browserify'), | ||
zlib: require.resolve('browserify-zlib'), | ||
url: require.resolve('url/'), | ||
util: require.resolve('util/'), | ||
fs: false, | ||
}); | ||
webpackConfig.resolve.fallback = fallback; | ||
|
||
// aliases | ||
webpackConfig.resolve.alias = webpackConfig.resolve.alias || {}; | ||
webpackConfig.resolve.alias['nimma/fallbacks'] = require.resolve('./node_modules/nimma/dist/legacy/cjs/fallbacks/index.js'); | ||
webpackConfig.resolve.alias['nimma/legacy'] = require.resolve('./node_modules/nimma/dist/legacy/cjs/index.js'); | ||
|
||
// plugins | ||
webpackConfig.plugins = (webpackConfig.plugins || []).concat([ | ||
new webpack.ProvidePlugin({ | ||
process: 'process/browser.js', | ||
Buffer: ['buffer', 'Buffer'] | ||
}) | ||
]); | ||
|
||
// rules/loaders | ||
// workaround for https://github.com/facebook/create-react-app/issues/11889 issue | ||
const fileLoaderRule = getFileLoaderRule(webpackConfig.module.rules); | ||
fileLoaderRule.exclude.push(/\.cjs$/); | ||
webpackConfig.module.rules.push({ | ||
test: /\.yml$/i, | ||
type: 'asset/source', | ||
}); | ||
|
||
// ignore source-map warnings | ||
webpackConfig.ignoreWarnings = [...(webpackConfig.ignoreWarnings || []), /Failed to parse source map/]; | ||
|
||
return webpackConfig; | ||
} | ||
|
||
// Force method use SHA-256 to address OpenSSL 3.0 deprecation of MD4 algorithm | ||
function configureCrypto() { | ||
const cryptCreateHashOrig = crypto.createHash; | ||
crypto.createHash = () => cryptCreateHashOrig('sha256'); | ||
} | ||
|
||
function setEnvironments() { | ||
process.env.DISABLE_ESLINT_PLUGIN = true; | ||
} | ||
|
||
function configureCraco() { | ||
setEnvironments(); | ||
configureCrypto(); | ||
|
||
return { | ||
webpack: { | ||
configure: configureWebpack, | ||
} | ||
}; | ||
} | ||
|
||
module.exports = configureCraco(); |
Oops, something went wrong.