@equinor/echo-cli 2.1.0-beta-0 → 2.1.0-beta-2
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 +33 -4
- package/lib/config/common/buildAndCopyEchoHostForProd.js +1 -1
- package/lib/config/common/buildAndCopyEchoHostForProd.js.map +1 -1
- package/lib/config/common/echoManifest.js +0 -3
- package/lib/config/common/echoManifest.js.map +1 -1
- package/lib/config/webpack/configBuilders/devServer.js +0 -14
- package/lib/config/webpack/configBuilders/devServer.js.map +1 -1
- package/lib/config/webpack/server.js +0 -16
- package/lib/config/webpack/server.js.map +1 -1
- package/lib/echo-dev-host/package-lock.json +429 -93
- package/lib/echo-dev-host/package.json +6 -6
- package/lib/sync-dev-host-to-app.d.ts +26 -0
- package/lib/sync-dev-host-to-app.js +62 -0
- package/lib/sync-dev-host-to-app.js.map +1 -0
- package/lib/sync-echo-dev-versions.d.ts +6 -0
- package/lib/sync-echo-dev-versions.js +43 -0
- package/lib/sync-echo-dev-versions.js.map +1 -0
- package/lib/tools/buildScripts/buildAndCopyDevHost.d.ts +50 -7
- package/lib/tools/buildScripts/buildAndCopyDevHost.js +84 -21
- package/lib/tools/buildScripts/buildAndCopyDevHost.js.map +1 -1
- package/lib/tools/buildScripts/buildAndCopyDevHost.test.js +502 -0
- package/lib/tools/buildScripts/buildAndCopyDevHost.test.js.map +1 -0
- package/lib/update-echo-libs.d.ts +0 -3
- package/lib/update-echo-libs.js +13 -61
- package/lib/update-echo-libs.js.map +1 -1
- package/lib/utils/merge.test.d.ts +1 -0
- package/lib/{__test__/utils/merg.test.js → utils/merge.test.js} +2 -2
- package/lib/utils/merge.test.js.map +1 -0
- package/package.json +5 -4
- package/lib/__test__/utils/merg.test.js.map +0 -1
- /package/lib/{__test__/utils/merg.test.d.ts → tools/buildScripts/buildAndCopyDevHost.test.d.ts} +0 -0
|
@@ -21,13 +21,13 @@
|
|
|
21
21
|
"author": "",
|
|
22
22
|
"license": "MIT",
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@equinor/echo-base": "2.2.
|
|
25
|
-
"@equinor/echo-components": "2.2.
|
|
26
|
-
"@equinor/echo-core": "2.2.
|
|
27
|
-
"@equinor/echo-framework": "2.2.
|
|
24
|
+
"@equinor/echo-base": "2.2.1",
|
|
25
|
+
"@equinor/echo-components": "2.2.1",
|
|
26
|
+
"@equinor/echo-core": "2.2.1",
|
|
27
|
+
"@equinor/echo-framework": "2.2.1",
|
|
28
28
|
"@equinor/echo-scripts": "0.1.5",
|
|
29
|
-
"@equinor/echo-search": "2.2.
|
|
30
|
-
"@equinor/echo-utils": "2.2.
|
|
29
|
+
"@equinor/echo-search": "2.2.1",
|
|
30
|
+
"@equinor/echo-utils": "2.2.1",
|
|
31
31
|
"@equinor/eds-core-react": "0.49.0",
|
|
32
32
|
"@equinor/eds-icons": "0.22.0",
|
|
33
33
|
"@equinor/eds-tokens": "0.10.0",
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { Command } from '@oclif/core';
|
|
3
|
+
/**
|
|
4
|
+
* Command to synchronize echo-dev-host library versions with the consumer application's package.json.
|
|
5
|
+
*
|
|
6
|
+
* This command is useful when switching between git branches that may have different versions of
|
|
7
|
+
* @equinor/echo-* dependencies. It rebuilds the echo-dev-host to use the exact versions specified
|
|
8
|
+
* in the consumer app's package.json.
|
|
9
|
+
*
|
|
10
|
+
* @remarks
|
|
11
|
+
* The command performs the following steps:
|
|
12
|
+
* 1. Locates the consumer app's package.json containing @equinor/echo-* dependencies
|
|
13
|
+
* 2. Displays current versions of echo libraries in both dev-host and the app
|
|
14
|
+
* 3. Rebuilds echo-dev-host using sync mode to match the app's exact dependency versions
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```bash
|
|
18
|
+
* npx sync-dev-host-to-app
|
|
19
|
+
* ```
|
|
20
|
+
*
|
|
21
|
+
* @throws {Error} Exits with code 1 if no package.json with @equinor/echo-* dependencies is found
|
|
22
|
+
*/
|
|
23
|
+
export default class SyncDevHostToApp extends Command {
|
|
24
|
+
static readonly description = "Sync echo-dev-host to use exact echo library versions from your app (useful after switching git branches)";
|
|
25
|
+
run(): Promise<void>;
|
|
26
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
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
|
+
/**
|
|
10
|
+
* Command to synchronize echo-dev-host library versions with the consumer application's package.json.
|
|
11
|
+
*
|
|
12
|
+
* This command is useful when switching between git branches that may have different versions of
|
|
13
|
+
* @equinor/echo-* dependencies. It rebuilds the echo-dev-host to use the exact versions specified
|
|
14
|
+
* in the consumer app's package.json.
|
|
15
|
+
*
|
|
16
|
+
* @remarks
|
|
17
|
+
* The command performs the following steps:
|
|
18
|
+
* 1. Locates the consumer app's package.json containing @equinor/echo-* dependencies
|
|
19
|
+
* 2. Displays current versions of echo libraries in both dev-host and the app
|
|
20
|
+
* 3. Rebuilds echo-dev-host using sync mode to match the app's exact dependency versions
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```bash
|
|
24
|
+
* npx sync-dev-host-to-app
|
|
25
|
+
* ```
|
|
26
|
+
*
|
|
27
|
+
* @throws {Error} Exits with code 1 if no package.json with @equinor/echo-* dependencies is found
|
|
28
|
+
*/
|
|
29
|
+
export default class SyncDevHostToApp extends Command {
|
|
30
|
+
static description = 'Sync echo-dev-host to use exact echo library versions from your app (useful after switching git branches)';
|
|
31
|
+
async run() {
|
|
32
|
+
console.log(chalk.cyan.bold('\n🔄 Syncing echo-dev-host versions to match your app...\n'));
|
|
33
|
+
// 1. Find consumer app package.json
|
|
34
|
+
const consumerPkgPath = findConsumerAppPackageJson(process.cwd());
|
|
35
|
+
if (!consumerPkgPath) {
|
|
36
|
+
console.error(chalk.red('Could not find a package.json with @equinor/echo-* dependencies.\nMake sure you are in an Echo module project directory.'));
|
|
37
|
+
process.exit(1);
|
|
38
|
+
}
|
|
39
|
+
// 2. Show current versions
|
|
40
|
+
const devHostPkgPath = path.resolve(process.cwd(), 'node_modules', '@equinor', 'echo-cli', 'lib', 'echo-dev-host', 'package.json');
|
|
41
|
+
console.log(chalk.yellow('Current versions:\n'));
|
|
42
|
+
await printEchoLibsVersions({
|
|
43
|
+
devHostPkgPath,
|
|
44
|
+
appPkgPath: consumerPkgPath,
|
|
45
|
+
fetchLatest: false
|
|
46
|
+
});
|
|
47
|
+
console.log(chalk.cyan("\n📌 This will rebuild echo-dev-host to match your app's package.json versions exactly.\n"));
|
|
48
|
+
// 3. Rebuild dev host with sync mode (forces consumer app versions)
|
|
49
|
+
const cliNodeModules = path.resolve(process.cwd(), 'node_modules', '@equinor', 'echo-cli');
|
|
50
|
+
const finalOutput = path.join(cliNodeModules, ECHO_HOST_BUILD_OUTPUT_FOLDER);
|
|
51
|
+
await buildAndCopyDevHost({
|
|
52
|
+
cliNodeModules,
|
|
53
|
+
tmpDevHostFolder: path.resolve(process.cwd(), ECHO_HOST_TEMP_BUILD_FOLDER),
|
|
54
|
+
finalOutputDir: finalOutput,
|
|
55
|
+
mode: 'sync'
|
|
56
|
+
});
|
|
57
|
+
console.log(chalk.green.bold("\n✅ Sync complete! echo-dev-host now uses your app's echo lib versions.\n"));
|
|
58
|
+
console.log(chalk.gray('You can now run "npm start" to start your Echo app.\n'));
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
SyncDevHostToApp.run();
|
|
62
|
+
//# sourceMapp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AC,CAAC,CAAC;QACjD,MAAM,qBAAqB,CAAC;YACxB,cAAc;YACd,UAAU,EAAE,eAAe;YAC3B,WAAW,EAAE,KAAK;SACrB,CAAC,CAAC;QAEH,OAAO,CAAC,GAAG,CACP,KAAK,CAAC,IAAI,CAAC,2FAA2F,CAAC,CAC1G,CAAC;QAEF,oEAAoE;QACpE,MAAM,cAAc,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,cAAc,EAAE,UAAU,EAAE,UAAU,CAAC,CAAC;QAC3F,MAAM,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE,6BAA6B,CAAC,CAAC;QAE7E,MAAM,mBAAmB,CAAC;YACtB,cAAc;YACd,gBAAgB,EAAE,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,2BAA2B,CAAC;YAC1E,cAAc,EAAE,WAAW;YAC3B,IAAI,EAAE,MAAM;SACf,CAAC,CAAC;QAEH,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,2EAA2E,CAAC,CAAC,CAAC;QAC3G,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,uDAAuD,CAAC,CAAC,CAAC;IACrF,CAAC;;AAGL,gBAAgB,CAAC,GAAG,EAAE,CAAC"}
|
|
@@ -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,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,6BAA6B,EAAE,2BAA2B,EAAE,MAAM,mBAAmB,CAAC;AAC/F,OAAO,EAAE,mBAAmB,EAAE,MAAM,6CAA6C,CAAC;AAClF,OAAO,EAAE,0BAA0B,EAAE,MAAM,uCAAuC,CAAC;AACnF,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AAEzE,MAAM,CAAC,OAAO,OAAO,mBAAoB,SAAQ,OAAO;IACpD,MAAM,CAAU,WAAW,GACvB,2GAA2G,CAAC;IAEhH,KAAK,CAAC,GAAG;QACL,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,4DAA4D,CAAC,CAAC,CAAC;QAE3F,oCAAoC;QACpC,MAAM,eAAe,GAAG,0BAA0B,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;QAClE,IAAI,CAAC,eAAe,EAAE,CAAC;YACnB,OAAO,CAAC,KAAK,CACT,KAAK,CAAC,GAAG,CACL,0HAA0H,CAC7H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2
|
+
* Build mode for echo-dev-host
|
|
3
|
+
* - 'dev': Standard development build (default)
|
|
4
|
+
* - 'prod': Production build using max(consumer, devHost) versions
|
|
5
|
+
* - 'sync': Force dev host to match consumer app versions exactly
|
|
6
|
+
*/
|
|
7
|
+
export type BuildMode = 'dev' | 'prod' | 'sync';
|
|
1
8
|
/**
|
|
2
9
|
* Builds and copies the Echo Dev Host application for local development or production use.
|
|
3
10
|
*
|
|
4
11
|
* This function performs the following steps:
|
|
5
12
|
* 1. Removes and recreates a temporary folder for the dev host.
|
|
6
13
|
* 2. Copies the echo-dev-host source files to the temporary folder.
|
|
7
|
-
* 3. Optionally overrides echo library dependencies
|
|
8
|
-
*
|
|
14
|
+
* 3. Optionally overrides echo library dependencies based on the build mode:
|
|
15
|
+
* - 'prod': Uses max(consumer, devHost) versions
|
|
16
|
+
* - 'sync': Forces exact consumer app versions
|
|
17
|
+
* - 'dev': Uses original dev host versions
|
|
9
18
|
* 4. Installs dependencies and builds the dev host application.
|
|
10
19
|
* 5. Copies the build output to the specified final output directory.
|
|
11
20
|
* 6. Cleans up the temporary folder after the build process.
|
|
@@ -14,16 +23,50 @@
|
|
|
14
23
|
* @param params.cliNodeModules - Path to the node_modules directory containing echo-dev-host.
|
|
15
24
|
* @param params.tmpDevHostFolder - Path to the temporary folder used for building the dev host.
|
|
16
25
|
* @param params.finalOutputDir - Path to the directory where the build output should be copied.
|
|
17
|
-
* @param params.
|
|
18
|
-
* @param params.installAndBuild - (Optional) If true, installs dependencies and builds the dev host (default: true).
|
|
19
|
-
* @param params.skipFetchingLatestVersions - (Optional) If true, skips fetching the latest versions of echo libraries.
|
|
26
|
+
* @param params.mode - Build mode: 'dev' (default), 'prod', or 'sync'
|
|
20
27
|
*
|
|
21
28
|
* @remarks
|
|
22
29
|
* - Exits the process if a suitable consumer app package.json cannot be found.
|
|
23
30
|
*/
|
|
24
|
-
export declare function buildAndCopyDevHost({ cliNodeModules, tmpDevHostFolder, finalOutputDir,
|
|
31
|
+
export declare function buildAndCopyDevHost({ cliNodeModules, tmpDevHostFolder, finalOutputDir, mode }: {
|
|
25
32
|
cliNodeModules: string;
|
|
26
33
|
tmpDevHostFolder: string;
|
|
27
34
|
finalOutputDir: string;
|
|
28
|
-
|
|
35
|
+
mode?: BuildMode;
|
|
29
36
|
}): Promise<void>;
|
|
37
|
+
/**
|
|
38
|
+
* Determines the versions of Echo libraries to use for a production build of the dev host,
|
|
39
|
+
* based on the dependencies specified in the consumer application's package.json.
|
|
40
|
+
*
|
|
41
|
+
* This function compares the Echo library dependencies between the consumer app and the dev host.
|
|
42
|
+
* If the consumer app requires a newer version of an Echo library than the dev host, the dev host's
|
|
43
|
+
* package.json is updated to use the consumer app's version for that library.
|
|
44
|
+
*
|
|
45
|
+
* The function logs the source of each version decision and writes any necessary updates to the dev host's
|
|
46
|
+
* package.json file.
|
|
47
|
+
*
|
|
48
|
+
* @param appPkgPath - The file path to the consumer application's package.json.
|
|
49
|
+
* @param tmpDevHostFolder - The folder path containing the dev host's package.json.
|
|
50
|
+
* @returns A promise that resolves to a record mapping each Echo library name to the version that will be used for the build.
|
|
51
|
+
* @internal - Exported for testing purposes only
|
|
52
|
+
*/
|
|
53
|
+
export declare function determineEchoLibVersionsForProdBuild({ appPkgPath, tmpDevHostFolder }: {
|
|
54
|
+
appPkgPath: string;
|
|
55
|
+
tmpDevHostFolder: string;
|
|
56
|
+
}): Promise<Record<string, string>>;
|
|
57
|
+
/**
|
|
58
|
+
* Forces the dev host to use the exact echo library versions from the consumer app's package.json.
|
|
59
|
+
* This is useful for developers switching between git branches with different echo lib versions.
|
|
60
|
+
*
|
|
61
|
+
* Unlike production builds which use max(consumer, devHost), this function always uses the consumer's
|
|
62
|
+
* version regardless of whether it's higher or lower than the dev host's current version.
|
|
63
|
+
*
|
|
64
|
+
* @param appPkgPath - The file path to the consumer application's package.json.
|
|
65
|
+
* @param tmpDevHostFolder - The folder path containing the dev host's package.json.
|
|
66
|
+
* @returns A promise that resolves to a record mapping each Echo library name to the version from the consumer app.
|
|
67
|
+
* @internal - Exported for testing purposes only
|
|
68
|
+
*/
|
|
69
|
+
export declare function syncDevHostToConsumerVersions({ appPkgPath, tmpDevHostFolder }: {
|
|
70
|
+
appPkgPath: string;
|
|
71
|
+
tmpDevHostFolder: string;
|
|
72
|
+
}): Promise<Record<string, string>>;
|
|
@@ -13,8 +13,10 @@ import { printEchoLibsVersions } from '../../utils/printEchoLibsVersions.js';
|
|
|
13
13
|
* This function performs the following steps:
|
|
14
14
|
* 1. Removes and recreates a temporary folder for the dev host.
|
|
15
15
|
* 2. Copies the echo-dev-host source files to the temporary folder.
|
|
16
|
-
* 3. Optionally overrides echo library dependencies
|
|
17
|
-
*
|
|
16
|
+
* 3. Optionally overrides echo library dependencies based on the build mode:
|
|
17
|
+
* - 'prod': Uses max(consumer, devHost) versions
|
|
18
|
+
* - 'sync': Forces exact consumer app versions
|
|
19
|
+
* - 'dev': Uses original dev host versions
|
|
18
20
|
* 4. Installs dependencies and builds the dev host application.
|
|
19
21
|
* 5. Copies the build output to the specified final output directory.
|
|
20
22
|
* 6. Cleans up the temporary folder after the build process.
|
|
@@ -23,14 +25,12 @@ import { printEchoLibsVersions } from '../../utils/printEchoLibsVersions.js';
|
|
|
23
25
|
* @param params.cliNodeModules - Path to the node_modules directory containing echo-dev-host.
|
|
24
26
|
* @param params.tmpDevHostFolder - Path to the temporary folder used for building the dev host.
|
|
25
27
|
* @param params.finalOutputDir - Path to the directory where the build output should be copied.
|
|
26
|
-
* @param params.
|
|
27
|
-
* @param params.installAndBuild - (Optional) If true, installs dependencies and builds the dev host (default: true).
|
|
28
|
-
* @param params.skipFetchingLatestVersions - (Optional) If true, skips fetching the latest versions of echo libraries.
|
|
28
|
+
* @param params.mode - Build mode: 'dev' (default), 'prod', or 'sync'
|
|
29
29
|
*
|
|
30
30
|
* @remarks
|
|
31
31
|
* - Exits the process if a suitable consumer app package.json cannot be found.
|
|
32
32
|
*/
|
|
33
|
-
export async function buildAndCopyDevHost({ cliNodeModules, tmpDevHostFolder, finalOutputDir,
|
|
33
|
+
export async function buildAndCopyDevHost({ cliNodeModules, tmpDevHostFolder, finalOutputDir, mode = 'dev' }) {
|
|
34
34
|
console.log(`${chalk.cyan.bold('echo-dev-host')} - by Echo Core Team`);
|
|
35
35
|
console.log('Minimalistic host application for local development of Echo applications.\n');
|
|
36
36
|
console.log(figlet.textSync('Echo Dev Host', {
|
|
@@ -41,7 +41,7 @@ export async function buildAndCopyDevHost({ cliNodeModules, tmpDevHostFolder, fi
|
|
|
41
41
|
const devHostSrc = path.join(cliNodeModules, 'lib', 'echo-dev-host');
|
|
42
42
|
const buildOutput = path.join(tmpDevHostFolder, ECHO_HOST_BUILD_OUTPUT_FOLDER);
|
|
43
43
|
const srcPkgJson = path.join(devHostSrc, 'package.json');
|
|
44
|
-
if (
|
|
44
|
+
if (mode === 'prod') {
|
|
45
45
|
console.log(chalk.blueBright.bold(`\n[echo-dev-host] Building the echo app for Production.\n`));
|
|
46
46
|
}
|
|
47
47
|
// Always remove and recreate the temporary folder
|
|
@@ -60,17 +60,23 @@ export async function buildAndCopyDevHost({ cliNodeModules, tmpDevHostFolder, fi
|
|
|
60
60
|
console.log('Could not find a package.json with supported echo libs. Supported libs are:', SUPPORTED_ECHO_LIBS.join(', '));
|
|
61
61
|
process.exit(1);
|
|
62
62
|
}
|
|
63
|
-
if (
|
|
63
|
+
if (mode === 'prod') {
|
|
64
64
|
echoLibVersionsToUse = await determineEchoLibVersionsForProdBuild({
|
|
65
65
|
appPkgPath,
|
|
66
66
|
tmpDevHostFolder
|
|
67
67
|
});
|
|
68
68
|
}
|
|
69
|
+
else if (mode === 'sync') {
|
|
70
|
+
echoLibVersionsToUse = await syncDevHostToConsumerVersions({
|
|
71
|
+
appPkgPath,
|
|
72
|
+
tmpDevHostFolder
|
|
73
|
+
});
|
|
74
|
+
}
|
|
69
75
|
await printEchoLibsVersions({
|
|
70
|
-
devHostPkgPath: srcPkgJson,
|
|
76
|
+
devHostPkgPath: mode === 'dev' ? srcPkgJson : path.join(tmpDevHostFolder, 'package.json'),
|
|
71
77
|
appPkgPath: appPkgPath,
|
|
72
|
-
fetchLatest:
|
|
73
|
-
echoLibVersionsToUse:
|
|
78
|
+
fetchLatest: mode !== 'prod',
|
|
79
|
+
echoLibVersionsToUse: mode === 'prod' ? echoLibVersionsToUse : undefined
|
|
74
80
|
});
|
|
75
81
|
execSync('npm install', { cwd: tmpDevHostFolder, stdio: 'inherit' });
|
|
76
82
|
execSync('npm run build', { cwd: tmpDevHostFolder, stdio: 'inherit' });
|
|
@@ -82,7 +88,7 @@ export async function buildAndCopyDevHost({ cliNodeModules, tmpDevHostFolder, fi
|
|
|
82
88
|
fs.removeSync(tmpDevHostFolder);
|
|
83
89
|
}
|
|
84
90
|
console.log(chalk.green.bold('[echo-dev-host] Build and copy complete!\n'));
|
|
85
|
-
if (
|
|
91
|
+
if (mode !== 'prod') {
|
|
86
92
|
console.log(chalk.green.bold('[echo-dev-host] Now you can start your Echo app with "npm start"\n'));
|
|
87
93
|
}
|
|
88
94
|
}
|
|
@@ -100,8 +106,9 @@ export async function buildAndCopyDevHost({ cliNodeModules, tmpDevHostFolder, fi
|
|
|
100
106
|
* @param appPkgPath - The file path to the consumer application's package.json.
|
|
101
107
|
* @param tmpDevHostFolder - The folder path containing the dev host's package.json.
|
|
102
108
|
* @returns A promise that resolves to a record mapping each Echo library name to the version that will be used for the build.
|
|
109
|
+
* @internal - Exported for testing purposes only
|
|
103
110
|
*/
|
|
104
|
-
async function determineEchoLibVersionsForProdBuild({ appPkgPath, tmpDevHostFolder }) {
|
|
111
|
+
export async function determineEchoLibVersionsForProdBuild({ appPkgPath, tmpDevHostFolder }) {
|
|
105
112
|
const consumerPkg = fs.readJsonSync(appPkgPath);
|
|
106
113
|
const consumerAppName = consumerPkg.name || 'the consumer app';
|
|
107
114
|
console.log(chalk.magentaBright.bold(`\n[echo-dev-host] Prod build - Using latest echo lib versions from "${consumerAppName}" or echo dev host.\n`));
|
|
@@ -113,17 +120,28 @@ async function determineEchoLibVersionsForProdBuild({ appPkgPath, tmpDevHostFold
|
|
|
113
120
|
for (const [lib, consumerVersion] of echoDeps) {
|
|
114
121
|
const devHostVersion = devHostPkg.dependencies?.[lib];
|
|
115
122
|
let source = consumerAppName;
|
|
116
|
-
let finalVersion = consumerVersion;
|
|
117
|
-
if (devHostVersion &&
|
|
118
|
-
|
|
119
|
-
semver.
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
+
let finalVersion = consumerVersion; // Default to consumer version
|
|
124
|
+
if (devHostVersion && semver.valid(devHostVersion) && semver.valid(consumerVersion)) {
|
|
125
|
+
// Use whichever version is higher
|
|
126
|
+
if (semver.gt(devHostVersion, consumerVersion)) {
|
|
127
|
+
// Dev host version is higher, keep it
|
|
128
|
+
source = 'echo dev host';
|
|
129
|
+
finalVersion = devHostVersion;
|
|
130
|
+
}
|
|
131
|
+
else if (semver.gt(consumerVersion, devHostVersion)) {
|
|
132
|
+
// Consumer version is higher, update dev host package.json
|
|
133
|
+
devHostPkg.dependencies[lib] = consumerVersion;
|
|
134
|
+
updated = true;
|
|
135
|
+
}
|
|
136
|
+
// If versions are equal, finalVersion stays as consumerVersion
|
|
137
|
+
}
|
|
138
|
+
else if (!devHostVersion) {
|
|
139
|
+
// Dev host doesn't have this library, add it from consumer
|
|
140
|
+
devHostPkg.dependencies[lib] = consumerVersion;
|
|
123
141
|
updated = true;
|
|
124
142
|
}
|
|
125
143
|
// Track the version that will be used for the build
|
|
126
|
-
echoLibVersionsToUse[lib] =
|
|
144
|
+
echoLibVersionsToUse[lib] = finalVersion;
|
|
127
145
|
// Log the decision
|
|
128
146
|
console.log(`${chalk.cyan(lib)}: ${chalk.yellow(finalVersion)} (from ${source})`);
|
|
129
147
|
}
|
|
@@ -132,4 +150,49 @@ async function determineEchoLibVersionsForProdBuild({ appPkgPath, tmpDevHostFold
|
|
|
132
150
|
}
|
|
133
151
|
return echoLibVersionsToUse;
|
|
134
152
|
}
|
|
153
|
+
/**
|
|
154
|
+
* Forces the dev host to use the exact echo library versions from the consumer app's package.json.
|
|
155
|
+
* This is useful for developers switching between git branches with different echo lib versions.
|
|
156
|
+
*
|
|
157
|
+
* Unlike production builds which use max(consumer, devHost), this function always uses the consumer's
|
|
158
|
+
* version regardless of whether it's higher or lower than the dev host's current version.
|
|
159
|
+
*
|
|
160
|
+
* @param appPkgPath - The file path to the consumer application's package.json.
|
|
161
|
+
* @param tmpDevHostFolder - The folder path containing the dev host's package.json.
|
|
162
|
+
* @returns A promise that resolves to a record mapping each Echo library name to the version from the consumer app.
|
|
163
|
+
* @internal - Exported for testing purposes only
|
|
164
|
+
*/
|
|
165
|
+
export async function syncDevHostToConsumerVersions({ appPkgPath, tmpDevHostFolder }) {
|
|
166
|
+
const consumerPkg = fs.readJsonSync(appPkgPath);
|
|
167
|
+
const consumerAppName = consumerPkg.name || 'your app';
|
|
168
|
+
console.log(chalk.magentaBright.bold(`\n[echo-dev-host] Syncing to exact echo lib versions from "${consumerAppName}".\n`));
|
|
169
|
+
const devHostPkgPath = path.join(tmpDevHostFolder, 'package.json');
|
|
170
|
+
const devHostPkg = fs.readJsonSync(devHostPkgPath);
|
|
171
|
+
const echoDeps = getEchoDeps(consumerPkg);
|
|
172
|
+
let updated = false;
|
|
173
|
+
const echoLibVersionsToUse = {};
|
|
174
|
+
for (const [lib, consumerVersion] of echoDeps) {
|
|
175
|
+
const devHostVersion = devHostPkg.dependencies?.[lib];
|
|
176
|
+
// Always use consumer version (force sync)
|
|
177
|
+
echoLibVersionsToUse[lib] = consumerVersion;
|
|
178
|
+
if (devHostVersion === consumerVersion) {
|
|
179
|
+
console.log(`${chalk.cyan(lib)}: ${chalk.yellow(consumerVersion)} ${chalk.gray('(already synced)')}`);
|
|
180
|
+
}
|
|
181
|
+
else {
|
|
182
|
+
devHostPkg.dependencies[lib] = consumerVersion;
|
|
183
|
+
updated = true;
|
|
184
|
+
const previousVersion = devHostVersion || 'not installed';
|
|
185
|
+
const wasMessage = chalk.gray(`(was ${previousVersion})`);
|
|
186
|
+
console.log(`${chalk.cyan(lib)}: ${chalk.yellow(consumerVersion)} ${wasMessage}`);
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
if (updated) {
|
|
190
|
+
fs.writeJsonSync(devHostPkgPath, devHostPkg, { spaces: 4 });
|
|
191
|
+
console.log(chalk.green('\n✓ Updated dev host package.json'));
|
|
192
|
+
}
|
|
193
|
+
else {
|
|
194
|
+
console.log(chalk.gray('\n✓ All versions already synced'));
|
|
195
|
+
}
|
|
196
|
+
return echoLibVersionsToUse;
|
|
197
|
+
}
|
|
135
198
|
//# sourceMappingURL=buildAndCopyDevHost.js.map
|
|
@@ -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,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,6BAA6B,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC3F,OAAO,EAAE,0BAA0B,EAAE,WAAW,EAAE,MAAM,2CAA2C,CAAC;AACpG,OAAO,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;
|
|
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,OAA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