@equinor/echo-cli 2.0.0 → 2.2.0-beta-rrd-6-1

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.
@@ -21,13 +21,13 @@
21
21
  "author": "",
22
22
  "license": "MIT",
23
23
  "dependencies": {
24
- "@equinor/echo-base": "2.0.1",
25
- "@equinor/echo-components": "2.0.1",
26
- "@equinor/echo-core": "2.0.1",
27
- "@equinor/echo-framework": "2.0.1",
24
+ "@equinor/echo-base": "2.2.0",
25
+ "@equinor/echo-components": "2.2.0",
26
+ "@equinor/echo-core": "2.2.0-beta-rrd-6",
27
+ "@equinor/echo-framework": "2.2.0-beta-rrd-6-1",
28
28
  "@equinor/echo-scripts": "0.1.5",
29
- "@equinor/echo-search": "2.0.1",
30
- "@equinor/echo-utils": "2.0.2",
29
+ "@equinor/echo-search": "2.2.0-beta-rrd-6",
30
+ "@equinor/echo-utils": "2.2.0",
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",
@@ -42,7 +42,7 @@
42
42
  "lodash": "4.17.21",
43
43
  "react": "18.3.1",
44
44
  "react-dom": "18.3.1",
45
- "react-router-dom": "5.3.4",
45
+ "react-router-dom": "^6.30.1",
46
46
  "react-sortablejs": "6.1.4",
47
47
  "sortablejs": "1.15.6",
48
48
  "styled-components": "6.1.19",
@@ -1,17 +1,17 @@
1
- window._env_ = {
2
- HTTPS: "true",
3
- GENERATE_SOURCEMAP: "true",
4
- INLINE_RUNTIME_CHUNK: "false",
5
- WEBSITE_HOSTNAME: "localhost:3000;",
6
- REACT_APP_DEFAULT_CACHE_LOCATION: "localstorage",
7
- REACT_APP_API_URL: "https://dt-echopedia-api-dev.azurewebsites.net",
8
- REACT_APP_WEB_URL: "https://dt-echopedia-web-dev.azurewebsites.net",
9
- REACT_APP_WEB_PROD_URL: "https://echo.equinor.com",
10
- REACT_APP_AZURE_AD_TENNANT: "StatoilSRM.onmicrosoft.com",
11
- REACT_APP_AZURE_AD_TENNANT_ID: "3aa4a235-b6e2-48d5-9195-7fcf05b459b0",
12
- REACT_APP_AZURE_AD_CLIENT_ID: "751d2504-0b66-4b78-9807-4b60525a14c6",
13
- REACT_APP_API_CLIENT_ID: "aef35d97-53d4-4fd0-adaf-c5a514b38436",
14
- REACT_APP_APPINSIGHTS_CONNECTION_STRING: "InstrumentationKey=e5299075-a00d-4012-96f9-42861e8d8a9e;IngestionEndpoint=https://northeurope-3.in.applicationinsights.azure.com/;LiveEndpoint=https://northeurope.livediagnostics.monitor.azure.com/;ApplicationId=a9b64222-d4a9-42e6-a615-7428fe1a26af",
15
- REACT_APP_AZURE_BUILD_NUMBER: "0.8.dev.9",
16
- REACT_APP_LOGGER_ACTIVE: "false",
17
- }
1
+ window._env_ = {
2
+ HTTPS: "true",
3
+ GENERATE_SOURCEMAP: "true",
4
+ INLINE_RUNTIME_CHUNK: "false",
5
+ WEBSITE_HOSTNAME: "localhost:3000;",
6
+ REACT_APP_DEFAULT_CACHE_LOCATION: "localstorage",
7
+ REACT_APP_API_URL: "https://dt-echopedia-api-dev.azurewebsites.net",
8
+ REACT_APP_WEB_URL: "https://dt-echopedia-web-dev.azurewebsites.net",
9
+ REACT_APP_WEB_PROD_URL: "https://echo.equinor.com",
10
+ REACT_APP_AZURE_AD_TENNANT: "StatoilSRM.onmicrosoft.com",
11
+ REACT_APP_AZURE_AD_TENNANT_ID: "3aa4a235-b6e2-48d5-9195-7fcf05b459b0",
12
+ REACT_APP_AZURE_AD_CLIENT_ID: "751d2504-0b66-4b78-9807-4b60525a14c6",
13
+ REACT_APP_API_CLIENT_ID: "aef35d97-53d4-4fd0-adaf-c5a514b38436",
14
+ REACT_APP_APPINSIGHTS_CONNECTION_STRING: "InstrumentationKey=e5299075-a00d-4012-96f9-42861e8d8a9e;IngestionEndpoint=https://northeurope-3.in.applicationinsights.azure.com/;LiveEndpoint=https://northeurope.livediagnostics.monitor.azure.com/;ApplicationId=a9b64222-d4a9-42e6-a615-7428fe1a26af",
15
+ REACT_APP_AZURE_BUILD_NUMBER: "0.8.dev.9",
16
+ REACT_APP_LOGGER_ACTIVE: "false",
17
+ }
@@ -1,21 +1,21 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="UTF-8" />
5
- <script type="application/javascript" src="./env-config.js"></script>
6
- <meta http-equiv="X-UA-Compatible" content="IE=edge" />
7
- <meta
8
- name="viewport"
9
- content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no,viewport-fit=cover"
10
- />
11
- <link href="./index.css" rel="stylesheet" />
12
- <link rel="stylesheet" href="https://cdn.eds.equinor.com/font/equinor-font.css" />
13
- <link rel="preconnect" href="https://login.microsoftonline.com" />
14
- <link rel="preconnect" href="https://dc.services.visualstudio.com" />
15
- <link rel="preconnect" href="https://cdn.eds.equinor.com" />
16
- <title>Echo | Development</title>
17
- </head>
18
- <body>
19
- <div id="root"></div>
20
- </body>
21
- </html>
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <script type="application/javascript" src="./env-config.js"></script>
6
+ <meta http-equiv="X-UA-Compatible" content="IE=edge" />
7
+ <meta
8
+ name="viewport"
9
+ content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no,viewport-fit=cover"
10
+ />
11
+ <link href="./index.css" rel="stylesheet" />
12
+ <link rel="stylesheet" href="https://cdn.eds.equinor.com/font/equinor-font.css" />
13
+ <link rel="preconnect" href="https://login.microsoftonline.com" />
14
+ <link rel="preconnect" href="https://dc.services.visualstudio.com" />
15
+ <link rel="preconnect" href="https://cdn.eds.equinor.com" />
16
+ <title>Echo | Development</title>
17
+ </head>
18
+ <body>
19
+ <div id="root"></div>
20
+ </body>
21
+ </html>
@@ -2,7 +2,6 @@ import { EchoEnv, useInitial } from '@equinor/echo-core';
2
2
  import { displayToast, EchoContent, EchoEventHandler, EchoRoutes, Toasters } from '@equinor/echo-framework';
3
3
  import { Syncer } from '@equinor/echo-search';
4
4
  import React from 'react';
5
- import { Redirect as TypedRedirect, Route as TypedRoute, Switch as TypedSwitch } from 'react-router-dom';
6
5
  import { getCorePlants } from './api/api-plants';
7
6
  import './app.css';
8
7
  import { Home } from './components/Home/Home';
@@ -20,10 +19,7 @@ export const EchoApp: React.FC = () => {
20
19
  return (
21
20
  <EchoEventHandler>
22
21
  <EchoContent Legend={Legend} isOnboardingCompleted={true}>
23
- <TypedSwitch>
24
- <EchoRoutes homeComponent={Home} />
25
- <TypedRoute render={(): JSX.Element => <TypedRedirect to="/" />} />
26
- </TypedSwitch>
22
+ <EchoRoutes homeComponent={Home} />
27
23
  <Toasters />
28
24
  </EchoContent>
29
25
  </EchoEventHandler>
@@ -73,7 +73,12 @@ const Echo: React.FC = (): JSX.Element => {
73
73
  <QueryClientProvider client={queryClient as unknown as QueryClient}>
74
74
  <EventHubProvider>
75
75
  <Mediator options={moduleOptions} />
76
- <BrowserRouter>
76
+ <BrowserRouter
77
+ future={{
78
+ v7_relativeSplatPath: true,
79
+ v7_startTransition: true
80
+ }}
81
+ >
77
82
  <EchoApp />
78
83
  </BrowserRouter>
79
84
  </EventHubProvider>
@@ -1,21 +1,21 @@
1
- {
2
- "compilerOptions": {
3
- "strict": true,
4
- "jsx": "react-jsx",
5
- "lib": ["dom", "dom.iterable", "esnext"],
6
- "allowSyntheticDefaultImports": true,
7
- "esModuleInterop": true,
8
- "module": "commonjs",
9
- "outDir": "./build/",
10
- "preserveConstEnums": true,
11
- "removeComments": true,
12
- "sourceMap": true,
13
- "noImplicitAny": false,
14
- "allowJs": true,
15
- "skipLibCheck": true,
16
- "target": "es5",
17
- "resolveJsonModule": true,
18
- "types": ["@equinor/echo-scripts", "@types/node", "@types/webpack-env", "@types/jest"]
19
- },
20
- "include": ["src"]
21
- }
1
+ {
2
+ "compilerOptions": {
3
+ "strict": true,
4
+ "jsx": "react-jsx",
5
+ "lib": ["dom", "dom.iterable", "esnext"],
6
+ "allowSyntheticDefaultImports": true,
7
+ "esModuleInterop": true,
8
+ "module": "commonjs",
9
+ "outDir": "./build/",
10
+ "preserveConstEnums": true,
11
+ "removeComments": true,
12
+ "sourceMap": true,
13
+ "noImplicitAny": false,
14
+ "allowJs": true,
15
+ "skipLibCheck": true,
16
+ "target": "es5",
17
+ "resolveJsonModule": true,
18
+ "types": ["@equinor/echo-scripts", "@types/node", "@types/webpack-env", "@types/jest"]
19
+ },
20
+ "include": ["src"]
21
+ }
@@ -1,145 +1,145 @@
1
- import CopyPlugin from 'copy-webpack-plugin';
2
- import Dotenv from 'dotenv-webpack';
3
- import HtmlWebpackPlugin from 'html-webpack-plugin';
4
- import path from 'path';
5
- import { fileURLToPath } from 'url';
6
- import WebpackBar from 'webpackbar';
7
-
8
- const webpackConfig = (env) => {
9
- console.log('Building the dev host application for EchoCli.');
10
-
11
- const __filename = fileURLToPath(import.meta.url);
12
- const __dirname = path.dirname(__filename);
13
-
14
- const buildOutputFolder = 'echo-dev-host-build';
15
-
16
- return {
17
- entry: ['@babel/polyfill', './src/index.tsx'],
18
- mode: 'production',
19
- devtool: 'source-map',
20
- output: {
21
- clean: true,
22
- path: path.resolve(process.cwd(), buildOutputFolder),
23
- filename: '[name].echo.bundle.js',
24
- chunkFilename: 'assets/[name].[contenthash].chunk.js',
25
- publicPath: '/'
26
- },
27
- resolve: {
28
- extensions: ['.ts', '.tsx', '.js', '.jsx'],
29
- fallback: {
30
- crypto: false,
31
- stream: false,
32
- buffer: false
33
- }
34
- },
35
- module: {
36
- rules: [
37
- {
38
- test: /\.(ts|tsx)$/,
39
- loader: 'ts-loader',
40
- exclude: /node_modules/
41
- },
42
- {
43
- test: /\.(js|jsx)$/,
44
- exclude: /node_modules/,
45
- loader: 'babel-loader'
46
- },
47
- {
48
- test: /\.css$/,
49
- use: [
50
- 'style-loader',
51
- {
52
- loader: 'css-loader',
53
- options: {
54
- importLoaders: 1,
55
- modules: {
56
- mode: 'local',
57
- localIdentName: 'echo-[folder]__[local]-[hash:base64:5]',
58
- namedExport: false,
59
- exportLocalsConvention: 'as-is'
60
- }
61
- }
62
- }
63
- ],
64
- include: /\.module\.css$/
65
- },
66
- {
67
- test: /\.css$/,
68
- use: ['style-loader', 'css-loader'],
69
- exclude: /\.module\.css$/
70
- },
71
- {
72
- test: /\.svg$/,
73
- use: ['@svgr/webpack']
74
- },
75
- {
76
- test: /\.(png|jpe?g|gif)$/i,
77
- use: [
78
- {
79
- loader: 'file-loader'
80
- }
81
- ]
82
- }
83
- ]
84
- },
85
- devServer: {
86
- static: [
87
- {
88
- directory: path.join(__dirname, 'public')
89
- },
90
- {
91
- directory: path.join(__dirname, 'build')
92
- }
93
- ],
94
- compress: true,
95
- port: 3000,
96
- hot: true,
97
- historyApiFallback: true,
98
- server: 'https',
99
- headers: {
100
- 'Access-Control-Allow-Origin': '*',
101
- 'Access-Control-Allow-Methods': 'GET, POST, PUT, DELETE, PATCH, OPTIONS',
102
- 'Access-Control-Allow-Headers': 'X-Requested-With, content-type, Authorization'
103
- }
104
- // overlay: {
105
- // warnings: true,
106
- // errors: true,
107
- // },
108
- },
109
- plugins: [
110
- new Dotenv({
111
- ignoreStub: false,
112
- expand: true,
113
- systemvars: false
114
- }),
115
- new HtmlWebpackPlugin({
116
- template: path.resolve(__dirname, './public/index.html')
117
- }),
118
- new WebpackBar({
119
- name: 'Echo module',
120
- color: '#007079',
121
- profile: true
122
- }),
123
- new CopyPlugin({
124
- patterns: [
125
- {
126
- from: path.resolve(__dirname, './public/index.css'),
127
- to: path.resolve(process.cwd(), buildOutputFolder, 'index.css')
128
- },
129
- {
130
- from: path.resolve(__dirname, './public/env-config.js'),
131
- to: path.resolve(process.cwd(), buildOutputFolder, 'env-config.js')
132
- }
133
- ]
134
- })
135
- ],
136
- optimization: {
137
- splitChunks: {
138
- chunks: 'all'
139
- },
140
- minimize: true
141
- }
142
- };
143
- };
144
-
145
- export default webpackConfig;
1
+ import CopyPlugin from 'copy-webpack-plugin';
2
+ import Dotenv from 'dotenv-webpack';
3
+ import HtmlWebpackPlugin from 'html-webpack-plugin';
4
+ import path from 'path';
5
+ import { fileURLToPath } from 'url';
6
+ import WebpackBar from 'webpackbar';
7
+
8
+ const webpackConfig = (env) => {
9
+ console.log('Building the dev host application for EchoCli.');
10
+
11
+ const __filename = fileURLToPath(import.meta.url);
12
+ const __dirname = path.dirname(__filename);
13
+
14
+ const buildOutputFolder = 'echo-dev-host-build';
15
+
16
+ return {
17
+ entry: ['@babel/polyfill', './src/index.tsx'],
18
+ mode: 'production',
19
+ devtool: 'source-map',
20
+ output: {
21
+ clean: true,
22
+ path: path.resolve(process.cwd(), buildOutputFolder),
23
+ filename: '[name].echo.bundle.js',
24
+ chunkFilename: 'assets/[name].[contenthash].chunk.js',
25
+ publicPath: '/'
26
+ },
27
+ resolve: {
28
+ extensions: ['.ts', '.tsx', '.js', '.jsx'],
29
+ fallback: {
30
+ crypto: false,
31
+ stream: false,
32
+ buffer: false
33
+ }
34
+ },
35
+ module: {
36
+ rules: [
37
+ {
38
+ test: /\.(ts|tsx)$/,
39
+ loader: 'ts-loader',
40
+ exclude: /node_modules/
41
+ },
42
+ {
43
+ test: /\.(js|jsx)$/,
44
+ exclude: /node_modules/,
45
+ loader: 'babel-loader'
46
+ },
47
+ {
48
+ test: /\.css$/,
49
+ use: [
50
+ 'style-loader',
51
+ {
52
+ loader: 'css-loader',
53
+ options: {
54
+ importLoaders: 1,
55
+ modules: {
56
+ mode: 'local',
57
+ localIdentName: 'echo-[folder]__[local]-[hash:base64:5]',
58
+ namedExport: false,
59
+ exportLocalsConvention: 'as-is'
60
+ }
61
+ }
62
+ }
63
+ ],
64
+ include: /\.module\.css$/
65
+ },
66
+ {
67
+ test: /\.css$/,
68
+ use: ['style-loader', 'css-loader'],
69
+ exclude: /\.module\.css$/
70
+ },
71
+ {
72
+ test: /\.svg$/,
73
+ use: ['@svgr/webpack']
74
+ },
75
+ {
76
+ test: /\.(png|jpe?g|gif)$/i,
77
+ use: [
78
+ {
79
+ loader: 'file-loader'
80
+ }
81
+ ]
82
+ }
83
+ ]
84
+ },
85
+ devServer: {
86
+ static: [
87
+ {
88
+ directory: path.join(__dirname, 'public')
89
+ },
90
+ {
91
+ directory: path.join(__dirname, 'build')
92
+ }
93
+ ],
94
+ compress: true,
95
+ port: 3000,
96
+ hot: true,
97
+ historyApiFallback: true,
98
+ server: 'https',
99
+ headers: {
100
+ 'Access-Control-Allow-Origin': '*',
101
+ 'Access-Control-Allow-Methods': 'GET, POST, PUT, DELETE, PATCH, OPTIONS',
102
+ 'Access-Control-Allow-Headers': 'X-Requested-With, content-type, Authorization'
103
+ }
104
+ // overlay: {
105
+ // warnings: true,
106
+ // errors: true,
107
+ // },
108
+ },
109
+ plugins: [
110
+ new Dotenv({
111
+ ignoreStub: false,
112
+ expand: true,
113
+ systemvars: false
114
+ }),
115
+ new HtmlWebpackPlugin({
116
+ template: path.resolve(__dirname, './public/index.html')
117
+ }),
118
+ new WebpackBar({
119
+ name: 'Echo module',
120
+ color: '#007079',
121
+ profile: true
122
+ }),
123
+ new CopyPlugin({
124
+ patterns: [
125
+ {
126
+ from: path.resolve(__dirname, './public/index.css'),
127
+ to: path.resolve(process.cwd(), buildOutputFolder, 'index.css')
128
+ },
129
+ {
130
+ from: path.resolve(__dirname, './public/env-config.js'),
131
+ to: path.resolve(process.cwd(), buildOutputFolder, 'env-config.js')
132
+ }
133
+ ]
134
+ })
135
+ ],
136
+ optimization: {
137
+ splitChunks: {
138
+ chunks: 'all'
139
+ },
140
+ minimize: true
141
+ }
142
+ };
143
+ };
144
+
145
+ export default webpackConfig;