filecat 5.22.12 → 5.22.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.
Files changed (22) hide show
  1. package/README.md +7 -4
  2. package/build/dist/{523.d058e4f6ad1c968df6ff.js → 523.9be09b05e431d3a91fe0.js} +2 -2
  3. package/build/dist/{943.db600f25f5e7b1304e4d.js → 943.54289eeb5f180aaa2701.js} +2 -2
  4. package/build/dist/index.html +1 -1
  5. package/build/dist/main.12b34fbb15992dd7f4f1.js +2 -0
  6. package/build/main.js +1 -1
  7. package/build/threads.work.filecat.js +1 -1
  8. package/package.json +1 -1
  9. package/shell/build.js +10 -6
  10. package/shell/config/base.webpack.config.js +1 -1
  11. package/shell/config/webpack.worker.get.js +2 -2
  12. package/build/dist/main.64fa47c3d3edab2ff804.js +0 -2
  13. package/build/node_modules/@xiaobaidadada/node-pty-prebuilt/build/Release/conpty.node +0 -0
  14. package/build/node_modules/@xiaobaidadada/node-pty-prebuilt/build/Release/conpty_console_list.node +0 -0
  15. package/build/node_modules/@xiaobaidadada/node-pty-prebuilt/build/Release/pty.node +0 -0
  16. package/build/node_modules/@xiaobaidadada/node-tuntap2-wintun/build/Release/tuntap2Addon.node +0 -0
  17. package/build/node_modules/@xiaobaidadada/ssh2-prebuilt/build/Release/sshcrypto.node +0 -0
  18. package/build/node_modules/cpu-features/build/Release/cpufeatures.node +0 -0
  19. package/build/node_modules/node-process-watcher/build/Release/node-process-watcher.node +0 -0
  20. /package/build/dist/{523.d058e4f6ad1c968df6ff.js.LICENSE.txt → 523.9be09b05e431d3a91fe0.js.LICENSE.txt} +0 -0
  21. /package/build/dist/{943.db600f25f5e7b1304e4d.js.LICENSE.txt → 943.54289eeb5f180aaa2701.js.LICENSE.txt} +0 -0
  22. /package/build/dist/{main.64fa47c3d3edab2ff804.js.LICENSE.txt → main.12b34fbb15992dd7f4f1.js.LICENSE.txt} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "filecat",
3
- "version": "5.22.12",
3
+ "version": "5.22.14",
4
4
  "description": "FileCat Server Manager",
5
5
  "author": "xiaobaidadada",
6
6
  "scripts": {
package/shell/build.js CHANGED
@@ -21,6 +21,11 @@ const fse = require("fs-extra");
21
21
  const {get_webpack_work_config} = require('./config/webpack.worker.get.js');
22
22
  const {copy_wintun_dll} = require("./config/common-bin.config");
23
23
 
24
+
25
+ function ensure_copyFileSync(sourcePath, destPath) {
26
+ fse.ensureDirSync(path.dirname(destPath))
27
+ copyFileSync(sourcePath, destPath);
28
+ }
24
29
  // 只能复制文件
25
30
  function copyFiles(sourceDir,destDir) {
26
31
  try {
@@ -53,8 +58,7 @@ const tasksLister = new Listr(
53
58
  webpack(get_webpack_work_config({
54
59
  entry_path:path.join(__dirname, "..", "build", "server", "main","threads","filecat","threads.work.filecat.js"),
55
60
  output_name:'threads.work.filecat.js',
56
- pkg:args[0]==="npm",
57
- docker:args[0]==="docker",
61
+ is_exe
58
62
  }), (err, stats) => {
59
63
  if (err || stats.hasErrors()) {
60
64
  console.error(err || stats.toString());
@@ -89,15 +93,15 @@ const tasksLister = new Listr(
89
93
  // copyFileSync(path.resolve("build/server/main/domain/file/file.worker.js"), path.join(__dirname, "..", "build", "file.worker.js"))
90
94
 
91
95
  // 复制 子进程监控脚本
92
- copyFileSync(path.resolve("src/main/watch.js"), path.join(__dirname, "..", "build", "watch.js"))
96
+ ensure_copyFileSync(path.resolve("src/main/watch.js"), path.join(__dirname, "..", "build", "watch.js"))
93
97
  if(is_exe) {
94
98
  copy_wintun_dll()
95
99
  fs.copyFileSync(path.resolve('package.json'), path.resolve('build','package.json'));
96
- copyFileSync(path.resolve("node_modules/sqlite3/build/Release/node_sqlite3.node"), path.join(__dirname, "..", "build","build", "node_sqlite3.node"))
100
+ // ensure_copyFileSync(path.resolve("node_modules/sqlite3/build/Release/node_sqlite3.node"), path.join(__dirname, "..", "build", "node_sqlite3.node"))
97
101
  }
98
102
 
99
- copyFileSync(path.resolve("node_modules/node-unrar-js/esm/js/unrar.wasm"), path.join(__dirname, "..", "build", "unrar.wasm"))
100
- copyFileSync(path.resolve("node_modules/jieba-wasm/pkg/nodejs/jieba_rs_wasm_bg.wasm"), path.join(__dirname, "..", "build", "jieba_rs_wasm_bg.wasm"))
103
+ ensure_copyFileSync(path.resolve("node_modules/node-unrar-js/esm/js/unrar.wasm"), path.join(__dirname, "..", "build", "unrar.wasm"))
104
+ ensure_copyFileSync(path.resolve("node_modules/jieba-wasm/pkg/nodejs/jieba_rs_wasm_bg.wasm"), path.join(__dirname, "..", "build", "jieba_rs_wasm_bg.wasm"))
101
105
 
102
106
  rimraf.sync(path.join(__dirname,"..","build","server"));
103
107
 
@@ -56,7 +56,7 @@ const npm_externals = [
56
56
  '@xiaobaidadada/node-tuntap2-wintun': 'commonjs @xiaobaidadada/node-tuntap2-wintun',
57
57
  'node-process-watcher': 'commonjs node-process-watcher',
58
58
  '@xiaobaidadada/ssh2-prebuilt': 'commonjs @xiaobaidadada/ssh2-prebuilt',
59
- 'sqlite3': 'commonjs sqlite3',
59
+ 'sqlite3/build/Release/node_sqlite3.node': 'commonjs sqlite3/build/Release/node_sqlite3.node',
60
60
  }
61
61
  ]
62
62
  const pkg_externals = [
@@ -5,7 +5,7 @@ const TerserPlugin = require("terser-webpack-plugin");
5
5
  const {base_url} = require("./env");
6
6
  const {plugins, pkg_externals, npm_externals, _node_rules} = require("./base.webpack.config");
7
7
 
8
- function get_webpack_work_config({entry_path,output_name,pkg,docker}) {
8
+ function get_webpack_work_config({entry_path,output_name,is_exe}) {
9
9
  const config = {
10
10
  target: 'node', // 指定打包结果运行在node环境下
11
11
  mode: 'production', // 或者 'production'
@@ -29,7 +29,7 @@ function get_webpack_work_config({entry_path,output_name,pkg,docker}) {
29
29
  plugins,
30
30
  externals: npm_externals
31
31
  }
32
- if(pkg===true || docker===true) {
32
+ if(is_exe) {
33
33
  // 整体打包需要二进制也进去
34
34
  config['module'] = {
35
35
  rules: _node_rules