@equinor/echo-cli 1.0.0-beta-2 → 1.0.0-beta-4

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 (71) hide show
  1. package/echo-dev-host/.vscode/settings.json +5 -0
  2. package/{lib/echo-client → echo-dev-host}/README.md +7 -5
  3. package/{lib/echo-client → echo-dev-host}/package-lock.json +2 -2
  4. package/{lib/echo-client → echo-dev-host}/src/app.tsx +1 -1
  5. package/{lib/echo-client → echo-dev-host}/webpack.config.js +4 -4
  6. package/lib/config/common/initOptions.js +1 -1
  7. package/lib/config/common/initOptions.js.map +1 -1
  8. package/lib/{echo-build-client.d.ts → echo-build-dev-host.d.ts} +1 -1
  9. package/lib/echo-build-dev-host.js +35 -0
  10. package/lib/echo-build-dev-host.js.map +1 -0
  11. package/lib/echo-dev-host/.env +29 -0
  12. package/lib/echo-dev-host/README.md +46 -0
  13. package/lib/echo-dev-host/babel.config.js +11 -0
  14. package/lib/echo-dev-host/env.sh +51 -0
  15. package/lib/echo-dev-host/jest.config.js +21 -0
  16. package/lib/echo-dev-host/package-lock.json +12457 -0
  17. package/lib/echo-dev-host/package.json +80 -0
  18. package/lib/echo-dev-host/public/env-config.js +17 -0
  19. package/{client → lib/echo-dev-host/public}/index.html +1 -1
  20. package/lib/echo-dev-host/src/api/api-plants.ts +22 -0
  21. package/lib/echo-dev-host/src/app.css +12 -0
  22. package/lib/echo-dev-host/src/app.tsx +43 -0
  23. package/lib/echo-dev-host/src/components/Home/Home.tsx +23 -0
  24. package/lib/echo-dev-host/src/components/Home/home.module.css +38 -0
  25. package/lib/echo-dev-host/src/components/legend.tsx +3 -0
  26. package/lib/echo-dev-host/src/index.tsx +90 -0
  27. package/lib/echo-dev-host/src/setupTests.ts +25 -0
  28. package/lib/echo-dev-host/src/utils/plants.test.ts +33 -0
  29. package/lib/echo-dev-host/src/utils/plants.ts +12 -0
  30. package/lib/echo-dev-host/src/utils/setupSkipAuth.ts +43 -0
  31. package/lib/echo-dev-host/tsconfig.json +21 -0
  32. package/lib/echo-dev-host/webpack.config.js +138 -0
  33. package/package.json +4 -4
  34. package/client/env-config.js +0 -1
  35. package/client/main.echo.bundle.js +0 -3
  36. package/client/main.echo.bundle.js.LICENSE.txt +0 -133
  37. package/client/main.echo.bundle.js.map +0 -1
  38. package/client/vendors-node_modules_babel_polyfill_lib_index_js-node_modules_react-dom_client_js-node_module-5b8715.echo.bundle.js +0 -3
  39. package/client/vendors-node_modules_babel_polyfill_lib_index_js-node_modules_react-dom_client_js-node_module-5b8715.echo.bundle.js.LICENSE.txt +0 -8453
  40. package/client/vendors-node_modules_babel_polyfill_lib_index_js-node_modules_react-dom_client_js-node_module-5b8715.echo.bundle.js.map +0 -1
  41. package/lib/echo-build-client.js +0 -37
  42. package/lib/echo-build-client.js.map +0 -1
  43. package/lib/echo-client/.links.json +0 -3
  44. package/lib/echo-client/build/env-config.js +0 -1
  45. package/lib/echo-client/public/echoModuleManifest.json +0 -30
  46. package/lib/echo-client/public/index.css +0 -60
  47. package/lib/echo-client/public/module-bundle-demo1.js +0 -250
  48. package/lib/echo-client/public/module-bundle-demo2.js +0 -251
  49. package/lib/echo-client/public/module-bundle-demo3.js +0 -251
  50. /package/{lib/echo-client → echo-dev-host}/.env +0 -0
  51. /package/{lib/echo-client → echo-dev-host}/babel.config.js +0 -0
  52. /package/{lib/echo-client → echo-dev-host}/env.sh +0 -0
  53. /package/{lib/echo-client → echo-dev-host}/jest.config.js +0 -0
  54. /package/{lib/echo-client → echo-dev-host}/package.json +0 -0
  55. /package/{lib/echo-client → echo-dev-host}/public/env-config.js +0 -0
  56. /package/{client → echo-dev-host/public}/index.css +0 -0
  57. /package/{lib/echo-client → echo-dev-host}/public/index.html +0 -0
  58. /package/{lib/echo-client → echo-dev-host}/src/api/api-plants.ts +0 -0
  59. /package/{lib/echo-client → echo-dev-host}/src/app.css +0 -0
  60. /package/{lib/echo-client → echo-dev-host}/src/components/Home/Home.tsx +0 -0
  61. /package/{lib/echo-client → echo-dev-host}/src/components/Home/home.module.css +0 -0
  62. /package/{lib/echo-client → echo-dev-host}/src/components/legend.tsx +0 -0
  63. /package/{lib/echo-client → echo-dev-host}/src/images/frontpage-brand-placeholder.jpg +0 -0
  64. /package/{lib/echo-client → echo-dev-host}/src/index.tsx +0 -0
  65. /package/{lib/echo-client → echo-dev-host}/src/setupTests.ts +0 -0
  66. /package/{lib/echo-client → echo-dev-host}/src/utils/plants.test.ts +0 -0
  67. /package/{lib/echo-client → echo-dev-host}/src/utils/plants.ts +0 -0
  68. /package/{lib/echo-client → echo-dev-host}/src/utils/setupSkipAuth.ts +0 -0
  69. /package/{lib/echo-client → echo-dev-host}/tsconfig.json +0 -0
  70. /package/lib/{echo-client/build → echo-dev-host/public}/index.css +0 -0
  71. /package/{client/d2d97a9feca22f12a8c8c7413d7867ac.jpg → lib/echo-dev-host/src/images/frontpage-brand-placeholder.jpg} +0 -0
@@ -1,251 +0,0 @@
1
- (function (g, f) {
2
- function define(d, f) {
3
- typeof document !== 'undefined' && (document.currentScript.module = {});
4
- f(document.currentScript.module, ...d.filter((d) => d !== 'exports').map(window.app));
5
- }
6
- define.amd = !0;
7
- typeof exports === 'object' && typeof module !== 'undefined'
8
- ? f(exports, require('@equinor/echo-core'), require('react'))
9
- : typeof define === 'function' && define.amd
10
- ? define(['exports', '@equinor/echo-core', 'react'], f)
11
- : ((g = typeof globalThis !== 'undefined' ? globalThis : g || self),
12
- f((g['echo-module'] = {}), g['*'], g['^17']['0']['2']));
13
- })(this, function (exports, EchoCore, React) {
14
- ('use strict');
15
- function _interopDefaultLegacy(e) {
16
- return e && typeof e === 'object' && 'default' in e ? e : { default: e };
17
- }
18
- var EchoCore__default = /*#__PURE__*/ _interopDefaultLegacy(EchoCore);
19
- var React__default = /*#__PURE__*/ _interopDefaultLegacy(React);
20
- function __awaiter(thisArg, _arguments, P, generator) {
21
- function adopt(value) {
22
- return value instanceof P
23
- ? value
24
- : new P(function (resolve) {
25
- resolve(value);
26
- });
27
- }
28
- return new (P || (P = Promise))(function (resolve, reject) {
29
- function fulfilled(value) {
30
- try {
31
- step(generator.next(value));
32
- } catch (e) {
33
- reject(e);
34
- }
35
- }
36
- function rejected(value) {
37
- try {
38
- step(generator['throw'](value));
39
- } catch (e) {
40
- reject(e);
41
- }
42
- }
43
- function step(result) {
44
- result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
45
- }
46
- step((generator = generator.apply(thisArg, _arguments || [])).next());
47
- });
48
- }
49
- function __generator(thisArg, body) {
50
- var _ = {
51
- label: 0,
52
- sent: function () {
53
- if (t[0] & 1) throw t[1];
54
- return t[1];
55
- },
56
- trys: [],
57
- ops: []
58
- },
59
- f,
60
- y,
61
- t,
62
- g;
63
- return (
64
- (g = { next: verb(0), throw: verb(1), return: verb(2) }),
65
- typeof Symbol === 'function' &&
66
- (g[Symbol.iterator] = function () {
67
- return this;
68
- }),
69
- g
70
- );
71
- function verb(n) {
72
- return function (v) {
73
- return step([n, v]);
74
- };
75
- }
76
- function step(op) {
77
- if (f) throw new TypeError('Generator is already executing.');
78
- while (_)
79
- try {
80
- if (
81
- ((f = 1),
82
- y &&
83
- (t =
84
- op[0] & 2
85
- ? y['return']
86
- : op[0]
87
- ? y['throw'] || ((t = y['return']) && t.call(y), 0)
88
- : y.next) &&
89
- !(t = t.call(y, op[1])).done)
90
- )
91
- return t;
92
- if (((y = 0), t)) op = [op[0] & 2, t.value];
93
- switch (op[0]) {
94
- case 0:
95
- case 1:
96
- t = op;
97
- break;
98
- case 4:
99
- _.label++;
100
- return { value: op[1], done: false };
101
- case 5:
102
- _.label++;
103
- y = op[1];
104
- op = [0];
105
- continue;
106
- case 7:
107
- op = _.ops.pop();
108
- _.trys.pop();
109
- continue;
110
- default:
111
- if (
112
- !((t = _.trys), (t = t.length > 0 && t[t.length - 1])) &&
113
- (op[0] === 6 || op[0] === 2)
114
- ) {
115
- _ = 0;
116
- continue;
117
- }
118
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
119
- _.label = op[1];
120
- break;
121
- }
122
- if (op[0] === 6 && _.label < t[1]) {
123
- _.label = t[1];
124
- t = op;
125
- break;
126
- }
127
- if (t && _.label < t[2]) {
128
- _.label = t[2];
129
- _.ops.push(op);
130
- break;
131
- }
132
- if (t[2]) _.ops.pop();
133
- _.trys.pop();
134
- continue;
135
- }
136
- op = body.call(thisArg, _);
137
- } catch (e) {
138
- op = [6, e];
139
- y = 0;
140
- } finally {
141
- f = t = 0;
142
- }
143
- if (op[0] & 5) throw op[1];
144
- return { value: op[0] ? op[1] : void 0, done: true };
145
- }
146
- }
147
- function __read(o, n) {
148
- var m = typeof Symbol === 'function' && o[Symbol.iterator];
149
- if (!m) return o;
150
- var i = m.call(o),
151
- r,
152
- ar = [],
153
- e;
154
- try {
155
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
156
- } catch (error) {
157
- e = { error: error };
158
- } finally {
159
- try {
160
- if (r && !r.done && (m = i['return'])) m.call(i);
161
- } finally {
162
- if (e) throw e.error;
163
- }
164
- }
165
- return ar;
166
- }
167
- function styleInject(css, ref) {
168
- if (ref === void 0) ref = {};
169
- var insertAt = ref.insertAt;
170
-
171
- if (!css || typeof document === 'undefined') {
172
- return;
173
- }
174
-
175
- var head = document.head || document.getElementsByTagName('head')[0];
176
- var style = document.createElement('style');
177
- style.type = 'text/css';
178
-
179
- if (insertAt === 'top') {
180
- if (head.firstChild) {
181
- head.insertBefore(style, head.firstChild);
182
- } else {
183
- head.appendChild(style);
184
- }
185
- } else {
186
- head.appendChild(style);
187
- }
188
-
189
- if (style.styleSheet) {
190
- style.styleSheet.cssText = css;
191
- } else {
192
- style.appendChild(document.createTextNode(css));
193
- }
194
- }
195
- var css_248z = '.app-module_wrapper__WV5yl{margin-top:150px;padding:16px;text-align:center}';
196
- var style = { wrapper: 'app-module_wrapper__WV5yl' };
197
- styleInject(css_248z);
198
- var baseApiUrl = EchoCore.EchoEnv.env().REACT_APP_API_URL;
199
-
200
- function getVersion() {
201
- return __awaiter(this, void 0, void 0, function () {
202
- var data;
203
- return __generator(this, function (_a) {
204
- switch (_a.label) {
205
- case 0:
206
- return [4, EchoCore__default['default'].EchoClient.fetch(baseApiUrl + '/Version')];
207
-
208
- case 1:
209
- data = _a.sent();
210
- return [4, data.text()];
211
-
212
- case 2:
213
- return [2, _a.sent()];
214
- }
215
- });
216
- });
217
- }
218
-
219
- var App = function App() {
220
- var _a = __read(React.useState(''), 2),
221
- echoVersion = _a[0],
222
- setEchoVersion = _a[1];
223
-
224
- React.useEffect(function () {
225
- getVersion().then(function (version) {
226
- setEchoVersion(version);
227
- });
228
- });
229
- return /*#__PURE__*/ React__default['default'].createElement(
230
- 'div',
231
- {
232
- className: style.wrapper
233
- },
234
- /*#__PURE__*/ React__default['default'].createElement('h1', null, 'Echo Settings'),
235
- /*#__PURE__*/ React__default['default'].createElement(
236
- 'p',
237
- null,
238
- 'This is an app template for Echo Applications'
239
- ),
240
- /*#__PURE__*/ React__default['default'].createElement('h6', null, 'Echo v', echoVersion)
241
- );
242
- };
243
- const panels = [{ panelType: 'left', component: App, key: 'demo3', icon: 'settings', label: 'Demo3' }];
244
-
245
- function setup(api) {
246
- api.registerApp(App, { params: '', icon: 'settings', panels });
247
- }
248
-
249
- exports.setup = setup;
250
- Object.defineProperty(exports, '__esModule', { value: true });
251
- });
File without changes
File without changes
File without changes
File without changes
File without changes