Update npm packages (73 packages including @jqhtml 2.3.36)
Update npm registry domain from privatenpm.hanson.xyz to npm.internal.hanson.xyz 🤖 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/lib/asset/AssetGenerator.js
generated
vendored
21
node_modules/webpack/lib/asset/AssetGenerator.js
generated
vendored
@@ -43,6 +43,7 @@ const getMimeTypes = memoize(() => require("mime-types"));
|
||||
/** @typedef {import("../Compilation").AssetInfo} AssetInfo */
|
||||
/** @typedef {import("../Generator").GenerateContext} GenerateContext */
|
||||
/** @typedef {import("../Generator").UpdateHashContext} UpdateHashContext */
|
||||
/** @typedef {import("../Module")} Module */
|
||||
/** @typedef {import("../Module").NameForCondition} NameForCondition */
|
||||
/** @typedef {import("../Module").BuildInfo} BuildInfo */
|
||||
/** @typedef {import("../Module").ConcatenationBailoutReasonContext} ConcatenationBailoutReasonContext */
|
||||
@@ -54,6 +55,8 @@ const getMimeTypes = memoize(() => require("mime-types"));
|
||||
/** @typedef {import("../util/Hash")} Hash */
|
||||
/** @typedef {import("../util/runtime").RuntimeSpec} RuntimeSpec */
|
||||
|
||||
/** @typedef {(source: string | Buffer, context: { filename: string, module: Module }) => string} DataUrlFunction */
|
||||
|
||||
/**
|
||||
* @template T
|
||||
* @template U
|
||||
@@ -62,12 +65,13 @@ const getMimeTypes = memoize(() => require("mime-types"));
|
||||
* @returns {T[] & U[]} array
|
||||
*/
|
||||
const mergeMaybeArrays = (a, b) => {
|
||||
/** @type {Set<T | U | null | undefined | string | Set<T> | Set<U>>} */
|
||||
const set = new Set();
|
||||
if (Array.isArray(a)) for (const item of a) set.add(item);
|
||||
else set.add(a);
|
||||
if (Array.isArray(b)) for (const item of b) set.add(item);
|
||||
else set.add(b);
|
||||
return [...set];
|
||||
return /** @type {T[] & U[]} */ ([.../** @type {Set<T | U>} */ (set)]);
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -204,11 +208,17 @@ class AssetGenerator extends Generator {
|
||||
emit
|
||||
) {
|
||||
super();
|
||||
/** @type {AssetGeneratorOptions["dataUrl"] | undefined} */
|
||||
this.dataUrlOptions = dataUrlOptions;
|
||||
/** @type {AssetModuleFilename | undefined} */
|
||||
this.filename = filename;
|
||||
/** @type {RawPublicPath | undefined} */
|
||||
this.publicPath = publicPath;
|
||||
/** @type {AssetModuleOutputPath | undefined} */
|
||||
this.outputPath = outputPath;
|
||||
/** @type {boolean | undefined} */
|
||||
this.emit = emit;
|
||||
/** @type {ModuleGraph} */
|
||||
this._moduleGraph = moduleGraph;
|
||||
}
|
||||
|
||||
@@ -333,6 +343,7 @@ class AssetGenerator extends Generator {
|
||||
runtimeTemplate
|
||||
);
|
||||
|
||||
/** @type {undefined | string} */
|
||||
let assetPath;
|
||||
|
||||
if (generatorOptions.publicPath !== undefined && type === JAVASCRIPT_TYPE) {
|
||||
@@ -457,6 +468,7 @@ class AssetGenerator extends Generator {
|
||||
generateDataUri(module) {
|
||||
const source = /** @type {Source} */ (module.originalSource());
|
||||
|
||||
/** @type {string} */
|
||||
let encodedSource;
|
||||
|
||||
if (typeof this.dataUrlOptions === "function") {
|
||||
@@ -480,6 +492,7 @@ class AssetGenerator extends Generator {
|
||||
}
|
||||
const mimeType = this.getMimeType(module);
|
||||
|
||||
/** @type {string} */
|
||||
let encodedContent;
|
||||
|
||||
if (
|
||||
@@ -490,7 +503,9 @@ class AssetGenerator extends Generator {
|
||||
/** @type {string} */ (module.resourceResolveData.encodedContent)
|
||||
).equals(source.buffer())
|
||||
) {
|
||||
encodedContent = module.resourceResolveData.encodedContent;
|
||||
encodedContent =
|
||||
/** @type {string} */
|
||||
(module.resourceResolveData.encodedContent);
|
||||
} else {
|
||||
encodedContent = encodeDataUri(
|
||||
/** @type {"base64" | false} */ (encoding),
|
||||
@@ -520,10 +535,10 @@ class AssetGenerator extends Generator {
|
||||
concatenationScope
|
||||
} = generateContext;
|
||||
|
||||
/** @type {string} */
|
||||
let content;
|
||||
|
||||
const needContent = type === JAVASCRIPT_TYPE || type === CSS_URL_TYPE;
|
||||
|
||||
const data = getData ? getData() : undefined;
|
||||
|
||||
if (
|
||||
|
||||
Reference in New Issue
Block a user