Add JS-CATCH-FALLBACK-01 rule and update npm packages
Add PHP-ALIAS-01 rule: prohibit field aliasing in serialization 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
21
node_modules/webpack/hot/dev-server.js
generated
vendored
Executable file → Normal file
21
node_modules/webpack/hot/dev-server.js
generated
vendored
Executable file → Normal file
@@ -61,14 +61,29 @@ if (module.hot) {
|
||||
}
|
||||
});
|
||||
};
|
||||
/** @type {EventTarget | NodeJS.EventEmitter} */
|
||||
var hotEmitter = require("./emitter");
|
||||
hotEmitter.on("webpackHotUpdate", function (currentHash) {
|
||||
lastHash = currentHash;
|
||||
/**
|
||||
* @param {CustomEvent<{ currentHash: string }>} event event or hash
|
||||
*/
|
||||
var handler = function (event) {
|
||||
lastHash = typeof event === "string" ? event : event.detail.currentHash;
|
||||
if (!upToDate() && module.hot.status() === "idle") {
|
||||
log("info", "[HMR] Checking for updates on the server...");
|
||||
check();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
if (typeof EventTarget !== "undefined" && hotEmitter instanceof EventTarget) {
|
||||
hotEmitter.addEventListener(
|
||||
"webpackHotUpdate",
|
||||
/** @type {EventListener} */
|
||||
(handler)
|
||||
);
|
||||
} else {
|
||||
hotEmitter.on("webpackHotUpdate", handler);
|
||||
}
|
||||
|
||||
log("info", "[HMR] Waiting for update signal from WDS...");
|
||||
} else {
|
||||
throw new Error("[HMR] Hot Module Replacement is disabled.");
|
||||
|
||||
7
node_modules/webpack/hot/emitter-event-target.js
generated
vendored
Normal file
7
node_modules/webpack/hot/emitter-event-target.js
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
if (typeof EventTarget !== "function") {
|
||||
throw new Error(
|
||||
"Environment doesn't support lazy compilation (requires EventTarget)"
|
||||
);
|
||||
}
|
||||
|
||||
module.exports = new EventTarget();
|
||||
0
node_modules/webpack/hot/emitter.js
generated
vendored
Executable file → Normal file
0
node_modules/webpack/hot/emitter.js
generated
vendored
Executable file → Normal file
74
node_modules/webpack/hot/lazy-compilation-node.js
generated
vendored
Executable file → Normal file
74
node_modules/webpack/hot/lazy-compilation-node.js
generated
vendored
Executable file → Normal file
@@ -1,7 +1,7 @@
|
||||
/* global __resourceQuery */
|
||||
|
||||
"use strict";
|
||||
|
||||
/* global __resourceQuery */
|
||||
|
||||
var urlBase = decodeURIComponent(__resourceQuery.slice(1));
|
||||
|
||||
/**
|
||||
@@ -10,29 +10,6 @@ var urlBase = decodeURIComponent(__resourceQuery.slice(1));
|
||||
*/
|
||||
exports.keepAlive = function (options) {
|
||||
var data = options.data;
|
||||
var onError = options.onError;
|
||||
var active = options.active;
|
||||
var module = options.module;
|
||||
/** @type {import("http").IncomingMessage} */
|
||||
var response;
|
||||
var request = (
|
||||
urlBase.startsWith("https") ? require("https") : require("http")
|
||||
).request(
|
||||
urlBase + data,
|
||||
{
|
||||
agent: false,
|
||||
headers: { accept: "text/event-stream" }
|
||||
},
|
||||
function (res) {
|
||||
response = res;
|
||||
response.on("error", errorHandler);
|
||||
if (!active && !module.hot) {
|
||||
console.log(
|
||||
"Hot Module Replacement is not enabled. Waiting for process restart..."
|
||||
);
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
/**
|
||||
* @param {Error} err error
|
||||
@@ -40,11 +17,50 @@ exports.keepAlive = function (options) {
|
||||
function errorHandler(err) {
|
||||
err.message =
|
||||
"Problem communicating active modules to the server: " + err.message;
|
||||
onError(err);
|
||||
options.onError(err);
|
||||
}
|
||||
request.on("error", errorHandler);
|
||||
request.end();
|
||||
|
||||
/** @type {Promise<import("http") | import("https")>} */
|
||||
var mod = require("./load-http")(urlBase.startsWith("https"));
|
||||
|
||||
/** @type {import("http").ClientRequest} */
|
||||
var request;
|
||||
/** @type {import("http").IncomingMessage} */
|
||||
var response;
|
||||
|
||||
mod.then(function (client) {
|
||||
request = client.request(
|
||||
urlBase + data,
|
||||
{
|
||||
agent: false,
|
||||
headers: { accept: "text/event-stream" }
|
||||
},
|
||||
function (res) {
|
||||
response = res;
|
||||
response.on("error", errorHandler);
|
||||
|
||||
if (!options.active && !options.module.hot) {
|
||||
console.log(
|
||||
"Hot Module Replacement is not enabled. Waiting for process restart..."
|
||||
);
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
request.on("error", errorHandler);
|
||||
request.end();
|
||||
});
|
||||
|
||||
return function () {
|
||||
response.destroy();
|
||||
if (response) {
|
||||
response.destroy();
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {string} value new url value
|
||||
*/
|
||||
exports.setUrl = function (value) {
|
||||
urlBase = value;
|
||||
};
|
||||
|
||||
18
node_modules/webpack/hot/lazy-compilation-universal.js
generated
vendored
Normal file
18
node_modules/webpack/hot/lazy-compilation-universal.js
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
"use strict";
|
||||
|
||||
/* global __resourceQuery */
|
||||
|
||||
var isNodeLikeEnv =
|
||||
typeof global !== "undefined" && typeof global.process !== "undefined";
|
||||
|
||||
var handler = isNodeLikeEnv
|
||||
? require("./lazy-compilation-node")
|
||||
: require("./lazy-compilation-web");
|
||||
|
||||
handler.setUrl(decodeURIComponent(__resourceQuery.slice(1)));
|
||||
|
||||
/**
|
||||
* @param {{ data: string, onError: (err: Error) => void, active: boolean, module: module }} options options
|
||||
* @returns {() => void} function to destroy response
|
||||
*/
|
||||
module.exports = handler;
|
||||
20
node_modules/webpack/hot/lazy-compilation-web.js
generated
vendored
Executable file → Normal file
20
node_modules/webpack/hot/lazy-compilation-web.js
generated
vendored
Executable file → Normal file
@@ -1,7 +1,7 @@
|
||||
/* global __resourceQuery */
|
||||
|
||||
"use strict";
|
||||
|
||||
/* global __resourceQuery */
|
||||
|
||||
if (typeof EventSource !== "function") {
|
||||
throw new Error(
|
||||
"Environment doesn't support lazy compilation (requires EventSource)"
|
||||
@@ -54,15 +54,18 @@ var updateEventSource = function updateEventSource() {
|
||||
exports.keepAlive = function (options) {
|
||||
var data = options.data;
|
||||
var onError = options.onError;
|
||||
var active = options.active;
|
||||
var module = options.module;
|
||||
|
||||
errorHandlers.add(onError);
|
||||
|
||||
var value = activeKeys.get(data) || 0;
|
||||
|
||||
activeKeys.set(data, value + 1);
|
||||
|
||||
if (value === 0) {
|
||||
updateEventSource();
|
||||
}
|
||||
if (!active && !module.hot) {
|
||||
|
||||
if (!options.active && !options.module.hot) {
|
||||
console.log(
|
||||
"Hot Module Replacement is not enabled. Waiting for process restart..."
|
||||
);
|
||||
@@ -81,3 +84,10 @@ exports.keepAlive = function (options) {
|
||||
}, 1000);
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {string} value new url value
|
||||
*/
|
||||
exports.setUrl = function (value) {
|
||||
urlBase = value;
|
||||
};
|
||||
|
||||
7
node_modules/webpack/hot/load-http.js
generated
vendored
Normal file
7
node_modules/webpack/hot/load-http.js
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
/**
|
||||
* @param {boolean} isHTTPS true when need https module, otherwise false
|
||||
* @returns {Promise<import("http") | import("https")>}
|
||||
*/
|
||||
module.exports = function (isHTTPS) {
|
||||
return isHTTPS ? import("https") : import("http");
|
||||
};
|
||||
0
node_modules/webpack/hot/log-apply-result.js
generated
vendored
Executable file → Normal file
0
node_modules/webpack/hot/log-apply-result.js
generated
vendored
Executable file → Normal file
0
node_modules/webpack/hot/log.js
generated
vendored
Executable file → Normal file
0
node_modules/webpack/hot/log.js
generated
vendored
Executable file → Normal file
23
node_modules/webpack/hot/only-dev-server.js
generated
vendored
Executable file → Normal file
23
node_modules/webpack/hot/only-dev-server.js
generated
vendored
Executable file → Normal file
@@ -4,7 +4,7 @@
|
||||
*/
|
||||
/* globals __webpack_hash__ */
|
||||
if (module.hot) {
|
||||
/** @type {undefined|string} */
|
||||
/** @type {undefined | string} */
|
||||
var lastHash;
|
||||
var upToDate = function upToDate() {
|
||||
return /** @type {string} */ (lastHash).indexOf(__webpack_hash__) >= 0;
|
||||
@@ -79,9 +79,13 @@ if (module.hot) {
|
||||
}
|
||||
});
|
||||
};
|
||||
/** @type {EventTarget | NodeJS.EventEmitter} */
|
||||
var hotEmitter = require("./emitter");
|
||||
hotEmitter.on("webpackHotUpdate", function (currentHash) {
|
||||
lastHash = currentHash;
|
||||
/**
|
||||
* @param {CustomEvent<{ currentHash: string }>} event event or hash
|
||||
*/
|
||||
var handler = function (event) {
|
||||
lastHash = typeof event === "string" ? event : event.detail.currentHash;
|
||||
if (!upToDate()) {
|
||||
var status = module.hot.status();
|
||||
if (status === "idle") {
|
||||
@@ -96,7 +100,18 @@ if (module.hot) {
|
||||
);
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
if (typeof EventTarget !== "undefined" && hotEmitter instanceof EventTarget) {
|
||||
hotEmitter.addEventListener(
|
||||
"webpackHotUpdate",
|
||||
/** @type {EventListener} */
|
||||
(handler)
|
||||
);
|
||||
} else {
|
||||
hotEmitter.on("webpackHotUpdate", handler);
|
||||
}
|
||||
|
||||
log("info", "[HMR] Waiting for update signal from WDS...");
|
||||
} else {
|
||||
throw new Error("[HMR] Hot Module Replacement is disabled.");
|
||||
|
||||
0
node_modules/webpack/hot/poll.js
generated
vendored
Executable file → Normal file
0
node_modules/webpack/hot/poll.js
generated
vendored
Executable file → Normal file
0
node_modules/webpack/hot/signal.js
generated
vendored
Executable file → Normal file
0
node_modules/webpack/hot/signal.js
generated
vendored
Executable file → Normal file
Reference in New Issue
Block a user