@equinor/echo-cli 0.14.5-beta-7 → 0.14.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,36 @@
1
+ {
2
+ "name": "@equinor/echo-test app",
3
+ "version": "0.0.1",
4
+ "description": "",
5
+ "main": "build/index.js",
6
+ "source": "src/index.ts",
7
+ "scripts": {
8
+ "build": "echo-build -c && npm run env",
9
+ "env": "bash ./env.sh",
10
+ "start": "echo-build -s -d",
11
+ "start-admin": "echo-build -s -d -a"
12
+ },
13
+ "author": "",
14
+ "license": "ISC",
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.0",
26
+ "@equinor/echo-components": "0.11.8",
27
+ "@equinor/echo-core": "0.9.9",
28
+ "@equinor/echo-search": "0.15.5",
29
+ "@equinor/echo-utils": "0.4.1",
30
+ "@equinor/echo-cli": "0.14.4",
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
+ }
@@ -0,0 +1,47 @@
1
+ ![logo](https://raw.githubusercontent.com/equinor/EchoCore/main/doc/ee.png)
2
+
3
+ # Echo - Test App
4
+
5
+ This module has been bootstrapped by EchoCli.
6
+
7
+ ### NPM
8
+
9
+ ```sh-session
10
+ $ npm install @equinor/echo-module-Test App --save
11
+ ```
12
+
13
+ # Development
14
+
15
+ First time usage, run following command first:
16
+
17
+ ```sh-session
18
+ $ npm install
19
+ ```
20
+
21
+ you may need to ude the legacy peer deps flag.
22
+
23
+ ```sh-session
24
+ $ npm install --legacy-peer-deps
25
+ ```
26
+
27
+ ### NPM build
28
+
29
+ ```sh-session
30
+ $ npm run build
31
+ ```
32
+
33
+ ### NPM build watch
34
+
35
+ ```sh-session
36
+ $ npm run start
37
+ ```
38
+
39
+ ## Publish
40
+
41
+ For now the only way to include a module to echo is to publish the package to npmjs.com or npm.equinor.com
42
+
43
+ For npmjs use:
44
+
45
+ ```sh-session
46
+ $ npm run publish
47
+ ```
@@ -0,0 +1,5 @@
1
+ .wrapper {
2
+ margin-top: 150px;
3
+ padding: 16px;
4
+ text-align: center;
5
+ }
@@ -0,0 +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 test Echo Applications</p>
25
+ <h6>Echo v{echoVersion}</h6>
26
+ </div>
27
+ );
28
+ };
29
+
30
+ export default App;
@@ -0,0 +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
+ }
@@ -0,0 +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
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@equinor/echo-cli",
3
- "version": "0.14.5-beta-7",
3
+ "version": "0.14.5",
4
4
  "description": "Command line interface for Echo Apps",
5
5
  "main": "dist/index.js",
6
6
  "source": "src/test.js",
@@ -84,7 +84,7 @@
84
84
  "rollup-plugin-livereload": "^2.0.5",
85
85
  "rollup-plugin-node-polyfills": "^0.2.1",
86
86
  "rollup-plugin-postcss": "^4.0.2",
87
- "rollup-plugin-serve": "^1.1.1",
87
+ "rollup-plugin-serve": "^3.0.0",
88
88
  "rollup-plugin-typescript2": "^0.36.0",
89
89
  "style-loader": "^4.0.0",
90
90
  "terser-webpack-plugin": "^5.3.10",