@equinor/echo-cli 2.2.0 → 2.4.1-beta-0

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 (45) hide show
  1. package/README.md +393 -384
  2. package/lib/echo-dev-host/README.md +121 -121
  3. package/lib/echo-dev-host/babel.config.js +10 -10
  4. package/lib/echo-dev-host/echo-dev-host-build/d2d97a9feca22f12a8c8c7413d7867ac.jpg +0 -0
  5. package/lib/echo-dev-host/echo-dev-host-build/env-config.js +1 -0
  6. package/lib/echo-dev-host/echo-dev-host-build/index.css +60 -0
  7. package/lib/echo-dev-host/echo-dev-host-build/index.html +21 -0
  8. package/lib/echo-dev-host/echo-dev-host-build/main.echo.bundle.js +3 -0
  9. package/lib/echo-dev-host/echo-dev-host-build/main.echo.bundle.js.LICENSE.txt +149 -0
  10. package/lib/echo-dev-host/echo-dev-host-build/main.echo.bundle.js.map +1 -0
  11. package/lib/echo-dev-host/echo-dev-host-build/vendors-node_modules_babel_polyfill_lib_index_js-node_modules_react-dom_client_js-node_module-972289.echo.bundle.js +3 -0
  12. package/lib/echo-dev-host/echo-dev-host-build/vendors-node_modules_babel_polyfill_lib_index_js-node_modules_react-dom_client_js-node_module-972289.echo.bundle.js.LICENSE.txt +8539 -0
  13. package/lib/echo-dev-host/echo-dev-host-build/vendors-node_modules_babel_polyfill_lib_index_js-node_modules_react-dom_client_js-node_module-972289.echo.bundle.js.map +1 -0
  14. package/lib/echo-dev-host/jest.config.js +21 -21
  15. package/lib/echo-dev-host/package-lock.json +13153 -13124
  16. package/lib/echo-dev-host/package.json +14 -14
  17. package/lib/echo-dev-host/public/env-config.js +17 -17
  18. package/lib/echo-dev-host/public/index.html +21 -21
  19. package/lib/echo-dev-host/src/index.tsx +0 -1
  20. package/lib/echo-dev-host/tsconfig.json +21 -21
  21. package/lib/echo-dev-host/webpack.config.js +145 -145
  22. package/lib/sync-echo-dev-versions.d.ts +6 -0
  23. package/lib/sync-echo-dev-versions.js +43 -0
  24. package/lib/sync-echo-dev-versions.js.map +1 -0
  25. package/lib/tools/buildScripts/buildAndCopyDevHost.test.d.ts +1 -0
  26. package/lib/tools/buildScripts/buildAndCopyDevHost.test.js +500 -0
  27. package/lib/tools/buildScripts/buildAndCopyDevHost.test.js.map +1 -0
  28. package/lib/utils/merge.test.d.ts +1 -0
  29. package/lib/utils/merge.test.js +29 -0
  30. package/lib/utils/merge.test.js.map +1 -0
  31. package/package.json +111 -111
  32. package/templates/echoAppTemplate/.gitattributes +3 -3
  33. package/templates/echoAppTemplate/package.json +35 -35
  34. package/templates/echoAppTemplate/readme.md +41 -41
  35. package/templates/echoAppTemplate/tsconfig.json +25 -25
  36. package/templates/echoAppTemplateTutorial/.gitattributes +3 -3
  37. package/templates/echoAppTemplateTutorial/package.json +36 -36
  38. package/templates/echoAppTemplateTutorial/readme.md +41 -41
  39. package/templates/echoAppTemplateTutorial/tsconfig.json +25 -25
  40. package/templates/echoLibraryTemplate/package.json +35 -35
  41. package/templates/echoLibraryTemplate/public/index.html +21 -21
  42. package/templates/echoLibraryTemplate/readme.md +1 -1
  43. package/templates/echoPluginTemplate/package.json +35 -35
  44. package/templates/echoPluginTemplate/public/index.html +21 -21
  45. package/templates/echoPluginTemplate/readme.md +1 -1
@@ -21,24 +21,24 @@
21
21
  "author": "",
22
22
  "license": "MIT",
23
23
  "dependencies": {
24
- "@equinor/echo-base": "2.2.3",
25
- "@equinor/echo-components": "2.2.3",
26
- "@equinor/echo-core": "2.2.3",
27
- "@equinor/echo-framework": "2.2.1",
24
+ "@equinor/echo-base": "2.4.1",
25
+ "@equinor/echo-components": "2.4.1",
26
+ "@equinor/echo-core": "2.4.1",
27
+ "@equinor/echo-framework": "^2.4.1",
28
28
  "@equinor/echo-scripts": "0.1.5",
29
- "@equinor/echo-search": "2.2.3",
30
- "@equinor/echo-utils": "2.2.3",
29
+ "@equinor/echo-search": "2.4.1",
30
+ "@equinor/echo-utils": "2.4.1",
31
31
  "@equinor/eds-core-react": "0.49.0",
32
32
  "@equinor/eds-icons": "0.22.0",
33
- "@equinor/eds-tokens": "0.10.0",
33
+ "@equinor/eds-tokens": "2.1.0",
34
34
  "@equinor/eds-utils": "0.9.0",
35
35
  "@microsoft/signalr": "9.0.6",
36
36
  "@svgr/webpack": "8.1.0",
37
- "@tanstack/react-query": "5.90.2",
37
+ "@tanstack/react-query": "5.90.16",
38
38
  "classnames": "2.5.1",
39
39
  "fs-extra": "11.3.0",
40
40
  "history": "5.3.0",
41
- "immer": "10.1.3",
41
+ "immer": "11.1.3",
42
42
  "lodash": "4.17.21",
43
43
  "react": "18.3.1",
44
44
  "react-dom": "18.3.1",
@@ -49,15 +49,15 @@
49
49
  "zustand": "4.5.7"
50
50
  },
51
51
  "devDependencies": {
52
- "@babel/core": "7.28.4",
52
+ "@babel/core": "7.28.5",
53
53
  "@babel/plugin-transform-runtime": "7.27.1",
54
54
  "@babel/polyfill": "7.12.1",
55
55
  "@babel/preset-env": "7.27.2",
56
- "@babel/preset-react": "7.27.1",
56
+ "@babel/preset-react": "7.28.5",
57
57
  "@babel/preset-typescript": "7.27.1",
58
58
  "@equinor/echo-update": "1.3.3",
59
59
  "@types/jest": "30.0.0",
60
- "@types/node": "24.3.0",
60
+ "@types/node": "25.0.3",
61
61
  "@types/react": "18.3.12",
62
62
  "@types/react-dom": "18.3.1",
63
63
  "@types/react-router-dom": "5.3.3",
@@ -70,10 +70,10 @@
70
70
  "html-webpack-plugin": "5.6.3",
71
71
  "jest": "30.2.0",
72
72
  "style-loader": "4.0.0",
73
- "ts-jest": "29.4.5",
73
+ "ts-jest": "29.4.6",
74
74
  "ts-loader": "9.5.2",
75
75
  "typescript": "5.9.3",
76
- "webpack": "5.102.1",
76
+ "webpack": "5.104.1",
77
77
  "webpack-cli": "6.0.1",
78
78
  "webpack-dev-server": "5.2.1",
79
79
  "webpackbar": "7.0.0"
@@ -1,17 +1,17 @@
1
- window._env_ = {
2
- HTTPS: "true",
3
- GENERATE_SOURCEMAP: "true",
4
- INLINE_RUNTIME_CHUNK: "false",
5
- WEBSITE_HOSTNAME: "localhost:3000;",
6
- REACT_APP_DEFAULT_CACHE_LOCATION: "localstorage",
7
- REACT_APP_API_URL: "https://dt-echopedia-api-dev.azurewebsites.net",
8
- REACT_APP_WEB_URL: "https://dt-echopedia-web-dev.azurewebsites.net",
9
- REACT_APP_WEB_PROD_URL: "https://echo.equinor.com",
10
- REACT_APP_AZURE_AD_TENNANT: "StatoilSRM.onmicrosoft.com",
11
- REACT_APP_AZURE_AD_TENNANT_ID: "3aa4a235-b6e2-48d5-9195-7fcf05b459b0",
12
- REACT_APP_AZURE_AD_CLIENT_ID: "751d2504-0b66-4b78-9807-4b60525a14c6",
13
- REACT_APP_API_CLIENT_ID: "aef35d97-53d4-4fd0-adaf-c5a514b38436",
14
- REACT_APP_APPINSIGHTS_CONNECTION_STRING: "InstrumentationKey=e5299075-a00d-4012-96f9-42861e8d8a9e;IngestionEndpoint=https://northeurope-3.in.applicationinsights.azure.com/;LiveEndpoint=https://northeurope.livediagnostics.monitor.azure.com/;ApplicationId=a9b64222-d4a9-42e6-a615-7428fe1a26af",
15
- REACT_APP_AZURE_BUILD_NUMBER: "0.8.dev.9",
16
- REACT_APP_LOGGER_ACTIVE: "false",
17
- }
1
+ window._env_ = {
2
+ HTTPS: "true",
3
+ GENERATE_SOURCEMAP: "true",
4
+ INLINE_RUNTIME_CHUNK: "false",
5
+ WEBSITE_HOSTNAME: "localhost:3000;",
6
+ REACT_APP_DEFAULT_CACHE_LOCATION: "localstorage",
7
+ REACT_APP_API_URL: "https://dt-echopedia-api-dev.azurewebsites.net",
8
+ REACT_APP_WEB_URL: "https://dt-echopedia-web-dev.azurewebsites.net",
9
+ REACT_APP_WEB_PROD_URL: "https://echo.equinor.com",
10
+ REACT_APP_AZURE_AD_TENNANT: "StatoilSRM.onmicrosoft.com",
11
+ REACT_APP_AZURE_AD_TENNANT_ID: "3aa4a235-b6e2-48d5-9195-7fcf05b459b0",
12
+ REACT_APP_AZURE_AD_CLIENT_ID: "751d2504-0b66-4b78-9807-4b60525a14c6",
13
+ REACT_APP_API_CLIENT_ID: "aef35d97-53d4-4fd0-adaf-c5a514b38436",
14
+ REACT_APP_APPINSIGHTS_CONNECTION_STRING: "InstrumentationKey=e5299075-a00d-4012-96f9-42861e8d8a9e;IngestionEndpoint=https://northeurope-3.in.applicationinsights.azure.com/;LiveEndpoint=https://northeurope.livediagnostics.monitor.azure.com/;ApplicationId=a9b64222-d4a9-42e6-a615-7428fe1a26af",
15
+ REACT_APP_AZURE_BUILD_NUMBER: "0.8.dev.9",
16
+ REACT_APP_LOGGER_ACTIVE: "false",
17
+ }
@@ -1,21 +1,21 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="UTF-8" />
5
- <script type="application/javascript" src="./env-config.js"></script>
6
- <meta http-equiv="X-UA-Compatible" content="IE=edge" />
7
- <meta
8
- name="viewport"
9
- content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no,viewport-fit=cover"
10
- />
11
- <link href="./index.css" rel="stylesheet" />
12
- <link rel="stylesheet" href="https://cdn.eds.equinor.com/font/equinor-font.css" />
13
- <link rel="preconnect" href="https://login.microsoftonline.com" />
14
- <link rel="preconnect" href="https://dc.services.visualstudio.com" />
15
- <link rel="preconnect" href="https://cdn.eds.equinor.com" />
16
- <title>Echo | Development</title>
17
- </head>
18
- <body>
19
- <div id="root"></div>
20
- </body>
21
- </html>
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <script type="application/javascript" src="./env-config.js"></script>
6
+ <meta http-equiv="X-UA-Compatible" content="IE=edge" />
7
+ <meta
8
+ name="viewport"
9
+ content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no,viewport-fit=cover"
10
+ />
11
+ <link href="./index.css" rel="stylesheet" />
12
+ <link rel="stylesheet" href="https://cdn.eds.equinor.com/font/equinor-font.css" />
13
+ <link rel="preconnect" href="https://login.microsoftonline.com" />
14
+ <link rel="preconnect" href="https://dc.services.visualstudio.com" />
15
+ <link rel="preconnect" href="https://cdn.eds.equinor.com" />
16
+ <title>Echo | Development</title>
17
+ </head>
18
+ <body data-color-scheme="light">
19
+ <div id="root"></div>
20
+ </body>
21
+ </html>
@@ -1,5 +1,4 @@
1
1
  import { LoadingModuleOptions } from '@equinor/echo-base';
2
- import '@equinor/echo-components/style-reset.css';
3
2
  import EchoCore, { createEchoAppModuleApi, EventHubProvider, queryClient } from '@equinor/echo-core';
4
3
  import { mainMenu, Mediator } from '@equinor/echo-framework';
5
4
  import { Icon } from '@equinor/eds-core-react';
@@ -1,21 +1,21 @@
1
- {
2
- "compilerOptions": {
3
- "strict": true,
4
- "jsx": "react-jsx",
5
- "lib": ["dom", "dom.iterable", "esnext"],
6
- "allowSyntheticDefaultImports": true,
7
- "esModuleInterop": true,
8
- "module": "commonjs",
9
- "outDir": "./build/",
10
- "preserveConstEnums": true,
11
- "removeComments": true,
12
- "sourceMap": true,
13
- "noImplicitAny": false,
14
- "allowJs": true,
15
- "skipLibCheck": true,
16
- "target": "es5",
17
- "resolveJsonModule": true,
18
- "types": ["@equinor/echo-scripts", "@types/node", "@types/webpack-env", "@types/jest"]
19
- },
20
- "include": ["src"]
21
- }
1
+ {
2
+ "compilerOptions": {
3
+ "strict": true,
4
+ "jsx": "react-jsx",
5
+ "lib": ["dom", "dom.iterable", "esnext"],
6
+ "allowSyntheticDefaultImports": true,
7
+ "esModuleInterop": true,
8
+ "module": "commonjs",
9
+ "outDir": "./build/",
10
+ "preserveConstEnums": true,
11
+ "removeComments": true,
12
+ "sourceMap": true,
13
+ "noImplicitAny": false,
14
+ "allowJs": true,
15
+ "skipLibCheck": true,
16
+ "target": "es5",
17
+ "resolveJsonModule": true,
18
+ "types": ["@equinor/echo-scripts", "@types/node", "@types/webpack-env", "@types/jest"]
19
+ },
20
+ "include": ["src"]
21
+ }
@@ -1,145 +1,145 @@
1
- import CopyPlugin from 'copy-webpack-plugin';
2
- import Dotenv from 'dotenv-webpack';
3
- import HtmlWebpackPlugin from 'html-webpack-plugin';
4
- import path from 'path';
5
- import { fileURLToPath } from 'url';
6
- import WebpackBar from 'webpackbar';
7
-
8
- const webpackConfig = (env) => {
9
- console.log('Building the dev host application for EchoCli.');
10
-
11
- const __filename = fileURLToPath(import.meta.url);
12
- const __dirname = path.dirname(__filename);
13
-
14
- const buildOutputFolder = 'echo-dev-host-build';
15
-
16
- return {
17
- entry: ['@babel/polyfill', './src/index.tsx'],
18
- mode: 'production',
19
- devtool: 'source-map',
20
- output: {
21
- clean: true,
22
- path: path.resolve(process.cwd(), buildOutputFolder),
23
- filename: '[name].echo.bundle.js',
24
- chunkFilename: 'assets/[name].[contenthash].chunk.js',
25
- publicPath: '/'
26
- },
27
- resolve: {
28
- extensions: ['.ts', '.tsx', '.js', '.jsx'],
29
- fallback: {
30
- crypto: false,
31
- stream: false,
32
- buffer: false
33
- }
34
- },
35
- module: {
36
- rules: [
37
- {
38
- test: /\.(ts|tsx)$/,
39
- loader: 'ts-loader',
40
- exclude: /node_modules/
41
- },
42
- {
43
- test: /\.(js|jsx)$/,
44
- exclude: /node_modules/,
45
- loader: 'babel-loader'
46
- },
47
- {
48
- test: /\.css$/,
49
- use: [
50
- 'style-loader',
51
- {
52
- loader: 'css-loader',
53
- options: {
54
- importLoaders: 1,
55
- modules: {
56
- mode: 'local',
57
- localIdentName: 'echo-[folder]__[local]-[hash:base64:5]',
58
- namedExport: false,
59
- exportLocalsConvention: 'as-is'
60
- }
61
- }
62
- }
63
- ],
64
- include: /\.module\.css$/
65
- },
66
- {
67
- test: /\.css$/,
68
- use: ['style-loader', 'css-loader'],
69
- exclude: /\.module\.css$/
70
- },
71
- {
72
- test: /\.svg$/,
73
- use: ['@svgr/webpack']
74
- },
75
- {
76
- test: /\.(png|jpe?g|gif)$/i,
77
- use: [
78
- {
79
- loader: 'file-loader'
80
- }
81
- ]
82
- }
83
- ]
84
- },
85
- devServer: {
86
- static: [
87
- {
88
- directory: path.join(__dirname, 'public')
89
- },
90
- {
91
- directory: path.join(__dirname, 'build')
92
- }
93
- ],
94
- compress: true,
95
- port: 3000,
96
- hot: true,
97
- historyApiFallback: true,
98
- server: 'https',
99
- headers: {
100
- 'Access-Control-Allow-Origin': '*',
101
- 'Access-Control-Allow-Methods': 'GET, POST, PUT, DELETE, PATCH, OPTIONS',
102
- 'Access-Control-Allow-Headers': 'X-Requested-With, content-type, Authorization'
103
- }
104
- // overlay: {
105
- // warnings: true,
106
- // errors: true,
107
- // },
108
- },
109
- plugins: [
110
- new Dotenv({
111
- ignoreStub: false,
112
- expand: true,
113
- systemvars: false
114
- }),
115
- new HtmlWebpackPlugin({
116
- template: path.resolve(__dirname, './public/index.html')
117
- }),
118
- new WebpackBar({
119
- name: 'Echo module',
120
- color: '#007079',
121
- profile: true
122
- }),
123
- new CopyPlugin({
124
- patterns: [
125
- {
126
- from: path.resolve(__dirname, './public/index.css'),
127
- to: path.resolve(process.cwd(), buildOutputFolder, 'index.css')
128
- },
129
- {
130
- from: path.resolve(__dirname, './public/env-config.js'),
131
- to: path.resolve(process.cwd(), buildOutputFolder, 'env-config.js')
132
- }
133
- ]
134
- })
135
- ],
136
- optimization: {
137
- splitChunks: {
138
- chunks: 'all'
139
- },
140
- minimize: true
141
- }
142
- };
143
- };
144
-
145
- export default webpackConfig;
1
+ import CopyPlugin from 'copy-webpack-plugin';
2
+ import Dotenv from 'dotenv-webpack';
3
+ import HtmlWebpackPlugin from 'html-webpack-plugin';
4
+ import path from 'path';
5
+ import { fileURLToPath } from 'url';
6
+ import WebpackBar from 'webpackbar';
7
+
8
+ const webpackConfig = (env) => {
9
+ console.log('Building the dev host application for EchoCli.');
10
+
11
+ const __filename = fileURLToPath(import.meta.url);
12
+ const __dirname = path.dirname(__filename);
13
+
14
+ const buildOutputFolder = 'echo-dev-host-build';
15
+
16
+ return {
17
+ entry: ['@babel/polyfill', './src/index.tsx'],
18
+ mode: 'production',
19
+ devtool: 'source-map',
20
+ output: {
21
+ clean: true,
22
+ path: path.resolve(process.cwd(), buildOutputFolder),
23
+ filename: '[name].echo.bundle.js',
24
+ chunkFilename: 'assets/[name].[contenthash].chunk.js',
25
+ publicPath: '/'
26
+ },
27
+ resolve: {
28
+ extensions: ['.ts', '.tsx', '.js', '.jsx'],
29
+ fallback: {
30
+ crypto: false,
31
+ stream: false,
32
+ buffer: false
33
+ }
34
+ },
35
+ module: {
36
+ rules: [
37
+ {
38
+ test: /\.(ts|tsx)$/,
39
+ loader: 'ts-loader',
40
+ exclude: /node_modules/
41
+ },
42
+ {
43
+ test: /\.(js|jsx)$/,
44
+ exclude: /node_modules/,
45
+ loader: 'babel-loader'
46
+ },
47
+ {
48
+ test: /\.css$/,
49
+ use: [
50
+ 'style-loader',
51
+ {
52
+ loader: 'css-loader',
53
+ options: {
54
+ importLoaders: 1,
55
+ modules: {
56
+ mode: 'local',
57
+ localIdentName: 'echo-[folder]__[local]-[hash:base64:5]',
58
+ namedExport: false,
59
+ exportLocalsConvention: 'as-is'
60
+ }
61
+ }
62
+ }
63
+ ],
64
+ include: /\.module\.css$/
65
+ },
66
+ {
67
+ test: /\.css$/,
68
+ use: ['style-loader', 'css-loader'],
69
+ exclude: /\.module\.css$/
70
+ },
71
+ {
72
+ test: /\.svg$/,
73
+ use: ['@svgr/webpack']
74
+ },
75
+ {
76
+ test: /\.(png|jpe?g|gif)$/i,
77
+ use: [
78
+ {
79
+ loader: 'file-loader'
80
+ }
81
+ ]
82
+ }
83
+ ]
84
+ },
85
+ devServer: {
86
+ static: [
87
+ {
88
+ directory: path.join(__dirname, 'public')
89
+ },
90
+ {
91
+ directory: path.join(__dirname, 'build')
92
+ }
93
+ ],
94
+ compress: true,
95
+ port: 3000,
96
+ hot: true,
97
+ historyApiFallback: true,
98
+ server: 'https',
99
+ headers: {
100
+ 'Access-Control-Allow-Origin': '*',
101
+ 'Access-Control-Allow-Methods': 'GET, POST, PUT, DELETE, PATCH, OPTIONS',
102
+ 'Access-Control-Allow-Headers': 'X-Requested-With, content-type, Authorization'
103
+ }
104
+ // overlay: {
105
+ // warnings: true,
106
+ // errors: true,
107
+ // },
108
+ },
109
+ plugins: [
110
+ new Dotenv({
111
+ ignoreStub: false,
112
+ expand: true,
113
+ systemvars: false
114
+ }),
115
+ new HtmlWebpackPlugin({
116
+ template: path.resolve(__dirname, './public/index.html')
117
+ }),
118
+ new WebpackBar({
119
+ name: 'Echo module',
120
+ color: '#007079',
121
+ profile: true
122
+ }),
123
+ new CopyPlugin({
124
+ patterns: [
125
+ {
126
+ from: path.resolve(__dirname, './public/index.css'),
127
+ to: path.resolve(process.cwd(), buildOutputFolder, 'index.css')
128
+ },
129
+ {
130
+ from: path.resolve(__dirname, './public/env-config.js'),
131
+ to: path.resolve(process.cwd(), buildOutputFolder, 'env-config.js')
132
+ }
133
+ ]
134
+ })
135
+ ],
136
+ optimization: {
137
+ splitChunks: {
138
+ chunks: 'all'
139
+ },
140
+ minimize: true
141
+ }
142
+ };
143
+ };
144
+
145
+ export default webpackConfig;
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env node
2
+ import { Command } from '@oclif/core';
3
+ export default class SyncEchoDevVersions extends Command {
4
+ static readonly description = "Sync echo-dev-host to use exact echo library versions from your app (useful after switching git branches)";
5
+ run(): Promise<void>;
6
+ }
@@ -0,0 +1,43 @@
1
+ #!/usr/bin/env node
2
+ import { Command } from '@oclif/core';
3
+ import chalk from 'chalk';
4
+ import path from 'node:path';
5
+ import { ECHO_HOST_BUILD_OUTPUT_FOLDER, ECHO_HOST_TEMP_BUILD_FOLDER } from './const/common.js';
6
+ import { buildAndCopyDevHost } from './tools/buildScripts/buildAndCopyDevHost.js';
7
+ import { findConsumerAppPackageJson } from './utils/findConsumerAppPackageJson.js';
8
+ import { printEchoLibsVersions } from './utils/printEchoLibsVersions.js';
9
+ export default class SyncEchoDevVersions extends Command {
10
+ static description = 'Sync echo-dev-host to use exact echo library versions from your app (useful after switching git branches)';
11
+ async run() {
12
+ console.log(chalk.cyan.bold('\nšŸ”„ Syncing echo-dev-host versions to match your app...\n'));
13
+ // 1. Find consumer app package.json
14
+ const consumerPkgPath = findConsumerAppPackageJson(process.cwd());
15
+ if (!consumerPkgPath) {
16
+ console.error(chalk.red('Could not find a package.json with @equinor/echo-* dependencies.\nMake sure you are in an Echo module project directory.'));
17
+ process.exit(1);
18
+ }
19
+ // 2. Show current versions
20
+ const devHostPkgPath = path.resolve(process.cwd(), 'node_modules', '@equinor', 'echo-cli', 'lib', 'echo-dev-host', 'package.json');
21
+ console.log(chalk.yellow('Current versions:\n'));
22
+ await printEchoLibsVersions({
23
+ devHostPkgPath,
24
+ appPkgPath: consumerPkgPath,
25
+ fetchLatest: false
26
+ });
27
+ console.log(chalk.cyan("\nšŸ“Œ This will rebuild echo-dev-host to match your app's package.json versions exactly.\n"));
28
+ // 3. Rebuild dev host with sync mode (forces consumer app versions)
29
+ const cliNodeModules = path.resolve(process.cwd(), 'node_modules', '@equinor', 'echo-cli');
30
+ const finalOutput = path.join(cliNodeModules, ECHO_HOST_BUILD_OUTPUT_FOLDER);
31
+ await buildAndCopyDevHost({
32
+ cliNodeModules,
33
+ tmpDevHostFolder: path.resolve(process.cwd(), ECHO_HOST_TEMP_BUILD_FOLDER),
34
+ finalOutputDir: finalOutput,
35
+ isProdBuild: false,
36
+ syncMode: true // New flag to force exact version matching
37
+ });
38
+ console.log(chalk.green.bold("\nāœ… Sync complete! echo-dev-host now uses your app's echo lib versions.\n"));
39
+ console.log(chalk.gray('You can now run "npm start" to start your Echo app.\n'));
40
+ }
41
+ }
42
+ SyncEchoDevVersions.run();
43
+ //# sourceMappingURL=sync-echo-dev-versions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sync-echo-dev-versions.js","sourceRoot":"","sources":["../src/sync-echo-dev-versions.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,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