From 29feac18a422d86a559634a01c51aaeb4c016588 Mon Sep 17 00:00:00 2001 From: xiaoxiaojx <784487301@qq.com> Date: Sat, 13 Sep 2025 15:01:49 +0800 Subject: [PATCH 01/20] feat: add DotenvPlugin --- cspell.json | 3 +- declarations/plugins/DotenvPlugin.d.ts | 36 ++ lib/DotenvPlugin.js | 345 ++++++++++++++++++ lib/index.js | 3 + schemas/plugins/DotenvPlugin.check.d.ts | 7 + schemas/plugins/DotenvPlugin.check.js | 6 + schemas/plugins/DotenvPlugin.json | 53 +++ test/configCases/plugins/dotenv-plugin/.env | 7 + .../plugins/dotenv-plugin/.env.defaults | 3 + .../plugins/dotenv-plugin/.env.example | 6 + .../plugins/dotenv-plugin/basic.js | 10 + .../plugins/dotenv-plugin/custom-path.js | 11 + .../plugins/dotenv-plugin/custom-prefix.js | 12 + .../plugins/dotenv-plugin/defaults.js | 10 + .../plugins/dotenv-plugin/errors.js | 3 + .../plugins/dotenv-plugin/expand.js | 6 + .../plugins/dotenv-plugin/incomplete.env | 4 + .../plugins/dotenv-plugin/systemvars.js | 15 + .../plugins/dotenv-plugin/warnings.js | 3 + .../plugins/dotenv-plugin/webpack.config.js | 67 ++++ types.d.ts | 119 ++++++ 21 files changed, 728 insertions(+), 1 deletion(-) create mode 100644 declarations/plugins/DotenvPlugin.d.ts create mode 100644 lib/DotenvPlugin.js create mode 100644 schemas/plugins/DotenvPlugin.check.d.ts create mode 100644 schemas/plugins/DotenvPlugin.check.js create mode 100644 schemas/plugins/DotenvPlugin.json create mode 100644 test/configCases/plugins/dotenv-plugin/.env create mode 100644 test/configCases/plugins/dotenv-plugin/.env.defaults create mode 100644 test/configCases/plugins/dotenv-plugin/.env.example create mode 100644 test/configCases/plugins/dotenv-plugin/basic.js create mode 100644 test/configCases/plugins/dotenv-plugin/custom-path.js create mode 100644 test/configCases/plugins/dotenv-plugin/custom-prefix.js create mode 100644 test/configCases/plugins/dotenv-plugin/defaults.js create mode 100644 test/configCases/plugins/dotenv-plugin/errors.js create mode 100644 test/configCases/plugins/dotenv-plugin/expand.js create mode 100644 test/configCases/plugins/dotenv-plugin/incomplete.env create mode 100644 test/configCases/plugins/dotenv-plugin/systemvars.js create mode 100644 test/configCases/plugins/dotenv-plugin/warnings.js create mode 100644 test/configCases/plugins/dotenv-plugin/webpack.config.js diff --git a/cspell.json b/cspell.json index 904d24be1..6d30f60a6 100644 --- a/cspell.json +++ b/cspell.json @@ -315,7 +315,8 @@ "spacek", "thelarkinn", "behaviour", - "WHATWG" + "WHATWG", + "systemvars" ], "ignoreRegExpList": [ "/Author.+/", diff --git a/declarations/plugins/DotenvPlugin.d.ts b/declarations/plugins/DotenvPlugin.d.ts new file mode 100644 index 000000000..2d37dac44 --- /dev/null +++ b/declarations/plugins/DotenvPlugin.d.ts @@ -0,0 +1,36 @@ +/* + * This file was automatically generated. + * DO NOT MODIFY BY HAND. + * Run `yarn fix:special` to update + */ + +export interface DotenvPluginOptions { + /** + * Whether to allow empty strings in safe mode. If false, will throw an error if any env variables are empty (but only if safe mode is enabled). + */ + allowEmptyValues?: boolean; + /** + * Adds support for dotenv-defaults. If set to true, uses ./.env.defaults. If a string, uses that location for a defaults file. + */ + defaults?: boolean | string; + /** + * Allows your variables to be "expanded" for reusability within your .env file. + */ + expand?: boolean; + /** + * The path to your environment variables. This same path applies to the .env.example and .env.defaults files. + */ + path?: string; + /** + * The prefix to use before the name of your env variables. + */ + prefix?: string; + /** + * If true, load '.env.example' to verify the '.env' variables are all set. Can also be a string to a different file. + */ + safe?: boolean | string; + /** + * Set to true if you would rather load all system variables as well (useful for CI purposes). + */ + systemvars?: boolean; +} diff --git a/lib/DotenvPlugin.js b/lib/DotenvPlugin.js new file mode 100644 index 000000000..d5bcac90e --- /dev/null +++ b/lib/DotenvPlugin.js @@ -0,0 +1,345 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Natsu @xiaoxiaojx +*/ + +"use strict"; + +const createSchemaValidation = require("./util/create-schema-validation"); +const { isAbsolute, join } = require("./util/fs"); + +/** @typedef {import("./Compiler")} Compiler */ +/** @typedef {import("./util/fs").InputFileSystem} InputFileSystem */ +/** @typedef {import("../declarations/plugins/DotenvPlugin").DotenvPluginOptions} DotenvPluginOptions */ + +const DEFAULT_PATH = "./.env"; + +const DEFAULT_OPTIONS = { + path: DEFAULT_PATH, + prefix: "process.env." +}; + +const LINE = + /(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/gm; + +const PLUGIN_NAME = "DotenvPlugin"; + +const validate = createSchemaValidation( + require("../schemas/plugins/DotenvPlugin.check"), + () => require("../schemas/plugins/DotenvPlugin.json"), + { + name: "Dotenv Plugin", + baseDataPath: "options" + } +); + +/** + * @param {string} env environment variable value + * @param {Record} vars variables object + * @returns {string} interpolated value + */ +const interpolate = (env, vars) => { + const matches = env.match(/\$([a-zA-Z0-9_]+)|\${([a-zA-Z0-9_]+)}/g) || []; + + for (const match of matches) { + const key = match.replace(/\$|{|}/g, ""); + let variable = vars[key] || ""; + variable = interpolate(variable, vars); + env = env.replace(match, variable); + } + + return env; +}; + +/** + * ported from https://github.com/motdotla/dotenv/blob/master/lib/main.js#L49 + * @param {string|Buffer} src the source content to parse + * @returns {Record} parsed environment variables object + */ +function parse(src) { + const obj = /** @type {Record} */ ({}); + + // Convert buffer to string + let lines = src.toString(); + + // Convert line breaks to same format + lines = lines.replace(/\r\n?/gm, "\n"); + + let match; + while ((match = LINE.exec(lines)) !== null) { + const key = match[1]; + + // Default undefined or null to empty string + let value = match[2] || ""; + + // Remove whitespace + value = value.trim(); + + // Check if double quoted + const maybeQuote = value[0]; + + // Remove surrounding quotes + value = value.replace(/^(['"`])([\s\S]*)\1$/gm, "$2"); + + // Expand newlines if double quoted + if (maybeQuote === '"') { + value = value.replace(/\\n/g, "\n"); + value = value.replace(/\\r/g, "\r"); + } + + // Add to object + obj[key] = value; + } + + return obj; +} + +/** + * Parses objects like before, but with defaults! + * @param {string} src the original src + * @param {string=} defaultSrc the new-and-improved default source + * @returns {Record} the parsed results + */ +const mergeParse = (src, defaultSrc = "") => { + const parsedSrc = parse(src); + const parsedDefault = parse(defaultSrc); + + return { ...parsedDefault, ...parsedSrc }; +}; + +// ported from https://github.com/mrsteele/dotenv-webpack +class DotenvPlugin { + /** + * @param {DotenvPluginOptions=} options options object + */ + constructor(options = {}) { + validate(options); + this.config = { ...DEFAULT_OPTIONS, ...options }; + } + + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + compiler.hooks.beforeCompile.tapAsync(PLUGIN_NAME, (_params, callback) => { + const inputFileSystem = /** @type {InputFileSystem} */ ( + compiler.inputFileSystem + ); + const context = compiler.context; + + this.gatherVariables(inputFileSystem, context, (err, variables) => { + if (err) return callback(err); + + const definitions = this.formatDefinitions(variables || {}); + const DefinePlugin = compiler.webpack.DefinePlugin; + + new DefinePlugin(definitions).apply(compiler); + callback(); + }); + }); + } + + /** + * @param {InputFileSystem} inputFileSystem the input file system + * @param {string} context the compiler context + * @param {(err: Error | null, variables?: Record) => void} callback callback function + * @returns {void} + */ + gatherVariables(inputFileSystem, context, callback) { + const { safe, allowEmptyValues } = /** @type {DotenvPluginOptions} */ ( + this.config + ); + const vars = /** @type {Record} */ (this.initializeVars()); + + this.getEnvs(inputFileSystem, context, (err, result) => { + if (err) return callback(err); + if (!result) { + return callback(new Error("Failed to get environment variables")); + } + + const { env, blueprint } = result; + + try { + for (const key of Object.keys(blueprint)) { + const value = Object.prototype.hasOwnProperty.call(vars, key) + ? vars[key] + : env[key]; + + const isMissing = + typeof value === "undefined" || + value === null || + (!allowEmptyValues && value === ""); + + if (safe && isMissing) { + throw new Error(`Missing environment variable: ${key}`); + } else { + vars[key] = value; + } + } + + // add the leftovers + if (safe) { + for (const key of Object.keys(env)) { + if (!Object.prototype.hasOwnProperty.call(vars, key)) { + vars[key] = env[key]; + } + } + } + + callback(null, vars); + } catch (error) { + callback(error instanceof Error ? error : new Error(String(error))); + } + }); + } + + initializeVars() { + const config = /** @type {DotenvPluginOptions} */ (this.config); + if (config.systemvars) { + const vars = /** @type {Record} */ ({}); + for (const key in process.env) { + if (process.env[key] !== undefined) { + vars[key] = /** @type {string} */ (process.env[key]); + } + } + return vars; + } + return /** @type {Record} */ ({}); + } + + /** + * @param {InputFileSystem} inputFileSystem the input file system + * @param {string} context the compiler context + * @param {(err: Error | null, result?: {env: Record, blueprint: Record}) => void} callback callback function + * @returns {void} + */ + getEnvs(inputFileSystem, context, callback) { + const { path, safe } = /** @type {DotenvPluginOptions} */ (this.config); + + // First load the main env file and defaults + this.loadFile( + { + file: path || DEFAULT_PATH, + inputFileSystem, + context + }, + (err, envContent) => { + if (err) return callback(err); + + this.getDefaults(inputFileSystem, context, (err, defaultsContent) => { + if (err) return callback(err); + + const env = mergeParse(envContent || "", defaultsContent || ""); + let blueprint = env; + + if (safe) { + let file = `${path || DEFAULT_PATH}.example`; + if (safe !== true) { + file = safe; + } + + this.loadFile( + { + file, + inputFileSystem, + context + }, + (err, blueprintContent) => { + if (err) return callback(err); + + blueprint = mergeParse(blueprintContent || ""); + callback(null, { env, blueprint }); + } + ); + } else { + callback(null, { env, blueprint }); + } + }); + } + ); + } + + /** + * @param {InputFileSystem} inputFileSystem the input file system + * @param {string} context the compiler context + * @param {(err: Error | null, content?: string) => void} callback callback function + * @returns {void} + */ + getDefaults(inputFileSystem, context, callback) { + const { path, defaults } = /** @type {DotenvPluginOptions} */ (this.config); + + if (defaults) { + const defaultsFile = + defaults === true ? `${path || DEFAULT_PATH}.defaults` : defaults; + this.loadFile( + { + file: defaultsFile, + inputFileSystem, + context + }, + callback + ); + } else { + callback(null, ""); + } + } + + /** + * Load a file with proper path resolution + * @param {object} options options object + * @param {string} options.file the file to load + * @param {InputFileSystem} options.inputFileSystem the input file system + * @param {string} options.context the compiler context for resolving relative paths + * @param {(err: Error | null, content?: string) => void} callback callback function + * @returns {void} + */ + loadFile({ file, inputFileSystem, context }, callback) { + // Resolve relative paths based on compiler context + const resolvedPath = isAbsolute(file) + ? file + : join(inputFileSystem, context, file); + + inputFileSystem.readFile(resolvedPath, "utf8", (err, content) => { + if (err) { + // File doesn't exist, return empty string + callback(null, ""); + } else { + callback(null, /** @type {string} */ (content)); + } + }); + } + + /** + * @param {Record} variables variables object + * @returns {Record} formatted data + */ + formatDefinitions(variables) { + const { expand, prefix } = /** @type {DotenvPluginOptions} */ (this.config); + const formatted = Object.keys(variables).reduce((obj, key) => { + const v = variables[key]; + const vKey = `${prefix}${key}`; + let vValue; + if (expand) { + if (v.slice(0, 2) === "\\$") { + vValue = v.slice(1); + } else if (v.indexOf("\\$") > 0) { + vValue = v.replace(/\\\$/g, "$"); + } else { + vValue = interpolate(v, variables); + } + } else { + vValue = v; + } + + obj[vKey] = JSON.stringify(vValue); + + return obj; + }, /** @type {Record} */ ({})); + + return formatted; + } +} + +module.exports = DotenvPlugin; diff --git a/lib/index.js b/lib/index.js index a8ef0a82d..ac910a701 100644 --- a/lib/index.js +++ b/lib/index.js @@ -232,6 +232,9 @@ module.exports = mergeExports(fn, { get DynamicEntryPlugin() { return require("./DynamicEntryPlugin"); }, + get DotenvPlugin() { + return require("./DotenvPlugin"); + }, get EntryOptionPlugin() { return require("./EntryOptionPlugin"); }, diff --git a/schemas/plugins/DotenvPlugin.check.d.ts b/schemas/plugins/DotenvPlugin.check.d.ts new file mode 100644 index 000000000..930ef155b --- /dev/null +++ b/schemas/plugins/DotenvPlugin.check.d.ts @@ -0,0 +1,7 @@ +/* + * This file was automatically generated. + * DO NOT MODIFY BY HAND. + * Run `yarn fix:special` to update + */ +declare const check: (options: import("../../declarations/plugins/DotenvPlugin").DotenvPluginOptions) => boolean; +export = check; diff --git a/schemas/plugins/DotenvPlugin.check.js b/schemas/plugins/DotenvPlugin.check.js new file mode 100644 index 000000000..971666324 --- /dev/null +++ b/schemas/plugins/DotenvPlugin.check.js @@ -0,0 +1,6 @@ +/* + * This file was automatically generated. + * DO NOT MODIFY BY HAND. + * Run `yarn fix:special` to update + */ +"use strict";function e(r,{instancePath:t="",parentData:s,parentDataProperty:o,rootData:a=r}={}){let n=null,l=0;if(0===l){if(!r||"object"!=typeof r||Array.isArray(r))return e.errors=[{params:{type:"object"}}],!1;{const t=l;for(const t in r)if("allowEmptyValues"!==t&&"defaults"!==t&&"expand"!==t&&"path"!==t&&"prefix"!==t&&"safe"!==t&&"systemvars"!==t)return e.errors=[{params:{additionalProperty:t}}],!1;if(t===l){if(void 0!==r.allowEmptyValues){const t=l;if("boolean"!=typeof r.allowEmptyValues)return e.errors=[{params:{type:"boolean"}}],!1;var i=t===l}else i=!0;if(i){if(void 0!==r.defaults){let t=r.defaults;const s=l,o=l;let a=!1;const f=l;if("boolean"!=typeof t){const e={params:{type:"boolean"}};null===n?n=[e]:n.push(e),l++}var p=f===l;if(a=a||p,!a){const e=l;if(l===e)if("string"==typeof t){if(t.length<1){const e={params:{}};null===n?n=[e]:n.push(e),l++}}else{const e={params:{type:"string"}};null===n?n=[e]:n.push(e),l++}p=e===l,a=a||p}if(!a){const r={params:{}};return null===n?n=[r]:n.push(r),l++,e.errors=n,!1}l=o,null!==n&&(o?n.length=o:n=null),i=s===l}else i=!0;if(i){if(void 0!==r.expand){const t=l;if("boolean"!=typeof r.expand)return e.errors=[{params:{type:"boolean"}}],!1;i=t===l}else i=!0;if(i){if(void 0!==r.path){let t=r.path;const s=l;if(l===s){if("string"!=typeof t)return e.errors=[{params:{type:"string"}}],!1;if(t.length<1)return e.errors=[{params:{}}],!1}i=s===l}else i=!0;if(i){if(void 0!==r.prefix){let t=r.prefix;const s=l;if(l===s){if("string"!=typeof t)return e.errors=[{params:{type:"string"}}],!1;if(t.length<1)return e.errors=[{params:{}}],!1}i=s===l}else i=!0;if(i){if(void 0!==r.safe){let t=r.safe;const s=l,o=l;let a=!1;const p=l;if("boolean"!=typeof t){const e={params:{type:"boolean"}};null===n?n=[e]:n.push(e),l++}var f=p===l;if(a=a||f,!a){const e=l;if(l===e)if("string"==typeof t){if(t.length<1){const e={params:{}};null===n?n=[e]:n.push(e),l++}}else{const e={params:{type:"string"}};null===n?n=[e]:n.push(e),l++}f=e===l,a=a||f}if(!a){const r={params:{}};return null===n?n=[r]:n.push(r),l++,e.errors=n,!1}l=o,null!==n&&(o?n.length=o:n=null),i=s===l}else i=!0;if(i)if(void 0!==r.systemvars){const t=l;if("boolean"!=typeof r.systemvars)return e.errors=[{params:{type:"boolean"}}],!1;i=t===l}else i=!0}}}}}}}}return e.errors=n,0===l}module.exports=e,module.exports.default=e; \ No newline at end of file diff --git a/schemas/plugins/DotenvPlugin.json b/schemas/plugins/DotenvPlugin.json new file mode 100644 index 000000000..24985179a --- /dev/null +++ b/schemas/plugins/DotenvPlugin.json @@ -0,0 +1,53 @@ +{ + "title": "DotenvPluginOptions", + "type": "object", + "additionalProperties": false, + "properties": { + "allowEmptyValues": { + "description": "Whether to allow empty strings in safe mode. If false, will throw an error if any env variables are empty (but only if safe mode is enabled).", + "type": "boolean" + }, + "defaults": { + "description": "Adds support for dotenv-defaults. If set to true, uses ./.env.defaults. If a string, uses that location for a defaults file.", + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "string", + "minLength": 1 + } + ] + }, + "expand": { + "description": "Allows your variables to be \"expanded\" for reusability within your .env file.", + "type": "boolean" + }, + "path": { + "description": "The path to your environment variables. This same path applies to the .env.example and .env.defaults files.", + "type": "string", + "minLength": 1 + }, + "prefix": { + "description": "The prefix to use before the name of your env variables.", + "type": "string", + "minLength": 1 + }, + "safe": { + "description": "If true, load '.env.example' to verify the '.env' variables are all set. Can also be a string to a different file.", + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "string", + "minLength": 1 + } + ] + }, + "systemvars": { + "description": "Set to true if you would rather load all system variables as well (useful for CI purposes).", + "type": "boolean" + } + } +} diff --git a/test/configCases/plugins/dotenv-plugin/.env b/test/configCases/plugins/dotenv-plugin/.env new file mode 100644 index 000000000..e3b5d510f --- /dev/null +++ b/test/configCases/plugins/dotenv-plugin/.env @@ -0,0 +1,7 @@ +MY_NODE_ENV=test +API_URL=https://api.example.com +DEBUG=true +PORT=3000 +SECRET_KEY=my-secret-key +EMPTY_VALUE= +INTERPOLATED_VAR=$MY_NODE_ENV-mode diff --git a/test/configCases/plugins/dotenv-plugin/.env.defaults b/test/configCases/plugins/dotenv-plugin/.env.defaults new file mode 100644 index 000000000..6b22457eb --- /dev/null +++ b/test/configCases/plugins/dotenv-plugin/.env.defaults @@ -0,0 +1,3 @@ +MY_NODE_ENV=development +PORT=8080 +DEFAULT_VALUE=default-from-defaults diff --git a/test/configCases/plugins/dotenv-plugin/.env.example b/test/configCases/plugins/dotenv-plugin/.env.example new file mode 100644 index 000000000..3815eb149 --- /dev/null +++ b/test/configCases/plugins/dotenv-plugin/.env.example @@ -0,0 +1,6 @@ +MY_NODE_ENV= +API_URL= +DEBUG= +PORT= +SECRET_KEY= +REQUIRED_VAR= diff --git a/test/configCases/plugins/dotenv-plugin/basic.js b/test/configCases/plugins/dotenv-plugin/basic.js new file mode 100644 index 000000000..6c3718dd7 --- /dev/null +++ b/test/configCases/plugins/dotenv-plugin/basic.js @@ -0,0 +1,10 @@ +"use strict"; + +it("should load basic .env variables", () => { + expect(process.env.MY_NODE_ENV).toBe("test"); + expect(process.env.API_URL).toBe("https://api.example.com"); + expect(process.env.DEBUG).toBe("true"); + expect(process.env.PORT).toBe("3000"); + expect(process.env.SECRET_KEY).toBe("my-secret-key"); + expect(process.env.EMPTY_VALUE).toBe(""); +}); \ No newline at end of file diff --git a/test/configCases/plugins/dotenv-plugin/custom-path.js b/test/configCases/plugins/dotenv-plugin/custom-path.js new file mode 100644 index 000000000..e3a7cbe7a --- /dev/null +++ b/test/configCases/plugins/dotenv-plugin/custom-path.js @@ -0,0 +1,11 @@ +"use strict"; + +it("should load from custom path", () => { + // When using .env.example as path, values should be empty (as defined in .env.example) + expect(process.env.MY_NODE_ENV).toBe(""); + expect(process.env.API_URL).toBe(""); + expect(process.env.DEBUG).toBe(""); + expect(process.env.PORT).toBe(""); + expect(process.env.SECRET_KEY).toBe(""); + expect(process.env.REQUIRED_VAR).toBe(""); +}); diff --git a/test/configCases/plugins/dotenv-plugin/custom-prefix.js b/test/configCases/plugins/dotenv-plugin/custom-prefix.js new file mode 100644 index 000000000..877eaf69b --- /dev/null +++ b/test/configCases/plugins/dotenv-plugin/custom-prefix.js @@ -0,0 +1,12 @@ +"use strict"; + +it("should use custom prefix", () => { + expect(MY_ENV.MY_NODE_ENV).toBe("test"); + expect(MY_ENV.API_URL).toBe("https://api.example.com"); + expect(MY_ENV.DEBUG).toBe("true"); + expect(MY_ENV.PORT).toBe("3000"); + expect(MY_ENV.SECRET_KEY).toBe("my-secret-key"); + + // process.env should not be defined with custom prefix + expect(typeof process.env.MY_NODE_ENV).toBe("undefined"); +}); diff --git a/test/configCases/plugins/dotenv-plugin/defaults.js b/test/configCases/plugins/dotenv-plugin/defaults.js new file mode 100644 index 000000000..513a39b4c --- /dev/null +++ b/test/configCases/plugins/dotenv-plugin/defaults.js @@ -0,0 +1,10 @@ +"use strict"; + +it("should load variables with defaults", () => { + // Main .env values should override defaults + expect(process.env.MY_NODE_ENV).toBe("test"); + expect(process.env.PORT).toBe("3000"); + + // Default values should be used when not in main .env + expect(process.env.DEFAULT_VALUE).toBe("default-from-defaults"); +}); diff --git a/test/configCases/plugins/dotenv-plugin/errors.js b/test/configCases/plugins/dotenv-plugin/errors.js new file mode 100644 index 000000000..12b4cbab0 --- /dev/null +++ b/test/configCases/plugins/dotenv-plugin/errors.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = [/Missing environment variable: /]; diff --git a/test/configCases/plugins/dotenv-plugin/expand.js b/test/configCases/plugins/dotenv-plugin/expand.js new file mode 100644 index 000000000..4151bd9fe --- /dev/null +++ b/test/configCases/plugins/dotenv-plugin/expand.js @@ -0,0 +1,6 @@ +"use strict"; + +it("should expand variables when expand is true", () => { + expect(process.env.INTERPOLATED_VAR).toBe("test-mode"); + expect(process.env.MY_NODE_ENV).toBe("test"); +}); diff --git a/test/configCases/plugins/dotenv-plugin/incomplete.env b/test/configCases/plugins/dotenv-plugin/incomplete.env new file mode 100644 index 000000000..fca1d5032 --- /dev/null +++ b/test/configCases/plugins/dotenv-plugin/incomplete.env @@ -0,0 +1,4 @@ +MY_NODE_ENV=test +API_URL=https://api.example.com +DEBUG=true +PORT=3000 diff --git a/test/configCases/plugins/dotenv-plugin/systemvars.js b/test/configCases/plugins/dotenv-plugin/systemvars.js new file mode 100644 index 000000000..cc74aea7a --- /dev/null +++ b/test/configCases/plugins/dotenv-plugin/systemvars.js @@ -0,0 +1,15 @@ +"use strict"; + +it("should include system variables when systemvars is true", () => { + // System variables should be available (we can't predict exact values, but PATH should exist) + expect(typeof process.env.PATH).toBe("string"); + expect(process.env.PATH.length).toBeGreaterThan(0); + + // .env variables should also be loaded + expect(process.env.MY_NODE_ENV).toBe("test"); + expect(process.env.API_URL).toBe("https://api.example.com"); + + // NODE_ENV might be set by the system/test environment + // We just check that it exists as a system variable + expect(typeof process.env.NODE_ENV).toBe("string"); +}); diff --git a/test/configCases/plugins/dotenv-plugin/warnings.js b/test/configCases/plugins/dotenv-plugin/warnings.js new file mode 100644 index 000000000..8dddbaacc --- /dev/null +++ b/test/configCases/plugins/dotenv-plugin/warnings.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = [[/Conflicting values for 'process.env.NODE_ENV'/]]; diff --git a/test/configCases/plugins/dotenv-plugin/webpack.config.js b/test/configCases/plugins/dotenv-plugin/webpack.config.js new file mode 100644 index 000000000..510c93e89 --- /dev/null +++ b/test/configCases/plugins/dotenv-plugin/webpack.config.js @@ -0,0 +1,67 @@ +"use strict"; + +const DotenvPlugin = require("../../../../lib/DotenvPlugin"); + +/** @type {import("../../../../").Configuration[]} */ +module.exports = [ + { + name: "basic", + entry: "./basic", + plugins: [new DotenvPlugin()] + }, + { + name: "with-defaults", + entry: "./defaults", + plugins: [ + new DotenvPlugin({ + defaults: true + }) + ] + }, + { + name: "with-expand", + entry: "./expand", + plugins: [ + new DotenvPlugin({ + expand: true + }) + ] + }, + { + name: "with-systemvars", + entry: "./systemvars", + plugins: [ + new DotenvPlugin({ + systemvars: true + }) + ] + }, + { + name: "custom-path", + entry: "./custom-path", + plugins: [ + new DotenvPlugin({ + path: "./.env.example" + }) + ] + }, + { + name: "custom-prefix", + entry: "./custom-prefix", + plugins: [ + new DotenvPlugin({ + prefix: "MY_ENV." + }) + ] + }, + { + name: "safe-mode-error", + entry: "./basic", // Use existing entry file + plugins: [ + new DotenvPlugin({ + path: "./incomplete.env", + safe: "./.env.example" + }) + ] + } +]; diff --git a/types.d.ts b/types.d.ts index e25fb870c..3a1fd8b23 100644 --- a/types.d.ts +++ b/types.d.ts @@ -4419,6 +4419,124 @@ declare interface DllReferencePluginOptionsManifest { | "jsonp" | "system"; } +declare class DotenvPlugin { + constructor(options?: DotenvPluginOptions); + config: { + /** + * Whether to allow empty strings in safe mode. If false, will throw an error if any env variables are empty (but only if safe mode is enabled). + */ + allowEmptyValues?: boolean; + /** + * Adds support for dotenv-defaults. If set to true, uses ./.env.defaults. If a string, uses that location for a defaults file. + */ + defaults?: string | boolean; + /** + * Allows your variables to be "expanded" for reusability within your .env file. + */ + expand?: boolean; + /** + * The path to your environment variables. This same path applies to the .env.example and .env.defaults files. + */ + path: string; + /** + * The prefix to use before the name of your env variables. + */ + prefix: string; + /** + * If true, load '.env.example' to verify the '.env' variables are all set. Can also be a string to a different file. + */ + safe?: string | boolean; + /** + * Set to true if you would rather load all system variables as well (useful for CI purposes). + */ + systemvars?: boolean; + }; + + /** + * Apply the plugin + */ + apply(compiler: Compiler): void; + gatherVariables( + inputFileSystem: InputFileSystem, + context: string, + callback: (err: null | Error, variables?: Record) => void + ): void; + initializeVars(): Record; + getEnvs( + inputFileSystem: InputFileSystem, + context: string, + callback: ( + err: null | Error, + result?: { + env: Record; + blueprint: Record; + } + ) => void + ): void; + getDefaults( + inputFileSystem: InputFileSystem, + context: string, + callback: (err: null | Error, content?: string) => void + ): void; + + /** + * Load a file with proper path resolution + */ + loadFile( + __0: { + /** + * the file to load + */ + file: string; + /** + * the input file system + */ + inputFileSystem: InputFileSystem; + /** + * the compiler context for resolving relative paths + */ + context: string; + }, + callback: (err: null | Error, content?: string) => void + ): void; + formatDefinitions(variables: Record): Record; +} +declare interface DotenvPluginOptions { + /** + * Whether to allow empty strings in safe mode. If false, will throw an error if any env variables are empty (but only if safe mode is enabled). + */ + allowEmptyValues?: boolean; + + /** + * Adds support for dotenv-defaults. If set to true, uses ./.env.defaults. If a string, uses that location for a defaults file. + */ + defaults?: string | boolean; + + /** + * Allows your variables to be "expanded" for reusability within your .env file. + */ + expand?: boolean; + + /** + * The path to your environment variables. This same path applies to the .env.example and .env.defaults files. + */ + path?: string; + + /** + * The prefix to use before the name of your env variables. + */ + prefix?: string; + + /** + * If true, load '.env.example' to verify the '.env' variables are all set. Can also be a string to a different file. + */ + safe?: string | boolean; + + /** + * Set to true if you would rather load all system variables as well (useful for CI purposes). + */ + systemvars?: boolean; +} declare class DynamicEntryPlugin { constructor(context: string, entry: () => Promise); context: string; @@ -19237,6 +19355,7 @@ declare namespace exports { DllPlugin, DllReferencePlugin, DynamicEntryPlugin, + DotenvPlugin, EntryOptionPlugin, EntryPlugin, EnvironmentPlugin, From 4cccfafaeb7686dc962322070a682d5ff80df3c7 Mon Sep 17 00:00:00 2001 From: xiaoxiaojx <784487301@qq.com> Date: Tue, 23 Sep 2025 00:56:26 +0800 Subject: [PATCH 02/20] update --- lib/DotenvPlugin.js | 176 +++++++++++++++++++++----------------------- types.d.ts | 41 ++++------- 2 files changed, 98 insertions(+), 119 deletions(-) diff --git a/lib/DotenvPlugin.js b/lib/DotenvPlugin.js index d5bcac90e..f643ec1b2 100644 --- a/lib/DotenvPlugin.js +++ b/lib/DotenvPlugin.js @@ -118,7 +118,6 @@ class DotenvPlugin { } /** - * Apply the plugin * @param {Compiler} compiler the compiler instance * @returns {void} */ @@ -129,22 +128,32 @@ class DotenvPlugin { ); const context = compiler.context; - this.gatherVariables(inputFileSystem, context, (err, variables) => { - if (err) return callback(err); + this.gatherVariables( + inputFileSystem, + context, + (err, variables, fileDependencies) => { + if (err) return callback(err); - const definitions = this.formatDefinitions(variables || {}); - const DefinePlugin = compiler.webpack.DefinePlugin; + if (fileDependencies) { + compiler.hooks.compilation.tap(PLUGIN_NAME, (compilation) => { + compilation.fileDependencies.addAll(fileDependencies); + }); + } - new DefinePlugin(definitions).apply(compiler); - callback(); - }); + const definitions = this.formatVariables(variables || {}); + const DefinePlugin = compiler.webpack.DefinePlugin; + + new DefinePlugin(definitions).apply(compiler); + callback(); + } + ); }); } /** * @param {InputFileSystem} inputFileSystem the input file system * @param {string} context the compiler context - * @param {(err: Error | null, variables?: Record) => void} callback callback function + * @param {(err: Error | null, variables?: Record, fileDependencies?: string[]) => void} callback callback function * @returns {void} */ gatherVariables(inputFileSystem, context, callback) { @@ -159,7 +168,7 @@ class DotenvPlugin { return callback(new Error("Failed to get environment variables")); } - const { env, blueprint } = result; + const { env, blueprint, fileDependencies } = result; try { for (const key of Object.keys(blueprint)) { @@ -188,7 +197,7 @@ class DotenvPlugin { } } - callback(null, vars); + callback(null, vars, fileDependencies); } catch (error) { callback(error instanceof Error ? error : new Error(String(error))); } @@ -212,110 +221,95 @@ class DotenvPlugin { /** * @param {InputFileSystem} inputFileSystem the input file system * @param {string} context the compiler context - * @param {(err: Error | null, result?: {env: Record, blueprint: Record}) => void} callback callback function + * @param {(err: Error | null, result?: {env: Record, blueprint: Record, fileDependencies: string[]}) => void} callback callback function * @returns {void} */ getEnvs(inputFileSystem, context, callback) { - const { path, safe } = /** @type {DotenvPluginOptions} */ (this.config); - - // First load the main env file and defaults - this.loadFile( - { - file: path || DEFAULT_PATH, - inputFileSystem, - context - }, - (err, envContent) => { - if (err) return callback(err); - - this.getDefaults(inputFileSystem, context, (err, defaultsContent) => { - if (err) return callback(err); - - const env = mergeParse(envContent || "", defaultsContent || ""); - let blueprint = env; - - if (safe) { - let file = `${path || DEFAULT_PATH}.example`; - if (safe !== true) { - file = safe; - } - - this.loadFile( - { - file, - inputFileSystem, - context - }, - (err, blueprintContent) => { - if (err) return callback(err); - - blueprint = mergeParse(blueprintContent || ""); - callback(null, { env, blueprint }); - } - ); - } else { - callback(null, { env, blueprint }); - } - }); - } + const { path, safe, defaults } = /** @type {DotenvPluginOptions} */ ( + this.config ); - } - /** - * @param {InputFileSystem} inputFileSystem the input file system - * @param {string} context the compiler context - * @param {(err: Error | null, content?: string) => void} callback callback function - * @returns {void} - */ - getDefaults(inputFileSystem, context, callback) { - const { path, defaults } = /** @type {DotenvPluginOptions} */ (this.config); + const loadPromises = []; + /** @type {string[]} */ + const loadFiles = []; + const resolvedMainEnvFile = this.resolvePath( + /** @type {string} */ (path), + inputFileSystem, + context + ); + loadPromises.push(this.loadFile(inputFileSystem, resolvedMainEnvFile)); + loadFiles.push(resolvedMainEnvFile); if (defaults) { const defaultsFile = defaults === true ? `${path || DEFAULT_PATH}.defaults` : defaults; - this.loadFile( - { - file: defaultsFile, - inputFileSystem, - context - }, - callback + const resolvedDefaultsFile = this.resolvePath( + /** @type {string} */ (defaultsFile), + inputFileSystem, + context ); + loadPromises.push(this.loadFile(inputFileSystem, resolvedDefaultsFile)); + loadFiles.push(resolvedDefaultsFile); } else { - callback(null, ""); + loadPromises.push(Promise.resolve("")); } + if (safe) { + const safeFile = safe === true ? `${path || DEFAULT_PATH}.example` : safe; + const resolvedSafeFile = this.resolvePath( + /** @type {string} */ (safeFile), + inputFileSystem, + context + ); + loadPromises.push(this.loadFile(inputFileSystem, resolvedSafeFile)); + loadFiles.push(resolvedSafeFile); + } else { + loadPromises.push(Promise.resolve("")); + } + + Promise.all(loadPromises) + .then(([envContent, defaultsContent, safeContent]) => { + const env = mergeParse(envContent || "", defaultsContent || ""); + let blueprint = env; + if (safeContent) { + blueprint = mergeParse(safeContent || ""); + } + callback(null, { env, blueprint, fileDependencies: loadFiles }); + }) + .catch((err) => { + callback(err); + }); } /** * Load a file with proper path resolution - * @param {object} options options object - * @param {string} options.file the file to load - * @param {InputFileSystem} options.inputFileSystem the input file system - * @param {string} options.context the compiler context for resolving relative paths - * @param {(err: Error | null, content?: string) => void} callback callback function - * @returns {void} + * @param {InputFileSystem} fs the input file system + * @param {string} file the file to load + * @returns {Promise} the content of the file */ - loadFile({ file, inputFileSystem, context }, callback) { - // Resolve relative paths based on compiler context - const resolvedPath = isAbsolute(file) - ? file - : join(inputFileSystem, context, file); - - inputFileSystem.readFile(resolvedPath, "utf8", (err, content) => { - if (err) { - // File doesn't exist, return empty string - callback(null, ""); - } else { - callback(null, /** @type {string} */ (content)); - } + loadFile(fs, file) { + return new Promise((resolve, reject) => { + fs.readFile(file, "utf8", (err, content) => { + if (err) reject(err); + resolve(content || ""); + }); }); } + /** + * @param {string} file the file to load + * @param {InputFileSystem} inputFileSystem the input file system + * @param {string} context the compiler context for resolving relative paths + * @returns {string} the resolved path + */ + resolvePath(file, inputFileSystem, context) { + return isAbsolute(file) ? file : join(inputFileSystem, context, file); + } + /** * @param {Record} variables variables object * @returns {Record} formatted data */ - formatDefinitions(variables) { + formatVariables(variables) { const { expand, prefix } = /** @type {DotenvPluginOptions} */ (this.config); const formatted = Object.keys(variables).reduce((obj, key) => { const v = variables[key]; diff --git a/types.d.ts b/types.d.ts index 3a1fd8b23..74492b825 100644 --- a/types.d.ts +++ b/types.d.ts @@ -4451,15 +4451,15 @@ declare class DotenvPlugin { */ systemvars?: boolean; }; - - /** - * Apply the plugin - */ apply(compiler: Compiler): void; gatherVariables( inputFileSystem: InputFileSystem, context: string, - callback: (err: null | Error, variables?: Record) => void + callback: ( + err: null | Error, + variables?: Record, + fileDependencies?: string[] + ) => void ): void; initializeVars(): Record; getEnvs( @@ -4470,36 +4470,21 @@ declare class DotenvPlugin { result?: { env: Record; blueprint: Record; + fileDependencies: string[]; } ) => void ): void; - getDefaults( - inputFileSystem: InputFileSystem, - context: string, - callback: (err: null | Error, content?: string) => void - ): void; /** * Load a file with proper path resolution */ - loadFile( - __0: { - /** - * the file to load - */ - file: string; - /** - * the input file system - */ - inputFileSystem: InputFileSystem; - /** - * the compiler context for resolving relative paths - */ - context: string; - }, - callback: (err: null | Error, content?: string) => void - ): void; - formatDefinitions(variables: Record): Record; + loadFile(fs: InputFileSystem, file: string): Promise; + resolvePath( + file: string, + inputFileSystem: InputFileSystem, + context: string + ): string; + formatVariables(variables: Record): Record; } declare interface DotenvPluginOptions { /** From c7fc38d76fc4edd0ceb7b7f453d8f05ecb2cfee2 Mon Sep 17 00:00:00 2001 From: xiaoxiaojx <784487301@qq.com> Date: Tue, 23 Sep 2025 01:08:53 +0800 Subject: [PATCH 03/20] update --- lib/DotenvPlugin.js | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/lib/DotenvPlugin.js b/lib/DotenvPlugin.js index f643ec1b2..fce7e9c69 100644 --- a/lib/DotenvPlugin.js +++ b/lib/DotenvPlugin.js @@ -122,6 +122,9 @@ class DotenvPlugin { * @returns {void} */ apply(compiler) { + /** @type {string[] | undefined} */ + let fileDependenciesCache; + compiler.hooks.beforeCompile.tapAsync(PLUGIN_NAME, (_params, callback) => { const inputFileSystem = /** @type {InputFileSystem} */ ( compiler.inputFileSystem @@ -133,21 +136,20 @@ class DotenvPlugin { context, (err, variables, fileDependencies) => { if (err) return callback(err); - - if (fileDependencies) { - compiler.hooks.compilation.tap(PLUGIN_NAME, (compilation) => { - compilation.fileDependencies.addAll(fileDependencies); - }); - } - const definitions = this.formatVariables(variables || {}); const DefinePlugin = compiler.webpack.DefinePlugin; new DefinePlugin(definitions).apply(compiler); + fileDependenciesCache = fileDependencies; + callback(); } ); }); + + compiler.hooks.compilation.tap(PLUGIN_NAME, (compilation) => { + compilation.fileDependencies.addAll(fileDependenciesCache || []); + }); } /** From cf1065c50c9b4518126fc93b0d0fe76236959a9a Mon Sep 17 00:00:00 2001 From: xiaoxiaojx <784487301@qq.com> Date: Fri, 3 Oct 2025 17:15:14 +0800 Subject: [PATCH 04/20] update --- declarations/WebpackOptions.d.ts | 36 ++ lib/DotenvPlugin.js | 462 ++++++++------- lib/WebpackOptionsApply.js | 8 + lib/config/defaults.js | 1 + lib/config/normalization.js | 3 + schemas/WebpackOptions.check.js | 2 +- schemas/WebpackOptions.json | 50 ++ schemas/plugins/DotenvPlugin.check.d.ts | 7 - schemas/plugins/DotenvPlugin.check.js | 6 - schemas/plugins/DotenvPlugin.json | 53 -- test/__snapshots__/Cli.basictest.js.snap | 52 ++ test/configCases/plugins/dotenv-plugin/.env | 20 +- .../plugins/dotenv-plugin/.env.defaults | 3 - .../plugins/dotenv-plugin/.env.example | 6 - .../plugins/dotenv-plugin/.env.production | 3 + .../plugins/dotenv-plugin/basic.js | 16 +- .../plugins/dotenv-plugin/custom-envdir.js | 7 + .../plugins/dotenv-plugin/custom-path.js | 11 - .../plugins/dotenv-plugin/custom-prefix.js | 12 - .../plugins/dotenv-plugin/custom-prefixes.js | 13 + .../plugins/dotenv-plugin/defaults.js | 10 - .../plugins/dotenv-plugin/envs/.env | 2 + .../plugins/dotenv-plugin/errors.js | 3 - .../plugins/dotenv-plugin/expand.js | 10 +- .../plugins/dotenv-plugin/incomplete.env | 4 - .../plugins/dotenv-plugin/mode-specific.js | 11 + .../plugins/dotenv-plugin/prefixes-env/.env | 4 + .../plugins/dotenv-plugin/systemvars.js | 15 - .../plugins/dotenv-plugin/warnings.js | 3 - .../plugins/dotenv-plugin/webpack.config.js | 80 +-- types.d.ts | 536 ++++-------------- 31 files changed, 615 insertions(+), 834 deletions(-) delete mode 100644 schemas/plugins/DotenvPlugin.check.d.ts delete mode 100644 schemas/plugins/DotenvPlugin.check.js delete mode 100644 schemas/plugins/DotenvPlugin.json delete mode 100644 test/configCases/plugins/dotenv-plugin/.env.defaults delete mode 100644 test/configCases/plugins/dotenv-plugin/.env.example create mode 100644 test/configCases/plugins/dotenv-plugin/.env.production create mode 100644 test/configCases/plugins/dotenv-plugin/custom-envdir.js delete mode 100644 test/configCases/plugins/dotenv-plugin/custom-path.js delete mode 100644 test/configCases/plugins/dotenv-plugin/custom-prefix.js create mode 100644 test/configCases/plugins/dotenv-plugin/custom-prefixes.js delete mode 100644 test/configCases/plugins/dotenv-plugin/defaults.js create mode 100644 test/configCases/plugins/dotenv-plugin/envs/.env delete mode 100644 test/configCases/plugins/dotenv-plugin/errors.js delete mode 100644 test/configCases/plugins/dotenv-plugin/incomplete.env create mode 100644 test/configCases/plugins/dotenv-plugin/mode-specific.js create mode 100644 test/configCases/plugins/dotenv-plugin/prefixes-env/.env delete mode 100644 test/configCases/plugins/dotenv-plugin/systemvars.js delete mode 100644 test/configCases/plugins/dotenv-plugin/warnings.js diff --git a/declarations/WebpackOptions.d.ts b/declarations/WebpackOptions.d.ts index d0933491f..440aec92e 100644 --- a/declarations/WebpackOptions.d.ts +++ b/declarations/WebpackOptions.d.ts @@ -47,6 +47,21 @@ export type DevServer = * A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map). */ export type DevTool = (false | "eval") | string; +/** + * Enable and configure the Dotenv plugin to load environment variables from .env files. + */ +export type Dotenv = + | boolean + | { + /** + * The directory from which .env files are loaded. Defaults to the webpack context. Loads .env, .env.local, .env.[mode], .env.[mode].local in order. + */ + envDir?: string; + /** + * Only expose environment variables that start with these prefixes. Defaults to 'WEBPACK_'. + */ + prefixes?: string[] | string; + }; /** * The entry point(s) of the compilation. */ @@ -884,6 +899,10 @@ export interface WebpackOptions { * A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map). */ devtool?: DevTool; + /** + * Enable and configure the Dotenv plugin to load environment variables from .env files. + */ + dotenv?: Dotenv; /** * The entry point(s) of the compilation. */ @@ -3061,6 +3080,19 @@ export interface CssParserOptions { */ url?: CssParserUrl; } +/** + * Options for Dotenv plugin. + */ +export interface DotenvPluginOptions { + /** + * The directory from which .env files are loaded. Defaults to the webpack context. Loads .env, .env.local, .env.[mode], .env.[mode].local in order. + */ + envDir?: string; + /** + * Only expose environment variables that start with these prefixes. Defaults to 'WEBPACK_'. + */ + prefixes?: string[] | string; +} /** * No generator options are supported for this module type. */ @@ -3798,6 +3830,10 @@ export interface WebpackOptionsNormalized { * A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map). */ devtool?: DevTool; + /** + * Enable and configure the Dotenv plugin to load environment variables from .env files. + */ + dotenv?: Dotenv; /** * The entry point(s) of the compilation. */ diff --git a/lib/DotenvPlugin.js b/lib/DotenvPlugin.js index fce7e9c69..b693e2861 100644 --- a/lib/DotenvPlugin.js +++ b/lib/DotenvPlugin.js @@ -6,27 +6,34 @@ "use strict"; const createSchemaValidation = require("./util/create-schema-validation"); -const { isAbsolute, join } = require("./util/fs"); +const { join } = require("./util/fs"); +/** @typedef {import("../declarations/WebpackOptions").DotenvPluginOptions} DotenvPluginOptions */ /** @typedef {import("./Compiler")} Compiler */ /** @typedef {import("./util/fs").InputFileSystem} InputFileSystem */ -/** @typedef {import("../declarations/plugins/DotenvPlugin").DotenvPluginOptions} DotenvPluginOptions */ - -const DEFAULT_PATH = "./.env"; const DEFAULT_OPTIONS = { - path: DEFAULT_PATH, - prefix: "process.env." + prefixes: "WEBPACK_", + envDir: true }; +// Regex for parsing .env files +// ported from https://github.com/motdotla/dotenv/blob/master/lib/main.js#L32 const LINE = /(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/gm; const PLUGIN_NAME = "DotenvPlugin"; const validate = createSchemaValidation( - require("../schemas/plugins/DotenvPlugin.check"), - () => require("../schemas/plugins/DotenvPlugin.json"), + undefined, + () => { + const { definitions } = require("../schemas/WebpackOptions.json"); + + return { + definitions, + oneOf: [{ $ref: "#/definitions/DotenvPluginOptions" }] + }; + }, { name: "Dotenv Plugin", baseDataPath: "options" @@ -34,24 +41,7 @@ const validate = createSchemaValidation( ); /** - * @param {string} env environment variable value - * @param {Record} vars variables object - * @returns {string} interpolated value - */ -const interpolate = (env, vars) => { - const matches = env.match(/\$([a-zA-Z0-9_]+)|\${([a-zA-Z0-9_]+)}/g) || []; - - for (const match of matches) { - const key = match.replace(/\$|{|}/g, ""); - let variable = vars[key] || ""; - variable = interpolate(variable, vars); - env = env.replace(match, variable); - } - - return env; -}; - -/** + * Parse .env file content * ported from https://github.com/motdotla/dotenv/blob/master/lib/main.js#L49 * @param {string|Buffer} src the source content to parse * @returns {Record} parsed environment variables object @@ -95,19 +85,182 @@ function parse(src) { } /** - * Parses objects like before, but with defaults! - * @param {string} src the original src - * @param {string=} defaultSrc the new-and-improved default source - * @returns {Record} the parsed results + * Resolve escape sequences + * ported from https://github.com/motdotla/dotenv-expand + * @param {string} value value to resolve + * @returns {string} resolved value */ -const mergeParse = (src, defaultSrc = "") => { - const parsedSrc = parse(src); - const parsedDefault = parse(defaultSrc); +function _resolveEscapeSequences(value) { + return value.replace(/\\\$/g, "$"); +} - return { ...parsedDefault, ...parsedSrc }; +/** + * Expand environment variable value + * ported from https://github.com/motdotla/dotenv-expand + * @param {string} value value to expand + * @param {Record} processEnv process.env object + * @param {Record} runningParsed running parsed object + * @returns {string} expanded value + */ +function expandValue(value, processEnv, runningParsed) { + const env = { ...runningParsed, ...processEnv }; // process.env wins + + const regex = /(?, processEnv?: Record }} options expand options + * @returns {{ parsed: Record }} expanded options + */ +function expand(options) { + // for use with progressive expansion + const runningParsed = /** @type {Record} */ ({}); + + let processEnv = process.env; + if ( + options && + options.processEnv !== null && + options.processEnv !== undefined + ) { + processEnv = options.processEnv; + } + + // dotenv.config() ran before this so the assumption is process.env has already been set + for (const key in options.parsed) { + let value = options.parsed[key]; + + // short-circuit scenario: process.env was already set prior to the file value + value = + processEnv[key] && processEnv[key] !== value + ? /** @type {string} */ (processEnv[key]) + : expandValue(value, processEnv, runningParsed); + + options.parsed[key] = _resolveEscapeSequences(value); + + // for use with progressive expansion + runningParsed[key] = _resolveEscapeSequences(value); + } + + for (const processKey in options.parsed) { + if (processEnv) { + processEnv[processKey] = options.parsed[processKey]; + } + } + + return options; +} + +/** + * Resolve and validate env prefixes + * Similar to Vite's resolveEnvPrefix + * @param {string | string[] | undefined} rawPrefixes raw prefixes option + * @returns {string[]} normalized prefixes array + */ +const resolveEnvPrefix = (rawPrefixes) => { + const prefixes = Array.isArray(rawPrefixes) + ? rawPrefixes + : [rawPrefixes || "WEBPACK_"]; + + // Check for empty prefix (security issue like Vite does) + if (prefixes.includes("")) { + throw new Error( + "prefixes option contains value '', which could lead to unexpected exposure of sensitive information." + ); + } + + return prefixes; +}; + +/** + * Get list of env files to load based on mode + * Similar to Vite's getEnvFilesForMode + * @param {InputFileSystem} inputFileSystem the input file system + * @param {string} envDir the directory containing .env files + * @param {string | undefined} mode the mode (e.g., 'production', 'development') + * @returns {string[]} array of file paths to load + */ +const getEnvFilesForMode = (inputFileSystem, envDir, mode) => { + if (envDir) { + return [ + /** default file */ ".env", + /** local file */ ".env.local", + /** mode file */ `.env.${mode}`, + /** mode local file */ `.env.${mode}.local` + ].map((file) => join(inputFileSystem, envDir, file)); + } + + return []; +}; + +/** + * Format environment variables as DefinePlugin definitions + * @param {Record} env environment variables + * @returns {Record} formatted definitions + */ +const formatDefinitions = (env) => { + const definitions = /** @type {Record} */ ({}); + + for (const [key, value] of Object.entries(env)) { + // Always use process.env. prefix for DefinePlugin + definitions[`process.env.${key}`] = JSON.stringify(value); + } + + return definitions; }; -// ported from https://github.com/mrsteele/dotenv-webpack class DotenvPlugin { /** * @param {DotenvPluginOptions=} options options object @@ -130,13 +283,19 @@ class DotenvPlugin { compiler.inputFileSystem ); const context = compiler.context; + // Use webpack mode or fallback to NODE_ENV + const mode = /** @type {string | undefined} */ ( + compiler.options.mode || process.env.NODE_ENV + ); - this.gatherVariables( + this.loadEnv( inputFileSystem, + mode, context, - (err, variables, fileDependencies) => { + (err, env, fileDependencies) => { if (err) return callback(err); - const definitions = this.formatVariables(variables || {}); + + const definitions = formatDefinitions(env || {}); const DefinePlugin = compiler.webpack.DefinePlugin; new DefinePlugin(definitions).apply(compiler); @@ -153,129 +312,92 @@ class DotenvPlugin { } /** - * @param {InputFileSystem} inputFileSystem the input file system + * Load environment variables from .env files + * Similar to Vite's loadEnv implementation + * @param {InputFileSystem} fs the input file system + * @param {string | undefined} mode the mode * @param {string} context the compiler context - * @param {(err: Error | null, variables?: Record, fileDependencies?: string[]) => void} callback callback function + * @param {(err: Error | null, env?: Record, fileDependencies?: string[]) => void} callback callback function * @returns {void} */ - gatherVariables(inputFileSystem, context, callback) { - const { safe, allowEmptyValues } = /** @type {DotenvPluginOptions} */ ( - this.config - ); - const vars = /** @type {Record} */ (this.initializeVars()); + loadEnv(fs, mode, context, callback) { + const { envDir: rawEnvDir, prefixes: rawPrefixes } = + /** @type {DotenvPluginOptions} */ (this.config); - this.getEnvs(inputFileSystem, context, (err, result) => { - if (err) return callback(err); - if (!result) { - return callback(new Error("Failed to get environment variables")); - } - - const { env, blueprint, fileDependencies } = result; - - try { - for (const key of Object.keys(blueprint)) { - const value = Object.prototype.hasOwnProperty.call(vars, key) - ? vars[key] - : env[key]; - - const isMissing = - typeof value === "undefined" || - value === null || - (!allowEmptyValues && value === ""); - - if (safe && isMissing) { - throw new Error(`Missing environment variable: ${key}`); - } else { - vars[key] = value; - } - } - - // add the leftovers - if (safe) { - for (const key of Object.keys(env)) { - if (!Object.prototype.hasOwnProperty.call(vars, key)) { - vars[key] = env[key]; - } - } - } - - callback(null, vars, fileDependencies); - } catch (error) { - callback(error instanceof Error ? error : new Error(String(error))); - } - }); - } - - initializeVars() { - const config = /** @type {DotenvPluginOptions} */ (this.config); - if (config.systemvars) { - const vars = /** @type {Record} */ ({}); - for (const key in process.env) { - if (process.env[key] !== undefined) { - vars[key] = /** @type {string} */ (process.env[key]); - } - } - return vars; + let prefixes; + try { + prefixes = resolveEnvPrefix(rawPrefixes); + } catch (err) { + return callback(/** @type {Error} */ (err)); } - return /** @type {Record} */ ({}); - } - /** - * @param {InputFileSystem} inputFileSystem the input file system - * @param {string} context the compiler context - * @param {(err: Error | null, result?: {env: Record, blueprint: Record, fileDependencies: string[]}) => void} callback callback function - * @returns {void} - */ - getEnvs(inputFileSystem, context, callback) { - const { path, safe, defaults } = /** @type {DotenvPluginOptions} */ ( - this.config - ); + const getEnvDir = () => { + if (typeof rawEnvDir === "string") { + return join(fs, context, rawEnvDir); + } + if (rawEnvDir === true) { + return context; + } + return ""; + }; - const loadPromises = []; + const envDir = getEnvDir(); + + // Get env files to load + const envFiles = getEnvFilesForMode(fs, envDir, mode); /** @type {string[]} */ - const loadFiles = []; + const fileDependencies = []; - const resolvedMainEnvFile = this.resolvePath( - /** @type {string} */ (path), - inputFileSystem, - context + // Read all files + const readPromises = envFiles.map((filePath) => + this.loadFile(fs, filePath).then( + (content) => { + fileDependencies.push(filePath); + return { content, filePath }; + }, + () => + // File doesn't exist, skip it (this is normal) + ({ content: "", filePath }) + ) ); - loadPromises.push(this.loadFile(inputFileSystem, resolvedMainEnvFile)); - loadFiles.push(resolvedMainEnvFile); - if (defaults) { - const defaultsFile = - defaults === true ? `${path || DEFAULT_PATH}.defaults` : defaults; - const resolvedDefaultsFile = this.resolvePath( - /** @type {string} */ (defaultsFile), - inputFileSystem, - context - ); - loadPromises.push(this.loadFile(inputFileSystem, resolvedDefaultsFile)); - loadFiles.push(resolvedDefaultsFile); - } else { - loadPromises.push(Promise.resolve("")); - } - if (safe) { - const safeFile = safe === true ? `${path || DEFAULT_PATH}.example` : safe; - const resolvedSafeFile = this.resolvePath( - /** @type {string} */ (safeFile), - inputFileSystem, - context - ); - loadPromises.push(this.loadFile(inputFileSystem, resolvedSafeFile)); - loadFiles.push(resolvedSafeFile); - } else { - loadPromises.push(Promise.resolve("")); - } - Promise.all(loadPromises) - .then(([envContent, defaultsContent, safeContent]) => { - const env = mergeParse(envContent || "", defaultsContent || ""); - let blueprint = env; - if (safeContent) { - blueprint = mergeParse(safeContent || ""); + Promise.all(readPromises) + .then((results) => { + // Parse all files and merge (later files override earlier ones) + // Similar to Vite's implementation + const parsed = /** @type {Record} */ ({}); + for (const { content } of results) { + if (!content) continue; + const entries = parse(content); + for (const key in entries) { + parsed[key] = entries[key]; + } } - callback(null, { env, blueprint, fileDependencies: loadFiles }); + + // Always expand environment variables (like Vite does) + // Make a copy of process.env so that dotenv-expand doesn't modify global process.env + const processEnv = { ...process.env }; + expand({ parsed, processEnv }); + + // Filter by prefixes and prioritize process.env (like Vite) + const env = /** @type {Record} */ ({}); + + // First, add filtered vars from parsed .env files + for (const [key, value] of Object.entries(parsed)) { + if (prefixes.some((prefix) => key.startsWith(prefix))) { + env[key] = value; + } + } + + // Then, prioritize actual env variables starting with prefixes + // These are typically provided inline and should be prioritized (like Vite) + for (const key in process.env) { + if (prefixes.some((prefix) => key.startsWith(prefix))) { + env[key] = /** @type {string} */ (process.env[key]); + } + } + + callback(null, env, fileDependencies); }) .catch((err) => { callback(err); @@ -292,50 +414,10 @@ class DotenvPlugin { return new Promise((resolve, reject) => { fs.readFile(file, "utf8", (err, content) => { if (err) reject(err); - resolve(content || ""); + else resolve(content || ""); }); }); } - - /** - * @param {string} file the file to load - * @param {InputFileSystem} inputFileSystem the input file system - * @param {string} context the compiler context for resolving relative paths - * @returns {string} the resolved path - */ - resolvePath(file, inputFileSystem, context) { - return isAbsolute(file) ? file : join(inputFileSystem, context, file); - } - - /** - * @param {Record} variables variables object - * @returns {Record} formatted data - */ - formatVariables(variables) { - const { expand, prefix } = /** @type {DotenvPluginOptions} */ (this.config); - const formatted = Object.keys(variables).reduce((obj, key) => { - const v = variables[key]; - const vKey = `${prefix}${key}`; - let vValue; - if (expand) { - if (v.slice(0, 2) === "\\$") { - vValue = v.slice(1); - } else if (v.indexOf("\\$") > 0) { - vValue = v.replace(/\\\$/g, "$"); - } else { - vValue = interpolate(v, variables); - } - } else { - vValue = v; - } - - obj[vKey] = JSON.stringify(vValue); - - return obj; - }, /** @type {Record} */ ({})); - - return formatted; - } } module.exports = DotenvPlugin; diff --git a/lib/WebpackOptionsApply.js b/lib/WebpackOptionsApply.js index f9efab230..b08962779 100644 --- a/lib/WebpackOptionsApply.js +++ b/lib/WebpackOptionsApply.js @@ -294,6 +294,14 @@ class WebpackOptionsApply extends OptionsApply { ).apply(compiler); } + if (options.dotenv) { + const DotenvPlugin = require("./DotenvPlugin"); + + new DotenvPlugin( + typeof options.dotenv === "boolean" ? {} : options.dotenv + ).apply(compiler); + } + if (options.devtool) { if (options.devtool.includes("source-map")) { const hidden = options.devtool.includes("hidden"); diff --git a/lib/config/defaults.js b/lib/config/defaults.js index ce4bf3980..b0a084e0f 100644 --- a/lib/config/defaults.js +++ b/lib/config/defaults.js @@ -202,6 +202,7 @@ const { * & { performance: NonNullable } * & { recordsInputPath: NonNullable } * & { recordsOutputPath: NonNullable + * & { dotenv: NonNullable } * }} WebpackOptionsNormalizedWithDefaults */ diff --git a/lib/config/normalization.js b/lib/config/normalization.js index 72249192d..a5ad15613 100644 --- a/lib/config/normalization.js +++ b/lib/config/normalization.js @@ -178,6 +178,9 @@ const getNormalizedWebpackOptions = (config) => ({ return { ...devServer }; }), devtool: config.devtool, + dotenv: optionalNestedConfig(config.dotenv, (dotenv) => + dotenv === true ? {} : dotenv + ), entry: config.entry === undefined ? { main: {} } diff --git a/schemas/WebpackOptions.check.js b/schemas/WebpackOptions.check.js index b267e4935..ed7b64146 100644 --- a/schemas/WebpackOptions.check.js +++ b/schemas/WebpackOptions.check.js @@ -3,4 +3,4 @@ * DO NOT MODIFY BY HAND. * Run `yarn fix:special` to update */ -const e=/^(?:[A-Za-z]:[\\/]|\\\\|\/)/;module.exports=_e,module.exports.default=_e;const t={definitions:{Amd:{anyOf:[{enum:[!1]},{type:"object"}]},AmdContainer:{type:"string",minLength:1},AssetFilterItemTypes:{anyOf:[{instanceof:"RegExp"},{type:"string",absolutePath:!1},{instanceof:"Function"}]},AssetFilterTypes:{anyOf:[{type:"array",items:{oneOf:[{$ref:"#/definitions/AssetFilterItemTypes"}]}},{$ref:"#/definitions/AssetFilterItemTypes"}]},AssetGeneratorDataUrl:{anyOf:[{$ref:"#/definitions/AssetGeneratorDataUrlOptions"},{$ref:"#/definitions/AssetGeneratorDataUrlFunction"}]},AssetGeneratorDataUrlFunction:{instanceof:"Function"},AssetGeneratorDataUrlOptions:{type:"object",additionalProperties:!1,properties:{encoding:{enum:[!1,"base64"]},mimetype:{type:"string"}}},AssetGeneratorOptions:{type:"object",additionalProperties:!1,properties:{binary:{type:"boolean"},dataUrl:{$ref:"#/definitions/AssetGeneratorDataUrl"},emit:{type:"boolean"},filename:{$ref:"#/definitions/FilenameTemplate"},outputPath:{$ref:"#/definitions/AssetModuleOutputPath"},publicPath:{$ref:"#/definitions/RawPublicPath"}}},AssetInlineGeneratorOptions:{type:"object",additionalProperties:!1,properties:{binary:{type:"boolean"},dataUrl:{$ref:"#/definitions/AssetGeneratorDataUrl"}}},AssetModuleFilename:{anyOf:[{type:"string",absolutePath:!1},{instanceof:"Function"}]},AssetModuleOutputPath:{anyOf:[{type:"string",absolutePath:!1},{instanceof:"Function"}]},AssetParserDataUrlFunction:{instanceof:"Function"},AssetParserDataUrlOptions:{type:"object",additionalProperties:!1,properties:{maxSize:{type:"number"}}},AssetParserOptions:{type:"object",additionalProperties:!1,properties:{dataUrlCondition:{anyOf:[{$ref:"#/definitions/AssetParserDataUrlOptions"},{$ref:"#/definitions/AssetParserDataUrlFunction"}]}}},AssetResourceGeneratorOptions:{type:"object",additionalProperties:!1,properties:{binary:{type:"boolean"},emit:{type:"boolean"},filename:{$ref:"#/definitions/FilenameTemplate"},outputPath:{$ref:"#/definitions/AssetModuleOutputPath"},publicPath:{$ref:"#/definitions/RawPublicPath"}}},AuxiliaryComment:{anyOf:[{type:"string"},{$ref:"#/definitions/LibraryCustomUmdCommentObject"}]},Bail:{type:"boolean"},CacheOptions:{anyOf:[{enum:[!0]},{$ref:"#/definitions/CacheOptionsNormalized"}]},CacheOptionsNormalized:{anyOf:[{enum:[!1]},{$ref:"#/definitions/MemoryCacheOptions"},{$ref:"#/definitions/FileCacheOptions"}]},Charset:{type:"boolean"},ChunkFilename:{oneOf:[{$ref:"#/definitions/FilenameTemplate"}]},ChunkFormat:{anyOf:[{enum:["array-push","commonjs","module",!1]},{type:"string"}]},ChunkLoadTimeout:{type:"number"},ChunkLoading:{anyOf:[{enum:[!1]},{$ref:"#/definitions/ChunkLoadingType"}]},ChunkLoadingGlobal:{type:"string"},ChunkLoadingType:{anyOf:[{enum:["jsonp","import-scripts","require","async-node","import"]},{type:"string"}]},Clean:{anyOf:[{type:"boolean"},{$ref:"#/definitions/CleanOptions"}]},CleanOptions:{type:"object",additionalProperties:!1,properties:{dry:{type:"boolean"},keep:{anyOf:[{instanceof:"RegExp"},{type:"string",absolutePath:!1},{instanceof:"Function"}]}}},CompareBeforeEmit:{type:"boolean"},Context:{type:"string",absolutePath:!0},CrossOriginLoading:{enum:[!1,"anonymous","use-credentials"]},CssAutoGeneratorOptions:{type:"object",additionalProperties:!1,properties:{esModule:{$ref:"#/definitions/CssGeneratorEsModule"},exportsConvention:{$ref:"#/definitions/CssGeneratorExportsConvention"},exportsOnly:{$ref:"#/definitions/CssGeneratorExportsOnly"},localIdentName:{$ref:"#/definitions/CssGeneratorLocalIdentName"}}},CssAutoParserOptions:{type:"object",additionalProperties:!1,properties:{import:{$ref:"#/definitions/CssParserImport"},namedExports:{$ref:"#/definitions/CssParserNamedExports"},url:{$ref:"#/definitions/CssParserUrl"}}},CssChunkFilename:{oneOf:[{$ref:"#/definitions/FilenameTemplate"}]},CssFilename:{oneOf:[{$ref:"#/definitions/FilenameTemplate"}]},CssGeneratorEsModule:{type:"boolean"},CssGeneratorExportsConvention:{anyOf:[{enum:["as-is","camel-case","camel-case-only","dashes","dashes-only"]},{instanceof:"Function"}]},CssGeneratorExportsOnly:{type:"boolean"},CssGeneratorLocalIdentName:{type:"string"},CssGeneratorOptions:{type:"object",additionalProperties:!1,properties:{esModule:{$ref:"#/definitions/CssGeneratorEsModule"},exportsOnly:{$ref:"#/definitions/CssGeneratorExportsOnly"}}},CssGlobalGeneratorOptions:{type:"object",additionalProperties:!1,properties:{esModule:{$ref:"#/definitions/CssGeneratorEsModule"},exportsConvention:{$ref:"#/definitions/CssGeneratorExportsConvention"},exportsOnly:{$ref:"#/definitions/CssGeneratorExportsOnly"},localIdentName:{$ref:"#/definitions/CssGeneratorLocalIdentName"}}},CssGlobalParserOptions:{type:"object",additionalProperties:!1,properties:{import:{$ref:"#/definitions/CssParserImport"},namedExports:{$ref:"#/definitions/CssParserNamedExports"},url:{$ref:"#/definitions/CssParserUrl"}}},CssModuleGeneratorOptions:{type:"object",additionalProperties:!1,properties:{esModule:{$ref:"#/definitions/CssGeneratorEsModule"},exportsConvention:{$ref:"#/definitions/CssGeneratorExportsConvention"},exportsOnly:{$ref:"#/definitions/CssGeneratorExportsOnly"},localIdentName:{$ref:"#/definitions/CssGeneratorLocalIdentName"}}},CssModuleParserOptions:{type:"object",additionalProperties:!1,properties:{import:{$ref:"#/definitions/CssParserImport"},namedExports:{$ref:"#/definitions/CssParserNamedExports"},url:{$ref:"#/definitions/CssParserUrl"}}},CssParserImport:{type:"boolean"},CssParserNamedExports:{type:"boolean"},CssParserOptions:{type:"object",additionalProperties:!1,properties:{import:{$ref:"#/definitions/CssParserImport"},namedExports:{$ref:"#/definitions/CssParserNamedExports"},url:{$ref:"#/definitions/CssParserUrl"}}},CssParserUrl:{type:"boolean"},DeferImportExperimentOptions:{type:"boolean",required:["asyncModule"]},Dependencies:{type:"array",items:{type:"string"}},DevServer:{anyOf:[{enum:[!1]},{type:"object"}]},DevTool:{anyOf:[{enum:[!1,"eval"]},{type:"string",pattern:"^(inline-|hidden-|eval-)?(nosources-)?(cheap-(module-)?)?source-map(-debugids)?$"}]},DevtoolFallbackModuleFilenameTemplate:{anyOf:[{type:"string"},{instanceof:"Function"}]},DevtoolModuleFilenameTemplate:{anyOf:[{type:"string"},{instanceof:"Function"}]},DevtoolNamespace:{type:"string"},EmptyGeneratorOptions:{type:"object",additionalProperties:!1},EmptyParserOptions:{type:"object",additionalProperties:!1},EnabledChunkLoadingTypes:{type:"array",items:{$ref:"#/definitions/ChunkLoadingType"}},EnabledLibraryTypes:{type:"array",items:{$ref:"#/definitions/LibraryType"}},EnabledWasmLoadingTypes:{type:"array",items:{$ref:"#/definitions/WasmLoadingType"}},Entry:{anyOf:[{$ref:"#/definitions/EntryDynamic"},{$ref:"#/definitions/EntryStatic"}]},EntryDescription:{type:"object",additionalProperties:!1,properties:{asyncChunks:{type:"boolean"},baseUri:{type:"string"},chunkLoading:{$ref:"#/definitions/ChunkLoading"},dependOn:{anyOf:[{type:"array",items:{type:"string",minLength:1},minItems:1,uniqueItems:!0},{type:"string",minLength:1}]},filename:{$ref:"#/definitions/EntryFilename"},import:{$ref:"#/definitions/EntryItem"},layer:{$ref:"#/definitions/Layer"},library:{$ref:"#/definitions/LibraryOptions"},publicPath:{$ref:"#/definitions/PublicPath"},runtime:{$ref:"#/definitions/EntryRuntime"},wasmLoading:{$ref:"#/definitions/WasmLoading"}},required:["import"]},EntryDescriptionNormalized:{type:"object",additionalProperties:!1,properties:{asyncChunks:{type:"boolean"},baseUri:{type:"string"},chunkLoading:{$ref:"#/definitions/ChunkLoading"},dependOn:{type:"array",items:{type:"string",minLength:1},minItems:1,uniqueItems:!0},filename:{$ref:"#/definitions/Filename"},import:{type:"array",items:{type:"string",minLength:1},minItems:1,uniqueItems:!0},layer:{$ref:"#/definitions/Layer"},library:{$ref:"#/definitions/LibraryOptions"},publicPath:{$ref:"#/definitions/PublicPath"},runtime:{$ref:"#/definitions/EntryRuntime"},wasmLoading:{$ref:"#/definitions/WasmLoading"}}},EntryDynamic:{instanceof:"Function"},EntryDynamicNormalized:{instanceof:"Function"},EntryFilename:{oneOf:[{$ref:"#/definitions/FilenameTemplate"}]},EntryItem:{anyOf:[{type:"array",items:{type:"string",minLength:1},minItems:1,uniqueItems:!0},{type:"string",minLength:1}]},EntryNormalized:{anyOf:[{$ref:"#/definitions/EntryDynamicNormalized"},{$ref:"#/definitions/EntryStaticNormalized"}]},EntryObject:{type:"object",additionalProperties:{anyOf:[{$ref:"#/definitions/EntryItem"},{$ref:"#/definitions/EntryDescription"}]}},EntryRuntime:{anyOf:[{enum:[!1]},{type:"string",minLength:1}]},EntryStatic:{anyOf:[{$ref:"#/definitions/EntryObject"},{$ref:"#/definitions/EntryUnnamed"}]},EntryStaticNormalized:{type:"object",additionalProperties:{oneOf:[{$ref:"#/definitions/EntryDescriptionNormalized"}]}},EntryUnnamed:{oneOf:[{$ref:"#/definitions/EntryItem"}]},Environment:{type:"object",additionalProperties:!1,properties:{arrowFunction:{type:"boolean"},asyncFunction:{type:"boolean"},bigIntLiteral:{type:"boolean"},const:{type:"boolean"},destructuring:{type:"boolean"},document:{type:"boolean"},dynamicImport:{type:"boolean"},dynamicImportInWorker:{type:"boolean"},forOf:{type:"boolean"},globalThis:{type:"boolean"},module:{type:"boolean"},nodePrefixForCoreModules:{type:"boolean"},optionalChaining:{type:"boolean"},templateLiteral:{type:"boolean"}}},Experiments:{type:"object",additionalProperties:!0,properties:{asyncWebAssembly:{type:"boolean"},backCompat:{type:"boolean"},buildHttp:{anyOf:[{$ref:"#/definitions/HttpUriAllowedUris"},{$ref:"#/definitions/HttpUriOptions"}]},cacheUnaffected:{type:"boolean"},css:{type:"boolean"},deferImport:{type:"boolean"},futureDefaults:{type:"boolean"},lazyCompilation:{anyOf:[{type:"boolean"},{$ref:"#/definitions/LazyCompilationOptions"}]},outputModule:{type:"boolean"},syncWebAssembly:{type:"boolean"}}},ExperimentsCommon:{type:"object",additionalProperties:!1,properties:{asyncWebAssembly:{type:"boolean"},backCompat:{type:"boolean"},cacheUnaffected:{type:"boolean"},futureDefaults:{type:"boolean"},outputModule:{type:"boolean"},syncWebAssembly:{type:"boolean"}}},ExperimentsNormalized:{type:"object",additionalProperties:!1,properties:{asyncWebAssembly:{type:"boolean"},backCompat:{type:"boolean"},buildHttp:{oneOf:[{$ref:"#/definitions/HttpUriOptions"}]},cacheUnaffected:{type:"boolean"},css:{type:"boolean"},deferImport:{type:"boolean"},futureDefaults:{type:"boolean"},lazyCompilation:{anyOf:[{enum:[!1]},{$ref:"#/definitions/LazyCompilationOptions"}]},outputModule:{type:"boolean"},syncWebAssembly:{type:"boolean"}}},Extends:{anyOf:[{type:"array",items:{$ref:"#/definitions/ExtendsItem"}},{$ref:"#/definitions/ExtendsItem"}]},ExtendsItem:{type:"string"},ExternalItem:{anyOf:[{instanceof:"RegExp"},{type:"string"},{type:"object",additionalProperties:{$ref:"#/definitions/ExternalItemValue"},properties:{byLayer:{anyOf:[{type:"object",additionalProperties:{$ref:"#/definitions/ExternalItem"}},{instanceof:"Function"}]}}},{$ref:"#/definitions/ExternalItemFunction"}]},ExternalItemFunction:{anyOf:[{$ref:"#/definitions/ExternalItemFunctionCallback"},{$ref:"#/definitions/ExternalItemFunctionPromise"}]},ExternalItemFunctionCallback:{instanceof:"Function"},ExternalItemFunctionPromise:{instanceof:"Function"},ExternalItemValue:{anyOf:[{type:"array",items:{type:"string",minLength:1}},{type:"boolean"},{type:"string"},{type:"object"}]},Externals:{anyOf:[{type:"array",items:{$ref:"#/definitions/ExternalItem"}},{$ref:"#/definitions/ExternalItem"}]},ExternalsPresets:{type:"object",additionalProperties:!1,properties:{electron:{type:"boolean"},electronMain:{type:"boolean"},electronPreload:{type:"boolean"},electronRenderer:{type:"boolean"},node:{type:"boolean"},nwjs:{type:"boolean"},web:{type:"boolean"},webAsync:{type:"boolean"}}},ExternalsType:{enum:["var","module","assign","this","window","self","global","commonjs","commonjs2","commonjs-module","commonjs-static","amd","amd-require","umd","umd2","jsonp","system","promise","import","module-import","script","node-commonjs"]},Falsy:{enum:[!1,0,"",null],undefinedAsNull:!0},FileCacheOptions:{type:"object",additionalProperties:!1,properties:{allowCollectingMemory:{type:"boolean"},buildDependencies:{type:"object",additionalProperties:{type:"array",items:{type:"string",minLength:1}}},cacheDirectory:{type:"string",absolutePath:!0},cacheLocation:{type:"string",absolutePath:!0},compression:{enum:[!1,"gzip","brotli"]},hashAlgorithm:{type:"string"},idleTimeout:{type:"number",minimum:0},idleTimeoutAfterLargeChanges:{type:"number",minimum:0},idleTimeoutForInitialStore:{type:"number",minimum:0},immutablePaths:{type:"array",items:{anyOf:[{instanceof:"RegExp"},{type:"string",absolutePath:!0,minLength:1}]}},managedPaths:{type:"array",items:{anyOf:[{instanceof:"RegExp"},{type:"string",absolutePath:!0,minLength:1}]}},maxAge:{type:"number",minimum:0},maxMemoryGenerations:{type:"number",minimum:0},memoryCacheUnaffected:{type:"boolean"},name:{type:"string"},profile:{type:"boolean"},readonly:{type:"boolean"},store:{enum:["pack"]},type:{enum:["filesystem"]},version:{type:"string"}},required:["type"]},Filename:{oneOf:[{$ref:"#/definitions/FilenameTemplate"}]},FilenameTemplate:{anyOf:[{type:"string",absolutePath:!1,minLength:1},{instanceof:"Function"}]},FilterItemTypes:{anyOf:[{instanceof:"RegExp"},{type:"string",absolutePath:!1},{instanceof:"Function"}]},FilterTypes:{anyOf:[{type:"array",items:{oneOf:[{$ref:"#/definitions/FilterItemTypes"}]}},{$ref:"#/definitions/FilterItemTypes"}]},GeneratorOptionsByModuleType:{type:"object",additionalProperties:{type:"object",additionalProperties:!0},properties:{asset:{$ref:"#/definitions/AssetGeneratorOptions"},"asset/bytes":{$ref:"#/definitions/EmptyGeneratorOptions"},"asset/inline":{$ref:"#/definitions/AssetInlineGeneratorOptions"},"asset/resource":{$ref:"#/definitions/AssetResourceGeneratorOptions"},"asset/source":{$ref:"#/definitions/EmptyGeneratorOptions"},css:{$ref:"#/definitions/CssGeneratorOptions"},"css/auto":{$ref:"#/definitions/CssAutoGeneratorOptions"},"css/global":{$ref:"#/definitions/CssGlobalGeneratorOptions"},"css/module":{$ref:"#/definitions/CssModuleGeneratorOptions"},javascript:{$ref:"#/definitions/EmptyGeneratorOptions"},"javascript/auto":{$ref:"#/definitions/EmptyGeneratorOptions"},"javascript/dynamic":{$ref:"#/definitions/EmptyGeneratorOptions"},"javascript/esm":{$ref:"#/definitions/EmptyGeneratorOptions"},json:{$ref:"#/definitions/JsonGeneratorOptions"}}},GlobalObject:{type:"string",minLength:1},HashDigest:{type:"string"},HashDigestLength:{type:"number",minimum:1},HashFunction:{anyOf:[{type:"string",minLength:1},{instanceof:"Function"}]},HashSalt:{type:"string",minLength:1},HotUpdateChunkFilename:{type:"string",absolutePath:!1},HotUpdateGlobal:{type:"string"},HotUpdateMainFilename:{type:"string",absolutePath:!1},HttpUriAllowedUris:{oneOf:[{$ref:"#/definitions/HttpUriOptionsAllowedUris"}]},HttpUriOptions:{type:"object",additionalProperties:!1,properties:{allowedUris:{$ref:"#/definitions/HttpUriOptionsAllowedUris"},cacheLocation:{anyOf:[{enum:[!1]},{type:"string",absolutePath:!0}]},frozen:{type:"boolean"},lockfileLocation:{type:"string",absolutePath:!0},proxy:{type:"string"},upgrade:{type:"boolean"}},required:["allowedUris"]},HttpUriOptionsAllowedUris:{type:"array",items:{anyOf:[{instanceof:"RegExp"},{type:"string",pattern:"^https?://"},{instanceof:"Function"}]}},IgnoreWarnings:{type:"array",items:{anyOf:[{instanceof:"RegExp"},{type:"object",additionalProperties:!1,properties:{file:{instanceof:"RegExp"},message:{instanceof:"RegExp"},module:{instanceof:"RegExp"}}},{instanceof:"Function"}]}},IgnoreWarningsNormalized:{type:"array",items:{instanceof:"Function"}},Iife:{type:"boolean"},ImportFunctionName:{type:"string"},ImportMetaName:{type:"string"},InfrastructureLogging:{type:"object",additionalProperties:!1,properties:{appendOnly:{type:"boolean"},colors:{type:"boolean"},console:{},debug:{anyOf:[{type:"boolean"},{$ref:"#/definitions/FilterTypes"}]},level:{enum:["none","error","warn","info","log","verbose"]},stream:{}}},JavascriptParserOptions:{type:"object",additionalProperties:!0,properties:{amd:{$ref:"#/definitions/Amd"},browserify:{type:"boolean"},commonjs:{type:"boolean"},commonjsMagicComments:{type:"boolean"},createRequire:{anyOf:[{type:"boolean"},{type:"string"}]},deferImport:{type:"boolean"},dynamicImportFetchPriority:{enum:["low","high","auto",!1]},dynamicImportMode:{enum:["eager","weak","lazy","lazy-once"]},dynamicImportPrefetch:{anyOf:[{type:"number"},{type:"boolean"}]},dynamicImportPreload:{anyOf:[{type:"number"},{type:"boolean"}]},dynamicUrl:{type:"boolean"},exportsPresence:{enum:["error","warn","auto",!1]},exprContextCritical:{type:"boolean"},exprContextRecursive:{type:"boolean"},exprContextRegExp:{anyOf:[{instanceof:"RegExp"},{type:"boolean"}]},exprContextRequest:{type:"string"},harmony:{type:"boolean"},import:{type:"boolean"},importExportsPresence:{enum:["error","warn","auto",!1]},importMeta:{type:"boolean"},importMetaContext:{type:"boolean"},node:{$ref:"#/definitions/Node"},overrideStrict:{enum:["strict","non-strict"]},reexportExportsPresence:{enum:["error","warn","auto",!1]},requireContext:{type:"boolean"},requireEnsure:{type:"boolean"},requireInclude:{type:"boolean"},requireJs:{type:"boolean"},strictExportPresence:{type:"boolean"},strictThisContextOnImports:{type:"boolean"},system:{type:"boolean"},unknownContextCritical:{type:"boolean"},unknownContextRecursive:{type:"boolean"},unknownContextRegExp:{anyOf:[{instanceof:"RegExp"},{type:"boolean"}]},unknownContextRequest:{type:"string"},url:{anyOf:[{enum:["relative"]},{type:"boolean"}]},worker:{anyOf:[{type:"array",items:{type:"string",minLength:1}},{type:"boolean"}]},wrappedContextCritical:{type:"boolean"},wrappedContextRecursive:{type:"boolean"},wrappedContextRegExp:{instanceof:"RegExp"}}},JsonGeneratorOptions:{type:"object",additionalProperties:!1,properties:{JSONParse:{type:"boolean"}}},JsonParserOptions:{type:"object",additionalProperties:!1,properties:{exportsDepth:{type:"number"},parse:{instanceof:"Function"}}},Layer:{anyOf:[{enum:[null]},{type:"string",minLength:1}]},LazyCompilationDefaultBackendOptions:{type:"object",additionalProperties:!1,properties:{client:{type:"string"},listen:{anyOf:[{type:"number"},{type:"object",additionalProperties:!0,properties:{host:{type:"string"},port:{type:"number"}}},{instanceof:"Function"}]},protocol:{enum:["http","https"]},server:{anyOf:[{type:"object",additionalProperties:!0,properties:{}},{instanceof:"Function"}]}}},LazyCompilationOptions:{type:"object",additionalProperties:!1,properties:{backend:{anyOf:[{instanceof:"Function"},{$ref:"#/definitions/LazyCompilationDefaultBackendOptions"}]},entries:{type:"boolean"},imports:{type:"boolean"},test:{anyOf:[{instanceof:"RegExp"},{type:"string"},{instanceof:"Function"}]}}},Library:{anyOf:[{$ref:"#/definitions/LibraryName"},{$ref:"#/definitions/LibraryOptions"}]},LibraryCustomUmdCommentObject:{type:"object",additionalProperties:!1,properties:{amd:{type:"string"},commonjs:{type:"string"},commonjs2:{type:"string"},root:{type:"string"}}},LibraryCustomUmdObject:{type:"object",additionalProperties:!1,properties:{amd:{type:"string",minLength:1},commonjs:{type:"string",minLength:1},root:{anyOf:[{type:"array",items:{type:"string",minLength:1}},{type:"string",minLength:1}]}}},LibraryExport:{anyOf:[{type:"array",items:{type:"string",minLength:1}},{type:"string",minLength:1}]},LibraryName:{anyOf:[{type:"array",items:{type:"string",minLength:1},minItems:1},{type:"string",minLength:1},{$ref:"#/definitions/LibraryCustomUmdObject"}]},LibraryOptions:{type:"object",additionalProperties:!1,properties:{amdContainer:{$ref:"#/definitions/AmdContainer"},auxiliaryComment:{$ref:"#/definitions/AuxiliaryComment"},export:{$ref:"#/definitions/LibraryExport"},name:{$ref:"#/definitions/LibraryName"},type:{$ref:"#/definitions/LibraryType"},umdNamedDefine:{$ref:"#/definitions/UmdNamedDefine"}},required:["type"]},LibraryType:{anyOf:[{enum:["var","module","assign","assign-properties","this","window","self","global","commonjs","commonjs2","commonjs-module","commonjs-static","amd","amd-require","umd","umd2","jsonp","system"]},{type:"string"}]},Loader:{type:"object"},MemoryCacheOptions:{type:"object",additionalProperties:!1,properties:{cacheUnaffected:{type:"boolean"},maxGenerations:{type:"number",minimum:1},type:{enum:["memory"]}},required:["type"]},Mode:{enum:["development","production","none"]},ModuleFilterItemTypes:{anyOf:[{instanceof:"RegExp"},{type:"string",absolutePath:!1},{instanceof:"Function"}]},ModuleFilterTypes:{anyOf:[{type:"array",items:{oneOf:[{$ref:"#/definitions/ModuleFilterItemTypes"}]}},{$ref:"#/definitions/ModuleFilterItemTypes"}]},ModuleOptions:{type:"object",additionalProperties:!1,properties:{defaultRules:{oneOf:[{$ref:"#/definitions/RuleSetRules"}]},exprContextCritical:{type:"boolean"},exprContextRecursive:{type:"boolean"},exprContextRegExp:{anyOf:[{instanceof:"RegExp"},{type:"boolean"}]},exprContextRequest:{type:"string"},generator:{$ref:"#/definitions/GeneratorOptionsByModuleType"},noParse:{$ref:"#/definitions/NoParse"},parser:{$ref:"#/definitions/ParserOptionsByModuleType"},rules:{oneOf:[{$ref:"#/definitions/RuleSetRules"}]},strictExportPresence:{type:"boolean"},strictThisContextOnImports:{type:"boolean"},unknownContextCritical:{type:"boolean"},unknownContextRecursive:{type:"boolean"},unknownContextRegExp:{anyOf:[{instanceof:"RegExp"},{type:"boolean"}]},unknownContextRequest:{type:"string"},unsafeCache:{anyOf:[{type:"boolean"},{instanceof:"Function"}]},wrappedContextCritical:{type:"boolean"},wrappedContextRecursive:{type:"boolean"},wrappedContextRegExp:{instanceof:"RegExp"}}},ModuleOptionsNormalized:{type:"object",additionalProperties:!1,properties:{defaultRules:{oneOf:[{$ref:"#/definitions/RuleSetRules"}]},generator:{$ref:"#/definitions/GeneratorOptionsByModuleType"},noParse:{$ref:"#/definitions/NoParse"},parser:{$ref:"#/definitions/ParserOptionsByModuleType"},rules:{oneOf:[{$ref:"#/definitions/RuleSetRules"}]},unsafeCache:{anyOf:[{type:"boolean"},{instanceof:"Function"}]}},required:["defaultRules","generator","parser","rules"]},Name:{type:"string"},NoParse:{anyOf:[{type:"array",items:{anyOf:[{instanceof:"RegExp"},{type:"string",absolutePath:!0},{instanceof:"Function"}]},minItems:1},{instanceof:"RegExp"},{type:"string",absolutePath:!0},{instanceof:"Function"}]},Node:{anyOf:[{enum:[!1]},{$ref:"#/definitions/NodeOptions"}]},NodeOptions:{type:"object",additionalProperties:!1,properties:{__dirname:{enum:[!1,!0,"warn-mock","mock","node-module","eval-only"]},__filename:{enum:[!1,!0,"warn-mock","mock","node-module","eval-only"]},global:{enum:[!1,!0,"warn"]}}},Optimization:{type:"object",additionalProperties:!1,properties:{avoidEntryIife:{type:"boolean"},checkWasmTypes:{type:"boolean"},chunkIds:{enum:["natural","named","deterministic","size","total-size",!1]},concatenateModules:{type:"boolean"},emitOnErrors:{type:"boolean"},flagIncludedChunks:{type:"boolean"},innerGraph:{type:"boolean"},mangleExports:{anyOf:[{enum:["size","deterministic"]},{type:"boolean"}]},mangleWasmImports:{type:"boolean"},mergeDuplicateChunks:{type:"boolean"},minimize:{type:"boolean"},minimizer:{type:"array",items:{anyOf:[{enum:["..."]},{$ref:"#/definitions/Falsy"},{$ref:"#/definitions/WebpackPluginInstance"},{$ref:"#/definitions/WebpackPluginFunction"}]}},moduleIds:{enum:["natural","named","hashed","deterministic","size",!1]},noEmitOnErrors:{type:"boolean"},nodeEnv:{anyOf:[{enum:[!1]},{type:"string"}]},portableRecords:{type:"boolean"},providedExports:{type:"boolean"},realContentHash:{type:"boolean"},removeAvailableModules:{type:"boolean"},removeEmptyChunks:{type:"boolean"},runtimeChunk:{$ref:"#/definitions/OptimizationRuntimeChunk"},sideEffects:{anyOf:[{enum:["flag"]},{type:"boolean"}]},splitChunks:{anyOf:[{enum:[!1]},{$ref:"#/definitions/OptimizationSplitChunksOptions"}]},usedExports:{anyOf:[{enum:["global"]},{type:"boolean"}]}}},OptimizationNormalized:{type:"object",additionalProperties:!1,properties:{avoidEntryIife:{type:"boolean"},checkWasmTypes:{type:"boolean"},chunkIds:{enum:["natural","named","deterministic","size","total-size",!1]},concatenateModules:{type:"boolean"},emitOnErrors:{type:"boolean"},flagIncludedChunks:{type:"boolean"},innerGraph:{type:"boolean"},mangleExports:{anyOf:[{enum:["size","deterministic"]},{type:"boolean"}]},mangleWasmImports:{type:"boolean"},mergeDuplicateChunks:{type:"boolean"},minimize:{type:"boolean"},minimizer:{type:"array",items:{anyOf:[{enum:["..."]},{$ref:"#/definitions/WebpackPluginInstance"},{$ref:"#/definitions/WebpackPluginFunction"}]}},moduleIds:{enum:["natural","named","hashed","deterministic","size",!1]},noEmitOnErrors:{type:"boolean"},nodeEnv:{anyOf:[{enum:[!1]},{type:"string"}]},portableRecords:{type:"boolean"},providedExports:{type:"boolean"},realContentHash:{type:"boolean"},removeAvailableModules:{type:"boolean"},removeEmptyChunks:{type:"boolean"},runtimeChunk:{$ref:"#/definitions/OptimizationRuntimeChunkNormalized"},sideEffects:{anyOf:[{enum:["flag"]},{type:"boolean"}]},splitChunks:{anyOf:[{enum:[!1]},{$ref:"#/definitions/OptimizationSplitChunksOptions"}]},usedExports:{anyOf:[{enum:["global"]},{type:"boolean"}]}}},OptimizationRuntimeChunk:{anyOf:[{enum:["single","multiple"]},{type:"boolean"},{type:"object",additionalProperties:!1,properties:{name:{anyOf:[{type:"string"},{instanceof:"Function"}]}}}]},OptimizationRuntimeChunkNormalized:{anyOf:[{enum:[!1]},{type:"object",additionalProperties:!1,properties:{name:{instanceof:"Function"}}}]},OptimizationSplitChunksCacheGroup:{type:"object",additionalProperties:!1,properties:{automaticNameDelimiter:{type:"string",minLength:1},chunks:{anyOf:[{enum:["initial","async","all"]},{instanceof:"RegExp"},{instanceof:"Function"}]},enforce:{type:"boolean"},enforceSizeThreshold:{oneOf:[{$ref:"#/definitions/OptimizationSplitChunksSizes"}]},filename:{anyOf:[{type:"string",absolutePath:!1,minLength:1},{instanceof:"Function"}]},idHint:{type:"string"},layer:{anyOf:[{instanceof:"RegExp"},{type:"string"},{instanceof:"Function"}]},maxAsyncRequests:{type:"number",minimum:1},maxAsyncSize:{oneOf:[{$ref:"#/definitions/OptimizationSplitChunksSizes"}]},maxInitialRequests:{type:"number",minimum:1},maxInitialSize:{oneOf:[{$ref:"#/definitions/OptimizationSplitChunksSizes"}]},maxSize:{oneOf:[{$ref:"#/definitions/OptimizationSplitChunksSizes"}]},minChunks:{type:"number",minimum:1},minRemainingSize:{oneOf:[{$ref:"#/definitions/OptimizationSplitChunksSizes"}]},minSize:{oneOf:[{$ref:"#/definitions/OptimizationSplitChunksSizes"}]},minSizeReduction:{oneOf:[{$ref:"#/definitions/OptimizationSplitChunksSizes"}]},name:{anyOf:[{enum:[!1]},{type:"string"},{instanceof:"Function"}]},priority:{type:"number"},reuseExistingChunk:{type:"boolean"},test:{anyOf:[{instanceof:"RegExp"},{type:"string"},{instanceof:"Function"}]},type:{anyOf:[{instanceof:"RegExp"},{type:"string"},{instanceof:"Function"}]},usedExports:{type:"boolean"}}},OptimizationSplitChunksGetCacheGroups:{instanceof:"Function"},OptimizationSplitChunksOptions:{type:"object",additionalProperties:!1,properties:{automaticNameDelimiter:{type:"string",minLength:1},cacheGroups:{type:"object",additionalProperties:{anyOf:[{enum:[!1]},{instanceof:"RegExp"},{type:"string"},{$ref:"#/definitions/OptimizationSplitChunksGetCacheGroups"},{$ref:"#/definitions/OptimizationSplitChunksCacheGroup"}]},not:{type:"object",additionalProperties:!0,properties:{test:{anyOf:[{instanceof:"RegExp"},{type:"string"},{$ref:"#/definitions/OptimizationSplitChunksGetCacheGroups"}]}},required:["test"]}},chunks:{anyOf:[{enum:["initial","async","all"]},{instanceof:"RegExp"},{instanceof:"Function"}]},defaultSizeTypes:{type:"array",items:{type:"string"},minItems:1},enforceSizeThreshold:{oneOf:[{$ref:"#/definitions/OptimizationSplitChunksSizes"}]},fallbackCacheGroup:{type:"object",additionalProperties:!1,properties:{automaticNameDelimiter:{type:"string",minLength:1},chunks:{anyOf:[{enum:["initial","async","all"]},{instanceof:"RegExp"},{instanceof:"Function"}]},maxAsyncSize:{oneOf:[{$ref:"#/definitions/OptimizationSplitChunksSizes"}]},maxInitialSize:{oneOf:[{$ref:"#/definitions/OptimizationSplitChunksSizes"}]},maxSize:{oneOf:[{$ref:"#/definitions/OptimizationSplitChunksSizes"}]},minSize:{oneOf:[{$ref:"#/definitions/OptimizationSplitChunksSizes"}]},minSizeReduction:{oneOf:[{$ref:"#/definitions/OptimizationSplitChunksSizes"}]}}},filename:{anyOf:[{type:"string",absolutePath:!1,minLength:1},{instanceof:"Function"}]},hidePathInfo:{type:"boolean"},maxAsyncRequests:{type:"number",minimum:1},maxAsyncSize:{oneOf:[{$ref:"#/definitions/OptimizationSplitChunksSizes"}]},maxInitialRequests:{type:"number",minimum:1},maxInitialSize:{oneOf:[{$ref:"#/definitions/OptimizationSplitChunksSizes"}]},maxSize:{oneOf:[{$ref:"#/definitions/OptimizationSplitChunksSizes"}]},minChunks:{type:"number",minimum:1},minRemainingSize:{oneOf:[{$ref:"#/definitions/OptimizationSplitChunksSizes"}]},minSize:{oneOf:[{$ref:"#/definitions/OptimizationSplitChunksSizes"}]},minSizeReduction:{oneOf:[{$ref:"#/definitions/OptimizationSplitChunksSizes"}]},name:{anyOf:[{enum:[!1]},{type:"string"},{instanceof:"Function"}]},usedExports:{type:"boolean"}}},OptimizationSplitChunksSizes:{anyOf:[{type:"number",minimum:0},{type:"object",additionalProperties:{type:"number"}}]},Output:{type:"object",additionalProperties:!1,properties:{amdContainer:{oneOf:[{$ref:"#/definitions/AmdContainer"}]},assetModuleFilename:{$ref:"#/definitions/AssetModuleFilename"},asyncChunks:{type:"boolean"},auxiliaryComment:{oneOf:[{$ref:"#/definitions/AuxiliaryComment"}]},charset:{$ref:"#/definitions/Charset"},chunkFilename:{$ref:"#/definitions/ChunkFilename"},chunkFormat:{$ref:"#/definitions/ChunkFormat"},chunkLoadTimeout:{$ref:"#/definitions/ChunkLoadTimeout"},chunkLoading:{$ref:"#/definitions/ChunkLoading"},chunkLoadingGlobal:{$ref:"#/definitions/ChunkLoadingGlobal"},clean:{$ref:"#/definitions/Clean"},compareBeforeEmit:{$ref:"#/definitions/CompareBeforeEmit"},crossOriginLoading:{$ref:"#/definitions/CrossOriginLoading"},cssChunkFilename:{$ref:"#/definitions/CssChunkFilename"},cssFilename:{$ref:"#/definitions/CssFilename"},devtoolFallbackModuleFilenameTemplate:{$ref:"#/definitions/DevtoolFallbackModuleFilenameTemplate"},devtoolModuleFilenameTemplate:{$ref:"#/definitions/DevtoolModuleFilenameTemplate"},devtoolNamespace:{$ref:"#/definitions/DevtoolNamespace"},enabledChunkLoadingTypes:{$ref:"#/definitions/EnabledChunkLoadingTypes"},enabledLibraryTypes:{$ref:"#/definitions/EnabledLibraryTypes"},enabledWasmLoadingTypes:{$ref:"#/definitions/EnabledWasmLoadingTypes"},environment:{$ref:"#/definitions/Environment"},filename:{$ref:"#/definitions/Filename"},globalObject:{$ref:"#/definitions/GlobalObject"},hashDigest:{$ref:"#/definitions/HashDigest"},hashDigestLength:{$ref:"#/definitions/HashDigestLength"},hashFunction:{$ref:"#/definitions/HashFunction"},hashSalt:{$ref:"#/definitions/HashSalt"},hotUpdateChunkFilename:{$ref:"#/definitions/HotUpdateChunkFilename"},hotUpdateGlobal:{$ref:"#/definitions/HotUpdateGlobal"},hotUpdateMainFilename:{$ref:"#/definitions/HotUpdateMainFilename"},ignoreBrowserWarnings:{type:"boolean"},iife:{$ref:"#/definitions/Iife"},importFunctionName:{$ref:"#/definitions/ImportFunctionName"},importMetaName:{$ref:"#/definitions/ImportMetaName"},library:{$ref:"#/definitions/Library"},libraryExport:{oneOf:[{$ref:"#/definitions/LibraryExport"}]},libraryTarget:{oneOf:[{$ref:"#/definitions/LibraryType"}]},module:{$ref:"#/definitions/OutputModule"},path:{$ref:"#/definitions/Path"},pathinfo:{$ref:"#/definitions/Pathinfo"},publicPath:{$ref:"#/definitions/PublicPath"},scriptType:{$ref:"#/definitions/ScriptType"},sourceMapFilename:{$ref:"#/definitions/SourceMapFilename"},sourcePrefix:{$ref:"#/definitions/SourcePrefix"},strictModuleErrorHandling:{$ref:"#/definitions/StrictModuleErrorHandling"},strictModuleExceptionHandling:{$ref:"#/definitions/StrictModuleExceptionHandling"},trustedTypes:{anyOf:[{enum:[!0]},{type:"string",minLength:1},{$ref:"#/definitions/TrustedTypes"}]},umdNamedDefine:{oneOf:[{$ref:"#/definitions/UmdNamedDefine"}]},uniqueName:{$ref:"#/definitions/UniqueName"},wasmLoading:{$ref:"#/definitions/WasmLoading"},webassemblyModuleFilename:{$ref:"#/definitions/WebassemblyModuleFilename"},workerChunkLoading:{$ref:"#/definitions/ChunkLoading"},workerPublicPath:{$ref:"#/definitions/WorkerPublicPath"},workerWasmLoading:{$ref:"#/definitions/WasmLoading"}}},OutputModule:{type:"boolean"},OutputNormalized:{type:"object",additionalProperties:!1,properties:{assetModuleFilename:{$ref:"#/definitions/AssetModuleFilename"},asyncChunks:{type:"boolean"},charset:{$ref:"#/definitions/Charset"},chunkFilename:{$ref:"#/definitions/ChunkFilename"},chunkFormat:{$ref:"#/definitions/ChunkFormat"},chunkLoadTimeout:{$ref:"#/definitions/ChunkLoadTimeout"},chunkLoading:{$ref:"#/definitions/ChunkLoading"},chunkLoadingGlobal:{$ref:"#/definitions/ChunkLoadingGlobal"},clean:{$ref:"#/definitions/Clean"},compareBeforeEmit:{$ref:"#/definitions/CompareBeforeEmit"},crossOriginLoading:{$ref:"#/definitions/CrossOriginLoading"},cssChunkFilename:{$ref:"#/definitions/CssChunkFilename"},cssFilename:{$ref:"#/definitions/CssFilename"},devtoolFallbackModuleFilenameTemplate:{$ref:"#/definitions/DevtoolFallbackModuleFilenameTemplate"},devtoolModuleFilenameTemplate:{$ref:"#/definitions/DevtoolModuleFilenameTemplate"},devtoolNamespace:{$ref:"#/definitions/DevtoolNamespace"},enabledChunkLoadingTypes:{$ref:"#/definitions/EnabledChunkLoadingTypes"},enabledLibraryTypes:{$ref:"#/definitions/EnabledLibraryTypes"},enabledWasmLoadingTypes:{$ref:"#/definitions/EnabledWasmLoadingTypes"},environment:{$ref:"#/definitions/Environment"},filename:{$ref:"#/definitions/Filename"},globalObject:{$ref:"#/definitions/GlobalObject"},hashDigest:{$ref:"#/definitions/HashDigest"},hashDigestLength:{$ref:"#/definitions/HashDigestLength"},hashFunction:{$ref:"#/definitions/HashFunction"},hashSalt:{$ref:"#/definitions/HashSalt"},hotUpdateChunkFilename:{$ref:"#/definitions/HotUpdateChunkFilename"},hotUpdateGlobal:{$ref:"#/definitions/HotUpdateGlobal"},hotUpdateMainFilename:{$ref:"#/definitions/HotUpdateMainFilename"},ignoreBrowserWarnings:{type:"boolean"},iife:{$ref:"#/definitions/Iife"},importFunctionName:{$ref:"#/definitions/ImportFunctionName"},importMetaName:{$ref:"#/definitions/ImportMetaName"},library:{$ref:"#/definitions/LibraryOptions"},module:{$ref:"#/definitions/OutputModule"},path:{$ref:"#/definitions/Path"},pathinfo:{$ref:"#/definitions/Pathinfo"},publicPath:{$ref:"#/definitions/PublicPath"},scriptType:{$ref:"#/definitions/ScriptType"},sourceMapFilename:{$ref:"#/definitions/SourceMapFilename"},sourcePrefix:{$ref:"#/definitions/SourcePrefix"},strictModuleErrorHandling:{$ref:"#/definitions/StrictModuleErrorHandling"},strictModuleExceptionHandling:{$ref:"#/definitions/StrictModuleExceptionHandling"},trustedTypes:{$ref:"#/definitions/TrustedTypes"},uniqueName:{$ref:"#/definitions/UniqueName"},wasmLoading:{$ref:"#/definitions/WasmLoading"},webassemblyModuleFilename:{$ref:"#/definitions/WebassemblyModuleFilename"},workerChunkLoading:{$ref:"#/definitions/ChunkLoading"},workerPublicPath:{$ref:"#/definitions/WorkerPublicPath"},workerWasmLoading:{$ref:"#/definitions/WasmLoading"}},required:["environment","enabledChunkLoadingTypes","enabledLibraryTypes","enabledWasmLoadingTypes"]},Parallelism:{type:"number",minimum:1},ParserOptionsByModuleType:{type:"object",additionalProperties:{type:"object",additionalProperties:!0},properties:{asset:{$ref:"#/definitions/AssetParserOptions"},"asset/bytes":{$ref:"#/definitions/EmptyParserOptions"},"asset/inline":{$ref:"#/definitions/EmptyParserOptions"},"asset/resource":{$ref:"#/definitions/EmptyParserOptions"},"asset/source":{$ref:"#/definitions/EmptyParserOptions"},css:{$ref:"#/definitions/CssParserOptions"},"css/auto":{$ref:"#/definitions/CssAutoParserOptions"},"css/global":{$ref:"#/definitions/CssGlobalParserOptions"},"css/module":{$ref:"#/definitions/CssModuleParserOptions"},javascript:{$ref:"#/definitions/JavascriptParserOptions"},"javascript/auto":{$ref:"#/definitions/JavascriptParserOptions"},"javascript/dynamic":{$ref:"#/definitions/JavascriptParserOptions"},"javascript/esm":{$ref:"#/definitions/JavascriptParserOptions"},json:{$ref:"#/definitions/JsonParserOptions"}}},Path:{type:"string",absolutePath:!0},Pathinfo:{anyOf:[{enum:["verbose"]},{type:"boolean"}]},Performance:{anyOf:[{enum:[!1]},{$ref:"#/definitions/PerformanceOptions"}]},PerformanceOptions:{type:"object",additionalProperties:!1,properties:{assetFilter:{instanceof:"Function"},hints:{enum:[!1,"warning","error"]},maxAssetSize:{type:"number"},maxEntrypointSize:{type:"number"}}},Plugins:{type:"array",items:{anyOf:[{$ref:"#/definitions/Falsy"},{$ref:"#/definitions/WebpackPluginInstance"},{$ref:"#/definitions/WebpackPluginFunction"}]}},PluginsNormalized:{type:"array",items:{anyOf:[{$ref:"#/definitions/WebpackPluginInstance"},{$ref:"#/definitions/WebpackPluginFunction"}]}},Profile:{type:"boolean"},PublicPath:{anyOf:[{enum:["auto"]},{$ref:"#/definitions/RawPublicPath"}]},RawPublicPath:{anyOf:[{type:"string"},{instanceof:"Function"}]},RecordsInputPath:{anyOf:[{enum:[!1]},{type:"string",absolutePath:!0}]},RecordsOutputPath:{anyOf:[{enum:[!1]},{type:"string",absolutePath:!0}]},RecordsPath:{anyOf:[{enum:[!1]},{type:"string",absolutePath:!0}]},Resolve:{oneOf:[{$ref:"#/definitions/ResolveOptions"}]},ResolveAlias:{anyOf:[{type:"array",items:{type:"object",additionalProperties:!1,properties:{alias:{anyOf:[{type:"array",items:{type:"string",minLength:1}},{enum:[!1]},{type:"string",minLength:1}]},name:{type:"string"},onlyModule:{type:"boolean"}},required:["alias","name"]}},{type:"object",additionalProperties:{anyOf:[{type:"array",items:{type:"string",minLength:1}},{enum:[!1]},{type:"string",minLength:1}]}}]},ResolveLoader:{oneOf:[{$ref:"#/definitions/ResolveOptions"}]},ResolveOptions:{type:"object",additionalProperties:!1,properties:{alias:{$ref:"#/definitions/ResolveAlias"},aliasFields:{type:"array",items:{anyOf:[{type:"array",items:{type:"string",minLength:1}},{type:"string",minLength:1}]}},byDependency:{type:"object",additionalProperties:{oneOf:[{$ref:"#/definitions/ResolveOptions"}]}},cache:{type:"boolean"},cachePredicate:{instanceof:"Function"},cacheWithContext:{type:"boolean"},conditionNames:{type:"array",items:{type:"string"}},descriptionFiles:{type:"array",items:{type:"string",minLength:1}},enforceExtension:{type:"boolean"},exportsFields:{type:"array",items:{type:"string"}},extensionAlias:{type:"object",additionalProperties:{anyOf:[{type:"array",items:{type:"string",minLength:1}},{type:"string",minLength:1}]}},extensions:{type:"array",items:{type:"string"}},fallback:{oneOf:[{$ref:"#/definitions/ResolveAlias"}]},fileSystem:{},fullySpecified:{type:"boolean"},importsFields:{type:"array",items:{type:"string"}},mainFields:{type:"array",items:{anyOf:[{type:"array",items:{type:"string",minLength:1}},{type:"string",minLength:1}]}},mainFiles:{type:"array",items:{type:"string",minLength:1}},modules:{type:"array",items:{type:"string",minLength:1}},plugins:{type:"array",items:{anyOf:[{enum:["..."]},{$ref:"#/definitions/Falsy"},{$ref:"#/definitions/ResolvePluginInstance"}]}},preferAbsolute:{type:"boolean"},preferRelative:{type:"boolean"},resolver:{},restrictions:{type:"array",items:{anyOf:[{instanceof:"RegExp"},{type:"string",absolutePath:!0,minLength:1}]}},roots:{type:"array",items:{type:"string"}},symlinks:{type:"boolean"},unsafeCache:{anyOf:[{type:"boolean"},{type:"object",additionalProperties:!0}]},useSyncFileSystemCalls:{type:"boolean"}}},ResolvePluginInstance:{anyOf:[{type:"object",additionalProperties:!0,properties:{apply:{instanceof:"Function"}},required:["apply"]},{instanceof:"Function"}]},RuleSetCondition:{anyOf:[{instanceof:"RegExp"},{type:"string"},{instanceof:"Function"},{$ref:"#/definitions/RuleSetLogicalConditions"},{$ref:"#/definitions/RuleSetConditions"}]},RuleSetConditionAbsolute:{anyOf:[{instanceof:"RegExp"},{type:"string",absolutePath:!0},{instanceof:"Function"},{$ref:"#/definitions/RuleSetLogicalConditionsAbsolute"},{$ref:"#/definitions/RuleSetConditionsAbsolute"}]},RuleSetConditionOrConditions:{anyOf:[{$ref:"#/definitions/RuleSetCondition"},{$ref:"#/definitions/RuleSetConditions"}]},RuleSetConditionOrConditionsAbsolute:{anyOf:[{$ref:"#/definitions/RuleSetConditionAbsolute"},{$ref:"#/definitions/RuleSetConditionsAbsolute"}]},RuleSetConditions:{type:"array",items:{oneOf:[{$ref:"#/definitions/RuleSetCondition"}]}},RuleSetConditionsAbsolute:{type:"array",items:{oneOf:[{$ref:"#/definitions/RuleSetConditionAbsolute"}]}},RuleSetLoader:{type:"string",minLength:1},RuleSetLoaderOptions:{anyOf:[{type:"string"},{type:"object"}]},RuleSetLogicalConditions:{type:"object",additionalProperties:!1,properties:{and:{oneOf:[{$ref:"#/definitions/RuleSetConditions"}]},not:{oneOf:[{$ref:"#/definitions/RuleSetCondition"}]},or:{oneOf:[{$ref:"#/definitions/RuleSetConditions"}]}}},RuleSetLogicalConditionsAbsolute:{type:"object",additionalProperties:!1,properties:{and:{oneOf:[{$ref:"#/definitions/RuleSetConditionsAbsolute"}]},not:{oneOf:[{$ref:"#/definitions/RuleSetConditionAbsolute"}]},or:{oneOf:[{$ref:"#/definitions/RuleSetConditionsAbsolute"}]}}},RuleSetRule:{type:"object",additionalProperties:!1,properties:{assert:{type:"object",additionalProperties:{$ref:"#/definitions/RuleSetConditionOrConditions"}},compiler:{oneOf:[{$ref:"#/definitions/RuleSetConditionOrConditions"}]},dependency:{oneOf:[{$ref:"#/definitions/RuleSetConditionOrConditions"}]},descriptionData:{type:"object",additionalProperties:{$ref:"#/definitions/RuleSetConditionOrConditions"}},enforce:{enum:["pre","post"]},exclude:{oneOf:[{$ref:"#/definitions/RuleSetConditionOrConditionsAbsolute"}]},extractSourceMap:{type:"boolean"},generator:{type:"object"},include:{oneOf:[{$ref:"#/definitions/RuleSetConditionOrConditionsAbsolute"}]},issuer:{oneOf:[{$ref:"#/definitions/RuleSetConditionOrConditionsAbsolute"}]},issuerLayer:{oneOf:[{$ref:"#/definitions/RuleSetConditionOrConditions"}]},layer:{type:"string"},loader:{oneOf:[{$ref:"#/definitions/RuleSetLoader"}]},mimetype:{oneOf:[{$ref:"#/definitions/RuleSetConditionOrConditions"}]},oneOf:{type:"array",items:{anyOf:[{$ref:"#/definitions/Falsy"},{$ref:"#/definitions/RuleSetRule"}]}},options:{oneOf:[{$ref:"#/definitions/RuleSetLoaderOptions"}]},parser:{type:"object",additionalProperties:!0},realResource:{oneOf:[{$ref:"#/definitions/RuleSetConditionOrConditionsAbsolute"}]},resolve:{type:"object",oneOf:[{$ref:"#/definitions/ResolveOptions"}]},resource:{oneOf:[{$ref:"#/definitions/RuleSetConditionOrConditionsAbsolute"}]},resourceFragment:{oneOf:[{$ref:"#/definitions/RuleSetConditionOrConditions"}]},resourceQuery:{oneOf:[{$ref:"#/definitions/RuleSetConditionOrConditions"}]},rules:{type:"array",items:{anyOf:[{$ref:"#/definitions/Falsy"},{$ref:"#/definitions/RuleSetRule"}]}},scheme:{oneOf:[{$ref:"#/definitions/RuleSetConditionOrConditions"}]},sideEffects:{type:"boolean"},test:{oneOf:[{$ref:"#/definitions/RuleSetConditionOrConditionsAbsolute"}]},type:{type:"string"},use:{oneOf:[{$ref:"#/definitions/RuleSetUse"}]},with:{type:"object",additionalProperties:{$ref:"#/definitions/RuleSetConditionOrConditions"}}}},RuleSetRules:{type:"array",items:{anyOf:[{enum:["..."]},{$ref:"#/definitions/Falsy"},{$ref:"#/definitions/RuleSetRule"}]}},RuleSetUse:{anyOf:[{type:"array",items:{anyOf:[{$ref:"#/definitions/Falsy"},{$ref:"#/definitions/RuleSetUseItem"}]}},{$ref:"#/definitions/RuleSetUseFunction"},{$ref:"#/definitions/RuleSetUseItem"}]},RuleSetUseFunction:{instanceof:"Function"},RuleSetUseItem:{anyOf:[{type:"object",additionalProperties:!1,properties:{ident:{type:"string"},loader:{oneOf:[{$ref:"#/definitions/RuleSetLoader"}]},options:{oneOf:[{$ref:"#/definitions/RuleSetLoaderOptions"}]}}},{$ref:"#/definitions/RuleSetUseFunction"},{$ref:"#/definitions/RuleSetLoader"}]},ScriptType:{enum:[!1,"text/javascript","module"]},SnapshotOptions:{type:"object",additionalProperties:!1,properties:{buildDependencies:{type:"object",additionalProperties:!1,properties:{hash:{type:"boolean"},timestamp:{type:"boolean"}}},contextModule:{type:"object",additionalProperties:!1,properties:{hash:{type:"boolean"},timestamp:{type:"boolean"}}},immutablePaths:{type:"array",items:{anyOf:[{instanceof:"RegExp"},{type:"string",absolutePath:!0,minLength:1}]}},managedPaths:{type:"array",items:{anyOf:[{instanceof:"RegExp"},{type:"string",absolutePath:!0,minLength:1}]}},module:{type:"object",additionalProperties:!1,properties:{hash:{type:"boolean"},timestamp:{type:"boolean"}}},resolve:{type:"object",additionalProperties:!1,properties:{hash:{type:"boolean"},timestamp:{type:"boolean"}}},resolveBuildDependencies:{type:"object",additionalProperties:!1,properties:{hash:{type:"boolean"},timestamp:{type:"boolean"}}},unmanagedPaths:{type:"array",items:{anyOf:[{instanceof:"RegExp"},{type:"string",absolutePath:!0,minLength:1}]}}}},SourceMapFilename:{type:"string",absolutePath:!1},SourcePrefix:{type:"string"},StatsOptions:{type:"object",additionalProperties:!1,properties:{all:{type:"boolean"},assets:{type:"boolean"},assetsSort:{anyOf:[{enum:[!1]},{type:"string"}]},assetsSpace:{type:"number"},builtAt:{type:"boolean"},cached:{type:"boolean"},cachedAssets:{type:"boolean"},cachedModules:{type:"boolean"},children:{anyOf:[{type:"array",items:{$ref:"#/definitions/StatsValue"}},{$ref:"#/definitions/StatsValue"}]},chunkGroupAuxiliary:{type:"boolean"},chunkGroupChildren:{type:"boolean"},chunkGroupMaxAssets:{type:"number"},chunkGroups:{type:"boolean"},chunkModules:{type:"boolean"},chunkModulesSpace:{type:"number"},chunkOrigins:{type:"boolean"},chunkRelations:{type:"boolean"},chunks:{type:"boolean"},chunksSort:{anyOf:[{enum:[!1]},{type:"string"}]},colors:{anyOf:[{type:"boolean"},{type:"object",additionalProperties:!1,properties:{bold:{type:"string"},cyan:{type:"string"},green:{type:"string"},magenta:{type:"string"},red:{type:"string"},yellow:{type:"string"}}}]},context:{type:"string",absolutePath:!0},dependentModules:{type:"boolean"},depth:{type:"boolean"},entrypoints:{anyOf:[{enum:["auto"]},{type:"boolean"}]},env:{type:"boolean"},errorCause:{anyOf:[{enum:["auto"]},{type:"boolean"}]},errorDetails:{anyOf:[{enum:["auto"]},{type:"boolean"}]},errorErrors:{anyOf:[{enum:["auto"]},{type:"boolean"}]},errorStack:{type:"boolean"},errors:{type:"boolean"},errorsCount:{type:"boolean"},errorsSpace:{type:"number"},exclude:{anyOf:[{type:"boolean"},{$ref:"#/definitions/ModuleFilterTypes"}]},excludeAssets:{oneOf:[{$ref:"#/definitions/AssetFilterTypes"}]},excludeModules:{anyOf:[{type:"boolean"},{$ref:"#/definitions/ModuleFilterTypes"}]},groupAssetsByChunk:{type:"boolean"},groupAssetsByEmitStatus:{type:"boolean"},groupAssetsByExtension:{type:"boolean"},groupAssetsByInfo:{type:"boolean"},groupAssetsByPath:{type:"boolean"},groupModulesByAttributes:{type:"boolean"},groupModulesByCacheStatus:{type:"boolean"},groupModulesByExtension:{type:"boolean"},groupModulesByLayer:{type:"boolean"},groupModulesByPath:{type:"boolean"},groupModulesByType:{type:"boolean"},groupReasonsByOrigin:{type:"boolean"},hash:{type:"boolean"},ids:{type:"boolean"},logging:{anyOf:[{enum:["none","error","warn","info","log","verbose"]},{type:"boolean"}]},loggingDebug:{anyOf:[{type:"boolean"},{$ref:"#/definitions/FilterTypes"}]},loggingTrace:{type:"boolean"},moduleAssets:{type:"boolean"},moduleTrace:{type:"boolean"},modules:{type:"boolean"},modulesSort:{anyOf:[{enum:[!1]},{type:"string"}]},modulesSpace:{type:"number"},nestedModules:{type:"boolean"},nestedModulesSpace:{type:"number"},optimizationBailout:{type:"boolean"},orphanModules:{type:"boolean"},outputPath:{type:"boolean"},performance:{type:"boolean"},preset:{anyOf:[{type:"boolean"},{type:"string"}]},providedExports:{type:"boolean"},publicPath:{type:"boolean"},reasons:{type:"boolean"},reasonsSpace:{type:"number"},relatedAssets:{type:"boolean"},runtime:{type:"boolean"},runtimeModules:{type:"boolean"},source:{type:"boolean"},timings:{type:"boolean"},usedExports:{type:"boolean"},version:{type:"boolean"},warnings:{type:"boolean"},warningsCount:{type:"boolean"},warningsFilter:{oneOf:[{$ref:"#/definitions/WarningFilterTypes"}]},warningsSpace:{type:"number"}}},StatsValue:{anyOf:[{enum:["none","summary","errors-only","errors-warnings","minimal","normal","detailed","verbose"]},{type:"boolean"},{$ref:"#/definitions/StatsOptions"}]},StrictModuleErrorHandling:{type:"boolean"},StrictModuleExceptionHandling:{type:"boolean"},Target:{anyOf:[{type:"array",items:{type:"string",minLength:1},minItems:1},{enum:[!1]},{type:"string",minLength:1}]},TrustedTypes:{type:"object",additionalProperties:!1,properties:{onPolicyCreationFailure:{enum:["continue","stop"]},policyName:{type:"string",minLength:1}}},UmdNamedDefine:{type:"boolean"},UniqueName:{type:"string",minLength:1},WarningFilterItemTypes:{anyOf:[{instanceof:"RegExp"},{type:"string",absolutePath:!1},{instanceof:"Function"}]},WarningFilterTypes:{anyOf:[{type:"array",items:{oneOf:[{$ref:"#/definitions/WarningFilterItemTypes"}]}},{$ref:"#/definitions/WarningFilterItemTypes"}]},WasmLoading:{anyOf:[{enum:[!1]},{$ref:"#/definitions/WasmLoadingType"}]},WasmLoadingType:{anyOf:[{enum:["fetch","async-node"]},{type:"string"}]},Watch:{type:"boolean"},WatchOptions:{type:"object",additionalProperties:!1,properties:{aggregateTimeout:{type:"number"},followSymlinks:{type:"boolean"},ignored:{anyOf:[{type:"array",items:{type:"string",minLength:1}},{instanceof:"RegExp"},{type:"string",minLength:1}]},poll:{anyOf:[{type:"number"},{type:"boolean"}]},stdin:{type:"boolean"}}},WebassemblyModuleFilename:{type:"string",absolutePath:!1},WebpackOptionsNormalized:{type:"object",additionalProperties:!1,properties:{amd:{$ref:"#/definitions/Amd"},bail:{$ref:"#/definitions/Bail"},cache:{$ref:"#/definitions/CacheOptionsNormalized"},context:{$ref:"#/definitions/Context"},dependencies:{$ref:"#/definitions/Dependencies"},devServer:{$ref:"#/definitions/DevServer"},devtool:{$ref:"#/definitions/DevTool"},entry:{$ref:"#/definitions/EntryNormalized"},experiments:{$ref:"#/definitions/ExperimentsNormalized"},externals:{$ref:"#/definitions/Externals"},externalsPresets:{$ref:"#/definitions/ExternalsPresets"},externalsType:{$ref:"#/definitions/ExternalsType"},ignoreWarnings:{$ref:"#/definitions/IgnoreWarningsNormalized"},infrastructureLogging:{$ref:"#/definitions/InfrastructureLogging"},loader:{$ref:"#/definitions/Loader"},mode:{$ref:"#/definitions/Mode"},module:{$ref:"#/definitions/ModuleOptionsNormalized"},name:{$ref:"#/definitions/Name"},node:{$ref:"#/definitions/Node"},optimization:{$ref:"#/definitions/OptimizationNormalized"},output:{$ref:"#/definitions/OutputNormalized"},parallelism:{$ref:"#/definitions/Parallelism"},performance:{$ref:"#/definitions/Performance"},plugins:{$ref:"#/definitions/PluginsNormalized"},profile:{$ref:"#/definitions/Profile"},recordsInputPath:{$ref:"#/definitions/RecordsInputPath"},recordsOutputPath:{$ref:"#/definitions/RecordsOutputPath"},resolve:{$ref:"#/definitions/Resolve"},resolveLoader:{$ref:"#/definitions/ResolveLoader"},snapshot:{$ref:"#/definitions/SnapshotOptions"},stats:{$ref:"#/definitions/StatsValue"},target:{$ref:"#/definitions/Target"},watch:{$ref:"#/definitions/Watch"},watchOptions:{$ref:"#/definitions/WatchOptions"}},required:["cache","snapshot","entry","experiments","externals","externalsPresets","infrastructureLogging","module","node","optimization","output","plugins","resolve","resolveLoader","stats","watchOptions"]},WebpackPluginFunction:{instanceof:"Function"},WebpackPluginInstance:{type:"object",additionalProperties:!0,properties:{apply:{instanceof:"Function"}},required:["apply"]},WorkerPublicPath:{type:"string"}},type:"object",additionalProperties:!1,properties:{amd:{$ref:"#/definitions/Amd"},bail:{$ref:"#/definitions/Bail"},cache:{$ref:"#/definitions/CacheOptions"},context:{$ref:"#/definitions/Context"},dependencies:{$ref:"#/definitions/Dependencies"},devServer:{$ref:"#/definitions/DevServer"},devtool:{$ref:"#/definitions/DevTool"},entry:{$ref:"#/definitions/Entry"},experiments:{$ref:"#/definitions/Experiments"},extends:{$ref:"#/definitions/Extends"},externals:{$ref:"#/definitions/Externals"},externalsPresets:{$ref:"#/definitions/ExternalsPresets"},externalsType:{$ref:"#/definitions/ExternalsType"},ignoreWarnings:{$ref:"#/definitions/IgnoreWarnings"},infrastructureLogging:{$ref:"#/definitions/InfrastructureLogging"},loader:{$ref:"#/definitions/Loader"},mode:{$ref:"#/definitions/Mode"},module:{$ref:"#/definitions/ModuleOptions"},name:{$ref:"#/definitions/Name"},node:{$ref:"#/definitions/Node"},optimization:{$ref:"#/definitions/Optimization"},output:{$ref:"#/definitions/Output"},parallelism:{$ref:"#/definitions/Parallelism"},performance:{$ref:"#/definitions/Performance"},plugins:{$ref:"#/definitions/Plugins"},profile:{$ref:"#/definitions/Profile"},recordsInputPath:{$ref:"#/definitions/RecordsInputPath"},recordsOutputPath:{$ref:"#/definitions/RecordsOutputPath"},recordsPath:{$ref:"#/definitions/RecordsPath"},resolve:{$ref:"#/definitions/Resolve"},resolveLoader:{$ref:"#/definitions/ResolveLoader"},snapshot:{$ref:"#/definitions/SnapshotOptions"},stats:{$ref:"#/definitions/StatsValue"},target:{$ref:"#/definitions/Target"},watch:{$ref:"#/definitions/Watch"},watchOptions:{$ref:"#/definitions/WatchOptions"}}},n=Object.prototype.hasOwnProperty,r={type:"object",additionalProperties:!1,properties:{allowCollectingMemory:{type:"boolean"},buildDependencies:{type:"object",additionalProperties:{type:"array",items:{type:"string",minLength:1}}},cacheDirectory:{type:"string",absolutePath:!0},cacheLocation:{type:"string",absolutePath:!0},compression:{enum:[!1,"gzip","brotli"]},hashAlgorithm:{type:"string"},idleTimeout:{type:"number",minimum:0},idleTimeoutAfterLargeChanges:{type:"number",minimum:0},idleTimeoutForInitialStore:{type:"number",minimum:0},immutablePaths:{type:"array",items:{anyOf:[{instanceof:"RegExp"},{type:"string",absolutePath:!0,minLength:1}]}},managedPaths:{type:"array",items:{anyOf:[{instanceof:"RegExp"},{type:"string",absolutePath:!0,minLength:1}]}},maxAge:{type:"number",minimum:0},maxMemoryGenerations:{type:"number",minimum:0},memoryCacheUnaffected:{type:"boolean"},name:{type:"string"},profile:{type:"boolean"},readonly:{type:"boolean"},store:{enum:["pack"]},type:{enum:["filesystem"]},version:{type:"string"}},required:["type"]};function o(t,{instancePath:s="",parentData:i,parentDataProperty:a,rootData:l=t}={}){let p=null,f=0;const u=f;let c=!1;const y=f;if(!1!==t){const e={params:{}};null===p?p=[e]:p.push(e),f++}var m=y===f;if(c=c||m,!c){const o=f;if(f==f)if(t&&"object"==typeof t&&!Array.isArray(t)){let e;if(void 0===t.type&&(e="type")){const t={params:{missingProperty:e}};null===p?p=[t]:p.push(t),f++}else{const e=f;for(const e in t)if("cacheUnaffected"!==e&&"maxGenerations"!==e&&"type"!==e){const t={params:{additionalProperty:e}};null===p?p=[t]:p.push(t),f++;break}if(e===f){if(void 0!==t.cacheUnaffected){const e=f;if("boolean"!=typeof t.cacheUnaffected){const e={params:{type:"boolean"}};null===p?p=[e]:p.push(e),f++}var d=e===f}else d=!0;if(d){if(void 0!==t.maxGenerations){let e=t.maxGenerations;const n=f;if(f===n)if("number"==typeof e){if(e<1||isNaN(e)){const e={params:{comparison:">=",limit:1}};null===p?p=[e]:p.push(e),f++}}else{const e={params:{type:"number"}};null===p?p=[e]:p.push(e),f++}d=n===f}else d=!0;if(d)if(void 0!==t.type){const e=f;if("memory"!==t.type){const e={params:{}};null===p?p=[e]:p.push(e),f++}d=e===f}else d=!0}}}}else{const e={params:{type:"object"}};null===p?p=[e]:p.push(e),f++}if(m=o===f,c=c||m,!c){const o=f;if(f==f)if(t&&"object"==typeof t&&!Array.isArray(t)){let o;if(void 0===t.type&&(o="type")){const e={params:{missingProperty:o}};null===p?p=[e]:p.push(e),f++}else{const o=f;for(const e in t)if(!n.call(r.properties,e)){const t={params:{additionalProperty:e}};null===p?p=[t]:p.push(t),f++;break}if(o===f){if(void 0!==t.allowCollectingMemory){const e=f;if("boolean"!=typeof t.allowCollectingMemory){const e={params:{type:"boolean"}};null===p?p=[e]:p.push(e),f++}var h=e===f}else h=!0;if(h){if(void 0!==t.buildDependencies){let e=t.buildDependencies;const n=f;if(f===n)if(e&&"object"==typeof e&&!Array.isArray(e))for(const t in e){let n=e[t];const r=f;if(f===r)if(Array.isArray(n)){const e=n.length;for(let t=0;t=",limit:0}};null===p?p=[e]:p.push(e),f++}}else{const e={params:{type:"number"}};null===p?p=[e]:p.push(e),f++}h=n===f}else h=!0;if(h){if(void 0!==t.idleTimeoutAfterLargeChanges){let e=t.idleTimeoutAfterLargeChanges;const n=f;if(f===n)if("number"==typeof e){if(e<0||isNaN(e)){const e={params:{comparison:">=",limit:0}};null===p?p=[e]:p.push(e),f++}}else{const e={params:{type:"number"}};null===p?p=[e]:p.push(e),f++}h=n===f}else h=!0;if(h){if(void 0!==t.idleTimeoutForInitialStore){let e=t.idleTimeoutForInitialStore;const n=f;if(f===n)if("number"==typeof e){if(e<0||isNaN(e)){const e={params:{comparison:">=",limit:0}};null===p?p=[e]:p.push(e),f++}}else{const e={params:{type:"number"}};null===p?p=[e]:p.push(e),f++}h=n===f}else h=!0;if(h){if(void 0!==t.immutablePaths){let n=t.immutablePaths;const r=f;if(f===r)if(Array.isArray(n)){const t=n.length;for(let r=0;r=",limit:0}};null===p?p=[e]:p.push(e),f++}}else{const e={params:{type:"number"}};null===p?p=[e]:p.push(e),f++}h=n===f}else h=!0;if(h){if(void 0!==t.maxMemoryGenerations){let e=t.maxMemoryGenerations;const n=f;if(f===n)if("number"==typeof e){if(e<0||isNaN(e)){const e={params:{comparison:">=",limit:0}};null===p?p=[e]:p.push(e),f++}}else{const e={params:{type:"number"}};null===p?p=[e]:p.push(e),f++}h=n===f}else h=!0;if(h){if(void 0!==t.memoryCacheUnaffected){const e=f;if("boolean"!=typeof t.memoryCacheUnaffected){const e={params:{type:"boolean"}};null===p?p=[e]:p.push(e),f++}h=e===f}else h=!0;if(h){if(void 0!==t.name){const e=f;if("string"!=typeof t.name){const e={params:{type:"string"}};null===p?p=[e]:p.push(e),f++}h=e===f}else h=!0;if(h){if(void 0!==t.profile){const e=f;if("boolean"!=typeof t.profile){const e={params:{type:"boolean"}};null===p?p=[e]:p.push(e),f++}h=e===f}else h=!0;if(h){if(void 0!==t.readonly){const e=f;if("boolean"!=typeof t.readonly){const e={params:{type:"boolean"}};null===p?p=[e]:p.push(e),f++}h=e===f}else h=!0;if(h){if(void 0!==t.store){const e=f;if("pack"!==t.store){const e={params:{}};null===p?p=[e]:p.push(e),f++}h=e===f}else h=!0;if(h){if(void 0!==t.type){const e=f;if("filesystem"!==t.type){const e={params:{}};null===p?p=[e]:p.push(e),f++}h=e===f}else h=!0;if(h)if(void 0!==t.version){const e=f;if("string"!=typeof t.version){const e={params:{type:"string"}};null===p?p=[e]:p.push(e),f++}h=e===f}else h=!0}}}}}}}}}}}}}}}}}}}}}else{const e={params:{type:"object"}};null===p?p=[e]:p.push(e),f++}m=o===f,c=c||m}}if(!c){const e={params:{}};return null===p?p=[e]:p.push(e),f++,o.errors=p,!1}return f=u,null!==p&&(u?p.length=u:p=null),o.errors=p,0===f}function s(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:i=e}={}){let a=null,l=0;const p=l;let f=!1;const u=l;if(!0!==e){const e={params:{}};null===a?a=[e]:a.push(e),l++}var c=u===l;if(f=f||c,!f){const s=l;o(e,{instancePath:t,parentData:n,parentDataProperty:r,rootData:i})||(a=null===a?o.errors:a.concat(o.errors),l=a.length),c=s===l,f=f||c}if(!f){const e={params:{}};return null===a?a=[e]:a.push(e),l++,s.errors=a,!1}return l=p,null!==a&&(p?a.length=p:a=null),s.errors=a,0===l}const i={type:"object",additionalProperties:!1,properties:{asyncChunks:{type:"boolean"},baseUri:{type:"string"},chunkLoading:{$ref:"#/definitions/ChunkLoading"},dependOn:{anyOf:[{type:"array",items:{type:"string",minLength:1},minItems:1,uniqueItems:!0},{type:"string",minLength:1}]},filename:{$ref:"#/definitions/EntryFilename"},import:{$ref:"#/definitions/EntryItem"},layer:{$ref:"#/definitions/Layer"},library:{$ref:"#/definitions/LibraryOptions"},publicPath:{$ref:"#/definitions/PublicPath"},runtime:{$ref:"#/definitions/EntryRuntime"},wasmLoading:{$ref:"#/definitions/WasmLoading"}},required:["import"]};function a(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:o=e}={}){let s=null,i=0;const l=i;let p=!1;const f=i;if(!1!==e){const e={params:{}};null===s?s=[e]:s.push(e),i++}var u=f===i;if(p=p||u,!p){const t=i,n=i;let r=!1;const o=i;if("jsonp"!==e&&"import-scripts"!==e&&"require"!==e&&"async-node"!==e&&"import"!==e){const e={params:{}};null===s?s=[e]:s.push(e),i++}var c=o===i;if(r=r||c,!r){const t=i;if("string"!=typeof e){const e={params:{type:"string"}};null===s?s=[e]:s.push(e),i++}c=t===i,r=r||c}if(r)i=n,null!==s&&(n?s.length=n:s=null);else{const e={params:{}};null===s?s=[e]:s.push(e),i++}u=t===i,p=p||u}if(!p){const e={params:{}};return null===s?s=[e]:s.push(e),i++,a.errors=s,!1}return i=l,null!==s&&(l?s.length=l:s=null),a.errors=s,0===i}function l(t,{instancePath:n="",parentData:r,parentDataProperty:o,rootData:s=t}={}){let i=null,a=0;const p=a;let f=!1,u=null;const c=a,y=a;let m=!1;const d=a;if(a===d)if("string"==typeof t){if(t.includes("!")||!1!==e.test(t)){const e={params:{}};null===i?i=[e]:i.push(e),a++}else if(t.length<1){const e={params:{}};null===i?i=[e]:i.push(e),a++}}else{const e={params:{type:"string"}};null===i?i=[e]:i.push(e),a++}var h=d===a;if(m=m||h,!m){const e=a;if(!(t instanceof Function)){const e={params:{}};null===i?i=[e]:i.push(e),a++}h=e===a,m=m||h}if(m)a=y,null!==i&&(y?i.length=y:i=null);else{const e={params:{}};null===i?i=[e]:i.push(e),a++}if(c===a&&(f=!0,u=0),!f){const e={params:{passingSchemas:u}};return null===i?i=[e]:i.push(e),a++,l.errors=i,!1}return a=p,null!==i&&(p?i.length=p:i=null),l.errors=i,0===a}function p(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:o=e}={}){let s=null,i=0;const a=i;let l=!1;const f=i;if("string"!=typeof e){const e={params:{type:"string"}};null===s?s=[e]:s.push(e),i++}var u=f===i;if(l=l||u,!l){const t=i;if(i==i)if(e&&"object"==typeof e&&!Array.isArray(e)){const t=i;for(const t in e)if("amd"!==t&&"commonjs"!==t&&"commonjs2"!==t&&"root"!==t){const e={params:{additionalProperty:t}};null===s?s=[e]:s.push(e),i++;break}if(t===i){if(void 0!==e.amd){const t=i;if("string"!=typeof e.amd){const e={params:{type:"string"}};null===s?s=[e]:s.push(e),i++}var c=t===i}else c=!0;if(c){if(void 0!==e.commonjs){const t=i;if("string"!=typeof e.commonjs){const e={params:{type:"string"}};null===s?s=[e]:s.push(e),i++}c=t===i}else c=!0;if(c){if(void 0!==e.commonjs2){const t=i;if("string"!=typeof e.commonjs2){const e={params:{type:"string"}};null===s?s=[e]:s.push(e),i++}c=t===i}else c=!0;if(c)if(void 0!==e.root){const t=i;if("string"!=typeof e.root){const e={params:{type:"string"}};null===s?s=[e]:s.push(e),i++}c=t===i}else c=!0}}}}else{const e={params:{type:"object"}};null===s?s=[e]:s.push(e),i++}u=t===i,l=l||u}if(!l){const e={params:{}};return null===s?s=[e]:s.push(e),i++,p.errors=s,!1}return i=a,null!==s&&(a?s.length=a:s=null),p.errors=s,0===i}function f(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:o=e}={}){let s=null,i=0;const a=i;let l=!1;const p=i;if(i===p)if(Array.isArray(e))if(e.length<1){const e={params:{limit:1}};null===s?s=[e]:s.push(e),i++}else{const t=e.length;for(let n=0;n1){const r={};for(;n--;){let o=t[n];if("string"==typeof o){if("number"==typeof r[o]){e=r[o];const t={params:{i:n,j:e}};null===p?p=[t]:p.push(t),f++;break}r[o]=n}}}}}else{const e={params:{type:"array"}};null===p?p=[e]:p.push(e),f++}var b=s===f;if(o=o||b,!o){const e=f;if(f===e)if("string"==typeof t){if(t.length<1){const e={params:{}};null===p?p=[e]:p.push(e),f++}}else{const e={params:{type:"string"}};null===p?p=[e]:p.push(e),f++}b=e===f,o=o||b}if(!o){const e={params:{}};return null===p?p=[e]:p.push(e),f++,m.errors=p,!1}f=r,null!==p&&(r?p.length=r:p=null),d=n===f}else d=!0;if(d){if(void 0!==e.filename){const n=f;l(e.filename,{instancePath:t+"/filename",parentData:e,parentDataProperty:"filename",rootData:s})||(p=null===p?l.errors:p.concat(l.errors),f=p.length),d=n===f}else d=!0;if(d){if(void 0!==e.import){let t=e.import;const n=f,r=f;let o=!1;const s=f;if(f===s)if(Array.isArray(t))if(t.length<1){const e={params:{limit:1}};null===p?p=[e]:p.push(e),f++}else{var g=!0;const e=t.length;for(let n=0;n1){const r={};for(;n--;){let o=t[n];if("string"==typeof o){if("number"==typeof r[o]){e=r[o];const t={params:{i:n,j:e}};null===p?p=[t]:p.push(t),f++;break}r[o]=n}}}}}else{const e={params:{type:"array"}};null===p?p=[e]:p.push(e),f++}var v=s===f;if(o=o||v,!o){const e=f;if(f===e)if("string"==typeof t){if(t.length<1){const e={params:{}};null===p?p=[e]:p.push(e),f++}}else{const e={params:{type:"string"}};null===p?p=[e]:p.push(e),f++}v=e===f,o=o||v}if(!o){const e={params:{}};return null===p?p=[e]:p.push(e),f++,m.errors=p,!1}f=r,null!==p&&(r?p.length=r:p=null),d=n===f}else d=!0;if(d){if(void 0!==e.layer){let t=e.layer;const n=f,r=f;let o=!1;const s=f;if(null!==t){const e={params:{}};null===p?p=[e]:p.push(e),f++}var P=s===f;if(o=o||P,!o){const e=f;if(f===e)if("string"==typeof t){if(t.length<1){const e={params:{}};null===p?p=[e]:p.push(e),f++}}else{const e={params:{type:"string"}};null===p?p=[e]:p.push(e),f++}P=e===f,o=o||P}if(!o){const e={params:{}};return null===p?p=[e]:p.push(e),f++,m.errors=p,!1}f=r,null!==p&&(r?p.length=r:p=null),d=n===f}else d=!0;if(d){if(void 0!==e.library){const n=f;u(e.library,{instancePath:t+"/library",parentData:e,parentDataProperty:"library",rootData:s})||(p=null===p?u.errors:p.concat(u.errors),f=p.length),d=n===f}else d=!0;if(d){if(void 0!==e.publicPath){const n=f;c(e.publicPath,{instancePath:t+"/publicPath",parentData:e,parentDataProperty:"publicPath",rootData:s})||(p=null===p?c.errors:p.concat(c.errors),f=p.length),d=n===f}else d=!0;if(d){if(void 0!==e.runtime){let t=e.runtime;const n=f,r=f;let o=!1;const s=f;if(!1!==t){const e={params:{}};null===p?p=[e]:p.push(e),f++}var D=s===f;if(o=o||D,!o){const e=f;if(f===e)if("string"==typeof t){if(t.length<1){const e={params:{}};null===p?p=[e]:p.push(e),f++}}else{const e={params:{type:"string"}};null===p?p=[e]:p.push(e),f++}D=e===f,o=o||D}if(!o){const e={params:{}};return null===p?p=[e]:p.push(e),f++,m.errors=p,!1}f=r,null!==p&&(r?p.length=r:p=null),d=n===f}else d=!0;if(d)if(void 0!==e.wasmLoading){const n=f;y(e.wasmLoading,{instancePath:t+"/wasmLoading",parentData:e,parentDataProperty:"wasmLoading",rootData:s})||(p=null===p?y.errors:p.concat(y.errors),f=p.length),d=n===f}else d=!0}}}}}}}}}}}}}return m.errors=p,0===f}function d(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:o=e}={}){let s=null,i=0;if(0===i){if(!e||"object"!=typeof e||Array.isArray(e))return d.errors=[{params:{type:"object"}}],!1;for(const n in e){let r=e[n];const f=i,u=i;let c=!1;const y=i,h=i;let b=!1;const g=i;if(i===g)if(Array.isArray(r))if(r.length<1){const e={params:{limit:1}};null===s?s=[e]:s.push(e),i++}else{var a=!0;const e=r.length;for(let t=0;t1){const n={};for(;t--;){let o=r[t];if("string"==typeof o){if("number"==typeof n[o]){e=n[o];const r={params:{i:t,j:e}};null===s?s=[r]:s.push(r),i++;break}n[o]=t}}}}}else{const e={params:{type:"array"}};null===s?s=[e]:s.push(e),i++}var l=g===i;if(b=b||l,!b){const e=i;if(i===e)if("string"==typeof r){if(r.length<1){const e={params:{}};null===s?s=[e]:s.push(e),i++}}else{const e={params:{type:"string"}};null===s?s=[e]:s.push(e),i++}l=e===i,b=b||l}if(b)i=h,null!==s&&(h?s.length=h:s=null);else{const e={params:{}};null===s?s=[e]:s.push(e),i++}var p=y===i;if(c=c||p,!c){const a=i;m(r,{instancePath:t+"/"+n.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:e,parentDataProperty:n,rootData:o})||(s=null===s?m.errors:s.concat(m.errors),i=s.length),p=a===i,c=c||p}if(!c){const e={params:{}};return null===s?s=[e]:s.push(e),i++,d.errors=s,!1}if(i=u,null!==s&&(u?s.length=u:s=null),f!==i)break}}return d.errors=s,0===i}function h(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:o=e}={}){let s=null,i=0;const a=i;let l=!1,p=null;const f=i,u=i;let c=!1;const y=i;if(i===y)if(Array.isArray(e))if(e.length<1){const e={params:{limit:1}};null===s?s=[e]:s.push(e),i++}else{var m=!0;const t=e.length;for(let n=0;n1){const r={};for(;n--;){let o=e[n];if("string"==typeof o){if("number"==typeof r[o]){t=r[o];const e={params:{i:n,j:t}};null===s?s=[e]:s.push(e),i++;break}r[o]=n}}}}}else{const e={params:{type:"array"}};null===s?s=[e]:s.push(e),i++}var d=y===i;if(c=c||d,!c){const t=i;if(i===t)if("string"==typeof e){if(e.length<1){const e={params:{}};null===s?s=[e]:s.push(e),i++}}else{const e={params:{type:"string"}};null===s?s=[e]:s.push(e),i++}d=t===i,c=c||d}if(c)i=u,null!==s&&(u?s.length=u:s=null);else{const e={params:{}};null===s?s=[e]:s.push(e),i++}if(f===i&&(l=!0,p=0),!l){const e={params:{passingSchemas:p}};return null===s?s=[e]:s.push(e),i++,h.errors=s,!1}return i=a,null!==s&&(a?s.length=a:s=null),h.errors=s,0===i}function b(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:o=e}={}){let s=null,i=0;const a=i;let l=!1;const p=i;d(e,{instancePath:t,parentData:n,parentDataProperty:r,rootData:o})||(s=null===s?d.errors:s.concat(d.errors),i=s.length);var f=p===i;if(l=l||f,!l){const a=i;h(e,{instancePath:t,parentData:n,parentDataProperty:r,rootData:o})||(s=null===s?h.errors:s.concat(h.errors),i=s.length),f=a===i,l=l||f}if(!l){const e={params:{}};return null===s?s=[e]:s.push(e),i++,b.errors=s,!1}return i=a,null!==s&&(a?s.length=a:s=null),b.errors=s,0===i}function g(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:o=e}={}){let s=null,i=0;const a=i;let l=!1;const p=i;if(!(e instanceof Function)){const e={params:{}};null===s?s=[e]:s.push(e),i++}var f=p===i;if(l=l||f,!l){const a=i;b(e,{instancePath:t,parentData:n,parentDataProperty:r,rootData:o})||(s=null===s?b.errors:s.concat(b.errors),i=s.length),f=a===i,l=l||f}if(!l){const e={params:{}};return null===s?s=[e]:s.push(e),i++,g.errors=s,!1}return i=a,null!==s&&(a?s.length=a:s=null),g.errors=s,0===i}const v=new RegExp("^https?://","u");function P(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:o=e}={}){let s=null,i=0;const a=i;let l=!1,p=null;const f=i;if(i==i)if(Array.isArray(e)){const t=e.length;for(let n=0;n=",limit:0}};null===a?a=[e]:a.push(e),l++}}else{const e={params:{type:"number"}};null===a?a=[e]:a.push(e),l++}var u=y===l;if(c=c||u,!c){const t=l;if(l===t)if(e&&"object"==typeof e&&!Array.isArray(e))for(const t in e){const n=l;if("number"!=typeof e[t]){const e={params:{type:"number"}};null===a?a=[e]:a.push(e),l++}if(n!==l)break}else{const e={params:{type:"object"}};null===a?a=[e]:a.push(e),l++}u=t===l,c=c||u}if(c)l=f,null!==a&&(f?a.length=f:a=null);else{const e={params:{}};null===a?a=[e]:a.push(e),l++}if(i===l&&(o=!0,s=0),!o){const e={params:{passingSchemas:s}};return null===a?a=[e]:a.push(e),l++,Pe.errors=a,!1}l=r,null!==a&&(r?a.length=r:a=null),p=n===l}else p=!0;if(p){if(void 0!==t.filename){let n=t.filename;const r=l,o=l;let s=!1;const i=l;if(l===i)if("string"==typeof n){if(n.includes("!")||!1!==e.test(n)){const e={params:{}};null===a?a=[e]:a.push(e),l++}else if(n.length<1){const e={params:{}};null===a?a=[e]:a.push(e),l++}}else{const e={params:{type:"string"}};null===a?a=[e]:a.push(e),l++}var c=i===l;if(s=s||c,!s){const e=l;if(!(n instanceof Function)){const e={params:{}};null===a?a=[e]:a.push(e),l++}c=e===l,s=s||c}if(!s){const e={params:{}};return null===a?a=[e]:a.push(e),l++,Pe.errors=a,!1}l=o,null!==a&&(o?a.length=o:a=null),p=r===l}else p=!0;if(p){if(void 0!==t.idHint){const e=l;if("string"!=typeof t.idHint)return Pe.errors=[{params:{type:"string"}}],!1;p=e===l}else p=!0;if(p){if(void 0!==t.layer){let e=t.layer;const n=l,r=l;let o=!1;const s=l;if(!(e instanceof RegExp)){const e={params:{}};null===a?a=[e]:a.push(e),l++}var y=s===l;if(o=o||y,!o){const t=l;if("string"!=typeof e){const e={params:{type:"string"}};null===a?a=[e]:a.push(e),l++}if(y=t===l,o=o||y,!o){const t=l;if(!(e instanceof Function)){const e={params:{}};null===a?a=[e]:a.push(e),l++}y=t===l,o=o||y}}if(!o){const e={params:{}};return null===a?a=[e]:a.push(e),l++,Pe.errors=a,!1}l=r,null!==a&&(r?a.length=r:a=null),p=n===l}else p=!0;if(p){if(void 0!==t.maxAsyncRequests){let e=t.maxAsyncRequests;const n=l;if(l===n){if("number"!=typeof e)return Pe.errors=[{params:{type:"number"}}],!1;if(e<1||isNaN(e))return Pe.errors=[{params:{comparison:">=",limit:1}}],!1}p=n===l}else p=!0;if(p){if(void 0!==t.maxAsyncSize){let e=t.maxAsyncSize;const n=l,r=l;let o=!1,s=null;const i=l,f=l;let u=!1;const c=l;if(l===c)if("number"==typeof e){if(e<0||isNaN(e)){const e={params:{comparison:">=",limit:0}};null===a?a=[e]:a.push(e),l++}}else{const e={params:{type:"number"}};null===a?a=[e]:a.push(e),l++}var m=c===l;if(u=u||m,!u){const t=l;if(l===t)if(e&&"object"==typeof e&&!Array.isArray(e))for(const t in e){const n=l;if("number"!=typeof e[t]){const e={params:{type:"number"}};null===a?a=[e]:a.push(e),l++}if(n!==l)break}else{const e={params:{type:"object"}};null===a?a=[e]:a.push(e),l++}m=t===l,u=u||m}if(u)l=f,null!==a&&(f?a.length=f:a=null);else{const e={params:{}};null===a?a=[e]:a.push(e),l++}if(i===l&&(o=!0,s=0),!o){const e={params:{passingSchemas:s}};return null===a?a=[e]:a.push(e),l++,Pe.errors=a,!1}l=r,null!==a&&(r?a.length=r:a=null),p=n===l}else p=!0;if(p){if(void 0!==t.maxInitialRequests){let e=t.maxInitialRequests;const n=l;if(l===n){if("number"!=typeof e)return Pe.errors=[{params:{type:"number"}}],!1;if(e<1||isNaN(e))return Pe.errors=[{params:{comparison:">=",limit:1}}],!1}p=n===l}else p=!0;if(p){if(void 0!==t.maxInitialSize){let e=t.maxInitialSize;const n=l,r=l;let o=!1,s=null;const i=l,f=l;let u=!1;const c=l;if(l===c)if("number"==typeof e){if(e<0||isNaN(e)){const e={params:{comparison:">=",limit:0}};null===a?a=[e]:a.push(e),l++}}else{const e={params:{type:"number"}};null===a?a=[e]:a.push(e),l++}var d=c===l;if(u=u||d,!u){const t=l;if(l===t)if(e&&"object"==typeof e&&!Array.isArray(e))for(const t in e){const n=l;if("number"!=typeof e[t]){const e={params:{type:"number"}};null===a?a=[e]:a.push(e),l++}if(n!==l)break}else{const e={params:{type:"object"}};null===a?a=[e]:a.push(e),l++}d=t===l,u=u||d}if(u)l=f,null!==a&&(f?a.length=f:a=null);else{const e={params:{}};null===a?a=[e]:a.push(e),l++}if(i===l&&(o=!0,s=0),!o){const e={params:{passingSchemas:s}};return null===a?a=[e]:a.push(e),l++,Pe.errors=a,!1}l=r,null!==a&&(r?a.length=r:a=null),p=n===l}else p=!0;if(p){if(void 0!==t.maxSize){let e=t.maxSize;const n=l,r=l;let o=!1,s=null;const i=l,f=l;let u=!1;const c=l;if(l===c)if("number"==typeof e){if(e<0||isNaN(e)){const e={params:{comparison:">=",limit:0}};null===a?a=[e]:a.push(e),l++}}else{const e={params:{type:"number"}};null===a?a=[e]:a.push(e),l++}var h=c===l;if(u=u||h,!u){const t=l;if(l===t)if(e&&"object"==typeof e&&!Array.isArray(e))for(const t in e){const n=l;if("number"!=typeof e[t]){const e={params:{type:"number"}};null===a?a=[e]:a.push(e),l++}if(n!==l)break}else{const e={params:{type:"object"}};null===a?a=[e]:a.push(e),l++}h=t===l,u=u||h}if(u)l=f,null!==a&&(f?a.length=f:a=null);else{const e={params:{}};null===a?a=[e]:a.push(e),l++}if(i===l&&(o=!0,s=0),!o){const e={params:{passingSchemas:s}};return null===a?a=[e]:a.push(e),l++,Pe.errors=a,!1}l=r,null!==a&&(r?a.length=r:a=null),p=n===l}else p=!0;if(p){if(void 0!==t.minChunks){let e=t.minChunks;const n=l;if(l===n){if("number"!=typeof e)return Pe.errors=[{params:{type:"number"}}],!1;if(e<1||isNaN(e))return Pe.errors=[{params:{comparison:">=",limit:1}}],!1}p=n===l}else p=!0;if(p){if(void 0!==t.minRemainingSize){let e=t.minRemainingSize;const n=l,r=l;let o=!1,s=null;const i=l,f=l;let u=!1;const c=l;if(l===c)if("number"==typeof e){if(e<0||isNaN(e)){const e={params:{comparison:">=",limit:0}};null===a?a=[e]:a.push(e),l++}}else{const e={params:{type:"number"}};null===a?a=[e]:a.push(e),l++}var b=c===l;if(u=u||b,!u){const t=l;if(l===t)if(e&&"object"==typeof e&&!Array.isArray(e))for(const t in e){const n=l;if("number"!=typeof e[t]){const e={params:{type:"number"}};null===a?a=[e]:a.push(e),l++}if(n!==l)break}else{const e={params:{type:"object"}};null===a?a=[e]:a.push(e),l++}b=t===l,u=u||b}if(u)l=f,null!==a&&(f?a.length=f:a=null);else{const e={params:{}};null===a?a=[e]:a.push(e),l++}if(i===l&&(o=!0,s=0),!o){const e={params:{passingSchemas:s}};return null===a?a=[e]:a.push(e),l++,Pe.errors=a,!1}l=r,null!==a&&(r?a.length=r:a=null),p=n===l}else p=!0;if(p){if(void 0!==t.minSize){let e=t.minSize;const n=l,r=l;let o=!1,s=null;const i=l,f=l;let u=!1;const c=l;if(l===c)if("number"==typeof e){if(e<0||isNaN(e)){const e={params:{comparison:">=",limit:0}};null===a?a=[e]:a.push(e),l++}}else{const e={params:{type:"number"}};null===a?a=[e]:a.push(e),l++}var g=c===l;if(u=u||g,!u){const t=l;if(l===t)if(e&&"object"==typeof e&&!Array.isArray(e))for(const t in e){const n=l;if("number"!=typeof e[t]){const e={params:{type:"number"}};null===a?a=[e]:a.push(e),l++}if(n!==l)break}else{const e={params:{type:"object"}};null===a?a=[e]:a.push(e),l++}g=t===l,u=u||g}if(u)l=f,null!==a&&(f?a.length=f:a=null);else{const e={params:{}};null===a?a=[e]:a.push(e),l++}if(i===l&&(o=!0,s=0),!o){const e={params:{passingSchemas:s}};return null===a?a=[e]:a.push(e),l++,Pe.errors=a,!1}l=r,null!==a&&(r?a.length=r:a=null),p=n===l}else p=!0;if(p){if(void 0!==t.minSizeReduction){let e=t.minSizeReduction;const n=l,r=l;let o=!1,s=null;const i=l,f=l;let u=!1;const c=l;if(l===c)if("number"==typeof e){if(e<0||isNaN(e)){const e={params:{comparison:">=",limit:0}};null===a?a=[e]:a.push(e),l++}}else{const e={params:{type:"number"}};null===a?a=[e]:a.push(e),l++}var v=c===l;if(u=u||v,!u){const t=l;if(l===t)if(e&&"object"==typeof e&&!Array.isArray(e))for(const t in e){const n=l;if("number"!=typeof e[t]){const e={params:{type:"number"}};null===a?a=[e]:a.push(e),l++}if(n!==l)break}else{const e={params:{type:"object"}};null===a?a=[e]:a.push(e),l++}v=t===l,u=u||v}if(u)l=f,null!==a&&(f?a.length=f:a=null);else{const e={params:{}};null===a?a=[e]:a.push(e),l++}if(i===l&&(o=!0,s=0),!o){const e={params:{passingSchemas:s}};return null===a?a=[e]:a.push(e),l++,Pe.errors=a,!1}l=r,null!==a&&(r?a.length=r:a=null),p=n===l}else p=!0;if(p){if(void 0!==t.name){let e=t.name;const n=l,r=l;let o=!1;const s=l;if(!1!==e){const e={params:{}};null===a?a=[e]:a.push(e),l++}var P=s===l;if(o=o||P,!o){const t=l;if("string"!=typeof e){const e={params:{type:"string"}};null===a?a=[e]:a.push(e),l++}if(P=t===l,o=o||P,!o){const t=l;if(!(e instanceof Function)){const e={params:{}};null===a?a=[e]:a.push(e),l++}P=t===l,o=o||P}}if(!o){const e={params:{}};return null===a?a=[e]:a.push(e),l++,Pe.errors=a,!1}l=r,null!==a&&(r?a.length=r:a=null),p=n===l}else p=!0;if(p){if(void 0!==t.priority){const e=l;if("number"!=typeof t.priority)return Pe.errors=[{params:{type:"number"}}],!1;p=e===l}else p=!0;if(p){if(void 0!==t.reuseExistingChunk){const e=l;if("boolean"!=typeof t.reuseExistingChunk)return Pe.errors=[{params:{type:"boolean"}}],!1;p=e===l}else p=!0;if(p){if(void 0!==t.test){let e=t.test;const n=l,r=l;let o=!1;const s=l;if(!(e instanceof RegExp)){const e={params:{}};null===a?a=[e]:a.push(e),l++}var D=s===l;if(o=o||D,!o){const t=l;if("string"!=typeof e){const e={params:{type:"string"}};null===a?a=[e]:a.push(e),l++}if(D=t===l,o=o||D,!o){const t=l;if(!(e instanceof Function)){const e={params:{}};null===a?a=[e]:a.push(e),l++}D=t===l,o=o||D}}if(!o){const e={params:{}};return null===a?a=[e]:a.push(e),l++,Pe.errors=a,!1}l=r,null!==a&&(r?a.length=r:a=null),p=n===l}else p=!0;if(p){if(void 0!==t.type){let e=t.type;const n=l,r=l;let o=!1;const s=l;if(!(e instanceof RegExp)){const e={params:{}};null===a?a=[e]:a.push(e),l++}var O=s===l;if(o=o||O,!o){const t=l;if("string"!=typeof e){const e={params:{type:"string"}};null===a?a=[e]:a.push(e),l++}if(O=t===l,o=o||O,!o){const t=l;if(!(e instanceof Function)){const e={params:{}};null===a?a=[e]:a.push(e),l++}O=t===l,o=o||O}}if(!o){const e={params:{}};return null===a?a=[e]:a.push(e),l++,Pe.errors=a,!1}l=r,null!==a&&(r?a.length=r:a=null),p=n===l}else p=!0;if(p)if(void 0!==t.usedExports){const e=l;if("boolean"!=typeof t.usedExports)return Pe.errors=[{params:{type:"boolean"}}],!1;p=e===l}else p=!0}}}}}}}}}}}}}}}}}}}}}}}return Pe.errors=a,0===l}function De(t,{instancePath:r="",parentData:o,parentDataProperty:s,rootData:i=t}={}){let a=null,l=0;if(0===l){if(!t||"object"!=typeof t||Array.isArray(t))return De.errors=[{params:{type:"object"}}],!1;{const o=l;for(const e in t)if(!n.call(ge.properties,e))return De.errors=[{params:{additionalProperty:e}}],!1;if(o===l){if(void 0!==t.automaticNameDelimiter){let e=t.automaticNameDelimiter;const n=l;if(l===n){if("string"!=typeof e)return De.errors=[{params:{type:"string"}}],!1;if(e.length<1)return De.errors=[{params:{}}],!1}var p=n===l}else p=!0;if(p){if(void 0!==t.cacheGroups){let e=t.cacheGroups;const n=l,o=l,s=l;if(l===s)if(e&&"object"==typeof e&&!Array.isArray(e)){let t;if(void 0===e.test&&(t="test")){const e={};null===a?a=[e]:a.push(e),l++}else if(void 0!==e.test){let t=e.test;const n=l;let r=!1;const o=l;if(!(t instanceof RegExp)){const e={};null===a?a=[e]:a.push(e),l++}var f=o===l;if(r=r||f,!r){const e=l;if("string"!=typeof t){const e={};null===a?a=[e]:a.push(e),l++}if(f=e===l,r=r||f,!r){const e=l;if(!(t instanceof Function)){const e={};null===a?a=[e]:a.push(e),l++}f=e===l,r=r||f}}if(r)l=n,null!==a&&(n?a.length=n:a=null);else{const e={};null===a?a=[e]:a.push(e),l++}}}else{const e={};null===a?a=[e]:a.push(e),l++}if(s===l)return De.errors=[{params:{}}],!1;if(l=o,null!==a&&(o?a.length=o:a=null),l===n){if(!e||"object"!=typeof e||Array.isArray(e))return De.errors=[{params:{type:"object"}}],!1;for(const t in e){let n=e[t];const o=l,s=l;let p=!1;const f=l;if(!1!==n){const e={params:{}};null===a?a=[e]:a.push(e),l++}var u=f===l;if(p=p||u,!p){const o=l;if(!(n instanceof RegExp)){const e={params:{}};null===a?a=[e]:a.push(e),l++}if(u=o===l,p=p||u,!p){const o=l;if("string"!=typeof n){const e={params:{type:"string"}};null===a?a=[e]:a.push(e),l++}if(u=o===l,p=p||u,!p){const o=l;if(!(n instanceof Function)){const e={params:{}};null===a?a=[e]:a.push(e),l++}if(u=o===l,p=p||u,!p){const o=l;Pe(n,{instancePath:r+"/cacheGroups/"+t.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:e,parentDataProperty:t,rootData:i})||(a=null===a?Pe.errors:a.concat(Pe.errors),l=a.length),u=o===l,p=p||u}}}}if(!p){const e={params:{}};return null===a?a=[e]:a.push(e),l++,De.errors=a,!1}if(l=s,null!==a&&(s?a.length=s:a=null),o!==l)break}}p=n===l}else p=!0;if(p){if(void 0!==t.chunks){let e=t.chunks;const n=l,r=l;let o=!1;const s=l;if("initial"!==e&&"async"!==e&&"all"!==e){const e={params:{}};null===a?a=[e]:a.push(e),l++}var c=s===l;if(o=o||c,!o){const t=l;if(!(e instanceof RegExp)){const e={params:{}};null===a?a=[e]:a.push(e),l++}if(c=t===l,o=o||c,!o){const t=l;if(!(e instanceof Function)){const e={params:{}};null===a?a=[e]:a.push(e),l++}c=t===l,o=o||c}}if(!o){const e={params:{}};return null===a?a=[e]:a.push(e),l++,De.errors=a,!1}l=r,null!==a&&(r?a.length=r:a=null),p=n===l}else p=!0;if(p){if(void 0!==t.defaultSizeTypes){let e=t.defaultSizeTypes;const n=l;if(l===n){if(!Array.isArray(e))return De.errors=[{params:{type:"array"}}],!1;if(e.length<1)return De.errors=[{params:{limit:1}}],!1;{const t=e.length;for(let n=0;n=",limit:0}};null===a?a=[e]:a.push(e),l++}}else{const e={params:{type:"number"}};null===a?a=[e]:a.push(e),l++}var y=c===l;if(u=u||y,!u){const t=l;if(l===t)if(e&&"object"==typeof e&&!Array.isArray(e))for(const t in e){const n=l;if("number"!=typeof e[t]){const e={params:{type:"number"}};null===a?a=[e]:a.push(e),l++}if(n!==l)break}else{const e={params:{type:"object"}};null===a?a=[e]:a.push(e),l++}y=t===l,u=u||y}if(u)l=f,null!==a&&(f?a.length=f:a=null);else{const e={params:{}};null===a?a=[e]:a.push(e),l++}if(i===l&&(o=!0,s=0),!o){const e={params:{passingSchemas:s}};return null===a?a=[e]:a.push(e),l++,De.errors=a,!1}l=r,null!==a&&(r?a.length=r:a=null),p=n===l}else p=!0;if(p){if(void 0!==t.fallbackCacheGroup){let e=t.fallbackCacheGroup;const n=l;if(l===n){if(!e||"object"!=typeof e||Array.isArray(e))return De.errors=[{params:{type:"object"}}],!1;{const t=l;for(const t in e)if("automaticNameDelimiter"!==t&&"chunks"!==t&&"maxAsyncSize"!==t&&"maxInitialSize"!==t&&"maxSize"!==t&&"minSize"!==t&&"minSizeReduction"!==t)return De.errors=[{params:{additionalProperty:t}}],!1;if(t===l){if(void 0!==e.automaticNameDelimiter){let t=e.automaticNameDelimiter;const n=l;if(l===n){if("string"!=typeof t)return De.errors=[{params:{type:"string"}}],!1;if(t.length<1)return De.errors=[{params:{}}],!1}var m=n===l}else m=!0;if(m){if(void 0!==e.chunks){let t=e.chunks;const n=l,r=l;let o=!1;const s=l;if("initial"!==t&&"async"!==t&&"all"!==t){const e={params:{}};null===a?a=[e]:a.push(e),l++}var d=s===l;if(o=o||d,!o){const e=l;if(!(t instanceof RegExp)){const e={params:{}};null===a?a=[e]:a.push(e),l++}if(d=e===l,o=o||d,!o){const e=l;if(!(t instanceof Function)){const e={params:{}};null===a?a=[e]:a.push(e),l++}d=e===l,o=o||d}}if(!o){const e={params:{}};return null===a?a=[e]:a.push(e),l++,De.errors=a,!1}l=r,null!==a&&(r?a.length=r:a=null),m=n===l}else m=!0;if(m){if(void 0!==e.maxAsyncSize){let t=e.maxAsyncSize;const n=l,r=l;let o=!1,s=null;const i=l,p=l;let f=!1;const u=l;if(l===u)if("number"==typeof t){if(t<0||isNaN(t)){const e={params:{comparison:">=",limit:0}};null===a?a=[e]:a.push(e),l++}}else{const e={params:{type:"number"}};null===a?a=[e]:a.push(e),l++}var h=u===l;if(f=f||h,!f){const e=l;if(l===e)if(t&&"object"==typeof t&&!Array.isArray(t))for(const e in t){const n=l;if("number"!=typeof t[e]){const e={params:{type:"number"}};null===a?a=[e]:a.push(e),l++}if(n!==l)break}else{const e={params:{type:"object"}};null===a?a=[e]:a.push(e),l++}h=e===l,f=f||h}if(f)l=p,null!==a&&(p?a.length=p:a=null);else{const e={params:{}};null===a?a=[e]:a.push(e),l++}if(i===l&&(o=!0,s=0),!o){const e={params:{passingSchemas:s}};return null===a?a=[e]:a.push(e),l++,De.errors=a,!1}l=r,null!==a&&(r?a.length=r:a=null),m=n===l}else m=!0;if(m){if(void 0!==e.maxInitialSize){let t=e.maxInitialSize;const n=l,r=l;let o=!1,s=null;const i=l,p=l;let f=!1;const u=l;if(l===u)if("number"==typeof t){if(t<0||isNaN(t)){const e={params:{comparison:">=",limit:0}};null===a?a=[e]:a.push(e),l++}}else{const e={params:{type:"number"}};null===a?a=[e]:a.push(e),l++}var b=u===l;if(f=f||b,!f){const e=l;if(l===e)if(t&&"object"==typeof t&&!Array.isArray(t))for(const e in t){const n=l;if("number"!=typeof t[e]){const e={params:{type:"number"}};null===a?a=[e]:a.push(e),l++}if(n!==l)break}else{const e={params:{type:"object"}};null===a?a=[e]:a.push(e),l++}b=e===l,f=f||b}if(f)l=p,null!==a&&(p?a.length=p:a=null);else{const e={params:{}};null===a?a=[e]:a.push(e),l++}if(i===l&&(o=!0,s=0),!o){const e={params:{passingSchemas:s}};return null===a?a=[e]:a.push(e),l++,De.errors=a,!1}l=r,null!==a&&(r?a.length=r:a=null),m=n===l}else m=!0;if(m){if(void 0!==e.maxSize){let t=e.maxSize;const n=l,r=l;let o=!1,s=null;const i=l,p=l;let f=!1;const u=l;if(l===u)if("number"==typeof t){if(t<0||isNaN(t)){const e={params:{comparison:">=",limit:0}};null===a?a=[e]:a.push(e),l++}}else{const e={params:{type:"number"}};null===a?a=[e]:a.push(e),l++}var g=u===l;if(f=f||g,!f){const e=l;if(l===e)if(t&&"object"==typeof t&&!Array.isArray(t))for(const e in t){const n=l;if("number"!=typeof t[e]){const e={params:{type:"number"}};null===a?a=[e]:a.push(e),l++}if(n!==l)break}else{const e={params:{type:"object"}};null===a?a=[e]:a.push(e),l++}g=e===l,f=f||g}if(f)l=p,null!==a&&(p?a.length=p:a=null);else{const e={params:{}};null===a?a=[e]:a.push(e),l++}if(i===l&&(o=!0,s=0),!o){const e={params:{passingSchemas:s}};return null===a?a=[e]:a.push(e),l++,De.errors=a,!1}l=r,null!==a&&(r?a.length=r:a=null),m=n===l}else m=!0;if(m){if(void 0!==e.minSize){let t=e.minSize;const n=l,r=l;let o=!1,s=null;const i=l,p=l;let f=!1;const u=l;if(l===u)if("number"==typeof t){if(t<0||isNaN(t)){const e={params:{comparison:">=",limit:0}};null===a?a=[e]:a.push(e),l++}}else{const e={params:{type:"number"}};null===a?a=[e]:a.push(e),l++}var v=u===l;if(f=f||v,!f){const e=l;if(l===e)if(t&&"object"==typeof t&&!Array.isArray(t))for(const e in t){const n=l;if("number"!=typeof t[e]){const e={params:{type:"number"}};null===a?a=[e]:a.push(e),l++}if(n!==l)break}else{const e={params:{type:"object"}};null===a?a=[e]:a.push(e),l++}v=e===l,f=f||v}if(f)l=p,null!==a&&(p?a.length=p:a=null);else{const e={params:{}};null===a?a=[e]:a.push(e),l++}if(i===l&&(o=!0,s=0),!o){const e={params:{passingSchemas:s}};return null===a?a=[e]:a.push(e),l++,De.errors=a,!1}l=r,null!==a&&(r?a.length=r:a=null),m=n===l}else m=!0;if(m)if(void 0!==e.minSizeReduction){let t=e.minSizeReduction;const n=l,r=l;let o=!1,s=null;const i=l,p=l;let f=!1;const u=l;if(l===u)if("number"==typeof t){if(t<0||isNaN(t)){const e={params:{comparison:">=",limit:0}};null===a?a=[e]:a.push(e),l++}}else{const e={params:{type:"number"}};null===a?a=[e]:a.push(e),l++}var P=u===l;if(f=f||P,!f){const e=l;if(l===e)if(t&&"object"==typeof t&&!Array.isArray(t))for(const e in t){const n=l;if("number"!=typeof t[e]){const e={params:{type:"number"}};null===a?a=[e]:a.push(e),l++}if(n!==l)break}else{const e={params:{type:"object"}};null===a?a=[e]:a.push(e),l++}P=e===l,f=f||P}if(f)l=p,null!==a&&(p?a.length=p:a=null);else{const e={params:{}};null===a?a=[e]:a.push(e),l++}if(i===l&&(o=!0,s=0),!o){const e={params:{passingSchemas:s}};return null===a?a=[e]:a.push(e),l++,De.errors=a,!1}l=r,null!==a&&(r?a.length=r:a=null),m=n===l}else m=!0}}}}}}}}p=n===l}else p=!0;if(p){if(void 0!==t.filename){let n=t.filename;const r=l,o=l;let s=!1;const i=l;if(l===i)if("string"==typeof n){if(n.includes("!")||!1!==e.test(n)){const e={params:{}};null===a?a=[e]:a.push(e),l++}else if(n.length<1){const e={params:{}};null===a?a=[e]:a.push(e),l++}}else{const e={params:{type:"string"}};null===a?a=[e]:a.push(e),l++}var D=i===l;if(s=s||D,!s){const e=l;if(!(n instanceof Function)){const e={params:{}};null===a?a=[e]:a.push(e),l++}D=e===l,s=s||D}if(!s){const e={params:{}};return null===a?a=[e]:a.push(e),l++,De.errors=a,!1}l=o,null!==a&&(o?a.length=o:a=null),p=r===l}else p=!0;if(p){if(void 0!==t.hidePathInfo){const e=l;if("boolean"!=typeof t.hidePathInfo)return De.errors=[{params:{type:"boolean"}}],!1;p=e===l}else p=!0;if(p){if(void 0!==t.maxAsyncRequests){let e=t.maxAsyncRequests;const n=l;if(l===n){if("number"!=typeof e)return De.errors=[{params:{type:"number"}}],!1;if(e<1||isNaN(e))return De.errors=[{params:{comparison:">=",limit:1}}],!1}p=n===l}else p=!0;if(p){if(void 0!==t.maxAsyncSize){let e=t.maxAsyncSize;const n=l,r=l;let o=!1,s=null;const i=l,f=l;let u=!1;const c=l;if(l===c)if("number"==typeof e){if(e<0||isNaN(e)){const e={params:{comparison:">=",limit:0}};null===a?a=[e]:a.push(e),l++}}else{const e={params:{type:"number"}};null===a?a=[e]:a.push(e),l++}var O=c===l;if(u=u||O,!u){const t=l;if(l===t)if(e&&"object"==typeof e&&!Array.isArray(e))for(const t in e){const n=l;if("number"!=typeof e[t]){const e={params:{type:"number"}};null===a?a=[e]:a.push(e),l++}if(n!==l)break}else{const e={params:{type:"object"}};null===a?a=[e]:a.push(e),l++}O=t===l,u=u||O}if(u)l=f,null!==a&&(f?a.length=f:a=null);else{const e={params:{}};null===a?a=[e]:a.push(e),l++}if(i===l&&(o=!0,s=0),!o){const e={params:{passingSchemas:s}};return null===a?a=[e]:a.push(e),l++,De.errors=a,!1}l=r,null!==a&&(r?a.length=r:a=null),p=n===l}else p=!0;if(p){if(void 0!==t.maxInitialRequests){let e=t.maxInitialRequests;const n=l;if(l===n){if("number"!=typeof e)return De.errors=[{params:{type:"number"}}],!1;if(e<1||isNaN(e))return De.errors=[{params:{comparison:">=",limit:1}}],!1}p=n===l}else p=!0;if(p){if(void 0!==t.maxInitialSize){let e=t.maxInitialSize;const n=l,r=l;let o=!1,s=null;const i=l,f=l;let u=!1;const c=l;if(l===c)if("number"==typeof e){if(e<0||isNaN(e)){const e={params:{comparison:">=",limit:0}};null===a?a=[e]:a.push(e),l++}}else{const e={params:{type:"number"}};null===a?a=[e]:a.push(e),l++}var C=c===l;if(u=u||C,!u){const t=l;if(l===t)if(e&&"object"==typeof e&&!Array.isArray(e))for(const t in e){const n=l;if("number"!=typeof e[t]){const e={params:{type:"number"}};null===a?a=[e]:a.push(e),l++}if(n!==l)break}else{const e={params:{type:"object"}};null===a?a=[e]:a.push(e),l++}C=t===l,u=u||C}if(u)l=f,null!==a&&(f?a.length=f:a=null);else{const e={params:{}};null===a?a=[e]:a.push(e),l++}if(i===l&&(o=!0,s=0),!o){const e={params:{passingSchemas:s}};return null===a?a=[e]:a.push(e),l++,De.errors=a,!1}l=r,null!==a&&(r?a.length=r:a=null),p=n===l}else p=!0;if(p){if(void 0!==t.maxSize){let e=t.maxSize;const n=l,r=l;let o=!1,s=null;const i=l,f=l;let u=!1;const c=l;if(l===c)if("number"==typeof e){if(e<0||isNaN(e)){const e={params:{comparison:">=",limit:0}};null===a?a=[e]:a.push(e),l++}}else{const e={params:{type:"number"}};null===a?a=[e]:a.push(e),l++}var x=c===l;if(u=u||x,!u){const t=l;if(l===t)if(e&&"object"==typeof e&&!Array.isArray(e))for(const t in e){const n=l;if("number"!=typeof e[t]){const e={params:{type:"number"}};null===a?a=[e]:a.push(e),l++}if(n!==l)break}else{const e={params:{type:"object"}};null===a?a=[e]:a.push(e),l++}x=t===l,u=u||x}if(u)l=f,null!==a&&(f?a.length=f:a=null);else{const e={params:{}};null===a?a=[e]:a.push(e),l++}if(i===l&&(o=!0,s=0),!o){const e={params:{passingSchemas:s}};return null===a?a=[e]:a.push(e),l++,De.errors=a,!1}l=r,null!==a&&(r?a.length=r:a=null),p=n===l}else p=!0;if(p){if(void 0!==t.minChunks){let e=t.minChunks;const n=l;if(l===n){if("number"!=typeof e)return De.errors=[{params:{type:"number"}}],!1;if(e<1||isNaN(e))return De.errors=[{params:{comparison:">=",limit:1}}],!1}p=n===l}else p=!0;if(p){if(void 0!==t.minRemainingSize){let e=t.minRemainingSize;const n=l,r=l;let o=!1,s=null;const i=l,f=l;let u=!1;const c=l;if(l===c)if("number"==typeof e){if(e<0||isNaN(e)){const e={params:{comparison:">=",limit:0}};null===a?a=[e]:a.push(e),l++}}else{const e={params:{type:"number"}};null===a?a=[e]:a.push(e),l++}var $=c===l;if(u=u||$,!u){const t=l;if(l===t)if(e&&"object"==typeof e&&!Array.isArray(e))for(const t in e){const n=l;if("number"!=typeof e[t]){const e={params:{type:"number"}};null===a?a=[e]:a.push(e),l++}if(n!==l)break}else{const e={params:{type:"object"}};null===a?a=[e]:a.push(e),l++}$=t===l,u=u||$}if(u)l=f,null!==a&&(f?a.length=f:a=null);else{const e={params:{}};null===a?a=[e]:a.push(e),l++}if(i===l&&(o=!0,s=0),!o){const e={params:{passingSchemas:s}};return null===a?a=[e]:a.push(e),l++,De.errors=a,!1}l=r,null!==a&&(r?a.length=r:a=null),p=n===l}else p=!0;if(p){if(void 0!==t.minSize){let e=t.minSize;const n=l,r=l;let o=!1,s=null;const i=l,f=l;let u=!1;const c=l;if(l===c)if("number"==typeof e){if(e<0||isNaN(e)){const e={params:{comparison:">=",limit:0}};null===a?a=[e]:a.push(e),l++}}else{const e={params:{type:"number"}};null===a?a=[e]:a.push(e),l++}var A=c===l;if(u=u||A,!u){const t=l;if(l===t)if(e&&"object"==typeof e&&!Array.isArray(e))for(const t in e){const n=l;if("number"!=typeof e[t]){const e={params:{type:"number"}};null===a?a=[e]:a.push(e),l++}if(n!==l)break}else{const e={params:{type:"object"}};null===a?a=[e]:a.push(e),l++}A=t===l,u=u||A}if(u)l=f,null!==a&&(f?a.length=f:a=null);else{const e={params:{}};null===a?a=[e]:a.push(e),l++}if(i===l&&(o=!0,s=0),!o){const e={params:{passingSchemas:s}};return null===a?a=[e]:a.push(e),l++,De.errors=a,!1}l=r,null!==a&&(r?a.length=r:a=null),p=n===l}else p=!0;if(p){if(void 0!==t.minSizeReduction){let e=t.minSizeReduction;const n=l,r=l;let o=!1,s=null;const i=l,f=l;let u=!1;const c=l;if(l===c)if("number"==typeof e){if(e<0||isNaN(e)){const e={params:{comparison:">=",limit:0}};null===a?a=[e]:a.push(e),l++}}else{const e={params:{type:"number"}};null===a?a=[e]:a.push(e),l++}var k=c===l;if(u=u||k,!u){const t=l;if(l===t)if(e&&"object"==typeof e&&!Array.isArray(e))for(const t in e){const n=l;if("number"!=typeof e[t]){const e={params:{type:"number"}};null===a?a=[e]:a.push(e),l++}if(n!==l)break}else{const e={params:{type:"object"}};null===a?a=[e]:a.push(e),l++}k=t===l,u=u||k}if(u)l=f,null!==a&&(f?a.length=f:a=null);else{const e={params:{}};null===a?a=[e]:a.push(e),l++}if(i===l&&(o=!0,s=0),!o){const e={params:{passingSchemas:s}};return null===a?a=[e]:a.push(e),l++,De.errors=a,!1}l=r,null!==a&&(r?a.length=r:a=null),p=n===l}else p=!0;if(p){if(void 0!==t.name){let e=t.name;const n=l,r=l;let o=!1;const s=l;if(!1!==e){const e={params:{}};null===a?a=[e]:a.push(e),l++}var j=s===l;if(o=o||j,!o){const t=l;if("string"!=typeof e){const e={params:{type:"string"}};null===a?a=[e]:a.push(e),l++}if(j=t===l,o=o||j,!o){const t=l;if(!(e instanceof Function)){const e={params:{}};null===a?a=[e]:a.push(e),l++}j=t===l,o=o||j}}if(!o){const e={params:{}};return null===a?a=[e]:a.push(e),l++,De.errors=a,!1}l=r,null!==a&&(r?a.length=r:a=null),p=n===l}else p=!0;if(p)if(void 0!==t.usedExports){const e=l;if("boolean"!=typeof t.usedExports)return De.errors=[{params:{type:"boolean"}}],!1;p=e===l}else p=!0}}}}}}}}}}}}}}}}}}}}return De.errors=a,0===l}function Oe(e,{instancePath:t="",parentData:r,parentDataProperty:o,rootData:s=e}={}){let i=null,a=0;if(0===a){if(!e||"object"!=typeof e||Array.isArray(e))return Oe.errors=[{params:{type:"object"}}],!1;{const r=a;for(const t in e)if(!n.call(be.properties,t))return Oe.errors=[{params:{additionalProperty:t}}],!1;if(r===a){if(void 0!==e.avoidEntryIife){const t=a;if("boolean"!=typeof e.avoidEntryIife)return Oe.errors=[{params:{type:"boolean"}}],!1;var l=t===a}else l=!0;if(l){if(void 0!==e.checkWasmTypes){const t=a;if("boolean"!=typeof e.checkWasmTypes)return Oe.errors=[{params:{type:"boolean"}}],!1;l=t===a}else l=!0;if(l){if(void 0!==e.chunkIds){let t=e.chunkIds;const n=a;if("natural"!==t&&"named"!==t&&"deterministic"!==t&&"size"!==t&&"total-size"!==t&&!1!==t)return Oe.errors=[{params:{}}],!1;l=n===a}else l=!0;if(l){if(void 0!==e.concatenateModules){const t=a;if("boolean"!=typeof e.concatenateModules)return Oe.errors=[{params:{type:"boolean"}}],!1;l=t===a}else l=!0;if(l){if(void 0!==e.emitOnErrors){const t=a;if("boolean"!=typeof e.emitOnErrors)return Oe.errors=[{params:{type:"boolean"}}],!1;l=t===a}else l=!0;if(l){if(void 0!==e.flagIncludedChunks){const t=a;if("boolean"!=typeof e.flagIncludedChunks)return Oe.errors=[{params:{type:"boolean"}}],!1;l=t===a}else l=!0;if(l){if(void 0!==e.innerGraph){const t=a;if("boolean"!=typeof e.innerGraph)return Oe.errors=[{params:{type:"boolean"}}],!1;l=t===a}else l=!0;if(l){if(void 0!==e.mangleExports){let t=e.mangleExports;const n=a,r=a;let o=!1;const s=a;if("size"!==t&&"deterministic"!==t){const e={params:{}};null===i?i=[e]:i.push(e),a++}var p=s===a;if(o=o||p,!o){const e=a;if("boolean"!=typeof t){const e={params:{type:"boolean"}};null===i?i=[e]:i.push(e),a++}p=e===a,o=o||p}if(!o){const e={params:{}};return null===i?i=[e]:i.push(e),a++,Oe.errors=i,!1}a=r,null!==i&&(r?i.length=r:i=null),l=n===a}else l=!0;if(l){if(void 0!==e.mangleWasmImports){const t=a;if("boolean"!=typeof e.mangleWasmImports)return Oe.errors=[{params:{type:"boolean"}}],!1;l=t===a}else l=!0;if(l){if(void 0!==e.mergeDuplicateChunks){const t=a;if("boolean"!=typeof e.mergeDuplicateChunks)return Oe.errors=[{params:{type:"boolean"}}],!1;l=t===a}else l=!0;if(l){if(void 0!==e.minimize){const t=a;if("boolean"!=typeof e.minimize)return Oe.errors=[{params:{type:"boolean"}}],!1;l=t===a}else l=!0;if(l){if(void 0!==e.minimizer){let t=e.minimizer;const n=a;if(a===n){if(!Array.isArray(t))return Oe.errors=[{params:{type:"array"}}],!1;{const e=t.length;for(let n=0;n=",limit:1}}],!1}u=n===f}else u=!0;if(u){if(void 0!==t.hashFunction){let e=t.hashFunction;const n=f,r=f;let o=!1;const s=f;if(f===s)if("string"==typeof e){if(e.length<1){const e={params:{}};null===l?l=[e]:l.push(e),f++}}else{const e={params:{type:"string"}};null===l?l=[e]:l.push(e),f++}var v=s===f;if(o=o||v,!o){const t=f;if(!(e instanceof Function)){const e={params:{}};null===l?l=[e]:l.push(e),f++}v=t===f,o=o||v}if(!o){const e={params:{}};return null===l?l=[e]:l.push(e),f++,ze.errors=l,!1}f=r,null!==l&&(r?l.length=r:l=null),u=n===f}else u=!0;if(u){if(void 0!==t.hashSalt){let e=t.hashSalt;const n=f;if(f==f){if("string"!=typeof e)return ze.errors=[{params:{type:"string"}}],!1;if(e.length<1)return ze.errors=[{params:{}}],!1}u=n===f}else u=!0;if(u){if(void 0!==t.hotUpdateChunkFilename){let n=t.hotUpdateChunkFilename;const r=f;if(f==f){if("string"!=typeof n)return ze.errors=[{params:{type:"string"}}],!1;if(n.includes("!")||!1!==e.test(n))return ze.errors=[{params:{}}],!1}u=r===f}else u=!0;if(u){if(void 0!==t.hotUpdateGlobal){const e=f;if("string"!=typeof t.hotUpdateGlobal)return ze.errors=[{params:{type:"string"}}],!1;u=e===f}else u=!0;if(u){if(void 0!==t.hotUpdateMainFilename){let n=t.hotUpdateMainFilename;const r=f;if(f==f){if("string"!=typeof n)return ze.errors=[{params:{type:"string"}}],!1;if(n.includes("!")||!1!==e.test(n))return ze.errors=[{params:{}}],!1}u=r===f}else u=!0;if(u){if(void 0!==t.ignoreBrowserWarnings){const e=f;if("boolean"!=typeof t.ignoreBrowserWarnings)return ze.errors=[{params:{type:"boolean"}}],!1;u=e===f}else u=!0;if(u){if(void 0!==t.iife){const e=f;if("boolean"!=typeof t.iife)return ze.errors=[{params:{type:"boolean"}}],!1;u=e===f}else u=!0;if(u){if(void 0!==t.importFunctionName){const e=f;if("string"!=typeof t.importFunctionName)return ze.errors=[{params:{type:"string"}}],!1;u=e===f}else u=!0;if(u){if(void 0!==t.importMetaName){const e=f;if("string"!=typeof t.importMetaName)return ze.errors=[{params:{type:"string"}}],!1;u=e===f}else u=!0;if(u){if(void 0!==t.library){const e=f;Le(t.library,{instancePath:r+"/library",parentData:t,parentDataProperty:"library",rootData:i})||(l=null===l?Le.errors:l.concat(Le.errors),f=l.length),u=e===f}else u=!0;if(u){if(void 0!==t.libraryExport){let e=t.libraryExport;const n=f,r=f;let o=!1,s=null;const i=f,a=f;let p=!1;const c=f;if(f===c)if(Array.isArray(e)){const t=e.length;for(let n=0;n=",limit:1}}],!1}c=t===f}else c=!0;if(c){if(void 0!==r.performance){const e=f;Me(r.performance,{instancePath:o+"/performance",parentData:r,parentDataProperty:"performance",rootData:l})||(p=null===p?Me.errors:p.concat(Me.errors),f=p.length),c=e===f}else c=!0;if(c){if(void 0!==r.plugins){const e=f;we(r.plugins,{instancePath:o+"/plugins",parentData:r,parentDataProperty:"plugins",rootData:l})||(p=null===p?we.errors:p.concat(we.errors),f=p.length),c=e===f}else c=!0;if(c){if(void 0!==r.profile){const e=f;if("boolean"!=typeof r.profile)return _e.errors=[{params:{type:"boolean"}}],!1;c=e===f}else c=!0;if(c){if(void 0!==r.recordsInputPath){let t=r.recordsInputPath;const n=f,o=f;let s=!1;const i=f;if(!1!==t){const e={params:{}};null===p?p=[e]:p.push(e),f++}var v=i===f;if(s=s||v,!s){const n=f;if(f===n)if("string"==typeof t){if(t.includes("!")||!0!==e.test(t)){const e={params:{}};null===p?p=[e]:p.push(e),f++}}else{const e={params:{type:"string"}};null===p?p=[e]:p.push(e),f++}v=n===f,s=s||v}if(!s){const e={params:{}};return null===p?p=[e]:p.push(e),f++,_e.errors=p,!1}f=o,null!==p&&(o?p.length=o:p=null),c=n===f}else c=!0;if(c){if(void 0!==r.recordsOutputPath){let t=r.recordsOutputPath;const n=f,o=f;let s=!1;const i=f;if(!1!==t){const e={params:{}};null===p?p=[e]:p.push(e),f++}var P=i===f;if(s=s||P,!s){const n=f;if(f===n)if("string"==typeof t){if(t.includes("!")||!0!==e.test(t)){const e={params:{}};null===p?p=[e]:p.push(e),f++}}else{const e={params:{type:"string"}};null===p?p=[e]:p.push(e),f++}P=n===f,s=s||P}if(!s){const e={params:{}};return null===p?p=[e]:p.push(e),f++,_e.errors=p,!1}f=o,null!==p&&(o?p.length=o:p=null),c=n===f}else c=!0;if(c){if(void 0!==r.recordsPath){let t=r.recordsPath;const n=f,o=f;let s=!1;const i=f;if(!1!==t){const e={params:{}};null===p?p=[e]:p.push(e),f++}var D=i===f;if(s=s||D,!s){const n=f;if(f===n)if("string"==typeof t){if(t.includes("!")||!0!==e.test(t)){const e={params:{}};null===p?p=[e]:p.push(e),f++}}else{const e={params:{type:"string"}};null===p?p=[e]:p.push(e),f++}D=n===f,s=s||D}if(!s){const e={params:{}};return null===p?p=[e]:p.push(e),f++,_e.errors=p,!1}f=o,null!==p&&(o?p.length=o:p=null),c=n===f}else c=!0;if(c){if(void 0!==r.resolve){const e=f;Ie(r.resolve,{instancePath:o+"/resolve",parentData:r,parentDataProperty:"resolve",rootData:l})||(p=null===p?Ie.errors:p.concat(Ie.errors),f=p.length),c=e===f}else c=!0;if(c){if(void 0!==r.resolveLoader){const e=f;Te(r.resolveLoader,{instancePath:o+"/resolveLoader",parentData:r,parentDataProperty:"resolveLoader",rootData:l})||(p=null===p?Te.errors:p.concat(Te.errors),f=p.length),c=e===f}else c=!0;if(c){if(void 0!==r.snapshot){let t=r.snapshot;const n=f;if(f==f){if(!t||"object"!=typeof t||Array.isArray(t))return _e.errors=[{params:{type:"object"}}],!1;{const n=f;for(const e in t)if("buildDependencies"!==e&&"contextModule"!==e&&"immutablePaths"!==e&&"managedPaths"!==e&&"module"!==e&&"resolve"!==e&&"resolveBuildDependencies"!==e&&"unmanagedPaths"!==e)return _e.errors=[{params:{additionalProperty:e}}],!1;if(n===f){if(void 0!==t.buildDependencies){let e=t.buildDependencies;const n=f;if(f===n){if(!e||"object"!=typeof e||Array.isArray(e))return _e.errors=[{params:{type:"object"}}],!1;{const t=f;for(const t in e)if("hash"!==t&&"timestamp"!==t)return _e.errors=[{params:{additionalProperty:t}}],!1;if(t===f){if(void 0!==e.hash){const t=f;if("boolean"!=typeof e.hash)return _e.errors=[{params:{type:"boolean"}}],!1;var O=t===f}else O=!0;if(O)if(void 0!==e.timestamp){const t=f;if("boolean"!=typeof e.timestamp)return _e.errors=[{params:{type:"boolean"}}],!1;O=t===f}else O=!0}}}var $=n===f}else $=!0;if($){if(void 0!==t.contextModule){let e=t.contextModule;const n=f;if(f===n){if(!e||"object"!=typeof e||Array.isArray(e))return _e.errors=[{params:{type:"object"}}],!1;{const t=f;for(const t in e)if("hash"!==t&&"timestamp"!==t)return _e.errors=[{params:{additionalProperty:t}}],!1;if(t===f){if(void 0!==e.hash){const t=f;if("boolean"!=typeof e.hash)return _e.errors=[{params:{type:"boolean"}}],!1;var A=t===f}else A=!0;if(A)if(void 0!==e.timestamp){const t=f;if("boolean"!=typeof e.timestamp)return _e.errors=[{params:{type:"boolean"}}],!1;A=t===f}else A=!0}}}$=n===f}else $=!0;if($){if(void 0!==t.immutablePaths){let n=t.immutablePaths;const r=f;if(f===r){if(!Array.isArray(n))return _e.errors=[{params:{type:"array"}}],!1;{const t=n.length;for(let r=0;r=",limit:1}};null===p?p=[e]:p.push(e),f++}}else{const e={params:{type:"number"}};null===p?p=[e]:p.push(e),f++}d=n===f}else d=!0;if(d)if(void 0!==t.type){const e=f;if("memory"!==t.type){const e={params:{}};null===p?p=[e]:p.push(e),f++}d=e===f}else d=!0}}}}else{const e={params:{type:"object"}};null===p?p=[e]:p.push(e),f++}if(m=o===f,c=c||m,!c){const o=f;if(f==f)if(t&&"object"==typeof t&&!Array.isArray(t)){let o;if(void 0===t.type&&(o="type")){const e={params:{missingProperty:o}};null===p?p=[e]:p.push(e),f++}else{const o=f;for(const e in t)if(!n.call(r.properties,e)){const t={params:{additionalProperty:e}};null===p?p=[t]:p.push(t),f++;break}if(o===f){if(void 0!==t.allowCollectingMemory){const e=f;if("boolean"!=typeof t.allowCollectingMemory){const e={params:{type:"boolean"}};null===p?p=[e]:p.push(e),f++}var h=e===f}else h=!0;if(h){if(void 0!==t.buildDependencies){let e=t.buildDependencies;const n=f;if(f===n)if(e&&"object"==typeof e&&!Array.isArray(e))for(const t in e){let n=e[t];const r=f;if(f===r)if(Array.isArray(n)){const e=n.length;for(let t=0;t=",limit:0}};null===p?p=[e]:p.push(e),f++}}else{const e={params:{type:"number"}};null===p?p=[e]:p.push(e),f++}h=n===f}else h=!0;if(h){if(void 0!==t.idleTimeoutAfterLargeChanges){let e=t.idleTimeoutAfterLargeChanges;const n=f;if(f===n)if("number"==typeof e){if(e<0||isNaN(e)){const e={params:{comparison:">=",limit:0}};null===p?p=[e]:p.push(e),f++}}else{const e={params:{type:"number"}};null===p?p=[e]:p.push(e),f++}h=n===f}else h=!0;if(h){if(void 0!==t.idleTimeoutForInitialStore){let e=t.idleTimeoutForInitialStore;const n=f;if(f===n)if("number"==typeof e){if(e<0||isNaN(e)){const e={params:{comparison:">=",limit:0}};null===p?p=[e]:p.push(e),f++}}else{const e={params:{type:"number"}};null===p?p=[e]:p.push(e),f++}h=n===f}else h=!0;if(h){if(void 0!==t.immutablePaths){let n=t.immutablePaths;const r=f;if(f===r)if(Array.isArray(n)){const t=n.length;for(let r=0;r=",limit:0}};null===p?p=[e]:p.push(e),f++}}else{const e={params:{type:"number"}};null===p?p=[e]:p.push(e),f++}h=n===f}else h=!0;if(h){if(void 0!==t.maxMemoryGenerations){let e=t.maxMemoryGenerations;const n=f;if(f===n)if("number"==typeof e){if(e<0||isNaN(e)){const e={params:{comparison:">=",limit:0}};null===p?p=[e]:p.push(e),f++}}else{const e={params:{type:"number"}};null===p?p=[e]:p.push(e),f++}h=n===f}else h=!0;if(h){if(void 0!==t.memoryCacheUnaffected){const e=f;if("boolean"!=typeof t.memoryCacheUnaffected){const e={params:{type:"boolean"}};null===p?p=[e]:p.push(e),f++}h=e===f}else h=!0;if(h){if(void 0!==t.name){const e=f;if("string"!=typeof t.name){const e={params:{type:"string"}};null===p?p=[e]:p.push(e),f++}h=e===f}else h=!0;if(h){if(void 0!==t.profile){const e=f;if("boolean"!=typeof t.profile){const e={params:{type:"boolean"}};null===p?p=[e]:p.push(e),f++}h=e===f}else h=!0;if(h){if(void 0!==t.readonly){const e=f;if("boolean"!=typeof t.readonly){const e={params:{type:"boolean"}};null===p?p=[e]:p.push(e),f++}h=e===f}else h=!0;if(h){if(void 0!==t.store){const e=f;if("pack"!==t.store){const e={params:{}};null===p?p=[e]:p.push(e),f++}h=e===f}else h=!0;if(h){if(void 0!==t.type){const e=f;if("filesystem"!==t.type){const e={params:{}};null===p?p=[e]:p.push(e),f++}h=e===f}else h=!0;if(h)if(void 0!==t.version){const e=f;if("string"!=typeof t.version){const e={params:{type:"string"}};null===p?p=[e]:p.push(e),f++}h=e===f}else h=!0}}}}}}}}}}}}}}}}}}}}}else{const e={params:{type:"object"}};null===p?p=[e]:p.push(e),f++}m=o===f,c=c||m}}if(!c){const e={params:{}};return null===p?p=[e]:p.push(e),f++,o.errors=p,!1}return f=u,null!==p&&(u?p.length=u:p=null),o.errors=p,0===f}function s(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:i=e}={}){let a=null,l=0;const p=l;let f=!1;const u=l;if(!0!==e){const e={params:{}};null===a?a=[e]:a.push(e),l++}var c=u===l;if(f=f||c,!f){const s=l;o(e,{instancePath:t,parentData:n,parentDataProperty:r,rootData:i})||(a=null===a?o.errors:a.concat(o.errors),l=a.length),c=s===l,f=f||c}if(!f){const e={params:{}};return null===a?a=[e]:a.push(e),l++,s.errors=a,!1}return l=p,null!==a&&(p?a.length=p:a=null),s.errors=a,0===l}function i(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:o=e}={}){let s=null,a=0;const l=a;let p=!1;const f=a;if("boolean"!=typeof e){const e={params:{type:"boolean"}};null===s?s=[e]:s.push(e),a++}var u=f===a;if(p=p||u,!p){const t=a;if(a==a)if(e&&"object"==typeof e&&!Array.isArray(e)){const t=a;for(const t in e)if("envDir"!==t&&"prefixes"!==t){const e={params:{additionalProperty:t}};null===s?s=[e]:s.push(e),a++;break}if(t===a){if(void 0!==e.envDir){let t=e.envDir;const n=a;if(a===n)if("string"==typeof t){if(t.length<1){const e={params:{}};null===s?s=[e]:s.push(e),a++}}else{const e={params:{type:"string"}};null===s?s=[e]:s.push(e),a++}var c=n===a}else c=!0;if(c)if(void 0!==e.prefixes){let t=e.prefixes;const n=a,r=a;let o=!1;const i=a;if(a===i)if(Array.isArray(t)){const e=t.length;for(let n=0;n1){const r={};for(;n--;){let o=t[n];if("string"==typeof o){if("number"==typeof r[o]){e=r[o];const t={params:{i:n,j:e}};null===i?i=[t]:i.push(t),f++;break}r[o]=n}}}}}else{const e={params:{type:"array"}};null===i?i=[e]:i.push(e),f++}var b=s===f;if(o=o||b,!o){const e=f;if(f===e)if("string"==typeof t){if(t.length<1){const e={params:{}};null===i?i=[e]:i.push(e),f++}}else{const e={params:{type:"string"}};null===i?i=[e]:i.push(e),f++}b=e===f,o=o||b}if(!o){const e={params:{}};return null===i?i=[e]:i.push(e),f++,d.errors=i,!1}f=r,null!==i&&(r?i.length=r:i=null),u=n===f}else u=!0;if(u){if(void 0!==e.filename){const n=f;p(e.filename,{instancePath:t+"/filename",parentData:e,parentDataProperty:"filename",rootData:s})||(i=null===i?p.errors:i.concat(p.errors),f=i.length),u=n===f}else u=!0;if(u){if(void 0!==e.import){let t=e.import;const n=f,r=f;let o=!1;const s=f;if(f===s)if(Array.isArray(t))if(t.length<1){const e={params:{limit:1}};null===i?i=[e]:i.push(e),f++}else{var g=!0;const e=t.length;for(let n=0;n1){const r={};for(;n--;){let o=t[n];if("string"==typeof o){if("number"==typeof r[o]){e=r[o];const t={params:{i:n,j:e}};null===i?i=[t]:i.push(t),f++;break}r[o]=n}}}}}else{const e={params:{type:"array"}};null===i?i=[e]:i.push(e),f++}var v=s===f;if(o=o||v,!o){const e=f;if(f===e)if("string"==typeof t){if(t.length<1){const e={params:{}};null===i?i=[e]:i.push(e),f++}}else{const e={params:{type:"string"}};null===i?i=[e]:i.push(e),f++}v=e===f,o=o||v}if(!o){const e={params:{}};return null===i?i=[e]:i.push(e),f++,d.errors=i,!1}f=r,null!==i&&(r?i.length=r:i=null),u=n===f}else u=!0;if(u){if(void 0!==e.layer){let t=e.layer;const n=f,r=f;let o=!1;const s=f;if(null!==t){const e={params:{}};null===i?i=[e]:i.push(e),f++}var P=s===f;if(o=o||P,!o){const e=f;if(f===e)if("string"==typeof t){if(t.length<1){const e={params:{}};null===i?i=[e]:i.push(e),f++}}else{const e={params:{type:"string"}};null===i?i=[e]:i.push(e),f++}P=e===f,o=o||P}if(!o){const e={params:{}};return null===i?i=[e]:i.push(e),f++,d.errors=i,!1}f=r,null!==i&&(r?i.length=r:i=null),u=n===f}else u=!0;if(u){if(void 0!==e.library){const n=f;c(e.library,{instancePath:t+"/library",parentData:e,parentDataProperty:"library",rootData:s})||(i=null===i?c.errors:i.concat(c.errors),f=i.length),u=n===f}else u=!0;if(u){if(void 0!==e.publicPath){const n=f;y(e.publicPath,{instancePath:t+"/publicPath",parentData:e,parentDataProperty:"publicPath",rootData:s})||(i=null===i?y.errors:i.concat(y.errors),f=i.length),u=n===f}else u=!0;if(u){if(void 0!==e.runtime){let t=e.runtime;const n=f,r=f;let o=!1;const s=f;if(!1!==t){const e={params:{}};null===i?i=[e]:i.push(e),f++}var D=s===f;if(o=o||D,!o){const e=f;if(f===e)if("string"==typeof t){if(t.length<1){const e={params:{}};null===i?i=[e]:i.push(e),f++}}else{const e={params:{type:"string"}};null===i?i=[e]:i.push(e),f++}D=e===f,o=o||D}if(!o){const e={params:{}};return null===i?i=[e]:i.push(e),f++,d.errors=i,!1}f=r,null!==i&&(r?i.length=r:i=null),u=n===f}else u=!0;if(u)if(void 0!==e.wasmLoading){const n=f;m(e.wasmLoading,{instancePath:t+"/wasmLoading",parentData:e,parentDataProperty:"wasmLoading",rootData:s})||(i=null===i?m.errors:i.concat(m.errors),f=i.length),u=n===f}else u=!0}}}}}}}}}}}}}return d.errors=i,0===f}function h(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:o=e}={}){let s=null,i=0;if(0===i){if(!e||"object"!=typeof e||Array.isArray(e))return h.errors=[{params:{type:"object"}}],!1;for(const n in e){let r=e[n];const f=i,u=i;let c=!1;const y=i,m=i;let b=!1;const g=i;if(i===g)if(Array.isArray(r))if(r.length<1){const e={params:{limit:1}};null===s?s=[e]:s.push(e),i++}else{var a=!0;const e=r.length;for(let t=0;t1){const n={};for(;t--;){let o=r[t];if("string"==typeof o){if("number"==typeof n[o]){e=n[o];const r={params:{i:t,j:e}};null===s?s=[r]:s.push(r),i++;break}n[o]=t}}}}}else{const e={params:{type:"array"}};null===s?s=[e]:s.push(e),i++}var l=g===i;if(b=b||l,!b){const e=i;if(i===e)if("string"==typeof r){if(r.length<1){const e={params:{}};null===s?s=[e]:s.push(e),i++}}else{const e={params:{type:"string"}};null===s?s=[e]:s.push(e),i++}l=e===i,b=b||l}if(b)i=m,null!==s&&(m?s.length=m:s=null);else{const e={params:{}};null===s?s=[e]:s.push(e),i++}var p=y===i;if(c=c||p,!c){const a=i;d(r,{instancePath:t+"/"+n.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:e,parentDataProperty:n,rootData:o})||(s=null===s?d.errors:s.concat(d.errors),i=s.length),p=a===i,c=c||p}if(!c){const e={params:{}};return null===s?s=[e]:s.push(e),i++,h.errors=s,!1}if(i=u,null!==s&&(u?s.length=u:s=null),f!==i)break}}return h.errors=s,0===i}function b(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:o=e}={}){let s=null,i=0;const a=i;let l=!1,p=null;const f=i,u=i;let c=!1;const y=i;if(i===y)if(Array.isArray(e))if(e.length<1){const e={params:{limit:1}};null===s?s=[e]:s.push(e),i++}else{var m=!0;const t=e.length;for(let n=0;n1){const r={};for(;n--;){let o=e[n];if("string"==typeof o){if("number"==typeof r[o]){t=r[o];const e={params:{i:n,j:t}};null===s?s=[e]:s.push(e),i++;break}r[o]=n}}}}}else{const e={params:{type:"array"}};null===s?s=[e]:s.push(e),i++}var d=y===i;if(c=c||d,!c){const t=i;if(i===t)if("string"==typeof e){if(e.length<1){const e={params:{}};null===s?s=[e]:s.push(e),i++}}else{const e={params:{type:"string"}};null===s?s=[e]:s.push(e),i++}d=t===i,c=c||d}if(c)i=u,null!==s&&(u?s.length=u:s=null);else{const e={params:{}};null===s?s=[e]:s.push(e),i++}if(f===i&&(l=!0,p=0),!l){const e={params:{passingSchemas:p}};return null===s?s=[e]:s.push(e),i++,b.errors=s,!1}return i=a,null!==s&&(a?s.length=a:s=null),b.errors=s,0===i}function g(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:o=e}={}){let s=null,i=0;const a=i;let l=!1;const p=i;h(e,{instancePath:t,parentData:n,parentDataProperty:r,rootData:o})||(s=null===s?h.errors:s.concat(h.errors),i=s.length);var f=p===i;if(l=l||f,!l){const a=i;b(e,{instancePath:t,parentData:n,parentDataProperty:r,rootData:o})||(s=null===s?b.errors:s.concat(b.errors),i=s.length),f=a===i,l=l||f}if(!l){const e={params:{}};return null===s?s=[e]:s.push(e),i++,g.errors=s,!1}return i=a,null!==s&&(a?s.length=a:s=null),g.errors=s,0===i}function v(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:o=e}={}){let s=null,i=0;const a=i;let l=!1;const p=i;if(!(e instanceof Function)){const e={params:{}};null===s?s=[e]:s.push(e),i++}var f=p===i;if(l=l||f,!l){const a=i;g(e,{instancePath:t,parentData:n,parentDataProperty:r,rootData:o})||(s=null===s?g.errors:s.concat(g.errors),i=s.length),f=a===i,l=l||f}if(!l){const e={params:{}};return null===s?s=[e]:s.push(e),i++,v.errors=s,!1}return i=a,null!==s&&(a?s.length=a:s=null),v.errors=s,0===i}const P=new RegExp("^https?://","u");function D(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:o=e}={}){let s=null,i=0;const a=i;let l=!1,p=null;const f=i;if(i==i)if(Array.isArray(e)){const t=e.length;for(let n=0;n=",limit:0}};null===a?a=[e]:a.push(e),l++}}else{const e={params:{type:"number"}};null===a?a=[e]:a.push(e),l++}var u=y===l;if(c=c||u,!c){const t=l;if(l===t)if(e&&"object"==typeof e&&!Array.isArray(e))for(const t in e){const n=l;if("number"!=typeof e[t]){const e={params:{type:"number"}};null===a?a=[e]:a.push(e),l++}if(n!==l)break}else{const e={params:{type:"object"}};null===a?a=[e]:a.push(e),l++}u=t===l,c=c||u}if(c)l=f,null!==a&&(f?a.length=f:a=null);else{const e={params:{}};null===a?a=[e]:a.push(e),l++}if(i===l&&(o=!0,s=0),!o){const e={params:{passingSchemas:s}};return null===a?a=[e]:a.push(e),l++,De.errors=a,!1}l=r,null!==a&&(r?a.length=r:a=null),p=n===l}else p=!0;if(p){if(void 0!==t.filename){let n=t.filename;const r=l,o=l;let s=!1;const i=l;if(l===i)if("string"==typeof n){if(n.includes("!")||!1!==e.test(n)){const e={params:{}};null===a?a=[e]:a.push(e),l++}else if(n.length<1){const e={params:{}};null===a?a=[e]:a.push(e),l++}}else{const e={params:{type:"string"}};null===a?a=[e]:a.push(e),l++}var c=i===l;if(s=s||c,!s){const e=l;if(!(n instanceof Function)){const e={params:{}};null===a?a=[e]:a.push(e),l++}c=e===l,s=s||c}if(!s){const e={params:{}};return null===a?a=[e]:a.push(e),l++,De.errors=a,!1}l=o,null!==a&&(o?a.length=o:a=null),p=r===l}else p=!0;if(p){if(void 0!==t.idHint){const e=l;if("string"!=typeof t.idHint)return De.errors=[{params:{type:"string"}}],!1;p=e===l}else p=!0;if(p){if(void 0!==t.layer){let e=t.layer;const n=l,r=l;let o=!1;const s=l;if(!(e instanceof RegExp)){const e={params:{}};null===a?a=[e]:a.push(e),l++}var y=s===l;if(o=o||y,!o){const t=l;if("string"!=typeof e){const e={params:{type:"string"}};null===a?a=[e]:a.push(e),l++}if(y=t===l,o=o||y,!o){const t=l;if(!(e instanceof Function)){const e={params:{}};null===a?a=[e]:a.push(e),l++}y=t===l,o=o||y}}if(!o){const e={params:{}};return null===a?a=[e]:a.push(e),l++,De.errors=a,!1}l=r,null!==a&&(r?a.length=r:a=null),p=n===l}else p=!0;if(p){if(void 0!==t.maxAsyncRequests){let e=t.maxAsyncRequests;const n=l;if(l===n){if("number"!=typeof e)return De.errors=[{params:{type:"number"}}],!1;if(e<1||isNaN(e))return De.errors=[{params:{comparison:">=",limit:1}}],!1}p=n===l}else p=!0;if(p){if(void 0!==t.maxAsyncSize){let e=t.maxAsyncSize;const n=l,r=l;let o=!1,s=null;const i=l,f=l;let u=!1;const c=l;if(l===c)if("number"==typeof e){if(e<0||isNaN(e)){const e={params:{comparison:">=",limit:0}};null===a?a=[e]:a.push(e),l++}}else{const e={params:{type:"number"}};null===a?a=[e]:a.push(e),l++}var m=c===l;if(u=u||m,!u){const t=l;if(l===t)if(e&&"object"==typeof e&&!Array.isArray(e))for(const t in e){const n=l;if("number"!=typeof e[t]){const e={params:{type:"number"}};null===a?a=[e]:a.push(e),l++}if(n!==l)break}else{const e={params:{type:"object"}};null===a?a=[e]:a.push(e),l++}m=t===l,u=u||m}if(u)l=f,null!==a&&(f?a.length=f:a=null);else{const e={params:{}};null===a?a=[e]:a.push(e),l++}if(i===l&&(o=!0,s=0),!o){const e={params:{passingSchemas:s}};return null===a?a=[e]:a.push(e),l++,De.errors=a,!1}l=r,null!==a&&(r?a.length=r:a=null),p=n===l}else p=!0;if(p){if(void 0!==t.maxInitialRequests){let e=t.maxInitialRequests;const n=l;if(l===n){if("number"!=typeof e)return De.errors=[{params:{type:"number"}}],!1;if(e<1||isNaN(e))return De.errors=[{params:{comparison:">=",limit:1}}],!1}p=n===l}else p=!0;if(p){if(void 0!==t.maxInitialSize){let e=t.maxInitialSize;const n=l,r=l;let o=!1,s=null;const i=l,f=l;let u=!1;const c=l;if(l===c)if("number"==typeof e){if(e<0||isNaN(e)){const e={params:{comparison:">=",limit:0}};null===a?a=[e]:a.push(e),l++}}else{const e={params:{type:"number"}};null===a?a=[e]:a.push(e),l++}var d=c===l;if(u=u||d,!u){const t=l;if(l===t)if(e&&"object"==typeof e&&!Array.isArray(e))for(const t in e){const n=l;if("number"!=typeof e[t]){const e={params:{type:"number"}};null===a?a=[e]:a.push(e),l++}if(n!==l)break}else{const e={params:{type:"object"}};null===a?a=[e]:a.push(e),l++}d=t===l,u=u||d}if(u)l=f,null!==a&&(f?a.length=f:a=null);else{const e={params:{}};null===a?a=[e]:a.push(e),l++}if(i===l&&(o=!0,s=0),!o){const e={params:{passingSchemas:s}};return null===a?a=[e]:a.push(e),l++,De.errors=a,!1}l=r,null!==a&&(r?a.length=r:a=null),p=n===l}else p=!0;if(p){if(void 0!==t.maxSize){let e=t.maxSize;const n=l,r=l;let o=!1,s=null;const i=l,f=l;let u=!1;const c=l;if(l===c)if("number"==typeof e){if(e<0||isNaN(e)){const e={params:{comparison:">=",limit:0}};null===a?a=[e]:a.push(e),l++}}else{const e={params:{type:"number"}};null===a?a=[e]:a.push(e),l++}var h=c===l;if(u=u||h,!u){const t=l;if(l===t)if(e&&"object"==typeof e&&!Array.isArray(e))for(const t in e){const n=l;if("number"!=typeof e[t]){const e={params:{type:"number"}};null===a?a=[e]:a.push(e),l++}if(n!==l)break}else{const e={params:{type:"object"}};null===a?a=[e]:a.push(e),l++}h=t===l,u=u||h}if(u)l=f,null!==a&&(f?a.length=f:a=null);else{const e={params:{}};null===a?a=[e]:a.push(e),l++}if(i===l&&(o=!0,s=0),!o){const e={params:{passingSchemas:s}};return null===a?a=[e]:a.push(e),l++,De.errors=a,!1}l=r,null!==a&&(r?a.length=r:a=null),p=n===l}else p=!0;if(p){if(void 0!==t.minChunks){let e=t.minChunks;const n=l;if(l===n){if("number"!=typeof e)return De.errors=[{params:{type:"number"}}],!1;if(e<1||isNaN(e))return De.errors=[{params:{comparison:">=",limit:1}}],!1}p=n===l}else p=!0;if(p){if(void 0!==t.minRemainingSize){let e=t.minRemainingSize;const n=l,r=l;let o=!1,s=null;const i=l,f=l;let u=!1;const c=l;if(l===c)if("number"==typeof e){if(e<0||isNaN(e)){const e={params:{comparison:">=",limit:0}};null===a?a=[e]:a.push(e),l++}}else{const e={params:{type:"number"}};null===a?a=[e]:a.push(e),l++}var b=c===l;if(u=u||b,!u){const t=l;if(l===t)if(e&&"object"==typeof e&&!Array.isArray(e))for(const t in e){const n=l;if("number"!=typeof e[t]){const e={params:{type:"number"}};null===a?a=[e]:a.push(e),l++}if(n!==l)break}else{const e={params:{type:"object"}};null===a?a=[e]:a.push(e),l++}b=t===l,u=u||b}if(u)l=f,null!==a&&(f?a.length=f:a=null);else{const e={params:{}};null===a?a=[e]:a.push(e),l++}if(i===l&&(o=!0,s=0),!o){const e={params:{passingSchemas:s}};return null===a?a=[e]:a.push(e),l++,De.errors=a,!1}l=r,null!==a&&(r?a.length=r:a=null),p=n===l}else p=!0;if(p){if(void 0!==t.minSize){let e=t.minSize;const n=l,r=l;let o=!1,s=null;const i=l,f=l;let u=!1;const c=l;if(l===c)if("number"==typeof e){if(e<0||isNaN(e)){const e={params:{comparison:">=",limit:0}};null===a?a=[e]:a.push(e),l++}}else{const e={params:{type:"number"}};null===a?a=[e]:a.push(e),l++}var g=c===l;if(u=u||g,!u){const t=l;if(l===t)if(e&&"object"==typeof e&&!Array.isArray(e))for(const t in e){const n=l;if("number"!=typeof e[t]){const e={params:{type:"number"}};null===a?a=[e]:a.push(e),l++}if(n!==l)break}else{const e={params:{type:"object"}};null===a?a=[e]:a.push(e),l++}g=t===l,u=u||g}if(u)l=f,null!==a&&(f?a.length=f:a=null);else{const e={params:{}};null===a?a=[e]:a.push(e),l++}if(i===l&&(o=!0,s=0),!o){const e={params:{passingSchemas:s}};return null===a?a=[e]:a.push(e),l++,De.errors=a,!1}l=r,null!==a&&(r?a.length=r:a=null),p=n===l}else p=!0;if(p){if(void 0!==t.minSizeReduction){let e=t.minSizeReduction;const n=l,r=l;let o=!1,s=null;const i=l,f=l;let u=!1;const c=l;if(l===c)if("number"==typeof e){if(e<0||isNaN(e)){const e={params:{comparison:">=",limit:0}};null===a?a=[e]:a.push(e),l++}}else{const e={params:{type:"number"}};null===a?a=[e]:a.push(e),l++}var v=c===l;if(u=u||v,!u){const t=l;if(l===t)if(e&&"object"==typeof e&&!Array.isArray(e))for(const t in e){const n=l;if("number"!=typeof e[t]){const e={params:{type:"number"}};null===a?a=[e]:a.push(e),l++}if(n!==l)break}else{const e={params:{type:"object"}};null===a?a=[e]:a.push(e),l++}v=t===l,u=u||v}if(u)l=f,null!==a&&(f?a.length=f:a=null);else{const e={params:{}};null===a?a=[e]:a.push(e),l++}if(i===l&&(o=!0,s=0),!o){const e={params:{passingSchemas:s}};return null===a?a=[e]:a.push(e),l++,De.errors=a,!1}l=r,null!==a&&(r?a.length=r:a=null),p=n===l}else p=!0;if(p){if(void 0!==t.name){let e=t.name;const n=l,r=l;let o=!1;const s=l;if(!1!==e){const e={params:{}};null===a?a=[e]:a.push(e),l++}var P=s===l;if(o=o||P,!o){const t=l;if("string"!=typeof e){const e={params:{type:"string"}};null===a?a=[e]:a.push(e),l++}if(P=t===l,o=o||P,!o){const t=l;if(!(e instanceof Function)){const e={params:{}};null===a?a=[e]:a.push(e),l++}P=t===l,o=o||P}}if(!o){const e={params:{}};return null===a?a=[e]:a.push(e),l++,De.errors=a,!1}l=r,null!==a&&(r?a.length=r:a=null),p=n===l}else p=!0;if(p){if(void 0!==t.priority){const e=l;if("number"!=typeof t.priority)return De.errors=[{params:{type:"number"}}],!1;p=e===l}else p=!0;if(p){if(void 0!==t.reuseExistingChunk){const e=l;if("boolean"!=typeof t.reuseExistingChunk)return De.errors=[{params:{type:"boolean"}}],!1;p=e===l}else p=!0;if(p){if(void 0!==t.test){let e=t.test;const n=l,r=l;let o=!1;const s=l;if(!(e instanceof RegExp)){const e={params:{}};null===a?a=[e]:a.push(e),l++}var D=s===l;if(o=o||D,!o){const t=l;if("string"!=typeof e){const e={params:{type:"string"}};null===a?a=[e]:a.push(e),l++}if(D=t===l,o=o||D,!o){const t=l;if(!(e instanceof Function)){const e={params:{}};null===a?a=[e]:a.push(e),l++}D=t===l,o=o||D}}if(!o){const e={params:{}};return null===a?a=[e]:a.push(e),l++,De.errors=a,!1}l=r,null!==a&&(r?a.length=r:a=null),p=n===l}else p=!0;if(p){if(void 0!==t.type){let e=t.type;const n=l,r=l;let o=!1;const s=l;if(!(e instanceof RegExp)){const e={params:{}};null===a?a=[e]:a.push(e),l++}var O=s===l;if(o=o||O,!o){const t=l;if("string"!=typeof e){const e={params:{type:"string"}};null===a?a=[e]:a.push(e),l++}if(O=t===l,o=o||O,!o){const t=l;if(!(e instanceof Function)){const e={params:{}};null===a?a=[e]:a.push(e),l++}O=t===l,o=o||O}}if(!o){const e={params:{}};return null===a?a=[e]:a.push(e),l++,De.errors=a,!1}l=r,null!==a&&(r?a.length=r:a=null),p=n===l}else p=!0;if(p)if(void 0!==t.usedExports){const e=l;if("boolean"!=typeof t.usedExports)return De.errors=[{params:{type:"boolean"}}],!1;p=e===l}else p=!0}}}}}}}}}}}}}}}}}}}}}}}return De.errors=a,0===l}function Oe(t,{instancePath:r="",parentData:o,parentDataProperty:s,rootData:i=t}={}){let a=null,l=0;if(0===l){if(!t||"object"!=typeof t||Array.isArray(t))return Oe.errors=[{params:{type:"object"}}],!1;{const o=l;for(const e in t)if(!n.call(ve.properties,e))return Oe.errors=[{params:{additionalProperty:e}}],!1;if(o===l){if(void 0!==t.automaticNameDelimiter){let e=t.automaticNameDelimiter;const n=l;if(l===n){if("string"!=typeof e)return Oe.errors=[{params:{type:"string"}}],!1;if(e.length<1)return Oe.errors=[{params:{}}],!1}var p=n===l}else p=!0;if(p){if(void 0!==t.cacheGroups){let e=t.cacheGroups;const n=l,o=l,s=l;if(l===s)if(e&&"object"==typeof e&&!Array.isArray(e)){let t;if(void 0===e.test&&(t="test")){const e={};null===a?a=[e]:a.push(e),l++}else if(void 0!==e.test){let t=e.test;const n=l;let r=!1;const o=l;if(!(t instanceof RegExp)){const e={};null===a?a=[e]:a.push(e),l++}var f=o===l;if(r=r||f,!r){const e=l;if("string"!=typeof t){const e={};null===a?a=[e]:a.push(e),l++}if(f=e===l,r=r||f,!r){const e=l;if(!(t instanceof Function)){const e={};null===a?a=[e]:a.push(e),l++}f=e===l,r=r||f}}if(r)l=n,null!==a&&(n?a.length=n:a=null);else{const e={};null===a?a=[e]:a.push(e),l++}}}else{const e={};null===a?a=[e]:a.push(e),l++}if(s===l)return Oe.errors=[{params:{}}],!1;if(l=o,null!==a&&(o?a.length=o:a=null),l===n){if(!e||"object"!=typeof e||Array.isArray(e))return Oe.errors=[{params:{type:"object"}}],!1;for(const t in e){let n=e[t];const o=l,s=l;let p=!1;const f=l;if(!1!==n){const e={params:{}};null===a?a=[e]:a.push(e),l++}var u=f===l;if(p=p||u,!p){const o=l;if(!(n instanceof RegExp)){const e={params:{}};null===a?a=[e]:a.push(e),l++}if(u=o===l,p=p||u,!p){const o=l;if("string"!=typeof n){const e={params:{type:"string"}};null===a?a=[e]:a.push(e),l++}if(u=o===l,p=p||u,!p){const o=l;if(!(n instanceof Function)){const e={params:{}};null===a?a=[e]:a.push(e),l++}if(u=o===l,p=p||u,!p){const o=l;De(n,{instancePath:r+"/cacheGroups/"+t.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:e,parentDataProperty:t,rootData:i})||(a=null===a?De.errors:a.concat(De.errors),l=a.length),u=o===l,p=p||u}}}}if(!p){const e={params:{}};return null===a?a=[e]:a.push(e),l++,Oe.errors=a,!1}if(l=s,null!==a&&(s?a.length=s:a=null),o!==l)break}}p=n===l}else p=!0;if(p){if(void 0!==t.chunks){let e=t.chunks;const n=l,r=l;let o=!1;const s=l;if("initial"!==e&&"async"!==e&&"all"!==e){const e={params:{}};null===a?a=[e]:a.push(e),l++}var c=s===l;if(o=o||c,!o){const t=l;if(!(e instanceof RegExp)){const e={params:{}};null===a?a=[e]:a.push(e),l++}if(c=t===l,o=o||c,!o){const t=l;if(!(e instanceof Function)){const e={params:{}};null===a?a=[e]:a.push(e),l++}c=t===l,o=o||c}}if(!o){const e={params:{}};return null===a?a=[e]:a.push(e),l++,Oe.errors=a,!1}l=r,null!==a&&(r?a.length=r:a=null),p=n===l}else p=!0;if(p){if(void 0!==t.defaultSizeTypes){let e=t.defaultSizeTypes;const n=l;if(l===n){if(!Array.isArray(e))return Oe.errors=[{params:{type:"array"}}],!1;if(e.length<1)return Oe.errors=[{params:{limit:1}}],!1;{const t=e.length;for(let n=0;n=",limit:0}};null===a?a=[e]:a.push(e),l++}}else{const e={params:{type:"number"}};null===a?a=[e]:a.push(e),l++}var y=c===l;if(u=u||y,!u){const t=l;if(l===t)if(e&&"object"==typeof e&&!Array.isArray(e))for(const t in e){const n=l;if("number"!=typeof e[t]){const e={params:{type:"number"}};null===a?a=[e]:a.push(e),l++}if(n!==l)break}else{const e={params:{type:"object"}};null===a?a=[e]:a.push(e),l++}y=t===l,u=u||y}if(u)l=f,null!==a&&(f?a.length=f:a=null);else{const e={params:{}};null===a?a=[e]:a.push(e),l++}if(i===l&&(o=!0,s=0),!o){const e={params:{passingSchemas:s}};return null===a?a=[e]:a.push(e),l++,Oe.errors=a,!1}l=r,null!==a&&(r?a.length=r:a=null),p=n===l}else p=!0;if(p){if(void 0!==t.fallbackCacheGroup){let e=t.fallbackCacheGroup;const n=l;if(l===n){if(!e||"object"!=typeof e||Array.isArray(e))return Oe.errors=[{params:{type:"object"}}],!1;{const t=l;for(const t in e)if("automaticNameDelimiter"!==t&&"chunks"!==t&&"maxAsyncSize"!==t&&"maxInitialSize"!==t&&"maxSize"!==t&&"minSize"!==t&&"minSizeReduction"!==t)return Oe.errors=[{params:{additionalProperty:t}}],!1;if(t===l){if(void 0!==e.automaticNameDelimiter){let t=e.automaticNameDelimiter;const n=l;if(l===n){if("string"!=typeof t)return Oe.errors=[{params:{type:"string"}}],!1;if(t.length<1)return Oe.errors=[{params:{}}],!1}var m=n===l}else m=!0;if(m){if(void 0!==e.chunks){let t=e.chunks;const n=l,r=l;let o=!1;const s=l;if("initial"!==t&&"async"!==t&&"all"!==t){const e={params:{}};null===a?a=[e]:a.push(e),l++}var d=s===l;if(o=o||d,!o){const e=l;if(!(t instanceof RegExp)){const e={params:{}};null===a?a=[e]:a.push(e),l++}if(d=e===l,o=o||d,!o){const e=l;if(!(t instanceof Function)){const e={params:{}};null===a?a=[e]:a.push(e),l++}d=e===l,o=o||d}}if(!o){const e={params:{}};return null===a?a=[e]:a.push(e),l++,Oe.errors=a,!1}l=r,null!==a&&(r?a.length=r:a=null),m=n===l}else m=!0;if(m){if(void 0!==e.maxAsyncSize){let t=e.maxAsyncSize;const n=l,r=l;let o=!1,s=null;const i=l,p=l;let f=!1;const u=l;if(l===u)if("number"==typeof t){if(t<0||isNaN(t)){const e={params:{comparison:">=",limit:0}};null===a?a=[e]:a.push(e),l++}}else{const e={params:{type:"number"}};null===a?a=[e]:a.push(e),l++}var h=u===l;if(f=f||h,!f){const e=l;if(l===e)if(t&&"object"==typeof t&&!Array.isArray(t))for(const e in t){const n=l;if("number"!=typeof t[e]){const e={params:{type:"number"}};null===a?a=[e]:a.push(e),l++}if(n!==l)break}else{const e={params:{type:"object"}};null===a?a=[e]:a.push(e),l++}h=e===l,f=f||h}if(f)l=p,null!==a&&(p?a.length=p:a=null);else{const e={params:{}};null===a?a=[e]:a.push(e),l++}if(i===l&&(o=!0,s=0),!o){const e={params:{passingSchemas:s}};return null===a?a=[e]:a.push(e),l++,Oe.errors=a,!1}l=r,null!==a&&(r?a.length=r:a=null),m=n===l}else m=!0;if(m){if(void 0!==e.maxInitialSize){let t=e.maxInitialSize;const n=l,r=l;let o=!1,s=null;const i=l,p=l;let f=!1;const u=l;if(l===u)if("number"==typeof t){if(t<0||isNaN(t)){const e={params:{comparison:">=",limit:0}};null===a?a=[e]:a.push(e),l++}}else{const e={params:{type:"number"}};null===a?a=[e]:a.push(e),l++}var b=u===l;if(f=f||b,!f){const e=l;if(l===e)if(t&&"object"==typeof t&&!Array.isArray(t))for(const e in t){const n=l;if("number"!=typeof t[e]){const e={params:{type:"number"}};null===a?a=[e]:a.push(e),l++}if(n!==l)break}else{const e={params:{type:"object"}};null===a?a=[e]:a.push(e),l++}b=e===l,f=f||b}if(f)l=p,null!==a&&(p?a.length=p:a=null);else{const e={params:{}};null===a?a=[e]:a.push(e),l++}if(i===l&&(o=!0,s=0),!o){const e={params:{passingSchemas:s}};return null===a?a=[e]:a.push(e),l++,Oe.errors=a,!1}l=r,null!==a&&(r?a.length=r:a=null),m=n===l}else m=!0;if(m){if(void 0!==e.maxSize){let t=e.maxSize;const n=l,r=l;let o=!1,s=null;const i=l,p=l;let f=!1;const u=l;if(l===u)if("number"==typeof t){if(t<0||isNaN(t)){const e={params:{comparison:">=",limit:0}};null===a?a=[e]:a.push(e),l++}}else{const e={params:{type:"number"}};null===a?a=[e]:a.push(e),l++}var g=u===l;if(f=f||g,!f){const e=l;if(l===e)if(t&&"object"==typeof t&&!Array.isArray(t))for(const e in t){const n=l;if("number"!=typeof t[e]){const e={params:{type:"number"}};null===a?a=[e]:a.push(e),l++}if(n!==l)break}else{const e={params:{type:"object"}};null===a?a=[e]:a.push(e),l++}g=e===l,f=f||g}if(f)l=p,null!==a&&(p?a.length=p:a=null);else{const e={params:{}};null===a?a=[e]:a.push(e),l++}if(i===l&&(o=!0,s=0),!o){const e={params:{passingSchemas:s}};return null===a?a=[e]:a.push(e),l++,Oe.errors=a,!1}l=r,null!==a&&(r?a.length=r:a=null),m=n===l}else m=!0;if(m){if(void 0!==e.minSize){let t=e.minSize;const n=l,r=l;let o=!1,s=null;const i=l,p=l;let f=!1;const u=l;if(l===u)if("number"==typeof t){if(t<0||isNaN(t)){const e={params:{comparison:">=",limit:0}};null===a?a=[e]:a.push(e),l++}}else{const e={params:{type:"number"}};null===a?a=[e]:a.push(e),l++}var v=u===l;if(f=f||v,!f){const e=l;if(l===e)if(t&&"object"==typeof t&&!Array.isArray(t))for(const e in t){const n=l;if("number"!=typeof t[e]){const e={params:{type:"number"}};null===a?a=[e]:a.push(e),l++}if(n!==l)break}else{const e={params:{type:"object"}};null===a?a=[e]:a.push(e),l++}v=e===l,f=f||v}if(f)l=p,null!==a&&(p?a.length=p:a=null);else{const e={params:{}};null===a?a=[e]:a.push(e),l++}if(i===l&&(o=!0,s=0),!o){const e={params:{passingSchemas:s}};return null===a?a=[e]:a.push(e),l++,Oe.errors=a,!1}l=r,null!==a&&(r?a.length=r:a=null),m=n===l}else m=!0;if(m)if(void 0!==e.minSizeReduction){let t=e.minSizeReduction;const n=l,r=l;let o=!1,s=null;const i=l,p=l;let f=!1;const u=l;if(l===u)if("number"==typeof t){if(t<0||isNaN(t)){const e={params:{comparison:">=",limit:0}};null===a?a=[e]:a.push(e),l++}}else{const e={params:{type:"number"}};null===a?a=[e]:a.push(e),l++}var P=u===l;if(f=f||P,!f){const e=l;if(l===e)if(t&&"object"==typeof t&&!Array.isArray(t))for(const e in t){const n=l;if("number"!=typeof t[e]){const e={params:{type:"number"}};null===a?a=[e]:a.push(e),l++}if(n!==l)break}else{const e={params:{type:"object"}};null===a?a=[e]:a.push(e),l++}P=e===l,f=f||P}if(f)l=p,null!==a&&(p?a.length=p:a=null);else{const e={params:{}};null===a?a=[e]:a.push(e),l++}if(i===l&&(o=!0,s=0),!o){const e={params:{passingSchemas:s}};return null===a?a=[e]:a.push(e),l++,Oe.errors=a,!1}l=r,null!==a&&(r?a.length=r:a=null),m=n===l}else m=!0}}}}}}}}p=n===l}else p=!0;if(p){if(void 0!==t.filename){let n=t.filename;const r=l,o=l;let s=!1;const i=l;if(l===i)if("string"==typeof n){if(n.includes("!")||!1!==e.test(n)){const e={params:{}};null===a?a=[e]:a.push(e),l++}else if(n.length<1){const e={params:{}};null===a?a=[e]:a.push(e),l++}}else{const e={params:{type:"string"}};null===a?a=[e]:a.push(e),l++}var D=i===l;if(s=s||D,!s){const e=l;if(!(n instanceof Function)){const e={params:{}};null===a?a=[e]:a.push(e),l++}D=e===l,s=s||D}if(!s){const e={params:{}};return null===a?a=[e]:a.push(e),l++,Oe.errors=a,!1}l=o,null!==a&&(o?a.length=o:a=null),p=r===l}else p=!0;if(p){if(void 0!==t.hidePathInfo){const e=l;if("boolean"!=typeof t.hidePathInfo)return Oe.errors=[{params:{type:"boolean"}}],!1;p=e===l}else p=!0;if(p){if(void 0!==t.maxAsyncRequests){let e=t.maxAsyncRequests;const n=l;if(l===n){if("number"!=typeof e)return Oe.errors=[{params:{type:"number"}}],!1;if(e<1||isNaN(e))return Oe.errors=[{params:{comparison:">=",limit:1}}],!1}p=n===l}else p=!0;if(p){if(void 0!==t.maxAsyncSize){let e=t.maxAsyncSize;const n=l,r=l;let o=!1,s=null;const i=l,f=l;let u=!1;const c=l;if(l===c)if("number"==typeof e){if(e<0||isNaN(e)){const e={params:{comparison:">=",limit:0}};null===a?a=[e]:a.push(e),l++}}else{const e={params:{type:"number"}};null===a?a=[e]:a.push(e),l++}var O=c===l;if(u=u||O,!u){const t=l;if(l===t)if(e&&"object"==typeof e&&!Array.isArray(e))for(const t in e){const n=l;if("number"!=typeof e[t]){const e={params:{type:"number"}};null===a?a=[e]:a.push(e),l++}if(n!==l)break}else{const e={params:{type:"object"}};null===a?a=[e]:a.push(e),l++}O=t===l,u=u||O}if(u)l=f,null!==a&&(f?a.length=f:a=null);else{const e={params:{}};null===a?a=[e]:a.push(e),l++}if(i===l&&(o=!0,s=0),!o){const e={params:{passingSchemas:s}};return null===a?a=[e]:a.push(e),l++,Oe.errors=a,!1}l=r,null!==a&&(r?a.length=r:a=null),p=n===l}else p=!0;if(p){if(void 0!==t.maxInitialRequests){let e=t.maxInitialRequests;const n=l;if(l===n){if("number"!=typeof e)return Oe.errors=[{params:{type:"number"}}],!1;if(e<1||isNaN(e))return Oe.errors=[{params:{comparison:">=",limit:1}}],!1}p=n===l}else p=!0;if(p){if(void 0!==t.maxInitialSize){let e=t.maxInitialSize;const n=l,r=l;let o=!1,s=null;const i=l,f=l;let u=!1;const c=l;if(l===c)if("number"==typeof e){if(e<0||isNaN(e)){const e={params:{comparison:">=",limit:0}};null===a?a=[e]:a.push(e),l++}}else{const e={params:{type:"number"}};null===a?a=[e]:a.push(e),l++}var x=c===l;if(u=u||x,!u){const t=l;if(l===t)if(e&&"object"==typeof e&&!Array.isArray(e))for(const t in e){const n=l;if("number"!=typeof e[t]){const e={params:{type:"number"}};null===a?a=[e]:a.push(e),l++}if(n!==l)break}else{const e={params:{type:"object"}};null===a?a=[e]:a.push(e),l++}x=t===l,u=u||x}if(u)l=f,null!==a&&(f?a.length=f:a=null);else{const e={params:{}};null===a?a=[e]:a.push(e),l++}if(i===l&&(o=!0,s=0),!o){const e={params:{passingSchemas:s}};return null===a?a=[e]:a.push(e),l++,Oe.errors=a,!1}l=r,null!==a&&(r?a.length=r:a=null),p=n===l}else p=!0;if(p){if(void 0!==t.maxSize){let e=t.maxSize;const n=l,r=l;let o=!1,s=null;const i=l,f=l;let u=!1;const c=l;if(l===c)if("number"==typeof e){if(e<0||isNaN(e)){const e={params:{comparison:">=",limit:0}};null===a?a=[e]:a.push(e),l++}}else{const e={params:{type:"number"}};null===a?a=[e]:a.push(e),l++}var C=c===l;if(u=u||C,!u){const t=l;if(l===t)if(e&&"object"==typeof e&&!Array.isArray(e))for(const t in e){const n=l;if("number"!=typeof e[t]){const e={params:{type:"number"}};null===a?a=[e]:a.push(e),l++}if(n!==l)break}else{const e={params:{type:"object"}};null===a?a=[e]:a.push(e),l++}C=t===l,u=u||C}if(u)l=f,null!==a&&(f?a.length=f:a=null);else{const e={params:{}};null===a?a=[e]:a.push(e),l++}if(i===l&&(o=!0,s=0),!o){const e={params:{passingSchemas:s}};return null===a?a=[e]:a.push(e),l++,Oe.errors=a,!1}l=r,null!==a&&(r?a.length=r:a=null),p=n===l}else p=!0;if(p){if(void 0!==t.minChunks){let e=t.minChunks;const n=l;if(l===n){if("number"!=typeof e)return Oe.errors=[{params:{type:"number"}}],!1;if(e<1||isNaN(e))return Oe.errors=[{params:{comparison:">=",limit:1}}],!1}p=n===l}else p=!0;if(p){if(void 0!==t.minRemainingSize){let e=t.minRemainingSize;const n=l,r=l;let o=!1,s=null;const i=l,f=l;let u=!1;const c=l;if(l===c)if("number"==typeof e){if(e<0||isNaN(e)){const e={params:{comparison:">=",limit:0}};null===a?a=[e]:a.push(e),l++}}else{const e={params:{type:"number"}};null===a?a=[e]:a.push(e),l++}var $=c===l;if(u=u||$,!u){const t=l;if(l===t)if(e&&"object"==typeof e&&!Array.isArray(e))for(const t in e){const n=l;if("number"!=typeof e[t]){const e={params:{type:"number"}};null===a?a=[e]:a.push(e),l++}if(n!==l)break}else{const e={params:{type:"object"}};null===a?a=[e]:a.push(e),l++}$=t===l,u=u||$}if(u)l=f,null!==a&&(f?a.length=f:a=null);else{const e={params:{}};null===a?a=[e]:a.push(e),l++}if(i===l&&(o=!0,s=0),!o){const e={params:{passingSchemas:s}};return null===a?a=[e]:a.push(e),l++,Oe.errors=a,!1}l=r,null!==a&&(r?a.length=r:a=null),p=n===l}else p=!0;if(p){if(void 0!==t.minSize){let e=t.minSize;const n=l,r=l;let o=!1,s=null;const i=l,f=l;let u=!1;const c=l;if(l===c)if("number"==typeof e){if(e<0||isNaN(e)){const e={params:{comparison:">=",limit:0}};null===a?a=[e]:a.push(e),l++}}else{const e={params:{type:"number"}};null===a?a=[e]:a.push(e),l++}var A=c===l;if(u=u||A,!u){const t=l;if(l===t)if(e&&"object"==typeof e&&!Array.isArray(e))for(const t in e){const n=l;if("number"!=typeof e[t]){const e={params:{type:"number"}};null===a?a=[e]:a.push(e),l++}if(n!==l)break}else{const e={params:{type:"object"}};null===a?a=[e]:a.push(e),l++}A=t===l,u=u||A}if(u)l=f,null!==a&&(f?a.length=f:a=null);else{const e={params:{}};null===a?a=[e]:a.push(e),l++}if(i===l&&(o=!0,s=0),!o){const e={params:{passingSchemas:s}};return null===a?a=[e]:a.push(e),l++,Oe.errors=a,!1}l=r,null!==a&&(r?a.length=r:a=null),p=n===l}else p=!0;if(p){if(void 0!==t.minSizeReduction){let e=t.minSizeReduction;const n=l,r=l;let o=!1,s=null;const i=l,f=l;let u=!1;const c=l;if(l===c)if("number"==typeof e){if(e<0||isNaN(e)){const e={params:{comparison:">=",limit:0}};null===a?a=[e]:a.push(e),l++}}else{const e={params:{type:"number"}};null===a?a=[e]:a.push(e),l++}var k=c===l;if(u=u||k,!u){const t=l;if(l===t)if(e&&"object"==typeof e&&!Array.isArray(e))for(const t in e){const n=l;if("number"!=typeof e[t]){const e={params:{type:"number"}};null===a?a=[e]:a.push(e),l++}if(n!==l)break}else{const e={params:{type:"object"}};null===a?a=[e]:a.push(e),l++}k=t===l,u=u||k}if(u)l=f,null!==a&&(f?a.length=f:a=null);else{const e={params:{}};null===a?a=[e]:a.push(e),l++}if(i===l&&(o=!0,s=0),!o){const e={params:{passingSchemas:s}};return null===a?a=[e]:a.push(e),l++,Oe.errors=a,!1}l=r,null!==a&&(r?a.length=r:a=null),p=n===l}else p=!0;if(p){if(void 0!==t.name){let e=t.name;const n=l,r=l;let o=!1;const s=l;if(!1!==e){const e={params:{}};null===a?a=[e]:a.push(e),l++}var j=s===l;if(o=o||j,!o){const t=l;if("string"!=typeof e){const e={params:{type:"string"}};null===a?a=[e]:a.push(e),l++}if(j=t===l,o=o||j,!o){const t=l;if(!(e instanceof Function)){const e={params:{}};null===a?a=[e]:a.push(e),l++}j=t===l,o=o||j}}if(!o){const e={params:{}};return null===a?a=[e]:a.push(e),l++,Oe.errors=a,!1}l=r,null!==a&&(r?a.length=r:a=null),p=n===l}else p=!0;if(p)if(void 0!==t.usedExports){const e=l;if("boolean"!=typeof t.usedExports)return Oe.errors=[{params:{type:"boolean"}}],!1;p=e===l}else p=!0}}}}}}}}}}}}}}}}}}}}return Oe.errors=a,0===l}function xe(e,{instancePath:t="",parentData:r,parentDataProperty:o,rootData:s=e}={}){let i=null,a=0;if(0===a){if(!e||"object"!=typeof e||Array.isArray(e))return xe.errors=[{params:{type:"object"}}],!1;{const r=a;for(const t in e)if(!n.call(ge.properties,t))return xe.errors=[{params:{additionalProperty:t}}],!1;if(r===a){if(void 0!==e.avoidEntryIife){const t=a;if("boolean"!=typeof e.avoidEntryIife)return xe.errors=[{params:{type:"boolean"}}],!1;var l=t===a}else l=!0;if(l){if(void 0!==e.checkWasmTypes){const t=a;if("boolean"!=typeof e.checkWasmTypes)return xe.errors=[{params:{type:"boolean"}}],!1;l=t===a}else l=!0;if(l){if(void 0!==e.chunkIds){let t=e.chunkIds;const n=a;if("natural"!==t&&"named"!==t&&"deterministic"!==t&&"size"!==t&&"total-size"!==t&&!1!==t)return xe.errors=[{params:{}}],!1;l=n===a}else l=!0;if(l){if(void 0!==e.concatenateModules){const t=a;if("boolean"!=typeof e.concatenateModules)return xe.errors=[{params:{type:"boolean"}}],!1;l=t===a}else l=!0;if(l){if(void 0!==e.emitOnErrors){const t=a;if("boolean"!=typeof e.emitOnErrors)return xe.errors=[{params:{type:"boolean"}}],!1;l=t===a}else l=!0;if(l){if(void 0!==e.flagIncludedChunks){const t=a;if("boolean"!=typeof e.flagIncludedChunks)return xe.errors=[{params:{type:"boolean"}}],!1;l=t===a}else l=!0;if(l){if(void 0!==e.innerGraph){const t=a;if("boolean"!=typeof e.innerGraph)return xe.errors=[{params:{type:"boolean"}}],!1;l=t===a}else l=!0;if(l){if(void 0!==e.mangleExports){let t=e.mangleExports;const n=a,r=a;let o=!1;const s=a;if("size"!==t&&"deterministic"!==t){const e={params:{}};null===i?i=[e]:i.push(e),a++}var p=s===a;if(o=o||p,!o){const e=a;if("boolean"!=typeof t){const e={params:{type:"boolean"}};null===i?i=[e]:i.push(e),a++}p=e===a,o=o||p}if(!o){const e={params:{}};return null===i?i=[e]:i.push(e),a++,xe.errors=i,!1}a=r,null!==i&&(r?i.length=r:i=null),l=n===a}else l=!0;if(l){if(void 0!==e.mangleWasmImports){const t=a;if("boolean"!=typeof e.mangleWasmImports)return xe.errors=[{params:{type:"boolean"}}],!1;l=t===a}else l=!0;if(l){if(void 0!==e.mergeDuplicateChunks){const t=a;if("boolean"!=typeof e.mergeDuplicateChunks)return xe.errors=[{params:{type:"boolean"}}],!1;l=t===a}else l=!0;if(l){if(void 0!==e.minimize){const t=a;if("boolean"!=typeof e.minimize)return xe.errors=[{params:{type:"boolean"}}],!1;l=t===a}else l=!0;if(l){if(void 0!==e.minimizer){let t=e.minimizer;const n=a;if(a===n){if(!Array.isArray(t))return xe.errors=[{params:{type:"array"}}],!1;{const e=t.length;for(let n=0;n=",limit:1}}],!1}u=n===p}else u=!0;if(u){if(void 0!==t.hashFunction){let e=t.hashFunction;const n=p,r=p;let o=!1;const s=p;if(p===s)if("string"==typeof e){if(e.length<1){const e={params:{}};null===a?a=[e]:a.push(e),p++}}else{const e={params:{type:"string"}};null===a?a=[e]:a.push(e),p++}var v=s===p;if(o=o||v,!o){const t=p;if(!(e instanceof Function)){const e={params:{}};null===a?a=[e]:a.push(e),p++}v=t===p,o=o||v}if(!o){const e={params:{}};return null===a?a=[e]:a.push(e),p++,Me.errors=a,!1}p=r,null!==a&&(r?a.length=r:a=null),u=n===p}else u=!0;if(u){if(void 0!==t.hashSalt){let e=t.hashSalt;const n=p;if(p==p){if("string"!=typeof e)return Me.errors=[{params:{type:"string"}}],!1;if(e.length<1)return Me.errors=[{params:{}}],!1}u=n===p}else u=!0;if(u){if(void 0!==t.hotUpdateChunkFilename){let n=t.hotUpdateChunkFilename;const r=p;if(p==p){if("string"!=typeof n)return Me.errors=[{params:{type:"string"}}],!1;if(n.includes("!")||!1!==e.test(n))return Me.errors=[{params:{}}],!1}u=r===p}else u=!0;if(u){if(void 0!==t.hotUpdateGlobal){const e=p;if("string"!=typeof t.hotUpdateGlobal)return Me.errors=[{params:{type:"string"}}],!1;u=e===p}else u=!0;if(u){if(void 0!==t.hotUpdateMainFilename){let n=t.hotUpdateMainFilename;const r=p;if(p==p){if("string"!=typeof n)return Me.errors=[{params:{type:"string"}}],!1;if(n.includes("!")||!1!==e.test(n))return Me.errors=[{params:{}}],!1}u=r===p}else u=!0;if(u){if(void 0!==t.ignoreBrowserWarnings){const e=p;if("boolean"!=typeof t.ignoreBrowserWarnings)return Me.errors=[{params:{type:"boolean"}}],!1;u=e===p}else u=!0;if(u){if(void 0!==t.iife){const e=p;if("boolean"!=typeof t.iife)return Me.errors=[{params:{type:"boolean"}}],!1;u=e===p}else u=!0;if(u){if(void 0!==t.importFunctionName){const e=p;if("string"!=typeof t.importFunctionName)return Me.errors=[{params:{type:"string"}}],!1;u=e===p}else u=!0;if(u){if(void 0!==t.importMetaName){const e=p;if("string"!=typeof t.importMetaName)return Me.errors=[{params:{type:"string"}}],!1;u=e===p}else u=!0;if(u){if(void 0!==t.library){const e=p;ze(t.library,{instancePath:r+"/library",parentData:t,parentDataProperty:"library",rootData:i})||(a=null===a?ze.errors:a.concat(ze.errors),p=a.length),u=e===p}else u=!0;if(u){if(void 0!==t.libraryExport){let e=t.libraryExport;const n=p,r=p;let o=!1,s=null;const i=p,l=p;let f=!1;const c=p;if(p===c)if(Array.isArray(e)){const t=e.length;for(let n=0;n=",limit:1}}],!1}y=t===u}else y=!0;if(y){if(void 0!==r.performance){const e=u;we(r.performance,{instancePath:o+"/performance",parentData:r,parentDataProperty:"performance",rootData:p})||(f=null===f?we.errors:f.concat(we.errors),u=f.length),y=e===u}else y=!0;if(y){if(void 0!==r.plugins){const e=u;Ie(r.plugins,{instancePath:o+"/plugins",parentData:r,parentDataProperty:"plugins",rootData:p})||(f=null===f?Ie.errors:f.concat(Ie.errors),u=f.length),y=e===u}else y=!0;if(y){if(void 0!==r.profile){const e=u;if("boolean"!=typeof r.profile)return Ve.errors=[{params:{type:"boolean"}}],!1;y=e===u}else y=!0;if(y){if(void 0!==r.recordsInputPath){let t=r.recordsInputPath;const n=u,o=u;let s=!1;const i=u;if(!1!==t){const e={params:{}};null===f?f=[e]:f.push(e),u++}var P=i===u;if(s=s||P,!s){const n=u;if(u===n)if("string"==typeof t){if(t.includes("!")||!0!==e.test(t)){const e={params:{}};null===f?f=[e]:f.push(e),u++}}else{const e={params:{type:"string"}};null===f?f=[e]:f.push(e),u++}P=n===u,s=s||P}if(!s){const e={params:{}};return null===f?f=[e]:f.push(e),u++,Ve.errors=f,!1}u=o,null!==f&&(o?f.length=o:f=null),y=n===u}else y=!0;if(y){if(void 0!==r.recordsOutputPath){let t=r.recordsOutputPath;const n=u,o=u;let s=!1;const i=u;if(!1!==t){const e={params:{}};null===f?f=[e]:f.push(e),u++}var D=i===u;if(s=s||D,!s){const n=u;if(u===n)if("string"==typeof t){if(t.includes("!")||!0!==e.test(t)){const e={params:{}};null===f?f=[e]:f.push(e),u++}}else{const e={params:{type:"string"}};null===f?f=[e]:f.push(e),u++}D=n===u,s=s||D}if(!s){const e={params:{}};return null===f?f=[e]:f.push(e),u++,Ve.errors=f,!1}u=o,null!==f&&(o?f.length=o:f=null),y=n===u}else y=!0;if(y){if(void 0!==r.recordsPath){let t=r.recordsPath;const n=u,o=u;let s=!1;const i=u;if(!1!==t){const e={params:{}};null===f?f=[e]:f.push(e),u++}var O=i===u;if(s=s||O,!s){const n=u;if(u===n)if("string"==typeof t){if(t.includes("!")||!0!==e.test(t)){const e={params:{}};null===f?f=[e]:f.push(e),u++}}else{const e={params:{type:"string"}};null===f?f=[e]:f.push(e),u++}O=n===u,s=s||O}if(!s){const e={params:{}};return null===f?f=[e]:f.push(e),u++,Ve.errors=f,!1}u=o,null!==f&&(o?f.length=o:f=null),y=n===u}else y=!0;if(y){if(void 0!==r.resolve){const e=u;Te(r.resolve,{instancePath:o+"/resolve",parentData:r,parentDataProperty:"resolve",rootData:p})||(f=null===f?Te.errors:f.concat(Te.errors),u=f.length),y=e===u}else y=!0;if(y){if(void 0!==r.resolveLoader){const e=u;Ne(r.resolveLoader,{instancePath:o+"/resolveLoader",parentData:r,parentDataProperty:"resolveLoader",rootData:p})||(f=null===f?Ne.errors:f.concat(Ne.errors),u=f.length),y=e===u}else y=!0;if(y){if(void 0!==r.snapshot){let t=r.snapshot;const n=u;if(u==u){if(!t||"object"!=typeof t||Array.isArray(t))return Ve.errors=[{params:{type:"object"}}],!1;{const n=u;for(const e in t)if("buildDependencies"!==e&&"contextModule"!==e&&"immutablePaths"!==e&&"managedPaths"!==e&&"module"!==e&&"resolve"!==e&&"resolveBuildDependencies"!==e&&"unmanagedPaths"!==e)return Ve.errors=[{params:{additionalProperty:e}}],!1;if(n===u){if(void 0!==t.buildDependencies){let e=t.buildDependencies;const n=u;if(u===n){if(!e||"object"!=typeof e||Array.isArray(e))return Ve.errors=[{params:{type:"object"}}],!1;{const t=u;for(const t in e)if("hash"!==t&&"timestamp"!==t)return Ve.errors=[{params:{additionalProperty:t}}],!1;if(t===u){if(void 0!==e.hash){const t=u;if("boolean"!=typeof e.hash)return Ve.errors=[{params:{type:"boolean"}}],!1;var x=t===u}else x=!0;if(x)if(void 0!==e.timestamp){const t=u;if("boolean"!=typeof e.timestamp)return Ve.errors=[{params:{type:"boolean"}}],!1;x=t===u}else x=!0}}}var A=n===u}else A=!0;if(A){if(void 0!==t.contextModule){let e=t.contextModule;const n=u;if(u===n){if(!e||"object"!=typeof e||Array.isArray(e))return Ve.errors=[{params:{type:"object"}}],!1;{const t=u;for(const t in e)if("hash"!==t&&"timestamp"!==t)return Ve.errors=[{params:{additionalProperty:t}}],!1;if(t===u){if(void 0!==e.hash){const t=u;if("boolean"!=typeof e.hash)return Ve.errors=[{params:{type:"boolean"}}],!1;var k=t===u}else k=!0;if(k)if(void 0!==e.timestamp){const t=u;if("boolean"!=typeof e.timestamp)return Ve.errors=[{params:{type:"boolean"}}],!1;k=t===u}else k=!0}}}A=n===u}else A=!0;if(A){if(void 0!==t.immutablePaths){let n=t.immutablePaths;const r=u;if(u===r){if(!Array.isArray(n))return Ve.errors=[{params:{type:"array"}}],!1;{const t=n.length;for(let r=0;r boolean; -export = check; diff --git a/schemas/plugins/DotenvPlugin.check.js b/schemas/plugins/DotenvPlugin.check.js deleted file mode 100644 index 971666324..000000000 --- a/schemas/plugins/DotenvPlugin.check.js +++ /dev/null @@ -1,6 +0,0 @@ -/* - * This file was automatically generated. - * DO NOT MODIFY BY HAND. - * Run `yarn fix:special` to update - */ -"use strict";function e(r,{instancePath:t="",parentData:s,parentDataProperty:o,rootData:a=r}={}){let n=null,l=0;if(0===l){if(!r||"object"!=typeof r||Array.isArray(r))return e.errors=[{params:{type:"object"}}],!1;{const t=l;for(const t in r)if("allowEmptyValues"!==t&&"defaults"!==t&&"expand"!==t&&"path"!==t&&"prefix"!==t&&"safe"!==t&&"systemvars"!==t)return e.errors=[{params:{additionalProperty:t}}],!1;if(t===l){if(void 0!==r.allowEmptyValues){const t=l;if("boolean"!=typeof r.allowEmptyValues)return e.errors=[{params:{type:"boolean"}}],!1;var i=t===l}else i=!0;if(i){if(void 0!==r.defaults){let t=r.defaults;const s=l,o=l;let a=!1;const f=l;if("boolean"!=typeof t){const e={params:{type:"boolean"}};null===n?n=[e]:n.push(e),l++}var p=f===l;if(a=a||p,!a){const e=l;if(l===e)if("string"==typeof t){if(t.length<1){const e={params:{}};null===n?n=[e]:n.push(e),l++}}else{const e={params:{type:"string"}};null===n?n=[e]:n.push(e),l++}p=e===l,a=a||p}if(!a){const r={params:{}};return null===n?n=[r]:n.push(r),l++,e.errors=n,!1}l=o,null!==n&&(o?n.length=o:n=null),i=s===l}else i=!0;if(i){if(void 0!==r.expand){const t=l;if("boolean"!=typeof r.expand)return e.errors=[{params:{type:"boolean"}}],!1;i=t===l}else i=!0;if(i){if(void 0!==r.path){let t=r.path;const s=l;if(l===s){if("string"!=typeof t)return e.errors=[{params:{type:"string"}}],!1;if(t.length<1)return e.errors=[{params:{}}],!1}i=s===l}else i=!0;if(i){if(void 0!==r.prefix){let t=r.prefix;const s=l;if(l===s){if("string"!=typeof t)return e.errors=[{params:{type:"string"}}],!1;if(t.length<1)return e.errors=[{params:{}}],!1}i=s===l}else i=!0;if(i){if(void 0!==r.safe){let t=r.safe;const s=l,o=l;let a=!1;const p=l;if("boolean"!=typeof t){const e={params:{type:"boolean"}};null===n?n=[e]:n.push(e),l++}var f=p===l;if(a=a||f,!a){const e=l;if(l===e)if("string"==typeof t){if(t.length<1){const e={params:{}};null===n?n=[e]:n.push(e),l++}}else{const e={params:{type:"string"}};null===n?n=[e]:n.push(e),l++}f=e===l,a=a||f}if(!a){const r={params:{}};return null===n?n=[r]:n.push(r),l++,e.errors=n,!1}l=o,null!==n&&(o?n.length=o:n=null),i=s===l}else i=!0;if(i)if(void 0!==r.systemvars){const t=l;if("boolean"!=typeof r.systemvars)return e.errors=[{params:{type:"boolean"}}],!1;i=t===l}else i=!0}}}}}}}}return e.errors=n,0===l}module.exports=e,module.exports.default=e; \ No newline at end of file diff --git a/schemas/plugins/DotenvPlugin.json b/schemas/plugins/DotenvPlugin.json deleted file mode 100644 index 24985179a..000000000 --- a/schemas/plugins/DotenvPlugin.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "title": "DotenvPluginOptions", - "type": "object", - "additionalProperties": false, - "properties": { - "allowEmptyValues": { - "description": "Whether to allow empty strings in safe mode. If false, will throw an error if any env variables are empty (but only if safe mode is enabled).", - "type": "boolean" - }, - "defaults": { - "description": "Adds support for dotenv-defaults. If set to true, uses ./.env.defaults. If a string, uses that location for a defaults file.", - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "string", - "minLength": 1 - } - ] - }, - "expand": { - "description": "Allows your variables to be \"expanded\" for reusability within your .env file.", - "type": "boolean" - }, - "path": { - "description": "The path to your environment variables. This same path applies to the .env.example and .env.defaults files.", - "type": "string", - "minLength": 1 - }, - "prefix": { - "description": "The prefix to use before the name of your env variables.", - "type": "string", - "minLength": 1 - }, - "safe": { - "description": "If true, load '.env.example' to verify the '.env' variables are all set. Can also be a string to a different file.", - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "string", - "minLength": 1 - } - ] - }, - "systemvars": { - "description": "Set to true if you would rather load all system variables as well (useful for CI purposes).", - "type": "boolean" - } - } -} diff --git a/test/__snapshots__/Cli.basictest.js.snap b/test/__snapshots__/Cli.basictest.js.snap index dd601e120..9f21f59a9 100644 --- a/test/__snapshots__/Cli.basictest.js.snap +++ b/test/__snapshots__/Cli.basictest.js.snap @@ -465,6 +465,58 @@ Object { "multiple": false, "simpleType": "string", }, + "dotenv": Object { + "configs": Array [ + Object { + "description": "Enable Dotenv plugin with default options.", + "multiple": false, + "path": "dotenv", + "type": "boolean", + }, + ], + "description": "Enable Dotenv plugin with default options.", + "multiple": false, + "simpleType": "boolean", + }, + "dotenv-env-dir": Object { + "configs": Array [ + Object { + "description": "The directory from which .env files are loaded. Defaults to the webpack context. Loads .env, .env.local, .env.[mode], .env.[mode].local in order.", + "multiple": false, + "path": "dotenv.envDir", + "type": "string", + }, + ], + "description": "The directory from which .env files are loaded. Defaults to the webpack context. Loads .env, .env.local, .env.[mode], .env.[mode].local in order.", + "multiple": false, + "simpleType": "string", + }, + "dotenv-prefixes": Object { + "configs": Array [ + Object { + "description": "Only expose environment variables that start with these prefixes. Defaults to 'WEBPACK_'.", + "multiple": true, + "path": "dotenv.prefixes[]", + "type": "string", + }, + ], + "description": "Only expose environment variables that start with these prefixes. Defaults to 'WEBPACK_'.", + "multiple": true, + "simpleType": "string", + }, + "dotenv-prefixes-reset": Object { + "configs": Array [ + Object { + "description": "Clear all items provided in 'dotenv.prefixes' configuration. Only expose environment variables that start with these prefixes. Defaults to 'WEBPACK_'.", + "multiple": false, + "path": "dotenv.prefixes", + "type": "reset", + }, + ], + "description": "Clear all items provided in 'dotenv.prefixes' configuration. Only expose environment variables that start with these prefixes. Defaults to 'WEBPACK_'.", + "multiple": false, + "simpleType": "boolean", + }, "entry": Object { "configs": Array [ Object { diff --git a/test/configCases/plugins/dotenv-plugin/.env b/test/configCases/plugins/dotenv-plugin/.env index e3b5d510f..a10acb898 100644 --- a/test/configCases/plugins/dotenv-plugin/.env +++ b/test/configCases/plugins/dotenv-plugin/.env @@ -1,7 +1,13 @@ -MY_NODE_ENV=test -API_URL=https://api.example.com -DEBUG=true -PORT=3000 -SECRET_KEY=my-secret-key -EMPTY_VALUE= -INTERPOLATED_VAR=$MY_NODE_ENV-mode +# Basic test +WEBPACK_API_URL=https://api.example.com +WEBPACK_MODE=test +SECRET_KEY=should-not-be-exposed +PRIVATE_VAR=also-hidden + +# Expand test +WEBPACK_BASE=example.com +WEBPACK_FULL_URL=${WEBPACK_API_URL}/v1 +WEBPACK_PORT=${PORT:-3000} + +# Mode-specific base value +WEBPACK_ENV=development diff --git a/test/configCases/plugins/dotenv-plugin/.env.defaults b/test/configCases/plugins/dotenv-plugin/.env.defaults deleted file mode 100644 index 6b22457eb..000000000 --- a/test/configCases/plugins/dotenv-plugin/.env.defaults +++ /dev/null @@ -1,3 +0,0 @@ -MY_NODE_ENV=development -PORT=8080 -DEFAULT_VALUE=default-from-defaults diff --git a/test/configCases/plugins/dotenv-plugin/.env.example b/test/configCases/plugins/dotenv-plugin/.env.example deleted file mode 100644 index 3815eb149..000000000 --- a/test/configCases/plugins/dotenv-plugin/.env.example +++ /dev/null @@ -1,6 +0,0 @@ -MY_NODE_ENV= -API_URL= -DEBUG= -PORT= -SECRET_KEY= -REQUIRED_VAR= diff --git a/test/configCases/plugins/dotenv-plugin/.env.production b/test/configCases/plugins/dotenv-plugin/.env.production new file mode 100644 index 000000000..5caf5bea3 --- /dev/null +++ b/test/configCases/plugins/dotenv-plugin/.env.production @@ -0,0 +1,3 @@ +# Production overrides +WEBPACK_API_URL=https://prod-api.example.com +WEBPACK_ENV=production diff --git a/test/configCases/plugins/dotenv-plugin/basic.js b/test/configCases/plugins/dotenv-plugin/basic.js index 6c3718dd7..d955c1041 100644 --- a/test/configCases/plugins/dotenv-plugin/basic.js +++ b/test/configCases/plugins/dotenv-plugin/basic.js @@ -1,10 +1,10 @@ "use strict"; -it("should load basic .env variables", () => { - expect(process.env.MY_NODE_ENV).toBe("test"); - expect(process.env.API_URL).toBe("https://api.example.com"); - expect(process.env.DEBUG).toBe("true"); - expect(process.env.PORT).toBe("3000"); - expect(process.env.SECRET_KEY).toBe("my-secret-key"); - expect(process.env.EMPTY_VALUE).toBe(""); -}); \ No newline at end of file +it("should expose only WEBPACK_ prefixed env vars", () => { + expect(process.env.WEBPACK_API_URL).toBe("https://api.example.com"); + expect(process.env.WEBPACK_MODE).toBe("test"); + + // Non-prefixed vars should not be exposed + expect(typeof process.env.SECRET_KEY).toBe("undefined"); + expect(typeof process.env.PRIVATE_VAR).toBe("undefined"); +}); diff --git a/test/configCases/plugins/dotenv-plugin/custom-envdir.js b/test/configCases/plugins/dotenv-plugin/custom-envdir.js new file mode 100644 index 000000000..1f591d74d --- /dev/null +++ b/test/configCases/plugins/dotenv-plugin/custom-envdir.js @@ -0,0 +1,7 @@ +"use strict"; + +it("should load from custom envDir", () => { + expect(process.env.WEBPACK_FROM_ENVS).toBe("loaded-from-envs-dir"); + expect(process.env.WEBPACK_API_URL).toBe("https://custom.example.com"); +}); + diff --git a/test/configCases/plugins/dotenv-plugin/custom-path.js b/test/configCases/plugins/dotenv-plugin/custom-path.js deleted file mode 100644 index e3a7cbe7a..000000000 --- a/test/configCases/plugins/dotenv-plugin/custom-path.js +++ /dev/null @@ -1,11 +0,0 @@ -"use strict"; - -it("should load from custom path", () => { - // When using .env.example as path, values should be empty (as defined in .env.example) - expect(process.env.MY_NODE_ENV).toBe(""); - expect(process.env.API_URL).toBe(""); - expect(process.env.DEBUG).toBe(""); - expect(process.env.PORT).toBe(""); - expect(process.env.SECRET_KEY).toBe(""); - expect(process.env.REQUIRED_VAR).toBe(""); -}); diff --git a/test/configCases/plugins/dotenv-plugin/custom-prefix.js b/test/configCases/plugins/dotenv-plugin/custom-prefix.js deleted file mode 100644 index 877eaf69b..000000000 --- a/test/configCases/plugins/dotenv-plugin/custom-prefix.js +++ /dev/null @@ -1,12 +0,0 @@ -"use strict"; - -it("should use custom prefix", () => { - expect(MY_ENV.MY_NODE_ENV).toBe("test"); - expect(MY_ENV.API_URL).toBe("https://api.example.com"); - expect(MY_ENV.DEBUG).toBe("true"); - expect(MY_ENV.PORT).toBe("3000"); - expect(MY_ENV.SECRET_KEY).toBe("my-secret-key"); - - // process.env should not be defined with custom prefix - expect(typeof process.env.MY_NODE_ENV).toBe("undefined"); -}); diff --git a/test/configCases/plugins/dotenv-plugin/custom-prefixes.js b/test/configCases/plugins/dotenv-plugin/custom-prefixes.js new file mode 100644 index 000000000..7d662a506 --- /dev/null +++ b/test/configCases/plugins/dotenv-plugin/custom-prefixes.js @@ -0,0 +1,13 @@ +"use strict"; + +it("should expose only APP_ and CONFIG_ prefixed vars", () => { + expect(process.env.APP_NAME).toBe("MyApp"); + expect(process.env.CONFIG_TIMEOUT).toBe("5000"); + + // WEBPACK_ prefixed should not be exposed + expect(typeof process.env.WEBPACK_API_URL).toBe("undefined"); + + // Non-prefixed should not be exposed + expect(typeof process.env.SECRET_KEY).toBe("undefined"); +}); + diff --git a/test/configCases/plugins/dotenv-plugin/defaults.js b/test/configCases/plugins/dotenv-plugin/defaults.js deleted file mode 100644 index 513a39b4c..000000000 --- a/test/configCases/plugins/dotenv-plugin/defaults.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; - -it("should load variables with defaults", () => { - // Main .env values should override defaults - expect(process.env.MY_NODE_ENV).toBe("test"); - expect(process.env.PORT).toBe("3000"); - - // Default values should be used when not in main .env - expect(process.env.DEFAULT_VALUE).toBe("default-from-defaults"); -}); diff --git a/test/configCases/plugins/dotenv-plugin/envs/.env b/test/configCases/plugins/dotenv-plugin/envs/.env new file mode 100644 index 000000000..e88aeb188 --- /dev/null +++ b/test/configCases/plugins/dotenv-plugin/envs/.env @@ -0,0 +1,2 @@ +WEBPACK_FROM_ENVS=loaded-from-envs-dir +WEBPACK_API_URL=https://custom.example.com diff --git a/test/configCases/plugins/dotenv-plugin/errors.js b/test/configCases/plugins/dotenv-plugin/errors.js deleted file mode 100644 index 12b4cbab0..000000000 --- a/test/configCases/plugins/dotenv-plugin/errors.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; - -module.exports = [/Missing environment variable: /]; diff --git a/test/configCases/plugins/dotenv-plugin/expand.js b/test/configCases/plugins/dotenv-plugin/expand.js index 4151bd9fe..86461afd7 100644 --- a/test/configCases/plugins/dotenv-plugin/expand.js +++ b/test/configCases/plugins/dotenv-plugin/expand.js @@ -1,6 +1,10 @@ "use strict"; -it("should expand variables when expand is true", () => { - expect(process.env.INTERPOLATED_VAR).toBe("test-mode"); - expect(process.env.MY_NODE_ENV).toBe("test"); +it("should expand variables by default", () => { + expect(process.env.WEBPACK_BASE).toBe("example.com"); + expect(process.env.WEBPACK_API_URL).toBe("https://api.example.com"); + expect(process.env.WEBPACK_FULL_URL).toBe("https://api.example.com/v1"); + + // Test default value operator + expect(process.env.WEBPACK_PORT).toBe("3000"); }); diff --git a/test/configCases/plugins/dotenv-plugin/incomplete.env b/test/configCases/plugins/dotenv-plugin/incomplete.env deleted file mode 100644 index fca1d5032..000000000 --- a/test/configCases/plugins/dotenv-plugin/incomplete.env +++ /dev/null @@ -1,4 +0,0 @@ -MY_NODE_ENV=test -API_URL=https://api.example.com -DEBUG=true -PORT=3000 diff --git a/test/configCases/plugins/dotenv-plugin/mode-specific.js b/test/configCases/plugins/dotenv-plugin/mode-specific.js new file mode 100644 index 000000000..36710a14a --- /dev/null +++ b/test/configCases/plugins/dotenv-plugin/mode-specific.js @@ -0,0 +1,11 @@ +"use strict"; + +it("should load .env.production and override .env values", () => { + // Value from .env.production should override .env + expect(process.env.WEBPACK_API_URL).toBe("https://prod-api.example.com"); + expect(process.env.WEBPACK_ENV).toBe("production"); + + // Value only in .env + expect(process.env.WEBPACK_MODE).toBe("test"); +}); + diff --git a/test/configCases/plugins/dotenv-plugin/prefixes-env/.env b/test/configCases/plugins/dotenv-plugin/prefixes-env/.env new file mode 100644 index 000000000..2bd4be494 --- /dev/null +++ b/test/configCases/plugins/dotenv-plugin/prefixes-env/.env @@ -0,0 +1,4 @@ +APP_NAME=MyApp +CONFIG_TIMEOUT=5000 +WEBPACK_API_URL=should-not-be-exposed +SECRET_KEY=also-hidden diff --git a/test/configCases/plugins/dotenv-plugin/systemvars.js b/test/configCases/plugins/dotenv-plugin/systemvars.js deleted file mode 100644 index cc74aea7a..000000000 --- a/test/configCases/plugins/dotenv-plugin/systemvars.js +++ /dev/null @@ -1,15 +0,0 @@ -"use strict"; - -it("should include system variables when systemvars is true", () => { - // System variables should be available (we can't predict exact values, but PATH should exist) - expect(typeof process.env.PATH).toBe("string"); - expect(process.env.PATH.length).toBeGreaterThan(0); - - // .env variables should also be loaded - expect(process.env.MY_NODE_ENV).toBe("test"); - expect(process.env.API_URL).toBe("https://api.example.com"); - - // NODE_ENV might be set by the system/test environment - // We just check that it exists as a system variable - expect(typeof process.env.NODE_ENV).toBe("string"); -}); diff --git a/test/configCases/plugins/dotenv-plugin/warnings.js b/test/configCases/plugins/dotenv-plugin/warnings.js deleted file mode 100644 index 8dddbaacc..000000000 --- a/test/configCases/plugins/dotenv-plugin/warnings.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; - -module.exports = [[/Conflicting values for 'process.env.NODE_ENV'/]]; diff --git a/test/configCases/plugins/dotenv-plugin/webpack.config.js b/test/configCases/plugins/dotenv-plugin/webpack.config.js index 510c93e89..30b70bd49 100644 --- a/test/configCases/plugins/dotenv-plugin/webpack.config.js +++ b/test/configCases/plugins/dotenv-plugin/webpack.config.js @@ -1,67 +1,45 @@ "use strict"; -const DotenvPlugin = require("../../../../lib/DotenvPlugin"); - /** @type {import("../../../../").Configuration[]} */ module.exports = [ + // Test 1: Basic - default behavior with WEBPACK_ prefix { name: "basic", - entry: "./basic", - plugins: [new DotenvPlugin()] + mode: "development", + entry: "./basic.js", + dotenv: true }, + // Test 2: Expand - variables are always expanded { - name: "with-defaults", - entry: "./defaults", - plugins: [ - new DotenvPlugin({ - defaults: true - }) - ] + name: "expand", + mode: "development", + entry: "./expand.js", + dotenv: true }, + // Test 3: Custom envDir - load from different directory { - name: "with-expand", - entry: "./expand", - plugins: [ - new DotenvPlugin({ - expand: true - }) - ] + name: "custom-envdir", + mode: "development", + entry: "./custom-envdir.js", + dotenv: { + envDir: "./envs" + } }, + // Test 4: Custom prefixes - multiple prefixes { - name: "with-systemvars", - entry: "./systemvars", - plugins: [ - new DotenvPlugin({ - systemvars: true - }) - ] + name: "custom-prefixes", + mode: "development", + entry: "./custom-prefixes.js", + dotenv: { + envDir: "./prefixes-env", + prefixes: ["APP_", "CONFIG_"] + } }, + // Test 5: Mode-specific - .env.[mode] overrides { - name: "custom-path", - entry: "./custom-path", - plugins: [ - new DotenvPlugin({ - path: "./.env.example" - }) - ] - }, - { - name: "custom-prefix", - entry: "./custom-prefix", - plugins: [ - new DotenvPlugin({ - prefix: "MY_ENV." - }) - ] - }, - { - name: "safe-mode-error", - entry: "./basic", // Use existing entry file - plugins: [ - new DotenvPlugin({ - path: "./incomplete.env", - safe: "./.env.example" - }) - ] + name: "mode-specific", + mode: "production", + entry: "./mode-specific.js", + dotenv: true } ]; diff --git a/types.d.ts b/types.d.ts index 74492b825..45a674ef5 100644 --- a/types.d.ts +++ b/types.d.ts @@ -24,7 +24,7 @@ import { ClassBody, ClassDeclaration, ClassExpression, - Comment as CommentImport, + Comment, ConditionalExpression, ContinueStatement, DebuggerStatement, @@ -99,11 +99,9 @@ import { } from "inspector"; import { JSONSchema4, JSONSchema6, JSONSchema7 } from "json-schema"; import { ListenOptions } from "net"; -import { - ValidationErrorConfiguration, - validate as validateFunction -} from "schema-utils"; +import { validate as validateFunction } from "schema-utils"; import { default as ValidationError } from "schema-utils/declarations/ValidationError"; +import { ValidationErrorConfiguration } from "schema-utils/declarations/validate"; import { AsArray, AsyncParallelHook, @@ -116,8 +114,7 @@ import { SyncBailHook, SyncHook, SyncWaterfallHook, - TapOptions, - TypedHookMap + TapOptions } from "tapable"; import { SecureContextOptions, TlsOptions } from "tls"; import { URL } from "url"; @@ -300,14 +297,6 @@ declare interface Asset { */ info: AssetInfo; } -declare abstract class AssetBytesGenerator extends Generator { - generateError( - error: Error, - module: NormalModule, - generateContext: GenerateContext - ): null | Source; -} -declare abstract class AssetBytesParser extends ParserClass {} declare interface AssetDependencyMeta { sourceType: "css-url"; } @@ -322,25 +311,6 @@ type AssetFilterItemTypes = | string | RegExp | ((name: string, asset: StatsAsset) => boolean); -declare abstract class AssetGenerator extends Generator { - dataUrlOptions?: - | AssetGeneratorDataUrlOptions - | (( - source: string | Buffer, - context: { filename: string; module: Module } - ) => string); - filename?: string | ((pathData: PathData, assetInfo?: AssetInfo) => string); - publicPath?: string | ((pathData: PathData, assetInfo?: AssetInfo) => string); - outputPath?: string | ((pathData: PathData, assetInfo?: AssetInfo) => string); - emit?: boolean; - getMimeType(module: NormalModule): string; - generateDataUri(module: NormalModule): string; - generateError( - error: Error, - module: NormalModule, - generateContext: GenerateContext - ): null | Source; -} /** * Options object for data url generation. @@ -379,15 +349,6 @@ declare interface AssetInlineGeneratorOptions { context: { filename: string; module: Module } ) => string); } -declare abstract class AssetParser extends ParserClass { - dataUrlCondition?: - | boolean - | AssetParserDataUrlOptions - | (( - source: string | Buffer, - context: { filename: string; module: Module } - ) => boolean); -} /** * Options object for DataUrl condition. @@ -443,14 +404,6 @@ declare interface AssetResourceGeneratorOptions { */ publicPath?: string | ((pathData: PathData, assetInfo?: AssetInfo) => string); } -declare abstract class AssetSourceGenerator extends Generator { - generateError( - error: Error, - module: NormalModule, - generateContext: GenerateContext - ): null | Source; -} -declare abstract class AssetSourceParser extends ParserClass {} declare class AsyncDependenciesBlock extends DependenciesBlock { constructor( groupOptions: @@ -520,7 +473,6 @@ declare interface AsyncWebAssemblyModulesPluginOptions { */ mangleImports?: boolean; } -declare abstract class AsyncWebAssemblyParser extends ParserClass {} declare class AutomaticPrefetchPlugin { constructor(); @@ -2092,11 +2044,6 @@ declare interface ColorsOptions { */ useColor?: boolean; } -declare interface CommentCssParser { - value: string; - range: [number, number]; - loc: { start: Position; end: Position }; -} declare interface CommonJsImportSettings { name?: string; context: string; @@ -3000,6 +2947,22 @@ declare interface Configuration { */ devtool?: string | false; + /** + * Enable and configure the Dotenv plugin to load environment variables from .env files. + */ + dotenv?: + | boolean + | { + /** + * The directory from which .env files are loaded. Defaults to the webpack context. Loads .env, .env.local, .env.[mode], .env.[mode].local in order. + */ + envDir?: string; + /** + * Only expose environment variables that start with these prefixes. Defaults to 'WEBPACK_'. + */ + prefixes?: string | string[]; + }; + /** * The entry point(s) of the compilation. */ @@ -3611,23 +3574,6 @@ declare interface CssData { */ exports: Map; } -declare abstract class CssGenerator extends Generator { - convention?: - | "as-is" - | "camel-case" - | "camel-case-only" - | "dashes" - | "dashes-only" - | ((name: string) => string); - localIdentName?: string; - exportsOnly?: boolean; - esModule?: boolean; - generateError( - error: Error, - module: NormalModule, - generateContext: GenerateContext - ): null | Source; -} /** * Generator options for css modules. @@ -3823,19 +3769,6 @@ declare class CssModulesPlugin { ): TemplatePath; static chunkHasCss(chunk: Chunk, chunkGraph: ChunkGraph): boolean; } -declare abstract class CssParser extends ParserClass { - defaultMode: "global" | "auto" | "pure" | "local"; - import: boolean; - url: boolean; - namedExports: boolean; - comments?: CommentCssParser[]; - magicCommentContext: Context; - getComments(range: [number, number]): CommentCssParser[]; - parseCommentOptions(range: [number, number]): { - options: null | Record; - errors: null | (Error & { comment: CommentCssParser })[]; - }; -} /** * Parser options for css modules. @@ -4423,104 +4356,50 @@ declare class DotenvPlugin { constructor(options?: DotenvPluginOptions); config: { /** - * Whether to allow empty strings in safe mode. If false, will throw an error if any env variables are empty (but only if safe mode is enabled). + * The directory from which .env files are loaded. Defaults to the webpack context. Loads .env, .env.local, .env.[mode], .env.[mode].local in order. */ - allowEmptyValues?: boolean; + envDir: string | boolean; /** - * Adds support for dotenv-defaults. If set to true, uses ./.env.defaults. If a string, uses that location for a defaults file. + * Only expose environment variables that start with these prefixes. Defaults to 'WEBPACK_'. */ - defaults?: string | boolean; - /** - * Allows your variables to be "expanded" for reusability within your .env file. - */ - expand?: boolean; - /** - * The path to your environment variables. This same path applies to the .env.example and .env.defaults files. - */ - path: string; - /** - * The prefix to use before the name of your env variables. - */ - prefix: string; - /** - * If true, load '.env.example' to verify the '.env' variables are all set. Can also be a string to a different file. - */ - safe?: string | boolean; - /** - * Set to true if you would rather load all system variables as well (useful for CI purposes). - */ - systemvars?: boolean; + prefixes: string | string[]; }; apply(compiler: Compiler): void; - gatherVariables( - inputFileSystem: InputFileSystem, + + /** + * Load environment variables from .env files + * Similar to Vite's loadEnv implementation + */ + loadEnv( + fs: InputFileSystem, + mode: undefined | string, context: string, callback: ( err: null | Error, - variables?: Record, + env?: Record, fileDependencies?: string[] ) => void ): void; - initializeVars(): Record; - getEnvs( - inputFileSystem: InputFileSystem, - context: string, - callback: ( - err: null | Error, - result?: { - env: Record; - blueprint: Record; - fileDependencies: string[]; - } - ) => void - ): void; /** * Load a file with proper path resolution */ loadFile(fs: InputFileSystem, file: string): Promise; - resolvePath( - file: string, - inputFileSystem: InputFileSystem, - context: string - ): string; - formatVariables(variables: Record): Record; } + +/** + * Options for Dotenv plugin. + */ declare interface DotenvPluginOptions { /** - * Whether to allow empty strings in safe mode. If false, will throw an error if any env variables are empty (but only if safe mode is enabled). + * The directory from which .env files are loaded. Defaults to the webpack context. Loads .env, .env.local, .env.[mode], .env.[mode].local in order. */ - allowEmptyValues?: boolean; + envDir?: string; /** - * Adds support for dotenv-defaults. If set to true, uses ./.env.defaults. If a string, uses that location for a defaults file. + * Only expose environment variables that start with these prefixes. Defaults to 'WEBPACK_'. */ - defaults?: string | boolean; - - /** - * Allows your variables to be "expanded" for reusability within your .env file. - */ - expand?: boolean; - - /** - * The path to your environment variables. This same path applies to the .env.example and .env.defaults files. - */ - path?: string; - - /** - * The prefix to use before the name of your env variables. - */ - prefix?: string; - - /** - * If true, load '.env.example' to verify the '.env' variables are all set. Can also be a string to a different file. - */ - safe?: string | boolean; - - /** - * Set to true if you would rather load all system variables as well (useful for CI purposes). - */ - systemvars?: boolean; + prefixes?: string | string[]; } declare class DynamicEntryPlugin { constructor(context: string, entry: () => Promise); @@ -6780,33 +6659,6 @@ declare interface IteratorObject [Symbol.iterator](): IteratorObject; [Symbol.dispose](): void; } -declare abstract class JavascriptGenerator extends Generator { - generateError( - error: Error, - module: NormalModule, - generateContext: GenerateContext - ): null | Source; - sourceModule( - module: Module, - initFragments: InitFragment[], - source: ReplaceSource, - generateContext: GenerateContext - ): void; - sourceBlock( - module: Module, - block: DependenciesBlock, - initFragments: InitFragment[], - source: ReplaceSource, - generateContext: GenerateContext - ): void; - sourceDependency( - module: Module, - dependency: Dependency, - initFragments: InitFragment[], - source: ReplaceSource, - generateContext: GenerateContext - ): void; -} declare class JavascriptModulesPlugin { constructor(options?: object); options: object; @@ -7291,15 +7143,15 @@ declare class JavascriptParser extends ParserClass { [LogicalExpression], boolean | void >; - program: SyncBailHook<[Program, CommentImport[]], boolean | void>; + program: SyncBailHook<[Program, Comment[]], boolean | void>; terminate: SyncBailHook<[ReturnStatement | ThrowStatement], boolean | void>; - finish: SyncBailHook<[Program, CommentImport[]], boolean | void>; + finish: SyncBailHook<[Program, Comment[]], boolean | void>; unusedStatement: SyncBailHook<[Statement], boolean | void>; }>; sourceType: "module" | "auto" | "script"; scope: ScopeInfo; state: ParserState; - comments?: CommentImport[]; + comments?: Comment[]; semicolons?: Set; statementPath?: StatementPathItem[]; prevStatement?: @@ -8123,7 +7975,7 @@ declare class JavascriptParser extends ParserClass { | MaybeNamedClassDeclaration, commentsStartPos: number ): boolean; - getComments(range: [number, number]): CommentImport[]; + getComments(range: [number, number]): Comment[]; isAsiPosition(pos: number): boolean; setAsiPosition(pos: number): void; unsetAsiPosition(pos: number): void; @@ -8159,7 +8011,7 @@ declare class JavascriptParser extends ParserClass { evaluatedVariable(tagInfo: TagInfo): VariableInfo; parseCommentOptions(range: [number, number]): { options: null | Record; - errors: null | (Error & { comment: CommentImport })[]; + errors: null | (Error & { comment: Comment })[]; }; extractMemberExpressionChain( expression: @@ -8511,14 +8363,6 @@ declare abstract class JsonData { | JsonValueFs[]; updateHash(hash: Hash): void; } -declare abstract class JsonGenerator extends Generator { - options: JsonGeneratorOptions; - generateError( - error: Error, - module: NormalModule, - generateContext: GenerateContext - ): null | Source; -} /** * Generator options for json modules. @@ -8529,17 +8373,6 @@ declare interface JsonGeneratorOptions { */ JSONParse?: boolean; } -declare interface JsonModulesPluginParserOptions { - /** - * The depth of json dependency flagged as `exportInfo`. - */ - exportsDepth?: number; - - /** - * Function that executes for a module source string and should return json-compatible data. - */ - parse?: (input: string) => any; -} declare interface JsonObjectFs { [index: string]: | undefined @@ -8560,9 +8393,6 @@ declare interface JsonObjectTypes { | JsonObjectTypes | JsonValueTypes[]; } -declare abstract class JsonParser extends ParserClass { - options: JsonModulesPluginParserOptions; -} /** * Parser options for JSON modules. @@ -11494,225 +11324,6 @@ declare abstract class NormalModuleFactory extends ModuleFactory { ], Module >; - createParser: TypedHookMap< - Record< - "javascript/auto", - SyncBailHook<[JavascriptParserOptions], JavascriptParser> - > & - Record< - "javascript/dynamic", - SyncBailHook<[JavascriptParserOptions], JavascriptParser> - > & - Record< - "javascript/esm", - SyncBailHook<[JavascriptParserOptions], JavascriptParser> - > & - Record<"json", SyncBailHook<[JsonParserOptions], JsonParser>> & - Record<"asset", SyncBailHook<[AssetParserOptions], AssetParser>> & - Record< - "asset/inline", - SyncBailHook<[EmptyParserOptions], AssetParser> - > & - Record< - "asset/resource", - SyncBailHook<[EmptyParserOptions], AssetParser> - > & - Record< - "asset/source", - SyncBailHook<[EmptyParserOptions], AssetSourceParser> - > & - Record< - "asset/bytes", - SyncBailHook<[EmptyParserOptions], AssetBytesParser> - > & - Record< - "webassembly/async", - SyncBailHook<[EmptyParserOptions], AsyncWebAssemblyParser> - > & - Record< - "webassembly/sync", - SyncBailHook<[EmptyParserOptions], WebAssemblyParser> - > & - Record<"css", SyncBailHook<[CssParserOptions], CssParser>> & - Record<"css/auto", SyncBailHook<[CssAutoParserOptions], CssParser>> & - Record< - "css/module", - SyncBailHook<[CssModuleParserOptions], CssParser> - > & - Record< - "css/global", - SyncBailHook<[CssGlobalParserOptions], CssParser> - > & - Record> - >; - parser: TypedHookMap< - Record< - "javascript/auto", - SyncBailHook<[JavascriptParser, JavascriptParserOptions], void> - > & - Record< - "javascript/dynamic", - SyncBailHook<[JavascriptParser, JavascriptParserOptions], void> - > & - Record< - "javascript/esm", - SyncBailHook<[JavascriptParser, JavascriptParserOptions], void> - > & - Record<"json", SyncBailHook<[JsonParser, JsonParserOptions], void>> & - Record<"asset", SyncBailHook<[AssetParser, AssetParserOptions], void>> & - Record< - "asset/inline", - SyncBailHook<[AssetParser, EmptyParserOptions], void> - > & - Record< - "asset/resource", - SyncBailHook<[AssetParser, EmptyParserOptions], void> - > & - Record< - "asset/source", - SyncBailHook<[AssetSourceParser, EmptyParserOptions], void> - > & - Record< - "asset/bytes", - SyncBailHook<[AssetBytesParser, EmptyParserOptions], void> - > & - Record< - "webassembly/async", - SyncBailHook<[AsyncWebAssemblyParser, EmptyParserOptions], void> - > & - Record< - "webassembly/sync", - SyncBailHook<[WebAssemblyParser, EmptyParserOptions], void> - > & - Record<"css", SyncBailHook<[CssParser, CssParserOptions], void>> & - Record< - "css/auto", - SyncBailHook<[CssParser, CssAutoParserOptions], void> - > & - Record< - "css/module", - SyncBailHook<[CssParser, CssModuleParserOptions], void> - > & - Record< - "css/global", - SyncBailHook<[CssParser, CssGlobalParserOptions], void> - > & - Record> - >; - createGenerator: TypedHookMap< - Record< - "javascript/auto", - SyncBailHook<[EmptyGeneratorOptions], JavascriptGenerator> - > & - Record< - "javascript/dynamic", - SyncBailHook<[EmptyGeneratorOptions], JavascriptGenerator> - > & - Record< - "javascript/esm", - SyncBailHook<[EmptyGeneratorOptions], JavascriptGenerator> - > & - Record<"json", SyncBailHook<[JsonGeneratorOptions], JsonGenerator>> & - Record<"asset", SyncBailHook<[AssetGeneratorOptions], AssetGenerator>> & - Record< - "asset/inline", - SyncBailHook<[AssetGeneratorOptions], AssetGenerator> - > & - Record< - "asset/resource", - SyncBailHook<[AssetGeneratorOptions], AssetGenerator> - > & - Record< - "asset/source", - SyncBailHook<[EmptyGeneratorOptions], AssetSourceGenerator> - > & - Record< - "asset/bytes", - SyncBailHook<[EmptyGeneratorOptions], AssetBytesGenerator> - > & - Record< - "webassembly/async", - SyncBailHook<[EmptyParserOptions], Generator> - > & - Record< - "webassembly/sync", - SyncBailHook<[EmptyParserOptions], Generator> - > & - Record<"css", SyncBailHook<[CssGeneratorOptions], CssGenerator>> & - Record< - "css/auto", - SyncBailHook<[CssAutoGeneratorOptions], CssGenerator> - > & - Record< - "css/module", - SyncBailHook<[CssModuleGeneratorOptions], CssGenerator> - > & - Record< - "css/global", - SyncBailHook<[CssGlobalGeneratorOptions], CssGenerator> - > & - Record> - >; - generator: TypedHookMap< - Record< - "javascript/auto", - SyncBailHook<[JavascriptGenerator, EmptyGeneratorOptions], void> - > & - Record< - "javascript/dynamic", - SyncBailHook<[JavascriptGenerator, EmptyGeneratorOptions], void> - > & - Record< - "javascript/esm", - SyncBailHook<[JavascriptGenerator, EmptyGeneratorOptions], void> - > & - Record< - "json", - SyncBailHook<[JsonGenerator, JsonGeneratorOptions], void> - > & - Record< - "asset", - SyncBailHook<[AssetGenerator, AssetGeneratorOptions], void> - > & - Record< - "asset/inline", - SyncBailHook<[AssetGenerator, AssetGeneratorOptions], void> - > & - Record< - "asset/resource", - SyncBailHook<[AssetGenerator, AssetGeneratorOptions], void> - > & - Record< - "asset/source", - SyncBailHook<[AssetSourceGenerator, EmptyGeneratorOptions], void> - > & - Record< - "asset/bytes", - SyncBailHook<[AssetBytesGenerator, EmptyGeneratorOptions], void> - > & - Record< - "webassembly/async", - SyncBailHook<[Generator, EmptyParserOptions], void> - > & - Record< - "webassembly/sync", - SyncBailHook<[Generator, EmptyParserOptions], void> - > & - Record<"css", SyncBailHook<[CssGenerator, CssGeneratorOptions], void>> & - Record< - "css/auto", - SyncBailHook<[CssGenerator, CssAutoGeneratorOptions], void> - > & - Record< - "css/module", - SyncBailHook<[CssGenerator, CssModuleGeneratorOptions], void> - > & - Record< - "css/global", - SyncBailHook<[CssGenerator, CssGlobalGeneratorOptions], void> - > & - Record> - >; createModuleClass: HookMap< SyncBailHook< [ @@ -13585,10 +13196,6 @@ declare interface PnpApi { options: { considerBuiltins: boolean } ) => null | string; } -declare interface Position { - line: number; - column: number; -} declare class PrefetchPlugin { constructor(context: string, request?: string); context: null | string; @@ -18238,7 +17845,6 @@ declare abstract class WeakTupleMap { delete(...args: K): void; clear(): void; } -declare abstract class WebAssemblyParser extends ParserClass {} declare interface WebAssemblyRenderContext { /** * the chunk @@ -18416,6 +18022,22 @@ declare interface WebpackOptionsNormalized { */ devtool?: string | false; + /** + * Enable and configure the Dotenv plugin to load environment variables from .env files. + */ + dotenv?: + | boolean + | { + /** + * The directory from which .env files are loaded. Defaults to the webpack context. Loads .env, .env.local, .env.[mode], .env.[mode].local in order. + */ + envDir?: string; + /** + * Only expose environment variables that start with these prefixes. Defaults to 'WEBPACK_'. + */ + prefixes?: string | string[]; + }; + /** * The entry point(s) of the compilation. */ @@ -18617,7 +18239,39 @@ type WebpackOptionsNormalizedWithDefaults = WebpackOptionsNormalized & { } & { watch: NonNullable } & { performance: NonNullable; } & { recordsInputPath: NonNullable } & { - recordsOutputPath: NonNullable; + recordsOutputPath: + | (string & { + dotenv: NonNullable< + | undefined + | boolean + | { + /** + * The directory from which .env files are loaded. Defaults to the webpack context. Loads .env, .env.local, .env.[mode], .env.[mode].local in order. + */ + envDir?: string; + /** + * Only expose environment variables that start with these prefixes. Defaults to 'WEBPACK_'. + */ + prefixes?: string | string[]; + } + >; + }) + | (false & { + dotenv: NonNullable< + | undefined + | boolean + | { + /** + * The directory from which .env files are loaded. Defaults to the webpack context. Loads .env, .env.local, .env.[mode], .env.[mode].local in order. + */ + envDir?: string; + /** + * Only expose environment variables that start with these prefixes. Defaults to 'WEBPACK_'. + */ + prefixes?: string | string[]; + } + >; + }); }; /** From 4c30c3ee835e3fdedb582982aa37b104b9a58e3e Mon Sep 17 00:00:00 2001 From: xiaoxiaojx <784487301@qq.com> Date: Fri, 3 Oct 2025 20:15:50 +0800 Subject: [PATCH 05/20] update --- lib/DotenvPlugin.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/DotenvPlugin.js b/lib/DotenvPlugin.js index b693e2861..f6730ba2c 100644 --- a/lib/DotenvPlugin.js +++ b/lib/DotenvPlugin.js @@ -123,7 +123,7 @@ function expandValue(value, processEnv, runningParsed) { const opMatch = expression.match(opRegex); const splitter = opMatch ? opMatch[0] : null; - const r = expression.split(splitter || ""); + const r = expression.split(/** @type {string} */ (splitter)); // const r = splitter ? expression.split(splitter) : [expression]; let defaultValue; From e62546989cbece710fb4d05bd2f61385add61e05 Mon Sep 17 00:00:00 2001 From: xiaoxiaojx <784487301@qq.com> Date: Fri, 3 Oct 2025 20:45:30 +0800 Subject: [PATCH 06/20] update --- types.d.ts | 374 +++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 365 insertions(+), 9 deletions(-) diff --git a/types.d.ts b/types.d.ts index 45a674ef5..95f05f789 100644 --- a/types.d.ts +++ b/types.d.ts @@ -24,7 +24,7 @@ import { ClassBody, ClassDeclaration, ClassExpression, - Comment, + Comment as CommentImport, ConditionalExpression, ContinueStatement, DebuggerStatement, @@ -99,9 +99,11 @@ import { } from "inspector"; import { JSONSchema4, JSONSchema6, JSONSchema7 } from "json-schema"; import { ListenOptions } from "net"; -import { validate as validateFunction } from "schema-utils"; +import { + ValidationErrorConfiguration, + validate as validateFunction +} from "schema-utils"; import { default as ValidationError } from "schema-utils/declarations/ValidationError"; -import { ValidationErrorConfiguration } from "schema-utils/declarations/validate"; import { AsArray, AsyncParallelHook, @@ -114,7 +116,8 @@ import { SyncBailHook, SyncHook, SyncWaterfallHook, - TapOptions + TapOptions, + TypedHookMap } from "tapable"; import { SecureContextOptions, TlsOptions } from "tls"; import { URL } from "url"; @@ -297,6 +300,14 @@ declare interface Asset { */ info: AssetInfo; } +declare abstract class AssetBytesGenerator extends Generator { + generateError( + error: Error, + module: NormalModule, + generateContext: GenerateContext + ): null | Source; +} +declare abstract class AssetBytesParser extends ParserClass {} declare interface AssetDependencyMeta { sourceType: "css-url"; } @@ -311,6 +322,25 @@ type AssetFilterItemTypes = | string | RegExp | ((name: string, asset: StatsAsset) => boolean); +declare abstract class AssetGenerator extends Generator { + dataUrlOptions?: + | AssetGeneratorDataUrlOptions + | (( + source: string | Buffer, + context: { filename: string; module: Module } + ) => string); + filename?: string | ((pathData: PathData, assetInfo?: AssetInfo) => string); + publicPath?: string | ((pathData: PathData, assetInfo?: AssetInfo) => string); + outputPath?: string | ((pathData: PathData, assetInfo?: AssetInfo) => string); + emit?: boolean; + getMimeType(module: NormalModule): string; + generateDataUri(module: NormalModule): string; + generateError( + error: Error, + module: NormalModule, + generateContext: GenerateContext + ): null | Source; +} /** * Options object for data url generation. @@ -349,6 +379,15 @@ declare interface AssetInlineGeneratorOptions { context: { filename: string; module: Module } ) => string); } +declare abstract class AssetParser extends ParserClass { + dataUrlCondition?: + | boolean + | AssetParserDataUrlOptions + | (( + source: string | Buffer, + context: { filename: string; module: Module } + ) => boolean); +} /** * Options object for DataUrl condition. @@ -404,6 +443,14 @@ declare interface AssetResourceGeneratorOptions { */ publicPath?: string | ((pathData: PathData, assetInfo?: AssetInfo) => string); } +declare abstract class AssetSourceGenerator extends Generator { + generateError( + error: Error, + module: NormalModule, + generateContext: GenerateContext + ): null | Source; +} +declare abstract class AssetSourceParser extends ParserClass {} declare class AsyncDependenciesBlock extends DependenciesBlock { constructor( groupOptions: @@ -473,6 +520,7 @@ declare interface AsyncWebAssemblyModulesPluginOptions { */ mangleImports?: boolean; } +declare abstract class AsyncWebAssemblyParser extends ParserClass {} declare class AutomaticPrefetchPlugin { constructor(); @@ -2044,6 +2092,11 @@ declare interface ColorsOptions { */ useColor?: boolean; } +declare interface CommentCssParser { + value: string; + range: [number, number]; + loc: { start: Position; end: Position }; +} declare interface CommonJsImportSettings { name?: string; context: string; @@ -3574,6 +3627,23 @@ declare interface CssData { */ exports: Map; } +declare abstract class CssGenerator extends Generator { + convention?: + | "as-is" + | "camel-case" + | "camel-case-only" + | "dashes" + | "dashes-only" + | ((name: string) => string); + localIdentName?: string; + exportsOnly?: boolean; + esModule?: boolean; + generateError( + error: Error, + module: NormalModule, + generateContext: GenerateContext + ): null | Source; +} /** * Generator options for css modules. @@ -3769,6 +3839,19 @@ declare class CssModulesPlugin { ): TemplatePath; static chunkHasCss(chunk: Chunk, chunkGraph: ChunkGraph): boolean; } +declare abstract class CssParser extends ParserClass { + defaultMode: "global" | "auto" | "pure" | "local"; + import: boolean; + url: boolean; + namedExports: boolean; + comments?: CommentCssParser[]; + magicCommentContext: Context; + getComments(range: [number, number]): CommentCssParser[]; + parseCommentOptions(range: [number, number]): { + options: null | Record; + errors: null | (Error & { comment: CommentCssParser })[]; + }; +} /** * Parser options for css modules. @@ -6659,6 +6742,33 @@ declare interface IteratorObject [Symbol.iterator](): IteratorObject; [Symbol.dispose](): void; } +declare abstract class JavascriptGenerator extends Generator { + generateError( + error: Error, + module: NormalModule, + generateContext: GenerateContext + ): null | Source; + sourceModule( + module: Module, + initFragments: InitFragment[], + source: ReplaceSource, + generateContext: GenerateContext + ): void; + sourceBlock( + module: Module, + block: DependenciesBlock, + initFragments: InitFragment[], + source: ReplaceSource, + generateContext: GenerateContext + ): void; + sourceDependency( + module: Module, + dependency: Dependency, + initFragments: InitFragment[], + source: ReplaceSource, + generateContext: GenerateContext + ): void; +} declare class JavascriptModulesPlugin { constructor(options?: object); options: object; @@ -7143,15 +7253,15 @@ declare class JavascriptParser extends ParserClass { [LogicalExpression], boolean | void >; - program: SyncBailHook<[Program, Comment[]], boolean | void>; + program: SyncBailHook<[Program, CommentImport[]], boolean | void>; terminate: SyncBailHook<[ReturnStatement | ThrowStatement], boolean | void>; - finish: SyncBailHook<[Program, Comment[]], boolean | void>; + finish: SyncBailHook<[Program, CommentImport[]], boolean | void>; unusedStatement: SyncBailHook<[Statement], boolean | void>; }>; sourceType: "module" | "auto" | "script"; scope: ScopeInfo; state: ParserState; - comments?: Comment[]; + comments?: CommentImport[]; semicolons?: Set; statementPath?: StatementPathItem[]; prevStatement?: @@ -7975,7 +8085,7 @@ declare class JavascriptParser extends ParserClass { | MaybeNamedClassDeclaration, commentsStartPos: number ): boolean; - getComments(range: [number, number]): Comment[]; + getComments(range: [number, number]): CommentImport[]; isAsiPosition(pos: number): boolean; setAsiPosition(pos: number): void; unsetAsiPosition(pos: number): void; @@ -8011,7 +8121,7 @@ declare class JavascriptParser extends ParserClass { evaluatedVariable(tagInfo: TagInfo): VariableInfo; parseCommentOptions(range: [number, number]): { options: null | Record; - errors: null | (Error & { comment: Comment })[]; + errors: null | (Error & { comment: CommentImport })[]; }; extractMemberExpressionChain( expression: @@ -8363,6 +8473,14 @@ declare abstract class JsonData { | JsonValueFs[]; updateHash(hash: Hash): void; } +declare abstract class JsonGenerator extends Generator { + options: JsonGeneratorOptions; + generateError( + error: Error, + module: NormalModule, + generateContext: GenerateContext + ): null | Source; +} /** * Generator options for json modules. @@ -8373,6 +8491,17 @@ declare interface JsonGeneratorOptions { */ JSONParse?: boolean; } +declare interface JsonModulesPluginParserOptions { + /** + * The depth of json dependency flagged as `exportInfo`. + */ + exportsDepth?: number; + + /** + * Function that executes for a module source string and should return json-compatible data. + */ + parse?: (input: string) => any; +} declare interface JsonObjectFs { [index: string]: | undefined @@ -8393,6 +8522,9 @@ declare interface JsonObjectTypes { | JsonObjectTypes | JsonValueTypes[]; } +declare abstract class JsonParser extends ParserClass { + options: JsonModulesPluginParserOptions; +} /** * Parser options for JSON modules. @@ -11324,6 +11456,225 @@ declare abstract class NormalModuleFactory extends ModuleFactory { ], Module >; + createParser: TypedHookMap< + Record< + "javascript/auto", + SyncBailHook<[JavascriptParserOptions], JavascriptParser> + > & + Record< + "javascript/dynamic", + SyncBailHook<[JavascriptParserOptions], JavascriptParser> + > & + Record< + "javascript/esm", + SyncBailHook<[JavascriptParserOptions], JavascriptParser> + > & + Record<"json", SyncBailHook<[JsonParserOptions], JsonParser>> & + Record<"asset", SyncBailHook<[AssetParserOptions], AssetParser>> & + Record< + "asset/inline", + SyncBailHook<[EmptyParserOptions], AssetParser> + > & + Record< + "asset/resource", + SyncBailHook<[EmptyParserOptions], AssetParser> + > & + Record< + "asset/source", + SyncBailHook<[EmptyParserOptions], AssetSourceParser> + > & + Record< + "asset/bytes", + SyncBailHook<[EmptyParserOptions], AssetBytesParser> + > & + Record< + "webassembly/async", + SyncBailHook<[EmptyParserOptions], AsyncWebAssemblyParser> + > & + Record< + "webassembly/sync", + SyncBailHook<[EmptyParserOptions], WebAssemblyParser> + > & + Record<"css", SyncBailHook<[CssParserOptions], CssParser>> & + Record<"css/auto", SyncBailHook<[CssAutoParserOptions], CssParser>> & + Record< + "css/module", + SyncBailHook<[CssModuleParserOptions], CssParser> + > & + Record< + "css/global", + SyncBailHook<[CssGlobalParserOptions], CssParser> + > & + Record> + >; + parser: TypedHookMap< + Record< + "javascript/auto", + SyncBailHook<[JavascriptParser, JavascriptParserOptions], void> + > & + Record< + "javascript/dynamic", + SyncBailHook<[JavascriptParser, JavascriptParserOptions], void> + > & + Record< + "javascript/esm", + SyncBailHook<[JavascriptParser, JavascriptParserOptions], void> + > & + Record<"json", SyncBailHook<[JsonParser, JsonParserOptions], void>> & + Record<"asset", SyncBailHook<[AssetParser, AssetParserOptions], void>> & + Record< + "asset/inline", + SyncBailHook<[AssetParser, EmptyParserOptions], void> + > & + Record< + "asset/resource", + SyncBailHook<[AssetParser, EmptyParserOptions], void> + > & + Record< + "asset/source", + SyncBailHook<[AssetSourceParser, EmptyParserOptions], void> + > & + Record< + "asset/bytes", + SyncBailHook<[AssetBytesParser, EmptyParserOptions], void> + > & + Record< + "webassembly/async", + SyncBailHook<[AsyncWebAssemblyParser, EmptyParserOptions], void> + > & + Record< + "webassembly/sync", + SyncBailHook<[WebAssemblyParser, EmptyParserOptions], void> + > & + Record<"css", SyncBailHook<[CssParser, CssParserOptions], void>> & + Record< + "css/auto", + SyncBailHook<[CssParser, CssAutoParserOptions], void> + > & + Record< + "css/module", + SyncBailHook<[CssParser, CssModuleParserOptions], void> + > & + Record< + "css/global", + SyncBailHook<[CssParser, CssGlobalParserOptions], void> + > & + Record> + >; + createGenerator: TypedHookMap< + Record< + "javascript/auto", + SyncBailHook<[EmptyGeneratorOptions], JavascriptGenerator> + > & + Record< + "javascript/dynamic", + SyncBailHook<[EmptyGeneratorOptions], JavascriptGenerator> + > & + Record< + "javascript/esm", + SyncBailHook<[EmptyGeneratorOptions], JavascriptGenerator> + > & + Record<"json", SyncBailHook<[JsonGeneratorOptions], JsonGenerator>> & + Record<"asset", SyncBailHook<[AssetGeneratorOptions], AssetGenerator>> & + Record< + "asset/inline", + SyncBailHook<[AssetGeneratorOptions], AssetGenerator> + > & + Record< + "asset/resource", + SyncBailHook<[AssetGeneratorOptions], AssetGenerator> + > & + Record< + "asset/source", + SyncBailHook<[EmptyGeneratorOptions], AssetSourceGenerator> + > & + Record< + "asset/bytes", + SyncBailHook<[EmptyGeneratorOptions], AssetBytesGenerator> + > & + Record< + "webassembly/async", + SyncBailHook<[EmptyParserOptions], Generator> + > & + Record< + "webassembly/sync", + SyncBailHook<[EmptyParserOptions], Generator> + > & + Record<"css", SyncBailHook<[CssGeneratorOptions], CssGenerator>> & + Record< + "css/auto", + SyncBailHook<[CssAutoGeneratorOptions], CssGenerator> + > & + Record< + "css/module", + SyncBailHook<[CssModuleGeneratorOptions], CssGenerator> + > & + Record< + "css/global", + SyncBailHook<[CssGlobalGeneratorOptions], CssGenerator> + > & + Record> + >; + generator: TypedHookMap< + Record< + "javascript/auto", + SyncBailHook<[JavascriptGenerator, EmptyGeneratorOptions], void> + > & + Record< + "javascript/dynamic", + SyncBailHook<[JavascriptGenerator, EmptyGeneratorOptions], void> + > & + Record< + "javascript/esm", + SyncBailHook<[JavascriptGenerator, EmptyGeneratorOptions], void> + > & + Record< + "json", + SyncBailHook<[JsonGenerator, JsonGeneratorOptions], void> + > & + Record< + "asset", + SyncBailHook<[AssetGenerator, AssetGeneratorOptions], void> + > & + Record< + "asset/inline", + SyncBailHook<[AssetGenerator, AssetGeneratorOptions], void> + > & + Record< + "asset/resource", + SyncBailHook<[AssetGenerator, AssetGeneratorOptions], void> + > & + Record< + "asset/source", + SyncBailHook<[AssetSourceGenerator, EmptyGeneratorOptions], void> + > & + Record< + "asset/bytes", + SyncBailHook<[AssetBytesGenerator, EmptyGeneratorOptions], void> + > & + Record< + "webassembly/async", + SyncBailHook<[Generator, EmptyParserOptions], void> + > & + Record< + "webassembly/sync", + SyncBailHook<[Generator, EmptyParserOptions], void> + > & + Record<"css", SyncBailHook<[CssGenerator, CssGeneratorOptions], void>> & + Record< + "css/auto", + SyncBailHook<[CssGenerator, CssAutoGeneratorOptions], void> + > & + Record< + "css/module", + SyncBailHook<[CssGenerator, CssModuleGeneratorOptions], void> + > & + Record< + "css/global", + SyncBailHook<[CssGenerator, CssGlobalGeneratorOptions], void> + > & + Record> + >; createModuleClass: HookMap< SyncBailHook< [ @@ -13196,6 +13547,10 @@ declare interface PnpApi { options: { considerBuiltins: boolean } ) => null | string; } +declare interface Position { + line: number; + column: number; +} declare class PrefetchPlugin { constructor(context: string, request?: string); context: null | string; @@ -17845,6 +18200,7 @@ declare abstract class WeakTupleMap { delete(...args: K): void; clear(): void; } +declare abstract class WebAssemblyParser extends ParserClass {} declare interface WebAssemblyRenderContext { /** * the chunk From ea68eada6246076ccf9ae2ce826941030a5667ed Mon Sep 17 00:00:00 2001 From: xiaoxiaojx <784487301@qq.com> Date: Fri, 3 Oct 2025 20:57:48 +0800 Subject: [PATCH 07/20] update --- schemas/WebpackOptions.json | 1 + test/Defaults.unittest.js | 1 + ...ebpack_main_README_c9ec0fd496c92f077657.md | 674 ------------------ 3 files changed, 2 insertions(+), 674 deletions(-) delete mode 100644 test/configCases/asset-modules/http-url/dev-defaults.webpack.lock.data/https_raw.githubusercontent.com/webpack_webpack_main_README_c9ec0fd496c92f077657.md diff --git a/schemas/WebpackOptions.json b/schemas/WebpackOptions.json index e1fa03444..95e74a4a5 100644 --- a/schemas/WebpackOptions.json +++ b/schemas/WebpackOptions.json @@ -661,6 +661,7 @@ { "type": "array", "items": { + "description": "A prefix that environment variables must start with to be exposed.", "type": "string", "minLength": 1 } diff --git a/test/Defaults.unittest.js b/test/Defaults.unittest.js index 291fae6e3..c91c4bdef 100644 --- a/test/Defaults.unittest.js +++ b/test/Defaults.unittest.js @@ -84,6 +84,7 @@ describe("snapshots", () => { "dependencies": undefined, "devServer": undefined, "devtool": false, + "dotenv": undefined, "entry": Object { "main": Object { "import": Array [ diff --git a/test/configCases/asset-modules/http-url/dev-defaults.webpack.lock.data/https_raw.githubusercontent.com/webpack_webpack_main_README_c9ec0fd496c92f077657.md b/test/configCases/asset-modules/http-url/dev-defaults.webpack.lock.data/https_raw.githubusercontent.com/webpack_webpack_main_README_c9ec0fd496c92f077657.md deleted file mode 100644 index 109f95ac4..000000000 --- a/test/configCases/asset-modules/http-url/dev-defaults.webpack.lock.data/https_raw.githubusercontent.com/webpack_webpack_main_README_c9ec0fd496c92f077657.md +++ /dev/null @@ -1,674 +0,0 @@ -
- - - -
-
- -[![npm][npm]][npm-url] - -[![node][node]][node-url] -[![builds1][builds1]][builds1-url] -[![dependency-review][dependency-review]][dependency-review-url] -[![coverage][cover]][cover-url] -[![PR's welcome][prs]][prs-url] -[![compatibility-score](https://api.dependabot.com/badges/compatibility_score?dependency-name=webpack&package-manager=npm_and_yarn&previous-version=5.72.1&new-version=5.73.0)](https://docs.github.com/en/code-security/dependabot/dependabot-security-updates/about-dependabot-security-updates#about-compatibility-scores) -[![downloads](https://img.shields.io/npm/dm/webpack.svg)](https://npmcharts.com/compare/webpack?minimal=true) -[![install-size](https://packagephobia.com/badge?p=webpack)](https://packagephobia.com/result?p=webpack) -[![backers](https://opencollective.com/webpack/backers/badge.svg)](https://opencollective.com/webpack#backer) -[![sponsors](https://opencollective.com/webpack/sponsors/badge.svg)](https://opencollective.com/webpack#sponsors) -[![contributors](https://img.shields.io/github/contributors/webpack/webpack.svg)](https://github.com/webpack/webpack/graphs/contributors) -[![discussions](https://img.shields.io/github/discussions/webpack/webpack)](https://github.com/webpack/webpack/discussions) -[![discord](https://img.shields.io/discord/1180618526436888586?label=discord&logo=discord&logoColor=white&style=flat)](https://discord.gg/5sxFZPdx2k) -[![LFX Health Score](https://insights.linuxfoundation.org/api/badge/health-score?project=webpack)](https://insights.linuxfoundation.org/project/webpack) - -

webpack

-

- Webpack is a module bundler. Its main purpose is to bundle JavaScript files for usage in a browser, yet it is also capable of transforming, bundling, or packaging just about any resource or asset. -

-
- -## Table of Contents - -- [Install](#install) -- [Introduction](#introduction) -- [Concepts](#concepts) -- [Contributing](#contributing) -- [Support](#support) -- [Current project members](#current-project-members) - - [TSC (Technical Steering Committee)](#tsc-technical-steering-committee) - - [Core Collaborators](#core-collaborators) -- [Sponsoring](#sponsoring) - - [Premium Partners](#premium-partners) - - [Gold Sponsors](#gold-sponsors) - - [Silver Sponsors](#silver-sponsors) - - [Bronze Sponsors](#bronze-sponsors) - - [Backers](#backers) -- [Special Thanks](#special-thanks-to) - -## Install - -Install with npm: - -```bash -npm install --save-dev webpack -``` - -Install with yarn: - -```bash -yarn add webpack --dev -``` - -## Introduction - -Webpack is a bundler for modules. The main purpose is to bundle JavaScript -files for usage in a browser, yet it is also capable of transforming, bundling, -or packaging just about any resource or asset. - -**TL;DR** - -- Bundles [ES Modules](https://www.2ality.com/2014/09/es6-modules-final.html), [CommonJS](http://wiki.commonjs.org/), and [AMD](https://github.com/amdjs/amdjs-api/wiki/AMD) modules (even combined). -- Can create a single bundle or multiple chunks that are asynchronously loaded at runtime (to reduce initial loading time). -- Dependencies are resolved during compilation, reducing the runtime size. -- Loaders can preprocess files while compiling, e.g. TypeScript to JavaScript, Handlebars strings to compiled functions, images to Base64, etc. -- Highly modular plugin system to do whatever else your application requires. - -#### Learn about webpack through videos! - -- [Understanding Webpack - Video 1](https://www.youtube.com/watch?v=xj93pvQIsRo) -- [Understanding Webpack - Video 2](https://www.youtube.com/watch?v=4tQiJaFzuJ8) - -### Get Started - -Check out webpack's quick [**Get Started**](https://webpack.js.org/guides/getting-started) guide and the [other guides](https://webpack.js.org/guides/). - -### Browser Compatibility - -Webpack supports all browsers that are [ES5-compliant](https://kangax.github.io/compat-table/es5/) (IE8 and below are not supported). -Webpack also needs `Promise` for `import()` and `require.ensure()`. If you want to support older browsers, you will need to [load a polyfill](https://webpack.js.org/guides/shimming/) before using these expressions. - -## Concepts - -### [Plugins](https://webpack.js.org/plugins/) - -Webpack has a [rich plugin -interface](https://webpack.js.org/plugins/). Most of the features -within webpack itself use this plugin interface. This makes webpack very -**flexible**. - -| Name | Status | Install Size | Description | -| :---------------------------------------: | :----------------: | :-----------------: | :-------------------------------------------------------------------------------------- | -| [mini-css-extract-plugin][mini-css] | ![mini-css-npm] | ![mini-css-size] | Extracts CSS into separate files. It creates a CSS file per JS file which contains CSS. | -| [compression-webpack-plugin][compression] | ![compression-npm] | ![compression-size] | Prepares compressed versions of assets to serve them with Content-Encoding | -| [html-bundler-webpack-plugin][bundler] | ![bundler-npm] | ![bundler-size] | Renders a template (EJS, Handlebars, Pug) with referenced source asset files into HTML. | -| [html-webpack-plugin][html-plugin] | ![html-plugin-npm] | ![html-plugin-size] | Simplifies creation of HTML files (`index.html`) to serve your bundles | -| [pug-plugin][pug-plugin] | ![pug-plugin-npm] | ![pug-plugin-size] | Renders Pug files to HTML, extracts JS and CSS from sources specified directly in Pug. | - -[common-npm]: https://img.shields.io/npm/v/webpack.svg -[mini-css]: https://github.com/webpack-contrib/mini-css-extract-plugin -[mini-css-npm]: https://img.shields.io/npm/v/mini-css-extract-plugin.svg -[mini-css-size]: https://packagephobia.com/badge?p=mini-css-extract-plugin -[component]: https://github.com/webpack-contrib/component-webpack-plugin -[component-npm]: https://img.shields.io/npm/v/component-webpack-plugin.svg -[component-size]: https://packagephobia.com/badge?p=component-webpack-plugin -[compression]: https://github.com/webpack-contrib/compression-webpack-plugin -[compression-npm]: https://img.shields.io/npm/v/compression-webpack-plugin.svg -[compression-size]: https://packagephobia.com/badge?p=compression-webpack-plugin -[bundler]: https://github.com/webdiscus/html-bundler-webpack-plugin -[bundler-npm]: https://img.shields.io/npm/v/html-bundler-webpack-plugin.svg -[bundler-size]: https://packagephobia.com/badge?p=html-bundler-webpack-plugin -[html-plugin]: https://github.com/jantimon/html-webpack-plugin -[html-plugin-npm]: https://img.shields.io/npm/v/html-webpack-plugin.svg -[html-plugin-size]: https://packagephobia.com/badge?p=html-webpack-plugin -[pug-plugin]: https://github.com/webdiscus/pug-plugin -[pug-plugin-npm]: https://img.shields.io/npm/v/pug-plugin.svg -[pug-plugin-size]: https://packagephobia.com/badge?p=pug-plugin - -### [Loaders](https://webpack.js.org/loaders/) - -Webpack enables the use of loaders to preprocess files. This allows you to bundle -**any static resource** way beyond JavaScript. You can easily [write your own -loaders](https://webpack.js.org/api/loaders/) using Node.js. - -Loaders are activated by using `loadername!` prefixes in `require()` statements, -or are automatically applied via regex from your webpack configuration. - -#### JSON - -| Name | Status | Install Size | Description | -| :---------------------------------------------------------------------------------------------------------------------------------------: | :---------: | :----------: | :------------------------------: | -| | ![cson-npm] | ![cson-size] | Loads and transpiles a CSON file | - -[cson-npm]: https://img.shields.io/npm/v/cson-loader.svg -[cson-size]: https://packagephobia.com/badge?p=cson-loader - -#### Transpiling - -| Name | Status | Install Size | Description | -| :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :-----------: | :------------: | :------------------------------------------------------------------------------------------------ | -| | ![babel-npm] | ![babel-size] | Loads ES2015+ code and transpiles to ES5 using Babel | -| | ![type-npm] | ![type-size] | Loads TypeScript like JavaScript | -| | ![coffee-npm] | ![coffee-size] | Loads CoffeeScript like JavaScript | - -[babel-npm]: https://img.shields.io/npm/v/babel-loader.svg -[babel-size]: https://packagephobia.com/badge?p=babel-loader -[coffee-npm]: https://img.shields.io/npm/v/coffee-loader.svg -[coffee-size]: https://packagephobia.com/badge?p=coffee-loader -[type-npm]: https://img.shields.io/npm/v/ts-loader.svg -[type-size]: https://packagephobia.com/badge?p=ts-loader - -#### Templating - -| Name | Status | Install Size | Description | -| :-----------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :-------------: | :--------------: | :-------------------------------------------------------------------------------------- | -| | ![html-npm] | ![html-size] | Exports HTML as string, requires references to static resources | -| | ![pug-npm] | ![pug-size] | Loads Pug templates and returns a function | -| | ![pug3-npm] | ![pug3-size] | Compiles Pug to a function or HTML string, useful for use with Vue, React, Angular | -| | ![md-npm] | ![md-size] | Compiles Markdown to HTML | -| | ![posthtml-npm] | ![posthtml-size] | Loads and transforms a HTML file using [PostHTML](https://github.com/posthtml/posthtml) | -| | ![hbs-npm] | ![hbs-size] | Compiles Handlebars to HTML | - -[html-npm]: https://img.shields.io/npm/v/html-loader.svg -[html-size]: https://packagephobia.com/badge?p=html-loader -[pug-npm]: https://img.shields.io/npm/v/pug-loader.svg -[pug-size]: https://packagephobia.com/badge?p=pug-loader -[pug3-npm]: https://img.shields.io/npm/v/@webdiscus/pug-loader.svg -[pug3-size]: https://packagephobia.com/badge?p=@webdiscus/pug-loader -[jade-npm]: https://img.shields.io/npm/v/jade-loader.svg -[jade-size]: https://packagephobia.com/badge?p=jade-loader -[md-npm]: https://img.shields.io/npm/v/markdown-loader.svg -[md-size]: https://packagephobia.com/badge?p=markdown-loader -[posthtml-npm]: https://img.shields.io/npm/v/posthtml-loader.svg -[posthtml-size]: https://packagephobia.com/badge?p=posthtml-loader -[hbs-npm]: https://img.shields.io/npm/v/handlebars-loader.svg -[hbs-size]: https://packagephobia.com/badge?p=handlebars-loader - -#### Styling - -| Name | Status | Install Size | Description | -| :-------------------------------------------------------------------------------------------------------------------------------------------: | :------------: | :-------------: | :----------------------------------------------------------------------- | -| `