@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,36 +1,36 @@
1
- {
2
- "name": "echo-library-template",
3
- "version": "0.0.1",
4
- "description": "",
5
- "main": "build/index.js",
6
- "source": "src/index.ts",
7
- "scripts": {
8
- "build": "echo-build",
9
- "start": "echo-build -s -d"
10
- },
11
- "author": "",
12
- "license": "ISC",
13
- "manifest": {},
14
- "dependencies": {},
15
- "peerDependencies": {
16
- "@equinor/echo-base": ">= 0.7.0 < 0.8.0",
17
- "@equinor/echo-components": ">= 0.11.1 < 0.12.0",
18
- "@equinor/echo-core": ">= 0.9.8 < 0.10.0",
19
- "@equinor/echo-search": ">= 0.15.3 < 0.16.0",
20
- "@equinor/echo-utils": ">= 0.4.1 < 0.5.0",
21
- "react": ">= 17.0.2",
22
- "react-dom": " >= 17.0.2"
23
- },
24
- "devDependencies": {
25
- "@equinor/echo-base": "0.7.3",
26
- "@equinor/echo-components": "0.11.16",
27
- "@equinor/echo-core": "0.9.12",
28
- "@equinor/echo-search": "0.15.8",
29
- "@equinor/echo-utils": "0.4.5",
30
- "@equinor/echo-cli": "0.14.18",
31
- "@types/react": "18.0.27",
32
- "@types/react-dom": "18.0.10",
33
- "react": "18.2.0",
34
- "react-dom": "18.2.0"
35
- }
1
+ {
2
+ "name": "echo-library-template",
3
+ "version": "0.0.1",
4
+ "description": "",
5
+ "main": "build/index.js",
6
+ "source": "src/index.ts",
7
+ "scripts": {
8
+ "build": "echo-build",
9
+ "start": "echo-build -s -d"
10
+ },
11
+ "author": "",
12
+ "license": "ISC",
13
+ "manifest": {},
14
+ "dependencies": {},
15
+ "peerDependencies": {
16
+ "@equinor/echo-base": ">= 0.7.0 < 0.8.0",
17
+ "@equinor/echo-components": ">= 0.11.1 < 0.12.0",
18
+ "@equinor/echo-core": ">= 0.9.8 < 0.10.0",
19
+ "@equinor/echo-search": ">= 0.15.3 < 0.16.0",
20
+ "@equinor/echo-utils": ">= 0.4.1 < 0.5.0",
21
+ "react": ">= 17.0.2",
22
+ "react-dom": " >= 17.0.2"
23
+ },
24
+ "devDependencies": {
25
+ "@equinor/echo-base": "0.7.3",
26
+ "@equinor/echo-components": "0.11.16",
27
+ "@equinor/echo-core": "0.9.12",
28
+ "@equinor/echo-search": "0.15.8",
29
+ "@equinor/echo-utils": "0.4.5",
30
+ "@equinor/echo-cli": "0.14.18",
31
+ "@types/react": "18.0.27",
32
+ "@types/react-dom": "18.0.10",
33
+ "react": "18.2.0",
34
+ "react-dom": "18.2.0"
35
+ }
36
36
  }
@@ -1,21 +1,21 @@
1
- <!-- src/template.html -->
2
- <!DOCTYPE html>
3
- <html lang="en">
4
- <head>
5
- <meta charset="UTF-8">
6
- <title>Echo | Search</title>
7
- <link rel="stylesheet" href="style.css">
8
- </head>
9
-
10
- <body>
11
- <div class="centered">
12
- <img src="./ee.png" width="250" alt="EchoSearch">
13
- <div>Example</div>
14
- <h1 class="header">Echo Search</h1><br />
15
- <p>Please look at your developer console.</p>
16
- <button id="start">Start</button>
17
- <button id="doStuff">Start</button>
18
- </div>
19
- </body>
20
-
21
- </html>
1
+ <!-- src/template.html -->
2
+ <!DOCTYPE html>
3
+ <html lang="en">
4
+ <head>
5
+ <meta charset="UTF-8">
6
+ <title>Echo | Search</title>
7
+ <link rel="stylesheet" href="style.css">
8
+ </head>
9
+
10
+ <body>
11
+ <div class="centered">
12
+ <img src="./ee.png" width="250" alt="EchoSearch">
13
+ <div>Example</div>
14
+ <h1 class="header">Echo Search</h1><br />
15
+ <p>Please look at your developer console.</p>
16
+ <button id="start">Start</button>
17
+ <button id="doStuff">Start</button>
18
+ </div>
19
+ </body>
20
+
21
+ </html>
@@ -1 +1 @@
1
- # echoLibraryTemplate
1
+ # echoLibraryTemplate
@@ -1,36 +1,36 @@
1
- {
2
- "name": "echo-plugin-template",
3
- "version": "0.0.1",
4
- "description": "",
5
- "main": "build/index.js",
6
- "source": "src/index.ts",
7
- "scripts": {
8
- "build": "echo-build",
9
- "start": "echo-build -s -d"
10
- },
11
- "author": "",
12
- "license": "ISC",
13
- "manifest": {},
14
- "dependencies": {},
15
- "peerDependencies": {
16
- "@equinor/echo-base": ">= 0.7.0 < 0.8.0",
17
- "@equinor/echo-components": ">= 0.11.1 < 0.12.0",
18
- "@equinor/echo-core": ">= 0.9.8 < 0.10.0",
19
- "@equinor/echo-search": ">= 0.15.3 < 0.16.0",
20
- "@equinor/echo-utils": ">= 0.4.1 < 0.5.0",
21
- "react": ">= 17.0.2",
22
- "react-dom": " >= 17.0.2"
23
- },
24
- "devDependencies": {
25
- "@equinor/echo-base": "0.7.3",
26
- "@equinor/echo-components": "0.11.16",
27
- "@equinor/echo-core": "0.9.12",
28
- "@equinor/echo-search": "0.15.8",
29
- "@equinor/echo-utils": "0.4.5",
30
- "@equinor/echo-cli": "0.14.18",
31
- "@types/react": "18.0.27",
32
- "@types/react-dom": "18.0.10",
33
- "react": "18.2.0",
34
- "react-dom": "18.2.0"
35
- }
1
+ {
2
+ "name": "echo-plugin-template",
3
+ "version": "0.0.1",
4
+ "description": "",
5
+ "main": "build/index.js",
6
+ "source": "src/index.ts",
7
+ "scripts": {
8
+ "build": "echo-build",
9
+ "start": "echo-build -s -d"
10
+ },
11
+ "author": "",
12
+ "license": "ISC",
13
+ "manifest": {},
14
+ "dependencies": {},
15
+ "peerDependencies": {
16
+ "@equinor/echo-base": ">= 0.7.0 < 0.8.0",
17
+ "@equinor/echo-components": ">= 0.11.1 < 0.12.0",
18
+ "@equinor/echo-core": ">= 0.9.8 < 0.10.0",
19
+ "@equinor/echo-search": ">= 0.15.3 < 0.16.0",
20
+ "@equinor/echo-utils": ">= 0.4.1 < 0.5.0",
21
+ "react": ">= 17.0.2",
22
+ "react-dom": " >= 17.0.2"
23
+ },
24
+ "devDependencies": {
25
+ "@equinor/echo-base": "0.7.3",
26
+ "@equinor/echo-components": "0.11.16",
27
+ "@equinor/echo-core": "0.9.12",
28
+ "@equinor/echo-search": "0.15.8",
29
+ "@equinor/echo-utils": "0.4.5",
30
+ "@equinor/echo-cli": "0.14.18",
31
+ "@types/react": "18.0.27",
32
+ "@types/react-dom": "18.0.10",
33
+ "react": "18.2.0",
34
+ "react-dom": "18.2.0"
35
+ }
36
36
  }
@@ -1,21 +1,21 @@
1
- <!-- src/template.html -->
2
- <!DOCTYPE html>
3
- <html lang="en">
4
- <head>
5
- <meta charset="UTF-8">
6
- <title>Echo | Search</title>
7
- <link rel="stylesheet" href="style.css">
8
- </head>
9
-
10
- <body>
11
- <div class="centered">
12
- <img src="./ee.png" width="250" alt="EchoSearch">
13
- <div>Example</div>
14
- <h1 class="header">Echo Search</h1><br />
15
- <p>Please look at your developer console.</p>
16
- <button id="start">Start</button>
17
- <button id="doStuff">Start</button>
18
- </div>
19
- </body>
20
-
21
- </html>
1
+ <!-- src/template.html -->
2
+ <!DOCTYPE html>
3
+ <html lang="en">
4
+ <head>
5
+ <meta charset="UTF-8">
6
+ <title>Echo | Search</title>
7
+ <link rel="stylesheet" href="style.css">
8
+ </head>
9
+
10
+ <body>
11
+ <div class="centered">
12
+ <img src="./ee.png" width="250" alt="EchoSearch">
13
+ <div>Example</div>
14
+ <h1 class="header">Echo Search</h1><br />
15
+ <p>Please look at your developer console.</p>
16
+ <button id="start">Start</button>
17
+ <button id="doStuff">Start</button>
18
+ </div>
19
+ </body>
20
+
21
+ </html>
@@ -1 +1 @@
1
- # Woohoo module
1
+ # Woohoo module
@@ -1,6 +0,0 @@
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
- }
@@ -1,43 +0,0 @@
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
@@ -1 +0,0 @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