@explorable-viz/fluid 0.7.31 → 0.7.33
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/dist/fluid/puppeteeer.js +36 -0
- package/package.json +3 -2
@@ -0,0 +1,36 @@
|
|
1
|
+
const express = require('express');
|
2
|
+
const serve = require('express-static');
|
3
|
+
require('http-shutdown').extend();
|
4
|
+
|
5
|
+
const app = express();
|
6
|
+
|
7
|
+
const root = __dirname + '/dist/' + process.argv[3];
|
8
|
+
app.use(serve(root));
|
9
|
+
|
10
|
+
const server = app.listen(8080, function() {
|
11
|
+
console.log("Serving content from " + root);
|
12
|
+
}).withShutdown();
|
13
|
+
|
14
|
+
(async () => {
|
15
|
+
try {
|
16
|
+
const module = process.argv[2]
|
17
|
+
console.log('Loading Puppeteer test module:', module);
|
18
|
+
import(module).then(({ main }) => {
|
19
|
+
main().then(serverDown);
|
20
|
+
}).catch(err => {
|
21
|
+
console.error("Failed to load PureScript output:", err);
|
22
|
+
});
|
23
|
+
} catch (error) {
|
24
|
+
console.error('Error:', error);
|
25
|
+
}
|
26
|
+
})();
|
27
|
+
|
28
|
+
function serverDown() {
|
29
|
+
console.log('Shutting down server')
|
30
|
+
server.shutdown(function(err) {
|
31
|
+
if (err) {
|
32
|
+
return console.log('shutdown failed', err.message);
|
33
|
+
}
|
34
|
+
console.log('Everything is cleanly shut down.');
|
35
|
+
});
|
36
|
+
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@explorable-viz/fluid",
|
3
|
-
"version": "0.7.
|
3
|
+
"version": "0.7.33",
|
4
4
|
"description": "Fluid is an experimental programming language which integrates a bidirectional dynamic analysis to connect outputs to data sources in a fine-grained way. Fluid is implemented in PureScript and runs in the browser.",
|
5
5
|
"main": "index.js",
|
6
6
|
"repository": {
|
@@ -77,7 +77,8 @@
|
|
77
77
|
"typescript": "^5.5.3"
|
78
78
|
},
|
79
79
|
"bin": {
|
80
|
-
"fluid": "./dist/fluid/fluid.mjs"
|
80
|
+
"fluid": "./dist/fluid/fluid.mjs",
|
81
|
+
"puppeteer": "dist/fluid/puppeteer.js"
|
81
82
|
},
|
82
83
|
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
|
83
84
|
}
|