@centreon/js-config 24.11.8 → 24.11.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/biome/base.json +210 -0
  2. package/cypress/component/commands.tsx +82 -22
  3. package/cypress/component/configuration.js +39 -16
  4. package/cypress/component/disableCssTransitions.ts +19 -0
  5. package/cypress/component/enableVisualTesting.ts +1 -1
  6. package/cypress/component/excludeNodeModulesFromCoverage.js +36 -0
  7. package/cypress/e2e/commands/configuration.ts +330 -1
  8. package/cypress/e2e/commands/monitoring.ts +225 -0
  9. package/cypress/e2e/commands.ts +727 -174
  10. package/cypress/e2e/configuration.ts +46 -40
  11. package/cypress/e2e/esbuild-preprocessor.ts +26 -0
  12. package/cypress/e2e/plugins.ts +52 -114
  13. package/cypress/e2e/reporter-config.js +13 -0
  14. package/cypress/e2e/tasks.ts +259 -0
  15. package/eslint/base.typescript.eslintrc.js +15 -3
  16. package/eslint/lambda/typescript.eslintrc.js +48 -0
  17. package/jest/index.js +5 -2
  18. package/jest/lambda/typescript.js +49 -0
  19. package/package.json +57 -45
  20. package/rspack/base/globalConfig.js +71 -0
  21. package/rspack/base/index.js +89 -0
  22. package/rspack/patch/dev.js +12 -0
  23. package/{webpack → rspack}/patch/devServer.js +4 -8
  24. package/rspack/patch/module.js +13 -0
  25. package/rspack/plugins/TransformPreloadScript.js +37 -0
  26. package/rspack/plugins/WriteRemoteEntryNameToModuleFederation.js +30 -0
  27. package/tsconfig/index.json +5 -4
  28. package/tsconfig/lambda/node20.tsconfig.json +12 -0
  29. package/tsconfig/lambda/tsconfig.json +14 -0
  30. package/tsconfig.json +21 -0
  31. package/webpack/base/index.js +0 -130
  32. package/webpack/patch/dev.js +0 -24
  33. package/webpack/patch/module.js +0 -46
@@ -1,24 +0,0 @@
1
- module.exports = {
2
- devJscTransformConfiguration: {
3
- react: {
4
- development: true,
5
- refresh: false,
6
- },
7
- },
8
- devRefreshJscTransformConfiguration: {
9
- react: {
10
- development: true,
11
- refresh: true,
12
- },
13
- },
14
- getDevConfiguration: () => ({
15
- cache: true,
16
- devtool: 'eval-cheap-module-source-map',
17
- optimization: {
18
- splitChunks: false,
19
- },
20
- output: {
21
- filename: '[name].js',
22
- },
23
- }),
24
- };
@@ -1,46 +0,0 @@
1
- const fs = require('fs');
2
- const { CleanWebpackPlugin } = require('clean-webpack-plugin');
3
-
4
- class CentreonModulePlugin {
5
- constructor(federatedComponentConfiguration) {
6
- this.federatedComponentConfiguration = federatedComponentConfiguration;
7
- }
8
-
9
- apply(compiler) {
10
- compiler.hooks.done.tap('CentreonModulePlugin', (stats) => {
11
- const newFederatedComponentConfiguration = {
12
- ...this.federatedComponentConfiguration,
13
- remoteEntry: Object.keys(stats.compilation.assets).find((assetName) =>
14
- assetName.match(/(^remoteEntry)\S+.js$/),
15
- ),
16
- };
17
-
18
- if (!fs.existsSync(compiler.options.output.path)) {
19
- fs.mkdirSync(compiler.options.output.path, { recursive: true });
20
- }
21
-
22
- fs.writeFileSync(
23
- `${compiler.options.output.path}/moduleFederation.json`,
24
- JSON.stringify(newFederatedComponentConfiguration, null, 2),
25
- );
26
- });
27
- }
28
- }
29
-
30
- module.exports = ({
31
- outputPath,
32
- federatedComponentConfiguration,
33
- }) => ({
34
- output: {
35
- library: '[chunkhash:8]',
36
- path: outputPath,
37
- },
38
- plugins: [
39
- new CleanWebpackPlugin({
40
- cleanOnceBeforeBuildPatterns: [`${outputPath}/**/*.js`],
41
- dangerouslyAllowCleanPatternsOutsideProject: true,
42
- dry: false,
43
- }),
44
- new CentreonModulePlugin(federatedComponentConfiguration),
45
- ],
46
- });