@cabloy/cli 3.0.68 → 3.0.70

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 +10 -3
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -160,7 +160,7 @@ class LocalCommon {
160
160
  await Promise.all(promises);
161
161
  }
162
162
  async _generateTypeModulesFileInner(typeFile, typeFileStat, moduleTypeFile) {
163
- const win = true; // process.platform.startsWith('win');
163
+ const win = process.platform.startsWith('win');
164
164
  let needCreate = true;
165
165
  const exists = await fse.exists(moduleTypeFile);
166
166
  if (exists) {
@@ -170,13 +170,20 @@ class LocalCommon {
170
170
  if (stat.size === typeFileStat.size) {
171
171
  needCreate = false;
172
172
  }
173
+ } else {
174
+ const realFile = await fse.readlink(moduleTypeFile);
175
+ if (realFile === typeFile) {
176
+ needCreate = false;
177
+ }
173
178
  }
174
179
  } catch (_err) {}
175
180
  }
176
181
  if (needCreate) {
177
182
  await fse.remove(moduleTypeFile);
178
- {
183
+ if (win) {
179
184
  await fse.copy(typeFile, moduleTypeFile);
185
+ } else {
186
+ await fse.ensureSymlink(typeFile, moduleTypeFile);
180
187
  }
181
188
  }
182
189
  }
@@ -1524,7 +1531,7 @@ class CabloyCommand extends BaseCommand {
1524
1531
  return;
1525
1532
  }
1526
1533
  // checkForUpdates
1527
- checkForUpdates(`${this.brandName}-cli`);
1534
+ // checkForUpdates(`${this.brandName}-cli`);
1528
1535
  // collectCommands
1529
1536
  await collectCommands();
1530
1537
  // cli
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cabloy/cli",
3
3
  "type": "module",
4
- "version": "3.0.68",
4
+ "version": "3.0.70",
5
5
  "description": "@cabloy/cli",
6
6
  "publishConfig": {
7
7
  "access": "public"