Enhance refactor commands with controller-aware Route() updates and fix code quality violations
Add semantic token highlighting for 'that' variable and comment file references in VS Code extension Add Phone_Text_Input and Currency_Input components with formatting utilities Implement client widgets, form standardization, and soft delete functionality Add modal scroll lock and update documentation Implement comprehensive modal system with form integration and validation Fix modal component instantiation using jQuery plugin API Implement modal system with responsive sizing, queuing, and validation support Implement form submission with validation, error handling, and loading states Implement country/state selectors with dynamic data loading and Bootstrap styling Revert Rsx::Route() highlighting in Blade/PHP files Target specific PHP scopes for Rsx::Route() highlighting in Blade Expand injection selector for Rsx::Route() highlighting Add custom syntax highlighting for Rsx::Route() and Rsx.Route() calls Update jqhtml packages to v2.2.165 Add bundle path validation for common mistakes (development mode only) Create Ajax_Select_Input widget and Rsx_Reference_Data controller Create Country_Select_Input widget with default country support Initialize Tom Select on Select_Input widgets Add Tom Select bundle for enhanced select dropdowns Implement ISO 3166 geographic data system for country/region selection Implement widget-based form system with disabled state support 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
174
node_modules/webpack/lib/NormalModuleFactory.js
generated
vendored
174
node_modules/webpack/lib/NormalModuleFactory.js
generated
vendored
@@ -34,6 +34,8 @@ const {
|
||||
parseResourceWithoutFragment
|
||||
} = require("./util/identifier");
|
||||
|
||||
/** @typedef {import("enhanced-resolve").ResolveContext} ResolveContext */
|
||||
/** @typedef {import("enhanced-resolve").ResolveRequest} ResolveRequest */
|
||||
/** @typedef {import("../declarations/WebpackOptions").ModuleOptionsNormalized} ModuleOptions */
|
||||
/** @typedef {import("../declarations/WebpackOptions").RuleSetRule} RuleSetRule */
|
||||
/** @typedef {import("./Generator")} Generator */
|
||||
@@ -47,8 +49,6 @@ const {
|
||||
/** @typedef {import("./NormalModule").ParserOptions} ParserOptions */
|
||||
/** @typedef {import("./Parser")} Parser */
|
||||
/** @typedef {import("./ResolverFactory")} ResolverFactory */
|
||||
/** @typedef {import("./ResolverFactory").ResolveContext} ResolveContext */
|
||||
/** @typedef {import("./ResolverFactory").ResolveRequest} ResolveRequest */
|
||||
/** @typedef {import("./ResolverFactory").ResolverWithOptions} ResolverWithOptions */
|
||||
/** @typedef {import("./dependencies/ModuleDependency")} ModuleDependency */
|
||||
/** @typedef {import("./javascript/JavascriptParser").ImportAttributes} ImportAttributes */
|
||||
@@ -56,7 +56,12 @@ const {
|
||||
/** @typedef {import("./util/fs").InputFileSystem} InputFileSystem */
|
||||
/** @typedef {import("./util/identifier").AssociatedObjectForCache} AssociatedObjectForCache */
|
||||
|
||||
/** @typedef {Pick<RuleSetRule, 'type' | 'sideEffects' | 'parser' | 'generator' | 'resolve' | 'layer'>} ModuleSettings */
|
||||
/**
|
||||
* @template T
|
||||
* @typedef {import("./Compiler").Callback<T>} Callback
|
||||
*/
|
||||
|
||||
/** @typedef {Pick<RuleSetRule, 'type' | 'sideEffects' | 'parser' | 'generator' | 'resolve' | 'layer' | 'extractSourceMap'>} ModuleSettings */
|
||||
/** @typedef {Partial<NormalModuleCreateData & { settings: ModuleSettings }>} CreateData */
|
||||
|
||||
/**
|
||||
@@ -65,7 +70,7 @@ const {
|
||||
* @property {ModuleFactoryCreateData["resolveOptions"]} resolveOptions
|
||||
* @property {string} context
|
||||
* @property {string} request
|
||||
* @property {ImportAttributes | undefined} assertions
|
||||
* @property {ImportAttributes | undefined} attributes
|
||||
* @property {ModuleDependency[]} dependencies
|
||||
* @property {string} dependencyType
|
||||
* @property {CreateData} createData
|
||||
@@ -101,13 +106,24 @@ const {
|
||||
* @property {string|undefined} options options
|
||||
*/
|
||||
|
||||
/**
|
||||
* @template T
|
||||
* @callback Callback
|
||||
* @param {(Error | null)=} err
|
||||
* @param {T=} stats
|
||||
* @returns {void}
|
||||
*/
|
||||
/** @typedef {import("./ModuleTypeConstants").JAVASCRIPT_MODULE_TYPE_AUTO} JAVASCRIPT_MODULE_TYPE_AUTO */
|
||||
/** @typedef {import("./ModuleTypeConstants").JAVASCRIPT_MODULE_TYPE_DYNAMIC} JAVASCRIPT_MODULE_TYPE_DYNAMIC */
|
||||
/** @typedef {import("./ModuleTypeConstants").JAVASCRIPT_MODULE_TYPE_ESM} JAVASCRIPT_MODULE_TYPE_ESM */
|
||||
/** @typedef {import("./ModuleTypeConstants").JSON_MODULE_TYPE} JSON_MODULE_TYPE */
|
||||
/** @typedef {import("./ModuleTypeConstants").ASSET_MODULE_TYPE} ASSET_MODULE_TYPE */
|
||||
/** @typedef {import("./ModuleTypeConstants").ASSET_MODULE_TYPE_INLINE} ASSET_MODULE_TYPE_INLINE */
|
||||
/** @typedef {import("./ModuleTypeConstants").ASSET_MODULE_TYPE_RESOURCE} ASSET_MODULE_TYPE_RESOURCE */
|
||||
/** @typedef {import("./ModuleTypeConstants").ASSET_MODULE_TYPE_SOURCE} ASSET_MODULE_TYPE_SOURCE */
|
||||
/** @typedef {import("./ModuleTypeConstants").ASSET_MODULE_TYPE_BYTES} ASSET_MODULE_TYPE_BYTES */
|
||||
/** @typedef {import("./ModuleTypeConstants").WEBASSEMBLY_MODULE_TYPE_ASYNC} WEBASSEMBLY_MODULE_TYPE_ASYNC */
|
||||
/** @typedef {import("./ModuleTypeConstants").WEBASSEMBLY_MODULE_TYPE_SYNC} WEBASSEMBLY_MODULE_TYPE_SYNC */
|
||||
/** @typedef {import("./ModuleTypeConstants").CSS_MODULE_TYPE} CSS_MODULE_TYPE */
|
||||
/** @typedef {import("./ModuleTypeConstants").CSS_MODULE_TYPE_GLOBAL} CSS_MODULE_TYPE_GLOBAL */
|
||||
/** @typedef {import("./ModuleTypeConstants").CSS_MODULE_TYPE_MODULE} CSS_MODULE_TYPE_MODULE */
|
||||
/** @typedef {import("./ModuleTypeConstants").CSS_MODULE_TYPE_AUTO} CSS_MODULE_TYPE_AUTO */
|
||||
|
||||
/** @typedef {JAVASCRIPT_MODULE_TYPE_AUTO | JAVASCRIPT_MODULE_TYPE_DYNAMIC | JAVASCRIPT_MODULE_TYPE_ESM | JSON_MODULE_TYPE | ASSET_MODULE_TYPE | ASSET_MODULE_TYPE_INLINE | ASSET_MODULE_TYPE_RESOURCE | ASSET_MODULE_TYPE_SOURCE | WEBASSEMBLY_MODULE_TYPE_ASYNC | WEBASSEMBLY_MODULE_TYPE_SYNC | CSS_MODULE_TYPE | CSS_MODULE_TYPE_GLOBAL | CSS_MODULE_TYPE_MODULE | CSS_MODULE_TYPE_AUTO} KnownNormalModuleTypes */
|
||||
/** @typedef {KnownNormalModuleTypes | string} NormalModuleTypes */
|
||||
|
||||
const EMPTY_RESOLVE_OPTIONS = {};
|
||||
/** @type {ParserOptions} */
|
||||
@@ -227,7 +243,7 @@ const ruleSetCompiler = new RuleSetCompiler([
|
||||
new BasicMatcherRulePlugin("issuer"),
|
||||
new BasicMatcherRulePlugin("compiler"),
|
||||
new BasicMatcherRulePlugin("issuerLayer"),
|
||||
new ObjectMatcherRulePlugin("assert", "assertions", (value) => {
|
||||
new ObjectMatcherRulePlugin("assert", "attributes", (value) => {
|
||||
if (value) {
|
||||
return (
|
||||
/** @type {ImportAttributes} */ (value)._isLegacyAssert !== undefined
|
||||
@@ -236,7 +252,7 @@ const ruleSetCompiler = new RuleSetCompiler([
|
||||
|
||||
return false;
|
||||
}),
|
||||
new ObjectMatcherRulePlugin("with", "assertions", (value) => {
|
||||
new ObjectMatcherRulePlugin("with", "attributes", (value) => {
|
||||
if (value) {
|
||||
return !(/** @type {ImportAttributes} */ (value)._isLegacyAssert);
|
||||
}
|
||||
@@ -249,9 +265,80 @@ const ruleSetCompiler = new RuleSetCompiler([
|
||||
new BasicEffectRulePlugin("resolve"),
|
||||
new BasicEffectRulePlugin("generator"),
|
||||
new BasicEffectRulePlugin("layer"),
|
||||
new BasicEffectRulePlugin("extractSourceMap"),
|
||||
new UseEffectRulePlugin()
|
||||
]);
|
||||
|
||||
/** @typedef {import("./javascript/JavascriptParser")} JavascriptParser */
|
||||
/** @typedef {import("../declarations/WebpackOptions").JavascriptParserOptions} JavascriptParserOptions */
|
||||
/** @typedef {import("./javascript/JavascriptGenerator")} JavascriptGenerator */
|
||||
/** @typedef {import("../declarations/WebpackOptions").EmptyGeneratorOptions} EmptyGeneratorOptions */
|
||||
|
||||
/** @typedef {import("./json/JsonParser")} JsonParser */
|
||||
/** @typedef {import("../declarations/WebpackOptions").JsonParserOptions} JsonParserOptions */
|
||||
/** @typedef {import("./json/JsonGenerator")} JsonGenerator */
|
||||
/** @typedef {import("../declarations/WebpackOptions").JsonGeneratorOptions} JsonGeneratorOptions */
|
||||
|
||||
/** @typedef {import("./asset/AssetParser")} AssetParser */
|
||||
/** @typedef {import("./asset/AssetSourceParser")} AssetSourceParser */
|
||||
/** @typedef {import("./asset/AssetBytesParser")} AssetBytesParser */
|
||||
/** @typedef {import("../declarations/WebpackOptions").AssetParserOptions} AssetParserOptions */
|
||||
/** @typedef {import("../declarations/WebpackOptions").EmptyParserOptions} EmptyParserOptions */
|
||||
/** @typedef {import("./asset/AssetGenerator")} AssetGenerator */
|
||||
/** @typedef {import("../declarations/WebpackOptions").AssetGeneratorOptions} AssetGeneratorOptions */
|
||||
/** @typedef {import("../declarations/WebpackOptions").AssetInlineGeneratorOptions} AssetInlineGeneratorOptions */
|
||||
/** @typedef {import("../declarations/WebpackOptions").AssetResourceGeneratorOptions} AssetResourceGeneratorOptions */
|
||||
/** @typedef {import("./asset/AssetSourceGenerator")} AssetSourceGenerator */
|
||||
/** @typedef {import("./asset/AssetBytesGenerator")} AssetBytesGenerator */
|
||||
|
||||
/** @typedef {import("./wasm-async/AsyncWebAssemblyParser")} AsyncWebAssemblyParser */
|
||||
/** @typedef {import("./wasm-sync/WebAssemblyParser")} WebAssemblyParser */
|
||||
|
||||
/** @typedef {import("./css/CssParser")} CssParser */
|
||||
/** @typedef {import("../declarations/WebpackOptions").CssParserOptions} CssParserOptions */
|
||||
/** @typedef {import("../declarations/WebpackOptions").CssAutoParserOptions} CssAutoParserOptions */
|
||||
/** @typedef {import("../declarations/WebpackOptions").CssGlobalParserOptions} CssGlobalParserOptions */
|
||||
/** @typedef {import("../declarations/WebpackOptions").CssModuleParserOptions} CssModuleParserOptions */
|
||||
/** @typedef {import("./css/CssGenerator")} CssGenerator */
|
||||
/** @typedef {import("../declarations/WebpackOptions").CssGeneratorOptions} CssGeneratorOptions */
|
||||
/** @typedef {import("../declarations/WebpackOptions").CssGlobalGeneratorOptions} CssGlobalGeneratorOptions */
|
||||
/** @typedef {import("../declarations/WebpackOptions").CssModuleGeneratorOptions} CssModuleGeneratorOptions */
|
||||
/** @typedef {import("../declarations/WebpackOptions").CssAutoGeneratorOptions} CssAutoGeneratorOptions */
|
||||
|
||||
/**
|
||||
* @typedef {[
|
||||
* [JAVASCRIPT_MODULE_TYPE_AUTO, JavascriptParser, JavascriptParserOptions, JavascriptGenerator, EmptyGeneratorOptions],
|
||||
* [JAVASCRIPT_MODULE_TYPE_DYNAMIC, JavascriptParser, JavascriptParserOptions, JavascriptGenerator, EmptyGeneratorOptions],
|
||||
* [JAVASCRIPT_MODULE_TYPE_ESM, JavascriptParser, JavascriptParserOptions, JavascriptGenerator, EmptyGeneratorOptions],
|
||||
* [JSON_MODULE_TYPE, JsonParser, JsonParserOptions, JsonGenerator, JsonGeneratorOptions],
|
||||
* [ASSET_MODULE_TYPE, AssetParser, AssetParserOptions, AssetGenerator, AssetGeneratorOptions],
|
||||
* [ASSET_MODULE_TYPE_INLINE, AssetParser, EmptyParserOptions, AssetGenerator, AssetGeneratorOptions],
|
||||
* [ASSET_MODULE_TYPE_RESOURCE, AssetParser, EmptyParserOptions, AssetGenerator, AssetGeneratorOptions],
|
||||
* [ASSET_MODULE_TYPE_SOURCE, AssetSourceParser, EmptyParserOptions, AssetSourceGenerator, EmptyGeneratorOptions],
|
||||
* [ASSET_MODULE_TYPE_BYTES, AssetBytesParser, EmptyParserOptions, AssetBytesGenerator, EmptyGeneratorOptions],
|
||||
* [WEBASSEMBLY_MODULE_TYPE_ASYNC, AsyncWebAssemblyParser, EmptyParserOptions, Generator, EmptyParserOptions],
|
||||
* [WEBASSEMBLY_MODULE_TYPE_SYNC, WebAssemblyParser, EmptyParserOptions, Generator, EmptyParserOptions],
|
||||
* [CSS_MODULE_TYPE, CssParser, CssParserOptions, CssGenerator, CssGeneratorOptions],
|
||||
* [CSS_MODULE_TYPE_AUTO, CssParser, CssAutoParserOptions, CssGenerator, CssAutoGeneratorOptions],
|
||||
* [CSS_MODULE_TYPE_MODULE, CssParser, CssModuleParserOptions, CssGenerator, CssModuleGeneratorOptions],
|
||||
* [CSS_MODULE_TYPE_GLOBAL, CssParser, CssGlobalParserOptions, CssGenerator, CssGlobalGeneratorOptions],
|
||||
* [string, Parser, ParserOptions, Generator, GeneratorOptions],
|
||||
* ]} ParsersAndGeneratorsByTypes
|
||||
*/
|
||||
|
||||
/**
|
||||
* @template {unknown[]} T
|
||||
* @template {number[]} I
|
||||
* @typedef {{ [K in keyof I]: K extends keyof I ? I[K] extends keyof T ? T[I[K]] : never : never }} ExtractTupleElements
|
||||
*/
|
||||
|
||||
/**
|
||||
* @template {unknown[]} T
|
||||
* @template {number[]} A
|
||||
* @template [R=void]
|
||||
* @typedef {T extends [infer Head extends [string, ...unknown[]], ...infer Tail extends [string, ...unknown[]][]] ? Record<Head[0], SyncBailHook<ExtractTupleElements<Head, A>, R extends number ? Head[R] : R>> & RecordFactoryFromTuple<Tail, A, R> : unknown } RecordFactoryFromTuple
|
||||
*/
|
||||
|
||||
class NormalModuleFactory extends ModuleFactory {
|
||||
/**
|
||||
* @param {object} param params
|
||||
@@ -260,15 +347,13 @@ class NormalModuleFactory extends ModuleFactory {
|
||||
* @param {ResolverFactory} param.resolverFactory resolverFactory
|
||||
* @param {ModuleOptions} param.options options
|
||||
* @param {AssociatedObjectForCache} param.associatedObjectForCache an object to which the cache will be attached
|
||||
* @param {boolean=} param.layers enable layers
|
||||
*/
|
||||
constructor({
|
||||
context,
|
||||
fs,
|
||||
resolverFactory,
|
||||
options,
|
||||
associatedObjectForCache,
|
||||
layers = false
|
||||
associatedObjectForCache
|
||||
}) {
|
||||
super();
|
||||
this.hooks = Object.freeze({
|
||||
@@ -292,15 +377,15 @@ class NormalModuleFactory extends ModuleFactory {
|
||||
createModule: new AsyncSeriesBailHook(["createData", "resolveData"]),
|
||||
/** @type {SyncWaterfallHook<[Module, CreateData, ResolveData]>} */
|
||||
module: new SyncWaterfallHook(["module", "createData", "resolveData"]),
|
||||
/** @type {HookMap<SyncBailHook<[ParserOptions], Parser | void>>} */
|
||||
/** @type {import("tapable").TypedHookMap<RecordFactoryFromTuple<ParsersAndGeneratorsByTypes, [2], 1>>} */
|
||||
createParser: new HookMap(() => new SyncBailHook(["parserOptions"])),
|
||||
/** @type {HookMap<SyncBailHook<[TODO, ParserOptions], void>>} */
|
||||
/** @type {import("tapable").TypedHookMap<RecordFactoryFromTuple<ParsersAndGeneratorsByTypes, [1, 2]>>} */
|
||||
parser: new HookMap(() => new SyncHook(["parser", "parserOptions"])),
|
||||
/** @type {HookMap<SyncBailHook<[GeneratorOptions], Generator | void>>} */
|
||||
/** @type {import("tapable").TypedHookMap<RecordFactoryFromTuple<ParsersAndGeneratorsByTypes, [4], 3>>} */
|
||||
createGenerator: new HookMap(
|
||||
() => new SyncBailHook(["generatorOptions"])
|
||||
),
|
||||
/** @type {HookMap<SyncBailHook<[TODO, GeneratorOptions], void>>} */
|
||||
/** @type {import("tapable").TypedHookMap<RecordFactoryFromTuple<ParsersAndGeneratorsByTypes, [3, 4]>>} */
|
||||
generator: new HookMap(
|
||||
() => new SyncHook(["generator", "generatorOptions"])
|
||||
),
|
||||
@@ -430,7 +515,7 @@ class NormalModuleFactory extends ModuleFactory {
|
||||
dependencies,
|
||||
dependencyType,
|
||||
request,
|
||||
assertions,
|
||||
attributes,
|
||||
resolveOptions,
|
||||
fileDependencies,
|
||||
missingDependencies,
|
||||
@@ -601,7 +686,7 @@ class NormalModuleFactory extends ModuleFactory {
|
||||
resourceQuery: resourceDataForRules.query,
|
||||
resourceFragment: resourceDataForRules.fragment,
|
||||
scheme,
|
||||
assertions,
|
||||
attributes,
|
||||
mimetype: matchResourceData
|
||||
? ""
|
||||
: resourceData.data.mimetype || "",
|
||||
@@ -683,16 +768,10 @@ class NormalModuleFactory extends ModuleFactory {
|
||||
for (const loader of /** @type {LoaderItem[]} */ (preLoaders)) {
|
||||
allLoaders.push(loader);
|
||||
}
|
||||
const type = /** @type {string} */ (settings.type);
|
||||
const type = /** @type {NormalModuleTypes} */ (settings.type);
|
||||
const resolveOptions = settings.resolve;
|
||||
const layer = settings.layer;
|
||||
if (layer !== undefined && !layers) {
|
||||
return callback(
|
||||
new Error(
|
||||
"'Rule.layer' is only allowed when 'experiments.layers' is enabled"
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
try {
|
||||
Object.assign(data.createData, {
|
||||
layer:
|
||||
@@ -717,7 +796,8 @@ class NormalModuleFactory extends ModuleFactory {
|
||||
parserOptions: settings.parser,
|
||||
generator: this.getGenerator(type, settings.generator),
|
||||
generatorOptions: settings.generator,
|
||||
resolveOptions
|
||||
resolveOptions,
|
||||
extractSourceMap: settings.extractSourceMap || false
|
||||
});
|
||||
} catch (createDataErr) {
|
||||
return callback(/** @type {Error} */ (createDataErr));
|
||||
@@ -887,7 +967,9 @@ class NormalModuleFactory extends ModuleFactory {
|
||||
const resolveOptions = data.resolveOptions || EMPTY_RESOLVE_OPTIONS;
|
||||
const dependency = dependencies[0];
|
||||
const request = dependency.request;
|
||||
const assertions = dependency.assertions;
|
||||
const attributes =
|
||||
/** @type {ModuleDependency & { attributes: ImportAttributes }} */
|
||||
(dependency).attributes;
|
||||
const dependencyType = dependency.category || "";
|
||||
const contextInfo = data.contextInfo;
|
||||
const fileDependencies = new LazySet();
|
||||
@@ -899,7 +981,7 @@ class NormalModuleFactory extends ModuleFactory {
|
||||
resolveOptions,
|
||||
context,
|
||||
request,
|
||||
assertions,
|
||||
attributes,
|
||||
dependencies,
|
||||
dependencyType,
|
||||
fileDependencies,
|
||||
@@ -1186,6 +1268,10 @@ If changing the source code is not an option there is also a resolve options cal
|
||||
if (array.length === 0) return callback(null, array);
|
||||
asyncLib.map(
|
||||
array,
|
||||
/**
|
||||
* @param {LoaderItem} item item
|
||||
* @param {Callback<LoaderItem>} callback callback
|
||||
*/
|
||||
(item, callback) => {
|
||||
resolver.resolve(
|
||||
contextInfo,
|
||||
@@ -1218,7 +1304,8 @@ If changing the source code is not an option there is also a resolve options cal
|
||||
if (err) return callback(err);
|
||||
|
||||
const parsedResult = this._parseResourceWithoutFragment(
|
||||
/** @type {string} */ (result)
|
||||
/** @type {string} */
|
||||
(result)
|
||||
);
|
||||
|
||||
const type = /\.mjs$/i.test(parsedResult.path)
|
||||
@@ -1228,8 +1315,12 @@ If changing the source code is not an option there is also a resolve options cal
|
||||
: /** @type {ResolveRequest} */
|
||||
(resolveRequest).descriptionFileData === undefined
|
||||
? undefined
|
||||
: /** @type {ResolveRequest} */
|
||||
(resolveRequest).descriptionFileData.type;
|
||||
: /** @type {string} */
|
||||
(
|
||||
/** @type {ResolveRequest} */
|
||||
(resolveRequest).descriptionFileData.type
|
||||
);
|
||||
/** @type {LoaderItem} */
|
||||
const resolved = {
|
||||
loader: parsedResult.path,
|
||||
type,
|
||||
@@ -1239,17 +1330,16 @@ If changing the source code is not an option there is also a resolve options cal
|
||||
? parsedResult.query.slice(1)
|
||||
: undefined
|
||||
: item.options,
|
||||
ident:
|
||||
item.options === undefined
|
||||
? undefined
|
||||
: /** @type {string} */ (item.ident)
|
||||
ident: item.options === undefined ? undefined : item.ident
|
||||
};
|
||||
|
||||
return callback(null, /** @type {LoaderItem} */ (resolved));
|
||||
return callback(null, resolved);
|
||||
}
|
||||
);
|
||||
},
|
||||
/** @type {Callback<(LoaderItem | undefined)[]>} */ (callback)
|
||||
(err, value) => {
|
||||
callback(err, /** @type {(LoaderItem)[]} */ (value));
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user