@teambit/clear-cache 0.0.329 → 0.0.331

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.
@@ -1,22 +1,16 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- require("core-js/modules/es.promise.js");
5
3
  Object.defineProperty(exports, "__esModule", {
6
4
  value: true
7
5
  });
8
6
  exports.ClearCacheAction = void 0;
9
- function _defineProperty2() {
10
- const data = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
11
- _defineProperty2 = function () {
12
- return data;
13
- };
14
- return data;
15
- }
7
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
8
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
9
+ function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
16
10
  class ClearCacheAction {
17
11
  constructor(scope) {
18
12
  this.scope = scope;
19
- (0, _defineProperty2().default)(this, "name", ClearCacheAction.name);
13
+ _defineProperty(this, "name", ClearCacheAction.name);
20
14
  }
21
15
  async execute() {
22
16
  if (!this.scope) return false;
@@ -1 +1 @@
1
- {"version":3,"names":["ClearCacheAction","constructor","scope","_defineProperty2","default","name","execute","clearCache","exports"],"sources":["clear-cache-action.ts"],"sourcesContent":["import { ScopeMain } from '@teambit/scope';\n\nexport class ClearCacheAction {\n name = ClearCacheAction.name;\n constructor(private scope: ScopeMain) {}\n async execute() {\n if (!this.scope) return false;\n await this.scope.clearCache();\n return true;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;AAEO,MAAMA,gBAAgB,CAAC;EAE5BC,WAAWA,CAASC,KAAgB,EAAE;IAAA,KAAlBA,KAAgB,GAAhBA,KAAgB;IAAA,IAAAC,gBAAA,GAAAC,OAAA,gBAD7BJ,gBAAgB,CAACK,IAAI;EACW;EACvC,MAAMC,OAAOA,CAAA,EAAG;IACd,IAAI,CAAC,IAAI,CAACJ,KAAK,EAAE,OAAO,KAAK;IAC7B,MAAM,IAAI,CAACA,KAAK,CAACK,UAAU,CAAC,CAAC;IAC7B,OAAO,IAAI;EACb;AACF;AAACC,OAAA,CAAAR,gBAAA,GAAAA,gBAAA"}
1
+ {"version":3,"names":["ClearCacheAction","constructor","scope","_defineProperty","name","execute","clearCache","exports"],"sources":["clear-cache-action.ts"],"sourcesContent":["import { ScopeMain } from '@teambit/scope';\n\nexport class ClearCacheAction {\n name = ClearCacheAction.name;\n constructor(private scope: ScopeMain) {}\n async execute() {\n if (!this.scope) return false;\n await this.scope.clearCache();\n return true;\n }\n}\n"],"mappings":";;;;;;;;;AAEO,MAAMA,gBAAgB,CAAC;EAE5BC,WAAWA,CAASC,KAAgB,EAAE;IAAA,KAAlBA,KAAgB,GAAhBA,KAAgB;IAAAC,eAAA,eAD7BH,gBAAgB,CAACI,IAAI;EACW;EACvC,MAAMC,OAAOA,CAAA,EAAG;IACd,IAAI,CAAC,IAAI,CAACH,KAAK,EAAE,OAAO,KAAK;IAC7B,MAAM,IAAI,CAACA,KAAK,CAACI,UAAU,CAAC,CAAC;IAC7B,OAAO,IAAI;EACb;AACF;AAACC,OAAA,CAAAP,gBAAA,GAAAA,gBAAA"}
@@ -1,18 +1,9 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- require("core-js/modules/es.promise.js");
5
3
  Object.defineProperty(exports, "__esModule", {
6
4
  value: true
7
5
  });
8
6
  exports.default = void 0;
9
- function _defineProperty2() {
10
- const data = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
11
- _defineProperty2 = function () {
12
- return data;
13
- };
14
- return data;
15
- }
16
7
  function _chalk() {
17
8
  const data = _interopRequireDefault(require("chalk"));
18
9
  _chalk = function () {
@@ -20,18 +11,22 @@ function _chalk() {
20
11
  };
21
12
  return data;
22
13
  }
14
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
16
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
17
+ function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
23
18
  class ClearCacheCmd {
24
19
  constructor(clearCache) {
25
20
  this.clearCache = clearCache;
26
- (0, _defineProperty2().default)(this, "name", 'clear-cache');
27
- (0, _defineProperty2().default)(this, "description", "clears Bit's cache from current working machine");
28
- (0, _defineProperty2().default)(this, "group", 'general');
29
- (0, _defineProperty2().default)(this, "extendedDescription", void 0);
30
- (0, _defineProperty2().default)(this, "alias", 'cc');
31
- (0, _defineProperty2().default)(this, "options", [['r', 'remote <remote-name>', 'clear memory cache from a remote scope']]);
32
- (0, _defineProperty2().default)(this, "loader", false);
33
- (0, _defineProperty2().default)(this, "skipWorkspace", true);
34
- (0, _defineProperty2().default)(this, "helpUrl", 'reference/workspace/clearing-cache');
21
+ _defineProperty(this, "name", 'clear-cache');
22
+ _defineProperty(this, "description", "clears Bit's cache from current working machine");
23
+ _defineProperty(this, "group", 'general');
24
+ _defineProperty(this, "extendedDescription", void 0);
25
+ _defineProperty(this, "alias", 'cc');
26
+ _defineProperty(this, "options", [['r', 'remote <remote-name>', 'clear memory cache from a remote scope']]);
27
+ _defineProperty(this, "loader", false);
28
+ _defineProperty(this, "skipWorkspace", true);
29
+ _defineProperty(this, "helpUrl", 'reference/workspace/clearing-cache');
35
30
  this.extendedDescription = `The following gets removed by this command:
36
31
  1) V8 compiled code (generated the first time Bit is loaded by v8-compile-cache package)
37
32
  2) components cache on the filesystem (mainly the dependencies graph and docs)
@@ -1 +1 @@
1
- {"version":3,"names":["_chalk","data","_interopRequireDefault","require","ClearCacheCmd","constructor","clearCache","_defineProperty2","default","extendedDescription","report","arg","remote","success","clearRemoteCache","chalk","green","red","cacheCleared","title","output","map","str","join","bold","exports"],"sources":["clear-cache-cmd.ts"],"sourcesContent":["import { Command, CommandOptions } from '@teambit/cli';\nimport chalk from 'chalk';\nimport { ClearCacheMain } from './clear-cache.main.runtime';\n\nexport default class ClearCacheCmd implements Command {\n name = 'clear-cache';\n description = \"clears Bit's cache from current working machine\";\n group = 'general';\n extendedDescription: string;\n alias = 'cc';\n options = [['r', 'remote <remote-name>', 'clear memory cache from a remote scope']] as CommandOptions;\n loader = false;\n skipWorkspace = true;\n helpUrl = 'reference/workspace/clearing-cache';\n\n constructor(private clearCache: ClearCacheMain) {\n this.extendedDescription = `The following gets removed by this command:\n1) V8 compiled code (generated the first time Bit is loaded by v8-compile-cache package)\n2) components cache on the filesystem (mainly the dependencies graph and docs)\n3) scope's index file, which maps the component-id:object-hash`;\n }\n\n async report(arg, { remote }: { remote?: string }): Promise<string> {\n if (remote) {\n const success = await this.clearCache.clearRemoteCache(remote);\n if (success) {\n return chalk.green(`successfully cleaned the cache of \"${remote}\"`);\n }\n return chalk.red(`failed cleaning the cache of \"${remote}\"`);\n }\n const cacheCleared = await this.clearCache.clearCache();\n const title = 'the following cache(s) have been cleared:';\n const output = cacheCleared.map((str) => ` ✔ ${str}`).join('\\n');\n return chalk.green(`${chalk.bold(title)}\\n${output}`);\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;AACA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAA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,CAAC,CAACC,IAAI,CAAC,IAAI,CAAC;IACjE,OAAOR,gBAAK,CAACC,KAAK,CAAE,GAAED,gBAAK,CAACS,IAAI,CAACL,KAAK,CAAE,KAAIC,MAAO,EAAC,CAAC;EACvD;AACF;AAACK,OAAA,CAAAjB,OAAA,GAAAJ,aAAA"}
1
+ {"version":3,"names":["_chalk","data","_interopRequireDefault","require","obj","__esModule","default","_defineProperty","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","arg","_toPrimitive","String","input","hint","prim","Symbol","toPrimitive","undefined","res","call","TypeError","Number","ClearCacheCmd","constructor","clearCache","extendedDescription","report","remote","success","clearRemoteCache","chalk","green","red","cacheCleared","title","output","map","str","join","bold","exports"],"sources":["clear-cache-cmd.ts"],"sourcesContent":["import { Command, CommandOptions } from '@teambit/cli';\nimport chalk from 'chalk';\nimport { ClearCacheMain } from './clear-cache.main.runtime';\n\nexport default class ClearCacheCmd implements Command {\n name = 'clear-cache';\n description = \"clears Bit's cache from current working machine\";\n group = 'general';\n extendedDescription: string;\n alias = 'cc';\n options = [['r', 'remote <remote-name>', 'clear memory cache from a remote scope']] as CommandOptions;\n loader = false;\n skipWorkspace = true;\n helpUrl = 'reference/workspace/clearing-cache';\n\n constructor(private clearCache: ClearCacheMain) {\n this.extendedDescription = `The following gets removed by this command:\n1) V8 compiled code (generated the first time Bit is loaded by v8-compile-cache package)\n2) components cache on the filesystem (mainly the dependencies graph and docs)\n3) scope's index file, which maps the component-id:object-hash`;\n }\n\n async report(arg, { remote }: { remote?: string }): Promise<string> {\n if (remote) {\n const success = await this.clearCache.clearRemoteCache(remote);\n if (success) {\n return chalk.green(`successfully cleaned the cache of \"${remote}\"`);\n }\n return chalk.red(`failed cleaning the cache of \"${remote}\"`);\n }\n const cacheCleared = await this.clearCache.clearCache();\n const title = 'the following cache(s) have been cleared:';\n const output = cacheCleared.map((str) => ` ✔ ${str}`).join('\\n');\n return chalk.green(`${chalk.bold(title)}\\n${output}`);\n }\n}\n"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,eAAA,kBACF,CAAC,CAAC,GAAG,EAAE,sBAAsB,EAAE,wCAAwC,CAAC,CAAC;IAAAA,eAAA,iBAC1E,KAAK;IAAAA,eAAA,wBACE,IAAI;IAAAA,eAAA,kBACV,oCAAoC;IAG5C,IAAI,CAACyB,mBAAmB,GAAI;AAChC;AACA;AACA,+DAA+D;EAC7D;EAEA,MAAMC,MAAMA,CAACjB,GAAG,EAAE;IAAEkB;EAA4B,CAAC,EAAmB;IAClE,IAAIA,MAAM,EAAE;MACV,MAAMC,OAAO,GAAG,MAAM,IAAI,CAACJ,UAAU,CAACK,gBAAgB,CAACF,MAAM,CAAC;MAC9D,IAAIC,OAAO,EAAE;QACX,OAAOE,gBAAK,CAACC,KAAK,CAAE,sCAAqCJ,MAAO,GAAE,CAAC;MACrE;MACA,OAAOG,gBAAK,CAACE,GAAG,CAAE,iCAAgCL,MAAO,GAAE,CAAC;IAC9D;IACA,MAAMM,YAAY,GAAG,MAAM,IAAI,CAACT,UAAU,CAACA,UAAU,CAAC,CAAC;IACvD,MAAMU,KAAK,GAAG,2CAA2C;IACzD,MAAMC,MAAM,GAAGF,YAAY,CAACG,GAAG,CAAEC,GAAG,IAAM,OAAMA,GAAI,EAAC,CAAC,CAACC,IAAI,CAAC,IAAI,CAAC;IACjE,OAAOR,gBAAK,CAACC,KAAK,CAAE,GAAED,gBAAK,CAACS,IAAI,CAACL,KAAK,CAAE,KAAIC,MAAO,EAAC,CAAC;EACvD;AACF;AAACK,OAAA,CAAAzC,OAAA,GAAAuB,aAAA"}
@@ -1,6 +1,5 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
3
  Object.defineProperty(exports, "__esModule", {
5
4
  value: true
6
5
  });
@@ -12,6 +11,7 @@ function _react() {
12
11
  };
13
12
  return data;
14
13
  }
14
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
15
  const Logo = () => /*#__PURE__*/_react().default.createElement("div", {
16
16
  style: {
17
17
  height: '100%',
@@ -1 +1 @@
1
- {"version":3,"names":["_react","data","_interopRequireDefault","require","Logo","default","createElement","style","height","display","justifyContent","width","src","exports"],"sources":["clear-cache.composition.tsx"],"sourcesContent":["import React from 'react';\n\nexport const Logo = () => (\n <div style={{ height: '100%', display: 'flex', justifyContent: 'center' }}>\n <img style={{ width: 70 }} src=\"https://static.bit.dev/extensions-icons/clean-cache.svg\" />\n </div>\n);\n"],"mappings":";;;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEO,MAAMG,IAAI,GAAGA,CAAA,kBAClBJ,MAAA,GAAAK,OAAA,CAAAC,aAAA;EAAKC,KAAK,EAAE;IAAEC,MAAM,EAAE,MAAM;IAAEC,OAAO,EAAE,MAAM;IAAEC,cAAc,EAAE;EAAS;AAAE,gBACxEV,MAAA,GAAAK,OAAA,CAAAC,aAAA;EAAKC,KAAK,EAAE;IAAEI,KAAK,EAAE;EAAG,CAAE;EAACC,GAAG,EAAC;AAAyD,CAAE,CACvF,CACN;AAACC,OAAA,CAAAT,IAAA,GAAAA,IAAA"}
1
+ {"version":3,"names":["_react","data","_interopRequireDefault","require","obj","__esModule","default","Logo","createElement","style","height","display","justifyContent","width","src","exports"],"sources":["clear-cache.composition.tsx"],"sourcesContent":["import React from 'react';\n\nexport const Logo = () => (\n <div style={{ height: '100%', display: 'flex', justifyContent: 'center' }}>\n <img style={{ width: 70 }} src=\"https://static.bit.dev/extensions-icons/clean-cache.svg\" />\n </div>\n);\n"],"mappings":";;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAA0B,SAAAC,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAEnB,MAAMG,IAAI,GAAGA,CAAA,kBAClBP,MAAA,GAAAM,OAAA,CAAAE,aAAA;EAAKC,KAAK,EAAE;IAAEC,MAAM,EAAE,MAAM;IAAEC,OAAO,EAAE,MAAM;IAAEC,cAAc,EAAE;EAAS;AAAE,gBACxEZ,MAAA,GAAAM,OAAA,CAAAE,aAAA;EAAKC,KAAK,EAAE;IAAEI,KAAK,EAAE;EAAG,CAAE;EAACC,GAAG,EAAC;AAAyD,CAAE,CACvF,CACN;AAACC,OAAA,CAAAR,IAAA,GAAAA,IAAA"}
@@ -1,19 +1,9 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- require("core-js/modules/es.array.iterator.js");
5
- require("core-js/modules/es.promise.js");
6
3
  Object.defineProperty(exports, "__esModule", {
7
4
  value: true
8
5
  });
9
6
  exports.ClearCacheMain = void 0;
10
- function _defineProperty2() {
11
- const data = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
12
- _defineProperty2 = function () {
13
- return data;
14
- };
15
- return data;
16
- }
17
7
  function _cli() {
18
8
  const data = require("@teambit/cli");
19
9
  _cli = function () {
@@ -77,6 +67,10 @@ function _clearCacheAction() {
77
67
  };
78
68
  return data;
79
69
  }
70
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
71
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
72
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
73
+ function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
80
74
  class ClearCacheMain {
81
75
  constructor(workspace) {
82
76
  this.workspace = workspace;
@@ -98,9 +92,9 @@ class ClearCacheMain {
98
92
  }
99
93
  }
100
94
  exports.ClearCacheMain = ClearCacheMain;
101
- (0, _defineProperty2().default)(ClearCacheMain, "slots", []);
102
- (0, _defineProperty2().default)(ClearCacheMain, "dependencies", [_workspace().default, _cli().CLIAspect, _scope().default]);
103
- (0, _defineProperty2().default)(ClearCacheMain, "runtime", _cli().MainRuntime);
95
+ _defineProperty(ClearCacheMain, "slots", []);
96
+ _defineProperty(ClearCacheMain, "dependencies", [_workspace().default, _cli().CLIAspect, _scope().default]);
97
+ _defineProperty(ClearCacheMain, "runtime", _cli().MainRuntime);
104
98
  _clearCache().ClearCacheAspect.addRuntime(ClearCacheMain);
105
99
 
106
100
  //# sourceMappingURL=clear-cache.main.runtime.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_cli","data","require","_workspace","_interopRequireDefault","_scope","_consumer","_action","_getRemoteByName","_clearCacheCmd","_clearCache","_clearCacheAction","ClearCacheMain","constructor","workspace","clearCache","clearRemoteCache","remote","_this$workspace","remoteObj","getRemoteByName","consumer","result","action","ClearCacheAction","name","provider","cli","scope","clearCacheMain","register","ClearCacheCmd","ExternalActions","externalActions","push","exports","_defineProperty2","default","WorkspaceAspect","CLIAspect","ScopeAspect","MainRuntime","ClearCacheAspect","addRuntime"],"sources":["clear-cache.main.runtime.ts"],"sourcesContent":["import { CLIAspect, CLIMain, MainRuntime } from '@teambit/cli';\nimport WorkspaceAspect, { Workspace } from '@teambit/workspace';\nimport ScopeAspect, { ScopeMain } from '@teambit/scope';\nimport { clearCache } from '@teambit/legacy/dist/api/consumer';\nimport { ExternalActions } from '@teambit/legacy/dist/api/scope/lib/action';\nimport getRemoteByName from '@teambit/legacy/dist/remotes/get-remote-by-name';\nimport ClearCacheCmd from './clear-cache-cmd';\nimport { ClearCacheAspect } from './clear-cache.aspect';\nimport { ClearCacheAction } from './clear-cache-action';\n\nexport class ClearCacheMain {\n constructor(private workspace?: Workspace) {}\n\n async clearCache(): Promise<string[]> {\n return clearCache();\n }\n\n async clearRemoteCache(remote: string) {\n const remoteObj = await getRemoteByName(remote, this.workspace?.consumer);\n const result = await remoteObj.action(ClearCacheAction.name, {});\n return result;\n }\n\n static slots = [];\n static dependencies = [WorkspaceAspect, CLIAspect, ScopeAspect];\n static runtime = MainRuntime;\n static async provider([workspace, cli, scope]: [Workspace, CLIMain, ScopeMain]) {\n const clearCacheMain = new ClearCacheMain(workspace);\n cli.register(new ClearCacheCmd(clearCacheMain));\n ExternalActions.externalActions.push(new ClearCacheAction(scope));\n\n return clearCacheMain;\n }\n}\n\nClearCacheAspect.addRuntime(ClearCacheMain);\n"],"mappings":";;;;;;;;;;;;;;;;AAAA,SAAAA,KAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,IAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,WAAA;EAAA,MAAAF,IAAA,GAAAG,sBAAA,CAAAF,OAAA;EAAAC,UAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,OAAA;EAAA,MAAAJ,IAAA,GAAAG,sBAAA,CAAAF,OAAA;EAAAG,MAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,UAAA;EAAA,MAAAL,IAAA,GAAAC,OAAA;EAAAI,SAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAM,QAAA;EAAA,MAAAN,IAAA,GAAAC,OAAA;EAAAK,OAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAO,iBAAA;EAAA,MAAAP,IA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;IAC/CG,yBAAe,CAACC,eAAe,CAACC,IAAI,CAAC,KAAIV,oCAAgB,EAACI,KAAK,CAAC,CAAC;IAEjE,OAAOC,cAAc;EACvB;AACF;AAACM,OAAA,CAAAvB,cAAA,GAAAA,cAAA;AAAA,IAAAwB,gBAAA,GAAAC,OAAA,EAvBYzB,cAAc,WAaV,EAAE;AAAA,IAAAwB,gBAAA,GAAAC,OAAA,EAbNzB,cAAc,kBAcH,CAAC0B,oBAAe,EAAEC,gBAAS,EAAEC,gBAAW,CAAC;AAAA,IAAAJ,gBAAA,GAAAC,OAAA,EAdpDzB,cAAc,aAeR6B,kBAAW;AAU9BC,8BAAgB,CAACC,UAAU,CAAC/B,cAAc,CAAC"}
1
+ {"version":3,"names":["_cli","data","require","_workspace","_interopRequireDefault","_scope","_consumer","_action","_getRemoteByName","_clearCacheCmd","_clearCache","_clearCacheAction","obj","__esModule","default","_defineProperty","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","arg","_toPrimitive","String","input","hint","prim","Symbol","toPrimitive","undefined","res","call","TypeError","Number","ClearCacheMain","constructor","workspace","clearCache","clearRemoteCache","remote","_this$workspace","remoteObj","getRemoteByName","consumer","result","action","ClearCacheAction","name","provider","cli","scope","clearCacheMain","register","ClearCacheCmd","ExternalActions","externalActions","push","exports","WorkspaceAspect","CLIAspect","ScopeAspect","MainRuntime","ClearCacheAspect","addRuntime"],"sources":["clear-cache.main.runtime.ts"],"sourcesContent":["import { CLIAspect, CLIMain, MainRuntime } from '@teambit/cli';\nimport WorkspaceAspect, { Workspace } from '@teambit/workspace';\nimport ScopeAspect, { ScopeMain } from '@teambit/scope';\nimport { clearCache } from '@teambit/legacy/dist/api/consumer';\nimport { ExternalActions } from '@teambit/legacy/dist/api/scope/lib/action';\nimport getRemoteByName from '@teambit/legacy/dist/remotes/get-remote-by-name';\nimport ClearCacheCmd from './clear-cache-cmd';\nimport { ClearCacheAspect } from './clear-cache.aspect';\nimport { ClearCacheAction } from './clear-cache-action';\n\nexport class ClearCacheMain {\n constructor(private workspace?: Workspace) {}\n\n async clearCache(): Promise<string[]> {\n return clearCache();\n }\n\n async clearRemoteCache(remote: string) {\n const remoteObj = await getRemoteByName(remote, this.workspace?.consumer);\n const result = await remoteObj.action(ClearCacheAction.name, {});\n return result;\n }\n\n static slots = [];\n static dependencies = [WorkspaceAspect, CLIAspect, ScopeAspect];\n static runtime = MainRuntime;\n static async provider([workspace, cli, scope]: [Workspace, CLIMain, ScopeMain]) {\n const clearCacheMain = new ClearCacheMain(workspace);\n cli.register(new ClearCacheCmd(clearCacheMain));\n ExternalActions.externalActions.push(new ClearCacheAction(scope));\n\n return clearCacheMain;\n }\n}\n\nClearCacheAspect.addRuntime(ClearCacheMain);\n"],"mappings":";;;;;;AAAA,SAAAA,KAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,IAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,WAAA;EAAA,MAAAF,IAAA,GAAAG,sBAAA,CAAAF,OAAA;EAAAC,UAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,OAAA;EAAA,MAAAJ,IAAA,GAAAG,sBAAA,CAAAF,OAAA;EAAAG,MAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,UAAA;EAAA,MAAAL,IAAA,GAAAC,OAAA;EAAAI,SAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAM,QAAA;EAAA,MAAAN,IAAA,GAAAC,OAAA;EAAAK,OAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAO,iBAAA;EAAA,MAAAP,IAAA,GAAAG,sBAAA,CAAAF,OAAA;EAAAM,gBAAA,YAAAA,C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ches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.workspace_clear-cache@0.0.329/dist/clear-cache.composition.js';
2
- import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.workspace_clear-cache@0.0.329/dist/clear-cache.docs.mdx';
1
+ import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.workspace_clear-cache@0.0.331/dist/clear-cache.composition.js';
2
+ import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.workspace_clear-cache@0.0.331/dist/clear-cache.docs.mdx';
3
3
 
4
4
  export const compositions = [compositions_0];
5
5
  export const overview = [overview_0];
package/package.json CHANGED
@@ -1,17 +1,15 @@
1
1
  {
2
2
  "name": "@teambit/clear-cache",
3
- "version": "0.0.329",
3
+ "version": "0.0.331",
4
4
  "homepage": "https://bit.cloud/teambit/workspace/clear-cache",
5
5
  "main": "dist/index.js",
6
6
  "componentId": {
7
7
  "scope": "teambit.workspace",
8
8
  "name": "clear-cache",
9
- "version": "0.0.329"
9
+ "version": "0.0.331"
10
10
  },
11
11
  "dependencies": {
12
12
  "chalk": "2.4.2",
13
- "core-js": "^3.0.0",
14
- "@babel/runtime": "7.20.0",
15
13
  "@teambit/harmony": "0.4.6"
16
14
  },
17
15
  "devDependencies": {
@@ -23,7 +21,7 @@
23
21
  "@types/testing-library__jest-dom": "5.9.5"
24
22
  },
25
23
  "peerDependencies": {
26
- "@teambit/legacy": "1.0.557",
24
+ "@teambit/legacy": "1.0.559",
27
25
  "react": "^16.8.0 || ^17.0.0",
28
26
  "react-dom": "^16.8.0 || ^17.0.0"
29
27
  },