@teambit/cache 0.0.684 → 0.0.686
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.
- package/dist/cache.aspect.js +0 -5
- package/dist/cache.aspect.js.map +1 -1
- package/dist/cache.composition.js +0 -6
- package/dist/cache.composition.js.map +1 -1
- package/dist/cache.main.runtime.js +0 -31
- package/dist/cache.main.runtime.js.map +1 -1
- package/dist/cache.spec.js +3 -17
- package/dist/cache.spec.js.map +1 -1
- package/dist/index.js +0 -3
- package/dist/index.js.map +1 -1
- package/package-tar/teambit-cache-0.0.686.tgz +0 -0
- package/package.json +5 -5
- package/{preview-1666409808293.js → preview-1666755696699.js} +2 -2
- package/package-tar/teambit-cache-0.0.684.tgz +0 -0
package/dist/cache.aspect.js
CHANGED
@@ -4,23 +4,18 @@ Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
5
5
|
});
|
6
6
|
exports.CacheAspect = void 0;
|
7
|
-
|
8
7
|
function _harmony() {
|
9
8
|
const data = require("@teambit/harmony");
|
10
|
-
|
11
9
|
_harmony = function () {
|
12
10
|
return data;
|
13
11
|
};
|
14
|
-
|
15
12
|
return data;
|
16
13
|
}
|
17
|
-
|
18
14
|
const CacheAspect = _harmony().Aspect.create({
|
19
15
|
id: 'teambit.harmony/cache',
|
20
16
|
dependencies: [],
|
21
17
|
defaultConfig: {}
|
22
18
|
});
|
23
|
-
|
24
19
|
exports.CacheAspect = CacheAspect;
|
25
20
|
|
26
21
|
//# sourceMappingURL=cache.aspect.js.map
|
package/dist/cache.aspect.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["CacheAspect","Aspect","create","id","dependencies","defaultConfig"],"sources":["cache.aspect.ts"],"sourcesContent":["import { Aspect } from '@teambit/harmony';\n\nexport const CacheAspect = Aspect.create({\n id: 'teambit.harmony/cache',\n dependencies: [],\n defaultConfig: {},\n});\n"],"mappings":"
|
1
|
+
{"version":3,"names":["CacheAspect","Aspect","create","id","dependencies","defaultConfig"],"sources":["cache.aspect.ts"],"sourcesContent":["import { Aspect } from '@teambit/harmony';\n\nexport const CacheAspect = Aspect.create({\n id: 'teambit.harmony/cache',\n dependencies: [],\n defaultConfig: {},\n});\n"],"mappings":";;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEO,MAAMA,WAAW,GAAGC,iBAAM,CAACC,MAAM,CAAC;EACvCC,EAAE,EAAE,uBAAuB;EAC3BC,YAAY,EAAE,EAAE;EAChBC,aAAa,EAAE,CAAC;AAClB,CAAC,CAAC;AAAC"}
|
@@ -1,22 +1,17 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
4
|
-
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
6
5
|
value: true
|
7
6
|
});
|
8
7
|
exports.Logo = void 0;
|
9
|
-
|
10
8
|
function _react() {
|
11
9
|
const data = _interopRequireDefault(require("react"));
|
12
|
-
|
13
10
|
_react = function () {
|
14
11
|
return data;
|
15
12
|
};
|
16
|
-
|
17
13
|
return data;
|
18
14
|
}
|
19
|
-
|
20
15
|
const Logo = () => /*#__PURE__*/_react().default.createElement("div", {
|
21
16
|
style: {
|
22
17
|
height: '100%',
|
@@ -29,7 +24,6 @@ const Logo = () => /*#__PURE__*/_react().default.createElement("div", {
|
|
29
24
|
},
|
30
25
|
src: "https://static.bit.dev/extensions-icons/cache.svg"
|
31
26
|
}));
|
32
|
-
|
33
27
|
exports.Logo = Logo;
|
34
28
|
|
35
29
|
//# sourceMappingURL=cache.composition.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["Logo","height","display","justifyContent","width"],"sources":["cache.composition.tsx"],"sourcesContent":["import React from 'react';\n\nexport const Logo = () => (\n <div style={{ height: '100%', display: 'flex', justifyContent: 'center' }}>\n <img style={{ width: 70 }} src=\"https://static.bit.dev/extensions-icons/cache.svg\" />\n </div>\n);\n"],"mappings":"
|
1
|
+
{"version":3,"names":["Logo","height","display","justifyContent","width"],"sources":["cache.composition.tsx"],"sourcesContent":["import React from 'react';\n\nexport const Logo = () => (\n <div style={{ height: '100%', display: 'flex', justifyContent: 'center' }}>\n <img style={{ width: 70 }} src=\"https://static.bit.dev/extensions-icons/cache.svg\" />\n </div>\n);\n"],"mappings":";;;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEO,MAAMA,IAAI,GAAG,mBAClB;EAAK,KAAK,EAAE;IAAEC,MAAM,EAAE,MAAM;IAAEC,OAAO,EAAE,MAAM;IAAEC,cAAc,EAAE;EAAS;AAAE,gBACxE;EAAK,KAAK,EAAE;IAAEC,KAAK,EAAE;EAAG,CAAE;EAAC,GAAG,EAAC;AAAmD,EAAG,CAExF;AAAC"}
|
@@ -1,76 +1,54 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
4
|
-
|
5
4
|
require("core-js/modules/es.array.iterator.js");
|
6
|
-
|
7
5
|
require("core-js/modules/es.promise.js");
|
8
|
-
|
9
6
|
Object.defineProperty(exports, "__esModule", {
|
10
7
|
value: true
|
11
8
|
});
|
12
9
|
exports.CacheMain = void 0;
|
13
|
-
|
14
10
|
function _defineProperty2() {
|
15
11
|
const data = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
16
|
-
|
17
12
|
_defineProperty2 = function () {
|
18
13
|
return data;
|
19
14
|
};
|
20
|
-
|
21
15
|
return data;
|
22
16
|
}
|
23
|
-
|
24
17
|
function _cli() {
|
25
18
|
const data = require("@teambit/cli");
|
26
|
-
|
27
19
|
_cli = function () {
|
28
20
|
return data;
|
29
21
|
};
|
30
|
-
|
31
22
|
return data;
|
32
23
|
}
|
33
|
-
|
34
24
|
function _logger() {
|
35
25
|
const data = require("@teambit/logger");
|
36
|
-
|
37
26
|
_logger = function () {
|
38
27
|
return data;
|
39
28
|
};
|
40
|
-
|
41
29
|
return data;
|
42
30
|
}
|
43
|
-
|
44
31
|
function _constants() {
|
45
32
|
const data = require("@teambit/legacy/dist/constants");
|
46
|
-
|
47
33
|
_constants = function () {
|
48
34
|
return data;
|
49
35
|
};
|
50
|
-
|
51
36
|
return data;
|
52
37
|
}
|
53
|
-
|
54
38
|
function _cacache() {
|
55
39
|
const data = _interopRequireDefault(require("cacache"));
|
56
|
-
|
57
40
|
_cacache = function () {
|
58
41
|
return data;
|
59
42
|
};
|
60
|
-
|
61
43
|
return data;
|
62
44
|
}
|
63
|
-
|
64
45
|
function _cache() {
|
65
46
|
const data = require("./cache.aspect");
|
66
|
-
|
67
47
|
_cache = function () {
|
68
48
|
return data;
|
69
49
|
};
|
70
|
-
|
71
50
|
return data;
|
72
51
|
}
|
73
|
-
|
74
52
|
class CacheMain {
|
75
53
|
constructor(
|
76
54
|
/**
|
@@ -84,7 +62,6 @@ class CacheMain {
|
|
84
62
|
this.config = config;
|
85
63
|
this.logger = logger;
|
86
64
|
}
|
87
|
-
|
88
65
|
async set(key, data, ttl) {
|
89
66
|
this.logger.debug(`put cache to ${key} with data ${data}`);
|
90
67
|
const expire = ttl ? new Date().getTime() + ttl : null;
|
@@ -93,7 +70,6 @@ class CacheMain {
|
|
93
70
|
expire
|
94
71
|
})).then(() => true).catch(() => false);
|
95
72
|
}
|
96
|
-
|
97
73
|
async get(key) {
|
98
74
|
this.logger.debug(`get cache for ${key}`);
|
99
75
|
return _cacache().default.get(this.globalCacheFolder, key).then(async cacheObject => {
|
@@ -101,33 +77,26 @@ class CacheMain {
|
|
101
77
|
data,
|
102
78
|
expire
|
103
79
|
} = JSON.parse(cacheObject.data.toString());
|
104
|
-
|
105
80
|
if (expire && new Date().getTime() > expire) {
|
106
81
|
return _cacache().default.rm(this.globalCacheFolder, key);
|
107
82
|
}
|
108
|
-
|
109
83
|
return data;
|
110
84
|
}).catch(() => undefined);
|
111
85
|
}
|
112
|
-
|
113
86
|
get globalCacheFolder() {
|
114
87
|
return this.config.cacheDirectory;
|
115
88
|
}
|
116
|
-
|
117
89
|
static async provider([loggerFactory], config) {
|
118
90
|
const logger = loggerFactory.createLogger(_cache().CacheAspect.id);
|
119
91
|
return new CacheMain(config, logger);
|
120
92
|
}
|
121
|
-
|
122
93
|
}
|
123
|
-
|
124
94
|
exports.CacheMain = CacheMain;
|
125
95
|
(0, _defineProperty2().default)(CacheMain, "runtime", _cli().MainRuntime);
|
126
96
|
(0, _defineProperty2().default)(CacheMain, "dependencies", [_logger().LoggerAspect]);
|
127
97
|
(0, _defineProperty2().default)(CacheMain, "defaultConfig", {
|
128
98
|
cacheDirectory: _constants().CACHE_ROOT
|
129
99
|
});
|
130
|
-
|
131
100
|
_cache().CacheAspect.addRuntime(CacheMain);
|
132
101
|
|
133
102
|
//# sourceMappingURL=cache.main.runtime.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["CacheMain","constructor","config","logger","set","key","data","ttl","debug","expire","Date","getTime","cacache","put","globalCacheFolder","JSON","stringify","then","catch","get","cacheObject","parse","toString","rm","undefined","cacheDirectory","provider","loggerFactory","createLogger","CacheAspect","id","MainRuntime","LoggerAspect","CACHE_ROOT","addRuntime"],"sources":["cache.main.runtime.ts"],"sourcesContent":["import { MainRuntime } from '@teambit/cli';\nimport { Logger, LoggerAspect, LoggerMain } from '@teambit/logger';\nimport { CACHE_ROOT } from '@teambit/legacy/dist/constants';\nimport cacache from 'cacache';\n\nimport { CacheAspect } from './cache.aspect';\n\nexport type CacheConfig = {\n cacheDirectory: string;\n};\n\nexport class CacheMain {\n static runtime = MainRuntime;\n\n constructor(\n /**\n * extension config\n */\n readonly config: CacheConfig,\n\n /**\n * logger extension.\n */\n private readonly logger: Logger\n ) {}\n\n static dependencies = [LoggerAspect];\n\n static defaultConfig = {\n cacheDirectory: CACHE_ROOT,\n };\n\n async set(key: string, data: any, ttl?: number): Promise<boolean> {\n this.logger.debug(`put cache to ${key} with data ${data}`);\n const expire = ttl ? new Date().getTime() + ttl : null;\n return cacache\n .put(this.globalCacheFolder, key, JSON.stringify({ data, expire }))\n .then(() => true)\n .catch(() => false);\n }\n\n async get<T>(key: string): Promise<T | undefined> {\n this.logger.debug(`get cache for ${key}`);\n return cacache\n .get(this.globalCacheFolder, key)\n .then(async (cacheObject) => {\n const { data, expire } = JSON.parse(cacheObject.data.toString());\n if (expire && new Date().getTime() > expire) {\n return cacache.rm(this.globalCacheFolder, key);\n }\n return data;\n })\n .catch(() => undefined);\n }\n\n private get globalCacheFolder() {\n return this.config.cacheDirectory;\n }\n\n static async provider([loggerFactory]: [LoggerMain], config: CacheConfig) {\n const logger = loggerFactory.createLogger(CacheAspect.id);\n return new CacheMain(config, logger);\n }\n}\n\nCacheAspect.addRuntime(CacheMain);\n"],"mappings":"
|
1
|
+
{"version":3,"names":["CacheMain","constructor","config","logger","set","key","data","ttl","debug","expire","Date","getTime","cacache","put","globalCacheFolder","JSON","stringify","then","catch","get","cacheObject","parse","toString","rm","undefined","cacheDirectory","provider","loggerFactory","createLogger","CacheAspect","id","MainRuntime","LoggerAspect","CACHE_ROOT","addRuntime"],"sources":["cache.main.runtime.ts"],"sourcesContent":["import { MainRuntime } from '@teambit/cli';\nimport { Logger, LoggerAspect, LoggerMain } from '@teambit/logger';\nimport { CACHE_ROOT } from '@teambit/legacy/dist/constants';\nimport cacache from 'cacache';\n\nimport { CacheAspect } from './cache.aspect';\n\nexport type CacheConfig = {\n cacheDirectory: string;\n};\n\nexport class CacheMain {\n static runtime = MainRuntime;\n\n constructor(\n /**\n * extension config\n */\n readonly config: CacheConfig,\n\n /**\n * logger extension.\n */\n private readonly logger: Logger\n ) {}\n\n static dependencies = [LoggerAspect];\n\n static defaultConfig = {\n cacheDirectory: CACHE_ROOT,\n };\n\n async set(key: string, data: any, ttl?: number): Promise<boolean> {\n this.logger.debug(`put cache to ${key} with data ${data}`);\n const expire = ttl ? new Date().getTime() + ttl : null;\n return cacache\n .put(this.globalCacheFolder, key, JSON.stringify({ data, expire }))\n .then(() => true)\n .catch(() => false);\n }\n\n async get<T>(key: string): Promise<T | undefined> {\n this.logger.debug(`get cache for ${key}`);\n return cacache\n .get(this.globalCacheFolder, key)\n .then(async (cacheObject) => {\n const { data, expire } = JSON.parse(cacheObject.data.toString());\n if (expire && new Date().getTime() > expire) {\n return cacache.rm(this.globalCacheFolder, key);\n }\n return data;\n })\n .catch(() => undefined);\n }\n\n private get globalCacheFolder() {\n return this.config.cacheDirectory;\n }\n\n static async provider([loggerFactory]: [LoggerMain], config: CacheConfig) {\n const logger = loggerFactory.createLogger(CacheAspect.id);\n return new CacheMain(config, logger);\n }\n}\n\nCacheAspect.addRuntime(CacheMain);\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAMO,MAAMA,SAAS,CAAC;EAGrBC,WAAW;EACT;AACJ;AACA;EACaC,MAAmB;EAE5B;AACJ;AACA;EACqBC,MAAc,EAC/B;IAAA,KANSD,MAAmB,GAAnBA,MAAmB;IAAA,KAKXC,MAAc,GAAdA,MAAc;EAC9B;EAQH,MAAMC,GAAG,CAACC,GAAW,EAAEC,IAAS,EAAEC,GAAY,EAAoB;IAChE,IAAI,CAACJ,MAAM,CAACK,KAAK,CAAE,gBAAeH,GAAI,cAAaC,IAAK,EAAC,CAAC;IAC1D,MAAMG,MAAM,GAAGF,GAAG,GAAG,IAAIG,IAAI,EAAE,CAACC,OAAO,EAAE,GAAGJ,GAAG,GAAG,IAAI;IACtD,OAAOK,kBAAO,CACXC,GAAG,CAAC,IAAI,CAACC,iBAAiB,EAAET,GAAG,EAAEU,IAAI,CAACC,SAAS,CAAC;MAAEV,IAAI;MAAEG;IAAO,CAAC,CAAC,CAAC,CAClEQ,IAAI,CAAC,MAAM,IAAI,CAAC,CAChBC,KAAK,CAAC,MAAM,KAAK,CAAC;EACvB;EAEA,MAAMC,GAAG,CAAId,GAAW,EAA0B;IAChD,IAAI,CAACF,MAAM,CAACK,KAAK,CAAE,iBAAgBH,GAAI,EAAC,CAAC;IACzC,OAAOO,kBAAO,CACXO,GAAG,CAAC,IAAI,CAACL,iBAAiB,EAAET,GAAG,CAAC,CAChCY,IAAI,CAAC,MAAOG,WAAW,IAAK;MAC3B,MAAM;QAAEd,IAAI;QAAEG;MAAO,CAAC,GAAGM,IAAI,CAACM,KAAK,CAACD,WAAW,CAACd,IAAI,CAACgB,QAAQ,EAAE,CAAC;MAChE,IAAIb,MAAM,IAAI,IAAIC,IAAI,EAAE,CAACC,OAAO,EAAE,GAAGF,MAAM,EAAE;QAC3C,OAAOG,kBAAO,CAACW,EAAE,CAAC,IAAI,CAACT,iBAAiB,EAAET,GAAG,CAAC;MAChD;MACA,OAAOC,IAAI;IACb,CAAC,CAAC,CACDY,KAAK,CAAC,MAAMM,SAAS,CAAC;EAC3B;EAEA,IAAYV,iBAAiB,GAAG;IAC9B,OAAO,IAAI,CAACZ,MAAM,CAACuB,cAAc;EACnC;EAEA,aAAaC,QAAQ,CAAC,CAACC,aAAa,CAAe,EAAEzB,MAAmB,EAAE;IACxE,MAAMC,MAAM,GAAGwB,aAAa,CAACC,YAAY,CAACC,oBAAW,CAACC,EAAE,CAAC;IACzD,OAAO,IAAI9B,SAAS,CAACE,MAAM,EAAEC,MAAM,CAAC;EACtC;AACF;AAAC;AAAA,gCApDYH,SAAS,aACH+B,kBAAW;AAAA,gCADjB/B,SAAS,kBAeE,CAACgC,sBAAY,CAAC;AAAA,gCAfzBhC,SAAS,mBAiBG;EACrByB,cAAc,EAAEQ;AAClB,CAAC;AAmCHJ,oBAAW,CAACK,UAAU,CAAClC,SAAS,CAAC"}
|
package/dist/cache.spec.js
CHANGED
@@ -1,57 +1,41 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
3
|
require("core-js/modules/es.promise.js");
|
4
|
-
|
5
4
|
function _uuid() {
|
6
5
|
const data = require("uuid");
|
7
|
-
|
8
6
|
_uuid = function () {
|
9
7
|
return data;
|
10
8
|
};
|
11
|
-
|
12
9
|
return data;
|
13
10
|
}
|
14
|
-
|
15
11
|
function _fs() {
|
16
12
|
const data = require("fs");
|
17
|
-
|
18
13
|
_fs = function () {
|
19
14
|
return data;
|
20
15
|
};
|
21
|
-
|
22
16
|
return data;
|
23
17
|
}
|
24
|
-
|
25
18
|
function _chai() {
|
26
19
|
const data = require("chai");
|
27
|
-
|
28
20
|
_chai = function () {
|
29
21
|
return data;
|
30
22
|
};
|
31
|
-
|
32
23
|
return data;
|
33
24
|
}
|
34
|
-
|
35
25
|
function _logger() {
|
36
26
|
const data = require("@teambit/logger");
|
37
|
-
|
38
27
|
_logger = function () {
|
39
28
|
return data;
|
40
29
|
};
|
41
|
-
|
42
30
|
return data;
|
43
31
|
}
|
44
|
-
|
45
32
|
function _cacheMain() {
|
46
33
|
const data = require("./cache.main.runtime");
|
47
|
-
|
48
34
|
_cacheMain = function () {
|
49
35
|
return data;
|
50
36
|
};
|
51
|
-
|
52
37
|
return data;
|
53
38
|
}
|
54
|
-
|
55
39
|
describe('Cache Aspect', () => {
|
56
40
|
const cacheDirectory = `/tmp/bit/${(0, _uuid().v4)()}`;
|
57
41
|
const cache = new (_cacheMain().CacheMain)({
|
@@ -61,7 +45,9 @@ describe('Cache Aspect', () => {
|
|
61
45
|
await cache.set('_foo', 'bar', 1000);
|
62
46
|
const data = await cache.get('_foo');
|
63
47
|
(0, _chai().expect)(data).to.equal('bar');
|
64
|
-
});
|
48
|
+
});
|
49
|
+
|
50
|
+
// this test is flaky, it fails often on CircleCI.
|
65
51
|
// it('it should expire cache', async () => {
|
66
52
|
// await cache.set('_foo', 'bar', 1);
|
67
53
|
// const data = await cache.get('_foo');
|
package/dist/cache.spec.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["describe","cacheDirectory","v4","cache","CacheMain","Logger","it","set","data","get","expect","to","equal","afterAll","rmdirSync","recursive"],"sources":["cache.spec.ts"],"sourcesContent":["import { v4 } from 'uuid';\nimport { rmdirSync } from 'fs';\nimport { expect } from 'chai';\nimport { Logger } from '@teambit/logger';\nimport { CacheMain } from './cache.main.runtime';\n\ndescribe('Cache Aspect', () => {\n const cacheDirectory = `/tmp/bit/${v4()}`;\n const cache = new CacheMain({ cacheDirectory }, new Logger('cache.main.runtime'));\n it('it should set cache with ttl', async () => {\n await cache.set('_foo', 'bar', 1000);\n const data = await cache.get('_foo');\n expect(data).to.equal('bar');\n });\n\n // this test is flaky, it fails often on CircleCI.\n // it('it should expire cache', async () => {\n // await cache.set('_foo', 'bar', 1);\n // const data = await cache.get('_foo');\n // expect(data).to.equal(null);\n // });\n\n it('it should set cache without expire ttl', async () => {\n await cache.set('_foo', 'bar');\n const data = await cache.get('_foo');\n expect(data).to.equal('bar');\n });\n\n afterAll(() => {\n rmdirSync(cacheDirectory, { recursive: true });\n });\n});\n"],"mappings":"
|
1
|
+
{"version":3,"names":["describe","cacheDirectory","v4","cache","CacheMain","Logger","it","set","data","get","expect","to","equal","afterAll","rmdirSync","recursive"],"sources":["cache.spec.ts"],"sourcesContent":["import { v4 } from 'uuid';\nimport { rmdirSync } from 'fs';\nimport { expect } from 'chai';\nimport { Logger } from '@teambit/logger';\nimport { CacheMain } from './cache.main.runtime';\n\ndescribe('Cache Aspect', () => {\n const cacheDirectory = `/tmp/bit/${v4()}`;\n const cache = new CacheMain({ cacheDirectory }, new Logger('cache.main.runtime'));\n it('it should set cache with ttl', async () => {\n await cache.set('_foo', 'bar', 1000);\n const data = await cache.get('_foo');\n expect(data).to.equal('bar');\n });\n\n // this test is flaky, it fails often on CircleCI.\n // it('it should expire cache', async () => {\n // await cache.set('_foo', 'bar', 1);\n // const data = await cache.get('_foo');\n // expect(data).to.equal(null);\n // });\n\n it('it should set cache without expire ttl', async () => {\n await cache.set('_foo', 'bar');\n const data = await cache.get('_foo');\n expect(data).to.equal('bar');\n });\n\n afterAll(() => {\n rmdirSync(cacheDirectory, { recursive: true });\n });\n});\n"],"mappings":";;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEAA,QAAQ,CAAC,cAAc,EAAE,MAAM;EAC7B,MAAMC,cAAc,GAAI,YAAW,IAAAC,UAAE,GAAG,EAAC;EACzC,MAAMC,KAAK,GAAG,KAAIC,sBAAS,EAAC;IAAEH;EAAe,CAAC,EAAE,KAAII,gBAAM,EAAC,oBAAoB,CAAC,CAAC;EACjFC,EAAE,CAAC,8BAA8B,EAAE,YAAY;IAC7C,MAAMH,KAAK,CAACI,GAAG,CAAC,MAAM,EAAE,KAAK,EAAE,IAAI,CAAC;IACpC,MAAMC,IAAI,GAAG,MAAML,KAAK,CAACM,GAAG,CAAC,MAAM,CAAC;IACpC,IAAAC,cAAM,EAACF,IAAI,CAAC,CAACG,EAAE,CAACC,KAAK,CAAC,KAAK,CAAC;EAC9B,CAAC,CAAC;;EAEF;EACA;EACA;EACA;EACA;EACA;;EAEAN,EAAE,CAAC,wCAAwC,EAAE,YAAY;IACvD,MAAMH,KAAK,CAACI,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC;IAC9B,MAAMC,IAAI,GAAG,MAAML,KAAK,CAACM,GAAG,CAAC,MAAM,CAAC;IACpC,IAAAC,cAAM,EAACF,IAAI,CAAC,CAACG,EAAE,CAACC,KAAK,CAAC,KAAK,CAAC;EAC9B,CAAC,CAAC;EAEFC,QAAQ,CAAC,MAAM;IACb,IAAAC,eAAS,EAACb,cAAc,EAAE;MAAEc,SAAS,EAAE;IAAK,CAAC,CAAC;EAChD,CAAC,CAAC;AACJ,CAAC,CAAC"}
|
package/dist/index.js
CHANGED
package/dist/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export type { CacheMain } from './cache.main.runtime';\nexport { CacheAspect } from './cache.aspect';\n"],"mappings":"
|
1
|
+
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export type { CacheMain } from './cache.main.runtime';\nexport { CacheAspect } from './cache.aspect';\n"],"mappings":";;;;;;;;;;;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA"}
|
Binary file
|
package/package.json
CHANGED
@@ -1,20 +1,20 @@
|
|
1
1
|
{
|
2
2
|
"name": "@teambit/cache",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.686",
|
4
4
|
"homepage": "https://bit.dev/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.
|
9
|
+
"version": "0.0.686"
|
10
10
|
},
|
11
11
|
"dependencies": {
|
12
12
|
"cacache": "15.0.5",
|
13
13
|
"@babel/runtime": "7.12.18",
|
14
14
|
"core-js": "^3.0.0",
|
15
15
|
"@teambit/harmony": "0.3.3",
|
16
|
-
"@teambit/cli": "0.0.
|
17
|
-
"@teambit/logger": "0.0.
|
16
|
+
"@teambit/cli": "0.0.593",
|
17
|
+
"@teambit/logger": "0.0.686"
|
18
18
|
},
|
19
19
|
"devDependencies": {
|
20
20
|
"@types/react": "^17.0.8",
|
@@ -30,7 +30,7 @@
|
|
30
30
|
"@types/node": "12.20.4"
|
31
31
|
},
|
32
32
|
"peerDependencies": {
|
33
|
-
"@teambit/legacy": "1.0.
|
33
|
+
"@teambit/legacy": "1.0.376",
|
34
34
|
"react-dom": "^16.8.0 || ^17.0.0",
|
35
35
|
"react": "^16.8.0 || ^17.0.0"
|
36
36
|
},
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_cache@0.0.
|
2
|
-
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_cache@0.0.
|
1
|
+
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_cache@0.0.686/dist/cache.composition.js';
|
2
|
+
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_cache@0.0.686/dist/cache.docs.mdx';
|
3
3
|
|
4
4
|
export const compositions = [compositions_0];
|
5
5
|
export const overview = [overview_0];
|
Binary file
|