@teambit/cache 0.0.1182 → 0.0.1183

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.1182" tests="2" failures="0" errors="0" skipped="0">
4
- <testcase classname="dist/cache.spec.js" name="it should set cache with ttl" time="0.004"/>
3
+ <testsuite name="teambit.harmony/cache@0.0.1183" tests="2" failures="0" errors="0" skipped="0">
4
+ <testcase classname="dist/cache.spec.js" name="it should set cache with ttl" time="0.005"/>
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={88089:(e,t,o)=>{var r={id:"teambit.harmony/cache@0.0.1182",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={};o.r(r),o.d(r,{compositions:()=>f,compositions_metadata:()=>y,overview:()=>m});var n={};o.r(n),o.d(n,{default:()=>d});var i=o(88089);o(41594);const a=MdxJsReact,c=TeambitMdxUiMdxScopeContext;var s=["components"];function p(){return p=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},p.apply(null,arguments)}var u={},l="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({}.hasOwnProperty.call(e,r)){if(t.includes(r))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.includes(o)||{}.propertyIsEnumerable.call(e,o)&&(n[o]=e[o])}return n}(e,s);return(0,a.mdx)(l,p({},u,o,{components:t,mdxType:"MDXLayout"}),(0,a.mdx)(c.MDXScopeProvider,{components:{},mdxType:"MDXScopeProvider"}))}d.isMDXComponent=!0;const f=[i],m=[n],y={compositions:[{displayName:"Logo",identifier:"Logo"}]};return 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={40564:(e,t,o)=>{var r={id:"teambit.harmony/cache@0.0.1183",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={};o.r(r),o.d(r,{compositions:()=>f,compositions_metadata:()=>y,overview:()=>m});var n={};o.r(n),o.d(n,{default:()=>d});var i=o(40564);o(41594);const a=MdxJsReact,c=TeambitMdxUiMdxScopeContext;var s=["components"];function p(){return p=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},p.apply(null,arguments)}var u={},l="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({}.hasOwnProperty.call(e,r)){if(t.includes(r))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.includes(o)||{}.propertyIsEnumerable.call(e,o)&&(n[o]=e[o])}return n}(e,s);return(0,a.mdx)(l,p({},u,o,{components:t,mdxType:"MDXLayout"}),(0,a.mdx)(c.MDXScopeProvider,{components:{},mdxType:"MDXScopeProvider"}))}d.isMDXComponent=!0;const f=[i],m=[n],y={compositions:[{displayName:"Logo",identifier:"Logo"}]};return r})()));
@@ -0,0 +1,944 @@
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": "ExportSchema",
18
+ "location": {
19
+ "filePath": "index.ts",
20
+ "line": 1,
21
+ "character": 15
22
+ },
23
+ "signature": "class CacheMain",
24
+ "name": "CacheMain",
25
+ "exportNode": {
26
+ "__schema": "ClassSchema",
27
+ "location": {
28
+ "filePath": "cache.main.runtime.ts",
29
+ "line": 12,
30
+ "character": 1
31
+ },
32
+ "signature": "class CacheMain",
33
+ "name": "CacheMain",
34
+ "members": [
35
+ {
36
+ "__schema": "VariableLikeSchema",
37
+ "location": {
38
+ "filePath": "cache.main.runtime.ts",
39
+ "line": 13,
40
+ "character": 3
41
+ },
42
+ "signature": "(property) CacheMain.runtime: RuntimeDefinition",
43
+ "name": "runtime",
44
+ "type": {
45
+ "__schema": "InferenceTypeSchema",
46
+ "location": {
47
+ "filePath": "cache.main.runtime.ts",
48
+ "line": 13,
49
+ "character": 3
50
+ },
51
+ "type": "RuntimeDefinition"
52
+ },
53
+ "isOptional": true,
54
+ "defaultValue": "MainRuntime"
55
+ },
56
+ {
57
+ "__schema": "ConstructorSchema",
58
+ "location": {
59
+ "filePath": "cache.main.runtime.ts",
60
+ "line": 15,
61
+ "character": 3
62
+ },
63
+ "signature": "constructor CacheMain(config: CacheConfig, logger: Logger): CacheMain",
64
+ "name": "constructor",
65
+ "params": [
66
+ {
67
+ "__schema": "ParameterSchema",
68
+ "location": {
69
+ "filePath": "cache.main.runtime.ts",
70
+ "line": 19,
71
+ "character": 5
72
+ },
73
+ "name": "config",
74
+ "type": {
75
+ "__schema": "TypeRefSchema",
76
+ "location": {
77
+ "filePath": "cache.main.runtime.ts",
78
+ "line": 19,
79
+ "character": 22
80
+ },
81
+ "name": "CacheConfig"
82
+ },
83
+ "isOptional": false,
84
+ "isSpread": false
85
+ },
86
+ {
87
+ "__schema": "ParameterSchema",
88
+ "location": {
89
+ "filePath": "cache.main.runtime.ts",
90
+ "line": 24,
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
+ },
103
+ "isOptional": false,
104
+ "isSpread": false
105
+ }
106
+ ],
107
+ "returnType": {
108
+ "__schema": "ThisTypeSchema",
109
+ "location": {
110
+ "filePath": "cache.main.runtime.ts",
111
+ "line": 12,
112
+ "character": 1
113
+ },
114
+ "name": "CacheMain"
115
+ },
116
+ "modifiers": []
117
+ },
118
+ {
119
+ "__schema": "VariableLikeSchema",
120
+ "location": {
121
+ "filePath": "cache.main.runtime.ts",
122
+ "line": 27,
123
+ "character": 3
124
+ },
125
+ "signature": "(property) CacheMain.dependencies: Aspect[]",
126
+ "name": "dependencies",
127
+ "type": {
128
+ "__schema": "InferenceTypeSchema",
129
+ "location": {
130
+ "filePath": "cache.main.runtime.ts",
131
+ "line": 27,
132
+ "character": 3
133
+ },
134
+ "type": "Aspect[]"
135
+ },
136
+ "isOptional": true,
137
+ "defaultValue": "[LoggerAspect]"
138
+ },
139
+ {
140
+ "__schema": "VariableLikeSchema",
141
+ "location": {
142
+ "filePath": "cache.main.runtime.ts",
143
+ "line": 29,
144
+ "character": 3
145
+ },
146
+ "signature": "(property) CacheMain.defaultConfig: {\n cacheDirectory: string;\n}",
147
+ "name": "defaultConfig",
148
+ "type": {
149
+ "__schema": "InferenceTypeSchema",
150
+ "location": {
151
+ "filePath": "cache.main.runtime.ts",
152
+ "line": 29,
153
+ "character": 3
154
+ },
155
+ "type": "{\n cacheDirectory: string;\n}"
156
+ },
157
+ "isOptional": true,
158
+ "defaultValue": "{\n cacheDirectory: CACHE_ROOT,\n }"
159
+ },
160
+ {
161
+ "__schema": "FunctionLikeSchema",
162
+ "location": {
163
+ "filePath": "cache.main.runtime.ts",
164
+ "line": 33,
165
+ "character": 3
166
+ },
167
+ "signature": "(method) CacheMain.set(key: string, data: any, ttl?: number): Promise<boolean>",
168
+ "name": "set",
169
+ "params": [
170
+ {
171
+ "__schema": "ParameterSchema",
172
+ "location": {
173
+ "filePath": "cache.main.runtime.ts",
174
+ "line": 33,
175
+ "character": 13
176
+ },
177
+ "name": "key",
178
+ "type": {
179
+ "__schema": "KeywordTypeSchema",
180
+ "location": {
181
+ "filePath": "cache.main.runtime.ts",
182
+ "line": 33,
183
+ "character": 18
184
+ },
185
+ "name": "string"
186
+ },
187
+ "isOptional": false,
188
+ "isSpread": false
189
+ },
190
+ {
191
+ "__schema": "ParameterSchema",
192
+ "location": {
193
+ "filePath": "cache.main.runtime.ts",
194
+ "line": 33,
195
+ "character": 26
196
+ },
197
+ "name": "data",
198
+ "type": {
199
+ "__schema": "KeywordTypeSchema",
200
+ "location": {
201
+ "filePath": "cache.main.runtime.ts",
202
+ "line": 33,
203
+ "character": 32
204
+ },
205
+ "name": "any"
206
+ },
207
+ "isOptional": false,
208
+ "isSpread": false
209
+ },
210
+ {
211
+ "__schema": "ParameterSchema",
212
+ "location": {
213
+ "filePath": "cache.main.runtime.ts",
214
+ "line": 33,
215
+ "character": 37
216
+ },
217
+ "name": "ttl",
218
+ "type": {
219
+ "__schema": "KeywordTypeSchema",
220
+ "location": {
221
+ "filePath": "cache.main.runtime.ts",
222
+ "line": 33,
223
+ "character": 43
224
+ },
225
+ "name": "number"
226
+ },
227
+ "isOptional": true,
228
+ "isSpread": false
229
+ }
230
+ ],
231
+ "returnType": {
232
+ "__schema": "TypeRefSchema",
233
+ "location": {
234
+ "filePath": "cache.main.runtime.ts",
235
+ "line": 33,
236
+ "character": 52
237
+ },
238
+ "name": "Promise",
239
+ "typeArgs": [
240
+ {
241
+ "__schema": "KeywordTypeSchema",
242
+ "location": {
243
+ "filePath": "cache.main.runtime.ts",
244
+ "line": 33,
245
+ "character": 60
246
+ },
247
+ "name": "boolean"
248
+ }
249
+ ]
250
+ },
251
+ "modifiers": [
252
+ "async"
253
+ ]
254
+ },
255
+ {
256
+ "__schema": "FunctionLikeSchema",
257
+ "location": {
258
+ "filePath": "cache.main.runtime.ts",
259
+ "line": 42,
260
+ "character": 3
261
+ },
262
+ "signature": "(method) CacheMain.get<T>(key: string): Promise<T | undefined>",
263
+ "name": "get",
264
+ "params": [
265
+ {
266
+ "__schema": "ParameterSchema",
267
+ "location": {
268
+ "filePath": "cache.main.runtime.ts",
269
+ "line": 42,
270
+ "character": 16
271
+ },
272
+ "name": "key",
273
+ "type": {
274
+ "__schema": "KeywordTypeSchema",
275
+ "location": {
276
+ "filePath": "cache.main.runtime.ts",
277
+ "line": 42,
278
+ "character": 21
279
+ },
280
+ "name": "string"
281
+ },
282
+ "isOptional": false,
283
+ "isSpread": false
284
+ }
285
+ ],
286
+ "returnType": {
287
+ "__schema": "TypeRefSchema",
288
+ "location": {
289
+ "filePath": "cache.main.runtime.ts",
290
+ "line": 42,
291
+ "character": 30
292
+ },
293
+ "name": "Promise",
294
+ "typeArgs": [
295
+ {
296
+ "__schema": "TypeUnionSchema",
297
+ "location": {
298
+ "filePath": "cache.main.runtime.ts",
299
+ "line": 42,
300
+ "character": 38
301
+ },
302
+ "types": [
303
+ {
304
+ "__schema": "TypeRefSchema",
305
+ "location": {
306
+ "filePath": "cache.main.runtime.ts",
307
+ "line": 42,
308
+ "character": 38
309
+ },
310
+ "name": "T"
311
+ },
312
+ {
313
+ "__schema": "KeywordTypeSchema",
314
+ "location": {
315
+ "filePath": "cache.main.runtime.ts",
316
+ "line": 42,
317
+ "character": 42
318
+ },
319
+ "name": "undefined"
320
+ }
321
+ ]
322
+ }
323
+ ]
324
+ },
325
+ "modifiers": [
326
+ "async"
327
+ ],
328
+ "typeParams": [
329
+ "T"
330
+ ]
331
+ },
332
+ {
333
+ "__schema": "FunctionLikeSchema",
334
+ "location": {
335
+ "filePath": "cache.main.runtime.ts",
336
+ "line": 60,
337
+ "character": 3
338
+ },
339
+ "signature": "(method) CacheMain.provider([loggerFactory]: [LoggerMain], config: CacheConfig): Promise<CacheMain>",
340
+ "name": "provider",
341
+ "params": [
342
+ {
343
+ "__schema": "ParameterSchema",
344
+ "location": {
345
+ "filePath": "cache.main.runtime.ts",
346
+ "line": 60,
347
+ "character": 25
348
+ },
349
+ "name": "[ loggerFactory ]",
350
+ "type": {
351
+ "__schema": "TupleTypeSchema",
352
+ "location": {
353
+ "filePath": "cache.main.runtime.ts",
354
+ "line": 60,
355
+ "character": 42
356
+ },
357
+ "elements": [
358
+ {
359
+ "__schema": "TypeRefSchema",
360
+ "location": {
361
+ "filePath": "cache.main.runtime.ts",
362
+ "line": 60,
363
+ "character": 43
364
+ },
365
+ "name": "LoggerMain"
366
+ }
367
+ ]
368
+ },
369
+ "isOptional": false,
370
+ "isSpread": false
371
+ },
372
+ {
373
+ "__schema": "ParameterSchema",
374
+ "location": {
375
+ "filePath": "cache.main.runtime.ts",
376
+ "line": 60,
377
+ "character": 56
378
+ },
379
+ "name": "config",
380
+ "type": {
381
+ "__schema": "TypeRefSchema",
382
+ "location": {
383
+ "filePath": "cache.main.runtime.ts",
384
+ "line": 60,
385
+ "character": 64
386
+ },
387
+ "name": "CacheConfig"
388
+ },
389
+ "isOptional": false,
390
+ "isSpread": false
391
+ }
392
+ ],
393
+ "returnType": {
394
+ "__schema": "InferenceTypeSchema",
395
+ "location": {
396
+ "filePath": "cache.main.runtime.ts",
397
+ "line": 60,
398
+ "character": 3
399
+ },
400
+ "type": "Promise<CacheMain>"
401
+ },
402
+ "modifiers": [
403
+ "static",
404
+ "async"
405
+ ]
406
+ }
407
+ ],
408
+ "extendsNodes": [],
409
+ "implementNodes": []
410
+ }
411
+ },
412
+ {
413
+ "__schema": "ExportSchema",
414
+ "location": {
415
+ "filePath": "index.ts",
416
+ "line": 2,
417
+ "character": 10
418
+ },
419
+ "signature": "const CacheAspect: Aspect",
420
+ "name": "CacheAspect",
421
+ "exportNode": {
422
+ "__schema": "VariableLikeSchema",
423
+ "location": {
424
+ "filePath": "cache.aspect.ts",
425
+ "line": 3,
426
+ "character": 14
427
+ },
428
+ "signature": "const CacheAspect: Aspect",
429
+ "name": "CacheAspect",
430
+ "type": {
431
+ "__schema": "TypeRefSchema",
432
+ "location": {
433
+ "filePath": "cache.aspect.ts",
434
+ "line": 3,
435
+ "character": 14
436
+ },
437
+ "name": "Aspect",
438
+ "componentId": {
439
+ "scope": "teambit.harmony",
440
+ "name": "harmony",
441
+ "version": "0.4.6"
442
+ }
443
+ },
444
+ "isOptional": false,
445
+ "defaultValue": "Aspect.create({\n id: 'teambit.harmony/cache',\n dependencies: [],\n defaultConfig: {},\n})"
446
+ }
447
+ }
448
+ ],
449
+ "internals": []
450
+ },
451
+ "internals": [
452
+ {
453
+ "__schema": "ModuleSchema",
454
+ "location": {
455
+ "filePath": "cache.main.runtime.ts",
456
+ "line": 1,
457
+ "character": 1
458
+ },
459
+ "exports": [
460
+ {
461
+ "__schema": "TypeSchema",
462
+ "location": {
463
+ "filePath": "cache.main.runtime.ts",
464
+ "line": 8,
465
+ "character": 1
466
+ },
467
+ "signature": "type CacheConfig = {\n cacheDirectory: string;\n}",
468
+ "name": "CacheConfig",
469
+ "type": {
470
+ "__schema": "TypeLiteralSchema",
471
+ "location": {
472
+ "filePath": "cache.main.runtime.ts",
473
+ "line": 8,
474
+ "character": 27
475
+ },
476
+ "members": [
477
+ {
478
+ "__schema": "VariableLikeSchema",
479
+ "location": {
480
+ "filePath": "cache.main.runtime.ts",
481
+ "line": 9,
482
+ "character": 3
483
+ },
484
+ "signature": "(property) cacheDirectory: string",
485
+ "name": "cacheDirectory",
486
+ "type": {
487
+ "__schema": "KeywordTypeSchema",
488
+ "location": {
489
+ "filePath": "cache.main.runtime.ts",
490
+ "line": 9,
491
+ "character": 19
492
+ },
493
+ "name": "string"
494
+ },
495
+ "isOptional": false
496
+ }
497
+ ]
498
+ }
499
+ },
500
+ {
501
+ "__schema": "ClassSchema",
502
+ "location": {
503
+ "filePath": "cache.main.runtime.ts",
504
+ "line": 12,
505
+ "character": 1
506
+ },
507
+ "signature": "class CacheMain",
508
+ "name": "CacheMain",
509
+ "members": [
510
+ {
511
+ "__schema": "VariableLikeSchema",
512
+ "location": {
513
+ "filePath": "cache.main.runtime.ts",
514
+ "line": 13,
515
+ "character": 3
516
+ },
517
+ "signature": "(property) CacheMain.runtime: RuntimeDefinition",
518
+ "name": "runtime",
519
+ "type": {
520
+ "__schema": "InferenceTypeSchema",
521
+ "location": {
522
+ "filePath": "cache.main.runtime.ts",
523
+ "line": 13,
524
+ "character": 3
525
+ },
526
+ "type": "RuntimeDefinition"
527
+ },
528
+ "isOptional": true,
529
+ "defaultValue": "MainRuntime"
530
+ },
531
+ {
532
+ "__schema": "ConstructorSchema",
533
+ "location": {
534
+ "filePath": "cache.main.runtime.ts",
535
+ "line": 15,
536
+ "character": 3
537
+ },
538
+ "signature": "constructor CacheMain(config: CacheConfig, logger: Logger): CacheMain",
539
+ "name": "constructor",
540
+ "params": [
541
+ {
542
+ "__schema": "ParameterSchema",
543
+ "location": {
544
+ "filePath": "cache.main.runtime.ts",
545
+ "line": 19,
546
+ "character": 5
547
+ },
548
+ "name": "config",
549
+ "type": {
550
+ "__schema": "TypeRefSchema",
551
+ "location": {
552
+ "filePath": "cache.main.runtime.ts",
553
+ "line": 19,
554
+ "character": 22
555
+ },
556
+ "name": "CacheConfig"
557
+ },
558
+ "isOptional": false,
559
+ "isSpread": false
560
+ },
561
+ {
562
+ "__schema": "ParameterSchema",
563
+ "location": {
564
+ "filePath": "cache.main.runtime.ts",
565
+ "line": 24,
566
+ "character": 5
567
+ },
568
+ "name": "logger",
569
+ "type": {
570
+ "__schema": "TypeRefSchema",
571
+ "location": {
572
+ "filePath": "cache.main.runtime.ts",
573
+ "line": 24,
574
+ "character": 30
575
+ },
576
+ "name": "Logger"
577
+ },
578
+ "isOptional": false,
579
+ "isSpread": false
580
+ }
581
+ ],
582
+ "returnType": {
583
+ "__schema": "ThisTypeSchema",
584
+ "location": {
585
+ "filePath": "cache.main.runtime.ts",
586
+ "line": 12,
587
+ "character": 1
588
+ },
589
+ "name": "CacheMain"
590
+ },
591
+ "modifiers": []
592
+ },
593
+ {
594
+ "__schema": "VariableLikeSchema",
595
+ "location": {
596
+ "filePath": "cache.main.runtime.ts",
597
+ "line": 27,
598
+ "character": 3
599
+ },
600
+ "signature": "(property) CacheMain.dependencies: Aspect[]",
601
+ "name": "dependencies",
602
+ "type": {
603
+ "__schema": "InferenceTypeSchema",
604
+ "location": {
605
+ "filePath": "cache.main.runtime.ts",
606
+ "line": 27,
607
+ "character": 3
608
+ },
609
+ "type": "Aspect[]"
610
+ },
611
+ "isOptional": true,
612
+ "defaultValue": "[LoggerAspect]"
613
+ },
614
+ {
615
+ "__schema": "VariableLikeSchema",
616
+ "location": {
617
+ "filePath": "cache.main.runtime.ts",
618
+ "line": 29,
619
+ "character": 3
620
+ },
621
+ "signature": "(property) CacheMain.defaultConfig: {\n cacheDirectory: string;\n}",
622
+ "name": "defaultConfig",
623
+ "type": {
624
+ "__schema": "InferenceTypeSchema",
625
+ "location": {
626
+ "filePath": "cache.main.runtime.ts",
627
+ "line": 29,
628
+ "character": 3
629
+ },
630
+ "type": "{\n cacheDirectory: string;\n}"
631
+ },
632
+ "isOptional": true,
633
+ "defaultValue": "{\n cacheDirectory: CACHE_ROOT,\n }"
634
+ },
635
+ {
636
+ "__schema": "FunctionLikeSchema",
637
+ "location": {
638
+ "filePath": "cache.main.runtime.ts",
639
+ "line": 33,
640
+ "character": 3
641
+ },
642
+ "signature": "(method) CacheMain.set(key: string, data: any, ttl?: number): Promise<boolean>",
643
+ "name": "set",
644
+ "params": [
645
+ {
646
+ "__schema": "ParameterSchema",
647
+ "location": {
648
+ "filePath": "cache.main.runtime.ts",
649
+ "line": 33,
650
+ "character": 13
651
+ },
652
+ "name": "key",
653
+ "type": {
654
+ "__schema": "KeywordTypeSchema",
655
+ "location": {
656
+ "filePath": "cache.main.runtime.ts",
657
+ "line": 33,
658
+ "character": 18
659
+ },
660
+ "name": "string"
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": 26
671
+ },
672
+ "name": "data",
673
+ "type": {
674
+ "__schema": "KeywordTypeSchema",
675
+ "location": {
676
+ "filePath": "cache.main.runtime.ts",
677
+ "line": 33,
678
+ "character": 32
679
+ },
680
+ "name": "any"
681
+ },
682
+ "isOptional": false,
683
+ "isSpread": false
684
+ },
685
+ {
686
+ "__schema": "ParameterSchema",
687
+ "location": {
688
+ "filePath": "cache.main.runtime.ts",
689
+ "line": 33,
690
+ "character": 37
691
+ },
692
+ "name": "ttl",
693
+ "type": {
694
+ "__schema": "KeywordTypeSchema",
695
+ "location": {
696
+ "filePath": "cache.main.runtime.ts",
697
+ "line": 33,
698
+ "character": 43
699
+ },
700
+ "name": "number"
701
+ },
702
+ "isOptional": true,
703
+ "isSpread": false
704
+ }
705
+ ],
706
+ "returnType": {
707
+ "__schema": "TypeRefSchema",
708
+ "location": {
709
+ "filePath": "cache.main.runtime.ts",
710
+ "line": 33,
711
+ "character": 52
712
+ },
713
+ "name": "Promise",
714
+ "typeArgs": [
715
+ {
716
+ "__schema": "KeywordTypeSchema",
717
+ "location": {
718
+ "filePath": "cache.main.runtime.ts",
719
+ "line": 33,
720
+ "character": 60
721
+ },
722
+ "name": "boolean"
723
+ }
724
+ ]
725
+ },
726
+ "modifiers": [
727
+ "async"
728
+ ]
729
+ },
730
+ {
731
+ "__schema": "FunctionLikeSchema",
732
+ "location": {
733
+ "filePath": "cache.main.runtime.ts",
734
+ "line": 42,
735
+ "character": 3
736
+ },
737
+ "signature": "(method) CacheMain.get<T>(key: string): Promise<T | undefined>",
738
+ "name": "get",
739
+ "params": [
740
+ {
741
+ "__schema": "ParameterSchema",
742
+ "location": {
743
+ "filePath": "cache.main.runtime.ts",
744
+ "line": 42,
745
+ "character": 16
746
+ },
747
+ "name": "key",
748
+ "type": {
749
+ "__schema": "KeywordTypeSchema",
750
+ "location": {
751
+ "filePath": "cache.main.runtime.ts",
752
+ "line": 42,
753
+ "character": 21
754
+ },
755
+ "name": "string"
756
+ },
757
+ "isOptional": false,
758
+ "isSpread": false
759
+ }
760
+ ],
761
+ "returnType": {
762
+ "__schema": "TypeRefSchema",
763
+ "location": {
764
+ "filePath": "cache.main.runtime.ts",
765
+ "line": 42,
766
+ "character": 30
767
+ },
768
+ "name": "Promise",
769
+ "typeArgs": [
770
+ {
771
+ "__schema": "TypeUnionSchema",
772
+ "location": {
773
+ "filePath": "cache.main.runtime.ts",
774
+ "line": 42,
775
+ "character": 38
776
+ },
777
+ "types": [
778
+ {
779
+ "__schema": "TypeRefSchema",
780
+ "location": {
781
+ "filePath": "cache.main.runtime.ts",
782
+ "line": 42,
783
+ "character": 38
784
+ },
785
+ "name": "T"
786
+ },
787
+ {
788
+ "__schema": "KeywordTypeSchema",
789
+ "location": {
790
+ "filePath": "cache.main.runtime.ts",
791
+ "line": 42,
792
+ "character": 42
793
+ },
794
+ "name": "undefined"
795
+ }
796
+ ]
797
+ }
798
+ ]
799
+ },
800
+ "modifiers": [
801
+ "async"
802
+ ],
803
+ "typeParams": [
804
+ "T"
805
+ ]
806
+ },
807
+ {
808
+ "__schema": "FunctionLikeSchema",
809
+ "location": {
810
+ "filePath": "cache.main.runtime.ts",
811
+ "line": 60,
812
+ "character": 3
813
+ },
814
+ "signature": "(method) CacheMain.provider([loggerFactory]: [LoggerMain], config: CacheConfig): Promise<CacheMain>",
815
+ "name": "provider",
816
+ "params": [
817
+ {
818
+ "__schema": "ParameterSchema",
819
+ "location": {
820
+ "filePath": "cache.main.runtime.ts",
821
+ "line": 60,
822
+ "character": 25
823
+ },
824
+ "name": "[ loggerFactory ]",
825
+ "type": {
826
+ "__schema": "TupleTypeSchema",
827
+ "location": {
828
+ "filePath": "cache.main.runtime.ts",
829
+ "line": 60,
830
+ "character": 42
831
+ },
832
+ "elements": [
833
+ {
834
+ "__schema": "TypeRefSchema",
835
+ "location": {
836
+ "filePath": "cache.main.runtime.ts",
837
+ "line": 60,
838
+ "character": 43
839
+ },
840
+ "name": "LoggerMain"
841
+ }
842
+ ]
843
+ },
844
+ "isOptional": false,
845
+ "isSpread": false
846
+ },
847
+ {
848
+ "__schema": "ParameterSchema",
849
+ "location": {
850
+ "filePath": "cache.main.runtime.ts",
851
+ "line": 60,
852
+ "character": 56
853
+ },
854
+ "name": "config",
855
+ "type": {
856
+ "__schema": "TypeRefSchema",
857
+ "location": {
858
+ "filePath": "cache.main.runtime.ts",
859
+ "line": 60,
860
+ "character": 64
861
+ },
862
+ "name": "CacheConfig"
863
+ },
864
+ "isOptional": false,
865
+ "isSpread": false
866
+ }
867
+ ],
868
+ "returnType": {
869
+ "__schema": "InferenceTypeSchema",
870
+ "location": {
871
+ "filePath": "cache.main.runtime.ts",
872
+ "line": 60,
873
+ "character": 3
874
+ },
875
+ "type": "Promise<CacheMain>"
876
+ },
877
+ "modifiers": [
878
+ "static",
879
+ "async"
880
+ ]
881
+ }
882
+ ],
883
+ "extendsNodes": [],
884
+ "implementNodes": []
885
+ }
886
+ ],
887
+ "internals": [
888
+ {
889
+ "__schema": "UnImplementedSchema",
890
+ "location": {
891
+ "filePath": "cache.main.runtime.ts",
892
+ "line": 66,
893
+ "character": 1
894
+ },
895
+ "name": "CacheAspect.addRuntime(CacheMain);",
896
+ "type": "ExpressionStatement"
897
+ }
898
+ ]
899
+ },
900
+ {
901
+ "__schema": "ModuleSchema",
902
+ "location": {
903
+ "filePath": "cache.aspect.ts",
904
+ "line": 1,
905
+ "character": 1
906
+ },
907
+ "exports": [
908
+ {
909
+ "__schema": "VariableLikeSchema",
910
+ "location": {
911
+ "filePath": "cache.aspect.ts",
912
+ "line": 3,
913
+ "character": 14
914
+ },
915
+ "signature": "const CacheAspect: Aspect",
916
+ "name": "CacheAspect",
917
+ "type": {
918
+ "__schema": "TypeRefSchema",
919
+ "location": {
920
+ "filePath": "cache.aspect.ts",
921
+ "line": 3,
922
+ "character": 14
923
+ },
924
+ "name": "Aspect",
925
+ "componentId": {
926
+ "scope": "teambit.harmony",
927
+ "name": "harmony",
928
+ "version": "0.4.6"
929
+ }
930
+ },
931
+ "isOptional": false,
932
+ "defaultValue": "Aspect.create({\n id: 'teambit.harmony/cache',\n dependencies: [],\n defaultConfig: {},\n})"
933
+ }
934
+ ],
935
+ "internals": []
936
+ }
937
+ ],
938
+ "componentId": {
939
+ "scope": "teambit.harmony",
940
+ "name": "cache",
941
+ "version": "0.0.1183"
942
+ },
943
+ "taggedModuleExports": []
944
+ }
@@ -1,5 +1,5 @@
1
- import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.harmony_cache@0.0.1182/dist/cache.composition.js';
2
- import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.harmony_cache@0.0.1182/dist/cache.docs.mdx';
1
+ import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.harmony_cache@0.0.1183/dist/cache.composition.js';
2
+ import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.harmony_cache@0.0.1183/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,19 +1,19 @@
1
1
  {
2
2
  "name": "@teambit/cache",
3
- "version": "0.0.1182",
3
+ "version": "0.0.1183",
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.1182"
9
+ "version": "0.0.1183"
10
10
  },
11
11
  "dependencies": {
12
12
  "cacache": "19.0.1",
13
13
  "@teambit/harmony": "0.4.6",
14
- "@teambit/cli": "0.0.1089",
14
+ "@teambit/cli": "0.0.1090",
15
15
  "@teambit/legacy.constants": "0.0.5",
16
- "@teambit/logger": "0.0.1182"
16
+ "@teambit/logger": "0.0.1183"
17
17
  },
18
18
  "devDependencies": {
19
19
  "@types/cacache": "12.0.1",