@teambit/cache 0.0.942 → 0.0.944

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
- <testsuites>
3
- <testsuite name="teambit.harmony/cache@0.0.942" tests="2" failures="0" errors="0" skipped="0">
4
- <testcase classname="dist/cache.spec.js" name="it should set cache with ttl" time="0.078"/>
2
+ <testsuites tests="2" failures="0" errors="0" skipped="0">
3
+ <testsuite name="teambit.harmony/cache@0.0.944" tests="2" failures="0" errors="0" skipped="0">
4
+ <testcase classname="dist/cache.spec.js" name="it should set cache with ttl" time="0.07"/>
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={61085:(e,t,o)=>{var r={id:"teambit.harmony/cache@0.0.942",homepage:"https://bit.cloud/teambit/harmony/cache",exported:!0};function n(){const e=i(o(87363));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},87363: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(61085);o(87363);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={17792:(e,t,o)=>{var r={id:"teambit.harmony/cache@0.0.944",homepage:"https://bit.cloud/teambit/harmony/cache",exported:!0};function n(){const e=i(o(6376));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},6376: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(17792);o(6376);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})()));
@@ -0,0 +1,924 @@
1
+ {
2
+ "__schema": "APISchema",
3
+ "location": {
4
+ "filePath": "index.ts",
5
+ "line": 1,
6
+ "character": 1
7
+ },
8
+ "module": {
9
+ "__schema": "ModuleSchema",
10
+ "location": {
11
+ "filePath": "index.ts",
12
+ "line": 1,
13
+ "character": 1
14
+ },
15
+ "exports": [
16
+ {
17
+ "__schema": "ClassSchema",
18
+ "location": {
19
+ "filePath": "cache.main.runtime.ts",
20
+ "line": 12,
21
+ "character": 1
22
+ },
23
+ "signature": "class CacheMain",
24
+ "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",
37
+ "location": {
38
+ "filePath": "cache.main.runtime.ts",
39
+ "line": 13,
40
+ "character": 3
41
+ },
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",
59
+ "location": {
60
+ "filePath": "cache.main.runtime.ts",
61
+ "line": 19,
62
+ "character": 5
63
+ },
64
+ "name": "config",
65
+ "type": {
66
+ "__schema": "TypeRefSchema",
67
+ "location": {
68
+ "filePath": "cache.main.runtime.ts",
69
+ "line": 19,
70
+ "character": 22
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
83
+ },
84
+ "name": "logger",
85
+ "type": {
86
+ "__schema": "TypeRefSchema",
87
+ "location": {
88
+ "filePath": "cache.main.runtime.ts",
89
+ "line": 24,
90
+ "character": 30
91
+ },
92
+ "name": "Logger"
93
+ },
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
104
+ },
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
115
+ },
116
+ "signature": "(property) CacheMain.dependencies: Aspect[]",
117
+ "name": "dependencies",
118
+ "type": {
119
+ "__schema": "InferenceTypeSchema",
120
+ "location": {
121
+ "filePath": "cache.main.runtime.ts",
122
+ "line": 27,
123
+ "character": 3
124
+ },
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
136
+ },
137
+ "signature": "(property) CacheMain.defaultConfig: {\n cacheDirectory: string;\n}",
138
+ "name": "defaultConfig",
139
+ "type": {
140
+ "__schema": "InferenceTypeSchema",
141
+ "location": {
142
+ "filePath": "cache.main.runtime.ts",
143
+ "line": 29,
144
+ "character": 3
145
+ },
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",
163
+ "location": {
164
+ "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"
177
+ },
178
+ "isOptional": false,
179
+ "isSpread": false
180
+ },
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",
191
+ "location": {
192
+ "filePath": "cache.main.runtime.ts",
193
+ "line": 33,
194
+ "character": 32
195
+ },
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
207
+ },
208
+ "name": "ttl",
209
+ "type": {
210
+ "__schema": "KeywordTypeSchema",
211
+ "location": {
212
+ "filePath": "cache.main.runtime.ts",
213
+ "line": 33,
214
+ "character": 43
215
+ },
216
+ "name": "number"
217
+ },
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
+ {
232
+ "__schema": "KeywordTypeSchema",
233
+ "location": {
234
+ "filePath": "cache.main.runtime.ts",
235
+ "line": 33,
236
+ "character": 60
237
+ },
238
+ "name": "boolean"
239
+ }
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",
258
+ "location": {
259
+ "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"
272
+ },
273
+ "isOptional": false,
274
+ "isSpread": false
275
+ }
276
+ ],
277
+ "returnType": {
278
+ "__schema": "TypeRefSchema",
279
+ "location": {
280
+ "filePath": "cache.main.runtime.ts",
281
+ "line": 42,
282
+ "character": 30
283
+ },
284
+ "name": "Promise",
285
+ "typeArgs": [
286
+ {
287
+ "__schema": "TypeUnionSchema",
288
+ "location": {
289
+ "filePath": "cache.main.runtime.ts",
290
+ "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"
302
+ },
303
+ {
304
+ "__schema": "KeywordTypeSchema",
305
+ "location": {
306
+ "filePath": "cache.main.runtime.ts",
307
+ "line": 42,
308
+ "character": 42
309
+ },
310
+ "name": "undefined"
311
+ }
312
+ ]
313
+ }
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",
335
+ "location": {
336
+ "filePath": "cache.main.runtime.ts",
337
+ "line": 60,
338
+ "character": 25
339
+ },
340
+ "name": "[ loggerFactory ]",
341
+ "type": {
342
+ "__schema": "TupleTypeSchema",
343
+ "location": {
344
+ "filePath": "cache.main.runtime.ts",
345
+ "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
369
+ },
370
+ "name": "config",
371
+ "type": {
372
+ "__schema": "TypeRefSchema",
373
+ "location": {
374
+ "filePath": "cache.main.runtime.ts",
375
+ "line": 60,
376
+ "character": 64
377
+ },
378
+ "name": "CacheConfig"
379
+ },
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
390
+ },
391
+ "type": "Promise<CacheMain>"
392
+ },
393
+ "modifiers": [
394
+ "static",
395
+ "async"
396
+ ]
397
+ }
398
+ ],
399
+ "extendsNodes": [],
400
+ "implementNodes": []
401
+ },
402
+ {
403
+ "__schema": "VariableLikeSchema",
404
+ "location": {
405
+ "filePath": "cache.aspect.ts",
406
+ "line": 3,
407
+ "character": 14
408
+ },
409
+ "signature": "const CacheAspect: Aspect",
410
+ "name": "CacheAspect",
411
+ "type": {
412
+ "__schema": "TypeRefSchema",
413
+ "location": {
414
+ "filePath": "cache.aspect.ts",
415
+ "line": 3,
416
+ "character": 14
417
+ },
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})"
427
+ }
428
+ ],
429
+ "internals": []
430
+ },
431
+ "internals": [
432
+ {
433
+ "__schema": "ModuleSchema",
434
+ "location": {
435
+ "filePath": "cache.main.runtime.ts",
436
+ "line": 1,
437
+ "character": 1
438
+ },
439
+ "exports": [
440
+ {
441
+ "__schema": "TypeSchema",
442
+ "location": {
443
+ "filePath": "cache.main.runtime.ts",
444
+ "line": 8,
445
+ "character": 1
446
+ },
447
+ "signature": "type CacheConfig = {\n cacheDirectory: string;\n}",
448
+ "name": "CacheConfig",
449
+ "type": {
450
+ "__schema": "TypeLiteralSchema",
451
+ "location": {
452
+ "filePath": "cache.main.runtime.ts",
453
+ "line": 8,
454
+ "character": 27
455
+ },
456
+ "members": [
457
+ {
458
+ "__schema": "VariableLikeSchema",
459
+ "location": {
460
+ "filePath": "cache.main.runtime.ts",
461
+ "line": 9,
462
+ "character": 3
463
+ },
464
+ "signature": "(property) cacheDirectory: string",
465
+ "name": "cacheDirectory",
466
+ "type": {
467
+ "__schema": "KeywordTypeSchema",
468
+ "location": {
469
+ "filePath": "cache.main.runtime.ts",
470
+ "line": 9,
471
+ "character": 19
472
+ },
473
+ "name": "string"
474
+ },
475
+ "isOptional": false
476
+ }
477
+ ]
478
+ }
479
+ },
480
+ {
481
+ "__schema": "ClassSchema",
482
+ "location": {
483
+ "filePath": "cache.main.runtime.ts",
484
+ "line": 12,
485
+ "character": 1
486
+ },
487
+ "signature": "class CacheMain",
488
+ "name": "CacheMain",
489
+ "members": [
490
+ {
491
+ "__schema": "VariableLikeSchema",
492
+ "location": {
493
+ "filePath": "cache.main.runtime.ts",
494
+ "line": 13,
495
+ "character": 3
496
+ },
497
+ "signature": "(property) CacheMain.runtime: RuntimeDefinition",
498
+ "name": "runtime",
499
+ "type": {
500
+ "__schema": "InferenceTypeSchema",
501
+ "location": {
502
+ "filePath": "cache.main.runtime.ts",
503
+ "line": 13,
504
+ "character": 3
505
+ },
506
+ "type": "RuntimeDefinition"
507
+ },
508
+ "isOptional": true,
509
+ "defaultValue": "MainRuntime"
510
+ },
511
+ {
512
+ "__schema": "ConstructorSchema",
513
+ "location": {
514
+ "filePath": "cache.main.runtime.ts",
515
+ "line": 15,
516
+ "character": 3
517
+ },
518
+ "signature": "constructor CacheMain(config: CacheConfig, logger: Logger): CacheMain",
519
+ "name": "constructor",
520
+ "params": [
521
+ {
522
+ "__schema": "ParameterSchema",
523
+ "location": {
524
+ "filePath": "cache.main.runtime.ts",
525
+ "line": 19,
526
+ "character": 5
527
+ },
528
+ "name": "config",
529
+ "type": {
530
+ "__schema": "TypeRefSchema",
531
+ "location": {
532
+ "filePath": "cache.main.runtime.ts",
533
+ "line": 19,
534
+ "character": 22
535
+ },
536
+ "name": "CacheConfig"
537
+ },
538
+ "isOptional": false,
539
+ "isSpread": false
540
+ },
541
+ {
542
+ "__schema": "ParameterSchema",
543
+ "location": {
544
+ "filePath": "cache.main.runtime.ts",
545
+ "line": 24,
546
+ "character": 5
547
+ },
548
+ "name": "logger",
549
+ "type": {
550
+ "__schema": "TypeRefSchema",
551
+ "location": {
552
+ "filePath": "cache.main.runtime.ts",
553
+ "line": 24,
554
+ "character": 30
555
+ },
556
+ "name": "Logger"
557
+ },
558
+ "isOptional": false,
559
+ "isSpread": false
560
+ }
561
+ ],
562
+ "returnType": {
563
+ "__schema": "ThisTypeSchema",
564
+ "location": {
565
+ "filePath": "cache.main.runtime.ts",
566
+ "line": 12,
567
+ "character": 1
568
+ },
569
+ "name": "CacheMain"
570
+ },
571
+ "modifiers": []
572
+ },
573
+ {
574
+ "__schema": "VariableLikeSchema",
575
+ "location": {
576
+ "filePath": "cache.main.runtime.ts",
577
+ "line": 27,
578
+ "character": 3
579
+ },
580
+ "signature": "(property) CacheMain.dependencies: Aspect[]",
581
+ "name": "dependencies",
582
+ "type": {
583
+ "__schema": "InferenceTypeSchema",
584
+ "location": {
585
+ "filePath": "cache.main.runtime.ts",
586
+ "line": 27,
587
+ "character": 3
588
+ },
589
+ "type": "Aspect[]"
590
+ },
591
+ "isOptional": true,
592
+ "defaultValue": "[LoggerAspect]"
593
+ },
594
+ {
595
+ "__schema": "VariableLikeSchema",
596
+ "location": {
597
+ "filePath": "cache.main.runtime.ts",
598
+ "line": 29,
599
+ "character": 3
600
+ },
601
+ "signature": "(property) CacheMain.defaultConfig: {\n cacheDirectory: string;\n}",
602
+ "name": "defaultConfig",
603
+ "type": {
604
+ "__schema": "InferenceTypeSchema",
605
+ "location": {
606
+ "filePath": "cache.main.runtime.ts",
607
+ "line": 29,
608
+ "character": 3
609
+ },
610
+ "type": "{\n cacheDirectory: string;\n}"
611
+ },
612
+ "isOptional": true,
613
+ "defaultValue": "{\n cacheDirectory: CACHE_ROOT,\n }"
614
+ },
615
+ {
616
+ "__schema": "FunctionLikeSchema",
617
+ "location": {
618
+ "filePath": "cache.main.runtime.ts",
619
+ "line": 33,
620
+ "character": 3
621
+ },
622
+ "signature": "(method) CacheMain.set(key: string, data: any, ttl?: number): Promise<boolean>",
623
+ "name": "set",
624
+ "params": [
625
+ {
626
+ "__schema": "ParameterSchema",
627
+ "location": {
628
+ "filePath": "cache.main.runtime.ts",
629
+ "line": 33,
630
+ "character": 13
631
+ },
632
+ "name": "key",
633
+ "type": {
634
+ "__schema": "KeywordTypeSchema",
635
+ "location": {
636
+ "filePath": "cache.main.runtime.ts",
637
+ "line": 33,
638
+ "character": 18
639
+ },
640
+ "name": "string"
641
+ },
642
+ "isOptional": false,
643
+ "isSpread": false
644
+ },
645
+ {
646
+ "__schema": "ParameterSchema",
647
+ "location": {
648
+ "filePath": "cache.main.runtime.ts",
649
+ "line": 33,
650
+ "character": 26
651
+ },
652
+ "name": "data",
653
+ "type": {
654
+ "__schema": "KeywordTypeSchema",
655
+ "location": {
656
+ "filePath": "cache.main.runtime.ts",
657
+ "line": 33,
658
+ "character": 32
659
+ },
660
+ "name": "any"
661
+ },
662
+ "isOptional": false,
663
+ "isSpread": false
664
+ },
665
+ {
666
+ "__schema": "ParameterSchema",
667
+ "location": {
668
+ "filePath": "cache.main.runtime.ts",
669
+ "line": 33,
670
+ "character": 37
671
+ },
672
+ "name": "ttl",
673
+ "type": {
674
+ "__schema": "KeywordTypeSchema",
675
+ "location": {
676
+ "filePath": "cache.main.runtime.ts",
677
+ "line": 33,
678
+ "character": 43
679
+ },
680
+ "name": "number"
681
+ },
682
+ "isOptional": true,
683
+ "isSpread": false
684
+ }
685
+ ],
686
+ "returnType": {
687
+ "__schema": "TypeRefSchema",
688
+ "location": {
689
+ "filePath": "cache.main.runtime.ts",
690
+ "line": 33,
691
+ "character": 52
692
+ },
693
+ "name": "Promise",
694
+ "typeArgs": [
695
+ {
696
+ "__schema": "KeywordTypeSchema",
697
+ "location": {
698
+ "filePath": "cache.main.runtime.ts",
699
+ "line": 33,
700
+ "character": 60
701
+ },
702
+ "name": "boolean"
703
+ }
704
+ ]
705
+ },
706
+ "modifiers": [
707
+ "async"
708
+ ]
709
+ },
710
+ {
711
+ "__schema": "FunctionLikeSchema",
712
+ "location": {
713
+ "filePath": "cache.main.runtime.ts",
714
+ "line": 42,
715
+ "character": 3
716
+ },
717
+ "signature": "(method) CacheMain.get<T>(key: string): Promise<T | undefined>",
718
+ "name": "get",
719
+ "params": [
720
+ {
721
+ "__schema": "ParameterSchema",
722
+ "location": {
723
+ "filePath": "cache.main.runtime.ts",
724
+ "line": 42,
725
+ "character": 16
726
+ },
727
+ "name": "key",
728
+ "type": {
729
+ "__schema": "KeywordTypeSchema",
730
+ "location": {
731
+ "filePath": "cache.main.runtime.ts",
732
+ "line": 42,
733
+ "character": 21
734
+ },
735
+ "name": "string"
736
+ },
737
+ "isOptional": false,
738
+ "isSpread": false
739
+ }
740
+ ],
741
+ "returnType": {
742
+ "__schema": "TypeRefSchema",
743
+ "location": {
744
+ "filePath": "cache.main.runtime.ts",
745
+ "line": 42,
746
+ "character": 30
747
+ },
748
+ "name": "Promise",
749
+ "typeArgs": [
750
+ {
751
+ "__schema": "TypeUnionSchema",
752
+ "location": {
753
+ "filePath": "cache.main.runtime.ts",
754
+ "line": 42,
755
+ "character": 38
756
+ },
757
+ "types": [
758
+ {
759
+ "__schema": "TypeRefSchema",
760
+ "location": {
761
+ "filePath": "cache.main.runtime.ts",
762
+ "line": 42,
763
+ "character": 38
764
+ },
765
+ "name": "T"
766
+ },
767
+ {
768
+ "__schema": "KeywordTypeSchema",
769
+ "location": {
770
+ "filePath": "cache.main.runtime.ts",
771
+ "line": 42,
772
+ "character": 42
773
+ },
774
+ "name": "undefined"
775
+ }
776
+ ]
777
+ }
778
+ ]
779
+ },
780
+ "modifiers": [
781
+ "async"
782
+ ],
783
+ "typeParams": [
784
+ "T"
785
+ ]
786
+ },
787
+ {
788
+ "__schema": "FunctionLikeSchema",
789
+ "location": {
790
+ "filePath": "cache.main.runtime.ts",
791
+ "line": 60,
792
+ "character": 3
793
+ },
794
+ "signature": "(method) CacheMain.provider([loggerFactory]: [LoggerMain], config: CacheConfig): Promise<CacheMain>",
795
+ "name": "provider",
796
+ "params": [
797
+ {
798
+ "__schema": "ParameterSchema",
799
+ "location": {
800
+ "filePath": "cache.main.runtime.ts",
801
+ "line": 60,
802
+ "character": 25
803
+ },
804
+ "name": "[ loggerFactory ]",
805
+ "type": {
806
+ "__schema": "TupleTypeSchema",
807
+ "location": {
808
+ "filePath": "cache.main.runtime.ts",
809
+ "line": 60,
810
+ "character": 42
811
+ },
812
+ "elements": [
813
+ {
814
+ "__schema": "TypeRefSchema",
815
+ "location": {
816
+ "filePath": "cache.main.runtime.ts",
817
+ "line": 60,
818
+ "character": 43
819
+ },
820
+ "name": "LoggerMain"
821
+ }
822
+ ]
823
+ },
824
+ "isOptional": false,
825
+ "isSpread": false
826
+ },
827
+ {
828
+ "__schema": "ParameterSchema",
829
+ "location": {
830
+ "filePath": "cache.main.runtime.ts",
831
+ "line": 60,
832
+ "character": 56
833
+ },
834
+ "name": "config",
835
+ "type": {
836
+ "__schema": "TypeRefSchema",
837
+ "location": {
838
+ "filePath": "cache.main.runtime.ts",
839
+ "line": 60,
840
+ "character": 64
841
+ },
842
+ "name": "CacheConfig"
843
+ },
844
+ "isOptional": false,
845
+ "isSpread": false
846
+ }
847
+ ],
848
+ "returnType": {
849
+ "__schema": "InferenceTypeSchema",
850
+ "location": {
851
+ "filePath": "cache.main.runtime.ts",
852
+ "line": 60,
853
+ "character": 3
854
+ },
855
+ "type": "Promise<CacheMain>"
856
+ },
857
+ "modifiers": [
858
+ "static",
859
+ "async"
860
+ ]
861
+ }
862
+ ],
863
+ "extendsNodes": [],
864
+ "implementNodes": []
865
+ }
866
+ ],
867
+ "internals": [
868
+ {
869
+ "__schema": "UnImplementedSchema",
870
+ "location": {
871
+ "filePath": "cache.main.runtime.ts",
872
+ "line": 66,
873
+ "character": 1
874
+ },
875
+ "name": "CacheAspect.addRuntime(CacheMain);",
876
+ "type": "ExpressionStatement"
877
+ }
878
+ ]
879
+ },
880
+ {
881
+ "__schema": "ModuleSchema",
882
+ "location": {
883
+ "filePath": "cache.aspect.ts",
884
+ "line": 1,
885
+ "character": 1
886
+ },
887
+ "exports": [
888
+ {
889
+ "__schema": "VariableLikeSchema",
890
+ "location": {
891
+ "filePath": "cache.aspect.ts",
892
+ "line": 3,
893
+ "character": 14
894
+ },
895
+ "signature": "const CacheAspect: Aspect",
896
+ "name": "CacheAspect",
897
+ "type": {
898
+ "__schema": "TypeRefSchema",
899
+ "location": {
900
+ "filePath": "cache.aspect.ts",
901
+ "line": 3,
902
+ "character": 14
903
+ },
904
+ "name": "Aspect",
905
+ "componentId": {
906
+ "scope": "teambit.harmony",
907
+ "name": "harmony",
908
+ "version": "0.4.6"
909
+ }
910
+ },
911
+ "isOptional": false,
912
+ "defaultValue": "Aspect.create({\n id: 'teambit.harmony/cache',\n dependencies: [],\n defaultConfig: {},\n})"
913
+ }
914
+ ],
915
+ "internals": []
916
+ }
917
+ ],
918
+ "componentId": {
919
+ "scope": "teambit.harmony",
920
+ "name": "cache",
921
+ "version": "0.0.944"
922
+ },
923
+ "taggedModuleExports": []
924
+ }
@@ -1,5 +1,5 @@
1
- import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_cache@0.0.942/dist/cache.composition.js';
2
- import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_cache@0.0.942/dist/cache.docs.mdx';
1
+ import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_cache@0.0.944/dist/cache.composition.js';
2
+ import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_cache@0.0.944/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.942",
3
+ "version": "0.0.944",
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.942"
9
+ "version": "0.0.944"
10
10
  },
11
11
  "dependencies": {
12
12
  "cacache": "15.0.5",
13
13
  "@teambit/harmony": "0.4.6",
14
- "@teambit/cli": "0.0.849",
15
- "@teambit/logger": "0.0.942"
14
+ "@teambit/cli": "0.0.851",
15
+ "@teambit/logger": "0.0.944"
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.24"
24
+ "@teambit/harmony.envs.core-aspect-env": "0.0.25"
25
25
  },
26
26
  "peerDependencies": {
27
27
  "react": "^17.0.0 || ^18.0.0",