@equinor/echo-cli 1.0.0-beta-36 → 1.0.0-beta-37
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 +10 -4
- package/lib/echo-build.js +4 -3
- package/lib/echo-build.js.map +1 -1
- package/lib/echo-dev-host/README.md +100 -25
- package/lib/tools/buildScripts/buildAndCopyDevHost.js +6 -2
- package/lib/tools/buildScripts/buildAndCopyDevHost.js.map +1 -1
- package/lib/update-echo-libs.d.ts +33 -0
- package/lib/update-echo-libs.js +186 -0
- package/lib/update-echo-libs.js.map +1 -0
- package/lib/utils/findTopLevelNodeModulesWithCli.d.ts +2 -2
- package/lib/utils/findTopLevelNodeModulesWithCli.js +2 -2
- package/lib/utils/printEchoLibsVersions.d.ts +14 -0
- package/lib/utils/printEchoLibsVersions.js +132 -0
- package/lib/utils/printEchoLibsVersions.js.map +1 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -10,13 +10,19 @@ For information on how to configure your echo module, refer to [this wiki](https
|
|
|
10
10
|
|
|
11
11
|
## echo-cli versions table
|
|
12
12
|
|
|
13
|
-
Each `echo-cli` release
|
|
13
|
+
Each `echo-cli` release is shipped with the source code for `echo-dev-host` (formerly `echo-client`).
|
|
14
|
+
When you run your Echo Module as a standalone app using `npm start`, a local development shell (`echo-dev-host`) will be built and started, containing your Echo Module.
|
|
14
15
|
|
|
15
|
-
|
|
16
|
+
**You are now in control of the Echo package versions used by your dev host.**
|
|
17
|
+
You can update the Echo library dependencies locally (without waiting for a new `echo-cli` release) using the provided commands.
|
|
18
|
+
See the [`echo-dev-host` README](./echo-dev-host/README.md) for more details on the workflow and commands.
|
|
16
19
|
|
|
17
|
-
|
|
20
|
+
Refer to the table below to see which Echo package versions are recommended for each `echo-cli` version.
|
|
21
|
+
In general, it's safe to use a newer patch version of an Echo package than listed, unless otherwise noted.
|
|
18
22
|
|
|
19
|
-
|
|
23
|
+
Echo library versions are generally kept in sync for easier usage.
|
|
24
|
+
As a rule of thumb: if you need `v1.2.1` of `echo-framework`, you should use `v1.2.x` of all Echo libraries.
|
|
25
|
+
Patch versions (`x`) can differ between libraries, but the major and minor versions
|
|
20
26
|
|
|
21
27
|
(older versions can be found at the bottom of this page)
|
|
22
28
|
|
package/lib/echo-build.js
CHANGED
|
@@ -7,7 +7,7 @@ import { fileURLToPath } from 'url';
|
|
|
7
7
|
import { ECHO_HOST_BUILD_OUTPUT_FOLDER } from './const/common.js';
|
|
8
8
|
import { echoWebpackBuild } from './tools/buildScripts/webpackBuilds.js';
|
|
9
9
|
import { echoCliLogo } from './utils/logo.js';
|
|
10
|
-
import {
|
|
10
|
+
import { printEchoLibsVersions } from './utils/printEchoLibsVersions.js';
|
|
11
11
|
/**
|
|
12
12
|
* @class CreateBundle
|
|
13
13
|
* @extends Command
|
|
@@ -63,8 +63,9 @@ export default class CreateBundle extends Command {
|
|
|
63
63
|
}
|
|
64
64
|
echoCliLogo();
|
|
65
65
|
console.log(chalk.cyan('echo-cli runs your echo application with echo-dev-host, which is using the following echo lib versions:'));
|
|
66
|
-
await
|
|
67
|
-
devHostPkgPath: path.resolve(path.resolve(__dirname, './echo-dev-host'), 'package.json')
|
|
66
|
+
await printEchoLibsVersions({
|
|
67
|
+
devHostPkgPath: path.resolve(path.resolve(__dirname, './echo-dev-host'), 'package.json'),
|
|
68
|
+
appPkgPath: path.resolve(process.cwd(), 'package.json')
|
|
68
69
|
});
|
|
69
70
|
await echoWebpackBuild(options.flags, options.flags.isDevelopment);
|
|
70
71
|
}
|
package/lib/echo-build.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"echo-build.js","sourceRoot":"","sources":["../src/echo-build.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,MAAM,UAAU,CAAC;AAC1B,OAAO,IAAI,MA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
|
|
@@ -1,46 +1,121 @@
|
|
|
1
1
|
# echo-dev-host
|
|
2
2
|
|
|
3
|
-
|
|
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
4
|
|
|
5
|
-
|
|
5
|
+
---
|
|
6
6
|
|
|
7
|
-
##
|
|
7
|
+
## What is echo-dev-host?
|
|
8
8
|
|
|
9
|
-
|
|
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.
|
|
10
13
|
|
|
11
|
-
|
|
12
|
-
new change is introduced, one would need to release and deploy new version of the given Echo Module to see the newly developed features, changes.
|
|
14
|
+
---
|
|
13
15
|
|
|
14
|
-
|
|
16
|
+
## New Workflow (from 2025)
|
|
15
17
|
|
|
16
|
-
|
|
18
|
+
**You are now in control of the Echo library versions used by your dev host!**
|
|
17
19
|
|
|
18
|
-
|
|
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.
|
|
19
27
|
|
|
20
|
-
|
|
28
|
+
---
|
|
21
29
|
|
|
22
|
-
|
|
30
|
+
## Getting Started
|
|
23
31
|
|
|
24
|
-
|
|
25
|
-
of EchopediaWeb.
|
|
32
|
+
### Prerequisites
|
|
26
33
|
|
|
27
|
-
|
|
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
|
|
28
36
|
|
|
29
|
-
|
|
30
|
-
- save changes
|
|
31
|
-
- hot reload will take care of applying the changes
|
|
37
|
+
### Typical Workflow
|
|
32
38
|
|
|
33
|
-
|
|
39
|
+
1. **Install dependencies**
|
|
40
|
+
In your Echo Module project:
|
|
34
41
|
|
|
35
|
-
|
|
42
|
+
```sh
|
|
43
|
+
npm install
|
|
44
|
+
```
|
|
36
45
|
|
|
37
|
-
|
|
38
|
-
and a new `echo-cli` release needs to be done.
|
|
46
|
+
2. **Build echo-dev-host locally**
|
|
39
47
|
|
|
40
|
-
|
|
48
|
+
```sh
|
|
49
|
+
npx build-echo-dev-host
|
|
50
|
+
```
|
|
41
51
|
|
|
42
|
-
|
|
52
|
+
This will:
|
|
43
53
|
|
|
44
|
-
|
|
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`
|
|
45
57
|
|
|
46
|
-
|
|
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
|
+
---
|
|
@@ -4,7 +4,7 @@ import figlet from 'figlet';
|
|
|
4
4
|
import fs from 'fs-extra';
|
|
5
5
|
import path from 'path';
|
|
6
6
|
import { ECHO_HOST_BUILD_OUTPUT_FOLDER } from '../../const/common.js';
|
|
7
|
-
import {
|
|
7
|
+
import { printEchoLibsVersions } from '../../utils/printEchoLibsVersions.js';
|
|
8
8
|
/**
|
|
9
9
|
* Builds and copies the Echo Dev Host application for local development.
|
|
10
10
|
*
|
|
@@ -45,7 +45,11 @@ export async function buildAndCopyDevHost({ cliNodeModules, tmpDevHostFolder, fi
|
|
|
45
45
|
if (installAndBuild) {
|
|
46
46
|
console.log(chalk.greenBright.bold('[echo-dev-host] Installing dependencies and building echo-dev-host...\n'));
|
|
47
47
|
console.log(chalk.greenBright.bold('[echo-dev-host] Using the following versions of echo libraries'));
|
|
48
|
-
await
|
|
48
|
+
await printEchoLibsVersions({
|
|
49
|
+
devHostPkgPath: srcPkgJson,
|
|
50
|
+
appPkgPath: path.resolve(process.cwd(), 'package.json'),
|
|
51
|
+
fetchLatest: !skipFetchingLatestVersions
|
|
52
|
+
});
|
|
49
53
|
execSync('npm install', { cwd: tmpDevHostFolder, stdio: 'inherit' });
|
|
50
54
|
execSync('npm run build', { cwd: tmpDevHostFolder, stdio: 'inherit' });
|
|
51
55
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buildAndCopyDevHost.js","sourceRoot":"","sources":["../../../src/tools/buildScripts/buildAndCopyDevHost.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,MAAM,UAAU,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,6BAA6B,EAAE,MAAM,uBAAuB,CAAC;AACtE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"buildAndCopyDevHost.js","sourceRoot":"","sources":["../../../src/tools/buildScripts/buildAndCopyDevHost.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,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AY,CAAC,IAAI,CACnB,gDAAgD,gBAAgB,2BAA2B,CAC9F,CACJ,CAAC;QACF,EAAE,CAAC,UAAU,CAAC,gBAAgB,CAAC,CAAC;IACpC,CAAC;IAED,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,4CAA4C,CAAC,CAAC,CAAC;IAE5E,IAAI,CAAC,WAAW,EAAE,CAAC;QACf,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,oEAAoE,CAAC,CAAC,CAAC;IACxG,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { Command } from '@oclif/core';
|
|
3
|
+
/**
|
|
4
|
+
* @class UpdateDevHostEchoLibVersions
|
|
5
|
+
* @extends Command
|
|
6
|
+
* @description
|
|
7
|
+
* Interactively updates the echo library dependencies in the `echo-dev-host` project.
|
|
8
|
+
*
|
|
9
|
+
* This command reads the `package.json` file from the `echo-dev-host-tmp` directory,
|
|
10
|
+
* identifies dependencies that are echo libraries (names starting with `@equinor/echo-`),
|
|
11
|
+
* and allows the user to update them to the latest available versions.
|
|
12
|
+
*
|
|
13
|
+
* If the `--all` flag is provided, all echo libraries are updated to their latest versions
|
|
14
|
+
* without prompting the user. Otherwise, the user is prompted for each library to confirm
|
|
15
|
+
* or specify the desired version.
|
|
16
|
+
*
|
|
17
|
+
* After updating dependencies, the command writes the changes to `package.json` and runs
|
|
18
|
+
* `npm install` to apply the updates.
|
|
19
|
+
*
|
|
20
|
+
* @flags
|
|
21
|
+
* - `--all`, `-a`: Update all echo libraries to the latest version without prompting.
|
|
22
|
+
*
|
|
23
|
+
* Logs error if the `package.json` file cannot be read, typically if the
|
|
24
|
+
* `echo-dev-host-tmp` directory or its `package.json` does not exist.
|
|
25
|
+
*/
|
|
26
|
+
export default class UpdateEchoLibs extends Command {
|
|
27
|
+
static description: string;
|
|
28
|
+
static flags: {
|
|
29
|
+
all: import("@oclif/core/lib/interfaces/parser.js").BooleanFlag<boolean>;
|
|
30
|
+
};
|
|
31
|
+
run(): Promise<void>;
|
|
32
|
+
}
|
|
33
|
+
export declare function updateEchoLibSection(consumerPkg: Record<string, any>, sectionName: 'dependencies' | 'devDependencies' | 'peerDependencies', echoLibs: string[], deps: Record<string, string>, changes: Record<string, string[]>): boolean;
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { Command, Flags } from '@oclif/core';
|
|
3
|
+
import chalk from 'chalk';
|
|
4
|
+
import fs from 'fs-extra';
|
|
5
|
+
import inquirer from 'inquirer';
|
|
6
|
+
import ora from 'ora';
|
|
7
|
+
import path from 'path';
|
|
8
|
+
import { ECHO_HOST_BUILD_OUTPUT_FOLDER, ECHO_HOST_TEMP_BUILD_FOLDER } from './const/common.js';
|
|
9
|
+
import { buildAndCopyDevHost } from './tools/buildScripts/buildAndCopyDevHost.js';
|
|
10
|
+
import { getLatestPkgVersion } from './utils/getLatestPkgVersion.js';
|
|
11
|
+
/**
|
|
12
|
+
* @class UpdateDevHostEchoLibVersions
|
|
13
|
+
* @extends Command
|
|
14
|
+
* @description
|
|
15
|
+
* Interactively updates the echo library dependencies in the `echo-dev-host` project.
|
|
16
|
+
*
|
|
17
|
+
* This command reads the `package.json` file from the `echo-dev-host-tmp` directory,
|
|
18
|
+
* identifies dependencies that are echo libraries (names starting with `@equinor/echo-`),
|
|
19
|
+
* and allows the user to update them to the latest available versions.
|
|
20
|
+
*
|
|
21
|
+
* If the `--all` flag is provided, all echo libraries are updated to their latest versions
|
|
22
|
+
* without prompting the user. Otherwise, the user is prompted for each library to confirm
|
|
23
|
+
* or specify the desired version.
|
|
24
|
+
*
|
|
25
|
+
* After updating dependencies, the command writes the changes to `package.json` and runs
|
|
26
|
+
* `npm install` to apply the updates.
|
|
27
|
+
*
|
|
28
|
+
* @flags
|
|
29
|
+
* - `--all`, `-a`: Update all echo libraries to the latest version without prompting.
|
|
30
|
+
*
|
|
31
|
+
* Logs error if the `package.json` file cannot be read, typically if the
|
|
32
|
+
* `echo-dev-host-tmp` directory or its `package.json` does not exist.
|
|
33
|
+
*/
|
|
34
|
+
export default class UpdateEchoLibs extends Command {
|
|
35
|
+
static description = 'Interactively update echo library dependencies in echo-dev-host';
|
|
36
|
+
static flags = {
|
|
37
|
+
all: Flags.boolean({
|
|
38
|
+
char: 'a',
|
|
39
|
+
description: 'Update all echo libraries to latest without prompting'
|
|
40
|
+
})
|
|
41
|
+
};
|
|
42
|
+
async run() {
|
|
43
|
+
const { flags } = await this.parse(UpdateEchoLibs);
|
|
44
|
+
const devHostPkgPath = path.resolve(process.cwd(), 'node_modules', '@equinor', 'echo-cli', 'lib', 'echo-dev-host', 'package.json');
|
|
45
|
+
this.log(chalk.cyan(`Trying to load echo lib dependencies from: ${chalk.yellow(devHostPkgPath)}`));
|
|
46
|
+
let pkg;
|
|
47
|
+
try {
|
|
48
|
+
pkg = fs.readJsonSync(devHostPkgPath);
|
|
49
|
+
}
|
|
50
|
+
catch (error) {
|
|
51
|
+
this.error(`Could not read package.json at ${chalk.yellow(devHostPkgPath)}. Did you run npm install?`);
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
const deps = pkg.dependencies || {};
|
|
55
|
+
const echoLibs = Object.keys(deps).filter((name) => name.startsWith('@equinor/echo-'));
|
|
56
|
+
if (echoLibs.length === 0) {
|
|
57
|
+
this.log('No echo libraries found in dependencies.');
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
let updated = false;
|
|
61
|
+
const spinner = ora('Fetching latest echo library versions...').start();
|
|
62
|
+
const latestVersions = {};
|
|
63
|
+
// Fetch all latest versions with spinner
|
|
64
|
+
for (const lib of echoLibs) {
|
|
65
|
+
latestVersions[lib] = await getLatestPkgVersion(lib, spinner);
|
|
66
|
+
}
|
|
67
|
+
spinner.succeed('Fetched latest echo library versions.');
|
|
68
|
+
// Determine which libs are up to date and which are outdated
|
|
69
|
+
const upToDateLibs = echoLibs.filter((lib) => deps[lib] === latestVersions[lib]);
|
|
70
|
+
const outdatedLibs = echoLibs.filter((lib) => deps[lib] !== latestVersions[lib]);
|
|
71
|
+
// Log up-to-date libs
|
|
72
|
+
upToDateLibs.forEach((lib) => {
|
|
73
|
+
this.log(chalk.gray(`${lib} is already at latest version (${deps[lib]}), skipping.`));
|
|
74
|
+
});
|
|
75
|
+
if (outdatedLibs.length === 0) {
|
|
76
|
+
this.log(chalk.green('All echo libraries are already at their latest versions. No update needed.'));
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
let autoBump = flags.all;
|
|
80
|
+
if (!flags.all) {
|
|
81
|
+
console.log(chalk.yellow(`Do you want to automatically update all outdated echo libraries to their latest versions?\n` +
|
|
82
|
+
`If you choose 'No', you will be prompted for each library.`));
|
|
83
|
+
const answer = await inquirer.prompt([
|
|
84
|
+
{
|
|
85
|
+
type: 'confirm',
|
|
86
|
+
name: 'autoBump',
|
|
87
|
+
message: `Proceed with automatic update?`,
|
|
88
|
+
default: true
|
|
89
|
+
}
|
|
90
|
+
]);
|
|
91
|
+
autoBump = answer.autoBump;
|
|
92
|
+
}
|
|
93
|
+
for (const lib of outdatedLibs) {
|
|
94
|
+
const current = deps[lib];
|
|
95
|
+
const latest = latestVersions[lib];
|
|
96
|
+
let newVersion = latest;
|
|
97
|
+
if (!autoBump) {
|
|
98
|
+
const answer = await inquirer.prompt([
|
|
99
|
+
{
|
|
100
|
+
type: 'input',
|
|
101
|
+
name: 'version',
|
|
102
|
+
message: `${lib}: current ${current}, latest ${latest} [${latest}]:`,
|
|
103
|
+
default: latest
|
|
104
|
+
}
|
|
105
|
+
]);
|
|
106
|
+
newVersion = answer.version || latest;
|
|
107
|
+
}
|
|
108
|
+
if (newVersion !== current) {
|
|
109
|
+
deps[lib] = newVersion;
|
|
110
|
+
updated = true;
|
|
111
|
+
this.log(chalk.yellow(`Updated ${lib} to ${newVersion}`));
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
if (updated) {
|
|
115
|
+
pkg.dependencies = deps;
|
|
116
|
+
fs.writeJsonSync(devHostPkgPath, pkg, { spaces: 2 });
|
|
117
|
+
console.log(`\nDependencies updated. Rebuilding echo-dev-host...\n`);
|
|
118
|
+
const cliNodeModules = path.resolve(process.cwd(), 'node_modules', '@equinor', 'echo-cli');
|
|
119
|
+
const finalOutput = path.join(cliNodeModules, ECHO_HOST_BUILD_OUTPUT_FOLDER);
|
|
120
|
+
await buildAndCopyDevHost({
|
|
121
|
+
cliNodeModules,
|
|
122
|
+
tmpDevHostFolder: path.resolve(process.cwd(), ECHO_HOST_TEMP_BUILD_FOLDER),
|
|
123
|
+
finalOutputDir: finalOutput
|
|
124
|
+
});
|
|
125
|
+
// --- Update consumer app's package.json ---
|
|
126
|
+
const consumerPkgPath = path.resolve(process.cwd(), 'package.json');
|
|
127
|
+
let consumerPkg;
|
|
128
|
+
try {
|
|
129
|
+
consumerPkg = fs.readJsonSync(consumerPkgPath);
|
|
130
|
+
}
|
|
131
|
+
catch (error) {
|
|
132
|
+
this.error(`Could not read consumer app package.json at ${chalk.yellow(consumerPkgPath)}.`);
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
135
|
+
const echoLibVersionChangesBySection = {};
|
|
136
|
+
const updatedDeps = updateEchoLibSection(consumerPkg, 'dependencies', echoLibs, deps, echoLibVersionChangesBySection);
|
|
137
|
+
const updatedDevDeps = updateEchoLibSection(consumerPkg, 'devDependencies', echoLibs, deps, echoLibVersionChangesBySection);
|
|
138
|
+
const updatedPeerDeps = updateEchoLibSection(consumerPkg, 'peerDependencies', echoLibs, deps, echoLibVersionChangesBySection);
|
|
139
|
+
if (updatedDeps || updatedDevDeps || updatedPeerDeps) {
|
|
140
|
+
fs.writeJsonSync(consumerPkgPath, consumerPkg, { spaces: 2 });
|
|
141
|
+
logGroupedEchoLibUpdates(echoLibVersionChangesBySection, this.log);
|
|
142
|
+
}
|
|
143
|
+
else {
|
|
144
|
+
this.log(chalk.gray('\nNo echo library versions needed updating in consumer app package.json.\n'));
|
|
145
|
+
}
|
|
146
|
+
console.log(`\nDon't forget to run npm install in your consumer app!\n`);
|
|
147
|
+
}
|
|
148
|
+
else {
|
|
149
|
+
console.log(`\nNo changes made to dependencies.\n`);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
UpdateEchoLibs.run();
|
|
154
|
+
/**
|
|
155
|
+
* Logs grouped updates for echo libraries in consumer app package.json.
|
|
156
|
+
*/
|
|
157
|
+
function logGroupedEchoLibUpdates(changes, logFn) {
|
|
158
|
+
logFn(chalk.green("\nUpdated consumer app's echo lib versions:\n"));
|
|
159
|
+
['dependencies', 'devDependencies', 'peerDependencies'].forEach((section) => {
|
|
160
|
+
if (changes[section] && changes[section].length > 0) {
|
|
161
|
+
logFn(chalk.cyan(section));
|
|
162
|
+
changes[section].forEach((msg) => {
|
|
163
|
+
logFn(` - ${msg}`);
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
});
|
|
167
|
+
logFn('');
|
|
168
|
+
}
|
|
169
|
+
export function updateEchoLibSection(consumerPkg, sectionName, echoLibs, deps, changes) {
|
|
170
|
+
const section = consumerPkg[sectionName] || {};
|
|
171
|
+
let sectionUpdated = false;
|
|
172
|
+
for (const lib of echoLibs) {
|
|
173
|
+
if (section[lib] && section[lib] !== deps[lib]) {
|
|
174
|
+
section[lib] = deps[lib];
|
|
175
|
+
sectionUpdated = true;
|
|
176
|
+
if (!changes[sectionName])
|
|
177
|
+
changes[sectionName] = [];
|
|
178
|
+
changes[sectionName].push(`${lib} to ${deps[lib]}`);
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
if (sectionUpdated) {
|
|
182
|
+
consumerPkg[sectionName] = section;
|
|
183
|
+
}
|
|
184
|
+
return sectionUpdated;
|
|
185
|
+
}
|
|
186
|
+
//# sourceMappingURL=update-echo-libs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{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AM,GAAG,CAAC,EAAE,CAAC;YAClD,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;YAC3B,OAAO,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;gBAC7B,KAAK,CAAC,QAAQ,GAAG,EAAE,CAAC,CAAC;YACzB,CAAC,CAAC,CAAC;QACP,CAAC;IACL,CAAC,CAAC,CAAC;IACH,KAAK,CAAC,EAAE,CAAC,CAAC;AACd,CAAC;AAED,MAAM,UAAU,oBAAoB,CAChC,WAAgC,EAChC,WAAoE,EACpE,QAAkB,EAClB,IAA4B,EAC5B,OAAiC;IAEjC,MAAM,OAAO,GAAG,WAAW,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC;IAC/C,IAAI,cAAc,GAAG,KAAK,CAAC;IAC3B,KAAK,MAAM,GAAG,IAAI,QAAQ,EAAE,CAAC;QACzB,IAAI,OAAO,CAAC,GAAG,CAAC,IAAI,OAAO,CAAC,GAAG,CAAC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;YAC7C,OAAO,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC;YACzB,cAAc,GAAG,IAAI,CAAC;YACtB,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC;gBAAE,OAAO,CAAC,WAAW,CAAC,GAAG,EAAE,CAAC;YACrD,OAAO,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,GAAG,GAAG,OAAO,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QACxD,CAAC;IACL,CAAC;IACD,IAAI,cAAc,EAAE,CAAC;QACjB,WAAW,CAAC,WAAW,CAAC,GAAG,OAAO,CAAC;IACvC,CAAC;IACD,OAAO,cAAc,CAAC;AAC1B,CAAC"}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* Searches upwards from the specified starting directory to find the topmost
|
|
3
3
|
* `@equinor/echo-cli` package inside a `node_modules` folder.
|
|
4
4
|
*
|
|
5
|
-
* Needed to support
|
|
6
|
-
*
|
|
5
|
+
* Needed to support nested folder structures, where the `echo-cli` is located in the top-level `node_modules`,
|
|
6
|
+
* while the app running this code is in a subfolder. (For example, in a monorepo setup, like echo 3d)
|
|
7
7
|
*
|
|
8
8
|
* @param startDir - The directory from which to start searching.
|
|
9
9
|
* @returns The absolute path to the topmost `node_modules` directory found,
|
|
@@ -4,8 +4,8 @@ import path from 'path';
|
|
|
4
4
|
* Searches upwards from the specified starting directory to find the topmost
|
|
5
5
|
* `@equinor/echo-cli` package inside a `node_modules` folder.
|
|
6
6
|
*
|
|
7
|
-
* Needed to support
|
|
8
|
-
*
|
|
7
|
+
* Needed to support nested folder structures, where the `echo-cli` is located in the top-level `node_modules`,
|
|
8
|
+
* while the app running this code is in a subfolder. (For example, in a monorepo setup, like echo 3d)
|
|
9
9
|
*
|
|
10
10
|
* @param startDir - The directory from which to start searching.
|
|
11
11
|
* @returns The absolute path to the topmost `node_modules` directory found,
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Prints a table of all `@equinor/echo-` library versions for both the echo app and the echo dev host.
|
|
3
|
+
* Optionally fetches and displays the latest available versions from the npm registry for comparison.
|
|
4
|
+
*
|
|
5
|
+
* @param args - An object containing:
|
|
6
|
+
* - `devHostPkgPath`: Path to the dev host's package.json.
|
|
7
|
+
* - `appPkgPath`: Path to the echo app's package.json.
|
|
8
|
+
* - `fetchLatest` (optional): If true, fetches the latest versions from npm and compares them to the installed versions.
|
|
9
|
+
*/
|
|
10
|
+
export declare function printEchoLibsVersions(args: {
|
|
11
|
+
devHostPkgPath: string;
|
|
12
|
+
appPkgPath: string;
|
|
13
|
+
fetchLatest?: boolean;
|
|
14
|
+
}): Promise<void>;
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import chalk from 'chalk';
|
|
2
|
+
import fs from 'fs-extra';
|
|
3
|
+
import ora from 'ora';
|
|
4
|
+
import { getLatestPkgVersion } from './getLatestPkgVersion.js';
|
|
5
|
+
function pad(str, len) {
|
|
6
|
+
return str + ' '.repeat(Math.max(0, len - str.length));
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Prints a table of all `@equinor/echo-` library versions for both the echo app and the echo dev host.
|
|
10
|
+
* Optionally fetches and displays the latest available versions from the npm registry for comparison.
|
|
11
|
+
*
|
|
12
|
+
* @param args - An object containing:
|
|
13
|
+
* - `devHostPkgPath`: Path to the dev host's package.json.
|
|
14
|
+
* - `appPkgPath`: Path to the echo app's package.json.
|
|
15
|
+
* - `fetchLatest` (optional): If true, fetches the latest versions from npm and compares them to the installed versions.
|
|
16
|
+
*/
|
|
17
|
+
export async function printEchoLibsVersions(args) {
|
|
18
|
+
const { devHostPkgPath, appPkgPath, fetchLatest } = args;
|
|
19
|
+
let appPkg = {};
|
|
20
|
+
let devHostPkg = {};
|
|
21
|
+
// Error handling for app package.json
|
|
22
|
+
if (!fs.existsSync(appPkgPath)) {
|
|
23
|
+
console.log(chalk.red(`Could not read echo app version numbers: ${appPkgPath} does not exist.`));
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
try {
|
|
27
|
+
appPkg = fs.readJsonSync(appPkgPath);
|
|
28
|
+
}
|
|
29
|
+
catch {
|
|
30
|
+
console.log(chalk.red(`Could not read ${appPkgPath}. Is it valid JSON?`));
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
// Error handling for dev host package.json
|
|
34
|
+
if (!fs.existsSync(devHostPkgPath)) {
|
|
35
|
+
console.log(chalk.red(`Could not read echo dev host version numbers: ${devHostPkgPath} does not exist.`));
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
try {
|
|
39
|
+
devHostPkg = fs.readJsonSync(devHostPkgPath);
|
|
40
|
+
}
|
|
41
|
+
catch {
|
|
42
|
+
console.log(chalk.red(`Could not read ${devHostPkgPath}. Is it valid JSON?`));
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
const getEchoDeps = (pkg) => {
|
|
46
|
+
const merged = {
|
|
47
|
+
...(pkg.peerDependencies || {}),
|
|
48
|
+
...(pkg.devDependencies || {})
|
|
49
|
+
};
|
|
50
|
+
return Object.entries(merged)
|
|
51
|
+
.filter(([name]) => name.startsWith('@equinor/echo-'))
|
|
52
|
+
.map(([name, version]) => [name, String(version)]);
|
|
53
|
+
};
|
|
54
|
+
const appDeps = getEchoDeps(appPkg);
|
|
55
|
+
const devHostDeps = getEchoDeps(devHostPkg);
|
|
56
|
+
const allLibs = new Set([...appDeps.map(([n]) => n), ...devHostDeps.map(([n]) => n)]);
|
|
57
|
+
if (allLibs.size === 0) {
|
|
58
|
+
console.log(chalk.gray('No @equinor/echo-* libraries found in either package.json.'));
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
let spinner;
|
|
62
|
+
if (fetchLatest) {
|
|
63
|
+
spinner = ora();
|
|
64
|
+
console.log(chalk.yellow('Fetching latest versions for echo libraries...'));
|
|
65
|
+
}
|
|
66
|
+
const versions = {};
|
|
67
|
+
for (const lib of allLibs) {
|
|
68
|
+
versions[lib] = {
|
|
69
|
+
appVersion: appDeps.find(([n]) => n === lib)?.[1],
|
|
70
|
+
devHostVersion: devHostDeps.find(([n]) => n === lib)?.[1]
|
|
71
|
+
};
|
|
72
|
+
if (fetchLatest) {
|
|
73
|
+
try {
|
|
74
|
+
versions[lib].latestVersion = await getLatestPkgVersion(lib, spinner);
|
|
75
|
+
}
|
|
76
|
+
catch {
|
|
77
|
+
versions[lib].latestVersion = undefined;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
if (spinner)
|
|
82
|
+
spinner.stop();
|
|
83
|
+
// Explanation above the table
|
|
84
|
+
console.log(chalk.cyan('\nEcho Dev Host dependencies: These are the versions of echo libraries actually used at runtime when your app is running inside the dev host.\n' +
|
|
85
|
+
'Echo App dependencies: These are the versions of echo libraries your app is developed and built against during coding.\n'));
|
|
86
|
+
// Table header
|
|
87
|
+
const col1 = 'Echo Library';
|
|
88
|
+
const col2 = 'App Version';
|
|
89
|
+
const col3 = 'Dev Host Version';
|
|
90
|
+
const col1w = 28, col2w = 22, col3w = 22;
|
|
91
|
+
console.log(chalk.bold(pad(col1, col1w) + pad(col2, col2w) + pad(col3, col3w)));
|
|
92
|
+
console.log('-'.repeat(col1w + col2w + col3w));
|
|
93
|
+
for (const lib of Array.from(allLibs).sort()) {
|
|
94
|
+
const { appVersion, devHostVersion, latestVersion } = versions[lib];
|
|
95
|
+
// App version status
|
|
96
|
+
let appStr = appVersion ? chalk.yellow(appVersion) : chalk.gray('—');
|
|
97
|
+
if (fetchLatest && appVersion) {
|
|
98
|
+
if (!latestVersion) {
|
|
99
|
+
appStr += ' ' + chalk.gray('(could not fetch latest)');
|
|
100
|
+
}
|
|
101
|
+
else if (appVersion === latestVersion) {
|
|
102
|
+
appStr += ' ' + chalk.green('(latest)');
|
|
103
|
+
}
|
|
104
|
+
else {
|
|
105
|
+
appStr += ' ' + chalk.red(`(latest: ${latestVersion})`);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
// Dev host version status
|
|
109
|
+
let devHostStr = devHostVersion ? chalk.yellow(devHostVersion) : chalk.gray('—');
|
|
110
|
+
if (fetchLatest && devHostVersion) {
|
|
111
|
+
if (!latestVersion) {
|
|
112
|
+
devHostStr += ' ' + chalk.gray('(could not fetch latest)');
|
|
113
|
+
}
|
|
114
|
+
else if (devHostVersion === latestVersion) {
|
|
115
|
+
devHostStr += ' ' + chalk.green('(latest)');
|
|
116
|
+
}
|
|
117
|
+
else {
|
|
118
|
+
devHostStr += ' ' + chalk.red(`(latest: ${latestVersion})`);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
console.log(pad(lib, col1w) + pad(appStr, col2w) + pad(devHostStr, col3w));
|
|
122
|
+
}
|
|
123
|
+
// Warnings
|
|
124
|
+
const outdated = Object.entries(versions).filter(([, v]) => fetchLatest &&
|
|
125
|
+
v.latestVersion &&
|
|
126
|
+
((v.appVersion && v.appVersion !== v.latestVersion) ||
|
|
127
|
+
(v.devHostVersion && v.devHostVersion !== v.latestVersion)));
|
|
128
|
+
if (outdated.length > 0) {
|
|
129
|
+
console.log(chalk.hex('#FFA500')('\nUpdates available for echo libraries. Run npx update-echo-libs to upgrade.'));
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
//# sourceMappingURL=printEchoLibsVersions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"printEchoLibsVersions.js","sourceRoot":"","sources":["../../src/utils/printEchoLibsVersions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,MAAM,UAAU,CAAC;AAC1B,OAAO,GAAG,MAAM,KAAK,CAAC;AACtB,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAU/D,SAAS,GAAG,CAAC,GAAW,EAAE,GAAW;IACjC,OAAO,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC;AAC3D,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,CAAC,KAAK,UAAU,qBAAqB,CAAC,IAI3C;IACG,MAAM,EAAE,cAAc,EAAE,UAAU,EAAE,WAAW,EAAE,GAAG,IAAI,CAAC;IAEzD,IAAI,MAAM,GAAQ,EAAE,CAAC;IACrB,IAAI,UAAU,GAAQ,EAAE,CAAC;IAEzB,sCAAsC;IACtC,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC;QAC7B,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,4CAA4C,UAAU,kBAAkB,CAAC,CAAC,CAAC;QACjG,OAAO;IACX,CAAC;IACD,IAAI,CAAC;QACD,MAAM,GAAG,EAAE,CAAC,YAAY,CAAC,UAAU,CAAC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C,CAAC,cAAc,KAAK,CAAC,CAAC,aAAa,CAAC,CAAC,CACtE,CAAC;IACF,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACtB,OAAO,CAAC,GAAG,CACP,KAAK,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,8EAA8E,CAAC,CACvG,CAAC;IACN,CAAC;AACL,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@equinor/echo-cli",
|
|
3
|
-
"version": "1.0.0-beta-
|
|
3
|
+
"version": "1.0.0-beta-37",
|
|
4
4
|
"description": "Command line interface for Echo Apps",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"source": "src/test.js",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"echo-build": "./lib/echo-build.js",
|
|
34
34
|
"echo-manifest": "./lib/echo-manifest.js",
|
|
35
35
|
"build-echo-dev-host": "./lib/echo-build-dev-host.js",
|
|
36
|
-
"update-echo-
|
|
36
|
+
"update-echo-libs": "./lib/update-echo-libs.js"
|
|
37
37
|
},
|
|
38
38
|
"files": [
|
|
39
39
|
"lib",
|