@equinor/echo-cli 1.0.1 → 1.0.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.
Files changed (45) hide show
  1. package/README.md +354 -354
  2. package/lib/config/webpack/echoWebpackModule.js +6 -6
  3. package/lib/echo-dev-host/README.md +121 -121
  4. package/lib/echo-dev-host/babel.config.js +10 -10
  5. package/lib/echo-dev-host/jest.config.js +21 -21
  6. package/lib/echo-dev-host/package-lock.json +12464 -12464
  7. package/lib/echo-dev-host/package.json +80 -80
  8. package/lib/echo-dev-host/public/env-config.js +17 -17
  9. package/lib/echo-dev-host/public/index.html +21 -21
  10. package/lib/echo-dev-host/tsconfig.json +21 -21
  11. package/lib/echo-dev-host/webpack.config.js +145 -145
  12. package/lib/update-echo-libs.js +3 -1
  13. package/lib/update-echo-libs.js.map +1 -1
  14. package/package.json +110 -110
  15. package/templates/echoAppTemplate/.gitattributes +3 -3
  16. package/templates/echoAppTemplate/package.json +35 -35
  17. package/templates/echoAppTemplate/readme.md +41 -41
  18. package/templates/echoAppTemplate/src/app.module.css +5 -5
  19. package/templates/echoAppTemplate/src/app.tsx +30 -30
  20. package/templates/echoAppTemplate/src/index.ts +6 -6
  21. package/templates/echoAppTemplate/tsconfig.json +25 -25
  22. package/templates/echoAppTemplateTutorial/.gitattributes +3 -3
  23. package/templates/echoAppTemplateTutorial/package.json +36 -36
  24. package/templates/echoAppTemplateTutorial/readme.md +41 -41
  25. package/templates/echoAppTemplateTutorial/src/app.module.css +5 -5
  26. package/templates/echoAppTemplateTutorial/src/app.tsx +30 -30
  27. package/templates/echoAppTemplateTutorial/src/index.ts +6 -6
  28. package/templates/echoAppTemplateTutorial/tsconfig.json +25 -25
  29. package/templates/echoLibraryTemplate/package.json +35 -35
  30. package/templates/echoLibraryTemplate/public/index.html +21 -21
  31. package/templates/echoLibraryTemplate/public/style.css +43 -43
  32. package/templates/echoLibraryTemplate/readme.md +1 -1
  33. package/templates/echoPluginTemplate/package.json +35 -35
  34. package/templates/echoPluginTemplate/public/index.html +21 -21
  35. package/templates/echoPluginTemplate/public/style.css +43 -43
  36. package/templates/echoPluginTemplate/readme.md +1 -1
  37. package/lib/config/common/copyFile.d.ts +0 -2
  38. package/lib/config/common/copyFile.js +0 -10
  39. package/lib/config/common/copyFile.js.map +0 -1
  40. package/lib/echo-update-dev-host-deps.d.ts +0 -33
  41. package/lib/echo-update-dev-host-deps.js +0 -186
  42. package/lib/echo-update-dev-host-deps.js.map +0 -1
  43. package/lib/utils/printDevHostVersions.d.ts +0 -18
  44. package/lib/utils/printDevHostVersions.js +0 -70
  45. package/lib/utils/printDevHostVersions.js.map +0 -1
@@ -1,41 +1,41 @@
1
- ![logo](https://raw.githubusercontent.com/equinor/EchoCore/main/doc/ee.png)
2
-
3
- # Echo - %moduleName%
4
-
5
- This module has been bootstrapped by EchoCli.
6
-
7
- ### NPM
8
-
9
- ```sh-session
10
- $ npm install @equinor/echo-module-%moduleName% --save
11
- ```
12
-
13
- # Development
14
-
15
- First time usage, run following command first:
16
-
17
- ```sh-session
18
- $ npm install
19
- ```
20
-
21
- ### NPM build
22
-
23
- ```sh-session
24
- $ npm run build
25
- ```
26
-
27
- ### NPM build watch
28
-
29
- ```sh-session
30
- $ npm run start
31
- ```
32
-
33
- ## Publish
34
-
35
- For now the only way to include a module to echo is to publish the package to npmjs.com or npm.equinor.com
36
-
37
- For npmjs use:
38
-
39
- ```sh-session
40
- $ npm run publish
41
- ```
1
+ ![logo](https://raw.githubusercontent.com/equinor/EchoCore/main/doc/ee.png)
2
+
3
+ # Echo - %moduleName%
4
+
5
+ This module has been bootstrapped by EchoCli.
6
+
7
+ ### NPM
8
+
9
+ ```sh-session
10
+ $ npm install @equinor/echo-module-%moduleName% --save
11
+ ```
12
+
13
+ # Development
14
+
15
+ First time usage, run following command first:
16
+
17
+ ```sh-session
18
+ $ npm install
19
+ ```
20
+
21
+ ### NPM build
22
+
23
+ ```sh-session
24
+ $ npm run build
25
+ ```
26
+
27
+ ### NPM build watch
28
+
29
+ ```sh-session
30
+ $ npm run start
31
+ ```
32
+
33
+ ## Publish
34
+
35
+ For now the only way to include a module to echo is to publish the package to npmjs.com or npm.equinor.com
36
+
37
+ For npmjs use:
38
+
39
+ ```sh-session
40
+ $ npm run publish
41
+ ```
@@ -1,5 +1,5 @@
1
- .wrapper {
2
- margin-top: 150px;
3
- padding: 16px;
4
- text-align: center;
5
- }
1
+ .wrapper {
2
+ margin-top: 150px;
3
+ padding: 16px;
4
+ text-align: center;
5
+ }
@@ -1,30 +1,30 @@
1
- import EchoCore, { EchoEnv } from '@equinor/echo-core';
2
- import React, { useEffect, useState } from 'react';
3
- import style from './app.module.css';
4
-
5
- const baseApiUrl = EchoEnv.env().REACT_APP_API_URL;
6
-
7
- async function getVersion(): Promise<string> {
8
- const data = await EchoCore.EchoClient.fetch(`${baseApiUrl}/Version`);
9
- return await data.text();
10
- }
11
-
12
- const App: React.FC = (): JSX.Element => {
13
- const [echoVersion, setEchoVersion] = useState('');
14
-
15
- useEffect(() => {
16
- getVersion().then((version: string) => {
17
- setEchoVersion(version);
18
- });
19
- });
20
-
21
- return (
22
- <div className={style.wrapper}>
23
- <h1>Echo App Template</h1>
24
- <p>This is an app template for Echo Applications</p>
25
- <h6>Echo v{echoVersion}</h6>
26
- </div>
27
- );
28
- };
29
-
30
- export default App;
1
+ import EchoCore, { EchoEnv } from '@equinor/echo-core';
2
+ import React, { useEffect, useState } from 'react';
3
+ import style from './app.module.css';
4
+
5
+ const baseApiUrl = EchoEnv.env().REACT_APP_API_URL;
6
+
7
+ async function getVersion(): Promise<string> {
8
+ const data = await EchoCore.EchoClient.fetch(`${baseApiUrl}/Version`);
9
+ return await data.text();
10
+ }
11
+
12
+ const App: React.FC = (): JSX.Element => {
13
+ const [echoVersion, setEchoVersion] = useState('');
14
+
15
+ useEffect(() => {
16
+ getVersion().then((version: string) => {
17
+ setEchoVersion(version);
18
+ });
19
+ });
20
+
21
+ return (
22
+ <div className={style.wrapper}>
23
+ <h1>Echo App Template</h1>
24
+ <p>This is an app template for Echo Applications</p>
25
+ <h6>Echo v{echoVersion}</h6>
26
+ </div>
27
+ );
28
+ };
29
+
30
+ export default App;
@@ -1,6 +1,6 @@
1
- import { EchoModuleApi } from '@equinor/echo-core';
2
- import App from './app';
3
-
4
- export function setup(api: EchoModuleApi): void {
5
- api.registerApp(App);
6
- }
1
+ import { EchoModuleApi } from '@equinor/echo-core';
2
+ import App from './app';
3
+
4
+ export function setup(api: EchoModuleApi): void {
5
+ api.registerApp(App);
6
+ }
@@ -1,25 +1,25 @@
1
- {
2
- "include": ["src"],
3
- "compilerOptions": {
4
- "sourceMap": true,
5
- "noImplicitAny": false,
6
- "module": "ES2015",
7
- "target": "es5",
8
- "lib": [
9
- "esnext",
10
- "dom",
11
- "dom.iterable"
12
- ],
13
- "removeComments": true,
14
- "allowSyntheticDefaultImports": true,
15
- "jsx": "react",
16
- "allowJs": true,
17
- "baseUrl": "./src",
18
- "esModuleInterop": true,
19
- "resolveJsonModule": true,
20
- "moduleResolution": "node",
21
- "downlevelIteration": true,
22
- "types": ["@equinor/echo-scripts"],
23
- }
24
- }
25
-
1
+ {
2
+ "include": ["src"],
3
+ "compilerOptions": {
4
+ "sourceMap": true,
5
+ "noImplicitAny": false,
6
+ "module": "ES2015",
7
+ "target": "es5",
8
+ "lib": [
9
+ "esnext",
10
+ "dom",
11
+ "dom.iterable"
12
+ ],
13
+ "removeComments": true,
14
+ "allowSyntheticDefaultImports": true,
15
+ "jsx": "react",
16
+ "allowJs": true,
17
+ "baseUrl": "./src",
18
+ "esModuleInterop": true,
19
+ "resolveJsonModule": true,
20
+ "moduleResolution": "node",
21
+ "downlevelIteration": true,
22
+ "types": ["@equinor/echo-scripts"],
23
+ }
24
+ }
25
+
@@ -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,43 +1,43 @@
1
- html,
2
- body {
3
- margin: 0;
4
- padding: 0;
5
- width: 100%;
6
- height: 100%;
7
- background-color: #fff;
8
- font-family: monospace;
9
- }
10
-
11
- .centered {
12
- position: absolute;
13
- top: 50%;
14
- left: 50%;
15
- transform: translate(-50%, -50%);
16
- background-color: #dedede;
17
- padding: 20px 30px;
18
- display: flex;
19
- flex-direction: column;
20
- text-align: center;
21
- }
22
-
23
- .header {
24
- width: 100%;
25
- text-align: center;
26
- color: rgb(203, 119, 50);
27
- }
28
-
29
- button {
30
- justify-self: center;
31
- margin-top: 8px;
32
- background: rgb(253, 108, 156);
33
- padding: 16px;
34
- border: hidden;
35
- }
36
-
37
- button:hover {
38
- background: rgb(248, 177, 62);
39
- }
40
-
41
- button:focus {
42
- background: rgb(230, 181, 104);
43
- }
1
+ html,
2
+ body {
3
+ margin: 0;
4
+ padding: 0;
5
+ width: 100%;
6
+ height: 100%;
7
+ background-color: #fff;
8
+ font-family: monospace;
9
+ }
10
+
11
+ .centered {
12
+ position: absolute;
13
+ top: 50%;
14
+ left: 50%;
15
+ transform: translate(-50%, -50%);
16
+ background-color: #dedede;
17
+ padding: 20px 30px;
18
+ display: flex;
19
+ flex-direction: column;
20
+ text-align: center;
21
+ }
22
+
23
+ .header {
24
+ width: 100%;
25
+ text-align: center;
26
+ color: rgb(203, 119, 50);
27
+ }
28
+
29
+ button {
30
+ justify-self: center;
31
+ margin-top: 8px;
32
+ background: rgb(253, 108, 156);
33
+ padding: 16px;
34
+ border: hidden;
35
+ }
36
+
37
+ button:hover {
38
+ background: rgb(248, 177, 62);
39
+ }
40
+
41
+ button:focus {
42
+ background: rgb(230, 181, 104);
43
+ }
@@ -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,43 +1,43 @@
1
- html,
2
- body {
3
- margin: 0;
4
- padding: 0;
5
- width: 100%;
6
- height: 100%;
7
- background-color: #fff;
8
- font-family: monospace;
9
- }
10
-
11
- .centered {
12
- position: absolute;
13
- top: 50%;
14
- left: 50%;
15
- transform: translate(-50%, -50%);
16
- background-color: #dedede;
17
- padding: 20px 30px;
18
- display: flex;
19
- flex-direction: column;
20
- text-align: center;
21
- }
22
-
23
- .header {
24
- width: 100%;
25
- text-align: center;
26
- color: rgb(203, 119, 50);
27
- }
28
-
29
- button {
30
- justify-self: center;
31
- margin-top: 8px;
32
- background: rgb(253, 108, 156);
33
- padding: 16px;
34
- border: hidden;
35
- }
36
-
37
- button:hover {
38
- background: rgb(248, 177, 62);
39
- }
40
-
41
- button:focus {
42
- background: rgb(230, 181, 104);
43
- }
1
+ html,
2
+ body {
3
+ margin: 0;
4
+ padding: 0;
5
+ width: 100%;
6
+ height: 100%;
7
+ background-color: #fff;
8
+ font-family: monospace;
9
+ }
10
+
11
+ .centered {
12
+ position: absolute;
13
+ top: 50%;
14
+ left: 50%;
15
+ transform: translate(-50%, -50%);
16
+ background-color: #dedede;
17
+ padding: 20px 30px;
18
+ display: flex;
19
+ flex-direction: column;
20
+ text-align: center;
21
+ }
22
+
23
+ .header {
24
+ width: 100%;
25
+ text-align: center;
26
+ color: rgb(203, 119, 50);
27
+ }
28
+
29
+ button {
30
+ justify-self: center;
31
+ margin-top: 8px;
32
+ background: rgb(253, 108, 156);
33
+ padding: 16px;
34
+ border: hidden;
35
+ }
36
+
37
+ button:hover {
38
+ background: rgb(248, 177, 62);
39
+ }
40
+
41
+ button:focus {
42
+ background: rgb(230, 181, 104);
43
+ }
@@ -1 +1 @@
1
- # Woohoo module
1
+ # Woohoo module
@@ -1,2 +0,0 @@
1
- import { EchoWebpackOptions } from './initOptions.js';
2
- export declare function copyClientFiles(options: EchoWebpackOptions): Promise<boolean>;
@@ -1,10 +0,0 @@
1
- import ncp from 'ncp';
2
- import { promisify } from 'util';
3
- const copy = promisify(ncp);
4
- export async function copyClientFiles(options) {
5
- const success = await copy(options.wwwRoot, options.currentDir + options.echoModuleConfig.server.contentBase, {
6
- clobber: false
7
- });
8
- return success;
9
- }
10
- //# sourceMappingURL=copyFile.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"copyFile.js","sourceRoot":"","sources":["../../../src/config/common/copyFile.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,KAAK,CAAC;AACtB,OAAO,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AAGjC,MAAM,IAAI,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC;AAE5B,MAAM,CAAC,KAAK,UAAU,eAAe,CAAC,OAA2B;IAC7D,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,OAAO,CAAC,UAAU,GAAG,OAAO,CAAC,gBAAgB,CAAC,MAAM,CAAC,WAAW,EAAE;QAC1G,OAAO,EAAE,KAAK;KACjB,CAAC,CAAC;IACH,OAAO,OAAO,CAAC;AACnB,CAAC"}