@equinor/echo-cli 2.2.0-beta-1 → 2.3.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 (34) hide show
  1. package/README.md +384 -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/jest.config.js +21 -21
  5. package/lib/echo-dev-host/package-lock.json +13127 -13124
  6. package/lib/echo-dev-host/package.json +7 -7
  7. package/lib/echo-dev-host/public/env-config.js +17 -17
  8. package/lib/echo-dev-host/public/index.html +21 -21
  9. package/lib/echo-dev-host/tsconfig.json +21 -21
  10. package/lib/echo-dev-host/webpack.config.js +145 -145
  11. package/package.json +111 -111
  12. package/templates/echoAppTemplate/.gitattributes +3 -3
  13. package/templates/echoAppTemplate/package.json +35 -35
  14. package/templates/echoAppTemplate/readme.md +41 -41
  15. package/templates/echoAppTemplate/tsconfig.json +25 -25
  16. package/templates/echoAppTemplateTutorial/.gitattributes +3 -3
  17. package/templates/echoAppTemplateTutorial/package.json +36 -36
  18. package/templates/echoAppTemplateTutorial/readme.md +41 -41
  19. package/templates/echoAppTemplateTutorial/tsconfig.json +25 -25
  20. package/templates/echoLibraryTemplate/package.json +35 -35
  21. package/templates/echoLibraryTemplate/public/index.html +21 -21
  22. package/templates/echoLibraryTemplate/readme.md +1 -1
  23. package/templates/echoPluginTemplate/package.json +35 -35
  24. package/templates/echoPluginTemplate/public/index.html +21 -21
  25. package/templates/echoPluginTemplate/readme.md +1 -1
  26. package/lib/sync-echo-dev-versions.d.ts +0 -6
  27. package/lib/sync-echo-dev-versions.js +0 -43
  28. package/lib/sync-echo-dev-versions.js.map +0 -1
  29. package/lib/tools/buildScripts/buildAndCopyDevHost.test.d.ts +0 -1
  30. package/lib/tools/buildScripts/buildAndCopyDevHost.test.js +0 -500
  31. package/lib/tools/buildScripts/buildAndCopyDevHost.test.js.map +0 -1
  32. package/lib/utils/merge.test.d.ts +0 -1
  33. package/lib/utils/merge.test.js +0 -29
  34. package/lib/utils/merge.test.js.map +0 -1
@@ -1,121 +1,121 @@
1
- # echo-dev-host
2
-
3
- **echo-dev-host** is a lightweight host application for developing and testing Echo Modules locally. It is shipped as source code with [`echo-cli`](../README.md) and provides a development shell that closely mimics the EchopediaWeb environment.
4
-
5
- ---
6
-
7
- ## What is echo-dev-host?
8
-
9
- - Provides a local "empty shell" of EchopediaWeb for rapid Echo Module development.
10
- - Ensures your module runs with the same dependencies and environment as production.
11
- - Supports hot module reloading for fast feedback during development.
12
- - Now shipped as source code, so you can update dependencies and rebuild locally—no need to wait for a new `echo-cli` release.
13
-
14
- ---
15
-
16
- ## New Workflow (from 2025)
17
-
18
- **You are now in control of the Echo library versions used by your dev host!**
19
-
20
- 1. **Develop Echo libraries** (`echo-core`, `echo-base`, `echo-utils`, etc.) in the EchopediaWeb monorepo.
21
- 2. **Release new versions** of these libraries from EchopediaWeb.
22
- 3. **echo-cli** now ships with the source code of `echo-dev-host` (formerly echo-client), not a pre-built version.
23
- 4. **Consumer project:**
24
- - Builds `echo-dev-host` locally using `npx build-echo-dev-host`
25
- - Can update Echo library dependencies locally using `npx update-echo-libs`
26
- - No need to bump and release `echo-cli` for every Echo library update—much more efficient and flexible.
27
-
28
- ---
29
-
30
- ## Getting Started
31
-
32
- ### Prerequisites
33
-
34
- - Node.js (see [root README](../../../README.md) for version requirements)
35
- - [`echo-cli`](../README.md) installed as a dev dependency in your Echo Module project
36
-
37
- ### Typical Workflow
38
-
39
- 1. **Install dependencies**
40
- In your Echo Module project:
41
-
42
- ```sh
43
- npm install
44
- ```
45
-
46
- 2. **Build echo-dev-host locally**
47
-
48
- ```sh
49
- npx build-echo-dev-host
50
- ```
51
-
52
- This will:
53
-
54
- - Copy `echo-dev-host` from `node_modules/@equinor/echo-cli` to your project root as `echo-dev-host-tmp`
55
- - Install dependencies and build `echo-dev-host`
56
- - Copy the build output back to `node_modules/@equinor/echo-cli`
57
-
58
- 3. **Start development server**
59
-
60
- ```sh
61
- npm start
62
- ```
63
-
64
- Your module will open in the browser, running inside the dev host.
65
-
66
- 4. **Update Echo library dependencies (optional)**
67
- To update the Echo libraries used by your dev host:
68
- ```sh
69
- npx update-echo-libs
70
- ```
71
- - You will be prompted for each Echo library to update to the latest or specify a version.
72
- - Use the `-a` flag to update all to the latest automatically:
73
- ```sh
74
- npx update-echo-libs -a
75
- ```
76
- - This updates dependencies and rebuilds `echo-dev-host`.
77
-
78
- ---
79
-
80
- ## Commands Reference
81
-
82
- - **`npx build-echo-dev-host`**
83
-
84
- - Builds the dev host locally with your current Echo library versions.
85
- - Should be run after installing or updating dependencies.
86
-
87
- - **`npx update-echo-libs`**
88
- - Prompts you to update Echo library dependencies in the dev host.
89
- - Rebuilds the dev host after updating.
90
- - Use `-a` to update all Echo libraries to the latest versions automatically.
91
-
92
- ---
93
-
94
- ## Why this new approach?
95
-
96
- - **No more waiting for echo-cli releases** just to get new Echo library versions.
97
- - **You control the dev host dependencies**—update and rebuild as needed.
98
- - **Faster, more flexible development** for all Echo teams.
99
-
100
- ---
101
-
102
- ## Troubleshooting
103
-
104
- - If you see errors about missing `echo-dev-host` build output, re-run:
105
- ```sh
106
- npx build-echo-dev-host
107
- ```
108
- - For dependency version mismatches, use:
109
- ```sh
110
- npx update-echo-libs
111
- ```
112
-
113
- ---
114
-
115
- ## More Information
116
-
117
- - [echo-cli documentation](../README.md)
118
- - [How to release new echo-cli versions](../README.md#how-to-make-a-new-release)
119
- - [EchopediaWeb monorepo documentation](../../../README.md)
120
-
121
- ---
1
+ # echo-dev-host
2
+
3
+ **echo-dev-host** is a lightweight host application for developing and testing Echo Modules locally. It is shipped as source code with [`echo-cli`](../README.md) and provides a development shell that closely mimics the EchopediaWeb environment.
4
+
5
+ ---
6
+
7
+ ## What is echo-dev-host?
8
+
9
+ - Provides a local "empty shell" of EchopediaWeb for rapid Echo Module development.
10
+ - Ensures your module runs with the same dependencies and environment as production.
11
+ - Supports hot module reloading for fast feedback during development.
12
+ - Now shipped as source code, so you can update dependencies and rebuild locally—no need to wait for a new `echo-cli` release.
13
+
14
+ ---
15
+
16
+ ## New Workflow (from 2025)
17
+
18
+ **You are now in control of the Echo library versions used by your dev host!**
19
+
20
+ 1. **Develop Echo libraries** (`echo-core`, `echo-base`, `echo-utils`, etc.) in the EchopediaWeb monorepo.
21
+ 2. **Release new versions** of these libraries from EchopediaWeb.
22
+ 3. **echo-cli** now ships with the source code of `echo-dev-host` (formerly echo-client), not a pre-built version.
23
+ 4. **Consumer project:**
24
+ - Builds `echo-dev-host` locally using `npx build-echo-dev-host`
25
+ - Can update Echo library dependencies locally using `npx update-echo-libs`
26
+ - No need to bump and release `echo-cli` for every Echo library update—much more efficient and flexible.
27
+
28
+ ---
29
+
30
+ ## Getting Started
31
+
32
+ ### Prerequisites
33
+
34
+ - Node.js (see [root README](../../../README.md) for version requirements)
35
+ - [`echo-cli`](../README.md) installed as a dev dependency in your Echo Module project
36
+
37
+ ### Typical Workflow
38
+
39
+ 1. **Install dependencies**
40
+ In your Echo Module project:
41
+
42
+ ```sh
43
+ npm install
44
+ ```
45
+
46
+ 2. **Build echo-dev-host locally**
47
+
48
+ ```sh
49
+ npx build-echo-dev-host
50
+ ```
51
+
52
+ This will:
53
+
54
+ - Copy `echo-dev-host` from `node_modules/@equinor/echo-cli` to your project root as `echo-dev-host-tmp`
55
+ - Install dependencies and build `echo-dev-host`
56
+ - Copy the build output back to `node_modules/@equinor/echo-cli`
57
+
58
+ 3. **Start development server**
59
+
60
+ ```sh
61
+ npm start
62
+ ```
63
+
64
+ Your module will open in the browser, running inside the dev host.
65
+
66
+ 4. **Update Echo library dependencies (optional)**
67
+ To update the Echo libraries used by your dev host:
68
+ ```sh
69
+ npx update-echo-libs
70
+ ```
71
+ - You will be prompted for each Echo library to update to the latest or specify a version.
72
+ - Use the `-a` flag to update all to the latest automatically:
73
+ ```sh
74
+ npx update-echo-libs -a
75
+ ```
76
+ - This updates dependencies and rebuilds `echo-dev-host`.
77
+
78
+ ---
79
+
80
+ ## Commands Reference
81
+
82
+ - **`npx build-echo-dev-host`**
83
+
84
+ - Builds the dev host locally with your current Echo library versions.
85
+ - Should be run after installing or updating dependencies.
86
+
87
+ - **`npx update-echo-libs`**
88
+ - Prompts you to update Echo library dependencies in the dev host.
89
+ - Rebuilds the dev host after updating.
90
+ - Use `-a` to update all Echo libraries to the latest versions automatically.
91
+
92
+ ---
93
+
94
+ ## Why this new approach?
95
+
96
+ - **No more waiting for echo-cli releases** just to get new Echo library versions.
97
+ - **You control the dev host dependencies**—update and rebuild as needed.
98
+ - **Faster, more flexible development** for all Echo teams.
99
+
100
+ ---
101
+
102
+ ## Troubleshooting
103
+
104
+ - If you see errors about missing `echo-dev-host` build output, re-run:
105
+ ```sh
106
+ npx build-echo-dev-host
107
+ ```
108
+ - For dependency version mismatches, use:
109
+ ```sh
110
+ npx update-echo-libs
111
+ ```
112
+
113
+ ---
114
+
115
+ ## More Information
116
+
117
+ - [echo-cli documentation](../README.md)
118
+ - [How to release new echo-cli versions](../README.md#how-to-make-a-new-release)
119
+ - [EchopediaWeb monorepo documentation](../../../README.md)
120
+
121
+ ---
@@ -1,11 +1,11 @@
1
- module.exports = {
2
- presets: ['@babel/preset-env', ['@babel/preset-react', {'runtime': 'automatic'}]],
3
- plugins: [
4
- '@babel/plugin-syntax-dynamic-import'
5
- ],
6
- env: {
7
- test: {
8
- plugins: ['@babel/plugin-transform-runtime'],
9
- },
10
- },
1
+ module.exports = {
2
+ presets: ['@babel/preset-env', ['@babel/preset-react', {'runtime': 'automatic'}]],
3
+ plugins: [
4
+ '@babel/plugin-syntax-dynamic-import'
5
+ ],
6
+ env: {
7
+ test: {
8
+ plugins: ['@babel/plugin-transform-runtime'],
9
+ },
10
+ },
11
11
  };
@@ -1,21 +1,21 @@
1
- module.exports = {
2
- testEnvironment: 'jsdom',
3
- moduleNameMapper: {
4
- '\\.css$': 'identity-obj-proxy',
5
- '\\.svg$': '<rootDir>/src/__mocks__/svgrMock.ts'
6
- },
7
- preset: 'ts-jest',
8
- coveragePathIgnorePatterns: ['src/types/*', 'src/index.ts', 'src/typings/*'],
9
- collectCoverageFrom: ['src/**/*.{js,jsx,ts,tsx}', '!<rootDir>/node_modules/'],
10
- coverageThreshold: {
11
- global: {
12
- lines: 90,
13
- statements: 90
14
- }
15
- },
16
- transform: {
17
- '^.+\\.(j|t)sx?$': 'ts-jest'
18
- },
19
- testMatch: ['**/__tests__/**/*.test.[jt]s?(x)', '**/?(*.)+(spec|test).[tj]s?(x)'],
20
- setupFilesAfterEnv: ['<rootDir>/src/setupTests.ts']
21
- };
1
+ module.exports = {
2
+ testEnvironment: 'jsdom',
3
+ moduleNameMapper: {
4
+ '\\.css$': 'identity-obj-proxy',
5
+ '\\.svg$': '<rootDir>/src/__mocks__/svgrMock.ts'
6
+ },
7
+ preset: 'ts-jest',
8
+ coveragePathIgnorePatterns: ['src/types/*', 'src/index.ts', 'src/typings/*'],
9
+ collectCoverageFrom: ['src/**/*.{js,jsx,ts,tsx}', '!<rootDir>/node_modules/'],
10
+ coverageThreshold: {
11
+ global: {
12
+ lines: 90,
13
+ statements: 90
14
+ }
15
+ },
16
+ transform: {
17
+ '^.+\\.(j|t)sx?$': 'ts-jest'
18
+ },
19
+ testMatch: ['**/__tests__/**/*.test.[jt]s?(x)', '**/?(*.)+(spec|test).[tj]s?(x)'],
20
+ setupFilesAfterEnv: ['<rootDir>/src/setupTests.ts']
21
+ };