/
var
/
www
/
flurhymez
/
node_modules
/
webpack
/
lib
/
/var/www/flurhymez/node_modules/webpack/lib
mkdir
upload
Name
Size
Mode
Actions
asset/
-
0755
rm
async-modules/
-
0755
rm
cache/
-
0755
rm
config/
-
0755
rm
container/
-
0755
rm
debug/
-
0755
rm
dependencies/
-
0755
rm
electron/
-
0755
rm
errors/
-
0755
rm
esm/
-
0755
rm
hmr/
-
0755
rm
ids/
-
0755
rm
javascript/
-
0755
rm
json/
-
0755
rm
library/
-
0755
rm
logging/
-
0755
rm
node/
-
0755
rm
optimize/
-
0755
rm
performance/
-
0755
rm
prefetch/
-
0755
rm
rules/
-
0755
rm
runtime/
-
0755
rm
schemes/
-
0755
rm
serialization/
-
0755
rm
sharing/
-
0755
rm
stats/
-
0755
rm
util/
-
0755
rm
wasm/
-
0755
rm
wasm-async/
-
0755
rm
wasm-sync/
-
0755
rm
web/
-
0755
rm
webworker/
-
0755
rm
AbstractMethodError.js
1133
0644
edit
dl
rm
APIPlugin.js
5835
0644
edit
dl
rm
AsyncDependenciesBlock.js
2930
0644
edit
dl
rm
AsyncDependencyToInitialChunkError.js
913
0644
edit
dl
rm
AutomaticPrefetchPlugin.js
1491
0644
edit
dl
rm
BannerPlugin.js
2755
0644
edit
dl
rm
buildChunkGraph.js
44463
0644
edit
dl
rm
Cache.js
3967
0644
edit
dl
rm
CacheFacade.js
8676
0644
edit
dl
rm
CaseSensitiveModulesWarning.js
2106
0644
edit
dl
rm
Chunk.js
21501
0644
edit
dl
rm
ChunkGraph.js
50519
0644
edit
dl
rm
ChunkGroup.js
15121
0644
edit
dl
rm
ChunkRenderError.js
657
0644
edit
dl
rm
ChunkTemplate.js
3992
0644
edit
dl
rm
CleanPlugin.js
9943
0644
edit
dl
rm
cli.js
15619
0644
edit
dl
rm
CodeGenerationError.js
619
0644
edit
dl
rm
CodeGenerationResults.js
4463
0644
edit
dl
rm
CommentCompilationWarning.js
729
0644
edit
dl
rm
CompatibilityPlugin.js
4645
0644
edit
dl
rm
Compilation.js
159031
0644
edit
dl
rm
Compiler.js
34663
0644
edit
dl
rm
ConcatenationScope.js
4636
0644
edit
dl
rm
ConcurrentCompilationError.js
441
0644
edit
dl
rm
ConditionalInitFragment.js
3445
0644
edit
dl
rm
ConstPlugin.js
14769
0644
edit
dl
rm
ContextExclusionPlugin.js
797
0644
edit
dl
rm
ContextModule.js
32377
0644
edit
dl
rm
ContextModuleFactory.js
11185
0644
edit
dl
rm
ContextReplacementPlugin.js
4720
0644
edit
dl
rm
DefinePlugin.js
16671
0644
edit
dl
rm
DelegatedModule.js
7237
0644
edit
dl
rm
DelegatedModuleFactoryPlugin.js
2337
0644
edit
dl
rm
DelegatedPlugin.js
1015
0644
edit
dl
rm
DependenciesBlock.js
2589
0644
edit
dl
rm
Dependency.js
9338
0644
edit
dl
rm
DependencyTemplate.js
2094
0644
edit
dl
rm
DependencyTemplates.js
1716
0644
edit
dl
rm
DllEntryPlugin.js
1277
0644
edit
dl
rm
DllModule.js
4493
0644
edit
dl
rm
DllModuleFactory.js
1008
0644
edit
dl
rm
DllPlugin.js
1702
0644
edit
dl
rm
DllReferencePlugin.js
5132
0644
edit
dl
rm
DynamicEntryPlugin.js
2035
0644
edit
dl
rm
EntryOptionPlugin.js
2779
0644
edit
dl
rm
EntryPlugin.js
1737
0644
edit
dl
rm
Entrypoint.js
3025
0644
edit
dl
rm
EnvironmentPlugin.js
1743
0644
edit
dl
rm
ErrorHelpers.js
1454
0644
edit
dl
rm
EvalDevToolModulePlugin.js
3296
0644
edit
dl
rm
EvalSourceMapDevToolPlugin.js
6335
0644
edit
dl
rm
ExportsInfo.js
43994
0644
edit
dl
rm
ExportsInfoApiPlugin.js
2072
0644
edit
dl
rm
ExternalModule.js
21521
0644
edit
dl
rm
ExternalModuleFactoryPlugin.js
7219
0644
edit
dl
rm
ExternalsPlugin.js
899
0644
edit
dl
rm
FileSystemInfo.js
103021
0644
edit
dl
rm
FlagAllModulesAsUsedPlugin.js
1451
0644
edit
dl
rm
FlagDependencyExportsPlugin.js
13222
0644
edit
dl
rm
FlagDependencyUsagePlugin.js
10998
0644
edit
dl
rm
FlagEntryExportAsUsedPlugin.js
1373
0644
edit
dl
rm
formatLocation.js
1781
0644
edit
dl
rm
Generator.js
4571
0644
edit
dl
rm
GraphHelpers.js
1074
0644
edit
dl
rm
HarmonyLinkingError.js
357
0644
edit
dl
rm
HookWebpackError.js
2070
0644
edit
dl
rm
HotModuleReplacementPlugin.js
26338
0644
edit
dl
rm
HotUpdateChunk.js
353
0644
edit
dl
rm
IgnoreErrorModuleFactory.js
1048
0644
edit
dl
rm
IgnorePlugin.js
2253
0644
edit
dl
rm
IgnoreWarningsPlugin.js
964
0644
edit
dl
rm
index.js
15926
0644
edit
dl
rm
InitFragment.js
4647
0644
edit
dl
rm
InvalidDependenciesModuleWarning.js
1874
0644
edit
dl
rm
JavascriptMetaInfoPlugin.js
2079
0644
edit
dl
rm
LibManifestPlugin.js
3116
0644
edit
dl
rm
LibraryTemplatePlugin.js
1588
0644
edit
dl
rm
LoaderOptionsPlugin.js
1857
0644
edit
dl
rm
LoaderTargetPlugin.js
747
0644
edit
dl
rm
MainTemplate.js
10391
0644
edit
dl
rm
Module.js
29686
0644
edit
dl
rm
ModuleBuildError.js
1626
0644
edit
dl
rm
ModuleDependencyError.js
1107
0644
edit
dl
rm
ModuleDependencyWarning.js
1222
0644
edit
dl
rm
ModuleError.js
1202
0644
edit
dl
rm
ModuleFactory.js
1427
0644
edit
dl
rm
ModuleFilenameHelpers.js
8060
0644
edit
dl
rm
ModuleGraph.js
24568
0644
edit
dl
rm
ModuleGraphConnection.js
5209
0644
edit
dl
rm
ModuleInfoHeaderPlugin.js
7174
0644
edit
dl
rm
ModuleNotFoundError.js
2610
0644
edit
dl
rm
ModuleParseError.js
3332
0644
edit
dl
rm
ModuleProfile.js
2440
0644
edit
dl
rm
ModuleRestoreError.js
957
0644
edit
dl
rm
ModuleStoreError.js
951
0644
edit
dl
rm
ModuleTemplate.js
3999
0644
edit
dl
rm
ModuleWarning.js
1280
0644
edit
dl
rm
MultiCompiler.js
16038
0644
edit
dl
rm
MultiStats.js
4222
0644
edit
dl
rm
MultiWatching.js
1466
0644
edit
dl
rm
NodeStuffInWebError.js
843
0644
edit
dl
rm
NodeStuffPlugin.js
5071
0644
edit
dl
rm
NoEmitOnErrorsPlugin.js
713
0644
edit
dl
rm
NoModeWarning.js
663
0644
edit
dl
rm
NormalModule.js
41829
0644
edit
dl
rm
NormalModuleFactory.js
31753
0644
edit
dl
rm
NormalModuleReplacementPlugin.js
1883
0644
edit
dl
rm
NullFactory.js
628
0644
edit
dl
rm
OptimizationStages.js
204
0644
edit
dl
rm
OptionsApply.js
201
0644
edit
dl
rm
Parser.js
968
0644
edit
dl
rm
PrefetchPlugin.js
1048
0644
edit
dl
rm
ProgressPlugin.js
17255
0644
edit
dl
rm
ProvidePlugin.js
2890
0644
edit
dl
rm
RawModule.js
4634
0644
edit
dl
rm
RecordIdsPlugin.js
6821
0644
edit
dl
rm
RequestShortener.js
755
0644
edit
dl
rm
RequireJsStuffPlugin.js
1904
0644
edit
dl
rm
ResolverFactory.js
4947
0644
edit
dl
rm
RuntimeGlobals.js
8510
0644
edit
dl
rm
RuntimeModule.js
5751
0644
edit
dl
rm
RuntimePlugin.js
13009
0644
edit
dl
rm
RuntimeTemplate.js
28186
0644
edit
dl
rm
SelfModuleFactory.js
384
0644
edit
dl
rm
SingleEntryPlugin.js
161
0644
edit
dl
rm
SizeFormatHelpers.js
583
0644
edit
dl
rm
SourceMapDevToolModuleOptionsPlugin.js
1325
0644
edit
dl
rm
SourceMapDevToolPlugin.js
17012
0644
edit
dl
rm
Stats.js
2003
0644
edit
dl
rm
Template.js
12789
0644
edit
dl
rm
TemplatedPathPlugin.js
7988
0644
edit
dl
rm
UnhandledSchemeError.js
833
0644
edit
dl
rm
UnsupportedFeatureWarning.js
780
0644
edit
dl
rm
UseStrictPlugin.js
1645
0644
edit
dl
rm
validateSchema.js
6395
0644
edit
dl
rm
WarnCaseSensitiveModulesPlugin.js
1410
0644
edit
dl
rm
WarnDeprecatedOptionPlugin.js
1275
0644
edit
dl
rm
WarnNoModeSetPlugin.js
545
0644
edit
dl
rm
WatchIgnorePlugin.js
2930
0644
edit
dl
rm
Watching.js
12467
0644
edit
dl
rm
webpack.js
5085
0644
edit
dl
rm
WebpackError.js
1377
0644
edit
dl
rm
WebpackIsIncludedPlugin.js
2420
0644
edit
dl
rm
WebpackOptionsApply.js
24711
0644
edit
dl
rm
WebpackOptionsDefaulter.js
470
0644
edit
dl
rm
Edit:
/var/www/flurhymez/node_modules/webpack/lib/cli.js
(15619B)
/* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ "use strict"; const path = require("path"); const webpackSchema = require("../schemas/WebpackOptions.json"); // TODO add originPath to PathItem for better errors /** * @typedef {Object} PathItem * @property {any} schema the part of the schema * @property {string} path the path in the config */ /** @typedef {"unknown-argument" | "unexpected-non-array-in-path" | "unexpected-non-object-in-path" | "multiple-values-unexpected" | "invalid-value"} ProblemType */ /** * @typedef {Object} Problem * @property {ProblemType} type * @property {string} path * @property {string} argument * @property {any=} value * @property {number=} index * @property {string=} expected */ /** * @typedef {Object} LocalProblem * @property {ProblemType} type * @property {string} path * @property {string=} expected */ /** * @typedef {Object} ArgumentConfig * @property {string} description * @property {string} path * @property {boolean} multiple * @property {"enum"|"string"|"path"|"number"|"boolean"|"RegExp"|"reset"} type * @property {any[]=} values */ /** * @typedef {Object} Argument * @property {string} description * @property {"string"|"number"|"boolean"} simpleType * @property {boolean} multiple * @property {ArgumentConfig[]} configs */ /** * @param {any=} schema a json schema to create arguments for (by default webpack schema is used) * @returns {Record<string, Argument>} object of arguments */ const getArguments = (schema = webpackSchema) => { /** @type {Record<string, Argument>} */ const flags = {}; const pathToArgumentName = input => { return input .replace(/\./g, "-") .replace(/\[\]/g, "") .replace( /(\p{Uppercase_Letter}+|\p{Lowercase_Letter}|\d)(\p{Uppercase_Letter}+)/gu, "$1-$2" ) .replace(/-?[^\p{Uppercase_Letter}\p{Lowercase_Letter}\d]+/gu, "-") .toLowerCase(); }; const getSchemaPart = path => { const newPath = path.split("/"); let schemaPart = schema; for (let i = 1; i < newPath.length; i++) { const inner = schemaPart[newPath[i]]; if (!inner) { break; } schemaPart = inner; } return schemaPart; }; /** * * @param {PathItem[]} path path in the schema * @returns {string | undefined} description */ const getDescription = path => { for (const { schema } of path) { if (schema.cli && schema.cli.helper) continue; if (schema.description) return schema.description; } }; /** * * @param {any} schemaPart schema * @returns {Pick<ArgumentConfig, "type"|"values">} partial argument config */ const schemaToArgumentConfig = schemaPart => { if (schemaPart.enum) { return { type: "enum", values: schemaPart.enum }; } switch (schemaPart.type) { case "number": return { type: "number" }; case "string": return { type: schemaPart.absolutePath ? "path" : "string" }; case "boolean": return { type: "boolean" }; } if (schemaPart.instanceof === "RegExp") { return { type: "RegExp" }; } return undefined; }; /** * @param {PathItem[]} path path in the schema * @returns {void} */ const addResetFlag = path => { const schemaPath = path[0].path; const name = pathToArgumentName(`${schemaPath}.reset`); const description = getDescription(path); flags[name] = { configs: [ { type: "reset", multiple: false, description: `Clear all items provided in '${schemaPath}' configuration. ${description}`, path: schemaPath } ], description: undefined, simpleType: undefined, multiple: undefined }; }; /** * @param {PathItem[]} path full path in schema * @param {boolean} multiple inside of an array * @returns {number} number of arguments added */ const addFlag = (path, multiple) => { const argConfigBase = schemaToArgumentConfig(path[0].schema); if (!argConfigBase) return 0; const name = pathToArgumentName(path[0].path); /** @type {ArgumentConfig} */ const argConfig = { ...argConfigBase, multiple, description: getDescription(path), path: path[0].path }; if (!flags[name]) { flags[name] = { configs: [], description: undefined, simpleType: undefined, multiple: undefined }; } if ( flags[name].configs.some( item => JSON.stringify(item) === JSON.stringify(argConfig) ) ) { return 0; } if ( flags[name].configs.some( item => item.type === argConfig.type && item.multiple !== multiple ) ) { if (multiple) { throw new Error( `Conflicting schema for ${path[0].path} with ${argConfig.type} type (array type must be before single item type)` ); } return 0; } flags[name].configs.push(argConfig); return 1; }; // TODO support `not` and `if/then/else` // TODO support `const`, but we don't use it on our schema /** * * @param {object} schemaPart the current schema * @param {string} schemaPath the current path in the schema * @param {{schema: object, path: string}[]} path all previous visited schemaParts * @param {string | null} inArray if inside of an array, the path to the array * @returns {number} added arguments */ const traverse = (schemaPart, schemaPath = "", path = [], inArray = null) => { while (schemaPart.$ref) { schemaPart = getSchemaPart(schemaPart.$ref); } const repetitions = path.filter(({ schema }) => schema === schemaPart); if ( repetitions.length >= 2 || repetitions.some(({ path }) => path === schemaPath) ) { return 0; } if (schemaPart.cli && schemaPart.cli.exclude) return 0; const fullPath = [{ schema: schemaPart, path: schemaPath }, ...path]; let addedArguments = 0; addedArguments += addFlag(fullPath, !!inArray); if (schemaPart.type === "object") { if (schemaPart.properties) { for (const property of Object.keys(schemaPart.properties)) { addedArguments += traverse( schemaPart.properties[property], schemaPath ? `${schemaPath}.${property}` : property, fullPath, inArray ); } } return addedArguments; } if (schemaPart.type === "array") { if (inArray) { return 0; } if (Array.isArray(schemaPart.items)) { let i = 0; for (const item of schemaPart.items) { addedArguments += traverse( item, `${schemaPath}.${i}`, fullPath, schemaPath ); } return addedArguments; } addedArguments += traverse( schemaPart.items, `${schemaPath}[]`, fullPath, schemaPath ); if (addedArguments > 0) { addResetFlag(fullPath); addedArguments++; } return addedArguments; } const maybeOf = schemaPart.oneOf || schemaPart.anyOf || schemaPart.allOf; if (maybeOf) { const items = maybeOf; for (let i = 0; i < items.length; i++) { addedArguments += traverse(items[i], schemaPath, fullPath, inArray); } return addedArguments; } return addedArguments; }; traverse(schema); // Summarize flags for (const name of Object.keys(flags)) { const argument = flags[name]; argument.description = argument.configs.reduce((desc, { description }) => { if (!desc) return description; if (!description) return desc; if (desc.includes(description)) return desc; return `${desc} ${description}`; }, /** @type {string | undefined} */ (undefined)); argument.simpleType = argument.configs.reduce((t, argConfig) => { /** @type {"string" | "number" | "boolean"} */ let type = "string"; switch (argConfig.type) { case "number": type = "number"; break; case "reset": case "boolean": type = "boolean"; break; case "enum": if (argConfig.values.every(v => typeof v === "boolean")) type = "boolean"; if (argConfig.values.every(v => typeof v === "number")) type = "number"; break; } if (t === undefined) return type; return t === type ? t : "string"; }, /** @type {"string" | "number" | "boolean" | undefined} */ (undefined)); argument.multiple = argument.configs.some(c => c.multiple); } return flags; }; const cliAddedItems = new WeakMap(); /** * @param {any} config configuration * @param {string} schemaPath path in the config * @param {number | undefined} index index of value when multiple values are provided, otherwise undefined * @returns {{ problem?: LocalProblem, object?: any, property?: string | number, value?: any }} problem or object with property and value */ const getObjectAndProperty = (config, schemaPath, index = 0) => { if (!schemaPath) return { value: config }; const parts = schemaPath.split("."); let property = parts.pop(); let current = config; let i = 0; for (const part of parts) { const isArray = part.endsWith("[]"); const name = isArray ? part.slice(0, -2) : part; let value = current[name]; if (isArray) { if (value === undefined) { value = {}; current[name] = [...Array.from({ length: index }), value]; cliAddedItems.set(current[name], index + 1); } else if (!Array.isArray(value)) { return { problem: { type: "unexpected-non-array-in-path", path: parts.slice(0, i).join(".") } }; } else { let addedItems = cliAddedItems.get(value) || 0; while (addedItems <= index) { value.push(undefined); addedItems++; } cliAddedItems.set(value, addedItems); const x = value.length - addedItems + index; if (value[x] === undefined) { value[x] = {}; } else if (value[x] === null || typeof value[x] !== "object") { return { problem: { type: "unexpected-non-object-in-path", path: parts.slice(0, i).join(".") } }; } value = value[x]; } } else { if (value === undefined) { value = current[name] = {}; } else if (value === null || typeof value !== "object") { return { problem: { type: "unexpected-non-object-in-path", path: parts.slice(0, i).join(".") } }; } } current = value; i++; } let value = current[property]; if (property.endsWith("[]")) { const name = property.slice(0, -2); const value = current[name]; if (value === undefined) { current[name] = [...Array.from({ length: index }), undefined]; cliAddedItems.set(current[name], index + 1); return { object: current[name], property: index, value: undefined }; } else if (!Array.isArray(value)) { current[name] = [value, ...Array.from({ length: index }), undefined]; cliAddedItems.set(current[name], index + 1); return { object: current[name], property: index + 1, value: undefined }; } else { let addedItems = cliAddedItems.get(value) || 0; while (addedItems <= index) { value.push(undefined); addedItems++; } cliAddedItems.set(value, addedItems); const x = value.length - addedItems + index; if (value[x] === undefined) { value[x] = {}; } else if (value[x] === null || typeof value[x] !== "object") { return { problem: { type: "unexpected-non-object-in-path", path: schemaPath } }; } return { object: value, property: x, value: value[x] }; } } return { object: current, property, value }; }; /** * @param {any} config configuration * @param {string} schemaPath path in the config * @param {any} value parsed value * @param {number | undefined} index index of value when multiple values are provided, otherwise undefined * @returns {LocalProblem | null} problem or null for success */ const setValue = (config, schemaPath, value, index) => { const { problem, object, property } = getObjectAndProperty( config, schemaPath, index ); if (problem) return problem; object[property] = value; return null; }; /** * @param {ArgumentConfig} argConfig processing instructions * @param {any} config configuration * @param {any} value the value * @param {number | undefined} index the index if multiple values provided * @returns {LocalProblem | null} a problem if any */ const processArgumentConfig = (argConfig, config, value, index) => { if (index !== undefined && !argConfig.multiple) { return { type: "multiple-values-unexpected", path: argConfig.path }; } const parsed = parseValueForArgumentConfig(argConfig, value); if (parsed === undefined) { return { type: "invalid-value", path: argConfig.path, expected: getExpectedValue(argConfig) }; } const problem = setValue(config, argConfig.path, parsed, index); if (problem) return problem; return null; }; /** * @param {ArgumentConfig} argConfig processing instructions * @returns {string | undefined} expected message */ const getExpectedValue = argConfig => { switch (argConfig.type) { default: return argConfig.type; case "boolean": return "true | false"; case "RegExp": return "regular expression (example: /ab?c*/)"; case "enum": return argConfig.values.map(v => `${v}`).join(" | "); case "reset": return "true (will reset the previous value to an empty array)"; } }; /** * @param {ArgumentConfig} argConfig processing instructions * @param {any} value the value * @returns {any | undefined} parsed value */ const parseValueForArgumentConfig = (argConfig, value) => { switch (argConfig.type) { case "string": if (typeof value === "string") { return value; } break; case "path": if (typeof value === "string") { return path.resolve(value); } break; case "number": if (typeof value === "number") return value; if (typeof value === "string" && /^[+-]?\d*(\.\d*)[eE]\d+$/) { const n = +value; if (!isNaN(n)) return n; } break; case "boolean": if (typeof value === "boolean") return value; if (value === "true") return true; if (value === "false") return false; break; case "RegExp": if (value instanceof RegExp) return value; if (typeof value === "string") { // cspell:word yugi const match = /^\/(.*)\/([yugi]*)$/.exec(value); if (match && !/[^\\]\//.test(match[1])) return new RegExp(match[1], match[2]); } break; case "enum": if (argConfig.values.includes(value)) return value; for (const item of argConfig.values) { if (`${item}` === value) return item; } break; case "reset": if (value === true) return []; break; } }; /** * @param {Record<string, Argument>} args object of arguments * @param {any} config configuration * @param {Record<string, string | number | boolean | RegExp | (string | number | boolean | RegExp)[]>} values object with values * @returns {Problem[] | null} problems or null for success */ const processArguments = (args, config, values) => { /** @type {Problem[]} */ const problems = []; for (const key of Object.keys(values)) { const arg = args[key]; if (!arg) { problems.push({ type: "unknown-argument", path: "", argument: key }); continue; } const processValue = (value, i) => { const currentProblems = []; for (const argConfig of arg.configs) { const problem = processArgumentConfig(argConfig, config, value, i); if (!problem) { return; } currentProblems.push({ ...problem, argument: key, value: value, index: i }); } problems.push(...currentProblems); }; let value = values[key]; if (Array.isArray(value)) { for (let i = 0; i < value.length; i++) { processValue(value[i], i); } } else { processValue(value, undefined); } } if (problems.length === 0) return null; return problems; }; exports.getArguments = getArguments; exports.processArguments = processArguments;
Save
cmd:
run