@principal-ai/principal-view-cli 0.1.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../node_modules/commander/lib/error.js", "../../../node_modules/commander/lib/argument.js", "../../../node_modules/commander/lib/help.js", "../../../node_modules/commander/lib/option.js", "../../../node_modules/commander/lib/suggestSimilar.js", "../../../node_modules/commander/lib/command.js", "../../../node_modules/commander/index.js", "../../../node_modules/fast-glob/out/utils/array.js", "../../../node_modules/fast-glob/out/utils/errno.js", "../../../node_modules/fast-glob/out/utils/fs.js", "../../../node_modules/fast-glob/out/utils/path.js", "../../../node_modules/is-extglob/index.js", "../../../node_modules/is-glob/index.js", "../../../node_modules/fast-glob/node_modules/glob-parent/index.js", "../../../node_modules/braces/lib/utils.js", "../../../node_modules/braces/lib/stringify.js", "../../../node_modules/is-number/index.js", "../../../node_modules/to-regex-range/index.js", "../../../node_modules/fill-range/index.js", "../../../node_modules/braces/lib/compile.js", "../../../node_modules/braces/lib/expand.js", "../../../node_modules/braces/lib/constants.js", "../../../node_modules/braces/lib/parse.js", "../../../node_modules/braces/index.js", "../../../node_modules/micromatch/node_modules/picomatch/lib/constants.js", "../../../node_modules/micromatch/node_modules/picomatch/lib/utils.js", "../../../node_modules/micromatch/node_modules/picomatch/lib/scan.js", "../../../node_modules/micromatch/node_modules/picomatch/lib/parse.js", "../../../node_modules/micromatch/node_modules/picomatch/lib/picomatch.js", "../../../node_modules/micromatch/node_modules/picomatch/index.js", "../../../node_modules/micromatch/index.js", "../../../node_modules/fast-glob/out/utils/pattern.js", "../../../node_modules/merge2/index.js", "../../../node_modules/fast-glob/out/utils/stream.js", "../../../node_modules/fast-glob/out/utils/string.js", "../../../node_modules/fast-glob/out/utils/index.js", "../../../node_modules/fast-glob/out/managers/tasks.js", "../../../node_modules/@nodelib/fs.stat/out/providers/async.js", "../../../node_modules/@nodelib/fs.stat/out/providers/sync.js", "../../../node_modules/@nodelib/fs.stat/out/adapters/fs.js", "../../../node_modules/@nodelib/fs.stat/out/settings.js", "../../../node_modules/@nodelib/fs.stat/out/index.js", "../../../node_modules/queue-microtask/index.js", "../../../node_modules/run-parallel/index.js", "../../../node_modules/@nodelib/fs.scandir/out/constants.js", "../../../node_modules/@nodelib/fs.scandir/out/utils/fs.js", "../../../node_modules/@nodelib/fs.scandir/out/utils/index.js", "../../../node_modules/@nodelib/fs.scandir/out/providers/common.js", "../../../node_modules/@nodelib/fs.scandir/out/providers/async.js", "../../../node_modules/@nodelib/fs.scandir/out/providers/sync.js", "../../../node_modules/@nodelib/fs.scandir/out/adapters/fs.js", "../../../node_modules/@nodelib/fs.scandir/out/settings.js", "../../../node_modules/@nodelib/fs.scandir/out/index.js", "../../../node_modules/reusify/reusify.js", "../../../node_modules/fastq/queue.js", "../../../node_modules/@nodelib/fs.walk/out/readers/common.js", "../../../node_modules/@nodelib/fs.walk/out/readers/reader.js", "../../../node_modules/@nodelib/fs.walk/out/readers/async.js", "../../../node_modules/@nodelib/fs.walk/out/providers/async.js", "../../../node_modules/@nodelib/fs.walk/out/providers/stream.js", "../../../node_modules/@nodelib/fs.walk/out/readers/sync.js", "../../../node_modules/@nodelib/fs.walk/out/providers/sync.js", "../../../node_modules/@nodelib/fs.walk/out/settings.js", "../../../node_modules/@nodelib/fs.walk/out/index.js", "../../../node_modules/fast-glob/out/readers/reader.js", "../../../node_modules/fast-glob/out/readers/stream.js", "../../../node_modules/fast-glob/out/readers/async.js", "../../../node_modules/fast-glob/out/providers/matchers/matcher.js", "../../../node_modules/fast-glob/out/providers/matchers/partial.js", "../../../node_modules/fast-glob/out/providers/filters/deep.js", "../../../node_modules/fast-glob/out/providers/filters/entry.js", "../../../node_modules/fast-glob/out/providers/filters/error.js", "../../../node_modules/fast-glob/out/providers/transformers/entry.js", "../../../node_modules/fast-glob/out/providers/provider.js", "../../../node_modules/fast-glob/out/providers/async.js", "../../../node_modules/fast-glob/out/providers/stream.js", "../../../node_modules/fast-glob/out/readers/sync.js", "../../../node_modules/fast-glob/out/providers/sync.js", "../../../node_modules/fast-glob/out/settings.js", "../../../node_modules/fast-glob/out/index.js", "../../../node_modules/globby/node_modules/ignore/index.js", "../../../node_modules/commander/esm.mjs", "../src/commands/validate.ts", "../../../node_modules/chalk/source/vendor/ansi-styles/index.js", "../../../node_modules/chalk/source/vendor/supports-color/index.js", "../../../node_modules/chalk/source/utilities.js", "../../../node_modules/chalk/source/index.js", "../../../node_modules/globby/index.js", "../../../node_modules/@sindresorhus/merge-streams/index.js", "../../../node_modules/unicorn-magic/node.js", "../../../node_modules/globby/ignore.js", "../../../node_modules/globby/node_modules/is-path-inside/index.js", "../../../node_modules/slash/index.js", "../../../node_modules/globby/utilities.js", "../../../node_modules/js-yaml/dist/js-yaml.mjs", "../src/commands/init.ts", "../src/commands/list.ts", "../src/commands/schema.ts", "../src/commands/doctor.ts", "../src/commands/hooks.ts", "../src/commands/create.ts", "../src/commands/lint.ts", "../../core/src/utils/YamlParser.ts", "../../core/src/ConfigurationLoader.ts", "../../core/src/rules/types.ts", "../../core/src/rules/engine.ts", "../../core/src/rules/config.ts", "../../core/src/rules/implementations/required-metadata.ts", "../../core/src/rules/implementations/valid-node-types.ts", "../../core/src/rules/implementations/valid-edge-types.ts", "../../core/src/rules/implementations/valid-color-format.ts", "../../core/src/rules/implementations/no-unknown-fields.ts", "../../core/src/rules/implementations/connection-type-references.ts", "../../core/src/rules/implementations/state-transition-references.ts", "../../core/src/rules/implementations/minimum-node-sources.ts", "../../core/src/rules/implementations/orphaned-node-types.ts", "../../core/src/rules/implementations/orphaned-edge-types.ts", "../../core/src/rules/implementations/unreachable-states.ts", "../../core/src/rules/implementations/dead-end-states.ts", "../../core/src/rules/implementations/valid-action-patterns.ts", "../../core/src/rules/implementations/library-node-type-match.ts", "../../core/src/rules/implementations/index.ts", "../../core/src/rules/index.ts", "../src/index.ts"],
4
+ "sourcesContent": ["/**\n * CommanderError class\n */\nclass CommanderError extends Error {\n /**\n * Constructs the CommanderError class\n * @param {number} exitCode suggested exit code which could be used with process.exit\n * @param {string} code an id string representing the error\n * @param {string} message human-readable description of the error\n */\n constructor(exitCode, code, message) {\n super(message);\n // properly capture stack trace in Node.js\n Error.captureStackTrace(this, this.constructor);\n this.name = this.constructor.name;\n this.code = code;\n this.exitCode = exitCode;\n this.nestedError = undefined;\n }\n}\n\n/**\n * InvalidArgumentError class\n */\nclass InvalidArgumentError extends CommanderError {\n /**\n * Constructs the InvalidArgumentError class\n * @param {string} [message] explanation of why argument is invalid\n */\n constructor(message) {\n super(1, 'commander.invalidArgument', message);\n // properly capture stack trace in Node.js\n Error.captureStackTrace(this, this.constructor);\n this.name = this.constructor.name;\n }\n}\n\nexports.CommanderError = CommanderError;\nexports.InvalidArgumentError = InvalidArgumentError;\n", "const { InvalidArgumentError } = require('./error.js');\n\nclass Argument {\n /**\n * Initialize a new command argument with the given name and description.\n * The default is that the argument is required, and you can explicitly\n * indicate this with <> around the name. Put [] around the name for an optional argument.\n *\n * @param {string} name\n * @param {string} [description]\n */\n\n constructor(name, description) {\n this.description = description || '';\n this.variadic = false;\n this.parseArg = undefined;\n this.defaultValue = undefined;\n this.defaultValueDescription = undefined;\n this.argChoices = undefined;\n\n switch (name[0]) {\n case '<': // e.g. <required>\n this.required = true;\n this._name = name.slice(1, -1);\n break;\n case '[': // e.g. [optional]\n this.required = false;\n this._name = name.slice(1, -1);\n break;\n default:\n this.required = true;\n this._name = name;\n break;\n }\n\n if (this._name.endsWith('...')) {\n this.variadic = true;\n this._name = this._name.slice(0, -3);\n }\n }\n\n /**\n * Return argument name.\n *\n * @return {string}\n */\n\n name() {\n return this._name;\n }\n\n /**\n * @package\n */\n\n _collectValue(value, previous) {\n if (previous === this.defaultValue || !Array.isArray(previous)) {\n return [value];\n }\n\n previous.push(value);\n return previous;\n }\n\n /**\n * Set the default value, and optionally supply the description to be displayed in the help.\n *\n * @param {*} value\n * @param {string} [description]\n * @return {Argument}\n */\n\n default(value, description) {\n this.defaultValue = value;\n this.defaultValueDescription = description;\n return this;\n }\n\n /**\n * Set the custom handler for processing CLI command arguments into argument values.\n *\n * @param {Function} [fn]\n * @return {Argument}\n */\n\n argParser(fn) {\n this.parseArg = fn;\n return this;\n }\n\n /**\n * Only allow argument value to be one of choices.\n *\n * @param {string[]} values\n * @return {Argument}\n */\n\n choices(values) {\n this.argChoices = values.slice();\n this.parseArg = (arg, previous) => {\n if (!this.argChoices.includes(arg)) {\n throw new InvalidArgumentError(\n `Allowed choices are ${this.argChoices.join(', ')}.`,\n );\n }\n if (this.variadic) {\n return this._collectValue(arg, previous);\n }\n return arg;\n };\n return this;\n }\n\n /**\n * Make argument required.\n *\n * @returns {Argument}\n */\n argRequired() {\n this.required = true;\n return this;\n }\n\n /**\n * Make argument optional.\n *\n * @returns {Argument}\n */\n argOptional() {\n this.required = false;\n return this;\n }\n}\n\n/**\n * Takes an argument and returns its human readable equivalent for help usage.\n *\n * @param {Argument} arg\n * @return {string}\n * @private\n */\n\nfunction humanReadableArgName(arg) {\n const nameOutput = arg.name() + (arg.variadic === true ? '...' : '');\n\n return arg.required ? '<' + nameOutput + '>' : '[' + nameOutput + ']';\n}\n\nexports.Argument = Argument;\nexports.humanReadableArgName = humanReadableArgName;\n", "const { humanReadableArgName } = require('./argument.js');\n\n/**\n * TypeScript import types for JSDoc, used by Visual Studio Code IntelliSense and `npm run typescript-checkJS`\n * https://www.typescriptlang.org/docs/handbook/jsdoc-supported-types.html#import-types\n * @typedef { import(\"./argument.js\").Argument } Argument\n * @typedef { import(\"./command.js\").Command } Command\n * @typedef { import(\"./option.js\").Option } Option\n */\n\n// Although this is a class, methods are static in style to allow override using subclass or just functions.\nclass Help {\n constructor() {\n this.helpWidth = undefined;\n this.minWidthToWrap = 40;\n this.sortSubcommands = false;\n this.sortOptions = false;\n this.showGlobalOptions = false;\n }\n\n /**\n * prepareContext is called by Commander after applying overrides from `Command.configureHelp()`\n * and just before calling `formatHelp()`.\n *\n * Commander just uses the helpWidth and the rest is provided for optional use by more complex subclasses.\n *\n * @param {{ error?: boolean, helpWidth?: number, outputHasColors?: boolean }} contextOptions\n */\n prepareContext(contextOptions) {\n this.helpWidth = this.helpWidth ?? contextOptions.helpWidth ?? 80;\n }\n\n /**\n * Get an array of the visible subcommands. Includes a placeholder for the implicit help command, if there is one.\n *\n * @param {Command} cmd\n * @returns {Command[]}\n */\n\n visibleCommands(cmd) {\n const visibleCommands = cmd.commands.filter((cmd) => !cmd._hidden);\n const helpCommand = cmd._getHelpCommand();\n if (helpCommand && !helpCommand._hidden) {\n visibleCommands.push(helpCommand);\n }\n if (this.sortSubcommands) {\n visibleCommands.sort((a, b) => {\n // @ts-ignore: because overloaded return type\n return a.name().localeCompare(b.name());\n });\n }\n return visibleCommands;\n }\n\n /**\n * Compare options for sort.\n *\n * @param {Option} a\n * @param {Option} b\n * @returns {number}\n */\n compareOptions(a, b) {\n const getSortKey = (option) => {\n // WYSIWYG for order displayed in help. Short used for comparison if present. No special handling for negated.\n return option.short\n ? option.short.replace(/^-/, '')\n : option.long.replace(/^--/, '');\n };\n return getSortKey(a).localeCompare(getSortKey(b));\n }\n\n /**\n * Get an array of the visible options. Includes a placeholder for the implicit help option, if there is one.\n *\n * @param {Command} cmd\n * @returns {Option[]}\n */\n\n visibleOptions(cmd) {\n const visibleOptions = cmd.options.filter((option) => !option.hidden);\n // Built-in help option.\n const helpOption = cmd._getHelpOption();\n if (helpOption && !helpOption.hidden) {\n // Automatically hide conflicting flags. Bit dubious but a historical behaviour that is convenient for single-command programs.\n const removeShort = helpOption.short && cmd._findOption(helpOption.short);\n const removeLong = helpOption.long && cmd._findOption(helpOption.long);\n if (!removeShort && !removeLong) {\n visibleOptions.push(helpOption); // no changes needed\n } else if (helpOption.long && !removeLong) {\n visibleOptions.push(\n cmd.createOption(helpOption.long, helpOption.description),\n );\n } else if (helpOption.short && !removeShort) {\n visibleOptions.push(\n cmd.createOption(helpOption.short, helpOption.description),\n );\n }\n }\n if (this.sortOptions) {\n visibleOptions.sort(this.compareOptions);\n }\n return visibleOptions;\n }\n\n /**\n * Get an array of the visible global options. (Not including help.)\n *\n * @param {Command} cmd\n * @returns {Option[]}\n */\n\n visibleGlobalOptions(cmd) {\n if (!this.showGlobalOptions) return [];\n\n const globalOptions = [];\n for (\n let ancestorCmd = cmd.parent;\n ancestorCmd;\n ancestorCmd = ancestorCmd.parent\n ) {\n const visibleOptions = ancestorCmd.options.filter(\n (option) => !option.hidden,\n );\n globalOptions.push(...visibleOptions);\n }\n if (this.sortOptions) {\n globalOptions.sort(this.compareOptions);\n }\n return globalOptions;\n }\n\n /**\n * Get an array of the arguments if any have a description.\n *\n * @param {Command} cmd\n * @returns {Argument[]}\n */\n\n visibleArguments(cmd) {\n // Side effect! Apply the legacy descriptions before the arguments are displayed.\n if (cmd._argsDescription) {\n cmd.registeredArguments.forEach((argument) => {\n argument.description =\n argument.description || cmd._argsDescription[argument.name()] || '';\n });\n }\n\n // If there are any arguments with a description then return all the arguments.\n if (cmd.registeredArguments.find((argument) => argument.description)) {\n return cmd.registeredArguments;\n }\n return [];\n }\n\n /**\n * Get the command term to show in the list of subcommands.\n *\n * @param {Command} cmd\n * @returns {string}\n */\n\n subcommandTerm(cmd) {\n // Legacy. Ignores custom usage string, and nested commands.\n const args = cmd.registeredArguments\n .map((arg) => humanReadableArgName(arg))\n .join(' ');\n return (\n cmd._name +\n (cmd._aliases[0] ? '|' + cmd._aliases[0] : '') +\n (cmd.options.length ? ' [options]' : '') + // simplistic check for non-help option\n (args ? ' ' + args : '')\n );\n }\n\n /**\n * Get the option term to show in the list of options.\n *\n * @param {Option} option\n * @returns {string}\n */\n\n optionTerm(option) {\n return option.flags;\n }\n\n /**\n * Get the argument term to show in the list of arguments.\n *\n * @param {Argument} argument\n * @returns {string}\n */\n\n argumentTerm(argument) {\n return argument.name();\n }\n\n /**\n * Get the longest command term length.\n *\n * @param {Command} cmd\n * @param {Help} helper\n * @returns {number}\n */\n\n longestSubcommandTermLength(cmd, helper) {\n return helper.visibleCommands(cmd).reduce((max, command) => {\n return Math.max(\n max,\n this.displayWidth(\n helper.styleSubcommandTerm(helper.subcommandTerm(command)),\n ),\n );\n }, 0);\n }\n\n /**\n * Get the longest option term length.\n *\n * @param {Command} cmd\n * @param {Help} helper\n * @returns {number}\n */\n\n longestOptionTermLength(cmd, helper) {\n return helper.visibleOptions(cmd).reduce((max, option) => {\n return Math.max(\n max,\n this.displayWidth(helper.styleOptionTerm(helper.optionTerm(option))),\n );\n }, 0);\n }\n\n /**\n * Get the longest global option term length.\n *\n * @param {Command} cmd\n * @param {Help} helper\n * @returns {number}\n */\n\n longestGlobalOptionTermLength(cmd, helper) {\n return helper.visibleGlobalOptions(cmd).reduce((max, option) => {\n return Math.max(\n max,\n this.displayWidth(helper.styleOptionTerm(helper.optionTerm(option))),\n );\n }, 0);\n }\n\n /**\n * Get the longest argument term length.\n *\n * @param {Command} cmd\n * @param {Help} helper\n * @returns {number}\n */\n\n longestArgumentTermLength(cmd, helper) {\n return helper.visibleArguments(cmd).reduce((max, argument) => {\n return Math.max(\n max,\n this.displayWidth(\n helper.styleArgumentTerm(helper.argumentTerm(argument)),\n ),\n );\n }, 0);\n }\n\n /**\n * Get the command usage to be displayed at the top of the built-in help.\n *\n * @param {Command} cmd\n * @returns {string}\n */\n\n commandUsage(cmd) {\n // Usage\n let cmdName = cmd._name;\n if (cmd._aliases[0]) {\n cmdName = cmdName + '|' + cmd._aliases[0];\n }\n let ancestorCmdNames = '';\n for (\n let ancestorCmd = cmd.parent;\n ancestorCmd;\n ancestorCmd = ancestorCmd.parent\n ) {\n ancestorCmdNames = ancestorCmd.name() + ' ' + ancestorCmdNames;\n }\n return ancestorCmdNames + cmdName + ' ' + cmd.usage();\n }\n\n /**\n * Get the description for the command.\n *\n * @param {Command} cmd\n * @returns {string}\n */\n\n commandDescription(cmd) {\n // @ts-ignore: because overloaded return type\n return cmd.description();\n }\n\n /**\n * Get the subcommand summary to show in the list of subcommands.\n * (Fallback to description for backwards compatibility.)\n *\n * @param {Command} cmd\n * @returns {string}\n */\n\n subcommandDescription(cmd) {\n // @ts-ignore: because overloaded return type\n return cmd.summary() || cmd.description();\n }\n\n /**\n * Get the option description to show in the list of options.\n *\n * @param {Option} option\n * @return {string}\n */\n\n optionDescription(option) {\n const extraInfo = [];\n\n if (option.argChoices) {\n extraInfo.push(\n // use stringify to match the display of the default value\n `choices: ${option.argChoices.map((choice) => JSON.stringify(choice)).join(', ')}`,\n );\n }\n if (option.defaultValue !== undefined) {\n // default for boolean and negated more for programmer than end user,\n // but show true/false for boolean option as may be for hand-rolled env or config processing.\n const showDefault =\n option.required ||\n option.optional ||\n (option.isBoolean() && typeof option.defaultValue === 'boolean');\n if (showDefault) {\n extraInfo.push(\n `default: ${option.defaultValueDescription || JSON.stringify(option.defaultValue)}`,\n );\n }\n }\n // preset for boolean and negated are more for programmer than end user\n if (option.presetArg !== undefined && option.optional) {\n extraInfo.push(`preset: ${JSON.stringify(option.presetArg)}`);\n }\n if (option.envVar !== undefined) {\n extraInfo.push(`env: ${option.envVar}`);\n }\n if (extraInfo.length > 0) {\n const extraDescription = `(${extraInfo.join(', ')})`;\n if (option.description) {\n return `${option.description} ${extraDescription}`;\n }\n return extraDescription;\n }\n\n return option.description;\n }\n\n /**\n * Get the argument description to show in the list of arguments.\n *\n * @param {Argument} argument\n * @return {string}\n */\n\n argumentDescription(argument) {\n const extraInfo = [];\n if (argument.argChoices) {\n extraInfo.push(\n // use stringify to match the display of the default value\n `choices: ${argument.argChoices.map((choice) => JSON.stringify(choice)).join(', ')}`,\n );\n }\n if (argument.defaultValue !== undefined) {\n extraInfo.push(\n `default: ${argument.defaultValueDescription || JSON.stringify(argument.defaultValue)}`,\n );\n }\n if (extraInfo.length > 0) {\n const extraDescription = `(${extraInfo.join(', ')})`;\n if (argument.description) {\n return `${argument.description} ${extraDescription}`;\n }\n return extraDescription;\n }\n return argument.description;\n }\n\n /**\n * Format a list of items, given a heading and an array of formatted items.\n *\n * @param {string} heading\n * @param {string[]} items\n * @param {Help} helper\n * @returns string[]\n */\n formatItemList(heading, items, helper) {\n if (items.length === 0) return [];\n\n return [helper.styleTitle(heading), ...items, ''];\n }\n\n /**\n * Group items by their help group heading.\n *\n * @param {Command[] | Option[]} unsortedItems\n * @param {Command[] | Option[]} visibleItems\n * @param {Function} getGroup\n * @returns {Map<string, Command[] | Option[]>}\n */\n groupItems(unsortedItems, visibleItems, getGroup) {\n const result = new Map();\n // Add groups in order of appearance in unsortedItems.\n unsortedItems.forEach((item) => {\n const group = getGroup(item);\n if (!result.has(group)) result.set(group, []);\n });\n // Add items in order of appearance in visibleItems.\n visibleItems.forEach((item) => {\n const group = getGroup(item);\n if (!result.has(group)) {\n result.set(group, []);\n }\n result.get(group).push(item);\n });\n return result;\n }\n\n /**\n * Generate the built-in help text.\n *\n * @param {Command} cmd\n * @param {Help} helper\n * @returns {string}\n */\n\n formatHelp(cmd, helper) {\n const termWidth = helper.padWidth(cmd, helper);\n const helpWidth = helper.helpWidth ?? 80; // in case prepareContext() was not called\n\n function callFormatItem(term, description) {\n return helper.formatItem(term, termWidth, description, helper);\n }\n\n // Usage\n let output = [\n `${helper.styleTitle('Usage:')} ${helper.styleUsage(helper.commandUsage(cmd))}`,\n '',\n ];\n\n // Description\n const commandDescription = helper.commandDescription(cmd);\n if (commandDescription.length > 0) {\n output = output.concat([\n helper.boxWrap(\n helper.styleCommandDescription(commandDescription),\n helpWidth,\n ),\n '',\n ]);\n }\n\n // Arguments\n const argumentList = helper.visibleArguments(cmd).map((argument) => {\n return callFormatItem(\n helper.styleArgumentTerm(helper.argumentTerm(argument)),\n helper.styleArgumentDescription(helper.argumentDescription(argument)),\n );\n });\n output = output.concat(\n this.formatItemList('Arguments:', argumentList, helper),\n );\n\n // Options\n const optionGroups = this.groupItems(\n cmd.options,\n helper.visibleOptions(cmd),\n (option) => option.helpGroupHeading ?? 'Options:',\n );\n optionGroups.forEach((options, group) => {\n const optionList = options.map((option) => {\n return callFormatItem(\n helper.styleOptionTerm(helper.optionTerm(option)),\n helper.styleOptionDescription(helper.optionDescription(option)),\n );\n });\n output = output.concat(this.formatItemList(group, optionList, helper));\n });\n\n if (helper.showGlobalOptions) {\n const globalOptionList = helper\n .visibleGlobalOptions(cmd)\n .map((option) => {\n return callFormatItem(\n helper.styleOptionTerm(helper.optionTerm(option)),\n helper.styleOptionDescription(helper.optionDescription(option)),\n );\n });\n output = output.concat(\n this.formatItemList('Global Options:', globalOptionList, helper),\n );\n }\n\n // Commands\n const commandGroups = this.groupItems(\n cmd.commands,\n helper.visibleCommands(cmd),\n (sub) => sub.helpGroup() || 'Commands:',\n );\n commandGroups.forEach((commands, group) => {\n const commandList = commands.map((sub) => {\n return callFormatItem(\n helper.styleSubcommandTerm(helper.subcommandTerm(sub)),\n helper.styleSubcommandDescription(helper.subcommandDescription(sub)),\n );\n });\n output = output.concat(this.formatItemList(group, commandList, helper));\n });\n\n return output.join('\\n');\n }\n\n /**\n * Return display width of string, ignoring ANSI escape sequences. Used in padding and wrapping calculations.\n *\n * @param {string} str\n * @returns {number}\n */\n displayWidth(str) {\n return stripColor(str).length;\n }\n\n /**\n * Style the title for displaying in the help. Called with 'Usage:', 'Options:', etc.\n *\n * @param {string} str\n * @returns {string}\n */\n styleTitle(str) {\n return str;\n }\n\n styleUsage(str) {\n // Usage has lots of parts the user might like to color separately! Assume default usage string which is formed like:\n // command subcommand [options] [command] <foo> [bar]\n return str\n .split(' ')\n .map((word) => {\n if (word === '[options]') return this.styleOptionText(word);\n if (word === '[command]') return this.styleSubcommandText(word);\n if (word[0] === '[' || word[0] === '<')\n return this.styleArgumentText(word);\n return this.styleCommandText(word); // Restrict to initial words?\n })\n .join(' ');\n }\n styleCommandDescription(str) {\n return this.styleDescriptionText(str);\n }\n styleOptionDescription(str) {\n return this.styleDescriptionText(str);\n }\n styleSubcommandDescription(str) {\n return this.styleDescriptionText(str);\n }\n styleArgumentDescription(str) {\n return this.styleDescriptionText(str);\n }\n styleDescriptionText(str) {\n return str;\n }\n styleOptionTerm(str) {\n return this.styleOptionText(str);\n }\n styleSubcommandTerm(str) {\n // This is very like usage with lots of parts! Assume default string which is formed like:\n // subcommand [options] <foo> [bar]\n return str\n .split(' ')\n .map((word) => {\n if (word === '[options]') return this.styleOptionText(word);\n if (word[0] === '[' || word[0] === '<')\n return this.styleArgumentText(word);\n return this.styleSubcommandText(word); // Restrict to initial words?\n })\n .join(' ');\n }\n styleArgumentTerm(str) {\n return this.styleArgumentText(str);\n }\n styleOptionText(str) {\n return str;\n }\n styleArgumentText(str) {\n return str;\n }\n styleSubcommandText(str) {\n return str;\n }\n styleCommandText(str) {\n return str;\n }\n\n /**\n * Calculate the pad width from the maximum term length.\n *\n * @param {Command} cmd\n * @param {Help} helper\n * @returns {number}\n */\n\n padWidth(cmd, helper) {\n return Math.max(\n helper.longestOptionTermLength(cmd, helper),\n helper.longestGlobalOptionTermLength(cmd, helper),\n helper.longestSubcommandTermLength(cmd, helper),\n helper.longestArgumentTermLength(cmd, helper),\n );\n }\n\n /**\n * Detect manually wrapped and indented strings by checking for line break followed by whitespace.\n *\n * @param {string} str\n * @returns {boolean}\n */\n preformatted(str) {\n return /\\n[^\\S\\r\\n]/.test(str);\n }\n\n /**\n * Format the \"item\", which consists of a term and description. Pad the term and wrap the description, indenting the following lines.\n *\n * So \"TTT\", 5, \"DDD DDDD DD DDD\" might be formatted for this.helpWidth=17 like so:\n * TTT DDD DDDD\n * DD DDD\n *\n * @param {string} term\n * @param {number} termWidth\n * @param {string} description\n * @param {Help} helper\n * @returns {string}\n */\n formatItem(term, termWidth, description, helper) {\n const itemIndent = 2;\n const itemIndentStr = ' '.repeat(itemIndent);\n if (!description) return itemIndentStr + term;\n\n // Pad the term out to a consistent width, so descriptions are aligned.\n const paddedTerm = term.padEnd(\n termWidth + term.length - helper.displayWidth(term),\n );\n\n // Format the description.\n const spacerWidth = 2; // between term and description\n const helpWidth = this.helpWidth ?? 80; // in case prepareContext() was not called\n const remainingWidth = helpWidth - termWidth - spacerWidth - itemIndent;\n let formattedDescription;\n if (\n remainingWidth < this.minWidthToWrap ||\n helper.preformatted(description)\n ) {\n formattedDescription = description;\n } else {\n const wrappedDescription = helper.boxWrap(description, remainingWidth);\n formattedDescription = wrappedDescription.replace(\n /\\n/g,\n '\\n' + ' '.repeat(termWidth + spacerWidth),\n );\n }\n\n // Construct and overall indent.\n return (\n itemIndentStr +\n paddedTerm +\n ' '.repeat(spacerWidth) +\n formattedDescription.replace(/\\n/g, `\\n${itemIndentStr}`)\n );\n }\n\n /**\n * Wrap a string at whitespace, preserving existing line breaks.\n * Wrapping is skipped if the width is less than `minWidthToWrap`.\n *\n * @param {string} str\n * @param {number} width\n * @returns {string}\n */\n boxWrap(str, width) {\n if (width < this.minWidthToWrap) return str;\n\n const rawLines = str.split(/\\r\\n|\\n/);\n // split up text by whitespace\n const chunkPattern = /[\\s]*[^\\s]+/g;\n const wrappedLines = [];\n rawLines.forEach((line) => {\n const chunks = line.match(chunkPattern);\n if (chunks === null) {\n wrappedLines.push('');\n return;\n }\n\n let sumChunks = [chunks.shift()];\n let sumWidth = this.displayWidth(sumChunks[0]);\n chunks.forEach((chunk) => {\n const visibleWidth = this.displayWidth(chunk);\n // Accumulate chunks while they fit into width.\n if (sumWidth + visibleWidth <= width) {\n sumChunks.push(chunk);\n sumWidth += visibleWidth;\n return;\n }\n wrappedLines.push(sumChunks.join(''));\n\n const nextChunk = chunk.trimStart(); // trim space at line break\n sumChunks = [nextChunk];\n sumWidth = this.displayWidth(nextChunk);\n });\n wrappedLines.push(sumChunks.join(''));\n });\n\n return wrappedLines.join('\\n');\n }\n}\n\n/**\n * Strip style ANSI escape sequences from the string. In particular, SGR (Select Graphic Rendition) codes.\n *\n * @param {string} str\n * @returns {string}\n * @package\n */\n\nfunction stripColor(str) {\n // eslint-disable-next-line no-control-regex\n const sgrPattern = /\\x1b\\[\\d*(;\\d*)*m/g;\n return str.replace(sgrPattern, '');\n}\n\nexports.Help = Help;\nexports.stripColor = stripColor;\n", "const { InvalidArgumentError } = require('./error.js');\n\nclass Option {\n /**\n * Initialize a new `Option` with the given `flags` and `description`.\n *\n * @param {string} flags\n * @param {string} [description]\n */\n\n constructor(flags, description) {\n this.flags = flags;\n this.description = description || '';\n\n this.required = flags.includes('<'); // A value must be supplied when the option is specified.\n this.optional = flags.includes('['); // A value is optional when the option is specified.\n // variadic test ignores <value,...> et al which might be used to describe custom splitting of single argument\n this.variadic = /\\w\\.\\.\\.[>\\]]$/.test(flags); // The option can take multiple values.\n this.mandatory = false; // The option must have a value after parsing, which usually means it must be specified on command line.\n const optionFlags = splitOptionFlags(flags);\n this.short = optionFlags.shortFlag; // May be a short flag, undefined, or even a long flag (if option has two long flags).\n this.long = optionFlags.longFlag;\n this.negate = false;\n if (this.long) {\n this.negate = this.long.startsWith('--no-');\n }\n this.defaultValue = undefined;\n this.defaultValueDescription = undefined;\n this.presetArg = undefined;\n this.envVar = undefined;\n this.parseArg = undefined;\n this.hidden = false;\n this.argChoices = undefined;\n this.conflictsWith = [];\n this.implied = undefined;\n this.helpGroupHeading = undefined; // soft initialised when option added to command\n }\n\n /**\n * Set the default value, and optionally supply the description to be displayed in the help.\n *\n * @param {*} value\n * @param {string} [description]\n * @return {Option}\n */\n\n default(value, description) {\n this.defaultValue = value;\n this.defaultValueDescription = description;\n return this;\n }\n\n /**\n * Preset to use when option used without option-argument, especially optional but also boolean and negated.\n * The custom processing (parseArg) is called.\n *\n * @example\n * new Option('--color').default('GREYSCALE').preset('RGB');\n * new Option('--donate [amount]').preset('20').argParser(parseFloat);\n *\n * @param {*} arg\n * @return {Option}\n */\n\n preset(arg) {\n this.presetArg = arg;\n return this;\n }\n\n /**\n * Add option name(s) that conflict with this option.\n * An error will be displayed if conflicting options are found during parsing.\n *\n * @example\n * new Option('--rgb').conflicts('cmyk');\n * new Option('--js').conflicts(['ts', 'jsx']);\n *\n * @param {(string | string[])} names\n * @return {Option}\n */\n\n conflicts(names) {\n this.conflictsWith = this.conflictsWith.concat(names);\n return this;\n }\n\n /**\n * Specify implied option values for when this option is set and the implied options are not.\n *\n * The custom processing (parseArg) is not called on the implied values.\n *\n * @example\n * program\n * .addOption(new Option('--log', 'write logging information to file'))\n * .addOption(new Option('--trace', 'log extra details').implies({ log: 'trace.txt' }));\n *\n * @param {object} impliedOptionValues\n * @return {Option}\n */\n implies(impliedOptionValues) {\n let newImplied = impliedOptionValues;\n if (typeof impliedOptionValues === 'string') {\n // string is not documented, but easy mistake and we can do what user probably intended.\n newImplied = { [impliedOptionValues]: true };\n }\n this.implied = Object.assign(this.implied || {}, newImplied);\n return this;\n }\n\n /**\n * Set environment variable to check for option value.\n *\n * An environment variable is only used if when processed the current option value is\n * undefined, or the source of the current value is 'default' or 'config' or 'env'.\n *\n * @param {string} name\n * @return {Option}\n */\n\n env(name) {\n this.envVar = name;\n return this;\n }\n\n /**\n * Set the custom handler for processing CLI option arguments into option values.\n *\n * @param {Function} [fn]\n * @return {Option}\n */\n\n argParser(fn) {\n this.parseArg = fn;\n return this;\n }\n\n /**\n * Whether the option is mandatory and must have a value after parsing.\n *\n * @param {boolean} [mandatory=true]\n * @return {Option}\n */\n\n makeOptionMandatory(mandatory = true) {\n this.mandatory = !!mandatory;\n return this;\n }\n\n /**\n * Hide option in help.\n *\n * @param {boolean} [hide=true]\n * @return {Option}\n */\n\n hideHelp(hide = true) {\n this.hidden = !!hide;\n return this;\n }\n\n /**\n * @package\n */\n\n _collectValue(value, previous) {\n if (previous === this.defaultValue || !Array.isArray(previous)) {\n return [value];\n }\n\n previous.push(value);\n return previous;\n }\n\n /**\n * Only allow option value to be one of choices.\n *\n * @param {string[]} values\n * @return {Option}\n */\n\n choices(values) {\n this.argChoices = values.slice();\n this.parseArg = (arg, previous) => {\n if (!this.argChoices.includes(arg)) {\n throw new InvalidArgumentError(\n `Allowed choices are ${this.argChoices.join(', ')}.`,\n );\n }\n if (this.variadic) {\n return this._collectValue(arg, previous);\n }\n return arg;\n };\n return this;\n }\n\n /**\n * Return option name.\n *\n * @return {string}\n */\n\n name() {\n if (this.long) {\n return this.long.replace(/^--/, '');\n }\n return this.short.replace(/^-/, '');\n }\n\n /**\n * Return option name, in a camelcase format that can be used\n * as an object attribute key.\n *\n * @return {string}\n */\n\n attributeName() {\n if (this.negate) {\n return camelcase(this.name().replace(/^no-/, ''));\n }\n return camelcase(this.name());\n }\n\n /**\n * Set the help group heading.\n *\n * @param {string} heading\n * @return {Option}\n */\n helpGroup(heading) {\n this.helpGroupHeading = heading;\n return this;\n }\n\n /**\n * Check if `arg` matches the short or long flag.\n *\n * @param {string} arg\n * @return {boolean}\n * @package\n */\n\n is(arg) {\n return this.short === arg || this.long === arg;\n }\n\n /**\n * Return whether a boolean option.\n *\n * Options are one of boolean, negated, required argument, or optional argument.\n *\n * @return {boolean}\n * @package\n */\n\n isBoolean() {\n return !this.required && !this.optional && !this.negate;\n }\n}\n\n/**\n * This class is to make it easier to work with dual options, without changing the existing\n * implementation. We support separate dual options for separate positive and negative options,\n * like `--build` and `--no-build`, which share a single option value. This works nicely for some\n * use cases, but is tricky for others where we want separate behaviours despite\n * the single shared option value.\n */\nclass DualOptions {\n /**\n * @param {Option[]} options\n */\n constructor(options) {\n this.positiveOptions = new Map();\n this.negativeOptions = new Map();\n this.dualOptions = new Set();\n options.forEach((option) => {\n if (option.negate) {\n this.negativeOptions.set(option.attributeName(), option);\n } else {\n this.positiveOptions.set(option.attributeName(), option);\n }\n });\n this.negativeOptions.forEach((value, key) => {\n if (this.positiveOptions.has(key)) {\n this.dualOptions.add(key);\n }\n });\n }\n\n /**\n * Did the value come from the option, and not from possible matching dual option?\n *\n * @param {*} value\n * @param {Option} option\n * @returns {boolean}\n */\n valueFromOption(value, option) {\n const optionKey = option.attributeName();\n if (!this.dualOptions.has(optionKey)) return true;\n\n // Use the value to deduce if (probably) came from the option.\n const preset = this.negativeOptions.get(optionKey).presetArg;\n const negativeValue = preset !== undefined ? preset : false;\n return option.negate === (negativeValue === value);\n }\n}\n\n/**\n * Convert string from kebab-case to camelCase.\n *\n * @param {string} str\n * @return {string}\n * @private\n */\n\nfunction camelcase(str) {\n return str.split('-').reduce((str, word) => {\n return str + word[0].toUpperCase() + word.slice(1);\n });\n}\n\n/**\n * Split the short and long flag out of something like '-m,--mixed <value>'\n *\n * @private\n */\n\nfunction splitOptionFlags(flags) {\n let shortFlag;\n let longFlag;\n // short flag, single dash and single character\n const shortFlagExp = /^-[^-]$/;\n // long flag, double dash and at least one character\n const longFlagExp = /^--[^-]/;\n\n const flagParts = flags.split(/[ |,]+/).concat('guard');\n // Normal is short and/or long.\n if (shortFlagExp.test(flagParts[0])) shortFlag = flagParts.shift();\n if (longFlagExp.test(flagParts[0])) longFlag = flagParts.shift();\n // Long then short. Rarely used but fine.\n if (!shortFlag && shortFlagExp.test(flagParts[0]))\n shortFlag = flagParts.shift();\n // Allow two long flags, like '--ws, --workspace'\n // This is the supported way to have a shortish option flag.\n if (!shortFlag && longFlagExp.test(flagParts[0])) {\n shortFlag = longFlag;\n longFlag = flagParts.shift();\n }\n\n // Check for unprocessed flag. Fail noisily rather than silently ignore.\n if (flagParts[0].startsWith('-')) {\n const unsupportedFlag = flagParts[0];\n const baseError = `option creation failed due to '${unsupportedFlag}' in option flags '${flags}'`;\n if (/^-[^-][^-]/.test(unsupportedFlag))\n throw new Error(\n `${baseError}\n- a short flag is a single dash and a single character\n - either use a single dash and a single character (for a short flag)\n - or use a double dash for a long option (and can have two, like '--ws, --workspace')`,\n );\n if (shortFlagExp.test(unsupportedFlag))\n throw new Error(`${baseError}\n- too many short flags`);\n if (longFlagExp.test(unsupportedFlag))\n throw new Error(`${baseError}\n- too many long flags`);\n\n throw new Error(`${baseError}\n- unrecognised flag format`);\n }\n if (shortFlag === undefined && longFlag === undefined)\n throw new Error(\n `option creation failed due to no flags found in '${flags}'.`,\n );\n\n return { shortFlag, longFlag };\n}\n\nexports.Option = Option;\nexports.DualOptions = DualOptions;\n", "const maxDistance = 3;\n\nfunction editDistance(a, b) {\n // https://en.wikipedia.org/wiki/Damerau\u2013Levenshtein_distance\n // Calculating optimal string alignment distance, no substring is edited more than once.\n // (Simple implementation.)\n\n // Quick early exit, return worst case.\n if (Math.abs(a.length - b.length) > maxDistance)\n return Math.max(a.length, b.length);\n\n // distance between prefix substrings of a and b\n const d = [];\n\n // pure deletions turn a into empty string\n for (let i = 0; i <= a.length; i++) {\n d[i] = [i];\n }\n // pure insertions turn empty string into b\n for (let j = 0; j <= b.length; j++) {\n d[0][j] = j;\n }\n\n // fill matrix\n for (let j = 1; j <= b.length; j++) {\n for (let i = 1; i <= a.length; i++) {\n let cost = 1;\n if (a[i - 1] === b[j - 1]) {\n cost = 0;\n } else {\n cost = 1;\n }\n d[i][j] = Math.min(\n d[i - 1][j] + 1, // deletion\n d[i][j - 1] + 1, // insertion\n d[i - 1][j - 1] + cost, // substitution\n );\n // transposition\n if (i > 1 && j > 1 && a[i - 1] === b[j - 2] && a[i - 2] === b[j - 1]) {\n d[i][j] = Math.min(d[i][j], d[i - 2][j - 2] + 1);\n }\n }\n }\n\n return d[a.length][b.length];\n}\n\n/**\n * Find close matches, restricted to same number of edits.\n *\n * @param {string} word\n * @param {string[]} candidates\n * @returns {string}\n */\n\nfunction suggestSimilar(word, candidates) {\n if (!candidates || candidates.length === 0) return '';\n // remove possible duplicates\n candidates = Array.from(new Set(candidates));\n\n const searchingOptions = word.startsWith('--');\n if (searchingOptions) {\n word = word.slice(2);\n candidates = candidates.map((candidate) => candidate.slice(2));\n }\n\n let similar = [];\n let bestDistance = maxDistance;\n const minSimilarity = 0.4;\n candidates.forEach((candidate) => {\n if (candidate.length <= 1) return; // no one character guesses\n\n const distance = editDistance(word, candidate);\n const length = Math.max(word.length, candidate.length);\n const similarity = (length - distance) / length;\n if (similarity > minSimilarity) {\n if (distance < bestDistance) {\n // better edit distance, throw away previous worse matches\n bestDistance = distance;\n similar = [candidate];\n } else if (distance === bestDistance) {\n similar.push(candidate);\n }\n }\n });\n\n similar.sort((a, b) => a.localeCompare(b));\n if (searchingOptions) {\n similar = similar.map((candidate) => `--${candidate}`);\n }\n\n if (similar.length > 1) {\n return `\\n(Did you mean one of ${similar.join(', ')}?)`;\n }\n if (similar.length === 1) {\n return `\\n(Did you mean ${similar[0]}?)`;\n }\n return '';\n}\n\nexports.suggestSimilar = suggestSimilar;\n", "const EventEmitter = require('node:events').EventEmitter;\nconst childProcess = require('node:child_process');\nconst path = require('node:path');\nconst fs = require('node:fs');\nconst process = require('node:process');\n\nconst { Argument, humanReadableArgName } = require('./argument.js');\nconst { CommanderError } = require('./error.js');\nconst { Help, stripColor } = require('./help.js');\nconst { Option, DualOptions } = require('./option.js');\nconst { suggestSimilar } = require('./suggestSimilar');\n\nclass Command extends EventEmitter {\n /**\n * Initialize a new `Command`.\n *\n * @param {string} [name]\n */\n\n constructor(name) {\n super();\n /** @type {Command[]} */\n this.commands = [];\n /** @type {Option[]} */\n this.options = [];\n this.parent = null;\n this._allowUnknownOption = false;\n this._allowExcessArguments = false;\n /** @type {Argument[]} */\n this.registeredArguments = [];\n this._args = this.registeredArguments; // deprecated old name\n /** @type {string[]} */\n this.args = []; // cli args with options removed\n this.rawArgs = [];\n this.processedArgs = []; // like .args but after custom processing and collecting variadic\n this._scriptPath = null;\n this._name = name || '';\n this._optionValues = {};\n this._optionValueSources = {}; // default, env, cli etc\n this._storeOptionsAsProperties = false;\n this._actionHandler = null;\n this._executableHandler = false;\n this._executableFile = null; // custom name for executable\n this._executableDir = null; // custom search directory for subcommands\n this._defaultCommandName = null;\n this._exitCallback = null;\n this._aliases = [];\n this._combineFlagAndOptionalValue = true;\n this._description = '';\n this._summary = '';\n this._argsDescription = undefined; // legacy\n this._enablePositionalOptions = false;\n this._passThroughOptions = false;\n this._lifeCycleHooks = {}; // a hash of arrays\n /** @type {(boolean | string)} */\n this._showHelpAfterError = false;\n this._showSuggestionAfterError = true;\n this._savedState = null; // used in save/restoreStateBeforeParse\n\n // see configureOutput() for docs\n this._outputConfiguration = {\n writeOut: (str) => process.stdout.write(str),\n writeErr: (str) => process.stderr.write(str),\n outputError: (str, write) => write(str),\n getOutHelpWidth: () =>\n process.stdout.isTTY ? process.stdout.columns : undefined,\n getErrHelpWidth: () =>\n process.stderr.isTTY ? process.stderr.columns : undefined,\n getOutHasColors: () =>\n useColor() ?? (process.stdout.isTTY && process.stdout.hasColors?.()),\n getErrHasColors: () =>\n useColor() ?? (process.stderr.isTTY && process.stderr.hasColors?.()),\n stripColor: (str) => stripColor(str),\n };\n\n this._hidden = false;\n /** @type {(Option | null | undefined)} */\n this._helpOption = undefined; // Lazy created on demand. May be null if help option is disabled.\n this._addImplicitHelpCommand = undefined; // undecided whether true or false yet, not inherited\n /** @type {Command} */\n this._helpCommand = undefined; // lazy initialised, inherited\n this._helpConfiguration = {};\n /** @type {string | undefined} */\n this._helpGroupHeading = undefined; // soft initialised when added to parent\n /** @type {string | undefined} */\n this._defaultCommandGroup = undefined;\n /** @type {string | undefined} */\n this._defaultOptionGroup = undefined;\n }\n\n /**\n * Copy settings that are useful to have in common across root command and subcommands.\n *\n * (Used internally when adding a command using `.command()` so subcommands inherit parent settings.)\n *\n * @param {Command} sourceCommand\n * @return {Command} `this` command for chaining\n */\n copyInheritedSettings(sourceCommand) {\n this._outputConfiguration = sourceCommand._outputConfiguration;\n this._helpOption = sourceCommand._helpOption;\n this._helpCommand = sourceCommand._helpCommand;\n this._helpConfiguration = sourceCommand._helpConfiguration;\n this._exitCallback = sourceCommand._exitCallback;\n this._storeOptionsAsProperties = sourceCommand._storeOptionsAsProperties;\n this._combineFlagAndOptionalValue =\n sourceCommand._combineFlagAndOptionalValue;\n this._allowExcessArguments = sourceCommand._allowExcessArguments;\n this._enablePositionalOptions = sourceCommand._enablePositionalOptions;\n this._showHelpAfterError = sourceCommand._showHelpAfterError;\n this._showSuggestionAfterError = sourceCommand._showSuggestionAfterError;\n\n return this;\n }\n\n /**\n * @returns {Command[]}\n * @private\n */\n\n _getCommandAndAncestors() {\n const result = [];\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n for (let command = this; command; command = command.parent) {\n result.push(command);\n }\n return result;\n }\n\n /**\n * Define a command.\n *\n * There are two styles of command: pay attention to where to put the description.\n *\n * @example\n * // Command implemented using action handler (description is supplied separately to `.command`)\n * program\n * .command('clone <source> [destination]')\n * .description('clone a repository into a newly created directory')\n * .action((source, destination) => {\n * console.log('clone command called');\n * });\n *\n * // Command implemented using separate executable file (description is second parameter to `.command`)\n * program\n * .command('start <service>', 'start named service')\n * .command('stop [service]', 'stop named service, or all if no name supplied');\n *\n * @param {string} nameAndArgs - command name and arguments, args are `<required>` or `[optional]` and last may also be `variadic...`\n * @param {(object | string)} [actionOptsOrExecDesc] - configuration options (for action), or description (for executable)\n * @param {object} [execOpts] - configuration options (for executable)\n * @return {Command} returns new command for action handler, or `this` for executable command\n */\n\n command(nameAndArgs, actionOptsOrExecDesc, execOpts) {\n let desc = actionOptsOrExecDesc;\n let opts = execOpts;\n if (typeof desc === 'object' && desc !== null) {\n opts = desc;\n desc = null;\n }\n opts = opts || {};\n const [, name, args] = nameAndArgs.match(/([^ ]+) *(.*)/);\n\n const cmd = this.createCommand(name);\n if (desc) {\n cmd.description(desc);\n cmd._executableHandler = true;\n }\n if (opts.isDefault) this._defaultCommandName = cmd._name;\n cmd._hidden = !!(opts.noHelp || opts.hidden); // noHelp is deprecated old name for hidden\n cmd._executableFile = opts.executableFile || null; // Custom name for executable file, set missing to null to match constructor\n if (args) cmd.arguments(args);\n this._registerCommand(cmd);\n cmd.parent = this;\n cmd.copyInheritedSettings(this);\n\n if (desc) return this;\n return cmd;\n }\n\n /**\n * Factory routine to create a new unattached command.\n *\n * See .command() for creating an attached subcommand, which uses this routine to\n * create the command. You can override createCommand to customise subcommands.\n *\n * @param {string} [name]\n * @return {Command} new command\n */\n\n createCommand(name) {\n return new Command(name);\n }\n\n /**\n * You can customise the help with a subclass of Help by overriding createHelp,\n * or by overriding Help properties using configureHelp().\n *\n * @return {Help}\n */\n\n createHelp() {\n return Object.assign(new Help(), this.configureHelp());\n }\n\n /**\n * You can customise the help by overriding Help properties using configureHelp(),\n * or with a subclass of Help by overriding createHelp().\n *\n * @param {object} [configuration] - configuration options\n * @return {(Command | object)} `this` command for chaining, or stored configuration\n */\n\n configureHelp(configuration) {\n if (configuration === undefined) return this._helpConfiguration;\n\n this._helpConfiguration = configuration;\n return this;\n }\n\n /**\n * The default output goes to stdout and stderr. You can customise this for special\n * applications. You can also customise the display of errors by overriding outputError.\n *\n * The configuration properties are all functions:\n *\n * // change how output being written, defaults to stdout and stderr\n * writeOut(str)\n * writeErr(str)\n * // change how output being written for errors, defaults to writeErr\n * outputError(str, write) // used for displaying errors and not used for displaying help\n * // specify width for wrapping help\n * getOutHelpWidth()\n * getErrHelpWidth()\n * // color support, currently only used with Help\n * getOutHasColors()\n * getErrHasColors()\n * stripColor() // used to remove ANSI escape codes if output does not have colors\n *\n * @param {object} [configuration] - configuration options\n * @return {(Command | object)} `this` command for chaining, or stored configuration\n */\n\n configureOutput(configuration) {\n if (configuration === undefined) return this._outputConfiguration;\n\n this._outputConfiguration = {\n ...this._outputConfiguration,\n ...configuration,\n };\n return this;\n }\n\n /**\n * Display the help or a custom message after an error occurs.\n *\n * @param {(boolean|string)} [displayHelp]\n * @return {Command} `this` command for chaining\n */\n showHelpAfterError(displayHelp = true) {\n if (typeof displayHelp !== 'string') displayHelp = !!displayHelp;\n this._showHelpAfterError = displayHelp;\n return this;\n }\n\n /**\n * Display suggestion of similar commands for unknown commands, or options for unknown options.\n *\n * @param {boolean} [displaySuggestion]\n * @return {Command} `this` command for chaining\n */\n showSuggestionAfterError(displaySuggestion = true) {\n this._showSuggestionAfterError = !!displaySuggestion;\n return this;\n }\n\n /**\n * Add a prepared subcommand.\n *\n * See .command() for creating an attached subcommand which inherits settings from its parent.\n *\n * @param {Command} cmd - new subcommand\n * @param {object} [opts] - configuration options\n * @return {Command} `this` command for chaining\n */\n\n addCommand(cmd, opts) {\n if (!cmd._name) {\n throw new Error(`Command passed to .addCommand() must have a name\n- specify the name in Command constructor or using .name()`);\n }\n\n opts = opts || {};\n if (opts.isDefault) this._defaultCommandName = cmd._name;\n if (opts.noHelp || opts.hidden) cmd._hidden = true; // modifying passed command due to existing implementation\n\n this._registerCommand(cmd);\n cmd.parent = this;\n cmd._checkForBrokenPassThrough();\n\n return this;\n }\n\n /**\n * Factory routine to create a new unattached argument.\n *\n * See .argument() for creating an attached argument, which uses this routine to\n * create the argument. You can override createArgument to return a custom argument.\n *\n * @param {string} name\n * @param {string} [description]\n * @return {Argument} new argument\n */\n\n createArgument(name, description) {\n return new Argument(name, description);\n }\n\n /**\n * Define argument syntax for command.\n *\n * The default is that the argument is required, and you can explicitly\n * indicate this with <> around the name. Put [] around the name for an optional argument.\n *\n * @example\n * program.argument('<input-file>');\n * program.argument('[output-file]');\n *\n * @param {string} name\n * @param {string} [description]\n * @param {(Function|*)} [parseArg] - custom argument processing function or default value\n * @param {*} [defaultValue]\n * @return {Command} `this` command for chaining\n */\n argument(name, description, parseArg, defaultValue) {\n const argument = this.createArgument(name, description);\n if (typeof parseArg === 'function') {\n argument.default(defaultValue).argParser(parseArg);\n } else {\n argument.default(parseArg);\n }\n this.addArgument(argument);\n return this;\n }\n\n /**\n * Define argument syntax for command, adding multiple at once (without descriptions).\n *\n * See also .argument().\n *\n * @example\n * program.arguments('<cmd> [env]');\n *\n * @param {string} names\n * @return {Command} `this` command for chaining\n */\n\n arguments(names) {\n names\n .trim()\n .split(/ +/)\n .forEach((detail) => {\n this.argument(detail);\n });\n return this;\n }\n\n /**\n * Define argument syntax for command, adding a prepared argument.\n *\n * @param {Argument} argument\n * @return {Command} `this` command for chaining\n */\n addArgument(argument) {\n const previousArgument = this.registeredArguments.slice(-1)[0];\n if (previousArgument?.variadic) {\n throw new Error(\n `only the last argument can be variadic '${previousArgument.name()}'`,\n );\n }\n if (\n argument.required &&\n argument.defaultValue !== undefined &&\n argument.parseArg === undefined\n ) {\n throw new Error(\n `a default value for a required argument is never used: '${argument.name()}'`,\n );\n }\n this.registeredArguments.push(argument);\n return this;\n }\n\n /**\n * Customise or override default help command. By default a help command is automatically added if your command has subcommands.\n *\n * @example\n * program.helpCommand('help [cmd]');\n * program.helpCommand('help [cmd]', 'show help');\n * program.helpCommand(false); // suppress default help command\n * program.helpCommand(true); // add help command even if no subcommands\n *\n * @param {string|boolean} enableOrNameAndArgs - enable with custom name and/or arguments, or boolean to override whether added\n * @param {string} [description] - custom description\n * @return {Command} `this` command for chaining\n */\n\n helpCommand(enableOrNameAndArgs, description) {\n if (typeof enableOrNameAndArgs === 'boolean') {\n this._addImplicitHelpCommand = enableOrNameAndArgs;\n if (enableOrNameAndArgs && this._defaultCommandGroup) {\n // make the command to store the group\n this._initCommandGroup(this._getHelpCommand());\n }\n return this;\n }\n\n const nameAndArgs = enableOrNameAndArgs ?? 'help [command]';\n const [, helpName, helpArgs] = nameAndArgs.match(/([^ ]+) *(.*)/);\n const helpDescription = description ?? 'display help for command';\n\n const helpCommand = this.createCommand(helpName);\n helpCommand.helpOption(false);\n if (helpArgs) helpCommand.arguments(helpArgs);\n if (helpDescription) helpCommand.description(helpDescription);\n\n this._addImplicitHelpCommand = true;\n this._helpCommand = helpCommand;\n // init group unless lazy create\n if (enableOrNameAndArgs || description) this._initCommandGroup(helpCommand);\n\n return this;\n }\n\n /**\n * Add prepared custom help command.\n *\n * @param {(Command|string|boolean)} helpCommand - custom help command, or deprecated enableOrNameAndArgs as for `.helpCommand()`\n * @param {string} [deprecatedDescription] - deprecated custom description used with custom name only\n * @return {Command} `this` command for chaining\n */\n addHelpCommand(helpCommand, deprecatedDescription) {\n // If not passed an object, call through to helpCommand for backwards compatibility,\n // as addHelpCommand was originally used like helpCommand is now.\n if (typeof helpCommand !== 'object') {\n this.helpCommand(helpCommand, deprecatedDescription);\n return this;\n }\n\n this._addImplicitHelpCommand = true;\n this._helpCommand = helpCommand;\n this._initCommandGroup(helpCommand);\n return this;\n }\n\n /**\n * Lazy create help command.\n *\n * @return {(Command|null)}\n * @package\n */\n _getHelpCommand() {\n const hasImplicitHelpCommand =\n this._addImplicitHelpCommand ??\n (this.commands.length &&\n !this._actionHandler &&\n !this._findCommand('help'));\n\n if (hasImplicitHelpCommand) {\n if (this._helpCommand === undefined) {\n this.helpCommand(undefined, undefined); // use default name and description\n }\n return this._helpCommand;\n }\n return null;\n }\n\n /**\n * Add hook for life cycle event.\n *\n * @param {string} event\n * @param {Function} listener\n * @return {Command} `this` command for chaining\n */\n\n hook(event, listener) {\n const allowedValues = ['preSubcommand', 'preAction', 'postAction'];\n if (!allowedValues.includes(event)) {\n throw new Error(`Unexpected value for event passed to hook : '${event}'.\nExpecting one of '${allowedValues.join(\"', '\")}'`);\n }\n if (this._lifeCycleHooks[event]) {\n this._lifeCycleHooks[event].push(listener);\n } else {\n this._lifeCycleHooks[event] = [listener];\n }\n return this;\n }\n\n /**\n * Register callback to use as replacement for calling process.exit.\n *\n * @param {Function} [fn] optional callback which will be passed a CommanderError, defaults to throwing\n * @return {Command} `this` command for chaining\n */\n\n exitOverride(fn) {\n if (fn) {\n this._exitCallback = fn;\n } else {\n this._exitCallback = (err) => {\n if (err.code !== 'commander.executeSubCommandAsync') {\n throw err;\n } else {\n // Async callback from spawn events, not useful to throw.\n }\n };\n }\n return this;\n }\n\n /**\n * Call process.exit, and _exitCallback if defined.\n *\n * @param {number} exitCode exit code for using with process.exit\n * @param {string} code an id string representing the error\n * @param {string} message human-readable description of the error\n * @return never\n * @private\n */\n\n _exit(exitCode, code, message) {\n if (this._exitCallback) {\n this._exitCallback(new CommanderError(exitCode, code, message));\n // Expecting this line is not reached.\n }\n process.exit(exitCode);\n }\n\n /**\n * Register callback `fn` for the command.\n *\n * @example\n * program\n * .command('serve')\n * .description('start service')\n * .action(function() {\n * // do work here\n * });\n *\n * @param {Function} fn\n * @return {Command} `this` command for chaining\n */\n\n action(fn) {\n const listener = (args) => {\n // The .action callback takes an extra parameter which is the command or options.\n const expectedArgsCount = this.registeredArguments.length;\n const actionArgs = args.slice(0, expectedArgsCount);\n if (this._storeOptionsAsProperties) {\n actionArgs[expectedArgsCount] = this; // backwards compatible \"options\"\n } else {\n actionArgs[expectedArgsCount] = this.opts();\n }\n actionArgs.push(this);\n\n return fn.apply(this, actionArgs);\n };\n this._actionHandler = listener;\n return this;\n }\n\n /**\n * Factory routine to create a new unattached option.\n *\n * See .option() for creating an attached option, which uses this routine to\n * create the option. You can override createOption to return a custom option.\n *\n * @param {string} flags\n * @param {string} [description]\n * @return {Option} new option\n */\n\n createOption(flags, description) {\n return new Option(flags, description);\n }\n\n /**\n * Wrap parseArgs to catch 'commander.invalidArgument'.\n *\n * @param {(Option | Argument)} target\n * @param {string} value\n * @param {*} previous\n * @param {string} invalidArgumentMessage\n * @private\n */\n\n _callParseArg(target, value, previous, invalidArgumentMessage) {\n try {\n return target.parseArg(value, previous);\n } catch (err) {\n if (err.code === 'commander.invalidArgument') {\n const message = `${invalidArgumentMessage} ${err.message}`;\n this.error(message, { exitCode: err.exitCode, code: err.code });\n }\n throw err;\n }\n }\n\n /**\n * Check for option flag conflicts.\n * Register option if no conflicts found, or throw on conflict.\n *\n * @param {Option} option\n * @private\n */\n\n _registerOption(option) {\n const matchingOption =\n (option.short && this._findOption(option.short)) ||\n (option.long && this._findOption(option.long));\n if (matchingOption) {\n const matchingFlag =\n option.long && this._findOption(option.long)\n ? option.long\n : option.short;\n throw new Error(`Cannot add option '${option.flags}'${this._name && ` to command '${this._name}'`} due to conflicting flag '${matchingFlag}'\n- already used by option '${matchingOption.flags}'`);\n }\n\n this._initOptionGroup(option);\n this.options.push(option);\n }\n\n /**\n * Check for command name and alias conflicts with existing commands.\n * Register command if no conflicts found, or throw on conflict.\n *\n * @param {Command} command\n * @private\n */\n\n _registerCommand(command) {\n const knownBy = (cmd) => {\n return [cmd.name()].concat(cmd.aliases());\n };\n\n const alreadyUsed = knownBy(command).find((name) =>\n this._findCommand(name),\n );\n if (alreadyUsed) {\n const existingCmd = knownBy(this._findCommand(alreadyUsed)).join('|');\n const newCmd = knownBy(command).join('|');\n throw new Error(\n `cannot add command '${newCmd}' as already have command '${existingCmd}'`,\n );\n }\n\n this._initCommandGroup(command);\n this.commands.push(command);\n }\n\n /**\n * Add an option.\n *\n * @param {Option} option\n * @return {Command} `this` command for chaining\n */\n addOption(option) {\n this._registerOption(option);\n\n const oname = option.name();\n const name = option.attributeName();\n\n // store default value\n if (option.negate) {\n // --no-foo is special and defaults foo to true, unless a --foo option is already defined\n const positiveLongFlag = option.long.replace(/^--no-/, '--');\n if (!this._findOption(positiveLongFlag)) {\n this.setOptionValueWithSource(\n name,\n option.defaultValue === undefined ? true : option.defaultValue,\n 'default',\n );\n }\n } else if (option.defaultValue !== undefined) {\n this.setOptionValueWithSource(name, option.defaultValue, 'default');\n }\n\n // handler for cli and env supplied values\n const handleOptionValue = (val, invalidValueMessage, valueSource) => {\n // val is null for optional option used without an optional-argument.\n // val is undefined for boolean and negated option.\n if (val == null && option.presetArg !== undefined) {\n val = option.presetArg;\n }\n\n // custom processing\n const oldValue = this.getOptionValue(name);\n if (val !== null && option.parseArg) {\n val = this._callParseArg(option, val, oldValue, invalidValueMessage);\n } else if (val !== null && option.variadic) {\n val = option._collectValue(val, oldValue);\n }\n\n // Fill-in appropriate missing values. Long winded but easy to follow.\n if (val == null) {\n if (option.negate) {\n val = false;\n } else if (option.isBoolean() || option.optional) {\n val = true;\n } else {\n val = ''; // not normal, parseArg might have failed or be a mock function for testing\n }\n }\n this.setOptionValueWithSource(name, val, valueSource);\n };\n\n this.on('option:' + oname, (val) => {\n const invalidValueMessage = `error: option '${option.flags}' argument '${val}' is invalid.`;\n handleOptionValue(val, invalidValueMessage, 'cli');\n });\n\n if (option.envVar) {\n this.on('optionEnv:' + oname, (val) => {\n const invalidValueMessage = `error: option '${option.flags}' value '${val}' from env '${option.envVar}' is invalid.`;\n handleOptionValue(val, invalidValueMessage, 'env');\n });\n }\n\n return this;\n }\n\n /**\n * Internal implementation shared by .option() and .requiredOption()\n *\n * @return {Command} `this` command for chaining\n * @private\n */\n _optionEx(config, flags, description, fn, defaultValue) {\n if (typeof flags === 'object' && flags instanceof Option) {\n throw new Error(\n 'To add an Option object use addOption() instead of option() or requiredOption()',\n );\n }\n const option = this.createOption(flags, description);\n option.makeOptionMandatory(!!config.mandatory);\n if (typeof fn === 'function') {\n option.default(defaultValue).argParser(fn);\n } else if (fn instanceof RegExp) {\n // deprecated\n const regex = fn;\n fn = (val, def) => {\n const m = regex.exec(val);\n return m ? m[0] : def;\n };\n option.default(defaultValue).argParser(fn);\n } else {\n option.default(fn);\n }\n\n return this.addOption(option);\n }\n\n /**\n * Define option with `flags`, `description`, and optional argument parsing function or `defaultValue` or both.\n *\n * The `flags` string contains the short and/or long flags, separated by comma, a pipe or space. A required\n * option-argument is indicated by `<>` and an optional option-argument by `[]`.\n *\n * See the README for more details, and see also addOption() and requiredOption().\n *\n * @example\n * program\n * .option('-p, --pepper', 'add pepper')\n * .option('--pt, --pizza-type <TYPE>', 'type of pizza') // required option-argument\n * .option('-c, --cheese [CHEESE]', 'add extra cheese', 'mozzarella') // optional option-argument with default\n * .option('-t, --tip <VALUE>', 'add tip to purchase cost', parseFloat) // custom parse function\n *\n * @param {string} flags\n * @param {string} [description]\n * @param {(Function|*)} [parseArg] - custom option processing function or default value\n * @param {*} [defaultValue]\n * @return {Command} `this` command for chaining\n */\n\n option(flags, description, parseArg, defaultValue) {\n return this._optionEx({}, flags, description, parseArg, defaultValue);\n }\n\n /**\n * Add a required option which must have a value after parsing. This usually means\n * the option must be specified on the command line. (Otherwise the same as .option().)\n *\n * The `flags` string contains the short and/or long flags, separated by comma, a pipe or space.\n *\n * @param {string} flags\n * @param {string} [description]\n * @param {(Function|*)} [parseArg] - custom option processing function or default value\n * @param {*} [defaultValue]\n * @return {Command} `this` command for chaining\n */\n\n requiredOption(flags, description, parseArg, defaultValue) {\n return this._optionEx(\n { mandatory: true },\n flags,\n description,\n parseArg,\n defaultValue,\n );\n }\n\n /**\n * Alter parsing of short flags with optional values.\n *\n * @example\n * // for `.option('-f,--flag [value]'):\n * program.combineFlagAndOptionalValue(true); // `-f80` is treated like `--flag=80`, this is the default behaviour\n * program.combineFlagAndOptionalValue(false) // `-fb` is treated like `-f -b`\n *\n * @param {boolean} [combine] - if `true` or omitted, an optional value can be specified directly after the flag.\n * @return {Command} `this` command for chaining\n */\n combineFlagAndOptionalValue(combine = true) {\n this._combineFlagAndOptionalValue = !!combine;\n return this;\n }\n\n /**\n * Allow unknown options on the command line.\n *\n * @param {boolean} [allowUnknown] - if `true` or omitted, no error will be thrown for unknown options.\n * @return {Command} `this` command for chaining\n */\n allowUnknownOption(allowUnknown = true) {\n this._allowUnknownOption = !!allowUnknown;\n return this;\n }\n\n /**\n * Allow excess command-arguments on the command line. Pass false to make excess arguments an error.\n *\n * @param {boolean} [allowExcess] - if `true` or omitted, no error will be thrown for excess arguments.\n * @return {Command} `this` command for chaining\n */\n allowExcessArguments(allowExcess = true) {\n this._allowExcessArguments = !!allowExcess;\n return this;\n }\n\n /**\n * Enable positional options. Positional means global options are specified before subcommands which lets\n * subcommands reuse the same option names, and also enables subcommands to turn on passThroughOptions.\n * The default behaviour is non-positional and global options may appear anywhere on the command line.\n *\n * @param {boolean} [positional]\n * @return {Command} `this` command for chaining\n */\n enablePositionalOptions(positional = true) {\n this._enablePositionalOptions = !!positional;\n return this;\n }\n\n /**\n * Pass through options that come after command-arguments rather than treat them as command-options,\n * so actual command-options come before command-arguments. Turning this on for a subcommand requires\n * positional options to have been enabled on the program (parent commands).\n * The default behaviour is non-positional and options may appear before or after command-arguments.\n *\n * @param {boolean} [passThrough] for unknown options.\n * @return {Command} `this` command for chaining\n */\n passThroughOptions(passThrough = true) {\n this._passThroughOptions = !!passThrough;\n this._checkForBrokenPassThrough();\n return this;\n }\n\n /**\n * @private\n */\n\n _checkForBrokenPassThrough() {\n if (\n this.parent &&\n this._passThroughOptions &&\n !this.parent._enablePositionalOptions\n ) {\n throw new Error(\n `passThroughOptions cannot be used for '${this._name}' without turning on enablePositionalOptions for parent command(s)`,\n );\n }\n }\n\n /**\n * Whether to store option values as properties on command object,\n * or store separately (specify false). In both cases the option values can be accessed using .opts().\n *\n * @param {boolean} [storeAsProperties=true]\n * @return {Command} `this` command for chaining\n */\n\n storeOptionsAsProperties(storeAsProperties = true) {\n if (this.options.length) {\n throw new Error('call .storeOptionsAsProperties() before adding options');\n }\n if (Object.keys(this._optionValues).length) {\n throw new Error(\n 'call .storeOptionsAsProperties() before setting option values',\n );\n }\n this._storeOptionsAsProperties = !!storeAsProperties;\n return this;\n }\n\n /**\n * Retrieve option value.\n *\n * @param {string} key\n * @return {object} value\n */\n\n getOptionValue(key) {\n if (this._storeOptionsAsProperties) {\n return this[key];\n }\n return this._optionValues[key];\n }\n\n /**\n * Store option value.\n *\n * @param {string} key\n * @param {object} value\n * @return {Command} `this` command for chaining\n */\n\n setOptionValue(key, value) {\n return this.setOptionValueWithSource(key, value, undefined);\n }\n\n /**\n * Store option value and where the value came from.\n *\n * @param {string} key\n * @param {object} value\n * @param {string} source - expected values are default/config/env/cli/implied\n * @return {Command} `this` command for chaining\n */\n\n setOptionValueWithSource(key, value, source) {\n if (this._storeOptionsAsProperties) {\n this[key] = value;\n } else {\n this._optionValues[key] = value;\n }\n this._optionValueSources[key] = source;\n return this;\n }\n\n /**\n * Get source of option value.\n * Expected values are default | config | env | cli | implied\n *\n * @param {string} key\n * @return {string}\n */\n\n getOptionValueSource(key) {\n return this._optionValueSources[key];\n }\n\n /**\n * Get source of option value. See also .optsWithGlobals().\n * Expected values are default | config | env | cli | implied\n *\n * @param {string} key\n * @return {string}\n */\n\n getOptionValueSourceWithGlobals(key) {\n // global overwrites local, like optsWithGlobals\n let source;\n this._getCommandAndAncestors().forEach((cmd) => {\n if (cmd.getOptionValueSource(key) !== undefined) {\n source = cmd.getOptionValueSource(key);\n }\n });\n return source;\n }\n\n /**\n * Get user arguments from implied or explicit arguments.\n * Side-effects: set _scriptPath if args included script. Used for default program name, and subcommand searches.\n *\n * @private\n */\n\n _prepareUserArgs(argv, parseOptions) {\n if (argv !== undefined && !Array.isArray(argv)) {\n throw new Error('first parameter to parse must be array or undefined');\n }\n parseOptions = parseOptions || {};\n\n // auto-detect argument conventions if nothing supplied\n if (argv === undefined && parseOptions.from === undefined) {\n if (process.versions?.electron) {\n parseOptions.from = 'electron';\n }\n // check node specific options for scenarios where user CLI args follow executable without scriptname\n const execArgv = process.execArgv ?? [];\n if (\n execArgv.includes('-e') ||\n execArgv.includes('--eval') ||\n execArgv.includes('-p') ||\n execArgv.includes('--print')\n ) {\n parseOptions.from = 'eval'; // internal usage, not documented\n }\n }\n\n // default to using process.argv\n if (argv === undefined) {\n argv = process.argv;\n }\n this.rawArgs = argv.slice();\n\n // extract the user args and scriptPath\n let userArgs;\n switch (parseOptions.from) {\n case undefined:\n case 'node':\n this._scriptPath = argv[1];\n userArgs = argv.slice(2);\n break;\n case 'electron':\n // @ts-ignore: because defaultApp is an unknown property\n if (process.defaultApp) {\n this._scriptPath = argv[1];\n userArgs = argv.slice(2);\n } else {\n userArgs = argv.slice(1);\n }\n break;\n case 'user':\n userArgs = argv.slice(0);\n break;\n case 'eval':\n userArgs = argv.slice(1);\n break;\n default:\n throw new Error(\n `unexpected parse option { from: '${parseOptions.from}' }`,\n );\n }\n\n // Find default name for program from arguments.\n if (!this._name && this._scriptPath)\n this.nameFromFilename(this._scriptPath);\n this._name = this._name || 'program';\n\n return userArgs;\n }\n\n /**\n * Parse `argv`, setting options and invoking commands when defined.\n *\n * Use parseAsync instead of parse if any of your action handlers are async.\n *\n * Call with no parameters to parse `process.argv`. Detects Electron and special node options like `node --eval`. Easy mode!\n *\n * Or call with an array of strings to parse, and optionally where the user arguments start by specifying where the arguments are `from`:\n * - `'node'`: default, `argv[0]` is the application and `argv[1]` is the script being run, with user arguments after that\n * - `'electron'`: `argv[0]` is the application and `argv[1]` varies depending on whether the electron application is packaged\n * - `'user'`: just user arguments\n *\n * @example\n * program.parse(); // parse process.argv and auto-detect electron and special node flags\n * program.parse(process.argv); // assume argv[0] is app and argv[1] is script\n * program.parse(my-args, { from: 'user' }); // just user supplied arguments, nothing special about argv[0]\n *\n * @param {string[]} [argv] - optional, defaults to process.argv\n * @param {object} [parseOptions] - optionally specify style of options with from: node/user/electron\n * @param {string} [parseOptions.from] - where the args are from: 'node', 'user', 'electron'\n * @return {Command} `this` command for chaining\n */\n\n parse(argv, parseOptions) {\n this._prepareForParse();\n const userArgs = this._prepareUserArgs(argv, parseOptions);\n this._parseCommand([], userArgs);\n\n return this;\n }\n\n /**\n * Parse `argv`, setting options and invoking commands when defined.\n *\n * Call with no parameters to parse `process.argv`. Detects Electron and special node options like `node --eval`. Easy mode!\n *\n * Or call with an array of strings to parse, and optionally where the user arguments start by specifying where the arguments are `from`:\n * - `'node'`: default, `argv[0]` is the application and `argv[1]` is the script being run, with user arguments after that\n * - `'electron'`: `argv[0]` is the application and `argv[1]` varies depending on whether the electron application is packaged\n * - `'user'`: just user arguments\n *\n * @example\n * await program.parseAsync(); // parse process.argv and auto-detect electron and special node flags\n * await program.parseAsync(process.argv); // assume argv[0] is app and argv[1] is script\n * await program.parseAsync(my-args, { from: 'user' }); // just user supplied arguments, nothing special about argv[0]\n *\n * @param {string[]} [argv]\n * @param {object} [parseOptions]\n * @param {string} parseOptions.from - where the args are from: 'node', 'user', 'electron'\n * @return {Promise}\n */\n\n async parseAsync(argv, parseOptions) {\n this._prepareForParse();\n const userArgs = this._prepareUserArgs(argv, parseOptions);\n await this._parseCommand([], userArgs);\n\n return this;\n }\n\n _prepareForParse() {\n if (this._savedState === null) {\n this.saveStateBeforeParse();\n } else {\n this.restoreStateBeforeParse();\n }\n }\n\n /**\n * Called the first time parse is called to save state and allow a restore before subsequent calls to parse.\n * Not usually called directly, but available for subclasses to save their custom state.\n *\n * This is called in a lazy way. Only commands used in parsing chain will have state saved.\n */\n saveStateBeforeParse() {\n this._savedState = {\n // name is stable if supplied by author, but may be unspecified for root command and deduced during parsing\n _name: this._name,\n // option values before parse have default values (including false for negated options)\n // shallow clones\n _optionValues: { ...this._optionValues },\n _optionValueSources: { ...this._optionValueSources },\n };\n }\n\n /**\n * Restore state before parse for calls after the first.\n * Not usually called directly, but available for subclasses to save their custom state.\n *\n * This is called in a lazy way. Only commands used in parsing chain will have state restored.\n */\n restoreStateBeforeParse() {\n if (this._storeOptionsAsProperties)\n throw new Error(`Can not call parse again when storeOptionsAsProperties is true.\n- either make a new Command for each call to parse, or stop storing options as properties`);\n\n // clear state from _prepareUserArgs\n this._name = this._savedState._name;\n this._scriptPath = null;\n this.rawArgs = [];\n // clear state from setOptionValueWithSource\n this._optionValues = { ...this._savedState._optionValues };\n this._optionValueSources = { ...this._savedState._optionValueSources };\n // clear state from _parseCommand\n this.args = [];\n // clear state from _processArguments\n this.processedArgs = [];\n }\n\n /**\n * Throw if expected executable is missing. Add lots of help for author.\n *\n * @param {string} executableFile\n * @param {string} executableDir\n * @param {string} subcommandName\n */\n _checkForMissingExecutable(executableFile, executableDir, subcommandName) {\n if (fs.existsSync(executableFile)) return;\n\n const executableDirMessage = executableDir\n ? `searched for local subcommand relative to directory '${executableDir}'`\n : 'no directory for search for local subcommand, use .executableDir() to supply a custom directory';\n const executableMissing = `'${executableFile}' does not exist\n - if '${subcommandName}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead\n - if the default executable name is not suitable, use the executableFile option to supply a custom name or path\n - ${executableDirMessage}`;\n throw new Error(executableMissing);\n }\n\n /**\n * Execute a sub-command executable.\n *\n * @private\n */\n\n _executeSubCommand(subcommand, args) {\n args = args.slice();\n let launchWithNode = false; // Use node for source targets so do not need to get permissions correct, and on Windows.\n const sourceExt = ['.js', '.ts', '.tsx', '.mjs', '.cjs'];\n\n function findFile(baseDir, baseName) {\n // Look for specified file\n const localBin = path.resolve(baseDir, baseName);\n if (fs.existsSync(localBin)) return localBin;\n\n // Stop looking if candidate already has an expected extension.\n if (sourceExt.includes(path.extname(baseName))) return undefined;\n\n // Try all the extensions.\n const foundExt = sourceExt.find((ext) =>\n fs.existsSync(`${localBin}${ext}`),\n );\n if (foundExt) return `${localBin}${foundExt}`;\n\n return undefined;\n }\n\n // Not checking for help first. Unlikely to have mandatory and executable, and can't robustly test for help flags in external command.\n this._checkForMissingMandatoryOptions();\n this._checkForConflictingOptions();\n\n // executableFile and executableDir might be full path, or just a name\n let executableFile =\n subcommand._executableFile || `${this._name}-${subcommand._name}`;\n let executableDir = this._executableDir || '';\n if (this._scriptPath) {\n let resolvedScriptPath; // resolve possible symlink for installed npm binary\n try {\n resolvedScriptPath = fs.realpathSync(this._scriptPath);\n } catch {\n resolvedScriptPath = this._scriptPath;\n }\n executableDir = path.resolve(\n path.dirname(resolvedScriptPath),\n executableDir,\n );\n }\n\n // Look for a local file in preference to a command in PATH.\n if (executableDir) {\n let localFile = findFile(executableDir, executableFile);\n\n // Legacy search using prefix of script name instead of command name\n if (!localFile && !subcommand._executableFile && this._scriptPath) {\n const legacyName = path.basename(\n this._scriptPath,\n path.extname(this._scriptPath),\n );\n if (legacyName !== this._name) {\n localFile = findFile(\n executableDir,\n `${legacyName}-${subcommand._name}`,\n );\n }\n }\n executableFile = localFile || executableFile;\n }\n\n launchWithNode = sourceExt.includes(path.extname(executableFile));\n\n let proc;\n if (process.platform !== 'win32') {\n if (launchWithNode) {\n args.unshift(executableFile);\n // add executable arguments to spawn\n args = incrementNodeInspectorPort(process.execArgv).concat(args);\n\n proc = childProcess.spawn(process.argv[0], args, { stdio: 'inherit' });\n } else {\n proc = childProcess.spawn(executableFile, args, { stdio: 'inherit' });\n }\n } else {\n this._checkForMissingExecutable(\n executableFile,\n executableDir,\n subcommand._name,\n );\n args.unshift(executableFile);\n // add executable arguments to spawn\n args = incrementNodeInspectorPort(process.execArgv).concat(args);\n proc = childProcess.spawn(process.execPath, args, { stdio: 'inherit' });\n }\n\n if (!proc.killed) {\n // testing mainly to avoid leak warnings during unit tests with mocked spawn\n const signals = ['SIGUSR1', 'SIGUSR2', 'SIGTERM', 'SIGINT', 'SIGHUP'];\n signals.forEach((signal) => {\n process.on(signal, () => {\n if (proc.killed === false && proc.exitCode === null) {\n // @ts-ignore because signals not typed to known strings\n proc.kill(signal);\n }\n });\n });\n }\n\n // By default terminate process when spawned process terminates.\n const exitCallback = this._exitCallback;\n proc.on('close', (code) => {\n code = code ?? 1; // code is null if spawned process terminated due to a signal\n if (!exitCallback) {\n process.exit(code);\n } else {\n exitCallback(\n new CommanderError(\n code,\n 'commander.executeSubCommandAsync',\n '(close)',\n ),\n );\n }\n });\n proc.on('error', (err) => {\n // @ts-ignore: because err.code is an unknown property\n if (err.code === 'ENOENT') {\n this._checkForMissingExecutable(\n executableFile,\n executableDir,\n subcommand._name,\n );\n // @ts-ignore: because err.code is an unknown property\n } else if (err.code === 'EACCES') {\n throw new Error(`'${executableFile}' not executable`);\n }\n if (!exitCallback) {\n process.exit(1);\n } else {\n const wrappedError = new CommanderError(\n 1,\n 'commander.executeSubCommandAsync',\n '(error)',\n );\n wrappedError.nestedError = err;\n exitCallback(wrappedError);\n }\n });\n\n // Store the reference to the child process\n this.runningCommand = proc;\n }\n\n /**\n * @private\n */\n\n _dispatchSubcommand(commandName, operands, unknown) {\n const subCommand = this._findCommand(commandName);\n if (!subCommand) this.help({ error: true });\n\n subCommand._prepareForParse();\n let promiseChain;\n promiseChain = this._chainOrCallSubCommandHook(\n promiseChain,\n subCommand,\n 'preSubcommand',\n );\n promiseChain = this._chainOrCall(promiseChain, () => {\n if (subCommand._executableHandler) {\n this._executeSubCommand(subCommand, operands.concat(unknown));\n } else {\n return subCommand._parseCommand(operands, unknown);\n }\n });\n return promiseChain;\n }\n\n /**\n * Invoke help directly if possible, or dispatch if necessary.\n * e.g. help foo\n *\n * @private\n */\n\n _dispatchHelpCommand(subcommandName) {\n if (!subcommandName) {\n this.help();\n }\n const subCommand = this._findCommand(subcommandName);\n if (subCommand && !subCommand._executableHandler) {\n subCommand.help();\n }\n\n // Fallback to parsing the help flag to invoke the help.\n return this._dispatchSubcommand(\n subcommandName,\n [],\n [this._getHelpOption()?.long ?? this._getHelpOption()?.short ?? '--help'],\n );\n }\n\n /**\n * Check this.args against expected this.registeredArguments.\n *\n * @private\n */\n\n _checkNumberOfArguments() {\n // too few\n this.registeredArguments.forEach((arg, i) => {\n if (arg.required && this.args[i] == null) {\n this.missingArgument(arg.name());\n }\n });\n // too many\n if (\n this.registeredArguments.length > 0 &&\n this.registeredArguments[this.registeredArguments.length - 1].variadic\n ) {\n return;\n }\n if (this.args.length > this.registeredArguments.length) {\n this._excessArguments(this.args);\n }\n }\n\n /**\n * Process this.args using this.registeredArguments and save as this.processedArgs!\n *\n * @private\n */\n\n _processArguments() {\n const myParseArg = (argument, value, previous) => {\n // Extra processing for nice error message on parsing failure.\n let parsedValue = value;\n if (value !== null && argument.parseArg) {\n const invalidValueMessage = `error: command-argument value '${value}' is invalid for argument '${argument.name()}'.`;\n parsedValue = this._callParseArg(\n argument,\n value,\n previous,\n invalidValueMessage,\n );\n }\n return parsedValue;\n };\n\n this._checkNumberOfArguments();\n\n const processedArgs = [];\n this.registeredArguments.forEach((declaredArg, index) => {\n let value = declaredArg.defaultValue;\n if (declaredArg.variadic) {\n // Collect together remaining arguments for passing together as an array.\n if (index < this.args.length) {\n value = this.args.slice(index);\n if (declaredArg.parseArg) {\n value = value.reduce((processed, v) => {\n return myParseArg(declaredArg, v, processed);\n }, declaredArg.defaultValue);\n }\n } else if (value === undefined) {\n value = [];\n }\n } else if (index < this.args.length) {\n value = this.args[index];\n if (declaredArg.parseArg) {\n value = myParseArg(declaredArg, value, declaredArg.defaultValue);\n }\n }\n processedArgs[index] = value;\n });\n this.processedArgs = processedArgs;\n }\n\n /**\n * Once we have a promise we chain, but call synchronously until then.\n *\n * @param {(Promise|undefined)} promise\n * @param {Function} fn\n * @return {(Promise|undefined)}\n * @private\n */\n\n _chainOrCall(promise, fn) {\n // thenable\n if (promise?.then && typeof promise.then === 'function') {\n // already have a promise, chain callback\n return promise.then(() => fn());\n }\n // callback might return a promise\n return fn();\n }\n\n /**\n *\n * @param {(Promise|undefined)} promise\n * @param {string} event\n * @return {(Promise|undefined)}\n * @private\n */\n\n _chainOrCallHooks(promise, event) {\n let result = promise;\n const hooks = [];\n this._getCommandAndAncestors()\n .reverse()\n .filter((cmd) => cmd._lifeCycleHooks[event] !== undefined)\n .forEach((hookedCommand) => {\n hookedCommand._lifeCycleHooks[event].forEach((callback) => {\n hooks.push({ hookedCommand, callback });\n });\n });\n if (event === 'postAction') {\n hooks.reverse();\n }\n\n hooks.forEach((hookDetail) => {\n result = this._chainOrCall(result, () => {\n return hookDetail.callback(hookDetail.hookedCommand, this);\n });\n });\n return result;\n }\n\n /**\n *\n * @param {(Promise|undefined)} promise\n * @param {Command} subCommand\n * @param {string} event\n * @return {(Promise|undefined)}\n * @private\n */\n\n _chainOrCallSubCommandHook(promise, subCommand, event) {\n let result = promise;\n if (this._lifeCycleHooks[event] !== undefined) {\n this._lifeCycleHooks[event].forEach((hook) => {\n result = this._chainOrCall(result, () => {\n return hook(this, subCommand);\n });\n });\n }\n return result;\n }\n\n /**\n * Process arguments in context of this command.\n * Returns action result, in case it is a promise.\n *\n * @private\n */\n\n _parseCommand(operands, unknown) {\n const parsed = this.parseOptions(unknown);\n this._parseOptionsEnv(); // after cli, so parseArg not called on both cli and env\n this._parseOptionsImplied();\n operands = operands.concat(parsed.operands);\n unknown = parsed.unknown;\n this.args = operands.concat(unknown);\n\n if (operands && this._findCommand(operands[0])) {\n return this._dispatchSubcommand(operands[0], operands.slice(1), unknown);\n }\n if (\n this._getHelpCommand() &&\n operands[0] === this._getHelpCommand().name()\n ) {\n return this._dispatchHelpCommand(operands[1]);\n }\n if (this._defaultCommandName) {\n this._outputHelpIfRequested(unknown); // Run the help for default command from parent rather than passing to default command\n return this._dispatchSubcommand(\n this._defaultCommandName,\n operands,\n unknown,\n );\n }\n if (\n this.commands.length &&\n this.args.length === 0 &&\n !this._actionHandler &&\n !this._defaultCommandName\n ) {\n // probably missing subcommand and no handler, user needs help (and exit)\n this.help({ error: true });\n }\n\n this._outputHelpIfRequested(parsed.unknown);\n this._checkForMissingMandatoryOptions();\n this._checkForConflictingOptions();\n\n // We do not always call this check to avoid masking a \"better\" error, like unknown command.\n const checkForUnknownOptions = () => {\n if (parsed.unknown.length > 0) {\n this.unknownOption(parsed.unknown[0]);\n }\n };\n\n const commandEvent = `command:${this.name()}`;\n if (this._actionHandler) {\n checkForUnknownOptions();\n this._processArguments();\n\n let promiseChain;\n promiseChain = this._chainOrCallHooks(promiseChain, 'preAction');\n promiseChain = this._chainOrCall(promiseChain, () =>\n this._actionHandler(this.processedArgs),\n );\n if (this.parent) {\n promiseChain = this._chainOrCall(promiseChain, () => {\n this.parent.emit(commandEvent, operands, unknown); // legacy\n });\n }\n promiseChain = this._chainOrCallHooks(promiseChain, 'postAction');\n return promiseChain;\n }\n if (this.parent?.listenerCount(commandEvent)) {\n checkForUnknownOptions();\n this._processArguments();\n this.parent.emit(commandEvent, operands, unknown); // legacy\n } else if (operands.length) {\n if (this._findCommand('*')) {\n // legacy default command\n return this._dispatchSubcommand('*', operands, unknown);\n }\n if (this.listenerCount('command:*')) {\n // skip option check, emit event for possible misspelling suggestion\n this.emit('command:*', operands, unknown);\n } else if (this.commands.length) {\n this.unknownCommand();\n } else {\n checkForUnknownOptions();\n this._processArguments();\n }\n } else if (this.commands.length) {\n checkForUnknownOptions();\n // This command has subcommands and nothing hooked up at this level, so display help (and exit).\n this.help({ error: true });\n } else {\n checkForUnknownOptions();\n this._processArguments();\n // fall through for caller to handle after calling .parse()\n }\n }\n\n /**\n * Find matching command.\n *\n * @private\n * @return {Command | undefined}\n */\n _findCommand(name) {\n if (!name) return undefined;\n return this.commands.find(\n (cmd) => cmd._name === name || cmd._aliases.includes(name),\n );\n }\n\n /**\n * Return an option matching `arg` if any.\n *\n * @param {string} arg\n * @return {Option}\n * @package\n */\n\n _findOption(arg) {\n return this.options.find((option) => option.is(arg));\n }\n\n /**\n * Display an error message if a mandatory option does not have a value.\n * Called after checking for help flags in leaf subcommand.\n *\n * @private\n */\n\n _checkForMissingMandatoryOptions() {\n // Walk up hierarchy so can call in subcommand after checking for displaying help.\n this._getCommandAndAncestors().forEach((cmd) => {\n cmd.options.forEach((anOption) => {\n if (\n anOption.mandatory &&\n cmd.getOptionValue(anOption.attributeName()) === undefined\n ) {\n cmd.missingMandatoryOptionValue(anOption);\n }\n });\n });\n }\n\n /**\n * Display an error message if conflicting options are used together in this.\n *\n * @private\n */\n _checkForConflictingLocalOptions() {\n const definedNonDefaultOptions = this.options.filter((option) => {\n const optionKey = option.attributeName();\n if (this.getOptionValue(optionKey) === undefined) {\n return false;\n }\n return this.getOptionValueSource(optionKey) !== 'default';\n });\n\n const optionsWithConflicting = definedNonDefaultOptions.filter(\n (option) => option.conflictsWith.length > 0,\n );\n\n optionsWithConflicting.forEach((option) => {\n const conflictingAndDefined = definedNonDefaultOptions.find((defined) =>\n option.conflictsWith.includes(defined.attributeName()),\n );\n if (conflictingAndDefined) {\n this._conflictingOption(option, conflictingAndDefined);\n }\n });\n }\n\n /**\n * Display an error message if conflicting options are used together.\n * Called after checking for help flags in leaf subcommand.\n *\n * @private\n */\n _checkForConflictingOptions() {\n // Walk up hierarchy so can call in subcommand after checking for displaying help.\n this._getCommandAndAncestors().forEach((cmd) => {\n cmd._checkForConflictingLocalOptions();\n });\n }\n\n /**\n * Parse options from `argv` removing known options,\n * and return argv split into operands and unknown arguments.\n *\n * Side effects: modifies command by storing options. Does not reset state if called again.\n *\n * Examples:\n *\n * argv => operands, unknown\n * --known kkk op => [op], []\n * op --known kkk => [op], []\n * sub --unknown uuu op => [sub], [--unknown uuu op]\n * sub -- --unknown uuu op => [sub --unknown uuu op], []\n *\n * @param {string[]} args\n * @return {{operands: string[], unknown: string[]}}\n */\n\n parseOptions(args) {\n const operands = []; // operands, not options or values\n const unknown = []; // first unknown option and remaining unknown args\n let dest = operands;\n\n function maybeOption(arg) {\n return arg.length > 1 && arg[0] === '-';\n }\n\n const negativeNumberArg = (arg) => {\n // return false if not a negative number\n if (!/^-(\\d+|\\d*\\.\\d+)(e[+-]?\\d+)?$/.test(arg)) return false;\n // negative number is ok unless digit used as an option in command hierarchy\n return !this._getCommandAndAncestors().some((cmd) =>\n cmd.options\n .map((opt) => opt.short)\n .some((short) => /^-\\d$/.test(short)),\n );\n };\n\n // parse options\n let activeVariadicOption = null;\n let activeGroup = null; // working through group of short options, like -abc\n let i = 0;\n while (i < args.length || activeGroup) {\n const arg = activeGroup ?? args[i++];\n activeGroup = null;\n\n // literal\n if (arg === '--') {\n if (dest === unknown) dest.push(arg);\n dest.push(...args.slice(i));\n break;\n }\n\n if (\n activeVariadicOption &&\n (!maybeOption(arg) || negativeNumberArg(arg))\n ) {\n this.emit(`option:${activeVariadicOption.name()}`, arg);\n continue;\n }\n activeVariadicOption = null;\n\n if (maybeOption(arg)) {\n const option = this._findOption(arg);\n // recognised option, call listener to assign value with possible custom processing\n if (option) {\n if (option.required) {\n const value = args[i++];\n if (value === undefined) this.optionMissingArgument(option);\n this.emit(`option:${option.name()}`, value);\n } else if (option.optional) {\n let value = null;\n // historical behaviour is optional value is following arg unless an option\n if (\n i < args.length &&\n (!maybeOption(args[i]) || negativeNumberArg(args[i]))\n ) {\n value = args[i++];\n }\n this.emit(`option:${option.name()}`, value);\n } else {\n // boolean flag\n this.emit(`option:${option.name()}`);\n }\n activeVariadicOption = option.variadic ? option : null;\n continue;\n }\n }\n\n // Look for combo options following single dash, eat first one if known.\n if (arg.length > 2 && arg[0] === '-' && arg[1] !== '-') {\n const option = this._findOption(`-${arg[1]}`);\n if (option) {\n if (\n option.required ||\n (option.optional && this._combineFlagAndOptionalValue)\n ) {\n // option with value following in same argument\n this.emit(`option:${option.name()}`, arg.slice(2));\n } else {\n // boolean option\n this.emit(`option:${option.name()}`);\n // remove the processed option and keep processing group\n activeGroup = `-${arg.slice(2)}`;\n }\n continue;\n }\n }\n\n // Look for known long flag with value, like --foo=bar\n if (/^--[^=]+=/.test(arg)) {\n const index = arg.indexOf('=');\n const option = this._findOption(arg.slice(0, index));\n if (option && (option.required || option.optional)) {\n this.emit(`option:${option.name()}`, arg.slice(index + 1));\n continue;\n }\n }\n\n // Not a recognised option by this command.\n // Might be a command-argument, or subcommand option, or unknown option, or help command or option.\n\n // An unknown option means further arguments also classified as unknown so can be reprocessed by subcommands.\n // A negative number in a leaf command is not an unknown option.\n if (\n dest === operands &&\n maybeOption(arg) &&\n !(this.commands.length === 0 && negativeNumberArg(arg))\n ) {\n dest = unknown;\n }\n\n // If using positionalOptions, stop processing our options at subcommand.\n if (\n (this._enablePositionalOptions || this._passThroughOptions) &&\n operands.length === 0 &&\n unknown.length === 0\n ) {\n if (this._findCommand(arg)) {\n operands.push(arg);\n unknown.push(...args.slice(i));\n break;\n } else if (\n this._getHelpCommand() &&\n arg === this._getHelpCommand().name()\n ) {\n operands.push(arg, ...args.slice(i));\n break;\n } else if (this._defaultCommandName) {\n unknown.push(arg, ...args.slice(i));\n break;\n }\n }\n\n // If using passThroughOptions, stop processing options at first command-argument.\n if (this._passThroughOptions) {\n dest.push(arg, ...args.slice(i));\n break;\n }\n\n // add arg\n dest.push(arg);\n }\n\n return { operands, unknown };\n }\n\n /**\n * Return an object containing local option values as key-value pairs.\n *\n * @return {object}\n */\n opts() {\n if (this._storeOptionsAsProperties) {\n // Preserve original behaviour so backwards compatible when still using properties\n const result = {};\n const len = this.options.length;\n\n for (let i = 0; i < len; i++) {\n const key = this.options[i].attributeName();\n result[key] =\n key === this._versionOptionName ? this._version : this[key];\n }\n return result;\n }\n\n return this._optionValues;\n }\n\n /**\n * Return an object containing merged local and global option values as key-value pairs.\n *\n * @return {object}\n */\n optsWithGlobals() {\n // globals overwrite locals\n return this._getCommandAndAncestors().reduce(\n (combinedOptions, cmd) => Object.assign(combinedOptions, cmd.opts()),\n {},\n );\n }\n\n /**\n * Display error message and exit (or call exitOverride).\n *\n * @param {string} message\n * @param {object} [errorOptions]\n * @param {string} [errorOptions.code] - an id string representing the error\n * @param {number} [errorOptions.exitCode] - used with process.exit\n */\n error(message, errorOptions) {\n // output handling\n this._outputConfiguration.outputError(\n `${message}\\n`,\n this._outputConfiguration.writeErr,\n );\n if (typeof this._showHelpAfterError === 'string') {\n this._outputConfiguration.writeErr(`${this._showHelpAfterError}\\n`);\n } else if (this._showHelpAfterError) {\n this._outputConfiguration.writeErr('\\n');\n this.outputHelp({ error: true });\n }\n\n // exit handling\n const config = errorOptions || {};\n const exitCode = config.exitCode || 1;\n const code = config.code || 'commander.error';\n this._exit(exitCode, code, message);\n }\n\n /**\n * Apply any option related environment variables, if option does\n * not have a value from cli or client code.\n *\n * @private\n */\n _parseOptionsEnv() {\n this.options.forEach((option) => {\n if (option.envVar && option.envVar in process.env) {\n const optionKey = option.attributeName();\n // Priority check. Do not overwrite cli or options from unknown source (client-code).\n if (\n this.getOptionValue(optionKey) === undefined ||\n ['default', 'config', 'env'].includes(\n this.getOptionValueSource(optionKey),\n )\n ) {\n if (option.required || option.optional) {\n // option can take a value\n // keep very simple, optional always takes value\n this.emit(`optionEnv:${option.name()}`, process.env[option.envVar]);\n } else {\n // boolean\n // keep very simple, only care that envVar defined and not the value\n this.emit(`optionEnv:${option.name()}`);\n }\n }\n }\n });\n }\n\n /**\n * Apply any implied option values, if option is undefined or default value.\n *\n * @private\n */\n _parseOptionsImplied() {\n const dualHelper = new DualOptions(this.options);\n const hasCustomOptionValue = (optionKey) => {\n return (\n this.getOptionValue(optionKey) !== undefined &&\n !['default', 'implied'].includes(this.getOptionValueSource(optionKey))\n );\n };\n this.options\n .filter(\n (option) =>\n option.implied !== undefined &&\n hasCustomOptionValue(option.attributeName()) &&\n dualHelper.valueFromOption(\n this.getOptionValue(option.attributeName()),\n option,\n ),\n )\n .forEach((option) => {\n Object.keys(option.implied)\n .filter((impliedKey) => !hasCustomOptionValue(impliedKey))\n .forEach((impliedKey) => {\n this.setOptionValueWithSource(\n impliedKey,\n option.implied[impliedKey],\n 'implied',\n );\n });\n });\n }\n\n /**\n * Argument `name` is missing.\n *\n * @param {string} name\n * @private\n */\n\n missingArgument(name) {\n const message = `error: missing required argument '${name}'`;\n this.error(message, { code: 'commander.missingArgument' });\n }\n\n /**\n * `Option` is missing an argument.\n *\n * @param {Option} option\n * @private\n */\n\n optionMissingArgument(option) {\n const message = `error: option '${option.flags}' argument missing`;\n this.error(message, { code: 'commander.optionMissingArgument' });\n }\n\n /**\n * `Option` does not have a value, and is a mandatory option.\n *\n * @param {Option} option\n * @private\n */\n\n missingMandatoryOptionValue(option) {\n const message = `error: required option '${option.flags}' not specified`;\n this.error(message, { code: 'commander.missingMandatoryOptionValue' });\n }\n\n /**\n * `Option` conflicts with another option.\n *\n * @param {Option} option\n * @param {Option} conflictingOption\n * @private\n */\n _conflictingOption(option, conflictingOption) {\n // The calling code does not know whether a negated option is the source of the\n // value, so do some work to take an educated guess.\n const findBestOptionFromValue = (option) => {\n const optionKey = option.attributeName();\n const optionValue = this.getOptionValue(optionKey);\n const negativeOption = this.options.find(\n (target) => target.negate && optionKey === target.attributeName(),\n );\n const positiveOption = this.options.find(\n (target) => !target.negate && optionKey === target.attributeName(),\n );\n if (\n negativeOption &&\n ((negativeOption.presetArg === undefined && optionValue === false) ||\n (negativeOption.presetArg !== undefined &&\n optionValue === negativeOption.presetArg))\n ) {\n return negativeOption;\n }\n return positiveOption || option;\n };\n\n const getErrorMessage = (option) => {\n const bestOption = findBestOptionFromValue(option);\n const optionKey = bestOption.attributeName();\n const source = this.getOptionValueSource(optionKey);\n if (source === 'env') {\n return `environment variable '${bestOption.envVar}'`;\n }\n return `option '${bestOption.flags}'`;\n };\n\n const message = `error: ${getErrorMessage(option)} cannot be used with ${getErrorMessage(conflictingOption)}`;\n this.error(message, { code: 'commander.conflictingOption' });\n }\n\n /**\n * Unknown option `flag`.\n *\n * @param {string} flag\n * @private\n */\n\n unknownOption(flag) {\n if (this._allowUnknownOption) return;\n let suggestion = '';\n\n if (flag.startsWith('--') && this._showSuggestionAfterError) {\n // Looping to pick up the global options too\n let candidateFlags = [];\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n let command = this;\n do {\n const moreFlags = command\n .createHelp()\n .visibleOptions(command)\n .filter((option) => option.long)\n .map((option) => option.long);\n candidateFlags = candidateFlags.concat(moreFlags);\n command = command.parent;\n } while (command && !command._enablePositionalOptions);\n suggestion = suggestSimilar(flag, candidateFlags);\n }\n\n const message = `error: unknown option '${flag}'${suggestion}`;\n this.error(message, { code: 'commander.unknownOption' });\n }\n\n /**\n * Excess arguments, more than expected.\n *\n * @param {string[]} receivedArgs\n * @private\n */\n\n _excessArguments(receivedArgs) {\n if (this._allowExcessArguments) return;\n\n const expected = this.registeredArguments.length;\n const s = expected === 1 ? '' : 's';\n const forSubcommand = this.parent ? ` for '${this.name()}'` : '';\n const message = `error: too many arguments${forSubcommand}. Expected ${expected} argument${s} but got ${receivedArgs.length}.`;\n this.error(message, { code: 'commander.excessArguments' });\n }\n\n /**\n * Unknown command.\n *\n * @private\n */\n\n unknownCommand() {\n const unknownName = this.args[0];\n let suggestion = '';\n\n if (this._showSuggestionAfterError) {\n const candidateNames = [];\n this.createHelp()\n .visibleCommands(this)\n .forEach((command) => {\n candidateNames.push(command.name());\n // just visible alias\n if (command.alias()) candidateNames.push(command.alias());\n });\n suggestion = suggestSimilar(unknownName, candidateNames);\n }\n\n const message = `error: unknown command '${unknownName}'${suggestion}`;\n this.error(message, { code: 'commander.unknownCommand' });\n }\n\n /**\n * Get or set the program version.\n *\n * This method auto-registers the \"-V, --version\" option which will print the version number.\n *\n * You can optionally supply the flags and description to override the defaults.\n *\n * @param {string} [str]\n * @param {string} [flags]\n * @param {string} [description]\n * @return {(this | string | undefined)} `this` command for chaining, or version string if no arguments\n */\n\n version(str, flags, description) {\n if (str === undefined) return this._version;\n this._version = str;\n flags = flags || '-V, --version';\n description = description || 'output the version number';\n const versionOption = this.createOption(flags, description);\n this._versionOptionName = versionOption.attributeName();\n this._registerOption(versionOption);\n\n this.on('option:' + versionOption.name(), () => {\n this._outputConfiguration.writeOut(`${str}\\n`);\n this._exit(0, 'commander.version', str);\n });\n return this;\n }\n\n /**\n * Set the description.\n *\n * @param {string} [str]\n * @param {object} [argsDescription]\n * @return {(string|Command)}\n */\n description(str, argsDescription) {\n if (str === undefined && argsDescription === undefined)\n return this._description;\n this._description = str;\n if (argsDescription) {\n this._argsDescription = argsDescription;\n }\n return this;\n }\n\n /**\n * Set the summary. Used when listed as subcommand of parent.\n *\n * @param {string} [str]\n * @return {(string|Command)}\n */\n summary(str) {\n if (str === undefined) return this._summary;\n this._summary = str;\n return this;\n }\n\n /**\n * Set an alias for the command.\n *\n * You may call more than once to add multiple aliases. Only the first alias is shown in the auto-generated help.\n *\n * @param {string} [alias]\n * @return {(string|Command)}\n */\n\n alias(alias) {\n if (alias === undefined) return this._aliases[0]; // just return first, for backwards compatibility\n\n /** @type {Command} */\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n let command = this;\n if (\n this.commands.length !== 0 &&\n this.commands[this.commands.length - 1]._executableHandler\n ) {\n // assume adding alias for last added executable subcommand, rather than this\n command = this.commands[this.commands.length - 1];\n }\n\n if (alias === command._name)\n throw new Error(\"Command alias can't be the same as its name\");\n const matchingCommand = this.parent?._findCommand(alias);\n if (matchingCommand) {\n // c.f. _registerCommand\n const existingCmd = [matchingCommand.name()]\n .concat(matchingCommand.aliases())\n .join('|');\n throw new Error(\n `cannot add alias '${alias}' to command '${this.name()}' as already have command '${existingCmd}'`,\n );\n }\n\n command._aliases.push(alias);\n return this;\n }\n\n /**\n * Set aliases for the command.\n *\n * Only the first alias is shown in the auto-generated help.\n *\n * @param {string[]} [aliases]\n * @return {(string[]|Command)}\n */\n\n aliases(aliases) {\n // Getter for the array of aliases is the main reason for having aliases() in addition to alias().\n if (aliases === undefined) return this._aliases;\n\n aliases.forEach((alias) => this.alias(alias));\n return this;\n }\n\n /**\n * Set / get the command usage `str`.\n *\n * @param {string} [str]\n * @return {(string|Command)}\n */\n\n usage(str) {\n if (str === undefined) {\n if (this._usage) return this._usage;\n\n const args = this.registeredArguments.map((arg) => {\n return humanReadableArgName(arg);\n });\n return []\n .concat(\n this.options.length || this._helpOption !== null ? '[options]' : [],\n this.commands.length ? '[command]' : [],\n this.registeredArguments.length ? args : [],\n )\n .join(' ');\n }\n\n this._usage = str;\n return this;\n }\n\n /**\n * Get or set the name of the command.\n *\n * @param {string} [str]\n * @return {(string|Command)}\n */\n\n name(str) {\n if (str === undefined) return this._name;\n this._name = str;\n return this;\n }\n\n /**\n * Set/get the help group heading for this subcommand in parent command's help.\n *\n * @param {string} [heading]\n * @return {Command | string}\n */\n\n helpGroup(heading) {\n if (heading === undefined) return this._helpGroupHeading ?? '';\n this._helpGroupHeading = heading;\n return this;\n }\n\n /**\n * Set/get the default help group heading for subcommands added to this command.\n * (This does not override a group set directly on the subcommand using .helpGroup().)\n *\n * @example\n * program.commandsGroup('Development Commands:);\n * program.command('watch')...\n * program.command('lint')...\n * ...\n *\n * @param {string} [heading]\n * @returns {Command | string}\n */\n commandsGroup(heading) {\n if (heading === undefined) return this._defaultCommandGroup ?? '';\n this._defaultCommandGroup = heading;\n return this;\n }\n\n /**\n * Set/get the default help group heading for options added to this command.\n * (This does not override a group set directly on the option using .helpGroup().)\n *\n * @example\n * program\n * .optionsGroup('Development Options:')\n * .option('-d, --debug', 'output extra debugging')\n * .option('-p, --profile', 'output profiling information')\n *\n * @param {string} [heading]\n * @returns {Command | string}\n */\n optionsGroup(heading) {\n if (heading === undefined) return this._defaultOptionGroup ?? '';\n this._defaultOptionGroup = heading;\n return this;\n }\n\n /**\n * @param {Option} option\n * @private\n */\n _initOptionGroup(option) {\n if (this._defaultOptionGroup && !option.helpGroupHeading)\n option.helpGroup(this._defaultOptionGroup);\n }\n\n /**\n * @param {Command} cmd\n * @private\n */\n _initCommandGroup(cmd) {\n if (this._defaultCommandGroup && !cmd.helpGroup())\n cmd.helpGroup(this._defaultCommandGroup);\n }\n\n /**\n * Set the name of the command from script filename, such as process.argv[1],\n * or require.main.filename, or __filename.\n *\n * (Used internally and public although not documented in README.)\n *\n * @example\n * program.nameFromFilename(require.main.filename);\n *\n * @param {string} filename\n * @return {Command}\n */\n\n nameFromFilename(filename) {\n this._name = path.basename(filename, path.extname(filename));\n\n return this;\n }\n\n /**\n * Get or set the directory for searching for executable subcommands of this command.\n *\n * @example\n * program.executableDir(__dirname);\n * // or\n * program.executableDir('subcommands');\n *\n * @param {string} [path]\n * @return {(string|null|Command)}\n */\n\n executableDir(path) {\n if (path === undefined) return this._executableDir;\n this._executableDir = path;\n return this;\n }\n\n /**\n * Return program help documentation.\n *\n * @param {{ error: boolean }} [contextOptions] - pass {error:true} to wrap for stderr instead of stdout\n * @return {string}\n */\n\n helpInformation(contextOptions) {\n const helper = this.createHelp();\n const context = this._getOutputContext(contextOptions);\n helper.prepareContext({\n error: context.error,\n helpWidth: context.helpWidth,\n outputHasColors: context.hasColors,\n });\n const text = helper.formatHelp(this, helper);\n if (context.hasColors) return text;\n return this._outputConfiguration.stripColor(text);\n }\n\n /**\n * @typedef HelpContext\n * @type {object}\n * @property {boolean} error\n * @property {number} helpWidth\n * @property {boolean} hasColors\n * @property {function} write - includes stripColor if needed\n *\n * @returns {HelpContext}\n * @private\n */\n\n _getOutputContext(contextOptions) {\n contextOptions = contextOptions || {};\n const error = !!contextOptions.error;\n let baseWrite;\n let hasColors;\n let helpWidth;\n if (error) {\n baseWrite = (str) => this._outputConfiguration.writeErr(str);\n hasColors = this._outputConfiguration.getErrHasColors();\n helpWidth = this._outputConfiguration.getErrHelpWidth();\n } else {\n baseWrite = (str) => this._outputConfiguration.writeOut(str);\n hasColors = this._outputConfiguration.getOutHasColors();\n helpWidth = this._outputConfiguration.getOutHelpWidth();\n }\n const write = (str) => {\n if (!hasColors) str = this._outputConfiguration.stripColor(str);\n return baseWrite(str);\n };\n return { error, write, hasColors, helpWidth };\n }\n\n /**\n * Output help information for this command.\n *\n * Outputs built-in help, and custom text added using `.addHelpText()`.\n *\n * @param {{ error: boolean } | Function} [contextOptions] - pass {error:true} to write to stderr instead of stdout\n */\n\n outputHelp(contextOptions) {\n let deprecatedCallback;\n if (typeof contextOptions === 'function') {\n deprecatedCallback = contextOptions;\n contextOptions = undefined;\n }\n\n const outputContext = this._getOutputContext(contextOptions);\n /** @type {HelpTextEventContext} */\n const eventContext = {\n error: outputContext.error,\n write: outputContext.write,\n command: this,\n };\n\n this._getCommandAndAncestors()\n .reverse()\n .forEach((command) => command.emit('beforeAllHelp', eventContext));\n this.emit('beforeHelp', eventContext);\n\n let helpInformation = this.helpInformation({ error: outputContext.error });\n if (deprecatedCallback) {\n helpInformation = deprecatedCallback(helpInformation);\n if (\n typeof helpInformation !== 'string' &&\n !Buffer.isBuffer(helpInformation)\n ) {\n throw new Error('outputHelp callback must return a string or a Buffer');\n }\n }\n outputContext.write(helpInformation);\n\n if (this._getHelpOption()?.long) {\n this.emit(this._getHelpOption().long); // deprecated\n }\n this.emit('afterHelp', eventContext);\n this._getCommandAndAncestors().forEach((command) =>\n command.emit('afterAllHelp', eventContext),\n );\n }\n\n /**\n * You can pass in flags and a description to customise the built-in help option.\n * Pass in false to disable the built-in help option.\n *\n * @example\n * program.helpOption('-?, --help' 'show help'); // customise\n * program.helpOption(false); // disable\n *\n * @param {(string | boolean)} flags\n * @param {string} [description]\n * @return {Command} `this` command for chaining\n */\n\n helpOption(flags, description) {\n // Support enabling/disabling built-in help option.\n if (typeof flags === 'boolean') {\n if (flags) {\n if (this._helpOption === null) this._helpOption = undefined; // reenable\n if (this._defaultOptionGroup) {\n // make the option to store the group\n this._initOptionGroup(this._getHelpOption());\n }\n } else {\n this._helpOption = null; // disable\n }\n return this;\n }\n\n // Customise flags and description.\n this._helpOption = this.createOption(\n flags ?? '-h, --help',\n description ?? 'display help for command',\n );\n // init group unless lazy create\n if (flags || description) this._initOptionGroup(this._helpOption);\n\n return this;\n }\n\n /**\n * Lazy create help option.\n * Returns null if has been disabled with .helpOption(false).\n *\n * @returns {(Option | null)} the help option\n * @package\n */\n _getHelpOption() {\n // Lazy create help option on demand.\n if (this._helpOption === undefined) {\n this.helpOption(undefined, undefined);\n }\n return this._helpOption;\n }\n\n /**\n * Supply your own option to use for the built-in help option.\n * This is an alternative to using helpOption() to customise the flags and description etc.\n *\n * @param {Option} option\n * @return {Command} `this` command for chaining\n */\n addHelpOption(option) {\n this._helpOption = option;\n this._initOptionGroup(option);\n return this;\n }\n\n /**\n * Output help information and exit.\n *\n * Outputs built-in help, and custom text added using `.addHelpText()`.\n *\n * @param {{ error: boolean }} [contextOptions] - pass {error:true} to write to stderr instead of stdout\n */\n\n help(contextOptions) {\n this.outputHelp(contextOptions);\n let exitCode = Number(process.exitCode ?? 0); // process.exitCode does allow a string or an integer, but we prefer just a number\n if (\n exitCode === 0 &&\n contextOptions &&\n typeof contextOptions !== 'function' &&\n contextOptions.error\n ) {\n exitCode = 1;\n }\n // message: do not have all displayed text available so only passing placeholder.\n this._exit(exitCode, 'commander.help', '(outputHelp)');\n }\n\n /**\n * // Do a little typing to coordinate emit and listener for the help text events.\n * @typedef HelpTextEventContext\n * @type {object}\n * @property {boolean} error\n * @property {Command} command\n * @property {function} write\n */\n\n /**\n * Add additional text to be displayed with the built-in help.\n *\n * Position is 'before' or 'after' to affect just this command,\n * and 'beforeAll' or 'afterAll' to affect this command and all its subcommands.\n *\n * @param {string} position - before or after built-in help\n * @param {(string | Function)} text - string to add, or a function returning a string\n * @return {Command} `this` command for chaining\n */\n\n addHelpText(position, text) {\n const allowedValues = ['beforeAll', 'before', 'after', 'afterAll'];\n if (!allowedValues.includes(position)) {\n throw new Error(`Unexpected value for position to addHelpText.\nExpecting one of '${allowedValues.join(\"', '\")}'`);\n }\n\n const helpEvent = `${position}Help`;\n this.on(helpEvent, (/** @type {HelpTextEventContext} */ context) => {\n let helpStr;\n if (typeof text === 'function') {\n helpStr = text({ error: context.error, command: context.command });\n } else {\n helpStr = text;\n }\n // Ignore falsy value when nothing to output.\n if (helpStr) {\n context.write(`${helpStr}\\n`);\n }\n });\n return this;\n }\n\n /**\n * Output help information if help flags specified\n *\n * @param {Array} args - array of options to search for help flags\n * @private\n */\n\n _outputHelpIfRequested(args) {\n const helpOption = this._getHelpOption();\n const helpRequested = helpOption && args.find((arg) => helpOption.is(arg));\n if (helpRequested) {\n this.outputHelp();\n // (Do not have all displayed text available so only passing placeholder.)\n this._exit(0, 'commander.helpDisplayed', '(outputHelp)');\n }\n }\n}\n\n/**\n * Scan arguments and increment port number for inspect calls (to avoid conflicts when spawning new command).\n *\n * @param {string[]} args - array of arguments from node.execArgv\n * @returns {string[]}\n * @private\n */\n\nfunction incrementNodeInspectorPort(args) {\n // Testing for these options:\n // --inspect[=[host:]port]\n // --inspect-brk[=[host:]port]\n // --inspect-port=[host:]port\n return args.map((arg) => {\n if (!arg.startsWith('--inspect')) {\n return arg;\n }\n let debugOption;\n let debugHost = '127.0.0.1';\n let debugPort = '9229';\n let match;\n if ((match = arg.match(/^(--inspect(-brk)?)$/)) !== null) {\n // e.g. --inspect\n debugOption = match[1];\n } else if (\n (match = arg.match(/^(--inspect(-brk|-port)?)=([^:]+)$/)) !== null\n ) {\n debugOption = match[1];\n if (/^\\d+$/.test(match[3])) {\n // e.g. --inspect=1234\n debugPort = match[3];\n } else {\n // e.g. --inspect=localhost\n debugHost = match[3];\n }\n } else if (\n (match = arg.match(/^(--inspect(-brk|-port)?)=([^:]+):(\\d+)$/)) !== null\n ) {\n // e.g. --inspect=localhost:1234\n debugOption = match[1];\n debugHost = match[3];\n debugPort = match[4];\n }\n\n if (debugOption && debugPort !== '0') {\n return `${debugOption}=${debugHost}:${parseInt(debugPort) + 1}`;\n }\n return arg;\n });\n}\n\n/**\n * @returns {boolean | undefined}\n * @package\n */\nfunction useColor() {\n // Test for common conventions.\n // NB: the observed behaviour is in combination with how author adds color! For example:\n // - we do not test NODE_DISABLE_COLORS, but util:styletext does\n // - we do test NO_COLOR, but Chalk does not\n //\n // References:\n // https://no-color.org\n // https://bixense.com/clicolors/\n // https://github.com/nodejs/node/blob/0a00217a5f67ef4a22384cfc80eb6dd9a917fdc1/lib/internal/tty.js#L109\n // https://github.com/chalk/supports-color/blob/c214314a14bcb174b12b3014b2b0a8de375029ae/index.js#L33\n // (https://force-color.org recent web page from 2023, does not match major javascript implementations)\n\n if (\n process.env.NO_COLOR ||\n process.env.FORCE_COLOR === '0' ||\n process.env.FORCE_COLOR === 'false'\n )\n return false;\n if (process.env.FORCE_COLOR || process.env.CLICOLOR_FORCE !== undefined)\n return true;\n return undefined;\n}\n\nexports.Command = Command;\nexports.useColor = useColor; // exporting for tests\n", "const { Argument } = require('./lib/argument.js');\nconst { Command } = require('./lib/command.js');\nconst { CommanderError, InvalidArgumentError } = require('./lib/error.js');\nconst { Help } = require('./lib/help.js');\nconst { Option } = require('./lib/option.js');\n\nexports.program = new Command();\n\nexports.createCommand = (name) => new Command(name);\nexports.createOption = (flags, description) => new Option(flags, description);\nexports.createArgument = (name, description) => new Argument(name, description);\n\n/**\n * Expose classes\n */\n\nexports.Command = Command;\nexports.Option = Option;\nexports.Argument = Argument;\nexports.Help = Help;\n\nexports.CommanderError = CommanderError;\nexports.InvalidArgumentError = InvalidArgumentError;\nexports.InvalidOptionArgumentError = InvalidArgumentError; // Deprecated\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.splitWhen = exports.flatten = void 0;\nfunction flatten(items) {\n return items.reduce((collection, item) => [].concat(collection, item), []);\n}\nexports.flatten = flatten;\nfunction splitWhen(items, predicate) {\n const result = [[]];\n let groupIndex = 0;\n for (const item of items) {\n if (predicate(item)) {\n groupIndex++;\n result[groupIndex] = [];\n }\n else {\n result[groupIndex].push(item);\n }\n }\n return result;\n}\nexports.splitWhen = splitWhen;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isEnoentCodeError = void 0;\nfunction isEnoentCodeError(error) {\n return error.code === 'ENOENT';\n}\nexports.isEnoentCodeError = isEnoentCodeError;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createDirentFromStats = void 0;\nclass DirentFromStats {\n constructor(name, stats) {\n this.name = name;\n this.isBlockDevice = stats.isBlockDevice.bind(stats);\n this.isCharacterDevice = stats.isCharacterDevice.bind(stats);\n this.isDirectory = stats.isDirectory.bind(stats);\n this.isFIFO = stats.isFIFO.bind(stats);\n this.isFile = stats.isFile.bind(stats);\n this.isSocket = stats.isSocket.bind(stats);\n this.isSymbolicLink = stats.isSymbolicLink.bind(stats);\n }\n}\nfunction createDirentFromStats(name, stats) {\n return new DirentFromStats(name, stats);\n}\nexports.createDirentFromStats = createDirentFromStats;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.convertPosixPathToPattern = exports.convertWindowsPathToPattern = exports.convertPathToPattern = exports.escapePosixPath = exports.escapeWindowsPath = exports.escape = exports.removeLeadingDotSegment = exports.makeAbsolute = exports.unixify = void 0;\nconst os = require(\"os\");\nconst path = require(\"path\");\nconst IS_WINDOWS_PLATFORM = os.platform() === 'win32';\nconst LEADING_DOT_SEGMENT_CHARACTERS_COUNT = 2; // ./ or .\\\\\n/**\n * All non-escaped special characters.\n * Posix: ()*?[]{|}, !+@ before (, ! at the beginning, \\\\ before non-special characters.\n * Windows: (){}[], !+@ before (, ! at the beginning.\n */\nconst POSIX_UNESCAPED_GLOB_SYMBOLS_RE = /(\\\\?)([()*?[\\]{|}]|^!|[!+@](?=\\()|\\\\(?![!()*+?@[\\]{|}]))/g;\nconst WINDOWS_UNESCAPED_GLOB_SYMBOLS_RE = /(\\\\?)([()[\\]{}]|^!|[!+@](?=\\())/g;\n/**\n * The device path (\\\\.\\ or \\\\?\\).\n * https://learn.microsoft.com/en-us/dotnet/standard/io/file-path-formats#dos-device-paths\n */\nconst DOS_DEVICE_PATH_RE = /^\\\\\\\\([.?])/;\n/**\n * All backslashes except those escaping special characters.\n * Windows: !()+@{}\n * https://learn.microsoft.com/en-us/windows/win32/fileio/naming-a-file#naming-conventions\n */\nconst WINDOWS_BACKSLASHES_RE = /\\\\(?![!()+@[\\]{}])/g;\n/**\n * Designed to work only with simple paths: `dir\\\\file`.\n */\nfunction unixify(filepath) {\n return filepath.replace(/\\\\/g, '/');\n}\nexports.unixify = unixify;\nfunction makeAbsolute(cwd, filepath) {\n return path.resolve(cwd, filepath);\n}\nexports.makeAbsolute = makeAbsolute;\nfunction removeLeadingDotSegment(entry) {\n // We do not use `startsWith` because this is 10x slower than current implementation for some cases.\n // eslint-disable-next-line @typescript-eslint/prefer-string-starts-ends-with\n if (entry.charAt(0) === '.') {\n const secondCharactery = entry.charAt(1);\n if (secondCharactery === '/' || secondCharactery === '\\\\') {\n return entry.slice(LEADING_DOT_SEGMENT_CHARACTERS_COUNT);\n }\n }\n return entry;\n}\nexports.removeLeadingDotSegment = removeLeadingDotSegment;\nexports.escape = IS_WINDOWS_PLATFORM ? escapeWindowsPath : escapePosixPath;\nfunction escapeWindowsPath(pattern) {\n return pattern.replace(WINDOWS_UNESCAPED_GLOB_SYMBOLS_RE, '\\\\$2');\n}\nexports.escapeWindowsPath = escapeWindowsPath;\nfunction escapePosixPath(pattern) {\n return pattern.replace(POSIX_UNESCAPED_GLOB_SYMBOLS_RE, '\\\\$2');\n}\nexports.escapePosixPath = escapePosixPath;\nexports.convertPathToPattern = IS_WINDOWS_PLATFORM ? convertWindowsPathToPattern : convertPosixPathToPattern;\nfunction convertWindowsPathToPattern(filepath) {\n return escapeWindowsPath(filepath)\n .replace(DOS_DEVICE_PATH_RE, '//$1')\n .replace(WINDOWS_BACKSLASHES_RE, '/');\n}\nexports.convertWindowsPathToPattern = convertWindowsPathToPattern;\nfunction convertPosixPathToPattern(filepath) {\n return escapePosixPath(filepath);\n}\nexports.convertPosixPathToPattern = convertPosixPathToPattern;\n", "/*!\n * is-extglob <https://github.com/jonschlinkert/is-extglob>\n *\n * Copyright (c) 2014-2016, Jon Schlinkert.\n * Licensed under the MIT License.\n */\n\nmodule.exports = function isExtglob(str) {\n if (typeof str !== 'string' || str === '') {\n return false;\n }\n\n var match;\n while ((match = /(\\\\).|([@?!+*]\\(.*\\))/g.exec(str))) {\n if (match[2]) return true;\n str = str.slice(match.index + match[0].length);\n }\n\n return false;\n};\n", "/*!\n * is-glob <https://github.com/jonschlinkert/is-glob>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\n\nvar isExtglob = require('is-extglob');\nvar chars = { '{': '}', '(': ')', '[': ']'};\nvar strictCheck = function(str) {\n if (str[0] === '!') {\n return true;\n }\n var index = 0;\n var pipeIndex = -2;\n var closeSquareIndex = -2;\n var closeCurlyIndex = -2;\n var closeParenIndex = -2;\n var backSlashIndex = -2;\n while (index < str.length) {\n if (str[index] === '*') {\n return true;\n }\n\n if (str[index + 1] === '?' && /[\\].+)]/.test(str[index])) {\n return true;\n }\n\n if (closeSquareIndex !== -1 && str[index] === '[' && str[index + 1] !== ']') {\n if (closeSquareIndex < index) {\n closeSquareIndex = str.indexOf(']', index);\n }\n if (closeSquareIndex > index) {\n if (backSlashIndex === -1 || backSlashIndex > closeSquareIndex) {\n return true;\n }\n backSlashIndex = str.indexOf('\\\\', index);\n if (backSlashIndex === -1 || backSlashIndex > closeSquareIndex) {\n return true;\n }\n }\n }\n\n if (closeCurlyIndex !== -1 && str[index] === '{' && str[index + 1] !== '}') {\n closeCurlyIndex = str.indexOf('}', index);\n if (closeCurlyIndex > index) {\n backSlashIndex = str.indexOf('\\\\', index);\n if (backSlashIndex === -1 || backSlashIndex > closeCurlyIndex) {\n return true;\n }\n }\n }\n\n if (closeParenIndex !== -1 && str[index] === '(' && str[index + 1] === '?' && /[:!=]/.test(str[index + 2]) && str[index + 3] !== ')') {\n closeParenIndex = str.indexOf(')', index);\n if (closeParenIndex > index) {\n backSlashIndex = str.indexOf('\\\\', index);\n if (backSlashIndex === -1 || backSlashIndex > closeParenIndex) {\n return true;\n }\n }\n }\n\n if (pipeIndex !== -1 && str[index] === '(' && str[index + 1] !== '|') {\n if (pipeIndex < index) {\n pipeIndex = str.indexOf('|', index);\n }\n if (pipeIndex !== -1 && str[pipeIndex + 1] !== ')') {\n closeParenIndex = str.indexOf(')', pipeIndex);\n if (closeParenIndex > pipeIndex) {\n backSlashIndex = str.indexOf('\\\\', pipeIndex);\n if (backSlashIndex === -1 || backSlashIndex > closeParenIndex) {\n return true;\n }\n }\n }\n }\n\n if (str[index] === '\\\\') {\n var open = str[index + 1];\n index += 2;\n var close = chars[open];\n\n if (close) {\n var n = str.indexOf(close, index);\n if (n !== -1) {\n index = n + 1;\n }\n }\n\n if (str[index] === '!') {\n return true;\n }\n } else {\n index++;\n }\n }\n return false;\n};\n\nvar relaxedCheck = function(str) {\n if (str[0] === '!') {\n return true;\n }\n var index = 0;\n while (index < str.length) {\n if (/[*?{}()[\\]]/.test(str[index])) {\n return true;\n }\n\n if (str[index] === '\\\\') {\n var open = str[index + 1];\n index += 2;\n var close = chars[open];\n\n if (close) {\n var n = str.indexOf(close, index);\n if (n !== -1) {\n index = n + 1;\n }\n }\n\n if (str[index] === '!') {\n return true;\n }\n } else {\n index++;\n }\n }\n return false;\n};\n\nmodule.exports = function isGlob(str, options) {\n if (typeof str !== 'string' || str === '') {\n return false;\n }\n\n if (isExtglob(str)) {\n return true;\n }\n\n var check = strictCheck;\n\n // optionally relax check\n if (options && options.strict === false) {\n check = relaxedCheck;\n }\n\n return check(str);\n};\n", "'use strict';\n\nvar isGlob = require('is-glob');\nvar pathPosixDirname = require('path').posix.dirname;\nvar isWin32 = require('os').platform() === 'win32';\n\nvar slash = '/';\nvar backslash = /\\\\/g;\nvar enclosure = /[\\{\\[].*[\\}\\]]$/;\nvar globby = /(^|[^\\\\])([\\{\\[]|\\([^\\)]+$)/;\nvar escaped = /\\\\([\\!\\*\\?\\|\\[\\]\\(\\)\\{\\}])/g;\n\n/**\n * @param {string} str\n * @param {Object} opts\n * @param {boolean} [opts.flipBackslashes=true]\n * @returns {string}\n */\nmodule.exports = function globParent(str, opts) {\n var options = Object.assign({ flipBackslashes: true }, opts);\n\n // flip windows path separators\n if (options.flipBackslashes && isWin32 && str.indexOf(slash) < 0) {\n str = str.replace(backslash, slash);\n }\n\n // special case for strings ending in enclosure containing path separator\n if (enclosure.test(str)) {\n str += slash;\n }\n\n // preserves full path in case of trailing path separator\n str += 'a';\n\n // remove path parts that are globby\n do {\n str = pathPosixDirname(str);\n } while (isGlob(str) || globby.test(str));\n\n // remove escape chars and return result\n return str.replace(escaped, '$1');\n};\n", "'use strict';\n\nexports.isInteger = num => {\n if (typeof num === 'number') {\n return Number.isInteger(num);\n }\n if (typeof num === 'string' && num.trim() !== '') {\n return Number.isInteger(Number(num));\n }\n return false;\n};\n\n/**\n * Find a node of the given type\n */\n\nexports.find = (node, type) => node.nodes.find(node => node.type === type);\n\n/**\n * Find a node of the given type\n */\n\nexports.exceedsLimit = (min, max, step = 1, limit) => {\n if (limit === false) return false;\n if (!exports.isInteger(min) || !exports.isInteger(max)) return false;\n return ((Number(max) - Number(min)) / Number(step)) >= limit;\n};\n\n/**\n * Escape the given node with '\\\\' before node.value\n */\n\nexports.escapeNode = (block, n = 0, type) => {\n const node = block.nodes[n];\n if (!node) return;\n\n if ((type && node.type === type) || node.type === 'open' || node.type === 'close') {\n if (node.escaped !== true) {\n node.value = '\\\\' + node.value;\n node.escaped = true;\n }\n }\n};\n\n/**\n * Returns true if the given brace node should be enclosed in literal braces\n */\n\nexports.encloseBrace = node => {\n if (node.type !== 'brace') return false;\n if ((node.commas >> 0 + node.ranges >> 0) === 0) {\n node.invalid = true;\n return true;\n }\n return false;\n};\n\n/**\n * Returns true if a brace node is invalid.\n */\n\nexports.isInvalidBrace = block => {\n if (block.type !== 'brace') return false;\n if (block.invalid === true || block.dollar) return true;\n if ((block.commas >> 0 + block.ranges >> 0) === 0) {\n block.invalid = true;\n return true;\n }\n if (block.open !== true || block.close !== true) {\n block.invalid = true;\n return true;\n }\n return false;\n};\n\n/**\n * Returns true if a node is an open or close node\n */\n\nexports.isOpenOrClose = node => {\n if (node.type === 'open' || node.type === 'close') {\n return true;\n }\n return node.open === true || node.close === true;\n};\n\n/**\n * Reduce an array of text nodes.\n */\n\nexports.reduce = nodes => nodes.reduce((acc, node) => {\n if (node.type === 'text') acc.push(node.value);\n if (node.type === 'range') node.type = 'text';\n return acc;\n}, []);\n\n/**\n * Flatten an array\n */\n\nexports.flatten = (...args) => {\n const result = [];\n\n const flat = arr => {\n for (let i = 0; i < arr.length; i++) {\n const ele = arr[i];\n\n if (Array.isArray(ele)) {\n flat(ele);\n continue;\n }\n\n if (ele !== undefined) {\n result.push(ele);\n }\n }\n return result;\n };\n\n flat(args);\n return result;\n};\n", "'use strict';\n\nconst utils = require('./utils');\n\nmodule.exports = (ast, options = {}) => {\n const stringify = (node, parent = {}) => {\n const invalidBlock = options.escapeInvalid && utils.isInvalidBrace(parent);\n const invalidNode = node.invalid === true && options.escapeInvalid === true;\n let output = '';\n\n if (node.value) {\n if ((invalidBlock || invalidNode) && utils.isOpenOrClose(node)) {\n return '\\\\' + node.value;\n }\n return node.value;\n }\n\n if (node.value) {\n return node.value;\n }\n\n if (node.nodes) {\n for (const child of node.nodes) {\n output += stringify(child);\n }\n }\n return output;\n };\n\n return stringify(ast);\n};\n\n", "/*!\n * is-number <https://github.com/jonschlinkert/is-number>\n *\n * Copyright (c) 2014-present, Jon Schlinkert.\n * Released under the MIT License.\n */\n\n'use strict';\n\nmodule.exports = function(num) {\n if (typeof num === 'number') {\n return num - num === 0;\n }\n if (typeof num === 'string' && num.trim() !== '') {\n return Number.isFinite ? Number.isFinite(+num) : isFinite(+num);\n }\n return false;\n};\n", "/*!\n * to-regex-range <https://github.com/micromatch/to-regex-range>\n *\n * Copyright (c) 2015-present, Jon Schlinkert.\n * Released under the MIT License.\n */\n\n'use strict';\n\nconst isNumber = require('is-number');\n\nconst toRegexRange = (min, max, options) => {\n if (isNumber(min) === false) {\n throw new TypeError('toRegexRange: expected the first argument to be a number');\n }\n\n if (max === void 0 || min === max) {\n return String(min);\n }\n\n if (isNumber(max) === false) {\n throw new TypeError('toRegexRange: expected the second argument to be a number.');\n }\n\n let opts = { relaxZeros: true, ...options };\n if (typeof opts.strictZeros === 'boolean') {\n opts.relaxZeros = opts.strictZeros === false;\n }\n\n let relax = String(opts.relaxZeros);\n let shorthand = String(opts.shorthand);\n let capture = String(opts.capture);\n let wrap = String(opts.wrap);\n let cacheKey = min + ':' + max + '=' + relax + shorthand + capture + wrap;\n\n if (toRegexRange.cache.hasOwnProperty(cacheKey)) {\n return toRegexRange.cache[cacheKey].result;\n }\n\n let a = Math.min(min, max);\n let b = Math.max(min, max);\n\n if (Math.abs(a - b) === 1) {\n let result = min + '|' + max;\n if (opts.capture) {\n return `(${result})`;\n }\n if (opts.wrap === false) {\n return result;\n }\n return `(?:${result})`;\n }\n\n let isPadded = hasPadding(min) || hasPadding(max);\n let state = { min, max, a, b };\n let positives = [];\n let negatives = [];\n\n if (isPadded) {\n state.isPadded = isPadded;\n state.maxLen = String(state.max).length;\n }\n\n if (a < 0) {\n let newMin = b < 0 ? Math.abs(b) : 1;\n negatives = splitToPatterns(newMin, Math.abs(a), state, opts);\n a = state.a = 0;\n }\n\n if (b >= 0) {\n positives = splitToPatterns(a, b, state, opts);\n }\n\n state.negatives = negatives;\n state.positives = positives;\n state.result = collatePatterns(negatives, positives, opts);\n\n if (opts.capture === true) {\n state.result = `(${state.result})`;\n } else if (opts.wrap !== false && (positives.length + negatives.length) > 1) {\n state.result = `(?:${state.result})`;\n }\n\n toRegexRange.cache[cacheKey] = state;\n return state.result;\n};\n\nfunction collatePatterns(neg, pos, options) {\n let onlyNegative = filterPatterns(neg, pos, '-', false, options) || [];\n let onlyPositive = filterPatterns(pos, neg, '', false, options) || [];\n let intersected = filterPatterns(neg, pos, '-?', true, options) || [];\n let subpatterns = onlyNegative.concat(intersected).concat(onlyPositive);\n return subpatterns.join('|');\n}\n\nfunction splitToRanges(min, max) {\n let nines = 1;\n let zeros = 1;\n\n let stop = countNines(min, nines);\n let stops = new Set([max]);\n\n while (min <= stop && stop <= max) {\n stops.add(stop);\n nines += 1;\n stop = countNines(min, nines);\n }\n\n stop = countZeros(max + 1, zeros) - 1;\n\n while (min < stop && stop <= max) {\n stops.add(stop);\n zeros += 1;\n stop = countZeros(max + 1, zeros) - 1;\n }\n\n stops = [...stops];\n stops.sort(compare);\n return stops;\n}\n\n/**\n * Convert a range to a regex pattern\n * @param {Number} `start`\n * @param {Number} `stop`\n * @return {String}\n */\n\nfunction rangeToPattern(start, stop, options) {\n if (start === stop) {\n return { pattern: start, count: [], digits: 0 };\n }\n\n let zipped = zip(start, stop);\n let digits = zipped.length;\n let pattern = '';\n let count = 0;\n\n for (let i = 0; i < digits; i++) {\n let [startDigit, stopDigit] = zipped[i];\n\n if (startDigit === stopDigit) {\n pattern += startDigit;\n\n } else if (startDigit !== '0' || stopDigit !== '9') {\n pattern += toCharacterClass(startDigit, stopDigit, options);\n\n } else {\n count++;\n }\n }\n\n if (count) {\n pattern += options.shorthand === true ? '\\\\d' : '[0-9]';\n }\n\n return { pattern, count: [count], digits };\n}\n\nfunction splitToPatterns(min, max, tok, options) {\n let ranges = splitToRanges(min, max);\n let tokens = [];\n let start = min;\n let prev;\n\n for (let i = 0; i < ranges.length; i++) {\n let max = ranges[i];\n let obj = rangeToPattern(String(start), String(max), options);\n let zeros = '';\n\n if (!tok.isPadded && prev && prev.pattern === obj.pattern) {\n if (prev.count.length > 1) {\n prev.count.pop();\n }\n\n prev.count.push(obj.count[0]);\n prev.string = prev.pattern + toQuantifier(prev.count);\n start = max + 1;\n continue;\n }\n\n if (tok.isPadded) {\n zeros = padZeros(max, tok, options);\n }\n\n obj.string = zeros + obj.pattern + toQuantifier(obj.count);\n tokens.push(obj);\n start = max + 1;\n prev = obj;\n }\n\n return tokens;\n}\n\nfunction filterPatterns(arr, comparison, prefix, intersection, options) {\n let result = [];\n\n for (let ele of arr) {\n let { string } = ele;\n\n // only push if _both_ are negative...\n if (!intersection && !contains(comparison, 'string', string)) {\n result.push(prefix + string);\n }\n\n // or _both_ are positive\n if (intersection && contains(comparison, 'string', string)) {\n result.push(prefix + string);\n }\n }\n return result;\n}\n\n/**\n * Zip strings\n */\n\nfunction zip(a, b) {\n let arr = [];\n for (let i = 0; i < a.length; i++) arr.push([a[i], b[i]]);\n return arr;\n}\n\nfunction compare(a, b) {\n return a > b ? 1 : b > a ? -1 : 0;\n}\n\nfunction contains(arr, key, val) {\n return arr.some(ele => ele[key] === val);\n}\n\nfunction countNines(min, len) {\n return Number(String(min).slice(0, -len) + '9'.repeat(len));\n}\n\nfunction countZeros(integer, zeros) {\n return integer - (integer % Math.pow(10, zeros));\n}\n\nfunction toQuantifier(digits) {\n let [start = 0, stop = ''] = digits;\n if (stop || start > 1) {\n return `{${start + (stop ? ',' + stop : '')}}`;\n }\n return '';\n}\n\nfunction toCharacterClass(a, b, options) {\n return `[${a}${(b - a === 1) ? '' : '-'}${b}]`;\n}\n\nfunction hasPadding(str) {\n return /^-?(0+)\\d/.test(str);\n}\n\nfunction padZeros(value, tok, options) {\n if (!tok.isPadded) {\n return value;\n }\n\n let diff = Math.abs(tok.maxLen - String(value).length);\n let relax = options.relaxZeros !== false;\n\n switch (diff) {\n case 0:\n return '';\n case 1:\n return relax ? '0?' : '0';\n case 2:\n return relax ? '0{0,2}' : '00';\n default: {\n return relax ? `0{0,${diff}}` : `0{${diff}}`;\n }\n }\n}\n\n/**\n * Cache\n */\n\ntoRegexRange.cache = {};\ntoRegexRange.clearCache = () => (toRegexRange.cache = {});\n\n/**\n * Expose `toRegexRange`\n */\n\nmodule.exports = toRegexRange;\n", "/*!\n * fill-range <https://github.com/jonschlinkert/fill-range>\n *\n * Copyright (c) 2014-present, Jon Schlinkert.\n * Licensed under the MIT License.\n */\n\n'use strict';\n\nconst util = require('util');\nconst toRegexRange = require('to-regex-range');\n\nconst isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val);\n\nconst transform = toNumber => {\n return value => toNumber === true ? Number(value) : String(value);\n};\n\nconst isValidValue = value => {\n return typeof value === 'number' || (typeof value === 'string' && value !== '');\n};\n\nconst isNumber = num => Number.isInteger(+num);\n\nconst zeros = input => {\n let value = `${input}`;\n let index = -1;\n if (value[0] === '-') value = value.slice(1);\n if (value === '0') return false;\n while (value[++index] === '0');\n return index > 0;\n};\n\nconst stringify = (start, end, options) => {\n if (typeof start === 'string' || typeof end === 'string') {\n return true;\n }\n return options.stringify === true;\n};\n\nconst pad = (input, maxLength, toNumber) => {\n if (maxLength > 0) {\n let dash = input[0] === '-' ? '-' : '';\n if (dash) input = input.slice(1);\n input = (dash + input.padStart(dash ? maxLength - 1 : maxLength, '0'));\n }\n if (toNumber === false) {\n return String(input);\n }\n return input;\n};\n\nconst toMaxLen = (input, maxLength) => {\n let negative = input[0] === '-' ? '-' : '';\n if (negative) {\n input = input.slice(1);\n maxLength--;\n }\n while (input.length < maxLength) input = '0' + input;\n return negative ? ('-' + input) : input;\n};\n\nconst toSequence = (parts, options, maxLen) => {\n parts.negatives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0);\n parts.positives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0);\n\n let prefix = options.capture ? '' : '?:';\n let positives = '';\n let negatives = '';\n let result;\n\n if (parts.positives.length) {\n positives = parts.positives.map(v => toMaxLen(String(v), maxLen)).join('|');\n }\n\n if (parts.negatives.length) {\n negatives = `-(${prefix}${parts.negatives.map(v => toMaxLen(String(v), maxLen)).join('|')})`;\n }\n\n if (positives && negatives) {\n result = `${positives}|${negatives}`;\n } else {\n result = positives || negatives;\n }\n\n if (options.wrap) {\n return `(${prefix}${result})`;\n }\n\n return result;\n};\n\nconst toRange = (a, b, isNumbers, options) => {\n if (isNumbers) {\n return toRegexRange(a, b, { wrap: false, ...options });\n }\n\n let start = String.fromCharCode(a);\n if (a === b) return start;\n\n let stop = String.fromCharCode(b);\n return `[${start}-${stop}]`;\n};\n\nconst toRegex = (start, end, options) => {\n if (Array.isArray(start)) {\n let wrap = options.wrap === true;\n let prefix = options.capture ? '' : '?:';\n return wrap ? `(${prefix}${start.join('|')})` : start.join('|');\n }\n return toRegexRange(start, end, options);\n};\n\nconst rangeError = (...args) => {\n return new RangeError('Invalid range arguments: ' + util.inspect(...args));\n};\n\nconst invalidRange = (start, end, options) => {\n if (options.strictRanges === true) throw rangeError([start, end]);\n return [];\n};\n\nconst invalidStep = (step, options) => {\n if (options.strictRanges === true) {\n throw new TypeError(`Expected step \"${step}\" to be a number`);\n }\n return [];\n};\n\nconst fillNumbers = (start, end, step = 1, options = {}) => {\n let a = Number(start);\n let b = Number(end);\n\n if (!Number.isInteger(a) || !Number.isInteger(b)) {\n if (options.strictRanges === true) throw rangeError([start, end]);\n return [];\n }\n\n // fix negative zero\n if (a === 0) a = 0;\n if (b === 0) b = 0;\n\n let descending = a > b;\n let startString = String(start);\n let endString = String(end);\n let stepString = String(step);\n step = Math.max(Math.abs(step), 1);\n\n let padded = zeros(startString) || zeros(endString) || zeros(stepString);\n let maxLen = padded ? Math.max(startString.length, endString.length, stepString.length) : 0;\n let toNumber = padded === false && stringify(start, end, options) === false;\n let format = options.transform || transform(toNumber);\n\n if (options.toRegex && step === 1) {\n return toRange(toMaxLen(start, maxLen), toMaxLen(end, maxLen), true, options);\n }\n\n let parts = { negatives: [], positives: [] };\n let push = num => parts[num < 0 ? 'negatives' : 'positives'].push(Math.abs(num));\n let range = [];\n let index = 0;\n\n while (descending ? a >= b : a <= b) {\n if (options.toRegex === true && step > 1) {\n push(a);\n } else {\n range.push(pad(format(a, index), maxLen, toNumber));\n }\n a = descending ? a - step : a + step;\n index++;\n }\n\n if (options.toRegex === true) {\n return step > 1\n ? toSequence(parts, options, maxLen)\n : toRegex(range, null, { wrap: false, ...options });\n }\n\n return range;\n};\n\nconst fillLetters = (start, end, step = 1, options = {}) => {\n if ((!isNumber(start) && start.length > 1) || (!isNumber(end) && end.length > 1)) {\n return invalidRange(start, end, options);\n }\n\n let format = options.transform || (val => String.fromCharCode(val));\n let a = `${start}`.charCodeAt(0);\n let b = `${end}`.charCodeAt(0);\n\n let descending = a > b;\n let min = Math.min(a, b);\n let max = Math.max(a, b);\n\n if (options.toRegex && step === 1) {\n return toRange(min, max, false, options);\n }\n\n let range = [];\n let index = 0;\n\n while (descending ? a >= b : a <= b) {\n range.push(format(a, index));\n a = descending ? a - step : a + step;\n index++;\n }\n\n if (options.toRegex === true) {\n return toRegex(range, null, { wrap: false, options });\n }\n\n return range;\n};\n\nconst fill = (start, end, step, options = {}) => {\n if (end == null && isValidValue(start)) {\n return [start];\n }\n\n if (!isValidValue(start) || !isValidValue(end)) {\n return invalidRange(start, end, options);\n }\n\n if (typeof step === 'function') {\n return fill(start, end, 1, { transform: step });\n }\n\n if (isObject(step)) {\n return fill(start, end, 0, step);\n }\n\n let opts = { ...options };\n if (opts.capture === true) opts.wrap = true;\n step = step || opts.step || 1;\n\n if (!isNumber(step)) {\n if (step != null && !isObject(step)) return invalidStep(step, opts);\n return fill(start, end, 1, step);\n }\n\n if (isNumber(start) && isNumber(end)) {\n return fillNumbers(start, end, step, opts);\n }\n\n return fillLetters(start, end, Math.max(Math.abs(step), 1), opts);\n};\n\nmodule.exports = fill;\n", "'use strict';\n\nconst fill = require('fill-range');\nconst utils = require('./utils');\n\nconst compile = (ast, options = {}) => {\n const walk = (node, parent = {}) => {\n const invalidBlock = utils.isInvalidBrace(parent);\n const invalidNode = node.invalid === true && options.escapeInvalid === true;\n const invalid = invalidBlock === true || invalidNode === true;\n const prefix = options.escapeInvalid === true ? '\\\\' : '';\n let output = '';\n\n if (node.isOpen === true) {\n return prefix + node.value;\n }\n\n if (node.isClose === true) {\n console.log('node.isClose', prefix, node.value);\n return prefix + node.value;\n }\n\n if (node.type === 'open') {\n return invalid ? prefix + node.value : '(';\n }\n\n if (node.type === 'close') {\n return invalid ? prefix + node.value : ')';\n }\n\n if (node.type === 'comma') {\n return node.prev.type === 'comma' ? '' : invalid ? node.value : '|';\n }\n\n if (node.value) {\n return node.value;\n }\n\n if (node.nodes && node.ranges > 0) {\n const args = utils.reduce(node.nodes);\n const range = fill(...args, { ...options, wrap: false, toRegex: true, strictZeros: true });\n\n if (range.length !== 0) {\n return args.length > 1 && range.length > 1 ? `(${range})` : range;\n }\n }\n\n if (node.nodes) {\n for (const child of node.nodes) {\n output += walk(child, node);\n }\n }\n\n return output;\n };\n\n return walk(ast);\n};\n\nmodule.exports = compile;\n", "'use strict';\n\nconst fill = require('fill-range');\nconst stringify = require('./stringify');\nconst utils = require('./utils');\n\nconst append = (queue = '', stash = '', enclose = false) => {\n const result = [];\n\n queue = [].concat(queue);\n stash = [].concat(stash);\n\n if (!stash.length) return queue;\n if (!queue.length) {\n return enclose ? utils.flatten(stash).map(ele => `{${ele}}`) : stash;\n }\n\n for (const item of queue) {\n if (Array.isArray(item)) {\n for (const value of item) {\n result.push(append(value, stash, enclose));\n }\n } else {\n for (let ele of stash) {\n if (enclose === true && typeof ele === 'string') ele = `{${ele}}`;\n result.push(Array.isArray(ele) ? append(item, ele, enclose) : item + ele);\n }\n }\n }\n return utils.flatten(result);\n};\n\nconst expand = (ast, options = {}) => {\n const rangeLimit = options.rangeLimit === undefined ? 1000 : options.rangeLimit;\n\n const walk = (node, parent = {}) => {\n node.queue = [];\n\n let p = parent;\n let q = parent.queue;\n\n while (p.type !== 'brace' && p.type !== 'root' && p.parent) {\n p = p.parent;\n q = p.queue;\n }\n\n if (node.invalid || node.dollar) {\n q.push(append(q.pop(), stringify(node, options)));\n return;\n }\n\n if (node.type === 'brace' && node.invalid !== true && node.nodes.length === 2) {\n q.push(append(q.pop(), ['{}']));\n return;\n }\n\n if (node.nodes && node.ranges > 0) {\n const args = utils.reduce(node.nodes);\n\n if (utils.exceedsLimit(...args, options.step, rangeLimit)) {\n throw new RangeError('expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.');\n }\n\n let range = fill(...args, options);\n if (range.length === 0) {\n range = stringify(node, options);\n }\n\n q.push(append(q.pop(), range));\n node.nodes = [];\n return;\n }\n\n const enclose = utils.encloseBrace(node);\n let queue = node.queue;\n let block = node;\n\n while (block.type !== 'brace' && block.type !== 'root' && block.parent) {\n block = block.parent;\n queue = block.queue;\n }\n\n for (let i = 0; i < node.nodes.length; i++) {\n const child = node.nodes[i];\n\n if (child.type === 'comma' && node.type === 'brace') {\n if (i === 1) queue.push('');\n queue.push('');\n continue;\n }\n\n if (child.type === 'close') {\n q.push(append(q.pop(), queue, enclose));\n continue;\n }\n\n if (child.value && child.type !== 'open') {\n queue.push(append(queue.pop(), child.value));\n continue;\n }\n\n if (child.nodes) {\n walk(child, node);\n }\n }\n\n return queue;\n };\n\n return utils.flatten(walk(ast));\n};\n\nmodule.exports = expand;\n", "'use strict';\n\nmodule.exports = {\n MAX_LENGTH: 10000,\n\n // Digits\n CHAR_0: '0', /* 0 */\n CHAR_9: '9', /* 9 */\n\n // Alphabet chars.\n CHAR_UPPERCASE_A: 'A', /* A */\n CHAR_LOWERCASE_A: 'a', /* a */\n CHAR_UPPERCASE_Z: 'Z', /* Z */\n CHAR_LOWERCASE_Z: 'z', /* z */\n\n CHAR_LEFT_PARENTHESES: '(', /* ( */\n CHAR_RIGHT_PARENTHESES: ')', /* ) */\n\n CHAR_ASTERISK: '*', /* * */\n\n // Non-alphabetic chars.\n CHAR_AMPERSAND: '&', /* & */\n CHAR_AT: '@', /* @ */\n CHAR_BACKSLASH: '\\\\', /* \\ */\n CHAR_BACKTICK: '`', /* ` */\n CHAR_CARRIAGE_RETURN: '\\r', /* \\r */\n CHAR_CIRCUMFLEX_ACCENT: '^', /* ^ */\n CHAR_COLON: ':', /* : */\n CHAR_COMMA: ',', /* , */\n CHAR_DOLLAR: '$', /* . */\n CHAR_DOT: '.', /* . */\n CHAR_DOUBLE_QUOTE: '\"', /* \" */\n CHAR_EQUAL: '=', /* = */\n CHAR_EXCLAMATION_MARK: '!', /* ! */\n CHAR_FORM_FEED: '\\f', /* \\f */\n CHAR_FORWARD_SLASH: '/', /* / */\n CHAR_HASH: '#', /* # */\n CHAR_HYPHEN_MINUS: '-', /* - */\n CHAR_LEFT_ANGLE_BRACKET: '<', /* < */\n CHAR_LEFT_CURLY_BRACE: '{', /* { */\n CHAR_LEFT_SQUARE_BRACKET: '[', /* [ */\n CHAR_LINE_FEED: '\\n', /* \\n */\n CHAR_NO_BREAK_SPACE: '\\u00A0', /* \\u00A0 */\n CHAR_PERCENT: '%', /* % */\n CHAR_PLUS: '+', /* + */\n CHAR_QUESTION_MARK: '?', /* ? */\n CHAR_RIGHT_ANGLE_BRACKET: '>', /* > */\n CHAR_RIGHT_CURLY_BRACE: '}', /* } */\n CHAR_RIGHT_SQUARE_BRACKET: ']', /* ] */\n CHAR_SEMICOLON: ';', /* ; */\n CHAR_SINGLE_QUOTE: '\\'', /* ' */\n CHAR_SPACE: ' ', /* */\n CHAR_TAB: '\\t', /* \\t */\n CHAR_UNDERSCORE: '_', /* _ */\n CHAR_VERTICAL_LINE: '|', /* | */\n CHAR_ZERO_WIDTH_NOBREAK_SPACE: '\\uFEFF' /* \\uFEFF */\n};\n", "'use strict';\n\nconst stringify = require('./stringify');\n\n/**\n * Constants\n */\n\nconst {\n MAX_LENGTH,\n CHAR_BACKSLASH, /* \\ */\n CHAR_BACKTICK, /* ` */\n CHAR_COMMA, /* , */\n CHAR_DOT, /* . */\n CHAR_LEFT_PARENTHESES, /* ( */\n CHAR_RIGHT_PARENTHESES, /* ) */\n CHAR_LEFT_CURLY_BRACE, /* { */\n CHAR_RIGHT_CURLY_BRACE, /* } */\n CHAR_LEFT_SQUARE_BRACKET, /* [ */\n CHAR_RIGHT_SQUARE_BRACKET, /* ] */\n CHAR_DOUBLE_QUOTE, /* \" */\n CHAR_SINGLE_QUOTE, /* ' */\n CHAR_NO_BREAK_SPACE,\n CHAR_ZERO_WIDTH_NOBREAK_SPACE\n} = require('./constants');\n\n/**\n * parse\n */\n\nconst parse = (input, options = {}) => {\n if (typeof input !== 'string') {\n throw new TypeError('Expected a string');\n }\n\n const opts = options || {};\n const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;\n if (input.length > max) {\n throw new SyntaxError(`Input length (${input.length}), exceeds max characters (${max})`);\n }\n\n const ast = { type: 'root', input, nodes: [] };\n const stack = [ast];\n let block = ast;\n let prev = ast;\n let brackets = 0;\n const length = input.length;\n let index = 0;\n let depth = 0;\n let value;\n\n /**\n * Helpers\n */\n\n const advance = () => input[index++];\n const push = node => {\n if (node.type === 'text' && prev.type === 'dot') {\n prev.type = 'text';\n }\n\n if (prev && prev.type === 'text' && node.type === 'text') {\n prev.value += node.value;\n return;\n }\n\n block.nodes.push(node);\n node.parent = block;\n node.prev = prev;\n prev = node;\n return node;\n };\n\n push({ type: 'bos' });\n\n while (index < length) {\n block = stack[stack.length - 1];\n value = advance();\n\n /**\n * Invalid chars\n */\n\n if (value === CHAR_ZERO_WIDTH_NOBREAK_SPACE || value === CHAR_NO_BREAK_SPACE) {\n continue;\n }\n\n /**\n * Escaped chars\n */\n\n if (value === CHAR_BACKSLASH) {\n push({ type: 'text', value: (options.keepEscaping ? value : '') + advance() });\n continue;\n }\n\n /**\n * Right square bracket (literal): ']'\n */\n\n if (value === CHAR_RIGHT_SQUARE_BRACKET) {\n push({ type: 'text', value: '\\\\' + value });\n continue;\n }\n\n /**\n * Left square bracket: '['\n */\n\n if (value === CHAR_LEFT_SQUARE_BRACKET) {\n brackets++;\n\n let next;\n\n while (index < length && (next = advance())) {\n value += next;\n\n if (next === CHAR_LEFT_SQUARE_BRACKET) {\n brackets++;\n continue;\n }\n\n if (next === CHAR_BACKSLASH) {\n value += advance();\n continue;\n }\n\n if (next === CHAR_RIGHT_SQUARE_BRACKET) {\n brackets--;\n\n if (brackets === 0) {\n break;\n }\n }\n }\n\n push({ type: 'text', value });\n continue;\n }\n\n /**\n * Parentheses\n */\n\n if (value === CHAR_LEFT_PARENTHESES) {\n block = push({ type: 'paren', nodes: [] });\n stack.push(block);\n push({ type: 'text', value });\n continue;\n }\n\n if (value === CHAR_RIGHT_PARENTHESES) {\n if (block.type !== 'paren') {\n push({ type: 'text', value });\n continue;\n }\n block = stack.pop();\n push({ type: 'text', value });\n block = stack[stack.length - 1];\n continue;\n }\n\n /**\n * Quotes: '|\"|`\n */\n\n if (value === CHAR_DOUBLE_QUOTE || value === CHAR_SINGLE_QUOTE || value === CHAR_BACKTICK) {\n const open = value;\n let next;\n\n if (options.keepQuotes !== true) {\n value = '';\n }\n\n while (index < length && (next = advance())) {\n if (next === CHAR_BACKSLASH) {\n value += next + advance();\n continue;\n }\n\n if (next === open) {\n if (options.keepQuotes === true) value += next;\n break;\n }\n\n value += next;\n }\n\n push({ type: 'text', value });\n continue;\n }\n\n /**\n * Left curly brace: '{'\n */\n\n if (value === CHAR_LEFT_CURLY_BRACE) {\n depth++;\n\n const dollar = prev.value && prev.value.slice(-1) === '$' || block.dollar === true;\n const brace = {\n type: 'brace',\n open: true,\n close: false,\n dollar,\n depth,\n commas: 0,\n ranges: 0,\n nodes: []\n };\n\n block = push(brace);\n stack.push(block);\n push({ type: 'open', value });\n continue;\n }\n\n /**\n * Right curly brace: '}'\n */\n\n if (value === CHAR_RIGHT_CURLY_BRACE) {\n if (block.type !== 'brace') {\n push({ type: 'text', value });\n continue;\n }\n\n const type = 'close';\n block = stack.pop();\n block.close = true;\n\n push({ type, value });\n depth--;\n\n block = stack[stack.length - 1];\n continue;\n }\n\n /**\n * Comma: ','\n */\n\n if (value === CHAR_COMMA && depth > 0) {\n if (block.ranges > 0) {\n block.ranges = 0;\n const open = block.nodes.shift();\n block.nodes = [open, { type: 'text', value: stringify(block) }];\n }\n\n push({ type: 'comma', value });\n block.commas++;\n continue;\n }\n\n /**\n * Dot: '.'\n */\n\n if (value === CHAR_DOT && depth > 0 && block.commas === 0) {\n const siblings = block.nodes;\n\n if (depth === 0 || siblings.length === 0) {\n push({ type: 'text', value });\n continue;\n }\n\n if (prev.type === 'dot') {\n block.range = [];\n prev.value += value;\n prev.type = 'range';\n\n if (block.nodes.length !== 3 && block.nodes.length !== 5) {\n block.invalid = true;\n block.ranges = 0;\n prev.type = 'text';\n continue;\n }\n\n block.ranges++;\n block.args = [];\n continue;\n }\n\n if (prev.type === 'range') {\n siblings.pop();\n\n const before = siblings[siblings.length - 1];\n before.value += prev.value + value;\n prev = before;\n block.ranges--;\n continue;\n }\n\n push({ type: 'dot', value });\n continue;\n }\n\n /**\n * Text\n */\n\n push({ type: 'text', value });\n }\n\n // Mark imbalanced braces and brackets as invalid\n do {\n block = stack.pop();\n\n if (block.type !== 'root') {\n block.nodes.forEach(node => {\n if (!node.nodes) {\n if (node.type === 'open') node.isOpen = true;\n if (node.type === 'close') node.isClose = true;\n if (!node.nodes) node.type = 'text';\n node.invalid = true;\n }\n });\n\n // get the location of the block on parent.nodes (block's siblings)\n const parent = stack[stack.length - 1];\n const index = parent.nodes.indexOf(block);\n // replace the (invalid) block with it's nodes\n parent.nodes.splice(index, 1, ...block.nodes);\n }\n } while (stack.length > 0);\n\n push({ type: 'eos' });\n return ast;\n};\n\nmodule.exports = parse;\n", "'use strict';\n\nconst stringify = require('./lib/stringify');\nconst compile = require('./lib/compile');\nconst expand = require('./lib/expand');\nconst parse = require('./lib/parse');\n\n/**\n * Expand the given pattern or create a regex-compatible string.\n *\n * ```js\n * const braces = require('braces');\n * console.log(braces('{a,b,c}', { compile: true })); //=> ['(a|b|c)']\n * console.log(braces('{a,b,c}')); //=> ['a', 'b', 'c']\n * ```\n * @param {String} `str`\n * @param {Object} `options`\n * @return {String}\n * @api public\n */\n\nconst braces = (input, options = {}) => {\n let output = [];\n\n if (Array.isArray(input)) {\n for (const pattern of input) {\n const result = braces.create(pattern, options);\n if (Array.isArray(result)) {\n output.push(...result);\n } else {\n output.push(result);\n }\n }\n } else {\n output = [].concat(braces.create(input, options));\n }\n\n if (options && options.expand === true && options.nodupes === true) {\n output = [...new Set(output)];\n }\n return output;\n};\n\n/**\n * Parse the given `str` with the given `options`.\n *\n * ```js\n * // braces.parse(pattern, [, options]);\n * const ast = braces.parse('a/{b,c}/d');\n * console.log(ast);\n * ```\n * @param {String} pattern Brace pattern to parse\n * @param {Object} options\n * @return {Object} Returns an AST\n * @api public\n */\n\nbraces.parse = (input, options = {}) => parse(input, options);\n\n/**\n * Creates a braces string from an AST, or an AST node.\n *\n * ```js\n * const braces = require('braces');\n * let ast = braces.parse('foo/{a,b}/bar');\n * console.log(stringify(ast.nodes[2])); //=> '{a,b}'\n * ```\n * @param {String} `input` Brace pattern or AST.\n * @param {Object} `options`\n * @return {Array} Returns an array of expanded values.\n * @api public\n */\n\nbraces.stringify = (input, options = {}) => {\n if (typeof input === 'string') {\n return stringify(braces.parse(input, options), options);\n }\n return stringify(input, options);\n};\n\n/**\n * Compiles a brace pattern into a regex-compatible, optimized string.\n * This method is called by the main [braces](#braces) function by default.\n *\n * ```js\n * const braces = require('braces');\n * console.log(braces.compile('a/{b,c}/d'));\n * //=> ['a/(b|c)/d']\n * ```\n * @param {String} `input` Brace pattern or AST.\n * @param {Object} `options`\n * @return {Array} Returns an array of expanded values.\n * @api public\n */\n\nbraces.compile = (input, options = {}) => {\n if (typeof input === 'string') {\n input = braces.parse(input, options);\n }\n return compile(input, options);\n};\n\n/**\n * Expands a brace pattern into an array. This method is called by the\n * main [braces](#braces) function when `options.expand` is true. Before\n * using this method it's recommended that you read the [performance notes](#performance))\n * and advantages of using [.compile](#compile) instead.\n *\n * ```js\n * const braces = require('braces');\n * console.log(braces.expand('a/{b,c}/d'));\n * //=> ['a/b/d', 'a/c/d'];\n * ```\n * @param {String} `pattern` Brace pattern\n * @param {Object} `options`\n * @return {Array} Returns an array of expanded values.\n * @api public\n */\n\nbraces.expand = (input, options = {}) => {\n if (typeof input === 'string') {\n input = braces.parse(input, options);\n }\n\n let result = expand(input, options);\n\n // filter out empty strings if specified\n if (options.noempty === true) {\n result = result.filter(Boolean);\n }\n\n // filter out duplicates if specified\n if (options.nodupes === true) {\n result = [...new Set(result)];\n }\n\n return result;\n};\n\n/**\n * Processes a brace pattern and returns either an expanded array\n * (if `options.expand` is true), a highly optimized regex-compatible string.\n * This method is called by the main [braces](#braces) function.\n *\n * ```js\n * const braces = require('braces');\n * console.log(braces.create('user-{200..300}/project-{a,b,c}-{1..10}'))\n * //=> 'user-(20[0-9]|2[1-9][0-9]|300)/project-(a|b|c)-([1-9]|10)'\n * ```\n * @param {String} `pattern` Brace pattern\n * @param {Object} `options`\n * @return {Array} Returns an array of expanded values.\n * @api public\n */\n\nbraces.create = (input, options = {}) => {\n if (input === '' || input.length < 3) {\n return [input];\n }\n\n return options.expand !== true\n ? braces.compile(input, options)\n : braces.expand(input, options);\n};\n\n/**\n * Expose \"braces\"\n */\n\nmodule.exports = braces;\n", "'use strict';\n\nconst path = require('path');\nconst WIN_SLASH = '\\\\\\\\/';\nconst WIN_NO_SLASH = `[^${WIN_SLASH}]`;\n\n/**\n * Posix glob regex\n */\n\nconst DOT_LITERAL = '\\\\.';\nconst PLUS_LITERAL = '\\\\+';\nconst QMARK_LITERAL = '\\\\?';\nconst SLASH_LITERAL = '\\\\/';\nconst ONE_CHAR = '(?=.)';\nconst QMARK = '[^/]';\nconst END_ANCHOR = `(?:${SLASH_LITERAL}|$)`;\nconst START_ANCHOR = `(?:^|${SLASH_LITERAL})`;\nconst DOTS_SLASH = `${DOT_LITERAL}{1,2}${END_ANCHOR}`;\nconst NO_DOT = `(?!${DOT_LITERAL})`;\nconst NO_DOTS = `(?!${START_ANCHOR}${DOTS_SLASH})`;\nconst NO_DOT_SLASH = `(?!${DOT_LITERAL}{0,1}${END_ANCHOR})`;\nconst NO_DOTS_SLASH = `(?!${DOTS_SLASH})`;\nconst QMARK_NO_DOT = `[^.${SLASH_LITERAL}]`;\nconst STAR = `${QMARK}*?`;\n\nconst POSIX_CHARS = {\n DOT_LITERAL,\n PLUS_LITERAL,\n QMARK_LITERAL,\n SLASH_LITERAL,\n ONE_CHAR,\n QMARK,\n END_ANCHOR,\n DOTS_SLASH,\n NO_DOT,\n NO_DOTS,\n NO_DOT_SLASH,\n NO_DOTS_SLASH,\n QMARK_NO_DOT,\n STAR,\n START_ANCHOR\n};\n\n/**\n * Windows glob regex\n */\n\nconst WINDOWS_CHARS = {\n ...POSIX_CHARS,\n\n SLASH_LITERAL: `[${WIN_SLASH}]`,\n QMARK: WIN_NO_SLASH,\n STAR: `${WIN_NO_SLASH}*?`,\n DOTS_SLASH: `${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$)`,\n NO_DOT: `(?!${DOT_LITERAL})`,\n NO_DOTS: `(?!(?:^|[${WIN_SLASH}])${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,\n NO_DOT_SLASH: `(?!${DOT_LITERAL}{0,1}(?:[${WIN_SLASH}]|$))`,\n NO_DOTS_SLASH: `(?!${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,\n QMARK_NO_DOT: `[^.${WIN_SLASH}]`,\n START_ANCHOR: `(?:^|[${WIN_SLASH}])`,\n END_ANCHOR: `(?:[${WIN_SLASH}]|$)`\n};\n\n/**\n * POSIX Bracket Regex\n */\n\nconst POSIX_REGEX_SOURCE = {\n alnum: 'a-zA-Z0-9',\n alpha: 'a-zA-Z',\n ascii: '\\\\x00-\\\\x7F',\n blank: ' \\\\t',\n cntrl: '\\\\x00-\\\\x1F\\\\x7F',\n digit: '0-9',\n graph: '\\\\x21-\\\\x7E',\n lower: 'a-z',\n print: '\\\\x20-\\\\x7E ',\n punct: '\\\\-!\"#$%&\\'()\\\\*+,./:;<=>?@[\\\\]^_`{|}~',\n space: ' \\\\t\\\\r\\\\n\\\\v\\\\f',\n upper: 'A-Z',\n word: 'A-Za-z0-9_',\n xdigit: 'A-Fa-f0-9'\n};\n\nmodule.exports = {\n MAX_LENGTH: 1024 * 64,\n POSIX_REGEX_SOURCE,\n\n // regular expressions\n REGEX_BACKSLASH: /\\\\(?![*+?^${}(|)[\\]])/g,\n REGEX_NON_SPECIAL_CHARS: /^[^@![\\].,$*+?^{}()|\\\\/]+/,\n REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\\]]/,\n REGEX_SPECIAL_CHARS_BACKREF: /(\\\\?)((\\W)(\\3*))/g,\n REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\\]])/g,\n REGEX_REMOVE_BACKSLASH: /(?:\\[.*?[^\\\\]\\]|\\\\(?=.))/g,\n\n // Replace globs with equivalent patterns to reduce parsing time.\n REPLACEMENTS: {\n '***': '*',\n '**/**': '**',\n '**/**/**': '**'\n },\n\n // Digits\n CHAR_0: 48, /* 0 */\n CHAR_9: 57, /* 9 */\n\n // Alphabet chars.\n CHAR_UPPERCASE_A: 65, /* A */\n CHAR_LOWERCASE_A: 97, /* a */\n CHAR_UPPERCASE_Z: 90, /* Z */\n CHAR_LOWERCASE_Z: 122, /* z */\n\n CHAR_LEFT_PARENTHESES: 40, /* ( */\n CHAR_RIGHT_PARENTHESES: 41, /* ) */\n\n CHAR_ASTERISK: 42, /* * */\n\n // Non-alphabetic chars.\n CHAR_AMPERSAND: 38, /* & */\n CHAR_AT: 64, /* @ */\n CHAR_BACKWARD_SLASH: 92, /* \\ */\n CHAR_CARRIAGE_RETURN: 13, /* \\r */\n CHAR_CIRCUMFLEX_ACCENT: 94, /* ^ */\n CHAR_COLON: 58, /* : */\n CHAR_COMMA: 44, /* , */\n CHAR_DOT: 46, /* . */\n CHAR_DOUBLE_QUOTE: 34, /* \" */\n CHAR_EQUAL: 61, /* = */\n CHAR_EXCLAMATION_MARK: 33, /* ! */\n CHAR_FORM_FEED: 12, /* \\f */\n CHAR_FORWARD_SLASH: 47, /* / */\n CHAR_GRAVE_ACCENT: 96, /* ` */\n CHAR_HASH: 35, /* # */\n CHAR_HYPHEN_MINUS: 45, /* - */\n CHAR_LEFT_ANGLE_BRACKET: 60, /* < */\n CHAR_LEFT_CURLY_BRACE: 123, /* { */\n CHAR_LEFT_SQUARE_BRACKET: 91, /* [ */\n CHAR_LINE_FEED: 10, /* \\n */\n CHAR_NO_BREAK_SPACE: 160, /* \\u00A0 */\n CHAR_PERCENT: 37, /* % */\n CHAR_PLUS: 43, /* + */\n CHAR_QUESTION_MARK: 63, /* ? */\n CHAR_RIGHT_ANGLE_BRACKET: 62, /* > */\n CHAR_RIGHT_CURLY_BRACE: 125, /* } */\n CHAR_RIGHT_SQUARE_BRACKET: 93, /* ] */\n CHAR_SEMICOLON: 59, /* ; */\n CHAR_SINGLE_QUOTE: 39, /* ' */\n CHAR_SPACE: 32, /* */\n CHAR_TAB: 9, /* \\t */\n CHAR_UNDERSCORE: 95, /* _ */\n CHAR_VERTICAL_LINE: 124, /* | */\n CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279, /* \\uFEFF */\n\n SEP: path.sep,\n\n /**\n * Create EXTGLOB_CHARS\n */\n\n extglobChars(chars) {\n return {\n '!': { type: 'negate', open: '(?:(?!(?:', close: `))${chars.STAR})` },\n '?': { type: 'qmark', open: '(?:', close: ')?' },\n '+': { type: 'plus', open: '(?:', close: ')+' },\n '*': { type: 'star', open: '(?:', close: ')*' },\n '@': { type: 'at', open: '(?:', close: ')' }\n };\n },\n\n /**\n * Create GLOB_CHARS\n */\n\n globChars(win32) {\n return win32 === true ? WINDOWS_CHARS : POSIX_CHARS;\n }\n};\n", "'use strict';\n\nconst path = require('path');\nconst win32 = process.platform === 'win32';\nconst {\n REGEX_BACKSLASH,\n REGEX_REMOVE_BACKSLASH,\n REGEX_SPECIAL_CHARS,\n REGEX_SPECIAL_CHARS_GLOBAL\n} = require('./constants');\n\nexports.isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val);\nexports.hasRegexChars = str => REGEX_SPECIAL_CHARS.test(str);\nexports.isRegexChar = str => str.length === 1 && exports.hasRegexChars(str);\nexports.escapeRegex = str => str.replace(REGEX_SPECIAL_CHARS_GLOBAL, '\\\\$1');\nexports.toPosixSlashes = str => str.replace(REGEX_BACKSLASH, '/');\n\nexports.removeBackslashes = str => {\n return str.replace(REGEX_REMOVE_BACKSLASH, match => {\n return match === '\\\\' ? '' : match;\n });\n};\n\nexports.supportsLookbehinds = () => {\n const segs = process.version.slice(1).split('.').map(Number);\n if (segs.length === 3 && segs[0] >= 9 || (segs[0] === 8 && segs[1] >= 10)) {\n return true;\n }\n return false;\n};\n\nexports.isWindows = options => {\n if (options && typeof options.windows === 'boolean') {\n return options.windows;\n }\n return win32 === true || path.sep === '\\\\';\n};\n\nexports.escapeLast = (input, char, lastIdx) => {\n const idx = input.lastIndexOf(char, lastIdx);\n if (idx === -1) return input;\n if (input[idx - 1] === '\\\\') return exports.escapeLast(input, char, idx - 1);\n return `${input.slice(0, idx)}\\\\${input.slice(idx)}`;\n};\n\nexports.removePrefix = (input, state = {}) => {\n let output = input;\n if (output.startsWith('./')) {\n output = output.slice(2);\n state.prefix = './';\n }\n return output;\n};\n\nexports.wrapOutput = (input, state = {}, options = {}) => {\n const prepend = options.contains ? '' : '^';\n const append = options.contains ? '' : '$';\n\n let output = `${prepend}(?:${input})${append}`;\n if (state.negated === true) {\n output = `(?:^(?!${output}).*$)`;\n }\n return output;\n};\n", "'use strict';\n\nconst utils = require('./utils');\nconst {\n CHAR_ASTERISK, /* * */\n CHAR_AT, /* @ */\n CHAR_BACKWARD_SLASH, /* \\ */\n CHAR_COMMA, /* , */\n CHAR_DOT, /* . */\n CHAR_EXCLAMATION_MARK, /* ! */\n CHAR_FORWARD_SLASH, /* / */\n CHAR_LEFT_CURLY_BRACE, /* { */\n CHAR_LEFT_PARENTHESES, /* ( */\n CHAR_LEFT_SQUARE_BRACKET, /* [ */\n CHAR_PLUS, /* + */\n CHAR_QUESTION_MARK, /* ? */\n CHAR_RIGHT_CURLY_BRACE, /* } */\n CHAR_RIGHT_PARENTHESES, /* ) */\n CHAR_RIGHT_SQUARE_BRACKET /* ] */\n} = require('./constants');\n\nconst isPathSeparator = code => {\n return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH;\n};\n\nconst depth = token => {\n if (token.isPrefix !== true) {\n token.depth = token.isGlobstar ? Infinity : 1;\n }\n};\n\n/**\n * Quickly scans a glob pattern and returns an object with a handful of\n * useful properties, like `isGlob`, `path` (the leading non-glob, if it exists),\n * `glob` (the actual pattern), `negated` (true if the path starts with `!` but not\n * with `!(`) and `negatedExtglob` (true if the path starts with `!(`).\n *\n * ```js\n * const pm = require('picomatch');\n * console.log(pm.scan('foo/bar/*.js'));\n * { isGlob: true, input: 'foo/bar/*.js', base: 'foo/bar', glob: '*.js' }\n * ```\n * @param {String} `str`\n * @param {Object} `options`\n * @return {Object} Returns an object with tokens and regex source string.\n * @api public\n */\n\nconst scan = (input, options) => {\n const opts = options || {};\n\n const length = input.length - 1;\n const scanToEnd = opts.parts === true || opts.scanToEnd === true;\n const slashes = [];\n const tokens = [];\n const parts = [];\n\n let str = input;\n let index = -1;\n let start = 0;\n let lastIndex = 0;\n let isBrace = false;\n let isBracket = false;\n let isGlob = false;\n let isExtglob = false;\n let isGlobstar = false;\n let braceEscaped = false;\n let backslashes = false;\n let negated = false;\n let negatedExtglob = false;\n let finished = false;\n let braces = 0;\n let prev;\n let code;\n let token = { value: '', depth: 0, isGlob: false };\n\n const eos = () => index >= length;\n const peek = () => str.charCodeAt(index + 1);\n const advance = () => {\n prev = code;\n return str.charCodeAt(++index);\n };\n\n while (index < length) {\n code = advance();\n let next;\n\n if (code === CHAR_BACKWARD_SLASH) {\n backslashes = token.backslashes = true;\n code = advance();\n\n if (code === CHAR_LEFT_CURLY_BRACE) {\n braceEscaped = true;\n }\n continue;\n }\n\n if (braceEscaped === true || code === CHAR_LEFT_CURLY_BRACE) {\n braces++;\n\n while (eos() !== true && (code = advance())) {\n if (code === CHAR_BACKWARD_SLASH) {\n backslashes = token.backslashes = true;\n advance();\n continue;\n }\n\n if (code === CHAR_LEFT_CURLY_BRACE) {\n braces++;\n continue;\n }\n\n if (braceEscaped !== true && code === CHAR_DOT && (code = advance()) === CHAR_DOT) {\n isBrace = token.isBrace = true;\n isGlob = token.isGlob = true;\n finished = true;\n\n if (scanToEnd === true) {\n continue;\n }\n\n break;\n }\n\n if (braceEscaped !== true && code === CHAR_COMMA) {\n isBrace = token.isBrace = true;\n isGlob = token.isGlob = true;\n finished = true;\n\n if (scanToEnd === true) {\n continue;\n }\n\n break;\n }\n\n if (code === CHAR_RIGHT_CURLY_BRACE) {\n braces--;\n\n if (braces === 0) {\n braceEscaped = false;\n isBrace = token.isBrace = true;\n finished = true;\n break;\n }\n }\n }\n\n if (scanToEnd === true) {\n continue;\n }\n\n break;\n }\n\n if (code === CHAR_FORWARD_SLASH) {\n slashes.push(index);\n tokens.push(token);\n token = { value: '', depth: 0, isGlob: false };\n\n if (finished === true) continue;\n if (prev === CHAR_DOT && index === (start + 1)) {\n start += 2;\n continue;\n }\n\n lastIndex = index + 1;\n continue;\n }\n\n if (opts.noext !== true) {\n const isExtglobChar = code === CHAR_PLUS\n || code === CHAR_AT\n || code === CHAR_ASTERISK\n || code === CHAR_QUESTION_MARK\n || code === CHAR_EXCLAMATION_MARK;\n\n if (isExtglobChar === true && peek() === CHAR_LEFT_PARENTHESES) {\n isGlob = token.isGlob = true;\n isExtglob = token.isExtglob = true;\n finished = true;\n if (code === CHAR_EXCLAMATION_MARK && index === start) {\n negatedExtglob = true;\n }\n\n if (scanToEnd === true) {\n while (eos() !== true && (code = advance())) {\n if (code === CHAR_BACKWARD_SLASH) {\n backslashes = token.backslashes = true;\n code = advance();\n continue;\n }\n\n if (code === CHAR_RIGHT_PARENTHESES) {\n isGlob = token.isGlob = true;\n finished = true;\n break;\n }\n }\n continue;\n }\n break;\n }\n }\n\n if (code === CHAR_ASTERISK) {\n if (prev === CHAR_ASTERISK) isGlobstar = token.isGlobstar = true;\n isGlob = token.isGlob = true;\n finished = true;\n\n if (scanToEnd === true) {\n continue;\n }\n break;\n }\n\n if (code === CHAR_QUESTION_MARK) {\n isGlob = token.isGlob = true;\n finished = true;\n\n if (scanToEnd === true) {\n continue;\n }\n break;\n }\n\n if (code === CHAR_LEFT_SQUARE_BRACKET) {\n while (eos() !== true && (next = advance())) {\n if (next === CHAR_BACKWARD_SLASH) {\n backslashes = token.backslashes = true;\n advance();\n continue;\n }\n\n if (next === CHAR_RIGHT_SQUARE_BRACKET) {\n isBracket = token.isBracket = true;\n isGlob = token.isGlob = true;\n finished = true;\n break;\n }\n }\n\n if (scanToEnd === true) {\n continue;\n }\n\n break;\n }\n\n if (opts.nonegate !== true && code === CHAR_EXCLAMATION_MARK && index === start) {\n negated = token.negated = true;\n start++;\n continue;\n }\n\n if (opts.noparen !== true && code === CHAR_LEFT_PARENTHESES) {\n isGlob = token.isGlob = true;\n\n if (scanToEnd === true) {\n while (eos() !== true && (code = advance())) {\n if (code === CHAR_LEFT_PARENTHESES) {\n backslashes = token.backslashes = true;\n code = advance();\n continue;\n }\n\n if (code === CHAR_RIGHT_PARENTHESES) {\n finished = true;\n break;\n }\n }\n continue;\n }\n break;\n }\n\n if (isGlob === true) {\n finished = true;\n\n if (scanToEnd === true) {\n continue;\n }\n\n break;\n }\n }\n\n if (opts.noext === true) {\n isExtglob = false;\n isGlob = false;\n }\n\n let base = str;\n let prefix = '';\n let glob = '';\n\n if (start > 0) {\n prefix = str.slice(0, start);\n str = str.slice(start);\n lastIndex -= start;\n }\n\n if (base && isGlob === true && lastIndex > 0) {\n base = str.slice(0, lastIndex);\n glob = str.slice(lastIndex);\n } else if (isGlob === true) {\n base = '';\n glob = str;\n } else {\n base = str;\n }\n\n if (base && base !== '' && base !== '/' && base !== str) {\n if (isPathSeparator(base.charCodeAt(base.length - 1))) {\n base = base.slice(0, -1);\n }\n }\n\n if (opts.unescape === true) {\n if (glob) glob = utils.removeBackslashes(glob);\n\n if (base && backslashes === true) {\n base = utils.removeBackslashes(base);\n }\n }\n\n const state = {\n prefix,\n input,\n start,\n base,\n glob,\n isBrace,\n isBracket,\n isGlob,\n isExtglob,\n isGlobstar,\n negated,\n negatedExtglob\n };\n\n if (opts.tokens === true) {\n state.maxDepth = 0;\n if (!isPathSeparator(code)) {\n tokens.push(token);\n }\n state.tokens = tokens;\n }\n\n if (opts.parts === true || opts.tokens === true) {\n let prevIndex;\n\n for (let idx = 0; idx < slashes.length; idx++) {\n const n = prevIndex ? prevIndex + 1 : start;\n const i = slashes[idx];\n const value = input.slice(n, i);\n if (opts.tokens) {\n if (idx === 0 && start !== 0) {\n tokens[idx].isPrefix = true;\n tokens[idx].value = prefix;\n } else {\n tokens[idx].value = value;\n }\n depth(tokens[idx]);\n state.maxDepth += tokens[idx].depth;\n }\n if (idx !== 0 || value !== '') {\n parts.push(value);\n }\n prevIndex = i;\n }\n\n if (prevIndex && prevIndex + 1 < input.length) {\n const value = input.slice(prevIndex + 1);\n parts.push(value);\n\n if (opts.tokens) {\n tokens[tokens.length - 1].value = value;\n depth(tokens[tokens.length - 1]);\n state.maxDepth += tokens[tokens.length - 1].depth;\n }\n }\n\n state.slashes = slashes;\n state.parts = parts;\n }\n\n return state;\n};\n\nmodule.exports = scan;\n", "'use strict';\n\nconst constants = require('./constants');\nconst utils = require('./utils');\n\n/**\n * Constants\n */\n\nconst {\n MAX_LENGTH,\n POSIX_REGEX_SOURCE,\n REGEX_NON_SPECIAL_CHARS,\n REGEX_SPECIAL_CHARS_BACKREF,\n REPLACEMENTS\n} = constants;\n\n/**\n * Helpers\n */\n\nconst expandRange = (args, options) => {\n if (typeof options.expandRange === 'function') {\n return options.expandRange(...args, options);\n }\n\n args.sort();\n const value = `[${args.join('-')}]`;\n\n try {\n /* eslint-disable-next-line no-new */\n new RegExp(value);\n } catch (ex) {\n return args.map(v => utils.escapeRegex(v)).join('..');\n }\n\n return value;\n};\n\n/**\n * Create the message for a syntax error\n */\n\nconst syntaxError = (type, char) => {\n return `Missing ${type}: \"${char}\" - use \"\\\\\\\\${char}\" to match literal characters`;\n};\n\n/**\n * Parse the given input string.\n * @param {String} input\n * @param {Object} options\n * @return {Object}\n */\n\nconst parse = (input, options) => {\n if (typeof input !== 'string') {\n throw new TypeError('Expected a string');\n }\n\n input = REPLACEMENTS[input] || input;\n\n const opts = { ...options };\n const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;\n\n let len = input.length;\n if (len > max) {\n throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);\n }\n\n const bos = { type: 'bos', value: '', output: opts.prepend || '' };\n const tokens = [bos];\n\n const capture = opts.capture ? '' : '?:';\n const win32 = utils.isWindows(options);\n\n // create constants based on platform, for windows or posix\n const PLATFORM_CHARS = constants.globChars(win32);\n const EXTGLOB_CHARS = constants.extglobChars(PLATFORM_CHARS);\n\n const {\n DOT_LITERAL,\n PLUS_LITERAL,\n SLASH_LITERAL,\n ONE_CHAR,\n DOTS_SLASH,\n NO_DOT,\n NO_DOT_SLASH,\n NO_DOTS_SLASH,\n QMARK,\n QMARK_NO_DOT,\n STAR,\n START_ANCHOR\n } = PLATFORM_CHARS;\n\n const globstar = opts => {\n return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;\n };\n\n const nodot = opts.dot ? '' : NO_DOT;\n const qmarkNoDot = opts.dot ? QMARK : QMARK_NO_DOT;\n let star = opts.bash === true ? globstar(opts) : STAR;\n\n if (opts.capture) {\n star = `(${star})`;\n }\n\n // minimatch options support\n if (typeof opts.noext === 'boolean') {\n opts.noextglob = opts.noext;\n }\n\n const state = {\n input,\n index: -1,\n start: 0,\n dot: opts.dot === true,\n consumed: '',\n output: '',\n prefix: '',\n backtrack: false,\n negated: false,\n brackets: 0,\n braces: 0,\n parens: 0,\n quotes: 0,\n globstar: false,\n tokens\n };\n\n input = utils.removePrefix(input, state);\n len = input.length;\n\n const extglobs = [];\n const braces = [];\n const stack = [];\n let prev = bos;\n let value;\n\n /**\n * Tokenizing helpers\n */\n\n const eos = () => state.index === len - 1;\n const peek = state.peek = (n = 1) => input[state.index + n];\n const advance = state.advance = () => input[++state.index] || '';\n const remaining = () => input.slice(state.index + 1);\n const consume = (value = '', num = 0) => {\n state.consumed += value;\n state.index += num;\n };\n\n const append = token => {\n state.output += token.output != null ? token.output : token.value;\n consume(token.value);\n };\n\n const negate = () => {\n let count = 1;\n\n while (peek() === '!' && (peek(2) !== '(' || peek(3) === '?')) {\n advance();\n state.start++;\n count++;\n }\n\n if (count % 2 === 0) {\n return false;\n }\n\n state.negated = true;\n state.start++;\n return true;\n };\n\n const increment = type => {\n state[type]++;\n stack.push(type);\n };\n\n const decrement = type => {\n state[type]--;\n stack.pop();\n };\n\n /**\n * Push tokens onto the tokens array. This helper speeds up\n * tokenizing by 1) helping us avoid backtracking as much as possible,\n * and 2) helping us avoid creating extra tokens when consecutive\n * characters are plain text. This improves performance and simplifies\n * lookbehinds.\n */\n\n const push = tok => {\n if (prev.type === 'globstar') {\n const isBrace = state.braces > 0 && (tok.type === 'comma' || tok.type === 'brace');\n const isExtglob = tok.extglob === true || (extglobs.length && (tok.type === 'pipe' || tok.type === 'paren'));\n\n if (tok.type !== 'slash' && tok.type !== 'paren' && !isBrace && !isExtglob) {\n state.output = state.output.slice(0, -prev.output.length);\n prev.type = 'star';\n prev.value = '*';\n prev.output = star;\n state.output += prev.output;\n }\n }\n\n if (extglobs.length && tok.type !== 'paren') {\n extglobs[extglobs.length - 1].inner += tok.value;\n }\n\n if (tok.value || tok.output) append(tok);\n if (prev && prev.type === 'text' && tok.type === 'text') {\n prev.value += tok.value;\n prev.output = (prev.output || '') + tok.value;\n return;\n }\n\n tok.prev = prev;\n tokens.push(tok);\n prev = tok;\n };\n\n const extglobOpen = (type, value) => {\n const token = { ...EXTGLOB_CHARS[value], conditions: 1, inner: '' };\n\n token.prev = prev;\n token.parens = state.parens;\n token.output = state.output;\n const output = (opts.capture ? '(' : '') + token.open;\n\n increment('parens');\n push({ type, value, output: state.output ? '' : ONE_CHAR });\n push({ type: 'paren', extglob: true, value: advance(), output });\n extglobs.push(token);\n };\n\n const extglobClose = token => {\n let output = token.close + (opts.capture ? ')' : '');\n let rest;\n\n if (token.type === 'negate') {\n let extglobStar = star;\n\n if (token.inner && token.inner.length > 1 && token.inner.includes('/')) {\n extglobStar = globstar(opts);\n }\n\n if (extglobStar !== star || eos() || /^\\)+$/.test(remaining())) {\n output = token.close = `)$))${extglobStar}`;\n }\n\n if (token.inner.includes('*') && (rest = remaining()) && /^\\.[^\\\\/.]+$/.test(rest)) {\n // Any non-magical string (`.ts`) or even nested expression (`.{ts,tsx}`) can follow after the closing parenthesis.\n // In this case, we need to parse the string and use it in the output of the original pattern.\n // Suitable patterns: `/!(*.d).ts`, `/!(*.d).{ts,tsx}`, `**/!(*-dbg).@(js)`.\n //\n // Disabling the `fastpaths` option due to a problem with parsing strings as `.ts` in the pattern like `**/!(*.d).ts`.\n const expression = parse(rest, { ...options, fastpaths: false }).output;\n\n output = token.close = `)${expression})${extglobStar})`;\n }\n\n if (token.prev.type === 'bos') {\n state.negatedExtglob = true;\n }\n }\n\n push({ type: 'paren', extglob: true, value, output });\n decrement('parens');\n };\n\n /**\n * Fast paths\n */\n\n if (opts.fastpaths !== false && !/(^[*!]|[/()[\\]{}\"])/.test(input)) {\n let backslashes = false;\n\n let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars, first, rest, index) => {\n if (first === '\\\\') {\n backslashes = true;\n return m;\n }\n\n if (first === '?') {\n if (esc) {\n return esc + first + (rest ? QMARK.repeat(rest.length) : '');\n }\n if (index === 0) {\n return qmarkNoDot + (rest ? QMARK.repeat(rest.length) : '');\n }\n return QMARK.repeat(chars.length);\n }\n\n if (first === '.') {\n return DOT_LITERAL.repeat(chars.length);\n }\n\n if (first === '*') {\n if (esc) {\n return esc + first + (rest ? star : '');\n }\n return star;\n }\n return esc ? m : `\\\\${m}`;\n });\n\n if (backslashes === true) {\n if (opts.unescape === true) {\n output = output.replace(/\\\\/g, '');\n } else {\n output = output.replace(/\\\\+/g, m => {\n return m.length % 2 === 0 ? '\\\\\\\\' : (m ? '\\\\' : '');\n });\n }\n }\n\n if (output === input && opts.contains === true) {\n state.output = input;\n return state;\n }\n\n state.output = utils.wrapOutput(output, state, options);\n return state;\n }\n\n /**\n * Tokenize input until we reach end-of-string\n */\n\n while (!eos()) {\n value = advance();\n\n if (value === '\\u0000') {\n continue;\n }\n\n /**\n * Escaped characters\n */\n\n if (value === '\\\\') {\n const next = peek();\n\n if (next === '/' && opts.bash !== true) {\n continue;\n }\n\n if (next === '.' || next === ';') {\n continue;\n }\n\n if (!next) {\n value += '\\\\';\n push({ type: 'text', value });\n continue;\n }\n\n // collapse slashes to reduce potential for exploits\n const match = /^\\\\+/.exec(remaining());\n let slashes = 0;\n\n if (match && match[0].length > 2) {\n slashes = match[0].length;\n state.index += slashes;\n if (slashes % 2 !== 0) {\n value += '\\\\';\n }\n }\n\n if (opts.unescape === true) {\n value = advance();\n } else {\n value += advance();\n }\n\n if (state.brackets === 0) {\n push({ type: 'text', value });\n continue;\n }\n }\n\n /**\n * If we're inside a regex character class, continue\n * until we reach the closing bracket.\n */\n\n if (state.brackets > 0 && (value !== ']' || prev.value === '[' || prev.value === '[^')) {\n if (opts.posix !== false && value === ':') {\n const inner = prev.value.slice(1);\n if (inner.includes('[')) {\n prev.posix = true;\n\n if (inner.includes(':')) {\n const idx = prev.value.lastIndexOf('[');\n const pre = prev.value.slice(0, idx);\n const rest = prev.value.slice(idx + 2);\n const posix = POSIX_REGEX_SOURCE[rest];\n if (posix) {\n prev.value = pre + posix;\n state.backtrack = true;\n advance();\n\n if (!bos.output && tokens.indexOf(prev) === 1) {\n bos.output = ONE_CHAR;\n }\n continue;\n }\n }\n }\n }\n\n if ((value === '[' && peek() !== ':') || (value === '-' && peek() === ']')) {\n value = `\\\\${value}`;\n }\n\n if (value === ']' && (prev.value === '[' || prev.value === '[^')) {\n value = `\\\\${value}`;\n }\n\n if (opts.posix === true && value === '!' && prev.value === '[') {\n value = '^';\n }\n\n prev.value += value;\n append({ value });\n continue;\n }\n\n /**\n * If we're inside a quoted string, continue\n * until we reach the closing double quote.\n */\n\n if (state.quotes === 1 && value !== '\"') {\n value = utils.escapeRegex(value);\n prev.value += value;\n append({ value });\n continue;\n }\n\n /**\n * Double quotes\n */\n\n if (value === '\"') {\n state.quotes = state.quotes === 1 ? 0 : 1;\n if (opts.keepQuotes === true) {\n push({ type: 'text', value });\n }\n continue;\n }\n\n /**\n * Parentheses\n */\n\n if (value === '(') {\n increment('parens');\n push({ type: 'paren', value });\n continue;\n }\n\n if (value === ')') {\n if (state.parens === 0 && opts.strictBrackets === true) {\n throw new SyntaxError(syntaxError('opening', '('));\n }\n\n const extglob = extglobs[extglobs.length - 1];\n if (extglob && state.parens === extglob.parens + 1) {\n extglobClose(extglobs.pop());\n continue;\n }\n\n push({ type: 'paren', value, output: state.parens ? ')' : '\\\\)' });\n decrement('parens');\n continue;\n }\n\n /**\n * Square brackets\n */\n\n if (value === '[') {\n if (opts.nobracket === true || !remaining().includes(']')) {\n if (opts.nobracket !== true && opts.strictBrackets === true) {\n throw new SyntaxError(syntaxError('closing', ']'));\n }\n\n value = `\\\\${value}`;\n } else {\n increment('brackets');\n }\n\n push({ type: 'bracket', value });\n continue;\n }\n\n if (value === ']') {\n if (opts.nobracket === true || (prev && prev.type === 'bracket' && prev.value.length === 1)) {\n push({ type: 'text', value, output: `\\\\${value}` });\n continue;\n }\n\n if (state.brackets === 0) {\n if (opts.strictBrackets === true) {\n throw new SyntaxError(syntaxError('opening', '['));\n }\n\n push({ type: 'text', value, output: `\\\\${value}` });\n continue;\n }\n\n decrement('brackets');\n\n const prevValue = prev.value.slice(1);\n if (prev.posix !== true && prevValue[0] === '^' && !prevValue.includes('/')) {\n value = `/${value}`;\n }\n\n prev.value += value;\n append({ value });\n\n // when literal brackets are explicitly disabled\n // assume we should match with a regex character class\n if (opts.literalBrackets === false || utils.hasRegexChars(prevValue)) {\n continue;\n }\n\n const escaped = utils.escapeRegex(prev.value);\n state.output = state.output.slice(0, -prev.value.length);\n\n // when literal brackets are explicitly enabled\n // assume we should escape the brackets to match literal characters\n if (opts.literalBrackets === true) {\n state.output += escaped;\n prev.value = escaped;\n continue;\n }\n\n // when the user specifies nothing, try to match both\n prev.value = `(${capture}${escaped}|${prev.value})`;\n state.output += prev.value;\n continue;\n }\n\n /**\n * Braces\n */\n\n if (value === '{' && opts.nobrace !== true) {\n increment('braces');\n\n const open = {\n type: 'brace',\n value,\n output: '(',\n outputIndex: state.output.length,\n tokensIndex: state.tokens.length\n };\n\n braces.push(open);\n push(open);\n continue;\n }\n\n if (value === '}') {\n const brace = braces[braces.length - 1];\n\n if (opts.nobrace === true || !brace) {\n push({ type: 'text', value, output: value });\n continue;\n }\n\n let output = ')';\n\n if (brace.dots === true) {\n const arr = tokens.slice();\n const range = [];\n\n for (let i = arr.length - 1; i >= 0; i--) {\n tokens.pop();\n if (arr[i].type === 'brace') {\n break;\n }\n if (arr[i].type !== 'dots') {\n range.unshift(arr[i].value);\n }\n }\n\n output = expandRange(range, opts);\n state.backtrack = true;\n }\n\n if (brace.comma !== true && brace.dots !== true) {\n const out = state.output.slice(0, brace.outputIndex);\n const toks = state.tokens.slice(brace.tokensIndex);\n brace.value = brace.output = '\\\\{';\n value = output = '\\\\}';\n state.output = out;\n for (const t of toks) {\n state.output += (t.output || t.value);\n }\n }\n\n push({ type: 'brace', value, output });\n decrement('braces');\n braces.pop();\n continue;\n }\n\n /**\n * Pipes\n */\n\n if (value === '|') {\n if (extglobs.length > 0) {\n extglobs[extglobs.length - 1].conditions++;\n }\n push({ type: 'text', value });\n continue;\n }\n\n /**\n * Commas\n */\n\n if (value === ',') {\n let output = value;\n\n const brace = braces[braces.length - 1];\n if (brace && stack[stack.length - 1] === 'braces') {\n brace.comma = true;\n output = '|';\n }\n\n push({ type: 'comma', value, output });\n continue;\n }\n\n /**\n * Slashes\n */\n\n if (value === '/') {\n // if the beginning of the glob is \"./\", advance the start\n // to the current index, and don't add the \"./\" characters\n // to the state. This greatly simplifies lookbehinds when\n // checking for BOS characters like \"!\" and \".\" (not \"./\")\n if (prev.type === 'dot' && state.index === state.start + 1) {\n state.start = state.index + 1;\n state.consumed = '';\n state.output = '';\n tokens.pop();\n prev = bos; // reset \"prev\" to the first token\n continue;\n }\n\n push({ type: 'slash', value, output: SLASH_LITERAL });\n continue;\n }\n\n /**\n * Dots\n */\n\n if (value === '.') {\n if (state.braces > 0 && prev.type === 'dot') {\n if (prev.value === '.') prev.output = DOT_LITERAL;\n const brace = braces[braces.length - 1];\n prev.type = 'dots';\n prev.output += value;\n prev.value += value;\n brace.dots = true;\n continue;\n }\n\n if ((state.braces + state.parens) === 0 && prev.type !== 'bos' && prev.type !== 'slash') {\n push({ type: 'text', value, output: DOT_LITERAL });\n continue;\n }\n\n push({ type: 'dot', value, output: DOT_LITERAL });\n continue;\n }\n\n /**\n * Question marks\n */\n\n if (value === '?') {\n const isGroup = prev && prev.value === '(';\n if (!isGroup && opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {\n extglobOpen('qmark', value);\n continue;\n }\n\n if (prev && prev.type === 'paren') {\n const next = peek();\n let output = value;\n\n if (next === '<' && !utils.supportsLookbehinds()) {\n throw new Error('Node.js v10 or higher is required for regex lookbehinds');\n }\n\n if ((prev.value === '(' && !/[!=<:]/.test(next)) || (next === '<' && !/<([!=]|\\w+>)/.test(remaining()))) {\n output = `\\\\${value}`;\n }\n\n push({ type: 'text', value, output });\n continue;\n }\n\n if (opts.dot !== true && (prev.type === 'slash' || prev.type === 'bos')) {\n push({ type: 'qmark', value, output: QMARK_NO_DOT });\n continue;\n }\n\n push({ type: 'qmark', value, output: QMARK });\n continue;\n }\n\n /**\n * Exclamation\n */\n\n if (value === '!') {\n if (opts.noextglob !== true && peek() === '(') {\n if (peek(2) !== '?' || !/[!=<:]/.test(peek(3))) {\n extglobOpen('negate', value);\n continue;\n }\n }\n\n if (opts.nonegate !== true && state.index === 0) {\n negate();\n continue;\n }\n }\n\n /**\n * Plus\n */\n\n if (value === '+') {\n if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {\n extglobOpen('plus', value);\n continue;\n }\n\n if ((prev && prev.value === '(') || opts.regex === false) {\n push({ type: 'plus', value, output: PLUS_LITERAL });\n continue;\n }\n\n if ((prev && (prev.type === 'bracket' || prev.type === 'paren' || prev.type === 'brace')) || state.parens > 0) {\n push({ type: 'plus', value });\n continue;\n }\n\n push({ type: 'plus', value: PLUS_LITERAL });\n continue;\n }\n\n /**\n * Plain text\n */\n\n if (value === '@') {\n if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {\n push({ type: 'at', extglob: true, value, output: '' });\n continue;\n }\n\n push({ type: 'text', value });\n continue;\n }\n\n /**\n * Plain text\n */\n\n if (value !== '*') {\n if (value === '$' || value === '^') {\n value = `\\\\${value}`;\n }\n\n const match = REGEX_NON_SPECIAL_CHARS.exec(remaining());\n if (match) {\n value += match[0];\n state.index += match[0].length;\n }\n\n push({ type: 'text', value });\n continue;\n }\n\n /**\n * Stars\n */\n\n if (prev && (prev.type === 'globstar' || prev.star === true)) {\n prev.type = 'star';\n prev.star = true;\n prev.value += value;\n prev.output = star;\n state.backtrack = true;\n state.globstar = true;\n consume(value);\n continue;\n }\n\n let rest = remaining();\n if (opts.noextglob !== true && /^\\([^?]/.test(rest)) {\n extglobOpen('star', value);\n continue;\n }\n\n if (prev.type === 'star') {\n if (opts.noglobstar === true) {\n consume(value);\n continue;\n }\n\n const prior = prev.prev;\n const before = prior.prev;\n const isStart = prior.type === 'slash' || prior.type === 'bos';\n const afterStar = before && (before.type === 'star' || before.type === 'globstar');\n\n if (opts.bash === true && (!isStart || (rest[0] && rest[0] !== '/'))) {\n push({ type: 'star', value, output: '' });\n continue;\n }\n\n const isBrace = state.braces > 0 && (prior.type === 'comma' || prior.type === 'brace');\n const isExtglob = extglobs.length && (prior.type === 'pipe' || prior.type === 'paren');\n if (!isStart && prior.type !== 'paren' && !isBrace && !isExtglob) {\n push({ type: 'star', value, output: '' });\n continue;\n }\n\n // strip consecutive `/**/`\n while (rest.slice(0, 3) === '/**') {\n const after = input[state.index + 4];\n if (after && after !== '/') {\n break;\n }\n rest = rest.slice(3);\n consume('/**', 3);\n }\n\n if (prior.type === 'bos' && eos()) {\n prev.type = 'globstar';\n prev.value += value;\n prev.output = globstar(opts);\n state.output = prev.output;\n state.globstar = true;\n consume(value);\n continue;\n }\n\n if (prior.type === 'slash' && prior.prev.type !== 'bos' && !afterStar && eos()) {\n state.output = state.output.slice(0, -(prior.output + prev.output).length);\n prior.output = `(?:${prior.output}`;\n\n prev.type = 'globstar';\n prev.output = globstar(opts) + (opts.strictSlashes ? ')' : '|$)');\n prev.value += value;\n state.globstar = true;\n state.output += prior.output + prev.output;\n consume(value);\n continue;\n }\n\n if (prior.type === 'slash' && prior.prev.type !== 'bos' && rest[0] === '/') {\n const end = rest[1] !== void 0 ? '|$' : '';\n\n state.output = state.output.slice(0, -(prior.output + prev.output).length);\n prior.output = `(?:${prior.output}`;\n\n prev.type = 'globstar';\n prev.output = `${globstar(opts)}${SLASH_LITERAL}|${SLASH_LITERAL}${end})`;\n prev.value += value;\n\n state.output += prior.output + prev.output;\n state.globstar = true;\n\n consume(value + advance());\n\n push({ type: 'slash', value: '/', output: '' });\n continue;\n }\n\n if (prior.type === 'bos' && rest[0] === '/') {\n prev.type = 'globstar';\n prev.value += value;\n prev.output = `(?:^|${SLASH_LITERAL}|${globstar(opts)}${SLASH_LITERAL})`;\n state.output = prev.output;\n state.globstar = true;\n consume(value + advance());\n push({ type: 'slash', value: '/', output: '' });\n continue;\n }\n\n // remove single star from output\n state.output = state.output.slice(0, -prev.output.length);\n\n // reset previous token to globstar\n prev.type = 'globstar';\n prev.output = globstar(opts);\n prev.value += value;\n\n // reset output with globstar\n state.output += prev.output;\n state.globstar = true;\n consume(value);\n continue;\n }\n\n const token = { type: 'star', value, output: star };\n\n if (opts.bash === true) {\n token.output = '.*?';\n if (prev.type === 'bos' || prev.type === 'slash') {\n token.output = nodot + token.output;\n }\n push(token);\n continue;\n }\n\n if (prev && (prev.type === 'bracket' || prev.type === 'paren') && opts.regex === true) {\n token.output = value;\n push(token);\n continue;\n }\n\n if (state.index === state.start || prev.type === 'slash' || prev.type === 'dot') {\n if (prev.type === 'dot') {\n state.output += NO_DOT_SLASH;\n prev.output += NO_DOT_SLASH;\n\n } else if (opts.dot === true) {\n state.output += NO_DOTS_SLASH;\n prev.output += NO_DOTS_SLASH;\n\n } else {\n state.output += nodot;\n prev.output += nodot;\n }\n\n if (peek() !== '*') {\n state.output += ONE_CHAR;\n prev.output += ONE_CHAR;\n }\n }\n\n push(token);\n }\n\n while (state.brackets > 0) {\n if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ']'));\n state.output = utils.escapeLast(state.output, '[');\n decrement('brackets');\n }\n\n while (state.parens > 0) {\n if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ')'));\n state.output = utils.escapeLast(state.output, '(');\n decrement('parens');\n }\n\n while (state.braces > 0) {\n if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', '}'));\n state.output = utils.escapeLast(state.output, '{');\n decrement('braces');\n }\n\n if (opts.strictSlashes !== true && (prev.type === 'star' || prev.type === 'bracket')) {\n push({ type: 'maybe_slash', value: '', output: `${SLASH_LITERAL}?` });\n }\n\n // rebuild the output if we had to backtrack at any point\n if (state.backtrack === true) {\n state.output = '';\n\n for (const token of state.tokens) {\n state.output += token.output != null ? token.output : token.value;\n\n if (token.suffix) {\n state.output += token.suffix;\n }\n }\n }\n\n return state;\n};\n\n/**\n * Fast paths for creating regular expressions for common glob patterns.\n * This can significantly speed up processing and has very little downside\n * impact when none of the fast paths match.\n */\n\nparse.fastpaths = (input, options) => {\n const opts = { ...options };\n const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;\n const len = input.length;\n if (len > max) {\n throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);\n }\n\n input = REPLACEMENTS[input] || input;\n const win32 = utils.isWindows(options);\n\n // create constants based on platform, for windows or posix\n const {\n DOT_LITERAL,\n SLASH_LITERAL,\n ONE_CHAR,\n DOTS_SLASH,\n NO_DOT,\n NO_DOTS,\n NO_DOTS_SLASH,\n STAR,\n START_ANCHOR\n } = constants.globChars(win32);\n\n const nodot = opts.dot ? NO_DOTS : NO_DOT;\n const slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT;\n const capture = opts.capture ? '' : '?:';\n const state = { negated: false, prefix: '' };\n let star = opts.bash === true ? '.*?' : STAR;\n\n if (opts.capture) {\n star = `(${star})`;\n }\n\n const globstar = opts => {\n if (opts.noglobstar === true) return star;\n return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;\n };\n\n const create = str => {\n switch (str) {\n case '*':\n return `${nodot}${ONE_CHAR}${star}`;\n\n case '.*':\n return `${DOT_LITERAL}${ONE_CHAR}${star}`;\n\n case '*.*':\n return `${nodot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;\n\n case '*/*':\n return `${nodot}${star}${SLASH_LITERAL}${ONE_CHAR}${slashDot}${star}`;\n\n case '**':\n return nodot + globstar(opts);\n\n case '**/*':\n return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${ONE_CHAR}${star}`;\n\n case '**/*.*':\n return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;\n\n case '**/.*':\n return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${DOT_LITERAL}${ONE_CHAR}${star}`;\n\n default: {\n const match = /^(.*?)\\.(\\w+)$/.exec(str);\n if (!match) return;\n\n const source = create(match[1]);\n if (!source) return;\n\n return source + DOT_LITERAL + match[2];\n }\n }\n };\n\n const output = utils.removePrefix(input, state);\n let source = create(output);\n\n if (source && opts.strictSlashes !== true) {\n source += `${SLASH_LITERAL}?`;\n }\n\n return source;\n};\n\nmodule.exports = parse;\n", "'use strict';\n\nconst path = require('path');\nconst scan = require('./scan');\nconst parse = require('./parse');\nconst utils = require('./utils');\nconst constants = require('./constants');\nconst isObject = val => val && typeof val === 'object' && !Array.isArray(val);\n\n/**\n * Creates a matcher function from one or more glob patterns. The\n * returned function takes a string to match as its first argument,\n * and returns true if the string is a match. The returned matcher\n * function also takes a boolean as the second argument that, when true,\n * returns an object with additional information.\n *\n * ```js\n * const picomatch = require('picomatch');\n * // picomatch(glob[, options]);\n *\n * const isMatch = picomatch('*.!(*a)');\n * console.log(isMatch('a.a')); //=> false\n * console.log(isMatch('a.b')); //=> true\n * ```\n * @name picomatch\n * @param {String|Array} `globs` One or more glob patterns.\n * @param {Object=} `options`\n * @return {Function=} Returns a matcher function.\n * @api public\n */\n\nconst picomatch = (glob, options, returnState = false) => {\n if (Array.isArray(glob)) {\n const fns = glob.map(input => picomatch(input, options, returnState));\n const arrayMatcher = str => {\n for (const isMatch of fns) {\n const state = isMatch(str);\n if (state) return state;\n }\n return false;\n };\n return arrayMatcher;\n }\n\n const isState = isObject(glob) && glob.tokens && glob.input;\n\n if (glob === '' || (typeof glob !== 'string' && !isState)) {\n throw new TypeError('Expected pattern to be a non-empty string');\n }\n\n const opts = options || {};\n const posix = utils.isWindows(options);\n const regex = isState\n ? picomatch.compileRe(glob, options)\n : picomatch.makeRe(glob, options, false, true);\n\n const state = regex.state;\n delete regex.state;\n\n let isIgnored = () => false;\n if (opts.ignore) {\n const ignoreOpts = { ...options, ignore: null, onMatch: null, onResult: null };\n isIgnored = picomatch(opts.ignore, ignoreOpts, returnState);\n }\n\n const matcher = (input, returnObject = false) => {\n const { isMatch, match, output } = picomatch.test(input, regex, options, { glob, posix });\n const result = { glob, state, regex, posix, input, output, match, isMatch };\n\n if (typeof opts.onResult === 'function') {\n opts.onResult(result);\n }\n\n if (isMatch === false) {\n result.isMatch = false;\n return returnObject ? result : false;\n }\n\n if (isIgnored(input)) {\n if (typeof opts.onIgnore === 'function') {\n opts.onIgnore(result);\n }\n result.isMatch = false;\n return returnObject ? result : false;\n }\n\n if (typeof opts.onMatch === 'function') {\n opts.onMatch(result);\n }\n return returnObject ? result : true;\n };\n\n if (returnState) {\n matcher.state = state;\n }\n\n return matcher;\n};\n\n/**\n * Test `input` with the given `regex`. This is used by the main\n * `picomatch()` function to test the input string.\n *\n * ```js\n * const picomatch = require('picomatch');\n * // picomatch.test(input, regex[, options]);\n *\n * console.log(picomatch.test('foo/bar', /^(?:([^/]*?)\\/([^/]*?))$/));\n * // { isMatch: true, match: [ 'foo/', 'foo', 'bar' ], output: 'foo/bar' }\n * ```\n * @param {String} `input` String to test.\n * @param {RegExp} `regex`\n * @return {Object} Returns an object with matching info.\n * @api public\n */\n\npicomatch.test = (input, regex, options, { glob, posix } = {}) => {\n if (typeof input !== 'string') {\n throw new TypeError('Expected input to be a string');\n }\n\n if (input === '') {\n return { isMatch: false, output: '' };\n }\n\n const opts = options || {};\n const format = opts.format || (posix ? utils.toPosixSlashes : null);\n let match = input === glob;\n let output = (match && format) ? format(input) : input;\n\n if (match === false) {\n output = format ? format(input) : input;\n match = output === glob;\n }\n\n if (match === false || opts.capture === true) {\n if (opts.matchBase === true || opts.basename === true) {\n match = picomatch.matchBase(input, regex, options, posix);\n } else {\n match = regex.exec(output);\n }\n }\n\n return { isMatch: Boolean(match), match, output };\n};\n\n/**\n * Match the basename of a filepath.\n *\n * ```js\n * const picomatch = require('picomatch');\n * // picomatch.matchBase(input, glob[, options]);\n * console.log(picomatch.matchBase('foo/bar.js', '*.js'); // true\n * ```\n * @param {String} `input` String to test.\n * @param {RegExp|String} `glob` Glob pattern or regex created by [.makeRe](#makeRe).\n * @return {Boolean}\n * @api public\n */\n\npicomatch.matchBase = (input, glob, options, posix = utils.isWindows(options)) => {\n const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options);\n return regex.test(path.basename(input));\n};\n\n/**\n * Returns true if **any** of the given glob `patterns` match the specified `string`.\n *\n * ```js\n * const picomatch = require('picomatch');\n * // picomatch.isMatch(string, patterns[, options]);\n *\n * console.log(picomatch.isMatch('a.a', ['b.*', '*.a'])); //=> true\n * console.log(picomatch.isMatch('a.a', 'b.*')); //=> false\n * ```\n * @param {String|Array} str The string to test.\n * @param {String|Array} patterns One or more glob patterns to use for matching.\n * @param {Object} [options] See available [options](#options).\n * @return {Boolean} Returns true if any patterns match `str`\n * @api public\n */\n\npicomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);\n\n/**\n * Parse a glob pattern to create the source string for a regular\n * expression.\n *\n * ```js\n * const picomatch = require('picomatch');\n * const result = picomatch.parse(pattern[, options]);\n * ```\n * @param {String} `pattern`\n * @param {Object} `options`\n * @return {Object} Returns an object with useful properties and output to be used as a regex source string.\n * @api public\n */\n\npicomatch.parse = (pattern, options) => {\n if (Array.isArray(pattern)) return pattern.map(p => picomatch.parse(p, options));\n return parse(pattern, { ...options, fastpaths: false });\n};\n\n/**\n * Scan a glob pattern to separate the pattern into segments.\n *\n * ```js\n * const picomatch = require('picomatch');\n * // picomatch.scan(input[, options]);\n *\n * const result = picomatch.scan('!./foo/*.js');\n * console.log(result);\n * { prefix: '!./',\n * input: '!./foo/*.js',\n * start: 3,\n * base: 'foo',\n * glob: '*.js',\n * isBrace: false,\n * isBracket: false,\n * isGlob: true,\n * isExtglob: false,\n * isGlobstar: false,\n * negated: true }\n * ```\n * @param {String} `input` Glob pattern to scan.\n * @param {Object} `options`\n * @return {Object} Returns an object with\n * @api public\n */\n\npicomatch.scan = (input, options) => scan(input, options);\n\n/**\n * Compile a regular expression from the `state` object returned by the\n * [parse()](#parse) method.\n *\n * @param {Object} `state`\n * @param {Object} `options`\n * @param {Boolean} `returnOutput` Intended for implementors, this argument allows you to return the raw output from the parser.\n * @param {Boolean} `returnState` Adds the state to a `state` property on the returned regex. Useful for implementors and debugging.\n * @return {RegExp}\n * @api public\n */\n\npicomatch.compileRe = (state, options, returnOutput = false, returnState = false) => {\n if (returnOutput === true) {\n return state.output;\n }\n\n const opts = options || {};\n const prepend = opts.contains ? '' : '^';\n const append = opts.contains ? '' : '$';\n\n let source = `${prepend}(?:${state.output})${append}`;\n if (state && state.negated === true) {\n source = `^(?!${source}).*$`;\n }\n\n const regex = picomatch.toRegex(source, options);\n if (returnState === true) {\n regex.state = state;\n }\n\n return regex;\n};\n\n/**\n * Create a regular expression from a parsed glob pattern.\n *\n * ```js\n * const picomatch = require('picomatch');\n * const state = picomatch.parse('*.js');\n * // picomatch.compileRe(state[, options]);\n *\n * console.log(picomatch.compileRe(state));\n * //=> /^(?:(?!\\.)(?=.)[^/]*?\\.js)$/\n * ```\n * @param {String} `state` The object returned from the `.parse` method.\n * @param {Object} `options`\n * @param {Boolean} `returnOutput` Implementors may use this argument to return the compiled output, instead of a regular expression. This is not exposed on the options to prevent end-users from mutating the result.\n * @param {Boolean} `returnState` Implementors may use this argument to return the state from the parsed glob with the returned regular expression.\n * @return {RegExp} Returns a regex created from the given pattern.\n * @api public\n */\n\npicomatch.makeRe = (input, options = {}, returnOutput = false, returnState = false) => {\n if (!input || typeof input !== 'string') {\n throw new TypeError('Expected a non-empty string');\n }\n\n let parsed = { negated: false, fastpaths: true };\n\n if (options.fastpaths !== false && (input[0] === '.' || input[0] === '*')) {\n parsed.output = parse.fastpaths(input, options);\n }\n\n if (!parsed.output) {\n parsed = parse(input, options);\n }\n\n return picomatch.compileRe(parsed, options, returnOutput, returnState);\n};\n\n/**\n * Create a regular expression from the given regex source string.\n *\n * ```js\n * const picomatch = require('picomatch');\n * // picomatch.toRegex(source[, options]);\n *\n * const { output } = picomatch.parse('*.js');\n * console.log(picomatch.toRegex(output));\n * //=> /^(?:(?!\\.)(?=.)[^/]*?\\.js)$/\n * ```\n * @param {String} `source` Regular expression source string.\n * @param {Object} `options`\n * @return {RegExp}\n * @api public\n */\n\npicomatch.toRegex = (source, options) => {\n try {\n const opts = options || {};\n return new RegExp(source, opts.flags || (opts.nocase ? 'i' : ''));\n } catch (err) {\n if (options && options.debug === true) throw err;\n return /$^/;\n }\n};\n\n/**\n * Picomatch constants.\n * @return {Object}\n */\n\npicomatch.constants = constants;\n\n/**\n * Expose \"picomatch\"\n */\n\nmodule.exports = picomatch;\n", "'use strict';\n\nmodule.exports = require('./lib/picomatch');\n", "'use strict';\n\nconst util = require('util');\nconst braces = require('braces');\nconst picomatch = require('picomatch');\nconst utils = require('picomatch/lib/utils');\n\nconst isEmptyString = v => v === '' || v === './';\nconst hasBraces = v => {\n const index = v.indexOf('{');\n return index > -1 && v.indexOf('}', index) > -1;\n};\n\n/**\n * Returns an array of strings that match one or more glob patterns.\n *\n * ```js\n * const mm = require('micromatch');\n * // mm(list, patterns[, options]);\n *\n * console.log(mm(['a.js', 'a.txt'], ['*.js']));\n * //=> [ 'a.js' ]\n * ```\n * @param {String|Array<string>} `list` List of strings to match.\n * @param {String|Array<string>} `patterns` One or more glob patterns to use for matching.\n * @param {Object} `options` See available [options](#options)\n * @return {Array} Returns an array of matches\n * @summary false\n * @api public\n */\n\nconst micromatch = (list, patterns, options) => {\n patterns = [].concat(patterns);\n list = [].concat(list);\n\n let omit = new Set();\n let keep = new Set();\n let items = new Set();\n let negatives = 0;\n\n let onResult = state => {\n items.add(state.output);\n if (options && options.onResult) {\n options.onResult(state);\n }\n };\n\n for (let i = 0; i < patterns.length; i++) {\n let isMatch = picomatch(String(patterns[i]), { ...options, onResult }, true);\n let negated = isMatch.state.negated || isMatch.state.negatedExtglob;\n if (negated) negatives++;\n\n for (let item of list) {\n let matched = isMatch(item, true);\n\n let match = negated ? !matched.isMatch : matched.isMatch;\n if (!match) continue;\n\n if (negated) {\n omit.add(matched.output);\n } else {\n omit.delete(matched.output);\n keep.add(matched.output);\n }\n }\n }\n\n let result = negatives === patterns.length ? [...items] : [...keep];\n let matches = result.filter(item => !omit.has(item));\n\n if (options && matches.length === 0) {\n if (options.failglob === true) {\n throw new Error(`No matches found for \"${patterns.join(', ')}\"`);\n }\n\n if (options.nonull === true || options.nullglob === true) {\n return options.unescape ? patterns.map(p => p.replace(/\\\\/g, '')) : patterns;\n }\n }\n\n return matches;\n};\n\n/**\n * Backwards compatibility\n */\n\nmicromatch.match = micromatch;\n\n/**\n * Returns a matcher function from the given glob `pattern` and `options`.\n * The returned function takes a string to match as its only argument and returns\n * true if the string is a match.\n *\n * ```js\n * const mm = require('micromatch');\n * // mm.matcher(pattern[, options]);\n *\n * const isMatch = mm.matcher('*.!(*a)');\n * console.log(isMatch('a.a')); //=> false\n * console.log(isMatch('a.b')); //=> true\n * ```\n * @param {String} `pattern` Glob pattern\n * @param {Object} `options`\n * @return {Function} Returns a matcher function.\n * @api public\n */\n\nmicromatch.matcher = (pattern, options) => picomatch(pattern, options);\n\n/**\n * Returns true if **any** of the given glob `patterns` match the specified `string`.\n *\n * ```js\n * const mm = require('micromatch');\n * // mm.isMatch(string, patterns[, options]);\n *\n * console.log(mm.isMatch('a.a', ['b.*', '*.a'])); //=> true\n * console.log(mm.isMatch('a.a', 'b.*')); //=> false\n * ```\n * @param {String} `str` The string to test.\n * @param {String|Array} `patterns` One or more glob patterns to use for matching.\n * @param {Object} `[options]` See available [options](#options).\n * @return {Boolean} Returns true if any patterns match `str`\n * @api public\n */\n\nmicromatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);\n\n/**\n * Backwards compatibility\n */\n\nmicromatch.any = micromatch.isMatch;\n\n/**\n * Returns a list of strings that _**do not match any**_ of the given `patterns`.\n *\n * ```js\n * const mm = require('micromatch');\n * // mm.not(list, patterns[, options]);\n *\n * console.log(mm.not(['a.a', 'b.b', 'c.c'], '*.a'));\n * //=> ['b.b', 'c.c']\n * ```\n * @param {Array} `list` Array of strings to match.\n * @param {String|Array} `patterns` One or more glob pattern to use for matching.\n * @param {Object} `options` See available [options](#options) for changing how matches are performed\n * @return {Array} Returns an array of strings that **do not match** the given patterns.\n * @api public\n */\n\nmicromatch.not = (list, patterns, options = {}) => {\n patterns = [].concat(patterns).map(String);\n let result = new Set();\n let items = [];\n\n let onResult = state => {\n if (options.onResult) options.onResult(state);\n items.push(state.output);\n };\n\n let matches = new Set(micromatch(list, patterns, { ...options, onResult }));\n\n for (let item of items) {\n if (!matches.has(item)) {\n result.add(item);\n }\n }\n return [...result];\n};\n\n/**\n * Returns true if the given `string` contains the given pattern. Similar\n * to [.isMatch](#isMatch) but the pattern can match any part of the string.\n *\n * ```js\n * var mm = require('micromatch');\n * // mm.contains(string, pattern[, options]);\n *\n * console.log(mm.contains('aa/bb/cc', '*b'));\n * //=> true\n * console.log(mm.contains('aa/bb/cc', '*d'));\n * //=> false\n * ```\n * @param {String} `str` The string to match.\n * @param {String|Array} `patterns` Glob pattern to use for matching.\n * @param {Object} `options` See available [options](#options) for changing how matches are performed\n * @return {Boolean} Returns true if any of the patterns matches any part of `str`.\n * @api public\n */\n\nmicromatch.contains = (str, pattern, options) => {\n if (typeof str !== 'string') {\n throw new TypeError(`Expected a string: \"${util.inspect(str)}\"`);\n }\n\n if (Array.isArray(pattern)) {\n return pattern.some(p => micromatch.contains(str, p, options));\n }\n\n if (typeof pattern === 'string') {\n if (isEmptyString(str) || isEmptyString(pattern)) {\n return false;\n }\n\n if (str.includes(pattern) || (str.startsWith('./') && str.slice(2).includes(pattern))) {\n return true;\n }\n }\n\n return micromatch.isMatch(str, pattern, { ...options, contains: true });\n};\n\n/**\n * Filter the keys of the given object with the given `glob` pattern\n * and `options`. Does not attempt to match nested keys. If you need this feature,\n * use [glob-object][] instead.\n *\n * ```js\n * const mm = require('micromatch');\n * // mm.matchKeys(object, patterns[, options]);\n *\n * const obj = { aa: 'a', ab: 'b', ac: 'c' };\n * console.log(mm.matchKeys(obj, '*b'));\n * //=> { ab: 'b' }\n * ```\n * @param {Object} `object` The object with keys to filter.\n * @param {String|Array} `patterns` One or more glob patterns to use for matching.\n * @param {Object} `options` See available [options](#options) for changing how matches are performed\n * @return {Object} Returns an object with only keys that match the given patterns.\n * @api public\n */\n\nmicromatch.matchKeys = (obj, patterns, options) => {\n if (!utils.isObject(obj)) {\n throw new TypeError('Expected the first argument to be an object');\n }\n let keys = micromatch(Object.keys(obj), patterns, options);\n let res = {};\n for (let key of keys) res[key] = obj[key];\n return res;\n};\n\n/**\n * Returns true if some of the strings in the given `list` match any of the given glob `patterns`.\n *\n * ```js\n * const mm = require('micromatch');\n * // mm.some(list, patterns[, options]);\n *\n * console.log(mm.some(['foo.js', 'bar.js'], ['*.js', '!foo.js']));\n * // true\n * console.log(mm.some(['foo.js'], ['*.js', '!foo.js']));\n * // false\n * ```\n * @param {String|Array} `list` The string or array of strings to test. Returns as soon as the first match is found.\n * @param {String|Array} `patterns` One or more glob patterns to use for matching.\n * @param {Object} `options` See available [options](#options) for changing how matches are performed\n * @return {Boolean} Returns true if any `patterns` matches any of the strings in `list`\n * @api public\n */\n\nmicromatch.some = (list, patterns, options) => {\n let items = [].concat(list);\n\n for (let pattern of [].concat(patterns)) {\n let isMatch = picomatch(String(pattern), options);\n if (items.some(item => isMatch(item))) {\n return true;\n }\n }\n return false;\n};\n\n/**\n * Returns true if every string in the given `list` matches\n * any of the given glob `patterns`.\n *\n * ```js\n * const mm = require('micromatch');\n * // mm.every(list, patterns[, options]);\n *\n * console.log(mm.every('foo.js', ['foo.js']));\n * // true\n * console.log(mm.every(['foo.js', 'bar.js'], ['*.js']));\n * // true\n * console.log(mm.every(['foo.js', 'bar.js'], ['*.js', '!foo.js']));\n * // false\n * console.log(mm.every(['foo.js'], ['*.js', '!foo.js']));\n * // false\n * ```\n * @param {String|Array} `list` The string or array of strings to test.\n * @param {String|Array} `patterns` One or more glob patterns to use for matching.\n * @param {Object} `options` See available [options](#options) for changing how matches are performed\n * @return {Boolean} Returns true if all `patterns` matches all of the strings in `list`\n * @api public\n */\n\nmicromatch.every = (list, patterns, options) => {\n let items = [].concat(list);\n\n for (let pattern of [].concat(patterns)) {\n let isMatch = picomatch(String(pattern), options);\n if (!items.every(item => isMatch(item))) {\n return false;\n }\n }\n return true;\n};\n\n/**\n * Returns true if **all** of the given `patterns` match\n * the specified string.\n *\n * ```js\n * const mm = require('micromatch');\n * // mm.all(string, patterns[, options]);\n *\n * console.log(mm.all('foo.js', ['foo.js']));\n * // true\n *\n * console.log(mm.all('foo.js', ['*.js', '!foo.js']));\n * // false\n *\n * console.log(mm.all('foo.js', ['*.js', 'foo.js']));\n * // true\n *\n * console.log(mm.all('foo.js', ['*.js', 'f*', '*o*', '*o.js']));\n * // true\n * ```\n * @param {String|Array} `str` The string to test.\n * @param {String|Array} `patterns` One or more glob patterns to use for matching.\n * @param {Object} `options` See available [options](#options) for changing how matches are performed\n * @return {Boolean} Returns true if any patterns match `str`\n * @api public\n */\n\nmicromatch.all = (str, patterns, options) => {\n if (typeof str !== 'string') {\n throw new TypeError(`Expected a string: \"${util.inspect(str)}\"`);\n }\n\n return [].concat(patterns).every(p => picomatch(p, options)(str));\n};\n\n/**\n * Returns an array of matches captured by `pattern` in `string, or `null` if the pattern did not match.\n *\n * ```js\n * const mm = require('micromatch');\n * // mm.capture(pattern, string[, options]);\n *\n * console.log(mm.capture('test/*.js', 'test/foo.js'));\n * //=> ['foo']\n * console.log(mm.capture('test/*.js', 'foo/bar.css'));\n * //=> null\n * ```\n * @param {String} `glob` Glob pattern to use for matching.\n * @param {String} `input` String to match\n * @param {Object} `options` See available [options](#options) for changing how matches are performed\n * @return {Array|null} Returns an array of captures if the input matches the glob pattern, otherwise `null`.\n * @api public\n */\n\nmicromatch.capture = (glob, input, options) => {\n let posix = utils.isWindows(options);\n let regex = picomatch.makeRe(String(glob), { ...options, capture: true });\n let match = regex.exec(posix ? utils.toPosixSlashes(input) : input);\n\n if (match) {\n return match.slice(1).map(v => v === void 0 ? '' : v);\n }\n};\n\n/**\n * Create a regular expression from the given glob `pattern`.\n *\n * ```js\n * const mm = require('micromatch');\n * // mm.makeRe(pattern[, options]);\n *\n * console.log(mm.makeRe('*.js'));\n * //=> /^(?:(\\.[\\\\\\/])?(?!\\.)(?=.)[^\\/]*?\\.js)$/\n * ```\n * @param {String} `pattern` A glob pattern to convert to regex.\n * @param {Object} `options`\n * @return {RegExp} Returns a regex created from the given pattern.\n * @api public\n */\n\nmicromatch.makeRe = (...args) => picomatch.makeRe(...args);\n\n/**\n * Scan a glob pattern to separate the pattern into segments. Used\n * by the [split](#split) method.\n *\n * ```js\n * const mm = require('micromatch');\n * const state = mm.scan(pattern[, options]);\n * ```\n * @param {String} `pattern`\n * @param {Object} `options`\n * @return {Object} Returns an object with\n * @api public\n */\n\nmicromatch.scan = (...args) => picomatch.scan(...args);\n\n/**\n * Parse a glob pattern to create the source string for a regular\n * expression.\n *\n * ```js\n * const mm = require('micromatch');\n * const state = mm.parse(pattern[, options]);\n * ```\n * @param {String} `glob`\n * @param {Object} `options`\n * @return {Object} Returns an object with useful properties and output to be used as regex source string.\n * @api public\n */\n\nmicromatch.parse = (patterns, options) => {\n let res = [];\n for (let pattern of [].concat(patterns || [])) {\n for (let str of braces(String(pattern), options)) {\n res.push(picomatch.parse(str, options));\n }\n }\n return res;\n};\n\n/**\n * Process the given brace `pattern`.\n *\n * ```js\n * const { braces } = require('micromatch');\n * console.log(braces('foo/{a,b,c}/bar'));\n * //=> [ 'foo/(a|b|c)/bar' ]\n *\n * console.log(braces('foo/{a,b,c}/bar', { expand: true }));\n * //=> [ 'foo/a/bar', 'foo/b/bar', 'foo/c/bar' ]\n * ```\n * @param {String} `pattern` String with brace pattern to process.\n * @param {Object} `options` Any [options](#options) to change how expansion is performed. See the [braces][] library for all available options.\n * @return {Array}\n * @api public\n */\n\nmicromatch.braces = (pattern, options) => {\n if (typeof pattern !== 'string') throw new TypeError('Expected a string');\n if ((options && options.nobrace === true) || !hasBraces(pattern)) {\n return [pattern];\n }\n return braces(pattern, options);\n};\n\n/**\n * Expand braces\n */\n\nmicromatch.braceExpand = (pattern, options) => {\n if (typeof pattern !== 'string') throw new TypeError('Expected a string');\n return micromatch.braces(pattern, { ...options, expand: true });\n};\n\n/**\n * Expose micromatch\n */\n\n// exposed for tests\nmicromatch.hasBraces = hasBraces;\nmodule.exports = micromatch;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isAbsolute = exports.partitionAbsoluteAndRelative = exports.removeDuplicateSlashes = exports.matchAny = exports.convertPatternsToRe = exports.makeRe = exports.getPatternParts = exports.expandBraceExpansion = exports.expandPatternsWithBraceExpansion = exports.isAffectDepthOfReadingPattern = exports.endsWithSlashGlobStar = exports.hasGlobStar = exports.getBaseDirectory = exports.isPatternRelatedToParentDirectory = exports.getPatternsOutsideCurrentDirectory = exports.getPatternsInsideCurrentDirectory = exports.getPositivePatterns = exports.getNegativePatterns = exports.isPositivePattern = exports.isNegativePattern = exports.convertToNegativePattern = exports.convertToPositivePattern = exports.isDynamicPattern = exports.isStaticPattern = void 0;\nconst path = require(\"path\");\nconst globParent = require(\"glob-parent\");\nconst micromatch = require(\"micromatch\");\nconst GLOBSTAR = '**';\nconst ESCAPE_SYMBOL = '\\\\';\nconst COMMON_GLOB_SYMBOLS_RE = /[*?]|^!/;\nconst REGEX_CHARACTER_CLASS_SYMBOLS_RE = /\\[[^[]*]/;\nconst REGEX_GROUP_SYMBOLS_RE = /(?:^|[^!*+?@])\\([^(]*\\|[^|]*\\)/;\nconst GLOB_EXTENSION_SYMBOLS_RE = /[!*+?@]\\([^(]*\\)/;\nconst BRACE_EXPANSION_SEPARATORS_RE = /,|\\.\\./;\n/**\n * Matches a sequence of two or more consecutive slashes, excluding the first two slashes at the beginning of the string.\n * The latter is due to the presence of the device path at the beginning of the UNC path.\n */\nconst DOUBLE_SLASH_RE = /(?!^)\\/{2,}/g;\nfunction isStaticPattern(pattern, options = {}) {\n return !isDynamicPattern(pattern, options);\n}\nexports.isStaticPattern = isStaticPattern;\nfunction isDynamicPattern(pattern, options = {}) {\n /**\n * A special case with an empty string is necessary for matching patterns that start with a forward slash.\n * An empty string cannot be a dynamic pattern.\n * For example, the pattern `/lib/*` will be spread into parts: '', 'lib', '*'.\n */\n if (pattern === '') {\n return false;\n }\n /**\n * When the `caseSensitiveMatch` option is disabled, all patterns must be marked as dynamic, because we cannot check\n * filepath directly (without read directory).\n */\n if (options.caseSensitiveMatch === false || pattern.includes(ESCAPE_SYMBOL)) {\n return true;\n }\n if (COMMON_GLOB_SYMBOLS_RE.test(pattern) || REGEX_CHARACTER_CLASS_SYMBOLS_RE.test(pattern) || REGEX_GROUP_SYMBOLS_RE.test(pattern)) {\n return true;\n }\n if (options.extglob !== false && GLOB_EXTENSION_SYMBOLS_RE.test(pattern)) {\n return true;\n }\n if (options.braceExpansion !== false && hasBraceExpansion(pattern)) {\n return true;\n }\n return false;\n}\nexports.isDynamicPattern = isDynamicPattern;\nfunction hasBraceExpansion(pattern) {\n const openingBraceIndex = pattern.indexOf('{');\n if (openingBraceIndex === -1) {\n return false;\n }\n const closingBraceIndex = pattern.indexOf('}', openingBraceIndex + 1);\n if (closingBraceIndex === -1) {\n return false;\n }\n const braceContent = pattern.slice(openingBraceIndex, closingBraceIndex);\n return BRACE_EXPANSION_SEPARATORS_RE.test(braceContent);\n}\nfunction convertToPositivePattern(pattern) {\n return isNegativePattern(pattern) ? pattern.slice(1) : pattern;\n}\nexports.convertToPositivePattern = convertToPositivePattern;\nfunction convertToNegativePattern(pattern) {\n return '!' + pattern;\n}\nexports.convertToNegativePattern = convertToNegativePattern;\nfunction isNegativePattern(pattern) {\n return pattern.startsWith('!') && pattern[1] !== '(';\n}\nexports.isNegativePattern = isNegativePattern;\nfunction isPositivePattern(pattern) {\n return !isNegativePattern(pattern);\n}\nexports.isPositivePattern = isPositivePattern;\nfunction getNegativePatterns(patterns) {\n return patterns.filter(isNegativePattern);\n}\nexports.getNegativePatterns = getNegativePatterns;\nfunction getPositivePatterns(patterns) {\n return patterns.filter(isPositivePattern);\n}\nexports.getPositivePatterns = getPositivePatterns;\n/**\n * Returns patterns that can be applied inside the current directory.\n *\n * @example\n * // ['./*', '*', 'a/*']\n * getPatternsInsideCurrentDirectory(['./*', '*', 'a/*', '../*', './../*'])\n */\nfunction getPatternsInsideCurrentDirectory(patterns) {\n return patterns.filter((pattern) => !isPatternRelatedToParentDirectory(pattern));\n}\nexports.getPatternsInsideCurrentDirectory = getPatternsInsideCurrentDirectory;\n/**\n * Returns patterns to be expanded relative to (outside) the current directory.\n *\n * @example\n * // ['../*', './../*']\n * getPatternsInsideCurrentDirectory(['./*', '*', 'a/*', '../*', './../*'])\n */\nfunction getPatternsOutsideCurrentDirectory(patterns) {\n return patterns.filter(isPatternRelatedToParentDirectory);\n}\nexports.getPatternsOutsideCurrentDirectory = getPatternsOutsideCurrentDirectory;\nfunction isPatternRelatedToParentDirectory(pattern) {\n return pattern.startsWith('..') || pattern.startsWith('./..');\n}\nexports.isPatternRelatedToParentDirectory = isPatternRelatedToParentDirectory;\nfunction getBaseDirectory(pattern) {\n return globParent(pattern, { flipBackslashes: false });\n}\nexports.getBaseDirectory = getBaseDirectory;\nfunction hasGlobStar(pattern) {\n return pattern.includes(GLOBSTAR);\n}\nexports.hasGlobStar = hasGlobStar;\nfunction endsWithSlashGlobStar(pattern) {\n return pattern.endsWith('/' + GLOBSTAR);\n}\nexports.endsWithSlashGlobStar = endsWithSlashGlobStar;\nfunction isAffectDepthOfReadingPattern(pattern) {\n const basename = path.basename(pattern);\n return endsWithSlashGlobStar(pattern) || isStaticPattern(basename);\n}\nexports.isAffectDepthOfReadingPattern = isAffectDepthOfReadingPattern;\nfunction expandPatternsWithBraceExpansion(patterns) {\n return patterns.reduce((collection, pattern) => {\n return collection.concat(expandBraceExpansion(pattern));\n }, []);\n}\nexports.expandPatternsWithBraceExpansion = expandPatternsWithBraceExpansion;\nfunction expandBraceExpansion(pattern) {\n const patterns = micromatch.braces(pattern, { expand: true, nodupes: true, keepEscaping: true });\n /**\n * Sort the patterns by length so that the same depth patterns are processed side by side.\n * `a/{b,}/{c,}/*` \u2013 `['a///*', 'a/b//*', 'a//c/*', 'a/b/c/*']`\n */\n patterns.sort((a, b) => a.length - b.length);\n /**\n * Micromatch can return an empty string in the case of patterns like `{a,}`.\n */\n return patterns.filter((pattern) => pattern !== '');\n}\nexports.expandBraceExpansion = expandBraceExpansion;\nfunction getPatternParts(pattern, options) {\n let { parts } = micromatch.scan(pattern, Object.assign(Object.assign({}, options), { parts: true }));\n /**\n * The scan method returns an empty array in some cases.\n * See micromatch/picomatch#58 for more details.\n */\n if (parts.length === 0) {\n parts = [pattern];\n }\n /**\n * The scan method does not return an empty part for the pattern with a forward slash.\n * This is another part of micromatch/picomatch#58.\n */\n if (parts[0].startsWith('/')) {\n parts[0] = parts[0].slice(1);\n parts.unshift('');\n }\n return parts;\n}\nexports.getPatternParts = getPatternParts;\nfunction makeRe(pattern, options) {\n return micromatch.makeRe(pattern, options);\n}\nexports.makeRe = makeRe;\nfunction convertPatternsToRe(patterns, options) {\n return patterns.map((pattern) => makeRe(pattern, options));\n}\nexports.convertPatternsToRe = convertPatternsToRe;\nfunction matchAny(entry, patternsRe) {\n return patternsRe.some((patternRe) => patternRe.test(entry));\n}\nexports.matchAny = matchAny;\n/**\n * This package only works with forward slashes as a path separator.\n * Because of this, we cannot use the standard `path.normalize` method, because on Windows platform it will use of backslashes.\n */\nfunction removeDuplicateSlashes(pattern) {\n return pattern.replace(DOUBLE_SLASH_RE, '/');\n}\nexports.removeDuplicateSlashes = removeDuplicateSlashes;\nfunction partitionAbsoluteAndRelative(patterns) {\n const absolute = [];\n const relative = [];\n for (const pattern of patterns) {\n if (isAbsolute(pattern)) {\n absolute.push(pattern);\n }\n else {\n relative.push(pattern);\n }\n }\n return [absolute, relative];\n}\nexports.partitionAbsoluteAndRelative = partitionAbsoluteAndRelative;\nfunction isAbsolute(pattern) {\n return path.isAbsolute(pattern);\n}\nexports.isAbsolute = isAbsolute;\n", "'use strict'\n/*\n * merge2\n * https://github.com/teambition/merge2\n *\n * Copyright (c) 2014-2020 Teambition\n * Licensed under the MIT license.\n */\nconst Stream = require('stream')\nconst PassThrough = Stream.PassThrough\nconst slice = Array.prototype.slice\n\nmodule.exports = merge2\n\nfunction merge2 () {\n const streamsQueue = []\n const args = slice.call(arguments)\n let merging = false\n let options = args[args.length - 1]\n\n if (options && !Array.isArray(options) && options.pipe == null) {\n args.pop()\n } else {\n options = {}\n }\n\n const doEnd = options.end !== false\n const doPipeError = options.pipeError === true\n if (options.objectMode == null) {\n options.objectMode = true\n }\n if (options.highWaterMark == null) {\n options.highWaterMark = 64 * 1024\n }\n const mergedStream = PassThrough(options)\n\n function addStream () {\n for (let i = 0, len = arguments.length; i < len; i++) {\n streamsQueue.push(pauseStreams(arguments[i], options))\n }\n mergeStream()\n return this\n }\n\n function mergeStream () {\n if (merging) {\n return\n }\n merging = true\n\n let streams = streamsQueue.shift()\n if (!streams) {\n process.nextTick(endStream)\n return\n }\n if (!Array.isArray(streams)) {\n streams = [streams]\n }\n\n let pipesCount = streams.length + 1\n\n function next () {\n if (--pipesCount > 0) {\n return\n }\n merging = false\n mergeStream()\n }\n\n function pipe (stream) {\n function onend () {\n stream.removeListener('merge2UnpipeEnd', onend)\n stream.removeListener('end', onend)\n if (doPipeError) {\n stream.removeListener('error', onerror)\n }\n next()\n }\n function onerror (err) {\n mergedStream.emit('error', err)\n }\n // skip ended stream\n if (stream._readableState.endEmitted) {\n return next()\n }\n\n stream.on('merge2UnpipeEnd', onend)\n stream.on('end', onend)\n\n if (doPipeError) {\n stream.on('error', onerror)\n }\n\n stream.pipe(mergedStream, { end: false })\n // compatible for old stream\n stream.resume()\n }\n\n for (let i = 0; i < streams.length; i++) {\n pipe(streams[i])\n }\n\n next()\n }\n\n function endStream () {\n merging = false\n // emit 'queueDrain' when all streams merged.\n mergedStream.emit('queueDrain')\n if (doEnd) {\n mergedStream.end()\n }\n }\n\n mergedStream.setMaxListeners(0)\n mergedStream.add = addStream\n mergedStream.on('unpipe', function (stream) {\n stream.emit('merge2UnpipeEnd')\n })\n\n if (args.length) {\n addStream.apply(null, args)\n }\n return mergedStream\n}\n\n// check and pause streams for pipe.\nfunction pauseStreams (streams, options) {\n if (!Array.isArray(streams)) {\n // Backwards-compat with old-style streams\n if (!streams._readableState && streams.pipe) {\n streams = streams.pipe(PassThrough(options))\n }\n if (!streams._readableState || !streams.pause || !streams.pipe) {\n throw new Error('Only readable stream can be merged.')\n }\n streams.pause()\n } else {\n for (let i = 0, len = streams.length; i < len; i++) {\n streams[i] = pauseStreams(streams[i], options)\n }\n }\n return streams\n}\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.merge = void 0;\nconst merge2 = require(\"merge2\");\nfunction merge(streams) {\n const mergedStream = merge2(streams);\n streams.forEach((stream) => {\n stream.once('error', (error) => mergedStream.emit('error', error));\n });\n mergedStream.once('close', () => propagateCloseEventToSources(streams));\n mergedStream.once('end', () => propagateCloseEventToSources(streams));\n return mergedStream;\n}\nexports.merge = merge;\nfunction propagateCloseEventToSources(streams) {\n streams.forEach((stream) => stream.emit('close'));\n}\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isEmpty = exports.isString = void 0;\nfunction isString(input) {\n return typeof input === 'string';\n}\nexports.isString = isString;\nfunction isEmpty(input) {\n return input === '';\n}\nexports.isEmpty = isEmpty;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.string = exports.stream = exports.pattern = exports.path = exports.fs = exports.errno = exports.array = void 0;\nconst array = require(\"./array\");\nexports.array = array;\nconst errno = require(\"./errno\");\nexports.errno = errno;\nconst fs = require(\"./fs\");\nexports.fs = fs;\nconst path = require(\"./path\");\nexports.path = path;\nconst pattern = require(\"./pattern\");\nexports.pattern = pattern;\nconst stream = require(\"./stream\");\nexports.stream = stream;\nconst string = require(\"./string\");\nexports.string = string;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.convertPatternGroupToTask = exports.convertPatternGroupsToTasks = exports.groupPatternsByBaseDirectory = exports.getNegativePatternsAsPositive = exports.getPositivePatterns = exports.convertPatternsToTasks = exports.generate = void 0;\nconst utils = require(\"../utils\");\nfunction generate(input, settings) {\n const patterns = processPatterns(input, settings);\n const ignore = processPatterns(settings.ignore, settings);\n const positivePatterns = getPositivePatterns(patterns);\n const negativePatterns = getNegativePatternsAsPositive(patterns, ignore);\n const staticPatterns = positivePatterns.filter((pattern) => utils.pattern.isStaticPattern(pattern, settings));\n const dynamicPatterns = positivePatterns.filter((pattern) => utils.pattern.isDynamicPattern(pattern, settings));\n const staticTasks = convertPatternsToTasks(staticPatterns, negativePatterns, /* dynamic */ false);\n const dynamicTasks = convertPatternsToTasks(dynamicPatterns, negativePatterns, /* dynamic */ true);\n return staticTasks.concat(dynamicTasks);\n}\nexports.generate = generate;\nfunction processPatterns(input, settings) {\n let patterns = input;\n /**\n * The original pattern like `{,*,**,a/*}` can lead to problems checking the depth when matching entry\n * and some problems with the micromatch package (see fast-glob issues: #365, #394).\n *\n * To solve this problem, we expand all patterns containing brace expansion. This can lead to a slight slowdown\n * in matching in the case of a large set of patterns after expansion.\n */\n if (settings.braceExpansion) {\n patterns = utils.pattern.expandPatternsWithBraceExpansion(patterns);\n }\n /**\n * If the `baseNameMatch` option is enabled, we must add globstar to patterns, so that they can be used\n * at any nesting level.\n *\n * We do this here, because otherwise we have to complicate the filtering logic. For example, we need to change\n * the pattern in the filter before creating a regular expression. There is no need to change the patterns\n * in the application. Only on the input.\n */\n if (settings.baseNameMatch) {\n patterns = patterns.map((pattern) => pattern.includes('/') ? pattern : `**/${pattern}`);\n }\n /**\n * This method also removes duplicate slashes that may have been in the pattern or formed as a result of expansion.\n */\n return patterns.map((pattern) => utils.pattern.removeDuplicateSlashes(pattern));\n}\n/**\n * Returns tasks grouped by basic pattern directories.\n *\n * Patterns that can be found inside (`./`) and outside (`../`) the current directory are handled separately.\n * This is necessary because directory traversal starts at the base directory and goes deeper.\n */\nfunction convertPatternsToTasks(positive, negative, dynamic) {\n const tasks = [];\n const patternsOutsideCurrentDirectory = utils.pattern.getPatternsOutsideCurrentDirectory(positive);\n const patternsInsideCurrentDirectory = utils.pattern.getPatternsInsideCurrentDirectory(positive);\n const outsideCurrentDirectoryGroup = groupPatternsByBaseDirectory(patternsOutsideCurrentDirectory);\n const insideCurrentDirectoryGroup = groupPatternsByBaseDirectory(patternsInsideCurrentDirectory);\n tasks.push(...convertPatternGroupsToTasks(outsideCurrentDirectoryGroup, negative, dynamic));\n /*\n * For the sake of reducing future accesses to the file system, we merge all tasks within the current directory\n * into a global task, if at least one pattern refers to the root (`.`). In this case, the global task covers the rest.\n */\n if ('.' in insideCurrentDirectoryGroup) {\n tasks.push(convertPatternGroupToTask('.', patternsInsideCurrentDirectory, negative, dynamic));\n }\n else {\n tasks.push(...convertPatternGroupsToTasks(insideCurrentDirectoryGroup, negative, dynamic));\n }\n return tasks;\n}\nexports.convertPatternsToTasks = convertPatternsToTasks;\nfunction getPositivePatterns(patterns) {\n return utils.pattern.getPositivePatterns(patterns);\n}\nexports.getPositivePatterns = getPositivePatterns;\nfunction getNegativePatternsAsPositive(patterns, ignore) {\n const negative = utils.pattern.getNegativePatterns(patterns).concat(ignore);\n const positive = negative.map(utils.pattern.convertToPositivePattern);\n return positive;\n}\nexports.getNegativePatternsAsPositive = getNegativePatternsAsPositive;\nfunction groupPatternsByBaseDirectory(patterns) {\n const group = {};\n return patterns.reduce((collection, pattern) => {\n const base = utils.pattern.getBaseDirectory(pattern);\n if (base in collection) {\n collection[base].push(pattern);\n }\n else {\n collection[base] = [pattern];\n }\n return collection;\n }, group);\n}\nexports.groupPatternsByBaseDirectory = groupPatternsByBaseDirectory;\nfunction convertPatternGroupsToTasks(positive, negative, dynamic) {\n return Object.keys(positive).map((base) => {\n return convertPatternGroupToTask(base, positive[base], negative, dynamic);\n });\n}\nexports.convertPatternGroupsToTasks = convertPatternGroupsToTasks;\nfunction convertPatternGroupToTask(base, positive, negative, dynamic) {\n return {\n dynamic,\n positive,\n negative,\n base,\n patterns: [].concat(positive, negative.map(utils.pattern.convertToNegativePattern))\n };\n}\nexports.convertPatternGroupToTask = convertPatternGroupToTask;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.read = void 0;\nfunction read(path, settings, callback) {\n settings.fs.lstat(path, (lstatError, lstat) => {\n if (lstatError !== null) {\n callFailureCallback(callback, lstatError);\n return;\n }\n if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) {\n callSuccessCallback(callback, lstat);\n return;\n }\n settings.fs.stat(path, (statError, stat) => {\n if (statError !== null) {\n if (settings.throwErrorOnBrokenSymbolicLink) {\n callFailureCallback(callback, statError);\n return;\n }\n callSuccessCallback(callback, lstat);\n return;\n }\n if (settings.markSymbolicLink) {\n stat.isSymbolicLink = () => true;\n }\n callSuccessCallback(callback, stat);\n });\n });\n}\nexports.read = read;\nfunction callFailureCallback(callback, error) {\n callback(error);\n}\nfunction callSuccessCallback(callback, result) {\n callback(null, result);\n}\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.read = void 0;\nfunction read(path, settings) {\n const lstat = settings.fs.lstatSync(path);\n if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) {\n return lstat;\n }\n try {\n const stat = settings.fs.statSync(path);\n if (settings.markSymbolicLink) {\n stat.isSymbolicLink = () => true;\n }\n return stat;\n }\n catch (error) {\n if (!settings.throwErrorOnBrokenSymbolicLink) {\n return lstat;\n }\n throw error;\n }\n}\nexports.read = read;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createFileSystemAdapter = exports.FILE_SYSTEM_ADAPTER = void 0;\nconst fs = require(\"fs\");\nexports.FILE_SYSTEM_ADAPTER = {\n lstat: fs.lstat,\n stat: fs.stat,\n lstatSync: fs.lstatSync,\n statSync: fs.statSync\n};\nfunction createFileSystemAdapter(fsMethods) {\n if (fsMethods === undefined) {\n return exports.FILE_SYSTEM_ADAPTER;\n }\n return Object.assign(Object.assign({}, exports.FILE_SYSTEM_ADAPTER), fsMethods);\n}\nexports.createFileSystemAdapter = createFileSystemAdapter;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst fs = require(\"./adapters/fs\");\nclass Settings {\n constructor(_options = {}) {\n this._options = _options;\n this.followSymbolicLink = this._getValue(this._options.followSymbolicLink, true);\n this.fs = fs.createFileSystemAdapter(this._options.fs);\n this.markSymbolicLink = this._getValue(this._options.markSymbolicLink, false);\n this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true);\n }\n _getValue(option, value) {\n return option !== null && option !== void 0 ? option : value;\n }\n}\nexports.default = Settings;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.statSync = exports.stat = exports.Settings = void 0;\nconst async = require(\"./providers/async\");\nconst sync = require(\"./providers/sync\");\nconst settings_1 = require(\"./settings\");\nexports.Settings = settings_1.default;\nfunction stat(path, optionsOrSettingsOrCallback, callback) {\n if (typeof optionsOrSettingsOrCallback === 'function') {\n async.read(path, getSettings(), optionsOrSettingsOrCallback);\n return;\n }\n async.read(path, getSettings(optionsOrSettingsOrCallback), callback);\n}\nexports.stat = stat;\nfunction statSync(path, optionsOrSettings) {\n const settings = getSettings(optionsOrSettings);\n return sync.read(path, settings);\n}\nexports.statSync = statSync;\nfunction getSettings(settingsOrOptions = {}) {\n if (settingsOrOptions instanceof settings_1.default) {\n return settingsOrOptions;\n }\n return new settings_1.default(settingsOrOptions);\n}\n", "/*! queue-microtask. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */\nlet promise\n\nmodule.exports = typeof queueMicrotask === 'function'\n ? queueMicrotask.bind(typeof window !== 'undefined' ? window : global)\n // reuse resolved promise, and allocate it lazily\n : cb => (promise || (promise = Promise.resolve()))\n .then(cb)\n .catch(err => setTimeout(() => { throw err }, 0))\n", "/*! run-parallel. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */\nmodule.exports = runParallel\n\nconst queueMicrotask = require('queue-microtask')\n\nfunction runParallel (tasks, cb) {\n let results, pending, keys\n let isSync = true\n\n if (Array.isArray(tasks)) {\n results = []\n pending = tasks.length\n } else {\n keys = Object.keys(tasks)\n results = {}\n pending = keys.length\n }\n\n function done (err) {\n function end () {\n if (cb) cb(err, results)\n cb = null\n }\n if (isSync) queueMicrotask(end)\n else end()\n }\n\n function each (i, err, result) {\n results[i] = result\n if (--pending === 0 || err) {\n done(err)\n }\n }\n\n if (!pending) {\n // empty\n done(null)\n } else if (keys) {\n // object\n keys.forEach(function (key) {\n tasks[key](function (err, result) { each(key, err, result) })\n })\n } else {\n // array\n tasks.forEach(function (task, i) {\n task(function (err, result) { each(i, err, result) })\n })\n }\n\n isSync = false\n}\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.IS_SUPPORT_READDIR_WITH_FILE_TYPES = void 0;\nconst NODE_PROCESS_VERSION_PARTS = process.versions.node.split('.');\nif (NODE_PROCESS_VERSION_PARTS[0] === undefined || NODE_PROCESS_VERSION_PARTS[1] === undefined) {\n throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);\n}\nconst MAJOR_VERSION = Number.parseInt(NODE_PROCESS_VERSION_PARTS[0], 10);\nconst MINOR_VERSION = Number.parseInt(NODE_PROCESS_VERSION_PARTS[1], 10);\nconst SUPPORTED_MAJOR_VERSION = 10;\nconst SUPPORTED_MINOR_VERSION = 10;\nconst IS_MATCHED_BY_MAJOR = MAJOR_VERSION > SUPPORTED_MAJOR_VERSION;\nconst IS_MATCHED_BY_MAJOR_AND_MINOR = MAJOR_VERSION === SUPPORTED_MAJOR_VERSION && MINOR_VERSION >= SUPPORTED_MINOR_VERSION;\n/**\n * IS `true` for Node.js 10.10 and greater.\n */\nexports.IS_SUPPORT_READDIR_WITH_FILE_TYPES = IS_MATCHED_BY_MAJOR || IS_MATCHED_BY_MAJOR_AND_MINOR;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createDirentFromStats = void 0;\nclass DirentFromStats {\n constructor(name, stats) {\n this.name = name;\n this.isBlockDevice = stats.isBlockDevice.bind(stats);\n this.isCharacterDevice = stats.isCharacterDevice.bind(stats);\n this.isDirectory = stats.isDirectory.bind(stats);\n this.isFIFO = stats.isFIFO.bind(stats);\n this.isFile = stats.isFile.bind(stats);\n this.isSocket = stats.isSocket.bind(stats);\n this.isSymbolicLink = stats.isSymbolicLink.bind(stats);\n }\n}\nfunction createDirentFromStats(name, stats) {\n return new DirentFromStats(name, stats);\n}\nexports.createDirentFromStats = createDirentFromStats;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.fs = void 0;\nconst fs = require(\"./fs\");\nexports.fs = fs;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.joinPathSegments = void 0;\nfunction joinPathSegments(a, b, separator) {\n /**\n * The correct handling of cases when the first segment is a root (`/`, `C:/`) or UNC path (`//?/C:/`).\n */\n if (a.endsWith(separator)) {\n return a + b;\n }\n return a + separator + b;\n}\nexports.joinPathSegments = joinPathSegments;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.readdir = exports.readdirWithFileTypes = exports.read = void 0;\nconst fsStat = require(\"@nodelib/fs.stat\");\nconst rpl = require(\"run-parallel\");\nconst constants_1 = require(\"../constants\");\nconst utils = require(\"../utils\");\nconst common = require(\"./common\");\nfunction read(directory, settings, callback) {\n if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {\n readdirWithFileTypes(directory, settings, callback);\n return;\n }\n readdir(directory, settings, callback);\n}\nexports.read = read;\nfunction readdirWithFileTypes(directory, settings, callback) {\n settings.fs.readdir(directory, { withFileTypes: true }, (readdirError, dirents) => {\n if (readdirError !== null) {\n callFailureCallback(callback, readdirError);\n return;\n }\n const entries = dirents.map((dirent) => ({\n dirent,\n name: dirent.name,\n path: common.joinPathSegments(directory, dirent.name, settings.pathSegmentSeparator)\n }));\n if (!settings.followSymbolicLinks) {\n callSuccessCallback(callback, entries);\n return;\n }\n const tasks = entries.map((entry) => makeRplTaskEntry(entry, settings));\n rpl(tasks, (rplError, rplEntries) => {\n if (rplError !== null) {\n callFailureCallback(callback, rplError);\n return;\n }\n callSuccessCallback(callback, rplEntries);\n });\n });\n}\nexports.readdirWithFileTypes = readdirWithFileTypes;\nfunction makeRplTaskEntry(entry, settings) {\n return (done) => {\n if (!entry.dirent.isSymbolicLink()) {\n done(null, entry);\n return;\n }\n settings.fs.stat(entry.path, (statError, stats) => {\n if (statError !== null) {\n if (settings.throwErrorOnBrokenSymbolicLink) {\n done(statError);\n return;\n }\n done(null, entry);\n return;\n }\n entry.dirent = utils.fs.createDirentFromStats(entry.name, stats);\n done(null, entry);\n });\n };\n}\nfunction readdir(directory, settings, callback) {\n settings.fs.readdir(directory, (readdirError, names) => {\n if (readdirError !== null) {\n callFailureCallback(callback, readdirError);\n return;\n }\n const tasks = names.map((name) => {\n const path = common.joinPathSegments(directory, name, settings.pathSegmentSeparator);\n return (done) => {\n fsStat.stat(path, settings.fsStatSettings, (error, stats) => {\n if (error !== null) {\n done(error);\n return;\n }\n const entry = {\n name,\n path,\n dirent: utils.fs.createDirentFromStats(name, stats)\n };\n if (settings.stats) {\n entry.stats = stats;\n }\n done(null, entry);\n });\n };\n });\n rpl(tasks, (rplError, entries) => {\n if (rplError !== null) {\n callFailureCallback(callback, rplError);\n return;\n }\n callSuccessCallback(callback, entries);\n });\n });\n}\nexports.readdir = readdir;\nfunction callFailureCallback(callback, error) {\n callback(error);\n}\nfunction callSuccessCallback(callback, result) {\n callback(null, result);\n}\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.readdir = exports.readdirWithFileTypes = exports.read = void 0;\nconst fsStat = require(\"@nodelib/fs.stat\");\nconst constants_1 = require(\"../constants\");\nconst utils = require(\"../utils\");\nconst common = require(\"./common\");\nfunction read(directory, settings) {\n if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {\n return readdirWithFileTypes(directory, settings);\n }\n return readdir(directory, settings);\n}\nexports.read = read;\nfunction readdirWithFileTypes(directory, settings) {\n const dirents = settings.fs.readdirSync(directory, { withFileTypes: true });\n return dirents.map((dirent) => {\n const entry = {\n dirent,\n name: dirent.name,\n path: common.joinPathSegments(directory, dirent.name, settings.pathSegmentSeparator)\n };\n if (entry.dirent.isSymbolicLink() && settings.followSymbolicLinks) {\n try {\n const stats = settings.fs.statSync(entry.path);\n entry.dirent = utils.fs.createDirentFromStats(entry.name, stats);\n }\n catch (error) {\n if (settings.throwErrorOnBrokenSymbolicLink) {\n throw error;\n }\n }\n }\n return entry;\n });\n}\nexports.readdirWithFileTypes = readdirWithFileTypes;\nfunction readdir(directory, settings) {\n const names = settings.fs.readdirSync(directory);\n return names.map((name) => {\n const entryPath = common.joinPathSegments(directory, name, settings.pathSegmentSeparator);\n const stats = fsStat.statSync(entryPath, settings.fsStatSettings);\n const entry = {\n name,\n path: entryPath,\n dirent: utils.fs.createDirentFromStats(name, stats)\n };\n if (settings.stats) {\n entry.stats = stats;\n }\n return entry;\n });\n}\nexports.readdir = readdir;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createFileSystemAdapter = exports.FILE_SYSTEM_ADAPTER = void 0;\nconst fs = require(\"fs\");\nexports.FILE_SYSTEM_ADAPTER = {\n lstat: fs.lstat,\n stat: fs.stat,\n lstatSync: fs.lstatSync,\n statSync: fs.statSync,\n readdir: fs.readdir,\n readdirSync: fs.readdirSync\n};\nfunction createFileSystemAdapter(fsMethods) {\n if (fsMethods === undefined) {\n return exports.FILE_SYSTEM_ADAPTER;\n }\n return Object.assign(Object.assign({}, exports.FILE_SYSTEM_ADAPTER), fsMethods);\n}\nexports.createFileSystemAdapter = createFileSystemAdapter;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst path = require(\"path\");\nconst fsStat = require(\"@nodelib/fs.stat\");\nconst fs = require(\"./adapters/fs\");\nclass Settings {\n constructor(_options = {}) {\n this._options = _options;\n this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, false);\n this.fs = fs.createFileSystemAdapter(this._options.fs);\n this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path.sep);\n this.stats = this._getValue(this._options.stats, false);\n this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true);\n this.fsStatSettings = new fsStat.Settings({\n followSymbolicLink: this.followSymbolicLinks,\n fs: this.fs,\n throwErrorOnBrokenSymbolicLink: this.throwErrorOnBrokenSymbolicLink\n });\n }\n _getValue(option, value) {\n return option !== null && option !== void 0 ? option : value;\n }\n}\nexports.default = Settings;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Settings = exports.scandirSync = exports.scandir = void 0;\nconst async = require(\"./providers/async\");\nconst sync = require(\"./providers/sync\");\nconst settings_1 = require(\"./settings\");\nexports.Settings = settings_1.default;\nfunction scandir(path, optionsOrSettingsOrCallback, callback) {\n if (typeof optionsOrSettingsOrCallback === 'function') {\n async.read(path, getSettings(), optionsOrSettingsOrCallback);\n return;\n }\n async.read(path, getSettings(optionsOrSettingsOrCallback), callback);\n}\nexports.scandir = scandir;\nfunction scandirSync(path, optionsOrSettings) {\n const settings = getSettings(optionsOrSettings);\n return sync.read(path, settings);\n}\nexports.scandirSync = scandirSync;\nfunction getSettings(settingsOrOptions = {}) {\n if (settingsOrOptions instanceof settings_1.default) {\n return settingsOrOptions;\n }\n return new settings_1.default(settingsOrOptions);\n}\n", "'use strict'\n\nfunction reusify (Constructor) {\n var head = new Constructor()\n var tail = head\n\n function get () {\n var current = head\n\n if (current.next) {\n head = current.next\n } else {\n head = new Constructor()\n tail = head\n }\n\n current.next = null\n\n return current\n }\n\n function release (obj) {\n tail.next = obj\n tail = obj\n }\n\n return {\n get: get,\n release: release\n }\n}\n\nmodule.exports = reusify\n", "'use strict'\n\n/* eslint-disable no-var */\n\nvar reusify = require('reusify')\n\nfunction fastqueue (context, worker, _concurrency) {\n if (typeof context === 'function') {\n _concurrency = worker\n worker = context\n context = null\n }\n\n if (!(_concurrency >= 1)) {\n throw new Error('fastqueue concurrency must be equal to or greater than 1')\n }\n\n var cache = reusify(Task)\n var queueHead = null\n var queueTail = null\n var _running = 0\n var errorHandler = null\n\n var self = {\n push: push,\n drain: noop,\n saturated: noop,\n pause: pause,\n paused: false,\n\n get concurrency () {\n return _concurrency\n },\n set concurrency (value) {\n if (!(value >= 1)) {\n throw new Error('fastqueue concurrency must be equal to or greater than 1')\n }\n _concurrency = value\n\n if (self.paused) return\n for (; queueHead && _running < _concurrency;) {\n _running++\n release()\n }\n },\n\n running: running,\n resume: resume,\n idle: idle,\n length: length,\n getQueue: getQueue,\n unshift: unshift,\n empty: noop,\n kill: kill,\n killAndDrain: killAndDrain,\n error: error\n }\n\n return self\n\n function running () {\n return _running\n }\n\n function pause () {\n self.paused = true\n }\n\n function length () {\n var current = queueHead\n var counter = 0\n\n while (current) {\n current = current.next\n counter++\n }\n\n return counter\n }\n\n function getQueue () {\n var current = queueHead\n var tasks = []\n\n while (current) {\n tasks.push(current.value)\n current = current.next\n }\n\n return tasks\n }\n\n function resume () {\n if (!self.paused) return\n self.paused = false\n if (queueHead === null) {\n _running++\n release()\n return\n }\n for (; queueHead && _running < _concurrency;) {\n _running++\n release()\n }\n }\n\n function idle () {\n return _running === 0 && self.length() === 0\n }\n\n function push (value, done) {\n var current = cache.get()\n\n current.context = context\n current.release = release\n current.value = value\n current.callback = done || noop\n current.errorHandler = errorHandler\n\n if (_running >= _concurrency || self.paused) {\n if (queueTail) {\n queueTail.next = current\n queueTail = current\n } else {\n queueHead = current\n queueTail = current\n self.saturated()\n }\n } else {\n _running++\n worker.call(context, current.value, current.worked)\n }\n }\n\n function unshift (value, done) {\n var current = cache.get()\n\n current.context = context\n current.release = release\n current.value = value\n current.callback = done || noop\n current.errorHandler = errorHandler\n\n if (_running >= _concurrency || self.paused) {\n if (queueHead) {\n current.next = queueHead\n queueHead = current\n } else {\n queueHead = current\n queueTail = current\n self.saturated()\n }\n } else {\n _running++\n worker.call(context, current.value, current.worked)\n }\n }\n\n function release (holder) {\n if (holder) {\n cache.release(holder)\n }\n var next = queueHead\n if (next && _running <= _concurrency) {\n if (!self.paused) {\n if (queueTail === queueHead) {\n queueTail = null\n }\n queueHead = next.next\n next.next = null\n worker.call(context, next.value, next.worked)\n if (queueTail === null) {\n self.empty()\n }\n } else {\n _running--\n }\n } else if (--_running === 0) {\n self.drain()\n }\n }\n\n function kill () {\n queueHead = null\n queueTail = null\n self.drain = noop\n }\n\n function killAndDrain () {\n queueHead = null\n queueTail = null\n self.drain()\n self.drain = noop\n }\n\n function error (handler) {\n errorHandler = handler\n }\n}\n\nfunction noop () {}\n\nfunction Task () {\n this.value = null\n this.callback = noop\n this.next = null\n this.release = noop\n this.context = null\n this.errorHandler = null\n\n var self = this\n\n this.worked = function worked (err, result) {\n var callback = self.callback\n var errorHandler = self.errorHandler\n var val = self.value\n self.value = null\n self.callback = noop\n if (self.errorHandler) {\n errorHandler(err, val)\n }\n callback.call(self.context, err, result)\n self.release(self)\n }\n}\n\nfunction queueAsPromised (context, worker, _concurrency) {\n if (typeof context === 'function') {\n _concurrency = worker\n worker = context\n context = null\n }\n\n function asyncWrapper (arg, cb) {\n worker.call(this, arg)\n .then(function (res) {\n cb(null, res)\n }, cb)\n }\n\n var queue = fastqueue(context, asyncWrapper, _concurrency)\n\n var pushCb = queue.push\n var unshiftCb = queue.unshift\n\n queue.push = push\n queue.unshift = unshift\n queue.drained = drained\n\n return queue\n\n function push (value) {\n var p = new Promise(function (resolve, reject) {\n pushCb(value, function (err, result) {\n if (err) {\n reject(err)\n return\n }\n resolve(result)\n })\n })\n\n // Let's fork the promise chain to\n // make the error bubble up to the user but\n // not lead to a unhandledRejection\n p.catch(noop)\n\n return p\n }\n\n function unshift (value) {\n var p = new Promise(function (resolve, reject) {\n unshiftCb(value, function (err, result) {\n if (err) {\n reject(err)\n return\n }\n resolve(result)\n })\n })\n\n // Let's fork the promise chain to\n // make the error bubble up to the user but\n // not lead to a unhandledRejection\n p.catch(noop)\n\n return p\n }\n\n function drained () {\n var p = new Promise(function (resolve) {\n process.nextTick(function () {\n if (queue.idle()) {\n resolve()\n } else {\n var previousDrain = queue.drain\n queue.drain = function () {\n if (typeof previousDrain === 'function') previousDrain()\n resolve()\n queue.drain = previousDrain\n }\n }\n })\n })\n\n return p\n }\n}\n\nmodule.exports = fastqueue\nmodule.exports.promise = queueAsPromised\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.joinPathSegments = exports.replacePathSegmentSeparator = exports.isAppliedFilter = exports.isFatalError = void 0;\nfunction isFatalError(settings, error) {\n if (settings.errorFilter === null) {\n return true;\n }\n return !settings.errorFilter(error);\n}\nexports.isFatalError = isFatalError;\nfunction isAppliedFilter(filter, value) {\n return filter === null || filter(value);\n}\nexports.isAppliedFilter = isAppliedFilter;\nfunction replacePathSegmentSeparator(filepath, separator) {\n return filepath.split(/[/\\\\]/).join(separator);\n}\nexports.replacePathSegmentSeparator = replacePathSegmentSeparator;\nfunction joinPathSegments(a, b, separator) {\n if (a === '') {\n return b;\n }\n /**\n * The correct handling of cases when the first segment is a root (`/`, `C:/`) or UNC path (`//?/C:/`).\n */\n if (a.endsWith(separator)) {\n return a + b;\n }\n return a + separator + b;\n}\nexports.joinPathSegments = joinPathSegments;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst common = require(\"./common\");\nclass Reader {\n constructor(_root, _settings) {\n this._root = _root;\n this._settings = _settings;\n this._root = common.replacePathSegmentSeparator(_root, _settings.pathSegmentSeparator);\n }\n}\nexports.default = Reader;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst events_1 = require(\"events\");\nconst fsScandir = require(\"@nodelib/fs.scandir\");\nconst fastq = require(\"fastq\");\nconst common = require(\"./common\");\nconst reader_1 = require(\"./reader\");\nclass AsyncReader extends reader_1.default {\n constructor(_root, _settings) {\n super(_root, _settings);\n this._settings = _settings;\n this._scandir = fsScandir.scandir;\n this._emitter = new events_1.EventEmitter();\n this._queue = fastq(this._worker.bind(this), this._settings.concurrency);\n this._isFatalError = false;\n this._isDestroyed = false;\n this._queue.drain = () => {\n if (!this._isFatalError) {\n this._emitter.emit('end');\n }\n };\n }\n read() {\n this._isFatalError = false;\n this._isDestroyed = false;\n setImmediate(() => {\n this._pushToQueue(this._root, this._settings.basePath);\n });\n return this._emitter;\n }\n get isDestroyed() {\n return this._isDestroyed;\n }\n destroy() {\n if (this._isDestroyed) {\n throw new Error('The reader is already destroyed');\n }\n this._isDestroyed = true;\n this._queue.killAndDrain();\n }\n onEntry(callback) {\n this._emitter.on('entry', callback);\n }\n onError(callback) {\n this._emitter.once('error', callback);\n }\n onEnd(callback) {\n this._emitter.once('end', callback);\n }\n _pushToQueue(directory, base) {\n const queueItem = { directory, base };\n this._queue.push(queueItem, (error) => {\n if (error !== null) {\n this._handleError(error);\n }\n });\n }\n _worker(item, done) {\n this._scandir(item.directory, this._settings.fsScandirSettings, (error, entries) => {\n if (error !== null) {\n done(error, undefined);\n return;\n }\n for (const entry of entries) {\n this._handleEntry(entry, item.base);\n }\n done(null, undefined);\n });\n }\n _handleError(error) {\n if (this._isDestroyed || !common.isFatalError(this._settings, error)) {\n return;\n }\n this._isFatalError = true;\n this._isDestroyed = true;\n this._emitter.emit('error', error);\n }\n _handleEntry(entry, base) {\n if (this._isDestroyed || this._isFatalError) {\n return;\n }\n const fullpath = entry.path;\n if (base !== undefined) {\n entry.path = common.joinPathSegments(base, entry.name, this._settings.pathSegmentSeparator);\n }\n if (common.isAppliedFilter(this._settings.entryFilter, entry)) {\n this._emitEntry(entry);\n }\n if (entry.dirent.isDirectory() && common.isAppliedFilter(this._settings.deepFilter, entry)) {\n this._pushToQueue(fullpath, base === undefined ? undefined : entry.path);\n }\n }\n _emitEntry(entry) {\n this._emitter.emit('entry', entry);\n }\n}\nexports.default = AsyncReader;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst async_1 = require(\"../readers/async\");\nclass AsyncProvider {\n constructor(_root, _settings) {\n this._root = _root;\n this._settings = _settings;\n this._reader = new async_1.default(this._root, this._settings);\n this._storage = [];\n }\n read(callback) {\n this._reader.onError((error) => {\n callFailureCallback(callback, error);\n });\n this._reader.onEntry((entry) => {\n this._storage.push(entry);\n });\n this._reader.onEnd(() => {\n callSuccessCallback(callback, this._storage);\n });\n this._reader.read();\n }\n}\nexports.default = AsyncProvider;\nfunction callFailureCallback(callback, error) {\n callback(error);\n}\nfunction callSuccessCallback(callback, entries) {\n callback(null, entries);\n}\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst stream_1 = require(\"stream\");\nconst async_1 = require(\"../readers/async\");\nclass StreamProvider {\n constructor(_root, _settings) {\n this._root = _root;\n this._settings = _settings;\n this._reader = new async_1.default(this._root, this._settings);\n this._stream = new stream_1.Readable({\n objectMode: true,\n read: () => { },\n destroy: () => {\n if (!this._reader.isDestroyed) {\n this._reader.destroy();\n }\n }\n });\n }\n read() {\n this._reader.onError((error) => {\n this._stream.emit('error', error);\n });\n this._reader.onEntry((entry) => {\n this._stream.push(entry);\n });\n this._reader.onEnd(() => {\n this._stream.push(null);\n });\n this._reader.read();\n return this._stream;\n }\n}\nexports.default = StreamProvider;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst fsScandir = require(\"@nodelib/fs.scandir\");\nconst common = require(\"./common\");\nconst reader_1 = require(\"./reader\");\nclass SyncReader extends reader_1.default {\n constructor() {\n super(...arguments);\n this._scandir = fsScandir.scandirSync;\n this._storage = [];\n this._queue = new Set();\n }\n read() {\n this._pushToQueue(this._root, this._settings.basePath);\n this._handleQueue();\n return this._storage;\n }\n _pushToQueue(directory, base) {\n this._queue.add({ directory, base });\n }\n _handleQueue() {\n for (const item of this._queue.values()) {\n this._handleDirectory(item.directory, item.base);\n }\n }\n _handleDirectory(directory, base) {\n try {\n const entries = this._scandir(directory, this._settings.fsScandirSettings);\n for (const entry of entries) {\n this._handleEntry(entry, base);\n }\n }\n catch (error) {\n this._handleError(error);\n }\n }\n _handleError(error) {\n if (!common.isFatalError(this._settings, error)) {\n return;\n }\n throw error;\n }\n _handleEntry(entry, base) {\n const fullpath = entry.path;\n if (base !== undefined) {\n entry.path = common.joinPathSegments(base, entry.name, this._settings.pathSegmentSeparator);\n }\n if (common.isAppliedFilter(this._settings.entryFilter, entry)) {\n this._pushToStorage(entry);\n }\n if (entry.dirent.isDirectory() && common.isAppliedFilter(this._settings.deepFilter, entry)) {\n this._pushToQueue(fullpath, base === undefined ? undefined : entry.path);\n }\n }\n _pushToStorage(entry) {\n this._storage.push(entry);\n }\n}\nexports.default = SyncReader;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst sync_1 = require(\"../readers/sync\");\nclass SyncProvider {\n constructor(_root, _settings) {\n this._root = _root;\n this._settings = _settings;\n this._reader = new sync_1.default(this._root, this._settings);\n }\n read() {\n return this._reader.read();\n }\n}\nexports.default = SyncProvider;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst path = require(\"path\");\nconst fsScandir = require(\"@nodelib/fs.scandir\");\nclass Settings {\n constructor(_options = {}) {\n this._options = _options;\n this.basePath = this._getValue(this._options.basePath, undefined);\n this.concurrency = this._getValue(this._options.concurrency, Number.POSITIVE_INFINITY);\n this.deepFilter = this._getValue(this._options.deepFilter, null);\n this.entryFilter = this._getValue(this._options.entryFilter, null);\n this.errorFilter = this._getValue(this._options.errorFilter, null);\n this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path.sep);\n this.fsScandirSettings = new fsScandir.Settings({\n followSymbolicLinks: this._options.followSymbolicLinks,\n fs: this._options.fs,\n pathSegmentSeparator: this._options.pathSegmentSeparator,\n stats: this._options.stats,\n throwErrorOnBrokenSymbolicLink: this._options.throwErrorOnBrokenSymbolicLink\n });\n }\n _getValue(option, value) {\n return option !== null && option !== void 0 ? option : value;\n }\n}\nexports.default = Settings;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Settings = exports.walkStream = exports.walkSync = exports.walk = void 0;\nconst async_1 = require(\"./providers/async\");\nconst stream_1 = require(\"./providers/stream\");\nconst sync_1 = require(\"./providers/sync\");\nconst settings_1 = require(\"./settings\");\nexports.Settings = settings_1.default;\nfunction walk(directory, optionsOrSettingsOrCallback, callback) {\n if (typeof optionsOrSettingsOrCallback === 'function') {\n new async_1.default(directory, getSettings()).read(optionsOrSettingsOrCallback);\n return;\n }\n new async_1.default(directory, getSettings(optionsOrSettingsOrCallback)).read(callback);\n}\nexports.walk = walk;\nfunction walkSync(directory, optionsOrSettings) {\n const settings = getSettings(optionsOrSettings);\n const provider = new sync_1.default(directory, settings);\n return provider.read();\n}\nexports.walkSync = walkSync;\nfunction walkStream(directory, optionsOrSettings) {\n const settings = getSettings(optionsOrSettings);\n const provider = new stream_1.default(directory, settings);\n return provider.read();\n}\nexports.walkStream = walkStream;\nfunction getSettings(settingsOrOptions = {}) {\n if (settingsOrOptions instanceof settings_1.default) {\n return settingsOrOptions;\n }\n return new settings_1.default(settingsOrOptions);\n}\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst path = require(\"path\");\nconst fsStat = require(\"@nodelib/fs.stat\");\nconst utils = require(\"../utils\");\nclass Reader {\n constructor(_settings) {\n this._settings = _settings;\n this._fsStatSettings = new fsStat.Settings({\n followSymbolicLink: this._settings.followSymbolicLinks,\n fs: this._settings.fs,\n throwErrorOnBrokenSymbolicLink: this._settings.followSymbolicLinks\n });\n }\n _getFullEntryPath(filepath) {\n return path.resolve(this._settings.cwd, filepath);\n }\n _makeEntry(stats, pattern) {\n const entry = {\n name: pattern,\n path: pattern,\n dirent: utils.fs.createDirentFromStats(pattern, stats)\n };\n if (this._settings.stats) {\n entry.stats = stats;\n }\n return entry;\n }\n _isFatalError(error) {\n return !utils.errno.isEnoentCodeError(error) && !this._settings.suppressErrors;\n }\n}\nexports.default = Reader;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst stream_1 = require(\"stream\");\nconst fsStat = require(\"@nodelib/fs.stat\");\nconst fsWalk = require(\"@nodelib/fs.walk\");\nconst reader_1 = require(\"./reader\");\nclass ReaderStream extends reader_1.default {\n constructor() {\n super(...arguments);\n this._walkStream = fsWalk.walkStream;\n this._stat = fsStat.stat;\n }\n dynamic(root, options) {\n return this._walkStream(root, options);\n }\n static(patterns, options) {\n const filepaths = patterns.map(this._getFullEntryPath, this);\n const stream = new stream_1.PassThrough({ objectMode: true });\n stream._write = (index, _enc, done) => {\n return this._getEntry(filepaths[index], patterns[index], options)\n .then((entry) => {\n if (entry !== null && options.entryFilter(entry)) {\n stream.push(entry);\n }\n if (index === filepaths.length - 1) {\n stream.end();\n }\n done();\n })\n .catch(done);\n };\n for (let i = 0; i < filepaths.length; i++) {\n stream.write(i);\n }\n return stream;\n }\n _getEntry(filepath, pattern, options) {\n return this._getStat(filepath)\n .then((stats) => this._makeEntry(stats, pattern))\n .catch((error) => {\n if (options.errorFilter(error)) {\n return null;\n }\n throw error;\n });\n }\n _getStat(filepath) {\n return new Promise((resolve, reject) => {\n this._stat(filepath, this._fsStatSettings, (error, stats) => {\n return error === null ? resolve(stats) : reject(error);\n });\n });\n }\n}\nexports.default = ReaderStream;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst fsWalk = require(\"@nodelib/fs.walk\");\nconst reader_1 = require(\"./reader\");\nconst stream_1 = require(\"./stream\");\nclass ReaderAsync extends reader_1.default {\n constructor() {\n super(...arguments);\n this._walkAsync = fsWalk.walk;\n this._readerStream = new stream_1.default(this._settings);\n }\n dynamic(root, options) {\n return new Promise((resolve, reject) => {\n this._walkAsync(root, options, (error, entries) => {\n if (error === null) {\n resolve(entries);\n }\n else {\n reject(error);\n }\n });\n });\n }\n async static(patterns, options) {\n const entries = [];\n const stream = this._readerStream.static(patterns, options);\n // After #235, replace it with an asynchronous iterator.\n return new Promise((resolve, reject) => {\n stream.once('error', reject);\n stream.on('data', (entry) => entries.push(entry));\n stream.once('end', () => resolve(entries));\n });\n }\n}\nexports.default = ReaderAsync;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst utils = require(\"../../utils\");\nclass Matcher {\n constructor(_patterns, _settings, _micromatchOptions) {\n this._patterns = _patterns;\n this._settings = _settings;\n this._micromatchOptions = _micromatchOptions;\n this._storage = [];\n this._fillStorage();\n }\n _fillStorage() {\n for (const pattern of this._patterns) {\n const segments = this._getPatternSegments(pattern);\n const sections = this._splitSegmentsIntoSections(segments);\n this._storage.push({\n complete: sections.length <= 1,\n pattern,\n segments,\n sections\n });\n }\n }\n _getPatternSegments(pattern) {\n const parts = utils.pattern.getPatternParts(pattern, this._micromatchOptions);\n return parts.map((part) => {\n const dynamic = utils.pattern.isDynamicPattern(part, this._settings);\n if (!dynamic) {\n return {\n dynamic: false,\n pattern: part\n };\n }\n return {\n dynamic: true,\n pattern: part,\n patternRe: utils.pattern.makeRe(part, this._micromatchOptions)\n };\n });\n }\n _splitSegmentsIntoSections(segments) {\n return utils.array.splitWhen(segments, (segment) => segment.dynamic && utils.pattern.hasGlobStar(segment.pattern));\n }\n}\nexports.default = Matcher;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst matcher_1 = require(\"./matcher\");\nclass PartialMatcher extends matcher_1.default {\n match(filepath) {\n const parts = filepath.split('/');\n const levels = parts.length;\n const patterns = this._storage.filter((info) => !info.complete || info.segments.length > levels);\n for (const pattern of patterns) {\n const section = pattern.sections[0];\n /**\n * In this case, the pattern has a globstar and we must read all directories unconditionally,\n * but only if the level has reached the end of the first group.\n *\n * fixtures/{a,b}/**\n * ^ true/false ^ always true\n */\n if (!pattern.complete && levels > section.length) {\n return true;\n }\n const match = parts.every((part, index) => {\n const segment = pattern.segments[index];\n if (segment.dynamic && segment.patternRe.test(part)) {\n return true;\n }\n if (!segment.dynamic && segment.pattern === part) {\n return true;\n }\n return false;\n });\n if (match) {\n return true;\n }\n }\n return false;\n }\n}\nexports.default = PartialMatcher;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst utils = require(\"../../utils\");\nconst partial_1 = require(\"../matchers/partial\");\nclass DeepFilter {\n constructor(_settings, _micromatchOptions) {\n this._settings = _settings;\n this._micromatchOptions = _micromatchOptions;\n }\n getFilter(basePath, positive, negative) {\n const matcher = this._getMatcher(positive);\n const negativeRe = this._getNegativePatternsRe(negative);\n return (entry) => this._filter(basePath, entry, matcher, negativeRe);\n }\n _getMatcher(patterns) {\n return new partial_1.default(patterns, this._settings, this._micromatchOptions);\n }\n _getNegativePatternsRe(patterns) {\n const affectDepthOfReadingPatterns = patterns.filter(utils.pattern.isAffectDepthOfReadingPattern);\n return utils.pattern.convertPatternsToRe(affectDepthOfReadingPatterns, this._micromatchOptions);\n }\n _filter(basePath, entry, matcher, negativeRe) {\n if (this._isSkippedByDeep(basePath, entry.path)) {\n return false;\n }\n if (this._isSkippedSymbolicLink(entry)) {\n return false;\n }\n const filepath = utils.path.removeLeadingDotSegment(entry.path);\n if (this._isSkippedByPositivePatterns(filepath, matcher)) {\n return false;\n }\n return this._isSkippedByNegativePatterns(filepath, negativeRe);\n }\n _isSkippedByDeep(basePath, entryPath) {\n /**\n * Avoid unnecessary depth calculations when it doesn't matter.\n */\n if (this._settings.deep === Infinity) {\n return false;\n }\n return this._getEntryLevel(basePath, entryPath) >= this._settings.deep;\n }\n _getEntryLevel(basePath, entryPath) {\n const entryPathDepth = entryPath.split('/').length;\n if (basePath === '') {\n return entryPathDepth;\n }\n const basePathDepth = basePath.split('/').length;\n return entryPathDepth - basePathDepth;\n }\n _isSkippedSymbolicLink(entry) {\n return !this._settings.followSymbolicLinks && entry.dirent.isSymbolicLink();\n }\n _isSkippedByPositivePatterns(entryPath, matcher) {\n return !this._settings.baseNameMatch && !matcher.match(entryPath);\n }\n _isSkippedByNegativePatterns(entryPath, patternsRe) {\n return !utils.pattern.matchAny(entryPath, patternsRe);\n }\n}\nexports.default = DeepFilter;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst utils = require(\"../../utils\");\nclass EntryFilter {\n constructor(_settings, _micromatchOptions) {\n this._settings = _settings;\n this._micromatchOptions = _micromatchOptions;\n this.index = new Map();\n }\n getFilter(positive, negative) {\n const [absoluteNegative, relativeNegative] = utils.pattern.partitionAbsoluteAndRelative(negative);\n const patterns = {\n positive: {\n all: utils.pattern.convertPatternsToRe(positive, this._micromatchOptions)\n },\n negative: {\n absolute: utils.pattern.convertPatternsToRe(absoluteNegative, Object.assign(Object.assign({}, this._micromatchOptions), { dot: true })),\n relative: utils.pattern.convertPatternsToRe(relativeNegative, Object.assign(Object.assign({}, this._micromatchOptions), { dot: true }))\n }\n };\n return (entry) => this._filter(entry, patterns);\n }\n _filter(entry, patterns) {\n const filepath = utils.path.removeLeadingDotSegment(entry.path);\n if (this._settings.unique && this._isDuplicateEntry(filepath)) {\n return false;\n }\n if (this._onlyFileFilter(entry) || this._onlyDirectoryFilter(entry)) {\n return false;\n }\n const isMatched = this._isMatchToPatternsSet(filepath, patterns, entry.dirent.isDirectory());\n if (this._settings.unique && isMatched) {\n this._createIndexRecord(filepath);\n }\n return isMatched;\n }\n _isDuplicateEntry(filepath) {\n return this.index.has(filepath);\n }\n _createIndexRecord(filepath) {\n this.index.set(filepath, undefined);\n }\n _onlyFileFilter(entry) {\n return this._settings.onlyFiles && !entry.dirent.isFile();\n }\n _onlyDirectoryFilter(entry) {\n return this._settings.onlyDirectories && !entry.dirent.isDirectory();\n }\n _isMatchToPatternsSet(filepath, patterns, isDirectory) {\n const isMatched = this._isMatchToPatterns(filepath, patterns.positive.all, isDirectory);\n if (!isMatched) {\n return false;\n }\n const isMatchedByRelativeNegative = this._isMatchToPatterns(filepath, patterns.negative.relative, isDirectory);\n if (isMatchedByRelativeNegative) {\n return false;\n }\n const isMatchedByAbsoluteNegative = this._isMatchToAbsoluteNegative(filepath, patterns.negative.absolute, isDirectory);\n if (isMatchedByAbsoluteNegative) {\n return false;\n }\n return true;\n }\n _isMatchToAbsoluteNegative(filepath, patternsRe, isDirectory) {\n if (patternsRe.length === 0) {\n return false;\n }\n const fullpath = utils.path.makeAbsolute(this._settings.cwd, filepath);\n return this._isMatchToPatterns(fullpath, patternsRe, isDirectory);\n }\n _isMatchToPatterns(filepath, patternsRe, isDirectory) {\n if (patternsRe.length === 0) {\n return false;\n }\n // Trying to match files and directories by patterns.\n const isMatched = utils.pattern.matchAny(filepath, patternsRe);\n // A pattern with a trailling slash can be used for directory matching.\n // To apply such pattern, we need to add a tralling slash to the path.\n if (!isMatched && isDirectory) {\n return utils.pattern.matchAny(filepath + '/', patternsRe);\n }\n return isMatched;\n }\n}\nexports.default = EntryFilter;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst utils = require(\"../../utils\");\nclass ErrorFilter {\n constructor(_settings) {\n this._settings = _settings;\n }\n getFilter() {\n return (error) => this._isNonFatalError(error);\n }\n _isNonFatalError(error) {\n return utils.errno.isEnoentCodeError(error) || this._settings.suppressErrors;\n }\n}\nexports.default = ErrorFilter;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst utils = require(\"../../utils\");\nclass EntryTransformer {\n constructor(_settings) {\n this._settings = _settings;\n }\n getTransformer() {\n return (entry) => this._transform(entry);\n }\n _transform(entry) {\n let filepath = entry.path;\n if (this._settings.absolute) {\n filepath = utils.path.makeAbsolute(this._settings.cwd, filepath);\n filepath = utils.path.unixify(filepath);\n }\n if (this._settings.markDirectories && entry.dirent.isDirectory()) {\n filepath += '/';\n }\n if (!this._settings.objectMode) {\n return filepath;\n }\n return Object.assign(Object.assign({}, entry), { path: filepath });\n }\n}\nexports.default = EntryTransformer;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst path = require(\"path\");\nconst deep_1 = require(\"./filters/deep\");\nconst entry_1 = require(\"./filters/entry\");\nconst error_1 = require(\"./filters/error\");\nconst entry_2 = require(\"./transformers/entry\");\nclass Provider {\n constructor(_settings) {\n this._settings = _settings;\n this.errorFilter = new error_1.default(this._settings);\n this.entryFilter = new entry_1.default(this._settings, this._getMicromatchOptions());\n this.deepFilter = new deep_1.default(this._settings, this._getMicromatchOptions());\n this.entryTransformer = new entry_2.default(this._settings);\n }\n _getRootDirectory(task) {\n return path.resolve(this._settings.cwd, task.base);\n }\n _getReaderOptions(task) {\n const basePath = task.base === '.' ? '' : task.base;\n return {\n basePath,\n pathSegmentSeparator: '/',\n concurrency: this._settings.concurrency,\n deepFilter: this.deepFilter.getFilter(basePath, task.positive, task.negative),\n entryFilter: this.entryFilter.getFilter(task.positive, task.negative),\n errorFilter: this.errorFilter.getFilter(),\n followSymbolicLinks: this._settings.followSymbolicLinks,\n fs: this._settings.fs,\n stats: this._settings.stats,\n throwErrorOnBrokenSymbolicLink: this._settings.throwErrorOnBrokenSymbolicLink,\n transform: this.entryTransformer.getTransformer()\n };\n }\n _getMicromatchOptions() {\n return {\n dot: this._settings.dot,\n matchBase: this._settings.baseNameMatch,\n nobrace: !this._settings.braceExpansion,\n nocase: !this._settings.caseSensitiveMatch,\n noext: !this._settings.extglob,\n noglobstar: !this._settings.globstar,\n posix: true,\n strictSlashes: false\n };\n }\n}\nexports.default = Provider;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst async_1 = require(\"../readers/async\");\nconst provider_1 = require(\"./provider\");\nclass ProviderAsync extends provider_1.default {\n constructor() {\n super(...arguments);\n this._reader = new async_1.default(this._settings);\n }\n async read(task) {\n const root = this._getRootDirectory(task);\n const options = this._getReaderOptions(task);\n const entries = await this.api(root, task, options);\n return entries.map((entry) => options.transform(entry));\n }\n api(root, task, options) {\n if (task.dynamic) {\n return this._reader.dynamic(root, options);\n }\n return this._reader.static(task.patterns, options);\n }\n}\nexports.default = ProviderAsync;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst stream_1 = require(\"stream\");\nconst stream_2 = require(\"../readers/stream\");\nconst provider_1 = require(\"./provider\");\nclass ProviderStream extends provider_1.default {\n constructor() {\n super(...arguments);\n this._reader = new stream_2.default(this._settings);\n }\n read(task) {\n const root = this._getRootDirectory(task);\n const options = this._getReaderOptions(task);\n const source = this.api(root, task, options);\n const destination = new stream_1.Readable({ objectMode: true, read: () => { } });\n source\n .once('error', (error) => destination.emit('error', error))\n .on('data', (entry) => destination.emit('data', options.transform(entry)))\n .once('end', () => destination.emit('end'));\n destination\n .once('close', () => source.destroy());\n return destination;\n }\n api(root, task, options) {\n if (task.dynamic) {\n return this._reader.dynamic(root, options);\n }\n return this._reader.static(task.patterns, options);\n }\n}\nexports.default = ProviderStream;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst fsStat = require(\"@nodelib/fs.stat\");\nconst fsWalk = require(\"@nodelib/fs.walk\");\nconst reader_1 = require(\"./reader\");\nclass ReaderSync extends reader_1.default {\n constructor() {\n super(...arguments);\n this._walkSync = fsWalk.walkSync;\n this._statSync = fsStat.statSync;\n }\n dynamic(root, options) {\n return this._walkSync(root, options);\n }\n static(patterns, options) {\n const entries = [];\n for (const pattern of patterns) {\n const filepath = this._getFullEntryPath(pattern);\n const entry = this._getEntry(filepath, pattern, options);\n if (entry === null || !options.entryFilter(entry)) {\n continue;\n }\n entries.push(entry);\n }\n return entries;\n }\n _getEntry(filepath, pattern, options) {\n try {\n const stats = this._getStat(filepath);\n return this._makeEntry(stats, pattern);\n }\n catch (error) {\n if (options.errorFilter(error)) {\n return null;\n }\n throw error;\n }\n }\n _getStat(filepath) {\n return this._statSync(filepath, this._fsStatSettings);\n }\n}\nexports.default = ReaderSync;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst sync_1 = require(\"../readers/sync\");\nconst provider_1 = require(\"./provider\");\nclass ProviderSync extends provider_1.default {\n constructor() {\n super(...arguments);\n this._reader = new sync_1.default(this._settings);\n }\n read(task) {\n const root = this._getRootDirectory(task);\n const options = this._getReaderOptions(task);\n const entries = this.api(root, task, options);\n return entries.map(options.transform);\n }\n api(root, task, options) {\n if (task.dynamic) {\n return this._reader.dynamic(root, options);\n }\n return this._reader.static(task.patterns, options);\n }\n}\nexports.default = ProviderSync;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DEFAULT_FILE_SYSTEM_ADAPTER = void 0;\nconst fs = require(\"fs\");\nconst os = require(\"os\");\n/**\n * The `os.cpus` method can return zero. We expect the number of cores to be greater than zero.\n * https://github.com/nodejs/node/blob/7faeddf23a98c53896f8b574a6e66589e8fb1eb8/lib/os.js#L106-L107\n */\nconst CPU_COUNT = Math.max(os.cpus().length, 1);\nexports.DEFAULT_FILE_SYSTEM_ADAPTER = {\n lstat: fs.lstat,\n lstatSync: fs.lstatSync,\n stat: fs.stat,\n statSync: fs.statSync,\n readdir: fs.readdir,\n readdirSync: fs.readdirSync\n};\nclass Settings {\n constructor(_options = {}) {\n this._options = _options;\n this.absolute = this._getValue(this._options.absolute, false);\n this.baseNameMatch = this._getValue(this._options.baseNameMatch, false);\n this.braceExpansion = this._getValue(this._options.braceExpansion, true);\n this.caseSensitiveMatch = this._getValue(this._options.caseSensitiveMatch, true);\n this.concurrency = this._getValue(this._options.concurrency, CPU_COUNT);\n this.cwd = this._getValue(this._options.cwd, process.cwd());\n this.deep = this._getValue(this._options.deep, Infinity);\n this.dot = this._getValue(this._options.dot, false);\n this.extglob = this._getValue(this._options.extglob, true);\n this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, true);\n this.fs = this._getFileSystemMethods(this._options.fs);\n this.globstar = this._getValue(this._options.globstar, true);\n this.ignore = this._getValue(this._options.ignore, []);\n this.markDirectories = this._getValue(this._options.markDirectories, false);\n this.objectMode = this._getValue(this._options.objectMode, false);\n this.onlyDirectories = this._getValue(this._options.onlyDirectories, false);\n this.onlyFiles = this._getValue(this._options.onlyFiles, true);\n this.stats = this._getValue(this._options.stats, false);\n this.suppressErrors = this._getValue(this._options.suppressErrors, false);\n this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, false);\n this.unique = this._getValue(this._options.unique, true);\n if (this.onlyDirectories) {\n this.onlyFiles = false;\n }\n if (this.stats) {\n this.objectMode = true;\n }\n // Remove the cast to the array in the next major (#404).\n this.ignore = [].concat(this.ignore);\n }\n _getValue(option, value) {\n return option === undefined ? value : option;\n }\n _getFileSystemMethods(methods = {}) {\n return Object.assign(Object.assign({}, exports.DEFAULT_FILE_SYSTEM_ADAPTER), methods);\n }\n}\nexports.default = Settings;\n", "\"use strict\";\nconst taskManager = require(\"./managers/tasks\");\nconst async_1 = require(\"./providers/async\");\nconst stream_1 = require(\"./providers/stream\");\nconst sync_1 = require(\"./providers/sync\");\nconst settings_1 = require(\"./settings\");\nconst utils = require(\"./utils\");\nasync function FastGlob(source, options) {\n assertPatternsInput(source);\n const works = getWorks(source, async_1.default, options);\n const result = await Promise.all(works);\n return utils.array.flatten(result);\n}\n// https://github.com/typescript-eslint/typescript-eslint/issues/60\n// eslint-disable-next-line no-redeclare\n(function (FastGlob) {\n FastGlob.glob = FastGlob;\n FastGlob.globSync = sync;\n FastGlob.globStream = stream;\n FastGlob.async = FastGlob;\n function sync(source, options) {\n assertPatternsInput(source);\n const works = getWorks(source, sync_1.default, options);\n return utils.array.flatten(works);\n }\n FastGlob.sync = sync;\n function stream(source, options) {\n assertPatternsInput(source);\n const works = getWorks(source, stream_1.default, options);\n /**\n * The stream returned by the provider cannot work with an asynchronous iterator.\n * To support asynchronous iterators, regardless of the number of tasks, we always multiplex streams.\n * This affects performance (+25%). I don't see best solution right now.\n */\n return utils.stream.merge(works);\n }\n FastGlob.stream = stream;\n function generateTasks(source, options) {\n assertPatternsInput(source);\n const patterns = [].concat(source);\n const settings = new settings_1.default(options);\n return taskManager.generate(patterns, settings);\n }\n FastGlob.generateTasks = generateTasks;\n function isDynamicPattern(source, options) {\n assertPatternsInput(source);\n const settings = new settings_1.default(options);\n return utils.pattern.isDynamicPattern(source, settings);\n }\n FastGlob.isDynamicPattern = isDynamicPattern;\n function escapePath(source) {\n assertPatternsInput(source);\n return utils.path.escape(source);\n }\n FastGlob.escapePath = escapePath;\n function convertPathToPattern(source) {\n assertPatternsInput(source);\n return utils.path.convertPathToPattern(source);\n }\n FastGlob.convertPathToPattern = convertPathToPattern;\n let posix;\n (function (posix) {\n function escapePath(source) {\n assertPatternsInput(source);\n return utils.path.escapePosixPath(source);\n }\n posix.escapePath = escapePath;\n function convertPathToPattern(source) {\n assertPatternsInput(source);\n return utils.path.convertPosixPathToPattern(source);\n }\n posix.convertPathToPattern = convertPathToPattern;\n })(posix = FastGlob.posix || (FastGlob.posix = {}));\n let win32;\n (function (win32) {\n function escapePath(source) {\n assertPatternsInput(source);\n return utils.path.escapeWindowsPath(source);\n }\n win32.escapePath = escapePath;\n function convertPathToPattern(source) {\n assertPatternsInput(source);\n return utils.path.convertWindowsPathToPattern(source);\n }\n win32.convertPathToPattern = convertPathToPattern;\n })(win32 = FastGlob.win32 || (FastGlob.win32 = {}));\n})(FastGlob || (FastGlob = {}));\nfunction getWorks(source, _Provider, options) {\n const patterns = [].concat(source);\n const settings = new settings_1.default(options);\n const tasks = taskManager.generate(patterns, settings);\n const provider = new _Provider(settings);\n return tasks.map(provider.read, provider);\n}\nfunction assertPatternsInput(input) {\n const source = [].concat(input);\n const isValidSource = source.every((item) => utils.string.isString(item) && !utils.string.isEmpty(item));\n if (!isValidSource) {\n throw new TypeError('Patterns must be a string (non empty) or an array of strings');\n }\n}\nmodule.exports = FastGlob;\n", "// A simple implementation of make-array\nfunction makeArray (subject) {\n return Array.isArray(subject)\n ? subject\n : [subject]\n}\n\nconst UNDEFINED = undefined\nconst EMPTY = ''\nconst SPACE = ' '\nconst ESCAPE = '\\\\'\nconst REGEX_TEST_BLANK_LINE = /^\\s+$/\nconst REGEX_INVALID_TRAILING_BACKSLASH = /(?:[^\\\\]|^)\\\\$/\nconst REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION = /^\\\\!/\nconst REGEX_REPLACE_LEADING_EXCAPED_HASH = /^\\\\#/\nconst REGEX_SPLITALL_CRLF = /\\r?\\n/g\n\n// Invalid:\n// - /foo,\n// - ./foo,\n// - ../foo,\n// - .\n// - ..\n// Valid:\n// - .foo\nconst REGEX_TEST_INVALID_PATH = /^\\.{0,2}\\/|^\\.{1,2}$/\n\nconst REGEX_TEST_TRAILING_SLASH = /\\/$/\n\nconst SLASH = '/'\n\n// Do not use ternary expression here, since \"istanbul ignore next\" is buggy\nlet TMP_KEY_IGNORE = 'node-ignore'\n/* istanbul ignore else */\nif (typeof Symbol !== 'undefined') {\n TMP_KEY_IGNORE = Symbol.for('node-ignore')\n}\nconst KEY_IGNORE = TMP_KEY_IGNORE\n\nconst define = (object, key, value) => {\n Object.defineProperty(object, key, {value})\n return value\n}\n\nconst REGEX_REGEXP_RANGE = /([0-z])-([0-z])/g\n\nconst RETURN_FALSE = () => false\n\n// Sanitize the range of a regular expression\n// The cases are complicated, see test cases for details\nconst sanitizeRange = range => range.replace(\n REGEX_REGEXP_RANGE,\n (match, from, to) => from.charCodeAt(0) <= to.charCodeAt(0)\n ? match\n // Invalid range (out of order) which is ok for gitignore rules but\n // fatal for JavaScript regular expression, so eliminate it.\n : EMPTY\n)\n\n// See fixtures #59\nconst cleanRangeBackSlash = slashes => {\n const {length} = slashes\n return slashes.slice(0, length - length % 2)\n}\n\n// > If the pattern ends with a slash,\n// > it is removed for the purpose of the following description,\n// > but it would only find a match with a directory.\n// > In other words, foo/ will match a directory foo and paths underneath it,\n// > but will not match a regular file or a symbolic link foo\n// > (this is consistent with the way how pathspec works in general in Git).\n// '`foo/`' will not match regular file '`foo`' or symbolic link '`foo`'\n// -> ignore-rules will not deal with it, because it costs extra `fs.stat` call\n// you could use option `mark: true` with `glob`\n\n// '`foo/`' should not continue with the '`..`'\nconst REPLACERS = [\n\n [\n // Remove BOM\n // TODO:\n // Other similar zero-width characters?\n /^\\uFEFF/,\n () => EMPTY\n ],\n\n // > Trailing spaces are ignored unless they are quoted with backslash (\"\\\")\n [\n // (a\\ ) -> (a )\n // (a ) -> (a)\n // (a ) -> (a)\n // (a \\ ) -> (a )\n /((?:\\\\\\\\)*?)(\\\\?\\s+)$/,\n (_, m1, m2) => m1 + (\n m2.indexOf('\\\\') === 0\n ? SPACE\n : EMPTY\n )\n ],\n\n // Replace (\\ ) with ' '\n // (\\ ) -> ' '\n // (\\\\ ) -> '\\\\ '\n // (\\\\\\ ) -> '\\\\ '\n [\n /(\\\\+?)\\s/g,\n (_, m1) => {\n const {length} = m1\n return m1.slice(0, length - length % 2) + SPACE\n }\n ],\n\n // Escape metacharacters\n // which is written down by users but means special for regular expressions.\n\n // > There are 12 characters with special meanings:\n // > - the backslash \\,\n // > - the caret ^,\n // > - the dollar sign $,\n // > - the period or dot .,\n // > - the vertical bar or pipe symbol |,\n // > - the question mark ?,\n // > - the asterisk or star *,\n // > - the plus sign +,\n // > - the opening parenthesis (,\n // > - the closing parenthesis ),\n // > - and the opening square bracket [,\n // > - the opening curly brace {,\n // > These special characters are often called \"metacharacters\".\n [\n /[\\\\$.|*+(){^]/g,\n match => `\\\\${match}`\n ],\n\n [\n // > a question mark (?) matches a single character\n /(?!\\\\)\\?/g,\n () => '[^/]'\n ],\n\n // leading slash\n [\n\n // > A leading slash matches the beginning of the pathname.\n // > For example, \"/*.c\" matches \"cat-file.c\" but not \"mozilla-sha1/sha1.c\".\n // A leading slash matches the beginning of the pathname\n /^\\//,\n () => '^'\n ],\n\n // replace special metacharacter slash after the leading slash\n [\n /\\//g,\n () => '\\\\/'\n ],\n\n [\n // > A leading \"**\" followed by a slash means match in all directories.\n // > For example, \"**/foo\" matches file or directory \"foo\" anywhere,\n // > the same as pattern \"foo\".\n // > \"**/foo/bar\" matches file or directory \"bar\" anywhere that is directly\n // > under directory \"foo\".\n // Notice that the '*'s have been replaced as '\\\\*'\n /^\\^*\\\\\\*\\\\\\*\\\\\\//,\n\n // '**/foo' <-> 'foo'\n () => '^(?:.*\\\\/)?'\n ],\n\n // starting\n [\n // there will be no leading '/'\n // (which has been replaced by section \"leading slash\")\n // If starts with '**', adding a '^' to the regular expression also works\n /^(?=[^^])/,\n function startingReplacer () {\n // If has a slash `/` at the beginning or middle\n return !/\\/(?!$)/.test(this)\n // > Prior to 2.22.1\n // > If the pattern does not contain a slash /,\n // > Git treats it as a shell glob pattern\n // Actually, if there is only a trailing slash,\n // git also treats it as a shell glob pattern\n\n // After 2.22.1 (compatible but clearer)\n // > If there is a separator at the beginning or middle (or both)\n // > of the pattern, then the pattern is relative to the directory\n // > level of the particular .gitignore file itself.\n // > Otherwise the pattern may also match at any level below\n // > the .gitignore level.\n ? '(?:^|\\\\/)'\n\n // > Otherwise, Git treats the pattern as a shell glob suitable for\n // > consumption by fnmatch(3)\n : '^'\n }\n ],\n\n // two globstars\n [\n // Use lookahead assertions so that we could match more than one `'/**'`\n /\\\\\\/\\\\\\*\\\\\\*(?=\\\\\\/|$)/g,\n\n // Zero, one or several directories\n // should not use '*', or it will be replaced by the next replacer\n\n // Check if it is not the last `'/**'`\n (_, index, str) => index + 6 < str.length\n\n // case: /**/\n // > A slash followed by two consecutive asterisks then a slash matches\n // > zero or more directories.\n // > For example, \"a/**/b\" matches \"a/b\", \"a/x/b\", \"a/x/y/b\" and so on.\n // '/**/'\n ? '(?:\\\\/[^\\\\/]+)*'\n\n // case: /**\n // > A trailing `\"/**\"` matches everything inside.\n\n // #21: everything inside but it should not include the current folder\n : '\\\\/.+'\n ],\n\n // normal intermediate wildcards\n [\n // Never replace escaped '*'\n // ignore rule '\\*' will match the path '*'\n\n // 'abc.*/' -> go\n // 'abc.*' -> skip this rule,\n // coz trailing single wildcard will be handed by [trailing wildcard]\n /(^|[^\\\\]+)(\\\\\\*)+(?=.+)/g,\n\n // '*.js' matches '.js'\n // '*.js' doesn't match 'abc'\n (_, p1, p2) => {\n // 1.\n // > An asterisk \"*\" matches anything except a slash.\n // 2.\n // > Other consecutive asterisks are considered regular asterisks\n // > and will match according to the previous rules.\n const unescaped = p2.replace(/\\\\\\*/g, '[^\\\\/]*')\n return p1 + unescaped\n }\n ],\n\n [\n // unescape, revert step 3 except for back slash\n // For example, if a user escape a '\\\\*',\n // after step 3, the result will be '\\\\\\\\\\\\*'\n /\\\\\\\\\\\\(?=[$.|*+(){^])/g,\n () => ESCAPE\n ],\n\n [\n // '\\\\\\\\' -> '\\\\'\n /\\\\\\\\/g,\n () => ESCAPE\n ],\n\n [\n // > The range notation, e.g. [a-zA-Z],\n // > can be used to match one of the characters in a range.\n\n // `\\` is escaped by step 3\n /(\\\\)?\\[([^\\]/]*?)(\\\\*)($|\\])/g,\n (match, leadEscape, range, endEscape, close) => leadEscape === ESCAPE\n // '\\\\[bar]' -> '\\\\\\\\[bar\\\\]'\n ? `\\\\[${range}${cleanRangeBackSlash(endEscape)}${close}`\n : close === ']'\n ? endEscape.length % 2 === 0\n // A normal case, and it is a range notation\n // '[bar]'\n // '[bar\\\\\\\\]'\n ? `[${sanitizeRange(range)}${endEscape}]`\n // Invalid range notaton\n // '[bar\\\\]' -> '[bar\\\\\\\\]'\n : '[]'\n : '[]'\n ],\n\n // ending\n [\n // 'js' will not match 'js.'\n // 'ab' will not match 'abc'\n /(?:[^*])$/,\n\n // WTF!\n // https://git-scm.com/docs/gitignore\n // changes in [2.22.1](https://git-scm.com/docs/gitignore/2.22.1)\n // which re-fixes #24, #38\n\n // > If there is a separator at the end of the pattern then the pattern\n // > will only match directories, otherwise the pattern can match both\n // > files and directories.\n\n // 'js*' will not match 'a.js'\n // 'js/' will not match 'a.js'\n // 'js' will match 'a.js' and 'a.js/'\n match => /\\/$/.test(match)\n // foo/ will not match 'foo'\n ? `${match}$`\n // foo matches 'foo' and 'foo/'\n : `${match}(?=$|\\\\/$)`\n ]\n]\n\nconst REGEX_REPLACE_TRAILING_WILDCARD = /(^|\\\\\\/)?\\\\\\*$/\nconst MODE_IGNORE = 'regex'\nconst MODE_CHECK_IGNORE = 'checkRegex'\nconst UNDERSCORE = '_'\n\nconst TRAILING_WILD_CARD_REPLACERS = {\n [MODE_IGNORE] (_, p1) {\n const prefix = p1\n // '\\^':\n // '/*' does not match EMPTY\n // '/*' does not match everything\n\n // '\\\\\\/':\n // 'abc/*' does not match 'abc/'\n ? `${p1}[^/]+`\n\n // 'a*' matches 'a'\n // 'a*' matches 'aa'\n : '[^/]*'\n\n return `${prefix}(?=$|\\\\/$)`\n },\n\n [MODE_CHECK_IGNORE] (_, p1) {\n // When doing `git check-ignore`\n const prefix = p1\n // '\\\\\\/':\n // 'abc/*' DOES match 'abc/' !\n ? `${p1}[^/]*`\n\n // 'a*' matches 'a'\n // 'a*' matches 'aa'\n : '[^/]*'\n\n return `${prefix}(?=$|\\\\/$)`\n }\n}\n\n// @param {pattern}\nconst makeRegexPrefix = pattern => REPLACERS.reduce(\n (prev, [matcher, replacer]) =>\n prev.replace(matcher, replacer.bind(pattern)),\n pattern\n)\n\nconst isString = subject => typeof subject === 'string'\n\n// > A blank line matches no files, so it can serve as a separator for readability.\nconst checkPattern = pattern => pattern\n && isString(pattern)\n && !REGEX_TEST_BLANK_LINE.test(pattern)\n && !REGEX_INVALID_TRAILING_BACKSLASH.test(pattern)\n\n // > A line starting with # serves as a comment.\n && pattern.indexOf('#') !== 0\n\nconst splitPattern = pattern => pattern\n.split(REGEX_SPLITALL_CRLF)\n.filter(Boolean)\n\nclass IgnoreRule {\n constructor (\n pattern,\n mark,\n body,\n ignoreCase,\n negative,\n prefix\n ) {\n this.pattern = pattern\n this.mark = mark\n this.negative = negative\n\n define(this, 'body', body)\n define(this, 'ignoreCase', ignoreCase)\n define(this, 'regexPrefix', prefix)\n }\n\n get regex () {\n const key = UNDERSCORE + MODE_IGNORE\n\n if (this[key]) {\n return this[key]\n }\n\n return this._make(MODE_IGNORE, key)\n }\n\n get checkRegex () {\n const key = UNDERSCORE + MODE_CHECK_IGNORE\n\n if (this[key]) {\n return this[key]\n }\n\n return this._make(MODE_CHECK_IGNORE, key)\n }\n\n _make (mode, key) {\n const str = this.regexPrefix.replace(\n REGEX_REPLACE_TRAILING_WILDCARD,\n\n // It does not need to bind pattern\n TRAILING_WILD_CARD_REPLACERS[mode]\n )\n\n const regex = this.ignoreCase\n ? new RegExp(str, 'i')\n : new RegExp(str)\n\n return define(this, key, regex)\n }\n}\n\nconst createRule = ({\n pattern,\n mark\n}, ignoreCase) => {\n let negative = false\n let body = pattern\n\n // > An optional prefix \"!\" which negates the pattern;\n if (body.indexOf('!') === 0) {\n negative = true\n body = body.substr(1)\n }\n\n body = body\n // > Put a backslash (\"\\\") in front of the first \"!\" for patterns that\n // > begin with a literal \"!\", for example, `\"\\!important!.txt\"`.\n .replace(REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION, '!')\n // > Put a backslash (\"\\\") in front of the first hash for patterns that\n // > begin with a hash.\n .replace(REGEX_REPLACE_LEADING_EXCAPED_HASH, '#')\n\n const regexPrefix = makeRegexPrefix(body)\n\n return new IgnoreRule(\n pattern,\n mark,\n body,\n ignoreCase,\n negative,\n regexPrefix\n )\n}\n\nclass RuleManager {\n constructor (ignoreCase) {\n this._ignoreCase = ignoreCase\n this._rules = []\n }\n\n _add (pattern) {\n // #32\n if (pattern && pattern[KEY_IGNORE]) {\n this._rules = this._rules.concat(pattern._rules._rules)\n this._added = true\n return\n }\n\n if (isString(pattern)) {\n pattern = {\n pattern\n }\n }\n\n if (checkPattern(pattern.pattern)) {\n const rule = createRule(pattern, this._ignoreCase)\n this._added = true\n this._rules.push(rule)\n }\n }\n\n // @param {Array<string> | string | Ignore} pattern\n add (pattern) {\n this._added = false\n\n makeArray(\n isString(pattern)\n ? splitPattern(pattern)\n : pattern\n ).forEach(this._add, this)\n\n return this._added\n }\n\n // Test one single path without recursively checking parent directories\n //\n // - checkUnignored `boolean` whether should check if the path is unignored,\n // setting `checkUnignored` to `false` could reduce additional\n // path matching.\n // - check `string` either `MODE_IGNORE` or `MODE_CHECK_IGNORE`\n\n // @returns {TestResult} true if a file is ignored\n test (path, checkUnignored, mode) {\n let ignored = false\n let unignored = false\n let matchedRule\n\n this._rules.forEach(rule => {\n const {negative} = rule\n\n // | ignored : unignored\n // -------- | ---------------------------------------\n // negative | 0:0 | 0:1 | 1:0 | 1:1\n // -------- | ------- | ------- | ------- | --------\n // 0 | TEST | TEST | SKIP | X\n // 1 | TESTIF | SKIP | TEST | X\n\n // - SKIP: always skip\n // - TEST: always test\n // - TESTIF: only test if checkUnignored\n // - X: that never happen\n if (\n unignored === negative && ignored !== unignored\n || negative && !ignored && !unignored && !checkUnignored\n ) {\n return\n }\n\n const matched = rule[mode].test(path)\n\n if (!matched) {\n return\n }\n\n ignored = !negative\n unignored = negative\n\n matchedRule = negative\n ? UNDEFINED\n : rule\n })\n\n const ret = {\n ignored,\n unignored\n }\n\n if (matchedRule) {\n ret.rule = matchedRule\n }\n\n return ret\n }\n}\n\nconst throwError = (message, Ctor) => {\n throw new Ctor(message)\n}\n\nconst checkPath = (path, originalPath, doThrow) => {\n if (!isString(path)) {\n return doThrow(\n `path must be a string, but got \\`${originalPath}\\``,\n TypeError\n )\n }\n\n // We don't know if we should ignore EMPTY, so throw\n if (!path) {\n return doThrow(`path must not be empty`, TypeError)\n }\n\n // Check if it is a relative path\n if (checkPath.isNotRelative(path)) {\n const r = '`path.relative()`d'\n return doThrow(\n `path should be a ${r} string, but got \"${originalPath}\"`,\n RangeError\n )\n }\n\n return true\n}\n\nconst isNotRelative = path => REGEX_TEST_INVALID_PATH.test(path)\n\ncheckPath.isNotRelative = isNotRelative\n\n// On windows, the following function will be replaced\n/* istanbul ignore next */\ncheckPath.convert = p => p\n\n\nclass Ignore {\n constructor ({\n ignorecase = true,\n ignoreCase = ignorecase,\n allowRelativePaths = false\n } = {}) {\n define(this, KEY_IGNORE, true)\n\n this._rules = new RuleManager(ignoreCase)\n this._strictPathCheck = !allowRelativePaths\n this._initCache()\n }\n\n _initCache () {\n // A cache for the result of `.ignores()`\n this._ignoreCache = Object.create(null)\n\n // A cache for the result of `.test()`\n this._testCache = Object.create(null)\n }\n\n add (pattern) {\n if (this._rules.add(pattern)) {\n // Some rules have just added to the ignore,\n // making the behavior changed,\n // so we need to re-initialize the result cache\n this._initCache()\n }\n\n return this\n }\n\n // legacy\n addPattern (pattern) {\n return this.add(pattern)\n }\n\n // @returns {TestResult}\n _test (originalPath, cache, checkUnignored, slices) {\n const path = originalPath\n // Supports nullable path\n && checkPath.convert(originalPath)\n\n checkPath(\n path,\n originalPath,\n this._strictPathCheck\n ? throwError\n : RETURN_FALSE\n )\n\n return this._t(path, cache, checkUnignored, slices)\n }\n\n checkIgnore (path) {\n // If the path doest not end with a slash, `.ignores()` is much equivalent\n // to `git check-ignore`\n if (!REGEX_TEST_TRAILING_SLASH.test(path)) {\n return this.test(path)\n }\n\n const slices = path.split(SLASH).filter(Boolean)\n slices.pop()\n\n if (slices.length) {\n const parent = this._t(\n slices.join(SLASH) + SLASH,\n this._testCache,\n true,\n slices\n )\n\n if (parent.ignored) {\n return parent\n }\n }\n\n return this._rules.test(path, false, MODE_CHECK_IGNORE)\n }\n\n _t (\n // The path to be tested\n path,\n\n // The cache for the result of a certain checking\n cache,\n\n // Whether should check if the path is unignored\n checkUnignored,\n\n // The path slices\n slices\n ) {\n if (path in cache) {\n return cache[path]\n }\n\n if (!slices) {\n // path/to/a.js\n // ['path', 'to', 'a.js']\n slices = path.split(SLASH).filter(Boolean)\n }\n\n slices.pop()\n\n // If the path has no parent directory, just test it\n if (!slices.length) {\n return cache[path] = this._rules.test(path, checkUnignored, MODE_IGNORE)\n }\n\n const parent = this._t(\n slices.join(SLASH) + SLASH,\n cache,\n checkUnignored,\n slices\n )\n\n // If the path contains a parent directory, check the parent first\n return cache[path] = parent.ignored\n // > It is not possible to re-include a file if a parent directory of\n // > that file is excluded.\n ? parent\n : this._rules.test(path, checkUnignored, MODE_IGNORE)\n }\n\n ignores (path) {\n return this._test(path, this._ignoreCache, false).ignored\n }\n\n createFilter () {\n return path => !this.ignores(path)\n }\n\n filter (paths) {\n return makeArray(paths).filter(this.createFilter())\n }\n\n // @returns {TestResult}\n test (path) {\n return this._test(path, this._testCache, true)\n }\n}\n\nconst factory = options => new Ignore(options)\n\nconst isPathValid = path =>\n checkPath(path && checkPath.convert(path), path, RETURN_FALSE)\n\n/* istanbul ignore next */\nconst setupWindows = () => {\n /* eslint no-control-regex: \"off\" */\n const makePosix = str => /^\\\\\\\\\\?\\\\/.test(str)\n || /[\"<>|\\u0000-\\u001F]+/u.test(str)\n ? str\n : str.replace(/\\\\/g, '/')\n\n checkPath.convert = makePosix\n\n // 'C:\\\\foo' <- 'C:\\\\foo' has been converted to 'C:/'\n // 'd:\\\\foo'\n const REGEX_TEST_WINDOWS_PATH_ABSOLUTE = /^[a-z]:\\//i\n checkPath.isNotRelative = path =>\n REGEX_TEST_WINDOWS_PATH_ABSOLUTE.test(path)\n || isNotRelative(path)\n}\n\n\n// Windows\n// --------------------------------------------------------------\n/* istanbul ignore next */\nif (\n // Detect `process` so that it can run in browsers.\n typeof process !== 'undefined'\n && process.platform === 'win32'\n) {\n setupWindows()\n}\n\n// COMMONJS_EXPORTS ////////////////////////////////////////////////////////////\n\nmodule.exports = factory\n\n// Although it is an anti-pattern,\n// it is still widely misused by a lot of libraries in github\n// Ref: https://github.com/search?q=ignore.default%28%29&type=code\nfactory.default = factory\n\nmodule.exports.isPathValid = isPathValid\n\n// For testing purposes\ndefine(module.exports, Symbol.for('setupWindows'), setupWindows)\n", "import commander from './index.js';\n\n// wrapper to provide named exports for ESM.\nexport const {\n program,\n createCommand,\n createArgument,\n createOption,\n CommanderError,\n InvalidArgumentError,\n InvalidOptionArgumentError, // deprecated old name\n Command,\n Argument,\n Option,\n Help,\n} = commander;\n", "/**\n * Validate command - Validate .canvas configuration files\n */\n\nimport { Command } from 'commander';\nimport { existsSync, readFileSync } from 'node:fs';\nimport { resolve, relative, dirname } from 'node:path';\nimport chalk from 'chalk';\nimport { globby } from 'globby';\nimport yaml from 'js-yaml';\nimport type { ExtendedCanvas } from '@principal-ai/principal-view-core';\n\ninterface ValidationIssue {\n type: 'error' | 'warning';\n message: string;\n path?: string;\n suggestion?: string;\n}\n\ninterface ValidationResult {\n file: string;\n isValid: boolean;\n issues: ValidationIssue[];\n canvas?: ExtendedCanvas;\n}\n\n/**\n * Loaded library structure (simplified for validation purposes)\n */\ninterface LoadedLibrary {\n nodeComponents: Record<string, unknown>;\n edgeComponents: Record<string, unknown>;\n}\n\n/**\n * Load the library.yaml file from the .principal-views directory\n */\nfunction loadLibrary(principalViewsDir: string): LoadedLibrary | null {\n const libraryFiles = ['library.yaml', 'library.yml', 'library.json'];\n\n for (const fileName of libraryFiles) {\n const libraryPath = resolve(principalViewsDir, fileName);\n if (existsSync(libraryPath)) {\n try {\n const content = readFileSync(libraryPath, 'utf8');\n const library = fileName.endsWith('.json')\n ? JSON.parse(content)\n : yaml.load(content);\n\n if (library && typeof library === 'object') {\n return {\n nodeComponents: (library as Record<string, unknown>).nodeComponents as Record<string, unknown> || {},\n edgeComponents: (library as Record<string, unknown>).edgeComponents as Record<string, unknown> || {},\n };\n }\n } catch {\n // Library exists but failed to parse - return empty to avoid false positives\n return { nodeComponents: {}, edgeComponents: {} };\n }\n }\n }\n return null;\n}\n\n/**\n * Standard JSON Canvas node types that don't require pv metadata\n */\nconst STANDARD_CANVAS_TYPES = ['text', 'group', 'file', 'link'] as const;\n\n/**\n * Valid node shapes for pv.shape\n */\nconst VALID_NODE_SHAPES = ['circle', 'rectangle', 'hexagon', 'diamond', 'custom'] as const;\n\n/**\n * Validate an ExtendedCanvas object with strict validation\n *\n * Strict validation ensures:\n * - All required fields are present\n * - Custom node types have proper pv metadata\n * - Edge types reference defined types in pv.edgeTypes or library.edgeComponents\n * - Node types reference defined types in pv.nodeTypes or library.nodeComponents\n * - Canvas has pv extension with name and version\n */\nfunction validateCanvas(canvas: unknown, filePath: string, library: LoadedLibrary | null): ValidationIssue[] {\n const issues: ValidationIssue[] = [];\n\n if (!canvas || typeof canvas !== 'object') {\n issues.push({ type: 'error', message: 'Canvas must be an object' });\n return issues;\n }\n\n const c = canvas as Record<string, unknown>;\n\n // Collect library-defined types\n const libraryNodeTypes = library ? Object.keys(library.nodeComponents) : [];\n const libraryEdgeTypes = library ? Object.keys(library.edgeComponents) : [];\n\n // Check pv extension (REQUIRED for strict validation)\n let canvasEdgeTypes: string[] = [];\n let canvasNodeTypes: string[] = [];\n if (c.pv === undefined) {\n issues.push({\n type: 'error',\n message: 'Canvas must have a \"pv\" extension with name and version',\n path: 'pv',\n suggestion: 'Add: \"pv\": { \"name\": \"My Graph\", \"version\": \"1.0.0\" }',\n });\n } else if (typeof c.pv !== 'object') {\n issues.push({ type: 'error', message: '\"pv\" extension must be an object' });\n } else {\n const pv = c.pv as Record<string, unknown>;\n if (typeof pv.version !== 'string' || !pv.version) {\n issues.push({\n type: 'error',\n message: 'pv.version is required',\n path: 'pv.version',\n suggestion: 'Add: \"version\": \"1.0.0\"',\n });\n }\n if (typeof pv.name !== 'string' || !pv.name) {\n issues.push({\n type: 'error',\n message: 'pv.name is required',\n path: 'pv.name',\n suggestion: 'Add: \"name\": \"My Graph\"',\n });\n }\n // Collect defined edge types for later validation\n if (pv.edgeTypes && typeof pv.edgeTypes === 'object') {\n canvasEdgeTypes = Object.keys(pv.edgeTypes as Record<string, unknown>);\n }\n // Collect defined node types for later validation\n if (pv.nodeTypes && typeof pv.nodeTypes === 'object') {\n canvasNodeTypes = Object.keys(pv.nodeTypes as Record<string, unknown>);\n }\n }\n\n // Combined types from canvas + library\n const allDefinedNodeTypes = [...new Set([...canvasNodeTypes, ...libraryNodeTypes])];\n const allDefinedEdgeTypes = [...new Set([...canvasEdgeTypes, ...libraryEdgeTypes])];\n\n // Check nodes\n if (!Array.isArray(c.nodes)) {\n issues.push({ type: 'error', message: 'Canvas must have a \"nodes\" array' });\n } else {\n c.nodes.forEach((node: unknown, index: number) => {\n if (!node || typeof node !== 'object') {\n issues.push({ type: 'error', message: `Node at index ${index} must be an object`, path: `nodes[${index}]` });\n return;\n }\n const n = node as Record<string, unknown>;\n\n if (typeof n.id !== 'string' || !n.id) {\n issues.push({ type: 'error', message: `Node at index ${index} must have a string \"id\"`, path: `nodes[${index}].id` });\n }\n if (typeof n.type !== 'string') {\n issues.push({ type: 'error', message: `Node \"${n.id || index}\" must have a string \"type\"`, path: `nodes[${index}].type` });\n }\n if (typeof n.x !== 'number') {\n issues.push({ type: 'error', message: `Node \"${n.id || index}\" must have a numeric \"x\" position`, path: `nodes[${index}].x` });\n }\n if (typeof n.y !== 'number') {\n issues.push({ type: 'error', message: `Node \"${n.id || index}\" must have a numeric \"y\" position`, path: `nodes[${index}].y` });\n }\n // Width and height are now REQUIRED (was warning)\n if (typeof n.width !== 'number') {\n issues.push({ type: 'error', message: `Node \"${n.id || index}\" must have a numeric \"width\"`, path: `nodes[${index}].width` });\n }\n if (typeof n.height !== 'number') {\n issues.push({ type: 'error', message: `Node \"${n.id || index}\" must have a numeric \"height\"`, path: `nodes[${index}].height` });\n }\n\n // Validate node type - must be standard canvas type OR have pv metadata\n const nodeType = n.type as string;\n const isStandardType = STANDARD_CANVAS_TYPES.includes(nodeType as typeof STANDARD_CANVAS_TYPES[number]);\n\n if (!isStandardType) {\n // Custom type - must have pv.nodeType with shape\n if (!n.pv || typeof n.pv !== 'object') {\n issues.push({\n type: 'error',\n message: `Node \"${n.id || index}\" uses custom type \"${nodeType}\" but has no \"pv\" extension`,\n path: `nodes[${index}].pv`,\n suggestion: `Use a standard type (${STANDARD_CANVAS_TYPES.join(', ')}) or add pv.nodeType and pv.shape`,\n });\n } else {\n const nodePv = n.pv as Record<string, unknown>;\n if (typeof nodePv.nodeType !== 'string' || !nodePv.nodeType) {\n issues.push({\n type: 'error',\n message: `Node \"${n.id || index}\" with custom type must have \"pv.nodeType\"`,\n path: `nodes[${index}].pv.nodeType`,\n });\n }\n if (typeof nodePv.shape !== 'string' || !VALID_NODE_SHAPES.includes(nodePv.shape as typeof VALID_NODE_SHAPES[number])) {\n issues.push({\n type: 'error',\n message: `Node \"${n.id || index}\" must have a valid \"pv.shape\"`,\n path: `nodes[${index}].pv.shape`,\n suggestion: `Valid shapes: ${VALID_NODE_SHAPES.join(', ')}`,\n });\n }\n }\n }\n\n // Validate pv.nodeType references a defined nodeType (for any node with pv.nodeType)\n if (n.pv && typeof n.pv === 'object') {\n const nodePv = n.pv as Record<string, unknown>;\n if (typeof nodePv.nodeType === 'string' && nodePv.nodeType) {\n if (allDefinedNodeTypes.length === 0) {\n issues.push({\n type: 'error',\n message: `Node \"${n.id || index}\" uses nodeType \"${nodePv.nodeType}\" but no node types are defined`,\n path: `nodes[${index}].pv.nodeType`,\n suggestion: 'Define node types in canvas pv.nodeTypes or library.yaml nodeComponents',\n });\n } else if (!allDefinedNodeTypes.includes(nodePv.nodeType)) {\n // Build a helpful suggestion showing where types can be defined\n const sources: string[] = [];\n if (canvasNodeTypes.length > 0) {\n sources.push(`canvas pv.nodeTypes: ${canvasNodeTypes.join(', ')}`);\n }\n if (libraryNodeTypes.length > 0) {\n sources.push(`library.yaml nodeComponents: ${libraryNodeTypes.join(', ')}`);\n }\n const suggestion = sources.length > 0\n ? `Available types from ${sources.join(' | ')}`\n : 'Define node types in canvas pv.nodeTypes or library.yaml nodeComponents';\n\n issues.push({\n type: 'error',\n message: `Node \"${n.id || index}\" uses undefined nodeType \"${nodePv.nodeType}\"`,\n path: `nodes[${index}].pv.nodeType`,\n suggestion,\n });\n }\n }\n }\n });\n }\n\n // Check edges (optional but validated strictly if present)\n if (c.edges !== undefined && !Array.isArray(c.edges)) {\n issues.push({ type: 'error', message: '\"edges\" must be an array if present' });\n } else if (Array.isArray(c.edges)) {\n const nodeIds = new Set((c.nodes as Array<{ id: string }>)?.map(n => n.id) || []);\n\n c.edges.forEach((edge: unknown, index: number) => {\n if (!edge || typeof edge !== 'object') {\n issues.push({ type: 'error', message: `Edge at index ${index} must be an object`, path: `edges[${index}]` });\n return;\n }\n const e = edge as Record<string, unknown>;\n\n if (typeof e.id !== 'string' || !e.id) {\n issues.push({ type: 'error', message: `Edge at index ${index} must have a string \"id\"`, path: `edges[${index}].id` });\n }\n if (typeof e.fromNode !== 'string') {\n issues.push({ type: 'error', message: `Edge \"${e.id || index}\" must have a string \"fromNode\"`, path: `edges[${index}].fromNode` });\n } else if (!nodeIds.has(e.fromNode)) {\n issues.push({ type: 'error', message: `Edge \"${e.id || index}\" references unknown node \"${e.fromNode}\"`, path: `edges[${index}].fromNode` });\n }\n if (typeof e.toNode !== 'string') {\n issues.push({ type: 'error', message: `Edge \"${e.id || index}\" must have a string \"toNode\"`, path: `edges[${index}].toNode` });\n } else if (!nodeIds.has(e.toNode)) {\n issues.push({ type: 'error', message: `Edge \"${e.id || index}\" references unknown node \"${e.toNode}\"`, path: `edges[${index}].toNode` });\n }\n\n // Validate edge type if pv.edgeType is specified\n if (e.pv && typeof e.pv === 'object') {\n const edgePv = e.pv as Record<string, unknown>;\n if (edgePv.edgeType && typeof edgePv.edgeType === 'string') {\n if (allDefinedEdgeTypes.length === 0) {\n issues.push({\n type: 'error',\n message: `Edge \"${e.id || index}\" uses edgeType \"${edgePv.edgeType}\" but no edge types are defined`,\n path: `edges[${index}].pv.edgeType`,\n suggestion: 'Define edge types in canvas pv.edgeTypes or library.yaml edgeComponents',\n });\n } else if (!allDefinedEdgeTypes.includes(edgePv.edgeType)) {\n // Build a helpful suggestion showing where types can be defined\n const sources: string[] = [];\n if (canvasEdgeTypes.length > 0) {\n sources.push(`canvas pv.edgeTypes: ${canvasEdgeTypes.join(', ')}`);\n }\n if (libraryEdgeTypes.length > 0) {\n sources.push(`library.yaml edgeComponents: ${libraryEdgeTypes.join(', ')}`);\n }\n const suggestion = sources.length > 0\n ? `Available types from ${sources.join(' | ')}`\n : 'Define edge types in canvas pv.edgeTypes or library.yaml edgeComponents';\n\n issues.push({\n type: 'error',\n message: `Edge \"${e.id || index}\" uses undefined edgeType \"${edgePv.edgeType}\"`,\n path: `edges[${index}].pv.edgeType`,\n suggestion,\n });\n }\n }\n }\n });\n }\n\n return issues;\n}\n\n/**\n * Validate a single .canvas file\n */\nfunction validateFile(filePath: string, library: LoadedLibrary | null): ValidationResult {\n const absolutePath = resolve(filePath);\n const relativePath = relative(process.cwd(), absolutePath);\n\n if (!existsSync(absolutePath)) {\n return {\n file: relativePath,\n isValid: false,\n issues: [{ type: 'error', message: `File not found: ${filePath}` }],\n };\n }\n\n try {\n const content = readFileSync(absolutePath, 'utf8');\n const canvas = JSON.parse(content);\n const issues = validateCanvas(canvas, relativePath, library);\n const hasErrors = issues.some(i => i.type === 'error');\n\n return {\n file: relativePath,\n isValid: !hasErrors,\n issues,\n canvas: hasErrors ? undefined : canvas,\n };\n } catch (error) {\n return {\n file: relativePath,\n isValid: false,\n issues: [{ type: 'error', message: `Failed to parse JSON: ${(error as Error).message}` }],\n };\n }\n}\n\nexport function createValidateCommand(): Command {\n const command = new Command('validate');\n\n command\n .description('Validate .canvas configuration files')\n .argument('[files...]', 'Files or glob patterns to validate (defaults to .principal-views/*.canvas)')\n .option('-q, --quiet', 'Only output errors')\n .option('--json', 'Output results as JSON')\n .action(async (files: string[], options) => {\n try {\n // Default to .principal-views/*.canvas if no files specified\n const patterns = files.length > 0 ? files : ['.principal-views/*.canvas'];\n\n // Find all matching files\n const matchedFiles = await globby(patterns, {\n expandDirectories: false,\n });\n\n if (matchedFiles.length === 0) {\n if (options.json) {\n console.log(JSON.stringify({ files: [], summary: { total: 0, valid: 0, invalid: 0 } }));\n } else {\n console.log(chalk.yellow('No .canvas files found matching the specified patterns.'));\n console.log(chalk.dim(`Patterns searched: ${patterns.join(', ')}`));\n console.log(chalk.dim('\\nTo create a new .principal-views folder, run: privu init'));\n }\n return;\n }\n\n // Load library from .principal-views directory (used for type validation)\n const principalViewsDir = resolve(process.cwd(), '.principal-views');\n const library = loadLibrary(principalViewsDir);\n\n // Validate all files\n const results: ValidationResult[] = matchedFiles.map(f => validateFile(f, library));\n const validCount = results.filter(r => r.isValid).length;\n const invalidCount = results.length - validCount;\n\n // Output results\n if (options.json) {\n console.log(JSON.stringify({\n files: results,\n summary: { total: results.length, valid: validCount, invalid: invalidCount },\n }, null, 2));\n } else {\n if (!options.quiet) {\n console.log(chalk.bold(`\\nValidating ${results.length} canvas file(s)...\\n`));\n }\n\n for (const result of results) {\n if (result.isValid) {\n if (!options.quiet) {\n console.log(chalk.green(`\u2713 ${result.file}`));\n const warnings = result.issues.filter(i => i.type === 'warning');\n if (warnings.length > 0) {\n warnings.forEach(w => {\n console.log(chalk.yellow(` \u26A0 ${w.message}`));\n });\n }\n }\n } else {\n console.log(chalk.red(`\u2717 ${result.file}`));\n result.issues.forEach(issue => {\n const icon = issue.type === 'error' ? '\u2717' : '\u26A0';\n const color = issue.type === 'error' ? chalk.red : chalk.yellow;\n console.log(color(` ${icon} ${issue.message}`));\n if (issue.suggestion) {\n console.log(chalk.dim(` \u2192 ${issue.suggestion}`));\n }\n });\n }\n }\n\n // Summary\n console.log('');\n if (invalidCount === 0) {\n console.log(chalk.green(`\u2713 All ${validCount} file(s) are valid`));\n } else {\n console.log(chalk.red(`\u2717 ${invalidCount} of ${results.length} file(s) failed validation`));\n process.exit(1);\n }\n }\n } catch (error) {\n console.error(chalk.red('Error:'), (error as Error).message);\n process.exit(1);\n }\n });\n\n return command;\n}\n", "const ANSI_BACKGROUND_OFFSET = 10;\n\nconst wrapAnsi16 = (offset = 0) => code => `\\u001B[${code + offset}m`;\n\nconst wrapAnsi256 = (offset = 0) => code => `\\u001B[${38 + offset};5;${code}m`;\n\nconst wrapAnsi16m = (offset = 0) => (red, green, blue) => `\\u001B[${38 + offset};2;${red};${green};${blue}m`;\n\nconst styles = {\n\tmodifier: {\n\t\treset: [0, 0],\n\t\t// 21 isn't widely supported and 22 does the same thing\n\t\tbold: [1, 22],\n\t\tdim: [2, 22],\n\t\titalic: [3, 23],\n\t\tunderline: [4, 24],\n\t\toverline: [53, 55],\n\t\tinverse: [7, 27],\n\t\thidden: [8, 28],\n\t\tstrikethrough: [9, 29],\n\t},\n\tcolor: {\n\t\tblack: [30, 39],\n\t\tred: [31, 39],\n\t\tgreen: [32, 39],\n\t\tyellow: [33, 39],\n\t\tblue: [34, 39],\n\t\tmagenta: [35, 39],\n\t\tcyan: [36, 39],\n\t\twhite: [37, 39],\n\n\t\t// Bright color\n\t\tblackBright: [90, 39],\n\t\tgray: [90, 39], // Alias of `blackBright`\n\t\tgrey: [90, 39], // Alias of `blackBright`\n\t\tredBright: [91, 39],\n\t\tgreenBright: [92, 39],\n\t\tyellowBright: [93, 39],\n\t\tblueBright: [94, 39],\n\t\tmagentaBright: [95, 39],\n\t\tcyanBright: [96, 39],\n\t\twhiteBright: [97, 39],\n\t},\n\tbgColor: {\n\t\tbgBlack: [40, 49],\n\t\tbgRed: [41, 49],\n\t\tbgGreen: [42, 49],\n\t\tbgYellow: [43, 49],\n\t\tbgBlue: [44, 49],\n\t\tbgMagenta: [45, 49],\n\t\tbgCyan: [46, 49],\n\t\tbgWhite: [47, 49],\n\n\t\t// Bright color\n\t\tbgBlackBright: [100, 49],\n\t\tbgGray: [100, 49], // Alias of `bgBlackBright`\n\t\tbgGrey: [100, 49], // Alias of `bgBlackBright`\n\t\tbgRedBright: [101, 49],\n\t\tbgGreenBright: [102, 49],\n\t\tbgYellowBright: [103, 49],\n\t\tbgBlueBright: [104, 49],\n\t\tbgMagentaBright: [105, 49],\n\t\tbgCyanBright: [106, 49],\n\t\tbgWhiteBright: [107, 49],\n\t},\n};\n\nexport const modifierNames = Object.keys(styles.modifier);\nexport const foregroundColorNames = Object.keys(styles.color);\nexport const backgroundColorNames = Object.keys(styles.bgColor);\nexport const colorNames = [...foregroundColorNames, ...backgroundColorNames];\n\nfunction assembleStyles() {\n\tconst codes = new Map();\n\n\tfor (const [groupName, group] of Object.entries(styles)) {\n\t\tfor (const [styleName, style] of Object.entries(group)) {\n\t\t\tstyles[styleName] = {\n\t\t\t\topen: `\\u001B[${style[0]}m`,\n\t\t\t\tclose: `\\u001B[${style[1]}m`,\n\t\t\t};\n\n\t\t\tgroup[styleName] = styles[styleName];\n\n\t\t\tcodes.set(style[0], style[1]);\n\t\t}\n\n\t\tObject.defineProperty(styles, groupName, {\n\t\t\tvalue: group,\n\t\t\tenumerable: false,\n\t\t});\n\t}\n\n\tObject.defineProperty(styles, 'codes', {\n\t\tvalue: codes,\n\t\tenumerable: false,\n\t});\n\n\tstyles.color.close = '\\u001B[39m';\n\tstyles.bgColor.close = '\\u001B[49m';\n\n\tstyles.color.ansi = wrapAnsi16();\n\tstyles.color.ansi256 = wrapAnsi256();\n\tstyles.color.ansi16m = wrapAnsi16m();\n\tstyles.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);\n\tstyles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);\n\tstyles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);\n\n\t// From https://github.com/Qix-/color-convert/blob/3f0e0d4e92e235796ccb17f6e85c72094a651f49/conversions.js\n\tObject.defineProperties(styles, {\n\t\trgbToAnsi256: {\n\t\t\tvalue(red, green, blue) {\n\t\t\t\t// We use the extended greyscale palette here, with the exception of\n\t\t\t\t// black and white. normal palette only has 4 greyscale shades.\n\t\t\t\tif (red === green && green === blue) {\n\t\t\t\t\tif (red < 8) {\n\t\t\t\t\t\treturn 16;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (red > 248) {\n\t\t\t\t\t\treturn 231;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn Math.round(((red - 8) / 247) * 24) + 232;\n\t\t\t\t}\n\n\t\t\t\treturn 16\n\t\t\t\t\t+ (36 * Math.round(red / 255 * 5))\n\t\t\t\t\t+ (6 * Math.round(green / 255 * 5))\n\t\t\t\t\t+ Math.round(blue / 255 * 5);\n\t\t\t},\n\t\t\tenumerable: false,\n\t\t},\n\t\thexToRgb: {\n\t\t\tvalue(hex) {\n\t\t\t\tconst matches = /[a-f\\d]{6}|[a-f\\d]{3}/i.exec(hex.toString(16));\n\t\t\t\tif (!matches) {\n\t\t\t\t\treturn [0, 0, 0];\n\t\t\t\t}\n\n\t\t\t\tlet [colorString] = matches;\n\n\t\t\t\tif (colorString.length === 3) {\n\t\t\t\t\tcolorString = [...colorString].map(character => character + character).join('');\n\t\t\t\t}\n\n\t\t\t\tconst integer = Number.parseInt(colorString, 16);\n\n\t\t\t\treturn [\n\t\t\t\t\t/* eslint-disable no-bitwise */\n\t\t\t\t\t(integer >> 16) & 0xFF,\n\t\t\t\t\t(integer >> 8) & 0xFF,\n\t\t\t\t\tinteger & 0xFF,\n\t\t\t\t\t/* eslint-enable no-bitwise */\n\t\t\t\t];\n\t\t\t},\n\t\t\tenumerable: false,\n\t\t},\n\t\thexToAnsi256: {\n\t\t\tvalue: hex => styles.rgbToAnsi256(...styles.hexToRgb(hex)),\n\t\t\tenumerable: false,\n\t\t},\n\t\tansi256ToAnsi: {\n\t\t\tvalue(code) {\n\t\t\t\tif (code < 8) {\n\t\t\t\t\treturn 30 + code;\n\t\t\t\t}\n\n\t\t\t\tif (code < 16) {\n\t\t\t\t\treturn 90 + (code - 8);\n\t\t\t\t}\n\n\t\t\t\tlet red;\n\t\t\t\tlet green;\n\t\t\t\tlet blue;\n\n\t\t\t\tif (code >= 232) {\n\t\t\t\t\tred = (((code - 232) * 10) + 8) / 255;\n\t\t\t\t\tgreen = red;\n\t\t\t\t\tblue = red;\n\t\t\t\t} else {\n\t\t\t\t\tcode -= 16;\n\n\t\t\t\t\tconst remainder = code % 36;\n\n\t\t\t\t\tred = Math.floor(code / 36) / 5;\n\t\t\t\t\tgreen = Math.floor(remainder / 6) / 5;\n\t\t\t\t\tblue = (remainder % 6) / 5;\n\t\t\t\t}\n\n\t\t\t\tconst value = Math.max(red, green, blue) * 2;\n\n\t\t\t\tif (value === 0) {\n\t\t\t\t\treturn 30;\n\t\t\t\t}\n\n\t\t\t\t// eslint-disable-next-line no-bitwise\n\t\t\t\tlet result = 30 + ((Math.round(blue) << 2) | (Math.round(green) << 1) | Math.round(red));\n\n\t\t\t\tif (value === 2) {\n\t\t\t\t\tresult += 60;\n\t\t\t\t}\n\n\t\t\t\treturn result;\n\t\t\t},\n\t\t\tenumerable: false,\n\t\t},\n\t\trgbToAnsi: {\n\t\t\tvalue: (red, green, blue) => styles.ansi256ToAnsi(styles.rgbToAnsi256(red, green, blue)),\n\t\t\tenumerable: false,\n\t\t},\n\t\thexToAnsi: {\n\t\t\tvalue: hex => styles.ansi256ToAnsi(styles.hexToAnsi256(hex)),\n\t\t\tenumerable: false,\n\t\t},\n\t});\n\n\treturn styles;\n}\n\nconst ansiStyles = assembleStyles();\n\nexport default ansiStyles;\n", "import process from 'node:process';\nimport os from 'node:os';\nimport tty from 'node:tty';\n\n// From: https://github.com/sindresorhus/has-flag/blob/main/index.js\n/// function hasFlag(flag, argv = globalThis.Deno?.args ?? process.argv) {\nfunction hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : process.argv) {\n\tconst prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--');\n\tconst position = argv.indexOf(prefix + flag);\n\tconst terminatorPosition = argv.indexOf('--');\n\treturn position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);\n}\n\nconst {env} = process;\n\nlet flagForceColor;\nif (\n\thasFlag('no-color')\n\t|| hasFlag('no-colors')\n\t|| hasFlag('color=false')\n\t|| hasFlag('color=never')\n) {\n\tflagForceColor = 0;\n} else if (\n\thasFlag('color')\n\t|| hasFlag('colors')\n\t|| hasFlag('color=true')\n\t|| hasFlag('color=always')\n) {\n\tflagForceColor = 1;\n}\n\nfunction envForceColor() {\n\tif ('FORCE_COLOR' in env) {\n\t\tif (env.FORCE_COLOR === 'true') {\n\t\t\treturn 1;\n\t\t}\n\n\t\tif (env.FORCE_COLOR === 'false') {\n\t\t\treturn 0;\n\t\t}\n\n\t\treturn env.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3);\n\t}\n}\n\nfunction translateLevel(level) {\n\tif (level === 0) {\n\t\treturn false;\n\t}\n\n\treturn {\n\t\tlevel,\n\t\thasBasic: true,\n\t\thas256: level >= 2,\n\t\thas16m: level >= 3,\n\t};\n}\n\nfunction _supportsColor(haveStream, {streamIsTTY, sniffFlags = true} = {}) {\n\tconst noFlagForceColor = envForceColor();\n\tif (noFlagForceColor !== undefined) {\n\t\tflagForceColor = noFlagForceColor;\n\t}\n\n\tconst forceColor = sniffFlags ? flagForceColor : noFlagForceColor;\n\n\tif (forceColor === 0) {\n\t\treturn 0;\n\t}\n\n\tif (sniffFlags) {\n\t\tif (hasFlag('color=16m')\n\t\t\t|| hasFlag('color=full')\n\t\t\t|| hasFlag('color=truecolor')) {\n\t\t\treturn 3;\n\t\t}\n\n\t\tif (hasFlag('color=256')) {\n\t\t\treturn 2;\n\t\t}\n\t}\n\n\t// Check for Azure DevOps pipelines.\n\t// Has to be above the `!streamIsTTY` check.\n\tif ('TF_BUILD' in env && 'AGENT_NAME' in env) {\n\t\treturn 1;\n\t}\n\n\tif (haveStream && !streamIsTTY && forceColor === undefined) {\n\t\treturn 0;\n\t}\n\n\tconst min = forceColor || 0;\n\n\tif (env.TERM === 'dumb') {\n\t\treturn min;\n\t}\n\n\tif (process.platform === 'win32') {\n\t\t// Windows 10 build 10586 is the first Windows release that supports 256 colors.\n\t\t// Windows 10 build 14931 is the first release that supports 16m/TrueColor.\n\t\tconst osRelease = os.release().split('.');\n\t\tif (\n\t\t\tNumber(osRelease[0]) >= 10\n\t\t\t&& Number(osRelease[2]) >= 10_586\n\t\t) {\n\t\t\treturn Number(osRelease[2]) >= 14_931 ? 3 : 2;\n\t\t}\n\n\t\treturn 1;\n\t}\n\n\tif ('CI' in env) {\n\t\tif (['GITHUB_ACTIONS', 'GITEA_ACTIONS', 'CIRCLECI'].some(key => key in env)) {\n\t\t\treturn 3;\n\t\t}\n\n\t\tif (['TRAVIS', 'APPVEYOR', 'GITLAB_CI', 'BUILDKITE', 'DRONE'].some(sign => sign in env) || env.CI_NAME === 'codeship') {\n\t\t\treturn 1;\n\t\t}\n\n\t\treturn min;\n\t}\n\n\tif ('TEAMCITY_VERSION' in env) {\n\t\treturn /^(9\\.(0*[1-9]\\d*)\\.|\\d{2,}\\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;\n\t}\n\n\tif (env.COLORTERM === 'truecolor') {\n\t\treturn 3;\n\t}\n\n\tif (env.TERM === 'xterm-kitty') {\n\t\treturn 3;\n\t}\n\n\tif (env.TERM === 'xterm-ghostty') {\n\t\treturn 3;\n\t}\n\n\tif (env.TERM === 'wezterm') {\n\t\treturn 3;\n\t}\n\n\tif ('TERM_PROGRAM' in env) {\n\t\tconst version = Number.parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10);\n\n\t\tswitch (env.TERM_PROGRAM) {\n\t\t\tcase 'iTerm.app': {\n\t\t\t\treturn version >= 3 ? 3 : 2;\n\t\t\t}\n\n\t\t\tcase 'Apple_Terminal': {\n\t\t\t\treturn 2;\n\t\t\t}\n\t\t\t// No default\n\t\t}\n\t}\n\n\tif (/-256(color)?$/i.test(env.TERM)) {\n\t\treturn 2;\n\t}\n\n\tif (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {\n\t\treturn 1;\n\t}\n\n\tif ('COLORTERM' in env) {\n\t\treturn 1;\n\t}\n\n\treturn min;\n}\n\nexport function createSupportsColor(stream, options = {}) {\n\tconst level = _supportsColor(stream, {\n\t\tstreamIsTTY: stream && stream.isTTY,\n\t\t...options,\n\t});\n\n\treturn translateLevel(level);\n}\n\nconst supportsColor = {\n\tstdout: createSupportsColor({isTTY: tty.isatty(1)}),\n\tstderr: createSupportsColor({isTTY: tty.isatty(2)}),\n};\n\nexport default supportsColor;\n", "// TODO: When targeting Node.js 16, use `String.prototype.replaceAll`.\nexport function stringReplaceAll(string, substring, replacer) {\n\tlet index = string.indexOf(substring);\n\tif (index === -1) {\n\t\treturn string;\n\t}\n\n\tconst substringLength = substring.length;\n\tlet endIndex = 0;\n\tlet returnValue = '';\n\tdo {\n\t\treturnValue += string.slice(endIndex, index) + substring + replacer;\n\t\tendIndex = index + substringLength;\n\t\tindex = string.indexOf(substring, endIndex);\n\t} while (index !== -1);\n\n\treturnValue += string.slice(endIndex);\n\treturn returnValue;\n}\n\nexport function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) {\n\tlet endIndex = 0;\n\tlet returnValue = '';\n\tdo {\n\t\tconst gotCR = string[index - 1] === '\\r';\n\t\treturnValue += string.slice(endIndex, (gotCR ? index - 1 : index)) + prefix + (gotCR ? '\\r\\n' : '\\n') + postfix;\n\t\tendIndex = index + 1;\n\t\tindex = string.indexOf('\\n', endIndex);\n\t} while (index !== -1);\n\n\treturnValue += string.slice(endIndex);\n\treturn returnValue;\n}\n", "import ansiStyles from '#ansi-styles';\nimport supportsColor from '#supports-color';\nimport { // eslint-disable-line import/order\n\tstringReplaceAll,\n\tstringEncaseCRLFWithFirstIndex,\n} from './utilities.js';\n\nconst {stdout: stdoutColor, stderr: stderrColor} = supportsColor;\n\nconst GENERATOR = Symbol('GENERATOR');\nconst STYLER = Symbol('STYLER');\nconst IS_EMPTY = Symbol('IS_EMPTY');\n\n// `supportsColor.level` \u2192 `ansiStyles.color[name]` mapping\nconst levelMapping = [\n\t'ansi',\n\t'ansi',\n\t'ansi256',\n\t'ansi16m',\n];\n\nconst styles = Object.create(null);\n\nconst applyOptions = (object, options = {}) => {\n\tif (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) {\n\t\tthrow new Error('The `level` option should be an integer from 0 to 3');\n\t}\n\n\t// Detect level if not set manually\n\tconst colorLevel = stdoutColor ? stdoutColor.level : 0;\n\tobject.level = options.level === undefined ? colorLevel : options.level;\n};\n\nexport class Chalk {\n\tconstructor(options) {\n\t\t// eslint-disable-next-line no-constructor-return\n\t\treturn chalkFactory(options);\n\t}\n}\n\nconst chalkFactory = options => {\n\tconst chalk = (...strings) => strings.join(' ');\n\tapplyOptions(chalk, options);\n\n\tObject.setPrototypeOf(chalk, createChalk.prototype);\n\n\treturn chalk;\n};\n\nfunction createChalk(options) {\n\treturn chalkFactory(options);\n}\n\nObject.setPrototypeOf(createChalk.prototype, Function.prototype);\n\nfor (const [styleName, style] of Object.entries(ansiStyles)) {\n\tstyles[styleName] = {\n\t\tget() {\n\t\t\tconst builder = createBuilder(this, createStyler(style.open, style.close, this[STYLER]), this[IS_EMPTY]);\n\t\t\tObject.defineProperty(this, styleName, {value: builder});\n\t\t\treturn builder;\n\t\t},\n\t};\n}\n\nstyles.visible = {\n\tget() {\n\t\tconst builder = createBuilder(this, this[STYLER], true);\n\t\tObject.defineProperty(this, 'visible', {value: builder});\n\t\treturn builder;\n\t},\n};\n\nconst getModelAnsi = (model, level, type, ...arguments_) => {\n\tif (model === 'rgb') {\n\t\tif (level === 'ansi16m') {\n\t\t\treturn ansiStyles[type].ansi16m(...arguments_);\n\t\t}\n\n\t\tif (level === 'ansi256') {\n\t\t\treturn ansiStyles[type].ansi256(ansiStyles.rgbToAnsi256(...arguments_));\n\t\t}\n\n\t\treturn ansiStyles[type].ansi(ansiStyles.rgbToAnsi(...arguments_));\n\t}\n\n\tif (model === 'hex') {\n\t\treturn getModelAnsi('rgb', level, type, ...ansiStyles.hexToRgb(...arguments_));\n\t}\n\n\treturn ansiStyles[type][model](...arguments_);\n};\n\nconst usedModels = ['rgb', 'hex', 'ansi256'];\n\nfor (const model of usedModels) {\n\tstyles[model] = {\n\t\tget() {\n\t\t\tconst {level} = this;\n\t\t\treturn function (...arguments_) {\n\t\t\t\tconst styler = createStyler(getModelAnsi(model, levelMapping[level], 'color', ...arguments_), ansiStyles.color.close, this[STYLER]);\n\t\t\t\treturn createBuilder(this, styler, this[IS_EMPTY]);\n\t\t\t};\n\t\t},\n\t};\n\n\tconst bgModel = 'bg' + model[0].toUpperCase() + model.slice(1);\n\tstyles[bgModel] = {\n\t\tget() {\n\t\t\tconst {level} = this;\n\t\t\treturn function (...arguments_) {\n\t\t\t\tconst styler = createStyler(getModelAnsi(model, levelMapping[level], 'bgColor', ...arguments_), ansiStyles.bgColor.close, this[STYLER]);\n\t\t\t\treturn createBuilder(this, styler, this[IS_EMPTY]);\n\t\t\t};\n\t\t},\n\t};\n}\n\nconst proto = Object.defineProperties(() => {}, {\n\t...styles,\n\tlevel: {\n\t\tenumerable: true,\n\t\tget() {\n\t\t\treturn this[GENERATOR].level;\n\t\t},\n\t\tset(level) {\n\t\t\tthis[GENERATOR].level = level;\n\t\t},\n\t},\n});\n\nconst createStyler = (open, close, parent) => {\n\tlet openAll;\n\tlet closeAll;\n\tif (parent === undefined) {\n\t\topenAll = open;\n\t\tcloseAll = close;\n\t} else {\n\t\topenAll = parent.openAll + open;\n\t\tcloseAll = close + parent.closeAll;\n\t}\n\n\treturn {\n\t\topen,\n\t\tclose,\n\t\topenAll,\n\t\tcloseAll,\n\t\tparent,\n\t};\n};\n\nconst createBuilder = (self, _styler, _isEmpty) => {\n\t// Single argument is hot path, implicit coercion is faster than anything\n\t// eslint-disable-next-line no-implicit-coercion\n\tconst builder = (...arguments_) => applyStyle(builder, (arguments_.length === 1) ? ('' + arguments_[0]) : arguments_.join(' '));\n\n\t// We alter the prototype because we must return a function, but there is\n\t// no way to create a function with a different prototype\n\tObject.setPrototypeOf(builder, proto);\n\n\tbuilder[GENERATOR] = self;\n\tbuilder[STYLER] = _styler;\n\tbuilder[IS_EMPTY] = _isEmpty;\n\n\treturn builder;\n};\n\nconst applyStyle = (self, string) => {\n\tif (self.level <= 0 || !string) {\n\t\treturn self[IS_EMPTY] ? '' : string;\n\t}\n\n\tlet styler = self[STYLER];\n\n\tif (styler === undefined) {\n\t\treturn string;\n\t}\n\n\tconst {openAll, closeAll} = styler;\n\tif (string.includes('\\u001B')) {\n\t\twhile (styler !== undefined) {\n\t\t\t// Replace any instances already present with a re-opening code\n\t\t\t// otherwise only the part of the string until said closing code\n\t\t\t// will be colored, and the rest will simply be 'plain'.\n\t\t\tstring = stringReplaceAll(string, styler.close, styler.open);\n\n\t\t\tstyler = styler.parent;\n\t\t}\n\t}\n\n\t// We can move both next actions out of loop, because remaining actions in loop won't have\n\t// any/visible effect on parts we add here. Close the styling before a linebreak and reopen\n\t// after next line to fix a bleed issue on macOS: https://github.com/chalk/chalk/pull/92\n\tconst lfIndex = string.indexOf('\\n');\n\tif (lfIndex !== -1) {\n\t\tstring = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex);\n\t}\n\n\treturn openAll + string + closeAll;\n};\n\nObject.defineProperties(createChalk.prototype, styles);\n\nconst chalk = createChalk();\nexport const chalkStderr = createChalk({level: stderrColor ? stderrColor.level : 0});\n\nexport {\n\tmodifierNames,\n\tforegroundColorNames,\n\tbackgroundColorNames,\n\tcolorNames,\n\n\t// TODO: Remove these aliases in the next major version\n\tmodifierNames as modifiers,\n\tforegroundColorNames as foregroundColors,\n\tbackgroundColorNames as backgroundColors,\n\tcolorNames as colors,\n} from './vendor/ansi-styles/index.js';\n\nexport {\n\tstdoutColor as supportsColor,\n\tstderrColor as supportsColorStderr,\n};\n\nexport default chalk;\n", "import process from 'node:process';\nimport fs from 'node:fs';\nimport nodePath from 'node:path';\nimport {Readable} from 'node:stream';\nimport mergeStreams from '@sindresorhus/merge-streams';\nimport fastGlob from 'fast-glob';\nimport {toPath} from 'unicorn-magic/node';\nimport {\n\tGITIGNORE_FILES_PATTERN,\n\tgetIgnorePatternsAndPredicate,\n\tgetIgnorePatternsAndPredicateSync,\n} from './ignore.js';\nimport {\n\tbindFsMethod,\n\tpromisifyFsMethod,\n\tisNegativePattern,\n\tnormalizeDirectoryPatternForFastGlob,\n\tadjustIgnorePatternsForParentDirectories,\n\tconvertPatternsForFastGlob,\n} from './utilities.js';\n\nconst assertPatternsInput = patterns => {\n\tif (patterns.some(pattern => typeof pattern !== 'string')) {\n\t\tthrow new TypeError('Patterns must be a string or an array of strings');\n\t}\n};\n\nconst getStatMethod = fsImplementation =>\n\tbindFsMethod(fsImplementation?.promises, 'stat')\n\t?? bindFsMethod(fs.promises, 'stat')\n\t?? promisifyFsMethod(fsImplementation, 'stat');\n\nconst getStatSyncMethod = fsImplementation =>\n\tbindFsMethod(fsImplementation, 'statSync')\n\t?? bindFsMethod(fs, 'statSync');\n\nconst isDirectory = async (path, fsImplementation) => {\n\ttry {\n\t\tconst stats = await getStatMethod(fsImplementation)(path);\n\t\treturn stats.isDirectory();\n\t} catch {\n\t\treturn false;\n\t}\n};\n\nconst isDirectorySync = (path, fsImplementation) => {\n\ttry {\n\t\tconst stats = getStatSyncMethod(fsImplementation)(path);\n\t\treturn stats.isDirectory();\n\t} catch {\n\t\treturn false;\n\t}\n};\n\nconst normalizePathForDirectoryGlob = (filePath, cwd) => {\n\tconst path = isNegativePattern(filePath) ? filePath.slice(1) : filePath;\n\treturn nodePath.isAbsolute(path) ? path : nodePath.join(cwd, path);\n};\n\nconst shouldExpandGlobstarDirectory = pattern => {\n\tconst match = pattern?.match(/\\*\\*\\/([^/]+)$/);\n\tif (!match) {\n\t\treturn false;\n\t}\n\n\tconst dirname = match[1];\n\tconst hasWildcards = /[*?[\\]{}]/.test(dirname);\n\tconst hasExtension = nodePath.extname(dirname) && !dirname.startsWith('.');\n\n\treturn !hasWildcards && !hasExtension;\n};\n\nconst getDirectoryGlob = ({directoryPath, files, extensions}) => {\n\tconst extensionGlob = extensions?.length > 0 ? `.${extensions.length > 1 ? `{${extensions.join(',')}}` : extensions[0]}` : '';\n\treturn files\n\t\t? files.map(file => nodePath.posix.join(directoryPath, `**/${nodePath.extname(file) ? file : `${file}${extensionGlob}`}`))\n\t\t: [nodePath.posix.join(directoryPath, `**${extensionGlob ? `/*${extensionGlob}` : ''}`)];\n};\n\nconst directoryToGlob = async (directoryPaths, {\n\tcwd = process.cwd(),\n\tfiles,\n\textensions,\n\tfs: fsImplementation,\n} = {}) => {\n\tconst globs = await Promise.all(directoryPaths.map(async directoryPath => {\n\t\t// Check pattern without negative prefix\n\t\tconst checkPattern = isNegativePattern(directoryPath) ? directoryPath.slice(1) : directoryPath;\n\n\t\t// Expand globstar directory patterns like **/dirname to **/dirname/**\n\t\tif (shouldExpandGlobstarDirectory(checkPattern)) {\n\t\t\treturn getDirectoryGlob({directoryPath, files, extensions});\n\t\t}\n\n\t\t// Original logic for checking actual directories\n\t\tconst pathToCheck = normalizePathForDirectoryGlob(directoryPath, cwd);\n\t\treturn (await isDirectory(pathToCheck, fsImplementation)) ? getDirectoryGlob({directoryPath, files, extensions}) : directoryPath;\n\t}));\n\n\treturn globs.flat();\n};\n\nconst directoryToGlobSync = (directoryPaths, {\n\tcwd = process.cwd(),\n\tfiles,\n\textensions,\n\tfs: fsImplementation,\n} = {}) => directoryPaths.flatMap(directoryPath => {\n\t// Check pattern without negative prefix\n\tconst checkPattern = isNegativePattern(directoryPath) ? directoryPath.slice(1) : directoryPath;\n\n\t// Expand globstar directory patterns like **/dirname to **/dirname/**\n\tif (shouldExpandGlobstarDirectory(checkPattern)) {\n\t\treturn getDirectoryGlob({directoryPath, files, extensions});\n\t}\n\n\t// Original logic for checking actual directories\n\tconst pathToCheck = normalizePathForDirectoryGlob(directoryPath, cwd);\n\treturn isDirectorySync(pathToCheck, fsImplementation) ? getDirectoryGlob({directoryPath, files, extensions}) : directoryPath;\n});\n\nconst toPatternsArray = patterns => {\n\tpatterns = [...new Set([patterns].flat())];\n\tassertPatternsInput(patterns);\n\treturn patterns;\n};\n\nconst checkCwdOption = (cwd, fsImplementation = fs) => {\n\tif (!cwd || !fsImplementation.statSync) {\n\t\treturn;\n\t}\n\n\tlet stats;\n\ttry {\n\t\tstats = fsImplementation.statSync(cwd);\n\t} catch {\n\t\t// If stat fails (e.g., path doesn't exist), let fast-glob handle it\n\t\treturn;\n\t}\n\n\tif (!stats.isDirectory()) {\n\t\tthrow new Error(`The \\`cwd\\` option must be a path to a directory, got: ${cwd}`);\n\t}\n};\n\nconst normalizeOptions = (options = {}) => {\n\t// Normalize ignore to an array (fast-glob accepts string but we need array internally)\n\tconst ignore = options.ignore\n\t\t? (Array.isArray(options.ignore) ? options.ignore : [options.ignore])\n\t\t: [];\n\n\toptions = {\n\t\t...options,\n\t\tignore,\n\t\texpandDirectories: options.expandDirectories ?? true,\n\t\tcwd: toPath(options.cwd),\n\t};\n\n\tcheckCwdOption(options.cwd, options.fs);\n\n\treturn options;\n};\n\nconst normalizeArguments = function_ => async (patterns, options) => function_(toPatternsArray(patterns), normalizeOptions(options));\nconst normalizeArgumentsSync = function_ => (patterns, options) => function_(toPatternsArray(patterns), normalizeOptions(options));\n\nconst getIgnoreFilesPatterns = options => {\n\tconst {ignoreFiles, gitignore} = options;\n\n\tconst patterns = ignoreFiles ? toPatternsArray(ignoreFiles) : [];\n\tif (gitignore) {\n\t\tpatterns.push(GITIGNORE_FILES_PATTERN);\n\t}\n\n\treturn patterns;\n};\n\n/**\nApply gitignore patterns to options and return filter predicate.\n\nWhen negation patterns are present (e.g., '!important.log'), we cannot pass positive patterns to fast-glob because it would filter out files before our predicate can re-include them. In this case, we rely entirely on the predicate for filtering, which handles negations correctly.\n\nWhen there are no negations, we optimize by passing patterns to fast-glob's ignore option to skip directories during traversal (performance optimization).\n\nAll patterns (including negated) are always used in the filter predicate to ensure correct Git-compatible behavior.\n\n@returns {Promise<{options: Object, filter: Function}>}\n*/\nconst applyIgnoreFilesAndGetFilter = async options => {\n\tconst ignoreFilesPatterns = getIgnoreFilesPatterns(options);\n\n\tif (ignoreFilesPatterns.length === 0) {\n\t\treturn {\n\t\t\toptions,\n\t\t\tfilter: createFilterFunction(false, options.cwd),\n\t\t};\n\t}\n\n\t// Read ignore files once and get both patterns and predicate\n\t// Enable parent .gitignore search when using gitignore option\n\tconst includeParentIgnoreFiles = options.gitignore === true;\n\tconst {patterns, predicate, usingGitRoot} = await getIgnorePatternsAndPredicate(ignoreFilesPatterns, options, includeParentIgnoreFiles);\n\n\t// Convert patterns to fast-glob format (may return empty array if predicate should handle everything)\n\tconst patternsForFastGlob = convertPatternsForFastGlob(patterns, usingGitRoot, normalizeDirectoryPatternForFastGlob);\n\n\tconst modifiedOptions = {\n\t\t...options,\n\t\tignore: [...options.ignore, ...patternsForFastGlob],\n\t};\n\n\treturn {\n\t\toptions: modifiedOptions,\n\t\tfilter: createFilterFunction(predicate, options.cwd),\n\t};\n};\n\n/**\nApply gitignore patterns to options and return filter predicate (sync version).\n\n@returns {{options: Object, filter: Function}}\n*/\nconst applyIgnoreFilesAndGetFilterSync = options => {\n\tconst ignoreFilesPatterns = getIgnoreFilesPatterns(options);\n\n\tif (ignoreFilesPatterns.length === 0) {\n\t\treturn {\n\t\t\toptions,\n\t\t\tfilter: createFilterFunction(false, options.cwd),\n\t\t};\n\t}\n\n\t// Read ignore files once and get both patterns and predicate\n\t// Enable parent .gitignore search when using gitignore option\n\tconst includeParentIgnoreFiles = options.gitignore === true;\n\tconst {patterns, predicate, usingGitRoot} = getIgnorePatternsAndPredicateSync(ignoreFilesPatterns, options, includeParentIgnoreFiles);\n\n\t// Convert patterns to fast-glob format (may return empty array if predicate should handle everything)\n\tconst patternsForFastGlob = convertPatternsForFastGlob(patterns, usingGitRoot, normalizeDirectoryPatternForFastGlob);\n\n\tconst modifiedOptions = {\n\t\t...options,\n\t\tignore: [...options.ignore, ...patternsForFastGlob],\n\t};\n\n\treturn {\n\t\toptions: modifiedOptions,\n\t\tfilter: createFilterFunction(predicate, options.cwd),\n\t};\n};\n\nconst createFilterFunction = (isIgnored, cwd) => {\n\tconst seen = new Set();\n\tconst basePath = cwd || process.cwd();\n\tconst pathCache = new Map(); // Cache for resolved paths\n\n\treturn fastGlobResult => {\n\t\tconst pathKey = nodePath.normalize(fastGlobResult.path ?? fastGlobResult);\n\n\t\t// Check seen set first (fast path)\n\t\tif (seen.has(pathKey)) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Only compute absolute path and check predicate if needed\n\t\tif (isIgnored) {\n\t\t\tlet absolutePath = pathCache.get(pathKey);\n\t\t\tif (absolutePath === undefined) {\n\t\t\t\tabsolutePath = nodePath.isAbsolute(pathKey) ? pathKey : nodePath.resolve(basePath, pathKey);\n\t\t\t\tpathCache.set(pathKey, absolutePath);\n\n\t\t\t\t// Only clear path cache if it gets too large\n\t\t\t\t// Never clear 'seen' as it's needed for deduplication\n\t\t\t\tif (pathCache.size > 10_000) {\n\t\t\t\t\tpathCache.clear();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (isIgnored(absolutePath)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tseen.add(pathKey);\n\t\treturn true;\n\t};\n};\n\nconst unionFastGlobResults = (results, filter) => results.flat().filter(fastGlobResult => filter(fastGlobResult));\n\nconst convertNegativePatterns = (patterns, options) => {\n\t// If all patterns are negative, prepend a positive catch-all pattern\n\t// This makes negation-only patterns work intuitively (e.g., '!*.json' matches all files except JSON)\n\tif (patterns.length > 0 && patterns.every(pattern => isNegativePattern(pattern))) {\n\t\tpatterns = ['**/*', ...patterns];\n\t}\n\n\tconst tasks = [];\n\n\twhile (patterns.length > 0) {\n\t\tconst index = patterns.findIndex(pattern => isNegativePattern(pattern));\n\n\t\tif (index === -1) {\n\t\t\ttasks.push({patterns, options});\n\t\t\tbreak;\n\t\t}\n\n\t\tconst ignorePattern = patterns[index].slice(1);\n\n\t\tfor (const task of tasks) {\n\t\t\ttask.options.ignore.push(ignorePattern);\n\t\t}\n\n\t\tif (index !== 0) {\n\t\t\ttasks.push({\n\t\t\t\tpatterns: patterns.slice(0, index),\n\t\t\t\toptions: {\n\t\t\t\t\t...options,\n\t\t\t\t\tignore: [\n\t\t\t\t\t\t...options.ignore,\n\t\t\t\t\t\tignorePattern,\n\t\t\t\t\t],\n\t\t\t\t},\n\t\t\t});\n\t\t}\n\n\t\tpatterns = patterns.slice(index + 1);\n\t}\n\n\treturn tasks;\n};\n\nconst applyParentDirectoryIgnoreAdjustments = tasks => tasks.map(task => ({\n\tpatterns: task.patterns,\n\toptions: {\n\t\t...task.options,\n\t\tignore: adjustIgnorePatternsForParentDirectories(task.patterns, task.options.ignore),\n\t},\n}));\n\nconst normalizeExpandDirectoriesOption = (options, cwd) => ({\n\t...(cwd ? {cwd} : {}),\n\t...(Array.isArray(options) ? {files: options} : options),\n});\n\nconst generateTasks = async (patterns, options) => {\n\tconst globTasks = convertNegativePatterns(patterns, options);\n\n\tconst {cwd, expandDirectories, fs: fsImplementation} = options;\n\n\tif (!expandDirectories) {\n\t\treturn applyParentDirectoryIgnoreAdjustments(globTasks);\n\t}\n\n\tconst directoryToGlobOptions = {\n\t\t...normalizeExpandDirectoriesOption(expandDirectories, cwd),\n\t\tfs: fsImplementation,\n\t};\n\n\treturn Promise.all(globTasks.map(async task => {\n\t\tlet {patterns, options} = task;\n\n\t\t[\n\t\t\tpatterns,\n\t\t\toptions.ignore,\n\t\t] = await Promise.all([\n\t\t\tdirectoryToGlob(patterns, directoryToGlobOptions),\n\t\t\tdirectoryToGlob(options.ignore, {cwd, fs: fsImplementation}),\n\t\t]);\n\n\t\t// Adjust ignore patterns for parent directory references\n\t\toptions.ignore = adjustIgnorePatternsForParentDirectories(patterns, options.ignore);\n\n\t\treturn {patterns, options};\n\t}));\n};\n\nconst generateTasksSync = (patterns, options) => {\n\tconst globTasks = convertNegativePatterns(patterns, options);\n\tconst {cwd, expandDirectories, fs: fsImplementation} = options;\n\n\tif (!expandDirectories) {\n\t\treturn applyParentDirectoryIgnoreAdjustments(globTasks);\n\t}\n\n\tconst directoryToGlobSyncOptions = {\n\t\t...normalizeExpandDirectoriesOption(expandDirectories, cwd),\n\t\tfs: fsImplementation,\n\t};\n\n\treturn globTasks.map(task => {\n\t\tlet {patterns, options} = task;\n\t\tpatterns = directoryToGlobSync(patterns, directoryToGlobSyncOptions);\n\t\toptions.ignore = directoryToGlobSync(options.ignore, {cwd, fs: fsImplementation});\n\n\t\t// Adjust ignore patterns for parent directory references\n\t\toptions.ignore = adjustIgnorePatternsForParentDirectories(patterns, options.ignore);\n\n\t\treturn {patterns, options};\n\t});\n};\n\nexport const globby = normalizeArguments(async (patterns, options) => {\n\t// Apply ignore files and get filter (reads .gitignore files once)\n\tconst {options: modifiedOptions, filter} = await applyIgnoreFilesAndGetFilter(options);\n\n\t// Generate tasks with modified options (includes gitignore patterns in ignore option)\n\tconst tasks = await generateTasks(patterns, modifiedOptions);\n\n\tconst results = await Promise.all(tasks.map(task => fastGlob(task.patterns, task.options)));\n\treturn unionFastGlobResults(results, filter);\n});\n\nexport const globbySync = normalizeArgumentsSync((patterns, options) => {\n\t// Apply ignore files and get filter (reads .gitignore files once)\n\tconst {options: modifiedOptions, filter} = applyIgnoreFilesAndGetFilterSync(options);\n\n\t// Generate tasks with modified options (includes gitignore patterns in ignore option)\n\tconst tasks = generateTasksSync(patterns, modifiedOptions);\n\n\tconst results = tasks.map(task => fastGlob.sync(task.patterns, task.options));\n\treturn unionFastGlobResults(results, filter);\n});\n\nexport const globbyStream = normalizeArgumentsSync((patterns, options) => {\n\t// Apply ignore files and get filter (reads .gitignore files once)\n\tconst {options: modifiedOptions, filter} = applyIgnoreFilesAndGetFilterSync(options);\n\n\t// Generate tasks with modified options (includes gitignore patterns in ignore option)\n\tconst tasks = generateTasksSync(patterns, modifiedOptions);\n\n\tconst streams = tasks.map(task => fastGlob.stream(task.patterns, task.options));\n\n\tif (streams.length === 0) {\n\t\treturn Readable.from([]);\n\t}\n\n\tconst stream = mergeStreams(streams).filter(fastGlobResult => filter(fastGlobResult));\n\n\t// Returning a web stream will require revisiting once Readable.toWeb integration is viable.\n\t// return Readable.toWeb(stream);\n\n\treturn stream;\n});\n\nexport const isDynamicPattern = normalizeArgumentsSync((patterns, options) => patterns.some(pattern => fastGlob.isDynamicPattern(pattern, options)));\n\nexport const generateGlobTasks = normalizeArguments(generateTasks);\nexport const generateGlobTasksSync = normalizeArgumentsSync(generateTasksSync);\n\nexport {\n\tisGitIgnored,\n\tisGitIgnoredSync,\n\tisIgnoredByIgnoreFiles,\n\tisIgnoredByIgnoreFilesSync,\n} from './ignore.js';\n\nexport const {convertPathToPattern} = fastGlob;\n", "import {on, once} from 'node:events';\nimport {PassThrough as PassThroughStream, getDefaultHighWaterMark} from 'node:stream';\nimport {finished} from 'node:stream/promises';\n\nexport default function mergeStreams(streams) {\n\tif (!Array.isArray(streams)) {\n\t\tthrow new TypeError(`Expected an array, got \\`${typeof streams}\\`.`);\n\t}\n\n\tfor (const stream of streams) {\n\t\tvalidateStream(stream);\n\t}\n\n\tconst objectMode = streams.some(({readableObjectMode}) => readableObjectMode);\n\tconst highWaterMark = getHighWaterMark(streams, objectMode);\n\tconst passThroughStream = new MergedStream({\n\t\tobjectMode,\n\t\twritableHighWaterMark: highWaterMark,\n\t\treadableHighWaterMark: highWaterMark,\n\t});\n\n\tfor (const stream of streams) {\n\t\tpassThroughStream.add(stream);\n\t}\n\n\treturn passThroughStream;\n}\n\nconst getHighWaterMark = (streams, objectMode) => {\n\tif (streams.length === 0) {\n\t\treturn getDefaultHighWaterMark(objectMode);\n\t}\n\n\tconst highWaterMarks = streams\n\t\t.filter(({readableObjectMode}) => readableObjectMode === objectMode)\n\t\t.map(({readableHighWaterMark}) => readableHighWaterMark);\n\treturn Math.max(...highWaterMarks);\n};\n\nclass MergedStream extends PassThroughStream {\n\t#streams = new Set([]);\n\t#ended = new Set([]);\n\t#aborted = new Set([]);\n\t#onFinished;\n\t#unpipeEvent = Symbol('unpipe');\n\t#streamPromises = new WeakMap();\n\n\tadd(stream) {\n\t\tvalidateStream(stream);\n\n\t\tif (this.#streams.has(stream)) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.#streams.add(stream);\n\n\t\tthis.#onFinished ??= onMergedStreamFinished(this, this.#streams, this.#unpipeEvent);\n\t\tconst streamPromise = endWhenStreamsDone({\n\t\t\tpassThroughStream: this,\n\t\t\tstream,\n\t\t\tstreams: this.#streams,\n\t\t\tended: this.#ended,\n\t\t\taborted: this.#aborted,\n\t\t\tonFinished: this.#onFinished,\n\t\t\tunpipeEvent: this.#unpipeEvent,\n\t\t});\n\t\tthis.#streamPromises.set(stream, streamPromise);\n\n\t\tstream.pipe(this, {end: false});\n\t}\n\n\tasync remove(stream) {\n\t\tvalidateStream(stream);\n\n\t\tif (!this.#streams.has(stream)) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst streamPromise = this.#streamPromises.get(stream);\n\t\tif (streamPromise === undefined) {\n\t\t\treturn false;\n\t\t}\n\n\t\tthis.#streamPromises.delete(stream);\n\n\t\tstream.unpipe(this);\n\t\tawait streamPromise;\n\t\treturn true;\n\t}\n}\n\nconst onMergedStreamFinished = async (passThroughStream, streams, unpipeEvent) => {\n\tupdateMaxListeners(passThroughStream, PASSTHROUGH_LISTENERS_COUNT);\n\tconst controller = new AbortController();\n\n\ttry {\n\t\tawait Promise.race([\n\t\t\tonMergedStreamEnd(passThroughStream, controller),\n\t\t\tonInputStreamsUnpipe(passThroughStream, streams, unpipeEvent, controller),\n\t\t]);\n\t} finally {\n\t\tcontroller.abort();\n\t\tupdateMaxListeners(passThroughStream, -PASSTHROUGH_LISTENERS_COUNT);\n\t}\n};\n\nconst onMergedStreamEnd = async (passThroughStream, {signal}) => {\n\ttry {\n\t\tawait finished(passThroughStream, {signal, cleanup: true});\n\t} catch (error) {\n\t\terrorOrAbortStream(passThroughStream, error);\n\t\tthrow error;\n\t}\n};\n\nconst onInputStreamsUnpipe = async (passThroughStream, streams, unpipeEvent, {signal}) => {\n\tfor await (const [unpipedStream] of on(passThroughStream, 'unpipe', {signal})) {\n\t\tif (streams.has(unpipedStream)) {\n\t\t\tunpipedStream.emit(unpipeEvent);\n\t\t}\n\t}\n};\n\nconst validateStream = stream => {\n\tif (typeof stream?.pipe !== 'function') {\n\t\tthrow new TypeError(`Expected a readable stream, got: \\`${typeof stream}\\`.`);\n\t}\n};\n\nconst endWhenStreamsDone = async ({passThroughStream, stream, streams, ended, aborted, onFinished, unpipeEvent}) => {\n\tupdateMaxListeners(passThroughStream, PASSTHROUGH_LISTENERS_PER_STREAM);\n\tconst controller = new AbortController();\n\n\ttry {\n\t\tawait Promise.race([\n\t\t\tafterMergedStreamFinished(onFinished, stream, controller),\n\t\t\tonInputStreamEnd({\n\t\t\t\tpassThroughStream,\n\t\t\t\tstream,\n\t\t\t\tstreams,\n\t\t\t\tended,\n\t\t\t\taborted,\n\t\t\t\tcontroller,\n\t\t\t}),\n\t\t\tonInputStreamUnpipe({\n\t\t\t\tstream,\n\t\t\t\tstreams,\n\t\t\t\tended,\n\t\t\t\taborted,\n\t\t\t\tunpipeEvent,\n\t\t\t\tcontroller,\n\t\t\t}),\n\t\t]);\n\t} finally {\n\t\tcontroller.abort();\n\t\tupdateMaxListeners(passThroughStream, -PASSTHROUGH_LISTENERS_PER_STREAM);\n\t}\n\n\tif (streams.size > 0 && streams.size === ended.size + aborted.size) {\n\t\tif (ended.size === 0 && aborted.size > 0) {\n\t\t\tabortStream(passThroughStream);\n\t\t} else {\n\t\t\tendStream(passThroughStream);\n\t\t}\n\t}\n};\n\nconst afterMergedStreamFinished = async (onFinished, stream, {signal}) => {\n\ttry {\n\t\tawait onFinished;\n\t\tif (!signal.aborted) {\n\t\t\tabortStream(stream);\n\t\t}\n\t} catch (error) {\n\t\tif (!signal.aborted) {\n\t\t\terrorOrAbortStream(stream, error);\n\t\t}\n\t}\n};\n\nconst onInputStreamEnd = async ({passThroughStream, stream, streams, ended, aborted, controller: {signal}}) => {\n\ttry {\n\t\tawait finished(stream, {\n\t\t\tsignal,\n\t\t\tcleanup: true,\n\t\t\treadable: true,\n\t\t\twritable: false,\n\t\t});\n\t\tif (streams.has(stream)) {\n\t\t\tended.add(stream);\n\t\t}\n\t} catch (error) {\n\t\tif (signal.aborted || !streams.has(stream)) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (isAbortError(error)) {\n\t\t\taborted.add(stream);\n\t\t} else {\n\t\t\terrorStream(passThroughStream, error);\n\t\t}\n\t}\n};\n\nconst onInputStreamUnpipe = async ({stream, streams, ended, aborted, unpipeEvent, controller: {signal}}) => {\n\tawait once(stream, unpipeEvent, {signal});\n\n\tif (!stream.readable) {\n\t\treturn once(signal, 'abort', {signal});\n\t}\n\n\tstreams.delete(stream);\n\tended.delete(stream);\n\taborted.delete(stream);\n};\n\nconst endStream = stream => {\n\tif (stream.writable) {\n\t\tstream.end();\n\t}\n};\n\nconst errorOrAbortStream = (stream, error) => {\n\tif (isAbortError(error)) {\n\t\tabortStream(stream);\n\t} else {\n\t\terrorStream(stream, error);\n\t}\n};\n\n// This is the error thrown by `finished()` on `stream.destroy()`\nconst isAbortError = error => error?.code === 'ERR_STREAM_PREMATURE_CLOSE';\n\nconst abortStream = stream => {\n\tif (stream.readable || stream.writable) {\n\t\tstream.destroy();\n\t}\n};\n\n// `stream.destroy(error)` crashes the process with `uncaughtException` if no `error` event listener exists on `stream`.\n// We take care of error handling on user behalf, so we do not want this to happen.\nconst errorStream = (stream, error) => {\n\tif (!stream.destroyed) {\n\t\tstream.once('error', noop);\n\t\tstream.destroy(error);\n\t}\n};\n\nconst noop = () => {};\n\nconst updateMaxListeners = (passThroughStream, increment) => {\n\tconst maxListeners = passThroughStream.getMaxListeners();\n\tif (maxListeners !== 0 && maxListeners !== Number.POSITIVE_INFINITY) {\n\t\tpassThroughStream.setMaxListeners(maxListeners + increment);\n\t}\n};\n\n// Number of times `passThroughStream.on()` is called regardless of streams:\n// - once due to `finished(passThroughStream)`\n// - once due to `on(passThroughStream)`\nconst PASSTHROUGH_LISTENERS_COUNT = 2;\n\n// Number of times `passThroughStream.on()` is called per stream:\n// - once due to `stream.pipe(passThroughStream)`\nconst PASSTHROUGH_LISTENERS_PER_STREAM = 1;\n", "import {promisify} from 'node:util';\nimport {execFile as execFileCallback, execFileSync as execFileSyncOriginal} from 'node:child_process';\nimport path from 'node:path';\nimport {fileURLToPath} from 'node:url';\n\nconst execFileOriginal = promisify(execFileCallback);\n\nexport function toPath(urlOrPath) {\n\treturn urlOrPath instanceof URL ? fileURLToPath(urlOrPath) : urlOrPath;\n}\n\nexport function rootDirectory(pathInput) {\n\treturn path.parse(toPath(pathInput)).root;\n}\n\nexport function traversePathUp(startPath) {\n\treturn {\n\t\t* [Symbol.iterator]() {\n\t\t\tlet currentPath = path.resolve(toPath(startPath));\n\t\t\tlet previousPath;\n\n\t\t\twhile (previousPath !== currentPath) {\n\t\t\t\tyield currentPath;\n\t\t\t\tpreviousPath = currentPath;\n\t\t\t\tcurrentPath = path.resolve(currentPath, '..');\n\t\t\t}\n\t\t},\n\t};\n}\n\nconst TEN_MEGABYTES_IN_BYTES = 10 * 1024 * 1024;\n\nexport async function execFile(file, arguments_, options = {}) {\n\treturn execFileOriginal(file, arguments_, {\n\t\tmaxBuffer: TEN_MEGABYTES_IN_BYTES,\n\t\t...options,\n\t});\n}\n\nexport function execFileSync(file, arguments_ = [], options = {}) {\n\treturn execFileSyncOriginal(file, arguments_, {\n\t\tmaxBuffer: TEN_MEGABYTES_IN_BYTES,\n\t\tencoding: 'utf8',\n\t\tstdio: 'pipe',\n\t\t...options,\n\t});\n}\n\nexport * from './default.js';\n", "import process from 'node:process';\nimport fs from 'node:fs';\nimport fsPromises from 'node:fs/promises';\nimport path from 'node:path';\nimport fastGlob from 'fast-glob';\nimport gitIgnore from 'ignore';\nimport isPathInside from 'is-path-inside';\nimport slash from 'slash';\nimport {toPath} from 'unicorn-magic/node';\nimport {\n\tisNegativePattern,\n\tbindFsMethod,\n\tpromisifyFsMethod,\n\tfindGitRoot,\n\tfindGitRootSync,\n\tgetParentGitignorePaths,\n} from './utilities.js';\n\nconst defaultIgnoredDirectories = [\n\t'**/node_modules',\n\t'**/flow-typed',\n\t'**/coverage',\n\t'**/.git',\n];\nconst ignoreFilesGlobOptions = {\n\tabsolute: true,\n\tdot: true,\n};\n\nexport const GITIGNORE_FILES_PATTERN = '**/.gitignore';\n\nconst getReadFileMethod = fsImplementation =>\n\tbindFsMethod(fsImplementation?.promises, 'readFile')\n\t?? bindFsMethod(fsPromises, 'readFile')\n\t?? promisifyFsMethod(fsImplementation, 'readFile');\n\nconst getReadFileSyncMethod = fsImplementation =>\n\tbindFsMethod(fsImplementation, 'readFileSync')\n\t?? bindFsMethod(fs, 'readFileSync');\n\nconst shouldSkipIgnoreFileError = (error, suppressErrors) => {\n\tif (!error) {\n\t\treturn Boolean(suppressErrors);\n\t}\n\n\tif (error.code === 'ENOENT' || error.code === 'ENOTDIR') {\n\t\treturn true;\n\t}\n\n\treturn Boolean(suppressErrors);\n};\n\nconst createIgnoreFileReadError = (filePath, error) => {\n\tif (error instanceof Error) {\n\t\terror.message = `Failed to read ignore file at ${filePath}: ${error.message}`;\n\t\treturn error;\n\t}\n\n\treturn new Error(`Failed to read ignore file at ${filePath}: ${String(error)}`);\n};\n\nconst processIgnoreFileCore = (filePath, readMethod, suppressErrors) => {\n\ttry {\n\t\tconst content = readMethod(filePath, 'utf8');\n\t\treturn {filePath, content};\n\t} catch (error) {\n\t\tif (shouldSkipIgnoreFileError(error, suppressErrors)) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tthrow createIgnoreFileReadError(filePath, error);\n\t}\n};\n\nconst readIgnoreFilesSafely = async (paths, readFileMethod, suppressErrors) => {\n\tconst fileResults = await Promise.all(paths.map(async filePath => {\n\t\ttry {\n\t\t\tconst content = await readFileMethod(filePath, 'utf8');\n\t\t\treturn {filePath, content};\n\t\t} catch (error) {\n\t\t\tif (shouldSkipIgnoreFileError(error, suppressErrors)) {\n\t\t\t\treturn undefined;\n\t\t\t}\n\n\t\t\tthrow createIgnoreFileReadError(filePath, error);\n\t\t}\n\t}));\n\n\treturn fileResults.filter(Boolean);\n};\n\nconst readIgnoreFilesSafelySync = (paths, readFileSyncMethod, suppressErrors) => paths\n\t.map(filePath => processIgnoreFileCore(filePath, readFileSyncMethod, suppressErrors))\n\t.filter(Boolean);\n\nconst dedupePaths = paths => {\n\tconst seen = new Set();\n\treturn paths.filter(filePath => {\n\t\tif (seen.has(filePath)) {\n\t\t\treturn false;\n\t\t}\n\n\t\tseen.add(filePath);\n\t\treturn true;\n\t});\n};\n\nconst globIgnoreFiles = (globFunction, patterns, normalizedOptions) => globFunction(patterns, {\n\t...normalizedOptions,\n\t...ignoreFilesGlobOptions, // Must be last to ensure absolute/dot flags stick\n});\n\nconst getParentIgnorePaths = (gitRoot, normalizedOptions) => gitRoot\n\t? getParentGitignorePaths(gitRoot, normalizedOptions.cwd)\n\t: [];\n\nconst combineIgnoreFilePaths = (gitRoot, normalizedOptions, childPaths) => dedupePaths([\n\t...getParentIgnorePaths(gitRoot, normalizedOptions),\n\t...childPaths,\n]);\n\nconst buildIgnoreResult = (files, normalizedOptions, gitRoot) => {\n\tconst baseDir = gitRoot || normalizedOptions.cwd;\n\tconst patterns = getPatternsFromIgnoreFiles(files, baseDir);\n\n\treturn {\n\t\tpatterns,\n\t\tpredicate: createIgnorePredicate(patterns, normalizedOptions.cwd, baseDir),\n\t\tusingGitRoot: Boolean(gitRoot && gitRoot !== normalizedOptions.cwd),\n\t};\n};\n\n// Apply base path to gitignore patterns based on .gitignore spec 2.22.1\n// https://git-scm.com/docs/gitignore#_pattern_format\n// See also https://github.com/sindresorhus/globby/issues/146\nconst applyBaseToPattern = (pattern, base) => {\n\tif (!base) {\n\t\treturn pattern;\n\t}\n\n\tconst isNegative = isNegativePattern(pattern);\n\tconst cleanPattern = isNegative ? pattern.slice(1) : pattern;\n\n\t// Check if pattern has non-trailing slashes\n\tconst slashIndex = cleanPattern.indexOf('/');\n\tconst hasNonTrailingSlash = slashIndex !== -1 && slashIndex !== cleanPattern.length - 1;\n\n\tlet result;\n\tif (!hasNonTrailingSlash) {\n\t\t// \"If there is no separator at the beginning or middle of the pattern,\n\t\t// then the pattern may also match at any level below the .gitignore level.\"\n\t\t// So patterns like '*.log' or 'temp' or 'build/' (trailing slash) match recursively.\n\t\tresult = path.posix.join(base, '**', cleanPattern);\n\t} else if (cleanPattern.startsWith('/')) {\n\t\t// \"If there is a separator at the beginning [...] of the pattern,\n\t\t// then the pattern is relative to the directory level of the particular .gitignore file itself.\"\n\t\t// Leading slash anchors the pattern to the .gitignore's directory.\n\t\tresult = path.posix.join(base, cleanPattern.slice(1));\n\t} else {\n\t\t// \"If there is a separator [...] middle [...] of the pattern,\n\t\t// then the pattern is relative to the directory level of the particular .gitignore file itself.\"\n\t\t// Patterns like 'src/foo' are relative to the .gitignore's directory.\n\t\tresult = path.posix.join(base, cleanPattern);\n\t}\n\n\treturn isNegative ? '!' + result : result;\n};\n\nconst parseIgnoreFile = (file, cwd) => {\n\tconst base = slash(path.relative(cwd, path.dirname(file.filePath)));\n\n\treturn file.content\n\t\t.split(/\\r?\\n/)\n\t\t.filter(line => line && !line.startsWith('#'))\n\t\t.map(pattern => applyBaseToPattern(pattern, base));\n};\n\nconst toRelativePath = (fileOrDirectory, cwd) => {\n\tif (path.isAbsolute(fileOrDirectory)) {\n\t\t// When paths are equal, path.relative returns empty string which is valid\n\t\t// isPathInside returns false for equal paths, so check this case first\n\t\tconst relativePath = path.relative(cwd, fileOrDirectory);\n\t\tif (relativePath && !isPathInside(fileOrDirectory, cwd)) {\n\t\t\t// Path is outside cwd - it cannot be ignored by patterns in cwd\n\t\t\t// Return undefined to indicate this path is outside scope\n\t\t\treturn undefined;\n\t\t}\n\n\t\treturn relativePath;\n\t}\n\n\t// Normalize relative paths:\n\t// - Git treats './foo' as 'foo' when checking against patterns\n\t// - Patterns starting with './' in .gitignore are invalid and don't match anything\n\t// - The ignore library expects normalized paths without './' prefix\n\tif (fileOrDirectory.startsWith('./')) {\n\t\treturn fileOrDirectory.slice(2);\n\t}\n\n\t// Paths with ../ point outside cwd and cannot match patterns from this directory\n\t// Return undefined to indicate this path is outside scope\n\tif (fileOrDirectory.startsWith('../')) {\n\t\treturn undefined;\n\t}\n\n\treturn fileOrDirectory;\n};\n\nconst createIgnorePredicate = (patterns, cwd, baseDir) => {\n\tconst ignores = gitIgnore().add(patterns);\n\t// Normalize to handle path separator and . / .. components consistently\n\tconst resolvedCwd = path.normalize(path.resolve(cwd));\n\tconst resolvedBaseDir = path.normalize(path.resolve(baseDir));\n\n\treturn fileOrDirectory => {\n\t\tfileOrDirectory = toPath(fileOrDirectory);\n\n\t\t// Never ignore the cwd itself - use normalized comparison\n\t\tconst normalizedPath = path.normalize(path.resolve(fileOrDirectory));\n\t\tif (normalizedPath === resolvedCwd) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Convert to relative path from baseDir (use normalized baseDir)\n\t\tconst relativePath = toRelativePath(fileOrDirectory, resolvedBaseDir);\n\n\t\t// If path is outside baseDir (undefined), it can't be ignored by patterns\n\t\tif (relativePath === undefined) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn relativePath ? ignores.ignores(slash(relativePath)) : false;\n\t};\n};\n\nconst normalizeOptions = (options = {}) => {\n\tconst ignoreOption = options.ignore\n\t\t? (Array.isArray(options.ignore) ? options.ignore : [options.ignore])\n\t\t: [];\n\n\tconst cwd = toPath(options.cwd) ?? process.cwd();\n\n\t// Adjust deep option for fast-glob: fast-glob's deep counts differently than expected\n\t// User's deep: 0 = root only -> fast-glob needs: 1\n\t// User's deep: 1 = root + 1 level -> fast-glob needs: 2\n\tconst deep = typeof options.deep === 'number' ? Math.max(0, options.deep) + 1 : Number.POSITIVE_INFINITY;\n\n\t// Only pass through specific fast-glob options that make sense for finding ignore files\n\treturn {\n\t\tcwd,\n\t\tsuppressErrors: options.suppressErrors ?? false,\n\t\tdeep,\n\t\tignore: [...ignoreOption, ...defaultIgnoredDirectories],\n\t\tfollowSymbolicLinks: options.followSymbolicLinks ?? true,\n\t\tconcurrency: options.concurrency,\n\t\tthrowErrorOnBrokenSymbolicLink: options.throwErrorOnBrokenSymbolicLink ?? false,\n\t\tfs: options.fs,\n\t};\n};\n\nconst collectIgnoreFileArtifactsAsync = async (patterns, options, includeParentIgnoreFiles) => {\n\tconst normalizedOptions = normalizeOptions(options);\n\tconst childPaths = await globIgnoreFiles(fastGlob, patterns, normalizedOptions);\n\tconst gitRoot = includeParentIgnoreFiles\n\t\t? await findGitRoot(normalizedOptions.cwd, normalizedOptions.fs)\n\t\t: undefined;\n\tconst allPaths = combineIgnoreFilePaths(gitRoot, normalizedOptions, childPaths);\n\tconst readFileMethod = getReadFileMethod(normalizedOptions.fs);\n\tconst files = await readIgnoreFilesSafely(allPaths, readFileMethod, normalizedOptions.suppressErrors);\n\n\treturn {files, normalizedOptions, gitRoot};\n};\n\nconst collectIgnoreFileArtifactsSync = (patterns, options, includeParentIgnoreFiles) => {\n\tconst normalizedOptions = normalizeOptions(options);\n\tconst childPaths = globIgnoreFiles(fastGlob.sync, patterns, normalizedOptions);\n\tconst gitRoot = includeParentIgnoreFiles\n\t\t? findGitRootSync(normalizedOptions.cwd, normalizedOptions.fs)\n\t\t: undefined;\n\tconst allPaths = combineIgnoreFilePaths(gitRoot, normalizedOptions, childPaths);\n\tconst readFileSyncMethod = getReadFileSyncMethod(normalizedOptions.fs);\n\tconst files = readIgnoreFilesSafelySync(allPaths, readFileSyncMethod, normalizedOptions.suppressErrors);\n\n\treturn {files, normalizedOptions, gitRoot};\n};\n\nexport const isIgnoredByIgnoreFiles = async (patterns, options) => {\n\tconst {files, normalizedOptions, gitRoot} = await collectIgnoreFileArtifactsAsync(patterns, options, false);\n\treturn buildIgnoreResult(files, normalizedOptions, gitRoot).predicate;\n};\n\nexport const isIgnoredByIgnoreFilesSync = (patterns, options) => {\n\tconst {files, normalizedOptions, gitRoot} = collectIgnoreFileArtifactsSync(patterns, options, false);\n\treturn buildIgnoreResult(files, normalizedOptions, gitRoot).predicate;\n};\n\nconst getPatternsFromIgnoreFiles = (files, baseDir) => files.flatMap(file => parseIgnoreFile(file, baseDir));\n\n/**\nRead ignore files and return both patterns and predicate.\nThis avoids reading the same files twice (once for patterns, once for filtering).\n\n@param {string[]} patterns - Patterns to find ignore files\n@param {Object} options - Options object\n@param {boolean} [includeParentIgnoreFiles=false] - Whether to search for parent .gitignore files\n@returns {Promise<{patterns: string[], predicate: Function, usingGitRoot: boolean}>}\n*/\nexport const getIgnorePatternsAndPredicate = async (patterns, options, includeParentIgnoreFiles = false) => {\n\tconst {files, normalizedOptions, gitRoot} = await collectIgnoreFileArtifactsAsync(\n\t\tpatterns,\n\t\toptions,\n\t\tincludeParentIgnoreFiles,\n\t);\n\n\treturn buildIgnoreResult(files, normalizedOptions, gitRoot);\n};\n\n/**\nRead ignore files and return both patterns and predicate (sync version).\n\n@param {string[]} patterns - Patterns to find ignore files\n@param {Object} options - Options object\n@param {boolean} [includeParentIgnoreFiles=false] - Whether to search for parent .gitignore files\n@returns {{patterns: string[], predicate: Function, usingGitRoot: boolean}}\n*/\nexport const getIgnorePatternsAndPredicateSync = (patterns, options, includeParentIgnoreFiles = false) => {\n\tconst {files, normalizedOptions, gitRoot} = collectIgnoreFileArtifactsSync(\n\t\tpatterns,\n\t\toptions,\n\t\tincludeParentIgnoreFiles,\n\t);\n\n\treturn buildIgnoreResult(files, normalizedOptions, gitRoot);\n};\n\nexport const isGitIgnored = options => isIgnoredByIgnoreFiles(GITIGNORE_FILES_PATTERN, options);\nexport const isGitIgnoredSync = options => isIgnoredByIgnoreFilesSync(GITIGNORE_FILES_PATTERN, options);\n", "import path from 'node:path';\n\nexport default function isPathInside(childPath, parentPath) {\n\tconst relation = path.relative(parentPath, childPath);\n\n\treturn Boolean(\n\t\trelation &&\n\t\trelation !== '..' &&\n\t\t!relation.startsWith(`..${path.sep}`) &&\n\t\trelation !== path.resolve(childPath)\n\t);\n}\n", "export default function slash(path) {\n\tconst isExtendedLengthPath = path.startsWith('\\\\\\\\?\\\\');\n\n\tif (isExtendedLengthPath) {\n\t\treturn path;\n\t}\n\n\treturn path.replace(/\\\\/g, '/');\n}\n", "import fs from 'node:fs';\nimport path from 'node:path';\nimport {promisify} from 'node:util';\nimport isPathInside from 'is-path-inside';\n\nexport const isNegativePattern = pattern => pattern[0] === '!';\n\nexport const bindFsMethod = (object, methodName) => {\n\tconst method = object?.[methodName];\n\treturn typeof method === 'function' ? method.bind(object) : undefined;\n};\n\n// Only used as a fallback for legacy fs implementations\nexport const promisifyFsMethod = (object, methodName) => {\n\tconst method = object?.[methodName];\n\tif (typeof method !== 'function') {\n\t\treturn undefined;\n\t}\n\n\treturn promisify(method.bind(object));\n};\n\nexport const normalizeDirectoryPatternForFastGlob = pattern => {\n\tif (!pattern.endsWith('/')) {\n\t\treturn pattern;\n\t}\n\n\tconst trimmedPattern = pattern.replace(/\\/+$/u, '');\n\tif (!trimmedPattern) {\n\t\treturn '/**';\n\t}\n\n\t// Special case for '**/' to avoid producing '**/**/**'\n\tif (trimmedPattern === '**') {\n\t\treturn '**/**';\n\t}\n\n\tconst hasLeadingSlash = trimmedPattern.startsWith('/');\n\tconst patternBody = hasLeadingSlash ? trimmedPattern.slice(1) : trimmedPattern;\n\tconst hasInnerSlash = patternBody.includes('/');\n\tconst needsRecursivePrefix = !hasLeadingSlash && !hasInnerSlash && !trimmedPattern.startsWith('**/');\n\tconst recursivePrefix = needsRecursivePrefix ? '**/' : '';\n\n\treturn `${recursivePrefix}${trimmedPattern}/**`;\n};\n\n/**\nExtract the parent directory prefix from a pattern (e.g., '../' or '../../').\n\nNote: Patterns should have trailing slash after '..' (e.g., '../foo' not '..foo'). The directoryToGlob function ensures this in the normal pipeline.\n\n@param {string} pattern - The pattern to analyze.\n@returns {string} The parent directory prefix, or empty string if none.\n*/\nexport const getParentDirectoryPrefix = pattern => {\n\tconst normalizedPattern = isNegativePattern(pattern) ? pattern.slice(1) : pattern;\n\tconst match = normalizedPattern.match(/^(\\.\\.\\/)+/);\n\treturn match ? match[0] : '';\n};\n\n/**\nAdjust ignore patterns to match the relative base of the main patterns.\n\nWhen patterns reference parent directories, ignore patterns starting with globstars need to be adjusted to match from the same base directory. This ensures intuitive behavior where ignore patterns work correctly with parent directory patterns.\n\nThis is analogous to how node-glob normalizes path prefixes (see node-glob issue #309) and how Rust ignore crate strips path prefixes before matching.\n\n@param {string[]} patterns - The main glob patterns.\n@param {string[]} ignorePatterns - The ignore patterns to adjust.\n@returns {string[]} Adjusted ignore patterns.\n*/\nexport const adjustIgnorePatternsForParentDirectories = (patterns, ignorePatterns) => {\n\t// Early exit for empty arrays\n\tif (patterns.length === 0 || ignorePatterns.length === 0) {\n\t\treturn ignorePatterns;\n\t}\n\n\t// Get parent directory prefixes for all patterns (empty string if no prefix)\n\tconst parentPrefixes = patterns.map(pattern => getParentDirectoryPrefix(pattern));\n\n\t// Check if all patterns have the same parent prefix\n\tconst firstPrefix = parentPrefixes[0];\n\tif (!firstPrefix) {\n\t\treturn ignorePatterns; // No parent directories in any pattern\n\t}\n\n\tconst allSamePrefix = parentPrefixes.every(prefix => prefix === firstPrefix);\n\tif (!allSamePrefix) {\n\t\treturn ignorePatterns; // Mixed bases - don't adjust\n\t}\n\n\t// Adjust ignore patterns that start with **/\n\treturn ignorePatterns.map(pattern => {\n\t\t// Only adjust patterns starting with **/ that don't already have a parent reference\n\t\tif (pattern.startsWith('**/') && !pattern.startsWith('../')) {\n\t\t\treturn firstPrefix + pattern;\n\t\t}\n\n\t\treturn pattern;\n\t});\n};\n\n/**\nFind the git root directory by searching upward for a .git directory.\n\n@param {string} cwd - The directory to start searching from.\n@param {Object} [fsImplementation] - Optional fs implementation.\n@returns {string|undefined} The git root directory path, or undefined if not found.\n*/\nconst getAsyncStatMethod = fsImplementation =>\n\tbindFsMethod(fsImplementation?.promises, 'stat')\n\t?? bindFsMethod(fs.promises, 'stat');\n\nconst getStatSyncMethod = fsImplementation => {\n\tif (fsImplementation) {\n\t\treturn bindFsMethod(fsImplementation, 'statSync');\n\t}\n\n\treturn bindFsMethod(fs, 'statSync');\n};\n\nconst pathHasGitDirectory = stats => Boolean(stats?.isDirectory?.() || stats?.isFile?.());\n\nconst buildPathChain = (startPath, rootPath) => {\n\tconst chain = [];\n\tlet currentPath = startPath;\n\n\tchain.push(currentPath);\n\n\twhile (currentPath !== rootPath) {\n\t\tconst parentPath = path.dirname(currentPath);\n\t\tif (parentPath === currentPath) {\n\t\t\tbreak;\n\t\t}\n\n\t\tcurrentPath = parentPath;\n\t\tchain.push(currentPath);\n\t}\n\n\treturn chain;\n};\n\nconst findGitRootInChain = async (paths, statMethod) => {\n\tfor (const directory of paths) {\n\t\tconst gitPath = path.join(directory, '.git');\n\n\t\ttry {\n\t\t\tconst stats = await statMethod(gitPath); // eslint-disable-line no-await-in-loop\n\t\t\tif (pathHasGitDirectory(stats)) {\n\t\t\t\treturn directory;\n\t\t\t}\n\t\t} catch {\n\t\t\t// Ignore errors and continue searching\n\t\t}\n\t}\n\n\treturn undefined;\n};\n\nconst findGitRootSyncUncached = (cwd, fsImplementation) => {\n\tconst statSyncMethod = getStatSyncMethod(fsImplementation);\n\tif (!statSyncMethod) {\n\t\treturn undefined;\n\t}\n\n\tconst currentPath = path.resolve(cwd);\n\tconst {root} = path.parse(currentPath);\n\tconst chain = buildPathChain(currentPath, root);\n\n\tfor (const directory of chain) {\n\t\tconst gitPath = path.join(directory, '.git');\n\t\ttry {\n\t\t\tconst stats = statSyncMethod(gitPath);\n\t\t\tif (pathHasGitDirectory(stats)) {\n\t\t\t\treturn directory;\n\t\t\t}\n\t\t} catch {\n\t\t\t// Ignore errors and continue searching\n\t\t}\n\t}\n\n\treturn undefined;\n};\n\nexport const findGitRootSync = (cwd, fsImplementation) => {\n\tif (typeof cwd !== 'string') {\n\t\tthrow new TypeError('cwd must be a string');\n\t}\n\n\treturn findGitRootSyncUncached(cwd, fsImplementation);\n};\n\nconst findGitRootAsyncUncached = async (cwd, fsImplementation) => {\n\tconst statMethod = getAsyncStatMethod(fsImplementation);\n\tif (!statMethod) {\n\t\treturn findGitRootSync(cwd, fsImplementation);\n\t}\n\n\tconst currentPath = path.resolve(cwd);\n\tconst {root} = path.parse(currentPath);\n\tconst chain = buildPathChain(currentPath, root);\n\n\treturn findGitRootInChain(chain, statMethod);\n};\n\nexport const findGitRoot = async (cwd, fsImplementation) => {\n\tif (typeof cwd !== 'string') {\n\t\tthrow new TypeError('cwd must be a string');\n\t}\n\n\treturn findGitRootAsyncUncached(cwd, fsImplementation);\n};\n\n/**\nGet paths to all .gitignore files from git root to cwd (inclusive).\n\n@param {string} gitRoot - The git root directory.\n@param {string} cwd - The current working directory.\n@returns {string[]} Array of .gitignore file paths to search for.\n*/\nconst isWithinGitRoot = (gitRoot, cwd) => {\n\tconst resolvedGitRoot = path.resolve(gitRoot);\n\tconst resolvedCwd = path.resolve(cwd);\n\treturn resolvedCwd === resolvedGitRoot || isPathInside(resolvedCwd, resolvedGitRoot);\n};\n\nexport const getParentGitignorePaths = (gitRoot, cwd) => {\n\tif (gitRoot && typeof gitRoot !== 'string') {\n\t\tthrow new TypeError('gitRoot must be a string or undefined');\n\t}\n\n\tif (typeof cwd !== 'string') {\n\t\tthrow new TypeError('cwd must be a string');\n\t}\n\n\t// If no gitRoot provided, return empty array\n\tif (!gitRoot) {\n\t\treturn [];\n\t}\n\n\tif (!isWithinGitRoot(gitRoot, cwd)) {\n\t\treturn [];\n\t}\n\n\tconst chain = buildPathChain(path.resolve(cwd), path.resolve(gitRoot));\n\n\treturn [...chain]\n\t\t.reverse()\n\t\t.map(directory => path.join(directory, '.gitignore'));\n};\n\n/**\nConvert ignore patterns to fast-glob compatible format.\nReturns empty array if patterns should be handled by predicate only.\n\n@param {string[]} patterns - Ignore patterns from .gitignore files\n@param {boolean} usingGitRoot - Whether patterns are relative to git root\n@param {Function} normalizeDirectoryPatternForFastGlob - Function to normalize directory patterns\n@returns {string[]} Patterns safe to pass to fast-glob, or empty array\n*/\nexport const convertPatternsForFastGlob = (patterns, usingGitRoot, normalizeDirectoryPatternForFastGlob) => {\n\t// Determine which patterns are safe to pass to fast-glob\n\t// If there are negation patterns, we can't pass file patterns to fast-glob\n\t// because fast-glob doesn't understand negations and would filter out files\n\t// that should be re-included by negation patterns.\n\t// If we're using git root, patterns are relative to git root not cwd,\n\t// so we can't pass them to fast-glob which expects cwd-relative patterns.\n\t// We only pass patterns to fast-glob if there are NO negations AND we're not using git root.\n\n\tif (usingGitRoot) {\n\t\treturn []; // Patterns are relative to git root, not cwd\n\t}\n\n\tconst result = [];\n\tlet hasNegations = false;\n\n\t// Single pass to check for negations and collect positive patterns\n\tfor (const pattern of patterns) {\n\t\tif (isNegativePattern(pattern)) {\n\t\t\thasNegations = true;\n\t\t\tbreak; // Early exit on first negation\n\t\t}\n\n\t\tresult.push(normalizeDirectoryPatternForFastGlob(pattern));\n\t}\n\n\treturn hasNegations ? [] : result;\n};\n", "\n/*! js-yaml 4.1.1 https://github.com/nodeca/js-yaml @license MIT */\nfunction isNothing(subject) {\n return (typeof subject === 'undefined') || (subject === null);\n}\n\n\nfunction isObject(subject) {\n return (typeof subject === 'object') && (subject !== null);\n}\n\n\nfunction toArray(sequence) {\n if (Array.isArray(sequence)) return sequence;\n else if (isNothing(sequence)) return [];\n\n return [ sequence ];\n}\n\n\nfunction extend(target, source) {\n var index, length, key, sourceKeys;\n\n if (source) {\n sourceKeys = Object.keys(source);\n\n for (index = 0, length = sourceKeys.length; index < length; index += 1) {\n key = sourceKeys[index];\n target[key] = source[key];\n }\n }\n\n return target;\n}\n\n\nfunction repeat(string, count) {\n var result = '', cycle;\n\n for (cycle = 0; cycle < count; cycle += 1) {\n result += string;\n }\n\n return result;\n}\n\n\nfunction isNegativeZero(number) {\n return (number === 0) && (Number.NEGATIVE_INFINITY === 1 / number);\n}\n\n\nvar isNothing_1 = isNothing;\nvar isObject_1 = isObject;\nvar toArray_1 = toArray;\nvar repeat_1 = repeat;\nvar isNegativeZero_1 = isNegativeZero;\nvar extend_1 = extend;\n\nvar common = {\n\tisNothing: isNothing_1,\n\tisObject: isObject_1,\n\ttoArray: toArray_1,\n\trepeat: repeat_1,\n\tisNegativeZero: isNegativeZero_1,\n\textend: extend_1\n};\n\n// YAML error class. http://stackoverflow.com/questions/8458984\n\n\nfunction formatError(exception, compact) {\n var where = '', message = exception.reason || '(unknown reason)';\n\n if (!exception.mark) return message;\n\n if (exception.mark.name) {\n where += 'in \"' + exception.mark.name + '\" ';\n }\n\n where += '(' + (exception.mark.line + 1) + ':' + (exception.mark.column + 1) + ')';\n\n if (!compact && exception.mark.snippet) {\n where += '\\n\\n' + exception.mark.snippet;\n }\n\n return message + ' ' + where;\n}\n\n\nfunction YAMLException$1(reason, mark) {\n // Super constructor\n Error.call(this);\n\n this.name = 'YAMLException';\n this.reason = reason;\n this.mark = mark;\n this.message = formatError(this, false);\n\n // Include stack trace in error object\n if (Error.captureStackTrace) {\n // Chrome and NodeJS\n Error.captureStackTrace(this, this.constructor);\n } else {\n // FF, IE 10+ and Safari 6+. Fallback for others\n this.stack = (new Error()).stack || '';\n }\n}\n\n\n// Inherit from Error\nYAMLException$1.prototype = Object.create(Error.prototype);\nYAMLException$1.prototype.constructor = YAMLException$1;\n\n\nYAMLException$1.prototype.toString = function toString(compact) {\n return this.name + ': ' + formatError(this, compact);\n};\n\n\nvar exception = YAMLException$1;\n\n// get snippet for a single line, respecting maxLength\nfunction getLine(buffer, lineStart, lineEnd, position, maxLineLength) {\n var head = '';\n var tail = '';\n var maxHalfLength = Math.floor(maxLineLength / 2) - 1;\n\n if (position - lineStart > maxHalfLength) {\n head = ' ... ';\n lineStart = position - maxHalfLength + head.length;\n }\n\n if (lineEnd - position > maxHalfLength) {\n tail = ' ...';\n lineEnd = position + maxHalfLength - tail.length;\n }\n\n return {\n str: head + buffer.slice(lineStart, lineEnd).replace(/\\t/g, '\u2192') + tail,\n pos: position - lineStart + head.length // relative position\n };\n}\n\n\nfunction padStart(string, max) {\n return common.repeat(' ', max - string.length) + string;\n}\n\n\nfunction makeSnippet(mark, options) {\n options = Object.create(options || null);\n\n if (!mark.buffer) return null;\n\n if (!options.maxLength) options.maxLength = 79;\n if (typeof options.indent !== 'number') options.indent = 1;\n if (typeof options.linesBefore !== 'number') options.linesBefore = 3;\n if (typeof options.linesAfter !== 'number') options.linesAfter = 2;\n\n var re = /\\r?\\n|\\r|\\0/g;\n var lineStarts = [ 0 ];\n var lineEnds = [];\n var match;\n var foundLineNo = -1;\n\n while ((match = re.exec(mark.buffer))) {\n lineEnds.push(match.index);\n lineStarts.push(match.index + match[0].length);\n\n if (mark.position <= match.index && foundLineNo < 0) {\n foundLineNo = lineStarts.length - 2;\n }\n }\n\n if (foundLineNo < 0) foundLineNo = lineStarts.length - 1;\n\n var result = '', i, line;\n var lineNoLength = Math.min(mark.line + options.linesAfter, lineEnds.length).toString().length;\n var maxLineLength = options.maxLength - (options.indent + lineNoLength + 3);\n\n for (i = 1; i <= options.linesBefore; i++) {\n if (foundLineNo - i < 0) break;\n line = getLine(\n mark.buffer,\n lineStarts[foundLineNo - i],\n lineEnds[foundLineNo - i],\n mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo - i]),\n maxLineLength\n );\n result = common.repeat(' ', options.indent) + padStart((mark.line - i + 1).toString(), lineNoLength) +\n ' | ' + line.str + '\\n' + result;\n }\n\n line = getLine(mark.buffer, lineStarts[foundLineNo], lineEnds[foundLineNo], mark.position, maxLineLength);\n result += common.repeat(' ', options.indent) + padStart((mark.line + 1).toString(), lineNoLength) +\n ' | ' + line.str + '\\n';\n result += common.repeat('-', options.indent + lineNoLength + 3 + line.pos) + '^' + '\\n';\n\n for (i = 1; i <= options.linesAfter; i++) {\n if (foundLineNo + i >= lineEnds.length) break;\n line = getLine(\n mark.buffer,\n lineStarts[foundLineNo + i],\n lineEnds[foundLineNo + i],\n mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo + i]),\n maxLineLength\n );\n result += common.repeat(' ', options.indent) + padStart((mark.line + i + 1).toString(), lineNoLength) +\n ' | ' + line.str + '\\n';\n }\n\n return result.replace(/\\n$/, '');\n}\n\n\nvar snippet = makeSnippet;\n\nvar TYPE_CONSTRUCTOR_OPTIONS = [\n 'kind',\n 'multi',\n 'resolve',\n 'construct',\n 'instanceOf',\n 'predicate',\n 'represent',\n 'representName',\n 'defaultStyle',\n 'styleAliases'\n];\n\nvar YAML_NODE_KINDS = [\n 'scalar',\n 'sequence',\n 'mapping'\n];\n\nfunction compileStyleAliases(map) {\n var result = {};\n\n if (map !== null) {\n Object.keys(map).forEach(function (style) {\n map[style].forEach(function (alias) {\n result[String(alias)] = style;\n });\n });\n }\n\n return result;\n}\n\nfunction Type$1(tag, options) {\n options = options || {};\n\n Object.keys(options).forEach(function (name) {\n if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(name) === -1) {\n throw new exception('Unknown option \"' + name + '\" is met in definition of \"' + tag + '\" YAML type.');\n }\n });\n\n // TODO: Add tag format check.\n this.options = options; // keep original options in case user wants to extend this type later\n this.tag = tag;\n this.kind = options['kind'] || null;\n this.resolve = options['resolve'] || function () { return true; };\n this.construct = options['construct'] || function (data) { return data; };\n this.instanceOf = options['instanceOf'] || null;\n this.predicate = options['predicate'] || null;\n this.represent = options['represent'] || null;\n this.representName = options['representName'] || null;\n this.defaultStyle = options['defaultStyle'] || null;\n this.multi = options['multi'] || false;\n this.styleAliases = compileStyleAliases(options['styleAliases'] || null);\n\n if (YAML_NODE_KINDS.indexOf(this.kind) === -1) {\n throw new exception('Unknown kind \"' + this.kind + '\" is specified for \"' + tag + '\" YAML type.');\n }\n}\n\nvar type = Type$1;\n\n/*eslint-disable max-len*/\n\n\n\n\n\nfunction compileList(schema, name) {\n var result = [];\n\n schema[name].forEach(function (currentType) {\n var newIndex = result.length;\n\n result.forEach(function (previousType, previousIndex) {\n if (previousType.tag === currentType.tag &&\n previousType.kind === currentType.kind &&\n previousType.multi === currentType.multi) {\n\n newIndex = previousIndex;\n }\n });\n\n result[newIndex] = currentType;\n });\n\n return result;\n}\n\n\nfunction compileMap(/* lists... */) {\n var result = {\n scalar: {},\n sequence: {},\n mapping: {},\n fallback: {},\n multi: {\n scalar: [],\n sequence: [],\n mapping: [],\n fallback: []\n }\n }, index, length;\n\n function collectType(type) {\n if (type.multi) {\n result.multi[type.kind].push(type);\n result.multi['fallback'].push(type);\n } else {\n result[type.kind][type.tag] = result['fallback'][type.tag] = type;\n }\n }\n\n for (index = 0, length = arguments.length; index < length; index += 1) {\n arguments[index].forEach(collectType);\n }\n return result;\n}\n\n\nfunction Schema$1(definition) {\n return this.extend(definition);\n}\n\n\nSchema$1.prototype.extend = function extend(definition) {\n var implicit = [];\n var explicit = [];\n\n if (definition instanceof type) {\n // Schema.extend(type)\n explicit.push(definition);\n\n } else if (Array.isArray(definition)) {\n // Schema.extend([ type1, type2, ... ])\n explicit = explicit.concat(definition);\n\n } else if (definition && (Array.isArray(definition.implicit) || Array.isArray(definition.explicit))) {\n // Schema.extend({ explicit: [ type1, type2, ... ], implicit: [ type1, type2, ... ] })\n if (definition.implicit) implicit = implicit.concat(definition.implicit);\n if (definition.explicit) explicit = explicit.concat(definition.explicit);\n\n } else {\n throw new exception('Schema.extend argument should be a Type, [ Type ], ' +\n 'or a schema definition ({ implicit: [...], explicit: [...] })');\n }\n\n implicit.forEach(function (type$1) {\n if (!(type$1 instanceof type)) {\n throw new exception('Specified list of YAML types (or a single Type object) contains a non-Type object.');\n }\n\n if (type$1.loadKind && type$1.loadKind !== 'scalar') {\n throw new exception('There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.');\n }\n\n if (type$1.multi) {\n throw new exception('There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.');\n }\n });\n\n explicit.forEach(function (type$1) {\n if (!(type$1 instanceof type)) {\n throw new exception('Specified list of YAML types (or a single Type object) contains a non-Type object.');\n }\n });\n\n var result = Object.create(Schema$1.prototype);\n\n result.implicit = (this.implicit || []).concat(implicit);\n result.explicit = (this.explicit || []).concat(explicit);\n\n result.compiledImplicit = compileList(result, 'implicit');\n result.compiledExplicit = compileList(result, 'explicit');\n result.compiledTypeMap = compileMap(result.compiledImplicit, result.compiledExplicit);\n\n return result;\n};\n\n\nvar schema = Schema$1;\n\nvar str = new type('tag:yaml.org,2002:str', {\n kind: 'scalar',\n construct: function (data) { return data !== null ? data : ''; }\n});\n\nvar seq = new type('tag:yaml.org,2002:seq', {\n kind: 'sequence',\n construct: function (data) { return data !== null ? data : []; }\n});\n\nvar map = new type('tag:yaml.org,2002:map', {\n kind: 'mapping',\n construct: function (data) { return data !== null ? data : {}; }\n});\n\nvar failsafe = new schema({\n explicit: [\n str,\n seq,\n map\n ]\n});\n\nfunction resolveYamlNull(data) {\n if (data === null) return true;\n\n var max = data.length;\n\n return (max === 1 && data === '~') ||\n (max === 4 && (data === 'null' || data === 'Null' || data === 'NULL'));\n}\n\nfunction constructYamlNull() {\n return null;\n}\n\nfunction isNull(object) {\n return object === null;\n}\n\nvar _null = new type('tag:yaml.org,2002:null', {\n kind: 'scalar',\n resolve: resolveYamlNull,\n construct: constructYamlNull,\n predicate: isNull,\n represent: {\n canonical: function () { return '~'; },\n lowercase: function () { return 'null'; },\n uppercase: function () { return 'NULL'; },\n camelcase: function () { return 'Null'; },\n empty: function () { return ''; }\n },\n defaultStyle: 'lowercase'\n});\n\nfunction resolveYamlBoolean(data) {\n if (data === null) return false;\n\n var max = data.length;\n\n return (max === 4 && (data === 'true' || data === 'True' || data === 'TRUE')) ||\n (max === 5 && (data === 'false' || data === 'False' || data === 'FALSE'));\n}\n\nfunction constructYamlBoolean(data) {\n return data === 'true' ||\n data === 'True' ||\n data === 'TRUE';\n}\n\nfunction isBoolean(object) {\n return Object.prototype.toString.call(object) === '[object Boolean]';\n}\n\nvar bool = new type('tag:yaml.org,2002:bool', {\n kind: 'scalar',\n resolve: resolveYamlBoolean,\n construct: constructYamlBoolean,\n predicate: isBoolean,\n represent: {\n lowercase: function (object) { return object ? 'true' : 'false'; },\n uppercase: function (object) { return object ? 'TRUE' : 'FALSE'; },\n camelcase: function (object) { return object ? 'True' : 'False'; }\n },\n defaultStyle: 'lowercase'\n});\n\nfunction isHexCode(c) {\n return ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) ||\n ((0x41/* A */ <= c) && (c <= 0x46/* F */)) ||\n ((0x61/* a */ <= c) && (c <= 0x66/* f */));\n}\n\nfunction isOctCode(c) {\n return ((0x30/* 0 */ <= c) && (c <= 0x37/* 7 */));\n}\n\nfunction isDecCode(c) {\n return ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */));\n}\n\nfunction resolveYamlInteger(data) {\n if (data === null) return false;\n\n var max = data.length,\n index = 0,\n hasDigits = false,\n ch;\n\n if (!max) return false;\n\n ch = data[index];\n\n // sign\n if (ch === '-' || ch === '+') {\n ch = data[++index];\n }\n\n if (ch === '0') {\n // 0\n if (index + 1 === max) return true;\n ch = data[++index];\n\n // base 2, base 8, base 16\n\n if (ch === 'b') {\n // base 2\n index++;\n\n for (; index < max; index++) {\n ch = data[index];\n if (ch === '_') continue;\n if (ch !== '0' && ch !== '1') return false;\n hasDigits = true;\n }\n return hasDigits && ch !== '_';\n }\n\n\n if (ch === 'x') {\n // base 16\n index++;\n\n for (; index < max; index++) {\n ch = data[index];\n if (ch === '_') continue;\n if (!isHexCode(data.charCodeAt(index))) return false;\n hasDigits = true;\n }\n return hasDigits && ch !== '_';\n }\n\n\n if (ch === 'o') {\n // base 8\n index++;\n\n for (; index < max; index++) {\n ch = data[index];\n if (ch === '_') continue;\n if (!isOctCode(data.charCodeAt(index))) return false;\n hasDigits = true;\n }\n return hasDigits && ch !== '_';\n }\n }\n\n // base 10 (except 0)\n\n // value should not start with `_`;\n if (ch === '_') return false;\n\n for (; index < max; index++) {\n ch = data[index];\n if (ch === '_') continue;\n if (!isDecCode(data.charCodeAt(index))) {\n return false;\n }\n hasDigits = true;\n }\n\n // Should have digits and should not end with `_`\n if (!hasDigits || ch === '_') return false;\n\n return true;\n}\n\nfunction constructYamlInteger(data) {\n var value = data, sign = 1, ch;\n\n if (value.indexOf('_') !== -1) {\n value = value.replace(/_/g, '');\n }\n\n ch = value[0];\n\n if (ch === '-' || ch === '+') {\n if (ch === '-') sign = -1;\n value = value.slice(1);\n ch = value[0];\n }\n\n if (value === '0') return 0;\n\n if (ch === '0') {\n if (value[1] === 'b') return sign * parseInt(value.slice(2), 2);\n if (value[1] === 'x') return sign * parseInt(value.slice(2), 16);\n if (value[1] === 'o') return sign * parseInt(value.slice(2), 8);\n }\n\n return sign * parseInt(value, 10);\n}\n\nfunction isInteger(object) {\n return (Object.prototype.toString.call(object)) === '[object Number]' &&\n (object % 1 === 0 && !common.isNegativeZero(object));\n}\n\nvar int = new type('tag:yaml.org,2002:int', {\n kind: 'scalar',\n resolve: resolveYamlInteger,\n construct: constructYamlInteger,\n predicate: isInteger,\n represent: {\n binary: function (obj) { return obj >= 0 ? '0b' + obj.toString(2) : '-0b' + obj.toString(2).slice(1); },\n octal: function (obj) { return obj >= 0 ? '0o' + obj.toString(8) : '-0o' + obj.toString(8).slice(1); },\n decimal: function (obj) { return obj.toString(10); },\n /* eslint-disable max-len */\n hexadecimal: function (obj) { return obj >= 0 ? '0x' + obj.toString(16).toUpperCase() : '-0x' + obj.toString(16).toUpperCase().slice(1); }\n },\n defaultStyle: 'decimal',\n styleAliases: {\n binary: [ 2, 'bin' ],\n octal: [ 8, 'oct' ],\n decimal: [ 10, 'dec' ],\n hexadecimal: [ 16, 'hex' ]\n }\n});\n\nvar YAML_FLOAT_PATTERN = new RegExp(\n // 2.5e4, 2.5 and integers\n '^(?:[-+]?(?:[0-9][0-9_]*)(?:\\\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?' +\n // .2e4, .2\n // special case, seems not from spec\n '|\\\\.[0-9_]+(?:[eE][-+]?[0-9]+)?' +\n // .inf\n '|[-+]?\\\\.(?:inf|Inf|INF)' +\n // .nan\n '|\\\\.(?:nan|NaN|NAN))$');\n\nfunction resolveYamlFloat(data) {\n if (data === null) return false;\n\n if (!YAML_FLOAT_PATTERN.test(data) ||\n // Quick hack to not allow integers end with `_`\n // Probably should update regexp & check speed\n data[data.length - 1] === '_') {\n return false;\n }\n\n return true;\n}\n\nfunction constructYamlFloat(data) {\n var value, sign;\n\n value = data.replace(/_/g, '').toLowerCase();\n sign = value[0] === '-' ? -1 : 1;\n\n if ('+-'.indexOf(value[0]) >= 0) {\n value = value.slice(1);\n }\n\n if (value === '.inf') {\n return (sign === 1) ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY;\n\n } else if (value === '.nan') {\n return NaN;\n }\n return sign * parseFloat(value, 10);\n}\n\n\nvar SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/;\n\nfunction representYamlFloat(object, style) {\n var res;\n\n if (isNaN(object)) {\n switch (style) {\n case 'lowercase': return '.nan';\n case 'uppercase': return '.NAN';\n case 'camelcase': return '.NaN';\n }\n } else if (Number.POSITIVE_INFINITY === object) {\n switch (style) {\n case 'lowercase': return '.inf';\n case 'uppercase': return '.INF';\n case 'camelcase': return '.Inf';\n }\n } else if (Number.NEGATIVE_INFINITY === object) {\n switch (style) {\n case 'lowercase': return '-.inf';\n case 'uppercase': return '-.INF';\n case 'camelcase': return '-.Inf';\n }\n } else if (common.isNegativeZero(object)) {\n return '-0.0';\n }\n\n res = object.toString(10);\n\n // JS stringifier can build scientific format without dots: 5e-100,\n // while YAML requres dot: 5.e-100. Fix it with simple hack\n\n return SCIENTIFIC_WITHOUT_DOT.test(res) ? res.replace('e', '.e') : res;\n}\n\nfunction isFloat(object) {\n return (Object.prototype.toString.call(object) === '[object Number]') &&\n (object % 1 !== 0 || common.isNegativeZero(object));\n}\n\nvar float = new type('tag:yaml.org,2002:float', {\n kind: 'scalar',\n resolve: resolveYamlFloat,\n construct: constructYamlFloat,\n predicate: isFloat,\n represent: representYamlFloat,\n defaultStyle: 'lowercase'\n});\n\nvar json = failsafe.extend({\n implicit: [\n _null,\n bool,\n int,\n float\n ]\n});\n\nvar core = json;\n\nvar YAML_DATE_REGEXP = new RegExp(\n '^([0-9][0-9][0-9][0-9])' + // [1] year\n '-([0-9][0-9])' + // [2] month\n '-([0-9][0-9])$'); // [3] day\n\nvar YAML_TIMESTAMP_REGEXP = new RegExp(\n '^([0-9][0-9][0-9][0-9])' + // [1] year\n '-([0-9][0-9]?)' + // [2] month\n '-([0-9][0-9]?)' + // [3] day\n '(?:[Tt]|[ \\\\t]+)' + // ...\n '([0-9][0-9]?)' + // [4] hour\n ':([0-9][0-9])' + // [5] minute\n ':([0-9][0-9])' + // [6] second\n '(?:\\\\.([0-9]*))?' + // [7] fraction\n '(?:[ \\\\t]*(Z|([-+])([0-9][0-9]?)' + // [8] tz [9] tz_sign [10] tz_hour\n '(?::([0-9][0-9]))?))?$'); // [11] tz_minute\n\nfunction resolveYamlTimestamp(data) {\n if (data === null) return false;\n if (YAML_DATE_REGEXP.exec(data) !== null) return true;\n if (YAML_TIMESTAMP_REGEXP.exec(data) !== null) return true;\n return false;\n}\n\nfunction constructYamlTimestamp(data) {\n var match, year, month, day, hour, minute, second, fraction = 0,\n delta = null, tz_hour, tz_minute, date;\n\n match = YAML_DATE_REGEXP.exec(data);\n if (match === null) match = YAML_TIMESTAMP_REGEXP.exec(data);\n\n if (match === null) throw new Error('Date resolve error');\n\n // match: [1] year [2] month [3] day\n\n year = +(match[1]);\n month = +(match[2]) - 1; // JS month starts with 0\n day = +(match[3]);\n\n if (!match[4]) { // no hour\n return new Date(Date.UTC(year, month, day));\n }\n\n // match: [4] hour [5] minute [6] second [7] fraction\n\n hour = +(match[4]);\n minute = +(match[5]);\n second = +(match[6]);\n\n if (match[7]) {\n fraction = match[7].slice(0, 3);\n while (fraction.length < 3) { // milli-seconds\n fraction += '0';\n }\n fraction = +fraction;\n }\n\n // match: [8] tz [9] tz_sign [10] tz_hour [11] tz_minute\n\n if (match[9]) {\n tz_hour = +(match[10]);\n tz_minute = +(match[11] || 0);\n delta = (tz_hour * 60 + tz_minute) * 60000; // delta in mili-seconds\n if (match[9] === '-') delta = -delta;\n }\n\n date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction));\n\n if (delta) date.setTime(date.getTime() - delta);\n\n return date;\n}\n\nfunction representYamlTimestamp(object /*, style*/) {\n return object.toISOString();\n}\n\nvar timestamp = new type('tag:yaml.org,2002:timestamp', {\n kind: 'scalar',\n resolve: resolveYamlTimestamp,\n construct: constructYamlTimestamp,\n instanceOf: Date,\n represent: representYamlTimestamp\n});\n\nfunction resolveYamlMerge(data) {\n return data === '<<' || data === null;\n}\n\nvar merge = new type('tag:yaml.org,2002:merge', {\n kind: 'scalar',\n resolve: resolveYamlMerge\n});\n\n/*eslint-disable no-bitwise*/\n\n\n\n\n\n// [ 64, 65, 66 ] -> [ padding, CR, LF ]\nvar BASE64_MAP = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\\n\\r';\n\n\nfunction resolveYamlBinary(data) {\n if (data === null) return false;\n\n var code, idx, bitlen = 0, max = data.length, map = BASE64_MAP;\n\n // Convert one by one.\n for (idx = 0; idx < max; idx++) {\n code = map.indexOf(data.charAt(idx));\n\n // Skip CR/LF\n if (code > 64) continue;\n\n // Fail on illegal characters\n if (code < 0) return false;\n\n bitlen += 6;\n }\n\n // If there are any bits left, source was corrupted\n return (bitlen % 8) === 0;\n}\n\nfunction constructYamlBinary(data) {\n var idx, tailbits,\n input = data.replace(/[\\r\\n=]/g, ''), // remove CR/LF & padding to simplify scan\n max = input.length,\n map = BASE64_MAP,\n bits = 0,\n result = [];\n\n // Collect by 6*4 bits (3 bytes)\n\n for (idx = 0; idx < max; idx++) {\n if ((idx % 4 === 0) && idx) {\n result.push((bits >> 16) & 0xFF);\n result.push((bits >> 8) & 0xFF);\n result.push(bits & 0xFF);\n }\n\n bits = (bits << 6) | map.indexOf(input.charAt(idx));\n }\n\n // Dump tail\n\n tailbits = (max % 4) * 6;\n\n if (tailbits === 0) {\n result.push((bits >> 16) & 0xFF);\n result.push((bits >> 8) & 0xFF);\n result.push(bits & 0xFF);\n } else if (tailbits === 18) {\n result.push((bits >> 10) & 0xFF);\n result.push((bits >> 2) & 0xFF);\n } else if (tailbits === 12) {\n result.push((bits >> 4) & 0xFF);\n }\n\n return new Uint8Array(result);\n}\n\nfunction representYamlBinary(object /*, style*/) {\n var result = '', bits = 0, idx, tail,\n max = object.length,\n map = BASE64_MAP;\n\n // Convert every three bytes to 4 ASCII characters.\n\n for (idx = 0; idx < max; idx++) {\n if ((idx % 3 === 0) && idx) {\n result += map[(bits >> 18) & 0x3F];\n result += map[(bits >> 12) & 0x3F];\n result += map[(bits >> 6) & 0x3F];\n result += map[bits & 0x3F];\n }\n\n bits = (bits << 8) + object[idx];\n }\n\n // Dump tail\n\n tail = max % 3;\n\n if (tail === 0) {\n result += map[(bits >> 18) & 0x3F];\n result += map[(bits >> 12) & 0x3F];\n result += map[(bits >> 6) & 0x3F];\n result += map[bits & 0x3F];\n } else if (tail === 2) {\n result += map[(bits >> 10) & 0x3F];\n result += map[(bits >> 4) & 0x3F];\n result += map[(bits << 2) & 0x3F];\n result += map[64];\n } else if (tail === 1) {\n result += map[(bits >> 2) & 0x3F];\n result += map[(bits << 4) & 0x3F];\n result += map[64];\n result += map[64];\n }\n\n return result;\n}\n\nfunction isBinary(obj) {\n return Object.prototype.toString.call(obj) === '[object Uint8Array]';\n}\n\nvar binary = new type('tag:yaml.org,2002:binary', {\n kind: 'scalar',\n resolve: resolveYamlBinary,\n construct: constructYamlBinary,\n predicate: isBinary,\n represent: representYamlBinary\n});\n\nvar _hasOwnProperty$3 = Object.prototype.hasOwnProperty;\nvar _toString$2 = Object.prototype.toString;\n\nfunction resolveYamlOmap(data) {\n if (data === null) return true;\n\n var objectKeys = [], index, length, pair, pairKey, pairHasKey,\n object = data;\n\n for (index = 0, length = object.length; index < length; index += 1) {\n pair = object[index];\n pairHasKey = false;\n\n if (_toString$2.call(pair) !== '[object Object]') return false;\n\n for (pairKey in pair) {\n if (_hasOwnProperty$3.call(pair, pairKey)) {\n if (!pairHasKey) pairHasKey = true;\n else return false;\n }\n }\n\n if (!pairHasKey) return false;\n\n if (objectKeys.indexOf(pairKey) === -1) objectKeys.push(pairKey);\n else return false;\n }\n\n return true;\n}\n\nfunction constructYamlOmap(data) {\n return data !== null ? data : [];\n}\n\nvar omap = new type('tag:yaml.org,2002:omap', {\n kind: 'sequence',\n resolve: resolveYamlOmap,\n construct: constructYamlOmap\n});\n\nvar _toString$1 = Object.prototype.toString;\n\nfunction resolveYamlPairs(data) {\n if (data === null) return true;\n\n var index, length, pair, keys, result,\n object = data;\n\n result = new Array(object.length);\n\n for (index = 0, length = object.length; index < length; index += 1) {\n pair = object[index];\n\n if (_toString$1.call(pair) !== '[object Object]') return false;\n\n keys = Object.keys(pair);\n\n if (keys.length !== 1) return false;\n\n result[index] = [ keys[0], pair[keys[0]] ];\n }\n\n return true;\n}\n\nfunction constructYamlPairs(data) {\n if (data === null) return [];\n\n var index, length, pair, keys, result,\n object = data;\n\n result = new Array(object.length);\n\n for (index = 0, length = object.length; index < length; index += 1) {\n pair = object[index];\n\n keys = Object.keys(pair);\n\n result[index] = [ keys[0], pair[keys[0]] ];\n }\n\n return result;\n}\n\nvar pairs = new type('tag:yaml.org,2002:pairs', {\n kind: 'sequence',\n resolve: resolveYamlPairs,\n construct: constructYamlPairs\n});\n\nvar _hasOwnProperty$2 = Object.prototype.hasOwnProperty;\n\nfunction resolveYamlSet(data) {\n if (data === null) return true;\n\n var key, object = data;\n\n for (key in object) {\n if (_hasOwnProperty$2.call(object, key)) {\n if (object[key] !== null) return false;\n }\n }\n\n return true;\n}\n\nfunction constructYamlSet(data) {\n return data !== null ? data : {};\n}\n\nvar set = new type('tag:yaml.org,2002:set', {\n kind: 'mapping',\n resolve: resolveYamlSet,\n construct: constructYamlSet\n});\n\nvar _default = core.extend({\n implicit: [\n timestamp,\n merge\n ],\n explicit: [\n binary,\n omap,\n pairs,\n set\n ]\n});\n\n/*eslint-disable max-len,no-use-before-define*/\n\n\n\n\n\n\n\nvar _hasOwnProperty$1 = Object.prototype.hasOwnProperty;\n\n\nvar CONTEXT_FLOW_IN = 1;\nvar CONTEXT_FLOW_OUT = 2;\nvar CONTEXT_BLOCK_IN = 3;\nvar CONTEXT_BLOCK_OUT = 4;\n\n\nvar CHOMPING_CLIP = 1;\nvar CHOMPING_STRIP = 2;\nvar CHOMPING_KEEP = 3;\n\n\nvar PATTERN_NON_PRINTABLE = /[\\x00-\\x08\\x0B\\x0C\\x0E-\\x1F\\x7F-\\x84\\x86-\\x9F\\uFFFE\\uFFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF]/;\nvar PATTERN_NON_ASCII_LINE_BREAKS = /[\\x85\\u2028\\u2029]/;\nvar PATTERN_FLOW_INDICATORS = /[,\\[\\]\\{\\}]/;\nvar PATTERN_TAG_HANDLE = /^(?:!|!!|![a-z\\-]+!)$/i;\nvar PATTERN_TAG_URI = /^(?:!|[^,\\[\\]\\{\\}])(?:%[0-9a-f]{2}|[0-9a-z\\-#;\\/\\?:@&=\\+\\$,_\\.!~\\*'\\(\\)\\[\\]])*$/i;\n\n\nfunction _class(obj) { return Object.prototype.toString.call(obj); }\n\nfunction is_EOL(c) {\n return (c === 0x0A/* LF */) || (c === 0x0D/* CR */);\n}\n\nfunction is_WHITE_SPACE(c) {\n return (c === 0x09/* Tab */) || (c === 0x20/* Space */);\n}\n\nfunction is_WS_OR_EOL(c) {\n return (c === 0x09/* Tab */) ||\n (c === 0x20/* Space */) ||\n (c === 0x0A/* LF */) ||\n (c === 0x0D/* CR */);\n}\n\nfunction is_FLOW_INDICATOR(c) {\n return c === 0x2C/* , */ ||\n c === 0x5B/* [ */ ||\n c === 0x5D/* ] */ ||\n c === 0x7B/* { */ ||\n c === 0x7D/* } */;\n}\n\nfunction fromHexCode(c) {\n var lc;\n\n if ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) {\n return c - 0x30;\n }\n\n /*eslint-disable no-bitwise*/\n lc = c | 0x20;\n\n if ((0x61/* a */ <= lc) && (lc <= 0x66/* f */)) {\n return lc - 0x61 + 10;\n }\n\n return -1;\n}\n\nfunction escapedHexLen(c) {\n if (c === 0x78/* x */) { return 2; }\n if (c === 0x75/* u */) { return 4; }\n if (c === 0x55/* U */) { return 8; }\n return 0;\n}\n\nfunction fromDecimalCode(c) {\n if ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) {\n return c - 0x30;\n }\n\n return -1;\n}\n\nfunction simpleEscapeSequence(c) {\n /* eslint-disable indent */\n return (c === 0x30/* 0 */) ? '\\x00' :\n (c === 0x61/* a */) ? '\\x07' :\n (c === 0x62/* b */) ? '\\x08' :\n (c === 0x74/* t */) ? '\\x09' :\n (c === 0x09/* Tab */) ? '\\x09' :\n (c === 0x6E/* n */) ? '\\x0A' :\n (c === 0x76/* v */) ? '\\x0B' :\n (c === 0x66/* f */) ? '\\x0C' :\n (c === 0x72/* r */) ? '\\x0D' :\n (c === 0x65/* e */) ? '\\x1B' :\n (c === 0x20/* Space */) ? ' ' :\n (c === 0x22/* \" */) ? '\\x22' :\n (c === 0x2F/* / */) ? '/' :\n (c === 0x5C/* \\ */) ? '\\x5C' :\n (c === 0x4E/* N */) ? '\\x85' :\n (c === 0x5F/* _ */) ? '\\xA0' :\n (c === 0x4C/* L */) ? '\\u2028' :\n (c === 0x50/* P */) ? '\\u2029' : '';\n}\n\nfunction charFromCodepoint(c) {\n if (c <= 0xFFFF) {\n return String.fromCharCode(c);\n }\n // Encode UTF-16 surrogate pair\n // https://en.wikipedia.org/wiki/UTF-16#Code_points_U.2B010000_to_U.2B10FFFF\n return String.fromCharCode(\n ((c - 0x010000) >> 10) + 0xD800,\n ((c - 0x010000) & 0x03FF) + 0xDC00\n );\n}\n\n// set a property of a literal object, while protecting against prototype pollution,\n// see https://github.com/nodeca/js-yaml/issues/164 for more details\nfunction setProperty(object, key, value) {\n // used for this specific key only because Object.defineProperty is slow\n if (key === '__proto__') {\n Object.defineProperty(object, key, {\n configurable: true,\n enumerable: true,\n writable: true,\n value: value\n });\n } else {\n object[key] = value;\n }\n}\n\nvar simpleEscapeCheck = new Array(256); // integer, for fast access\nvar simpleEscapeMap = new Array(256);\nfor (var i = 0; i < 256; i++) {\n simpleEscapeCheck[i] = simpleEscapeSequence(i) ? 1 : 0;\n simpleEscapeMap[i] = simpleEscapeSequence(i);\n}\n\n\nfunction State$1(input, options) {\n this.input = input;\n\n this.filename = options['filename'] || null;\n this.schema = options['schema'] || _default;\n this.onWarning = options['onWarning'] || null;\n // (Hidden) Remove? makes the loader to expect YAML 1.1 documents\n // if such documents have no explicit %YAML directive\n this.legacy = options['legacy'] || false;\n\n this.json = options['json'] || false;\n this.listener = options['listener'] || null;\n\n this.implicitTypes = this.schema.compiledImplicit;\n this.typeMap = this.schema.compiledTypeMap;\n\n this.length = input.length;\n this.position = 0;\n this.line = 0;\n this.lineStart = 0;\n this.lineIndent = 0;\n\n // position of first leading tab in the current line,\n // used to make sure there are no tabs in the indentation\n this.firstTabInLine = -1;\n\n this.documents = [];\n\n /*\n this.version;\n this.checkLineBreaks;\n this.tagMap;\n this.anchorMap;\n this.tag;\n this.anchor;\n this.kind;\n this.result;*/\n\n}\n\n\nfunction generateError(state, message) {\n var mark = {\n name: state.filename,\n buffer: state.input.slice(0, -1), // omit trailing \\0\n position: state.position,\n line: state.line,\n column: state.position - state.lineStart\n };\n\n mark.snippet = snippet(mark);\n\n return new exception(message, mark);\n}\n\nfunction throwError(state, message) {\n throw generateError(state, message);\n}\n\nfunction throwWarning(state, message) {\n if (state.onWarning) {\n state.onWarning.call(null, generateError(state, message));\n }\n}\n\n\nvar directiveHandlers = {\n\n YAML: function handleYamlDirective(state, name, args) {\n\n var match, major, minor;\n\n if (state.version !== null) {\n throwError(state, 'duplication of %YAML directive');\n }\n\n if (args.length !== 1) {\n throwError(state, 'YAML directive accepts exactly one argument');\n }\n\n match = /^([0-9]+)\\.([0-9]+)$/.exec(args[0]);\n\n if (match === null) {\n throwError(state, 'ill-formed argument of the YAML directive');\n }\n\n major = parseInt(match[1], 10);\n minor = parseInt(match[2], 10);\n\n if (major !== 1) {\n throwError(state, 'unacceptable YAML version of the document');\n }\n\n state.version = args[0];\n state.checkLineBreaks = (minor < 2);\n\n if (minor !== 1 && minor !== 2) {\n throwWarning(state, 'unsupported YAML version of the document');\n }\n },\n\n TAG: function handleTagDirective(state, name, args) {\n\n var handle, prefix;\n\n if (args.length !== 2) {\n throwError(state, 'TAG directive accepts exactly two arguments');\n }\n\n handle = args[0];\n prefix = args[1];\n\n if (!PATTERN_TAG_HANDLE.test(handle)) {\n throwError(state, 'ill-formed tag handle (first argument) of the TAG directive');\n }\n\n if (_hasOwnProperty$1.call(state.tagMap, handle)) {\n throwError(state, 'there is a previously declared suffix for \"' + handle + '\" tag handle');\n }\n\n if (!PATTERN_TAG_URI.test(prefix)) {\n throwError(state, 'ill-formed tag prefix (second argument) of the TAG directive');\n }\n\n try {\n prefix = decodeURIComponent(prefix);\n } catch (err) {\n throwError(state, 'tag prefix is malformed: ' + prefix);\n }\n\n state.tagMap[handle] = prefix;\n }\n};\n\n\nfunction captureSegment(state, start, end, checkJson) {\n var _position, _length, _character, _result;\n\n if (start < end) {\n _result = state.input.slice(start, end);\n\n if (checkJson) {\n for (_position = 0, _length = _result.length; _position < _length; _position += 1) {\n _character = _result.charCodeAt(_position);\n if (!(_character === 0x09 ||\n (0x20 <= _character && _character <= 0x10FFFF))) {\n throwError(state, 'expected valid JSON character');\n }\n }\n } else if (PATTERN_NON_PRINTABLE.test(_result)) {\n throwError(state, 'the stream contains non-printable characters');\n }\n\n state.result += _result;\n }\n}\n\nfunction mergeMappings(state, destination, source, overridableKeys) {\n var sourceKeys, key, index, quantity;\n\n if (!common.isObject(source)) {\n throwError(state, 'cannot merge mappings; the provided source object is unacceptable');\n }\n\n sourceKeys = Object.keys(source);\n\n for (index = 0, quantity = sourceKeys.length; index < quantity; index += 1) {\n key = sourceKeys[index];\n\n if (!_hasOwnProperty$1.call(destination, key)) {\n setProperty(destination, key, source[key]);\n overridableKeys[key] = true;\n }\n }\n}\n\nfunction storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode,\n startLine, startLineStart, startPos) {\n\n var index, quantity;\n\n // The output is a plain object here, so keys can only be strings.\n // We need to convert keyNode to a string, but doing so can hang the process\n // (deeply nested arrays that explode exponentially using aliases).\n if (Array.isArray(keyNode)) {\n keyNode = Array.prototype.slice.call(keyNode);\n\n for (index = 0, quantity = keyNode.length; index < quantity; index += 1) {\n if (Array.isArray(keyNode[index])) {\n throwError(state, 'nested arrays are not supported inside keys');\n }\n\n if (typeof keyNode === 'object' && _class(keyNode[index]) === '[object Object]') {\n keyNode[index] = '[object Object]';\n }\n }\n }\n\n // Avoid code execution in load() via toString property\n // (still use its own toString for arrays, timestamps,\n // and whatever user schema extensions happen to have @@toStringTag)\n if (typeof keyNode === 'object' && _class(keyNode) === '[object Object]') {\n keyNode = '[object Object]';\n }\n\n\n keyNode = String(keyNode);\n\n if (_result === null) {\n _result = {};\n }\n\n if (keyTag === 'tag:yaml.org,2002:merge') {\n if (Array.isArray(valueNode)) {\n for (index = 0, quantity = valueNode.length; index < quantity; index += 1) {\n mergeMappings(state, _result, valueNode[index], overridableKeys);\n }\n } else {\n mergeMappings(state, _result, valueNode, overridableKeys);\n }\n } else {\n if (!state.json &&\n !_hasOwnProperty$1.call(overridableKeys, keyNode) &&\n _hasOwnProperty$1.call(_result, keyNode)) {\n state.line = startLine || state.line;\n state.lineStart = startLineStart || state.lineStart;\n state.position = startPos || state.position;\n throwError(state, 'duplicated mapping key');\n }\n\n setProperty(_result, keyNode, valueNode);\n delete overridableKeys[keyNode];\n }\n\n return _result;\n}\n\nfunction readLineBreak(state) {\n var ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch === 0x0A/* LF */) {\n state.position++;\n } else if (ch === 0x0D/* CR */) {\n state.position++;\n if (state.input.charCodeAt(state.position) === 0x0A/* LF */) {\n state.position++;\n }\n } else {\n throwError(state, 'a line break is expected');\n }\n\n state.line += 1;\n state.lineStart = state.position;\n state.firstTabInLine = -1;\n}\n\nfunction skipSeparationSpace(state, allowComments, checkIndent) {\n var lineBreaks = 0,\n ch = state.input.charCodeAt(state.position);\n\n while (ch !== 0) {\n while (is_WHITE_SPACE(ch)) {\n if (ch === 0x09/* Tab */ && state.firstTabInLine === -1) {\n state.firstTabInLine = state.position;\n }\n ch = state.input.charCodeAt(++state.position);\n }\n\n if (allowComments && ch === 0x23/* # */) {\n do {\n ch = state.input.charCodeAt(++state.position);\n } while (ch !== 0x0A/* LF */ && ch !== 0x0D/* CR */ && ch !== 0);\n }\n\n if (is_EOL(ch)) {\n readLineBreak(state);\n\n ch = state.input.charCodeAt(state.position);\n lineBreaks++;\n state.lineIndent = 0;\n\n while (ch === 0x20/* Space */) {\n state.lineIndent++;\n ch = state.input.charCodeAt(++state.position);\n }\n } else {\n break;\n }\n }\n\n if (checkIndent !== -1 && lineBreaks !== 0 && state.lineIndent < checkIndent) {\n throwWarning(state, 'deficient indentation');\n }\n\n return lineBreaks;\n}\n\nfunction testDocumentSeparator(state) {\n var _position = state.position,\n ch;\n\n ch = state.input.charCodeAt(_position);\n\n // Condition state.position === state.lineStart is tested\n // in parent on each call, for efficiency. No needs to test here again.\n if ((ch === 0x2D/* - */ || ch === 0x2E/* . */) &&\n ch === state.input.charCodeAt(_position + 1) &&\n ch === state.input.charCodeAt(_position + 2)) {\n\n _position += 3;\n\n ch = state.input.charCodeAt(_position);\n\n if (ch === 0 || is_WS_OR_EOL(ch)) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction writeFoldedLines(state, count) {\n if (count === 1) {\n state.result += ' ';\n } else if (count > 1) {\n state.result += common.repeat('\\n', count - 1);\n }\n}\n\n\nfunction readPlainScalar(state, nodeIndent, withinFlowCollection) {\n var preceding,\n following,\n captureStart,\n captureEnd,\n hasPendingContent,\n _line,\n _lineStart,\n _lineIndent,\n _kind = state.kind,\n _result = state.result,\n ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (is_WS_OR_EOL(ch) ||\n is_FLOW_INDICATOR(ch) ||\n ch === 0x23/* # */ ||\n ch === 0x26/* & */ ||\n ch === 0x2A/* * */ ||\n ch === 0x21/* ! */ ||\n ch === 0x7C/* | */ ||\n ch === 0x3E/* > */ ||\n ch === 0x27/* ' */ ||\n ch === 0x22/* \" */ ||\n ch === 0x25/* % */ ||\n ch === 0x40/* @ */ ||\n ch === 0x60/* ` */) {\n return false;\n }\n\n if (ch === 0x3F/* ? */ || ch === 0x2D/* - */) {\n following = state.input.charCodeAt(state.position + 1);\n\n if (is_WS_OR_EOL(following) ||\n withinFlowCollection && is_FLOW_INDICATOR(following)) {\n return false;\n }\n }\n\n state.kind = 'scalar';\n state.result = '';\n captureStart = captureEnd = state.position;\n hasPendingContent = false;\n\n while (ch !== 0) {\n if (ch === 0x3A/* : */) {\n following = state.input.charCodeAt(state.position + 1);\n\n if (is_WS_OR_EOL(following) ||\n withinFlowCollection && is_FLOW_INDICATOR(following)) {\n break;\n }\n\n } else if (ch === 0x23/* # */) {\n preceding = state.input.charCodeAt(state.position - 1);\n\n if (is_WS_OR_EOL(preceding)) {\n break;\n }\n\n } else if ((state.position === state.lineStart && testDocumentSeparator(state)) ||\n withinFlowCollection && is_FLOW_INDICATOR(ch)) {\n break;\n\n } else if (is_EOL(ch)) {\n _line = state.line;\n _lineStart = state.lineStart;\n _lineIndent = state.lineIndent;\n skipSeparationSpace(state, false, -1);\n\n if (state.lineIndent >= nodeIndent) {\n hasPendingContent = true;\n ch = state.input.charCodeAt(state.position);\n continue;\n } else {\n state.position = captureEnd;\n state.line = _line;\n state.lineStart = _lineStart;\n state.lineIndent = _lineIndent;\n break;\n }\n }\n\n if (hasPendingContent) {\n captureSegment(state, captureStart, captureEnd, false);\n writeFoldedLines(state, state.line - _line);\n captureStart = captureEnd = state.position;\n hasPendingContent = false;\n }\n\n if (!is_WHITE_SPACE(ch)) {\n captureEnd = state.position + 1;\n }\n\n ch = state.input.charCodeAt(++state.position);\n }\n\n captureSegment(state, captureStart, captureEnd, false);\n\n if (state.result) {\n return true;\n }\n\n state.kind = _kind;\n state.result = _result;\n return false;\n}\n\nfunction readSingleQuotedScalar(state, nodeIndent) {\n var ch,\n captureStart, captureEnd;\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch !== 0x27/* ' */) {\n return false;\n }\n\n state.kind = 'scalar';\n state.result = '';\n state.position++;\n captureStart = captureEnd = state.position;\n\n while ((ch = state.input.charCodeAt(state.position)) !== 0) {\n if (ch === 0x27/* ' */) {\n captureSegment(state, captureStart, state.position, true);\n ch = state.input.charCodeAt(++state.position);\n\n if (ch === 0x27/* ' */) {\n captureStart = state.position;\n state.position++;\n captureEnd = state.position;\n } else {\n return true;\n }\n\n } else if (is_EOL(ch)) {\n captureSegment(state, captureStart, captureEnd, true);\n writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent));\n captureStart = captureEnd = state.position;\n\n } else if (state.position === state.lineStart && testDocumentSeparator(state)) {\n throwError(state, 'unexpected end of the document within a single quoted scalar');\n\n } else {\n state.position++;\n captureEnd = state.position;\n }\n }\n\n throwError(state, 'unexpected end of the stream within a single quoted scalar');\n}\n\nfunction readDoubleQuotedScalar(state, nodeIndent) {\n var captureStart,\n captureEnd,\n hexLength,\n hexResult,\n tmp,\n ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch !== 0x22/* \" */) {\n return false;\n }\n\n state.kind = 'scalar';\n state.result = '';\n state.position++;\n captureStart = captureEnd = state.position;\n\n while ((ch = state.input.charCodeAt(state.position)) !== 0) {\n if (ch === 0x22/* \" */) {\n captureSegment(state, captureStart, state.position, true);\n state.position++;\n return true;\n\n } else if (ch === 0x5C/* \\ */) {\n captureSegment(state, captureStart, state.position, true);\n ch = state.input.charCodeAt(++state.position);\n\n if (is_EOL(ch)) {\n skipSeparationSpace(state, false, nodeIndent);\n\n // TODO: rework to inline fn with no type cast?\n } else if (ch < 256 && simpleEscapeCheck[ch]) {\n state.result += simpleEscapeMap[ch];\n state.position++;\n\n } else if ((tmp = escapedHexLen(ch)) > 0) {\n hexLength = tmp;\n hexResult = 0;\n\n for (; hexLength > 0; hexLength--) {\n ch = state.input.charCodeAt(++state.position);\n\n if ((tmp = fromHexCode(ch)) >= 0) {\n hexResult = (hexResult << 4) + tmp;\n\n } else {\n throwError(state, 'expected hexadecimal character');\n }\n }\n\n state.result += charFromCodepoint(hexResult);\n\n state.position++;\n\n } else {\n throwError(state, 'unknown escape sequence');\n }\n\n captureStart = captureEnd = state.position;\n\n } else if (is_EOL(ch)) {\n captureSegment(state, captureStart, captureEnd, true);\n writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent));\n captureStart = captureEnd = state.position;\n\n } else if (state.position === state.lineStart && testDocumentSeparator(state)) {\n throwError(state, 'unexpected end of the document within a double quoted scalar');\n\n } else {\n state.position++;\n captureEnd = state.position;\n }\n }\n\n throwError(state, 'unexpected end of the stream within a double quoted scalar');\n}\n\nfunction readFlowCollection(state, nodeIndent) {\n var readNext = true,\n _line,\n _lineStart,\n _pos,\n _tag = state.tag,\n _result,\n _anchor = state.anchor,\n following,\n terminator,\n isPair,\n isExplicitPair,\n isMapping,\n overridableKeys = Object.create(null),\n keyNode,\n keyTag,\n valueNode,\n ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch === 0x5B/* [ */) {\n terminator = 0x5D;/* ] */\n isMapping = false;\n _result = [];\n } else if (ch === 0x7B/* { */) {\n terminator = 0x7D;/* } */\n isMapping = true;\n _result = {};\n } else {\n return false;\n }\n\n if (state.anchor !== null) {\n state.anchorMap[state.anchor] = _result;\n }\n\n ch = state.input.charCodeAt(++state.position);\n\n while (ch !== 0) {\n skipSeparationSpace(state, true, nodeIndent);\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch === terminator) {\n state.position++;\n state.tag = _tag;\n state.anchor = _anchor;\n state.kind = isMapping ? 'mapping' : 'sequence';\n state.result = _result;\n return true;\n } else if (!readNext) {\n throwError(state, 'missed comma between flow collection entries');\n } else if (ch === 0x2C/* , */) {\n // \"flow collection entries can never be completely empty\", as per YAML 1.2, section 7.4\n throwError(state, \"expected the node content, but found ','\");\n }\n\n keyTag = keyNode = valueNode = null;\n isPair = isExplicitPair = false;\n\n if (ch === 0x3F/* ? */) {\n following = state.input.charCodeAt(state.position + 1);\n\n if (is_WS_OR_EOL(following)) {\n isPair = isExplicitPair = true;\n state.position++;\n skipSeparationSpace(state, true, nodeIndent);\n }\n }\n\n _line = state.line; // Save the current line.\n _lineStart = state.lineStart;\n _pos = state.position;\n composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true);\n keyTag = state.tag;\n keyNode = state.result;\n skipSeparationSpace(state, true, nodeIndent);\n\n ch = state.input.charCodeAt(state.position);\n\n if ((isExplicitPair || state.line === _line) && ch === 0x3A/* : */) {\n isPair = true;\n ch = state.input.charCodeAt(++state.position);\n skipSeparationSpace(state, true, nodeIndent);\n composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true);\n valueNode = state.result;\n }\n\n if (isMapping) {\n storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos);\n } else if (isPair) {\n _result.push(storeMappingPair(state, null, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos));\n } else {\n _result.push(keyNode);\n }\n\n skipSeparationSpace(state, true, nodeIndent);\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch === 0x2C/* , */) {\n readNext = true;\n ch = state.input.charCodeAt(++state.position);\n } else {\n readNext = false;\n }\n }\n\n throwError(state, 'unexpected end of the stream within a flow collection');\n}\n\nfunction readBlockScalar(state, nodeIndent) {\n var captureStart,\n folding,\n chomping = CHOMPING_CLIP,\n didReadContent = false,\n detectedIndent = false,\n textIndent = nodeIndent,\n emptyLines = 0,\n atMoreIndented = false,\n tmp,\n ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch === 0x7C/* | */) {\n folding = false;\n } else if (ch === 0x3E/* > */) {\n folding = true;\n } else {\n return false;\n }\n\n state.kind = 'scalar';\n state.result = '';\n\n while (ch !== 0) {\n ch = state.input.charCodeAt(++state.position);\n\n if (ch === 0x2B/* + */ || ch === 0x2D/* - */) {\n if (CHOMPING_CLIP === chomping) {\n chomping = (ch === 0x2B/* + */) ? CHOMPING_KEEP : CHOMPING_STRIP;\n } else {\n throwError(state, 'repeat of a chomping mode identifier');\n }\n\n } else if ((tmp = fromDecimalCode(ch)) >= 0) {\n if (tmp === 0) {\n throwError(state, 'bad explicit indentation width of a block scalar; it cannot be less than one');\n } else if (!detectedIndent) {\n textIndent = nodeIndent + tmp - 1;\n detectedIndent = true;\n } else {\n throwError(state, 'repeat of an indentation width identifier');\n }\n\n } else {\n break;\n }\n }\n\n if (is_WHITE_SPACE(ch)) {\n do { ch = state.input.charCodeAt(++state.position); }\n while (is_WHITE_SPACE(ch));\n\n if (ch === 0x23/* # */) {\n do { ch = state.input.charCodeAt(++state.position); }\n while (!is_EOL(ch) && (ch !== 0));\n }\n }\n\n while (ch !== 0) {\n readLineBreak(state);\n state.lineIndent = 0;\n\n ch = state.input.charCodeAt(state.position);\n\n while ((!detectedIndent || state.lineIndent < textIndent) &&\n (ch === 0x20/* Space */)) {\n state.lineIndent++;\n ch = state.input.charCodeAt(++state.position);\n }\n\n if (!detectedIndent && state.lineIndent > textIndent) {\n textIndent = state.lineIndent;\n }\n\n if (is_EOL(ch)) {\n emptyLines++;\n continue;\n }\n\n // End of the scalar.\n if (state.lineIndent < textIndent) {\n\n // Perform the chomping.\n if (chomping === CHOMPING_KEEP) {\n state.result += common.repeat('\\n', didReadContent ? 1 + emptyLines : emptyLines);\n } else if (chomping === CHOMPING_CLIP) {\n if (didReadContent) { // i.e. only if the scalar is not empty.\n state.result += '\\n';\n }\n }\n\n // Break this `while` cycle and go to the funciton's epilogue.\n break;\n }\n\n // Folded style: use fancy rules to handle line breaks.\n if (folding) {\n\n // Lines starting with white space characters (more-indented lines) are not folded.\n if (is_WHITE_SPACE(ch)) {\n atMoreIndented = true;\n // except for the first content line (cf. Example 8.1)\n state.result += common.repeat('\\n', didReadContent ? 1 + emptyLines : emptyLines);\n\n // End of more-indented block.\n } else if (atMoreIndented) {\n atMoreIndented = false;\n state.result += common.repeat('\\n', emptyLines + 1);\n\n // Just one line break - perceive as the same line.\n } else if (emptyLines === 0) {\n if (didReadContent) { // i.e. only if we have already read some scalar content.\n state.result += ' ';\n }\n\n // Several line breaks - perceive as different lines.\n } else {\n state.result += common.repeat('\\n', emptyLines);\n }\n\n // Literal style: just add exact number of line breaks between content lines.\n } else {\n // Keep all line breaks except the header line break.\n state.result += common.repeat('\\n', didReadContent ? 1 + emptyLines : emptyLines);\n }\n\n didReadContent = true;\n detectedIndent = true;\n emptyLines = 0;\n captureStart = state.position;\n\n while (!is_EOL(ch) && (ch !== 0)) {\n ch = state.input.charCodeAt(++state.position);\n }\n\n captureSegment(state, captureStart, state.position, false);\n }\n\n return true;\n}\n\nfunction readBlockSequence(state, nodeIndent) {\n var _line,\n _tag = state.tag,\n _anchor = state.anchor,\n _result = [],\n following,\n detected = false,\n ch;\n\n // there is a leading tab before this token, so it can't be a block sequence/mapping;\n // it can still be flow sequence/mapping or a scalar\n if (state.firstTabInLine !== -1) return false;\n\n if (state.anchor !== null) {\n state.anchorMap[state.anchor] = _result;\n }\n\n ch = state.input.charCodeAt(state.position);\n\n while (ch !== 0) {\n if (state.firstTabInLine !== -1) {\n state.position = state.firstTabInLine;\n throwError(state, 'tab characters must not be used in indentation');\n }\n\n if (ch !== 0x2D/* - */) {\n break;\n }\n\n following = state.input.charCodeAt(state.position + 1);\n\n if (!is_WS_OR_EOL(following)) {\n break;\n }\n\n detected = true;\n state.position++;\n\n if (skipSeparationSpace(state, true, -1)) {\n if (state.lineIndent <= nodeIndent) {\n _result.push(null);\n ch = state.input.charCodeAt(state.position);\n continue;\n }\n }\n\n _line = state.line;\n composeNode(state, nodeIndent, CONTEXT_BLOCK_IN, false, true);\n _result.push(state.result);\n skipSeparationSpace(state, true, -1);\n\n ch = state.input.charCodeAt(state.position);\n\n if ((state.line === _line || state.lineIndent > nodeIndent) && (ch !== 0)) {\n throwError(state, 'bad indentation of a sequence entry');\n } else if (state.lineIndent < nodeIndent) {\n break;\n }\n }\n\n if (detected) {\n state.tag = _tag;\n state.anchor = _anchor;\n state.kind = 'sequence';\n state.result = _result;\n return true;\n }\n return false;\n}\n\nfunction readBlockMapping(state, nodeIndent, flowIndent) {\n var following,\n allowCompact,\n _line,\n _keyLine,\n _keyLineStart,\n _keyPos,\n _tag = state.tag,\n _anchor = state.anchor,\n _result = {},\n overridableKeys = Object.create(null),\n keyTag = null,\n keyNode = null,\n valueNode = null,\n atExplicitKey = false,\n detected = false,\n ch;\n\n // there is a leading tab before this token, so it can't be a block sequence/mapping;\n // it can still be flow sequence/mapping or a scalar\n if (state.firstTabInLine !== -1) return false;\n\n if (state.anchor !== null) {\n state.anchorMap[state.anchor] = _result;\n }\n\n ch = state.input.charCodeAt(state.position);\n\n while (ch !== 0) {\n if (!atExplicitKey && state.firstTabInLine !== -1) {\n state.position = state.firstTabInLine;\n throwError(state, 'tab characters must not be used in indentation');\n }\n\n following = state.input.charCodeAt(state.position + 1);\n _line = state.line; // Save the current line.\n\n //\n // Explicit notation case. There are two separate blocks:\n // first for the key (denoted by \"?\") and second for the value (denoted by \":\")\n //\n if ((ch === 0x3F/* ? */ || ch === 0x3A/* : */) && is_WS_OR_EOL(following)) {\n\n if (ch === 0x3F/* ? */) {\n if (atExplicitKey) {\n storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos);\n keyTag = keyNode = valueNode = null;\n }\n\n detected = true;\n atExplicitKey = true;\n allowCompact = true;\n\n } else if (atExplicitKey) {\n // i.e. 0x3A/* : */ === character after the explicit key.\n atExplicitKey = false;\n allowCompact = true;\n\n } else {\n throwError(state, 'incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line');\n }\n\n state.position += 1;\n ch = following;\n\n //\n // Implicit notation case. Flow-style node as the key first, then \":\", and the value.\n //\n } else {\n _keyLine = state.line;\n _keyLineStart = state.lineStart;\n _keyPos = state.position;\n\n if (!composeNode(state, flowIndent, CONTEXT_FLOW_OUT, false, true)) {\n // Neither implicit nor explicit notation.\n // Reading is done. Go to the epilogue.\n break;\n }\n\n if (state.line === _line) {\n ch = state.input.charCodeAt(state.position);\n\n while (is_WHITE_SPACE(ch)) {\n ch = state.input.charCodeAt(++state.position);\n }\n\n if (ch === 0x3A/* : */) {\n ch = state.input.charCodeAt(++state.position);\n\n if (!is_WS_OR_EOL(ch)) {\n throwError(state, 'a whitespace character is expected after the key-value separator within a block mapping');\n }\n\n if (atExplicitKey) {\n storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos);\n keyTag = keyNode = valueNode = null;\n }\n\n detected = true;\n atExplicitKey = false;\n allowCompact = false;\n keyTag = state.tag;\n keyNode = state.result;\n\n } else if (detected) {\n throwError(state, 'can not read an implicit mapping pair; a colon is missed');\n\n } else {\n state.tag = _tag;\n state.anchor = _anchor;\n return true; // Keep the result of `composeNode`.\n }\n\n } else if (detected) {\n throwError(state, 'can not read a block mapping entry; a multiline key may not be an implicit key');\n\n } else {\n state.tag = _tag;\n state.anchor = _anchor;\n return true; // Keep the result of `composeNode`.\n }\n }\n\n //\n // Common reading code for both explicit and implicit notations.\n //\n if (state.line === _line || state.lineIndent > nodeIndent) {\n if (atExplicitKey) {\n _keyLine = state.line;\n _keyLineStart = state.lineStart;\n _keyPos = state.position;\n }\n\n if (composeNode(state, nodeIndent, CONTEXT_BLOCK_OUT, true, allowCompact)) {\n if (atExplicitKey) {\n keyNode = state.result;\n } else {\n valueNode = state.result;\n }\n }\n\n if (!atExplicitKey) {\n storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _keyLine, _keyLineStart, _keyPos);\n keyTag = keyNode = valueNode = null;\n }\n\n skipSeparationSpace(state, true, -1);\n ch = state.input.charCodeAt(state.position);\n }\n\n if ((state.line === _line || state.lineIndent > nodeIndent) && (ch !== 0)) {\n throwError(state, 'bad indentation of a mapping entry');\n } else if (state.lineIndent < nodeIndent) {\n break;\n }\n }\n\n //\n // Epilogue.\n //\n\n // Special case: last mapping's node contains only the key in explicit notation.\n if (atExplicitKey) {\n storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos);\n }\n\n // Expose the resulting mapping.\n if (detected) {\n state.tag = _tag;\n state.anchor = _anchor;\n state.kind = 'mapping';\n state.result = _result;\n }\n\n return detected;\n}\n\nfunction readTagProperty(state) {\n var _position,\n isVerbatim = false,\n isNamed = false,\n tagHandle,\n tagName,\n ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch !== 0x21/* ! */) return false;\n\n if (state.tag !== null) {\n throwError(state, 'duplication of a tag property');\n }\n\n ch = state.input.charCodeAt(++state.position);\n\n if (ch === 0x3C/* < */) {\n isVerbatim = true;\n ch = state.input.charCodeAt(++state.position);\n\n } else if (ch === 0x21/* ! */) {\n isNamed = true;\n tagHandle = '!!';\n ch = state.input.charCodeAt(++state.position);\n\n } else {\n tagHandle = '!';\n }\n\n _position = state.position;\n\n if (isVerbatim) {\n do { ch = state.input.charCodeAt(++state.position); }\n while (ch !== 0 && ch !== 0x3E/* > */);\n\n if (state.position < state.length) {\n tagName = state.input.slice(_position, state.position);\n ch = state.input.charCodeAt(++state.position);\n } else {\n throwError(state, 'unexpected end of the stream within a verbatim tag');\n }\n } else {\n while (ch !== 0 && !is_WS_OR_EOL(ch)) {\n\n if (ch === 0x21/* ! */) {\n if (!isNamed) {\n tagHandle = state.input.slice(_position - 1, state.position + 1);\n\n if (!PATTERN_TAG_HANDLE.test(tagHandle)) {\n throwError(state, 'named tag handle cannot contain such characters');\n }\n\n isNamed = true;\n _position = state.position + 1;\n } else {\n throwError(state, 'tag suffix cannot contain exclamation marks');\n }\n }\n\n ch = state.input.charCodeAt(++state.position);\n }\n\n tagName = state.input.slice(_position, state.position);\n\n if (PATTERN_FLOW_INDICATORS.test(tagName)) {\n throwError(state, 'tag suffix cannot contain flow indicator characters');\n }\n }\n\n if (tagName && !PATTERN_TAG_URI.test(tagName)) {\n throwError(state, 'tag name cannot contain such characters: ' + tagName);\n }\n\n try {\n tagName = decodeURIComponent(tagName);\n } catch (err) {\n throwError(state, 'tag name is malformed: ' + tagName);\n }\n\n if (isVerbatim) {\n state.tag = tagName;\n\n } else if (_hasOwnProperty$1.call(state.tagMap, tagHandle)) {\n state.tag = state.tagMap[tagHandle] + tagName;\n\n } else if (tagHandle === '!') {\n state.tag = '!' + tagName;\n\n } else if (tagHandle === '!!') {\n state.tag = 'tag:yaml.org,2002:' + tagName;\n\n } else {\n throwError(state, 'undeclared tag handle \"' + tagHandle + '\"');\n }\n\n return true;\n}\n\nfunction readAnchorProperty(state) {\n var _position,\n ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch !== 0x26/* & */) return false;\n\n if (state.anchor !== null) {\n throwError(state, 'duplication of an anchor property');\n }\n\n ch = state.input.charCodeAt(++state.position);\n _position = state.position;\n\n while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) {\n ch = state.input.charCodeAt(++state.position);\n }\n\n if (state.position === _position) {\n throwError(state, 'name of an anchor node must contain at least one character');\n }\n\n state.anchor = state.input.slice(_position, state.position);\n return true;\n}\n\nfunction readAlias(state) {\n var _position, alias,\n ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch !== 0x2A/* * */) return false;\n\n ch = state.input.charCodeAt(++state.position);\n _position = state.position;\n\n while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) {\n ch = state.input.charCodeAt(++state.position);\n }\n\n if (state.position === _position) {\n throwError(state, 'name of an alias node must contain at least one character');\n }\n\n alias = state.input.slice(_position, state.position);\n\n if (!_hasOwnProperty$1.call(state.anchorMap, alias)) {\n throwError(state, 'unidentified alias \"' + alias + '\"');\n }\n\n state.result = state.anchorMap[alias];\n skipSeparationSpace(state, true, -1);\n return true;\n}\n\nfunction composeNode(state, parentIndent, nodeContext, allowToSeek, allowCompact) {\n var allowBlockStyles,\n allowBlockScalars,\n allowBlockCollections,\n indentStatus = 1, // 1: this>parent, 0: this=parent, -1: this<parent\n atNewLine = false,\n hasContent = false,\n typeIndex,\n typeQuantity,\n typeList,\n type,\n flowIndent,\n blockIndent;\n\n if (state.listener !== null) {\n state.listener('open', state);\n }\n\n state.tag = null;\n state.anchor = null;\n state.kind = null;\n state.result = null;\n\n allowBlockStyles = allowBlockScalars = allowBlockCollections =\n CONTEXT_BLOCK_OUT === nodeContext ||\n CONTEXT_BLOCK_IN === nodeContext;\n\n if (allowToSeek) {\n if (skipSeparationSpace(state, true, -1)) {\n atNewLine = true;\n\n if (state.lineIndent > parentIndent) {\n indentStatus = 1;\n } else if (state.lineIndent === parentIndent) {\n indentStatus = 0;\n } else if (state.lineIndent < parentIndent) {\n indentStatus = -1;\n }\n }\n }\n\n if (indentStatus === 1) {\n while (readTagProperty(state) || readAnchorProperty(state)) {\n if (skipSeparationSpace(state, true, -1)) {\n atNewLine = true;\n allowBlockCollections = allowBlockStyles;\n\n if (state.lineIndent > parentIndent) {\n indentStatus = 1;\n } else if (state.lineIndent === parentIndent) {\n indentStatus = 0;\n } else if (state.lineIndent < parentIndent) {\n indentStatus = -1;\n }\n } else {\n allowBlockCollections = false;\n }\n }\n }\n\n if (allowBlockCollections) {\n allowBlockCollections = atNewLine || allowCompact;\n }\n\n if (indentStatus === 1 || CONTEXT_BLOCK_OUT === nodeContext) {\n if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext) {\n flowIndent = parentIndent;\n } else {\n flowIndent = parentIndent + 1;\n }\n\n blockIndent = state.position - state.lineStart;\n\n if (indentStatus === 1) {\n if (allowBlockCollections &&\n (readBlockSequence(state, blockIndent) ||\n readBlockMapping(state, blockIndent, flowIndent)) ||\n readFlowCollection(state, flowIndent)) {\n hasContent = true;\n } else {\n if ((allowBlockScalars && readBlockScalar(state, flowIndent)) ||\n readSingleQuotedScalar(state, flowIndent) ||\n readDoubleQuotedScalar(state, flowIndent)) {\n hasContent = true;\n\n } else if (readAlias(state)) {\n hasContent = true;\n\n if (state.tag !== null || state.anchor !== null) {\n throwError(state, 'alias node should not have any properties');\n }\n\n } else if (readPlainScalar(state, flowIndent, CONTEXT_FLOW_IN === nodeContext)) {\n hasContent = true;\n\n if (state.tag === null) {\n state.tag = '?';\n }\n }\n\n if (state.anchor !== null) {\n state.anchorMap[state.anchor] = state.result;\n }\n }\n } else if (indentStatus === 0) {\n // Special case: block sequences are allowed to have same indentation level as the parent.\n // http://www.yaml.org/spec/1.2/spec.html#id2799784\n hasContent = allowBlockCollections && readBlockSequence(state, blockIndent);\n }\n }\n\n if (state.tag === null) {\n if (state.anchor !== null) {\n state.anchorMap[state.anchor] = state.result;\n }\n\n } else if (state.tag === '?') {\n // Implicit resolving is not allowed for non-scalar types, and '?'\n // non-specific tag is only automatically assigned to plain scalars.\n //\n // We only need to check kind conformity in case user explicitly assigns '?'\n // tag, for example like this: \"!<?> [0]\"\n //\n if (state.result !== null && state.kind !== 'scalar') {\n throwError(state, 'unacceptable node kind for !<?> tag; it should be \"scalar\", not \"' + state.kind + '\"');\n }\n\n for (typeIndex = 0, typeQuantity = state.implicitTypes.length; typeIndex < typeQuantity; typeIndex += 1) {\n type = state.implicitTypes[typeIndex];\n\n if (type.resolve(state.result)) { // `state.result` updated in resolver if matched\n state.result = type.construct(state.result);\n state.tag = type.tag;\n if (state.anchor !== null) {\n state.anchorMap[state.anchor] = state.result;\n }\n break;\n }\n }\n } else if (state.tag !== '!') {\n if (_hasOwnProperty$1.call(state.typeMap[state.kind || 'fallback'], state.tag)) {\n type = state.typeMap[state.kind || 'fallback'][state.tag];\n } else {\n // looking for multi type\n type = null;\n typeList = state.typeMap.multi[state.kind || 'fallback'];\n\n for (typeIndex = 0, typeQuantity = typeList.length; typeIndex < typeQuantity; typeIndex += 1) {\n if (state.tag.slice(0, typeList[typeIndex].tag.length) === typeList[typeIndex].tag) {\n type = typeList[typeIndex];\n break;\n }\n }\n }\n\n if (!type) {\n throwError(state, 'unknown tag !<' + state.tag + '>');\n }\n\n if (state.result !== null && type.kind !== state.kind) {\n throwError(state, 'unacceptable node kind for !<' + state.tag + '> tag; it should be \"' + type.kind + '\", not \"' + state.kind + '\"');\n }\n\n if (!type.resolve(state.result, state.tag)) { // `state.result` updated in resolver if matched\n throwError(state, 'cannot resolve a node with !<' + state.tag + '> explicit tag');\n } else {\n state.result = type.construct(state.result, state.tag);\n if (state.anchor !== null) {\n state.anchorMap[state.anchor] = state.result;\n }\n }\n }\n\n if (state.listener !== null) {\n state.listener('close', state);\n }\n return state.tag !== null || state.anchor !== null || hasContent;\n}\n\nfunction readDocument(state) {\n var documentStart = state.position,\n _position,\n directiveName,\n directiveArgs,\n hasDirectives = false,\n ch;\n\n state.version = null;\n state.checkLineBreaks = state.legacy;\n state.tagMap = Object.create(null);\n state.anchorMap = Object.create(null);\n\n while ((ch = state.input.charCodeAt(state.position)) !== 0) {\n skipSeparationSpace(state, true, -1);\n\n ch = state.input.charCodeAt(state.position);\n\n if (state.lineIndent > 0 || ch !== 0x25/* % */) {\n break;\n }\n\n hasDirectives = true;\n ch = state.input.charCodeAt(++state.position);\n _position = state.position;\n\n while (ch !== 0 && !is_WS_OR_EOL(ch)) {\n ch = state.input.charCodeAt(++state.position);\n }\n\n directiveName = state.input.slice(_position, state.position);\n directiveArgs = [];\n\n if (directiveName.length < 1) {\n throwError(state, 'directive name must not be less than one character in length');\n }\n\n while (ch !== 0) {\n while (is_WHITE_SPACE(ch)) {\n ch = state.input.charCodeAt(++state.position);\n }\n\n if (ch === 0x23/* # */) {\n do { ch = state.input.charCodeAt(++state.position); }\n while (ch !== 0 && !is_EOL(ch));\n break;\n }\n\n if (is_EOL(ch)) break;\n\n _position = state.position;\n\n while (ch !== 0 && !is_WS_OR_EOL(ch)) {\n ch = state.input.charCodeAt(++state.position);\n }\n\n directiveArgs.push(state.input.slice(_position, state.position));\n }\n\n if (ch !== 0) readLineBreak(state);\n\n if (_hasOwnProperty$1.call(directiveHandlers, directiveName)) {\n directiveHandlers[directiveName](state, directiveName, directiveArgs);\n } else {\n throwWarning(state, 'unknown document directive \"' + directiveName + '\"');\n }\n }\n\n skipSeparationSpace(state, true, -1);\n\n if (state.lineIndent === 0 &&\n state.input.charCodeAt(state.position) === 0x2D/* - */ &&\n state.input.charCodeAt(state.position + 1) === 0x2D/* - */ &&\n state.input.charCodeAt(state.position + 2) === 0x2D/* - */) {\n state.position += 3;\n skipSeparationSpace(state, true, -1);\n\n } else if (hasDirectives) {\n throwError(state, 'directives end mark is expected');\n }\n\n composeNode(state, state.lineIndent - 1, CONTEXT_BLOCK_OUT, false, true);\n skipSeparationSpace(state, true, -1);\n\n if (state.checkLineBreaks &&\n PATTERN_NON_ASCII_LINE_BREAKS.test(state.input.slice(documentStart, state.position))) {\n throwWarning(state, 'non-ASCII line breaks are interpreted as content');\n }\n\n state.documents.push(state.result);\n\n if (state.position === state.lineStart && testDocumentSeparator(state)) {\n\n if (state.input.charCodeAt(state.position) === 0x2E/* . */) {\n state.position += 3;\n skipSeparationSpace(state, true, -1);\n }\n return;\n }\n\n if (state.position < (state.length - 1)) {\n throwError(state, 'end of the stream or a document separator is expected');\n } else {\n return;\n }\n}\n\n\nfunction loadDocuments(input, options) {\n input = String(input);\n options = options || {};\n\n if (input.length !== 0) {\n\n // Add tailing `\\n` if not exists\n if (input.charCodeAt(input.length - 1) !== 0x0A/* LF */ &&\n input.charCodeAt(input.length - 1) !== 0x0D/* CR */) {\n input += '\\n';\n }\n\n // Strip BOM\n if (input.charCodeAt(0) === 0xFEFF) {\n input = input.slice(1);\n }\n }\n\n var state = new State$1(input, options);\n\n var nullpos = input.indexOf('\\0');\n\n if (nullpos !== -1) {\n state.position = nullpos;\n throwError(state, 'null byte is not allowed in input');\n }\n\n // Use 0 as string terminator. That significantly simplifies bounds check.\n state.input += '\\0';\n\n while (state.input.charCodeAt(state.position) === 0x20/* Space */) {\n state.lineIndent += 1;\n state.position += 1;\n }\n\n while (state.position < (state.length - 1)) {\n readDocument(state);\n }\n\n return state.documents;\n}\n\n\nfunction loadAll$1(input, iterator, options) {\n if (iterator !== null && typeof iterator === 'object' && typeof options === 'undefined') {\n options = iterator;\n iterator = null;\n }\n\n var documents = loadDocuments(input, options);\n\n if (typeof iterator !== 'function') {\n return documents;\n }\n\n for (var index = 0, length = documents.length; index < length; index += 1) {\n iterator(documents[index]);\n }\n}\n\n\nfunction load$1(input, options) {\n var documents = loadDocuments(input, options);\n\n if (documents.length === 0) {\n /*eslint-disable no-undefined*/\n return undefined;\n } else if (documents.length === 1) {\n return documents[0];\n }\n throw new exception('expected a single document in the stream, but found more');\n}\n\n\nvar loadAll_1 = loadAll$1;\nvar load_1 = load$1;\n\nvar loader = {\n\tloadAll: loadAll_1,\n\tload: load_1\n};\n\n/*eslint-disable no-use-before-define*/\n\n\n\n\n\nvar _toString = Object.prototype.toString;\nvar _hasOwnProperty = Object.prototype.hasOwnProperty;\n\nvar CHAR_BOM = 0xFEFF;\nvar CHAR_TAB = 0x09; /* Tab */\nvar CHAR_LINE_FEED = 0x0A; /* LF */\nvar CHAR_CARRIAGE_RETURN = 0x0D; /* CR */\nvar CHAR_SPACE = 0x20; /* Space */\nvar CHAR_EXCLAMATION = 0x21; /* ! */\nvar CHAR_DOUBLE_QUOTE = 0x22; /* \" */\nvar CHAR_SHARP = 0x23; /* # */\nvar CHAR_PERCENT = 0x25; /* % */\nvar CHAR_AMPERSAND = 0x26; /* & */\nvar CHAR_SINGLE_QUOTE = 0x27; /* ' */\nvar CHAR_ASTERISK = 0x2A; /* * */\nvar CHAR_COMMA = 0x2C; /* , */\nvar CHAR_MINUS = 0x2D; /* - */\nvar CHAR_COLON = 0x3A; /* : */\nvar CHAR_EQUALS = 0x3D; /* = */\nvar CHAR_GREATER_THAN = 0x3E; /* > */\nvar CHAR_QUESTION = 0x3F; /* ? */\nvar CHAR_COMMERCIAL_AT = 0x40; /* @ */\nvar CHAR_LEFT_SQUARE_BRACKET = 0x5B; /* [ */\nvar CHAR_RIGHT_SQUARE_BRACKET = 0x5D; /* ] */\nvar CHAR_GRAVE_ACCENT = 0x60; /* ` */\nvar CHAR_LEFT_CURLY_BRACKET = 0x7B; /* { */\nvar CHAR_VERTICAL_LINE = 0x7C; /* | */\nvar CHAR_RIGHT_CURLY_BRACKET = 0x7D; /* } */\n\nvar ESCAPE_SEQUENCES = {};\n\nESCAPE_SEQUENCES[0x00] = '\\\\0';\nESCAPE_SEQUENCES[0x07] = '\\\\a';\nESCAPE_SEQUENCES[0x08] = '\\\\b';\nESCAPE_SEQUENCES[0x09] = '\\\\t';\nESCAPE_SEQUENCES[0x0A] = '\\\\n';\nESCAPE_SEQUENCES[0x0B] = '\\\\v';\nESCAPE_SEQUENCES[0x0C] = '\\\\f';\nESCAPE_SEQUENCES[0x0D] = '\\\\r';\nESCAPE_SEQUENCES[0x1B] = '\\\\e';\nESCAPE_SEQUENCES[0x22] = '\\\\\"';\nESCAPE_SEQUENCES[0x5C] = '\\\\\\\\';\nESCAPE_SEQUENCES[0x85] = '\\\\N';\nESCAPE_SEQUENCES[0xA0] = '\\\\_';\nESCAPE_SEQUENCES[0x2028] = '\\\\L';\nESCAPE_SEQUENCES[0x2029] = '\\\\P';\n\nvar DEPRECATED_BOOLEANS_SYNTAX = [\n 'y', 'Y', 'yes', 'Yes', 'YES', 'on', 'On', 'ON',\n 'n', 'N', 'no', 'No', 'NO', 'off', 'Off', 'OFF'\n];\n\nvar DEPRECATED_BASE60_SYNTAX = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\\.[0-9_]*)?$/;\n\nfunction compileStyleMap(schema, map) {\n var result, keys, index, length, tag, style, type;\n\n if (map === null) return {};\n\n result = {};\n keys = Object.keys(map);\n\n for (index = 0, length = keys.length; index < length; index += 1) {\n tag = keys[index];\n style = String(map[tag]);\n\n if (tag.slice(0, 2) === '!!') {\n tag = 'tag:yaml.org,2002:' + tag.slice(2);\n }\n type = schema.compiledTypeMap['fallback'][tag];\n\n if (type && _hasOwnProperty.call(type.styleAliases, style)) {\n style = type.styleAliases[style];\n }\n\n result[tag] = style;\n }\n\n return result;\n}\n\nfunction encodeHex(character) {\n var string, handle, length;\n\n string = character.toString(16).toUpperCase();\n\n if (character <= 0xFF) {\n handle = 'x';\n length = 2;\n } else if (character <= 0xFFFF) {\n handle = 'u';\n length = 4;\n } else if (character <= 0xFFFFFFFF) {\n handle = 'U';\n length = 8;\n } else {\n throw new exception('code point within a string may not be greater than 0xFFFFFFFF');\n }\n\n return '\\\\' + handle + common.repeat('0', length - string.length) + string;\n}\n\n\nvar QUOTING_TYPE_SINGLE = 1,\n QUOTING_TYPE_DOUBLE = 2;\n\nfunction State(options) {\n this.schema = options['schema'] || _default;\n this.indent = Math.max(1, (options['indent'] || 2));\n this.noArrayIndent = options['noArrayIndent'] || false;\n this.skipInvalid = options['skipInvalid'] || false;\n this.flowLevel = (common.isNothing(options['flowLevel']) ? -1 : options['flowLevel']);\n this.styleMap = compileStyleMap(this.schema, options['styles'] || null);\n this.sortKeys = options['sortKeys'] || false;\n this.lineWidth = options['lineWidth'] || 80;\n this.noRefs = options['noRefs'] || false;\n this.noCompatMode = options['noCompatMode'] || false;\n this.condenseFlow = options['condenseFlow'] || false;\n this.quotingType = options['quotingType'] === '\"' ? QUOTING_TYPE_DOUBLE : QUOTING_TYPE_SINGLE;\n this.forceQuotes = options['forceQuotes'] || false;\n this.replacer = typeof options['replacer'] === 'function' ? options['replacer'] : null;\n\n this.implicitTypes = this.schema.compiledImplicit;\n this.explicitTypes = this.schema.compiledExplicit;\n\n this.tag = null;\n this.result = '';\n\n this.duplicates = [];\n this.usedDuplicates = null;\n}\n\n// Indents every line in a string. Empty lines (\\n only) are not indented.\nfunction indentString(string, spaces) {\n var ind = common.repeat(' ', spaces),\n position = 0,\n next = -1,\n result = '',\n line,\n length = string.length;\n\n while (position < length) {\n next = string.indexOf('\\n', position);\n if (next === -1) {\n line = string.slice(position);\n position = length;\n } else {\n line = string.slice(position, next + 1);\n position = next + 1;\n }\n\n if (line.length && line !== '\\n') result += ind;\n\n result += line;\n }\n\n return result;\n}\n\nfunction generateNextLine(state, level) {\n return '\\n' + common.repeat(' ', state.indent * level);\n}\n\nfunction testImplicitResolving(state, str) {\n var index, length, type;\n\n for (index = 0, length = state.implicitTypes.length; index < length; index += 1) {\n type = state.implicitTypes[index];\n\n if (type.resolve(str)) {\n return true;\n }\n }\n\n return false;\n}\n\n// [33] s-white ::= s-space | s-tab\nfunction isWhitespace(c) {\n return c === CHAR_SPACE || c === CHAR_TAB;\n}\n\n// Returns true if the character can be printed without escaping.\n// From YAML 1.2: \"any allowed characters known to be non-printable\n// should also be escaped. [However,] This isn\u2019t mandatory\"\n// Derived from nb-char - \\t - #x85 - #xA0 - #x2028 - #x2029.\nfunction isPrintable(c) {\n return (0x00020 <= c && c <= 0x00007E)\n || ((0x000A1 <= c && c <= 0x00D7FF) && c !== 0x2028 && c !== 0x2029)\n || ((0x0E000 <= c && c <= 0x00FFFD) && c !== CHAR_BOM)\n || (0x10000 <= c && c <= 0x10FFFF);\n}\n\n// [34] ns-char ::= nb-char - s-white\n// [27] nb-char ::= c-printable - b-char - c-byte-order-mark\n// [26] b-char ::= b-line-feed | b-carriage-return\n// Including s-white (for some reason, examples doesn't match specs in this aspect)\n// ns-char ::= c-printable - b-line-feed - b-carriage-return - c-byte-order-mark\nfunction isNsCharOrWhitespace(c) {\n return isPrintable(c)\n && c !== CHAR_BOM\n // - b-char\n && c !== CHAR_CARRIAGE_RETURN\n && c !== CHAR_LINE_FEED;\n}\n\n// [127] ns-plain-safe(c) ::= c = flow-out \u21D2 ns-plain-safe-out\n// c = flow-in \u21D2 ns-plain-safe-in\n// c = block-key \u21D2 ns-plain-safe-out\n// c = flow-key \u21D2 ns-plain-safe-in\n// [128] ns-plain-safe-out ::= ns-char\n// [129] ns-plain-safe-in ::= ns-char - c-flow-indicator\n// [130] ns-plain-char(c) ::= ( ns-plain-safe(c) - \u201C:\u201D - \u201C#\u201D )\n// | ( /* An ns-char preceding */ \u201C#\u201D )\n// | ( \u201C:\u201D /* Followed by an ns-plain-safe(c) */ )\nfunction isPlainSafe(c, prev, inblock) {\n var cIsNsCharOrWhitespace = isNsCharOrWhitespace(c);\n var cIsNsChar = cIsNsCharOrWhitespace && !isWhitespace(c);\n return (\n // ns-plain-safe\n inblock ? // c = flow-in\n cIsNsCharOrWhitespace\n : cIsNsCharOrWhitespace\n // - c-flow-indicator\n && c !== CHAR_COMMA\n && c !== CHAR_LEFT_SQUARE_BRACKET\n && c !== CHAR_RIGHT_SQUARE_BRACKET\n && c !== CHAR_LEFT_CURLY_BRACKET\n && c !== CHAR_RIGHT_CURLY_BRACKET\n )\n // ns-plain-char\n && c !== CHAR_SHARP // false on '#'\n && !(prev === CHAR_COLON && !cIsNsChar) // false on ': '\n || (isNsCharOrWhitespace(prev) && !isWhitespace(prev) && c === CHAR_SHARP) // change to true on '[^ ]#'\n || (prev === CHAR_COLON && cIsNsChar); // change to true on ':[^ ]'\n}\n\n// Simplified test for values allowed as the first character in plain style.\nfunction isPlainSafeFirst(c) {\n // Uses a subset of ns-char - c-indicator\n // where ns-char = nb-char - s-white.\n // No support of ( ( \u201C?\u201D | \u201C:\u201D | \u201C-\u201D ) /* Followed by an ns-plain-safe(c)) */ ) part\n return isPrintable(c) && c !== CHAR_BOM\n && !isWhitespace(c) // - s-white\n // - (c-indicator ::=\n // \u201C-\u201D | \u201C?\u201D | \u201C:\u201D | \u201C,\u201D | \u201C[\u201D | \u201C]\u201D | \u201C{\u201D | \u201C}\u201D\n && c !== CHAR_MINUS\n && c !== CHAR_QUESTION\n && c !== CHAR_COLON\n && c !== CHAR_COMMA\n && c !== CHAR_LEFT_SQUARE_BRACKET\n && c !== CHAR_RIGHT_SQUARE_BRACKET\n && c !== CHAR_LEFT_CURLY_BRACKET\n && c !== CHAR_RIGHT_CURLY_BRACKET\n // | \u201C#\u201D | \u201C&\u201D | \u201C*\u201D | \u201C!\u201D | \u201C|\u201D | \u201C=\u201D | \u201C>\u201D | \u201C'\u201D | \u201C\"\u201D\n && c !== CHAR_SHARP\n && c !== CHAR_AMPERSAND\n && c !== CHAR_ASTERISK\n && c !== CHAR_EXCLAMATION\n && c !== CHAR_VERTICAL_LINE\n && c !== CHAR_EQUALS\n && c !== CHAR_GREATER_THAN\n && c !== CHAR_SINGLE_QUOTE\n && c !== CHAR_DOUBLE_QUOTE\n // | \u201C%\u201D | \u201C@\u201D | \u201C`\u201D)\n && c !== CHAR_PERCENT\n && c !== CHAR_COMMERCIAL_AT\n && c !== CHAR_GRAVE_ACCENT;\n}\n\n// Simplified test for values allowed as the last character in plain style.\nfunction isPlainSafeLast(c) {\n // just not whitespace or colon, it will be checked to be plain character later\n return !isWhitespace(c) && c !== CHAR_COLON;\n}\n\n// Same as 'string'.codePointAt(pos), but works in older browsers.\nfunction codePointAt(string, pos) {\n var first = string.charCodeAt(pos), second;\n if (first >= 0xD800 && first <= 0xDBFF && pos + 1 < string.length) {\n second = string.charCodeAt(pos + 1);\n if (second >= 0xDC00 && second <= 0xDFFF) {\n // https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae\n return (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000;\n }\n }\n return first;\n}\n\n// Determines whether block indentation indicator is required.\nfunction needIndentIndicator(string) {\n var leadingSpaceRe = /^\\n* /;\n return leadingSpaceRe.test(string);\n}\n\nvar STYLE_PLAIN = 1,\n STYLE_SINGLE = 2,\n STYLE_LITERAL = 3,\n STYLE_FOLDED = 4,\n STYLE_DOUBLE = 5;\n\n// Determines which scalar styles are possible and returns the preferred style.\n// lineWidth = -1 => no limit.\n// Pre-conditions: str.length > 0.\n// Post-conditions:\n// STYLE_PLAIN or STYLE_SINGLE => no \\n are in the string.\n// STYLE_LITERAL => no lines are suitable for folding (or lineWidth is -1).\n// STYLE_FOLDED => a line > lineWidth and can be folded (and lineWidth != -1).\nfunction chooseScalarStyle(string, singleLineOnly, indentPerLevel, lineWidth,\n testAmbiguousType, quotingType, forceQuotes, inblock) {\n\n var i;\n var char = 0;\n var prevChar = null;\n var hasLineBreak = false;\n var hasFoldableLine = false; // only checked if shouldTrackWidth\n var shouldTrackWidth = lineWidth !== -1;\n var previousLineBreak = -1; // count the first line correctly\n var plain = isPlainSafeFirst(codePointAt(string, 0))\n && isPlainSafeLast(codePointAt(string, string.length - 1));\n\n if (singleLineOnly || forceQuotes) {\n // Case: no block styles.\n // Check for disallowed characters to rule out plain and single.\n for (i = 0; i < string.length; char >= 0x10000 ? i += 2 : i++) {\n char = codePointAt(string, i);\n if (!isPrintable(char)) {\n return STYLE_DOUBLE;\n }\n plain = plain && isPlainSafe(char, prevChar, inblock);\n prevChar = char;\n }\n } else {\n // Case: block styles permitted.\n for (i = 0; i < string.length; char >= 0x10000 ? i += 2 : i++) {\n char = codePointAt(string, i);\n if (char === CHAR_LINE_FEED) {\n hasLineBreak = true;\n // Check if any line can be folded.\n if (shouldTrackWidth) {\n hasFoldableLine = hasFoldableLine ||\n // Foldable line = too long, and not more-indented.\n (i - previousLineBreak - 1 > lineWidth &&\n string[previousLineBreak + 1] !== ' ');\n previousLineBreak = i;\n }\n } else if (!isPrintable(char)) {\n return STYLE_DOUBLE;\n }\n plain = plain && isPlainSafe(char, prevChar, inblock);\n prevChar = char;\n }\n // in case the end is missing a \\n\n hasFoldableLine = hasFoldableLine || (shouldTrackWidth &&\n (i - previousLineBreak - 1 > lineWidth &&\n string[previousLineBreak + 1] !== ' '));\n }\n // Although every style can represent \\n without escaping, prefer block styles\n // for multiline, since they're more readable and they don't add empty lines.\n // Also prefer folding a super-long line.\n if (!hasLineBreak && !hasFoldableLine) {\n // Strings interpretable as another type have to be quoted;\n // e.g. the string 'true' vs. the boolean true.\n if (plain && !forceQuotes && !testAmbiguousType(string)) {\n return STYLE_PLAIN;\n }\n return quotingType === QUOTING_TYPE_DOUBLE ? STYLE_DOUBLE : STYLE_SINGLE;\n }\n // Edge case: block indentation indicator can only have one digit.\n if (indentPerLevel > 9 && needIndentIndicator(string)) {\n return STYLE_DOUBLE;\n }\n // At this point we know block styles are valid.\n // Prefer literal style unless we want to fold.\n if (!forceQuotes) {\n return hasFoldableLine ? STYLE_FOLDED : STYLE_LITERAL;\n }\n return quotingType === QUOTING_TYPE_DOUBLE ? STYLE_DOUBLE : STYLE_SINGLE;\n}\n\n// Note: line breaking/folding is implemented for only the folded style.\n// NB. We drop the last trailing newline (if any) of a returned block scalar\n// since the dumper adds its own newline. This always works:\n// \u2022 No ending newline => unaffected; already using strip \"-\" chomping.\n// \u2022 Ending newline => removed then restored.\n// Importantly, this keeps the \"+\" chomp indicator from gaining an extra line.\nfunction writeScalar(state, string, level, iskey, inblock) {\n state.dump = (function () {\n if (string.length === 0) {\n return state.quotingType === QUOTING_TYPE_DOUBLE ? '\"\"' : \"''\";\n }\n if (!state.noCompatMode) {\n if (DEPRECATED_BOOLEANS_SYNTAX.indexOf(string) !== -1 || DEPRECATED_BASE60_SYNTAX.test(string)) {\n return state.quotingType === QUOTING_TYPE_DOUBLE ? ('\"' + string + '\"') : (\"'\" + string + \"'\");\n }\n }\n\n var indent = state.indent * Math.max(1, level); // no 0-indent scalars\n // As indentation gets deeper, let the width decrease monotonically\n // to the lower bound min(state.lineWidth, 40).\n // Note that this implies\n // state.lineWidth \u2264 40 + state.indent: width is fixed at the lower bound.\n // state.lineWidth > 40 + state.indent: width decreases until the lower bound.\n // This behaves better than a constant minimum width which disallows narrower options,\n // or an indent threshold which causes the width to suddenly increase.\n var lineWidth = state.lineWidth === -1\n ? -1 : Math.max(Math.min(state.lineWidth, 40), state.lineWidth - indent);\n\n // Without knowing if keys are implicit/explicit, assume implicit for safety.\n var singleLineOnly = iskey\n // No block styles in flow mode.\n || (state.flowLevel > -1 && level >= state.flowLevel);\n function testAmbiguity(string) {\n return testImplicitResolving(state, string);\n }\n\n switch (chooseScalarStyle(string, singleLineOnly, state.indent, lineWidth,\n testAmbiguity, state.quotingType, state.forceQuotes && !iskey, inblock)) {\n\n case STYLE_PLAIN:\n return string;\n case STYLE_SINGLE:\n return \"'\" + string.replace(/'/g, \"''\") + \"'\";\n case STYLE_LITERAL:\n return '|' + blockHeader(string, state.indent)\n + dropEndingNewline(indentString(string, indent));\n case STYLE_FOLDED:\n return '>' + blockHeader(string, state.indent)\n + dropEndingNewline(indentString(foldString(string, lineWidth), indent));\n case STYLE_DOUBLE:\n return '\"' + escapeString(string) + '\"';\n default:\n throw new exception('impossible error: invalid scalar style');\n }\n }());\n}\n\n// Pre-conditions: string is valid for a block scalar, 1 <= indentPerLevel <= 9.\nfunction blockHeader(string, indentPerLevel) {\n var indentIndicator = needIndentIndicator(string) ? String(indentPerLevel) : '';\n\n // note the special case: the string '\\n' counts as a \"trailing\" empty line.\n var clip = string[string.length - 1] === '\\n';\n var keep = clip && (string[string.length - 2] === '\\n' || string === '\\n');\n var chomp = keep ? '+' : (clip ? '' : '-');\n\n return indentIndicator + chomp + '\\n';\n}\n\n// (See the note for writeScalar.)\nfunction dropEndingNewline(string) {\n return string[string.length - 1] === '\\n' ? string.slice(0, -1) : string;\n}\n\n// Note: a long line without a suitable break point will exceed the width limit.\n// Pre-conditions: every char in str isPrintable, str.length > 0, width > 0.\nfunction foldString(string, width) {\n // In folded style, $k$ consecutive newlines output as $k+1$ newlines\u2014\n // unless they're before or after a more-indented line, or at the very\n // beginning or end, in which case $k$ maps to $k$.\n // Therefore, parse each chunk as newline(s) followed by a content line.\n var lineRe = /(\\n+)([^\\n]*)/g;\n\n // first line (possibly an empty line)\n var result = (function () {\n var nextLF = string.indexOf('\\n');\n nextLF = nextLF !== -1 ? nextLF : string.length;\n lineRe.lastIndex = nextLF;\n return foldLine(string.slice(0, nextLF), width);\n }());\n // If we haven't reached the first content line yet, don't add an extra \\n.\n var prevMoreIndented = string[0] === '\\n' || string[0] === ' ';\n var moreIndented;\n\n // rest of the lines\n var match;\n while ((match = lineRe.exec(string))) {\n var prefix = match[1], line = match[2];\n moreIndented = (line[0] === ' ');\n result += prefix\n + (!prevMoreIndented && !moreIndented && line !== ''\n ? '\\n' : '')\n + foldLine(line, width);\n prevMoreIndented = moreIndented;\n }\n\n return result;\n}\n\n// Greedy line breaking.\n// Picks the longest line under the limit each time,\n// otherwise settles for the shortest line over the limit.\n// NB. More-indented lines *cannot* be folded, as that would add an extra \\n.\nfunction foldLine(line, width) {\n if (line === '' || line[0] === ' ') return line;\n\n // Since a more-indented line adds a \\n, breaks can't be followed by a space.\n var breakRe = / [^ ]/g; // note: the match index will always be <= length-2.\n var match;\n // start is an inclusive index. end, curr, and next are exclusive.\n var start = 0, end, curr = 0, next = 0;\n var result = '';\n\n // Invariants: 0 <= start <= length-1.\n // 0 <= curr <= next <= max(0, length-2). curr - start <= width.\n // Inside the loop:\n // A match implies length >= 2, so curr and next are <= length-2.\n while ((match = breakRe.exec(line))) {\n next = match.index;\n // maintain invariant: curr - start <= width\n if (next - start > width) {\n end = (curr > start) ? curr : next; // derive end <= length-2\n result += '\\n' + line.slice(start, end);\n // skip the space that was output as \\n\n start = end + 1; // derive start <= length-1\n }\n curr = next;\n }\n\n // By the invariants, start <= length-1, so there is something left over.\n // It is either the whole string or a part starting from non-whitespace.\n result += '\\n';\n // Insert a break if the remainder is too long and there is a break available.\n if (line.length - start > width && curr > start) {\n result += line.slice(start, curr) + '\\n' + line.slice(curr + 1);\n } else {\n result += line.slice(start);\n }\n\n return result.slice(1); // drop extra \\n joiner\n}\n\n// Escapes a double-quoted string.\nfunction escapeString(string) {\n var result = '';\n var char = 0;\n var escapeSeq;\n\n for (var i = 0; i < string.length; char >= 0x10000 ? i += 2 : i++) {\n char = codePointAt(string, i);\n escapeSeq = ESCAPE_SEQUENCES[char];\n\n if (!escapeSeq && isPrintable(char)) {\n result += string[i];\n if (char >= 0x10000) result += string[i + 1];\n } else {\n result += escapeSeq || encodeHex(char);\n }\n }\n\n return result;\n}\n\nfunction writeFlowSequence(state, level, object) {\n var _result = '',\n _tag = state.tag,\n index,\n length,\n value;\n\n for (index = 0, length = object.length; index < length; index += 1) {\n value = object[index];\n\n if (state.replacer) {\n value = state.replacer.call(object, String(index), value);\n }\n\n // Write only valid elements, put null instead of invalid elements.\n if (writeNode(state, level, value, false, false) ||\n (typeof value === 'undefined' &&\n writeNode(state, level, null, false, false))) {\n\n if (_result !== '') _result += ',' + (!state.condenseFlow ? ' ' : '');\n _result += state.dump;\n }\n }\n\n state.tag = _tag;\n state.dump = '[' + _result + ']';\n}\n\nfunction writeBlockSequence(state, level, object, compact) {\n var _result = '',\n _tag = state.tag,\n index,\n length,\n value;\n\n for (index = 0, length = object.length; index < length; index += 1) {\n value = object[index];\n\n if (state.replacer) {\n value = state.replacer.call(object, String(index), value);\n }\n\n // Write only valid elements, put null instead of invalid elements.\n if (writeNode(state, level + 1, value, true, true, false, true) ||\n (typeof value === 'undefined' &&\n writeNode(state, level + 1, null, true, true, false, true))) {\n\n if (!compact || _result !== '') {\n _result += generateNextLine(state, level);\n }\n\n if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) {\n _result += '-';\n } else {\n _result += '- ';\n }\n\n _result += state.dump;\n }\n }\n\n state.tag = _tag;\n state.dump = _result || '[]'; // Empty sequence if no valid values.\n}\n\nfunction writeFlowMapping(state, level, object) {\n var _result = '',\n _tag = state.tag,\n objectKeyList = Object.keys(object),\n index,\n length,\n objectKey,\n objectValue,\n pairBuffer;\n\n for (index = 0, length = objectKeyList.length; index < length; index += 1) {\n\n pairBuffer = '';\n if (_result !== '') pairBuffer += ', ';\n\n if (state.condenseFlow) pairBuffer += '\"';\n\n objectKey = objectKeyList[index];\n objectValue = object[objectKey];\n\n if (state.replacer) {\n objectValue = state.replacer.call(object, objectKey, objectValue);\n }\n\n if (!writeNode(state, level, objectKey, false, false)) {\n continue; // Skip this pair because of invalid key;\n }\n\n if (state.dump.length > 1024) pairBuffer += '? ';\n\n pairBuffer += state.dump + (state.condenseFlow ? '\"' : '') + ':' + (state.condenseFlow ? '' : ' ');\n\n if (!writeNode(state, level, objectValue, false, false)) {\n continue; // Skip this pair because of invalid value.\n }\n\n pairBuffer += state.dump;\n\n // Both key and value are valid.\n _result += pairBuffer;\n }\n\n state.tag = _tag;\n state.dump = '{' + _result + '}';\n}\n\nfunction writeBlockMapping(state, level, object, compact) {\n var _result = '',\n _tag = state.tag,\n objectKeyList = Object.keys(object),\n index,\n length,\n objectKey,\n objectValue,\n explicitPair,\n pairBuffer;\n\n // Allow sorting keys so that the output file is deterministic\n if (state.sortKeys === true) {\n // Default sorting\n objectKeyList.sort();\n } else if (typeof state.sortKeys === 'function') {\n // Custom sort function\n objectKeyList.sort(state.sortKeys);\n } else if (state.sortKeys) {\n // Something is wrong\n throw new exception('sortKeys must be a boolean or a function');\n }\n\n for (index = 0, length = objectKeyList.length; index < length; index += 1) {\n pairBuffer = '';\n\n if (!compact || _result !== '') {\n pairBuffer += generateNextLine(state, level);\n }\n\n objectKey = objectKeyList[index];\n objectValue = object[objectKey];\n\n if (state.replacer) {\n objectValue = state.replacer.call(object, objectKey, objectValue);\n }\n\n if (!writeNode(state, level + 1, objectKey, true, true, true)) {\n continue; // Skip this pair because of invalid key.\n }\n\n explicitPair = (state.tag !== null && state.tag !== '?') ||\n (state.dump && state.dump.length > 1024);\n\n if (explicitPair) {\n if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) {\n pairBuffer += '?';\n } else {\n pairBuffer += '? ';\n }\n }\n\n pairBuffer += state.dump;\n\n if (explicitPair) {\n pairBuffer += generateNextLine(state, level);\n }\n\n if (!writeNode(state, level + 1, objectValue, true, explicitPair)) {\n continue; // Skip this pair because of invalid value.\n }\n\n if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) {\n pairBuffer += ':';\n } else {\n pairBuffer += ': ';\n }\n\n pairBuffer += state.dump;\n\n // Both key and value are valid.\n _result += pairBuffer;\n }\n\n state.tag = _tag;\n state.dump = _result || '{}'; // Empty mapping if no valid pairs.\n}\n\nfunction detectType(state, object, explicit) {\n var _result, typeList, index, length, type, style;\n\n typeList = explicit ? state.explicitTypes : state.implicitTypes;\n\n for (index = 0, length = typeList.length; index < length; index += 1) {\n type = typeList[index];\n\n if ((type.instanceOf || type.predicate) &&\n (!type.instanceOf || ((typeof object === 'object') && (object instanceof type.instanceOf))) &&\n (!type.predicate || type.predicate(object))) {\n\n if (explicit) {\n if (type.multi && type.representName) {\n state.tag = type.representName(object);\n } else {\n state.tag = type.tag;\n }\n } else {\n state.tag = '?';\n }\n\n if (type.represent) {\n style = state.styleMap[type.tag] || type.defaultStyle;\n\n if (_toString.call(type.represent) === '[object Function]') {\n _result = type.represent(object, style);\n } else if (_hasOwnProperty.call(type.represent, style)) {\n _result = type.represent[style](object, style);\n } else {\n throw new exception('!<' + type.tag + '> tag resolver accepts not \"' + style + '\" style');\n }\n\n state.dump = _result;\n }\n\n return true;\n }\n }\n\n return false;\n}\n\n// Serializes `object` and writes it to global `result`.\n// Returns true on success, or false on invalid object.\n//\nfunction writeNode(state, level, object, block, compact, iskey, isblockseq) {\n state.tag = null;\n state.dump = object;\n\n if (!detectType(state, object, false)) {\n detectType(state, object, true);\n }\n\n var type = _toString.call(state.dump);\n var inblock = block;\n var tagStr;\n\n if (block) {\n block = (state.flowLevel < 0 || state.flowLevel > level);\n }\n\n var objectOrArray = type === '[object Object]' || type === '[object Array]',\n duplicateIndex,\n duplicate;\n\n if (objectOrArray) {\n duplicateIndex = state.duplicates.indexOf(object);\n duplicate = duplicateIndex !== -1;\n }\n\n if ((state.tag !== null && state.tag !== '?') || duplicate || (state.indent !== 2 && level > 0)) {\n compact = false;\n }\n\n if (duplicate && state.usedDuplicates[duplicateIndex]) {\n state.dump = '*ref_' + duplicateIndex;\n } else {\n if (objectOrArray && duplicate && !state.usedDuplicates[duplicateIndex]) {\n state.usedDuplicates[duplicateIndex] = true;\n }\n if (type === '[object Object]') {\n if (block && (Object.keys(state.dump).length !== 0)) {\n writeBlockMapping(state, level, state.dump, compact);\n if (duplicate) {\n state.dump = '&ref_' + duplicateIndex + state.dump;\n }\n } else {\n writeFlowMapping(state, level, state.dump);\n if (duplicate) {\n state.dump = '&ref_' + duplicateIndex + ' ' + state.dump;\n }\n }\n } else if (type === '[object Array]') {\n if (block && (state.dump.length !== 0)) {\n if (state.noArrayIndent && !isblockseq && level > 0) {\n writeBlockSequence(state, level - 1, state.dump, compact);\n } else {\n writeBlockSequence(state, level, state.dump, compact);\n }\n if (duplicate) {\n state.dump = '&ref_' + duplicateIndex + state.dump;\n }\n } else {\n writeFlowSequence(state, level, state.dump);\n if (duplicate) {\n state.dump = '&ref_' + duplicateIndex + ' ' + state.dump;\n }\n }\n } else if (type === '[object String]') {\n if (state.tag !== '?') {\n writeScalar(state, state.dump, level, iskey, inblock);\n }\n } else if (type === '[object Undefined]') {\n return false;\n } else {\n if (state.skipInvalid) return false;\n throw new exception('unacceptable kind of an object to dump ' + type);\n }\n\n if (state.tag !== null && state.tag !== '?') {\n // Need to encode all characters except those allowed by the spec:\n //\n // [35] ns-dec-digit ::= [#x30-#x39] /* 0-9 */\n // [36] ns-hex-digit ::= ns-dec-digit\n // | [#x41-#x46] /* A-F */ | [#x61-#x66] /* a-f */\n // [37] ns-ascii-letter ::= [#x41-#x5A] /* A-Z */ | [#x61-#x7A] /* a-z */\n // [38] ns-word-char ::= ns-dec-digit | ns-ascii-letter | \u201C-\u201D\n // [39] ns-uri-char ::= \u201C%\u201D ns-hex-digit ns-hex-digit | ns-word-char | \u201C#\u201D\n // | \u201C;\u201D | \u201C/\u201D | \u201C?\u201D | \u201C:\u201D | \u201C@\u201D | \u201C&\u201D | \u201C=\u201D | \u201C+\u201D | \u201C$\u201D | \u201C,\u201D\n // | \u201C_\u201D | \u201C.\u201D | \u201C!\u201D | \u201C~\u201D | \u201C*\u201D | \u201C'\u201D | \u201C(\u201D | \u201C)\u201D | \u201C[\u201D | \u201C]\u201D\n //\n // Also need to encode '!' because it has special meaning (end of tag prefix).\n //\n tagStr = encodeURI(\n state.tag[0] === '!' ? state.tag.slice(1) : state.tag\n ).replace(/!/g, '%21');\n\n if (state.tag[0] === '!') {\n tagStr = '!' + tagStr;\n } else if (tagStr.slice(0, 18) === 'tag:yaml.org,2002:') {\n tagStr = '!!' + tagStr.slice(18);\n } else {\n tagStr = '!<' + tagStr + '>';\n }\n\n state.dump = tagStr + ' ' + state.dump;\n }\n }\n\n return true;\n}\n\nfunction getDuplicateReferences(object, state) {\n var objects = [],\n duplicatesIndexes = [],\n index,\n length;\n\n inspectNode(object, objects, duplicatesIndexes);\n\n for (index = 0, length = duplicatesIndexes.length; index < length; index += 1) {\n state.duplicates.push(objects[duplicatesIndexes[index]]);\n }\n state.usedDuplicates = new Array(length);\n}\n\nfunction inspectNode(object, objects, duplicatesIndexes) {\n var objectKeyList,\n index,\n length;\n\n if (object !== null && typeof object === 'object') {\n index = objects.indexOf(object);\n if (index !== -1) {\n if (duplicatesIndexes.indexOf(index) === -1) {\n duplicatesIndexes.push(index);\n }\n } else {\n objects.push(object);\n\n if (Array.isArray(object)) {\n for (index = 0, length = object.length; index < length; index += 1) {\n inspectNode(object[index], objects, duplicatesIndexes);\n }\n } else {\n objectKeyList = Object.keys(object);\n\n for (index = 0, length = objectKeyList.length; index < length; index += 1) {\n inspectNode(object[objectKeyList[index]], objects, duplicatesIndexes);\n }\n }\n }\n }\n}\n\nfunction dump$1(input, options) {\n options = options || {};\n\n var state = new State(options);\n\n if (!state.noRefs) getDuplicateReferences(input, state);\n\n var value = input;\n\n if (state.replacer) {\n value = state.replacer.call({ '': value }, '', value);\n }\n\n if (writeNode(state, 0, value, true, true)) return state.dump + '\\n';\n\n return '';\n}\n\nvar dump_1 = dump$1;\n\nvar dumper = {\n\tdump: dump_1\n};\n\nfunction renamed(from, to) {\n return function () {\n throw new Error('Function yaml.' + from + ' is removed in js-yaml 4. ' +\n 'Use yaml.' + to + ' instead, which is now safe by default.');\n };\n}\n\n\nvar Type = type;\nvar Schema = schema;\nvar FAILSAFE_SCHEMA = failsafe;\nvar JSON_SCHEMA = json;\nvar CORE_SCHEMA = core;\nvar DEFAULT_SCHEMA = _default;\nvar load = loader.load;\nvar loadAll = loader.loadAll;\nvar dump = dumper.dump;\nvar YAMLException = exception;\n\n// Re-export all types in case user wants to create custom schema\nvar types = {\n binary: binary,\n float: float,\n map: map,\n null: _null,\n pairs: pairs,\n set: set,\n timestamp: timestamp,\n bool: bool,\n int: int,\n merge: merge,\n omap: omap,\n seq: seq,\n str: str\n};\n\n// Removed functions from JS-YAML 3.0.x\nvar safeLoad = renamed('safeLoad', 'load');\nvar safeLoadAll = renamed('safeLoadAll', 'loadAll');\nvar safeDump = renamed('safeDump', 'dump');\n\nvar jsYaml = {\n\tType: Type,\n\tSchema: Schema,\n\tFAILSAFE_SCHEMA: FAILSAFE_SCHEMA,\n\tJSON_SCHEMA: JSON_SCHEMA,\n\tCORE_SCHEMA: CORE_SCHEMA,\n\tDEFAULT_SCHEMA: DEFAULT_SCHEMA,\n\tload: load,\n\tloadAll: loadAll,\n\tdump: dump,\n\tYAMLException: YAMLException,\n\ttypes: types,\n\tsafeLoad: safeLoad,\n\tsafeLoadAll: safeLoadAll,\n\tsafeDump: safeDump\n};\n\nexport { CORE_SCHEMA, DEFAULT_SCHEMA, FAILSAFE_SCHEMA, JSON_SCHEMA, Schema, Type, YAMLException, jsYaml as default, dump, load, loadAll, safeDump, safeLoad, safeLoadAll, types };\n", "/**\n * Init command - Initialize a .principal-views folder with template files and linting setup\n */\n\nimport { Command } from 'commander';\nimport { existsSync, mkdirSync, writeFileSync, readFileSync, chmodSync } from 'node:fs';\nimport { join } from 'node:path';\nimport { execSync } from 'node:child_process';\nimport chalk from 'chalk';\nimport type { ExtendedCanvas, ComponentLibrary } from '@principal-ai/principal-view-core';\n\nconst TEMPLATE_LIBRARY: ComponentLibrary = {\n version: '1.0.0',\n name: 'Component Library',\n nodeComponents: {},\n edgeComponents: {},\n};\n\nconst TEMPLATE_CANVAS: ExtendedCanvas = {\n nodes: [],\n edges: [],\n};\n\nconst TEMPLATE_PRIVURC = `# Principal View Configuration Lint Rules\n# See: https://github.com/principal-ai/principal-view\n\n# File patterns to include\ninclude:\n - \".principal-views/**/*.yaml\"\n - \".principal-views/**/*.yml\"\n - \".principal-views/**/*.json\"\n\n# File patterns to exclude\nexclude:\n - \"**/node_modules/**\"\n - \".principal-views/library.yaml\"\n\n# Path to component library (optional)\nlibrary: \".principal-views/library.yaml\"\n\n# Rule configuration\n# Severity: \"off\" | \"warn\" | \"error\" (or 0 | 1 | 2)\nrules:\n # Schema rules - validate structure\n no-unknown-fields: error\n required-metadata: error\n valid-node-types: error\n valid-edge-types: error\n valid-color-format: error\n\n # Reference rules - check cross-references\n connection-type-references: error\n state-transition-references: error\n\n # Structure rules - ensure completeness\n minimum-node-sources:\n - error\n - minimum: 1\n excludeNodeTypes: []\n orphaned-node-types: error\n orphaned-edge-types: error\n unreachable-states: error\n dead-end-states:\n - error\n - allowTerminalStates: true\n\n # Pattern rules - validate regex patterns\n valid-action-patterns:\n - error\n - strictMode: false\n\n # Library rules - check against component library\n library-node-type-match:\n - error\n - requireLibraryMatch: false\n`;\n\nconst HUSKY_PRE_COMMIT = `#!/usr/bin/env sh\n. \"$(dirname -- \"$0\")/_/husky.sh\"\n\n# Run principal view linting on staged .principal-views files\nprivu lint --quiet\n`;\n\n/**\n * Check if a command exists in PATH\n */\nfunction commandExists(cmd: string): boolean {\n try {\n execSync(`which ${cmd}`, { stdio: 'ignore' });\n return true;\n } catch {\n return false;\n }\n}\n\n/**\n * Check if we're in a git repository\n */\nfunction isGitRepo(): boolean {\n try {\n execSync('git rev-parse --is-inside-work-tree', { stdio: 'ignore' });\n return true;\n } catch {\n return false;\n }\n}\n\n/**\n * Get the git root directory\n */\nfunction getGitRoot(): string | null {\n try {\n return execSync('git rev-parse --show-toplevel', { encoding: 'utf8' }).trim();\n } catch {\n return null;\n }\n}\n\n/**\n * Check if husky is already installed\n */\nfunction isHuskyInstalled(gitRoot: string): boolean {\n return existsSync(join(gitRoot, '.husky'));\n}\n\n/**\n * Detect package manager\n */\nfunction detectPackageManager(): 'npm' | 'yarn' | 'pnpm' | 'bun' {\n if (existsSync('bun.lockb')) return 'bun';\n if (existsSync('pnpm-lock.yaml')) return 'pnpm';\n if (existsSync('yarn.lock')) return 'yarn';\n return 'npm';\n}\n\nexport function createInitCommand(): Command {\n const command = new Command('init');\n\n command\n .description('Initialize a .principal-views folder with template files and linting setup')\n .option('-f, --force', 'Overwrite existing files')\n .option('-n, --name <name>', 'Name for the canvas file', 'architecture')\n .option('--no-husky', 'Skip Husky pre-commit hook setup')\n .option('--no-lint-config', 'Skip .privurc.yaml creation')\n .action(async (options) => {\n try {\n const cwd = process.cwd();\n const principalViewsDir = join(cwd, '.principal-views');\n const canvasFile = join(principalViewsDir, `${options.name}.canvas`);\n const libraryFile = join(principalViewsDir, 'library.yaml');\n const privurcFile = join(cwd, '.privurc.yaml');\n\n // Check if .principal-views directory exists\n if (!existsSync(principalViewsDir)) {\n mkdirSync(principalViewsDir, { recursive: true });\n console.log(chalk.green(`Created directory: .principal-views/`));\n }\n\n // Create canvas file\n if (existsSync(canvasFile) && !options.force) {\n console.log(chalk.yellow(`Canvas file already exists: .principal-views/${options.name}.canvas`));\n } else {\n writeFileSync(canvasFile, JSON.stringify(TEMPLATE_CANVAS, null, 2));\n console.log(chalk.green(`Created canvas file: .principal-views/${options.name}.canvas`));\n }\n\n // Create library file\n if (existsSync(libraryFile) && !options.force) {\n console.log(chalk.yellow(`Library file already exists: .principal-views/library.yaml`));\n } else {\n const libraryYaml = `version: \"1.0.0\"\nname: \"Component Library\"\n\nnodeComponents: {}\n\nedgeComponents: {}\n`;\n writeFileSync(libraryFile, libraryYaml);\n console.log(chalk.green(`Created library file: .principal-views/library.yaml`));\n }\n\n // Create .privurc.yaml config file\n if (options.lintConfig !== false) {\n if (existsSync(privurcFile) && !options.force) {\n console.log(chalk.yellow(`Config file already exists: .privurc.yaml`));\n } else {\n writeFileSync(privurcFile, TEMPLATE_PRIVURC);\n console.log(chalk.green(`Created lint config: .privurc.yaml`));\n }\n }\n\n // Set up Husky pre-commit hook\n let huskySetup = false;\n if (options.husky !== false) {\n if (!isGitRepo()) {\n console.log(chalk.yellow(`Skipping Husky setup: not a git repository`));\n } else {\n const gitRoot = getGitRoot();\n if (!gitRoot) {\n console.log(chalk.yellow(`Skipping Husky setup: could not find git root`));\n } else {\n const huskyDir = join(gitRoot, '.husky');\n const preCommitFile = join(huskyDir, 'pre-commit');\n\n if (isHuskyInstalled(gitRoot)) {\n // Husky is already installed, just add/update pre-commit hook\n if (existsSync(preCommitFile)) {\n // Check if our hook is already in the file\n const existingContent = readFileSync(preCommitFile, 'utf8');\n if (existingContent.includes('privu lint')) {\n console.log(chalk.yellow(`Husky pre-commit hook already includes privu lint`));\n } else {\n // Append our lint command to existing pre-commit\n const updatedContent = existingContent.trimEnd() + '\\n\\n# Run principal view linting\\nprivu lint --quiet\\n';\n writeFileSync(preCommitFile, updatedContent);\n console.log(chalk.green(`Updated Husky pre-commit hook with privu lint`));\n huskySetup = true;\n }\n } else {\n // Create new pre-commit hook\n writeFileSync(preCommitFile, HUSKY_PRE_COMMIT);\n chmodSync(preCommitFile, '755');\n console.log(chalk.green(`Created Husky pre-commit hook`));\n huskySetup = true;\n }\n } else {\n // Husky is not installed, try to install it\n const pm = detectPackageManager();\n const packageJsonPath = join(gitRoot, 'package.json');\n\n if (!existsSync(packageJsonPath)) {\n console.log(chalk.yellow(`Skipping Husky setup: no package.json found`));\n } else {\n console.log(chalk.dim(`Installing Husky...`));\n\n try {\n // Install husky as dev dependency\n const installCmd = {\n npm: 'npm install --save-dev husky',\n yarn: 'yarn add --dev husky',\n pnpm: 'pnpm add --save-dev husky',\n bun: 'bun add --dev husky',\n }[pm];\n\n execSync(installCmd, { stdio: 'inherit', cwd: gitRoot });\n\n // Initialize husky\n execSync('npx husky init', { stdio: 'inherit', cwd: gitRoot });\n\n // Write our pre-commit hook\n writeFileSync(preCommitFile, HUSKY_PRE_COMMIT);\n chmodSync(preCommitFile, '755');\n console.log(chalk.green(`Installed Husky and created pre-commit hook`));\n huskySetup = true;\n } catch (installError) {\n console.log(chalk.yellow(`Could not install Husky automatically: ${(installError as Error).message}`));\n console.log(chalk.dim(` You can install it manually: ${pm} add --dev husky && npx husky init`));\n }\n }\n }\n }\n }\n }\n\n console.log('');\n console.log(chalk.bold('Setup complete!'));\n console.log('');\n console.log(chalk.bold('Files created:'));\n console.log(` \u2022 ${chalk.cyan('.principal-views/library.yaml')} - Component library definitions`);\n console.log(` \u2022 ${chalk.cyan(`.principal-views/${options.name}.canvas`)} - Graph canvas file`);\n if (options.lintConfig !== false) {\n console.log(` \u2022 ${chalk.cyan('.privurc.yaml')} - Lint configuration`);\n }\n if (huskySetup) {\n console.log(` \u2022 ${chalk.cyan('.husky/pre-commit')} - Pre-commit hook`);\n }\n\n console.log('');\n console.log(chalk.bold('Next steps:'));\n console.log(` 1. Define components in ${chalk.cyan('.principal-views/library.yaml')}`);\n console.log(` 2. Build your graph in ${chalk.cyan(`.principal-views/${options.name}.canvas`)}`);\n console.log(` 3. Run ${chalk.cyan('privu lint')} to validate your configuration`);\n if (huskySetup) {\n console.log(` 4. Commits will now automatically lint .principal-views files`);\n }\n\n console.log('');\n console.log(chalk.bold('Commands:'));\n console.log(` \u2022 ${chalk.cyan('privu lint')} - Lint configuration files`);\n console.log(` \u2022 ${chalk.cyan('privu lint --json')} - Output lint results as JSON`);\n console.log(` \u2022 ${chalk.cyan('privu validate')} - Validate canvas files`);\n console.log(` \u2022 ${chalk.cyan('privu doctor')} - Check project setup`);\n } catch (error) {\n console.error(chalk.red('Error:'), (error as Error).message);\n process.exit(1);\n }\n });\n\n return command;\n}\n", "/**\n * List command - List all .canvas files in a project\n */\n\nimport { Command } from 'commander';\nimport { existsSync, readFileSync, statSync } from 'node:fs';\nimport { resolve, relative } from 'node:path';\nimport chalk from 'chalk';\nimport { globby } from 'globby';\n\ninterface CanvasInfo {\n file: string;\n name: string;\n version?: string;\n nodeCount: number;\n edgeCount: number;\n modified: Date;\n}\n\nfunction getCanvasInfo(filePath: string): CanvasInfo | null {\n try {\n const absolutePath = resolve(filePath);\n const content = readFileSync(absolutePath, 'utf8');\n const canvas = JSON.parse(content);\n const stats = statSync(absolutePath);\n\n return {\n file: relative(process.cwd(), absolutePath),\n name: canvas.pv?.name || 'Untitled',\n version: canvas.pv?.version,\n nodeCount: Array.isArray(canvas.nodes) ? canvas.nodes.length : 0,\n edgeCount: Array.isArray(canvas.edges) ? canvas.edges.length : 0,\n modified: stats.mtime,\n };\n } catch {\n return null;\n }\n}\n\nexport function createListCommand(): Command {\n const command = new Command('list');\n\n command\n .alias('ls')\n .description('List all .canvas files in the project')\n .option('-a, --all', 'Search all directories (not just .principal-views)')\n .option('--json', 'Output as JSON')\n .action(async (options) => {\n try {\n const patterns = options.all\n ? ['**/*.canvas', '!node_modules/**']\n : ['.principal-views/*.canvas'];\n\n const files = await globby(patterns, {\n expandDirectories: false,\n });\n\n if (files.length === 0) {\n if (options.json) {\n console.log(JSON.stringify({ files: [] }));\n } else {\n console.log(chalk.yellow('No .canvas files found.'));\n if (!options.all) {\n console.log(chalk.dim('Run with --all to search all directories'));\n }\n console.log(chalk.dim('\\nTo create a new canvas, run: privu init'));\n }\n return;\n }\n\n const canvasInfos = files\n .map(getCanvasInfo)\n .filter((info): info is CanvasInfo => info !== null)\n .sort((a, b) => b.modified.getTime() - a.modified.getTime());\n\n if (options.json) {\n console.log(JSON.stringify({ files: canvasInfos }, null, 2));\n } else {\n console.log(chalk.bold(`\\nFound ${canvasInfos.length} canvas file(s):\\n`));\n\n for (const info of canvasInfos) {\n const version = info.version ? chalk.dim(` v${info.version}`) : '';\n console.log(` ${chalk.cyan(info.file)}`);\n console.log(` ${chalk.bold(info.name)}${version}`);\n console.log(chalk.dim(` ${info.nodeCount} nodes, ${info.edgeCount} edges`));\n console.log('');\n }\n }\n } catch (error) {\n console.error(chalk.red('Error:'), (error as Error).message);\n process.exit(1);\n }\n });\n\n return command;\n}\n", "/**\n * Schema command - Display documentation about the canvas format\n */\n\nimport { Command } from 'commander';\nimport chalk from 'chalk';\n\nconst SCHEMA_SECTIONS = {\n overview: `\n${chalk.bold.cyan('Principal View Canvas Schema')}\n${chalk.dim('\u2550'.repeat(50))}\n\nCanvas files (.canvas) follow the JSON Canvas spec with Principal View extensions.\nAll PV extensions are placed in a ${chalk.yellow('\"pv\"')} field to maintain compatibility\nwith standard canvas tools like Obsidian.\n\n${chalk.bold('Required Structure:')}\n${chalk.dim('\u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510')}\n${chalk.dim('\u2502')} { ${chalk.dim('\u2502')}\n${chalk.dim('\u2502')} ${chalk.green('\"nodes\"')}: [...], ${chalk.dim('// Required: array of nodes')} ${chalk.dim('\u2502')}\n${chalk.dim('\u2502')} ${chalk.green('\"edges\"')}: [...], ${chalk.dim('// Optional: array of edges')} ${chalk.dim('\u2502')}\n${chalk.dim('\u2502')} ${chalk.green('\"pv\"')}: { ${chalk.dim('// Required: PV extension')} ${chalk.dim('\u2502')}\n${chalk.dim('\u2502')} ${chalk.yellow('\"name\"')}: \"...\", ${chalk.dim('// Required: graph name')} ${chalk.dim('\u2502')}\n${chalk.dim('\u2502')} ${chalk.yellow('\"version\"')}: \"...\" ${chalk.dim('// Required: schema version')} ${chalk.dim('\u2502')}\n${chalk.dim('\u2502')} } ${chalk.dim('\u2502')}\n${chalk.dim('\u2502')} } ${chalk.dim('\u2502')}\n${chalk.dim('\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518')}\n\nRun ${chalk.cyan('privu schema <section>')} for details on:\n ${chalk.yellow('nodes')} Node types and properties\n ${chalk.yellow('edges')} Edge properties and types\n ${chalk.yellow('vv')} Principal View extension fields\n ${chalk.yellow('examples')} Complete example configurations\n`,\n\n nodes: `\n${chalk.bold.cyan('Node Schema')}\n${chalk.dim('\u2550'.repeat(50))}\n\n${chalk.bold('Required Fields (all nodes):')}\n ${chalk.green('id')} ${chalk.dim('string')} Unique identifier\n ${chalk.green('type')} ${chalk.dim('string')} Node type (see below)\n ${chalk.green('x')} ${chalk.dim('number')} X position in pixels\n ${chalk.green('y')} ${chalk.dim('number')} Y position in pixels\n ${chalk.green('width')} ${chalk.dim('number')} Width in pixels\n ${chalk.green('height')} ${chalk.dim('number')} Height in pixels\n\n${chalk.bold('Optional Fields:')}\n ${chalk.green('color')} ${chalk.dim('string|number')} Hex color or preset (1-6)\n\n${chalk.bold('Standard Node Types:')}\n ${chalk.yellow('text')} Text/markdown content node\n Requires: ${chalk.dim('text')} (string)\n\n ${chalk.yellow('group')} Visual container for other nodes\n Optional: ${chalk.dim('label')}, ${chalk.dim('background')}, ${chalk.dim('backgroundStyle')}\n\n ${chalk.yellow('file')} Reference to external file\n Requires: ${chalk.dim('file')} (path string)\n Optional: ${chalk.dim('subpath')}\n\n ${chalk.yellow('link')} URL reference\n Requires: ${chalk.dim('url')} (string)\n\n${chalk.bold('Custom Node Types:')}\n Any type not in the standard list requires a ${chalk.yellow('vv')} extension:\n\n ${chalk.dim('{')}\n ${chalk.green('\"id\"')}: \"my-node\",\n ${chalk.green('\"type\"')}: \"api-gateway\", ${chalk.dim('// Custom type')}\n ${chalk.green('\"x\"')}: 100, ${chalk.green('\"y\"')}: 100,\n ${chalk.green('\"width\"')}: 150, ${chalk.green('\"height\"')}: 80,\n ${chalk.green('\"pv\"')}: {\n ${chalk.yellow('\"nodeType\"')}: \"api-gateway\", ${chalk.dim('// Required')}\n ${chalk.yellow('\"shape\"')}: \"rectangle\", ${chalk.dim('// Required')}\n ${chalk.cyan('\"fill\"')}: \"#3b82f6\", ${chalk.dim('// Optional: fill color')}\n ${chalk.cyan('\"stroke\"')}: \"#1d4ed8\", ${chalk.dim('// Optional: border color')}\n ${chalk.cyan('\"icon\"')}: \"Server\", ${chalk.dim('// Optional: Lucide icon')}\n ${chalk.cyan('\"sources\"')}: [\"src/api/**\"] ${chalk.dim('// Optional: file patterns')}\n }\n ${chalk.dim('}')}\n\n${chalk.bold('Valid Shapes:')}\n ${chalk.cyan('circle')} Circular node\n ${chalk.cyan('rectangle')} Rectangular node (default)\n ${chalk.cyan('hexagon')} Hexagonal node\n ${chalk.cyan('diamond')} Diamond/rhombus node\n ${chalk.cyan('custom')} Custom SVG shape\n\n${chalk.bold('Color Presets:')}\n ${chalk.red('1')} = red ${chalk.hex('#f97316')('2')} = orange ${chalk.yellow('3')} = yellow\n ${chalk.green('4')} = green ${chalk.cyan('5')} = cyan ${chalk.hex('#8b5cf6')('6')} = purple\n`,\n\n edges: `\n${chalk.bold.cyan('Edge Schema')}\n${chalk.dim('\u2550'.repeat(50))}\n\n${chalk.bold('Required Fields:')}\n ${chalk.green('id')} ${chalk.dim('string')} Unique identifier\n ${chalk.green('fromNode')} ${chalk.dim('string')} Source node ID\n ${chalk.green('toNode')} ${chalk.dim('string')} Target node ID\n\n${chalk.bold('Optional Fields:')}\n ${chalk.green('fromSide')} ${chalk.dim('string')} Side of source: top, right, bottom, left\n ${chalk.green('toSide')} ${chalk.dim('string')} Side of target: top, right, bottom, left\n ${chalk.green('fromEnd')} ${chalk.dim('string')} Source endpoint: none, arrow\n ${chalk.green('toEnd')} ${chalk.dim('string')} Target endpoint: none, arrow (default)\n ${chalk.green('color')} ${chalk.dim('string')} Edge color (hex or preset)\n ${chalk.green('label')} ${chalk.dim('string')} Edge label text\n\n${chalk.bold('PV Edge Extension:')}\n ${chalk.dim('{')}\n ${chalk.green('\"id\"')}: \"edge-1\",\n ${chalk.green('\"fromNode\"')}: \"api\", ${chalk.green('\"toNode\"')}: \"db\",\n ${chalk.green('\"pv\"')}: {\n ${chalk.yellow('\"edgeType\"')}: \"query\" ${chalk.dim('// Must be defined in vv.edgeTypes')}\n }\n ${chalk.dim('}')}\n\n${chalk.bold('Defining Edge Types (in canvas vv):')}\n ${chalk.dim('{')}\n ${chalk.green('\"pv\"')}: {\n \"name\": \"My Graph\",\n \"version\": \"1.0.0\",\n ${chalk.yellow('\"edgeTypes\"')}: {\n \"query\": {\n ${chalk.cyan('\"style\"')}: \"solid\", ${chalk.dim('// solid, dashed, dotted, animated')}\n ${chalk.cyan('\"color\"')}: \"#64748b\", ${chalk.dim('// Hex color')}\n ${chalk.cyan('\"width\"')}: 2, ${chalk.dim('// Line width in pixels')}\n ${chalk.cyan('\"directed\"')}: true, ${chalk.dim('// Show arrow')}\n ${chalk.cyan('\"animation\"')}: { ${chalk.dim('// Optional animation')}\n \"type\": \"flow\", ${chalk.dim('// flow, pulse, particle, glow')}\n \"duration\": 1000 ${chalk.dim('// Duration in ms')}\n }\n },\n \"event\": {\n \"style\": \"dashed\",\n \"color\": \"#f59e0b\"\n }\n }\n }\n ${chalk.dim('}')}\n\n${chalk.bold('Edge Styles:')}\n ${chalk.cyan('solid')} Solid line\n ${chalk.cyan('dashed')} Dashed line\n ${chalk.cyan('dotted')} Dotted line\n ${chalk.cyan('animated')} Animated flowing line\n\n${chalk.bold('Animation Types:')}\n ${chalk.cyan('flow')} Flowing dots along the edge\n ${chalk.cyan('pulse')} Pulsing glow effect\n ${chalk.cyan('particle')} Particle stream\n ${chalk.cyan('glow')} Static glow effect\n`,\n\n vv: `\n${chalk.bold.cyan('Principal View Extension')}\n${chalk.dim('\u2550'.repeat(50))}\n\nThe ${chalk.yellow('vv')} extension adds rich visualization capabilities while\nmaintaining compatibility with standard JSON Canvas tools.\n\n${chalk.bold('Canvas-Level pv (Required):')}\n ${chalk.dim('{')}\n ${chalk.green('\"pv\"')}: {\n ${chalk.yellow('\"name\"')}: \"My Architecture\", ${chalk.dim('// Required: Display name')}\n ${chalk.yellow('\"version\"')}: \"1.0.0\", ${chalk.dim('// Required: Schema version')}\n ${chalk.cyan('\"description\"')}: \"...\", ${chalk.dim('// Optional: Description')}\n ${chalk.cyan('\"edgeTypes\"')}: {...}, ${chalk.dim('// Optional: Edge type defs')}\n ${chalk.cyan('\"pathConfig\"')}: {...}, ${chalk.dim('// Optional: Path matching')}\n ${chalk.cyan('\"display\"')}: {...} ${chalk.dim('// Optional: Display settings')}\n }\n ${chalk.dim('}')}\n\n${chalk.bold('Node-Level pv (for custom types):')}\n ${chalk.dim('{')}\n ${chalk.green('\"pv\"')}: {\n ${chalk.yellow('\"nodeType\"')}: \"service\", ${chalk.dim('// Required: Type identifier')}\n ${chalk.yellow('\"shape\"')}: \"rectangle\", ${chalk.dim('// Required: Visual shape')}\n ${chalk.cyan('\"fill\"')}: \"#3b82f6\", ${chalk.dim('// Optional: Fill color (hex)')}\n ${chalk.cyan('\"stroke\"')}: \"#1d4ed8\", ${chalk.dim('// Optional: Border color (hex)')}\n ${chalk.cyan('\"icon\"')}: \"Server\", ${chalk.dim('// Optional: Lucide icon name')}\n ${chalk.cyan('\"sources\"')}: [\"src/**/*.ts\"], ${chalk.dim('// Optional: Source patterns')}\n ${chalk.cyan('\"states\"')}: { ${chalk.dim('// Optional: State definitions')}\n \"active\": { \"color\": \"#22c55e\" },\n \"error\": { \"color\": \"#ef4444\" }\n },\n ${chalk.cyan('\"actions\"')}: [{ ${chalk.dim('// Optional: Action patterns')}\n \"pattern\": \"request.*\",\n \"event\": \"request\",\n \"state\": \"active\"\n }]\n }\n ${chalk.dim('}')}\n\n${chalk.bold('Edge-Level vv:')}\n ${chalk.dim('{')}\n ${chalk.green('\"pv\"')}: {\n ${chalk.yellow('\"edgeType\"')}: \"query\", ${chalk.dim('// References vv.edgeTypes')}\n ${chalk.cyan('\"style\"')}: \"solid\", ${chalk.dim('// Override: line style')}\n ${chalk.cyan('\"width\"')}: 2, ${chalk.dim('// Override: line width')}\n ${chalk.cyan('\"animation\"')}: {...} ${chalk.dim('// Override: animation')}\n }\n ${chalk.dim('}')}\n\n${chalk.bold('Path Configuration (vv.pathConfig):')}\n ${chalk.cyan('\"pathConfig\"')}: {\n \"projectRoot\": \"./\", ${chalk.dim('// Project root path')}\n \"captureSource\": true, ${chalk.dim('// Capture source locations')}\n \"enableActionPatterns\": true, ${chalk.dim('// Enable action matching')}\n \"logLevel\": \"info\", ${chalk.dim('// Minimum log level')}\n \"ignoreUnsourced\": false ${chalk.dim('// Ignore logs without source')}\n }\n\n${chalk.bold('Display Configuration (vv.display):')}\n ${chalk.cyan('\"display\"')}: {\n \"layout\": \"manual\", ${chalk.dim('// manual, hierarchical, force-directed')}\n \"theme\": {\n \"primary\": \"#3b82f6\",\n \"success\": \"#22c55e\",\n \"warning\": \"#f59e0b\",\n \"danger\": \"#ef4444\"\n },\n \"animations\": {\n \"enabled\": true,\n \"speed\": 1.0\n }\n }\n`,\n\n examples: `\n${chalk.bold.cyan('Example Configurations')}\n${chalk.dim('\u2550'.repeat(50))}\n\n${chalk.bold('Minimal Valid Canvas:')}\n${chalk.dim('\u2500'.repeat(50))}\n{\n \"nodes\": [\n {\n \"id\": \"node-1\",\n \"type\": \"text\",\n \"x\": 100, \"y\": 100,\n \"width\": 150, \"height\": 80,\n \"text\": \"Hello World\"\n }\n ],\n \"edges\": [],\n \"pv\": {\n \"name\": \"My Graph\",\n \"version\": \"1.0.0\"\n }\n}\n\n${chalk.bold('Service Architecture:')}\n${chalk.dim('\u2500'.repeat(50))}\n{\n \"nodes\": [\n {\n \"id\": \"api\",\n \"type\": \"text\",\n \"x\": 100, \"y\": 100,\n \"width\": 150, \"height\": 80,\n \"text\": \"API Gateway\",\n \"pv\": {\n \"nodeType\": \"service\",\n \"shape\": \"rectangle\",\n \"fill\": \"#3b82f6\",\n \"stroke\": \"#1d4ed8\",\n \"icon\": \"Server\",\n \"sources\": [\"src/api/**/*.ts\"]\n }\n },\n {\n \"id\": \"db\",\n \"type\": \"text\",\n \"x\": 350, \"y\": 100,\n \"width\": 150, \"height\": 80,\n \"text\": \"Database\",\n \"pv\": {\n \"nodeType\": \"database\",\n \"shape\": \"hexagon\",\n \"fill\": \"#8b5cf6\",\n \"stroke\": \"#6d28d9\",\n \"icon\": \"Database\"\n }\n }\n ],\n \"edges\": [\n {\n \"id\": \"api-to-db\",\n \"fromNode\": \"api\",\n \"toNode\": \"db\",\n \"pv\": { \"edgeType\": \"query\" }\n }\n ],\n \"pv\": {\n \"name\": \"Service Architecture\",\n \"version\": \"1.0.0\",\n \"edgeTypes\": {\n \"query\": {\n \"style\": \"solid\",\n \"color\": \"#64748b\",\n \"width\": 2,\n \"animation\": {\n \"type\": \"flow\",\n \"duration\": 1500\n }\n }\n }\n }\n}\n\n${chalk.bold('Run validation:')} ${chalk.cyan('privu validate <file>')}\n${chalk.bold('Initialize project:')} ${chalk.cyan('privu init')}\n`,\n};\n\nexport function createSchemaCommand(): Command {\n const command = new Command('schema');\n\n command\n .description('Display documentation about the canvas schema')\n .argument('[section]', 'Section to display: overview, nodes, edges, vv, examples')\n .action((section?: string) => {\n const validSections = Object.keys(SCHEMA_SECTIONS);\n\n if (!section) {\n console.log(SCHEMA_SECTIONS.overview);\n return;\n }\n\n const normalizedSection = section.toLowerCase();\n\n if (!validSections.includes(normalizedSection)) {\n console.log(chalk.red(`Unknown section: ${section}`));\n console.log(`Valid sections: ${validSections.join(', ')}`);\n process.exit(1);\n }\n\n console.log(SCHEMA_SECTIONS[normalizedSection as keyof typeof SCHEMA_SECTIONS]);\n });\n\n return command;\n}\n", "/**\n * Doctor command - Check configuration staleness and source pattern validity\n *\n * This command performs two types of checks:\n * 1. Pattern validation: Ensures source patterns in .principal-views/*.yaml configs match actual files\n * 2. Freshness check: Compares config modification times vs source file changes\n */\n\nimport { Command } from 'commander';\nimport { existsSync, readFileSync, statSync } from 'node:fs';\nimport { resolve, relative, dirname } from 'node:path';\nimport chalk from 'chalk';\nimport { globby } from 'globby';\nimport yaml from 'js-yaml';\n\ninterface StalenessIssue {\n type: 'error' | 'warning' | 'info';\n configFile: string;\n nodeType?: string;\n message: string;\n details?: string;\n}\n\ninterface ConfigMetadata {\n name: string;\n version?: string;\n}\n\ninterface NodeTypeDefinition {\n shape: string;\n sources?: string[];\n [key: string]: unknown;\n}\n\ninterface VGCConfig {\n metadata?: ConfigMetadata;\n nodeTypes?: Record<string, NodeTypeDefinition>;\n [key: string]: unknown;\n}\n\ninterface DoctorResult {\n configFile: string;\n configName: string;\n issues: StalenessIssue[];\n stats: {\n nodeTypesChecked: number;\n patternsChecked: number;\n filesMatched: number;\n staleConfigs: number;\n };\n}\n\n/**\n * Format a time difference in human-readable form\n */\nfunction formatTimeDiff(ms: number): string {\n const seconds = Math.floor(ms / 1000);\n const minutes = Math.floor(seconds / 60);\n const hours = Math.floor(minutes / 60);\n const days = Math.floor(hours / 24);\n\n if (days > 0) return `${days} day${days > 1 ? 's' : ''}`;\n if (hours > 0) return `${hours} hour${hours > 1 ? 's' : ''}`;\n if (minutes > 0) return `${minutes} minute${minutes > 1 ? 's' : ''}`;\n return `${seconds} second${seconds !== 1 ? 's' : ''}`;\n}\n\n/**\n * Check a single .principal-views config file for staleness issues\n */\nasync function checkConfig(configPath: string, projectRoot: string): Promise<DoctorResult> {\n const absolutePath = resolve(configPath);\n const relativePath = relative(projectRoot, absolutePath);\n const issues: StalenessIssue[] = [];\n const stats = {\n nodeTypesChecked: 0,\n patternsChecked: 0,\n filesMatched: 0,\n staleConfigs: 0,\n };\n\n let configName = 'Unknown';\n\n try {\n const content = readFileSync(absolutePath, 'utf8');\n const config = yaml.load(content) as VGCConfig;\n const configStats = statSync(absolutePath);\n const configMtime = configStats.mtime.getTime();\n\n configName = config.metadata?.name || relativePath;\n\n // Check if config has nodeTypes with sources\n if (!config.nodeTypes || Object.keys(config.nodeTypes).length === 0) {\n issues.push({\n type: 'info',\n configFile: relativePath,\n message: 'No node types defined in configuration',\n });\n return { configFile: relativePath, configName, issues, stats };\n }\n\n // Check each node type's source patterns\n for (const [nodeTypeName, nodeType] of Object.entries(config.nodeTypes)) {\n stats.nodeTypesChecked++;\n\n if (!nodeType.sources || nodeType.sources.length === 0) {\n issues.push({\n type: 'info',\n configFile: relativePath,\n nodeType: nodeTypeName,\n message: `Node type \"${nodeTypeName}\" has no source patterns defined`,\n });\n continue;\n }\n\n for (const pattern of nodeType.sources) {\n stats.patternsChecked++;\n\n // Find files matching this pattern\n const matchedFiles = await globby(pattern, {\n cwd: projectRoot,\n gitignore: true,\n ignore: ['node_modules/**', 'dist/**', '.git/**'],\n });\n\n if (matchedFiles.length === 0) {\n // Pattern doesn't match any files - this is a warning\n issues.push({\n type: 'warning',\n configFile: relativePath,\n nodeType: nodeTypeName,\n message: `Source pattern \"${pattern}\" doesn't match any files`,\n details: 'This pattern may be outdated or the files may have been moved/deleted',\n });\n } else {\n stats.filesMatched += matchedFiles.length;\n\n // Check if any matched files are newer than the config\n let newestFile: string | null = null;\n let newestMtime = 0;\n\n for (const file of matchedFiles) {\n const filePath = resolve(projectRoot, file);\n try {\n const fileStats = statSync(filePath);\n const fileMtime = fileStats.mtime.getTime();\n\n if (fileMtime > newestMtime) {\n newestMtime = fileMtime;\n newestFile = file;\n }\n } catch {\n // File may have been deleted between glob and stat\n }\n }\n\n // Check staleness (with 5-second buffer for build tools)\n const STALE_THRESHOLD_MS = 5000;\n if (newestFile && newestMtime > configMtime + STALE_THRESHOLD_MS) {\n const timeDiff = newestMtime - configMtime;\n stats.staleConfigs++;\n issues.push({\n type: 'warning',\n configFile: relativePath,\n nodeType: nodeTypeName,\n message: `Config may be stale: \"${newestFile}\" was modified ${formatTimeDiff(timeDiff)} after the config`,\n details: `Pattern: ${pattern} (matched ${matchedFiles.length} file${matchedFiles.length > 1 ? 's' : ''})`,\n });\n }\n }\n }\n }\n } catch (error) {\n issues.push({\n type: 'error',\n configFile: relativePath,\n message: `Failed to parse config: ${(error as Error).message}`,\n });\n }\n\n return { configFile: relativePath, configName, issues, stats };\n}\n\nexport function createDoctorCommand(): Command {\n const command = new Command('doctor');\n\n command\n .description('Check configuration staleness and source pattern validity')\n .option('-q, --quiet', 'Only show errors and warnings')\n .option('--errors-only', 'Only show errors (for pre-commit hooks)')\n .option('--json', 'Output results as JSON')\n .option('-d, --dir <path>', 'Project directory (defaults to current directory)')\n .action(async (options) => {\n try {\n const projectRoot = resolve(options.dir || process.cwd());\n const vgcDir = resolve(projectRoot, '.principal-views');\n\n if (!existsSync(vgcDir)) {\n if (options.json) {\n console.log(JSON.stringify({ error: 'No .principal-views directory found', results: [] }));\n } else {\n console.log(chalk.yellow('No .principal-views directory found.'));\n console.log(chalk.dim('Run \"privu init\" to create a configuration.'));\n }\n return;\n }\n\n // Find all .yaml config files\n const configFiles = await globby(['*.yaml', '*.yml'], {\n cwd: vgcDir,\n absolute: true,\n ignore: ['README.md'],\n });\n\n if (configFiles.length === 0) {\n if (options.json) {\n console.log(JSON.stringify({ error: 'No config files found in .principal-views', results: [] }));\n } else {\n console.log(chalk.yellow('No configuration files found in .principal-views/'));\n }\n return;\n }\n\n // Check each config\n const results: DoctorResult[] = [];\n for (const configFile of configFiles) {\n const result = await checkConfig(configFile, projectRoot);\n results.push(result);\n }\n\n // Aggregate stats\n const totalStats = results.reduce(\n (acc, r) => ({\n nodeTypesChecked: acc.nodeTypesChecked + r.stats.nodeTypesChecked,\n patternsChecked: acc.patternsChecked + r.stats.patternsChecked,\n filesMatched: acc.filesMatched + r.stats.filesMatched,\n staleConfigs: acc.staleConfigs + r.stats.staleConfigs,\n }),\n { nodeTypesChecked: 0, patternsChecked: 0, filesMatched: 0, staleConfigs: 0 }\n );\n\n // Filter issues based on options\n const filterIssues = (issues: StalenessIssue[]) => {\n if (options.errorsOnly) {\n return issues.filter(i => i.type === 'error');\n }\n if (options.quiet) {\n return issues.filter(i => i.type === 'error' || i.type === 'warning');\n }\n return issues;\n };\n\n // Count issues\n const allIssues = results.flatMap(r => filterIssues(r.issues));\n const errorCount = allIssues.filter(i => i.type === 'error').length;\n const warningCount = allIssues.filter(i => i.type === 'warning').length;\n\n // Output results\n if (options.json) {\n console.log(\n JSON.stringify(\n {\n results: results.map(r => ({\n ...r,\n issues: filterIssues(r.issues),\n })),\n summary: {\n configs: results.length,\n errors: errorCount,\n warnings: warningCount,\n ...totalStats,\n },\n },\n null,\n 2\n )\n );\n } else {\n if (!options.quiet && !options.errorsOnly) {\n console.log(chalk.bold(`\\nChecking ${results.length} configuration file(s)...\\n`));\n }\n\n for (const result of results) {\n const issues = filterIssues(result.issues);\n\n if (issues.length === 0 && !options.quiet && !options.errorsOnly) {\n console.log(chalk.green(`\u2713 ${result.configFile}`) + chalk.dim(` (${result.configName})`));\n continue;\n }\n\n if (issues.length > 0) {\n const hasErrors = issues.some(i => i.type === 'error');\n const icon = hasErrors ? chalk.red('\u2717') : chalk.yellow('\u26A0');\n console.log(`${icon} ${result.configFile}` + chalk.dim(` (${result.configName})`));\n\n for (const issue of issues) {\n const prefix = issue.nodeType ? `[${issue.nodeType}] ` : '';\n if (issue.type === 'error') {\n console.log(chalk.red(` \u2717 ${prefix}${issue.message}`));\n } else if (issue.type === 'warning') {\n console.log(chalk.yellow(` \u26A0 ${prefix}${issue.message}`));\n } else {\n console.log(chalk.dim(` \u2139 ${prefix}${issue.message}`));\n }\n if (issue.details) {\n console.log(chalk.dim(` \u2192 ${issue.details}`));\n }\n }\n console.log('');\n }\n }\n\n // Summary\n if (!options.errorsOnly) {\n console.log(chalk.dim('\u2500'.repeat(50)));\n console.log(\n chalk.dim(\n `Checked ${totalStats.nodeTypesChecked} node types, ` +\n `${totalStats.patternsChecked} patterns, ` +\n `matched ${totalStats.filesMatched} files`\n )\n );\n }\n\n if (errorCount > 0) {\n console.log(chalk.red(`\\n\u2717 ${errorCount} error(s) found`));\n process.exit(1);\n } else if (warningCount > 0 && options.errorsOnly) {\n // In errors-only mode, don't fail on warnings\n process.exit(0);\n } else if (warningCount > 0) {\n console.log(chalk.yellow(`\\n\u26A0 ${warningCount} warning(s) found`));\n } else if (!options.quiet && !options.errorsOnly) {\n console.log(chalk.green(`\\n\u2713 All configurations are up to date`));\n }\n }\n } catch (error) {\n console.error(chalk.red('Error:'), (error as Error).message);\n process.exit(1);\n }\n });\n\n return command;\n}\n", "/**\n * Hooks command - Manage husky pre-commit hooks for Principal View\n *\n * This command installs/removes pre-commit hooks into a target project\n * that will run `privu doctor` and `privu validate` before each commit.\n */\n\nimport { Command } from 'commander';\nimport { existsSync, readFileSync, writeFileSync, unlinkSync, chmodSync } from 'node:fs';\nimport { resolve, join } from 'node:path';\nimport chalk from 'chalk';\nimport { execSync } from 'node:child_process';\n\nconst HUSKY_DIR = '.husky';\nconst PRE_COMMIT_HOOK = 'pre-commit';\nconst VV_HOOK_MARKER = '# Principal View checks';\n\n/**\n * Get the Principal View pre-commit hook content\n */\nfunction getVVHookContent(): string {\n return `${VV_HOOK_MARKER}\necho \"Running Principal View doctor check...\"\nnpx privu doctor --errors-only || {\n echo \"\u274C Principal View doctor check failed (errors found)\"\n echo \" Run 'privu doctor' to see details\"\n exit 1\n}\n\necho \"Running Principal View canvas validation...\"\nnpx privu validate --quiet 2>/dev/null || {\n if [ $? -ne 0 ]; then\n echo \"\u274C Canvas validation failed\"\n echo \" Run 'privu validate' to see details\"\n exit 1\n fi\n}\n`;\n}\n\n/**\n * Find the repository root by looking for .git directory\n */\nfunction findRepoRoot(startPath: string): string {\n let current = resolve(startPath);\n const root = resolve('/');\n\n while (current !== root) {\n if (existsSync(join(current, '.git'))) {\n return current;\n }\n current = resolve(current, '..');\n }\n\n throw new Error('Not a git repository (or any parent up to mount point)');\n}\n\n/**\n * Check if husky is installed\n */\nfunction isHuskyInstalled(repoPath: string): boolean {\n const huskyPath = join(repoPath, HUSKY_DIR);\n return existsSync(huskyPath);\n}\n\n/**\n * Initialize husky if not already installed\n */\nfunction initializeHusky(repoPath: string): void {\n if (!isHuskyInstalled(repoPath)) {\n console.log('\uD83D\uDCE6 Installing husky...');\n try {\n // Check if package.json exists\n const packageJsonPath = join(repoPath, 'package.json');\n if (!existsSync(packageJsonPath)) {\n throw new Error('No package.json found. Please run npm init first.');\n }\n\n // Install husky\n execSync('npm install --save-dev husky', {\n cwd: repoPath,\n stdio: 'inherit',\n });\n\n // Initialize husky\n execSync('npx husky init', {\n cwd: repoPath,\n stdio: 'inherit',\n });\n\n // Remove the default placeholder if it exists\n const hookPath = join(repoPath, HUSKY_DIR, PRE_COMMIT_HOOK);\n if (existsSync(hookPath)) {\n const content = readFileSync(hookPath, 'utf8').trim();\n if (content === 'npm test') {\n // Remove the placeholder file - we'll create our own when --add is used\n unlinkSync(hookPath);\n console.log('\u2139\uFE0F Removed default husky placeholder hook');\n }\n }\n\n console.log('\u2705 Husky installed and initialized');\n } catch (error) {\n throw new Error(`Failed to initialize husky: ${error instanceof Error ? error.message : String(error)}`);\n }\n }\n}\n\n/**\n * Check if pre-commit hook has PV validation\n */\nfunction hasVVHook(repoPath: string): boolean {\n const hookPath = join(repoPath, HUSKY_DIR, PRE_COMMIT_HOOK);\n if (!existsSync(hookPath)) {\n return false;\n }\n\n const content = readFileSync(hookPath, 'utf8');\n return content.includes(VV_HOOK_MARKER);\n}\n\n/**\n * Add PV validation to pre-commit hook\n */\nfunction addVVHook(repoPath: string): void {\n const hookPath = join(repoPath, HUSKY_DIR, PRE_COMMIT_HOOK);\n const vvContent = getVVHookContent();\n\n if (existsSync(hookPath)) {\n // Append to existing hook\n let existingContent = readFileSync(hookPath, 'utf8');\n\n // Check if already has PV hook\n if (existingContent.includes(VV_HOOK_MARKER)) {\n return;\n }\n\n // Remove default husky placeholder if it's the only content\n const trimmedContent = existingContent.trim();\n if (trimmedContent === 'npm test') {\n // Replace the placeholder entirely\n writeFileSync(hookPath, vvContent, 'utf8');\n console.log('\u2139\uFE0F Replaced default husky placeholder with Principal View checks');\n } else {\n // Add PV hook at the end\n const updatedContent = existingContent.trimEnd() + '\\n\\n' + vvContent;\n writeFileSync(hookPath, updatedContent, 'utf8');\n }\n } else {\n // Create new hook file\n writeFileSync(hookPath, vvContent, 'utf8');\n // Make it executable\n chmodSync(hookPath, 0o755);\n }\n}\n\n/**\n * Remove PV validation from pre-commit hook\n */\nfunction removeVVHook(repoPath: string): void {\n const hookPath = join(repoPath, HUSKY_DIR, PRE_COMMIT_HOOK);\n\n if (!existsSync(hookPath)) {\n return;\n }\n\n const content = readFileSync(hookPath, 'utf8');\n\n if (!content.includes(VV_HOOK_MARKER)) {\n return;\n }\n\n // Split content by lines and find the PV section\n const lines = content.split('\\n');\n const startIndex = lines.findIndex((line) => line.includes(VV_HOOK_MARKER));\n\n if (startIndex === -1) {\n return;\n }\n\n // Find the end of the PV section\n let endIndex = lines.length - 1;\n let inVVBlock = true;\n let i = startIndex + 1;\n\n while (i < lines.length && inVVBlock) {\n const line = lines[i];\n\n // Check if this line is part of the PV block\n if (\n line &&\n (line.includes('privu ') ||\n line.includes('Principal View') ||\n line.includes('echo \"Running Visual') ||\n (line.includes('exit 1') && i > startIndex && i < startIndex + 15) ||\n (line === '}' && i > startIndex && i < startIndex + 15) ||\n (line.trim() === '' && i === startIndex + 1))\n ) {\n endIndex = i;\n i++;\n } else if (line && line.trim() === '' && i < startIndex + 15) {\n // Empty line might be part of our block\n endIndex = i;\n i++;\n } else {\n // We've reached content that's not part of our block\n inVVBlock = false;\n }\n }\n\n // Remove the section (inclusive)\n lines.splice(startIndex, endIndex - startIndex + 1);\n\n // Clean up extra blank lines\n let result = lines.join('\\n');\n result = result.replace(/\\n{3,}/g, '\\n\\n').trim();\n\n if (result) {\n writeFileSync(hookPath, result + '\\n', 'utf8');\n } else {\n // If hook is now empty, remove it\n unlinkSync(hookPath);\n }\n}\n\nexport function createHooksCommand(): Command {\n const command = new Command('hooks');\n\n command\n .description('Manage husky pre-commit hooks for Principal View')\n .option('-p, --path <path>', 'Repository path (defaults to current directory)')\n .option('--add', 'Add Principal View checks to pre-commit hook')\n .option('--remove', 'Remove Principal View checks from pre-commit hook')\n .option('--check', 'Check if Principal View checks exist in pre-commit hook')\n .option('--init', 'Initialize husky if not already installed')\n .action((options) => {\n try {\n const repoPath = findRepoRoot(options.path || process.cwd());\n\n // Check if it's a git repository\n if (!existsSync(join(repoPath, '.git'))) {\n console.error(chalk.red('\u274C Not a git repository'));\n process.exit(1);\n }\n\n // Handle init option\n if (options.init) {\n initializeHusky(repoPath);\n return;\n }\n\n // Check if husky is installed\n if (!isHuskyInstalled(repoPath)) {\n if (options.check) {\n console.log(chalk.red('\u274C Husky is not installed'));\n console.log(' Run \"privu hooks --init\" to install husky');\n process.exit(1);\n } else if (options.add) {\n console.log(chalk.red('\u274C Husky is not installed'));\n console.log(' Run \"privu hooks --init\" first to install husky');\n process.exit(1);\n } else if (options.remove) {\n console.log('\u2139\uFE0F Husky is not installed');\n return;\n } else {\n console.log(chalk.red('\u274C Husky is not installed in this repository'));\n console.log('\\nTo install husky and set up Principal View hooks:');\n console.log(' privu hooks --init --add');\n process.exit(1);\n }\n }\n\n const hasHook = hasVVHook(repoPath);\n\n if (options.check) {\n if (hasHook) {\n console.log(chalk.green('\u2705 Principal View checks found in pre-commit hook'));\n } else {\n console.log(chalk.red('\u274C No Principal View checks in pre-commit hook'));\n process.exit(1);\n }\n } else if (options.add) {\n if (hasHook) {\n console.log('\u2139\uFE0F Principal View checks already exist in pre-commit hook');\n } else {\n addVVHook(repoPath);\n console.log(chalk.green('\u2705 Added Principal View checks to pre-commit hook'));\n console.log('\\nPre-commit hook will now:');\n console.log(' \u2022 Run privu doctor to check for stale configurations');\n console.log(' \u2022 Validate all .canvas files');\n }\n } else if (options.remove) {\n if (!hasHook) {\n console.log('\u2139\uFE0F No Principal View checks found in pre-commit hook');\n } else {\n removeVVHook(repoPath);\n console.log(chalk.green('\u2705 Removed Principal View checks from pre-commit hook'));\n }\n } else {\n // Default action: show status\n console.log(chalk.bold('\\nPrincipal View Hooks Status\\n'));\n console.log(`Repository: ${repoPath}`);\n console.log(`Husky: ${chalk.green('installed')}`);\n console.log(`PV Hooks: ${hasHook ? chalk.green('configured') : chalk.yellow('not configured')}`);\n\n if (hasHook) {\n console.log('\\nUse --remove to remove or --check to verify');\n } else {\n console.log('\\nUse --add to add or --check to verify');\n }\n }\n } catch (error) {\n console.error(chalk.red('Error:'), error instanceof Error ? error.message : String(error));\n process.exit(1);\n }\n });\n\n return command;\n}\n", "/**\n * Create command - Create a new canvas file in the .principal-views folder\n */\n\nimport { Command } from 'commander';\nimport { existsSync, mkdirSync, writeFileSync } from 'node:fs';\nimport { join } from 'node:path';\nimport chalk from 'chalk';\nimport type { ExtendedCanvas } from '@principal-ai/principal-view-core';\n\nconst TEMPLATE_CANVAS: ExtendedCanvas = {\n nodes: [],\n edges: [],\n};\n\nexport function createCreateCommand(): Command {\n const command = new Command('create');\n\n command\n .description('Create a new canvas file in the .principal-views folder')\n .requiredOption('-n, --name <name>', 'Name for the canvas file (e.g., \"cache-sync-architecture\")')\n .option('-f, --force', 'Overwrite existing file')\n .action(async (options) => {\n try {\n const vgcDir = join(process.cwd(), '.principal-views');\n const canvasFile = join(vgcDir, `${options.name}.canvas`);\n\n // Check if .principal-views directory exists\n if (!existsSync(vgcDir)) {\n mkdirSync(vgcDir, { recursive: true });\n console.log(chalk.green(`Created directory: .principal-views/`));\n }\n\n // Check if canvas file already exists\n if (existsSync(canvasFile) && !options.force) {\n console.error(chalk.red(`Error: Canvas file already exists: .principal-views/${options.name}.canvas`));\n console.log(chalk.yellow(`Use ${chalk.cyan('--force')} to overwrite`));\n process.exit(1);\n }\n\n // Create the canvas file\n writeFileSync(canvasFile, JSON.stringify(TEMPLATE_CANVAS, null, 2));\n console.log(chalk.green(`\u2713 Created canvas file: .principal-views/${options.name}.canvas`));\n\n // Show next steps\n console.log('');\n console.log(chalk.bold('Next steps:'));\n console.log(` 1. Open ${chalk.cyan(`.principal-views/${options.name}.canvas`)} in your editor`);\n console.log(` 2. Add nodes and edges to define your architecture`);\n console.log(` 3. Run ${chalk.cyan('privu validate')} to check your configuration`);\n console.log(` 4. Run ${chalk.cyan('privu doctor')} to verify source mappings`);\n } catch (error) {\n console.error(chalk.red('Error:'), (error as Error).message);\n process.exit(1);\n }\n });\n\n return command;\n}\n", "/**\n * Lint command - Lint graph configuration files using the rules engine\n */\n\nimport { Command } from 'commander';\nimport { existsSync, readFileSync } from 'node:fs';\nimport { resolve, relative, dirname, basename } from 'node:path';\nimport chalk from 'chalk';\nimport { globby } from 'globby';\nimport yaml from 'js-yaml';\nimport {\n createDefaultRulesEngine,\n validatePrivuConfig,\n mergeConfigs,\n getDefaultConfig,\n type GraphConfiguration,\n type GraphLintResult,\n type GraphRuleViolation,\n type PrivuConfig,\n type ComponentLibrary,\n} from '@principal-ai/principal-view-core';\n\n// ============================================================================\n// Config File Loading\n// ============================================================================\n\n/**\n * Config file names in resolution order\n */\nconst CONFIG_FILE_NAMES = [\n '.principal-viewsrc.json',\n '.principal-viewsrc.yaml',\n '.principal-viewsrc.yml',\n 'privu.config.json',\n 'privu.config.yaml',\n 'privu.config.yml',\n];\n\n/**\n * Find and load VGC config file\n */\nfunction findConfig(startDir: string): { config: PrivuConfig; path: string } | null {\n let currentDir = resolve(startDir);\n\n while (true) {\n // Check for config files\n for (const fileName of CONFIG_FILE_NAMES) {\n const configPath = resolve(currentDir, fileName);\n if (existsSync(configPath)) {\n const config = loadConfigFile(configPath);\n if (config) {\n return { config, path: configPath };\n }\n }\n }\n\n // Check package.json for \"privu\" key\n const packageJsonPath = resolve(currentDir, 'package.json');\n if (existsSync(packageJsonPath)) {\n try {\n const packageJson = JSON.parse(readFileSync(packageJsonPath, 'utf8'));\n if (packageJson.privu && typeof packageJson.privu === 'object') {\n return { config: packageJson.privu as PrivuConfig, path: packageJsonPath };\n }\n } catch {\n // Ignore parse errors\n }\n }\n\n // Check for root flag or filesystem root\n const parentDir = dirname(currentDir);\n if (parentDir === currentDir) {\n break; // Reached filesystem root\n }\n currentDir = parentDir;\n }\n\n return null;\n}\n\n/**\n * Load a config file (JSON or YAML)\n */\nfunction loadConfigFile(filePath: string): PrivuConfig | null {\n try {\n const content = readFileSync(filePath, 'utf8');\n const ext = filePath.toLowerCase();\n\n if (ext.endsWith('.json')) {\n return JSON.parse(content) as PrivuConfig;\n } else {\n return yaml.load(content) as PrivuConfig;\n }\n } catch {\n return null;\n }\n}\n\n/**\n * Load a component library file\n */\nfunction loadLibrary(libraryPath: string): ComponentLibrary | null {\n if (!existsSync(libraryPath)) {\n return null;\n }\n\n try {\n const content = readFileSync(libraryPath, 'utf8');\n const ext = libraryPath.toLowerCase();\n\n if (ext.endsWith('.json')) {\n return JSON.parse(content) as ComponentLibrary;\n } else {\n return yaml.load(content) as ComponentLibrary;\n }\n } catch {\n return null;\n }\n}\n\n/**\n * Load a graph configuration file (YAML or JSON)\n */\nfunction loadGraphConfig(filePath: string): { config: GraphConfiguration; raw: string } | null {\n if (!existsSync(filePath)) {\n return null;\n }\n\n try {\n const raw = readFileSync(filePath, 'utf8');\n const ext = filePath.toLowerCase();\n\n let config: GraphConfiguration;\n if (ext.endsWith('.json')) {\n config = JSON.parse(raw) as GraphConfiguration;\n } else {\n config = yaml.load(raw) as GraphConfiguration;\n }\n\n return { config, raw };\n } catch {\n return null;\n }\n}\n\n// ============================================================================\n// Output Formatting\n// ============================================================================\n\n/**\n * Format violations for pretty console output\n */\nfunction formatPrettyOutput(\n results: Map<string, GraphLintResult>,\n quiet: boolean\n): { output: string; hasErrors: boolean } {\n const lines: string[] = [];\n let totalErrors = 0;\n let totalWarnings = 0;\n let totalFixable = 0;\n\n for (const [filePath, result] of results) {\n totalErrors += result.errorCount;\n totalWarnings += result.warningCount;\n totalFixable += result.fixableCount;\n\n if (result.violations.length === 0) {\n if (!quiet) {\n lines.push(chalk.green(`\u2713 ${filePath}`));\n }\n continue;\n }\n\n lines.push('');\n lines.push(chalk.cyan(filePath));\n lines.push('');\n\n for (const violation of result.violations) {\n const severityColor = violation.severity === 'error' ? chalk.red : chalk.yellow;\n const severityLabel = violation.severity === 'error' ? 'error' : 'warn ';\n\n // Format: \" error rule-id message\"\n const ruleId = chalk.dim(violation.ruleId.padEnd(30));\n lines.push(` ${severityColor(severityLabel)} ${ruleId} ${violation.message}`);\n\n if (violation.suggestion) {\n lines.push(chalk.dim(` ${''.padEnd(30)} \u2192 ${violation.suggestion}`));\n }\n }\n }\n\n // Summary\n lines.push('');\n if (totalErrors === 0 && totalWarnings === 0) {\n lines.push(chalk.green(`\u2713 All files passed linting`));\n } else {\n const parts: string[] = [];\n if (totalErrors > 0) {\n parts.push(chalk.red(`${totalErrors} error${totalErrors === 1 ? '' : 's'}`));\n }\n if (totalWarnings > 0) {\n parts.push(chalk.yellow(`${totalWarnings} warning${totalWarnings === 1 ? '' : 's'}`));\n }\n lines.push(`\u2716 ${parts.join(', ')}`);\n\n if (totalFixable > 0) {\n lines.push(chalk.dim(` ${totalFixable} fixable with --fix (coming soon)`));\n }\n }\n\n return {\n output: lines.join('\\n'),\n hasErrors: totalErrors > 0,\n };\n}\n\n/**\n * Format violations for JSON output\n */\nfunction formatJsonOutput(results: Map<string, GraphLintResult>): object {\n const files: Array<{\n file: string;\n errorCount: number;\n warningCount: number;\n fixableCount: number;\n violations: GraphRuleViolation[];\n }> = [];\n\n let totalErrors = 0;\n let totalWarnings = 0;\n let totalFixable = 0;\n\n for (const [filePath, result] of results) {\n totalErrors += result.errorCount;\n totalWarnings += result.warningCount;\n totalFixable += result.fixableCount;\n\n files.push({\n file: filePath,\n errorCount: result.errorCount,\n warningCount: result.warningCount,\n fixableCount: result.fixableCount,\n violations: result.violations,\n });\n }\n\n return {\n files,\n summary: {\n totalFiles: files.length,\n totalErrors,\n totalWarnings,\n totalFixable,\n },\n };\n}\n\n// ============================================================================\n// Command Implementation\n// ============================================================================\n\nexport function createLintCommand(): Command {\n const command = new Command('lint');\n\n command\n .description('Lint graph configuration files')\n .argument('[files...]', 'Files or glob patterns to lint (defaults to .principal-views/**/*.yaml)')\n .option('-c, --config <path>', 'Path to config file')\n .option('--library <path>', 'Path to component library file')\n .option('-q, --quiet', 'Only output errors')\n .option('--json', 'Output results as JSON')\n .option('--rule <rules...>', 'Only run specific rules')\n .option('--ignore-rule <rules...>', 'Skip specific rules')\n .action(async (files: string[], options) => {\n try {\n const cwd = process.cwd();\n\n // Load VGC config\n let privuConfig: PrivuConfig = getDefaultConfig();\n let configPath: string | undefined;\n\n if (options.config) {\n // Use specified config file\n const loadedConfig = loadConfigFile(resolve(cwd, options.config));\n if (!loadedConfig) {\n console.error(chalk.red(`Error: Could not load config file: ${options.config}`));\n process.exit(1);\n }\n\n // Validate config\n const validation = validatePrivuConfig(loadedConfig);\n if (!validation.valid) {\n console.error(chalk.red('Configuration Error:'), options.config);\n for (const error of validation.errors) {\n console.error(chalk.red(` ${error.path}: ${error.message}`));\n if (error.suggestion) {\n console.error(chalk.dim(` \u2192 ${error.suggestion}`));\n }\n }\n process.exit(1);\n }\n\n privuConfig = mergeConfigs(privuConfig, loadedConfig);\n configPath = resolve(cwd, options.config);\n } else {\n // Search for config file\n const found = findConfig(cwd);\n if (found) {\n const validation = validatePrivuConfig(found.config);\n if (!validation.valid) {\n console.error(chalk.red('Configuration Error:'), found.path);\n for (const error of validation.errors) {\n console.error(chalk.red(` ${error.path}: ${error.message}`));\n if (error.suggestion) {\n console.error(chalk.dim(` \u2192 ${error.suggestion}`));\n }\n }\n process.exit(1);\n }\n privuConfig = mergeConfigs(privuConfig, found.config);\n configPath = found.path;\n }\n }\n\n // Determine files to lint\n let patterns: string[];\n if (files.length > 0) {\n patterns = files;\n } else if (privuConfig.include && privuConfig.include.length > 0) {\n patterns = privuConfig.include;\n } else {\n patterns = ['.principal-views/**/*.yaml', '.principal-views/**/*.yml', '.principal-views/**/*.json'];\n }\n\n // Find matching files\n const matchedFiles = await globby(patterns, {\n ignore: privuConfig.exclude || ['**/node_modules/**'],\n expandDirectories: false,\n });\n\n // Filter out library files and config files\n const configFiles = matchedFiles.filter((f) => {\n const name = basename(f).toLowerCase();\n return !name.startsWith('library.') && !name.startsWith('.principal-viewsrc') && !name.startsWith('privu.config');\n });\n\n if (configFiles.length === 0) {\n if (options.json) {\n console.log(JSON.stringify({ files: [], summary: { totalFiles: 0, totalErrors: 0, totalWarnings: 0, totalFixable: 0 } }));\n } else {\n console.log(chalk.yellow('No configuration files found matching the specified patterns.'));\n console.log(chalk.dim(`Patterns searched: ${patterns.join(', ')}`));\n }\n return;\n }\n\n // Load library if specified\n let library: ComponentLibrary | undefined;\n const libraryPath = options.library || privuConfig.library;\n if (libraryPath) {\n const resolvedLibraryPath = resolve(cwd, libraryPath);\n library = loadLibrary(resolvedLibraryPath) ?? undefined;\n if (!library && !options.quiet) {\n console.log(chalk.yellow(`Warning: Could not load library from ${libraryPath}`));\n }\n }\n\n // Create rules engine\n const engine = createDefaultRulesEngine();\n\n // Lint each file\n const results = new Map<string, GraphLintResult>();\n\n for (const filePath of configFiles) {\n const absolutePath = resolve(cwd, filePath);\n const relativePath = relative(cwd, absolutePath);\n\n const loaded = loadGraphConfig(absolutePath);\n if (!loaded) {\n // File couldn't be loaded - report as error\n results.set(relativePath, {\n violations: [{\n ruleId: 'parse-error',\n severity: 'error',\n file: relativePath,\n message: `Could not parse file: ${filePath}`,\n impact: 'File cannot be validated',\n fixable: false,\n }],\n errorCount: 1,\n warningCount: 0,\n fixableCount: 0,\n byCategory: { schema: 1, reference: 0, structure: 0, pattern: 0, library: 0 },\n byRule: { 'parse-error': 1 },\n });\n continue;\n }\n\n // Run linting\n const result = await engine.lintWithConfig(loaded.config, privuConfig, {\n library,\n configPath: relativePath,\n rawContent: loaded.raw,\n enabledRules: options.rule,\n disabledRules: options.ignoreRule,\n });\n\n results.set(relativePath, result);\n }\n\n // Output results\n if (options.json) {\n console.log(JSON.stringify(formatJsonOutput(results), null, 2));\n } else {\n const { output, hasErrors } = formatPrettyOutput(results, options.quiet);\n console.log(output);\n\n if (hasErrors) {\n process.exit(1);\n }\n }\n } catch (error) {\n if (options.json) {\n console.log(JSON.stringify({ error: (error as Error).message }));\n } else {\n console.error(chalk.red('Error:'), (error as Error).message);\n }\n process.exit(1);\n }\n });\n\n return command;\n}\n", "/**\n * YAML parsing utility for loading configuration files\n *\n * Provides error handling and validation for YAML configuration files.\n * Supports both .yaml and .yml file extensions.\n */\n\nimport * as yaml from 'js-yaml';\nimport { PathBasedGraphConfiguration } from '../types/path-based-config';\n\nexport interface YamlParseResult {\n success: boolean;\n data?: PathBasedGraphConfiguration;\n error?: string;\n}\n\n/**\n * Parse YAML content into a configuration object\n *\n * @param content - Raw YAML string content\n * @param filename - Optional filename for error messages\n * @returns Parse result with configuration or error\n */\nexport function parseYaml(content: string, filename?: string): YamlParseResult {\n try {\n const data = yaml.load(content) as PathBasedGraphConfiguration;\n\n if (!data) {\n return {\n success: false,\n error: `Empty YAML file${filename ? `: ${filename}` : ''}`,\n };\n }\n\n // Basic validation - ensure it has the required structure\n if (!data.metadata || !data.nodeTypes || !data.edgeTypes) {\n return {\n success: false,\n error: `Invalid configuration structure${filename ? ` in ${filename}` : ''}: missing required fields (metadata, nodeTypes, or edgeTypes)`,\n };\n }\n\n return {\n success: true,\n data,\n };\n } catch (error) {\n const errorMessage = error instanceof Error ? error.message : String(error);\n return {\n success: false,\n error: `YAML parse error${filename ? ` in ${filename}` : ''}: ${errorMessage}`,\n };\n }\n}\n\n/**\n * Check if a filename has a valid YAML extension\n *\n * @param filename - Filename to check\n * @returns True if filename ends with .yaml or .yml\n */\nexport function isYamlFile(filename: string): boolean {\n return filename.endsWith('.yaml') || filename.endsWith('.yml');\n}\n\n/**\n * Extract configuration name from filename\n * Removes the .yaml or .yml extension\n *\n * @param filename - Filename to process\n * @returns Configuration name without extension\n */\nexport function getConfigNameFromFilename(filename: string): string {\n return filename.replace(/\\.(yaml|yml)$/, '');\n}\n", "/**\n * Configuration loader for managing multiple graph configurations\n *\n * Supports loading configurations from the .vgc/ folder using the adapter pattern\n * for environment-agnostic file operations.\n */\n\nimport type { FileSystemAdapter } from '@principal-ai/repository-abstraction';\nimport type { PathBasedGraphConfiguration } from './types/path-based-config';\nimport { parseYaml, isYamlFile, getConfigNameFromFilename } from './utils/YamlParser';\n\n/**\n * Represents a single configuration file\n */\nexport interface ConfigurationFile {\n /** Configuration name (filename without extension) */\n name: string;\n /** Full path to the configuration file */\n path: string;\n /** Parsed configuration data */\n config: PathBasedGraphConfiguration;\n}\n\n/**\n * Result of loading all configurations\n */\nexport interface ConfigurationLoadResult {\n /** Successfully loaded configurations */\n configs: ConfigurationFile[];\n /** Errors encountered during loading */\n errors: Array<{ file: string; error: string }>;\n}\n\n/**\n * Loader for managing multiple graph configurations from .vgc/ folder\n */\nexport class ConfigurationLoader {\n private static readonly CONFIG_DIR = '.vgc';\n\n constructor(private fsAdapter: FileSystemAdapter) {}\n\n /**\n * Check if the .vgc/ configuration directory exists\n *\n * @param baseDir - Base directory to search from\n * @returns True if .vgc/ directory exists\n */\n hasConfigDirectory(baseDir: string): boolean {\n const configPath = this.fsAdapter.join(baseDir, ConfigurationLoader.CONFIG_DIR);\n return this.fsAdapter.exists(configPath) && this.fsAdapter.isDirectory(configPath);\n }\n\n /**\n * List all available configuration names in .vgc/ folder\n *\n * @param baseDir - Base directory containing .vgc/ folder\n * @returns Array of configuration names (without extensions)\n */\n listConfigurations(baseDir: string): string[] {\n if (!this.hasConfigDirectory(baseDir)) {\n return [];\n }\n\n const configPath = this.fsAdapter.join(baseDir, ConfigurationLoader.CONFIG_DIR);\n const files = this.fsAdapter.readDir(configPath);\n\n return files\n .filter(isYamlFile)\n .map(getConfigNameFromFilename)\n .sort();\n }\n\n /**\n * Load a specific configuration by name\n *\n * @param name - Configuration name (without extension)\n * @param baseDir - Base directory containing .vgc/ folder\n * @returns Configuration file or null if not found/invalid\n */\n loadByName(name: string, baseDir: string): ConfigurationFile | null {\n if (!this.hasConfigDirectory(baseDir)) {\n return null;\n }\n\n const configPath = this.fsAdapter.join(baseDir, ConfigurationLoader.CONFIG_DIR);\n\n // Try both .yaml and .yml extensions\n for (const ext of ['yaml', 'yml']) {\n const filename = `${name}.${ext}`;\n const fullPath = this.fsAdapter.join(configPath, filename);\n\n if (this.fsAdapter.exists(fullPath)) {\n try {\n const content = this.fsAdapter.readFile(fullPath);\n const parseResult = parseYaml(content, filename);\n\n if (parseResult.success && parseResult.data) {\n return {\n name,\n path: fullPath,\n config: parseResult.data,\n };\n }\n } catch (error) {\n // File exists but couldn't be read or parsed\n return null;\n }\n }\n }\n\n return null;\n }\n\n /**\n * Load all configurations from .vgc/ folder\n *\n * @param baseDir - Base directory containing .vgc/ folder\n * @returns Result containing all loaded configs and any errors\n */\n loadAll(baseDir: string): ConfigurationLoadResult {\n const result: ConfigurationLoadResult = {\n configs: [],\n errors: [],\n };\n\n if (!this.hasConfigDirectory(baseDir)) {\n result.errors.push({\n file: '.vgc',\n error: 'Configuration directory .vgc/ not found',\n });\n return result;\n }\n\n const configPath = this.fsAdapter.join(baseDir, ConfigurationLoader.CONFIG_DIR);\n const files = this.fsAdapter.readDir(configPath);\n\n for (const filename of files) {\n if (!isYamlFile(filename)) {\n continue; // Skip non-YAML files\n }\n\n const fullPath = this.fsAdapter.join(configPath, filename);\n const name = getConfigNameFromFilename(filename);\n\n try {\n const content = this.fsAdapter.readFile(fullPath);\n const parseResult = parseYaml(content, filename);\n\n if (parseResult.success && parseResult.data) {\n result.configs.push({\n name,\n path: fullPath,\n config: parseResult.data,\n });\n } else if (parseResult.error) {\n result.errors.push({\n file: filename,\n error: parseResult.error,\n });\n }\n } catch (error) {\n const errorMessage = error instanceof Error ? error.message : String(error);\n result.errors.push({\n file: filename,\n error: `Failed to read file: ${errorMessage}`,\n });\n }\n }\n\n // Sort configs by name for consistent ordering\n result.configs.sort((a, b) => a.name.localeCompare(b.name));\n\n return result;\n }\n\n /**\n * Get the configuration directory path\n *\n * @param baseDir - Base directory\n * @returns Full path to .vgc/ directory\n */\n getConfigDirectoryPath(baseDir: string): string {\n return this.fsAdapter.join(baseDir, ConfigurationLoader.CONFIG_DIR);\n }\n}\n", "/**\n * Rules Engine Type Definitions\n * Provides types for configuration validation rules\n */\n\n// ============================================================================\n// Rule Severity and Categories\n// ============================================================================\n\n/**\n * Severity levels following ESLint convention\n * - \"off\" or 0: Disable rule\n * - \"warn\" or 1: Warning (doesn't affect exit code)\n * - \"error\" or 2: Error (exit code 1)\n */\nexport type RuleSeverity = 'off' | 'warn' | 'error' | 0 | 1 | 2;\n\n/**\n * Normalized severity (string form only)\n */\nexport type NormalizedSeverity = 'off' | 'warn' | 'error';\n\n/**\n * Rule categories for grouping and filtering\n */\nexport type RuleCategory = 'schema' | 'reference' | 'structure' | 'pattern' | 'library';\n\n// ============================================================================\n// Rule Configuration (RC File)\n// ============================================================================\n\n/**\n * Full rule configuration object\n */\nexport interface RuleConfig {\n /**\n * Rule severity\n * @default \"error\"\n */\n severity?: RuleSeverity;\n\n /**\n * Rule-specific options\n */\n options?: Record<string, unknown>;\n}\n\n/**\n * VGC Configuration file schema\n */\nexport interface PrivuConfig {\n /**\n * Schema version for forward compatibility\n */\n $schema?: string;\n\n /**\n * Extend from a shared configuration\n * Can be a package name or relative path\n */\n extends?: string | string[];\n\n /**\n * Root flag - stop searching parent directories\n * @default false\n */\n root?: boolean;\n\n /**\n * Path to default component library\n * Used by library-node-type-match rule\n */\n library?: string;\n\n /**\n * Glob patterns for configuration files to lint\n * @default [\".vgc/**\\/*.yaml\", \".vgc/**\\/*.yml\", \".vgc/**\\/*.json\"]\n */\n include?: string[];\n\n /**\n * Glob patterns to exclude from linting\n * @default [\"**\\/node_modules/**\", \"**\\/*.test.*\"]\n */\n exclude?: string[];\n\n /**\n * Rule configurations\n */\n rules?: {\n [ruleId: string]: RuleConfig | RuleSeverity | false;\n };\n}\n\n// ============================================================================\n// Rule Definition\n// ============================================================================\n\n/**\n * Rule-specific options type (varies per rule)\n */\nexport type RuleOptions = Record<string, unknown>;\n\n/**\n * Definition of a validation rule\n */\nexport interface GraphRule<TOptions extends RuleOptions = RuleOptions> {\n /**\n * Unique rule identifier (kebab-case)\n */\n id: string;\n\n /**\n * Human-readable rule name\n */\n name: string;\n\n /**\n * Brief description of what the rule checks\n */\n description: string;\n\n /**\n * Explanation of why this rule matters\n */\n impact: string;\n\n /**\n * Default severity level\n * @default \"error\"\n */\n severity: NormalizedSeverity;\n\n /**\n * Rule category for grouping\n */\n category: RuleCategory;\n\n /**\n * Whether the rule is enabled by default\n * @default true\n */\n enabled: boolean;\n\n /**\n * Whether the rule supports auto-fix\n * @default false\n */\n fixable: boolean;\n\n /**\n * Default options for this rule\n */\n defaultOptions?: TOptions;\n\n /**\n * Execute the rule check\n */\n check: (context: GraphRuleContext<TOptions>) => Promise<GraphRuleViolation[]>;\n\n /**\n * Optional auto-fix implementation\n */\n fix?: (violation: GraphRuleViolation, context: GraphRuleContext<TOptions>) => Promise<FixResult>;\n}\n\n// ============================================================================\n// Rule Context\n// ============================================================================\n\nimport type { GraphConfiguration } from '../types';\nimport type { ComponentLibrary } from '../types/library';\n\n/**\n * Context passed to rules during evaluation\n */\nexport interface GraphRuleContext<TOptions extends RuleOptions = RuleOptions> {\n /**\n * The configuration being validated\n */\n configuration: GraphConfiguration;\n\n /**\n * Optional component library for library rules\n */\n library?: ComponentLibrary;\n\n /**\n * Path to the configuration file (for error reporting)\n */\n configPath?: string;\n\n /**\n * Path to the library file (for error reporting)\n */\n libraryPath?: string;\n\n /**\n * Raw YAML/JSON string (for line number lookup)\n */\n rawContent?: string;\n\n /**\n * Rule-specific options (merged with defaults)\n */\n options: TOptions;\n\n /**\n * All rule options from config (for cross-rule access if needed)\n */\n allRuleOptions?: Map<string, RuleOptions>;\n}\n\n// ============================================================================\n// Rule Violations\n// ============================================================================\n\n/**\n * A violation detected by a rule\n */\nexport interface GraphRuleViolation {\n /**\n * ID of the rule that detected this violation\n */\n ruleId: string;\n\n /**\n * Severity of this violation\n */\n severity: NormalizedSeverity;\n\n /**\n * Path to the file containing the violation\n */\n file?: string;\n\n /**\n * Line number in the file (1-indexed)\n */\n line?: number;\n\n /**\n * Column number in the file (1-indexed)\n */\n column?: number;\n\n /**\n * JSON path to the problematic field (e.g., \"nodeTypes.service.shape\")\n */\n path?: string;\n\n /**\n * Clear, actionable error message\n */\n message: string;\n\n /**\n * Explanation of why this matters\n */\n impact: string;\n\n /**\n * Suggestion for how to fix\n */\n suggestion?: string;\n\n /**\n * Whether this violation can be auto-fixed\n */\n fixable: boolean;\n\n /**\n * Data needed for auto-fix\n */\n fixData?: Record<string, unknown>;\n}\n\n// ============================================================================\n// Lint Results\n// ============================================================================\n\n/**\n * Result of running all rules\n */\nexport interface GraphLintResult {\n /**\n * All violations found\n */\n violations: GraphRuleViolation[];\n\n /**\n * Count of error-level violations\n */\n errorCount: number;\n\n /**\n * Count of warning-level violations\n */\n warningCount: number;\n\n /**\n * Count of fixable violations\n */\n fixableCount: number;\n\n /**\n * Violations grouped by category\n */\n byCategory: Record<RuleCategory, number>;\n\n /**\n * Violations grouped by rule ID\n */\n byRule: Record<string, number>;\n}\n\n// ============================================================================\n// Fix Results\n// ============================================================================\n\n/**\n * Result of attempting to fix a violation\n */\nexport interface FixResult {\n /**\n * Whether the fix was successful\n */\n success: boolean;\n\n /**\n * Description of what was fixed\n */\n message?: string;\n\n /**\n * New content after fix (if applicable)\n */\n newContent?: string;\n\n /**\n * Error message if fix failed\n */\n error?: string;\n}\n\n// ============================================================================\n// Lint Options\n// ============================================================================\n\n/**\n * Options for the lint operation\n */\nexport interface LintOptions {\n /**\n * Only run these rules (by ID)\n */\n enabledRules?: string[];\n\n /**\n * Skip these rules (by ID)\n */\n disabledRules?: string[];\n\n /**\n * Override severity for specific rules\n */\n severityOverrides?: Map<string, NormalizedSeverity>;\n\n /**\n * Component library for library rules\n */\n library?: ComponentLibrary;\n\n /**\n * Path to config file (for error reporting)\n */\n configPath?: string;\n\n /**\n * Path to library file (for error reporting)\n */\n libraryPath?: string;\n\n /**\n * Raw content for line number reporting\n */\n rawContent?: string;\n\n /**\n * Rule-specific options\n */\n ruleOptions?: Map<string, RuleOptions>;\n}\n\n// ============================================================================\n// Utility Types\n// ============================================================================\n\n/**\n * Normalize severity to string form\n */\nexport function normalizeSeverity(severity: RuleSeverity): NormalizedSeverity {\n if (typeof severity === 'number') {\n switch (severity) {\n case 0:\n return 'off';\n case 1:\n return 'warn';\n case 2:\n return 'error';\n default:\n return 'error';\n }\n }\n return severity;\n}\n\n/**\n * Check if a severity means the rule is disabled\n */\nexport function isRuleDisabled(severity: RuleSeverity | false | undefined): boolean {\n if (severity === false || severity === 'off' || severity === 0) {\n return true;\n }\n return false;\n}\n", "/**\n * Graph Rules Engine\n * Central orchestrator for configuration validation rules\n */\n\nimport type { GraphConfiguration } from '../types';\nimport type { ComponentLibrary } from '../types/library';\nimport type {\n GraphRule,\n GraphRuleContext,\n GraphRuleViolation,\n GraphLintResult,\n LintOptions,\n RuleOptions,\n NormalizedSeverity,\n RuleCategory,\n PrivuConfig,\n RuleConfig,\n RuleSeverity,\n} from './types';\nimport { normalizeSeverity, isRuleDisabled } from './types';\n\n/**\n * Graph Rules Engine - validates GraphConfiguration against registered rules\n */\nexport class GraphRulesEngine {\n private rules: Map<string, GraphRule> = new Map();\n\n constructor() {\n // Rules are registered via registerRule() or registerBuiltinRules()\n }\n\n /**\n * Register a single rule\n */\n registerRule(rule: GraphRule): void {\n if (this.rules.has(rule.id)) {\n throw new Error(`Rule \"${rule.id}\" is already registered`);\n }\n this.rules.set(rule.id, rule);\n }\n\n /**\n * Register multiple rules at once\n */\n registerRules(rules: GraphRule[]): void {\n for (const rule of rules) {\n this.registerRule(rule);\n }\n }\n\n /**\n * Unregister a rule by ID\n */\n unregisterRule(ruleId: string): boolean {\n return this.rules.delete(ruleId);\n }\n\n /**\n * Get a rule by ID\n */\n getRule(ruleId: string): GraphRule | undefined {\n return this.rules.get(ruleId);\n }\n\n /**\n * Get all registered rules\n */\n getAllRules(): Map<string, GraphRule> {\n return new Map(this.rules);\n }\n\n /**\n * Get rules by category\n */\n getRulesByCategory(category: RuleCategory): GraphRule[] {\n return Array.from(this.rules.values()).filter((rule) => rule.category === category);\n }\n\n /**\n * Lint a configuration against all enabled rules\n */\n async lint(configuration: GraphConfiguration, options?: LintOptions): Promise<GraphLintResult> {\n const violations: GraphRuleViolation[] = [];\n\n for (const [ruleId, rule] of this.rules) {\n // Check if rule should be skipped\n if (!this.shouldRunRule(rule, options)) {\n continue;\n }\n\n // Build context for this rule\n const context = this.buildRuleContext(configuration, rule, options);\n\n // Get effective severity\n const effectiveSeverity = this.getEffectiveSeverity(rule, options);\n if (effectiveSeverity === 'off') {\n continue;\n }\n\n try {\n // Execute rule check\n const ruleViolations = await rule.check(context);\n\n // Apply effective severity to all violations\n for (const violation of ruleViolations) {\n violation.severity = effectiveSeverity;\n violations.push(violation);\n }\n } catch (error) {\n // Rule execution error - report as a violation\n violations.push({\n ruleId,\n severity: 'error',\n message: `Rule \"${ruleId}\" threw an error: ${error instanceof Error ? error.message : String(error)}`,\n impact: 'Rule could not complete validation',\n fixable: false,\n });\n }\n }\n\n return this.buildResult(violations);\n }\n\n /**\n * Lint a configuration with VGC config file settings applied\n */\n async lintWithConfig(\n configuration: GraphConfiguration,\n privuConfig: PrivuConfig,\n options?: Omit<LintOptions, 'ruleOptions' | 'severityOverrides'>\n ): Promise<GraphLintResult> {\n // Convert VGC config rules to lint options\n const { ruleOptions, severityOverrides, disabledRules } = this.parsePrivuConfigRules(\n privuConfig.rules\n );\n\n return this.lint(configuration, {\n ...options,\n ruleOptions,\n severityOverrides,\n disabledRules: [...(options?.disabledRules ?? []), ...disabledRules],\n });\n }\n\n /**\n * Check if a rule should run based on options\n */\n private shouldRunRule(rule: GraphRule, options?: LintOptions): boolean {\n // Check disabled rules list\n if (options?.disabledRules?.includes(rule.id)) {\n return false;\n }\n\n // Check enabled rules list (if specified, only run those)\n if (options?.enabledRules && options.enabledRules.length > 0) {\n return options.enabledRules.includes(rule.id);\n }\n\n // Check rule's default enabled state\n return rule.enabled;\n }\n\n /**\n * Get the effective severity for a rule\n */\n private getEffectiveSeverity(rule: GraphRule, options?: LintOptions): NormalizedSeverity {\n // Check for override\n if (options?.severityOverrides?.has(rule.id)) {\n return options.severityOverrides.get(rule.id)!;\n }\n\n // Use rule's default severity\n return rule.severity;\n }\n\n /**\n * Build the context object for a rule\n */\n private buildRuleContext<TOptions extends RuleOptions>(\n configuration: GraphConfiguration,\n rule: GraphRule<TOptions>,\n options?: LintOptions\n ): GraphRuleContext<TOptions> {\n // Merge default options with provided options\n const ruleSpecificOptions = options?.ruleOptions?.get(rule.id) as TOptions | undefined;\n const mergedOptions = {\n ...rule.defaultOptions,\n ...ruleSpecificOptions,\n } as TOptions;\n\n return {\n configuration,\n library: options?.library,\n configPath: options?.configPath,\n libraryPath: options?.libraryPath,\n rawContent: options?.rawContent,\n options: mergedOptions,\n allRuleOptions: options?.ruleOptions,\n };\n }\n\n /**\n * Build the final lint result from violations\n */\n private buildResult(violations: GraphRuleViolation[]): GraphLintResult {\n const byCategory: Record<RuleCategory, number> = {\n schema: 0,\n reference: 0,\n structure: 0,\n pattern: 0,\n library: 0,\n };\n\n const byRule: Record<string, number> = {};\n\n let errorCount = 0;\n let warningCount = 0;\n let fixableCount = 0;\n\n for (const violation of violations) {\n // Count by severity\n if (violation.severity === 'error') {\n errorCount++;\n } else if (violation.severity === 'warn') {\n warningCount++;\n }\n\n // Count fixable\n if (violation.fixable) {\n fixableCount++;\n }\n\n // Count by rule\n byRule[violation.ruleId] = (byRule[violation.ruleId] ?? 0) + 1;\n\n // Count by category\n const rule = this.rules.get(violation.ruleId);\n if (rule) {\n byCategory[rule.category]++;\n }\n }\n\n return {\n violations,\n errorCount,\n warningCount,\n fixableCount,\n byCategory,\n byRule,\n };\n }\n\n /**\n * Parse VGC config rules into lint options\n */\n private parsePrivuConfigRules(rules?: PrivuConfig['rules']): {\n ruleOptions: Map<string, RuleOptions>;\n severityOverrides: Map<string, NormalizedSeverity>;\n disabledRules: string[];\n } {\n const ruleOptions = new Map<string, RuleOptions>();\n const severityOverrides = new Map<string, NormalizedSeverity>();\n const disabledRules: string[] = [];\n\n if (!rules) {\n return { ruleOptions, severityOverrides, disabledRules };\n }\n\n for (const [ruleId, config] of Object.entries(rules)) {\n // Handle false (disabled)\n if (config === false) {\n disabledRules.push(ruleId);\n continue;\n }\n\n // Handle severity shorthand\n if (typeof config === 'string' || typeof config === 'number') {\n const severity = normalizeSeverity(config as RuleSeverity);\n if (severity === 'off') {\n disabledRules.push(ruleId);\n } else {\n severityOverrides.set(ruleId, severity);\n }\n continue;\n }\n\n // Handle full config object\n const ruleConfig = config as RuleConfig;\n\n if (ruleConfig.severity !== undefined) {\n const severity = normalizeSeverity(ruleConfig.severity);\n if (severity === 'off') {\n disabledRules.push(ruleId);\n } else {\n severityOverrides.set(ruleId, severity);\n }\n }\n\n if (ruleConfig.options) {\n ruleOptions.set(ruleId, ruleConfig.options);\n }\n }\n\n return { ruleOptions, severityOverrides, disabledRules };\n }\n}\n\n/**\n * Create a new rules engine with optional initial rules\n */\nexport function createRulesEngine(rules?: GraphRule[]): GraphRulesEngine {\n const engine = new GraphRulesEngine();\n if (rules) {\n engine.registerRules(rules);\n }\n return engine;\n}\n", "/**\n * VGC Configuration Loader and Validator\n * Handles loading and validating .vgcrc files\n */\n\nimport type { PrivuConfig, RuleSeverity, RuleConfig } from './types';\n\n// ============================================================================\n// Constants\n// ============================================================================\n\n/**\n * Valid config file names in resolution order\n */\nexport const CONFIG_FILE_NAMES = [\n '.vgcrc.json',\n '.vgcrc.yaml',\n '.vgcrc.yml',\n 'vgc.config.json',\n 'vgc.config.yaml',\n 'vgc.config.yml',\n] as const;\n\n/**\n * Default include patterns\n */\nexport const DEFAULT_INCLUDE_PATTERNS = ['.vgc/**/*.yaml', '.vgc/**/*.yml', '.vgc/**/*.json'];\n\n/**\n * Default exclude patterns\n */\nexport const DEFAULT_EXCLUDE_PATTERNS = ['**/node_modules/**', '**/*.test.*'];\n\n/**\n * Valid severity values\n */\nexport const VALID_SEVERITIES: readonly (RuleSeverity | false)[] = [\n 'off',\n 'warn',\n 'error',\n 0,\n 1,\n 2,\n false,\n];\n\n/**\n * All valid rule IDs\n */\nexport const VALID_RULE_IDS = [\n // Schema rules\n 'no-unknown-fields',\n 'required-metadata',\n 'valid-node-types',\n 'valid-edge-types',\n 'valid-color-format',\n // Reference rules\n 'connection-type-references',\n 'state-transition-references',\n // Structure rules\n 'minimum-node-sources',\n 'orphaned-node-types',\n 'orphaned-edge-types',\n 'unreachable-states',\n 'dead-end-states',\n // Pattern rules\n 'valid-action-patterns',\n // Library rules\n 'library-node-type-match',\n] as const;\n\nexport type ValidRuleId = (typeof VALID_RULE_IDS)[number];\n\n/**\n * Rule-specific valid options\n */\nexport const RULE_OPTIONS_SCHEMA: Record<string, string[]> = {\n 'minimum-node-sources': ['minimum', 'excludeNodeTypes'],\n 'dead-end-states': ['terminalStates'],\n 'valid-action-patterns': ['strictMode'],\n 'library-node-type-match': ['allowExtra'],\n};\n\n// ============================================================================\n// Validation Errors\n// ============================================================================\n\nexport interface ConfigValidationError {\n path: string;\n message: string;\n suggestion?: string;\n}\n\nexport interface ConfigValidationResult {\n valid: boolean;\n errors: ConfigValidationError[];\n config?: PrivuConfig;\n}\n\n// ============================================================================\n// Validation Functions\n// ============================================================================\n\n/**\n * Validate a VGC configuration object\n */\nexport function validatePrivuConfig(config: unknown): ConfigValidationResult {\n const errors: ConfigValidationError[] = [];\n\n if (typeof config !== 'object' || config === null) {\n return {\n valid: false,\n errors: [{ path: '', message: 'Configuration must be an object' }],\n };\n }\n\n const configObj = config as Record<string, unknown>;\n\n // Validate known top-level fields\n const validTopLevelFields = [\n '$schema',\n 'extends',\n 'root',\n 'library',\n 'include',\n 'exclude',\n 'rules',\n ];\n\n for (const key of Object.keys(configObj)) {\n if (!validTopLevelFields.includes(key)) {\n const suggestion = findSimilarString(key, validTopLevelFields);\n errors.push({\n path: key,\n message: `Unknown configuration field \"${key}\"`,\n suggestion: suggestion ? `Did you mean \"${suggestion}\"?` : undefined,\n });\n }\n }\n\n // Validate $schema\n if (configObj.$schema !== undefined && typeof configObj.$schema !== 'string') {\n errors.push({\n path: '$schema',\n message: '$schema must be a string',\n });\n }\n\n // Validate extends\n if (configObj.extends !== undefined) {\n if (\n typeof configObj.extends !== 'string' &&\n !(\n Array.isArray(configObj.extends) &&\n configObj.extends.every((e) => typeof e === 'string')\n )\n ) {\n errors.push({\n path: 'extends',\n message: 'extends must be a string or array of strings',\n });\n }\n }\n\n // Validate root\n if (configObj.root !== undefined && typeof configObj.root !== 'boolean') {\n errors.push({\n path: 'root',\n message: 'root must be a boolean',\n });\n }\n\n // Validate library\n if (configObj.library !== undefined && typeof configObj.library !== 'string') {\n errors.push({\n path: 'library',\n message: 'library must be a string path',\n });\n }\n\n // Validate include\n if (configObj.include !== undefined) {\n if (\n !Array.isArray(configObj.include) ||\n !configObj.include.every((p) => typeof p === 'string')\n ) {\n errors.push({\n path: 'include',\n message: 'include must be an array of strings',\n });\n }\n }\n\n // Validate exclude\n if (configObj.exclude !== undefined) {\n if (\n !Array.isArray(configObj.exclude) ||\n !configObj.exclude.every((p) => typeof p === 'string')\n ) {\n errors.push({\n path: 'exclude',\n message: 'exclude must be an array of strings',\n });\n }\n }\n\n // Validate rules\n if (configObj.rules !== undefined) {\n if (typeof configObj.rules !== 'object' || configObj.rules === null) {\n errors.push({\n path: 'rules',\n message: 'rules must be an object',\n });\n } else {\n const rulesErrors = validateRulesConfig(configObj.rules as Record<string, unknown>);\n errors.push(...rulesErrors);\n }\n }\n\n if (errors.length > 0) {\n return { valid: false, errors };\n }\n\n return {\n valid: true,\n errors: [],\n config: configObj as PrivuConfig,\n };\n}\n\n/**\n * Validate the rules section of a VGC config\n */\nfunction validateRulesConfig(rules: Record<string, unknown>): ConfigValidationError[] {\n const errors: ConfigValidationError[] = [];\n\n for (const [ruleId, ruleConfig] of Object.entries(rules)) {\n const path = `rules.${ruleId}`;\n\n // Check if rule ID is valid\n if (!VALID_RULE_IDS.includes(ruleId as ValidRuleId)) {\n const suggestion = findSimilarString(ruleId, [...VALID_RULE_IDS]);\n errors.push({\n path,\n message: `Unknown rule ID \"${ruleId}\"`,\n suggestion: suggestion ? `Did you mean \"${suggestion}\"?` : undefined,\n });\n continue;\n }\n\n // Handle false (disabled)\n if (ruleConfig === false) {\n continue;\n }\n\n // Handle severity shorthand\n if (typeof ruleConfig === 'string' || typeof ruleConfig === 'number') {\n if (!isValidSeverity(ruleConfig)) {\n errors.push({\n path,\n message: `Invalid severity \"${ruleConfig}\" for rule \"${ruleId}\"`,\n suggestion: 'Allowed values: \"off\", \"warn\", \"error\", 0, 1, 2',\n });\n }\n continue;\n }\n\n // Handle full config object\n if (typeof ruleConfig !== 'object' || ruleConfig === null) {\n errors.push({\n path,\n message: `Rule configuration must be a severity string, number, false, or config object`,\n });\n continue;\n }\n\n const ruleConfigObj = ruleConfig as Record<string, unknown>;\n\n // Validate config object fields\n const validRuleConfigFields = ['severity', 'options'];\n for (const key of Object.keys(ruleConfigObj)) {\n if (!validRuleConfigFields.includes(key)) {\n errors.push({\n path: `${path}.${key}`,\n message: `Unknown rule config field \"${key}\"`,\n suggestion: `Allowed fields: ${validRuleConfigFields.join(', ')}`,\n });\n }\n }\n\n // Validate severity\n if (ruleConfigObj.severity !== undefined) {\n if (!isValidSeverity(ruleConfigObj.severity)) {\n errors.push({\n path: `${path}.severity`,\n message: `Invalid severity \"${ruleConfigObj.severity}\"`,\n suggestion: 'Allowed values: \"off\", \"warn\", \"error\", 0, 1, 2',\n });\n }\n }\n\n // Validate options\n if (ruleConfigObj.options !== undefined) {\n if (typeof ruleConfigObj.options !== 'object' || ruleConfigObj.options === null) {\n errors.push({\n path: `${path}.options`,\n message: 'options must be an object',\n });\n } else {\n // Validate rule-specific options\n const validOptions = RULE_OPTIONS_SCHEMA[ruleId];\n if (validOptions) {\n const optionsObj = ruleConfigObj.options as Record<string, unknown>;\n for (const optionKey of Object.keys(optionsObj)) {\n if (!validOptions.includes(optionKey)) {\n const suggestion = findSimilarString(optionKey, validOptions);\n errors.push({\n path: `${path}.options.${optionKey}`,\n message: `Unknown option \"${optionKey}\" for rule \"${ruleId}\"`,\n suggestion: suggestion\n ? `Did you mean \"${suggestion}\"?`\n : `Allowed options: ${validOptions.join(', ')}`,\n });\n }\n }\n }\n }\n }\n }\n\n return errors;\n}\n\n/**\n * Check if a value is a valid severity\n */\nfunction isValidSeverity(value: unknown): value is RuleSeverity {\n return VALID_SEVERITIES.includes(value as RuleSeverity);\n}\n\n// ============================================================================\n// Default Config\n// ============================================================================\n\n/**\n * Get the default VGC configuration\n */\nexport function getDefaultConfig(): PrivuConfig {\n return {\n root: false,\n include: DEFAULT_INCLUDE_PATTERNS,\n exclude: DEFAULT_EXCLUDE_PATTERNS,\n rules: {},\n };\n}\n\n/**\n * Merge configs with proper precedence (later configs override earlier)\n */\nexport function mergeConfigs(...configs: (PrivuConfig | undefined)[]): PrivuConfig {\n const result = getDefaultConfig();\n\n for (const config of configs) {\n if (!config) continue;\n\n if (config.root !== undefined) result.root = config.root;\n if (config.library !== undefined) result.library = config.library;\n if (config.include !== undefined) result.include = config.include;\n if (config.exclude !== undefined) result.exclude = config.exclude;\n\n // Merge rules\n if (config.rules) {\n result.rules = { ...result.rules, ...config.rules };\n }\n }\n\n return result;\n}\n\n// ============================================================================\n// Utility Functions\n// ============================================================================\n\n/**\n * Find a similar string from a list (for \"did you mean\" suggestions)\n */\nfunction findSimilarString(input: string, candidates: string[]): string | null {\n const inputLower = input.toLowerCase();\n let bestMatch: string | null = null;\n let bestDistance = Infinity;\n\n for (const candidate of candidates) {\n const candidateLower = candidate.toLowerCase();\n\n // Exact substring match\n if (inputLower.includes(candidateLower) || candidateLower.includes(inputLower)) {\n return candidate;\n }\n\n // Calculate Levenshtein distance\n const distance = levenshteinDistance(inputLower, candidateLower);\n\n // Accept if distance is small relative to string length\n if (distance <= 3 && distance < bestDistance) {\n bestDistance = distance;\n bestMatch = candidate;\n }\n }\n\n return bestMatch;\n}\n\n/**\n * Calculate Levenshtein edit distance between two strings\n */\nfunction levenshteinDistance(a: string, b: string): number {\n const matrix: number[][] = [];\n\n // Initialize matrix\n for (let i = 0; i <= a.length; i++) {\n matrix[i] = [i];\n }\n for (let j = 0; j <= b.length; j++) {\n matrix[0][j] = j;\n }\n\n // Fill matrix\n for (let i = 1; i <= a.length; i++) {\n for (let j = 1; j <= b.length; j++) {\n const cost = a[i - 1] === b[j - 1] ? 0 : 1;\n matrix[i][j] = Math.min(\n matrix[i - 1][j] + 1, // deletion\n matrix[i][j - 1] + 1, // insertion\n matrix[i - 1][j - 1] + cost // substitution\n );\n }\n }\n\n return matrix[a.length][b.length];\n}\n\n/**\n * Format config validation errors for display\n */\nexport function formatConfigErrors(errors: ConfigValidationError[]): string {\n const lines: string[] = [];\n\n for (const error of errors) {\n lines.push(` error ${error.path || '(root)'}: ${error.message}`);\n if (error.suggestion) {\n lines.push(` \u2192 ${error.suggestion}`);\n }\n }\n\n lines.push('');\n lines.push(` \u2716 ${errors.length} configuration error${errors.length === 1 ? '' : 's'}`);\n\n return lines.join('\\n');\n}\n", "/**\n * Rule: required-metadata\n * Ensures configuration has required metadata fields (name, version)\n */\n\nimport type { GraphRule, GraphRuleContext, GraphRuleViolation } from '../types';\n\nexport const requiredMetadata: GraphRule = {\n id: 'required-metadata',\n name: 'Required Metadata',\n description: 'Configuration must have name and version in metadata',\n impact: 'Missing metadata makes configurations hard to identify and version',\n severity: 'error',\n category: 'schema',\n enabled: true,\n fixable: false,\n\n async check(context: GraphRuleContext): Promise<GraphRuleViolation[]> {\n const violations: GraphRuleViolation[] = [];\n const { configuration, configPath } = context;\n\n if (!configuration.metadata) {\n violations.push({\n ruleId: 'required-metadata',\n severity: 'error',\n file: configPath,\n path: 'metadata',\n message: 'Configuration is missing metadata section',\n impact: 'Cannot identify or version this configuration',\n suggestion: 'Add a metadata section with name and version fields',\n fixable: false,\n });\n return violations;\n }\n\n if (!configuration.metadata.name) {\n violations.push({\n ruleId: 'required-metadata',\n severity: 'error',\n file: configPath,\n path: 'metadata.name',\n message: 'Configuration metadata is missing required \"name\" field',\n impact: 'Cannot identify this configuration',\n suggestion: 'Add a name field to metadata',\n fixable: false,\n });\n }\n\n if (!configuration.metadata.version) {\n violations.push({\n ruleId: 'required-metadata',\n severity: 'error',\n file: configPath,\n path: 'metadata.version',\n message: 'Configuration metadata is missing required \"version\" field',\n impact: 'Cannot track configuration versions',\n suggestion: 'Add a version field (e.g., \"1.0.0\") to metadata',\n fixable: false,\n });\n }\n\n return violations;\n },\n};\n", "/**\n * Rule: valid-node-types\n * Ensures nodeTypes have required fields and valid values\n */\n\nimport type { GraphRule, GraphRuleContext, GraphRuleViolation } from '../types';\n\n/**\n * Valid shape values for nodes\n */\nconst VALID_SHAPES = ['circle', 'rectangle', 'hexagon', 'diamond', 'custom'] as const;\n\n/**\n * Valid animation types\n */\nconst VALID_ANIMATION_TYPES = ['flow', 'pulse', 'particle', 'glow'] as const;\n\n/**\n * Valid data schema field types\n */\nconst VALID_DATA_TYPES = ['string', 'number', 'boolean', 'object', 'array'] as const;\n\nexport const validNodeTypes: GraphRule = {\n id: 'valid-node-types',\n name: 'Valid Node Types',\n description: 'nodeTypes must have required fields and valid values',\n impact: 'Invalid node types will cause rendering errors or unexpected behavior',\n severity: 'error',\n category: 'schema',\n enabled: true,\n fixable: false,\n\n async check(context: GraphRuleContext): Promise<GraphRuleViolation[]> {\n const violations: GraphRuleViolation[] = [];\n const { configuration, configPath } = context;\n\n if (!configuration.nodeTypes) {\n violations.push({\n ruleId: 'valid-node-types',\n severity: 'error',\n file: configPath,\n path: 'nodeTypes',\n message: 'Configuration is missing nodeTypes section',\n impact: 'No nodes can be defined without nodeTypes',\n suggestion: 'Add a nodeTypes section with at least one node type definition',\n fixable: false,\n });\n return violations;\n }\n\n if (Object.keys(configuration.nodeTypes).length === 0) {\n violations.push({\n ruleId: 'valid-node-types',\n severity: 'error',\n file: configPath,\n path: 'nodeTypes',\n message: 'nodeTypes section is empty',\n impact: 'No nodes can be defined without at least one node type',\n suggestion: 'Add at least one node type definition',\n fixable: false,\n });\n return violations;\n }\n\n for (const [typeId, nodeType] of Object.entries(configuration.nodeTypes)) {\n const basePath = `nodeTypes.${typeId}`;\n\n // Check required shape field\n if (!nodeType.shape) {\n violations.push({\n ruleId: 'valid-node-types',\n severity: 'error',\n file: configPath,\n path: `${basePath}.shape`,\n message: `Node type \"${typeId}\" is missing required \"shape\" field`,\n impact: 'Node cannot be rendered without a shape',\n suggestion: `Add a shape field. Valid values: ${VALID_SHAPES.join(', ')}`,\n fixable: false,\n });\n } else if (!VALID_SHAPES.includes(nodeType.shape as (typeof VALID_SHAPES)[number])) {\n violations.push({\n ruleId: 'valid-node-types',\n severity: 'error',\n file: configPath,\n path: `${basePath}.shape`,\n message: `Node type \"${typeId}\" has invalid shape \"${nodeType.shape}\"`,\n impact: 'Node may not render correctly',\n suggestion: `Valid shapes: ${VALID_SHAPES.join(', ')}`,\n fixable: false,\n });\n }\n\n // Check dataSchema field types\n if (nodeType.dataSchema) {\n for (const [fieldName, fieldDef] of Object.entries(nodeType.dataSchema)) {\n if (!fieldDef.type) {\n violations.push({\n ruleId: 'valid-node-types',\n severity: 'error',\n file: configPath,\n path: `${basePath}.dataSchema.${fieldName}.type`,\n message: `Data schema field \"${fieldName}\" in node type \"${typeId}\" is missing \"type\"`,\n impact: 'Data validation will not work for this field',\n suggestion: `Add a type field. Valid values: ${VALID_DATA_TYPES.join(', ')}`,\n fixable: false,\n });\n } else if (!VALID_DATA_TYPES.includes(fieldDef.type as (typeof VALID_DATA_TYPES)[number])) {\n violations.push({\n ruleId: 'valid-node-types',\n severity: 'error',\n file: configPath,\n path: `${basePath}.dataSchema.${fieldName}.type`,\n message: `Invalid data type \"${fieldDef.type}\" for field \"${fieldName}\" in node type \"${typeId}\"`,\n impact: 'Data validation may fail',\n suggestion: `Valid types: ${VALID_DATA_TYPES.join(', ')}`,\n fixable: false,\n });\n }\n }\n }\n\n // Check states have valid structure\n if (nodeType.states) {\n for (const [stateName, stateDef] of Object.entries(nodeType.states)) {\n // States should be objects (even if empty)\n if (typeof stateDef !== 'object' || stateDef === null) {\n violations.push({\n ruleId: 'valid-node-types',\n severity: 'error',\n file: configPath,\n path: `${basePath}.states.${stateName}`,\n message: `State \"${stateName}\" in node type \"${typeId}\" must be an object`,\n impact: 'State definition is invalid',\n suggestion: 'State should be an object with optional color, icon, and label fields',\n fixable: false,\n });\n }\n }\n }\n\n // Check size has valid structure\n if (nodeType.size) {\n if (typeof nodeType.size.width !== 'number' || typeof nodeType.size.height !== 'number') {\n violations.push({\n ruleId: 'valid-node-types',\n severity: 'error',\n file: configPath,\n path: `${basePath}.size`,\n message: `Node type \"${typeId}\" size must have numeric width and height`,\n impact: 'Node size may not render correctly',\n suggestion: 'Provide size as { width: number, height: number }',\n fixable: false,\n });\n }\n }\n\n // Check layout has valid structure\n if (nodeType.layout) {\n if (nodeType.layout.layer !== undefined && typeof nodeType.layout.layer !== 'number') {\n violations.push({\n ruleId: 'valid-node-types',\n severity: 'error',\n file: configPath,\n path: `${basePath}.layout.layer`,\n message: `Node type \"${typeId}\" layout.layer must be a number`,\n impact: 'Layout layering may not work correctly',\n suggestion: 'Provide layer as a number',\n fixable: false,\n });\n }\n\n if (nodeType.layout.cluster !== undefined && typeof nodeType.layout.cluster !== 'string') {\n violations.push({\n ruleId: 'valid-node-types',\n severity: 'error',\n file: configPath,\n path: `${basePath}.layout.cluster`,\n message: `Node type \"${typeId}\" layout.cluster must be a string`,\n impact: 'Cluster grouping may not work correctly',\n suggestion: 'Provide cluster as a string identifier',\n fixable: false,\n });\n }\n }\n }\n\n return violations;\n },\n};\n", "/**\n * Rule: valid-edge-types\n * Ensures edgeTypes have required fields and valid values\n */\n\nimport type { GraphRule, GraphRuleContext, GraphRuleViolation } from '../types';\n\n/**\n * Valid style values for edges\n */\nconst VALID_STYLES = ['solid', 'dashed', 'dotted', 'animated'] as const;\n\n/**\n * Valid animation types\n */\nconst VALID_ANIMATION_TYPES = ['flow', 'pulse', 'particle', 'glow'] as const;\n\n/**\n * Valid label positions\n */\nconst VALID_LABEL_POSITIONS = ['start', 'middle', 'end'] as const;\n\n/**\n * Valid data schema field types\n */\nconst VALID_DATA_TYPES = ['string', 'number', 'boolean', 'object', 'array'] as const;\n\nexport const validEdgeTypes: GraphRule = {\n id: 'valid-edge-types',\n name: 'Valid Edge Types',\n description: 'edgeTypes must have required fields and valid values',\n impact: 'Invalid edge types will cause rendering errors or unexpected behavior',\n severity: 'error',\n category: 'schema',\n enabled: true,\n fixable: false,\n\n async check(context: GraphRuleContext): Promise<GraphRuleViolation[]> {\n const violations: GraphRuleViolation[] = [];\n const { configuration, configPath } = context;\n\n if (!configuration.edgeTypes) {\n violations.push({\n ruleId: 'valid-edge-types',\n severity: 'error',\n file: configPath,\n path: 'edgeTypes',\n message: 'Configuration is missing edgeTypes section',\n impact: 'No edges can be defined without edgeTypes',\n suggestion: 'Add an edgeTypes section with at least one edge type definition',\n fixable: false,\n });\n return violations;\n }\n\n if (Object.keys(configuration.edgeTypes).length === 0) {\n violations.push({\n ruleId: 'valid-edge-types',\n severity: 'error',\n file: configPath,\n path: 'edgeTypes',\n message: 'edgeTypes section is empty',\n impact: 'No edges can be defined without at least one edge type',\n suggestion: 'Add at least one edge type definition',\n fixable: false,\n });\n return violations;\n }\n\n for (const [typeId, edgeType] of Object.entries(configuration.edgeTypes)) {\n const basePath = `edgeTypes.${typeId}`;\n\n // Check required style field\n if (!edgeType.style) {\n violations.push({\n ruleId: 'valid-edge-types',\n severity: 'error',\n file: configPath,\n path: `${basePath}.style`,\n message: `Edge type \"${typeId}\" is missing required \"style\" field`,\n impact: 'Edge cannot be rendered without a style',\n suggestion: `Add a style field. Valid values: ${VALID_STYLES.join(', ')}`,\n fixable: false,\n });\n } else if (!VALID_STYLES.includes(edgeType.style as (typeof VALID_STYLES)[number])) {\n violations.push({\n ruleId: 'valid-edge-types',\n severity: 'error',\n file: configPath,\n path: `${basePath}.style`,\n message: `Edge type \"${typeId}\" has invalid style \"${edgeType.style}\"`,\n impact: 'Edge may not render correctly',\n suggestion: `Valid styles: ${VALID_STYLES.join(', ')}`,\n fixable: false,\n });\n }\n\n // Check width is a number if provided\n if (edgeType.width !== undefined && typeof edgeType.width !== 'number') {\n violations.push({\n ruleId: 'valid-edge-types',\n severity: 'error',\n file: configPath,\n path: `${basePath}.width`,\n message: `Edge type \"${typeId}\" width must be a number`,\n impact: 'Edge width may not render correctly',\n suggestion: 'Provide width as a number (e.g., 2)',\n fixable: false,\n });\n }\n\n // Check directed is a boolean if provided\n if (edgeType.directed !== undefined && typeof edgeType.directed !== 'boolean') {\n violations.push({\n ruleId: 'valid-edge-types',\n severity: 'error',\n file: configPath,\n path: `${basePath}.directed`,\n message: `Edge type \"${typeId}\" directed must be a boolean`,\n impact: 'Edge direction may not work correctly',\n suggestion: 'Provide directed as true or false',\n fixable: false,\n });\n }\n\n // Check animated is a boolean if provided\n if (edgeType.animated !== undefined && typeof edgeType.animated !== 'boolean') {\n violations.push({\n ruleId: 'valid-edge-types',\n severity: 'error',\n file: configPath,\n path: `${basePath}.animated`,\n message: `Edge type \"${typeId}\" animated must be a boolean`,\n impact: 'Edge animation may not work correctly',\n suggestion: 'Provide animated as true or false',\n fixable: false,\n });\n }\n\n // Check label configuration\n if (edgeType.label) {\n if (typeof edgeType.label !== 'object' || edgeType.label === null) {\n violations.push({\n ruleId: 'valid-edge-types',\n severity: 'error',\n file: configPath,\n path: `${basePath}.label`,\n message: `Edge type \"${typeId}\" label must be an object`,\n impact: 'Edge label configuration is invalid',\n suggestion: 'Provide label as { field?: string, position?: \"start\" | \"middle\" | \"end\" }',\n fixable: false,\n });\n } else {\n if (edgeType.label.position !== undefined) {\n if (!VALID_LABEL_POSITIONS.includes(edgeType.label.position as (typeof VALID_LABEL_POSITIONS)[number])) {\n violations.push({\n ruleId: 'valid-edge-types',\n severity: 'error',\n file: configPath,\n path: `${basePath}.label.position`,\n message: `Edge type \"${typeId}\" has invalid label position \"${edgeType.label.position}\"`,\n impact: 'Label may not appear in expected position',\n suggestion: `Valid positions: ${VALID_LABEL_POSITIONS.join(', ')}`,\n fixable: false,\n });\n }\n }\n }\n }\n\n // Check animation configuration\n if (edgeType.animation) {\n if (typeof edgeType.animation !== 'object' || edgeType.animation === null) {\n violations.push({\n ruleId: 'valid-edge-types',\n severity: 'error',\n file: configPath,\n path: `${basePath}.animation`,\n message: `Edge type \"${typeId}\" animation must be an object`,\n impact: 'Edge animation configuration is invalid',\n suggestion: 'Provide animation as { type: \"flow\" | \"pulse\" | \"particle\" | \"glow\", duration?: number }',\n fixable: false,\n });\n } else {\n // Check animation type\n if (!edgeType.animation.type) {\n violations.push({\n ruleId: 'valid-edge-types',\n severity: 'error',\n file: configPath,\n path: `${basePath}.animation.type`,\n message: `Edge type \"${typeId}\" animation is missing required \"type\" field`,\n impact: 'Animation cannot run without a type',\n suggestion: `Add a type field. Valid values: ${VALID_ANIMATION_TYPES.join(', ')}`,\n fixable: false,\n });\n } else if (!VALID_ANIMATION_TYPES.includes(edgeType.animation.type as (typeof VALID_ANIMATION_TYPES)[number])) {\n violations.push({\n ruleId: 'valid-edge-types',\n severity: 'error',\n file: configPath,\n path: `${basePath}.animation.type`,\n message: `Edge type \"${typeId}\" has invalid animation type \"${edgeType.animation.type}\"`,\n impact: 'Animation may not work correctly',\n suggestion: `Valid animation types: ${VALID_ANIMATION_TYPES.join(', ')}`,\n fixable: false,\n });\n }\n\n // Check animation duration\n if (edgeType.animation.duration !== undefined && typeof edgeType.animation.duration !== 'number') {\n violations.push({\n ruleId: 'valid-edge-types',\n severity: 'error',\n file: configPath,\n path: `${basePath}.animation.duration`,\n message: `Edge type \"${typeId}\" animation duration must be a number`,\n impact: 'Animation timing may not work correctly',\n suggestion: 'Provide duration as a number in milliseconds',\n fixable: false,\n });\n }\n }\n }\n\n // Check dataSchema field types\n if (edgeType.dataSchema) {\n for (const [fieldName, fieldDef] of Object.entries(edgeType.dataSchema)) {\n if (!fieldDef.type) {\n violations.push({\n ruleId: 'valid-edge-types',\n severity: 'error',\n file: configPath,\n path: `${basePath}.dataSchema.${fieldName}.type`,\n message: `Data schema field \"${fieldName}\" in edge type \"${typeId}\" is missing \"type\"`,\n impact: 'Data validation will not work for this field',\n suggestion: `Add a type field. Valid values: ${VALID_DATA_TYPES.join(', ')}`,\n fixable: false,\n });\n } else if (!VALID_DATA_TYPES.includes(fieldDef.type as (typeof VALID_DATA_TYPES)[number])) {\n violations.push({\n ruleId: 'valid-edge-types',\n severity: 'error',\n file: configPath,\n path: `${basePath}.dataSchema.${fieldName}.type`,\n message: `Invalid data type \"${fieldDef.type}\" for field \"${fieldName}\" in edge type \"${typeId}\"`,\n impact: 'Data validation may fail',\n suggestion: `Valid types: ${VALID_DATA_TYPES.join(', ')}`,\n fixable: false,\n });\n }\n }\n }\n }\n\n return violations;\n },\n};\n", "/**\n * Rule: valid-color-format\n * Ensures all color values are valid hex codes\n */\n\nimport type { GraphRule, GraphRuleContext, GraphRuleViolation } from '../types';\n\n/**\n * Regex for valid hex color codes (#RGB or #RRGGBB)\n */\nconst HEX_COLOR_REGEX = /^#([0-9A-Fa-f]{3}|[0-9A-Fa-f]{6})$/;\n\nexport const validColorFormat: GraphRule = {\n id: 'valid-color-format',\n name: 'Valid Color Format',\n description: 'Color values must be valid hex codes (#RGB or #RRGGBB)',\n impact: 'Invalid colors may render incorrectly or cause visualization errors',\n severity: 'error',\n category: 'schema',\n enabled: true,\n fixable: true,\n\n async check(context: GraphRuleContext): Promise<GraphRuleViolation[]> {\n const violations: GraphRuleViolation[] = [];\n const { configuration, configPath } = context;\n\n // Check nodeTypes colors\n if (configuration.nodeTypes) {\n for (const [typeId, nodeType] of Object.entries(configuration.nodeTypes)) {\n // Check node color\n if (nodeType.color && !isValidColor(nodeType.color)) {\n violations.push(createColorViolation(\n configPath,\n `nodeTypes.${typeId}.color`,\n nodeType.color,\n `node type \"${typeId}\"`\n ));\n }\n\n // Check node stroke color\n if (nodeType.stroke && !isValidColor(nodeType.stroke)) {\n violations.push(createColorViolation(\n configPath,\n `nodeTypes.${typeId}.stroke`,\n nodeType.stroke,\n `node type \"${typeId}\" stroke`\n ));\n }\n\n // Check state colors\n if (nodeType.states) {\n for (const [stateName, stateDef] of Object.entries(nodeType.states)) {\n if (stateDef.color && !isValidColor(stateDef.color)) {\n violations.push(createColorViolation(\n configPath,\n `nodeTypes.${typeId}.states.${stateName}.color`,\n stateDef.color,\n `state \"${stateName}\" in node type \"${typeId}\"`\n ));\n }\n }\n }\n }\n }\n\n // Check edgeTypes colors\n if (configuration.edgeTypes) {\n for (const [typeId, edgeType] of Object.entries(configuration.edgeTypes)) {\n // Check edge color\n if (edgeType.color && !isValidColor(edgeType.color)) {\n violations.push(createColorViolation(\n configPath,\n `edgeTypes.${typeId}.color`,\n edgeType.color,\n `edge type \"${typeId}\"`\n ));\n }\n\n // Check animation color\n if (edgeType.animation?.color && !isValidColor(edgeType.animation.color)) {\n violations.push(createColorViolation(\n configPath,\n `edgeTypes.${typeId}.animation.color`,\n edgeType.animation.color,\n `animation in edge type \"${typeId}\"`\n ));\n }\n }\n }\n\n // Check display theme colors\n if (configuration.display?.theme) {\n const theme = configuration.display.theme;\n const themeColors = ['primary', 'success', 'warning', 'danger', 'info'] as const;\n\n for (const colorKey of themeColors) {\n const colorValue = theme[colorKey];\n if (colorValue && !isValidColor(colorValue)) {\n violations.push(createColorViolation(\n configPath,\n `display.theme.${colorKey}`,\n colorValue,\n `theme ${colorKey} color`\n ));\n }\n }\n }\n\n return violations;\n },\n};\n\n/**\n * Check if a color value is valid\n */\nfunction isValidColor(color: string): boolean {\n return HEX_COLOR_REGEX.test(color);\n}\n\n/**\n * Create a color format violation\n */\nfunction createColorViolation(\n configPath: string | undefined,\n path: string,\n value: string,\n description: string\n): GraphRuleViolation {\n return {\n ruleId: 'valid-color-format',\n severity: 'error',\n file: configPath,\n path,\n message: `Invalid color format \"${value}\" for ${description}`,\n impact: 'Color may not render correctly',\n suggestion: 'Use hex format: #RGB or #RRGGBB (e.g., #3b82f6 or #f00)',\n fixable: true,\n fixData: { path, value, description },\n };\n}\n", "/**\n * Rule: no-unknown-fields\n * Flags fields that are not defined in the configuration schema\n */\n\nimport type { GraphRule, GraphRuleContext, GraphRuleViolation } from '../types';\n\n/**\n * Allowed fields for each configuration section\n */\nconst ALLOWED_FIELDS = {\n root: ['metadata', 'nodeTypes', 'edgeTypes', 'allowedConnections', 'validation', 'display'],\n metadata: ['name', 'version', 'description'],\n nodeType: [\n 'shape',\n 'icon',\n 'color',\n 'stroke',\n 'size',\n 'dataSchema',\n 'states',\n 'layout',\n 'sources',\n 'actions',\n ],\n edgeType: [\n 'style',\n 'color',\n 'width',\n 'directed',\n 'animated',\n 'label',\n 'animation',\n 'dataSchema',\n 'activatedBy',\n ],\n connectionRule: ['from', 'to', 'via', 'constraints'],\n connectionConstraints: ['maxInstances', 'bidirectional', 'exclusive'],\n validation: ['stateTransitions', 'constraints', 'cardinality'],\n display: ['layout', 'theme', 'animations'],\n displayTheme: ['primary', 'success', 'warning', 'danger', 'info'],\n displayAnimations: ['enabled', 'speed'],\n dataSchemaField: ['type', 'required', 'displayInLabel', 'label', 'displayInInfo'],\n stateDefinition: ['color', 'icon', 'label'],\n layoutHints: ['layer', 'cluster'],\n edgeLabel: ['field', 'position'],\n edgeAnimation: ['type', 'duration', 'color'],\n nodeSize: ['width', 'height'],\n stateTransition: ['from', 'to'],\n constraint: ['id', 'description', 'check', 'severity'],\n actionPattern: ['pattern', 'event', 'state', 'metadata'],\n};\n\nexport const noUnknownFields: GraphRule = {\n id: 'no-unknown-fields',\n name: 'No Unknown Fields',\n description: 'Flag fields that are not defined in the configuration schema',\n impact: 'Unknown fields are likely typos and will be ignored',\n severity: 'error',\n category: 'schema',\n enabled: true,\n fixable: true,\n\n async check(context: GraphRuleContext): Promise<GraphRuleViolation[]> {\n const violations: GraphRuleViolation[] = [];\n const { configuration, configPath } = context;\n\n // Check root level fields\n checkFields(configuration as unknown as Record<string, unknown>, ALLOWED_FIELDS.root, '', configPath, violations);\n\n // Check metadata fields\n if (configuration.metadata) {\n checkFields(\n configuration.metadata as Record<string, unknown>,\n ALLOWED_FIELDS.metadata,\n 'metadata',\n configPath,\n violations\n );\n }\n\n // Check nodeTypes\n if (configuration.nodeTypes) {\n for (const [typeId, nodeType] of Object.entries(configuration.nodeTypes)) {\n const basePath = `nodeTypes.${typeId}`;\n checkFields(nodeType as unknown as Record<string, unknown>, ALLOWED_FIELDS.nodeType, basePath, configPath, violations);\n\n // Check nested fields in nodeType\n if (nodeType.dataSchema) {\n for (const [fieldName, fieldDef] of Object.entries(nodeType.dataSchema)) {\n checkFields(\n fieldDef as Record<string, unknown>,\n ALLOWED_FIELDS.dataSchemaField,\n `${basePath}.dataSchema.${fieldName}`,\n configPath,\n violations\n );\n }\n }\n\n if (nodeType.states) {\n for (const [stateName, stateDef] of Object.entries(nodeType.states)) {\n checkFields(\n stateDef as Record<string, unknown>,\n ALLOWED_FIELDS.stateDefinition,\n `${basePath}.states.${stateName}`,\n configPath,\n violations\n );\n }\n }\n\n if (nodeType.layout) {\n checkFields(\n nodeType.layout as Record<string, unknown>,\n ALLOWED_FIELDS.layoutHints,\n `${basePath}.layout`,\n configPath,\n violations\n );\n }\n\n if (nodeType.size) {\n checkFields(\n nodeType.size as Record<string, unknown>,\n ALLOWED_FIELDS.nodeSize,\n `${basePath}.size`,\n configPath,\n violations\n );\n }\n\n // Check actions\n const nodeTypeAny = nodeType as unknown as Record<string, unknown>;\n if (Array.isArray(nodeTypeAny.actions)) {\n (nodeTypeAny.actions as unknown[]).forEach((action: unknown, index: number) => {\n if (typeof action === 'object' && action !== null) {\n checkFields(\n action as Record<string, unknown>,\n ALLOWED_FIELDS.actionPattern,\n `${basePath}.actions[${index}]`,\n configPath,\n violations\n );\n }\n });\n }\n }\n }\n\n // Check edgeTypes\n if (configuration.edgeTypes) {\n for (const [typeId, edgeType] of Object.entries(configuration.edgeTypes)) {\n const basePath = `edgeTypes.${typeId}`;\n checkFields(edgeType as unknown as Record<string, unknown>, ALLOWED_FIELDS.edgeType, basePath, configPath, violations);\n\n if (edgeType.label && typeof edgeType.label === 'object') {\n checkFields(\n edgeType.label as Record<string, unknown>,\n ALLOWED_FIELDS.edgeLabel,\n `${basePath}.label`,\n configPath,\n violations\n );\n }\n\n if (edgeType.animation && typeof edgeType.animation === 'object') {\n checkFields(\n edgeType.animation as Record<string, unknown>,\n ALLOWED_FIELDS.edgeAnimation,\n `${basePath}.animation`,\n configPath,\n violations\n );\n }\n\n if (edgeType.dataSchema) {\n for (const [fieldName, fieldDef] of Object.entries(edgeType.dataSchema)) {\n checkFields(\n fieldDef as Record<string, unknown>,\n ALLOWED_FIELDS.dataSchemaField,\n `${basePath}.dataSchema.${fieldName}`,\n configPath,\n violations\n );\n }\n }\n }\n }\n\n // Check allowedConnections\n if (configuration.allowedConnections) {\n configuration.allowedConnections.forEach((rule, index) => {\n const basePath = `allowedConnections[${index}]`;\n checkFields(rule as unknown as Record<string, unknown>, ALLOWED_FIELDS.connectionRule, basePath, configPath, violations);\n\n if (rule.constraints) {\n checkFields(\n rule.constraints as Record<string, unknown>,\n ALLOWED_FIELDS.connectionConstraints,\n `${basePath}.constraints`,\n configPath,\n violations\n );\n }\n });\n }\n\n // Check validation\n if (configuration.validation) {\n checkFields(\n configuration.validation as Record<string, unknown>,\n ALLOWED_FIELDS.validation,\n 'validation',\n configPath,\n violations\n );\n\n // Check state transitions\n if (configuration.validation.stateTransitions) {\n for (const [nodeType, transitions] of Object.entries(configuration.validation.stateTransitions)) {\n if (Array.isArray(transitions)) {\n transitions.forEach((transition, index) => {\n checkFields(\n transition as Record<string, unknown>,\n ALLOWED_FIELDS.stateTransition,\n `validation.stateTransitions.${nodeType}[${index}]`,\n configPath,\n violations\n );\n });\n }\n }\n }\n\n // Check constraints\n if (configuration.validation.constraints && Array.isArray(configuration.validation.constraints)) {\n configuration.validation.constraints.forEach((constraint, index) => {\n checkFields(\n constraint as Record<string, unknown>,\n ALLOWED_FIELDS.constraint,\n `validation.constraints[${index}]`,\n configPath,\n violations\n );\n });\n }\n }\n\n // Check display\n if (configuration.display) {\n checkFields(\n configuration.display as unknown as Record<string, unknown>,\n ALLOWED_FIELDS.display,\n 'display',\n configPath,\n violations\n );\n\n if (configuration.display.theme) {\n checkFields(\n configuration.display.theme as Record<string, unknown>,\n ALLOWED_FIELDS.displayTheme,\n 'display.theme',\n configPath,\n violations\n );\n }\n\n if (configuration.display.animations) {\n checkFields(\n configuration.display.animations as Record<string, unknown>,\n ALLOWED_FIELDS.displayAnimations,\n 'display.animations',\n configPath,\n violations\n );\n }\n }\n\n return violations;\n },\n};\n\n/**\n * Check an object's fields against allowed fields\n */\nfunction checkFields(\n obj: Record<string, unknown>,\n allowedFields: string[],\n path: string,\n configPath: string | undefined,\n violations: GraphRuleViolation[]\n): void {\n for (const field of Object.keys(obj)) {\n if (!allowedFields.includes(field)) {\n const suggestion = findSimilarField(field, allowedFields);\n violations.push({\n ruleId: 'no-unknown-fields',\n severity: 'error',\n file: configPath,\n path: path ? `${path}.${field}` : field,\n message: `Unknown field \"${field}\"${path ? ` in ${path}` : ' at root level'}`,\n impact: 'This field will be ignored and may indicate a configuration error',\n suggestion: suggestion\n ? `Did you mean \"${suggestion}\"? Allowed fields: ${allowedFields.join(', ')}`\n : `Allowed fields: ${allowedFields.join(', ')}`,\n fixable: true,\n fixData: { path, field, suggestion },\n });\n }\n }\n}\n\n/**\n * Find a similar field name for \"did you mean\" suggestions\n */\nfunction findSimilarField(field: string, allowedFields: string[]): string | null {\n const fieldLower = field.toLowerCase();\n\n for (const allowed of allowedFields) {\n const allowedLower = allowed.toLowerCase();\n\n // Check for substring match\n if (fieldLower.includes(allowedLower) || allowedLower.includes(fieldLower)) {\n return allowed;\n }\n\n // Check for small edit distance (typos)\n if (Math.abs(field.length - allowed.length) <= 2) {\n let differences = 0;\n const minLen = Math.min(fieldLower.length, allowedLower.length);\n for (let i = 0; i < minLen; i++) {\n if (fieldLower[i] !== allowedLower[i]) differences++;\n }\n differences += Math.abs(field.length - allowed.length);\n if (differences <= 2) return allowed;\n }\n }\n\n return null;\n}\n", "/**\n * Rule: connection-type-references\n * Ensures allowedConnections only reference existing nodeTypes and edgeTypes\n */\n\nimport type { GraphRule, GraphRuleContext, GraphRuleViolation } from '../types';\n\nexport const connectionTypeReferences: GraphRule = {\n id: 'connection-type-references',\n name: 'Connection Type References',\n description: 'allowedConnections must reference existing nodeTypes and edgeTypes',\n impact: 'Invalid references will cause connection validation to fail',\n severity: 'error',\n category: 'reference',\n enabled: true,\n fixable: false,\n\n async check(context: GraphRuleContext): Promise<GraphRuleViolation[]> {\n const violations: GraphRuleViolation[] = [];\n const { configuration, configPath } = context;\n\n if (!configuration.allowedConnections || configuration.allowedConnections.length === 0) {\n return violations;\n }\n\n // Get defined node and edge types\n const nodeTypeIds = new Set(Object.keys(configuration.nodeTypes ?? {}));\n const edgeTypeIds = new Set(Object.keys(configuration.edgeTypes ?? {}));\n\n for (let i = 0; i < configuration.allowedConnections.length; i++) {\n const connection = configuration.allowedConnections[i];\n const basePath = `allowedConnections[${i}]`;\n\n // Check 'from' references a valid nodeType\n if (connection.from && !nodeTypeIds.has(connection.from)) {\n const suggestion = findSimilar(connection.from, nodeTypeIds);\n violations.push({\n ruleId: 'connection-type-references',\n severity: 'error',\n file: configPath,\n path: `${basePath}.from`,\n message: `Connection rule references undefined nodeType \"${connection.from}\"`,\n impact: 'This connection rule will not match any nodes',\n suggestion: suggestion\n ? `Did you mean \"${suggestion}\"?`\n : `Available nodeTypes: ${[...nodeTypeIds].join(', ') || '(none defined)'}`,\n fixable: false,\n });\n }\n\n // Check 'to' references a valid nodeType\n if (connection.to && !nodeTypeIds.has(connection.to)) {\n const suggestion = findSimilar(connection.to, nodeTypeIds);\n violations.push({\n ruleId: 'connection-type-references',\n severity: 'error',\n file: configPath,\n path: `${basePath}.to`,\n message: `Connection rule references undefined nodeType \"${connection.to}\"`,\n impact: 'This connection rule will not match any nodes',\n suggestion: suggestion\n ? `Did you mean \"${suggestion}\"?`\n : `Available nodeTypes: ${[...nodeTypeIds].join(', ') || '(none defined)'}`,\n fixable: false,\n });\n }\n\n // Check 'via' references a valid edgeType\n if (connection.via && !edgeTypeIds.has(connection.via)) {\n const suggestion = findSimilar(connection.via, edgeTypeIds);\n violations.push({\n ruleId: 'connection-type-references',\n severity: 'error',\n file: configPath,\n path: `${basePath}.via`,\n message: `Connection rule references undefined edgeType \"${connection.via}\"`,\n impact: 'This connection rule will not match any edges',\n suggestion: suggestion\n ? `Did you mean \"${suggestion}\"?`\n : `Available edgeTypes: ${[...edgeTypeIds].join(', ') || '(none defined)'}`,\n fixable: false,\n });\n }\n }\n\n return violations;\n },\n};\n\n/**\n * Find a similar string from a set (for \"did you mean\" suggestions)\n */\nfunction findSimilar(input: string, candidates: Set<string>): string | null {\n const inputLower = input.toLowerCase();\n\n for (const candidate of candidates) {\n const candidateLower = candidate.toLowerCase();\n\n // Exact substring match\n if (inputLower.includes(candidateLower) || candidateLower.includes(inputLower)) {\n return candidate;\n }\n\n // Small edit distance\n if (Math.abs(input.length - candidate.length) <= 2) {\n let differences = 0;\n const minLen = Math.min(inputLower.length, candidateLower.length);\n for (let i = 0; i < minLen; i++) {\n if (inputLower[i] !== candidateLower[i]) differences++;\n }\n differences += Math.abs(input.length - candidate.length);\n if (differences <= 2) return candidate;\n }\n }\n\n return null;\n}\n", "/**\n * Rule: state-transition-references\n * Ensures state transitions only reference defined states\n */\n\nimport type { GraphRule, GraphRuleContext, GraphRuleViolation } from '../types';\n\nexport const stateTransitionReferences: GraphRule = {\n id: 'state-transition-references',\n name: 'State Transition References',\n description: 'State transitions must reference states defined in nodeTypes',\n impact: 'Invalid state references will cause state validation to fail',\n severity: 'error',\n category: 'reference',\n enabled: true,\n fixable: false,\n\n async check(context: GraphRuleContext): Promise<GraphRuleViolation[]> {\n const violations: GraphRuleViolation[] = [];\n const { configuration, configPath } = context;\n\n if (!configuration.validation?.stateTransitions) {\n return violations;\n }\n\n // Build a map of nodeType -> defined states\n const statesByNodeType = new Map<string, Set<string>>();\n\n if (configuration.nodeTypes) {\n for (const [typeId, nodeType] of Object.entries(configuration.nodeTypes)) {\n if (nodeType.states) {\n statesByNodeType.set(typeId, new Set(Object.keys(nodeType.states)));\n }\n }\n }\n\n // Check each state transition rule\n for (const [nodeTypeId, transitions] of Object.entries(configuration.validation.stateTransitions)) {\n const basePath = `validation.stateTransitions.${nodeTypeId}`;\n\n // Check if nodeType exists\n if (!configuration.nodeTypes?.[nodeTypeId]) {\n violations.push({\n ruleId: 'state-transition-references',\n severity: 'error',\n file: configPath,\n path: basePath,\n message: `State transitions defined for undefined nodeType \"${nodeTypeId}\"`,\n impact: 'These state transitions will never apply',\n suggestion: `Available nodeTypes: ${Object.keys(configuration.nodeTypes ?? {}).join(', ') || '(none defined)'}`,\n fixable: false,\n });\n continue;\n }\n\n // Check if nodeType has states defined\n const definedStates = statesByNodeType.get(nodeTypeId);\n if (!definedStates || definedStates.size === 0) {\n violations.push({\n ruleId: 'state-transition-references',\n severity: 'error',\n file: configPath,\n path: basePath,\n message: `State transitions defined for nodeType \"${nodeTypeId}\" which has no states`,\n impact: 'These state transitions will never apply',\n suggestion: `Add states to nodeTypes.${nodeTypeId}.states`,\n fixable: false,\n });\n continue;\n }\n\n // Check each transition\n if (Array.isArray(transitions)) {\n for (let i = 0; i < transitions.length; i++) {\n const transition = transitions[i];\n const transitionPath = `${basePath}[${i}]`;\n\n // Check 'from' state\n if (transition.from && !definedStates.has(transition.from)) {\n const suggestion = findSimilar(transition.from, definedStates);\n violations.push({\n ruleId: 'state-transition-references',\n severity: 'error',\n file: configPath,\n path: `${transitionPath}.from`,\n message: `Transition references undefined state \"${transition.from}\" in nodeType \"${nodeTypeId}\"`,\n impact: 'This transition will never match',\n suggestion: suggestion\n ? `Did you mean \"${suggestion}\"?`\n : `Available states: ${[...definedStates].join(', ')}`,\n fixable: false,\n });\n }\n\n // Check 'to' states\n if (Array.isArray(transition.to)) {\n for (let j = 0; j < transition.to.length; j++) {\n const toState = transition.to[j];\n if (!definedStates.has(toState)) {\n const suggestion = findSimilar(toState, definedStates);\n violations.push({\n ruleId: 'state-transition-references',\n severity: 'error',\n file: configPath,\n path: `${transitionPath}.to[${j}]`,\n message: `Transition references undefined state \"${toState}\" in nodeType \"${nodeTypeId}\"`,\n impact: 'This transition target is invalid',\n suggestion: suggestion\n ? `Did you mean \"${suggestion}\"?`\n : `Available states: ${[...definedStates].join(', ')}`,\n fixable: false,\n });\n }\n }\n }\n }\n }\n }\n\n return violations;\n },\n};\n\n/**\n * Find a similar string from a set (for \"did you mean\" suggestions)\n */\nfunction findSimilar(input: string, candidates: Set<string>): string | null {\n const inputLower = input.toLowerCase();\n\n for (const candidate of candidates) {\n const candidateLower = candidate.toLowerCase();\n\n // Exact substring match\n if (inputLower.includes(candidateLower) || candidateLower.includes(inputLower)) {\n return candidate;\n }\n\n // Small edit distance\n if (Math.abs(input.length - candidate.length) <= 2) {\n let differences = 0;\n const minLen = Math.min(inputLower.length, candidateLower.length);\n for (let i = 0; i < minLen; i++) {\n if (inputLower[i] !== candidateLower[i]) differences++;\n }\n differences += Math.abs(input.length - candidate.length);\n if (differences <= 2) return candidate;\n }\n }\n\n return null;\n}\n", "/**\n * Rule: minimum-node-sources\n * Ensures each nodeType has at least a minimum number of sources defined\n */\n\nimport type { GraphRule, GraphRuleContext, GraphRuleViolation, RuleOptions } from '../types';\n\n/**\n * Options for minimum-node-sources rule\n */\nexport interface MinimumNodeSourcesOptions extends RuleOptions {\n /**\n * Minimum number of sources required per nodeType\n * @default 1\n */\n minimum: number;\n\n /**\n * NodeType IDs to exclude from this check\n * @default []\n */\n excludeNodeTypes: string[];\n}\n\nconst DEFAULT_OPTIONS: MinimumNodeSourcesOptions = {\n minimum: 1,\n excludeNodeTypes: [],\n};\n\nexport const minimumNodeSources: GraphRule<MinimumNodeSourcesOptions> = {\n id: 'minimum-node-sources',\n name: 'Minimum Node Sources',\n description: 'Each nodeType must have at least a minimum number of sources defined',\n impact: 'NodeTypes without sources cannot be associated with log activity',\n severity: 'error',\n category: 'structure',\n enabled: true,\n fixable: false,\n defaultOptions: DEFAULT_OPTIONS,\n\n async check(context: GraphRuleContext<MinimumNodeSourcesOptions>): Promise<GraphRuleViolation[]> {\n const violations: GraphRuleViolation[] = [];\n const { configuration, configPath, options } = context;\n\n const minimum = options.minimum ?? DEFAULT_OPTIONS.minimum;\n const excludeNodeTypes = options.excludeNodeTypes ?? DEFAULT_OPTIONS.excludeNodeTypes;\n\n if (!configuration.nodeTypes) {\n return violations;\n }\n\n for (const [typeId, nodeType] of Object.entries(configuration.nodeTypes)) {\n // Skip excluded node types\n if (excludeNodeTypes.includes(typeId)) {\n continue;\n }\n\n // Get sources from nodeType (may be extended via path-based config)\n const nodeTypeAny = nodeType as unknown as Record<string, unknown>;\n const sources = nodeTypeAny.sources;\n const sourceCount = Array.isArray(sources) ? sources.length : 0;\n\n if (sourceCount < minimum) {\n violations.push({\n ruleId: 'minimum-node-sources',\n severity: 'error',\n file: configPath,\n path: `nodeTypes.${typeId}.sources`,\n message:\n sourceCount === 0\n ? `Node type \"${typeId}\" has no sources defined`\n : `Node type \"${typeId}\" has ${sourceCount} source(s), minimum required is ${minimum}`,\n impact: 'This node type cannot be associated with log activity from source files',\n suggestion: `Add at least ${minimum} source path(s) to nodeTypes.${typeId}.sources`,\n fixable: false,\n });\n }\n }\n\n return violations;\n },\n};\n", "/**\n * Rule: orphaned-node-types\n * Warns when nodeTypes are not used in any connection rule\n */\n\nimport type { GraphRule, GraphRuleContext, GraphRuleViolation } from '../types';\n\nexport const orphanedNodeTypes: GraphRule = {\n id: 'orphaned-node-types',\n name: 'Orphaned Node Types',\n description: 'NodeTypes should be used in at least one connection rule',\n impact: 'Orphaned node types may indicate unused or misconfigured types',\n severity: 'error',\n category: 'structure',\n enabled: true,\n fixable: false,\n\n async check(context: GraphRuleContext): Promise<GraphRuleViolation[]> {\n const violations: GraphRuleViolation[] = [];\n const { configuration, configPath } = context;\n\n if (!configuration.nodeTypes || Object.keys(configuration.nodeTypes).length === 0) {\n return violations;\n }\n\n // Collect all nodeTypes referenced in allowedConnections\n const referencedNodeTypes = new Set<string>();\n\n if (configuration.allowedConnections) {\n for (const connection of configuration.allowedConnections) {\n if (connection.from) {\n referencedNodeTypes.add(connection.from);\n }\n if (connection.to) {\n referencedNodeTypes.add(connection.to);\n }\n }\n }\n\n // Check each nodeType\n for (const typeId of Object.keys(configuration.nodeTypes)) {\n if (!referencedNodeTypes.has(typeId)) {\n violations.push({\n ruleId: 'orphaned-node-types',\n severity: 'error',\n file: configPath,\n path: `nodeTypes.${typeId}`,\n message: `Node type \"${typeId}\" is not used in any connection rule`,\n impact: 'This node type may be unused or misconfigured',\n suggestion: `Add a connection rule using this node type, or remove it if unused`,\n fixable: false,\n });\n }\n }\n\n return violations;\n },\n};\n", "/**\n * Rule: orphaned-edge-types\n * Warns when edgeTypes are not used in any connection rule\n */\n\nimport type { GraphRule, GraphRuleContext, GraphRuleViolation } from '../types';\n\nexport const orphanedEdgeTypes: GraphRule = {\n id: 'orphaned-edge-types',\n name: 'Orphaned Edge Types',\n description: 'EdgeTypes should be used in at least one connection rule',\n impact: 'Orphaned edge types may indicate unused or misconfigured types',\n severity: 'error',\n category: 'structure',\n enabled: true,\n fixable: false,\n\n async check(context: GraphRuleContext): Promise<GraphRuleViolation[]> {\n const violations: GraphRuleViolation[] = [];\n const { configuration, configPath } = context;\n\n if (!configuration.edgeTypes || Object.keys(configuration.edgeTypes).length === 0) {\n return violations;\n }\n\n // Collect all edgeTypes referenced in allowedConnections\n const referencedEdgeTypes = new Set<string>();\n\n if (configuration.allowedConnections) {\n for (const connection of configuration.allowedConnections) {\n if (connection.via) {\n referencedEdgeTypes.add(connection.via);\n }\n }\n }\n\n // Check each edgeType\n for (const typeId of Object.keys(configuration.edgeTypes)) {\n if (!referencedEdgeTypes.has(typeId)) {\n violations.push({\n ruleId: 'orphaned-edge-types',\n severity: 'error',\n file: configPath,\n path: `edgeTypes.${typeId}`,\n message: `Edge type \"${typeId}\" is not used in any connection rule`,\n impact: 'This edge type may be unused or misconfigured',\n suggestion: `Add a connection rule using this edge type, or remove it if unused`,\n fixable: false,\n });\n }\n }\n\n return violations;\n },\n};\n", "/**\n * Rule: unreachable-states\n * Warns when states have no entry transitions (cannot be reached)\n */\n\nimport type { GraphRule, GraphRuleContext, GraphRuleViolation } from '../types';\n\nexport const unreachableStates: GraphRule = {\n id: 'unreachable-states',\n name: 'Unreachable States',\n description: 'States should have at least one entry transition or be an initial state',\n impact: 'Unreachable states can never be entered and may indicate configuration errors',\n severity: 'error',\n category: 'structure',\n enabled: true,\n fixable: false,\n\n async check(context: GraphRuleContext): Promise<GraphRuleViolation[]> {\n const violations: GraphRuleViolation[] = [];\n const { configuration, configPath } = context;\n\n if (!configuration.nodeTypes) {\n return violations;\n }\n\n // For each nodeType with states, check if all states are reachable\n for (const [typeId, nodeType] of Object.entries(configuration.nodeTypes)) {\n if (!nodeType.states || Object.keys(nodeType.states).length === 0) {\n continue;\n }\n\n const stateIds = Object.keys(nodeType.states);\n\n // If there's only one state, it's implicitly the initial state\n if (stateIds.length <= 1) {\n continue;\n }\n\n // Get state transitions for this nodeType\n const transitions = configuration.validation?.stateTransitions?.[typeId];\n\n if (!transitions || !Array.isArray(transitions) || transitions.length === 0) {\n // No transitions defined - all states except the first are unreachable\n // The first state is conventionally the initial state\n for (let i = 1; i < stateIds.length; i++) {\n violations.push({\n ruleId: 'unreachable-states',\n severity: 'error',\n file: configPath,\n path: `nodeTypes.${typeId}.states.${stateIds[i]}`,\n message: `State \"${stateIds[i]}\" in node type \"${typeId}\" has no entry transitions`,\n impact: 'This state can never be reached',\n suggestion: `Add a state transition to \"${stateIds[i]}\" in validation.stateTransitions.${typeId}`,\n fixable: false,\n });\n }\n continue;\n }\n\n // Build set of states that can be reached (are targets of transitions)\n const reachableStates = new Set<string>();\n\n // First state is assumed to be the initial state\n reachableStates.add(stateIds[0]);\n\n // Add all states that are targets of transitions\n for (const transition of transitions) {\n if (Array.isArray(transition.to)) {\n for (const toState of transition.to) {\n reachableStates.add(toState);\n }\n }\n }\n\n // Check for unreachable states\n for (const stateId of stateIds) {\n if (!reachableStates.has(stateId)) {\n violations.push({\n ruleId: 'unreachable-states',\n severity: 'error',\n file: configPath,\n path: `nodeTypes.${typeId}.states.${stateId}`,\n message: `State \"${stateId}\" in node type \"${typeId}\" has no entry transitions`,\n impact: 'This state can never be reached',\n suggestion: `Add a state transition to \"${stateId}\" in validation.stateTransitions.${typeId}`,\n fixable: false,\n });\n }\n }\n }\n\n return violations;\n },\n};\n", "/**\n * Rule: dead-end-states\n * Warns when states have no exit transitions (except terminal states)\n */\n\nimport type { GraphRule, GraphRuleContext, GraphRuleViolation, RuleOptions } from '../types';\n\n/**\n * Options for dead-end-states rule\n */\nexport interface DeadEndStatesOptions extends RuleOptions {\n /**\n * States that are intentionally terminal (no exits expected)\n * @default [\"completed\", \"failed\", \"terminated\", \"done\", \"error\", \"finished\", \"end\"]\n */\n terminalStates: string[];\n}\n\nconst DEFAULT_OPTIONS: DeadEndStatesOptions = {\n terminalStates: ['completed', 'failed', 'terminated', 'done', 'error', 'finished', 'end'],\n};\n\nexport const deadEndStates: GraphRule<DeadEndStatesOptions> = {\n id: 'dead-end-states',\n name: 'Dead End States',\n description: 'States should have exit transitions unless they are terminal states',\n impact: 'Dead-end states may trap entities unexpectedly',\n severity: 'error',\n category: 'structure',\n enabled: true,\n fixable: false,\n defaultOptions: DEFAULT_OPTIONS,\n\n async check(context: GraphRuleContext<DeadEndStatesOptions>): Promise<GraphRuleViolation[]> {\n const violations: GraphRuleViolation[] = [];\n const { configuration, configPath, options } = context;\n\n const terminalStates = new Set(\n (options.terminalStates ?? DEFAULT_OPTIONS.terminalStates).map((s) => s.toLowerCase())\n );\n\n if (!configuration.nodeTypes) {\n return violations;\n }\n\n // For each nodeType with states, check if all non-terminal states have exits\n for (const [typeId, nodeType] of Object.entries(configuration.nodeTypes)) {\n if (!nodeType.states || Object.keys(nodeType.states).length === 0) {\n continue;\n }\n\n const stateIds = Object.keys(nodeType.states);\n\n // If there's only one state, no transitions expected\n if (stateIds.length <= 1) {\n continue;\n }\n\n // Get state transitions for this nodeType\n const transitions = configuration.validation?.stateTransitions?.[typeId];\n\n // Build set of states that have exit transitions\n const statesWithExits = new Set<string>();\n\n if (transitions && Array.isArray(transitions)) {\n for (const transition of transitions) {\n if (transition.from) {\n statesWithExits.add(transition.from);\n }\n }\n }\n\n // Check for dead-end states\n for (const stateId of stateIds) {\n // Skip if this state has exits\n if (statesWithExits.has(stateId)) {\n continue;\n }\n\n // Skip if this is a known terminal state\n if (terminalStates.has(stateId.toLowerCase())) {\n continue;\n }\n\n // This is a dead-end state\n violations.push({\n ruleId: 'dead-end-states',\n severity: 'error',\n file: configPath,\n path: `nodeTypes.${typeId}.states.${stateId}`,\n message: `State \"${stateId}\" in node type \"${typeId}\" has no exit transitions`,\n impact: 'Entities in this state cannot transition to other states',\n suggestion: `Add a transition from \"${stateId}\" in validation.stateTransitions.${typeId}, or mark it as a terminal state`,\n fixable: false,\n });\n }\n }\n\n return violations;\n },\n};\n", "/**\n * Rule: valid-action-patterns\n * Ensures action pattern regex is syntactically valid\n */\n\nimport type { GraphRule, GraphRuleContext, GraphRuleViolation, RuleOptions } from '../types';\n\n/**\n * Options for valid-action-patterns rule\n */\nexport interface ValidActionPatternsOptions extends RuleOptions {\n /**\n * Enable strict mode - also validates capture group references\n * @default false\n */\n strictMode: boolean;\n}\n\nconst DEFAULT_OPTIONS: ValidActionPatternsOptions = {\n strictMode: false,\n};\n\nexport const validActionPatterns: GraphRule<ValidActionPatternsOptions> = {\n id: 'valid-action-patterns',\n name: 'Valid Action Patterns',\n description: 'Action pattern regex must be syntactically valid',\n impact: 'Invalid regex patterns will cause runtime errors during log processing',\n severity: 'error',\n category: 'pattern',\n enabled: true,\n fixable: false,\n defaultOptions: DEFAULT_OPTIONS,\n\n async check(context: GraphRuleContext<ValidActionPatternsOptions>): Promise<GraphRuleViolation[]> {\n const violations: GraphRuleViolation[] = [];\n const { configuration, configPath, options } = context;\n\n if (!configuration.nodeTypes) {\n return violations;\n }\n\n for (const [typeId, nodeType] of Object.entries(configuration.nodeTypes)) {\n // Check if nodeType has actions (from path-based config extension)\n const nodeTypeAny = nodeType as unknown as Record<string, unknown>;\n const actions = nodeTypeAny.actions;\n\n if (!Array.isArray(actions)) {\n continue;\n }\n\n for (let i = 0; i < actions.length; i++) {\n const action = actions[i] as Record<string, unknown>;\n const pattern = action.pattern;\n const basePath = `nodeTypes.${typeId}.actions[${i}]`;\n\n if (typeof pattern !== 'string') {\n violations.push({\n ruleId: 'valid-action-patterns',\n severity: 'error',\n file: configPath,\n path: `${basePath}.pattern`,\n message: `Action pattern must be a string`,\n impact: 'Pattern matching will fail',\n suggestion: 'Provide a valid regex pattern string',\n fixable: false,\n });\n continue;\n }\n\n // Test if regex is valid\n try {\n new RegExp(pattern);\n } catch (error) {\n const errorMessage = error instanceof Error ? error.message : String(error);\n violations.push({\n ruleId: 'valid-action-patterns',\n severity: 'error',\n file: configPath,\n path: `${basePath}.pattern`,\n message: `Invalid regex pattern \"${pattern}\": ${errorMessage}`,\n impact: 'Pattern matching will fail at runtime',\n suggestion: 'Fix the regex syntax error',\n fixable: false,\n });\n continue;\n }\n\n // In strict mode, validate capture group references in metadata\n if (options.strictMode) {\n const metadata = action.metadata as Record<string, unknown> | undefined;\n if (metadata) {\n // Extract capture group names from pattern\n const captureGroupNames = extractCaptureGroupNames(pattern);\n\n for (const [metaKey, metaValue] of Object.entries(metadata)) {\n if (typeof metaValue === 'string' && metaValue.startsWith('$')) {\n const groupName = metaValue.slice(1);\n if (!captureGroupNames.has(groupName)) {\n violations.push({\n ruleId: 'valid-action-patterns',\n severity: 'error',\n file: configPath,\n path: `${basePath}.metadata.${metaKey}`,\n message: `Metadata references undefined capture group \"$${groupName}\"`,\n impact: 'Metadata extraction will fail',\n suggestion: `Available capture groups: ${[...captureGroupNames].join(', ') || '(none)'}`,\n fixable: false,\n });\n }\n }\n }\n }\n }\n }\n }\n\n return violations;\n },\n};\n\n/**\n * Extract named capture group names from a regex pattern\n */\nfunction extractCaptureGroupNames(pattern: string): Set<string> {\n const names = new Set<string>();\n\n // Match named capture groups: (?<name>...)\n const namedGroupRegex = /\\(\\?<([a-zA-Z_][a-zA-Z0-9_]*)>/g;\n let match;\n\n while ((match = namedGroupRegex.exec(pattern)) !== null) {\n names.add(match[1]);\n }\n\n return names;\n}\n", "/**\n * Rule: library-node-type-match\n * Ensures nodeTypes match library nodeComponents when a library is provided\n */\n\nimport type { GraphRule, GraphRuleContext, GraphRuleViolation, RuleOptions } from '../types';\n\n/**\n * Options for library-node-type-match rule\n */\nexport interface LibraryNodeTypeMatchOptions extends RuleOptions {\n /**\n * Allow extra nodeTypes not defined in the library\n * @default false\n */\n allowExtra: boolean;\n}\n\nconst DEFAULT_OPTIONS: LibraryNodeTypeMatchOptions = {\n allowExtra: false,\n};\n\nexport const libraryNodeTypeMatch: GraphRule<LibraryNodeTypeMatchOptions> = {\n id: 'library-node-type-match',\n name: 'Library Node Type Match',\n description: 'NodeTypes must match library nodeComponents when a library is provided',\n impact: 'Mismatched types may cause inconsistent behavior or missing features',\n severity: 'error',\n category: 'library',\n enabled: true,\n fixable: false,\n defaultOptions: DEFAULT_OPTIONS,\n\n async check(context: GraphRuleContext<LibraryNodeTypeMatchOptions>): Promise<GraphRuleViolation[]> {\n const violations: GraphRuleViolation[] = [];\n const { configuration, library, configPath, libraryPath, options } = context;\n\n // Skip if no library is provided\n if (!library) {\n return violations;\n }\n\n // Skip if library has no nodeComponents\n if (!library.nodeComponents || Object.keys(library.nodeComponents).length === 0) {\n return violations;\n }\n\n const libraryNodeTypes = new Set(Object.keys(library.nodeComponents));\n const configNodeTypes = Object.keys(configuration.nodeTypes ?? {});\n\n // Check each nodeType in configuration\n for (const typeId of configNodeTypes) {\n if (!libraryNodeTypes.has(typeId)) {\n if (!options.allowExtra) {\n const suggestion = findSimilar(typeId, libraryNodeTypes);\n violations.push({\n ruleId: 'library-node-type-match',\n severity: 'error',\n file: configPath,\n path: `nodeTypes.${typeId}`,\n message: `Node type \"${typeId}\" is not defined in the component library`,\n impact: 'This node type may be missing library-defined behavior or styling',\n suggestion: suggestion\n ? `Did you mean \"${suggestion}\"?`\n : `Available library nodeComponents: ${[...libraryNodeTypes].join(', ')}`,\n fixable: false,\n });\n }\n } else {\n // Validate that config matches library definition\n const libraryComponent = library.nodeComponents[typeId];\n const configNodeType = configuration.nodeTypes![typeId];\n\n // Check shape matches if library defines one\n if (libraryComponent.shape && configNodeType.shape !== libraryComponent.shape) {\n violations.push({\n ruleId: 'library-node-type-match',\n severity: 'error',\n file: configPath,\n path: `nodeTypes.${typeId}.shape`,\n message: `Node type \"${typeId}\" shape \"${configNodeType.shape}\" doesn't match library definition \"${libraryComponent.shape}\"`,\n impact: 'Node may render differently than expected',\n suggestion: `Use shape \"${libraryComponent.shape}\" as defined in the library`,\n fixable: true,\n fixData: {\n typeId,\n field: 'shape',\n expected: libraryComponent.shape,\n actual: configNodeType.shape,\n },\n });\n }\n\n // Check that config defines all states from library\n if (libraryComponent.states && Object.keys(libraryComponent.states).length > 0) {\n const libraryStates = Object.keys(libraryComponent.states);\n const configStates = configNodeType.states ? Object.keys(configNodeType.states) : [];\n\n for (const stateId of libraryStates) {\n if (!configStates.includes(stateId)) {\n violations.push({\n ruleId: 'library-node-type-match',\n severity: 'error',\n file: configPath,\n path: `nodeTypes.${typeId}.states`,\n message: `Node type \"${typeId}\" is missing state \"${stateId}\" defined in library`,\n impact: 'State transitions to this state may fail',\n suggestion: `Add state \"${stateId}\" to nodeTypes.${typeId}.states`,\n fixable: false,\n });\n }\n }\n }\n }\n }\n\n return violations;\n },\n};\n\n/**\n * Find a similar string from a set (for \"did you mean\" suggestions)\n */\nfunction findSimilar(input: string, candidates: Set<string>): string | null {\n const inputLower = input.toLowerCase();\n\n for (const candidate of candidates) {\n const candidateLower = candidate.toLowerCase();\n\n // Exact substring match\n if (inputLower.includes(candidateLower) || candidateLower.includes(inputLower)) {\n return candidate;\n }\n\n // Small edit distance\n if (Math.abs(input.length - candidate.length) <= 2) {\n let differences = 0;\n const minLen = Math.min(inputLower.length, candidateLower.length);\n for (let i = 0; i < minLen; i++) {\n if (inputLower[i] !== candidateLower[i]) differences++;\n }\n differences += Math.abs(input.length - candidate.length);\n if (differences <= 2) return candidate;\n }\n }\n\n return null;\n}\n", "/**\n * Built-in rule implementations\n */\n\n// Schema rules\nexport { requiredMetadata } from './required-metadata';\nexport { validNodeTypes } from './valid-node-types';\nexport { validEdgeTypes } from './valid-edge-types';\nexport { validColorFormat } from './valid-color-format';\nexport { noUnknownFields } from './no-unknown-fields';\n\n// Reference rules\nexport { connectionTypeReferences } from './connection-type-references';\nexport { stateTransitionReferences } from './state-transition-references';\n\n// Structure rules\nexport { minimumNodeSources, type MinimumNodeSourcesOptions } from './minimum-node-sources';\nexport { orphanedNodeTypes } from './orphaned-node-types';\nexport { orphanedEdgeTypes } from './orphaned-edge-types';\nexport { unreachableStates } from './unreachable-states';\nexport { deadEndStates, type DeadEndStatesOptions } from './dead-end-states';\n\n// Pattern rules\nexport { validActionPatterns, type ValidActionPatternsOptions } from './valid-action-patterns';\n\n// Library rules\nexport { libraryNodeTypeMatch, type LibraryNodeTypeMatchOptions } from './library-node-type-match';\n\nimport type { GraphRule } from '../types';\nimport { requiredMetadata } from './required-metadata';\nimport { validNodeTypes } from './valid-node-types';\nimport { validEdgeTypes } from './valid-edge-types';\nimport { validColorFormat } from './valid-color-format';\nimport { noUnknownFields } from './no-unknown-fields';\nimport { connectionTypeReferences } from './connection-type-references';\nimport { stateTransitionReferences } from './state-transition-references';\nimport { minimumNodeSources } from './minimum-node-sources';\nimport { orphanedNodeTypes } from './orphaned-node-types';\nimport { orphanedEdgeTypes } from './orphaned-edge-types';\nimport { unreachableStates } from './unreachable-states';\nimport { deadEndStates } from './dead-end-states';\nimport { validActionPatterns } from './valid-action-patterns';\nimport { libraryNodeTypeMatch } from './library-node-type-match';\n\n/**\n * All built-in rules\n * Cast to GraphRule[] since rules with specific options extend the base interface\n */\nexport const builtinRules: GraphRule[] = [\n // Schema rules (5)\n noUnknownFields,\n requiredMetadata,\n validNodeTypes,\n validEdgeTypes,\n validColorFormat,\n\n // Reference rules (2)\n connectionTypeReferences,\n stateTransitionReferences,\n\n // Structure rules (5)\n minimumNodeSources as unknown as GraphRule,\n orphanedNodeTypes,\n orphanedEdgeTypes,\n unreachableStates,\n deadEndStates as unknown as GraphRule,\n\n // Pattern rules (1)\n validActionPatterns as unknown as GraphRule,\n\n // Library rules (1)\n libraryNodeTypeMatch as unknown as GraphRule,\n];\n", "/**\n * Rules Engine - Configuration validation for Visual Validation Framework\n *\n * @example\n * ```typescript\n * import { createRulesEngine, builtinRules } from '@principal-ai/principal-view-core/rules';\n *\n * const engine = createRulesEngine(builtinRules);\n * const result = await engine.lint(configuration);\n *\n * if (result.errorCount > 0) {\n * console.error(`Found ${result.errorCount} errors`);\n * for (const violation of result.violations) {\n * console.error(` ${violation.path}: ${violation.message}`);\n * }\n * }\n * ```\n */\n\n// Core engine\nexport { GraphRulesEngine, createRulesEngine } from './engine';\n\n// Types\nexport type {\n GraphRule,\n GraphRuleContext,\n GraphRuleViolation,\n GraphLintResult,\n LintOptions,\n RuleOptions,\n RuleSeverity,\n NormalizedSeverity,\n RuleCategory,\n RuleConfig,\n PrivuConfig,\n FixResult,\n} from './types';\n\nexport { normalizeSeverity, isRuleDisabled } from './types';\n\n// Config validation\nexport {\n validatePrivuConfig,\n getDefaultConfig,\n mergeConfigs,\n formatConfigErrors,\n CONFIG_FILE_NAMES,\n DEFAULT_INCLUDE_PATTERNS,\n DEFAULT_EXCLUDE_PATTERNS,\n VALID_RULE_IDS,\n VALID_SEVERITIES,\n type ConfigValidationError,\n type ConfigValidationResult,\n type ValidRuleId,\n} from './config';\n\n// Built-in rules\nexport {\n builtinRules,\n // Schema rules\n requiredMetadata,\n validNodeTypes,\n validEdgeTypes,\n validColorFormat,\n noUnknownFields,\n // Reference rules\n connectionTypeReferences,\n stateTransitionReferences,\n // Structure rules\n minimumNodeSources,\n orphanedNodeTypes,\n orphanedEdgeTypes,\n unreachableStates,\n deadEndStates,\n // Pattern rules\n validActionPatterns,\n // Library rules\n libraryNodeTypeMatch,\n // Rule option types\n type MinimumNodeSourcesOptions,\n type DeadEndStatesOptions,\n type ValidActionPatternsOptions,\n type LibraryNodeTypeMatchOptions,\n} from './implementations';\n\n// Convenience factory that creates an engine with all built-in rules\nimport { createRulesEngine } from './engine';\nimport { builtinRules } from './implementations';\n\n/**\n * Create a rules engine pre-configured with all built-in rules\n */\nexport function createDefaultRulesEngine() {\n return createRulesEngine(builtinRules);\n}\n", "/**\n * Principal View CLI - Main entry point\n *\n * This CLI provides tools to validate and manage .canvas configuration files\n * for the Principal View Framework.\n */\n\nimport { Command } from 'commander';\nimport { createValidateCommand } from './commands/validate.js';\nimport { createInitCommand } from './commands/init.js';\nimport { createListCommand } from './commands/list.js';\nimport { createSchemaCommand } from './commands/schema.js';\nimport { createDoctorCommand } from './commands/doctor.js';\nimport { createHooksCommand } from './commands/hooks.js';\nimport { createCreateCommand } from './commands/create.js';\nimport { createLintCommand } from './commands/lint.js';\n\n// Version is injected at build time via package.json\nconst VERSION = '0.1.13';\n\nconst program = new Command();\n\nprogram\n .name('privu')\n .description('Principal View CLI - Validate and manage .canvas configuration files')\n .version(VERSION);\n\n// Add commands\nprogram.addCommand(createInitCommand());\nprogram.addCommand(createCreateCommand());\nprogram.addCommand(createValidateCommand());\nprogram.addCommand(createLintCommand());\nprogram.addCommand(createListCommand());\nprogram.addCommand(createSchemaCommand());\nprogram.addCommand(createDoctorCommand());\nprogram.addCommand(createHooksCommand());\n\n// Parse command line arguments\nprogram.parse(process.argv);\n\n// Show help if no command provided\nif (!process.argv.slice(2).length) {\n program.outputHelp();\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA,8CAAAA,UAAA;AAGA,QAAMC,kBAAN,cAA6B,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAOjC,YAAY,UAAU,MAAM,SAAS;AACnC,cAAM,OAAO;AAEb,cAAM,kBA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AAQ,IAAI,MAAM;AAElB,YAAI,WAAW;AACb,kBAAQ,KAAK,CAAC;AAAA,QAChB;AAAA,MACF;AAAA,IACF,SAAS,OAAO;AACd,UAAI,QAAQ,MAAM;AAChB,gBAAQ,IAAI,KAAK,UAAU,EAAE,OAAQ,MAAgB,QAAQ,CAAC,CAAC;AAAA,MACjE,OAAO;AACL,gBAAQ,MAAM,eAAM,IAAI,QAAQ,GAAI,MAAgB,OAAO;AAAA,MAC7D;AACA,cAAQ,KAAK,CAAC;AAAA,IAChB;AAAA,EACF,CAAC;AAEH,SAAO;AACT;;;AsB9ZA,IAAM,UAAU;AAEhB,IAAMC,WAAU,IAAI,QAAQ;AAE5BA,SACG,KAAK,OAAO,EACZ,YAAY,sEAAsE,EAClF,QAAQ,OAAO;AAGlBA,SAAQ,WAAW,kBAAkB,CAAC;AACtCA,SAAQ,WAAW,oBAAoB,CAAC;AACxCA,SAAQ,WAAW,sBAAsB,CAAC;AAC1CA,SAAQ,WAAW,kBAAkB,CAAC;AACtCA,SAAQ,WAAW,kBAAkB,CAAC;AACtCA,SAAQ,WAAW,oBAAoB,CAAC;AACxCA,SAAQ,WAAW,oBAAoB,CAAC;AACxCA,SAAQ,WAAW,mBAAmB,CAAC;AAGvCA,SAAQ,MAAM,QAAQ,IAAI;AAG1B,IAAI,CAAC,QAAQ,KAAK,MAAM,CAAC,EAAE,QAAQ;AACjC,EAAAA,SAAQ,WAAW;AACrB;",
6
+ "names": ["exports", "CommanderError", "InvalidArgumentError", "exports", "InvalidArgumentError", "Argument", "exports", "Help", "cmd", "str", "exports", "InvalidArgumentError", "Option", "str", "exports", "exports", "path", "fs", "process", "Argument", "CommanderError", "Help", "Option", "Command", "str", "option", "exports", "Argument", "Command", "CommanderError", "InvalidArgumentError", "Help", "Option", "exports", "exports", "exports", "exports", "os", "path", "exports", "module", "str", "exports", "module", "str", "exports", "module", "slash", "globby", "str", "exports", "type", "node", "exports", "module", "exports", "module", "exports", "module", "max", "str", "exports", "module", "isObject", "exports", "module", "exports", "module", "exports", "module", "exports", "module", "CHAR_COMMA", "CHAR_LEFT_SQUARE_BRACKET", "CHAR_RIGHT_SQUARE_BRACKET", "CHAR_DOUBLE_QUOTE", "CHAR_SINGLE_QUOTE", "type", "index", "exports", "module", "require_constants", "exports", "module", "path", "require_utils", "exports", "path", "str", "exports", "module", "CHAR_ASTERISK", "CHAR_COMMA", "CHAR_LEFT_SQUARE_BRACKET", "CHAR_RIGHT_SQUARE_BRACKET", "str", "finished", "require_parse", "exports", "module", "type", "opts", "value", "rest", "str", "source", "exports", "module", "path", "isObject", "str", "state", "require_picomatch", "exports", "module", "exports", "module", "str", "exports", "path", "isDynamicPattern", "isNegativePattern", "basename", "pattern", "relative", "exports", "module", "endStream", "exports", "merge", "exports", "require_utils", "exports", "fs", "path", "exports", "exports", "path", "exports", "path", "require_fs", "exports", "fs", "exports", "fs", "exports", "path", "statSync", "exports", "module", "exports", "module", "queueMicrotask", "require_constants", "exports", "require_fs", "exports", "require_utils", "exports", "fs", "exports", "require_async", "exports", "common", "path", "require_sync", "exports", "common", "require_fs", "exports", "fs", "require_settings", "exports", "path", "fs", "require_out", "exports", "path", "exports", "module", "exports", "module", "noop", "resolve", "require_common", "exports", "exports", "common", "require_async", "exports", "common", "require_async", "exports", "require_stream", "exports", "require_sync", "exports", "common", "require_sync", "exports", "require_settings", "exports", "path", "require_out", "exports", "require_reader", "exports", "path", "require_stream", "exports", "resolve", "require_async", "exports", "resolve", "exports", "exports", "exports", "exports", "isDirectory", "require_error", "exports", "require_entry", "exports", "exports", "path", "require_async", "exports", "require_stream", "exports", "require_sync", "exports", "require_sync", "exports", "require_settings", "exports", "fs", "os", "require_out", "exports", "module", "assertPatternsInput", "FastGlob", "generateTasks", "isDynamicPattern", "convertPathToPattern", "posix", "escapePath", "win32", "exports", "module", "str", "path", "throwError", "commander", "import_node_fs", "import_node_path", "process", "os", "tty", "styles", "chalk", "styles", "type", "import_node_process", "import_node_fs", "import_node_path", "import_node_stream", "PassThroughStream", "import_fast_glob", "execFileCallback", "import_node_process", "import_node_fs", "import_promises", "import_node_path", "path", "path", "import_node_path", "import_node_util", "fs", "path", "normalizeDirectoryPatternForFastGlob", "fsPromises", "fs", "path", "gitIgnore", "process", "fastGlob", "fs", "getStatSyncMethod", "path", "nodePath", "dirname", "process", "normalizeOptions", "patterns", "options", "fastGlob", "exception", "map", "schema", "type", "extend", "str", "string", "import_node_fs", "import_node_path", "import_node_child_process", "import_node_fs", "import_node_path", "import_node_fs", "import_node_path", "import_node_fs", "import_node_path", "import_node_child_process", "isHuskyInstalled", "import_node_fs", "import_node_path", "TEMPLATE_CANVAS", "import_node_fs", "import_node_path", "path", "VALID_DATA_TYPES", "path", "path", "findSimilar", "DEFAULT_OPTIONS", "DEFAULT_OPTIONS", "DEFAULT_OPTIONS", "findSimilar", "CONFIG_FILE_NAMES", "loadLibrary", "program"]
7
+ }