arui-scripts 18.7.0 → 19.0.1
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/.turbo/turbo-test.log +6 -10
- package/CHANGELOG.md +33 -0
- package/build/commands/build/build-wrapper.d.ts +3 -3
- package/build/commands/build/build-wrapper.js +2 -2
- package/build/commands/bundle-analyze/index.js +5 -3
- package/build/commands/util/client-assets-sizes.d.ts +1 -1
- package/build/commands/util/run-client-dev-server.d.ts +1 -1
- package/build/commands/util/run-client-dev-server.js +6 -6
- package/build/commands/util/run-server-watch-compiler.d.ts +2 -2
- package/build/commands/util/run-server-watch-compiler.js +2 -2
- package/build/configs/app-configs/calculate-dependent-config.js +1 -1
- package/build/configs/app-configs/get-defaults.js +4 -7
- package/build/configs/app-configs/types.d.ts +4 -17
- package/build/configs/app-configs/warn-about-deprecations.js +14 -5
- package/build/configs/babel-client.js +1 -1
- package/build/configs/babel-server.js +1 -1
- package/build/configs/client-env-config/client-config-plugin.d.ts +1 -1
- package/build/configs/config-extras/minimizers/imagemin/imagemin.d.ts +27 -1
- package/build/configs/config-extras/minimizers/imagemin/imagemin.js +55 -41
- package/build/configs/dev-server.js +39 -30
- package/build/configs/modules.d.ts +3 -3
- package/build/configs/modules.js +25 -2
- package/build/configs/stats-options.d.ts +2 -2
- package/build/configs/util/apply-overrides.d.ts +11 -11
- package/build/configs/util/find-loader.d.ts +2 -2
- package/build/configs/util/find-plugin.d.ts +9 -6
- package/build/configs/webpack.client.d.ts +2 -2
- package/build/configs/webpack.client.dev.d.ts +1 -1
- package/build/configs/webpack.client.js +24 -56
- package/build/configs/webpack.client.prod.d.ts +1 -1
- package/build/configs/webpack.server.d.ts +1 -1
- package/build/configs/webpack.server.dev.d.ts +1 -1
- package/build/configs/webpack.server.js +13 -43
- package/build/configs/webpack.server.prod.d.ts +1 -1
- package/build/plugins/arui-runtime/arui-runtime-module.d.ts +2 -2
- package/build/plugins/arui-runtime/arui-runtime-module.js +5 -8
- package/build/plugins/arui-runtime/index.d.ts +2 -2
- package/build/plugins/arui-runtime/index.js +2 -5
- package/build/plugins/postcss-global-variables/utils/utils.js +20 -6
- package/build/plugins/reload-server-plugin.d.ts +10 -0
- package/build/plugins/reload-server-plugin.js +44 -0
- package/build/plugins/watch-missing-node-modules-plugin.d.ts +5 -5
- package/build/plugins/watch-missing-node-modules-plugin.js +3 -1
- package/build/tsconfig-local.tsbuildinfo +1 -1
- package/docs/commands.md +1 -1
- package/docs/settings.md +10 -33
- package/package.json +10 -6
- package/build/plugins/reload-server-webpack-plugin.d.ts +0 -9
- package/build/plugins/reload-server-webpack-plugin.js +0 -44
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.ReloadServerPlugin = void 0;
|
|
7
|
+
const cluster_1 = __importDefault(require("cluster"));
|
|
8
|
+
const path_1 = __importDefault(require("path"));
|
|
9
|
+
const defaultOptions = {
|
|
10
|
+
script: 'server.js',
|
|
11
|
+
};
|
|
12
|
+
class ReloadServerPlugin {
|
|
13
|
+
constructor({ script } = defaultOptions) {
|
|
14
|
+
this.workers = [];
|
|
15
|
+
this.done = null;
|
|
16
|
+
this.done = null;
|
|
17
|
+
this.workers = [];
|
|
18
|
+
cluster_1.default.setupMaster({
|
|
19
|
+
exec: path_1.default.resolve(process.cwd(), script),
|
|
20
|
+
});
|
|
21
|
+
cluster_1.default.on('online', (worker) => {
|
|
22
|
+
this.workers.push(worker);
|
|
23
|
+
if (this.done) {
|
|
24
|
+
this.done();
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
apply(compiler) {
|
|
29
|
+
compiler.hooks.afterEmit.tapAsync('ReloadServerPlugin', (compilation, callback) => {
|
|
30
|
+
this.done = callback;
|
|
31
|
+
this.workers.forEach((worker) => {
|
|
32
|
+
try {
|
|
33
|
+
process.kill(worker.process.pid, 'SIGTERM');
|
|
34
|
+
}
|
|
35
|
+
catch (e) {
|
|
36
|
+
console.warn(`Unable to kill process #${worker.process.pid}`);
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
this.workers = [];
|
|
40
|
+
cluster_1.default.fork();
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
exports.ReloadServerPlugin = ReloadServerPlugin;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
declare class WatchMissingNodeModulesPlugin {
|
|
3
|
-
|
|
4
|
-
nodeModulesPath:
|
|
5
|
-
apply(compiler:
|
|
1
|
+
import { type Compiler } from 'webpack';
|
|
2
|
+
export declare class WatchMissingNodeModulesPlugin {
|
|
3
|
+
nodeModulesPath: string;
|
|
4
|
+
constructor(nodeModulesPath: string);
|
|
5
|
+
apply(compiler: Compiler): void;
|
|
6
6
|
}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WatchMissingNodeModulesPlugin = void 0;
|
|
2
4
|
class WatchMissingNodeModulesPlugin {
|
|
3
5
|
constructor(nodeModulesPath) {
|
|
4
6
|
this.nodeModulesPath = nodeModulesPath;
|
|
@@ -15,4 +17,4 @@ class WatchMissingNodeModulesPlugin {
|
|
|
15
17
|
});
|
|
16
18
|
}
|
|
17
19
|
}
|
|
18
|
-
|
|
20
|
+
exports.WatchMissingNodeModulesPlugin = WatchMissingNodeModulesPlugin;
|