@gct-paas/cli 0.1.6-dev.4 → 0.1.6-dev.6

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.
@@ -43,6 +43,13 @@ class GenCdnLibAction {
43
43
  cache: cacheDir
44
44
  });
45
45
  const sourceDistPath = _path.default.join(_dlCacheDir, "dist");
46
+ if (opts.clean) {
47
+ const extractPkgPath = _path.default.join(extraDir, pkgInfo.name);
48
+ if (_fsExtra.default.existsSync(extractPkgPath)) {
49
+ _consola.default.info(`\u6B63\u5728\u5220\u9664 ${pkg} \u5305\u7684\u65E7\u7248\u672C...`);
50
+ _fsExtra.default.removeSync(extractPkgPath);
51
+ }
52
+ }
46
53
  const extractPath = _path.default.join(extraDir, pkgInfo.name, pkgInfo.version);
47
54
  _consola.default.info(`\u5C06 ${pkg}@${opts.tag} \u5305\u4ECE\u7F13\u5B58\u76EE\u5F55\u590D\u5236\u81F3\u5916\u90E8\u4F9D\u8D56\u76EE\u5F55...`);
48
55
  _fsExtra.default.copySync(sourceDistPath, extractPath, {
@@ -57,6 +57,13 @@ export class GenCdnLibAction {
57
57
  }
58
58
  );
59
59
  const sourceDistPath = path.join(_dlCacheDir, "dist");
60
+ if (opts.clean) {
61
+ const extractPkgPath = path.join(extraDir, pkgInfo.name);
62
+ if (fse.existsSync(extractPkgPath)) {
63
+ log.info(`\u6B63\u5728\u5220\u9664 ${pkg} \u5305\u7684\u65E7\u7248\u672C...`);
64
+ fse.removeSync(extractPkgPath);
65
+ }
66
+ }
60
67
  const extractPath = path.join(extraDir, pkgInfo.name, pkgInfo.version);
61
68
  log.info(`\u5C06 ${pkg}@${opts.tag} \u5305\u4ECE\u7F13\u5B58\u76EE\u5F55\u590D\u5236\u81F3\u5916\u90E8\u4F9D\u8D56\u76EE\u5F55...`);
62
69
  fse.copySync(sourceDistPath, extractPath, { overwrite: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gct-paas/cli",
3
- "version": "0.1.6-dev.4",
3
+ "version": "0.1.6-dev.6",
4
4
  "type": "module",
5
5
  "description": "paas 平台核心包",
6
6
  "bin": {
@@ -67,5 +67,5 @@
67
67
  "typescript": "^5.9.3",
68
68
  "unbuild": "^3.6.1"
69
69
  },
70
- "gitHead": "82bbd8e79ae2d255a7ccd03f2e0492dabec7fee5"
70
+ "gitHead": "2e48c22f823afd42f491f0df915aeca837964f19"
71
71
  }