@data-fair/dev-server 1.7.2 → 1.7.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/dist/200.html +2 -2
- package/dist/_nuxt/0a3def6.js +8 -0
- package/dist/_nuxt/LICENSES +20 -20
- package/dist/_nuxt/{bcc65de.js → f6f871d.js} +1 -1
- package/dist/index.html +2 -2
- package/package.json +2 -2
- package/server/app.js +13 -2
- package/dist/_nuxt/5d119d6.js +0 -8
package/dist/_nuxt/LICENSES
CHANGED
|
@@ -1,23 +1,3 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* vue-router v3.5.3
|
|
3
|
-
* (c) 2021 Evan You
|
|
4
|
-
* @license MIT
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
/*!
|
|
8
|
-
* Vue.js v2.6.14
|
|
9
|
-
* (c) 2014-2021 Evan You
|
|
10
|
-
* Released under the MIT License.
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
/*!
|
|
14
|
-
* cookie
|
|
15
|
-
* Copyright(c) 2012-2014 Roman Shtylman
|
|
16
|
-
* Copyright(c) 2015 Douglas Christopher Wilson
|
|
17
|
-
* MIT Licensed
|
|
18
|
-
*/
|
|
19
|
-
|
|
20
|
-
|
|
21
1
|
/*!
|
|
22
2
|
Based on ndef.parser, by Raphael Graf(r@undefined.ch)
|
|
23
3
|
http://www.undefined.ch/mparser/index.html
|
|
@@ -56,6 +36,26 @@ and limitations under the License.
|
|
|
56
36
|
*/
|
|
57
37
|
|
|
58
38
|
|
|
39
|
+
/*!
|
|
40
|
+
* vue-router v3.5.3
|
|
41
|
+
* (c) 2021 Evan You
|
|
42
|
+
* @license MIT
|
|
43
|
+
*/
|
|
44
|
+
|
|
45
|
+
/*!
|
|
46
|
+
* Vue.js v2.6.14
|
|
47
|
+
* (c) 2014-2021 Evan You
|
|
48
|
+
* Released under the MIT License.
|
|
49
|
+
*/
|
|
50
|
+
|
|
51
|
+
/*!
|
|
52
|
+
* cookie
|
|
53
|
+
* Copyright(c) 2012-2014 Roman Shtylman
|
|
54
|
+
* Copyright(c) 2015 Douglas Christopher Wilson
|
|
55
|
+
* MIT Licensed
|
|
56
|
+
*/
|
|
57
|
+
|
|
58
|
+
|
|
59
59
|
/*!
|
|
60
60
|
* vue-client-only v0.0.0-semantic-release
|
|
61
61
|
* (c) 2021-present egoist <0x142857@gmail.com>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e){function r(data){for(var r,n,f=data[0],l=data[1],d=data[2],i=0,h=[];i<f.length;i++)n=f[i],Object.prototype.hasOwnProperty.call(o,n)&&o[n]&&h.push(o[n][0]),o[n]=0;for(r in l)Object.prototype.hasOwnProperty.call(l,r)&&(e[r]=l[r]);for(v&&v(data);h.length;)h.shift()();return c.push.apply(c,d||[]),t()}function t(){for(var e,i=0;i<c.length;i++){for(var r=c[i],t=!0,n=1;n<r.length;n++){var l=r[n];0!==o[l]&&(t=!1)}t&&(c.splice(i--,1),e=f(f.s=r[0]))}return e}var n={},o={7:0},c=[];function f(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,f),t.l=!0,t.exports}f.e=function(e){var r=[],t=o[e];if(0!==t)if(t)r.push(t[2]);else{var n=new Promise((function(r,n){t=o[e]=[r,n]}));r.push(t[2]=n);var c,script=document.createElement("script");script.charset="utf-8",script.timeout=120,f.nc&&script.setAttribute("nonce",f.nc),script.src=function(e){return f.p+""+{0:"b68e30f",1:"553dac1",4:"d6dd90c",5:"898243c",6:"9363572",9:"
|
|
1
|
+
!function(e){function r(data){for(var r,n,f=data[0],l=data[1],d=data[2],i=0,h=[];i<f.length;i++)n=f[i],Object.prototype.hasOwnProperty.call(o,n)&&o[n]&&h.push(o[n][0]),o[n]=0;for(r in l)Object.prototype.hasOwnProperty.call(l,r)&&(e[r]=l[r]);for(v&&v(data);h.length;)h.shift()();return c.push.apply(c,d||[]),t()}function t(){for(var e,i=0;i<c.length;i++){for(var r=c[i],t=!0,n=1;n<r.length;n++){var l=r[n];0!==o[l]&&(t=!1)}t&&(c.splice(i--,1),e=f(f.s=r[0]))}return e}var n={},o={7:0},c=[];function f(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,f),t.l=!0,t.exports}f.e=function(e){var r=[],t=o[e];if(0!==t)if(t)r.push(t[2]);else{var n=new Promise((function(r,n){t=o[e]=[r,n]}));r.push(t[2]=n);var c,script=document.createElement("script");script.charset="utf-8",script.timeout=120,f.nc&&script.setAttribute("nonce",f.nc),script.src=function(e){return f.p+""+{0:"b68e30f",1:"553dac1",4:"d6dd90c",5:"898243c",6:"9363572",9:"0a3def6",10:"4f0f04d"}[e]+".js"}(e);var l=new Error;c=function(r){script.onerror=script.onload=null,clearTimeout(d);var t=o[e];if(0!==t){if(t){var n=r&&("load"===r.type?"missing":r.type),c=r&&r.target&&r.target.src;l.message="Loading chunk "+e+" failed.\n("+n+": "+c+")",l.name="ChunkLoadError",l.type=n,l.request=c,t[1](l)}o[e]=void 0}};var d=setTimeout((function(){c({type:"timeout",target:script})}),12e4);script.onerror=script.onload=c,document.head.appendChild(script)}return Promise.all(r)},f.m=e,f.c=n,f.d=function(e,r,t){f.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},f.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},f.t=function(e,r){if(1&r&&(e=f(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(f.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)f.d(t,n,function(r){return e[r]}.bind(null,n));return t},f.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return f.d(r,"a",r),r},f.o=function(object,e){return Object.prototype.hasOwnProperty.call(object,e)},f.p="/_nuxt/",f.oe=function(e){throw console.error(e),e};var l=window.webpackJsonp=window.webpackJsonp||[],d=l.push.bind(l);l.push=r,l=l.slice();for(var i=0;i<l.length;i++)r(l[i]);var v=d;t()}([]);
|
package/dist/index.html
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<!doctype html>
|
|
2
2
|
<html>
|
|
3
3
|
<head>
|
|
4
|
-
<title>DataFair - Dev server</title><meta data-n-head="1" charset="utf-8"><meta data-n-head="1" name="viewport" content="width=device-width,initial-scale=1"><meta data-n-head="1" data-hid="application" name="application-name" content="DataFair - Dev server"><meta data-n-head="1" data-hid="description" name="description" content="A development server for optimal development experience of data-fair applications."><meta data-n-head="1" data-hid="robots" name="robots" content="noindex"><link rel="preload" href="/_nuxt/
|
|
4
|
+
<title>DataFair - Dev server</title><meta data-n-head="1" charset="utf-8"><meta data-n-head="1" name="viewport" content="width=device-width,initial-scale=1"><meta data-n-head="1" data-hid="application" name="application-name" content="DataFair - Dev server"><meta data-n-head="1" data-hid="description" name="description" content="A development server for optimal development experience of data-fair applications."><meta data-n-head="1" data-hid="robots" name="robots" content="noindex"><link rel="preload" href="/_nuxt/f6f871d.js" as="script"><link rel="preload" href="/_nuxt/0c5f45a.js" as="script"><link rel="preload" href="/_nuxt/df98766.js" as="script"><link rel="preload" href="/_nuxt/b1b5217.js" as="script">
|
|
5
5
|
</head>
|
|
6
6
|
<body>
|
|
7
7
|
<div id="__nuxt"><style>#nuxt-loading{background:#fff;visibility:hidden;opacity:0;position:absolute;left:0;right:0;top:0;bottom:0;display:flex;justify-content:center;align-items:center;flex-direction:column;animation:nuxtLoadingIn 10s ease;-webkit-animation:nuxtLoadingIn 10s ease;animation-fill-mode:forwards;overflow:hidden}@keyframes nuxtLoadingIn{0%{visibility:hidden;opacity:0}20%{visibility:visible;opacity:0}100%{visibility:visible;opacity:1}}@-webkit-keyframes nuxtLoadingIn{0%{visibility:hidden;opacity:0}20%{visibility:visible;opacity:0}100%{visibility:visible;opacity:1}}#nuxt-loading>div,#nuxt-loading>div:after{border-radius:50%;width:5rem;height:5rem}#nuxt-loading>div{font-size:10px;position:relative;text-indent:-9999em;border:.5rem solid #f5f5f5;border-left:.5rem solid #000;-webkit-transform:translateZ(0);-ms-transform:translateZ(0);transform:translateZ(0);-webkit-animation:nuxtLoading 1.1s infinite linear;animation:nuxtLoading 1.1s infinite linear}#nuxt-loading.error>div{border-left:.5rem solid #ff4500;animation-duration:5s}@-webkit-keyframes nuxtLoading{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes nuxtLoading{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}</style><script>window.addEventListener("error",function(){var e=document.getElementById("nuxt-loading");e&&(e.className+=" error")})</script><div id="nuxt-loading" aria-live="polite" role="status"><div>Loading...</div></div></div><script>window.__NUXT__={config:{_app:{basePath:"/",assetsPath:"/_nuxt/",cdnURL:null}}}</script>
|
|
8
|
-
<script src="/_nuxt/
|
|
8
|
+
<script src="/_nuxt/f6f871d.js"></script><script src="/_nuxt/0c5f45a.js"></script><script src="/_nuxt/df98766.js"></script><script src="/_nuxt/b1b5217.js"></script></body>
|
|
9
9
|
</html>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@data-fair/dev-server",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.5",
|
|
4
4
|
"description": "A development server for optimal development experience of data-fair applications.",
|
|
5
5
|
"main": "server/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
46
|
"@koumoul/nuxt-config-inject": "^0.4.4",
|
|
47
|
-
"@koumoul/vjsf": "^2.
|
|
47
|
+
"@koumoul/vjsf": "^2.18.0",
|
|
48
48
|
"ajv": "^8.8.2",
|
|
49
49
|
"ajv-i18n": "^4.2.0",
|
|
50
50
|
"body-parser": "^1.19.1",
|
package/server/app.js
CHANGED
|
@@ -26,7 +26,6 @@ let devServerWS, dataFairWS
|
|
|
26
26
|
server.on('upgrade', function upgrade (req, socket, head) {
|
|
27
27
|
wss.handleUpgrade(req, socket, head, (ws) => {
|
|
28
28
|
if (req.url === '/data-fair') {
|
|
29
|
-
console.log('data-fair websocket connection from application')
|
|
30
29
|
if (dataFairWS) dataFairWS.terminate()
|
|
31
30
|
dataFairWS = ws
|
|
32
31
|
ws.on('message', (data) => {
|
|
@@ -50,8 +49,8 @@ dataFairOutputWS.on('open', () => dataFairOutputWS.send('connect to external web
|
|
|
50
49
|
dataFairOutputWS.on('message', (data) => { if (dataFairWS) dataFairWS.send(data.toString()) })
|
|
51
50
|
dataFairOutputWS.on('error', (err) => console.error('failed to connect to external websocket server', dfWsUrl, err))
|
|
52
51
|
|
|
53
|
-
app.use(bodyParser.json())
|
|
54
52
|
app.use(cors())
|
|
53
|
+
app.use(bodyParser.json())
|
|
55
54
|
|
|
56
55
|
// very basic CRUD of config
|
|
57
56
|
app.get('/config', (req, res, next) => {
|
|
@@ -183,8 +182,11 @@ app.use('/data-fair', createProxyMiddleware({
|
|
|
183
182
|
onProxyReq (proxyReq, req, res) {
|
|
184
183
|
// no gzip so that we can process the content
|
|
185
184
|
proxyReq.setHeader('accept-encoding', 'identity')
|
|
185
|
+
|
|
186
|
+
// authentication through api key only
|
|
186
187
|
proxyReq.setHeader('cookie', '')
|
|
187
188
|
if (config.dataFair.apiKey) proxyReq.setHeader('x-apiKey', config.dataFair.apiKey)
|
|
189
|
+
|
|
188
190
|
// body was already parsed by body-parser and no longer available as a stream
|
|
189
191
|
fixRequestBody(proxyReq, req, res)
|
|
190
192
|
},
|
|
@@ -207,6 +209,15 @@ app.use('/data-fair', createProxyMiddleware({
|
|
|
207
209
|
}
|
|
208
210
|
}))
|
|
209
211
|
|
|
212
|
+
// also re-expose the simple-directory instance matching data-fair
|
|
213
|
+
if (dfUrl.pathname === '/data-fair') {
|
|
214
|
+
app.use('/simple-directory', createProxyMiddleware({
|
|
215
|
+
target: dfUrl.origin,
|
|
216
|
+
secure: false,
|
|
217
|
+
changeOrigin: true
|
|
218
|
+
}))
|
|
219
|
+
}
|
|
220
|
+
|
|
210
221
|
// run the dev-src command from current project
|
|
211
222
|
let spawnedDevSrc
|
|
212
223
|
|