@equinor/echo-cli 2.4.3-beta-0 → 2.4.5
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.
- package/README.md +393 -393
- package/lib/echo-dev-host/README.md +121 -121
- package/lib/echo-dev-host/babel.config.js +10 -10
- package/lib/echo-dev-host/jest.config.js +21 -21
- package/lib/echo-dev-host/package-lock.json +14659 -14653
- package/lib/echo-dev-host/package.json +8 -8
- package/lib/echo-dev-host/public/env-config.js +17 -17
- package/lib/echo-dev-host/public/index.html +21 -21
- package/lib/echo-dev-host/tsconfig.json +21 -21
- package/lib/echo-dev-host/webpack.config.js +145 -145
- package/package.json +112 -111
- package/templates/echoAppTemplate/.gitattributes +3 -3
- package/templates/echoAppTemplate/package.json +35 -35
- package/templates/echoAppTemplate/readme.md +41 -41
- package/templates/echoAppTemplate/tsconfig.json +25 -25
- package/templates/echoAppTemplateTutorial/.gitattributes +3 -3
- package/templates/echoAppTemplateTutorial/package.json +36 -36
- package/templates/echoAppTemplateTutorial/readme.md +41 -41
- package/templates/echoAppTemplateTutorial/tsconfig.json +25 -25
- package/templates/echoLibraryTemplate/package.json +35 -35
- package/templates/echoLibraryTemplate/public/index.html +21 -21
- package/templates/echoLibraryTemplate/readme.md +1 -1
- package/templates/echoPluginTemplate/package.json +35 -35
- package/templates/echoPluginTemplate/public/index.html +21 -21
- package/templates/echoPluginTemplate/readme.md +1 -1
- package/lib/echo-dev-host/echo-dev-host-build/d2d97a9feca22f12a8c8c7413d7867ac.jpg +0 -0
- package/lib/echo-dev-host/echo-dev-host-build/env-config.js +0 -1
- package/lib/echo-dev-host/echo-dev-host-build/index.css +0 -60
- package/lib/echo-dev-host/echo-dev-host-build/index.html +0 -21
- package/lib/echo-dev-host/echo-dev-host-build/main.echo.bundle.js +0 -3
- package/lib/echo-dev-host/echo-dev-host-build/main.echo.bundle.js.LICENSE.txt +0 -93
- package/lib/echo-dev-host/echo-dev-host-build/main.echo.bundle.js.map +0 -1
- 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-8e2452.echo.bundle.js +0 -3
- 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-8e2452.echo.bundle.js.LICENSE.txt +0 -2871
- 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-8e2452.echo.bundle.js.map +0 -1
- package/lib/sync-echo-dev-versions.d.ts +0 -6
- package/lib/sync-echo-dev-versions.js +0 -43
- package/lib/sync-echo-dev-versions.js.map +0 -1
- package/lib/tools/buildScripts/buildAndCopyDevHost.test.d.ts +0 -1
- package/lib/tools/buildScripts/buildAndCopyDevHost.test.js +0 -500
- package/lib/tools/buildScripts/buildAndCopyDevHost.test.js.map +0 -1
- package/lib/utils/merge.test.d.ts +0 -1
- package/lib/utils/merge.test.js +0 -29
- 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
|
+
};
|