@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.
package/README.md CHANGED
@@ -25,28 +25,28 @@ In general it's safe to differ in an echo package patch version. For example if
25
25
  |--------|-------|-------|--------|-----------|--------|----------|---------|-----|------|
26
26
  | 0.14.5 | 0.7.0 | 0.9.9 | 0.15.5 | 0.19.2 | 0.11.8 | 0.34.0 | 0.19.3 | 0.8.5 | Security updates
27
27
  | 0.14.4 | 0.7.0 | 0.9.9 | 0.15.5 | 0.19.2 | 0.11.8 | 0.34.0 | 0.19.3 | 0.8.3 | Removed some leftover `defaultProps` from `echo-components` and `echo-framework`
28
- | 0.14.3 | 0.7.0 | 0.9.9 | 0.15.5 | 0.19.1 | 0.11.7 | 0.34.0 | 0.19.0 | 0.8.3 | Security updates for echo packages
29
- | 0.14.2 | 0.7.0 | 0.9.8 | 0.15.4 | 0.19.1 | 0.11.6 | 0.34.0 | 0.19.0 | 0.8.3 |
30
- | 0.14.1 | 0.7.0 | 0.9.8 | 0.15.3 | 0.19.1 | 0.11.6 | 0.34.0 | 0.19.0 | 0.8.3 |
31
- | 0.14.0 | 0.7.0 | 0.9.8 | 0.15.3 | 0.19.0 | 0.11.6 | 0.34.0 | 0.19.0 | 0.8.3 |
32
- | 0.13.14 | 0.7.0 | 0.9.8 | 0.15.3 | 0.18.11 | 0.11.6 | 0.34.0 | 0.19.0 | 0.8.3 | Fixed an issue where the echo-framework v0.18.10 crashed echo-cli / client
33
- | 0.13.13 | 0.7.0 | 0.9.8 | 0.15.3 | 0.18.10 | 0.11.6 | 0.34.0 | 0.19.0 | 0.8.3 |
34
- | 0.13.12 | 0.7.0 | 0.9.8 | 0.15.3 | 0.18.9 | 0.11.5 | 0.34.0 | 0.19.0 | 0.8.3 | Fixed an issue where `echo-cli` removed echo manifest files when building echo apps
35
- | 0.13.11 | 0.7.0 | 0.9.8 | 0.15.3 | 0.18.9 | 0.11.5 | 0.34.0 | 0.19.0 | 0.8.3 |
36
- | 0.13.10 | 0.7.0 | 0.9.8 | 0.15.3 | 0.18.8 | 0.11.5 | 0.34.0 | 0.19.0 | 0.8.3 |
37
- | 0.13.8 | 0.7.0 | 0.9.8 | 0.15.3 | 0.18.7 | 0.11.1 | 0.34.0 | 0.19.0 | 0.8.3 |
38
- | 0.13.6 | 0.7.0 | 0.9.8 | 0.15.3 | 0.18.4 | 0.11.1 | 0.34.0 | 0.19.0 | 0.8.3 |
39
- | 0.13.5 | 0.7.0 | 0.9.7 | 0.15.3 | 0.18.2 | 0.11.1 | 0.34.0 | 0.19.0 | 0.8.3 |
40
- | 0.13.4 | 0.7.0 | 0.9.5 | 0.15.3 | 0.18.1 | 0.11.1 | 0.34.0 | 0.19.0 | 0.8.3 |
41
- | 0.13.3 | 0.7.0 | 0.9.5 | 0.15.2 | 0.18.1 | 0.11.1 | 0.34.0 | 0.19.0 | 0.8.3 |
42
- | 0.13.2 | 0.7.0 | 0.9.5 | 0.15.1 | 0.18.1 | 0.11.1 | 0.34.0 | 0.19.0 | 0.8.3 |
43
- | 0.13.0 | 0.7.0 | 0.9.4 | 0.15.0 | 0.18.0 | 0.11.0 | 0.34.0 | 0.19.0 | 0.8.3 | Now depends on echo-utils 0.4.0
44
- | 0.12.2 | 0.7.0 | 0.9.4 | 0.15.0 | 0.17.3 | 0.10.2 | 0.34.0 | 0.19.0 | 0.8.3 | Fixed a bug where echo-maps failed to build / start
45
- | 0.12.1 | 0.7.0 | 0.9.4 | 0.15.0 | 0.17.3 | 0.10.2 | 0.34.0 | 0.19.0 | 0.8.3 |
46
- | 0.12.0 | 0.7.0 | 0.9.4 | 0.15.0 | 0.17.2 | 0.10.1 | 0.34.0 | 0.19.0 | 0.8.3 | EchoCli is an ESM module now
47
- | 0.11.2 | 0.7.0 | 0.9.4 | 0.15.0 | 0.17.2 | 0.10.1 | 0.34.0 | 0.19.0 | 0.8.3 |
48
- | 0.11.1 | 0.7.0 | 0.9.4 | 0.15.0 | 0.17.2 | 0.10.0 | 0.34.0 | 0.19.0 | 0.8.3 |
49
- | 0.11.0 | 0.7.0 | 0.9.4 | 0.15.0 | 0.17.0 | 0.10.0 | 0.34.0 | 0.19.0 | 0.8.3 |
28
+ | 0.14.3 | 0.7.0 | 0.9.9 | 0.15.5 | 0.19.1 | 0.11.7 | 0.34.0 | 0.19.3 | 0.8.3 | Security updates for echo packages
29
+ | 0.14.2 | 0.7.0 | 0.9.8 | 0.15.4 | 0.19.1 | 0.11.6 | 0.34.0 | 0.19.3 | 0.8.3 |
30
+ | 0.14.1 | 0.7.0 | 0.9.8 | 0.15.3 | 0.19.1 | 0.11.6 | 0.34.0 | 0.19.3 | 0.8.3 |
31
+ | 0.14.0 | 0.7.0 | 0.9.8 | 0.15.3 | 0.19.0 | 0.11.6 | 0.34.0 | 0.19.3 | 0.8.3 |
32
+ | 0.13.14 | 0.7.0 | 0.9.8 | 0.15.3 | 0.18.11 | 0.11.6 | 0.34.0 | 0.19.3 | 0.8.3 | Fixed an issue where the echo-framework v0.18.10 crashed echo-cli / client
33
+ | 0.13.13 | 0.7.0 | 0.9.8 | 0.15.3 | 0.18.10 | 0.11.6 | 0.34.0 | 0.19.3 | 0.8.3 |
34
+ | 0.13.12 | 0.7.0 | 0.9.8 | 0.15.3 | 0.18.9 | 0.11.5 | 0.34.0 | 0.19.3 | 0.8.3 | Fixed an issue where `echo-cli` removed echo manifest files when building echo apps
35
+ | 0.13.11 | 0.7.0 | 0.9.8 | 0.15.3 | 0.18.9 | 0.11.5 | 0.34.0 | 0.19.3 | 0.8.3 |
36
+ | 0.13.10 | 0.7.0 | 0.9.8 | 0.15.3 | 0.18.8 | 0.11.5 | 0.34.0 | 0.19.3 | 0.8.3 |
37
+ | 0.13.8 | 0.7.0 | 0.9.8 | 0.15.3 | 0.18.7 | 0.11.1 | 0.34.0 | 0.19.3 | 0.8.3 |
38
+ | 0.13.6 | 0.7.0 | 0.9.8 | 0.15.3 | 0.18.4 | 0.11.1 | 0.34.0 | 0.19.3 | 0.8.3 |
39
+ | 0.13.5 | 0.7.0 | 0.9.7 | 0.15.3 | 0.18.2 | 0.11.1 | 0.34.0 | 0.19.3 | 0.8.3 |
40
+ | 0.13.4 | 0.7.0 | 0.9.5 | 0.15.3 | 0.18.1 | 0.11.1 | 0.34.0 | 0.19.3 | 0.8.3 |
41
+ | 0.13.3 | 0.7.0 | 0.9.5 | 0.15.2 | 0.18.1 | 0.11.1 | 0.34.0 | 0.19.3 | 0.8.3 |
42
+ | 0.13.2 | 0.7.0 | 0.9.5 | 0.15.1 | 0.18.1 | 0.11.1 | 0.34.0 | 0.19.3 | 0.8.3 |
43
+ | 0.13.0 | 0.7.0 | 0.9.4 | 0.15.0 | 0.18.0 | 0.11.0 | 0.34.0 | 0.19.3 | 0.8.3 | Now depends on echo-utils 0.4.0
44
+ | 0.12.2 | 0.7.0 | 0.9.4 | 0.15.0 | 0.17.3 | 0.10.2 | 0.34.0 | 0.19.3 | 0.8.3 | Fixed a bug where echo-maps failed to build / start
45
+ | 0.12.1 | 0.7.0 | 0.9.4 | 0.15.0 | 0.17.3 | 0.10.2 | 0.34.0 | 0.19.3 | 0.8.3 |
46
+ | 0.12.0 | 0.7.0 | 0.9.4 | 0.15.0 | 0.17.2 | 0.10.1 | 0.34.0 | 0.19.3 | 0.8.3 | EchoCli is an ESM module now
47
+ | 0.11.2 | 0.7.0 | 0.9.4 | 0.15.0 | 0.17.2 | 0.10.1 | 0.34.0 | 0.19.3 | 0.8.3 |
48
+ | 0.11.1 | 0.7.0 | 0.9.4 | 0.15.0 | 0.17.2 | 0.10.0 | 0.34.0 | 0.19.3 | 0.8.3 |
49
+ | 0.11.0 | 0.7.0 | 0.9.4 | 0.15.0 | 0.17.0 | 0.10.0 | 0.34.0 | 0.19.3 | 0.8.3 |
50
50
 
51
51
  ## Change log
52
52
 
File without changes
@@ -0,0 +1,3 @@
1
+ * text=auto
2
+ *.sh text eol=lf
3
+ .env text eol=lf
@@ -0,0 +1,12 @@
1
+ [
2
+ {
3
+ "name": "Test App",
4
+ "key": "test-app",
5
+ "shortName": "testapp",
6
+ "fileUri": "module-url-placeholder",
7
+ "path": "/testapp",
8
+ "version": "0.0.1",
9
+ "private": false,
10
+ "requireRef": "echoDepLoader"
11
+ }
12
+ ]
@@ -0,0 +1,136 @@
1
+
2
+ (function(l, r) { if (!l || l.getElementById('livereloadscript')) return; r = l.createElement('script'); r.async = 1; r.src = '//' + (self.location.host || 'localhost').split(':')[0] + ':35729/livereload.js?snipver=1'; r.id = 'livereloadscript'; l.getElementsByTagName('head')[0].appendChild(r) })(self.document);
3
+ (function(g,f){function define(d, f){typeof document !== "undefined" && (document.currentScript.module = {});f(document.currentScript.module, ...d.filter((d) => d !== "exports").map(window["echoDepLoader"]));}define.amd = !0;typeof exports==='object'&&typeof module!=='undefined'?f(exports,require('@equinor/echo-core'),require('react')):typeof define==='function'&&define.amd?define(['exports','@equinor/echo-core','react'],f):(g=typeof globalThis!=='undefined'?globalThis:g||self,f(g["echo-module"]={},g[">= 0"]["9"]["8 < 0"]["10"]["0"],g[">= 17"]["0"]["2"]));})(this,(function(exports,EchoCore,React){'use strict';/******************************************************************************
4
+ Copyright (c) Microsoft Corporation.
5
+
6
+ Permission to use, copy, modify, and/or distribute this software for any
7
+ purpose with or without fee is hereby granted.
8
+
9
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
10
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
11
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
12
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
13
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
14
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
15
+ PERFORMANCE OF THIS SOFTWARE.
16
+ ***************************************************************************** */
17
+ /* global Reflect, Promise, SuppressedError, Symbol */
18
+
19
+
20
+ function __awaiter(thisArg, _arguments, P, generator) {
21
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
22
+ return new (P || (P = Promise))(function (resolve, reject) {
23
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
24
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
25
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
26
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
27
+ });
28
+ }
29
+
30
+ function __generator(thisArg, body) {
31
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
32
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
33
+ function verb(n) { return function (v) { return step([n, v]); }; }
34
+ function step(op) {
35
+ if (f) throw new TypeError("Generator is already executing.");
36
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
37
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
38
+ if (y = 0, t) op = [op[0] & 2, t.value];
39
+ switch (op[0]) {
40
+ case 0: case 1: t = op; break;
41
+ case 4: _.label++; return { value: op[1], done: false };
42
+ case 5: _.label++; y = op[1]; op = [0]; continue;
43
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
44
+ default:
45
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
46
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
47
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
48
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
49
+ if (t[2]) _.ops.pop();
50
+ _.trys.pop(); continue;
51
+ }
52
+ op = body.call(thisArg, _);
53
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
54
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
55
+ }
56
+ }
57
+
58
+ function __read(o, n) {
59
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
60
+ if (!m) return o;
61
+ var i = m.call(o), r, ar = [], e;
62
+ try {
63
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
64
+ }
65
+ catch (error) { e = { error: error }; }
66
+ finally {
67
+ try {
68
+ if (r && !r.done && (m = i["return"])) m.call(i);
69
+ }
70
+ finally { if (e) throw e.error; }
71
+ }
72
+ return ar;
73
+ }
74
+
75
+ typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
76
+ var e = new Error(message);
77
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
78
+ };function styleInject(css, ref) {
79
+ if ( ref === void 0 ) ref = {};
80
+ var insertAt = ref.insertAt;
81
+
82
+ if (typeof document === 'undefined') { return; }
83
+
84
+ var head = document.head || document.getElementsByTagName('head')[0];
85
+ var style = document.createElement('style');
86
+ style.type = 'text/css';
87
+
88
+ if (insertAt === 'top') {
89
+ if (head.firstChild) {
90
+ head.insertBefore(style, head.firstChild);
91
+ } else {
92
+ head.appendChild(style);
93
+ }
94
+ } else {
95
+ head.appendChild(style);
96
+ }
97
+
98
+ if (style.styleSheet) {
99
+ style.styleSheet.cssText = css;
100
+ } else {
101
+ style.appendChild(document.createTextNode(css));
102
+ }
103
+ }var css_248z = ".app-module_wrapper__-eXbe{margin-top:150px;padding:16px;text-align:center}";
104
+ var style = {"wrapper":"app-module_wrapper__-eXbe"};
105
+ styleInject(css_248z);var baseApiUrl = EchoCore.EchoEnv.env().REACT_APP_API_URL;
106
+ function getVersion() {
107
+ return __awaiter(this, void 0, void 0, function () {
108
+ var data;
109
+ return __generator(this, function (_a) {
110
+ switch (_a.label) {
111
+ case 0:
112
+ return [4, EchoCore.EchoClient.fetch("".concat(baseApiUrl, "/Version"))];
113
+ case 1:
114
+ data = _a.sent();
115
+ return [4, data.text()];
116
+ case 2:
117
+ return [2, _a.sent()];
118
+ }
119
+ });
120
+ });
121
+ }
122
+ var App = function App() {
123
+ var _a = __read(React.useState(''), 2),
124
+ echoVersion = _a[0],
125
+ setEchoVersion = _a[1];
126
+ React.useEffect(function () {
127
+ getVersion().then(function (version) {
128
+ setEchoVersion(version);
129
+ });
130
+ });
131
+ return /*#__PURE__*/React.createElement("div", {
132
+ className: style.wrapper
133
+ }, /*#__PURE__*/React.createElement("h1", null, "Echo App Template"), /*#__PURE__*/React.createElement("p", null, "This is an app template for test Echo Applications"), /*#__PURE__*/React.createElement("h6", null, "Echo v", echoVersion));
134
+ };function setup(api) {
135
+ api.registerApp(App);
136
+ }exports.setup=setup;}));//# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../node_modules/style-inject/dist/style-inject.es.js","../src/app.tsx","../src/index.ts"],"sourcesContent":["function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n","import EchoCore, { EchoEnv } from '@equinor/echo-core';\nimport React, { useEffect, useState } from 'react';\nimport style from './app.module.css';\n\nconst baseApiUrl = EchoEnv.env().REACT_APP_API_URL;\n\nasync function getVersion(): Promise<string> {\n const data = await EchoCore.EchoClient.fetch(`${baseApiUrl}/Version`);\n return await data.text();\n}\n\nconst App: React.FC = (): JSX.Element => {\n const [echoVersion, setEchoVersion] = useState('');\n\n useEffect(() => {\n getVersion().then((version: string) => {\n setEchoVersion(version);\n });\n });\n\n return (\n <div className={style.wrapper}>\n <h1>Echo App Template</h1>\n <p>This is an app template for test Echo Applications</p>\n <h6>Echo v{echoVersion}</h6>\n </div>\n );\n};\n\nexport default App;\n","import { EchoModuleApi } from '@equinor/echo-core';\nimport App from './app';\n\nexport function setup(api: EchoModuleApi): void {\n api.registerApp(App);\n}\n"],"names":["baseApiUrl","EchoEnv","env","REACT_APP_API_URL","getVersion","EchoCore","EchoClient","fetch","concat","data","_a","sent","text","App","__read","useState","echoVersion","setEchoVersion","useEffect","then","version","React","createElement","className","style","wrapper","setup","api","registerApp"],"mappings":"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","x_google_ignoreList":[0]}
@@ -0,0 +1,22 @@
1
+ {
2
+ "bundler": "rollup",
3
+ "manifest": {
4
+ "name": "Test App",
5
+ "key": "test-app",
6
+ "shortName": "testapp",
7
+ "path": "/testapp",
8
+ "description": "",
9
+ "private": false,
10
+ "fileUri": "module-url-placeholder"
11
+ },
12
+ "server": {
13
+ "contentBase": "/build",
14
+ "port": 3000,
15
+ "open": true,
16
+ "host": "localhost",
17
+ "logging": "none"
18
+ },
19
+ "devMiddleware": {
20
+ "stats": "errors-warnings"
21
+ }
22
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "moduleId": "<<------Insert moduleId here ------>>"
3
+ }
@@ -0,0 +1,54 @@
1
+ # Script copied from echopedia to make environment variables work in an app service. Using build folder instead of public folder.
2
+ # The content of the .gitattributes file is needed so this script will work for both linux and windows.
3
+
4
+ #!/bin/bash
5
+
6
+ #https://www.freecodecamp.org/news/how-to-implement-runtime-environment-variables-with-create-react-app-docker-and-nginx-7f9d42a91d70/
7
+ #
8
+
9
+ # Recreate config file
10
+ rm -rf ./env-config.js
11
+ touch ./env-config.js
12
+
13
+ echo "creating env-config.js"
14
+
15
+ # Add assignment
16
+ echo "window._env_ = {" >> ./env-config.js
17
+
18
+ # Read each line in .env file
19
+ # Each line represents key=value pairs
20
+ while read -r line || [[ -n "$line" ]];
21
+ do
22
+ #only process lines containting =
23
+ if [[ $line == *"="* ]]; then
24
+
25
+ # Split env variables by character `=`
26
+ if printf '%s\n' "$line" | grep -q -e '='; then
27
+ varname=$(printf '%s\n' "$line" | sed -e 's/=.*//')
28
+ varvalue=$(printf '%s\n' "$line" | sed -e 's/^[^=]*=//')
29
+ fi
30
+
31
+ # Read value of current variable if exists as Environment variable
32
+ value=$(printf '%s\n' "${!varname}")
33
+ # Otherwise use value from .env file
34
+ [[ -z $value ]] && value=${varvalue}
35
+
36
+ # Append configuration property to JS file
37
+ echo " $varname: \"$value\"," >> ./env-config.js
38
+
39
+ #print variables
40
+ valueObfuscated=$(printf '%s' "$value" | cut -c 1-3)
41
+ #echo " $varname: \"$value\"," #print the environment variables
42
+ echo " $varname=\"$valueObfuscated***\"," #print the environment variables obfuscated
43
+ fi
44
+ done < .env
45
+
46
+ echo "}" >> ./env-config.js
47
+
48
+ #if directory exists, copy to public folder. Needed for dev enironment (npm start)
49
+ if [ -d "build" ]; then
50
+ rm -rf ./build/env-config.js
51
+ cp ./env-config.js ./build/env-config.js
52
+ fi
53
+
54
+ echo "done creating env-config.js"