@teambit/cache 0.0.1182 → 0.0.1184

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