Skip to content

Commit cca41f2

Browse files
Ajit KumarAjit Kumar
authored andcommitted
v1.1.1
1 parent bc95a6b commit cca41f2

17 files changed

+1566
-5055
lines changed

.DS_Store

6 KB
Binary file not shown.

.vscode/getNet.js

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
const { networkInterfaces } = require('os');
22

33
module.exports = async (mode = 'dev') => {
4-
const { WiFi, Ethernet } = getIp();
5-
const [ip] = WiFi || Ethernet;
4+
const ip = getIp();
65
const port = '5500';
76
const src = `https://${ip || '10.0.0'}:${port}`;
87
console.log('Server starting at: ', src);
@@ -11,20 +10,16 @@ module.exports = async (mode = 'dev') => {
1110

1211
function getIp() {
1312
const nets = networkInterfaces();
14-
const results = {}; // Or just '{}', an empty object
13+
let ip = '';
1514

16-
Object.keys(nets).forEach((name) => {
17-
nets[name].forEach((net) => {
18-
// Skip over non-IPv4 and internal (i.e. 127.0.0.1) addresses
19-
// 'IPv4' is in Node <= 17, from 18 it's a number 4 or 6
20-
const familyV4Value = typeof net.family === 'string' ? 'IPv4' : 4;
21-
if (net.family === familyV4Value && !net.internal) {
22-
if (!results[name]) {
23-
results[name] = [];
24-
}
25-
results[name].push(net.address);
26-
}
27-
});
28-
});
29-
return results;
15+
Object.keys(nets).some((name) => nets[name].find((net) => {
16+
const familyV4Value = typeof net.family === 'string' ? 'IPv4' : 4;
17+
if (net.family === familyV4Value && !net.internal) {
18+
ip = net.address;
19+
return ip;
20+
}
21+
return false;
22+
}));
23+
24+
return ip;
3025
}

.vscode/run-webpack.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
const { spawn } = require('child_process');
33
const path = require('path');
44

5-
const webpack = spawn('npx.cmd', ['webpack', '--mode=development', '--watch'], { cwd: path.resolve(__dirname, '../') });
5+
const webpack = spawn('npx', ['webpack', '--mode=development', '--watch'], { cwd: path.resolve(__dirname, '../') });
66

77
webpack.on('error', (webpackError) => {
88
if (webpackError) {

.vscode/settings.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
11
{
22
"dart.lineLength": 50,
33
"prettier.printWidth": 50,
4+
"cSpell.words": [
5+
"acode",
6+
"deadlyjack",
7+
"distutils",
8+
"micropip",
9+
"Pyodide",
10+
"pyparsing"
11+
],
412
}

dist.zip

3.31 MB
Binary file not shown.

dist/.DS_Store

6 KB
Binary file not shown.

dist/lib/pyodide-lock.json

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.

dist/lib/pyodide.asm.js

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/lib/pyodide.asm.wasm

100644100755
1.39 MB
Binary file not shown.

dist/lib/pyodide.js

Lines changed: 11 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)