@teambit/clear-cache 0.0.502 → 0.0.504
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.
package/dist/clear-cache-cmd.js
CHANGED
|
@@ -19,7 +19,7 @@ class ClearCacheCmd {
|
|
|
19
19
|
constructor(clearCache) {
|
|
20
20
|
this.clearCache = clearCache;
|
|
21
21
|
_defineProperty(this, "name", 'clear-cache');
|
|
22
|
-
_defineProperty(this, "description",
|
|
22
|
+
_defineProperty(this, "description", 'remove cached data to resolve stale data issues');
|
|
23
23
|
_defineProperty(this, "group", 'system');
|
|
24
24
|
_defineProperty(this, "extendedDescription", void 0);
|
|
25
25
|
_defineProperty(this, "alias", 'cc');
|
|
@@ -27,9 +27,12 @@ class ClearCacheCmd {
|
|
|
27
27
|
_defineProperty(this, "loader", false);
|
|
28
28
|
_defineProperty(this, "skipWorkspace", true);
|
|
29
29
|
_defineProperty(this, "helpUrl", 'reference/workspace/clearing-cache');
|
|
30
|
-
this.extendedDescription = `
|
|
30
|
+
this.extendedDescription = `clears various caches that Bit uses to improve performance. useful when experiencing stale data issues or
|
|
31
|
+
unexpected behavior. this command removes:
|
|
31
32
|
1) components cache on the filesystem (mainly the dependencies graph and docs)
|
|
32
|
-
2) scope's index file, which maps the component-id:object-hash
|
|
33
|
+
2) scope's index file, which maps the component-id:object-hash
|
|
34
|
+
|
|
35
|
+
note: this cache has minimal impact on disk space. to free significant disk space, use "bit capsule delete --all" to remove build capsules.`;
|
|
33
36
|
}
|
|
34
37
|
async report(arg, {
|
|
35
38
|
remote
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_chalk","data","_interopRequireDefault","require","e","__esModule","default","_defineProperty","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","ClearCacheCmd","constructor","clearCache","extendedDescription","report","arg","remote","success","clearRemoteCache","chalk","green","red","succeed","failed","getSuccessOutput","length","title","output","map","str","join","bold","getFailedOutput","exports"],"sources":["clear-cache-cmd.ts"],"sourcesContent":["import type { Command, CommandOptions } from '@teambit/cli';\nimport chalk from 'chalk';\nimport type { ClearCacheMain } from './clear-cache.main.runtime';\n\nexport default class ClearCacheCmd implements Command {\n name = 'clear-cache';\n description =
|
|
1
|
+
{"version":3,"names":["_chalk","data","_interopRequireDefault","require","e","__esModule","default","_defineProperty","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","ClearCacheCmd","constructor","clearCache","extendedDescription","report","arg","remote","success","clearRemoteCache","chalk","green","red","succeed","failed","getSuccessOutput","length","title","output","map","str","join","bold","getFailedOutput","exports"],"sources":["clear-cache-cmd.ts"],"sourcesContent":["import type { Command, CommandOptions } from '@teambit/cli';\nimport chalk from 'chalk';\nimport type { ClearCacheMain } from './clear-cache.main.runtime';\n\nexport default class ClearCacheCmd implements Command {\n name = 'clear-cache';\n description = 'remove cached data to resolve stale data issues';\n group = 'system';\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 = `clears various caches that Bit uses to improve performance. useful when experiencing stale data issues or\nunexpected behavior. this command removes:\n1) components cache on the filesystem (mainly the dependencies graph and docs)\n2) scope's index file, which maps the component-id:object-hash\n\nnote: this cache has minimal impact on disk space. to free significant disk space, use \"bit capsule delete --all\" to remove build capsules.`;\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 { succeed, failed } = await this.clearCache.clearCache();\n const getSuccessOutput = () => {\n if (!succeed.length) return '';\n const title = 'the following cache(s) have been cleared:';\n const output = succeed.map((str) => ` ✔ ${str}`).join('\\n');\n return chalk.green(`${chalk.bold(title)}\\n${output}`);\n };\n const getFailedOutput = () => {\n if (!failed.length) return '';\n const title = 'the following cache(s) failed to clear:';\n const output = failed.map((str) => ` X ${str}`).join('\\n');\n return chalk.red(`${chalk.bold(title)}\\n${output}`);\n };\n return `${getSuccessOutput()}\\n${getFailedOutput()}`;\n }\n}\n"],"mappings":";;;;;;AACA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAA0B,SAAAC,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAG,gBAAAH,CAAA,EAAAI,CAAA,EAAAC,CAAA,YAAAD,CAAA,GAAAE,cAAA,CAAAF,CAAA,MAAAJ,CAAA,GAAAO,MAAA,CAAAC,cAAA,CAAAR,CAAA,EAAAI,CAAA,IAAAK,KAAA,EAAAJ,CAAA,EAAAK,UAAA,MAAAC,YAAA,MAAAC,QAAA,UAAAZ,CAAA,CAAAI,CAAA,IAAAC,CAAA,EAAAL,CAAA;AAAA,SAAAM,eAAAD,CAAA,QAAAQ,CAAA,GAAAC,YAAA,CAAAT,CAAA,uCAAAQ,CAAA,GAAAA,CAAA,GAAAA,CAAA;AAAA,SAAAC,aAAAT,CAAA,EAAAD,CAAA,2BAAAC,CAAA,KAAAA,CAAA,SAAAA,CAAA,MAAAL,CAAA,GAAAK,CAAA,CAAAU,MAAA,CAAAC,WAAA,kBAAAhB,CAAA,QAAAa,CAAA,GAAAb,CAAA,CAAAiB,IAAA,CAAAZ,CAAA,EAAAD,CAAA,uCAAAS,CAAA,SAAAA,CAAA,YAAAK,SAAA,yEAAAd,CAAA,GAAAe,MAAA,GAAAC,M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CAACL,KAAK,CAAC,KAAKC,MAAM,EAAE,CAAC;IACvD,CAAC;IACD,MAAMK,eAAe,GAAGA,CAAA,KAAM;MAC5B,IAAI,CAACT,MAAM,CAACE,MAAM,EAAE,OAAO,EAAE;MAC7B,MAAMC,KAAK,GAAG,yCAAyC;MACvD,MAAMC,MAAM,GAAGJ,MAAM,CAACK,GAAG,CAAEC,GAAG,IAAK,OAAOA,GAAG,EAAE,CAAC,CAACC,IAAI,CAAC,IAAI,CAAC;MAC3D,OAAOX,gBAAK,CAACE,GAAG,CAAC,GAAGF,gBAAK,CAACY,IAAI,CAACL,KAAK,CAAC,KAAKC,MAAM,EAAE,CAAC;IACrD,CAAC;IACD,OAAO,GAAGH,gBAAgB,CAAC,CAAC,KAAKQ,eAAe,CAAC,CAAC,EAAE;EACtD;AACF;AAACC,OAAA,CAAA1C,OAAA,GAAAmB,aAAA","ignoreList":[]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.workspace_clear-cache@0.0.
|
|
2
|
-
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.workspace_clear-cache@0.0.
|
|
1
|
+
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.workspace_clear-cache@0.0.504/dist/clear-cache.composition.js';
|
|
2
|
+
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.workspace_clear-cache@0.0.504/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,22 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/clear-cache",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.504",
|
|
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.
|
|
9
|
+
"version": "0.0.504"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"chalk": "4.1.2",
|
|
13
13
|
"fs-extra": "10.0.0",
|
|
14
14
|
"@teambit/harmony": "0.4.7",
|
|
15
|
-
"@teambit/scope.modules.find-scope-path": "0.0.
|
|
16
|
-
"@teambit/workspace.modules.
|
|
17
|
-
"@teambit/
|
|
18
|
-
"@teambit/
|
|
19
|
-
"@teambit/
|
|
15
|
+
"@teambit/scope.modules.find-scope-path": "0.0.19",
|
|
16
|
+
"@teambit/workspace.modules.workspace-locator": "0.0.19",
|
|
17
|
+
"@teambit/legacy.consumer": "0.0.75",
|
|
18
|
+
"@teambit/scope.remotes": "0.0.75",
|
|
19
|
+
"@teambit/workspace.modules.fs-cache": "0.0.39"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
22
|
"@types/fs-extra": "9.0.7",
|