@teambit/cache 0.0.954 → 0.0.956

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,7 +1,7 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <testsuites tests="2" failures="0" errors="0" skipped="0">
3
- <testsuite name="teambit.harmony/cache@0.0.954" tests="2" failures="0" errors="0" skipped="0">
4
- <testcase classname="dist/cache.spec.js" name="it should set cache with ttl" time="0.086"/>
3
+ <testsuite name="teambit.harmony/cache@0.0.956" tests="2" failures="0" errors="0" skipped="0">
4
+ <testcase classname="dist/cache.spec.js" name="it should set cache with ttl" time="0.093"/>
5
5
  <testcase classname="dist/cache.spec.js" name="it should set cache without expire ttl" time="0.002"/>
6
6
  </testsuite>
7
7
  </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.harmony/cache-preview"]=t():e["teambit.harmony/cache-preview"]=t()}(self,(()=>(()=>{"use strict";var e={93454:(e,t,o)=>{var r={id:"teambit.harmony/cache@0.0.954",homepage:"https://bit.cloud/teambit/harmony/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/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:()=>l,overview:()=>f});var e={};o.r(e),o.d(e,{default:()=>d});var t=o(93454);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)Object.prototype.hasOwnProperty.call(o,r)&&(e[r]=o[r])}return e},a.apply(this,arguments)}var p={},s="wrapper";function d(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={},i=Object.keys(e);for(r=0;r<i.length;r++)o=i[r],t.indexOf(o)>=0||(n[o]=e[o]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)o=i[r],t.indexOf(o)>=0||Object.prototype.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"}))}d.isMDXComponent=!0;const u=[t],f=[e],l={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.harmony/cache-preview"]=t():e["teambit.harmony/cache-preview"]=t()}(self,(()=>(()=>{"use strict";var e={8417:(e,t,o)=>{var r={id:"teambit.harmony/cache@0.0.956",homepage:"https://bit.cloud/teambit/harmony/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 a=()=>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/cache.svg"}));a.__bit_component=r,t.Logo=a},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:()=>l,overview:()=>f});var e={};o.r(e),o.d(e,{default:()=>d});var t=o(8417);o(41594);const n=MdxJsReact,i=TeambitMdxUiMdxScopeContext;var a=["components"];function c(){return c=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},c.apply(this,arguments)}var p={},s="wrapper";function d(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(Object.prototype.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||Object.prototype.propertyIsEnumerable.call(e,o)&&(n[o]=e[o])}return n}(e,a);return(0,n.mdx)(s,c({},p,o,{components:t,mdxType:"MDXLayout"}),(0,n.mdx)(i.MDXScopeProvider,{components:{},mdxType:"MDXScopeProvider"}))}d.isMDXComponent=!0;const u=[t],f=[e],l={compositions:[{displayName:"Logo",identifier:"Logo"}]}})(),r})()));
@@ -14,416 +14,444 @@
14
14
  },
15
15
  "exports": [
16
16
  {
17
- "__schema": "ClassSchema",
17
+ "__schema": "ExportSchema",
18
18
  "location": {
19
- "filePath": "cache.main.runtime.ts",
20
- "line": 12,
21
- "character": 1
19
+ "filePath": "index.ts",
20
+ "line": 1,
21
+ "character": 15
22
22
  },
23
- "signature": "class CacheMain",
24
23
  "name": "CacheMain",
25
- "members": [
26
- {
27
- "__schema": "VariableLikeSchema",
28
- "location": {
29
- "filePath": "cache.main.runtime.ts",
30
- "line": 13,
31
- "character": 3
32
- },
33
- "signature": "(property) CacheMain.runtime: RuntimeDefinition",
34
- "name": "runtime",
35
- "type": {
36
- "__schema": "InferenceTypeSchema",
24
+ "exportNode": {
25
+ "__schema": "ClassSchema",
26
+ "location": {
27
+ "filePath": "cache.main.runtime.ts",
28
+ "line": 12,
29
+ "character": 1
30
+ },
31
+ "signature": "class CacheMain",
32
+ "name": "CacheMain",
33
+ "members": [
34
+ {
35
+ "__schema": "VariableLikeSchema",
37
36
  "location": {
38
37
  "filePath": "cache.main.runtime.ts",
39
38
  "line": 13,
40
39
  "character": 3
41
40
  },
42
- "type": "RuntimeDefinition"
43
- },
44
- "isOptional": true,
45
- "defaultValue": "MainRuntime"
46
- },
47
- {
48
- "__schema": "ConstructorSchema",
49
- "location": {
50
- "filePath": "cache.main.runtime.ts",
51
- "line": 15,
52
- "character": 3
53
- },
54
- "signature": "constructor CacheMain(config: CacheConfig, logger: Logger): CacheMain",
55
- "name": "constructor",
56
- "params": [
57
- {
58
- "__schema": "ParameterSchema",
41
+ "signature": "(property) CacheMain.runtime: RuntimeDefinition",
42
+ "name": "runtime",
43
+ "type": {
44
+ "__schema": "InferenceTypeSchema",
59
45
  "location": {
60
46
  "filePath": "cache.main.runtime.ts",
61
- "line": 19,
62
- "character": 5
47
+ "line": 13,
48
+ "character": 3
63
49
  },
64
- "name": "config",
65
- "type": {
66
- "__schema": "TypeRefSchema",
50
+ "type": "RuntimeDefinition"
51
+ },
52
+ "isOptional": true,
53
+ "defaultValue": "MainRuntime"
54
+ },
55
+ {
56
+ "__schema": "ConstructorSchema",
57
+ "location": {
58
+ "filePath": "cache.main.runtime.ts",
59
+ "line": 15,
60
+ "character": 3
61
+ },
62
+ "signature": "constructor CacheMain(config: CacheConfig, logger: Logger): CacheMain",
63
+ "name": "constructor",
64
+ "params": [
65
+ {
66
+ "__schema": "ParameterSchema",
67
67
  "location": {
68
68
  "filePath": "cache.main.runtime.ts",
69
69
  "line": 19,
70
- "character": 22
70
+ "character": 5
71
71
  },
72
- "name": "CacheConfig"
73
- },
74
- "isOptional": false,
75
- "isSpread": false
76
- },
77
- {
78
- "__schema": "ParameterSchema",
79
- "location": {
80
- "filePath": "cache.main.runtime.ts",
81
- "line": 24,
82
- "character": 5
72
+ "name": "config",
73
+ "type": {
74
+ "__schema": "TypeRefSchema",
75
+ "location": {
76
+ "filePath": "cache.main.runtime.ts",
77
+ "line": 19,
78
+ "character": 22
79
+ },
80
+ "name": "CacheConfig",
81
+ "internalFilePath": "cache.main.runtime.ts"
82
+ },
83
+ "isOptional": false,
84
+ "isSpread": false
83
85
  },
84
- "name": "logger",
85
- "type": {
86
- "__schema": "TypeRefSchema",
86
+ {
87
+ "__schema": "ParameterSchema",
87
88
  "location": {
88
89
  "filePath": "cache.main.runtime.ts",
89
90
  "line": 24,
90
- "character": 30
91
+ "character": 5
92
+ },
93
+ "name": "logger",
94
+ "type": {
95
+ "__schema": "TypeRefSchema",
96
+ "location": {
97
+ "filePath": "cache.main.runtime.ts",
98
+ "line": 24,
99
+ "character": 30
100
+ },
101
+ "name": "Logger",
102
+ "componentId": {
103
+ "scope": "teambit.harmony",
104
+ "name": "logger"
105
+ }
91
106
  },
92
- "name": "Logger"
107
+ "isOptional": false,
108
+ "isSpread": false
109
+ }
110
+ ],
111
+ "returnType": {
112
+ "__schema": "ThisTypeSchema",
113
+ "location": {
114
+ "filePath": "cache.main.runtime.ts",
115
+ "line": 12,
116
+ "character": 1
93
117
  },
94
- "isOptional": false,
95
- "isSpread": false
96
- }
97
- ],
98
- "returnType": {
99
- "__schema": "ThisTypeSchema",
100
- "location": {
101
- "filePath": "cache.main.runtime.ts",
102
- "line": 12,
103
- "character": 1
118
+ "name": "CacheMain"
104
119
  },
105
- "name": "CacheMain"
106
- },
107
- "modifiers": []
108
- },
109
- {
110
- "__schema": "VariableLikeSchema",
111
- "location": {
112
- "filePath": "cache.main.runtime.ts",
113
- "line": 27,
114
- "character": 3
120
+ "modifiers": []
115
121
  },
116
- "signature": "(property) CacheMain.dependencies: Aspect[]",
117
- "name": "dependencies",
118
- "type": {
119
- "__schema": "InferenceTypeSchema",
122
+ {
123
+ "__schema": "VariableLikeSchema",
120
124
  "location": {
121
125
  "filePath": "cache.main.runtime.ts",
122
126
  "line": 27,
123
127
  "character": 3
124
128
  },
125
- "type": "Aspect[]"
126
- },
127
- "isOptional": true,
128
- "defaultValue": "[LoggerAspect]"
129
- },
130
- {
131
- "__schema": "VariableLikeSchema",
132
- "location": {
133
- "filePath": "cache.main.runtime.ts",
134
- "line": 29,
135
- "character": 3
129
+ "signature": "(property) CacheMain.dependencies: Aspect[]",
130
+ "name": "dependencies",
131
+ "type": {
132
+ "__schema": "InferenceTypeSchema",
133
+ "location": {
134
+ "filePath": "cache.main.runtime.ts",
135
+ "line": 27,
136
+ "character": 3
137
+ },
138
+ "type": "Aspect[]"
139
+ },
140
+ "isOptional": true,
141
+ "defaultValue": "[LoggerAspect]"
136
142
  },
137
- "signature": "(property) CacheMain.defaultConfig: {\n cacheDirectory: string;\n}",
138
- "name": "defaultConfig",
139
- "type": {
140
- "__schema": "InferenceTypeSchema",
143
+ {
144
+ "__schema": "VariableLikeSchema",
141
145
  "location": {
142
146
  "filePath": "cache.main.runtime.ts",
143
147
  "line": 29,
144
148
  "character": 3
145
149
  },
146
- "type": "{\n cacheDirectory: string;\n}"
147
- },
148
- "isOptional": true,
149
- "defaultValue": "{\n cacheDirectory: CACHE_ROOT,\n }"
150
- },
151
- {
152
- "__schema": "FunctionLikeSchema",
153
- "location": {
154
- "filePath": "cache.main.runtime.ts",
155
- "line": 33,
156
- "character": 3
157
- },
158
- "signature": "(method) CacheMain.set(key: string, data: any, ttl?: number): Promise<boolean>",
159
- "name": "set",
160
- "params": [
161
- {
162
- "__schema": "ParameterSchema",
150
+ "signature": "(property) CacheMain.defaultConfig: {\n cacheDirectory: string;\n}",
151
+ "name": "defaultConfig",
152
+ "type": {
153
+ "__schema": "InferenceTypeSchema",
163
154
  "location": {
164
155
  "filePath": "cache.main.runtime.ts",
165
- "line": 33,
166
- "character": 13
167
- },
168
- "name": "key",
169
- "type": {
170
- "__schema": "KeywordTypeSchema",
171
- "location": {
172
- "filePath": "cache.main.runtime.ts",
173
- "line": 33,
174
- "character": 18
175
- },
176
- "name": "string"
156
+ "line": 29,
157
+ "character": 3
177
158
  },
178
- "isOptional": false,
179
- "isSpread": false
159
+ "type": "{\n cacheDirectory: string;\n}"
180
160
  },
181
- {
182
- "__schema": "ParameterSchema",
183
- "location": {
184
- "filePath": "cache.main.runtime.ts",
185
- "line": 33,
186
- "character": 26
187
- },
188
- "name": "data",
189
- "type": {
190
- "__schema": "KeywordTypeSchema",
161
+ "isOptional": true,
162
+ "defaultValue": "{\n cacheDirectory: CACHE_ROOT,\n }"
163
+ },
164
+ {
165
+ "__schema": "FunctionLikeSchema",
166
+ "location": {
167
+ "filePath": "cache.main.runtime.ts",
168
+ "line": 33,
169
+ "character": 3
170
+ },
171
+ "signature": "(method) CacheMain.set(key: string, data: any, ttl?: number): Promise<boolean>",
172
+ "name": "set",
173
+ "params": [
174
+ {
175
+ "__schema": "ParameterSchema",
191
176
  "location": {
192
177
  "filePath": "cache.main.runtime.ts",
193
178
  "line": 33,
194
- "character": 32
179
+ "character": 13
195
180
  },
196
- "name": "any"
197
- },
198
- "isOptional": false,
199
- "isSpread": false
200
- },
201
- {
202
- "__schema": "ParameterSchema",
203
- "location": {
204
- "filePath": "cache.main.runtime.ts",
205
- "line": 33,
206
- "character": 37
181
+ "name": "key",
182
+ "type": {
183
+ "__schema": "KeywordTypeSchema",
184
+ "location": {
185
+ "filePath": "cache.main.runtime.ts",
186
+ "line": 33,
187
+ "character": 18
188
+ },
189
+ "name": "string"
190
+ },
191
+ "isOptional": false,
192
+ "isSpread": false
207
193
  },
208
- "name": "ttl",
209
- "type": {
210
- "__schema": "KeywordTypeSchema",
194
+ {
195
+ "__schema": "ParameterSchema",
211
196
  "location": {
212
197
  "filePath": "cache.main.runtime.ts",
213
198
  "line": 33,
214
- "character": 43
199
+ "character": 26
200
+ },
201
+ "name": "data",
202
+ "type": {
203
+ "__schema": "KeywordTypeSchema",
204
+ "location": {
205
+ "filePath": "cache.main.runtime.ts",
206
+ "line": 33,
207
+ "character": 32
208
+ },
209
+ "name": "any"
215
210
  },
216
- "name": "number"
211
+ "isOptional": false,
212
+ "isSpread": false
217
213
  },
218
- "isOptional": true,
219
- "isSpread": false
220
- }
221
- ],
222
- "returnType": {
223
- "__schema": "TypeRefSchema",
224
- "location": {
225
- "filePath": "cache.main.runtime.ts",
226
- "line": 33,
227
- "character": 52
228
- },
229
- "name": "Promise",
230
- "typeArgs": [
231
214
  {
232
- "__schema": "KeywordTypeSchema",
215
+ "__schema": "ParameterSchema",
233
216
  "location": {
234
217
  "filePath": "cache.main.runtime.ts",
235
218
  "line": 33,
236
- "character": 60
219
+ "character": 37
237
220
  },
238
- "name": "boolean"
221
+ "name": "ttl",
222
+ "type": {
223
+ "__schema": "KeywordTypeSchema",
224
+ "location": {
225
+ "filePath": "cache.main.runtime.ts",
226
+ "line": 33,
227
+ "character": 43
228
+ },
229
+ "name": "number"
230
+ },
231
+ "isOptional": true,
232
+ "isSpread": false
239
233
  }
240
- ]
241
- },
242
- "modifiers": [
243
- "async"
244
- ]
245
- },
246
- {
247
- "__schema": "FunctionLikeSchema",
248
- "location": {
249
- "filePath": "cache.main.runtime.ts",
250
- "line": 42,
251
- "character": 3
252
- },
253
- "signature": "(method) CacheMain.get<T>(key: string): Promise<T | undefined>",
254
- "name": "get",
255
- "params": [
256
- {
257
- "__schema": "ParameterSchema",
234
+ ],
235
+ "returnType": {
236
+ "__schema": "TypeRefSchema",
258
237
  "location": {
259
238
  "filePath": "cache.main.runtime.ts",
260
- "line": 42,
261
- "character": 16
262
- },
263
- "name": "key",
264
- "type": {
265
- "__schema": "KeywordTypeSchema",
266
- "location": {
267
- "filePath": "cache.main.runtime.ts",
268
- "line": 42,
269
- "character": 21
270
- },
271
- "name": "string"
239
+ "line": 33,
240
+ "character": 52
272
241
  },
273
- "isOptional": false,
274
- "isSpread": false
275
- }
276
- ],
277
- "returnType": {
278
- "__schema": "TypeRefSchema",
242
+ "name": "Promise",
243
+ "typeArgs": [
244
+ {
245
+ "__schema": "KeywordTypeSchema",
246
+ "location": {
247
+ "filePath": "cache.main.runtime.ts",
248
+ "line": 33,
249
+ "character": 60
250
+ },
251
+ "name": "boolean"
252
+ }
253
+ ]
254
+ },
255
+ "modifiers": [
256
+ "async"
257
+ ]
258
+ },
259
+ {
260
+ "__schema": "FunctionLikeSchema",
279
261
  "location": {
280
262
  "filePath": "cache.main.runtime.ts",
281
263
  "line": 42,
282
- "character": 30
264
+ "character": 3
283
265
  },
284
- "name": "Promise",
285
- "typeArgs": [
266
+ "signature": "(method) CacheMain.get<T>(key: string): Promise<T | undefined>",
267
+ "name": "get",
268
+ "params": [
286
269
  {
287
- "__schema": "TypeUnionSchema",
270
+ "__schema": "ParameterSchema",
288
271
  "location": {
289
272
  "filePath": "cache.main.runtime.ts",
290
273
  "line": 42,
291
- "character": 38
292
- },
293
- "types": [
294
- {
295
- "__schema": "TypeRefSchema",
296
- "location": {
297
- "filePath": "cache.main.runtime.ts",
298
- "line": 42,
299
- "character": 38
300
- },
301
- "name": "T"
274
+ "character": 16
275
+ },
276
+ "name": "key",
277
+ "type": {
278
+ "__schema": "KeywordTypeSchema",
279
+ "location": {
280
+ "filePath": "cache.main.runtime.ts",
281
+ "line": 42,
282
+ "character": 21
302
283
  },
303
- {
304
- "__schema": "KeywordTypeSchema",
305
- "location": {
306
- "filePath": "cache.main.runtime.ts",
307
- "line": 42,
308
- "character": 42
309
- },
310
- "name": "undefined"
311
- }
312
- ]
284
+ "name": "string"
285
+ },
286
+ "isOptional": false,
287
+ "isSpread": false
313
288
  }
314
- ]
315
- },
316
- "modifiers": [
317
- "async"
318
- ],
319
- "typeParams": [
320
- "T"
321
- ]
322
- },
323
- {
324
- "__schema": "FunctionLikeSchema",
325
- "location": {
326
- "filePath": "cache.main.runtime.ts",
327
- "line": 60,
328
- "character": 3
329
- },
330
- "signature": "(method) CacheMain.provider([loggerFactory]: [LoggerMain], config: CacheConfig): Promise<CacheMain>",
331
- "name": "provider",
332
- "params": [
333
- {
334
- "__schema": "ParameterSchema",
289
+ ],
290
+ "returnType": {
291
+ "__schema": "TypeRefSchema",
335
292
  "location": {
336
293
  "filePath": "cache.main.runtime.ts",
337
- "line": 60,
338
- "character": 25
294
+ "line": 42,
295
+ "character": 30
339
296
  },
340
- "name": "[ loggerFactory ]",
341
- "type": {
342
- "__schema": "TupleTypeSchema",
297
+ "name": "Promise",
298
+ "typeArgs": [
299
+ {
300
+ "__schema": "TypeUnionSchema",
301
+ "location": {
302
+ "filePath": "cache.main.runtime.ts",
303
+ "line": 42,
304
+ "character": 38
305
+ },
306
+ "types": [
307
+ {
308
+ "__schema": "TypeRefSchema",
309
+ "location": {
310
+ "filePath": "cache.main.runtime.ts",
311
+ "line": 42,
312
+ "character": 38
313
+ },
314
+ "name": "T"
315
+ },
316
+ {
317
+ "__schema": "KeywordTypeSchema",
318
+ "location": {
319
+ "filePath": "cache.main.runtime.ts",
320
+ "line": 42,
321
+ "character": 42
322
+ },
323
+ "name": "undefined"
324
+ }
325
+ ]
326
+ }
327
+ ]
328
+ },
329
+ "modifiers": [
330
+ "async"
331
+ ],
332
+ "typeParams": [
333
+ "T"
334
+ ]
335
+ },
336
+ {
337
+ "__schema": "FunctionLikeSchema",
338
+ "location": {
339
+ "filePath": "cache.main.runtime.ts",
340
+ "line": 60,
341
+ "character": 3
342
+ },
343
+ "signature": "(method) CacheMain.provider([loggerFactory]: [LoggerMain], config: CacheConfig): Promise<CacheMain>",
344
+ "name": "provider",
345
+ "params": [
346
+ {
347
+ "__schema": "ParameterSchema",
343
348
  "location": {
344
349
  "filePath": "cache.main.runtime.ts",
345
350
  "line": 60,
346
- "character": 42
347
- },
348
- "elements": [
349
- {
350
- "__schema": "TypeRefSchema",
351
- "location": {
352
- "filePath": "cache.main.runtime.ts",
353
- "line": 60,
354
- "character": 43
355
- },
356
- "name": "LoggerMain"
357
- }
358
- ]
359
- },
360
- "isOptional": false,
361
- "isSpread": false
362
- },
363
- {
364
- "__schema": "ParameterSchema",
365
- "location": {
366
- "filePath": "cache.main.runtime.ts",
367
- "line": 60,
368
- "character": 56
351
+ "character": 25
352
+ },
353
+ "name": "[ loggerFactory ]",
354
+ "type": {
355
+ "__schema": "TupleTypeSchema",
356
+ "location": {
357
+ "filePath": "cache.main.runtime.ts",
358
+ "line": 60,
359
+ "character": 42
360
+ },
361
+ "elements": [
362
+ {
363
+ "__schema": "TypeRefSchema",
364
+ "location": {
365
+ "filePath": "cache.main.runtime.ts",
366
+ "line": 60,
367
+ "character": 43
368
+ },
369
+ "name": "LoggerMain",
370
+ "componentId": {
371
+ "scope": "teambit.harmony",
372
+ "name": "logger"
373
+ }
374
+ }
375
+ ]
376
+ },
377
+ "isOptional": false,
378
+ "isSpread": false
369
379
  },
370
- "name": "config",
371
- "type": {
372
- "__schema": "TypeRefSchema",
380
+ {
381
+ "__schema": "ParameterSchema",
373
382
  "location": {
374
383
  "filePath": "cache.main.runtime.ts",
375
384
  "line": 60,
376
- "character": 64
385
+ "character": 56
377
386
  },
378
- "name": "CacheConfig"
387
+ "name": "config",
388
+ "type": {
389
+ "__schema": "TypeRefSchema",
390
+ "location": {
391
+ "filePath": "cache.main.runtime.ts",
392
+ "line": 60,
393
+ "character": 64
394
+ },
395
+ "name": "CacheConfig",
396
+ "internalFilePath": "cache.main.runtime.ts"
397
+ },
398
+ "isOptional": false,
399
+ "isSpread": false
400
+ }
401
+ ],
402
+ "returnType": {
403
+ "__schema": "InferenceTypeSchema",
404
+ "location": {
405
+ "filePath": "cache.main.runtime.ts",
406
+ "line": 60,
407
+ "character": 3
379
408
  },
380
- "isOptional": false,
381
- "isSpread": false
382
- }
383
- ],
384
- "returnType": {
385
- "__schema": "InferenceTypeSchema",
386
- "location": {
387
- "filePath": "cache.main.runtime.ts",
388
- "line": 60,
389
- "character": 3
409
+ "type": "Promise<CacheMain>"
390
410
  },
391
- "type": "Promise<CacheMain>"
392
- },
393
- "modifiers": [
394
- "static",
395
- "async"
396
- ]
397
- }
398
- ],
399
- "extendsNodes": [],
400
- "implementNodes": []
411
+ "modifiers": [
412
+ "static",
413
+ "async"
414
+ ]
415
+ }
416
+ ],
417
+ "extendsNodes": [],
418
+ "implementNodes": []
419
+ }
401
420
  },
402
421
  {
403
- "__schema": "VariableLikeSchema",
422
+ "__schema": "ExportSchema",
404
423
  "location": {
405
- "filePath": "cache.aspect.ts",
406
- "line": 3,
407
- "character": 14
424
+ "filePath": "index.ts",
425
+ "line": 2,
426
+ "character": 10
408
427
  },
409
- "signature": "const CacheAspect: Aspect",
410
428
  "name": "CacheAspect",
411
- "type": {
412
- "__schema": "TypeRefSchema",
429
+ "exportNode": {
430
+ "__schema": "VariableLikeSchema",
413
431
  "location": {
414
432
  "filePath": "cache.aspect.ts",
415
433
  "line": 3,
416
434
  "character": 14
417
435
  },
418
- "name": "Aspect",
419
- "componentId": {
420
- "scope": "teambit.harmony",
421
- "name": "harmony",
422
- "version": "0.4.6"
423
- }
424
- },
425
- "isOptional": false,
426
- "defaultValue": "Aspect.create({\n id: 'teambit.harmony/cache',\n dependencies: [],\n defaultConfig: {},\n})"
436
+ "signature": "const CacheAspect: Aspect",
437
+ "name": "CacheAspect",
438
+ "type": {
439
+ "__schema": "TypeRefSchema",
440
+ "location": {
441
+ "filePath": "cache.aspect.ts",
442
+ "line": 3,
443
+ "character": 14
444
+ },
445
+ "name": "Aspect",
446
+ "componentId": {
447
+ "scope": "teambit.harmony",
448
+ "name": "harmony",
449
+ "version": "0.4.6"
450
+ }
451
+ },
452
+ "isOptional": false,
453
+ "defaultValue": "Aspect.create({\n id: 'teambit.harmony/cache',\n dependencies: [],\n defaultConfig: {},\n})"
454
+ }
427
455
  }
428
456
  ],
429
457
  "internals": []
@@ -533,7 +561,8 @@
533
561
  "line": 19,
534
562
  "character": 22
535
563
  },
536
- "name": "CacheConfig"
564
+ "name": "CacheConfig",
565
+ "internalFilePath": "cache.main.runtime.ts"
537
566
  },
538
567
  "isOptional": false,
539
568
  "isSpread": false
@@ -553,7 +582,11 @@
553
582
  "line": 24,
554
583
  "character": 30
555
584
  },
556
- "name": "Logger"
585
+ "name": "Logger",
586
+ "componentId": {
587
+ "scope": "teambit.harmony",
588
+ "name": "logger"
589
+ }
557
590
  },
558
591
  "isOptional": false,
559
592
  "isSpread": false
@@ -817,7 +850,11 @@
817
850
  "line": 60,
818
851
  "character": 43
819
852
  },
820
- "name": "LoggerMain"
853
+ "name": "LoggerMain",
854
+ "componentId": {
855
+ "scope": "teambit.harmony",
856
+ "name": "logger"
857
+ }
821
858
  }
822
859
  ]
823
860
  },
@@ -839,7 +876,8 @@
839
876
  "line": 60,
840
877
  "character": 64
841
878
  },
842
- "name": "CacheConfig"
879
+ "name": "CacheConfig",
880
+ "internalFilePath": "cache.main.runtime.ts"
843
881
  },
844
882
  "isOptional": false,
845
883
  "isSpread": false
@@ -918,7 +956,7 @@
918
956
  "componentId": {
919
957
  "scope": "teambit.harmony",
920
958
  "name": "cache",
921
- "version": "0.0.954"
959
+ "version": "0.0.956"
922
960
  },
923
961
  "taggedModuleExports": []
924
962
  }
@@ -0,0 +1,2 @@
1
+ import { Aspect } from '@teambit/harmony';
2
+ export declare const CacheAspect: Aspect;
@@ -0,0 +1 @@
1
+ export declare const Logo: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,32 @@
1
+ import { Logger, LoggerMain } from '@teambit/logger';
2
+ export type CacheConfig = {
3
+ cacheDirectory: string;
4
+ };
5
+ export declare class CacheMain {
6
+ /**
7
+ * extension config
8
+ */
9
+ readonly config: CacheConfig;
10
+ /**
11
+ * logger extension.
12
+ */
13
+ private readonly logger;
14
+ static runtime: import("@teambit/harmony").RuntimeDefinition;
15
+ constructor(
16
+ /**
17
+ * extension config
18
+ */
19
+ config: CacheConfig,
20
+ /**
21
+ * logger extension.
22
+ */
23
+ logger: Logger);
24
+ static dependencies: import("@teambit/harmony").Aspect[];
25
+ static defaultConfig: {
26
+ cacheDirectory: string;
27
+ };
28
+ set(key: string, data: any, ttl?: number): Promise<boolean>;
29
+ get<T>(key: string): Promise<T | undefined>;
30
+ private get globalCacheFolder();
31
+ static provider([loggerFactory]: [LoggerMain], config: CacheConfig): Promise<CacheMain>;
32
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ export type { CacheMain } from './cache.main.runtime';
2
+ export { CacheAspect } from './cache.aspect';
@@ -1,5 +1,5 @@
1
- import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_cache@0.0.954/dist/cache.composition.js';
2
- import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_cache@0.0.954/dist/cache.docs.mdx';
1
+ import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.harmony_cache@0.0.956/dist/cache.composition.js';
2
+ import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.harmony_cache@0.0.956/dist/cache.docs.mdx';
3
3
 
4
4
  export const compositions = [compositions_0];
5
5
  export const overview = [overview_0];
package/package.json CHANGED
@@ -1,18 +1,18 @@
1
1
  {
2
2
  "name": "@teambit/cache",
3
- "version": "0.0.954",
3
+ "version": "0.0.956",
4
4
  "homepage": "https://bit.cloud/teambit/harmony/cache",
5
5
  "main": "dist/index.js",
6
6
  "componentId": {
7
7
  "scope": "teambit.harmony",
8
8
  "name": "cache",
9
- "version": "0.0.954"
9
+ "version": "0.0.956"
10
10
  },
11
11
  "dependencies": {
12
12
  "cacache": "15.0.5",
13
13
  "@teambit/harmony": "0.4.6",
14
- "@teambit/cli": "0.0.861",
15
- "@teambit/logger": "0.0.954"
14
+ "@teambit/cli": "0.0.863",
15
+ "@teambit/logger": "0.0.956"
16
16
  },
17
17
  "devDependencies": {
18
18
  "@types/cacache": "12.0.1",
@@ -21,7 +21,7 @@
21
21
  "chai": "4.3.0",
22
22
  "uuid": "8.3.2",
23
23
  "@types/mocha": "9.1.0",
24
- "@teambit/harmony.envs.core-aspect-env": "0.0.30"
24
+ "@teambit/harmony.envs.core-aspect-env": "0.0.33"
25
25
  },
26
26
  "peerDependencies": {
27
27
  "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,13 +35,5 @@
36
35
  "include": [
37
36
  "**/*",
38
37
  "**/*.json"
39
- ],
40
- "references": [
41
- {
42
- "path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_cli@0.0.861"
43
- },
44
- {
45
- "path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_logger@0.0.954"
46
- }
47
38
  ]
48
39
  }