Fix code quality violations and enhance ROUTE-EXISTS-01 rule
Implement JQHTML function cache ID system and fix bundle compilation Implement underscore prefix for system tables Fix JS syntax linter to support decorators and grant exception to Task system SPA: Update planning docs and wishlists with remaining features SPA: Document Navigation API abandonment and future enhancements Implement SPA browser integration with History API (Phase 1) Convert contacts view page to SPA action Convert clients pages to SPA actions and document conversion procedure SPA: Merge GET parameters and update documentation Implement SPA route URL generation in JavaScript and PHP Implement SPA bootstrap controller architecture Add SPA routing manual page (rsx:man spa) Add SPA routing documentation to CLAUDE.md Phase 4 Complete: Client-side SPA routing implementation Update get_routes() consumers for unified route structure Complete SPA Phase 3: PHP-side route type detection and is_spa flag Restore unified routes structure and Manifest_Query class Refactor route indexing and add SPA infrastructure Phase 3 Complete: SPA route registration in manifest Implement SPA Phase 2: Extract router code and test decorators Rename Jqhtml_Component to Component and complete SPA foundation setup 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
171
node_modules/webpack/lib/webpack.js
generated
vendored
171
node_modules/webpack/lib/webpack.js
generated
vendored
@@ -105,20 +105,6 @@ const createCompiler = (rawOptions, compilerIndex) => {
|
||||
return compiler;
|
||||
};
|
||||
|
||||
/**
|
||||
* @callback WebpackFunctionSingle
|
||||
* @param {WebpackOptions} options options object
|
||||
* @param {Callback<Stats>=} callback callback
|
||||
* @returns {Compiler | null} the compiler object
|
||||
*/
|
||||
|
||||
/**
|
||||
* @callback WebpackFunctionMulti
|
||||
* @param {MultiWebpackOptions} options options objects
|
||||
* @param {Callback<MultiStats>=} callback callback
|
||||
* @returns {MultiCompiler | null} the multi compiler object
|
||||
*/
|
||||
|
||||
/**
|
||||
* @template T
|
||||
* @param {T[] | T} options options
|
||||
@@ -128,85 +114,102 @@ const asArray = (options) =>
|
||||
Array.isArray(options) ? [...options] : [options];
|
||||
|
||||
/**
|
||||
* @callback WebpackCallback
|
||||
* @overload
|
||||
* @param {WebpackOptions} options options object
|
||||
* @param {Callback<Stats>} callback callback
|
||||
* @returns {Compiler | null} the compiler object
|
||||
*/
|
||||
/**
|
||||
* @overload
|
||||
* @param {WebpackOptions} options options object
|
||||
* @returns {Compiler} the compiler object
|
||||
*/
|
||||
/**
|
||||
* @overload
|
||||
* @param {MultiWebpackOptions} options options objects
|
||||
* @param {Callback<MultiStats>} callback callback
|
||||
* @returns {MultiCompiler | null} the multi compiler object
|
||||
*/
|
||||
/**
|
||||
* @overload
|
||||
* @param {MultiWebpackOptions} options options objects
|
||||
* @returns {MultiCompiler} the multi compiler object
|
||||
*/
|
||||
/**
|
||||
* @param {WebpackOptions | MultiWebpackOptions} options options
|
||||
* @param {Callback<Stats> & Callback<MultiStats>=} callback callback
|
||||
* @returns {Compiler | MultiCompiler | null} Compiler or MultiCompiler
|
||||
*/
|
||||
|
||||
const webpack = /** @type {WebpackFunctionSingle & WebpackFunctionMulti} */ (
|
||||
/** @type {WebpackCallback} */
|
||||
(options, callback) => {
|
||||
const create = () => {
|
||||
if (
|
||||
!asArray(/** @type {WebpackOptions} */ (options)).every(
|
||||
webpackOptionsSchemaCheck
|
||||
)
|
||||
) {
|
||||
getValidateSchema()(webpackOptionsSchema, options);
|
||||
util.deprecate(
|
||||
() => {},
|
||||
"webpack bug: Pre-compiled schema reports error while real schema is happy. This has performance drawbacks.",
|
||||
"DEP_WEBPACK_PRE_COMPILED_SCHEMA_INVALID"
|
||||
)();
|
||||
}
|
||||
/** @type {MultiCompiler|Compiler} */
|
||||
let compiler;
|
||||
/** @type {boolean | undefined} */
|
||||
let watch = false;
|
||||
/** @type {WatchOptions | WatchOptions[]} */
|
||||
let watchOptions;
|
||||
if (Array.isArray(options)) {
|
||||
/** @type {MultiCompiler} */
|
||||
compiler = createMultiCompiler(
|
||||
options,
|
||||
/** @type {MultiCompilerOptions} */
|
||||
(options)
|
||||
);
|
||||
watch = options.some((options) => options.watch);
|
||||
watchOptions = options.map((options) => options.watchOptions || {});
|
||||
} else {
|
||||
const webpackOptions = /** @type {WebpackOptions} */ (options);
|
||||
/** @type {Compiler} */
|
||||
compiler = createCompiler(webpackOptions);
|
||||
watch = webpackOptions.watch;
|
||||
watchOptions = webpackOptions.watchOptions || {};
|
||||
}
|
||||
return { compiler, watch, watchOptions };
|
||||
};
|
||||
if (callback) {
|
||||
try {
|
||||
const { compiler, watch, watchOptions } = create();
|
||||
if (watch) {
|
||||
compiler.watch(watchOptions, callback);
|
||||
} else {
|
||||
compiler.run((err, stats) => {
|
||||
compiler.close((err2) => {
|
||||
callback(
|
||||
err || err2,
|
||||
/** @type {options extends WebpackOptions ? Stats : MultiStats} */
|
||||
(stats)
|
||||
);
|
||||
});
|
||||
});
|
||||
}
|
||||
return compiler;
|
||||
} catch (err) {
|
||||
process.nextTick(() => callback(/** @type {Error} */ (err)));
|
||||
return null;
|
||||
}
|
||||
const webpack = (options, callback) => {
|
||||
const create = () => {
|
||||
if (
|
||||
!asArray(/** @type {WebpackOptions} */ (options)).every(
|
||||
webpackOptionsSchemaCheck
|
||||
)
|
||||
) {
|
||||
getValidateSchema()(webpackOptionsSchema, options);
|
||||
util.deprecate(
|
||||
() => {},
|
||||
"webpack bug: Pre-compiled schema reports error while real schema is happy. This has performance drawbacks.",
|
||||
"DEP_WEBPACK_PRE_COMPILED_SCHEMA_INVALID"
|
||||
)();
|
||||
}
|
||||
/** @type {MultiCompiler|Compiler} */
|
||||
let compiler;
|
||||
/** @type {boolean | undefined} */
|
||||
let watch = false;
|
||||
/** @type {WatchOptions | WatchOptions[]} */
|
||||
let watchOptions;
|
||||
if (Array.isArray(options)) {
|
||||
/** @type {MultiCompiler} */
|
||||
compiler = createMultiCompiler(
|
||||
options,
|
||||
/** @type {MultiCompilerOptions} */
|
||||
(options)
|
||||
);
|
||||
watch = options.some((options) => options.watch);
|
||||
watchOptions = options.map((options) => options.watchOptions || {});
|
||||
} else {
|
||||
const { compiler, watch } = create();
|
||||
const webpackOptions = /** @type {WebpackOptions} */ (options);
|
||||
/** @type {Compiler} */
|
||||
compiler = createCompiler(webpackOptions);
|
||||
watch = webpackOptions.watch;
|
||||
watchOptions = webpackOptions.watchOptions || {};
|
||||
}
|
||||
return { compiler, watch, watchOptions };
|
||||
};
|
||||
if (callback) {
|
||||
try {
|
||||
const { compiler, watch, watchOptions } = create();
|
||||
if (watch) {
|
||||
util.deprecate(
|
||||
() => {},
|
||||
"A 'callback' argument needs to be provided to the 'webpack(options, callback)' function when the 'watch' option is set. There is no way to handle the 'watch' option without a callback.",
|
||||
"DEP_WEBPACK_WATCH_WITHOUT_CALLBACK"
|
||||
)();
|
||||
compiler.watch(watchOptions, callback);
|
||||
} else {
|
||||
compiler.run((err, stats) => {
|
||||
compiler.close((err2) => {
|
||||
callback(
|
||||
err || err2,
|
||||
/** @type {options extends WebpackOptions ? Stats : MultiStats} */
|
||||
(stats)
|
||||
);
|
||||
});
|
||||
});
|
||||
}
|
||||
return compiler;
|
||||
} catch (err) {
|
||||
process.nextTick(() => callback(/** @type {Error} */ (err)));
|
||||
return null;
|
||||
}
|
||||
} else {
|
||||
const { compiler, watch } = create();
|
||||
if (watch) {
|
||||
util.deprecate(
|
||||
() => {},
|
||||
"A 'callback' argument needs to be provided to the 'webpack(options, callback)' function when the 'watch' option is set. There is no way to handle the 'watch' option without a callback.",
|
||||
"DEP_WEBPACK_WATCH_WITHOUT_CALLBACK"
|
||||
)();
|
||||
}
|
||||
return compiler;
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
module.exports = webpack;
|
||||
|
||||
Reference in New Issue
Block a user