@roots/bud-cache 2023.2.16 → 2023.2.17
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/docs/01-exports.md +8 -0
- package/lib/index.d.ts +3 -8
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +10 -1
- package/lib/index.js.map +1 -1
- package/lib/{invalidate-cache-extension → invalidate-cache}/index.d.ts +0 -7
- package/lib/invalidate-cache/index.d.ts.map +1 -0
- package/lib/{invalidate-cache-extension → invalidate-cache}/index.js +0 -7
- package/lib/invalidate-cache/index.js.map +1 -0
- package/lib/{service.d.ts → service/index.d.ts} +4 -18
- package/lib/service/index.d.ts.map +1 -0
- package/lib/{service.js → service/index.js} +6 -21
- package/lib/service/index.js.map +1 -0
- package/lib/types.d.ts +7 -0
- package/lib/types.d.ts.map +1 -0
- package/lib/types.js +2 -0
- package/lib/types.js.map +1 -0
- package/package.json +27 -9
- package/src/index.ts +17 -0
- package/src/invalidate-cache/index.ts +56 -0
- package/src/service/index.ts +125 -0
- package/src/types.ts +7 -0
- package/lib/invalidate-cache-extension/index.d.ts.map +0 -1
- package/lib/invalidate-cache-extension/index.js.map +0 -1
- package/lib/service.d.ts.map +0 -1
- package/lib/service.js.map +0 -1
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Exports
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
| Signifier | Description |
|
|
6
|
+
| :-------------------------------------------- | :---------------------------------------------------- |
|
|
7
|
+
| `@roots/bud-cache` | The `bud.cache` service |
|
|
8
|
+
| `@roots/bud-cache/invalidate-cache-extension` | Extension which invalidates cache during build errors |
|
package/lib/index.d.ts
CHANGED
|
@@ -1,17 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Caching service
|
|
3
3
|
*
|
|
4
4
|
* @see {@link https://bud.js.org}
|
|
5
5
|
* @see {@link https://github.com/roots/bud}
|
|
6
6
|
*
|
|
7
7
|
* @packageDocumentation
|
|
8
8
|
*/
|
|
9
|
-
import
|
|
10
|
-
import Cache from './service.js';
|
|
11
|
-
declare module '@roots/bud-framework' {
|
|
12
|
-
interface Modules {
|
|
13
|
-
'@roots/bud-cache/invalidate-cache': InvalidateCacheExtension;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
9
|
+
import './types.js';
|
|
10
|
+
import Cache from './service/index.js';
|
|
16
11
|
export default Cache;
|
|
17
12
|
//# sourceMappingURL=index.d.ts.map
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA;;;;;;;GAOG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA;;;;;;;GAOG;AAEH,OAAO,YAAY,CAAA;AAEnB,OAAO,KAAK,MAAM,oBAAoB,CAAA;AAEtC,eAAe,KAAK,CAAA"}
|
package/lib/index.js
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
// Copyright © Roots Software Foundation LLC
|
|
2
2
|
// Licensed under the MIT license.
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
* Caching service
|
|
5
|
+
*
|
|
6
|
+
* @see {@link https://bud.js.org}
|
|
7
|
+
* @see {@link https://github.com/roots/bud}
|
|
8
|
+
*
|
|
9
|
+
* @packageDocumentation
|
|
10
|
+
*/
|
|
11
|
+
import './types.js';
|
|
12
|
+
import Cache from './service/index.js';
|
|
4
13
|
export default Cache;
|
|
5
14
|
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,4CAA4C;AAC5C,kCAAkC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,4CAA4C;AAC5C,kCAAkC;AAElC;;;;;;;GAOG;AAEH,OAAO,YAAY,CAAA;AAEnB,OAAO,KAAK,MAAM,oBAAoB,CAAA;AAEtC,eAAe,KAAK,CAAA"}
|
|
@@ -8,21 +8,14 @@ import { Extension } from '@roots/bud-framework/extension';
|
|
|
8
8
|
* `ts-loader` have issues with fs caching. This extension writes a file
|
|
9
9
|
* to the cache directory which is used to invalidate the cache before
|
|
10
10
|
* webpack is invoked on subsequent builds
|
|
11
|
-
*
|
|
12
|
-
* @public
|
|
13
|
-
* @decorator `@label`
|
|
14
11
|
*/
|
|
15
12
|
export default class InvalidateCacheExtension extends Extension {
|
|
16
13
|
/**
|
|
17
14
|
* Invalidation file path
|
|
18
|
-
* @public
|
|
19
15
|
*/
|
|
20
16
|
get invalidationFile(): string;
|
|
21
17
|
/**
|
|
22
18
|
* `register` callback
|
|
23
|
-
*
|
|
24
|
-
* @public
|
|
25
|
-
* @decorator `@bind`
|
|
26
19
|
*/
|
|
27
20
|
register(bud: Bud): Promise<void>;
|
|
28
21
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/invalidate-cache/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAC,GAAG,EAAC,MAAM,sBAAsB,CAAA;AAC7C,OAAO,EAAC,SAAS,EAAC,MAAM,gCAAgC,CAAA;AAIxD;;;;;;;;GAQG;AAEH,MAAM,CAAC,OAAO,OAAO,wBAAyB,SAAQ,SAAS;IAC7D;;OAEG;IACH,IAAW,gBAAgB,IAAI,MAAM,CAEpC;IAED;;OAEG;IAEmB,QAAQ,CAAC,GAAG,EAAE,GAAG;CA0BxC"}
|
|
@@ -11,23 +11,16 @@ import stripAnsi from 'strip-ansi';
|
|
|
11
11
|
* `ts-loader` have issues with fs caching. This extension writes a file
|
|
12
12
|
* to the cache directory which is used to invalidate the cache before
|
|
13
13
|
* webpack is invoked on subsequent builds
|
|
14
|
-
*
|
|
15
|
-
* @public
|
|
16
|
-
* @decorator `@label`
|
|
17
14
|
*/
|
|
18
15
|
let InvalidateCacheExtension = class InvalidateCacheExtension extends Extension {
|
|
19
16
|
/**
|
|
20
17
|
* Invalidation file path
|
|
21
|
-
* @public
|
|
22
18
|
*/
|
|
23
19
|
get invalidationFile() {
|
|
24
20
|
return join(this.app.cache.cacheDirectory, `error.json`);
|
|
25
21
|
}
|
|
26
22
|
/**
|
|
27
23
|
* `register` callback
|
|
28
|
-
*
|
|
29
|
-
* @public
|
|
30
|
-
* @decorator `@bind`
|
|
31
24
|
*/
|
|
32
25
|
async register(bud) {
|
|
33
26
|
const invalidate = await bud.fs?.exists(this.invalidationFile);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/invalidate-cache/index.ts"],"names":[],"mappings":";AAAA,OAAO,EAAC,IAAI,EAAC,MAAM,WAAW,CAAA;AAG9B,OAAO,EAAC,SAAS,EAAC,MAAM,gCAAgC,CAAA;AACxD,OAAO,EAAC,IAAI,EAAE,KAAK,EAAC,MAAM,2CAA2C,CAAA;AACrE,OAAO,SAAS,MAAM,YAAY,CAAA;AAElC;;;;;;;;GAQG;AAEY,IAAM,wBAAwB,GAA9B,MAAM,wBAAyB,SAAQ,SAAS;IAC7D;;OAEG;IACH,IAAW,gBAAgB;QACzB,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,cAAc,EAAE,YAAY,CAAC,CAAA;IAC1D,CAAC;IAED;;OAEG;IAEmB,AAAN,KAAK,CAAC,QAAQ,CAAC,GAAQ;QACrC,MAAM,UAAU,GAAG,MAAM,GAAG,CAAC,EAAE,EAAE,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAA;QAE9D,IAAI,UAAU,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,IAAI,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE;YACzD,MAAM,GAAG,CAAC,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAA;YAC1C,MAAM,GAAG,CAAC,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,cAAc,CAAC,CAAA;SAC9C;QAED,GAAG,CAAC,KAAK,CAAC,KAAK,IAAI,EAAE;YACnB,GAAG,CAAC,QAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,EAAE,KAAK,EAAC,QAAQ,EAAC,EAAE;gBAChE,IAAI;oBACF,IAAI,CAAC,QAAQ,CAAC,SAAS,EAAE;wBAAE,OAAM;oBAEjC,MAAM,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,gBAAgB,EAAE;wBAC7C,IAAI,EAAE,QAAQ,CAAC,IAAI;wBACnB,MAAM,EAAE,QAAQ,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CACrC,KAAK;6BACF,QAAQ,CAAC,EAAC,MAAM,EAAE,iBAAiB,EAAE,MAAM,EAAE,KAAK,EAAC,CAAC;6BACpD,KAAK,CAAC,IAAI,CAAC;6BACX,GAAG,CAAC,SAAS,CAAC,CAClB;qBACF,CAAC,CAAA;iBACH;gBAAC,OAAO,CAAC,EAAE,GAAE;YAChB,CAAC,CAAC,CAAA;QACJ,CAAC,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AA1BuB;IADrB,IAAI;;;;wDA0BJ;AArCkB,wBAAwB;IAD5C,KAAK,CAAC,mCAAmC,CAAC;GACtB,wBAAwB,CAsC5C;eAtCoB,wBAAwB"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Bud } from '@roots/bud-framework';
|
|
1
2
|
import { Service } from '@roots/bud-framework/service';
|
|
2
3
|
import type * as Services from '@roots/bud-framework/services';
|
|
3
4
|
import type { Configuration } from '@roots/bud-support/webpack';
|
|
@@ -7,54 +8,39 @@ import type { Configuration } from '@roots/bud-support/webpack';
|
|
|
7
8
|
export default class Cache extends Service implements Services.Cache.Service {
|
|
8
9
|
/**
|
|
9
10
|
* Enabled
|
|
10
|
-
*
|
|
11
|
-
* @public
|
|
12
11
|
*/
|
|
13
12
|
enabled: boolean;
|
|
14
13
|
/**
|
|
15
14
|
* Type
|
|
16
|
-
*
|
|
17
|
-
* @public
|
|
18
15
|
*/
|
|
19
16
|
get name(): string;
|
|
20
17
|
set name(name: string);
|
|
21
18
|
/**
|
|
22
19
|
* Type
|
|
23
|
-
*
|
|
24
|
-
* @public
|
|
25
20
|
*/
|
|
26
21
|
get type(): 'memory' | 'filesystem';
|
|
27
22
|
set type(type: 'memory' | 'filesystem');
|
|
28
23
|
/**
|
|
29
24
|
* version
|
|
30
|
-
*
|
|
31
|
-
* @public
|
|
32
25
|
*/
|
|
33
26
|
get version(): string;
|
|
34
27
|
set version(version: string);
|
|
35
28
|
/**
|
|
36
29
|
* Cache directory
|
|
37
|
-
*
|
|
38
|
-
* @public
|
|
39
30
|
*/
|
|
40
31
|
get cacheDirectory(): string;
|
|
41
32
|
set cacheDirectory(directory: string);
|
|
42
33
|
/**
|
|
43
34
|
* Webpack configuration
|
|
44
|
-
*
|
|
45
|
-
* @public
|
|
46
35
|
*/
|
|
47
36
|
get configuration(): Configuration[`cache`];
|
|
48
37
|
/**
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
* @public
|
|
52
|
-
* @decorator `@bind`
|
|
38
|
+
* {@link Extension.booted}
|
|
53
39
|
*/
|
|
54
|
-
booted?(): Promise<void>;
|
|
40
|
+
booted?(bud: Bud): Promise<void>;
|
|
55
41
|
/**
|
|
56
42
|
* Flush cache
|
|
57
43
|
*/
|
|
58
44
|
flush(): Promise<void>;
|
|
59
45
|
}
|
|
60
|
-
//# sourceMappingURL=
|
|
46
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/service/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAC,GAAG,EAAC,MAAM,sBAAsB,CAAA;AAC7C,OAAO,EAAC,OAAO,EAAC,MAAM,8BAA8B,CAAA;AACpD,OAAO,KAAK,KAAK,QAAQ,MAAM,+BAA+B,CAAA;AAI9D,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,4BAA4B,CAAA;AAI7D;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,KACnB,SAAQ,OACR,YAAW,QAAQ,CAAC,KAAK,CAAC,OAAO;IAEjC;;OAEG;IACI,OAAO,EAAE,OAAO,CAAO;IAE9B;;OAEG;IACH,IAAW,IAAI,IAAI,MAAM,CAKxB;IACD,IAAW,IAAI,CAAC,IAAI,EAAE,MAAM,EAE3B;IAED;;OAEG;IACH,IAAW,IAAI,IAAI,QAAQ,GAAG,YAAY,CAOzC;IAED,IAAW,IAAI,CAAC,IAAI,EAAE,QAAQ,GAAG,YAAY,EAE5C;IAED;;OAEG;IACH,IAAW,OAAO,IAAI,MAAM,CAc3B;IACD,IAAW,OAAO,CAAC,OAAO,EAAE,MAAM,EAEjC;IAED;;OAEG;IACH,IAAW,cAAc,IAAI,MAAM,CAKlC;IACD,IAAW,cAAc,CAAC,SAAS,EAAE,MAAM,EAE1C;IAED;;OAEG;IACH,IAAW,aAAa,IAAI,aAAa,CAAC,OAAO,CAAC,CAejD;IAED;;OAEG;IAEmB,MAAM,CAAC,CAAC,GAAG,EAAE,GAAG;IAKtC;;OAEG;IAEU,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;CAGpC"}
|
|
@@ -4,7 +4,7 @@ import { Service } from '@roots/bud-framework/service';
|
|
|
4
4
|
import { bind } from '@roots/bud-support/decorators';
|
|
5
5
|
import isString from '@roots/bud-support/lodash/isString';
|
|
6
6
|
import join from '@roots/bud-support/lodash/join';
|
|
7
|
-
import InvalidateCacheExtension from '
|
|
7
|
+
import InvalidateCacheExtension from '../invalidate-cache/index.js';
|
|
8
8
|
/**
|
|
9
9
|
* Cache service class
|
|
10
10
|
*/
|
|
@@ -13,15 +13,11 @@ export default class Cache extends Service {
|
|
|
13
13
|
super(...arguments);
|
|
14
14
|
/**
|
|
15
15
|
* Enabled
|
|
16
|
-
*
|
|
17
|
-
* @public
|
|
18
16
|
*/
|
|
19
17
|
this.enabled = true;
|
|
20
18
|
}
|
|
21
19
|
/**
|
|
22
20
|
* Type
|
|
23
|
-
*
|
|
24
|
-
* @public
|
|
25
21
|
*/
|
|
26
22
|
get name() {
|
|
27
23
|
return this.app.hooks.filter(`build.cache.name`, this.app.hooks.filter(`build.name`, this.app.context.label));
|
|
@@ -31,8 +27,6 @@ export default class Cache extends Service {
|
|
|
31
27
|
}
|
|
32
28
|
/**
|
|
33
29
|
* Type
|
|
34
|
-
*
|
|
35
|
-
* @public
|
|
36
30
|
*/
|
|
37
31
|
get type() {
|
|
38
32
|
return this.app.hooks.filter(`build.cache.type`, this.app.isCLI() && isString(this.app.context.args.cache)
|
|
@@ -44,8 +38,6 @@ export default class Cache extends Service {
|
|
|
44
38
|
}
|
|
45
39
|
/**
|
|
46
40
|
* version
|
|
47
|
-
*
|
|
48
|
-
* @public
|
|
49
41
|
*/
|
|
50
42
|
get version() {
|
|
51
43
|
const args = this.app.fs.json.stringify(this.app.isCLI() ? this.app.context.args : {});
|
|
@@ -59,8 +51,6 @@ export default class Cache extends Service {
|
|
|
59
51
|
}
|
|
60
52
|
/**
|
|
61
53
|
* Cache directory
|
|
62
|
-
*
|
|
63
|
-
* @public
|
|
64
54
|
*/
|
|
65
55
|
get cacheDirectory() {
|
|
66
56
|
return this.app.hooks.filter(`build.cache.cacheDirectory`, this.app.path(`@storage`, this.app.label, `cache`, this.app.mode));
|
|
@@ -70,8 +60,6 @@ export default class Cache extends Service {
|
|
|
70
60
|
}
|
|
71
61
|
/**
|
|
72
62
|
* Webpack configuration
|
|
73
|
-
*
|
|
74
|
-
* @public
|
|
75
63
|
*/
|
|
76
64
|
get configuration() {
|
|
77
65
|
if (this.enabled !== true)
|
|
@@ -91,13 +79,10 @@ export default class Cache extends Service {
|
|
|
91
79
|
};
|
|
92
80
|
}
|
|
93
81
|
/**
|
|
94
|
-
*
|
|
95
|
-
*
|
|
96
|
-
* @public
|
|
97
|
-
* @decorator `@bind`
|
|
82
|
+
* {@link Extension.booted}
|
|
98
83
|
*/
|
|
99
|
-
async booted() {
|
|
100
|
-
await
|
|
84
|
+
async booted(bud) {
|
|
85
|
+
await bud.extensions.add(InvalidateCacheExtension);
|
|
101
86
|
this.app.success(`cache initialized`);
|
|
102
87
|
}
|
|
103
88
|
/**
|
|
@@ -110,7 +95,7 @@ export default class Cache extends Service {
|
|
|
110
95
|
__decorate([
|
|
111
96
|
bind,
|
|
112
97
|
__metadata("design:type", Function),
|
|
113
|
-
__metadata("design:paramtypes", []),
|
|
98
|
+
__metadata("design:paramtypes", [Function]),
|
|
114
99
|
__metadata("design:returntype", Promise)
|
|
115
100
|
], Cache.prototype, "booted", null);
|
|
116
101
|
__decorate([
|
|
@@ -119,4 +104,4 @@ __decorate([
|
|
|
119
104
|
__metadata("design:paramtypes", []),
|
|
120
105
|
__metadata("design:returntype", Promise)
|
|
121
106
|
], Cache.prototype, "flush", null);
|
|
122
|
-
//# sourceMappingURL=
|
|
107
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/service/index.ts"],"names":[],"mappings":";AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,aAAa,CAAA;AAGtC,OAAO,EAAC,OAAO,EAAC,MAAM,8BAA8B,CAAA;AAEpD,OAAO,EAAC,IAAI,EAAC,MAAM,+BAA+B,CAAA;AAClD,OAAO,QAAQ,MAAM,oCAAoC,CAAA;AACzD,OAAO,IAAI,MAAM,gCAAgC,CAAA;AAGjD,OAAO,wBAAwB,MAAM,8BAA8B,CAAA;AAEnE;;G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AAI,EAAE,IAAI,CAAC,IAAI;gBACf,KAAK,EAAE,MAAgB;gBACvB,qBAAqB,EAAE,IAAI;gBAC3B,cAAc,EAAE,IAAI,CAAC,cAAc;gBACnC,WAAW,EAAE,KAAK;gBAClB,0BAA0B,EAAE,CAAC;gBAC7B,OAAO,EAAE,IAAI;gBACb,OAAO,EAAE,IAAI,CAAC,OAAO;aACtB,CAAA;IACP,CAAC;IAED;;OAEG;IAEmB,AAAN,KAAK,CAAC,MAAM,CAAE,GAAQ;QACpC,MAAM,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,wBAAwB,CAAC,CAAA;QAClD,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAA;IACvC,CAAC;IAED;;OAEG;IAEU,AAAN,KAAK,CAAC,KAAK;QAChB,MAAM,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,cAAc,CAAC,CAAA;IAC/C,CAAC;CACF;AAZuB;IADrB,IAAI;;;;mCAIJ;AAMY;IADZ,IAAI;;;;kCAGJ"}
|
package/lib/types.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,wBAAwB,MAAM,6BAA6B,CAAA;AAEvE,OAAO,QAAQ,sBAAsB,CAAC;IACpC,UAAU,OAAO;QACf,mCAAmC,EAAE,wBAAwB,CAAA;KAC9D;CACF"}
|
package/lib/types.js
ADDED
package/lib/types.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@roots/bud-cache",
|
|
3
3
|
"description": "Config caching",
|
|
4
|
-
"version": "2023.2.
|
|
4
|
+
"version": "2023.2.17",
|
|
5
5
|
"homepage": "https://roots.io/bud",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -40,15 +40,28 @@
|
|
|
40
40
|
"node": ">=16"
|
|
41
41
|
},
|
|
42
42
|
"files": [
|
|
43
|
-
"
|
|
44
|
-
"
|
|
43
|
+
"docs",
|
|
44
|
+
"lib",
|
|
45
|
+
"src"
|
|
45
46
|
],
|
|
46
47
|
"type": "module",
|
|
47
|
-
"module": "./lib/index.js",
|
|
48
|
-
"types": "./lib/index.d.ts",
|
|
49
48
|
"exports": {
|
|
50
|
-
".":
|
|
51
|
-
|
|
49
|
+
".": {
|
|
50
|
+
"types": "./lib/index.d.ts",
|
|
51
|
+
"import": "./lib/index.js"
|
|
52
|
+
},
|
|
53
|
+
"./service": {
|
|
54
|
+
"types": "./lib/service/index.js",
|
|
55
|
+
"import": "./lib/service.js"
|
|
56
|
+
},
|
|
57
|
+
"./invalidate-cache": {
|
|
58
|
+
"types": "./lib/invalidate-cache/index.d.ts",
|
|
59
|
+
"import": "./lib/invalidate-cache/index.js"
|
|
60
|
+
},
|
|
61
|
+
"./types": {
|
|
62
|
+
"types": "./lib/types.d.ts",
|
|
63
|
+
"import": "./lib/types.js"
|
|
64
|
+
}
|
|
52
65
|
},
|
|
53
66
|
"typesVersions": {
|
|
54
67
|
"*": {
|
|
@@ -57,15 +70,20 @@
|
|
|
57
70
|
],
|
|
58
71
|
"./service": [
|
|
59
72
|
"./lib/service.d.ts"
|
|
73
|
+
],
|
|
74
|
+
"./types": [
|
|
75
|
+
"./lib/types.d.ts"
|
|
60
76
|
]
|
|
61
77
|
}
|
|
62
78
|
},
|
|
79
|
+
"module": "./lib/index.js",
|
|
80
|
+
"types": "./lib/index.d.ts",
|
|
63
81
|
"devDependencies": {
|
|
64
82
|
"@skypack/package-check": "0.2.2"
|
|
65
83
|
},
|
|
66
84
|
"dependencies": {
|
|
67
|
-
"@roots/bud-framework": "2023.2.
|
|
68
|
-
"@roots/bud-support": "2023.2.
|
|
85
|
+
"@roots/bud-framework": "2023.2.17",
|
|
86
|
+
"@roots/bud-support": "2023.2.17",
|
|
69
87
|
"strip-ansi": "7.0.1"
|
|
70
88
|
},
|
|
71
89
|
"volta": {
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// Copyright © Roots Software Foundation LLC
|
|
2
|
+
// Licensed under the MIT license.
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Caching service
|
|
6
|
+
*
|
|
7
|
+
* @see {@link https://bud.js.org}
|
|
8
|
+
* @see {@link https://github.com/roots/bud}
|
|
9
|
+
*
|
|
10
|
+
* @packageDocumentation
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import './types.js'
|
|
14
|
+
|
|
15
|
+
import Cache from './service/index.js'
|
|
16
|
+
|
|
17
|
+
export default Cache
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import {join} from 'node:path'
|
|
2
|
+
|
|
3
|
+
import type {Bud} from '@roots/bud-framework'
|
|
4
|
+
import {Extension} from '@roots/bud-framework/extension'
|
|
5
|
+
import {bind, label} from '@roots/bud-framework/extension/decorators'
|
|
6
|
+
import stripAnsi from 'strip-ansi'
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Cache invalidation extension
|
|
10
|
+
*
|
|
11
|
+
* @remarks
|
|
12
|
+
* Certain webpack components such as `eslint-webpack-plugin` and
|
|
13
|
+
* `ts-loader` have issues with fs caching. This extension writes a file
|
|
14
|
+
* to the cache directory which is used to invalidate the cache before
|
|
15
|
+
* webpack is invoked on subsequent builds
|
|
16
|
+
*/
|
|
17
|
+
@label(`@roots/bud-cache/invalidate-cache`)
|
|
18
|
+
export default class InvalidateCacheExtension extends Extension {
|
|
19
|
+
/**
|
|
20
|
+
* Invalidation file path
|
|
21
|
+
*/
|
|
22
|
+
public get invalidationFile(): string {
|
|
23
|
+
return join(this.app.cache.cacheDirectory, `error.json`)
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* `register` callback
|
|
28
|
+
*/
|
|
29
|
+
@bind
|
|
30
|
+
public override async register(bud: Bud) {
|
|
31
|
+
const invalidate = await bud.fs?.exists(this.invalidationFile)
|
|
32
|
+
|
|
33
|
+
if (invalidate || (bud.isCLI() && bud.context.args.flush)) {
|
|
34
|
+
await bud.fs.remove(this.invalidationFile)
|
|
35
|
+
await bud.fs.remove(bud.cache.cacheDirectory)
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
bud.after(async () => {
|
|
39
|
+
bud.compiler.instance.hooks.done.tap(this.label, async compiler => {
|
|
40
|
+
try {
|
|
41
|
+
if (!compiler.hasErrors()) return
|
|
42
|
+
|
|
43
|
+
await bud.fs.json.write(this.invalidationFile, {
|
|
44
|
+
hash: compiler.hash,
|
|
45
|
+
errors: compiler.stats.flatMap(stats =>
|
|
46
|
+
stats
|
|
47
|
+
.toString({preset: `errors-warnings`, colors: false})
|
|
48
|
+
.split(/\n/)
|
|
49
|
+
.map(stripAnsi),
|
|
50
|
+
),
|
|
51
|
+
})
|
|
52
|
+
} catch (e) {}
|
|
53
|
+
})
|
|
54
|
+
})
|
|
55
|
+
}
|
|
56
|
+
}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import {createHash} from 'node:crypto'
|
|
2
|
+
|
|
3
|
+
import type {Bud} from '@roots/bud-framework'
|
|
4
|
+
import {Service} from '@roots/bud-framework/service'
|
|
5
|
+
import type * as Services from '@roots/bud-framework/services'
|
|
6
|
+
import {bind} from '@roots/bud-support/decorators'
|
|
7
|
+
import isString from '@roots/bud-support/lodash/isString'
|
|
8
|
+
import join from '@roots/bud-support/lodash/join'
|
|
9
|
+
import type {Configuration} from '@roots/bud-support/webpack'
|
|
10
|
+
|
|
11
|
+
import InvalidateCacheExtension from '../invalidate-cache/index.js'
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Cache service class
|
|
15
|
+
*/
|
|
16
|
+
export default class Cache
|
|
17
|
+
extends Service
|
|
18
|
+
implements Services.Cache.Service
|
|
19
|
+
{
|
|
20
|
+
/**
|
|
21
|
+
* Enabled
|
|
22
|
+
*/
|
|
23
|
+
public enabled: boolean = true
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Type
|
|
27
|
+
*/
|
|
28
|
+
public get name(): string {
|
|
29
|
+
return this.app.hooks.filter(
|
|
30
|
+
`build.cache.name`,
|
|
31
|
+
this.app.hooks.filter(`build.name`, this.app.context.label),
|
|
32
|
+
)
|
|
33
|
+
}
|
|
34
|
+
public set name(name: string) {
|
|
35
|
+
this.app.hooks.on(`build.cache.name`, name)
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Type
|
|
40
|
+
*/
|
|
41
|
+
public get type(): 'memory' | 'filesystem' {
|
|
42
|
+
return this.app.hooks.filter(
|
|
43
|
+
`build.cache.type`,
|
|
44
|
+
this.app.isCLI() && isString(this.app.context.args.cache)
|
|
45
|
+
? this.app.context.args.cache
|
|
46
|
+
: `filesystem`,
|
|
47
|
+
)
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
public set type(type: 'memory' | 'filesystem') {
|
|
51
|
+
this.app.hooks.on(`build.cache.type`, type)
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* version
|
|
56
|
+
*/
|
|
57
|
+
public get version(): string {
|
|
58
|
+
const args = this.app.fs.json.stringify(
|
|
59
|
+
this.app.isCLI() ? this.app.context.args : {},
|
|
60
|
+
)
|
|
61
|
+
const files = Object.values(this.app.context.config ?? {}).filter(
|
|
62
|
+
file => file?.bud && file.sha1,
|
|
63
|
+
)
|
|
64
|
+
|
|
65
|
+
return this.app.hooks.filter(
|
|
66
|
+
`build.cache.version`,
|
|
67
|
+
createHash(`sha1`)
|
|
68
|
+
.update(join(args, ...files.map(({module: {sha1}}) => sha1)))
|
|
69
|
+
.digest(`base64`),
|
|
70
|
+
)
|
|
71
|
+
}
|
|
72
|
+
public set version(version: string) {
|
|
73
|
+
this.app.hooks.on(`build.cache.version`, version)
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Cache directory
|
|
78
|
+
*/
|
|
79
|
+
public get cacheDirectory(): string {
|
|
80
|
+
return this.app.hooks.filter(
|
|
81
|
+
`build.cache.cacheDirectory`,
|
|
82
|
+
this.app.path(`@storage`, this.app.label, `cache`, this.app.mode),
|
|
83
|
+
)
|
|
84
|
+
}
|
|
85
|
+
public set cacheDirectory(directory: string) {
|
|
86
|
+
this.app.hooks.on(`build.cache.cacheDirectory`, directory)
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Webpack configuration
|
|
91
|
+
*/
|
|
92
|
+
public get configuration(): Configuration[`cache`] {
|
|
93
|
+
if (this.enabled !== true) return false
|
|
94
|
+
return this.type === `memory`
|
|
95
|
+
? true
|
|
96
|
+
: {
|
|
97
|
+
name: this.name,
|
|
98
|
+
type: this.type,
|
|
99
|
+
store: `pack` as `pack`,
|
|
100
|
+
allowCollectingMemory: true,
|
|
101
|
+
cacheDirectory: this.cacheDirectory,
|
|
102
|
+
idleTimeout: 10000,
|
|
103
|
+
idleTimeoutForInitialStore: 0,
|
|
104
|
+
profile: true,
|
|
105
|
+
version: this.version,
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* {@link Extension.booted}
|
|
111
|
+
*/
|
|
112
|
+
@bind
|
|
113
|
+
public override async booted?(bud: Bud) {
|
|
114
|
+
await bud.extensions.add(InvalidateCacheExtension)
|
|
115
|
+
this.app.success(`cache initialized`)
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Flush cache
|
|
120
|
+
*/
|
|
121
|
+
@bind
|
|
122
|
+
public async flush(): Promise<void> {
|
|
123
|
+
await this.app.fs.remove(this.cacheDirectory)
|
|
124
|
+
}
|
|
125
|
+
}
|
package/src/types.ts
ADDED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/invalidate-cache-extension/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAC,GAAG,EAAC,MAAM,sBAAsB,CAAA;AAC7C,OAAO,EAAC,SAAS,EAAC,MAAM,gCAAgC,CAAA;AAIxD;;;;;;;;;;;GAWG;AAEH,MAAM,CAAC,OAAO,OAAO,wBAAyB,SAAQ,SAAS;IAC7D;;;OAGG;IACH,IAAW,gBAAgB,IAAI,MAAM,CAEpC;IAED;;;;;OAKG;IAEmB,QAAQ,CAAC,GAAG,EAAE,GAAG;CA0BxC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/invalidate-cache-extension/index.ts"],"names":[],"mappings":";AAAA,OAAO,EAAC,IAAI,EAAC,MAAM,WAAW,CAAA;AAG9B,OAAO,EAAC,SAAS,EAAC,MAAM,gCAAgC,CAAA;AACxD,OAAO,EAAC,IAAI,EAAE,KAAK,EAAC,MAAM,2CAA2C,CAAA;AACrE,OAAO,SAAS,MAAM,YAAY,CAAA;AAElC;;;;;;;;;;;GAWG;AAEY,IAAM,wBAAwB,GAA9B,MAAM,wBAAyB,SAAQ,SAAS;IAC7D;;;OAGG;IACH,IAAW,gBAAgB;QACzB,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,cAAc,EAAE,YAAY,CAAC,CAAA;IAC1D,CAAC;IAED;;;;;OAKG;IAEmB,AAAN,KAAK,CAAC,QAAQ,CAAC,GAAQ;QACrC,MAAM,UAAU,GAAG,MAAM,GAAG,CAAC,EAAE,EAAE,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAA;QAE9D,IAAI,UAAU,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,IAAI,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE;YACzD,MAAM,GAAG,CAAC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