@equinor/fusion-framework-cli 0.1.6 → 0.1.7
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.
|
@@ -4,15 +4,12 @@
|
|
|
4
4
|
<head>
|
|
5
5
|
<meta charset="UTF-8" />
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
|
-
<title>
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
<script type="module" crossorigin src="/assets/index.fc43a44e.js"></script>
|
|
7
|
+
<title>Fusion Framework Dev Portal</title>
|
|
8
|
+
<script type="module" crossorigin src="/assets/index.1356b49a.js"></script>
|
|
11
9
|
|
|
12
10
|
<body>
|
|
13
11
|
<div id="root"></div>
|
|
14
12
|
|
|
15
|
-
|
|
16
13
|
</body>
|
|
17
14
|
|
|
18
15
|
</html>
|
package/bin/serve.js
CHANGED
|
@@ -8,6 +8,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
10
|
import { createServer } from 'vite';
|
|
11
|
+
import { readFileSync } from 'fs';
|
|
11
12
|
import express from 'express';
|
|
12
13
|
import dns from 'dns';
|
|
13
14
|
dns.setDefaultResultOrder('verbatim');
|
|
@@ -22,9 +23,11 @@ export const server = (config) => __awaiter(void 0, void 0, void 0, function* ()
|
|
|
22
23
|
const port = (_b = (_a = config.server) === null || _a === void 0 ? void 0 : _a.port) !== null && _b !== void 0 ? _b : 3000;
|
|
23
24
|
const vite = yield createServer(config);
|
|
24
25
|
app.use(vite.middlewares);
|
|
25
|
-
app.use(express.static(resolveRelativePath('dev-portal')));
|
|
26
|
-
app.use('*', (
|
|
27
|
-
|
|
26
|
+
app.use(express.static(resolveRelativePath('dev-portal'), { index: false }));
|
|
27
|
+
app.use('*', (req, res) => __awaiter(void 0, void 0, void 0, function* () {
|
|
28
|
+
const htmlRaw = readFileSync(resolveRelativePath('dev-portal/index.html'), 'utf-8');
|
|
29
|
+
const html = yield vite.transformIndexHtml(req.url, htmlRaw);
|
|
30
|
+
res.send(html);
|
|
28
31
|
}));
|
|
29
32
|
app.listen(port);
|
|
30
33
|
spinner.succeed(`dev-server started on: ${kleur.underline().green(['http://localhost', port].join(':'))}`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@equinor/fusion-framework-cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.7",
|
|
4
4
|
"keywords": [
|
|
5
5
|
"Fusion",
|
|
6
6
|
"Fusion Framework",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"ora": "^6.1.2"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@equinor/fusion-framework-react": "^1.3.
|
|
34
|
+
"@equinor/fusion-framework-react": "^1.3.6",
|
|
35
35
|
"@equinor/fusion-react-progress-indicator": "^0.1.5",
|
|
36
36
|
"@equinor/fusion-react-styles": "^0.5.5",
|
|
37
37
|
"@types/express": "^4.17.14",
|
|
@@ -43,5 +43,5 @@
|
|
|
43
43
|
"typescript": "^4.8.4",
|
|
44
44
|
"vite": "^3.2.0"
|
|
45
45
|
},
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "9cce61b38374a86ac2a74344e12af461b78aea5c"
|
|
47
47
|
}
|