@roots/bud-cache 4.7.0-next.11 → 5.0.0-next.0

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,22 +1,37 @@
1
1
  "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
2
  Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.Cache = void 0;
3
+ const tslib_1 = require("tslib");
10
4
  const bud_framework_1 = require("@roots/bud-framework");
11
5
  const bud_support_1 = require("@roots/bud-support");
12
6
  const autobind_decorator_1 = require("autobind-decorator");
13
7
  const crypto_1 = require("crypto");
14
8
  const fs_extra_1 = require("fs-extra");
15
- class Cache extends bud_framework_1.Service {
9
+ /**
10
+ * Service class handling cache concerns
11
+ *
12
+ * @remarks
13
+ * Interfaces with:
14
+ * - {@link @roots/bud-framework#Project} to determine project dependencies for snapshotting/validation.
15
+ * - {@link @roots/bud-framework#Build} via {@link @roots/bud-framework#Hooks} to update config.
16
+ *
17
+ * Facades:
18
+ * - {@link @roots/bud-framework#Api} can toggle cache settings with {@link Bud.Persist}
19
+ *
20
+ * @public
21
+ */
22
+ class default_1 extends bud_framework_1.Cache.Abstract {
16
23
  constructor() {
17
24
  super(...arguments);
25
+ /**
26
+ * {@inheritDoc}
27
+ */
18
28
  this.name = 'cache';
19
29
  }
30
+ /**
31
+ * {@inheritDoc}
32
+ *
33
+ * @decorator `@bind`
34
+ */
20
35
  register(app) {
21
36
  app.hooks
22
37
  .on('build/cache', () => ({
@@ -24,23 +39,22 @@ class Cache extends bud_framework_1.Service {
24
39
  }))
25
40
  .hooks.on('build/cache/type', () => 'memory');
26
41
  }
27
- booted() {
28
- this.app.hooks.filter('build/cache/type') == 'filesystem' &&
29
- !fs_extra_1.pathExistsSync(this.app.path('storage')) &&
30
- fs_extra_1.mkdirSync(this.app.path('storage'));
31
- }
32
42
  /**
33
43
  * Returns sha1 hash as a version string
44
+ *
45
+ * @decorator `@bind`
34
46
  */
35
47
  version() {
36
- return crypto_1.createHash('sha1')
48
+ return (0, crypto_1.createHash)('sha1')
37
49
  .update(this.hash())
38
50
  .digest('base64')
39
51
  .replace(/[^a-z0-9]/gi, '_')
40
52
  .toLowerCase();
41
53
  }
42
54
  /**
43
- * Returns cache directory for fs operations
55
+ * Returns cache storage directory
56
+ *
57
+ * @decorator `@bind`
44
58
  */
45
59
  directory() {
46
60
  return this.app.path('storage', 'cache');
@@ -48,45 +62,47 @@ class Cache extends bud_framework_1.Service {
48
62
  /**
49
63
  * Returns array of build dependency paths
50
64
  *
51
- * @see [webpack cache.buildDependencies docs](https://webpack.js.org/configuration/cache/#cachebuilddependencies)
65
+ * @remarks
66
+ * @see https://webpack.js.org/configuration/cache/#cachebuilddependencies
67
+ *
68
+ * @decorator `@bind`
52
69
  */
53
70
  buildDependencies() {
71
+ var _a, _b, _c, _d, _e, _f, _g;
54
72
  return [
55
73
  ...new Set(bud_support_1.globby.globbySync([
56
74
  this.app.path('project', `${this.app.name}.{js,ts,yml,json}`),
57
75
  this.app.path('project', `${this.app.name}.config.{js,ts,yml,json}`),
58
76
  this.app.path('project', `${this.app.name}.${this.app.mode}.{js,ts.yml,json}`),
59
- ...(this.app.discovery?.resolveFrom?.map(dep => `${dep}/lib/cjs/index.js`) ??
60
- this.app.parent?.discovery?.resolveFrom?.map(dep => `${dep}/lib/cjs/index.js`) ??
61
- []),
77
+ ...((_g = (_c = (_b = (_a = this.app.project) === null || _a === void 0 ? void 0 : _a.resolveFrom) === null || _b === void 0 ? void 0 : _b.map(dep => `${dep}/lib/cjs/index.js`)) !== null && _c !== void 0 ? _c : (_f = (_e = (_d = this.app.parent) === null || _d === void 0 ? void 0 : _d.project) === null || _e === void 0 ? void 0 : _e.resolveFrom) === null || _f === void 0 ? void 0 : _f.map(dep => `${dep}/lib/cjs/index.js`)) !== null && _g !== void 0 ? _g : []),
62
78
  this.app.path('storage', 'cache/*'),
63
79
  ])),
64
80
  ];
65
81
  }
66
82
  /**
67
83
  * Returns hash of all build dependencies and parsed CLI arguments
84
+ *
85
+ * @decorator `@bind`
68
86
  */
69
87
  hash() {
70
- return JSON.stringify(this.buildDependencies().reduce((all, file) => all.concat(fs_extra_1.readFileSync(file, 'utf8')), process.argv.slice(3).join('')) ?? '{}');
88
+ var _a;
89
+ return JSON.stringify((_a = this.buildDependencies().reduce((all, file) => all.concat((0, fs_extra_1.readFileSync)(file, 'utf8')), process.argv.slice(3).join(''))) !== null && _a !== void 0 ? _a : '{}');
71
90
  }
72
91
  }
73
- __decorate([
74
- autobind_decorator_1.boundMethod
75
- ], Cache.prototype, "register", null);
76
- __decorate([
92
+ (0, tslib_1.__decorate)([
77
93
  autobind_decorator_1.boundMethod
78
- ], Cache.prototype, "booted", null);
79
- __decorate([
94
+ ], default_1.prototype, "register", null);
95
+ (0, tslib_1.__decorate)([
80
96
  autobind_decorator_1.boundMethod
81
- ], Cache.prototype, "version", null);
82
- __decorate([
97
+ ], default_1.prototype, "version", null);
98
+ (0, tslib_1.__decorate)([
83
99
  autobind_decorator_1.boundMethod
84
- ], Cache.prototype, "directory", null);
85
- __decorate([
100
+ ], default_1.prototype, "directory", null);
101
+ (0, tslib_1.__decorate)([
86
102
  autobind_decorator_1.boundMethod
87
- ], Cache.prototype, "buildDependencies", null);
88
- __decorate([
103
+ ], default_1.prototype, "buildDependencies", null);
104
+ (0, tslib_1.__decorate)([
89
105
  autobind_decorator_1.boundMethod
90
- ], Cache.prototype, "hash", null);
91
- exports.Cache = Cache;
106
+ ], default_1.prototype, "hash", null);
107
+ exports.default = default_1;
92
108
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/Cache/index.ts"],"names":[],"mappings":";;;;;;;;;AAAA,wDAI6B;AAC7B,oDAAyC;AACzC,2DAAsD;AACtD,mCAAiC;AACjC,uCAAgE;AAEhE,MAAM,KAAM,SAAQ,uBAAO;IAA3B;;QACS,SAAI,GAAG,OAAO,CAAA;IAqFvB,CAAC;IAlFQ,QAAQ,CAAC,GAAc;QAC5B,GAAG,CAAC,KAAK;aACN,EAAE,CAAC,aAAa,EAAE,GAAG,EAAE,CAAC,CAAC;YACxB,IAAI,EAAE,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,kBAAkB,CAAC;SAC3C,CAAC,CAAC;aACF,KAAK,CAAC,EAAE,CAAC,kBAAkB,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,CAAA;IACjD,CAAC;IAGM,MAAM;QACX,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,kBAAkB,CAAC,IAAI,YAAY;YACvD,CAAC,yBAAc,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;YACzC,oBAAS,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAA;IACvC,CAAC;IAED;;OAEG;IAEI,OAAO;QACZ,OAAO,mBAAU,CAAC,MAAM,CAAC;aACtB,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;aACnB,MAAM,CAAC,QAAQ,CAAC;aAChB,OAAO,CAAC,aAAa,EAAE,GAAG,CAAC;aAC3B,WAAW,EAAE,CAAA;IAClB,CAAC;IAED;;OAEG;IAEI,SAAS;QACd,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC,CAAA;IAC1C,CAAC;IAED;;;;OAIG;IAEI,iBAAiB;QACtB,OAAO;YACL,GAAG,IAAI,GAAG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C,GAAG,CAAC,IAAI,0BAA0B,CAC3C;gBAED,IAAI,CAAC,GAAG,CAAC,IAAI,CACX,SAAS,EACT,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,IAAI,IAAI,CAAC,GAAG,CAAC,IAAI,mBAAmB,CACrD;gBAED,GAAG,CAAC,MAAA,MAAA,MAAA,MAAA,IAAI,CAAC,GAAG,CAAC,OAAO,0CAAE,WAAW,0CAAE,GAAG,CACpC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,mBAAmB,CACjC,mCACC,MAAA,MAAA,MAAA,IAAI,CAAC,GAAG,CAAC,MAAM,0CAAE,OAAO,0CAAE,WAAW,0CAAE,GAAG,CACxC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,mBAAmB,CACjC,mCACD,EAAE,CAAC;gBACL,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,EAAE,SAAS,CAAC;aACpC,CAAC,CACH;SACU,CAAA;IACf,CAAC;IAED;;;;OAIG;IAEI,IAAI;;QACT,OAAO,IAAI,CAAC,SAAS,CACnB,MAAA,IAAI,CAAC,iBAAiB,EAAE,CAAC,MAAM,CAC7B,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,IAAA,uBAAY,EAAC,IAAI,EAAE,MAAM,CAAC,CAAC,EACrD,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAC/B,mCAAI,IAAI,CACV,CAAA;IACH,CAAC;CACF;AAvFC;IADC,gCAAI;yCAOJ;AAQD;IADC,gCAAI;wCAOJ;AAQD;IADC,gCAAI;0CAGJ;AAWD;IADC,gCAAI;kDA+BJ;AAQD;IADC,gCAAI;qCAQJ;AArGH,4BAsGC"}
package/lib/cjs/index.js CHANGED
@@ -1,15 +1,17 @@
1
1
  "use strict";
2
+ // Copyright (c) Roots Foundation, LLC. All rights reserved.
3
+ // Licensed under the MIT license.
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.Cache = void 0;
6
+ const tslib_1 = require("tslib");
2
7
  /**
3
- * `@roots/bud` is a frontend build framework combining the best parts of Symfony Encore and Laravel Mix
8
+ * The {@link @roots/bud-cache#} package implements the {@link @roots/bud-framework#Cache | Cache interface}
4
9
  *
5
- * @remarks
6
- * The `@roots/bud-cache` package implements the {@link Cache Cache Service}
10
+ * @see https://roots.io/bud
11
+ * @see https://github.com/roots/bud
7
12
  *
8
- * @packageDocumentation
13
+ * @core @packageDocumentation @betaDocumentation
9
14
  */
10
- Object.defineProperty(exports, "__esModule", { value: true });
11
- exports.default = exports.Cache = void 0;
12
- const Cache_1 = require("./Cache");
13
- Object.defineProperty(exports, "Cache", { enumerable: true, get: function () { return Cache_1.Cache; } });
14
- Object.defineProperty(exports, "default", { enumerable: true, get: function () { return Cache_1.Cache; } });
15
+ const Cache_1 = (0, tslib_1.__importDefault)(require("./Cache"));
16
+ exports.Cache = Cache_1.default;
15
17
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;AAIH,mCAA6B;AAErB,sFAFA,aAAK,OAEA;AAAW,wFAFhB,aAAK,OAEkB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA,4DAA4D;AAC5D,kCAAkC;;;;AAElC;;;;;;;GAOG;AAEH,iEAA2B;AAEnB,gBAFD,eAAK,CAEC"}
@@ -1,19 +1,35 @@
1
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
- return c > 3 && r && Object.defineProperty(target, key, r), r;
6
- };
7
- import { Service, } from '@roots/bud-framework';
1
+ import { __decorate } from "tslib";
2
+ import { Cache } from '@roots/bud-framework';
8
3
  import { globby } from '@roots/bud-support';
9
4
  import { boundMethod as bind } from 'autobind-decorator';
10
5
  import { createHash } from 'crypto';
11
- import { mkdirSync, pathExistsSync, readFileSync } from 'fs-extra';
12
- class Cache extends Service {
6
+ import { readFileSync } from 'fs-extra';
7
+ /**
8
+ * Service class handling cache concerns
9
+ *
10
+ * @remarks
11
+ * Interfaces with:
12
+ * - {@link @roots/bud-framework#Project} to determine project dependencies for snapshotting/validation.
13
+ * - {@link @roots/bud-framework#Build} via {@link @roots/bud-framework#Hooks} to update config.
14
+ *
15
+ * Facades:
16
+ * - {@link @roots/bud-framework#Api} can toggle cache settings with {@link Bud.Persist}
17
+ *
18
+ * @public
19
+ */
20
+ export default class default_1 extends Cache.Abstract {
13
21
  constructor() {
14
22
  super(...arguments);
23
+ /**
24
+ * {@inheritDoc}
25
+ */
15
26
  this.name = 'cache';
16
27
  }
28
+ /**
29
+ * {@inheritDoc}
30
+ *
31
+ * @decorator `@bind`
32
+ */
17
33
  register(app) {
18
34
  app.hooks
19
35
  .on('build/cache', () => ({
@@ -21,13 +37,10 @@ class Cache extends Service {
21
37
  }))
22
38
  .hooks.on('build/cache/type', () => 'memory');
23
39
  }
24
- booted() {
25
- this.app.hooks.filter('build/cache/type') == 'filesystem' &&
26
- !pathExistsSync(this.app.path('storage')) &&
27
- mkdirSync(this.app.path('storage'));
28
- }
29
40
  /**
30
41
  * Returns sha1 hash as a version string
42
+ *
43
+ * @decorator `@bind`
31
44
  */
32
45
  version() {
33
46
  return createHash('sha1')
@@ -37,7 +50,9 @@ class Cache extends Service {
37
50
  .toLowerCase();
38
51
  }
39
52
  /**
40
- * Returns cache directory for fs operations
53
+ * Returns cache storage directory
54
+ *
55
+ * @decorator `@bind`
41
56
  */
42
57
  directory() {
43
58
  return this.app.path('storage', 'cache');
@@ -45,45 +60,46 @@ class Cache extends Service {
45
60
  /**
46
61
  * Returns array of build dependency paths
47
62
  *
48
- * @see [webpack cache.buildDependencies docs](https://webpack.js.org/configuration/cache/#cachebuilddependencies)
63
+ * @remarks
64
+ * @see https://webpack.js.org/configuration/cache/#cachebuilddependencies
65
+ *
66
+ * @decorator `@bind`
49
67
  */
50
68
  buildDependencies() {
69
+ var _a, _b, _c, _d, _e, _f, _g;
51
70
  return [
52
71
  ...new Set(globby.globbySync([
53
72
  this.app.path('project', `${this.app.name}.{js,ts,yml,json}`),
54
73
  this.app.path('project', `${this.app.name}.config.{js,ts,yml,json}`),
55
74
  this.app.path('project', `${this.app.name}.${this.app.mode}.{js,ts.yml,json}`),
56
- ...(this.app.discovery?.resolveFrom?.map(dep => `${dep}/lib/cjs/index.js`) ??
57
- this.app.parent?.discovery?.resolveFrom?.map(dep => `${dep}/lib/cjs/index.js`) ??
58
- []),
75
+ ...((_g = (_c = (_b = (_a = this.app.project) === null || _a === void 0 ? void 0 : _a.resolveFrom) === null || _b === void 0 ? void 0 : _b.map(dep => `${dep}/lib/cjs/index.js`)) !== null && _c !== void 0 ? _c : (_f = (_e = (_d = this.app.parent) === null || _d === void 0 ? void 0 : _d.project) === null || _e === void 0 ? void 0 : _e.resolveFrom) === null || _f === void 0 ? void 0 : _f.map(dep => `${dep}/lib/cjs/index.js`)) !== null && _g !== void 0 ? _g : []),
59
76
  this.app.path('storage', 'cache/*'),
60
77
  ])),
61
78
  ];
62
79
  }
63
80
  /**
64
81
  * Returns hash of all build dependencies and parsed CLI arguments
82
+ *
83
+ * @decorator `@bind`
65
84
  */
66
85
  hash() {
67
- return JSON.stringify(this.buildDependencies().reduce((all, file) => all.concat(readFileSync(file, 'utf8')), process.argv.slice(3).join('')) ?? '{}');
86
+ var _a;
87
+ return JSON.stringify((_a = this.buildDependencies().reduce((all, file) => all.concat(readFileSync(file, 'utf8')), process.argv.slice(3).join(''))) !== null && _a !== void 0 ? _a : '{}');
68
88
  }
69
89
  }
70
90
  __decorate([
71
91
  bind
72
- ], Cache.prototype, "register", null);
73
- __decorate([
74
- bind
75
- ], Cache.prototype, "booted", null);
92
+ ], default_1.prototype, "register", null);
76
93
  __decorate([
77
94
  bind
78
- ], Cache.prototype, "version", null);
95
+ ], default_1.prototype, "version", null);
79
96
  __decorate([
80
97
  bind
81
- ], Cache.prototype, "directory", null);
98
+ ], default_1.prototype, "directory", null);
82
99
  __decorate([
83
100
  bind
84
- ], Cache.prototype, "buildDependencies", null);
101
+ ], default_1.prototype, "buildDependencies", null);
85
102
  __decorate([
86
103
  bind
87
- ], Cache.prototype, "hash", null);
88
- export { Cache };
104
+ ], default_1.prototype, "hash", null);
89
105
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/Cache/index.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAGL,OAAO,GACR,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EAAC,MAAM,EAAC,MAAM,oBAAoB,CAAA;AACzC,OAAO,EAAC,WAAW,IAAI,IAAI,EAAC,MAAM,oBAAoB,CAAA;AACtD,OAAO,EAAC,UAAU,EAAC,MAAM,QAAQ,CAAA;AACjC,OAAO,EAAC,SAAS,EAAE,cAAc,EAAE,YAAY,EAAC,MAAM,UAAU,CAAA;AAEhE,MAAM,KAAM,SAAQ,OAAO;IAA3B;;QACS,SAAI,GAAG,OAAO,CAAA;IAqFvB,CAAC;IAlFQ,QAAQ,CAAC,GAAc;QAC5B,GAAG,CAAC,KAAK;aACN,EAAE,CAAC,aAAa,EAAE,GAAG,EAAE,CAAC,CAAC;YACxB,IAAI,EAAE,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,kBAAkB,CAAC;SAC3C,CAAC,CAAC;aACF,KAAK,CAAC,EAAE,CAAC,kBAAkB,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,CAAA;IACjD,CAAC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,GAAG,CAAC,MAAM,0CAAE,OAAO,0CAAE,WAAW,0CAAE,GAAG,CACxC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,mBAAmB,CACjC,mCACD,EAAE,CAAC;gBACL,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,EAAE,SAAS,CAAC;aACpC,CAAC,CACH;SACU,CAAA;IACf,CAAC;IAED;;;;OAIG;IAEI,IAAI;;QACT,OAAO,IAAI,CAAC,SAAS,CACnB,MAAA,IAAI,CAAC,iBAAiB,EAAE,CAAC,MAAM,CAC7B,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,EACrD,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAC/B,mCAAI,IAAI,CACV,CAAA;IACH,CAAC;CACF;AAvFC;IADC,IAAI;yCAOJ;AAQD;IADC,IAAI;wCAOJ;AAQD;IADC,IAAI;0CAGJ;AAWD;IADC,IAAI;kDA+BJ;AAQD;IADC,IAAI;qCAQJ"}
package/lib/esm/index.js CHANGED
@@ -1,11 +1,13 @@
1
+ // Copyright (c) Roots Foundation, LLC. All rights reserved.
2
+ // Licensed under the MIT license.
1
3
  /**
2
- * `@roots/bud` is a frontend build framework combining the best parts of Symfony Encore and Laravel Mix
4
+ * The {@link @roots/bud-cache#} package implements the {@link @roots/bud-framework#Cache | Cache interface}
3
5
  *
4
- * @remarks
5
- * The `@roots/bud-cache` package implements the {@link Cache Cache Service}
6
+ * @see https://roots.io/bud
7
+ * @see https://github.com/roots/bud
6
8
  *
7
- * @packageDocumentation
9
+ * @core @packageDocumentation @betaDocumentation
8
10
  */
9
- import { Cache } from './Cache';
10
- export { Cache, Cache as default };
11
+ import Cache from './Cache';
12
+ export { Cache };
11
13
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,OAAO,EAAC,KAAK,EAAC,MAAM,SAAS,CAAA;AAE7B,OAAO,EAAC,KAAK,EAAE,KAAK,IAAI,OAAO,EAAW,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,kCAAkC;AAElC;;;;;;;GAOG;AAEH,OAAO,KAAK,MAAM,SAAS,CAAA;AAE3B,OAAO,EAAC,KAAK,EAAC,CAAA"}