@teambit/clear-cache 0.0.406 → 0.0.408

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,4 +1,4 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <testsuites tests="0" failures="0" errors="0" skipped="0">
3
- <testsuite name="teambit.workspace/clear-cache@0.0.406" tests="0" failures="0" errors="0" skipped="0"/>
3
+ <testsuite name="teambit.workspace/clear-cache@0.0.408" tests="0" failures="0" errors="0" skipped="0"/>
4
4
  </testsuites>
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["teambit.workspace/clear-cache-preview"]=t():e["teambit.workspace/clear-cache-preview"]=t()}(self,(()=>(()=>{"use strict";var e={77059:(e,t,o)=>{var r={id:"teambit.workspace/clear-cache@0.0.406",homepage:"https://bit.cloud/teambit/workspace/clear-cache",exported:!0};function n(){const e=c(o(41594));return n=function(){return e},e}function c(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Logo=void 0,n.__bit_component=r,c.__bit_component=r;const i=()=>n().default.createElement("div",{style:{height:"100%",display:"flex",justifyContent:"center"}},n().default.createElement("img",{style:{width:70},src:"https://static.bit.dev/extensions-icons/clean-cache.svg"}));i.__bit_component=r,t.Logo=i},41594:e=>{e.exports=React}},t={};function o(r){var n=t[r];if(void 0!==n)return n.exports;var c=t[r]={exports:{}};return e[r](c,c.exports,o),c.exports}o.d=(e,t)=>{for(var r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};return(()=>{o.r(r),o.d(r,{compositions:()=>d,compositions_metadata:()=>f,overview:()=>u});var e={};o.r(e),o.d(e,{default:()=>l});var t=o(77059);o(41594);const n=MdxJsReact,c=TeambitMdxUiMdxScopeContext;var i=["components"];function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(e[r]=o[r])}return e},a.apply(this,arguments)}var p={},s="wrapper";function l(e){var t=e.components,o=function(e,t){if(null==e)return{};var o,r,n=function(e,t){if(null==e)return{};var o,r,n={},c=Object.keys(e);for(r=0;r<c.length;r++)o=c[r],t.indexOf(o)>=0||(n[o]=e[o]);return n}(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(r=0;r<c.length;r++)o=c[r],t.indexOf(o)>=0||Object.prototype.propertyIsEnumerable.call(e,o)&&(n[o]=e[o])}return n}(e,i);return(0,n.mdx)(s,a({},p,o,{components:t,mdxType:"MDXLayout"}),(0,n.mdx)(c.MDXScopeProvider,{components:{},mdxType:"MDXScopeProvider"}))}l.isMDXComponent=!0;const d=[t],u=[e],f={compositions:[{displayName:"Logo",identifier:"Logo"}]}})(),r})()));
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["teambit.workspace/clear-cache-preview"]=t():e["teambit.workspace/clear-cache-preview"]=t()}(self,(()=>(()=>{"use strict";var e={5275:(e,t,o)=>{var r={id:"teambit.workspace/clear-cache@0.0.408",homepage:"https://bit.cloud/teambit/workspace/clear-cache",exported:!0};function n(){const e=i(o(41594));return n=function(){return e},e}function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Logo=void 0,n.__bit_component=r,i.__bit_component=r;const c=()=>n().default.createElement("div",{style:{height:"100%",display:"flex",justifyContent:"center"}},n().default.createElement("img",{style:{width:70},src:"https://static.bit.dev/extensions-icons/clean-cache.svg"}));c.__bit_component=r,t.Logo=c},41594:e=>{e.exports=React}},t={};function o(r){var n=t[r];if(void 0!==n)return n.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,o),i.exports}o.d=(e,t)=>{for(var r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};return(()=>{o.r(r),o.d(r,{compositions:()=>u,compositions_metadata:()=>f,overview:()=>d});var e={};o.r(e),o.d(e,{default:()=>l});var t=o(5275);o(41594);const n=MdxJsReact,i=TeambitMdxUiMdxScopeContext;var c=["components"];function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var r in o)({}).hasOwnProperty.call(o,r)&&(e[r]=o[r])}return e},a.apply(null,arguments)}var p={},s="wrapper";function l(e){var t=e.components,o=function(e,t){if(null==e)return{};var o,r,n=function(e,t){if(null==e)return{};var o={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;o[r]=e[r]}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)o=i[r],t.indexOf(o)>=0||{}.propertyIsEnumerable.call(e,o)&&(n[o]=e[o])}return n}(e,c);return(0,n.mdx)(s,a({},p,o,{components:t,mdxType:"MDXLayout"}),(0,n.mdx)(i.MDXScopeProvider,{components:{},mdxType:"MDXScopeProvider"}))}l.isMDXComponent=!0;const u=[t],d=[e],f={compositions:[{displayName:"Logo",identifier:"Logo"}]}})(),r})()));
@@ -14,224 +14,238 @@
14
14
  },
15
15
  "exports": [
16
16
  {
17
- "__schema": "ClassSchema",
17
+ "__schema": "ExportSchema",
18
18
  "location": {
19
- "filePath": "clear-cache.main.runtime.ts",
20
- "line": 12,
21
- "character": 1
19
+ "filePath": "index.ts",
20
+ "line": 3,
21
+ "character": 15
22
22
  },
23
- "doc": {
24
- "__schema": "DocSchema",
23
+ "name": "ClearCacheMain",
24
+ "exportNode": {
25
+ "__schema": "ClassSchema",
25
26
  "location": {
26
27
  "filePath": "clear-cache.main.runtime.ts",
27
- "line": 8,
28
+ "line": 12,
28
29
  "character": 1
29
30
  },
30
- "raw": "/**\n * avoid adding `workspace` / `scope` aspects as dependencies to this aspect.\n * the clear-cache command is often being used when the workspace/scope is not working properly.\n */",
31
- "comment": "avoid adding `workspace` / `scope` aspects as dependencies to this aspect.\nthe clear-cache command is often being used when the workspace/scope is not working properly."
32
- },
33
- "signature": "class ClearCacheMain",
34
- "name": "ClearCacheMain",
35
- "members": [
36
- {
37
- "__schema": "FunctionLikeSchema",
31
+ "doc": {
32
+ "__schema": "DocSchema",
38
33
  "location": {
39
34
  "filePath": "clear-cache.main.runtime.ts",
40
- "line": 13,
41
- "character": 3
35
+ "line": 8,
36
+ "character": 1
42
37
  },
43
- "signature": "(method) ClearCacheMain.clearCache(): Promise<CacheClearResult>",
44
- "name": "clearCache",
45
- "params": [],
46
- "returnType": {
47
- "__schema": "TypeRefSchema",
38
+ "raw": "/**\n * avoid adding `workspace` / `scope` aspects as dependencies to this aspect.\n * the clear-cache command is often being used when the workspace/scope is not working properly.\n */",
39
+ "comment": "avoid adding `workspace` / `scope` aspects as dependencies to this aspect.\nthe clear-cache command is often being used when the workspace/scope is not working properly."
40
+ },
41
+ "signature": "class ClearCacheMain",
42
+ "name": "ClearCacheMain",
43
+ "members": [
44
+ {
45
+ "__schema": "FunctionLikeSchema",
48
46
  "location": {
49
47
  "filePath": "clear-cache.main.runtime.ts",
50
48
  "line": 13,
51
- "character": 23
49
+ "character": 3
52
50
  },
53
- "name": "Promise",
54
- "typeArgs": [
51
+ "signature": "(method) ClearCacheMain.clearCache(): Promise<CacheClearResult>",
52
+ "name": "clearCache",
53
+ "params": [],
54
+ "returnType": {
55
+ "__schema": "TypeRefSchema",
56
+ "location": {
57
+ "filePath": "clear-cache.main.runtime.ts",
58
+ "line": 13,
59
+ "character": 23
60
+ },
61
+ "name": "Promise",
62
+ "typeArgs": [
63
+ {
64
+ "__schema": "TypeRefSchema",
65
+ "location": {
66
+ "filePath": "clear-cache.main.runtime.ts",
67
+ "line": 13,
68
+ "character": 31
69
+ },
70
+ "name": "CacheClearResult",
71
+ "packageName": "@teambit/legacy/dist/api/consumer/lib/clear-cache"
72
+ }
73
+ ]
74
+ },
75
+ "modifiers": [
76
+ "async"
77
+ ]
78
+ },
79
+ {
80
+ "__schema": "FunctionLikeSchema",
81
+ "location": {
82
+ "filePath": "clear-cache.main.runtime.ts",
83
+ "line": 17,
84
+ "character": 3
85
+ },
86
+ "signature": "(method) ClearCacheMain.clearRemoteCache(remote: string): Promise<unknown>",
87
+ "name": "clearRemoteCache",
88
+ "params": [
55
89
  {
56
- "__schema": "TypeRefSchema",
90
+ "__schema": "ParameterSchema",
57
91
  "location": {
58
92
  "filePath": "clear-cache.main.runtime.ts",
59
- "line": 13,
60
- "character": 31
93
+ "line": 17,
94
+ "character": 26
61
95
  },
62
- "name": "CacheClearResult"
96
+ "name": "remote",
97
+ "type": {
98
+ "__schema": "KeywordTypeSchema",
99
+ "location": {
100
+ "filePath": "clear-cache.main.runtime.ts",
101
+ "line": 17,
102
+ "character": 34
103
+ },
104
+ "name": "string"
105
+ },
106
+ "isOptional": false,
107
+ "isSpread": false
63
108
  }
64
- ]
65
- },
66
- "modifiers": [
67
- "async"
68
- ]
69
- },
70
- {
71
- "__schema": "FunctionLikeSchema",
72
- "location": {
73
- "filePath": "clear-cache.main.runtime.ts",
74
- "line": 17,
75
- "character": 3
76
- },
77
- "signature": "(method) ClearCacheMain.clearRemoteCache(remote: string): Promise<unknown>",
78
- "name": "clearRemoteCache",
79
- "params": [
80
- {
81
- "__schema": "ParameterSchema",
109
+ ],
110
+ "returnType": {
111
+ "__schema": "InferenceTypeSchema",
82
112
  "location": {
83
113
  "filePath": "clear-cache.main.runtime.ts",
84
114
  "line": 17,
85
- "character": 26
86
- },
87
- "name": "remote",
88
- "type": {
89
- "__schema": "KeywordTypeSchema",
90
- "location": {
91
- "filePath": "clear-cache.main.runtime.ts",
92
- "line": 17,
93
- "character": 34
94
- },
95
- "name": "string"
115
+ "character": 3
96
116
  },
97
- "isOptional": false,
98
- "isSpread": false
99
- }
100
- ],
101
- "returnType": {
102
- "__schema": "InferenceTypeSchema",
103
- "location": {
104
- "filePath": "clear-cache.main.runtime.ts",
105
- "line": 17,
106
- "character": 3
117
+ "type": "Promise<unknown>"
107
118
  },
108
- "type": "Promise<unknown>"
109
- },
110
- "modifiers": [
111
- "async"
112
- ]
113
- },
114
- {
115
- "__schema": "VariableLikeSchema",
116
- "location": {
117
- "filePath": "clear-cache.main.runtime.ts",
118
- "line": 32,
119
- "character": 3
119
+ "modifiers": [
120
+ "async"
121
+ ]
120
122
  },
121
- "signature": "(property) ClearCacheMain.slots: never[]",
122
- "name": "slots",
123
- "type": {
124
- "__schema": "InferenceTypeSchema",
123
+ {
124
+ "__schema": "VariableLikeSchema",
125
125
  "location": {
126
126
  "filePath": "clear-cache.main.runtime.ts",
127
127
  "line": 32,
128
128
  "character": 3
129
129
  },
130
- "type": "never[]"
131
- },
132
- "isOptional": true,
133
- "defaultValue": "[]"
134
- },
135
- {
136
- "__schema": "VariableLikeSchema",
137
- "location": {
138
- "filePath": "clear-cache.main.runtime.ts",
139
- "line": 33,
140
- "character": 3
130
+ "signature": "(property) ClearCacheMain.slots: never[]",
131
+ "name": "slots",
132
+ "type": {
133
+ "__schema": "InferenceTypeSchema",
134
+ "location": {
135
+ "filePath": "clear-cache.main.runtime.ts",
136
+ "line": 32,
137
+ "character": 3
138
+ },
139
+ "type": "never[]"
140
+ },
141
+ "isOptional": true,
142
+ "defaultValue": "[]"
141
143
  },
142
- "signature": "(property) ClearCacheMain.dependencies: Aspect[]",
143
- "name": "dependencies",
144
- "type": {
145
- "__schema": "InferenceTypeSchema",
144
+ {
145
+ "__schema": "VariableLikeSchema",
146
146
  "location": {
147
147
  "filePath": "clear-cache.main.runtime.ts",
148
148
  "line": 33,
149
149
  "character": 3
150
150
  },
151
- "type": "Aspect[]"
152
- },
153
- "isOptional": true,
154
- "defaultValue": "[CLIAspect]"
155
- },
156
- {
157
- "__schema": "VariableLikeSchema",
158
- "location": {
159
- "filePath": "clear-cache.main.runtime.ts",
160
- "line": 34,
161
- "character": 3
151
+ "signature": "(property) ClearCacheMain.dependencies: Aspect[]",
152
+ "name": "dependencies",
153
+ "type": {
154
+ "__schema": "InferenceTypeSchema",
155
+ "location": {
156
+ "filePath": "clear-cache.main.runtime.ts",
157
+ "line": 33,
158
+ "character": 3
159
+ },
160
+ "type": "Aspect[]"
161
+ },
162
+ "isOptional": true,
163
+ "defaultValue": "[CLIAspect]"
162
164
  },
163
- "signature": "(property) ClearCacheMain.runtime: RuntimeDefinition",
164
- "name": "runtime",
165
- "type": {
166
- "__schema": "InferenceTypeSchema",
165
+ {
166
+ "__schema": "VariableLikeSchema",
167
167
  "location": {
168
168
  "filePath": "clear-cache.main.runtime.ts",
169
169
  "line": 34,
170
170
  "character": 3
171
171
  },
172
- "type": "RuntimeDefinition"
173
- },
174
- "isOptional": true,
175
- "defaultValue": "MainRuntime"
176
- },
177
- {
178
- "__schema": "FunctionLikeSchema",
179
- "location": {
180
- "filePath": "clear-cache.main.runtime.ts",
181
- "line": 35,
182
- "character": 3
183
- },
184
- "signature": "(method) ClearCacheMain.provider([cli]: [CLIMain]): Promise<ClearCacheMain>",
185
- "name": "provider",
186
- "params": [
187
- {
188
- "__schema": "ParameterSchema",
172
+ "signature": "(property) ClearCacheMain.runtime: RuntimeDefinition",
173
+ "name": "runtime",
174
+ "type": {
175
+ "__schema": "InferenceTypeSchema",
189
176
  "location": {
190
177
  "filePath": "clear-cache.main.runtime.ts",
191
- "line": 35,
192
- "character": 25
178
+ "line": 34,
179
+ "character": 3
193
180
  },
194
- "name": "[ cli ]",
195
- "type": {
196
- "__schema": "TupleTypeSchema",
181
+ "type": "RuntimeDefinition"
182
+ },
183
+ "isOptional": true,
184
+ "defaultValue": "MainRuntime"
185
+ },
186
+ {
187
+ "__schema": "FunctionLikeSchema",
188
+ "location": {
189
+ "filePath": "clear-cache.main.runtime.ts",
190
+ "line": 35,
191
+ "character": 3
192
+ },
193
+ "signature": "(method) ClearCacheMain.provider([cli]: [CLIMain]): Promise<ClearCacheMain>",
194
+ "name": "provider",
195
+ "params": [
196
+ {
197
+ "__schema": "ParameterSchema",
197
198
  "location": {
198
199
  "filePath": "clear-cache.main.runtime.ts",
199
200
  "line": 35,
200
- "character": 32
201
+ "character": 25
201
202
  },
202
- "elements": [
203
- {
204
- "__schema": "TypeRefSchema",
205
- "location": {
206
- "filePath": "clear-cache.main.runtime.ts",
207
- "line": 35,
208
- "character": 33
209
- },
210
- "name": "CLIMain"
211
- }
212
- ]
203
+ "name": "[ cli ]",
204
+ "type": {
205
+ "__schema": "TupleTypeSchema",
206
+ "location": {
207
+ "filePath": "clear-cache.main.runtime.ts",
208
+ "line": 35,
209
+ "character": 32
210
+ },
211
+ "elements": [
212
+ {
213
+ "__schema": "TypeRefSchema",
214
+ "location": {
215
+ "filePath": "clear-cache.main.runtime.ts",
216
+ "line": 35,
217
+ "character": 33
218
+ },
219
+ "name": "CLIMain",
220
+ "componentId": {
221
+ "scope": "teambit.harmony",
222
+ "name": "cli"
223
+ }
224
+ }
225
+ ]
226
+ },
227
+ "isOptional": false,
228
+ "isSpread": false
229
+ }
230
+ ],
231
+ "returnType": {
232
+ "__schema": "InferenceTypeSchema",
233
+ "location": {
234
+ "filePath": "clear-cache.main.runtime.ts",
235
+ "line": 35,
236
+ "character": 3
213
237
  },
214
- "isOptional": false,
215
- "isSpread": false
216
- }
217
- ],
218
- "returnType": {
219
- "__schema": "InferenceTypeSchema",
220
- "location": {
221
- "filePath": "clear-cache.main.runtime.ts",
222
- "line": 35,
223
- "character": 3
238
+ "type": "Promise<ClearCacheMain>"
224
239
  },
225
- "type": "Promise<ClearCacheMain>"
226
- },
227
- "modifiers": [
228
- "static",
229
- "async"
230
- ]
231
- }
232
- ],
233
- "extendsNodes": [],
234
- "implementNodes": []
240
+ "modifiers": [
241
+ "static",
242
+ "async"
243
+ ]
244
+ }
245
+ ],
246
+ "extendsNodes": [],
247
+ "implementNodes": []
248
+ }
235
249
  },
236
250
  {
237
251
  "__schema": "UnImplementedSchema",
@@ -244,30 +258,39 @@
244
258
  "type": "Identifier"
245
259
  },
246
260
  {
247
- "__schema": "VariableLikeSchema",
261
+ "__schema": "ExportSchema",
248
262
  "location": {
249
- "filePath": "clear-cache.aspect.ts",
250
- "line": 3,
251
- "character": 14
263
+ "filePath": "index.ts",
264
+ "line": 5,
265
+ "character": 10
252
266
  },
253
- "signature": "const ClearCacheAspect: Aspect",
254
267
  "name": "ClearCacheAspect",
255
- "type": {
256
- "__schema": "TypeRefSchema",
268
+ "exportNode": {
269
+ "__schema": "VariableLikeSchema",
257
270
  "location": {
258
271
  "filePath": "clear-cache.aspect.ts",
259
272
  "line": 3,
260
273
  "character": 14
261
274
  },
262
- "name": "Aspect",
263
- "componentId": {
264
- "scope": "teambit.harmony",
265
- "name": "harmony",
266
- "version": "0.4.6"
267
- }
268
- },
269
- "isOptional": false,
270
- "defaultValue": "Aspect.create({\n id: 'teambit.bit/clear-cache',\n})"
275
+ "signature": "const ClearCacheAspect: Aspect",
276
+ "name": "ClearCacheAspect",
277
+ "type": {
278
+ "__schema": "TypeRefSchema",
279
+ "location": {
280
+ "filePath": "clear-cache.aspect.ts",
281
+ "line": 3,
282
+ "character": 14
283
+ },
284
+ "name": "Aspect",
285
+ "componentId": {
286
+ "scope": "teambit.harmony",
287
+ "name": "harmony",
288
+ "version": "0.4.6"
289
+ }
290
+ },
291
+ "isOptional": false,
292
+ "defaultValue": "Aspect.create({\n id: 'teambit.bit/clear-cache',\n})"
293
+ }
271
294
  }
272
295
  ],
273
296
  "internals": []
@@ -327,7 +350,8 @@
327
350
  "line": 13,
328
351
  "character": 31
329
352
  },
330
- "name": "CacheClearResult"
353
+ "name": "CacheClearResult",
354
+ "packageName": "@teambit/legacy/dist/api/consumer/lib/clear-cache"
331
355
  }
332
356
  ]
333
357
  },
@@ -475,7 +499,11 @@
475
499
  "line": 35,
476
500
  "character": 33
477
501
  },
478
- "name": "CLIMain"
502
+ "name": "CLIMain",
503
+ "componentId": {
504
+ "scope": "teambit.harmony",
505
+ "name": "cli"
506
+ }
479
507
  }
480
508
  ]
481
509
  },
@@ -556,7 +584,7 @@
556
584
  "componentId": {
557
585
  "scope": "teambit.workspace",
558
586
  "name": "clear-cache",
559
- "version": "0.0.406"
587
+ "version": "0.0.408"
560
588
  },
561
589
  "taggedModuleExports": []
562
590
  }
@@ -0,0 +1,18 @@
1
+ import { Command, CommandOptions } from '@teambit/cli';
2
+ import { ClearCacheMain } from './clear-cache.main.runtime';
3
+ export default class ClearCacheCmd implements Command {
4
+ private clearCache;
5
+ name: string;
6
+ description: string;
7
+ group: string;
8
+ extendedDescription: string;
9
+ alias: string;
10
+ options: CommandOptions;
11
+ loader: boolean;
12
+ skipWorkspace: boolean;
13
+ helpUrl: string;
14
+ constructor(clearCache: ClearCacheMain);
15
+ report(arg: any, { remote }: {
16
+ remote?: string;
17
+ }): Promise<string>;
18
+ }
@@ -11,8 +11,8 @@ function _chalk() {
11
11
  };
12
12
  return data;
13
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; }
14
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
15
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
16
16
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
17
17
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
18
18
  class ClearCacheCmd {
@@ -1 +1 @@
1
- {"version":3,"names":["_chalk","data","_interopRequireDefault","require","obj","__esModule","default","_defineProperty","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","t","i","_toPrimitive","r","e","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 { 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 { 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,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAAA,SAAAG,gBAAAH,GAAA,EAAAI,GAAA,EAAAC,KAAA,IAAAD,GAAA,GAAAE,cAAA,CAAAF,GAAA,OAAAA,GAAA,IAAAJ,GAAA,IAAAO,MAAA,CAAAC,cAAA,CAAAR,GAAA,EAAAI,GAAA,IAAAC,KAAA,EAAAA,KAAA,EAAAI,UAAA,QAAAC,YAAA,QAAAC,QAAA,oBAAAX,GAAA,CAAAI,GAAA,IAAAC,KAAA,WAAAL,GAAA;AAAA,SAAAM,eAAAM,CAAA,QAAAC,CAAA,GAAAC,YAAA,CAAAF,CAAA,uCAAAC,CAAA,GAAAA,CAAA,GAAAA,CAAA;AAAA,SAAAC,aAAAF,CAAA,EAAAG,CAAA,2BAAAH,CAAA,KAAAA,CAAA,SAAAA,CAAA,MAAAI,CAAA,GAAAJ,CAAA,CAAAK,MAAA,CAAAC,WAAA,kBAAAF,CAAA,QAAAH,CAAA,GAAAG,CAAA,CAAAG,IAAA,CAAAP,CAAA,EAAAG,CAAA,uCAAAF,CAAA,SAAAA,CAAA,YAAAO,SAAA,yEAAAL,CAAA,GAAAM,MAAA,GAAAC,MAAA,EAAAV,CAAA;AAGX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,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,IAAM,OAAMA,GAAI,EAAC,CAAC,CAACC,IAAI,CAAC,IAAI,CAAC;MAC3D,OAAOX,gBAAK,CAACE,GAAG,CAAE,GAAEF,gBAAK,CAACY,IAAI,CAACL,KAAK,CAAE,KAAIC,MAAO,EAAC,CAAC;IACrD,CAAC;IACD,OAAQ,GAAEH,gBAAgB,CAAC,CAAE,KAAIQ,eAAe,CAAC,CAAE,EAAC;EACtD;AACF;AAACC,OAAA,CAAA5C,OAAA,GAAAqB,aAAA","ignoreList":[]}
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 { 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 { 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,CA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ACG,MAAM,EAAE,OAAO,EAAE;MAC9B,MAAMC,KAAK,GAAG,2CAA2C;MACzD,MAAMC,MAAM,GAAGL,OAAO,CAACM,GAAG,CAAEC,GAAG,IAAK,OAAOA,GAAG,EAAE,CAAC,CAACC,IAAI,CAAC,IAAI,CAAC;MAC5D,OAAOX,gBAAK,CAACC,KAAK,CAAC,GAAGD,gBAAK,CAACY,IAAI,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":[]}
@@ -0,0 +1,2 @@
1
+ import { Aspect } from '@teambit/harmony';
2
+ export declare const ClearCacheAspect: Aspect;
@@ -0,0 +1 @@
1
+ export declare const Logo: () => import("react/jsx-runtime").JSX.Element;
@@ -11,7 +11,7 @@ function _react() {
11
11
  };
12
12
  return data;
13
13
  }
14
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
14
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
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","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","ignoreList":[]}
1
+ {"version":3,"names":["_react","data","_interopRequireDefault","require","e","__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,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;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","ignoreList":[]}
@@ -0,0 +1,15 @@
1
+ import { CLIMain } from '@teambit/cli';
2
+ import { CacheClearResult } from '@teambit/legacy/dist/api/consumer/lib/clear-cache';
3
+ /**
4
+ * avoid adding `workspace` / `scope` aspects as dependencies to this aspect.
5
+ * the clear-cache command is often being used when the workspace/scope is not working properly.
6
+ */
7
+ export declare class ClearCacheMain {
8
+ clearCache(): Promise<CacheClearResult>;
9
+ clearRemoteCache(remote: string): Promise<unknown>;
10
+ private getConsumerGracefully;
11
+ static slots: never[];
12
+ static dependencies: import("@teambit/harmony").Aspect[];
13
+ static runtime: import("@teambit/harmony").RuntimeDefinition;
14
+ static provider([cli]: [CLIMain]): Promise<ClearCacheMain>;
15
+ }
@@ -46,8 +46,8 @@ function _clearCache2() {
46
46
  };
47
47
  return data;
48
48
  }
49
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
50
- 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; }
49
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
50
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
51
51
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
52
52
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
53
53
  /**
@@ -1 +1 @@
1
- {"version":3,"names":["_cli","data","require","_clearCache","_getRemoteByName","_interopRequireDefault","_consumer","_clearCacheCmd","_clearCache2","obj","__esModule","default","_defineProperty","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","t","i","_toPrimitive","r","e","Symbol","toPrimitive","call","TypeError","String","Number","ClearCacheMain","clearCache","clearRemoteCache","remote","maybeConsumer","getConsumerGracefully","remoteObj","getRemoteByName","result","action","loadConsumerIfExist","err","undefined","provider","cli","clearCacheMain","register","ClearCacheCmd","exports","CLIAspect","MainRuntime","ClearCacheAspect","addRuntime"],"sources":["clear-cache.main.runtime.ts"],"sourcesContent":["import { CLIAspect, CLIMain, MainRuntime } from '@teambit/cli';\nimport { clearCache, CacheClearResult } from '@teambit/legacy/dist/api/consumer/lib/clear-cache';\nimport getRemoteByName from '@teambit/legacy/dist/remotes/get-remote-by-name';\nimport { loadConsumerIfExist, Consumer } from '@teambit/legacy/dist/consumer';\nimport ClearCacheCmd from './clear-cache-cmd';\nimport { ClearCacheAspect } from './clear-cache.aspect';\n\n/**\n * avoid adding `workspace` / `scope` aspects as dependencies to this aspect.\n * the clear-cache command is often being used when the workspace/scope is not working properly.\n */\nexport class ClearCacheMain {\n async clearCache(): Promise<CacheClearResult> {\n return clearCache();\n }\n\n async clearRemoteCache(remote: string) {\n const maybeConsumer = await this.getConsumerGracefully();\n const remoteObj = await getRemoteByName(remote, maybeConsumer);\n const result = await remoteObj.action('ClearCacheAction', {});\n return result;\n }\n\n private async getConsumerGracefully(): Promise<Consumer | undefined> {\n try {\n return await loadConsumerIfExist();\n } catch (err: any) {\n return undefined;\n }\n }\n\n static slots = [];\n static dependencies = [CLIAspect];\n static runtime = MainRuntime;\n static async provider([cli]: [CLIMain]) {\n const clearCacheMain = new ClearCacheMain();\n cli.register(new ClearCacheCmd(clearCacheMain));\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,YAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,WAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,iBAAA;EAAA,MAAAH,IAAA,GAAAI,sBAAA,CAAAH,OAAA;EAAAE,gBAAA,YAAAA,CAAA;IAAA,OAAAH,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,eAAA;EAAA,MAAAN,IAAA,GAAAI,sBAAA,CAAAH,OAAA;EAAAK,cAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAO,aAAA;EAAA,MAAAP,IAAA,GAAAC,OAAA;EAAAM,YAAA,YAAAA,CAAA;IAAA,OAAAP,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAAwD,SAAAI,uBAAAI,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAAA,SAAAG,gBAAAH,GAAA,EAAAI,GAAA,EA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AOC,SAAS;IAClB;EACF;EAKA,aAAaC,QAAQA,CAAC,CAACC,GAAG,CAAY,EAAE;IACtC,MAAMC,cAAc,GAAG,IAAIf,cAAc,CAAC,CAAC;IAC3Cc,GAAG,CAACE,QAAQ,CAAC,KAAIC,wBAAa,EAACF,cAAc,CAAC,CAAC;IAC/C,OAAOA,cAAc;EACvB;AACF;AAACG,OAAA,CAAAlB,cAAA,GAAAA,cAAA;AAAApB,eAAA,CA5BYoB,cAAc,WAoBV,EAAE;AAAApB,eAAA,CApBNoB,cAAc,kBAqBH,CAACmB,gBAAS,CAAC;AAAAvC,eAAA,CArBtBoB,cAAc,aAsBRoB,kBAAW;AAQ9BC,+BAAgB,CAACC,UAAU,CAACtB,cAAc,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_cli","data","require","_clearCache","_getRemoteByName","_interopRequireDefault","_consumer","_clearCacheCmd","_clearCache2","e","__esModule","default","_defineProperty","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","ClearCacheMain","clearCache","clearRemoteCache","remote","maybeConsumer","getConsumerGracefully","remoteObj","getRemoteByName","result","action","loadConsumerIfExist","err","undefined","provider","cli","clearCacheMain","register","ClearCacheCmd","exports","CLIAspect","MainRuntime","ClearCacheAspect","addRuntime"],"sources":["clear-cache.main.runtime.ts"],"sourcesContent":["import { CLIAspect, CLIMain, MainRuntime } from '@teambit/cli';\nimport { clearCache, CacheClearResult } from '@teambit/legacy/dist/api/consumer/lib/clear-cache';\nimport getRemoteByName from '@teambit/legacy/dist/remotes/get-remote-by-name';\nimport { loadConsumerIfExist, Consumer } from '@teambit/legacy/dist/consumer';\nimport ClearCacheCmd from './clear-cache-cmd';\nimport { ClearCacheAspect } from './clear-cache.aspect';\n\n/**\n * avoid adding `workspace` / `scope` aspects as dependencies to this aspect.\n * the clear-cache command is often being used when the workspace/scope is not working properly.\n */\nexport class ClearCacheMain {\n async clearCache(): Promise<CacheClearResult> {\n return clearCache();\n }\n\n async clearRemoteCache(remote: string) {\n const maybeConsumer = await this.getConsumerGracefully();\n const remoteObj = await getRemoteByName(remote, maybeConsumer);\n const result = await remoteObj.action('ClearCacheAction', {});\n return result;\n }\n\n private async getConsumerGracefully(): Promise<Consumer | undefined> {\n try {\n return await loadConsumerIfExist();\n } catch (err: any) {\n return undefined;\n }\n }\n\n static slots = [];\n static dependencies = [CLIAspect];\n static runtime = MainRuntime;\n static async provider([cli]: [CLIMain]) {\n const clearCacheMain = new ClearCacheMain();\n cli.register(new ClearCacheCmd(clearCacheMain));\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,YAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,WAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,iBAAA;EAAA,MAAAH,IAAA,GAAAI,sBAAA,CAAAH,OAAA;EAAAE,gBAAA,YAAAA,CAAA;IAAA,OAAAH,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,eAAA;EAAA,MAAAN,IAAA,GAAAI,sBAAA,CAAAH,OAAA;EAAAK,cAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAO,aAAA;EAAA,MAAAP,IAAA,GAAAC,OAAA;EAAAM,YAAA,YAAAA,CAAA;IAAA,OAAAP,IAAA;EAAA;EAAA,OAAAA,IAAA;A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MAAM;EACf;EAEA,MAAcH,qBAAqBA,CAAA,EAAkC;IACnE,IAAI;MACF,OAAO,MAAM,IAAAK,+BAAmB,EAAC,CAAC;IACpC,CAAC,CAAC,OAAOC,GAAQ,EAAE;MACjB,OAAOC,SAAS;IAClB;EACF;EAKA,aAAaC,QAAQA,CAAC,CAACC,GAAG,CAAY,EAAE;IACtC,MAAMC,cAAc,GAAG,IAAIf,cAAc,CAAC,CAAC;IAC3Cc,GAAG,CAACE,QAAQ,CAAC,KAAIC,wBAAa,EAACF,cAAc,CAAC,CAAC;IAC/C,OAAOA,cAAc;EACvB;AACF;AAACG,OAAA,CAAAlB,cAAA,GAAAA,cAAA;AAAAlB,eAAA,CA5BYkB,cAAc,WAoBV,EAAE;AAAAlB,eAAA,CApBNkB,cAAc,kBAqBH,CAACmB,gBAAS,CAAC;AAAArC,eAAA,CArBtBkB,cAAc,aAsBRoB,kBAAW;AAQ9BC,+BAAgB,CAACC,UAAU,CAACtB,cAAc,CAAC","ignoreList":[]}
@@ -0,0 +1,4 @@
1
+ import { ClearCacheAspect } from './clear-cache.aspect';
2
+ export type { ClearCacheMain } from './clear-cache.main.runtime';
3
+ export default ClearCacheAspect;
4
+ export { ClearCacheAspect };
@@ -1,5 +1,5 @@
1
- import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.workspace_clear-cache@0.0.406/dist/clear-cache.composition.js';
2
- import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.workspace_clear-cache@0.0.406/dist/clear-cache.docs.mdx';
1
+ import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.workspace_clear-cache@0.0.408/dist/clear-cache.composition.js';
2
+ import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.workspace_clear-cache@0.0.408/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,12 +1,12 @@
1
1
  {
2
2
  "name": "@teambit/clear-cache",
3
- "version": "0.0.406",
3
+ "version": "0.0.408",
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.406"
9
+ "version": "0.0.408"
10
10
  },
11
11
  "dependencies": {
12
12
  "chalk": "2.4.2",
@@ -15,7 +15,7 @@
15
15
  "devDependencies": {
16
16
  "@types/mocha": "9.1.0",
17
17
  "chai": "4.3.0",
18
- "@teambit/harmony.envs.core-aspect-env": "0.0.30"
18
+ "@teambit/harmony.envs.core-aspect-env": "0.0.38"
19
19
  },
20
20
  "peerDependencies": {
21
21
  "react": "^17.0.0 || ^18.0.0",
package/tsconfig.json CHANGED
@@ -20,8 +20,7 @@
20
20
  "emitDeclarationOnly": true,
21
21
  "strict": true,
22
22
  "strictPropertyInitialization": false,
23
- "noImplicitAny": false,
24
- "composite": true
23
+ "noImplicitAny": false
25
24
  },
26
25
  "exclude": [
27
26
  "artifacts",
@@ -36,6 +35,5 @@
36
35
  "include": [
37
36
  "**/*",
38
37
  "**/*.json"
39
- ],
40
- "references": []
38
+ ]
41
39
  }