filecat 1.0.12 → 1.0.14
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/LICENSE +201 -201
- package/README.md +69 -71
- package/build/dist/859.bundle.js +1 -1
- package/build/dist/859.bundle.js.LICENSE.txt +1 -1
- package/build/dist/916.bundle.js +1 -1
- package/build/dist/943.bundle.js +1 -1
- package/build/dist/977.bundle.js +1 -1
- package/build/dist/bundle.js +1 -1
- package/build/dist/excalidraw-assets/vendor-677e88ca78c86bddf13d.js +1 -1
- package/build/dist/filerobot-image-editor.min.js +42445 -42445
- package/build/dist/rle.js +17867 -17867
- package/build/main.js +30 -30
- package/build/wintun-amd64.dll +0 -0
- package/env +16 -16
- package/package.json +153 -152
- package/shell/build.js +102 -101
- package/shell/config/.babelrc +10 -10
- package/shell/config/prebuild-file-path.js +17 -17
- package/shell/config/webpack.config.js +71 -71
- package/shell/config/webpack.docker.config.js +62 -62
- package/shell/config/webpack.npm.config.js +64 -62
- package/shell/config/webpack.pkg.config.js +62 -62
- package/shell/dev.js +51 -51
- package/shell/docker-build.sh +2 -2
- package/shell/filecat +1 -1
- package/shell/install.js +48 -48
- package/shell/restart.sh +29 -29
package/shell/install.js
CHANGED
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
const path = require("path");
|
|
2
|
-
const { exec } = require('child_process');
|
|
3
|
-
|
|
4
|
-
function isModuleInstalled(moduleName) {
|
|
5
|
-
try {
|
|
6
|
-
require.resolve(moduleName);
|
|
7
|
-
return true;
|
|
8
|
-
} catch (error) {
|
|
9
|
-
return false;
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
function installModule(moduleName) {
|
|
13
|
-
return new Promise((resolve, reject) => {
|
|
14
|
-
const command = `npm install ${moduleName}`;
|
|
15
|
-
console.log(`Installing ${moduleName}...`);
|
|
16
|
-
exec(command, (error, stdout, stderr) => {
|
|
17
|
-
if (error) {
|
|
18
|
-
console.error(`Error installing ${moduleName}:`, stderr);
|
|
19
|
-
reject(error);
|
|
20
|
-
} else {
|
|
21
|
-
console.log(`${moduleName} installed successfully.`);
|
|
22
|
-
resolve(stdout);
|
|
23
|
-
}
|
|
24
|
-
});
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
const package = require(path.join(process.cwd(), 'package.json'));
|
|
28
|
-
|
|
29
|
-
const devDependencies = package.devDependencies;
|
|
30
|
-
const dependencies = package.dependencies;
|
|
31
|
-
|
|
32
|
-
async function run () {
|
|
33
|
-
for (const p of Object.keys(dependencies)) {
|
|
34
|
-
if (!isModuleInstalled(p)) {
|
|
35
|
-
installModule(`${p}@${dependencies[p].split('^')[1]}`);
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
for (const p of Object.keys(devDependencies)) {
|
|
39
|
-
if (!isModuleInstalled(p)) {
|
|
40
|
-
installModule(`${p}@${devDependencies[p].split('^')[1]}`);
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
run();
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
1
|
+
const path = require("path");
|
|
2
|
+
const { exec } = require('child_process');
|
|
3
|
+
|
|
4
|
+
function isModuleInstalled(moduleName) {
|
|
5
|
+
try {
|
|
6
|
+
require.resolve(moduleName);
|
|
7
|
+
return true;
|
|
8
|
+
} catch (error) {
|
|
9
|
+
return false;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
function installModule(moduleName) {
|
|
13
|
+
return new Promise((resolve, reject) => {
|
|
14
|
+
const command = `npm install ${moduleName}`;
|
|
15
|
+
console.log(`Installing ${moduleName}...`);
|
|
16
|
+
exec(command, (error, stdout, stderr) => {
|
|
17
|
+
if (error) {
|
|
18
|
+
console.error(`Error installing ${moduleName}:`, stderr);
|
|
19
|
+
reject(error);
|
|
20
|
+
} else {
|
|
21
|
+
console.log(`${moduleName} installed successfully.`);
|
|
22
|
+
resolve(stdout);
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
const package = require(path.join(process.cwd(), 'package.json'));
|
|
28
|
+
|
|
29
|
+
const devDependencies = package.devDependencies;
|
|
30
|
+
const dependencies = package.dependencies;
|
|
31
|
+
|
|
32
|
+
async function run () {
|
|
33
|
+
for (const p of Object.keys(dependencies)) {
|
|
34
|
+
if (!isModuleInstalled(p)) {
|
|
35
|
+
installModule(`${p}@${dependencies[p].split('^')[1]}`);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
for (const p of Object.keys(devDependencies)) {
|
|
39
|
+
if (!isModuleInstalled(p)) {
|
|
40
|
+
installModule(`${p}@${devDependencies[p].split('^')[1]}`);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
run();
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
package/shell/restart.sh
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
# 读取参数
|
|
5
|
-
PORT1=5567
|
|
6
|
-
PORT2=3301
|
|
7
|
-
|
|
8
|
-
# 查找并关闭第一个端口的程序
|
|
9
|
-
find_and_kill_process() {
|
|
10
|
-
local PORT=$1
|
|
11
|
-
local PID=$(lsof -t -i:$PORT)
|
|
12
|
-
if [ -n "$PID" ]; then
|
|
13
|
-
echo "Found process with PID $PID using port $PORT. Killing process..."
|
|
14
|
-
kill $PID
|
|
15
|
-
echo "Process killed."
|
|
16
|
-
else
|
|
17
|
-
echo "No process found using port $PORT."
|
|
18
|
-
fi
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
# 查找并关闭第一个端口的程序
|
|
22
|
-
find_and_kill_process $PORT1
|
|
23
|
-
|
|
24
|
-
# 查找并关闭第二个端口的程序
|
|
25
|
-
find_and_kill_process $PORT2
|
|
26
|
-
|
|
27
|
-
npm install
|
|
28
|
-
|
|
29
|
-
nohup npm run dev >./nohup.out 2>&1 &
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
# 读取参数
|
|
5
|
+
PORT1=5567
|
|
6
|
+
PORT2=3301
|
|
7
|
+
|
|
8
|
+
# 查找并关闭第一个端口的程序
|
|
9
|
+
find_and_kill_process() {
|
|
10
|
+
local PORT=$1
|
|
11
|
+
local PID=$(lsof -t -i:$PORT)
|
|
12
|
+
if [ -n "$PID" ]; then
|
|
13
|
+
echo "Found process with PID $PID using port $PORT. Killing process..."
|
|
14
|
+
kill $PID
|
|
15
|
+
echo "Process killed."
|
|
16
|
+
else
|
|
17
|
+
echo "No process found using port $PORT."
|
|
18
|
+
fi
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
# 查找并关闭第一个端口的程序
|
|
22
|
+
find_and_kill_process $PORT1
|
|
23
|
+
|
|
24
|
+
# 查找并关闭第二个端口的程序
|
|
25
|
+
find_and_kill_process $PORT2
|
|
26
|
+
|
|
27
|
+
npm install
|
|
28
|
+
|
|
29
|
+
nohup npm run dev >./nohup.out 2>&1 &
|