@roots/bud-compiler 6.5.2 → 6.6.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.
- package/lib/compiler.service.d.ts +3 -3
- package/lib/compiler.service.d.ts.map +1 -1
- package/lib/compiler.service.js +28 -14
- package/lib/compiler.service.js.map +1 -1
- package/lib/index.d.ts +1 -2
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -2
- package/lib/index.js.map +1 -1
- package/package.json +5 -9
@@ -1,6 +1,6 @@
|
|
1
1
|
import { Service } from '@roots/bud-framework/service';
|
2
2
|
import type { Compiler as Contract } from '@roots/bud-framework/services';
|
3
|
-
import type { MultiCompiler, MultiStats, WebpackError } from 'webpack';
|
3
|
+
import type { MultiCompiler, MultiStats, WebpackError } from '@roots/bud-support/webpack';
|
4
4
|
/**
|
5
5
|
* Wepback compilation controller class
|
6
6
|
*
|
@@ -54,7 +54,7 @@ export declare class Compiler extends Service implements Contract.Service {
|
|
54
54
|
* @decorator `@bind`
|
55
55
|
* @decorator `@once`
|
56
56
|
*/
|
57
|
-
callback(error:
|
57
|
+
callback(error: WebpackError, stats: MultiStats): void;
|
58
58
|
/**
|
59
59
|
* Stats handler
|
60
60
|
*
|
@@ -75,6 +75,6 @@ export declare class Compiler extends Service implements Contract.Service {
|
|
75
75
|
* @public
|
76
76
|
* @decorator `@bind`
|
77
77
|
*/
|
78
|
-
onError(error:
|
78
|
+
onError(error: WebpackError): void;
|
79
79
|
}
|
80
80
|
//# sourceMappingURL=compiler.service.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"compiler.service.d.ts","sourceRoot":"","sources":["../src/compiler.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,OAAO,EAAC,MAAM,8BAA8B,CAAA;AACpD,OAAO,KAAK,EAAC,QAAQ,IAAI,QAAQ,EAAC,MAAM,+BAA+B,CAAA;AAEvE,OAAO,KAAK,
|
1
|
+
{"version":3,"file":"compiler.service.d.ts","sourceRoot":"","sources":["../src/compiler.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,OAAO,EAAC,MAAM,8BAA8B,CAAA;AACpD,OAAO,KAAK,EAAC,QAAQ,IAAI,QAAQ,EAAC,MAAM,+BAA+B,CAAA;AAEvE,OAAO,KAAK,EACV,aAAa,EACb,UAAU,EACV,YAAY,EACb,MAAM,4BAA4B,CAAA;AAEnC;;;;GAIG;AACH,qBAAa,QAAS,SAAQ,OAAQ,YAAW,QAAQ,CAAC,OAAO;IAC/D;;;;OAIG;IACH,OAAuB,KAAK,SAAa;IAEzC;;;;OAIG;IACI,cAAc,EAAE,QAAQ,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAA;IAEzD;;;;OAIG;IACI,QAAQ,EAAE,QAAQ,CAAC,OAAO,CAAC,UAAU,CAAC,CAAA;IAE7C;;;;OAIG;IACI,KAAK,EAAE,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,CAAA;IAEvC;;;;OAIG;IACI,MAAM,EAAE,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAK;IAE9C;;;;;;;;OAQG;IAEU,OAAO,IAAI,OAAO,CAAC,aAAa,CAAC;IA4D9C;;;;;;OAMG;IAEI,QAAQ,CAAC,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,UAAU;IAKtD;;;;;OAKG;IAEI,WAAW,CAAC,KAAK,EAAE,UAAU;IAKpC;;;;;OAKG;IAEI,OAAO,CAAC,KAAK,CAAC,EAAE,YAAY;IAInC;;;;;OAKG;IAEI,OAAO,CAAC,KAAK,EAAE,YAAY;CASnC"}
|
package/lib/compiler.service.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import { __decorate } from "tslib";
|
1
|
+
import { __decorate, __metadata } from "tslib";
|
2
2
|
import { Service } from '@roots/bud-framework/service';
|
3
3
|
import { bind } from '@roots/bud-support/decorators';
|
4
4
|
/**
|
@@ -59,9 +59,7 @@ export class Compiler extends Service {
|
|
59
59
|
try {
|
60
60
|
await this.app.hooks.fire(`compiler.after`);
|
61
61
|
}
|
62
|
-
catch (error) {
|
63
|
-
this.onError(error);
|
64
|
-
}
|
62
|
+
catch (error) { }
|
65
63
|
return callback();
|
66
64
|
}));
|
67
65
|
return this.instance;
|
@@ -75,9 +73,9 @@ export class Compiler extends Service {
|
|
75
73
|
*/
|
76
74
|
callback(error, stats) {
|
77
75
|
if (error)
|
78
|
-
this.onError(error);
|
76
|
+
return this.onError(error);
|
79
77
|
if (stats)
|
80
|
-
this.handleStats(stats);
|
78
|
+
return this.handleStats(stats);
|
81
79
|
}
|
82
80
|
/**
|
83
81
|
* Stats handler
|
@@ -86,8 +84,6 @@ export class Compiler extends Service {
|
|
86
84
|
* @decorator `@bind`
|
87
85
|
*/
|
88
86
|
handleStats(stats) {
|
89
|
-
if (!stats)
|
90
|
-
return;
|
91
87
|
this.stats = stats;
|
92
88
|
this.app.dashboard.stats(stats);
|
93
89
|
}
|
@@ -110,7 +106,10 @@ export class Compiler extends Service {
|
|
110
106
|
onError(error) {
|
111
107
|
this.app.isDevelopment &&
|
112
108
|
this.app.server.appliedMiddleware?.hot?.publish({ error });
|
113
|
-
this.app.isProduction
|
109
|
+
if (this.app.isProduction) {
|
110
|
+
process.exitCode = 1;
|
111
|
+
this.app.error(error);
|
112
|
+
}
|
114
113
|
}
|
115
114
|
}
|
116
115
|
/**
|
@@ -120,18 +119,33 @@ export class Compiler extends Service {
|
|
120
119
|
*/
|
121
120
|
Compiler.label = `compiler`;
|
122
121
|
__decorate([
|
123
|
-
bind
|
122
|
+
bind,
|
123
|
+
__metadata("design:type", Function),
|
124
|
+
__metadata("design:paramtypes", []),
|
125
|
+
__metadata("design:returntype", Promise)
|
124
126
|
], Compiler.prototype, "compile", null);
|
125
127
|
__decorate([
|
126
|
-
bind
|
128
|
+
bind,
|
129
|
+
__metadata("design:type", Function),
|
130
|
+
__metadata("design:paramtypes", [Function, Function]),
|
131
|
+
__metadata("design:returntype", void 0)
|
127
132
|
], Compiler.prototype, "callback", null);
|
128
133
|
__decorate([
|
129
|
-
bind
|
134
|
+
bind,
|
135
|
+
__metadata("design:type", Function),
|
136
|
+
__metadata("design:paramtypes", [Function]),
|
137
|
+
__metadata("design:returntype", void 0)
|
130
138
|
], Compiler.prototype, "handleStats", null);
|
131
139
|
__decorate([
|
132
|
-
bind
|
140
|
+
bind,
|
141
|
+
__metadata("design:type", Function),
|
142
|
+
__metadata("design:paramtypes", [Function]),
|
143
|
+
__metadata("design:returntype", void 0)
|
133
144
|
], Compiler.prototype, "onClose", null);
|
134
145
|
__decorate([
|
135
|
-
bind
|
146
|
+
bind,
|
147
|
+
__metadata("design:type", Function),
|
148
|
+
__metadata("design:paramtypes", [Function]),
|
149
|
+
__metadata("design:returntype", void 0)
|
136
150
|
], Compiler.prototype, "onError", null);
|
137
151
|
//# sourceMappingURL=compiler.service.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"compiler.service.js","sourceRoot":"","sources":["../src/compiler.service.ts"],"names":[],"mappings":";AACA,OAAO,EAAC,OAAO,EAAC,MAAM,8BAA8B,CAAA;AAEpD,OAAO,EAAC,IAAI,EAAC,MAAM,+BAA+B,CAAA;
|
1
|
+
{"version":3,"file":"compiler.service.js","sourceRoot":"","sources":["../src/compiler.service.ts"],"names":[],"mappings":";AACA,OAAO,EAAC,OAAO,EAAC,MAAM,8BAA8B,CAAA;AAEpD,OAAO,EAAC,IAAI,EAAC,MAAM,+BAA+B,CAAA;AAOlD;;;;GAIG;AACH,MAAM,OAAO,QAAS,SAAQ,OAAO;IAArC;;QA6BE;;;;WAIG;QACI,WAAM,GAA+B,EAAE,CAAA;IA4HhD,CAAC;IA1HC;;;;;;;;OAQG;IAEU,AAAN,KAAK,CAAC,OAAO;QAClB,MAAM,OAAO,GAAG,MAAM,MAAM,CAAC,SAAS,CAAC,CAAA;QAEvC,IAAI,CAAC,cAAc,GAAG,OAAO,CAAC,OAAO,CAAA;QAErC,IAAI,CAAC,MAA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CAAC,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;IACjC,CAAC;IAED;;;;;OAKG;IAEI,OAAO,CAAC,KAAoB;QACjC,IAAI,KAAK;YAAE,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;IACvC,CAAC;IAED;;;;;OAKG;IAEI,OAAO,CAAC,KAAmB;QAChC,IAAI,CAAC,GAAG,CAAC,aAAa;YACpB,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,iBAAiB,EAAE,GAAG,EAAE,OAAO,CAAC,EAAC,KAAK,EAAC,CAAC,CAAA;QAE1D,IAAI,IAAI,CAAC,GAAG,CAAC,YAAY,EAAE;YACzB,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAA;YACpB,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;SACtB;IACH,CAAC;;AA5JD;;;;GAIG;AACoB,cAAK,GAAG,UAAU,CAAA;AAwC5B;IADZ,IAAI;;;;uCA2DJ;AASD;IAAC,IAAI;;;;wCAIJ;AAQD;IAAC,IAAI;;;;2CAIJ;AAQD;IAAC,IAAI;;;;uCAGJ;AAQD;IAAC,IAAI;;;;uCASJ"}
|
package/lib/index.d.ts
CHANGED
package/lib/index.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA;;;;;;;GAOG;AAEH,OAAO,EAAC,QAAQ,EAAC,MAAM,uBAAuB,CAAA;AAE9C,eAAe,QAAQ,CAAA"}
|
package/lib/index.js
CHANGED
@@ -1,8 +1,7 @@
|
|
1
1
|
// Copyright © Roots Software Foundation LLC
|
2
2
|
// Licensed under the MIT license.
|
3
3
|
/**
|
4
|
-
* The
|
5
|
-
* {@link @roots/bud-framework#Compiler | Compiler interface}
|
4
|
+
* The bud compiler interface
|
6
5
|
*
|
7
6
|
* @see https://bud.js.org
|
8
7
|
* @see https://github.com/roots/bud
|
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;AAElC
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,4CAA4C;AAC5C,kCAAkC;AAElC;;;;;;;GAOG;AAEH,OAAO,EAAC,QAAQ,EAAC,MAAM,uBAAuB,CAAA;AAE9C,eAAe,QAAQ,CAAA"}
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@roots/bud-compiler",
|
3
3
|
"description": "Compilation handler",
|
4
|
-
"version": "6.
|
4
|
+
"version": "6.6.0",
|
5
5
|
"homepage": "https://roots.io/bud",
|
6
6
|
"repository": {
|
7
7
|
"type": "git",
|
@@ -50,17 +50,13 @@
|
|
50
50
|
}
|
51
51
|
},
|
52
52
|
"devDependencies": {
|
53
|
-
"@
|
54
|
-
"@repo/test-kit": "0.0.0",
|
55
|
-
"@roots/bud-api": "6.5.2",
|
53
|
+
"@roots/bud-api": "6.6.0",
|
56
54
|
"@skypack/package-check": "0.2.2",
|
57
|
-
"@types/node": "16.
|
58
|
-
"webpack": "5.74.0"
|
55
|
+
"@types/node": "16.18.3"
|
59
56
|
},
|
60
57
|
"dependencies": {
|
61
|
-
"@roots/bud-framework": "6.
|
62
|
-
"@roots/bud-support": "6.
|
63
|
-
"tslib": "2.4.0"
|
58
|
+
"@roots/bud-framework": "6.6.0",
|
59
|
+
"@roots/bud-support": "6.6.0"
|
64
60
|
},
|
65
61
|
"volta": {
|
66
62
|
"extends": "../../../package.json"
|