@lmjs/cli 1.0.18 → 1.0.20
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/lib/app.js +1 -3
- package/lib/fcs.js +10 -10
- package/lib/files/view.view +3 -3
- package/package.json +1 -1
package/lib/app.js
CHANGED
|
@@ -72,7 +72,7 @@ wss.on('connection', (ws) => {
|
|
|
72
72
|
data: __data ?? {},
|
|
73
73
|
headers: _body['headers'] ?? config.apis[_body['api'] ?? 0].headers
|
|
74
74
|
});
|
|
75
|
-
_data.payload = res.data;
|
|
75
|
+
_data.payload = (_body['full']) ? res : res.data;
|
|
76
76
|
ws.send(JSON.stringify(_data));
|
|
77
77
|
|
|
78
78
|
} catch (e) {
|
|
@@ -89,8 +89,6 @@ wss.on('connection', (ws) => {
|
|
|
89
89
|
|
|
90
90
|
}
|
|
91
91
|
});
|
|
92
|
-
|
|
93
|
-
ws.send('Hi there, I am a WebSocket server');
|
|
94
92
|
});
|
|
95
93
|
|
|
96
94
|
global.app = app;
|
package/lib/fcs.js
CHANGED
|
@@ -179,7 +179,7 @@ function copyDir(src, dest, projectName) {
|
|
|
179
179
|
const entries = fs.readdirSync(src, { encoding: 'utf8', withFileTypes: true });
|
|
180
180
|
|
|
181
181
|
cd(dest);
|
|
182
|
-
|
|
182
|
+
|
|
183
183
|
for (let entry of entries) {
|
|
184
184
|
const srcPath = path.join(src.toString(), entry.name.toString());
|
|
185
185
|
const destPath = path.join(dest.toString(), entry.name.toString());
|
|
@@ -212,16 +212,16 @@ function copyDir(src, dest, projectName) {
|
|
|
212
212
|
}
|
|
213
213
|
exports.copyDir = copyDir;
|
|
214
214
|
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
return !!pattern.test(str);
|
|
215
|
+
function validURL(string) {
|
|
216
|
+
let url;
|
|
217
|
+
try {
|
|
218
|
+
url = new URL(string);
|
|
219
|
+
} catch (_) {
|
|
220
|
+
return false;
|
|
221
|
+
}
|
|
222
|
+
return url.protocol === "http:" || url.protocol === "https:";
|
|
224
223
|
}
|
|
224
|
+
|
|
225
225
|
exports.validURL = validURL;
|
|
226
226
|
|
|
227
227
|
var API =
|
package/lib/files/view.view
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lmjs/cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.20",
|
|
4
4
|
"description": "LumenJS is a tiny robust reactive javascript framework for building scalable and high-performant web applications and web user interfaces, be it simple or complex, with standard HTML, CSS and JavaScript",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"bin": {
|