@appthen/cli 1.2.12 → 1.2.13

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 (2) hide show
  1. package/dist/index.js +22 -23
  2. package/package.json +1 -4
package/dist/index.js CHANGED
@@ -29,7 +29,6 @@ require('prettier');
29
29
  var fs$1 = require('fs-extra');
30
30
  var io = require('socket.io-client');
31
31
  var fs$2 = require('fs/promises');
32
- var chokidar = require('chokidar');
33
32
  var pty = require('node-pty');
34
33
 
35
34
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
@@ -80,7 +79,6 @@ var fs__namespace = /*#__PURE__*/_interopNamespace(fs$1);
80
79
  var fs__default$2 = /*#__PURE__*/_interopDefaultLegacy(fs$1);
81
80
  var io__default = /*#__PURE__*/_interopDefaultLegacy(io);
82
81
  var fs__default$1 = /*#__PURE__*/_interopDefaultLegacy(fs$2);
83
- var chokidar__default = /*#__PURE__*/_interopDefaultLegacy(chokidar);
84
82
  var pty__namespace = /*#__PURE__*/_interopNamespace(pty);
85
83
 
86
84
  /******************************************************************************
@@ -32790,6 +32788,7 @@ function regExpEscape (s) {
32790
32788
  return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&')
32791
32789
  }
32792
32790
 
32791
+ // import chokidar, { FSWatcher } from 'chokidar';
32793
32792
  var logger = function () {
32794
32793
  var args = [];
32795
32794
  for (var _i = 0; _i < arguments.length; _i++) {
@@ -34173,27 +34172,27 @@ var ShadowSpace = /** @class */ (function () {
34173
34172
  logger('[ShadowSpace] 监听目录:', this.config.projectRoot);
34174
34173
  try {
34175
34174
  // 🔥 使用轮询模式 + ignored 函数过滤
34176
- this.watcher = chokidar__default["default"].watch(this.config.projectRoot, {
34177
- ignored: function (filePath) {
34178
- var relativePath = path__default["default"].relative(_this.config.projectRoot, filePath);
34179
- // 忽略根目录本身
34180
- if (!relativePath || relativePath === '.') {
34181
- return true;
34182
- }
34183
- // 使用白名单过滤
34184
- return _this.shouldIgnoreFile(relativePath);
34185
- },
34186
- persistent: true,
34187
- ignoreInitial: true,
34188
- usePolling: true,
34189
- interval: 2000,
34190
- binaryInterval: 3000,
34191
- depth: 99,
34192
- awaitWriteFinish: {
34193
- stabilityThreshold: 500,
34194
- pollInterval: 100,
34195
- },
34196
- });
34175
+ // this.watcher = chokidar.watch(this.config.projectRoot, {
34176
+ // ignored: (filePath: string) => {
34177
+ // const relativePath = path.relative(this.config.projectRoot, filePath);
34178
+ // // 忽略根目录本身
34179
+ // if (!relativePath || relativePath === '.') {
34180
+ // return true;
34181
+ // }
34182
+ // // 使用白名单过滤
34183
+ // return this.shouldIgnoreFile(relativePath);
34184
+ // },
34185
+ // persistent: true,
34186
+ // ignoreInitial: true, // 忽略初始扫描
34187
+ // usePolling: true, // 🔥 macOS 上使用轮询模式(fsevents 在某些环境下不可靠)
34188
+ // interval: 2000, // 轮询间隔 2 秒(降低 CPU 占用)
34189
+ // binaryInterval: 3000, // 二进制文件轮询间隔 3 秒
34190
+ // depth: 99, // 监听所有子目录
34191
+ // awaitWriteFinish: {
34192
+ // stabilityThreshold: 500, // 文件稳定后 500ms 才触发
34193
+ // pollInterval: 100,
34194
+ // },
34195
+ // });
34197
34196
  logger('[ShadowSpace] chokidar.watch 已调用,等待 ready 事件...');
34198
34197
  }
34199
34198
  catch (error) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appthen/cli",
3
- "version": "1.2.12",
3
+ "version": "1.2.13",
4
4
  "description": "Appthen Cli Tool",
5
5
  "files": [
6
6
  "dist",
@@ -76,10 +76,8 @@
76
76
  "babel-plugin-import": "^1.13.8",
77
77
  "babel-plugin-module-resolver": "^4.1.0",
78
78
  "base-64": "^1.0.0",
79
- "bufferutil": "^4.0.8",
80
79
  "chalk": "^4.0.0",
81
80
  "change-case": "^3.1.0",
82
- "chokidar": "^4.0.3",
83
81
  "commander": "^6.1.0",
84
82
  "cssjson": "^2.1.3",
85
83
  "execa": "9.3.1",
@@ -87,7 +85,6 @@
87
85
  "form-data": "^4.0.0",
88
86
  "fp-ts": "^2.11.9",
89
87
  "fs-extra": "^11.2.0",
90
- "fsevents": "^2.3.3",
91
88
  "getpinyin": "^1.1.4",
92
89
  "glob": "^7.1.6",
93
90
  "http-proxy": "^1.18.1",